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
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  return t;
21
21
  };
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../core/headers.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
24
24
  import * as core from "../../../../core/index.mjs";
25
25
  import * as environments from "../../../../environments.mjs";
26
26
  import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
@@ -63,7 +63,7 @@ export class FilesClient {
63
63
  }
64
64
  __list(account_id_1, folder_id_1) {
65
65
  return __awaiter(this, arguments, void 0, function* (account_id, folder_id, request = {}, requestOptions) {
66
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
66
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
67
67
  const { include, sort, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
68
68
  const _queryParams = {
69
69
  include: include != null ? include : undefined,
@@ -73,16 +73,16 @@ export class FilesClient {
73
73
  include_total_count: includeTotalCount,
74
74
  };
75
75
  const _authRequest = yield this._options.authProvider.getAuthRequest();
76
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
77
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
78
- 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`),
76
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
77
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
78
+ 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`),
79
79
  method: "GET",
80
80
  headers: _headers,
81
81
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
82
- 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,
83
- 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,
82
+ 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,
83
+ 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,
84
84
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
85
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
85
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
86
86
  logging: this._options.logging,
87
87
  });
88
88
  if (_response.ok) {
@@ -150,21 +150,21 @@ export class FilesClient {
150
150
  }
151
151
  __create(account_id, folder_id, request, requestOptions) {
152
152
  return __awaiter(this, void 0, void 0, function* () {
153
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
153
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
154
154
  const _authRequest = yield this._options.authProvider.getAuthRequest();
155
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
156
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
157
- 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`),
155
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
156
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
157
+ 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`),
158
158
  method: "POST",
159
159
  headers: _headers,
160
160
  contentType: "application/json",
161
161
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
162
162
  requestType: "json",
163
163
  body: request,
164
- 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,
165
- 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,
164
+ 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,
165
+ 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,
166
166
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
167
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
167
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
168
168
  logging: this._options.logging,
169
169
  });
170
170
  if (_response.ok) {
@@ -235,22 +235,22 @@ export class FilesClient {
235
235
  }
236
236
  __show(account_id_1, file_id_1) {
237
237
  return __awaiter(this, arguments, void 0, function* (account_id, file_id, request = {}, requestOptions) {
238
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
238
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
239
239
  const { include } = request;
240
240
  const _queryParams = {
241
241
  include: include != null ? include : undefined,
242
242
  };
243
243
  const _authRequest = yield this._options.authProvider.getAuthRequest();
244
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
245
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
246
- 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)}`),
244
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
245
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
246
+ 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)}`),
247
247
  method: "GET",
248
248
  headers: _headers,
249
249
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
250
- 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,
251
- 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,
250
+ 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,
251
+ 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,
252
252
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
253
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
253
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
254
254
  logging: this._options.logging,
255
255
  });
256
256
  if (_response.ok) {
@@ -306,18 +306,18 @@ export class FilesClient {
306
306
  }
307
307
  __delete(account_id, file_id, requestOptions) {
308
308
  return __awaiter(this, void 0, void 0, function* () {
309
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
309
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
310
310
  const _authRequest = yield this._options.authProvider.getAuthRequest();
311
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
312
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
313
- 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)}`),
311
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
312
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
313
+ 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)}`),
314
314
  method: "DELETE",
315
315
  headers: _headers,
316
316
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
317
- 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,
318
- 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,
317
+ 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,
318
+ 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,
319
319
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
320
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
320
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
321
321
  logging: this._options.logging,
322
322
  });
323
323
  if (_response.ok) {
@@ -378,21 +378,21 @@ export class FilesClient {
378
378
  }
379
379
  __update(account_id, file_id, request, requestOptions) {
380
380
  return __awaiter(this, void 0, void 0, function* () {
381
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
381
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
382
382
  const _authRequest = yield this._options.authProvider.getAuthRequest();
383
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
384
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
385
- 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)}`),
383
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
384
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
385
+ 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)}`),
386
386
  method: "PATCH",
387
387
  headers: _headers,
388
388
  contentType: "application/json",
389
389
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
390
390
  requestType: "json",
391
391
  body: request,
392
- 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,
393
- 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,
392
+ 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,
393
+ 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,
394
394
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
395
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
395
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
396
396
  logging: this._options.logging,
397
397
  });
398
398
  if (_response.ok) {
@@ -455,26 +455,26 @@ export class FilesClient {
455
455
  }
456
456
  __copy(account_id_1, file_id_1) {
457
457
  return __awaiter(this, arguments, void 0, function* (account_id, file_id, request = {}, requestOptions) {
458
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
458
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
459
459
  const { copy_metadata: copyMetadata, copy_comments: copyComments } = request, _body = __rest(request, ["copy_metadata", "copy_comments"]);
460
460
  const _queryParams = {
461
461
  copy_metadata: copyMetadata,
462
462
  copy_comments: copyComments != null ? copyComments : undefined,
463
463
  };
464
464
  const _authRequest = yield this._options.authProvider.getAuthRequest();
465
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
466
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
467
- 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`),
465
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
466
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
467
+ 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`),
468
468
  method: "POST",
469
469
  headers: _headers,
470
470
  contentType: "application/json",
471
471
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
472
472
  requestType: "json",
473
473
  body: _body,
474
- 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,
475
- 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,
474
+ 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,
475
+ 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,
476
476
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
477
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
477
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
478
478
  logging: this._options.logging,
479
479
  });
480
480
  if (_response.ok) {
@@ -536,21 +536,21 @@ export class FilesClient {
536
536
  }
537
537
  __createRemoteUpload(account_id, folder_id, request, requestOptions) {
538
538
  return __awaiter(this, void 0, void 0, function* () {
539
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
539
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
540
540
  const _authRequest = yield this._options.authProvider.getAuthRequest();
541
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
542
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
543
- 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`),
541
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
542
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
543
+ 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`),
544
544
  method: "POST",
545
545
  headers: _headers,
546
546
  contentType: "application/json",
547
547
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
548
548
  requestType: "json",
549
549
  body: request,
550
- 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,
551
- 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,
550
+ 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,
551
+ 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,
552
552
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
553
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
553
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
554
554
  logging: this._options.logging,
555
555
  });
556
556
  if (_response.ok) {
@@ -611,21 +611,21 @@ export class FilesClient {
611
611
  }
612
612
  __move(account_id, file_id, request, requestOptions) {
613
613
  return __awaiter(this, void 0, void 0, function* () {
614
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
614
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
615
615
  const _authRequest = yield this._options.authProvider.getAuthRequest();
616
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
617
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
618
- 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`),
616
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
617
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
618
+ 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`),
619
619
  method: "PATCH",
620
620
  headers: _headers,
621
621
  contentType: "application/json",
622
622
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
623
623
  requestType: "json",
624
624
  body: request,
625
- 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,
626
- 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,
625
+ 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,
626
+ 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,
627
627
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
628
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
628
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
629
629
  logging: this._options.logging,
630
630
  });
631
631
  if (_response.ok) {
@@ -687,21 +687,21 @@ export class FilesClient {
687
687
  }
688
688
  __createLocalUpload(account_id, folder_id, request, requestOptions) {
689
689
  return __awaiter(this, void 0, void 0, function* () {
690
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
690
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
691
691
  const _authRequest = yield this._options.authProvider.getAuthRequest();
692
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
693
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
694
- 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`),
692
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
693
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
694
+ 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`),
695
695
  method: "POST",
696
696
  headers: _headers,
697
697
  contentType: "application/json",
698
698
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
699
699
  requestType: "json",
700
700
  body: request,
701
- 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,
702
- 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,
701
+ 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,
702
+ 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,
703
703
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
704
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
704
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
705
705
  logging: this._options.logging,
706
706
  });
707
707
  if (_response.ok) {
@@ -764,21 +764,21 @@ export class FilesClient {
764
764
  }
765
765
  __importFile(account_id, folder_id, request, requestOptions) {
766
766
  return __awaiter(this, void 0, void 0, function* () {
767
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
767
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
768
768
  const _authRequest = yield this._options.authProvider.getAuthRequest();
769
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
770
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
771
- 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`),
769
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
770
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
771
+ 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`),
772
772
  method: "POST",
773
773
  headers: _headers,
774
774
  contentType: "application/json",
775
775
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
776
776
  requestType: "json",
777
777
  body: request,
778
- 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,
779
- 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,
778
+ 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,
779
+ 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,
780
780
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
781
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
781
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
782
782
  logging: this._options.logging,
783
783
  });
784
784
  if (_response.ok) {
@@ -834,18 +834,18 @@ export class FilesClient {
834
834
  }
835
835
  __showFileUploadStatus(account_id, file_id, requestOptions) {
836
836
  return __awaiter(this, void 0, void 0, function* () {
837
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
837
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
838
838
  const _authRequest = yield this._options.authProvider.getAuthRequest();
839
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
840
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
841
- 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`),
839
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
840
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
841
+ 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`),
842
842
  method: "GET",
843
843
  headers: _headers,
844
844
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
845
- 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,
846
- 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,
845
+ 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,
846
+ 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,
847
847
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
848
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
848
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
849
849
  logging: this._options.logging,
850
850
  });
851
851
  if (_response.ok) {