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
@@ -97,10 +97,10 @@ class Metadata {
97
97
  }
98
98
  __bulkUpdate(accountId, projectId, request, requestOptions) {
99
99
  return __awaiter(this, void 0, void 0, function* () {
100
- var _a, _b, _c;
100
+ var _a, _b, _c, _d;
101
101
  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);
102
- const _response = yield core.fetcher({
103
- 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)}/metadata/values`),
102
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
103
+ 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)}/metadata/values`),
104
104
  method: "PATCH",
105
105
  headers: _headers,
106
106
  contentType: "application/json",
@@ -181,15 +181,15 @@ class Metadata {
181
181
  }
182
182
  __show(accountId_1, fileId_1) {
183
183
  return __awaiter(this, arguments, void 0, function* (accountId, fileId, request = {}, requestOptions) {
184
- var _a, _b, _c;
184
+ var _a, _b, _c, _d;
185
185
  const { show_null: showNull } = request;
186
186
  const _queryParams = {};
187
187
  if (showNull != null) {
188
188
  _queryParams["show_null"] = showNull.toString();
189
189
  }
190
190
  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);
191
- const _response = yield core.fetcher({
192
- 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)}/files/${encodeURIComponent(fileId)}/metadata`),
191
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
192
+ 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)}/files/${encodeURIComponent(fileId)}/metadata`),
193
193
  method: "GET",
194
194
  headers: _headers,
195
195
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -9,6 +9,7 @@ export declare namespace MetadataFields {
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. */
@@ -79,10 +79,10 @@ class MetadataFields {
79
79
  }
80
80
  __metadataFieldDefinitionsDelete(accountId, fieldDefinitionId, 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)}/metadata/field_definitions/${encodeURIComponent(fieldDefinitionId)}`),
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)}/metadata/field_definitions/${encodeURIComponent(fieldDefinitionId)}`),
86
86
  method: "DELETE",
87
87
  headers: _headers,
88
88
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -171,10 +171,10 @@ class MetadataFields {
171
171
  }
172
172
  __metadataFieldDefinitionsUpdate(accountId_1, fieldDefinitionId_1) {
173
173
  return __awaiter(this, arguments, void 0, function* (accountId, fieldDefinitionId, request = {}, requestOptions) {
174
- var _a, _b, _c;
174
+ var _a, _b, _c, _d;
175
175
  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);
176
- const _response = yield core.fetcher({
177
- 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)}/metadata/field_definitions/${encodeURIComponent(fieldDefinitionId)}`),
176
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
177
+ 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)}/metadata/field_definitions/${encodeURIComponent(fieldDefinitionId)}`),
178
178
  method: "PATCH",
179
179
  headers: _headers,
180
180
  contentType: "application/json",
@@ -257,7 +257,7 @@ class MetadataFields {
257
257
  }
258
258
  __metadataFieldDefinitionsIndex(accountId_1) {
259
259
  return __awaiter(this, arguments, void 0, function* (accountId, request = {}, requestOptions) {
260
- var _a, _b, _c;
260
+ var _a, _b, _c, _d;
261
261
  const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
262
262
  const _queryParams = {};
263
263
  if (include != null) {
@@ -273,8 +273,8 @@ class MetadataFields {
273
273
  _queryParams["include_total_count"] = includeTotalCount.toString();
274
274
  }
275
275
  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);
276
- const _response = yield core.fetcher({
277
- 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)}/metadata/field_definitions`),
276
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
277
+ 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)}/metadata/field_definitions`),
278
278
  method: "GET",
279
279
  headers: _headers,
280
280
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -365,10 +365,10 @@ class MetadataFields {
365
365
  }
366
366
  __metadataFieldDefinitionsCreate(accountId_1) {
367
367
  return __awaiter(this, arguments, void 0, function* (accountId, request = {}, requestOptions) {
368
- var _a, _b, _c;
368
+ var _a, _b, _c, _d;
369
369
  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);
370
- const _response = yield core.fetcher({
371
- 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)}/metadata/field_definitions`),
370
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
371
+ 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)}/metadata/field_definitions`),
372
372
  method: "POST",
373
373
  headers: _headers,
374
374
  contentType: "application/json",
@@ -9,6 +9,7 @@ export declare namespace ProjectPermissions {
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 ProjectPermissions {
53
54
  * include_total_count: false
54
55
  * })
55
56
  */
56
- index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.ProjectPermissionsIndexRequest, requestOptions?: ProjectPermissions.RequestOptions): Promise<core.Page<Frameio.UserRole>>;
57
+ index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.ProjectPermissionsIndexRequest, requestOptions?: ProjectPermissions.RequestOptions): core.HttpResponsePromise<Frameio.ProjectUserRolesResponse>;
58
+ private __index;
57
59
  /**
58
60
  * Remove a user from a given project. <br>Rate Limits: 60 calls per 1.00 minute(s) per account_user
59
61
  *
@@ -80,91 +80,78 @@ class ProjectPermissions {
80
80
  * include_total_count: false
81
81
  * })
82
82
  */
83
- index(accountId_1, projectId_1) {
83
+ index(accountId, projectId, request = {}, requestOptions) {
84
+ return core.HttpResponsePromise.fromPromise(this.__index(accountId, projectId, request, requestOptions));
85
+ }
86
+ __index(accountId_1, projectId_1) {
84
87
  return __awaiter(this, arguments, void 0, function* (accountId, projectId, request = {}, requestOptions) {
85
- const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
86
- var _a, _b, _c;
87
- const { include_deactivated: includeDeactivated, after, page_size: pageSize, include_total_count: includeTotalCount, } = request;
88
- const _queryParams = {};
89
- if (includeDeactivated != null) {
90
- _queryParams["include_deactivated"] = includeDeactivated.toString();
91
- }
92
- if (after != null) {
93
- _queryParams["after"] = after;
94
- }
95
- if (pageSize != null) {
96
- _queryParams["page_size"] = pageSize.toString();
97
- }
98
- if (includeTotalCount != null) {
99
- _queryParams["include_total_count"] = includeTotalCount.toString();
100
- }
101
- 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);
102
- const _response = yield core.fetcher({
103
- 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)}/users`),
104
- method: "GET",
105
- headers: _headers,
106
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
107
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
108
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
109
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
110
- });
111
- if (_response.ok) {
112
- return {
113
- data: _response.body,
114
- rawResponse: _response.rawResponse,
115
- };
116
- }
117
- if (_response.error.reason === "status-code") {
118
- switch (_response.error.statusCode) {
119
- case 400:
120
- throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
121
- case 401:
122
- throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
123
- case 403:
124
- throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
125
- case 404:
126
- throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
127
- case 409:
128
- throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
129
- case 422:
130
- throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
131
- case 429:
132
- throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
133
- default:
134
- throw new errors.FrameioError({
135
- statusCode: _response.error.statusCode,
136
- body: _response.error.body,
137
- rawResponse: _response.rawResponse,
138
- });
139
- }
140
- }
141
- switch (_response.error.reason) {
142
- case "non-json":
88
+ var _a, _b, _c, _d;
89
+ const { include_deactivated: includeDeactivated, after, page_size: pageSize, include_total_count: includeTotalCount, } = request;
90
+ const _queryParams = {};
91
+ if (includeDeactivated != null) {
92
+ _queryParams["include_deactivated"] = includeDeactivated.toString();
93
+ }
94
+ if (after != null) {
95
+ _queryParams["after"] = after;
96
+ }
97
+ if (pageSize != null) {
98
+ _queryParams["page_size"] = pageSize.toString();
99
+ }
100
+ if (includeTotalCount != null) {
101
+ _queryParams["include_total_count"] = includeTotalCount.toString();
102
+ }
103
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
104
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
105
+ 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)}/users`),
106
+ method: "GET",
107
+ headers: _headers,
108
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
109
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
110
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
111
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
112
+ });
113
+ if (_response.ok) {
114
+ return { data: _response.body, rawResponse: _response.rawResponse };
115
+ }
116
+ if (_response.error.reason === "status-code") {
117
+ switch (_response.error.statusCode) {
118
+ case 400:
119
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
120
+ case 401:
121
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
122
+ case 403:
123
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
124
+ case 404:
125
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
126
+ case 409:
127
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
128
+ case 422:
129
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
130
+ case 429:
131
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
132
+ default:
143
133
  throw new errors.FrameioError({
144
134
  statusCode: _response.error.statusCode,
145
- body: _response.error.rawBody,
146
- rawResponse: _response.rawResponse,
147
- });
148
- case "timeout":
149
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/projects/{project_id}/users.");
150
- case "unknown":
151
- throw new errors.FrameioError({
152
- message: _response.error.errorMessage,
135
+ body: _response.error.body,
153
136
  rawResponse: _response.rawResponse,
154
137
  });
155
138
  }
156
- }));
157
- const dataWithRawResponse = yield list(request).withRawResponse();
158
- return new core.Pageable({
159
- response: dataWithRawResponse.data,
160
- rawResponse: dataWithRawResponse.rawResponse,
161
- hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null &&
162
- !(typeof (response === null || response === void 0 ? void 0 : response.links.next) === "string" && (response === null || response === void 0 ? void 0 : response.links.next) === ""),
163
- getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
164
- loadPage: (response) => {
165
- return list(core.setObjectProperty(request, "after", response === null || response === void 0 ? void 0 : response.links.next));
166
- },
167
- });
139
+ }
140
+ switch (_response.error.reason) {
141
+ case "non-json":
142
+ throw new errors.FrameioError({
143
+ statusCode: _response.error.statusCode,
144
+ body: _response.error.rawBody,
145
+ rawResponse: _response.rawResponse,
146
+ });
147
+ case "timeout":
148
+ throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/projects/{project_id}/users.");
149
+ case "unknown":
150
+ throw new errors.FrameioError({
151
+ message: _response.error.errorMessage,
152
+ rawResponse: _response.rawResponse,
153
+ });
154
+ }
168
155
  });
169
156
  }
170
157
  /**
@@ -191,10 +178,10 @@ class ProjectPermissions {
191
178
  }
192
179
  __delete(accountId, projectId, userId, requestOptions) {
193
180
  return __awaiter(this, void 0, void 0, function* () {
194
- var _a, _b, _c;
181
+ var _a, _b, _c, _d;
195
182
  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);
196
- const _response = yield core.fetcher({
197
- 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)}/users/${encodeURIComponent(userId)}`),
183
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
184
+ 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)}/users/${encodeURIComponent(userId)}`),
198
185
  method: "DELETE",
199
186
  headers: _headers,
200
187
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -276,10 +263,10 @@ class ProjectPermissions {
276
263
  }
277
264
  __projectUserRolesUpdate(accountId, projectId, userId, request, requestOptions) {
278
265
  return __awaiter(this, void 0, void 0, function* () {
279
- var _a, _b, _c;
266
+ var _a, _b, _c, _d;
280
267
  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);
281
- const _response = yield core.fetcher({
282
- 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)}/users/${encodeURIComponent(userId)}`),
268
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
269
+ 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)}/users/${encodeURIComponent(userId)}`),
283
270
  method: "PATCH",
284
271
  headers: _headers,
285
272
  contentType: "application/json",
@@ -9,6 +9,7 @@ export declare namespace Projects {
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. */
@@ -123,7 +124,8 @@ export declare class Projects {
123
124
  * include_total_count: false
124
125
  * })
125
126
  */
126
- index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.ProjectsIndexRequest, requestOptions?: Projects.RequestOptions): Promise<core.Page<Frameio.ProjectWithIncludes>>;
127
+ index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.ProjectsIndexRequest, requestOptions?: Projects.RequestOptions): core.HttpResponsePromise<Frameio.ProjectsWithIncludesResponse>;
128
+ private __index;
127
129
  /**
128
130
  * Create project in a given workspace. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user
129
131
  *
@@ -82,15 +82,15 @@ class Projects {
82
82
  }
83
83
  __show(accountId_1, projectId_1) {
84
84
  return __awaiter(this, arguments, void 0, function* (accountId, projectId, request = {}, requestOptions) {
85
- var _a, _b, _c;
85
+ var _a, _b, _c, _d;
86
86
  const { include } = request;
87
87
  const _queryParams = {};
88
88
  if (include != null) {
89
89
  _queryParams["include"] = include;
90
90
  }
91
91
  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);
92
- const _response = yield core.fetcher({
93
- 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)}`),
92
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
93
+ 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)}`),
94
94
  method: "GET",
95
95
  headers: _headers,
96
96
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -165,10 +165,10 @@ class Projects {
165
165
  }
166
166
  __delete(accountId, projectId, requestOptions) {
167
167
  return __awaiter(this, void 0, void 0, function* () {
168
- var _a, _b, _c;
168
+ var _a, _b, _c, _d;
169
169
  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);
170
- const _response = yield core.fetcher({
171
- 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)}`),
170
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
171
+ 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)}`),
172
172
  method: "DELETE",
173
173
  headers: _headers,
174
174
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -250,10 +250,10 @@ class Projects {
250
250
  }
251
251
  __update(accountId, projectId, request, requestOptions) {
252
252
  return __awaiter(this, void 0, void 0, function* () {
253
- var _a, _b, _c;
253
+ var _a, _b, _c, _d;
254
254
  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);
255
- const _response = yield core.fetcher({
256
- 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)}`),
255
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
256
+ 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)}`),
257
257
  method: "PATCH",
258
258
  headers: _headers,
259
259
  contentType: "application/json",
@@ -332,91 +332,78 @@ class Projects {
332
332
  * include_total_count: false
333
333
  * })
334
334
  */
335
- index(accountId_1, workspaceId_1) {
335
+ index(accountId, workspaceId, request = {}, requestOptions) {
336
+ return core.HttpResponsePromise.fromPromise(this.__index(accountId, workspaceId, request, requestOptions));
337
+ }
338
+ __index(accountId_1, workspaceId_1) {
336
339
  return __awaiter(this, arguments, void 0, function* (accountId, workspaceId, request = {}, requestOptions) {
337
- const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
338
- var _a, _b, _c;
339
- const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
340
- const _queryParams = {};
341
- if (include != null) {
342
- _queryParams["include"] = include;
343
- }
344
- if (after != null) {
345
- _queryParams["after"] = after;
346
- }
347
- if (pageSize != null) {
348
- _queryParams["page_size"] = pageSize.toString();
349
- }
350
- if (includeTotalCount != null) {
351
- _queryParams["include_total_count"] = includeTotalCount.toString();
352
- }
353
- 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);
354
- const _response = yield core.fetcher({
355
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/workspaces/${encodeURIComponent(workspaceId)}/projects`),
356
- method: "GET",
357
- headers: _headers,
358
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
359
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
360
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
361
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
362
- });
363
- if (_response.ok) {
364
- return {
365
- data: _response.body,
366
- rawResponse: _response.rawResponse,
367
- };
368
- }
369
- if (_response.error.reason === "status-code") {
370
- switch (_response.error.statusCode) {
371
- case 400:
372
- throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
373
- case 401:
374
- throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
375
- case 403:
376
- throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
377
- case 404:
378
- throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
379
- case 409:
380
- throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
381
- case 422:
382
- throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
383
- case 429:
384
- throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
385
- default:
386
- throw new errors.FrameioError({
387
- statusCode: _response.error.statusCode,
388
- body: _response.error.body,
389
- rawResponse: _response.rawResponse,
390
- });
391
- }
392
- }
393
- switch (_response.error.reason) {
394
- case "non-json":
340
+ var _a, _b, _c, _d;
341
+ const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
342
+ const _queryParams = {};
343
+ if (include != null) {
344
+ _queryParams["include"] = include;
345
+ }
346
+ if (after != null) {
347
+ _queryParams["after"] = after;
348
+ }
349
+ if (pageSize != null) {
350
+ _queryParams["page_size"] = pageSize.toString();
351
+ }
352
+ if (includeTotalCount != null) {
353
+ _queryParams["include_total_count"] = includeTotalCount.toString();
354
+ }
355
+ 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);
356
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
357
+ 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)}/workspaces/${encodeURIComponent(workspaceId)}/projects`),
358
+ method: "GET",
359
+ headers: _headers,
360
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
361
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
362
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
363
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
364
+ });
365
+ if (_response.ok) {
366
+ return { data: _response.body, rawResponse: _response.rawResponse };
367
+ }
368
+ if (_response.error.reason === "status-code") {
369
+ switch (_response.error.statusCode) {
370
+ case 400:
371
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
372
+ case 401:
373
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
374
+ case 403:
375
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
376
+ case 404:
377
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
378
+ case 409:
379
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
380
+ case 422:
381
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
382
+ case 429:
383
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
384
+ default:
395
385
  throw new errors.FrameioError({
396
386
  statusCode: _response.error.statusCode,
397
- body: _response.error.rawBody,
398
- rawResponse: _response.rawResponse,
399
- });
400
- case "timeout":
401
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/projects.");
402
- case "unknown":
403
- throw new errors.FrameioError({
404
- message: _response.error.errorMessage,
387
+ body: _response.error.body,
405
388
  rawResponse: _response.rawResponse,
406
389
  });
407
390
  }
408
- }));
409
- const dataWithRawResponse = yield list(request).withRawResponse();
410
- return new core.Pageable({
411
- response: dataWithRawResponse.data,
412
- rawResponse: dataWithRawResponse.rawResponse,
413
- hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null &&
414
- !(typeof (response === null || response === void 0 ? void 0 : response.links.next) === "string" && (response === null || response === void 0 ? void 0 : response.links.next) === ""),
415
- getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
416
- loadPage: (response) => {
417
- return list(core.setObjectProperty(request, "after", response === null || response === void 0 ? void 0 : response.links.next));
418
- },
419
- });
391
+ }
392
+ switch (_response.error.reason) {
393
+ case "non-json":
394
+ throw new errors.FrameioError({
395
+ statusCode: _response.error.statusCode,
396
+ body: _response.error.rawBody,
397
+ rawResponse: _response.rawResponse,
398
+ });
399
+ case "timeout":
400
+ throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/projects.");
401
+ case "unknown":
402
+ throw new errors.FrameioError({
403
+ message: _response.error.errorMessage,
404
+ rawResponse: _response.rawResponse,
405
+ });
406
+ }
420
407
  });
421
408
  }
422
409
  /**
@@ -448,10 +435,10 @@ class Projects {
448
435
  }
449
436
  __create(accountId, workspaceId, request, requestOptions) {
450
437
  return __awaiter(this, void 0, void 0, function* () {
451
- var _a, _b, _c;
438
+ var _a, _b, _c, _d;
452
439
  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);
453
- const _response = yield core.fetcher({
454
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/workspaces/${encodeURIComponent(workspaceId)}/projects`),
440
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
441
+ 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)}/workspaces/${encodeURIComponent(workspaceId)}/projects`),
455
442
  method: "POST",
456
443
  headers: _headers,
457
444
  contentType: "application/json",
@@ -9,6 +9,7 @@ export declare namespace Shares {
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. */
@@ -122,7 +123,8 @@ export declare class Shares {
122
123
  * include_total_count: false
123
124
  * })
124
125
  */
125
- listReviewers(accountId: Frameio.Uuid, shareId: Frameio.Uuid, request?: Frameio.SharesListReviewersRequest, requestOptions?: Shares.RequestOptions): Promise<core.Page<Frameio.User>>;
126
+ listReviewers(accountId: Frameio.Uuid, shareId: Frameio.Uuid, request?: Frameio.SharesListReviewersRequest, requestOptions?: Shares.RequestOptions): core.HttpResponsePromise<Frameio.ShareReviewersResponse>;
127
+ private __listReviewers;
126
128
  /**
127
129
  * Add reviewers to secure share by three identifier types: `adobe_user_id`, `email`, and `user_id`.
128
130
  * <br>
@@ -255,7 +257,8 @@ export declare class Shares {
255
257
  * include_total_count: false
256
258
  * })
257
259
  */
258
- index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.SharesIndexRequest, requestOptions?: Shares.RequestOptions): Promise<core.Page<Frameio.Share>>;
260
+ index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.SharesIndexRequest, requestOptions?: Shares.RequestOptions): core.HttpResponsePromise<Frameio.SharesResponse>;
261
+ private __index;
259
262
  /**
260
263
  * Create share. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user
261
264
  *