Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@internxt/sdk",
"author": "Internxt <hello@internxt.com>",
"version": "1.11.21",
"version": "1.11.22",
"description": "An sdk for interacting with Internxt's services",
"repository": {
"type": "git",
Expand Down
11 changes: 8 additions & 3 deletions src/drive/storage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
MoveFolderResponse,
MoveFolderUuidPayload,
ReplaceFile,
RestoreFileVersionResponse,
SearchResultData,
Thumbnail,
ThumbnailEntry,
Expand Down Expand Up @@ -881,10 +882,14 @@ export class Storage {
*
* @param {string} uuid - The UUID of the file.
* @param {string} versionId - The UUID of the version to restore.
* @returns {Promise<FileVersion>} A promise that resolves with the restored version.
* @returns {Promise<RestoreFileVersionResponse>} A promise that resolves with the restored file.
*/
public restoreFileVersion(uuid: string, versionId: string): Promise<FileVersion> {
return this.client.post<FileVersion>(`/files/${uuid}/versions/${versionId}/restore`, {}, this.headers());
public restoreFileVersion(uuid: string, versionId: string): Promise<RestoreFileVersionResponse> {
return this.client.post<RestoreFileVersionResponse>(
`/files/${uuid}/versions/${versionId}/restore`,
{},
this.headers(),
);
}

/**
Expand Down
3 changes: 3 additions & 0 deletions src/drive/storage/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
parent: string | null;
bucket: string;
userId: number;
user: any | null;

Check warning on line 98 in src/drive/storage/types.ts

View workflow job for this annotation

GitHub Actions / test (22.x)

Unexpected any. Specify a different type
encryptVersion: string;
deleted: boolean;
deletedAt: string | null;
Expand All @@ -119,8 +119,8 @@
id: string;
token: string;
mnemonic: string;
user: any;

Check warning on line 122 in src/drive/storage/types.ts

View workflow job for this annotation

GitHub Actions / test (22.x)

Unexpected any. Specify a different type
item: any;

Check warning on line 123 in src/drive/storage/types.ts

View workflow job for this annotation

GitHub Actions / test (22.x)

Unexpected any. Specify a different type
encryptionKey: string;
bucket: string;
itemToken: string;
Expand Down Expand Up @@ -469,4 +469,7 @@

export type FileVersion = paths['/files/{uuid}/versions']['get']['responses']['200']['content']['application/json'][0];

export type RestoreFileVersionResponse =
paths['/files/{uuid}/versions/{versionId}/restore']['post']['responses']['200']['content']['application/json'];

export type GetFileLimitsResponse = paths['/files/limits']['get']['responses']['200']['content']['application/json'];
7 changes: 6 additions & 1 deletion src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3160,6 +3160,11 @@ export interface components {
createdAt: string;
/** Format: date-time */
updatedAt: string;
/**
* Format: date-time
* @description Date when this version expires based on retention policy
*/
expiresAt: string;
};
ReplaceFileDto: {
/**
Expand Down Expand Up @@ -5299,7 +5304,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['FileVersionDto'];
'application/json': components['schemas']['FileDto'];
};
};
};
Expand Down
Loading