frameio 4.2.1 → 4.2.3
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +30 -30
- package/dist/cjs/Client.js +38 -38
- package/dist/cjs/api/resources/collections/client/Client.d.ts +17 -17
- package/dist/cjs/api/resources/collections/client/Client.js +30 -30
- package/dist/cjs/api/resources/files/client/Client.d.ts +96 -96
- package/dist/cjs/api/resources/files/client/Client.js +175 -175
- package/dist/cjs/api/resources/folders/client/Client.d.ts +11 -11
- package/dist/cjs/api/resources/folders/client/Client.js +29 -29
- package/dist/cjs/api/resources/metadata/client/Client.d.ts +27 -27
- package/dist/cjs/api/resources/metadata/client/Client.js +50 -50
- package/dist/cjs/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.ts +4 -4
- package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +24 -24
- package/dist/cjs/api/resources/projectPermissions/client/Client.js +87 -87
- package/dist/cjs/api/resources/projects/client/Client.d.ts +56 -0
- package/dist/cjs/api/resources/projects/client/Client.js +166 -0
- package/dist/cjs/api/resources/projects/client/requests/AccountProjectsIndexRequest.d.ts +24 -0
- package/dist/cjs/api/resources/projects/client/requests/AccountProjectsIndexRequest.js +3 -0
- package/dist/cjs/api/resources/projects/client/requests/InvitedProjectsIndexRequest.d.ts +24 -0
- package/dist/cjs/api/resources/projects/client/requests/InvitedProjectsIndexRequest.js +3 -0
- package/dist/cjs/api/resources/projects/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/projects/types/AccountProjectsIndexRequestSort.d.ts +8 -0
- package/dist/cjs/api/resources/projects/types/AccountProjectsIndexRequestSort.js +11 -0
- package/dist/cjs/api/resources/projects/types/InvitedProjectsIndexRequestSort.d.ts +8 -0
- package/dist/cjs/api/resources/projects/types/InvitedProjectsIndexRequestSort.js +11 -0
- package/dist/cjs/api/resources/projects/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/projects/types/index.js +2 -0
- package/dist/cjs/api/resources/shares/client/Client.d.ts +49 -49
- package/dist/cjs/api/resources/shares/client/Client.js +146 -146
- package/dist/cjs/api/resources/shares/client/requests/AddAssetParams.d.ts +1 -1
- package/dist/cjs/api/resources/shares/client/requests/CreateShareParams.d.ts +2 -2
- package/dist/cjs/api/resources/shares/client/requests/UpdateShareParams.d.ts +1 -1
- package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +64 -64
- package/dist/cjs/api/resources/versionStacks/client/Client.js +121 -121
- package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.ts +1 -1
- package/dist/cjs/api/resources/workspacePermissions/client/Client.d.ts +24 -24
- package/dist/cjs/api/resources/workspacePermissions/client/Client.js +87 -87
- package/dist/cjs/api/resources/workspaces/client/Client.d.ts +34 -34
- package/dist/cjs/api/resources/workspaces/client/Client.js +141 -141
- package/dist/cjs/api/types/AuditLogwithIncludes.d.ts +6 -0
- package/dist/cjs/api/types/AuditLogwithIncludes.js +6 -0
- package/dist/cjs/api/types/Filters.d.ts +6 -0
- package/dist/cjs/api/types/Filters.js +6 -0
- package/dist/cjs/api/types/LongTextDefinition.d.ts +0 -16
- package/dist/cjs/api/types/LongTextDefinition.js +0 -17
- package/dist/cjs/api/types/NumberDefinition.d.ts +16 -0
- package/dist/cjs/api/types/NumberDefinition.js +13 -0
- package/dist/cjs/api/types/TextDefinition.d.ts +0 -16
- package/dist/cjs/api/types/TextDefinition.js +0 -17
- package/dist/cjs/api/types/ToggleDefinition.d.ts +16 -0
- package/dist/cjs/api/types/ToggleDefinition.js +17 -0
- package/dist/cjs/api/types/UserSingleDefinition.d.ts +0 -16
- package/dist/cjs/api/types/UserSingleDefinition.js +0 -13
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +30 -30
- package/dist/esm/Client.mjs +38 -38
- package/dist/esm/api/resources/collections/client/Client.d.mts +17 -17
- package/dist/esm/api/resources/collections/client/Client.mjs +30 -30
- package/dist/esm/api/resources/files/client/Client.d.mts +96 -96
- package/dist/esm/api/resources/files/client/Client.mjs +175 -175
- package/dist/esm/api/resources/folders/client/Client.d.mts +11 -11
- package/dist/esm/api/resources/folders/client/Client.mjs +29 -29
- package/dist/esm/api/resources/metadata/client/Client.d.mts +27 -27
- package/dist/esm/api/resources/metadata/client/Client.mjs +50 -50
- package/dist/esm/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.mts +4 -4
- package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +24 -24
- package/dist/esm/api/resources/projectPermissions/client/Client.mjs +87 -87
- package/dist/esm/api/resources/projects/client/Client.d.mts +56 -0
- package/dist/esm/api/resources/projects/client/Client.mjs +166 -0
- package/dist/esm/api/resources/projects/client/requests/AccountProjectsIndexRequest.d.mts +24 -0
- package/dist/esm/api/resources/projects/client/requests/AccountProjectsIndexRequest.mjs +2 -0
- package/dist/esm/api/resources/projects/client/requests/InvitedProjectsIndexRequest.d.mts +24 -0
- package/dist/esm/api/resources/projects/client/requests/InvitedProjectsIndexRequest.mjs +2 -0
- package/dist/esm/api/resources/projects/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/projects/types/AccountProjectsIndexRequestSort.d.mts +8 -0
- package/dist/esm/api/resources/projects/types/AccountProjectsIndexRequestSort.mjs +8 -0
- package/dist/esm/api/resources/projects/types/InvitedProjectsIndexRequestSort.d.mts +8 -0
- package/dist/esm/api/resources/projects/types/InvitedProjectsIndexRequestSort.mjs +8 -0
- package/dist/esm/api/resources/projects/types/index.d.mts +2 -0
- package/dist/esm/api/resources/projects/types/index.mjs +2 -0
- package/dist/esm/api/resources/shares/client/Client.d.mts +49 -49
- package/dist/esm/api/resources/shares/client/Client.mjs +146 -146
- package/dist/esm/api/resources/shares/client/requests/AddAssetParams.d.mts +1 -1
- package/dist/esm/api/resources/shares/client/requests/CreateShareParams.d.mts +2 -2
- package/dist/esm/api/resources/shares/client/requests/UpdateShareParams.d.mts +1 -1
- package/dist/esm/api/resources/versionStacks/client/Client.d.mts +64 -64
- package/dist/esm/api/resources/versionStacks/client/Client.mjs +121 -121
- package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.mts +1 -1
- package/dist/esm/api/resources/workspacePermissions/client/Client.d.mts +24 -24
- package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +87 -87
- package/dist/esm/api/resources/workspaces/client/Client.d.mts +34 -34
- package/dist/esm/api/resources/workspaces/client/Client.mjs +141 -141
- package/dist/esm/api/types/AuditLogwithIncludes.d.mts +6 -0
- package/dist/esm/api/types/AuditLogwithIncludes.mjs +6 -0
- package/dist/esm/api/types/Filters.d.mts +6 -0
- package/dist/esm/api/types/Filters.mjs +6 -0
- package/dist/esm/api/types/LongTextDefinition.d.mts +0 -16
- package/dist/esm/api/types/LongTextDefinition.mjs +1 -16
- package/dist/esm/api/types/NumberDefinition.d.mts +16 -0
- package/dist/esm/api/types/NumberDefinition.mjs +13 -0
- package/dist/esm/api/types/TextDefinition.d.mts +0 -16
- package/dist/esm/api/types/TextDefinition.mjs +1 -16
- package/dist/esm/api/types/ToggleDefinition.d.mts +16 -0
- package/dist/esm/api/types/ToggleDefinition.mjs +16 -1
- package/dist/esm/api/types/UserSingleDefinition.d.mts +0 -16
- package/dist/esm/api/types/UserSingleDefinition.mjs +0 -13
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +112 -112
- package/reference.md +1392 -1234
|
@@ -13,6 +13,52 @@ export declare namespace SharesClient {
|
|
|
13
13
|
export declare class SharesClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<SharesClient.Options>;
|
|
15
15
|
constructor(options: SharesClient.Options);
|
|
16
|
+
/**
|
|
17
|
+
* Add new asset share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
18
|
+
*
|
|
19
|
+
* @param {Frameio.FrameOrAdobeId} account_id
|
|
20
|
+
* @param {Frameio.Uuid} share_id
|
|
21
|
+
* @param {Frameio.AddAssetParams} request
|
|
22
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
23
|
+
*
|
|
24
|
+
* @throws {@link Frameio.BadRequestError}
|
|
25
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
26
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
27
|
+
* @throws {@link Frameio.NotFoundError}
|
|
28
|
+
* @throws {@link Frameio.ConflictError}
|
|
29
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
30
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* await client.shares.addAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
34
|
+
* data: {
|
|
35
|
+
* asset_id: "8f1a908a-694d-40d8-88c7-009c17f65a11"
|
|
36
|
+
* }
|
|
37
|
+
* })
|
|
38
|
+
*/
|
|
39
|
+
addAsset(account_id: Frameio.FrameOrAdobeId, share_id: Frameio.Uuid, request: Frameio.AddAssetParams, requestOptions?: SharesClient.RequestOptions): core.HttpResponsePromise<Frameio.AddAssetResponse>;
|
|
40
|
+
private __addAsset;
|
|
41
|
+
/**
|
|
42
|
+
* Remove an asset currently in the share from that share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
43
|
+
*
|
|
44
|
+
* @param {Frameio.FrameOrAdobeId} account_id
|
|
45
|
+
* @param {Frameio.Uuid} share_id
|
|
46
|
+
* @param {Frameio.FrameOrAdobeId} asset_id
|
|
47
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
+
*
|
|
49
|
+
* @throws {@link Frameio.BadRequestError}
|
|
50
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
51
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
52
|
+
* @throws {@link Frameio.NotFoundError}
|
|
53
|
+
* @throws {@link Frameio.ConflictError}
|
|
54
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
55
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* await client.shares.removeAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
59
|
+
*/
|
|
60
|
+
removeAsset(account_id: Frameio.FrameOrAdobeId, share_id: Frameio.Uuid, asset_id: Frameio.FrameOrAdobeId, requestOptions?: SharesClient.RequestOptions): core.HttpResponsePromise<Frameio.RemoveAssetResponse>;
|
|
61
|
+
private __removeAsset;
|
|
16
62
|
/**
|
|
17
63
|
* Show a single Share. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
18
64
|
*
|
|
@@ -75,7 +121,7 @@ export declare class SharesClient {
|
|
|
75
121
|
* access: "public",
|
|
76
122
|
* description: "A descriptive summary of the share",
|
|
77
123
|
* downloading_enabled: true,
|
|
78
|
-
* expiration: "2026-
|
|
124
|
+
* expiration: "2026-07-08T22:37:02Z",
|
|
79
125
|
* name: "Share Name",
|
|
80
126
|
* passphrase: "as!dfj39sd(*"
|
|
81
127
|
* }
|
|
@@ -171,52 +217,6 @@ export declare class SharesClient {
|
|
|
171
217
|
*/
|
|
172
218
|
removeReviewers(account_id: Frameio.FrameOrAdobeId, share_id: Frameio.Uuid, request: Frameio.RemoveReviewerParams, requestOptions?: SharesClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
173
219
|
private __removeReviewers;
|
|
174
|
-
/**
|
|
175
|
-
* Remove an asset currently in the share from that share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
176
|
-
*
|
|
177
|
-
* @param {Frameio.FrameOrAdobeId} account_id
|
|
178
|
-
* @param {Frameio.Uuid} share_id
|
|
179
|
-
* @param {Frameio.FrameOrAdobeId} asset_id
|
|
180
|
-
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
181
|
-
*
|
|
182
|
-
* @throws {@link Frameio.BadRequestError}
|
|
183
|
-
* @throws {@link Frameio.UnauthorizedError}
|
|
184
|
-
* @throws {@link Frameio.ForbiddenError}
|
|
185
|
-
* @throws {@link Frameio.NotFoundError}
|
|
186
|
-
* @throws {@link Frameio.ConflictError}
|
|
187
|
-
* @throws {@link Frameio.UnprocessableEntityError}
|
|
188
|
-
* @throws {@link Frameio.TooManyRequestsError}
|
|
189
|
-
*
|
|
190
|
-
* @example
|
|
191
|
-
* await client.shares.removeAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
192
|
-
*/
|
|
193
|
-
removeAsset(account_id: Frameio.FrameOrAdobeId, share_id: Frameio.Uuid, asset_id: Frameio.FrameOrAdobeId, requestOptions?: SharesClient.RequestOptions): core.HttpResponsePromise<Frameio.RemoveAssetResponse>;
|
|
194
|
-
private __removeAsset;
|
|
195
|
-
/**
|
|
196
|
-
* Add new asset share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
197
|
-
*
|
|
198
|
-
* @param {Frameio.FrameOrAdobeId} account_id
|
|
199
|
-
* @param {Frameio.Uuid} share_id
|
|
200
|
-
* @param {Frameio.AddAssetParams} request
|
|
201
|
-
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
202
|
-
*
|
|
203
|
-
* @throws {@link Frameio.BadRequestError}
|
|
204
|
-
* @throws {@link Frameio.UnauthorizedError}
|
|
205
|
-
* @throws {@link Frameio.ForbiddenError}
|
|
206
|
-
* @throws {@link Frameio.NotFoundError}
|
|
207
|
-
* @throws {@link Frameio.ConflictError}
|
|
208
|
-
* @throws {@link Frameio.UnprocessableEntityError}
|
|
209
|
-
* @throws {@link Frameio.TooManyRequestsError}
|
|
210
|
-
*
|
|
211
|
-
* @example
|
|
212
|
-
* await client.shares.addAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
213
|
-
* data: {
|
|
214
|
-
* asset_id: "c1a4485f-34b1-4597-8621-c208864b03bf"
|
|
215
|
-
* }
|
|
216
|
-
* })
|
|
217
|
-
*/
|
|
218
|
-
addAsset(account_id: Frameio.FrameOrAdobeId, share_id: Frameio.Uuid, request: Frameio.AddAssetParams, requestOptions?: SharesClient.RequestOptions): core.HttpResponsePromise<Frameio.AddAssetResponse>;
|
|
219
|
-
private __addAsset;
|
|
220
220
|
/**
|
|
221
221
|
* List shares on a project. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
222
222
|
*
|
|
@@ -263,9 +263,9 @@ export declare class SharesClient {
|
|
|
263
263
|
* data: {
|
|
264
264
|
* type: "asset",
|
|
265
265
|
* access: "public",
|
|
266
|
-
* asset_ids: ["
|
|
266
|
+
* asset_ids: ["4123e6f4-1afe-413e-a6bc-19031fd2f1f0", "fc9fc9e2-7aad-4449-9662-22439cddc061"],
|
|
267
267
|
* downloading_enabled: true,
|
|
268
|
-
* expiration: "2026-
|
|
268
|
+
* expiration: "2026-07-08T22:37:02Z",
|
|
269
269
|
* name: "Share Name",
|
|
270
270
|
* passphrase: "as!dfj39sd(*"
|
|
271
271
|
* }
|
|
@@ -58,6 +58,149 @@ class SharesClient {
|
|
|
58
58
|
constructor(options) {
|
|
59
59
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Add new asset share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
63
|
+
*
|
|
64
|
+
* @param {Frameio.FrameOrAdobeId} account_id
|
|
65
|
+
* @param {Frameio.Uuid} share_id
|
|
66
|
+
* @param {Frameio.AddAssetParams} request
|
|
67
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link Frameio.BadRequestError}
|
|
70
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
71
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
72
|
+
* @throws {@link Frameio.NotFoundError}
|
|
73
|
+
* @throws {@link Frameio.ConflictError}
|
|
74
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
75
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.shares.addAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
79
|
+
* data: {
|
|
80
|
+
* asset_id: "8f1a908a-694d-40d8-88c7-009c17f65a11"
|
|
81
|
+
* }
|
|
82
|
+
* })
|
|
83
|
+
*/
|
|
84
|
+
addAsset(account_id, share_id, request, requestOptions) {
|
|
85
|
+
return core.HttpResponsePromise.fromPromise(this.__addAsset(account_id, share_id, request, requestOptions));
|
|
86
|
+
}
|
|
87
|
+
__addAsset(account_id, share_id, request, requestOptions) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
90
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
91
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
92
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
93
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}/assets`),
|
|
94
|
+
method: "POST",
|
|
95
|
+
headers: _headers,
|
|
96
|
+
contentType: "application/json",
|
|
97
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
98
|
+
requestType: "json",
|
|
99
|
+
body: request,
|
|
100
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
101
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
102
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
103
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
104
|
+
logging: this._options.logging,
|
|
105
|
+
});
|
|
106
|
+
if (_response.ok) {
|
|
107
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
108
|
+
}
|
|
109
|
+
if (_response.error.reason === "status-code") {
|
|
110
|
+
switch (_response.error.statusCode) {
|
|
111
|
+
case 400:
|
|
112
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
113
|
+
case 401:
|
|
114
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
115
|
+
case 403:
|
|
116
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
117
|
+
case 404:
|
|
118
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
119
|
+
case 409:
|
|
120
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
121
|
+
case 422:
|
|
122
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
123
|
+
case 429:
|
|
124
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
125
|
+
default:
|
|
126
|
+
throw new errors.FrameioError({
|
|
127
|
+
statusCode: _response.error.statusCode,
|
|
128
|
+
body: _response.error.body,
|
|
129
|
+
rawResponse: _response.rawResponse,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/shares/{share_id}/assets");
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Remove an asset currently in the share from that share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
138
|
+
*
|
|
139
|
+
* @param {Frameio.FrameOrAdobeId} account_id
|
|
140
|
+
* @param {Frameio.Uuid} share_id
|
|
141
|
+
* @param {Frameio.FrameOrAdobeId} asset_id
|
|
142
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
143
|
+
*
|
|
144
|
+
* @throws {@link Frameio.BadRequestError}
|
|
145
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
146
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
147
|
+
* @throws {@link Frameio.NotFoundError}
|
|
148
|
+
* @throws {@link Frameio.ConflictError}
|
|
149
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
150
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* await client.shares.removeAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
154
|
+
*/
|
|
155
|
+
removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
156
|
+
return core.HttpResponsePromise.fromPromise(this.__removeAsset(account_id, share_id, asset_id, requestOptions));
|
|
157
|
+
}
|
|
158
|
+
__removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
161
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
162
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
163
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
164
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}/assets/${core.url.encodePathParam(asset_id)}`),
|
|
165
|
+
method: "DELETE",
|
|
166
|
+
headers: _headers,
|
|
167
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
168
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
169
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
170
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
171
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
172
|
+
logging: this._options.logging,
|
|
173
|
+
});
|
|
174
|
+
if (_response.ok) {
|
|
175
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
176
|
+
}
|
|
177
|
+
if (_response.error.reason === "status-code") {
|
|
178
|
+
switch (_response.error.statusCode) {
|
|
179
|
+
case 400:
|
|
180
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
181
|
+
case 401:
|
|
182
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
183
|
+
case 403:
|
|
184
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
185
|
+
case 404:
|
|
186
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
187
|
+
case 409:
|
|
188
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
189
|
+
case 422:
|
|
190
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
191
|
+
case 429:
|
|
192
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
193
|
+
default:
|
|
194
|
+
throw new errors.FrameioError({
|
|
195
|
+
statusCode: _response.error.statusCode,
|
|
196
|
+
body: _response.error.body,
|
|
197
|
+
rawResponse: _response.rawResponse,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}/assets/{asset_id}");
|
|
202
|
+
});
|
|
203
|
+
}
|
|
61
204
|
/**
|
|
62
205
|
* Show a single Share. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
63
206
|
*
|
|
@@ -214,7 +357,7 @@ class SharesClient {
|
|
|
214
357
|
* access: "public",
|
|
215
358
|
* description: "A descriptive summary of the share",
|
|
216
359
|
* downloading_enabled: true,
|
|
217
|
-
* expiration: "2026-
|
|
360
|
+
* expiration: "2026-07-08T22:37:02Z",
|
|
218
361
|
* name: "Share Name",
|
|
219
362
|
* passphrase: "as!dfj39sd(*"
|
|
220
363
|
* }
|
|
@@ -521,149 +664,6 @@ class SharesClient {
|
|
|
521
664
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}/reviewers");
|
|
522
665
|
});
|
|
523
666
|
}
|
|
524
|
-
/**
|
|
525
|
-
* Remove an asset currently in the share from that share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
526
|
-
*
|
|
527
|
-
* @param {Frameio.FrameOrAdobeId} account_id
|
|
528
|
-
* @param {Frameio.Uuid} share_id
|
|
529
|
-
* @param {Frameio.FrameOrAdobeId} asset_id
|
|
530
|
-
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
531
|
-
*
|
|
532
|
-
* @throws {@link Frameio.BadRequestError}
|
|
533
|
-
* @throws {@link Frameio.UnauthorizedError}
|
|
534
|
-
* @throws {@link Frameio.ForbiddenError}
|
|
535
|
-
* @throws {@link Frameio.NotFoundError}
|
|
536
|
-
* @throws {@link Frameio.ConflictError}
|
|
537
|
-
* @throws {@link Frameio.UnprocessableEntityError}
|
|
538
|
-
* @throws {@link Frameio.TooManyRequestsError}
|
|
539
|
-
*
|
|
540
|
-
* @example
|
|
541
|
-
* await client.shares.removeAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
542
|
-
*/
|
|
543
|
-
removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
544
|
-
return core.HttpResponsePromise.fromPromise(this.__removeAsset(account_id, share_id, asset_id, requestOptions));
|
|
545
|
-
}
|
|
546
|
-
__removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
547
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
548
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
549
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
550
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
551
|
-
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
552
|
-
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}/assets/${core.url.encodePathParam(asset_id)}`),
|
|
553
|
-
method: "DELETE",
|
|
554
|
-
headers: _headers,
|
|
555
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
556
|
-
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
557
|
-
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
558
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
559
|
-
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
560
|
-
logging: this._options.logging,
|
|
561
|
-
});
|
|
562
|
-
if (_response.ok) {
|
|
563
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
564
|
-
}
|
|
565
|
-
if (_response.error.reason === "status-code") {
|
|
566
|
-
switch (_response.error.statusCode) {
|
|
567
|
-
case 400:
|
|
568
|
-
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
569
|
-
case 401:
|
|
570
|
-
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
571
|
-
case 403:
|
|
572
|
-
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
573
|
-
case 404:
|
|
574
|
-
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
575
|
-
case 409:
|
|
576
|
-
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
577
|
-
case 422:
|
|
578
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
579
|
-
case 429:
|
|
580
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
581
|
-
default:
|
|
582
|
-
throw new errors.FrameioError({
|
|
583
|
-
statusCode: _response.error.statusCode,
|
|
584
|
-
body: _response.error.body,
|
|
585
|
-
rawResponse: _response.rawResponse,
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}/assets/{asset_id}");
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
/**
|
|
593
|
-
* Add new asset share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
594
|
-
*
|
|
595
|
-
* @param {Frameio.FrameOrAdobeId} account_id
|
|
596
|
-
* @param {Frameio.Uuid} share_id
|
|
597
|
-
* @param {Frameio.AddAssetParams} request
|
|
598
|
-
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
599
|
-
*
|
|
600
|
-
* @throws {@link Frameio.BadRequestError}
|
|
601
|
-
* @throws {@link Frameio.UnauthorizedError}
|
|
602
|
-
* @throws {@link Frameio.ForbiddenError}
|
|
603
|
-
* @throws {@link Frameio.NotFoundError}
|
|
604
|
-
* @throws {@link Frameio.ConflictError}
|
|
605
|
-
* @throws {@link Frameio.UnprocessableEntityError}
|
|
606
|
-
* @throws {@link Frameio.TooManyRequestsError}
|
|
607
|
-
*
|
|
608
|
-
* @example
|
|
609
|
-
* await client.shares.addAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
610
|
-
* data: {
|
|
611
|
-
* asset_id: "c1a4485f-34b1-4597-8621-c208864b03bf"
|
|
612
|
-
* }
|
|
613
|
-
* })
|
|
614
|
-
*/
|
|
615
|
-
addAsset(account_id, share_id, request, requestOptions) {
|
|
616
|
-
return core.HttpResponsePromise.fromPromise(this.__addAsset(account_id, share_id, request, requestOptions));
|
|
617
|
-
}
|
|
618
|
-
__addAsset(account_id, share_id, request, requestOptions) {
|
|
619
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
620
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
621
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
622
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
623
|
-
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
624
|
-
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}/assets`),
|
|
625
|
-
method: "POST",
|
|
626
|
-
headers: _headers,
|
|
627
|
-
contentType: "application/json",
|
|
628
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
629
|
-
requestType: "json",
|
|
630
|
-
body: request,
|
|
631
|
-
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
632
|
-
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
633
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
634
|
-
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
635
|
-
logging: this._options.logging,
|
|
636
|
-
});
|
|
637
|
-
if (_response.ok) {
|
|
638
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
639
|
-
}
|
|
640
|
-
if (_response.error.reason === "status-code") {
|
|
641
|
-
switch (_response.error.statusCode) {
|
|
642
|
-
case 400:
|
|
643
|
-
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
644
|
-
case 401:
|
|
645
|
-
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
646
|
-
case 403:
|
|
647
|
-
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
648
|
-
case 404:
|
|
649
|
-
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
650
|
-
case 409:
|
|
651
|
-
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
652
|
-
case 422:
|
|
653
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
654
|
-
case 429:
|
|
655
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
656
|
-
default:
|
|
657
|
-
throw new errors.FrameioError({
|
|
658
|
-
statusCode: _response.error.statusCode,
|
|
659
|
-
body: _response.error.body,
|
|
660
|
-
rawResponse: _response.rawResponse,
|
|
661
|
-
});
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/shares/{share_id}/assets");
|
|
665
|
-
});
|
|
666
|
-
}
|
|
667
667
|
/**
|
|
668
668
|
* List shares on a project. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
669
669
|
*
|
|
@@ -768,9 +768,9 @@ class SharesClient {
|
|
|
768
768
|
* data: {
|
|
769
769
|
* type: "asset",
|
|
770
770
|
* access: "public",
|
|
771
|
-
* asset_ids: ["
|
|
771
|
+
* asset_ids: ["4123e6f4-1afe-413e-a6bc-19031fd2f1f0", "fc9fc9e2-7aad-4449-9662-22439cddc061"],
|
|
772
772
|
* downloading_enabled: true,
|
|
773
|
-
* expiration: "2026-
|
|
773
|
+
* expiration: "2026-07-08T22:37:02Z",
|
|
774
774
|
* name: "Share Name",
|
|
775
775
|
* passphrase: "as!dfj39sd(*"
|
|
776
776
|
* }
|
|
@@ -5,9 +5,9 @@ import type * as Frameio from "../../../../index.js";
|
|
|
5
5
|
* data: {
|
|
6
6
|
* type: "asset",
|
|
7
7
|
* access: "public",
|
|
8
|
-
* asset_ids: ["
|
|
8
|
+
* asset_ids: ["4123e6f4-1afe-413e-a6bc-19031fd2f1f0", "fc9fc9e2-7aad-4449-9662-22439cddc061"],
|
|
9
9
|
* downloading_enabled: true,
|
|
10
|
-
* expiration: "2026-
|
|
10
|
+
* expiration: "2026-07-08T22:37:02Z",
|
|
11
11
|
* name: "Share Name",
|
|
12
12
|
* passphrase: "as!dfj39sd(*"
|
|
13
13
|
* }
|