frameio 3.2.2 → 4.1.1

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 (119) hide show
  1. package/README.md +159 -4
  2. package/dist/cjs/BaseClient.d.ts +4 -0
  3. package/dist/cjs/BaseClient.js +4 -2
  4. package/dist/cjs/api/resources/accountPermissions/client/Client.js +6 -6
  5. package/dist/cjs/api/resources/accounts/client/Client.js +13 -13
  6. package/dist/cjs/api/resources/comments/client/Client.js +48 -48
  7. package/dist/cjs/api/resources/files/client/Client.js +77 -77
  8. package/dist/cjs/api/resources/folders/client/Client.js +56 -56
  9. package/dist/cjs/api/resources/metadata/client/Client.d.ts +4 -4
  10. package/dist/cjs/api/resources/metadata/client/Client.js +18 -18
  11. package/dist/cjs/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.ts +4 -4
  12. package/dist/cjs/api/resources/metadataFields/client/Client.js +28 -28
  13. package/dist/cjs/api/resources/projectPermissions/client/Client.js +20 -20
  14. package/dist/cjs/api/resources/projects/client/Client.js +34 -34
  15. package/dist/cjs/api/resources/shares/client/Client.d.ts +4 -4
  16. package/dist/cjs/api/resources/shares/client/Client.js +72 -72
  17. package/dist/cjs/api/resources/shares/client/requests/AddAssetParams.d.ts +1 -1
  18. package/dist/cjs/api/resources/shares/client/requests/CreateShareParams.d.ts +2 -2
  19. package/dist/cjs/api/resources/shares/client/requests/UpdateShareParams.d.ts +1 -1
  20. package/dist/cjs/api/resources/users/client/Client.js +7 -7
  21. package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +6 -2
  22. package/dist/cjs/api/resources/versionStacks/client/Client.js +48 -44
  23. package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.ts +1 -1
  24. package/dist/cjs/api/resources/webhooks/client/Client.js +34 -34
  25. package/dist/cjs/api/resources/workspacePermissions/client/Client.js +20 -20
  26. package/dist/cjs/api/resources/workspaces/client/Client.js +34 -34
  27. package/dist/cjs/api/types/Account.d.ts +0 -2
  28. package/dist/cjs/api/types/AuditLogwithIncludes.d.ts +4 -0
  29. package/dist/cjs/api/types/AuditLogwithIncludes.js +4 -0
  30. package/dist/cjs/api/types/Filters.d.ts +4 -0
  31. package/dist/cjs/api/types/Filters.js +4 -0
  32. package/dist/cjs/index.d.ts +4 -0
  33. package/dist/cjs/index.js +21 -1
  34. package/dist/cjs/oauth/BaseAuth.d.ts +66 -0
  35. package/dist/cjs/oauth/BaseAuth.js +113 -0
  36. package/dist/cjs/oauth/NativeAppAuth.d.ts +32 -0
  37. package/dist/cjs/oauth/NativeAppAuth.js +35 -0
  38. package/dist/cjs/oauth/SPAAuth.d.ts +38 -0
  39. package/dist/cjs/oauth/SPAAuth.js +96 -0
  40. package/dist/cjs/oauth/ServerToServerAuth.d.ts +17 -0
  41. package/dist/cjs/oauth/ServerToServerAuth.js +49 -0
  42. package/dist/cjs/oauth/TokenManager.d.ts +83 -0
  43. package/dist/cjs/oauth/TokenManager.js +174 -0
  44. package/dist/cjs/oauth/WebAppAuth.d.ts +29 -0
  45. package/dist/cjs/oauth/WebAppAuth.js +88 -0
  46. package/dist/cjs/oauth/errors.d.ts +41 -0
  47. package/dist/cjs/oauth/errors.js +83 -0
  48. package/dist/cjs/oauth/http.d.ts +70 -0
  49. package/dist/cjs/oauth/http.js +280 -0
  50. package/dist/cjs/oauth/index.d.ts +34 -0
  51. package/dist/cjs/oauth/index.js +47 -0
  52. package/dist/cjs/oauth/logger.d.ts +17 -0
  53. package/dist/cjs/oauth/logger.js +18 -0
  54. package/dist/cjs/oauth/pkce.d.ts +30 -0
  55. package/dist/cjs/oauth/pkce.js +102 -0
  56. package/dist/cjs/oauth/validation.d.ts +17 -0
  57. package/dist/cjs/oauth/validation.js +55 -0
  58. package/dist/cjs/version.d.ts +1 -1
  59. package/dist/cjs/version.js +1 -1
  60. package/dist/esm/BaseClient.d.mts +4 -0
  61. package/dist/esm/BaseClient.mjs +4 -2
  62. package/dist/esm/api/resources/accountPermissions/client/Client.mjs +7 -7
  63. package/dist/esm/api/resources/accounts/client/Client.mjs +13 -13
  64. package/dist/esm/api/resources/comments/client/Client.mjs +49 -49
  65. package/dist/esm/api/resources/files/client/Client.mjs +78 -78
  66. package/dist/esm/api/resources/folders/client/Client.mjs +57 -57
  67. package/dist/esm/api/resources/metadata/client/Client.d.mts +4 -4
  68. package/dist/esm/api/resources/metadata/client/Client.mjs +19 -19
  69. package/dist/esm/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.mts +4 -4
  70. package/dist/esm/api/resources/metadataFields/client/Client.mjs +29 -29
  71. package/dist/esm/api/resources/projectPermissions/client/Client.mjs +21 -21
  72. package/dist/esm/api/resources/projects/client/Client.mjs +35 -35
  73. package/dist/esm/api/resources/shares/client/Client.d.mts +4 -4
  74. package/dist/esm/api/resources/shares/client/Client.mjs +73 -73
  75. package/dist/esm/api/resources/shares/client/requests/AddAssetParams.d.mts +1 -1
  76. package/dist/esm/api/resources/shares/client/requests/CreateShareParams.d.mts +2 -2
  77. package/dist/esm/api/resources/shares/client/requests/UpdateShareParams.d.mts +1 -1
  78. package/dist/esm/api/resources/users/client/Client.mjs +8 -8
  79. package/dist/esm/api/resources/versionStacks/client/Client.d.mts +6 -2
  80. package/dist/esm/api/resources/versionStacks/client/Client.mjs +49 -45
  81. package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.mts +1 -1
  82. package/dist/esm/api/resources/webhooks/client/Client.mjs +35 -35
  83. package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +21 -21
  84. package/dist/esm/api/resources/workspaces/client/Client.mjs +35 -35
  85. package/dist/esm/api/types/Account.d.mts +0 -2
  86. package/dist/esm/api/types/AuditLogwithIncludes.d.mts +4 -0
  87. package/dist/esm/api/types/AuditLogwithIncludes.mjs +4 -0
  88. package/dist/esm/api/types/Filters.d.mts +4 -0
  89. package/dist/esm/api/types/Filters.mjs +4 -0
  90. package/dist/esm/index.d.mts +4 -0
  91. package/dist/esm/index.mjs +6 -0
  92. package/dist/esm/oauth/BaseAuth.d.mts +66 -0
  93. package/dist/esm/oauth/BaseAuth.mjs +109 -0
  94. package/dist/esm/oauth/NativeAppAuth.d.mts +32 -0
  95. package/dist/esm/oauth/NativeAppAuth.mjs +31 -0
  96. package/dist/esm/oauth/SPAAuth.d.mts +38 -0
  97. package/dist/esm/oauth/SPAAuth.mjs +92 -0
  98. package/dist/esm/oauth/ServerToServerAuth.d.mts +17 -0
  99. package/dist/esm/oauth/ServerToServerAuth.mjs +45 -0
  100. package/dist/esm/oauth/TokenManager.d.mts +83 -0
  101. package/dist/esm/oauth/TokenManager.mjs +170 -0
  102. package/dist/esm/oauth/WebAppAuth.d.mts +29 -0
  103. package/dist/esm/oauth/WebAppAuth.mjs +84 -0
  104. package/dist/esm/oauth/errors.d.mts +41 -0
  105. package/dist/esm/oauth/errors.mjs +72 -0
  106. package/dist/esm/oauth/http.d.mts +70 -0
  107. package/dist/esm/oauth/http.mjs +274 -0
  108. package/dist/esm/oauth/index.d.mts +34 -0
  109. package/dist/esm/oauth/index.mjs +30 -0
  110. package/dist/esm/oauth/logger.d.mts +17 -0
  111. package/dist/esm/oauth/logger.mjs +15 -0
  112. package/dist/esm/oauth/pkce.d.mts +30 -0
  113. package/dist/esm/oauth/pkce.mjs +98 -0
  114. package/dist/esm/oauth/validation.d.mts +17 -0
  115. package/dist/esm/oauth/validation.mjs +51 -0
  116. package/dist/esm/version.d.mts +1 -1
  117. package/dist/esm/version.mjs +1 -1
  118. package/package.json +1 -1
  119. package/reference.md +14 -10
@@ -99,7 +99,7 @@ class FilesClient {
99
99
  }
100
100
  __list(account_id_1, folder_id_1) {
101
101
  return __awaiter(this, arguments, void 0, function* (account_id, folder_id, request = {}, requestOptions) {
102
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
102
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
103
103
  const { include, sort, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
104
104
  const _queryParams = {
105
105
  include: include != null ? include : undefined,
@@ -109,16 +109,16 @@ class FilesClient {
109
109
  include_total_count: includeTotalCount,
110
110
  };
111
111
  const _authRequest = yield this._options.authProvider.getAuthRequest();
112
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
113
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
114
- 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/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files`),
112
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
113
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
114
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files`),
115
115
  method: "GET",
116
116
  headers: _headers,
117
117
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
118
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
119
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
118
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
119
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
120
120
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
121
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
121
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
122
122
  logging: this._options.logging,
123
123
  });
124
124
  if (_response.ok) {
@@ -186,21 +186,21 @@ class FilesClient {
186
186
  }
187
187
  __create(account_id, folder_id, request, requestOptions) {
188
188
  return __awaiter(this, void 0, void 0, function* () {
189
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
189
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
190
190
  const _authRequest = yield this._options.authProvider.getAuthRequest();
191
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
192
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
193
- 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/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files`),
191
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
192
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
193
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files`),
194
194
  method: "POST",
195
195
  headers: _headers,
196
196
  contentType: "application/json",
197
197
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
198
198
  requestType: "json",
199
199
  body: request,
200
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
201
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
200
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
201
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
202
202
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
203
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
203
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
204
204
  logging: this._options.logging,
205
205
  });
206
206
  if (_response.ok) {
@@ -271,22 +271,22 @@ class FilesClient {
271
271
  }
272
272
  __show(account_id_1, file_id_1) {
273
273
  return __awaiter(this, arguments, void 0, function* (account_id, file_id, request = {}, requestOptions) {
274
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
274
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
275
275
  const { include } = request;
276
276
  const _queryParams = {
277
277
  include: include != null ? include : undefined,
278
278
  };
279
279
  const _authRequest = yield this._options.authProvider.getAuthRequest();
280
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
281
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
282
- 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/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}`),
280
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
281
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
282
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}`),
283
283
  method: "GET",
284
284
  headers: _headers,
285
285
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
286
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
287
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
286
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
287
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
288
288
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
289
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
289
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
290
290
  logging: this._options.logging,
291
291
  });
292
292
  if (_response.ok) {
@@ -342,18 +342,18 @@ class FilesClient {
342
342
  }
343
343
  __delete(account_id, file_id, requestOptions) {
344
344
  return __awaiter(this, void 0, void 0, function* () {
345
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
345
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
346
346
  const _authRequest = yield this._options.authProvider.getAuthRequest();
347
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
348
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
349
- 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/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}`),
347
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
348
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
349
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}`),
350
350
  method: "DELETE",
351
351
  headers: _headers,
352
352
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
353
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
354
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
353
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
354
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
355
355
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
356
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
356
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
357
357
  logging: this._options.logging,
358
358
  });
359
359
  if (_response.ok) {
@@ -414,21 +414,21 @@ class FilesClient {
414
414
  }
415
415
  __update(account_id, file_id, request, requestOptions) {
416
416
  return __awaiter(this, void 0, void 0, function* () {
417
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
417
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
418
418
  const _authRequest = yield this._options.authProvider.getAuthRequest();
419
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
420
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
421
- 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/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}`),
419
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
420
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
421
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}`),
422
422
  method: "PATCH",
423
423
  headers: _headers,
424
424
  contentType: "application/json",
425
425
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
426
426
  requestType: "json",
427
427
  body: request,
428
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
429
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
428
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
429
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
430
430
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
431
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
431
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
432
432
  logging: this._options.logging,
433
433
  });
434
434
  if (_response.ok) {
@@ -491,26 +491,26 @@ class FilesClient {
491
491
  }
492
492
  __copy(account_id_1, file_id_1) {
493
493
  return __awaiter(this, arguments, void 0, function* (account_id, file_id, request = {}, requestOptions) {
494
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
494
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
495
495
  const { copy_metadata: copyMetadata, copy_comments: copyComments } = request, _body = __rest(request, ["copy_metadata", "copy_comments"]);
496
496
  const _queryParams = {
497
497
  copy_metadata: copyMetadata,
498
498
  copy_comments: copyComments != null ? copyComments : undefined,
499
499
  };
500
500
  const _authRequest = yield this._options.authProvider.getAuthRequest();
501
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
502
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
503
- 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/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}/copy`),
501
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
502
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
503
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}/copy`),
504
504
  method: "POST",
505
505
  headers: _headers,
506
506
  contentType: "application/json",
507
507
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
508
508
  requestType: "json",
509
509
  body: _body,
510
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
511
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
510
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
511
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
512
512
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
513
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
513
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
514
514
  logging: this._options.logging,
515
515
  });
516
516
  if (_response.ok) {
@@ -572,21 +572,21 @@ class FilesClient {
572
572
  }
573
573
  __createRemoteUpload(account_id, folder_id, request, requestOptions) {
574
574
  return __awaiter(this, void 0, void 0, function* () {
575
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
575
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
576
576
  const _authRequest = yield this._options.authProvider.getAuthRequest();
577
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
578
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
579
- 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/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files/remote_upload`),
577
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
578
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
579
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files/remote_upload`),
580
580
  method: "POST",
581
581
  headers: _headers,
582
582
  contentType: "application/json",
583
583
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
584
584
  requestType: "json",
585
585
  body: request,
586
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
587
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
586
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
587
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
588
588
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
589
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
589
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
590
590
  logging: this._options.logging,
591
591
  });
592
592
  if (_response.ok) {
@@ -647,21 +647,21 @@ class FilesClient {
647
647
  }
648
648
  __move(account_id, file_id, request, requestOptions) {
649
649
  return __awaiter(this, void 0, void 0, function* () {
650
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
650
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
651
651
  const _authRequest = yield this._options.authProvider.getAuthRequest();
652
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
653
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
654
- 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/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}/move`),
652
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
653
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
654
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}/move`),
655
655
  method: "PATCH",
656
656
  headers: _headers,
657
657
  contentType: "application/json",
658
658
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
659
659
  requestType: "json",
660
660
  body: request,
661
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
662
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
661
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
662
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
663
663
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
664
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
664
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
665
665
  logging: this._options.logging,
666
666
  });
667
667
  if (_response.ok) {
@@ -723,21 +723,21 @@ class FilesClient {
723
723
  }
724
724
  __createLocalUpload(account_id, folder_id, request, requestOptions) {
725
725
  return __awaiter(this, void 0, void 0, function* () {
726
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
726
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
727
727
  const _authRequest = yield this._options.authProvider.getAuthRequest();
728
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
729
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
730
- 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/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files/local_upload`),
728
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
729
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
730
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files/local_upload`),
731
731
  method: "POST",
732
732
  headers: _headers,
733
733
  contentType: "application/json",
734
734
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
735
735
  requestType: "json",
736
736
  body: request,
737
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
738
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
737
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
738
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
739
739
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
740
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
740
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
741
741
  logging: this._options.logging,
742
742
  });
743
743
  if (_response.ok) {
@@ -800,21 +800,21 @@ class FilesClient {
800
800
  }
801
801
  __importFile(account_id, folder_id, request, requestOptions) {
802
802
  return __awaiter(this, void 0, void 0, function* () {
803
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
803
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
804
804
  const _authRequest = yield this._options.authProvider.getAuthRequest();
805
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
806
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
807
- 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/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files/import`),
805
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
806
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
807
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files/import`),
808
808
  method: "POST",
809
809
  headers: _headers,
810
810
  contentType: "application/json",
811
811
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
812
812
  requestType: "json",
813
813
  body: request,
814
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
815
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
814
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
815
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
816
816
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
817
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
817
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
818
818
  logging: this._options.logging,
819
819
  });
820
820
  if (_response.ok) {
@@ -870,18 +870,18 @@ class FilesClient {
870
870
  }
871
871
  __showFileUploadStatus(account_id, file_id, requestOptions) {
872
872
  return __awaiter(this, void 0, void 0, function* () {
873
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
873
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
874
874
  const _authRequest = yield this._options.authProvider.getAuthRequest();
875
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
876
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
877
- 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/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}/status`),
875
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
876
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
877
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}/status`),
878
878
  method: "GET",
879
879
  headers: _headers,
880
880
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
881
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
882
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
881
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
882
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
883
883
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
884
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
884
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
885
885
  logging: this._options.logging,
886
886
  });
887
887
  if (_response.ok) {