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
|
@@ -326,88 +326,75 @@ class Shares {
|
|
|
326
326
|
* include_total_count: false
|
|
327
327
|
* })
|
|
328
328
|
*/
|
|
329
|
-
listReviewers(
|
|
329
|
+
listReviewers(accountId, shareId, request = {}, requestOptions) {
|
|
330
|
+
return core.HttpResponsePromise.fromPromise(this.__listReviewers(accountId, shareId, request, requestOptions));
|
|
331
|
+
}
|
|
332
|
+
__listReviewers(accountId_1, shareId_1) {
|
|
330
333
|
return __awaiter(this, arguments, void 0, function* (accountId, shareId, request = {}, requestOptions) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
374
|
-
case 429:
|
|
375
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
376
|
-
default:
|
|
377
|
-
throw new errors.FrameioError({
|
|
378
|
-
statusCode: _response.error.statusCode,
|
|
379
|
-
body: _response.error.body,
|
|
380
|
-
rawResponse: _response.rawResponse,
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
switch (_response.error.reason) {
|
|
385
|
-
case "non-json":
|
|
334
|
+
var _a, _b, _c;
|
|
335
|
+
const { after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
336
|
+
const _queryParams = {};
|
|
337
|
+
if (after != null) {
|
|
338
|
+
_queryParams["after"] = after;
|
|
339
|
+
}
|
|
340
|
+
if (pageSize != null) {
|
|
341
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
342
|
+
}
|
|
343
|
+
if (includeTotalCount != null) {
|
|
344
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
345
|
+
}
|
|
346
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
347
|
+
const _response = yield core.fetcher({
|
|
348
|
+
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`),
|
|
349
|
+
method: "GET",
|
|
350
|
+
headers: _headers,
|
|
351
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
352
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
353
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
354
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
355
|
+
});
|
|
356
|
+
if (_response.ok) {
|
|
357
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
358
|
+
}
|
|
359
|
+
if (_response.error.reason === "status-code") {
|
|
360
|
+
switch (_response.error.statusCode) {
|
|
361
|
+
case 400:
|
|
362
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
363
|
+
case 401:
|
|
364
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
365
|
+
case 403:
|
|
366
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
367
|
+
case 404:
|
|
368
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
369
|
+
case 409:
|
|
370
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
371
|
+
case 422:
|
|
372
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
373
|
+
case 429:
|
|
374
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
375
|
+
default:
|
|
386
376
|
throw new errors.FrameioError({
|
|
387
377
|
statusCode: _response.error.statusCode,
|
|
388
|
-
body: _response.error.
|
|
389
|
-
rawResponse: _response.rawResponse,
|
|
390
|
-
});
|
|
391
|
-
case "timeout":
|
|
392
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/shares/{share_id}/reviewers.");
|
|
393
|
-
case "unknown":
|
|
394
|
-
throw new errors.FrameioError({
|
|
395
|
-
message: _response.error.errorMessage,
|
|
378
|
+
body: _response.error.body,
|
|
396
379
|
rawResponse: _response.rawResponse,
|
|
397
380
|
});
|
|
398
381
|
}
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
382
|
+
}
|
|
383
|
+
switch (_response.error.reason) {
|
|
384
|
+
case "non-json":
|
|
385
|
+
throw new errors.FrameioError({
|
|
386
|
+
statusCode: _response.error.statusCode,
|
|
387
|
+
body: _response.error.rawBody,
|
|
388
|
+
rawResponse: _response.rawResponse,
|
|
389
|
+
});
|
|
390
|
+
case "timeout":
|
|
391
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/shares/{share_id}/reviewers.");
|
|
392
|
+
case "unknown":
|
|
393
|
+
throw new errors.FrameioError({
|
|
394
|
+
message: _response.error.errorMessage,
|
|
395
|
+
rawResponse: _response.rawResponse,
|
|
396
|
+
});
|
|
397
|
+
}
|
|
411
398
|
});
|
|
412
399
|
}
|
|
413
400
|
/**
|
|
@@ -783,85 +770,75 @@ class Shares {
|
|
|
783
770
|
* include_total_count: false
|
|
784
771
|
* })
|
|
785
772
|
*/
|
|
786
|
-
index(
|
|
773
|
+
index(accountId, projectId, request = {}, requestOptions) {
|
|
774
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, projectId, request, requestOptions));
|
|
775
|
+
}
|
|
776
|
+
__index(accountId_1, projectId_1) {
|
|
787
777
|
return __awaiter(this, arguments, void 0, function* (accountId, projectId, request = {}, requestOptions) {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
default:
|
|
831
|
-
throw new errors.FrameioError({
|
|
832
|
-
statusCode: _response.error.statusCode,
|
|
833
|
-
body: _response.error.body,
|
|
834
|
-
rawResponse: _response.rawResponse,
|
|
835
|
-
});
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
switch (_response.error.reason) {
|
|
839
|
-
case "non-json":
|
|
778
|
+
var _a, _b, _c;
|
|
779
|
+
const { after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
780
|
+
const _queryParams = {};
|
|
781
|
+
if (after != null) {
|
|
782
|
+
_queryParams["after"] = after;
|
|
783
|
+
}
|
|
784
|
+
if (pageSize != null) {
|
|
785
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
786
|
+
}
|
|
787
|
+
if (includeTotalCount != null) {
|
|
788
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
789
|
+
}
|
|
790
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
791
|
+
const _response = yield core.fetcher({
|
|
792
|
+
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`),
|
|
793
|
+
method: "GET",
|
|
794
|
+
headers: _headers,
|
|
795
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
796
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
797
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
798
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
799
|
+
});
|
|
800
|
+
if (_response.ok) {
|
|
801
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
802
|
+
}
|
|
803
|
+
if (_response.error.reason === "status-code") {
|
|
804
|
+
switch (_response.error.statusCode) {
|
|
805
|
+
case 400:
|
|
806
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
807
|
+
case 401:
|
|
808
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
809
|
+
case 403:
|
|
810
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
811
|
+
case 404:
|
|
812
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
813
|
+
case 409:
|
|
814
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
815
|
+
case 422:
|
|
816
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
817
|
+
case 429:
|
|
818
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
819
|
+
default:
|
|
840
820
|
throw new errors.FrameioError({
|
|
841
821
|
statusCode: _response.error.statusCode,
|
|
842
|
-
body: _response.error.
|
|
843
|
-
rawResponse: _response.rawResponse,
|
|
844
|
-
});
|
|
845
|
-
case "timeout":
|
|
846
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/projects/{project_id}/shares.");
|
|
847
|
-
case "unknown":
|
|
848
|
-
throw new errors.FrameioError({
|
|
849
|
-
message: _response.error.errorMessage,
|
|
822
|
+
body: _response.error.body,
|
|
850
823
|
rawResponse: _response.rawResponse,
|
|
851
824
|
});
|
|
852
825
|
}
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
826
|
+
}
|
|
827
|
+
switch (_response.error.reason) {
|
|
828
|
+
case "non-json":
|
|
829
|
+
throw new errors.FrameioError({
|
|
830
|
+
statusCode: _response.error.statusCode,
|
|
831
|
+
body: _response.error.rawBody,
|
|
832
|
+
rawResponse: _response.rawResponse,
|
|
833
|
+
});
|
|
834
|
+
case "timeout":
|
|
835
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/projects/{project_id}/shares.");
|
|
836
|
+
case "unknown":
|
|
837
|
+
throw new errors.FrameioError({
|
|
838
|
+
message: _response.error.errorMessage,
|
|
839
|
+
rawResponse: _response.rawResponse,
|
|
840
|
+
});
|
|
841
|
+
}
|
|
865
842
|
});
|
|
866
843
|
}
|
|
867
844
|
/**
|
|
@@ -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
|
|
@@ -80,91 +80,78 @@ class Webhooks {
|
|
|
80
80
|
* include_total_count: false
|
|
81
81
|
* })
|
|
82
82
|
*/
|
|
83
|
-
index(
|
|
83
|
+
index(accountId, workspaceId, request = {}, requestOptions) {
|
|
84
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, workspaceId, request, requestOptions));
|
|
85
|
+
}
|
|
86
|
+
__index(accountId_1, workspaceId_1) {
|
|
84
87
|
return __awaiter(this, arguments, void 0, function* (accountId, workspaceId, request = {}, requestOptions) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
131
|
-
case 429:
|
|
132
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
133
|
-
default:
|
|
134
|
-
throw new errors.FrameioError({
|
|
135
|
-
statusCode: _response.error.statusCode,
|
|
136
|
-
body: _response.error.body,
|
|
137
|
-
rawResponse: _response.rawResponse,
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
switch (_response.error.reason) {
|
|
142
|
-
case "non-json":
|
|
88
|
+
var _a, _b, _c;
|
|
89
|
+
const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
90
|
+
const _queryParams = {};
|
|
91
|
+
if (include != null) {
|
|
92
|
+
_queryParams["include"] = include;
|
|
93
|
+
}
|
|
94
|
+
if (after != null) {
|
|
95
|
+
_queryParams["after"] = after;
|
|
96
|
+
}
|
|
97
|
+
if (pageSize != null) {
|
|
98
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
99
|
+
}
|
|
100
|
+
if (includeTotalCount != null) {
|
|
101
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
102
|
+
}
|
|
103
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
104
|
+
const _response = yield core.fetcher({
|
|
105
|
+
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)}/webhooks`),
|
|
106
|
+
method: "GET",
|
|
107
|
+
headers: _headers,
|
|
108
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
109
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
110
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
111
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
112
|
+
});
|
|
113
|
+
if (_response.ok) {
|
|
114
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
115
|
+
}
|
|
116
|
+
if (_response.error.reason === "status-code") {
|
|
117
|
+
switch (_response.error.statusCode) {
|
|
118
|
+
case 400:
|
|
119
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
120
|
+
case 401:
|
|
121
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
122
|
+
case 403:
|
|
123
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
124
|
+
case 404:
|
|
125
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
126
|
+
case 409:
|
|
127
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
128
|
+
case 422:
|
|
129
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
130
|
+
case 429:
|
|
131
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
132
|
+
default:
|
|
143
133
|
throw new errors.FrameioError({
|
|
144
134
|
statusCode: _response.error.statusCode,
|
|
145
|
-
body: _response.error.
|
|
146
|
-
rawResponse: _response.rawResponse,
|
|
147
|
-
});
|
|
148
|
-
case "timeout":
|
|
149
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/webhooks.");
|
|
150
|
-
case "unknown":
|
|
151
|
-
throw new errors.FrameioError({
|
|
152
|
-
message: _response.error.errorMessage,
|
|
135
|
+
body: _response.error.body,
|
|
153
136
|
rawResponse: _response.rawResponse,
|
|
154
137
|
});
|
|
155
138
|
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
139
|
+
}
|
|
140
|
+
switch (_response.error.reason) {
|
|
141
|
+
case "non-json":
|
|
142
|
+
throw new errors.FrameioError({
|
|
143
|
+
statusCode: _response.error.statusCode,
|
|
144
|
+
body: _response.error.rawBody,
|
|
145
|
+
rawResponse: _response.rawResponse,
|
|
146
|
+
});
|
|
147
|
+
case "timeout":
|
|
148
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/webhooks.");
|
|
149
|
+
case "unknown":
|
|
150
|
+
throw new errors.FrameioError({
|
|
151
|
+
message: _response.error.errorMessage,
|
|
152
|
+
rawResponse: _response.rawResponse,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
168
155
|
});
|
|
169
156
|
}
|
|
170
157
|
/**
|
|
@@ -53,7 +53,8 @@ export declare class WorkspacePermissions {
|
|
|
53
53
|
* include_total_count: false
|
|
54
54
|
* })
|
|
55
55
|
*/
|
|
56
|
-
index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.WorkspacePermissionsIndexRequest, requestOptions?: WorkspacePermissions.RequestOptions):
|
|
56
|
+
index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.WorkspacePermissionsIndexRequest, requestOptions?: WorkspacePermissions.RequestOptions): core.HttpResponsePromise<Frameio.WorkspaceUserRolesResponse>;
|
|
57
|
+
private __index;
|
|
57
58
|
/**
|
|
58
59
|
* Remove a user from a given workspace. <br>Rate Limits: 60 calls per 1.00 minute(s) per account_user
|
|
59
60
|
*
|