@internxt/sdk 1.9.27 → 1.9.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -54,6 +54,13 @@ export declare class Backups {
|
|
|
54
54
|
* @returns A promise that resolves when the device is successfully deleted.
|
|
55
55
|
*/
|
|
56
56
|
deleteBackupDevice(deviceId: number): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Deletes a backup device by its folder ID.
|
|
59
|
+
*
|
|
60
|
+
* @param folderId - The unique identifier of the folder to be deleted.
|
|
61
|
+
* @returns A promise that resolves when the device is successfully deleted.
|
|
62
|
+
*/
|
|
63
|
+
deleteBackupDeviceAsFolder(folderId: string): Promise<void>;
|
|
57
64
|
/**
|
|
58
65
|
* Returns the needed headers for the module requests
|
|
59
66
|
* @private
|
|
@@ -80,6 +80,16 @@ var Backups = /** @class */ (function () {
|
|
|
80
80
|
return this.client
|
|
81
81
|
.delete("/backup/devices/".concat(deviceId), this.headers());
|
|
82
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* Deletes a backup device by its folder ID.
|
|
85
|
+
*
|
|
86
|
+
* @param folderId - The unique identifier of the folder to be deleted.
|
|
87
|
+
* @returns A promise that resolves when the device is successfully deleted.
|
|
88
|
+
*/
|
|
89
|
+
Backups.prototype.deleteBackupDeviceAsFolder = function (folderId) {
|
|
90
|
+
return this.client
|
|
91
|
+
.delete("/backup/deviceAsFolder/".concat(folderId), this.headers());
|
|
92
|
+
};
|
|
83
93
|
/**
|
|
84
94
|
* Returns the needed headers for the module requests
|
|
85
95
|
* @private
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiSecurity, ApiUrl, AppDetails } from '../../shared';
|
|
2
|
-
import { AcceptInvitationToSharedFolderPayload, CreateSharingPayload, GenerateShareLinkPayload, GetShareLinkFolderSizePayload, GetSharedDirectoryPayload, ListAllSharedFoldersResponse, ListPrivateSharedFoldersResponse, ListShareLinksResponse, ListSharedItemsResponse, PublicSharedItemInfo, RemoveUserRolePayload, Role, ShareDomainsResponse, ShareFolderWithUserPayload, ShareLink, SharedFolderSize, SharedFolderUser, SharedFoldersInvitationsAsInvitedUserResponse, SharingInvite, SharingMeta, UpdateShareLinkPayload, UpdateUserRolePayload, UpdateUserRoleResponse } from './types';
|
|
2
|
+
import { AcceptInvitationToSharedFolderPayload, CreateSharingPayload, GenerateShareLinkPayload, GetShareLinkFolderSizePayload, GetSharedDirectoryPayload, ListAllSharedFoldersResponse, ListPrivateSharedFoldersResponse, ListShareLinksResponse, ListSharedItemsResponse, PublicSharedItemInfo, RemoveUserRolePayload, Role, ShareDomainsResponse, ShareFolderWithUserPayload, ShareLink, SharedFolderSize, SharedFolderUser, SharedFoldersInvitationsAsInvitedUserResponse, SharingInfo, SharingInvite, SharingMeta, UpdateShareLinkPayload, UpdateUserRolePayload, UpdateUserRoleResponse } from './types';
|
|
3
3
|
import { ItemType } from 'src/workspaces';
|
|
4
4
|
export * as ShareTypes from './types';
|
|
5
5
|
export declare class Share {
|
|
@@ -270,6 +270,16 @@ export declare class Share {
|
|
|
270
270
|
itemId: string;
|
|
271
271
|
itemType: string;
|
|
272
272
|
}): Promise<SharingMeta>;
|
|
273
|
+
/**
|
|
274
|
+
* Obtains detailed sharing information for a given file or folder
|
|
275
|
+
* @param {string} options.itemType - folder | file
|
|
276
|
+
* @param {string} options.itemId - id of folder or file
|
|
277
|
+
* @returns {Promise<SharingInfo>} A promise that returns information about the shared item.
|
|
278
|
+
*/
|
|
279
|
+
getSharingInfo({ itemId, itemType }: {
|
|
280
|
+
itemId: string;
|
|
281
|
+
itemType: string;
|
|
282
|
+
}): Promise<SharingInfo>;
|
|
273
283
|
declineSharedFolderInvite(invitationId: string, token?: string): Promise<void>;
|
|
274
284
|
/**
|
|
275
285
|
* Fetches roles for sharing items.
|
|
@@ -453,6 +453,17 @@ var Share = /** @class */ (function () {
|
|
|
453
453
|
var headers = this.headers();
|
|
454
454
|
return this.client.get("sharings/".concat(itemType, "/").concat(itemId, "/type"), headers);
|
|
455
455
|
};
|
|
456
|
+
/**
|
|
457
|
+
* Obtains detailed sharing information for a given file or folder
|
|
458
|
+
* @param {string} options.itemType - folder | file
|
|
459
|
+
* @param {string} options.itemId - id of folder or file
|
|
460
|
+
* @returns {Promise<SharingInfo>} A promise that returns information about the shared item.
|
|
461
|
+
*/
|
|
462
|
+
Share.prototype.getSharingInfo = function (_a) {
|
|
463
|
+
var itemId = _a.itemId, itemType = _a.itemType;
|
|
464
|
+
var headers = this.headers();
|
|
465
|
+
return this.client.get("sharings/".concat(itemType, "/").concat(itemId, "/info"), headers);
|
|
466
|
+
};
|
|
456
467
|
Share.prototype.declineSharedFolderInvite = function (invitationId, token) {
|
|
457
468
|
var headers = this.getRequestHeaders(token);
|
|
458
469
|
return this.client.delete("sharings/invites/".concat(invitationId), headers);
|
|
@@ -375,6 +375,15 @@ export type SharingMeta = {
|
|
|
375
375
|
item: SharedFiles | SharedFolders;
|
|
376
376
|
itemToken: string;
|
|
377
377
|
};
|
|
378
|
+
export type SharingInfo = {
|
|
379
|
+
type: 'public' | 'private';
|
|
380
|
+
publicSharing: {
|
|
381
|
+
id: string;
|
|
382
|
+
isPasswordProtected: boolean;
|
|
383
|
+
encryptedCode: string;
|
|
384
|
+
};
|
|
385
|
+
invitationsCount: number;
|
|
386
|
+
};
|
|
378
387
|
export type Sharing = {
|
|
379
388
|
type: string;
|
|
380
389
|
id: string;
|