Skip to content

Commit

Permalink
Merge pull request #491 from PermanentOrg/dependabot/npm_and_yarn/per…
Browse files Browse the repository at this point in the history
…manentorg/sdk-0.8.0

Bump @permanentorg/sdk from 0.7.0 to 0.8.0
  • Loading branch information
liam-lloyd authored Oct 7, 2024
2 parents 87162e0 + 219f7e9 commit b95c898
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 21 deletions.
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"dependencies": {
"@fusionauth/typescript-client": "^1.53.0",
"@permanentorg/sdk": "0.7.0",
"@permanentorg/sdk": "0.8.0",
"@sentry/node": "^8.33.1",
"dotenv": "^16.4.5",
"logform": "^2.6.1",
Expand Down
50 changes: 33 additions & 17 deletions src/classes/PermanentFileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,11 @@ export class PermanentFileSystem {
const newFolder = await createFolder(
await this.getClientConfiguration(),
{
name: childName,
folder: {
name: childName,
},
parentFolder,
},
parentFolder,
);
parentFolder.folders.push(newFolder);
await this.updateFolderInCache(parentPath, parentFolder);
Expand Down Expand Up @@ -221,7 +223,9 @@ export class PermanentFileSystem {

await deleteFolder(
await this.getClientConfiguration(),
folder.id,
{
folderId: folder.id,
},
);
}

Expand All @@ -243,17 +247,21 @@ export class PermanentFileSystem {
};
const s3Url = await uploadFile(
await this.getClientConfiguration(),
dataStream,
fileFragment,
archiveRecordFragment,
parentFolder,
{
fileData: dataStream,
file: fileFragment,
item: archiveRecordFragment,
parentFolder,
},
);
const newArchiveRecord = await createArchiveRecord(
await this.getClientConfiguration(),
s3Url,
fileFragment,
archiveRecordFragment,
parentFolder,
{
s3Url,
file: fileFragment,
item: archiveRecordFragment,
parentFolder,
},
);
parentFolder.archiveRecords.push(newArchiveRecord);
this.archiveRecordCache.set(requestedPath, newArchiveRecord);
Expand All @@ -278,7 +286,9 @@ export class PermanentFileSystem {

await deleteArchiveRecord(
await this.getClientConfiguration(),
archiveRecord.id,
{
archiveRecordId: archiveRecord.id,
},
);
}

Expand Down Expand Up @@ -362,8 +372,10 @@ export class PermanentFileSystem {
);
const populatedArchiveRecord = await getArchiveRecord(
await this.getClientConfiguration(),
archiveRecord.id,
archiveId,
{
archiveRecordId: archiveRecord.id,
archiveId,
},
);
this.archiveRecordCache.set(requestedPath, populatedArchiveRecord);
return populatedArchiveRecord;
Expand Down Expand Up @@ -442,7 +454,9 @@ export class PermanentFileSystem {
}
const archiveFolders = await getArchiveFolders(
await this.getClientConfiguration(),
archiveId,
{
archiveId,
},
);
this.archiveFoldersCache.set(archiveId, archiveFolders);
return archiveFolders;
Expand Down Expand Up @@ -531,8 +545,10 @@ export class PermanentFileSystem {
);
const populatedTargetFolder = await getFolder(
await this.getClientConfiguration(),
targetFolder.id,
archiveId,
{
folderId: targetFolder.id,
archiveId,
},
);
this.folderCache.set(requestedPath, populatedTargetFolder);
return populatedTargetFolder;
Expand Down

0 comments on commit b95c898

Please sign in to comment.