frameio 1.2.2 → 1.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/Client.js +2 -2
- package/dist/cjs/api/resources/accountPermissions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/accountPermissions/client/Client.js +66 -79
- package/dist/cjs/api/resources/accounts/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/accounts/client/Client.js +63 -73
- package/dist/cjs/api/resources/comments/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/comments/client/Client.js +69 -82
- package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/projectPermissions/client/Client.js +66 -79
- package/dist/cjs/api/resources/projects/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/projects/client/Client.js +66 -79
- package/dist/cjs/api/resources/shares/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/shares/client/Client.js +126 -149
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +66 -79
- package/dist/cjs/api/resources/workspacePermissions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/workspacePermissions/client/Client.js +66 -79
- package/dist/cjs/api/resources/workspaces/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/workspaces/client/Client.js +69 -79
- package/dist/cjs/core/index.d.ts +0 -2
- package/dist/cjs/core/index.js +0 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/accountPermissions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/accountPermissions/client/Client.mjs +66 -79
- package/dist/esm/api/resources/accounts/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/accounts/client/Client.mjs +63 -73
- package/dist/esm/api/resources/comments/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/comments/client/Client.mjs +69 -82
- package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/projectPermissions/client/Client.mjs +66 -79
- package/dist/esm/api/resources/projects/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/projects/client/Client.mjs +66 -79
- package/dist/esm/api/resources/shares/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/shares/client/Client.mjs +126 -149
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +66 -79
- package/dist/esm/api/resources/workspacePermissions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +66 -79
- package/dist/esm/api/resources/workspaces/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/workspaces/client/Client.mjs +69 -79
- package/dist/esm/core/index.d.mts +0 -2
- package/dist/esm/core/index.mjs +0 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +29 -203
- package/dist/cjs/core/pagination/Page.d.ts +0 -32
- package/dist/cjs/core/pagination/Page.js +0 -100
- package/dist/cjs/core/pagination/Pageable.d.ts +0 -14
- package/dist/cjs/core/pagination/Pageable.js +0 -10
- package/dist/cjs/core/pagination/index.d.ts +0 -2
- package/dist/cjs/core/pagination/index.js +0 -7
- package/dist/cjs/core/utils/index.d.ts +0 -1
- package/dist/cjs/core/utils/index.js +0 -5
- package/dist/cjs/core/utils/setObjectProperty.d.ts +0 -11
- package/dist/cjs/core/utils/setObjectProperty.js +0 -42
- package/dist/esm/core/pagination/Page.d.mts +0 -32
- package/dist/esm/core/pagination/Page.mjs +0 -96
- package/dist/esm/core/pagination/Pageable.d.mts +0 -14
- package/dist/esm/core/pagination/Pageable.mjs +0 -6
- package/dist/esm/core/pagination/index.d.mts +0 -2
- package/dist/esm/core/pagination/index.mjs +0 -2
- package/dist/esm/core/utils/index.d.mts +0 -1
- package/dist/esm/core/utils/index.mjs +0 -1
- package/dist/esm/core/utils/setObjectProperty.d.mts +0 -11
- package/dist/esm/core/utils/setObjectProperty.mjs +0 -39
|
@@ -296,91 +296,78 @@ export class Projects {
|
|
|
296
296
|
* include_total_count: false
|
|
297
297
|
* })
|
|
298
298
|
*/
|
|
299
|
-
index(
|
|
299
|
+
index(accountId, workspaceId, request = {}, requestOptions) {
|
|
300
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, workspaceId, request, requestOptions));
|
|
301
|
+
}
|
|
302
|
+
__index(accountId_1, workspaceId_1) {
|
|
300
303
|
return __awaiter(this, arguments, void 0, function* (accountId, workspaceId, request = {}, requestOptions) {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
347
|
-
case 429:
|
|
348
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
349
|
-
default:
|
|
350
|
-
throw new errors.FrameioError({
|
|
351
|
-
statusCode: _response.error.statusCode,
|
|
352
|
-
body: _response.error.body,
|
|
353
|
-
rawResponse: _response.rawResponse,
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
switch (_response.error.reason) {
|
|
358
|
-
case "non-json":
|
|
304
|
+
var _a, _b, _c;
|
|
305
|
+
const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
306
|
+
const _queryParams = {};
|
|
307
|
+
if (include != null) {
|
|
308
|
+
_queryParams["include"] = include;
|
|
309
|
+
}
|
|
310
|
+
if (after != null) {
|
|
311
|
+
_queryParams["after"] = after;
|
|
312
|
+
}
|
|
313
|
+
if (pageSize != null) {
|
|
314
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
315
|
+
}
|
|
316
|
+
if (includeTotalCount != null) {
|
|
317
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
318
|
+
}
|
|
319
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
320
|
+
const _response = yield core.fetcher({
|
|
321
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/workspaces/${encodeURIComponent(workspaceId)}/projects`),
|
|
322
|
+
method: "GET",
|
|
323
|
+
headers: _headers,
|
|
324
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
325
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
326
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
327
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
328
|
+
});
|
|
329
|
+
if (_response.ok) {
|
|
330
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
331
|
+
}
|
|
332
|
+
if (_response.error.reason === "status-code") {
|
|
333
|
+
switch (_response.error.statusCode) {
|
|
334
|
+
case 400:
|
|
335
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
336
|
+
case 401:
|
|
337
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
338
|
+
case 403:
|
|
339
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
340
|
+
case 404:
|
|
341
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
342
|
+
case 409:
|
|
343
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
344
|
+
case 422:
|
|
345
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
346
|
+
case 429:
|
|
347
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
348
|
+
default:
|
|
359
349
|
throw new errors.FrameioError({
|
|
360
350
|
statusCode: _response.error.statusCode,
|
|
361
|
-
body: _response.error.
|
|
362
|
-
rawResponse: _response.rawResponse,
|
|
363
|
-
});
|
|
364
|
-
case "timeout":
|
|
365
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/projects.");
|
|
366
|
-
case "unknown":
|
|
367
|
-
throw new errors.FrameioError({
|
|
368
|
-
message: _response.error.errorMessage,
|
|
351
|
+
body: _response.error.body,
|
|
369
352
|
rawResponse: _response.rawResponse,
|
|
370
353
|
});
|
|
371
354
|
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
355
|
+
}
|
|
356
|
+
switch (_response.error.reason) {
|
|
357
|
+
case "non-json":
|
|
358
|
+
throw new errors.FrameioError({
|
|
359
|
+
statusCode: _response.error.statusCode,
|
|
360
|
+
body: _response.error.rawBody,
|
|
361
|
+
rawResponse: _response.rawResponse,
|
|
362
|
+
});
|
|
363
|
+
case "timeout":
|
|
364
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/projects.");
|
|
365
|
+
case "unknown":
|
|
366
|
+
throw new errors.FrameioError({
|
|
367
|
+
message: _response.error.errorMessage,
|
|
368
|
+
rawResponse: _response.rawResponse,
|
|
369
|
+
});
|
|
370
|
+
}
|
|
384
371
|
});
|
|
385
372
|
}
|
|
386
373
|
/**
|
|
@@ -122,7 +122,8 @@ export declare class Shares {
|
|
|
122
122
|
* include_total_count: false
|
|
123
123
|
* })
|
|
124
124
|
*/
|
|
125
|
-
listReviewers(accountId: Frameio.Uuid, shareId: Frameio.Uuid, request?: Frameio.SharesListReviewersRequest, requestOptions?: Shares.RequestOptions):
|
|
125
|
+
listReviewers(accountId: Frameio.Uuid, shareId: Frameio.Uuid, request?: Frameio.SharesListReviewersRequest, requestOptions?: Shares.RequestOptions): core.HttpResponsePromise<Frameio.ShareReviewersResponse>;
|
|
126
|
+
private __listReviewers;
|
|
126
127
|
/**
|
|
127
128
|
* Add reviewers to secure share by three identifier types: `adobe_user_id`, `email`, and `user_id`.
|
|
128
129
|
* <br>
|
|
@@ -255,7 +256,8 @@ export declare class Shares {
|
|
|
255
256
|
* include_total_count: false
|
|
256
257
|
* })
|
|
257
258
|
*/
|
|
258
|
-
index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.SharesIndexRequest, requestOptions?: Shares.RequestOptions):
|
|
259
|
+
index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.SharesIndexRequest, requestOptions?: Shares.RequestOptions): core.HttpResponsePromise<Frameio.SharesResponse>;
|
|
260
|
+
private __index;
|
|
259
261
|
/**
|
|
260
262
|
* Create share. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
261
263
|
*
|
|
@@ -290,88 +290,75 @@ export class Shares {
|
|
|
290
290
|
* include_total_count: false
|
|
291
291
|
* })
|
|
292
292
|
*/
|
|
293
|
-
listReviewers(
|
|
293
|
+
listReviewers(accountId, shareId, request = {}, requestOptions) {
|
|
294
|
+
return core.HttpResponsePromise.fromPromise(this.__listReviewers(accountId, shareId, request, requestOptions));
|
|
295
|
+
}
|
|
296
|
+
__listReviewers(accountId_1, shareId_1) {
|
|
294
297
|
return __awaiter(this, arguments, void 0, function* (accountId, shareId, request = {}, requestOptions) {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
338
|
-
case 429:
|
|
339
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
340
|
-
default:
|
|
341
|
-
throw new errors.FrameioError({
|
|
342
|
-
statusCode: _response.error.statusCode,
|
|
343
|
-
body: _response.error.body,
|
|
344
|
-
rawResponse: _response.rawResponse,
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
switch (_response.error.reason) {
|
|
349
|
-
case "non-json":
|
|
298
|
+
var _a, _b, _c;
|
|
299
|
+
const { after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
300
|
+
const _queryParams = {};
|
|
301
|
+
if (after != null) {
|
|
302
|
+
_queryParams["after"] = after;
|
|
303
|
+
}
|
|
304
|
+
if (pageSize != null) {
|
|
305
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
306
|
+
}
|
|
307
|
+
if (includeTotalCount != null) {
|
|
308
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
309
|
+
}
|
|
310
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
311
|
+
const _response = yield core.fetcher({
|
|
312
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/shares/${encodeURIComponent(shareId)}/reviewers`),
|
|
313
|
+
method: "GET",
|
|
314
|
+
headers: _headers,
|
|
315
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
316
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
317
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
318
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
319
|
+
});
|
|
320
|
+
if (_response.ok) {
|
|
321
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
322
|
+
}
|
|
323
|
+
if (_response.error.reason === "status-code") {
|
|
324
|
+
switch (_response.error.statusCode) {
|
|
325
|
+
case 400:
|
|
326
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
327
|
+
case 401:
|
|
328
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
329
|
+
case 403:
|
|
330
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
331
|
+
case 404:
|
|
332
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
333
|
+
case 409:
|
|
334
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
335
|
+
case 422:
|
|
336
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
337
|
+
case 429:
|
|
338
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
339
|
+
default:
|
|
350
340
|
throw new errors.FrameioError({
|
|
351
341
|
statusCode: _response.error.statusCode,
|
|
352
|
-
body: _response.error.
|
|
353
|
-
rawResponse: _response.rawResponse,
|
|
354
|
-
});
|
|
355
|
-
case "timeout":
|
|
356
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/shares/{share_id}/reviewers.");
|
|
357
|
-
case "unknown":
|
|
358
|
-
throw new errors.FrameioError({
|
|
359
|
-
message: _response.error.errorMessage,
|
|
342
|
+
body: _response.error.body,
|
|
360
343
|
rawResponse: _response.rawResponse,
|
|
361
344
|
});
|
|
362
345
|
}
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
346
|
+
}
|
|
347
|
+
switch (_response.error.reason) {
|
|
348
|
+
case "non-json":
|
|
349
|
+
throw new errors.FrameioError({
|
|
350
|
+
statusCode: _response.error.statusCode,
|
|
351
|
+
body: _response.error.rawBody,
|
|
352
|
+
rawResponse: _response.rawResponse,
|
|
353
|
+
});
|
|
354
|
+
case "timeout":
|
|
355
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/shares/{share_id}/reviewers.");
|
|
356
|
+
case "unknown":
|
|
357
|
+
throw new errors.FrameioError({
|
|
358
|
+
message: _response.error.errorMessage,
|
|
359
|
+
rawResponse: _response.rawResponse,
|
|
360
|
+
});
|
|
361
|
+
}
|
|
375
362
|
});
|
|
376
363
|
}
|
|
377
364
|
/**
|
|
@@ -747,85 +734,75 @@ export class Shares {
|
|
|
747
734
|
* include_total_count: false
|
|
748
735
|
* })
|
|
749
736
|
*/
|
|
750
|
-
index(
|
|
737
|
+
index(accountId, projectId, request = {}, requestOptions) {
|
|
738
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, projectId, request, requestOptions));
|
|
739
|
+
}
|
|
740
|
+
__index(accountId_1, projectId_1) {
|
|
751
741
|
return __awaiter(this, arguments, void 0, function* (accountId, projectId, request = {}, requestOptions) {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
default:
|
|
795
|
-
throw new errors.FrameioError({
|
|
796
|
-
statusCode: _response.error.statusCode,
|
|
797
|
-
body: _response.error.body,
|
|
798
|
-
rawResponse: _response.rawResponse,
|
|
799
|
-
});
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
switch (_response.error.reason) {
|
|
803
|
-
case "non-json":
|
|
742
|
+
var _a, _b, _c;
|
|
743
|
+
const { after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
744
|
+
const _queryParams = {};
|
|
745
|
+
if (after != null) {
|
|
746
|
+
_queryParams["after"] = after;
|
|
747
|
+
}
|
|
748
|
+
if (pageSize != null) {
|
|
749
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
750
|
+
}
|
|
751
|
+
if (includeTotalCount != null) {
|
|
752
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
753
|
+
}
|
|
754
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
755
|
+
const _response = yield core.fetcher({
|
|
756
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/projects/${encodeURIComponent(projectId)}/shares`),
|
|
757
|
+
method: "GET",
|
|
758
|
+
headers: _headers,
|
|
759
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
760
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
761
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
762
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
763
|
+
});
|
|
764
|
+
if (_response.ok) {
|
|
765
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
766
|
+
}
|
|
767
|
+
if (_response.error.reason === "status-code") {
|
|
768
|
+
switch (_response.error.statusCode) {
|
|
769
|
+
case 400:
|
|
770
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
771
|
+
case 401:
|
|
772
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
773
|
+
case 403:
|
|
774
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
775
|
+
case 404:
|
|
776
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
777
|
+
case 409:
|
|
778
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
779
|
+
case 422:
|
|
780
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
781
|
+
case 429:
|
|
782
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
783
|
+
default:
|
|
804
784
|
throw new errors.FrameioError({
|
|
805
785
|
statusCode: _response.error.statusCode,
|
|
806
|
-
body: _response.error.
|
|
807
|
-
rawResponse: _response.rawResponse,
|
|
808
|
-
});
|
|
809
|
-
case "timeout":
|
|
810
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/projects/{project_id}/shares.");
|
|
811
|
-
case "unknown":
|
|
812
|
-
throw new errors.FrameioError({
|
|
813
|
-
message: _response.error.errorMessage,
|
|
786
|
+
body: _response.error.body,
|
|
814
787
|
rawResponse: _response.rawResponse,
|
|
815
788
|
});
|
|
816
789
|
}
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
790
|
+
}
|
|
791
|
+
switch (_response.error.reason) {
|
|
792
|
+
case "non-json":
|
|
793
|
+
throw new errors.FrameioError({
|
|
794
|
+
statusCode: _response.error.statusCode,
|
|
795
|
+
body: _response.error.rawBody,
|
|
796
|
+
rawResponse: _response.rawResponse,
|
|
797
|
+
});
|
|
798
|
+
case "timeout":
|
|
799
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/projects/{project_id}/shares.");
|
|
800
|
+
case "unknown":
|
|
801
|
+
throw new errors.FrameioError({
|
|
802
|
+
message: _response.error.errorMessage,
|
|
803
|
+
rawResponse: _response.rawResponse,
|
|
804
|
+
});
|
|
805
|
+
}
|
|
829
806
|
});
|
|
830
807
|
}
|
|
831
808
|
/**
|
|
@@ -53,7 +53,8 @@ export declare class Webhooks {
|
|
|
53
53
|
* include_total_count: false
|
|
54
54
|
* })
|
|
55
55
|
*/
|
|
56
|
-
index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.WebhooksIndexRequest, requestOptions?: Webhooks.RequestOptions):
|
|
56
|
+
index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.WebhooksIndexRequest, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise<Frameio.WebhooksWithIncludesResponse>;
|
|
57
|
+
private __index;
|
|
57
58
|
/**
|
|
58
59
|
* Creates a single webhook with secret.<br/><br/>Valid events:<p><code>
|
|
59
60
|
* file.created, file.deleted, file.ready, file.updated, file.upload.completed, file.versioned, file.copied, folder.created, folder.deleted, folder.updated, folder.copied, comment.completed, comment.created, comment.deleted, comment.uncompleted, comment.updated, customfield.created, customfield.updated, customfield.deleted, metadata.value.updated, project.created, project.deleted, project.updated, collection.created, collection.updated, collection.deleted, share.created, share.updated, share.deleted, share.viewed
|