frameio 4.2.2 → 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: "430d355d-d9a5-4d3e-851f-d2e5f60666d9"
|
|
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
|
* }
|
|
@@ -22,6 +22,149 @@ export class SharesClient {
|
|
|
22
22
|
constructor(options) {
|
|
23
23
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Add new asset share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
27
|
+
*
|
|
28
|
+
* @param {Frameio.FrameOrAdobeId} account_id
|
|
29
|
+
* @param {Frameio.Uuid} share_id
|
|
30
|
+
* @param {Frameio.AddAssetParams} request
|
|
31
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link Frameio.BadRequestError}
|
|
34
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
35
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
36
|
+
* @throws {@link Frameio.NotFoundError}
|
|
37
|
+
* @throws {@link Frameio.ConflictError}
|
|
38
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
39
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.shares.addAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
43
|
+
* data: {
|
|
44
|
+
* asset_id: "8f1a908a-694d-40d8-88c7-009c17f65a11"
|
|
45
|
+
* }
|
|
46
|
+
* })
|
|
47
|
+
*/
|
|
48
|
+
addAsset(account_id, share_id, request, requestOptions) {
|
|
49
|
+
return core.HttpResponsePromise.fromPromise(this.__addAsset(account_id, share_id, request, requestOptions));
|
|
50
|
+
}
|
|
51
|
+
__addAsset(account_id, share_id, request, requestOptions) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
54
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
55
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
|
|
56
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
57
|
+
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`),
|
|
58
|
+
method: "POST",
|
|
59
|
+
headers: _headers,
|
|
60
|
+
contentType: "application/json",
|
|
61
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
62
|
+
requestType: "json",
|
|
63
|
+
body: request,
|
|
64
|
+
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,
|
|
65
|
+
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,
|
|
66
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
67
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
68
|
+
logging: this._options.logging,
|
|
69
|
+
});
|
|
70
|
+
if (_response.ok) {
|
|
71
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
72
|
+
}
|
|
73
|
+
if (_response.error.reason === "status-code") {
|
|
74
|
+
switch (_response.error.statusCode) {
|
|
75
|
+
case 400:
|
|
76
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
77
|
+
case 401:
|
|
78
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
79
|
+
case 403:
|
|
80
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
81
|
+
case 404:
|
|
82
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
83
|
+
case 409:
|
|
84
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
85
|
+
case 422:
|
|
86
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
87
|
+
case 429:
|
|
88
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
89
|
+
default:
|
|
90
|
+
throw new errors.FrameioError({
|
|
91
|
+
statusCode: _response.error.statusCode,
|
|
92
|
+
body: _response.error.body,
|
|
93
|
+
rawResponse: _response.rawResponse,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/shares/{share_id}/assets");
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Remove an asset currently in the share from that share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
102
|
+
*
|
|
103
|
+
* @param {Frameio.FrameOrAdobeId} account_id
|
|
104
|
+
* @param {Frameio.Uuid} share_id
|
|
105
|
+
* @param {Frameio.FrameOrAdobeId} asset_id
|
|
106
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link Frameio.BadRequestError}
|
|
109
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
110
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
111
|
+
* @throws {@link Frameio.NotFoundError}
|
|
112
|
+
* @throws {@link Frameio.ConflictError}
|
|
113
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
114
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* await client.shares.removeAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
118
|
+
*/
|
|
119
|
+
removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
120
|
+
return core.HttpResponsePromise.fromPromise(this.__removeAsset(account_id, share_id, asset_id, requestOptions));
|
|
121
|
+
}
|
|
122
|
+
__removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
125
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
126
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
|
|
127
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
128
|
+
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)}`),
|
|
129
|
+
method: "DELETE",
|
|
130
|
+
headers: _headers,
|
|
131
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
132
|
+
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,
|
|
133
|
+
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,
|
|
134
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
135
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
136
|
+
logging: this._options.logging,
|
|
137
|
+
});
|
|
138
|
+
if (_response.ok) {
|
|
139
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
140
|
+
}
|
|
141
|
+
if (_response.error.reason === "status-code") {
|
|
142
|
+
switch (_response.error.statusCode) {
|
|
143
|
+
case 400:
|
|
144
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
145
|
+
case 401:
|
|
146
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
147
|
+
case 403:
|
|
148
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
149
|
+
case 404:
|
|
150
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
151
|
+
case 409:
|
|
152
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
153
|
+
case 422:
|
|
154
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
155
|
+
case 429:
|
|
156
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
157
|
+
default:
|
|
158
|
+
throw new errors.FrameioError({
|
|
159
|
+
statusCode: _response.error.statusCode,
|
|
160
|
+
body: _response.error.body,
|
|
161
|
+
rawResponse: _response.rawResponse,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}/assets/{asset_id}");
|
|
166
|
+
});
|
|
167
|
+
}
|
|
25
168
|
/**
|
|
26
169
|
* Show a single Share. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
27
170
|
*
|
|
@@ -178,7 +321,7 @@ export class SharesClient {
|
|
|
178
321
|
* access: "public",
|
|
179
322
|
* description: "A descriptive summary of the share",
|
|
180
323
|
* downloading_enabled: true,
|
|
181
|
-
* expiration: "2026-
|
|
324
|
+
* expiration: "2026-07-08T22:37:02Z",
|
|
182
325
|
* name: "Share Name",
|
|
183
326
|
* passphrase: "as!dfj39sd(*"
|
|
184
327
|
* }
|
|
@@ -485,149 +628,6 @@ export class SharesClient {
|
|
|
485
628
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}/reviewers");
|
|
486
629
|
});
|
|
487
630
|
}
|
|
488
|
-
/**
|
|
489
|
-
* Remove an asset currently in the share from that share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
490
|
-
*
|
|
491
|
-
* @param {Frameio.FrameOrAdobeId} account_id
|
|
492
|
-
* @param {Frameio.Uuid} share_id
|
|
493
|
-
* @param {Frameio.FrameOrAdobeId} asset_id
|
|
494
|
-
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
495
|
-
*
|
|
496
|
-
* @throws {@link Frameio.BadRequestError}
|
|
497
|
-
* @throws {@link Frameio.UnauthorizedError}
|
|
498
|
-
* @throws {@link Frameio.ForbiddenError}
|
|
499
|
-
* @throws {@link Frameio.NotFoundError}
|
|
500
|
-
* @throws {@link Frameio.ConflictError}
|
|
501
|
-
* @throws {@link Frameio.UnprocessableEntityError}
|
|
502
|
-
* @throws {@link Frameio.TooManyRequestsError}
|
|
503
|
-
*
|
|
504
|
-
* @example
|
|
505
|
-
* await client.shares.removeAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
506
|
-
*/
|
|
507
|
-
removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
508
|
-
return core.HttpResponsePromise.fromPromise(this.__removeAsset(account_id, share_id, asset_id, requestOptions));
|
|
509
|
-
}
|
|
510
|
-
__removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
511
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
512
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
513
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
514
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
|
|
515
|
-
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
516
|
-
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)}`),
|
|
517
|
-
method: "DELETE",
|
|
518
|
-
headers: _headers,
|
|
519
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
520
|
-
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,
|
|
521
|
-
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,
|
|
522
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
523
|
-
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
524
|
-
logging: this._options.logging,
|
|
525
|
-
});
|
|
526
|
-
if (_response.ok) {
|
|
527
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
528
|
-
}
|
|
529
|
-
if (_response.error.reason === "status-code") {
|
|
530
|
-
switch (_response.error.statusCode) {
|
|
531
|
-
case 400:
|
|
532
|
-
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
533
|
-
case 401:
|
|
534
|
-
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
535
|
-
case 403:
|
|
536
|
-
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
537
|
-
case 404:
|
|
538
|
-
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
539
|
-
case 409:
|
|
540
|
-
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
541
|
-
case 422:
|
|
542
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
543
|
-
case 429:
|
|
544
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
545
|
-
default:
|
|
546
|
-
throw new errors.FrameioError({
|
|
547
|
-
statusCode: _response.error.statusCode,
|
|
548
|
-
body: _response.error.body,
|
|
549
|
-
rawResponse: _response.rawResponse,
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}/assets/{asset_id}");
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
/**
|
|
557
|
-
* Add new asset share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
558
|
-
*
|
|
559
|
-
* @param {Frameio.FrameOrAdobeId} account_id
|
|
560
|
-
* @param {Frameio.Uuid} share_id
|
|
561
|
-
* @param {Frameio.AddAssetParams} request
|
|
562
|
-
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
563
|
-
*
|
|
564
|
-
* @throws {@link Frameio.BadRequestError}
|
|
565
|
-
* @throws {@link Frameio.UnauthorizedError}
|
|
566
|
-
* @throws {@link Frameio.ForbiddenError}
|
|
567
|
-
* @throws {@link Frameio.NotFoundError}
|
|
568
|
-
* @throws {@link Frameio.ConflictError}
|
|
569
|
-
* @throws {@link Frameio.UnprocessableEntityError}
|
|
570
|
-
* @throws {@link Frameio.TooManyRequestsError}
|
|
571
|
-
*
|
|
572
|
-
* @example
|
|
573
|
-
* await client.shares.addAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
574
|
-
* data: {
|
|
575
|
-
* asset_id: "430d355d-d9a5-4d3e-851f-d2e5f60666d9"
|
|
576
|
-
* }
|
|
577
|
-
* })
|
|
578
|
-
*/
|
|
579
|
-
addAsset(account_id, share_id, request, requestOptions) {
|
|
580
|
-
return core.HttpResponsePromise.fromPromise(this.__addAsset(account_id, share_id, request, requestOptions));
|
|
581
|
-
}
|
|
582
|
-
__addAsset(account_id, share_id, request, requestOptions) {
|
|
583
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
584
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
585
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
586
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
|
|
587
|
-
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
588
|
-
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`),
|
|
589
|
-
method: "POST",
|
|
590
|
-
headers: _headers,
|
|
591
|
-
contentType: "application/json",
|
|
592
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
593
|
-
requestType: "json",
|
|
594
|
-
body: request,
|
|
595
|
-
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,
|
|
596
|
-
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,
|
|
597
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
598
|
-
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
599
|
-
logging: this._options.logging,
|
|
600
|
-
});
|
|
601
|
-
if (_response.ok) {
|
|
602
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
603
|
-
}
|
|
604
|
-
if (_response.error.reason === "status-code") {
|
|
605
|
-
switch (_response.error.statusCode) {
|
|
606
|
-
case 400:
|
|
607
|
-
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
608
|
-
case 401:
|
|
609
|
-
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
610
|
-
case 403:
|
|
611
|
-
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
612
|
-
case 404:
|
|
613
|
-
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
614
|
-
case 409:
|
|
615
|
-
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
616
|
-
case 422:
|
|
617
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
618
|
-
case 429:
|
|
619
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
620
|
-
default:
|
|
621
|
-
throw new errors.FrameioError({
|
|
622
|
-
statusCode: _response.error.statusCode,
|
|
623
|
-
body: _response.error.body,
|
|
624
|
-
rawResponse: _response.rawResponse,
|
|
625
|
-
});
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/shares/{share_id}/assets");
|
|
629
|
-
});
|
|
630
|
-
}
|
|
631
631
|
/**
|
|
632
632
|
* List shares on a project. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
633
633
|
*
|
|
@@ -732,9 +732,9 @@ export class SharesClient {
|
|
|
732
732
|
* data: {
|
|
733
733
|
* type: "asset",
|
|
734
734
|
* access: "public",
|
|
735
|
-
* asset_ids: ["
|
|
735
|
+
* asset_ids: ["4123e6f4-1afe-413e-a6bc-19031fd2f1f0", "fc9fc9e2-7aad-4449-9662-22439cddc061"],
|
|
736
736
|
* downloading_enabled: true,
|
|
737
|
-
* expiration: "2026-
|
|
737
|
+
* expiration: "2026-07-08T22:37:02Z",
|
|
738
738
|
* name: "Share Name",
|
|
739
739
|
* passphrase: "as!dfj39sd(*"
|
|
740
740
|
* }
|
|
@@ -5,9 +5,9 @@ import type * as Frameio from "../../../../index.mjs";
|
|
|
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
|
* }
|