frameio 1.2.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/cjs/Client.d.ts +1 -0
  2. package/dist/cjs/Client.js +2 -2
  3. package/dist/cjs/api/resources/accountPermissions/client/Client.d.ts +3 -1
  4. package/dist/cjs/api/resources/accountPermissions/client/Client.js +66 -79
  5. package/dist/cjs/api/resources/accounts/client/Client.d.ts +3 -1
  6. package/dist/cjs/api/resources/accounts/client/Client.js +66 -76
  7. package/dist/cjs/api/resources/comments/client/Client.d.ts +3 -1
  8. package/dist/cjs/api/resources/comments/client/Client.js +81 -94
  9. package/dist/cjs/api/resources/files/client/Client.d.ts +1 -0
  10. package/dist/cjs/api/resources/files/client/Client.js +30 -30
  11. package/dist/cjs/api/resources/folders/client/Client.d.ts +1 -0
  12. package/dist/cjs/api/resources/folders/client/Client.js +24 -24
  13. package/dist/cjs/api/resources/metadata/client/Client.d.ts +1 -0
  14. package/dist/cjs/api/resources/metadata/client/Client.js +6 -6
  15. package/dist/cjs/api/resources/metadataFields/client/Client.d.ts +1 -0
  16. package/dist/cjs/api/resources/metadataFields/client/Client.js +12 -12
  17. package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +3 -1
  18. package/dist/cjs/api/resources/projectPermissions/client/Client.js +72 -85
  19. package/dist/cjs/api/resources/projects/client/Client.d.ts +3 -1
  20. package/dist/cjs/api/resources/projects/client/Client.js +78 -91
  21. package/dist/cjs/api/resources/shares/client/Client.d.ts +5 -2
  22. package/dist/cjs/api/resources/shares/client/Client.js +150 -173
  23. package/dist/cjs/api/resources/users/client/Client.d.ts +1 -0
  24. package/dist/cjs/api/resources/users/client/Client.js +3 -3
  25. package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +1 -0
  26. package/dist/cjs/api/resources/versionStacks/client/Client.js +18 -18
  27. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +3 -1
  28. package/dist/cjs/api/resources/webhooks/client/Client.js +78 -91
  29. package/dist/cjs/api/resources/workspacePermissions/client/Client.d.ts +3 -1
  30. package/dist/cjs/api/resources/workspacePermissions/client/Client.js +72 -85
  31. package/dist/cjs/api/resources/workspaces/client/Client.d.ts +3 -1
  32. package/dist/cjs/api/resources/workspaces/client/Client.js +81 -91
  33. package/dist/cjs/core/index.d.ts +0 -2
  34. package/dist/cjs/core/index.js +0 -2
  35. package/dist/cjs/version.d.ts +1 -1
  36. package/dist/cjs/version.js +1 -1
  37. package/dist/esm/Client.d.mts +1 -0
  38. package/dist/esm/Client.mjs +2 -2
  39. package/dist/esm/api/resources/accountPermissions/client/Client.d.mts +3 -1
  40. package/dist/esm/api/resources/accountPermissions/client/Client.mjs +66 -79
  41. package/dist/esm/api/resources/accounts/client/Client.d.mts +3 -1
  42. package/dist/esm/api/resources/accounts/client/Client.mjs +66 -76
  43. package/dist/esm/api/resources/comments/client/Client.d.mts +3 -1
  44. package/dist/esm/api/resources/comments/client/Client.mjs +81 -94
  45. package/dist/esm/api/resources/files/client/Client.d.mts +1 -0
  46. package/dist/esm/api/resources/files/client/Client.mjs +30 -30
  47. package/dist/esm/api/resources/folders/client/Client.d.mts +1 -0
  48. package/dist/esm/api/resources/folders/client/Client.mjs +24 -24
  49. package/dist/esm/api/resources/metadata/client/Client.d.mts +1 -0
  50. package/dist/esm/api/resources/metadata/client/Client.mjs +6 -6
  51. package/dist/esm/api/resources/metadataFields/client/Client.d.mts +1 -0
  52. package/dist/esm/api/resources/metadataFields/client/Client.mjs +12 -12
  53. package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +3 -1
  54. package/dist/esm/api/resources/projectPermissions/client/Client.mjs +72 -85
  55. package/dist/esm/api/resources/projects/client/Client.d.mts +3 -1
  56. package/dist/esm/api/resources/projects/client/Client.mjs +78 -91
  57. package/dist/esm/api/resources/shares/client/Client.d.mts +5 -2
  58. package/dist/esm/api/resources/shares/client/Client.mjs +150 -173
  59. package/dist/esm/api/resources/users/client/Client.d.mts +1 -0
  60. package/dist/esm/api/resources/users/client/Client.mjs +3 -3
  61. package/dist/esm/api/resources/versionStacks/client/Client.d.mts +1 -0
  62. package/dist/esm/api/resources/versionStacks/client/Client.mjs +18 -18
  63. package/dist/esm/api/resources/webhooks/client/Client.d.mts +3 -1
  64. package/dist/esm/api/resources/webhooks/client/Client.mjs +78 -91
  65. package/dist/esm/api/resources/workspacePermissions/client/Client.d.mts +3 -1
  66. package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +72 -85
  67. package/dist/esm/api/resources/workspaces/client/Client.d.mts +3 -1
  68. package/dist/esm/api/resources/workspaces/client/Client.mjs +81 -91
  69. package/dist/esm/core/index.d.mts +0 -2
  70. package/dist/esm/core/index.mjs +0 -2
  71. package/dist/esm/version.d.mts +1 -1
  72. package/dist/esm/version.mjs +1 -1
  73. package/package.json +1 -1
  74. package/reference.md +29 -203
  75. package/dist/cjs/core/pagination/Page.d.ts +0 -32
  76. package/dist/cjs/core/pagination/Page.js +0 -100
  77. package/dist/cjs/core/pagination/Pageable.d.ts +0 -14
  78. package/dist/cjs/core/pagination/Pageable.js +0 -10
  79. package/dist/cjs/core/pagination/index.d.ts +0 -2
  80. package/dist/cjs/core/pagination/index.js +0 -7
  81. package/dist/cjs/core/utils/index.d.ts +0 -1
  82. package/dist/cjs/core/utils/index.js +0 -5
  83. package/dist/cjs/core/utils/setObjectProperty.d.ts +0 -11
  84. package/dist/cjs/core/utils/setObjectProperty.js +0 -42
  85. package/dist/esm/core/pagination/Page.d.mts +0 -32
  86. package/dist/esm/core/pagination/Page.mjs +0 -96
  87. package/dist/esm/core/pagination/Pageable.d.mts +0 -14
  88. package/dist/esm/core/pagination/Pageable.mjs +0 -6
  89. package/dist/esm/core/pagination/index.d.mts +0 -2
  90. package/dist/esm/core/pagination/index.mjs +0 -2
  91. package/dist/esm/core/utils/index.d.mts +0 -1
  92. package/dist/esm/core/utils/index.mjs +0 -1
  93. package/dist/esm/core/utils/setObjectProperty.d.mts +0 -11
  94. package/dist/esm/core/utils/setObjectProperty.mjs +0 -39
@@ -79,10 +79,10 @@ class Shares {
79
79
  }
80
80
  __show(accountId, shareId, requestOptions) {
81
81
  return __awaiter(this, void 0, void 0, function* () {
82
- var _a, _b, _c;
82
+ var _a, _b, _c, _d;
83
83
  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);
84
- const _response = yield core.fetcher({
85
- 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)}`),
84
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
85
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/shares/${encodeURIComponent(shareId)}`),
86
86
  method: "GET",
87
87
  headers: _headers,
88
88
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -157,10 +157,10 @@ class Shares {
157
157
  }
158
158
  __delete(accountId, shareId, requestOptions) {
159
159
  return __awaiter(this, void 0, void 0, function* () {
160
- var _a, _b, _c;
160
+ var _a, _b, _c, _d;
161
161
  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);
162
- const _response = yield core.fetcher({
163
- 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)}`),
162
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
163
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/shares/${encodeURIComponent(shareId)}`),
164
164
  method: "DELETE",
165
165
  headers: _headers,
166
166
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -245,10 +245,10 @@ class Shares {
245
245
  }
246
246
  __update(accountId, shareId, request, requestOptions) {
247
247
  return __awaiter(this, void 0, void 0, function* () {
248
- var _a, _b, _c;
248
+ var _a, _b, _c, _d;
249
249
  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);
250
- const _response = yield core.fetcher({
251
- 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)}`),
250
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
251
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/shares/${encodeURIComponent(shareId)}`),
252
252
  method: "PATCH",
253
253
  headers: _headers,
254
254
  contentType: "application/json",
@@ -326,88 +326,75 @@ class Shares {
326
326
  * include_total_count: false
327
327
  * })
328
328
  */
329
- listReviewers(accountId_1, shareId_1) {
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
- const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
332
- var _a, _b, _c;
333
- const { after, page_size: pageSize, include_total_count: includeTotalCount } = request;
334
- const _queryParams = {};
335
- if (after != null) {
336
- _queryParams["after"] = after;
337
- }
338
- if (pageSize != null) {
339
- _queryParams["page_size"] = pageSize.toString();
340
- }
341
- if (includeTotalCount != null) {
342
- _queryParams["include_total_count"] = includeTotalCount.toString();
343
- }
344
- 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);
345
- const _response = yield core.fetcher({
346
- 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`),
347
- method: "GET",
348
- headers: _headers,
349
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
350
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
351
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
352
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
353
- });
354
- if (_response.ok) {
355
- return {
356
- data: _response.body,
357
- rawResponse: _response.rawResponse,
358
- };
359
- }
360
- if (_response.error.reason === "status-code") {
361
- switch (_response.error.statusCode) {
362
- case 400:
363
- throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
364
- case 401:
365
- throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
366
- case 403:
367
- throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
368
- case 404:
369
- throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
370
- case 409:
371
- throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
372
- case 422:
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, _d;
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 ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
348
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : 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.rawBody,
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
- const dataWithRawResponse = yield list(request).withRawResponse();
401
- return new core.Pageable({
402
- response: dataWithRawResponse.data,
403
- rawResponse: dataWithRawResponse.rawResponse,
404
- hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null &&
405
- !(typeof (response === null || response === void 0 ? void 0 : response.links.next) === "string" && (response === null || response === void 0 ? void 0 : response.links.next) === ""),
406
- getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
407
- loadPage: (response) => {
408
- return list(core.setObjectProperty(request, "after", response === null || response === void 0 ? void 0 : response.links.next));
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
  /**
@@ -446,10 +433,10 @@ class Shares {
446
433
  }
447
434
  __addReviewers(accountId, shareId, request, requestOptions) {
448
435
  return __awaiter(this, void 0, void 0, function* () {
449
- var _a, _b, _c;
436
+ var _a, _b, _c, _d;
450
437
  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);
451
- const _response = yield core.fetcher({
452
- 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`),
438
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
439
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/shares/${encodeURIComponent(shareId)}/reviewers`),
453
440
  method: "POST",
454
441
  headers: _headers,
455
442
  contentType: "application/json",
@@ -537,10 +524,10 @@ class Shares {
537
524
  }
538
525
  __removeReviewers(accountId, shareId, request, requestOptions) {
539
526
  return __awaiter(this, void 0, void 0, function* () {
540
- var _a, _b, _c;
527
+ var _a, _b, _c, _d;
541
528
  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);
542
- const _response = yield core.fetcher({
543
- 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`),
529
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
530
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/shares/${encodeURIComponent(shareId)}/reviewers`),
544
531
  method: "DELETE",
545
532
  headers: _headers,
546
533
  contentType: "application/json",
@@ -619,10 +606,10 @@ class Shares {
619
606
  }
620
607
  __removeAsset(accountId, shareId, assetId, requestOptions) {
621
608
  return __awaiter(this, void 0, void 0, function* () {
622
- var _a, _b, _c;
609
+ var _a, _b, _c, _d;
623
610
  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);
624
- const _response = yield core.fetcher({
625
- 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)}/assets/${encodeURIComponent(assetId)}`),
611
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
612
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/shares/${encodeURIComponent(shareId)}/assets/${encodeURIComponent(assetId)}`),
626
613
  method: "DELETE",
627
614
  headers: _headers,
628
615
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -702,10 +689,10 @@ class Shares {
702
689
  }
703
690
  __addAsset(accountId, shareId, request, requestOptions) {
704
691
  return __awaiter(this, void 0, void 0, function* () {
705
- var _a, _b, _c;
692
+ var _a, _b, _c, _d;
706
693
  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);
707
- const _response = yield core.fetcher({
708
- 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)}/assets`),
694
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
695
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/shares/${encodeURIComponent(shareId)}/assets`),
709
696
  method: "POST",
710
697
  headers: _headers,
711
698
  contentType: "application/json",
@@ -783,85 +770,75 @@ class Shares {
783
770
  * include_total_count: false
784
771
  * })
785
772
  */
786
- index(accountId_1, projectId_1) {
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
- const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
789
- var _a, _b, _c;
790
- const { after, page_size: pageSize, include_total_count: includeTotalCount } = request;
791
- const _queryParams = {};
792
- if (after != null) {
793
- _queryParams["after"] = after;
794
- }
795
- if (pageSize != null) {
796
- _queryParams["page_size"] = pageSize.toString();
797
- }
798
- if (includeTotalCount != null) {
799
- _queryParams["include_total_count"] = includeTotalCount.toString();
800
- }
801
- 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);
802
- const _response = yield core.fetcher({
803
- 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`),
804
- method: "GET",
805
- headers: _headers,
806
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
807
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
808
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
809
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
810
- });
811
- if (_response.ok) {
812
- return { data: _response.body, rawResponse: _response.rawResponse };
813
- }
814
- if (_response.error.reason === "status-code") {
815
- switch (_response.error.statusCode) {
816
- case 400:
817
- throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
818
- case 401:
819
- throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
820
- case 403:
821
- throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
822
- case 404:
823
- throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
824
- case 409:
825
- throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
826
- case 422:
827
- throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
828
- case 429:
829
- throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
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, _d;
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 ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
792
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : 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.rawBody,
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
- const dataWithRawResponse = yield list(request).withRawResponse();
855
- return new core.Pageable({
856
- response: dataWithRawResponse.data,
857
- rawResponse: dataWithRawResponse.rawResponse,
858
- hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null &&
859
- !(typeof (response === null || response === void 0 ? void 0 : response.links.next) === "string" && (response === null || response === void 0 ? void 0 : response.links.next) === ""),
860
- getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
861
- loadPage: (response) => {
862
- return list(core.setObjectProperty(request, "after", response === null || response === void 0 ? void 0 : response.links.next));
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
  /**
@@ -898,10 +875,10 @@ class Shares {
898
875
  }
899
876
  __create(accountId, projectId, request, requestOptions) {
900
877
  return __awaiter(this, void 0, void 0, function* () {
901
- var _a, _b, _c;
878
+ var _a, _b, _c, _d;
902
879
  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);
903
- const _response = yield core.fetcher({
904
- 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`),
880
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
881
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/projects/${encodeURIComponent(projectId)}/shares`),
905
882
  method: "POST",
906
883
  headers: _headers,
907
884
  contentType: "application/json",
@@ -9,6 +9,7 @@ export declare namespace Users {
9
9
  token: core.Supplier<core.BearerToken>;
10
10
  /** Additional headers to include in requests. */
11
11
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
12
+ fetcher?: core.FetchFunction;
12
13
  }
13
14
  interface RequestOptions {
14
15
  /** The maximum time to wait for a response in seconds. */
@@ -77,10 +77,10 @@ class Users {
77
77
  }
78
78
  __show(requestOptions) {
79
79
  return __awaiter(this, void 0, void 0, function* () {
80
- var _a, _b, _c;
80
+ var _a, _b, _c, _d;
81
81
  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);
82
- const _response = yield core.fetcher({
83
- 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/me"),
82
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
83
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, "v4/me"),
84
84
  method: "GET",
85
85
  headers: _headers,
86
86
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -9,6 +9,7 @@ export declare namespace VersionStacks {
9
9
  token: core.Supplier<core.BearerToken>;
10
10
  /** Additional headers to include in requests. */
11
11
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
12
+ fetcher?: core.FetchFunction;
12
13
  }
13
14
  interface RequestOptions {
14
15
  /** The maximum time to wait for a response in seconds. */
@@ -108,7 +108,7 @@ class VersionStacks {
108
108
  }
109
109
  __index(accountId_1, versionStackId_1) {
110
110
  return __awaiter(this, arguments, void 0, function* (accountId, versionStackId, request = {}, requestOptions) {
111
- var _a, _b, _c;
111
+ var _a, _b, _c, _d;
112
112
  const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
113
113
  const _queryParams = {};
114
114
  if (include != null) {
@@ -124,8 +124,8 @@ class VersionStacks {
124
124
  _queryParams["include_total_count"] = includeTotalCount.toString();
125
125
  }
126
126
  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);
127
- const _response = yield core.fetcher({
128
- 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)}/version_stacks/${encodeURIComponent(versionStackId)}/children`),
127
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
128
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/version_stacks/${encodeURIComponent(versionStackId)}/children`),
129
129
  method: "GET",
130
130
  headers: _headers,
131
131
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -206,15 +206,15 @@ class VersionStacks {
206
206
  }
207
207
  __show(accountId_1, versionStackId_1) {
208
208
  return __awaiter(this, arguments, void 0, function* (accountId, versionStackId, request = {}, requestOptions) {
209
- var _a, _b, _c;
209
+ var _a, _b, _c, _d;
210
210
  const { include } = request;
211
211
  const _queryParams = {};
212
212
  if (include != null) {
213
213
  _queryParams["include"] = include;
214
214
  }
215
215
  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);
216
- const _response = yield core.fetcher({
217
- 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)}/version_stacks/${encodeURIComponent(versionStackId)}`),
216
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
217
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/version_stacks/${encodeURIComponent(versionStackId)}`),
218
218
  method: "GET",
219
219
  headers: _headers,
220
220
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -298,15 +298,15 @@ class VersionStacks {
298
298
  }
299
299
  __copy(accountId_1, versionStackId_1) {
300
300
  return __awaiter(this, arguments, void 0, function* (accountId, versionStackId, request = {}, requestOptions) {
301
- var _a, _b, _c;
301
+ var _a, _b, _c, _d;
302
302
  const { copy_metadata: copyMetadata } = request, _body = __rest(request, ["copy_metadata"]);
303
303
  const _queryParams = {};
304
304
  if (copyMetadata != null) {
305
305
  _queryParams["copy_metadata"] = copyMetadata.toString();
306
306
  }
307
307
  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);
308
- const _response = yield core.fetcher({
309
- 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)}/version_stacks/${encodeURIComponent(versionStackId)}/copy`),
308
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
309
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/version_stacks/${encodeURIComponent(versionStackId)}/copy`),
310
310
  method: "POST",
311
311
  headers: _headers,
312
312
  contentType: "application/json",
@@ -390,7 +390,7 @@ class VersionStacks {
390
390
  }
391
391
  __list(accountId_1, folderId_1) {
392
392
  return __awaiter(this, arguments, void 0, function* (accountId, folderId, request = {}, requestOptions) {
393
- var _a, _b, _c;
393
+ var _a, _b, _c, _d;
394
394
  const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
395
395
  const _queryParams = {};
396
396
  if (include != null) {
@@ -406,8 +406,8 @@ class VersionStacks {
406
406
  _queryParams["include_total_count"] = includeTotalCount.toString();
407
407
  }
408
408
  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);
409
- const _response = yield core.fetcher({
410
- 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)}/folders/${encodeURIComponent(folderId)}/version_stacks`),
409
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
410
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/version_stacks`),
411
411
  method: "GET",
412
412
  headers: _headers,
413
413
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -490,10 +490,10 @@ class VersionStacks {
490
490
  }
491
491
  __create(accountId, folderId, request, requestOptions) {
492
492
  return __awaiter(this, void 0, void 0, function* () {
493
- var _a, _b, _c;
493
+ var _a, _b, _c, _d;
494
494
  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);
495
- const _response = yield core.fetcher({
496
- 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)}/folders/${encodeURIComponent(folderId)}/version_stacks`),
495
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
496
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/version_stacks`),
497
497
  method: "POST",
498
498
  headers: _headers,
499
499
  contentType: "application/json",
@@ -579,10 +579,10 @@ class VersionStacks {
579
579
  }
580
580
  __move(accountId, versionStackId, request, requestOptions) {
581
581
  return __awaiter(this, void 0, void 0, function* () {
582
- var _a, _b, _c;
582
+ var _a, _b, _c, _d;
583
583
  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);
584
- const _response = yield core.fetcher({
585
- 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)}/version_stacks/${encodeURIComponent(versionStackId)}/move`),
584
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
585
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/version_stacks/${encodeURIComponent(versionStackId)}/move`),
586
586
  method: "PATCH",
587
587
  headers: _headers,
588
588
  contentType: "application/json",
@@ -9,6 +9,7 @@ export declare namespace Webhooks {
9
9
  token: core.Supplier<core.BearerToken>;
10
10
  /** Additional headers to include in requests. */
11
11
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
12
+ fetcher?: core.FetchFunction;
12
13
  }
13
14
  interface RequestOptions {
14
15
  /** The maximum time to wait for a response in seconds. */
@@ -53,7 +54,8 @@ export declare class Webhooks {
53
54
  * include_total_count: false
54
55
  * })
55
56
  */
56
- index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.WebhooksIndexRequest, requestOptions?: Webhooks.RequestOptions): Promise<core.Page<Frameio.WebhookWithIncludes>>;
57
+ index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.WebhooksIndexRequest, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise<Frameio.WebhooksWithIncludesResponse>;
58
+ private __index;
57
59
  /**
58
60
  * Creates a single webhook with secret.<br/><br/>Valid events:<p><code>
59
61
  * 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