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.12.0",
"version": "1.12.1",
"description": "An sdk for interacting with Internxt's services",
"repository": {
"type": "git",
Expand Down
11 changes: 11 additions & 0 deletions src/drive/storage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
FolderAncestor,
FolderAncestorWorkspace,
FolderMeta,
FolderStatsResponse,
FolderTreeResponse,
FileLimitsResponse,
MoveFilePayload,
Expand Down Expand Up @@ -749,6 +750,16 @@ export class Storage {
);
}

/**
* Gets the stats of a given folder UUID
*
* @param {string} uuid - UUID of the folder.
* @returns {Promise<FolderStatsResponse>}
*/
public getFolderStats(uuid: string): Promise<FolderStatsResponse> {
return this.client.get<FolderStatsResponse>(`folders/${uuid}/stats`, this.headers());
}

/**
* Gets the meta of a given folder Id
*
Expand Down
2 changes: 2 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 @@ -114,13 +114,15 @@
}

export type FileMeta = paths['/files/{uuid}/meta']['get']['responses']['200']['content']['application/json'];
export type FolderStatsResponse =
paths['/folders/{uuid}/stats']['get']['responses']['200']['content']['application/json'];

export interface ShareLink {
id: string;
token: string;
mnemonic: string;
user: any;

Check warning on line 124 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 125 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
8 changes: 4 additions & 4 deletions src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3062,7 +3062,7 @@ export interface components {
*/
bucket: string;
/**
* @description The ID of the file (required when size > 0)
* @description The ID of the file (required when size > 0, must not be provided when size = 0)
* @example file12345
*/
fileId?: string;
Expand Down Expand Up @@ -3168,7 +3168,7 @@ export interface components {
};
ReplaceFileDto: {
/**
* @description File id (required when size > 0)
* @description File id (required when size > 0, must not be provided when size = 0)
* @example 651300a2da9b27001f63f384
*/
fileId?: string;
Expand Down Expand Up @@ -3904,7 +3904,7 @@ export interface components {
*/
bucket: string;
/**
* @description The ID of the file (required when size > 0)
* @description The ID of the file (required when size > 0, must not be provided when size = 0)
* @example file12345
*/
fileId?: string;
Expand Down Expand Up @@ -8697,7 +8697,7 @@ export interface operations {
};
};
responses: {
/** @description Incomplete checkout email sent successfully */
/** @description Incomplete checkout processed successfully */
200: {
headers: {
[name: string]: unknown;
Expand Down
Loading