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
@@ -43,10 +43,10 @@ export class Shares {
43
43
  }
44
44
  __show(accountId, shareId, requestOptions) {
45
45
  return __awaiter(this, void 0, void 0, function* () {
46
- var _a, _b, _c;
46
+ var _a, _b, _c, _d;
47
47
  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);
48
- const _response = yield core.fetcher({
49
- 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)}`),
48
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
49
+ 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)}`),
50
50
  method: "GET",
51
51
  headers: _headers,
52
52
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -121,10 +121,10 @@ export class Shares {
121
121
  }
122
122
  __delete(accountId, shareId, requestOptions) {
123
123
  return __awaiter(this, void 0, void 0, function* () {
124
- var _a, _b, _c;
124
+ var _a, _b, _c, _d;
125
125
  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);
126
- const _response = yield core.fetcher({
127
- 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)}`),
126
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
127
+ 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)}`),
128
128
  method: "DELETE",
129
129
  headers: _headers,
130
130
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -209,10 +209,10 @@ export class Shares {
209
209
  }
210
210
  __update(accountId, shareId, request, requestOptions) {
211
211
  return __awaiter(this, void 0, void 0, function* () {
212
- var _a, _b, _c;
212
+ var _a, _b, _c, _d;
213
213
  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);
214
- const _response = yield core.fetcher({
215
- 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)}`),
214
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
215
+ 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)}`),
216
216
  method: "PATCH",
217
217
  headers: _headers,
218
218
  contentType: "application/json",
@@ -290,88 +290,75 @@ export class Shares {
290
290
  * include_total_count: false
291
291
  * })
292
292
  */
293
- listReviewers(accountId_1, shareId_1) {
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
- const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
296
- var _a, _b, _c;
297
- const { after, page_size: pageSize, include_total_count: includeTotalCount } = request;
298
- const _queryParams = {};
299
- if (after != null) {
300
- _queryParams["after"] = after;
301
- }
302
- if (pageSize != null) {
303
- _queryParams["page_size"] = pageSize.toString();
304
- }
305
- if (includeTotalCount != null) {
306
- _queryParams["include_total_count"] = includeTotalCount.toString();
307
- }
308
- 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);
309
- const _response = yield core.fetcher({
310
- 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`),
311
- method: "GET",
312
- headers: _headers,
313
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
314
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
315
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
316
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
317
- });
318
- if (_response.ok) {
319
- return {
320
- data: _response.body,
321
- rawResponse: _response.rawResponse,
322
- };
323
- }
324
- if (_response.error.reason === "status-code") {
325
- switch (_response.error.statusCode) {
326
- case 400:
327
- throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
328
- case 401:
329
- throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
330
- case 403:
331
- throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
332
- case 404:
333
- throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
334
- case 409:
335
- throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
336
- case 422:
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, _d;
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 ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
312
+ 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`),
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.rawBody,
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
- const dataWithRawResponse = yield list(request).withRawResponse();
365
- return new core.Pageable({
366
- response: dataWithRawResponse.data,
367
- rawResponse: dataWithRawResponse.rawResponse,
368
- hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null &&
369
- !(typeof (response === null || response === void 0 ? void 0 : response.links.next) === "string" && (response === null || response === void 0 ? void 0 : response.links.next) === ""),
370
- getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
371
- loadPage: (response) => {
372
- return list(core.setObjectProperty(request, "after", response === null || response === void 0 ? void 0 : response.links.next));
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
  /**
@@ -410,10 +397,10 @@ export class Shares {
410
397
  }
411
398
  __addReviewers(accountId, shareId, request, requestOptions) {
412
399
  return __awaiter(this, void 0, void 0, function* () {
413
- var _a, _b, _c;
400
+ var _a, _b, _c, _d;
414
401
  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);
415
- const _response = yield core.fetcher({
416
- 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`),
402
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
403
+ 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`),
417
404
  method: "POST",
418
405
  headers: _headers,
419
406
  contentType: "application/json",
@@ -501,10 +488,10 @@ export class Shares {
501
488
  }
502
489
  __removeReviewers(accountId, shareId, request, requestOptions) {
503
490
  return __awaiter(this, void 0, void 0, function* () {
504
- var _a, _b, _c;
491
+ var _a, _b, _c, _d;
505
492
  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);
506
- const _response = yield core.fetcher({
507
- 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`),
493
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
494
+ 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`),
508
495
  method: "DELETE",
509
496
  headers: _headers,
510
497
  contentType: "application/json",
@@ -583,10 +570,10 @@ export class Shares {
583
570
  }
584
571
  __removeAsset(accountId, shareId, assetId, requestOptions) {
585
572
  return __awaiter(this, void 0, void 0, function* () {
586
- var _a, _b, _c;
573
+ var _a, _b, _c, _d;
587
574
  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);
588
- const _response = yield core.fetcher({
589
- 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)}`),
575
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
576
+ 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)}`),
590
577
  method: "DELETE",
591
578
  headers: _headers,
592
579
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -666,10 +653,10 @@ export class Shares {
666
653
  }
667
654
  __addAsset(accountId, shareId, request, requestOptions) {
668
655
  return __awaiter(this, void 0, void 0, function* () {
669
- var _a, _b, _c;
656
+ var _a, _b, _c, _d;
670
657
  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);
671
- const _response = yield core.fetcher({
672
- 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`),
658
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
659
+ 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`),
673
660
  method: "POST",
674
661
  headers: _headers,
675
662
  contentType: "application/json",
@@ -747,85 +734,75 @@ export class Shares {
747
734
  * include_total_count: false
748
735
  * })
749
736
  */
750
- index(accountId_1, projectId_1) {
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
- const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
753
- var _a, _b, _c;
754
- const { after, page_size: pageSize, include_total_count: includeTotalCount } = request;
755
- const _queryParams = {};
756
- if (after != null) {
757
- _queryParams["after"] = after;
758
- }
759
- if (pageSize != null) {
760
- _queryParams["page_size"] = pageSize.toString();
761
- }
762
- if (includeTotalCount != null) {
763
- _queryParams["include_total_count"] = includeTotalCount.toString();
764
- }
765
- 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);
766
- const _response = yield core.fetcher({
767
- 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`),
768
- method: "GET",
769
- headers: _headers,
770
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
771
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
772
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
773
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
774
- });
775
- if (_response.ok) {
776
- return { data: _response.body, rawResponse: _response.rawResponse };
777
- }
778
- if (_response.error.reason === "status-code") {
779
- switch (_response.error.statusCode) {
780
- case 400:
781
- throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
782
- case 401:
783
- throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
784
- case 403:
785
- throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
786
- case 404:
787
- throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
788
- case 409:
789
- throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
790
- case 422:
791
- throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
792
- case 429:
793
- throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
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, _d;
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 ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
756
+ 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`),
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.rawBody,
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
- const dataWithRawResponse = yield list(request).withRawResponse();
819
- return new core.Pageable({
820
- response: dataWithRawResponse.data,
821
- rawResponse: dataWithRawResponse.rawResponse,
822
- hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null &&
823
- !(typeof (response === null || response === void 0 ? void 0 : response.links.next) === "string" && (response === null || response === void 0 ? void 0 : response.links.next) === ""),
824
- getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
825
- loadPage: (response) => {
826
- return list(core.setObjectProperty(request, "after", response === null || response === void 0 ? void 0 : response.links.next));
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
  /**
@@ -862,10 +839,10 @@ export class Shares {
862
839
  }
863
840
  __create(accountId, projectId, request, requestOptions) {
864
841
  return __awaiter(this, void 0, void 0, function* () {
865
- var _a, _b, _c;
842
+ var _a, _b, _c, _d;
866
843
  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);
867
- const _response = yield core.fetcher({
868
- 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`),
844
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
845
+ 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`),
869
846
  method: "POST",
870
847
  headers: _headers,
871
848
  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. */
@@ -41,10 +41,10 @@ export class Users {
41
41
  }
42
42
  __show(requestOptions) {
43
43
  return __awaiter(this, void 0, void 0, function* () {
44
- var _a, _b, _c;
44
+ var _a, _b, _c, _d;
45
45
  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);
46
- const _response = yield core.fetcher({
47
- 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"),
46
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
47
+ 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"),
48
48
  method: "GET",
49
49
  headers: _headers,
50
50
  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. */
@@ -72,7 +72,7 @@ export class VersionStacks {
72
72
  }
73
73
  __index(accountId_1, versionStackId_1) {
74
74
  return __awaiter(this, arguments, void 0, function* (accountId, versionStackId, request = {}, requestOptions) {
75
- var _a, _b, _c;
75
+ var _a, _b, _c, _d;
76
76
  const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
77
77
  const _queryParams = {};
78
78
  if (include != null) {
@@ -88,8 +88,8 @@ export class VersionStacks {
88
88
  _queryParams["include_total_count"] = includeTotalCount.toString();
89
89
  }
90
90
  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);
91
- const _response = yield core.fetcher({
92
- 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`),
91
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
92
+ 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`),
93
93
  method: "GET",
94
94
  headers: _headers,
95
95
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -170,15 +170,15 @@ export class VersionStacks {
170
170
  }
171
171
  __show(accountId_1, versionStackId_1) {
172
172
  return __awaiter(this, arguments, void 0, function* (accountId, versionStackId, request = {}, requestOptions) {
173
- var _a, _b, _c;
173
+ var _a, _b, _c, _d;
174
174
  const { include } = request;
175
175
  const _queryParams = {};
176
176
  if (include != null) {
177
177
  _queryParams["include"] = include;
178
178
  }
179
179
  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);
180
- const _response = yield core.fetcher({
181
- 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)}`),
180
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
181
+ 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)}`),
182
182
  method: "GET",
183
183
  headers: _headers,
184
184
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -262,15 +262,15 @@ export class VersionStacks {
262
262
  }
263
263
  __copy(accountId_1, versionStackId_1) {
264
264
  return __awaiter(this, arguments, void 0, function* (accountId, versionStackId, request = {}, requestOptions) {
265
- var _a, _b, _c;
265
+ var _a, _b, _c, _d;
266
266
  const { copy_metadata: copyMetadata } = request, _body = __rest(request, ["copy_metadata"]);
267
267
  const _queryParams = {};
268
268
  if (copyMetadata != null) {
269
269
  _queryParams["copy_metadata"] = copyMetadata.toString();
270
270
  }
271
271
  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);
272
- const _response = yield core.fetcher({
273
- 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`),
272
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
273
+ 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`),
274
274
  method: "POST",
275
275
  headers: _headers,
276
276
  contentType: "application/json",
@@ -354,7 +354,7 @@ export class VersionStacks {
354
354
  }
355
355
  __list(accountId_1, folderId_1) {
356
356
  return __awaiter(this, arguments, void 0, function* (accountId, folderId, request = {}, requestOptions) {
357
- var _a, _b, _c;
357
+ var _a, _b, _c, _d;
358
358
  const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
359
359
  const _queryParams = {};
360
360
  if (include != null) {
@@ -370,8 +370,8 @@ export class VersionStacks {
370
370
  _queryParams["include_total_count"] = includeTotalCount.toString();
371
371
  }
372
372
  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);
373
- const _response = yield core.fetcher({
374
- 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`),
373
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
374
+ 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`),
375
375
  method: "GET",
376
376
  headers: _headers,
377
377
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -454,10 +454,10 @@ export class VersionStacks {
454
454
  }
455
455
  __create(accountId, folderId, request, requestOptions) {
456
456
  return __awaiter(this, void 0, void 0, function* () {
457
- var _a, _b, _c;
457
+ var _a, _b, _c, _d;
458
458
  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);
459
- const _response = yield core.fetcher({
460
- 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`),
459
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
460
+ 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`),
461
461
  method: "POST",
462
462
  headers: _headers,
463
463
  contentType: "application/json",
@@ -543,10 +543,10 @@ export class VersionStacks {
543
543
  }
544
544
  __move(accountId, versionStackId, request, requestOptions) {
545
545
  return __awaiter(this, void 0, void 0, function* () {
546
- var _a, _b, _c;
546
+ var _a, _b, _c, _d;
547
547
  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);
548
- const _response = yield core.fetcher({
549
- 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`),
548
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
549
+ 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`),
550
550
  method: "PATCH",
551
551
  headers: _headers,
552
552
  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