Skip to content

Commit

Permalink
Merge pull request #48 from Akord-com/impro
Browse files Browse the repository at this point in the history
Impro
  • Loading branch information
jarrvis authored Jan 18, 2023
2 parents a41efd4 + cf65a5e commit 7edd0ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"node": ">=16.0.0 <17.0.0"
},
"dependencies": {
"@akord/crypto": "0.7.1",
"@akord/crypto": "0.7.2",
"@akord/ts-cacheable": "1.0.11",
"amazon-cognito-identity-js": "^5.2.8",
"axios": "^0.24.0",
Expand Down
11 changes: 11 additions & 0 deletions src/types/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ export class FileVersion extends Encryptable {
this.name = name;
this.status = status;
}

getUri(type: StorageType) {
return this.resourceUri
?.find(uri => uri.startsWith(type))
?.replace(type, "");
}
}

export class MemoVersion extends Encryptable {
Expand Down Expand Up @@ -181,3 +187,8 @@ export class NodeFactory {
return new nodeLike(data, keys);
}
}

export enum StorageType {
S3 = "s3:",
ARWEAVE = "arweave:"
}

0 comments on commit 7edd0ca

Please sign in to comment.