hcloud-sdk 17.0.0 → 18.0.0
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.
- package/changelog.md +176 -76
- package/lib/Base.d.ts +2 -1
- package/lib/Hcloud.d.ts +6 -3
- package/lib/Hcloud.js +16 -5
- package/lib/helper/ValidationHelper.d.ts +10 -2
- package/lib/helper/ValidationHelper.js +55 -7
- package/lib/interfaces/auditor/index.d.ts +13 -2
- package/lib/interfaces/auditor/index.js +9 -1
- package/lib/interfaces/cosmo/asset/index.d.ts +185 -0
- package/lib/interfaces/cosmo/asset/index.js +82 -0
- package/lib/interfaces/cosmo/comment/index.d.ts +38 -0
- package/lib/interfaces/cosmo/comment/index.js +8 -0
- package/lib/interfaces/cosmo/event/index.d.ts +31 -0
- package/lib/interfaces/cosmo/event/index.js +17 -0
- package/lib/interfaces/cosmo/location/index.d.ts +4 -0
- package/lib/interfaces/cosmo/namespace/index.d.ts +9 -0
- package/lib/interfaces/cosmo/namespace/index.js +9 -0
- package/lib/interfaces/cosmo/permissions.d.ts +96 -0
- package/lib/interfaces/cosmo/permissions.js +58 -0
- package/lib/interfaces/cosmo/share/index.d.ts +28 -0
- package/lib/interfaces/cosmo/share/index.js +2 -0
- package/lib/interfaces/cosmo/space/index.d.ts +25 -0
- package/lib/interfaces/cosmo/space/index.js +2 -0
- package/lib/interfaces/cosmo/tag/tag.d.ts +12 -0
- package/lib/interfaces/cosmo/tag/tag.js +2 -0
- package/lib/interfaces/global/Products.d.ts +2 -2
- package/lib/interfaces/global/Products.js +1 -1
- package/lib/interfaces/high5/index.d.ts +7 -7
- package/lib/interfaces/high5/index.js +7 -7
- package/lib/interfaces/{friday → high5}/space/database/document/index.d.ts +1 -1
- package/lib/interfaces/{friday → high5}/space/database/document/index.js +2 -1
- package/lib/interfaces/high5/space/database/index.js +2 -0
- package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +9 -2
- package/lib/interfaces/high5/space/execution/index.d.ts +2 -1
- package/lib/interfaces/high5/space/job/JobLog.d.ts +16 -0
- package/lib/interfaces/high5/space/job/JobLog.js +2 -0
- package/lib/interfaces/high5/space/job/index.d.ts +38 -0
- package/lib/interfaces/high5/space/job/index.js +8 -0
- package/lib/interfaces/high5/stats.d.ts +21 -0
- package/lib/interfaces/high5/stats.js +2 -0
- package/lib/interfaces/idp/oauth/index.d.ts +4 -3
- package/lib/interfaces/idp/organization/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/index.js +1 -0
- package/lib/interfaces/idp/organization/license/index.d.ts +13 -11
- package/lib/interfaces/idp/organization/member/index.d.ts +1 -0
- package/lib/interfaces/idp/organization/stats.d.ts +7 -0
- package/lib/interfaces/idp/organization/stats.js +2 -0
- package/lib/interfaces/idp/organization/team/index.d.ts +0 -1
- package/lib/interfaces/idp/user/Message.d.ts +21 -0
- package/lib/interfaces/idp/user/Message.js +14 -0
- package/lib/interfaces/idp/user/NotificationSettings.d.ts +1 -0
- package/lib/interfaces/idp/user/Scopes.d.ts +1 -7
- package/lib/interfaces/idp/user/Scopes.js +0 -9
- package/lib/interfaces/idp/user/index.d.ts +2 -1
- package/lib/interfaces/mailer/index.d.ts +30 -1
- package/lib/interfaces/mailer/index.js +87 -1
- package/lib/interfaces/mothership/index.d.ts +3 -1
- package/lib/interfaces/mothership/index.js +15 -0
- package/lib/interfaces/mothership/stats.d.ts +4 -0
- package/lib/interfaces/mothership/stats.js +2 -0
- package/lib/interfaces/nats/index.d.ts +54 -24
- package/lib/interfaces/nats/index.js +87 -58
- package/lib/interfaces/shorts/index.d.ts +10 -0
- package/lib/interfaces/shorts/index.js +2 -0
- package/lib/service/agent/bundle/dev/index.d.ts +16 -6
- package/lib/service/agent/bundle/dev/index.js +12 -10
- package/lib/service/agent/bundle/index.d.ts +10 -4
- package/lib/service/agent/bundle/index.js +6 -6
- package/lib/service/agent/context/index.d.ts +22 -8
- package/lib/service/agent/context/index.js +15 -14
- package/lib/service/auditor/index.d.ts +8 -4
- package/lib/service/auditor/index.js +5 -5
- package/lib/service/auditor/internal/index.d.ts +27 -3
- package/lib/service/auditor/internal/index.js +34 -5
- package/lib/service/bouncer/features/index.d.ts +4 -2
- package/lib/service/bouncer/features/index.js +2 -2
- package/lib/service/cosmo/asset/index.d.ts +219 -0
- package/lib/service/cosmo/asset/index.js +314 -0
- package/lib/service/cosmo/comment/index.d.ts +122 -0
- package/lib/service/cosmo/comment/index.js +161 -0
- package/lib/service/cosmo/event/index.d.ts +23 -0
- package/lib/service/cosmo/event/index.js +40 -0
- package/lib/service/cosmo/folder/index.d.ts +27 -0
- package/lib/service/cosmo/folder/index.js +47 -0
- package/lib/service/cosmo/index.d.ts +49 -0
- package/lib/service/cosmo/index.js +119 -0
- package/lib/service/cosmo/internal/index.d.ts +7 -0
- package/lib/service/cosmo/internal/index.js +17 -0
- package/lib/service/cosmo/internal/space/index.d.ts +15 -0
- package/lib/service/cosmo/internal/space/index.js +34 -0
- package/lib/service/cosmo/location/index.d.ts +40 -0
- package/lib/service/cosmo/location/index.js +63 -0
- package/lib/service/cosmo/namespace/index.d.ts +42 -0
- package/lib/service/cosmo/namespace/index.js +65 -0
- package/lib/service/cosmo/organization/index.d.ts +47 -0
- package/lib/service/cosmo/organization/index.js +64 -0
- package/lib/service/cosmo/permissions/index.d.ts +131 -0
- package/lib/service/cosmo/permissions/index.js +181 -0
- package/lib/service/cosmo/production/index.d.ts +26 -0
- package/lib/service/cosmo/production/index.js +45 -0
- package/lib/service/cosmo/share/index.d.ts +161 -0
- package/lib/service/cosmo/share/index.js +215 -0
- package/lib/service/cosmo/space/index.d.ts +104 -0
- package/lib/service/cosmo/space/index.js +146 -0
- package/lib/service/cosmo/tag/index.d.ts +67 -0
- package/lib/service/cosmo/tag/index.js +93 -0
- package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +10 -4
- package/lib/service/dali/avatar/DaliCosmoSpace.js +8 -7
- package/lib/service/dali/avatar/DaliFuseSpace.d.ts +10 -4
- package/lib/service/dali/avatar/DaliFuseSpace.js +7 -6
- package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +10 -4
- package/lib/service/dali/avatar/DaliHigh5Pool.js +7 -6
- package/lib/service/dali/avatar/DaliHigh5Space.d.ts +10 -4
- package/lib/service/dali/avatar/DaliHigh5Space.js +7 -6
- package/lib/service/dali/avatar/DaliOAuthApp.d.ts +10 -4
- package/lib/service/dali/avatar/DaliOAuthApp.js +7 -6
- package/lib/service/dali/avatar/DaliOrganization.d.ts +10 -4
- package/lib/service/dali/avatar/DaliOrganization.js +7 -6
- package/lib/service/dali/avatar/DaliServiceAccount.d.ts +10 -4
- package/lib/service/dali/avatar/DaliServiceAccount.js +7 -6
- package/lib/service/dali/avatar/DaliTeam.d.ts +10 -4
- package/lib/service/dali/avatar/DaliTeam.js +7 -6
- package/lib/service/dali/avatar/DaliUser.d.ts +10 -4
- package/lib/service/dali/avatar/DaliUser.js +7 -6
- package/lib/service/dali/index.d.ts +4 -5
- package/lib/service/dali/index.js +2 -5
- package/lib/service/fuse/index.d.ts +4 -2
- package/lib/service/fuse/index.js +2 -2
- package/lib/service/fuse/internal/index.d.ts +4 -2
- package/lib/service/fuse/internal/index.js +3 -2
- package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +4 -2
- package/lib/service/fuse/internal/space/cronjob/log/index.js +2 -2
- package/lib/service/fuse/internal/space/index.d.ts +7 -3
- package/lib/service/fuse/internal/space/index.js +6 -4
- package/lib/service/fuse/space/cronjob/index.d.ts +35 -13
- package/lib/service/fuse/space/cronjob/index.js +48 -50
- package/lib/service/fuse/space/cronjob/log/index.d.ts +8 -4
- package/lib/service/fuse/space/cronjob/log/index.js +5 -5
- package/lib/service/fuse/space/index.d.ts +27 -11
- package/lib/service/fuse/space/index.js +19 -18
- package/lib/service/high5/execution/index.d.ts +4 -2
- package/lib/service/high5/execution/index.js +3 -2
- package/lib/service/high5/execution/status/index.d.ts +5 -3
- package/lib/service/high5/execution/status/index.js +3 -3
- package/lib/service/high5/index.d.ts +7 -2
- package/lib/service/high5/index.js +9 -2
- package/lib/service/high5/internal/index.d.ts +4 -2
- package/lib/service/high5/internal/index.js +3 -2
- package/lib/service/high5/internal/space/index.d.ts +10 -3
- package/lib/service/high5/internal/space/index.js +13 -4
- package/lib/service/high5/internal/space/job/index.d.ts +7 -0
- package/lib/service/high5/internal/space/job/index.js +17 -0
- package/lib/service/high5/internal/space/job/log/index.d.ts +17 -0
- package/lib/service/high5/internal/space/job/log/index.js +34 -0
- package/lib/service/high5/joinToken/index.d.ts +14 -6
- package/lib/service/high5/joinToken/index.js +10 -9
- package/lib/service/high5/space/database/document/array/index.d.ts +73 -0
- package/lib/service/high5/space/database/document/array/index.js +102 -0
- package/lib/service/{friday → high5}/space/database/document/index.d.ts +26 -10
- package/lib/service/{friday → high5}/space/database/document/index.js +31 -16
- package/lib/service/high5/space/database/document/number/index.d.ts +51 -0
- package/lib/service/high5/space/database/document/number/index.js +77 -0
- package/lib/service/{friday → high5}/space/database/index.d.ts +22 -12
- package/lib/service/{friday → high5}/space/database/index.js +18 -17
- package/lib/service/high5/space/event/index.d.ts +17 -7
- package/lib/service/high5/space/event/index.js +12 -11
- package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +4 -2
- package/lib/service/high5/space/event/stream/design/DesignOperations.js +2 -2
- package/lib/service/high5/space/event/stream/design/index.d.ts +10 -4
- package/lib/service/high5/space/event/stream/design/index.js +7 -6
- package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +16 -6
- package/lib/service/high5/space/event/stream/design/snapshot/index.js +12 -10
- package/lib/service/high5/space/event/stream/index.d.ts +32 -12
- package/lib/service/high5/space/event/stream/index.js +22 -21
- package/lib/service/high5/space/execution/index.d.ts +19 -7
- package/lib/service/high5/space/execution/index.js +17 -12
- package/lib/service/high5/space/execution/log/index.d.ts +8 -4
- package/lib/service/high5/space/execution/log/index.js +5 -5
- package/lib/service/high5/space/execution/status/index.d.ts +7 -3
- package/lib/service/high5/space/execution/status/index.js +4 -4
- package/lib/service/high5/space/index.d.ts +43 -14
- package/lib/service/high5/space/index.js +45 -23
- package/lib/service/high5/space/job/index.d.ts +145 -0
- package/lib/service/high5/space/job/index.js +201 -0
- package/lib/service/high5/space/job/log/index.d.ts +35 -0
- package/lib/service/high5/space/job/log/index.js +58 -0
- package/lib/service/high5/space/node/index.d.ts +20 -8
- package/lib/service/high5/space/node/index.js +14 -13
- package/lib/service/high5/space/pool/index.d.ts +27 -11
- package/lib/service/high5/space/pool/index.js +19 -18
- package/lib/service/high5/space/secret/index.d.ts +17 -7
- package/lib/service/high5/space/secret/index.js +12 -11
- package/lib/service/high5/space/stat/index.d.ts +12 -0
- package/lib/service/high5/space/stat/index.js +31 -0
- package/lib/service/high5/space/wave/index.d.ts +16 -6
- package/lib/service/high5/space/wave/index.js +11 -10
- package/lib/service/high5/space/webhook/index.d.ts +32 -12
- package/lib/service/high5/space/webhook/index.js +25 -21
- package/lib/service/high5/space/webhook/log/index.d.ts +4 -2
- package/lib/service/high5/space/webhook/log/index.js +2 -2
- package/lib/service/high5/stat/index.d.ts +11 -0
- package/lib/service/high5/stat/index.js +30 -0
- package/lib/service/high5/wave/s3/index.d.ts +31 -8
- package/lib/service/high5/wave/s3/index.js +42 -21
- package/lib/service/idp/guest/index.d.ts +42 -0
- package/lib/service/idp/guest/index.js +66 -0
- package/lib/service/idp/index.d.ts +25 -7
- package/lib/service/idp/index.js +23 -12
- package/lib/service/idp/internal/index.d.ts +5 -3
- package/lib/service/idp/internal/index.js +5 -3
- package/lib/service/idp/oauth/index.d.ts +16 -6
- package/lib/service/idp/oauth/index.js +15 -15
- package/lib/service/idp/organization/index.d.ts +19 -5
- package/lib/service/idp/organization/index.js +19 -8
- package/lib/service/idp/organization/license/index.d.ts +7 -3
- package/lib/service/idp/organization/license/index.js +4 -4
- package/lib/service/idp/organization/member/index.d.ts +20 -8
- package/lib/service/idp/organization/member/index.js +15 -13
- package/lib/service/idp/organization/member/invitations/index.d.ts +23 -9
- package/lib/service/idp/organization/member/invitations/index.js +72 -59
- package/lib/service/idp/organization/service-accounts/index.d.ts +20 -8
- package/lib/service/idp/organization/service-accounts/index.js +13 -12
- package/lib/service/idp/organization/settings/domain/index.d.ts +13 -5
- package/lib/service/idp/organization/settings/domain/index.js +9 -8
- package/lib/service/idp/organization/settings/domain/saml/index.d.ts +16 -6
- package/lib/service/idp/organization/settings/domain/saml/index.js +19 -18
- package/lib/service/idp/organization/settings/oauth/index.d.ts +23 -9
- package/lib/service/idp/organization/settings/oauth/index.js +16 -15
- package/lib/service/idp/organization/stat/index.d.ts +11 -0
- package/lib/service/idp/organization/stat/index.js +30 -0
- package/lib/service/idp/organization/team/index.d.ts +22 -10
- package/lib/service/idp/organization/team/index.js +14 -13
- package/lib/service/idp/registration/index.d.ts +10 -4
- package/lib/service/idp/registration/index.js +15 -9
- package/lib/service/idp/user/index.d.ts +33 -11
- package/lib/service/idp/user/index.js +29 -16
- package/lib/service/idp/user/license/index.d.ts +7 -3
- package/lib/service/idp/user/license/index.js +4 -4
- package/lib/service/idp/user/message/index.d.ts +61 -0
- package/lib/service/idp/user/message/index.js +92 -0
- package/lib/service/idp/user/password/index.d.ts +4 -2
- package/lib/service/idp/user/password/index.js +2 -2
- package/lib/service/idp/user/settings/connections/index.d.ts +4 -2
- package/lib/service/idp/user/settings/connections/index.js +2 -2
- package/lib/service/idp/user/settings/general/index.d.ts +10 -4
- package/lib/service/idp/user/settings/general/index.js +6 -6
- package/lib/service/idp/user/settings/notifications/index.d.ts +7 -3
- package/lib/service/idp/user/settings/notifications/index.js +4 -4
- package/lib/service/idp/user/settings/oauthApps/index.d.ts +7 -3
- package/lib/service/idp/user/settings/oauthApps/index.js +6 -5
- package/lib/service/idp/user/settings/pats/index.d.ts +22 -8
- package/lib/service/idp/user/settings/pats/index.js +17 -15
- package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +16 -6
- package/lib/service/idp/user/settings/twoFactor/totp/index.js +13 -10
- package/lib/service/mailer/index.d.ts +4 -2
- package/lib/service/mailer/index.js +2 -2
- package/lib/service/mailer/internal/index.d.ts +13 -5
- package/lib/service/mailer/internal/index.js +8 -8
- package/lib/service/mothership/index.d.ts +35 -13
- package/lib/service/mothership/index.js +32 -17
- package/lib/service/nats/index.js +58 -43
- package/lib/service/shorts/index.d.ts +18 -0
- package/lib/service/{friday → shorts}/index.js +13 -10
- package/lib/service/shorts/internal/index.d.ts +72 -0
- package/lib/service/shorts/internal/index.js +104 -0
- package/package.json +1 -1
- package/lib/interfaces/friday/index.d.ts +0 -3
- package/lib/interfaces/friday/index.js +0 -19
- package/lib/interfaces/friday/space/index.d.ts +0 -21
- package/lib/interfaces/friday/space/index.js +0 -11
- package/lib/service/friday/index.d.ts +0 -13
- package/lib/service/friday/space/index.d.ts +0 -81
- package/lib/service/friday/space/index.js +0 -150
- /package/lib/interfaces/{friday/space/database → cosmo/location}/index.js +0 -0
- /package/lib/interfaces/{friday → high5}/space/database/index.d.ts +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
|
+
import { DetailedRole, Permission, PermissionDiscovery, Role } from "../../../interfaces/cosmo/permissions";
|
|
3
|
+
import { SearchFilter, Sorting } from "../../../interfaces/global";
|
|
4
|
+
export declare class CosmoPermissions extends Base {
|
|
5
|
+
/**
|
|
6
|
+
* Fetches a list of all available permissions that can be assigned to roles.
|
|
7
|
+
*
|
|
8
|
+
* @returns A promise resolving to the permission discovery metadata.
|
|
9
|
+
*/
|
|
10
|
+
listAllPermissions<R extends boolean = false>(raw?: {
|
|
11
|
+
raw: R;
|
|
12
|
+
}): Promise<MaybeRaw<R, PermissionDiscovery>>;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new role within a specified organization and space.
|
|
15
|
+
*
|
|
16
|
+
* @param orgName - The name of the organization.
|
|
17
|
+
* @param spaceName - The name of the space.
|
|
18
|
+
* @param roleName - The name of the new role.
|
|
19
|
+
* @param permissions - A record of resource keys to arrays of permission names.
|
|
20
|
+
* @returns A promise resolving to the created role object.
|
|
21
|
+
*/
|
|
22
|
+
createRole<R extends boolean = false>(orgName: string, spaceName: string, roleName: string, permissions: Record<string, Permission["name"][]>, raw?: {
|
|
23
|
+
raw: R;
|
|
24
|
+
}): Promise<MaybeRaw<R, Role>>;
|
|
25
|
+
/**
|
|
26
|
+
* Searches for roles within a space based on filters, sorting, and pagination.
|
|
27
|
+
*
|
|
28
|
+
* @param options - An object containing search parameters.
|
|
29
|
+
* @param options.orgName - The name of the organization.
|
|
30
|
+
* @param options.spaceName - The name of the space.
|
|
31
|
+
* @param options.filters - Optional array of search filters.
|
|
32
|
+
* @param options.sorting - Optional sorting criteria.
|
|
33
|
+
* @param options.limit - Optional limit for pagination.
|
|
34
|
+
* @param options.page - Optional page number for pagination.
|
|
35
|
+
* @returns A promise resolving to a list of matching role objects.
|
|
36
|
+
*/
|
|
37
|
+
searchRoles<R extends boolean = false>({ orgName, spaceName, filters, sorting, limit, page, }: {
|
|
38
|
+
orgName: string;
|
|
39
|
+
spaceName: string;
|
|
40
|
+
filters?: SearchFilter[];
|
|
41
|
+
sorting?: Sorting;
|
|
42
|
+
limit?: number;
|
|
43
|
+
page?: number;
|
|
44
|
+
}, raw?: {
|
|
45
|
+
raw: R;
|
|
46
|
+
}): Promise<MaybeRaw<R, Role[]>>;
|
|
47
|
+
/**
|
|
48
|
+
* Updates an existing role's name and permissions.
|
|
49
|
+
*
|
|
50
|
+
* @param orgName - The name of the organization.
|
|
51
|
+
* @param spaceName - The name of the space.
|
|
52
|
+
* @param roleId - The ID of the role to update.
|
|
53
|
+
* @param newName - The new name for the role.
|
|
54
|
+
* @param permissions - The updated permissions mapping.
|
|
55
|
+
* @returns A promise resolving to the updated role.
|
|
56
|
+
*/
|
|
57
|
+
updateRole<R extends boolean = false>(orgName: string, spaceName: string, roleId: string, newName: string, permissions: Record<string, Permission["name"][]>, raw?: {
|
|
58
|
+
raw: R;
|
|
59
|
+
}): Promise<MaybeRaw<R, Role>>;
|
|
60
|
+
/**
|
|
61
|
+
* Fetches detailed information about a specific role.
|
|
62
|
+
*
|
|
63
|
+
* @param orgName - The name of the organization.
|
|
64
|
+
* @param spaceName - The name of the space.
|
|
65
|
+
* @param roleId - The ID of the role to retrieve.
|
|
66
|
+
* @returns A promise resolving to the detailed role object.
|
|
67
|
+
*/
|
|
68
|
+
fetchRole<R extends boolean = false>(orgName: string, spaceName: string, roleId: string, raw?: {
|
|
69
|
+
raw: R;
|
|
70
|
+
}): Promise<MaybeRaw<R, DetailedRole>>;
|
|
71
|
+
/**
|
|
72
|
+
* Deletes a role by its ID.
|
|
73
|
+
*
|
|
74
|
+
* @param orgName - The name of the organization.
|
|
75
|
+
* @param spaceName - The name of the space.
|
|
76
|
+
* @param roleId - The ID of the role to delete.
|
|
77
|
+
* @returns A promise that resolves when the role is deleted.
|
|
78
|
+
*/
|
|
79
|
+
deleteRole<R extends boolean = false>(orgName: string, spaceName: string, roleId: string, raw?: {
|
|
80
|
+
raw: R;
|
|
81
|
+
}): Promise<MaybeRaw<R, DetailedRole>>;
|
|
82
|
+
/**
|
|
83
|
+
* Assigns a user to a role.
|
|
84
|
+
*
|
|
85
|
+
* @param orgName - The name of the organization.
|
|
86
|
+
* @param spaceName - The name of the space.
|
|
87
|
+
* @param roleId - The ID of the role.
|
|
88
|
+
* @param userId - The ID of the user to assign.
|
|
89
|
+
* @returns A promise that resolves when the assignment is complete.
|
|
90
|
+
*/
|
|
91
|
+
assignUserToRole<R extends boolean = false>(orgName: string, spaceName: string, roleId: string, userId: string, raw?: {
|
|
92
|
+
raw: R;
|
|
93
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
94
|
+
/**
|
|
95
|
+
* Unassigns a user from a role.
|
|
96
|
+
*
|
|
97
|
+
* @param orgName - The name of the organization.
|
|
98
|
+
* @param spaceName - The name of the space.
|
|
99
|
+
* @param roleId - The ID of the role.
|
|
100
|
+
* @param userId - The ID of the user to unassign.
|
|
101
|
+
* @returns A promise that resolves when the user is removed.
|
|
102
|
+
*/
|
|
103
|
+
unassignUserFromRole<R extends boolean = false>(orgName: string, spaceName: string, roleId: string, userId: string, raw?: {
|
|
104
|
+
raw: R;
|
|
105
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
106
|
+
/**
|
|
107
|
+
* Assigns a team to a role.
|
|
108
|
+
*
|
|
109
|
+
* @param orgName - The name of the organization.
|
|
110
|
+
* @param spaceName - The name of the space.
|
|
111
|
+
* @param roleId - The ID of the role.
|
|
112
|
+
* @param teamName - The name of the team to assign.
|
|
113
|
+
* @returns A promise that resolves when the assignment is complete.
|
|
114
|
+
*/
|
|
115
|
+
assignTeamToRole<R extends boolean = false>(orgName: string, spaceName: string, roleId: string, teamName: string, raw?: {
|
|
116
|
+
raw: R;
|
|
117
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
118
|
+
/**
|
|
119
|
+
* Unassigns a team from a role.
|
|
120
|
+
*
|
|
121
|
+
* @param orgName - The name of the organization.
|
|
122
|
+
* @param spaceName - The name of the space.
|
|
123
|
+
* @param roleId - The ID of the role.
|
|
124
|
+
* @param teamName - The name of the team to unassign.
|
|
125
|
+
* @returns A promise that resolves when the team is removed.
|
|
126
|
+
*/
|
|
127
|
+
unassignTeamFromRole<R extends boolean = false>(orgName: string, spaceName: string, roleId: string, teamName: string, raw?: {
|
|
128
|
+
raw: R;
|
|
129
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
130
|
+
protected getEndpoint(endpoint: string): string;
|
|
131
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CosmoPermissions = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
class CosmoPermissions extends Base_1.default {
|
|
15
|
+
/**
|
|
16
|
+
* Fetches a list of all available permissions that can be assigned to roles.
|
|
17
|
+
*
|
|
18
|
+
* @returns A promise resolving to the permission discovery metadata.
|
|
19
|
+
*/
|
|
20
|
+
listAllPermissions(raw) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const res = yield this.axios.get(`/v1/permissions/discovery`);
|
|
23
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new role within a specified organization and space.
|
|
28
|
+
*
|
|
29
|
+
* @param orgName - The name of the organization.
|
|
30
|
+
* @param spaceName - The name of the space.
|
|
31
|
+
* @param roleName - The name of the new role.
|
|
32
|
+
* @param permissions - A record of resource keys to arrays of permission names.
|
|
33
|
+
* @returns A promise resolving to the created role object.
|
|
34
|
+
*/
|
|
35
|
+
createRole(orgName, spaceName, roleName, permissions, raw) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const res = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/roles`), {
|
|
38
|
+
name: roleName,
|
|
39
|
+
permissions,
|
|
40
|
+
});
|
|
41
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Searches for roles within a space based on filters, sorting, and pagination.
|
|
46
|
+
*
|
|
47
|
+
* @param options - An object containing search parameters.
|
|
48
|
+
* @param options.orgName - The name of the organization.
|
|
49
|
+
* @param options.spaceName - The name of the space.
|
|
50
|
+
* @param options.filters - Optional array of search filters.
|
|
51
|
+
* @param options.sorting - Optional sorting criteria.
|
|
52
|
+
* @param options.limit - Optional limit for pagination.
|
|
53
|
+
* @param options.page - Optional page number for pagination.
|
|
54
|
+
* @returns A promise resolving to a list of matching role objects.
|
|
55
|
+
*/
|
|
56
|
+
searchRoles(_a, raw_1) {
|
|
57
|
+
return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, filters, sorting, limit, page, }, raw) {
|
|
58
|
+
const res = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/roles/search`), {
|
|
59
|
+
filters,
|
|
60
|
+
sorting,
|
|
61
|
+
}, {
|
|
62
|
+
params: {
|
|
63
|
+
limit,
|
|
64
|
+
page,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Updates an existing role's name and permissions.
|
|
72
|
+
*
|
|
73
|
+
* @param orgName - The name of the organization.
|
|
74
|
+
* @param spaceName - The name of the space.
|
|
75
|
+
* @param roleId - The ID of the role to update.
|
|
76
|
+
* @param newName - The new name for the role.
|
|
77
|
+
* @param permissions - The updated permissions mapping.
|
|
78
|
+
* @returns A promise resolving to the updated role.
|
|
79
|
+
*/
|
|
80
|
+
updateRole(orgName, spaceName, roleId, newName, permissions, raw) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
const res = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/roles/${roleId}`), {
|
|
83
|
+
name: newName,
|
|
84
|
+
permissions,
|
|
85
|
+
});
|
|
86
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Fetches detailed information about a specific role.
|
|
91
|
+
*
|
|
92
|
+
* @param orgName - The name of the organization.
|
|
93
|
+
* @param spaceName - The name of the space.
|
|
94
|
+
* @param roleId - The ID of the role to retrieve.
|
|
95
|
+
* @returns A promise resolving to the detailed role object.
|
|
96
|
+
*/
|
|
97
|
+
fetchRole(orgName, spaceName, roleId, raw) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
const res = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/roles/${roleId}`));
|
|
100
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? res : res.data);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Deletes a role by its ID.
|
|
105
|
+
*
|
|
106
|
+
* @param orgName - The name of the organization.
|
|
107
|
+
* @param spaceName - The name of the space.
|
|
108
|
+
* @param roleId - The ID of the role to delete.
|
|
109
|
+
* @returns A promise that resolves when the role is deleted.
|
|
110
|
+
*/
|
|
111
|
+
deleteRole(orgName, spaceName, roleId, raw) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/roles/${roleId}`));
|
|
114
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Assigns a user to a role.
|
|
119
|
+
*
|
|
120
|
+
* @param orgName - The name of the organization.
|
|
121
|
+
* @param spaceName - The name of the space.
|
|
122
|
+
* @param roleId - The ID of the role.
|
|
123
|
+
* @param userId - The ID of the user to assign.
|
|
124
|
+
* @returns A promise that resolves when the assignment is complete.
|
|
125
|
+
*/
|
|
126
|
+
assignUserToRole(orgName, spaceName, roleId, userId, raw) {
|
|
127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/roles/${roleId}/user`), { userId });
|
|
129
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Unassigns a user from a role.
|
|
134
|
+
*
|
|
135
|
+
* @param orgName - The name of the organization.
|
|
136
|
+
* @param spaceName - The name of the space.
|
|
137
|
+
* @param roleId - The ID of the role.
|
|
138
|
+
* @param userId - The ID of the user to unassign.
|
|
139
|
+
* @returns A promise that resolves when the user is removed.
|
|
140
|
+
*/
|
|
141
|
+
unassignUserFromRole(orgName, spaceName, roleId, userId, raw) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/roles/${roleId}/user/${userId}`));
|
|
144
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Assigns a team to a role.
|
|
149
|
+
*
|
|
150
|
+
* @param orgName - The name of the organization.
|
|
151
|
+
* @param spaceName - The name of the space.
|
|
152
|
+
* @param roleId - The ID of the role.
|
|
153
|
+
* @param teamName - The name of the team to assign.
|
|
154
|
+
* @returns A promise that resolves when the assignment is complete.
|
|
155
|
+
*/
|
|
156
|
+
assignTeamToRole(orgName, spaceName, roleId, teamName, raw) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/roles/${roleId}/team`), { teamName });
|
|
159
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Unassigns a team from a role.
|
|
164
|
+
*
|
|
165
|
+
* @param orgName - The name of the organization.
|
|
166
|
+
* @param spaceName - The name of the space.
|
|
167
|
+
* @param roleId - The ID of the role.
|
|
168
|
+
* @param teamName - The name of the team to unassign.
|
|
169
|
+
* @returns A promise that resolves when the team is removed.
|
|
170
|
+
*/
|
|
171
|
+
unassignTeamFromRole(orgName, spaceName, roleId, teamName, raw) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/roles/${roleId}/team/${teamName}`));
|
|
174
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
getEndpoint(endpoint) {
|
|
178
|
+
return `${this.options.server}/api/cosmo${endpoint}`;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
exports.CosmoPermissions = CosmoPermissions;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
|
+
import { Asset } from "../../../interfaces/cosmo/asset";
|
|
3
|
+
/**
|
|
4
|
+
* @class Production
|
|
5
|
+
* @extends Base
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* **Under development, breaking changes possible**
|
|
9
|
+
*
|
|
10
|
+
* Represents a Production resource in Cosmo, providing methods to interact with the Production API.
|
|
11
|
+
*/
|
|
12
|
+
export declare class CosmoProduction extends Base {
|
|
13
|
+
protected getEndpoint(endpoint: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Create a new Production in the specified Organization and Space.
|
|
16
|
+
* @remarks
|
|
17
|
+
* ** Under development, breaking changes possible**
|
|
18
|
+
* @param orgName Name of the Organization
|
|
19
|
+
* @param spaceName Name of the Space
|
|
20
|
+
* @param productionName Name of the Production to create
|
|
21
|
+
* @returns The created Production
|
|
22
|
+
*/
|
|
23
|
+
createProduction<R extends boolean = false>(orgName: string, spaceName: string, productionName: string, raw?: {
|
|
24
|
+
raw: R;
|
|
25
|
+
}): Promise<MaybeRaw<R, Asset>>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CosmoProduction = void 0;
|
|
13
|
+
const Base_1 = require("../../../Base");
|
|
14
|
+
/**
|
|
15
|
+
* @class Production
|
|
16
|
+
* @extends Base
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* **Under development, breaking changes possible**
|
|
20
|
+
*
|
|
21
|
+
* Represents a Production resource in Cosmo, providing methods to interact with the Production API.
|
|
22
|
+
*/
|
|
23
|
+
class CosmoProduction extends Base_1.default {
|
|
24
|
+
getEndpoint(endpoint) {
|
|
25
|
+
return `${this.options.server}/api/cosmo${endpoint}`;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Create a new Production in the specified Organization and Space.
|
|
29
|
+
* @remarks
|
|
30
|
+
* ** Under development, breaking changes possible**
|
|
31
|
+
* @param orgName Name of the Organization
|
|
32
|
+
* @param spaceName Name of the Space
|
|
33
|
+
* @param productionName Name of the Production to create
|
|
34
|
+
* @returns The created Production
|
|
35
|
+
*/
|
|
36
|
+
createProduction(orgName, spaceName, productionName, raw) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/productions`), {
|
|
39
|
+
name: productionName,
|
|
40
|
+
});
|
|
41
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.CosmoProduction = CosmoProduction;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import Base, { MaybeRaw } from "../../../Base";
|
|
2
|
+
import { Asset } from "../../../interfaces/cosmo/asset";
|
|
3
|
+
import { Share, ShareCreate, SharePatch, ShareWithUsers } from "../../../interfaces/cosmo/share";
|
|
4
|
+
import { SearchFilter, Sorting } from "../../../interfaces/global";
|
|
5
|
+
/**
|
|
6
|
+
* @class Share
|
|
7
|
+
* @extends Base
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* **Under development, breaking changes possible**
|
|
11
|
+
*
|
|
12
|
+
* Represents a Share resource in Cosmo, providing methods to interact with the Share API.
|
|
13
|
+
*/
|
|
14
|
+
export declare class CosmoShare extends Base {
|
|
15
|
+
protected getEndpoint(endpoint: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new Share in the specified Organization and Space.
|
|
18
|
+
* @remarks
|
|
19
|
+
* ** Under development, breaking changes possible**
|
|
20
|
+
* @param orgName Name of the Organization
|
|
21
|
+
* @param spaceName Name of the Space
|
|
22
|
+
* @param createShare The Share object to create
|
|
23
|
+
*
|
|
24
|
+
* @returns The created Share
|
|
25
|
+
*/
|
|
26
|
+
createShare<R extends boolean = false>(orgName: string, spaceName: string, createShare: ShareCreate, raw?: {
|
|
27
|
+
raw: R;
|
|
28
|
+
}): Promise<MaybeRaw<R, Share>>;
|
|
29
|
+
/**
|
|
30
|
+
* Links the user to a Share, making the assets shared available to the user
|
|
31
|
+
* @remarks
|
|
32
|
+
* ** Under development, breaking changes possible**
|
|
33
|
+
* @param orgName Name of the Organization
|
|
34
|
+
* @param spaceName Name of the Space
|
|
35
|
+
* @param shareId The ID of the Share to link
|
|
36
|
+
*
|
|
37
|
+
* @returns The created Share
|
|
38
|
+
*/
|
|
39
|
+
linkShare<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, password?: string, shareIdHMAC?: string, raw?: {
|
|
40
|
+
raw: R;
|
|
41
|
+
}): Promise<MaybeRaw<R, Share>>;
|
|
42
|
+
/**
|
|
43
|
+
* Fetch shared Assets.
|
|
44
|
+
* @remarks
|
|
45
|
+
* ** Under development, breaking changes possible**
|
|
46
|
+
* @param orgName Name of the Organization
|
|
47
|
+
* @param spaceName Name of the Space
|
|
48
|
+
* @param shareId The ID of the Share to link
|
|
49
|
+
* @param limit The number of assets to return
|
|
50
|
+
* @param page The page number to return
|
|
51
|
+
* @param namespace The namespace to filter by
|
|
52
|
+
*
|
|
53
|
+
* @returns The created Share
|
|
54
|
+
*/
|
|
55
|
+
fetchSharedAssets<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, limit: number, page: number, namespace: string, raw?: {
|
|
56
|
+
raw: R;
|
|
57
|
+
}): Promise<MaybeRaw<R, Asset[]>>;
|
|
58
|
+
/**
|
|
59
|
+
* Delete Shares by ID.
|
|
60
|
+
* @remarks
|
|
61
|
+
* ** Under development, breaking changes possible**
|
|
62
|
+
* @param orgName Name of the Organization
|
|
63
|
+
* @param spaceName Name of the Space
|
|
64
|
+
* @param shareIds The IDs of the Shares to delete
|
|
65
|
+
*
|
|
66
|
+
* @returns 204 No Content if successful
|
|
67
|
+
*/
|
|
68
|
+
deleteShare<R extends boolean = false>(orgName: string, spaceName: string, shareIds: string[], raw?: {
|
|
69
|
+
raw: R;
|
|
70
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
71
|
+
/**
|
|
72
|
+
* Fetch a Share.
|
|
73
|
+
* @param orgName Name of the Organization
|
|
74
|
+
* @param spaceName Name of the Space
|
|
75
|
+
* @param shareId The ID of the Share to link
|
|
76
|
+
*
|
|
77
|
+
* @returns Detailed Share object
|
|
78
|
+
*/
|
|
79
|
+
fetchShare<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, raw?: {
|
|
80
|
+
raw: R;
|
|
81
|
+
}): Promise<MaybeRaw<R, Share>>;
|
|
82
|
+
/**
|
|
83
|
+
* Searches for shares within a specific space in an organization.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} orgName - The name of the organization.
|
|
86
|
+
* @param {string} spaceName - The name of the space.
|
|
87
|
+
* @param {{ sorting?: Sorting, filters?: SearchFilter[] }} search - Search criteria including optional sorting and filters.
|
|
88
|
+
* @param {number} limit - Maximum number of results per page.
|
|
89
|
+
* @param {number} page - The page number to retrieve.
|
|
90
|
+
* @returns {Promise<ShareWithUsers[]>} A promise that resolves to a list of shares with their associated users.
|
|
91
|
+
*/
|
|
92
|
+
searchSharesOfSpace<R extends boolean = false>(orgName: string, spaceName: string, search: {
|
|
93
|
+
sorting?: Sorting;
|
|
94
|
+
filters?: SearchFilter[];
|
|
95
|
+
}, limit: number, page: number, raw?: {
|
|
96
|
+
raw: R;
|
|
97
|
+
}): Promise<MaybeRaw<R, ShareWithUsers[]>>;
|
|
98
|
+
/**
|
|
99
|
+
* Searches for shares the current user is linked to.
|
|
100
|
+
*
|
|
101
|
+
* @param {{ sorting?: Sorting, filters?: SearchFilter[] }} search - Search criteria including optional sorting and filters.
|
|
102
|
+
* @param {number} limit - Maximum number of results per page.
|
|
103
|
+
* @param {number} page - The page number to retrieve.
|
|
104
|
+
* @returns {Promise<Share[]>} A promise that resolves to a list of shares the current user is linked to.
|
|
105
|
+
*/
|
|
106
|
+
searchSharesOfUser<R extends boolean = false>(search: {
|
|
107
|
+
sorting?: Sorting;
|
|
108
|
+
filters?: SearchFilter[];
|
|
109
|
+
}, limit: number, page: number, raw?: {
|
|
110
|
+
raw: R;
|
|
111
|
+
}): Promise<MaybeRaw<R, Share[]>>;
|
|
112
|
+
/**
|
|
113
|
+
* Unlinks the current user from a specific share in a space.
|
|
114
|
+
*
|
|
115
|
+
* @param {string} orgName - The name of the organization.
|
|
116
|
+
* @param {string} spaceName - The name of the space.
|
|
117
|
+
* @param {string} shareId - The ID of the share to unlink from.
|
|
118
|
+
* @returns {Promise<void>} A promise that resolves when the unlinking is complete.
|
|
119
|
+
*/
|
|
120
|
+
unlinkSelf<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, raw?: {
|
|
121
|
+
raw: R;
|
|
122
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
123
|
+
/**
|
|
124
|
+
* Unlinks another user from a specific share in a space.
|
|
125
|
+
*
|
|
126
|
+
* @param {string} orgName - The name of the organization.
|
|
127
|
+
* @param {string} spaceName - The name of the space.
|
|
128
|
+
* @param {string} shareId - The ID of the share to unlink from.
|
|
129
|
+
* @param {string} userId - The ID of the user to unlink.
|
|
130
|
+
* @returns {Promise<void>} A promise that resolves when the unlinking is complete.
|
|
131
|
+
*/
|
|
132
|
+
unlinkOther<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, userId: string, raw?: {
|
|
133
|
+
raw: R;
|
|
134
|
+
}): Promise<MaybeRaw<R, void>>;
|
|
135
|
+
/**
|
|
136
|
+
* Links one or more users (by email) to a specific share in a space.
|
|
137
|
+
*
|
|
138
|
+
* @param {string} orgName - The name of the organization.
|
|
139
|
+
* @param {string} spaceName - The name of the space.
|
|
140
|
+
* @param {string} shareId - The ID of the share to link to.
|
|
141
|
+
* @param {string[]} emails - An array of email addresses to link to the share.
|
|
142
|
+
* @returns {Promise<Share>} A promise that resolves to the updated share object.
|
|
143
|
+
*/
|
|
144
|
+
linkOther<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, emails: string[], raw?: {
|
|
145
|
+
raw: R;
|
|
146
|
+
}): Promise<MaybeRaw<R, Share>>;
|
|
147
|
+
/**
|
|
148
|
+
* Patch a Share in the specified Organization and Space.
|
|
149
|
+
* @remarks
|
|
150
|
+
* ** Under development, breaking changes possible**
|
|
151
|
+
* @param orgName Name of the Organization
|
|
152
|
+
* @param spaceName Name of the Space
|
|
153
|
+
* @param shareId ID of the Share
|
|
154
|
+
* @param patchObject An object whose properties will be used to replace the existing Share ones
|
|
155
|
+
*
|
|
156
|
+
* @returns The patched Share
|
|
157
|
+
*/
|
|
158
|
+
patchShare<R extends boolean = false>(orgName: string, spaceName: string, shareId: string, patchObject: SharePatch, raw?: {
|
|
159
|
+
raw: R;
|
|
160
|
+
}): Promise<MaybeRaw<R, Share>>;
|
|
161
|
+
}
|