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
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /**
3
+ * Input validation helpers for frameio-auth-sdk.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.validateRedirectUriScheme = validateRedirectUriScheme;
7
+ exports.validateTokenImport = validateTokenImport;
8
+ const errors_1 = require("./errors");
9
+ /** Hosts that are allowed to use http:// redirect URIs. */
10
+ const LOOPBACK_HOSTS = new Set(["localhost", "127.0.0.1", "[::1]"]);
11
+ /**
12
+ * Validate that a redirect URI uses HTTPS, except for loopback addresses
13
+ * where HTTP is allowed for local development.
14
+ *
15
+ * @throws {ConfigurationError} if the URI uses http:// with a non-loopback host.
16
+ */
17
+ function validateRedirectUriScheme(uri) {
18
+ const lower = uri.toLowerCase();
19
+ if (!lower.startsWith("http://")) {
20
+ return; // https:// and custom schemes are always allowed
21
+ }
22
+ const hostPart = lower.slice("http://".length);
23
+ // Extract host, handling IPv6 brackets (e.g. [::1])
24
+ let host;
25
+ if (hostPart.startsWith("[")) {
26
+ const bracketEnd = hostPart.indexOf("]");
27
+ host = bracketEnd !== -1 ? hostPart.slice(0, bracketEnd + 1) : hostPart.split("/")[0];
28
+ }
29
+ else {
30
+ host = hostPart.split("/")[0].split(":")[0];
31
+ }
32
+ if (!LOOPBACK_HOSTS.has(host)) {
33
+ throw new errors_1.ConfigurationError(`Redirect URI must use HTTPS for non-loopback hosts, got: ${uri}`);
34
+ }
35
+ }
36
+ /**
37
+ * Validate the structure of an exported token object before importing.
38
+ *
39
+ * @throws {ConfigurationError} if any field has an unexpected type.
40
+ */
41
+ function validateTokenImport(data) {
42
+ if (typeof data !== "object" || data === null) {
43
+ throw new errors_1.ConfigurationError("Token import data must be a non-null object.");
44
+ }
45
+ const obj = data;
46
+ if ("access_token" in obj && obj.access_token !== null && typeof obj.access_token !== "string") {
47
+ throw new errors_1.ConfigurationError(`access_token must be a string or null, got ${typeof obj.access_token}`);
48
+ }
49
+ if ("refresh_token" in obj && obj.refresh_token !== null && typeof obj.refresh_token !== "string") {
50
+ throw new errors_1.ConfigurationError(`refresh_token must be a string or null, got ${typeof obj.refresh_token}`);
51
+ }
52
+ if ("expires_at" in obj && typeof obj.expires_at !== "number") {
53
+ throw new errors_1.ConfigurationError(`expires_at must be a number, got ${typeof obj.expires_at}`);
54
+ }
55
+ }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.2.2";
1
+ export declare const SDK_VERSION = "4.1.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "3.2.2";
4
+ exports.SDK_VERSION = "4.1.0";
@@ -5,6 +5,8 @@ export type BaseClientOptions = {
5
5
  environment?: core.Supplier<environments.FrameioEnvironment | string>;
6
6
  /** Specify a custom URL to connect the client to. */
7
7
  baseUrl?: core.Supplier<string>;
8
+ /** Override the user-agent header */
9
+ userAgent?: "frameio-ts";
8
10
  /** Additional headers to include in requests. */
9
11
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
10
12
  /** The default maximum time to wait for a response in seconds. */
@@ -24,6 +26,8 @@ export interface BaseRequestOptions {
24
26
  maxRetries?: number;
25
27
  /** A hook to abort the request. */
26
28
  abortSignal?: AbortSignal;
29
+ /** Override the user-agent header */
30
+ userAgent?: "frameio-ts";
27
31
  /** Additional query string parameters to include in the request. */
28
32
  queryParams?: Record<string, unknown>;
29
33
  /** Additional headers to include in the request. */
@@ -3,13 +3,15 @@ import { BearerAuthProvider } from "./auth/BearerAuthProvider.mjs";
3
3
  import { mergeHeaders } from "./core/headers.mjs";
4
4
  import * as core from "./core/index.mjs";
5
5
  export function normalizeClientOptions(options) {
6
+ var _a;
6
7
  const headers = mergeHeaders({
7
8
  "X-Fern-Language": "JavaScript",
8
9
  "X-Fern-SDK-Name": "frameio",
9
- "X-Fern-SDK-Version": "3.2.2",
10
- "User-Agent": "frameio/3.2.2",
10
+ "X-Fern-SDK-Version": "4.1.0",
11
+ "User-Agent": "frameio/4.1.0",
11
12
  "X-Fern-Runtime": core.RUNTIME.type,
12
13
  "X-Fern-Runtime-Version": core.RUNTIME.version,
14
+ "user-agent": (_a = options === null || options === void 0 ? void 0 : options.userAgent) !== null && _a !== void 0 ? _a : "frameio-ts",
13
15
  }, options === null || options === void 0 ? void 0 : options.headers);
14
16
  return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
15
17
  }
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
- import { mergeHeaders } from "../../../../core/headers.mjs";
12
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
13
13
  import * as core from "../../../../core/index.mjs";
14
14
  import * as environments from "../../../../environments.mjs";
15
15
  import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
@@ -49,17 +49,17 @@ export class AccountPermissionsClient {
49
49
  return __awaiter(this, arguments, void 0, function* (account_id, _request = {}, requestOptions) {
50
50
  var _a, _b;
51
51
  const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
52
- var _a, _b, _c, _d, _e, _f, _g, _h;
52
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
53
53
  const _authRequest = yield this._options.authProvider.getAuthRequest();
54
- 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);
55
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
54
+ 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);
55
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
56
56
  url: _requestUrl,
57
57
  method: "GET",
58
58
  headers: _headers,
59
- timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
60
- maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
59
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
60
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
61
61
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
62
- fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
62
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
63
63
  logging: this._options.logging,
64
64
  });
65
65
  if (_response.ok) {
@@ -47,17 +47,17 @@ export class AccountsClient {
47
47
  return __awaiter(this, arguments, void 0, function* (_request = {}, requestOptions) {
48
48
  var _a, _b;
49
49
  const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
50
- var _a, _b, _c, _d, _e, _f, _g, _h;
50
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
51
51
  const _authRequest = yield this._options.authProvider.getAuthRequest();
52
- 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);
53
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
52
+ 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);
53
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
54
54
  url: _requestUrl,
55
55
  method: "GET",
56
56
  headers: _headers,
57
- timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
58
- maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
57
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
58
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
59
59
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
60
- fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
60
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
61
61
  logging: this._options.logging,
62
62
  });
63
63
  if (_response.ok) {
@@ -130,7 +130,7 @@ export class AccountsClient {
130
130
  }
131
131
  __auditlogIndex(account_id_1) {
132
132
  return __awaiter(this, arguments, void 0, function* (account_id, request = {}, requestOptions) {
133
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
133
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
134
134
  const { include, filters, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
135
135
  const _queryParams = {
136
136
  include: include != null ? include : undefined,
@@ -140,16 +140,16 @@ export class AccountsClient {
140
140
  include_total_count: includeTotalCount,
141
141
  };
142
142
  const _authRequest = yield this._options.authProvider.getAuthRequest();
143
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "api-version": "4.0" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
144
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
145
- 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)}/audit_logs`),
143
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "api-version": "4.0", "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);
144
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
145
+ 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)}/audit_logs`),
146
146
  method: "GET",
147
147
  headers: _headers,
148
148
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
149
- 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,
150
- 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,
149
+ 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,
150
+ 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,
151
151
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
152
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
152
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
153
153
  logging: this._options.logging,
154
154
  });
155
155
  if (_response.ok) {
@@ -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";
@@ -57,18 +57,18 @@ export class CommentsClient {
57
57
  }
58
58
  __deleteAttachment(account_id, comment_id, attachment_id, requestOptions) {
59
59
  return __awaiter(this, void 0, void 0, function* () {
60
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
60
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
61
61
  const _authRequest = yield this._options.authProvider.getAuthRequest();
62
- 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);
63
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
64
- 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)}/comments/${core.url.encodePathParam(comment_id)}/attachments/${core.url.encodePathParam(attachment_id)}`),
62
+ 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);
63
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
64
+ 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)}/comments/${core.url.encodePathParam(comment_id)}/attachments/${core.url.encodePathParam(attachment_id)}`),
65
65
  method: "DELETE",
66
66
  headers: _headers,
67
67
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
68
- 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,
69
- 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,
68
+ 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,
69
+ 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,
70
70
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
71
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
71
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
72
72
  logging: this._options.logging,
73
73
  });
74
74
  if (_response.ok) {
@@ -131,21 +131,21 @@ export class CommentsClient {
131
131
  }
132
132
  __createAttachment(account_id, comment_id, request, requestOptions) {
133
133
  return __awaiter(this, void 0, void 0, function* () {
134
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
134
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
135
135
  const _authRequest = yield this._options.authProvider.getAuthRequest();
136
- 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);
137
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
138
- 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)}/comments/${core.url.encodePathParam(comment_id)}/attachments`),
136
+ 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);
137
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
138
+ 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)}/comments/${core.url.encodePathParam(comment_id)}/attachments`),
139
139
  method: "POST",
140
140
  headers: _headers,
141
141
  contentType: "application/json",
142
142
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
143
143
  requestType: "json",
144
144
  body: request,
145
- 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,
146
- 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,
145
+ 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,
146
+ 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,
147
147
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
148
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
148
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
149
149
  logging: this._options.logging,
150
150
  });
151
151
  if (_response.ok) {
@@ -205,23 +205,23 @@ export class CommentsClient {
205
205
  }
206
206
  __show(account_id_1, comment_id_1) {
207
207
  return __awaiter(this, arguments, void 0, function* (account_id, comment_id, request = {}, requestOptions) {
208
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
208
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
209
209
  const { timestamp_as_timecode: timestampAsTimecode, include } = request;
210
210
  const _queryParams = {
211
211
  timestamp_as_timecode: timestampAsTimecode,
212
212
  include: include != null ? include : undefined,
213
213
  };
214
214
  const _authRequest = yield this._options.authProvider.getAuthRequest();
215
- 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);
216
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
217
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/comments/${core.url.encodePathParam(comment_id)}`),
215
+ 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);
216
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
217
+ 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)}/comments/${core.url.encodePathParam(comment_id)}`),
218
218
  method: "GET",
219
219
  headers: _headers,
220
220
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
221
- 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,
222
- 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,
221
+ 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,
222
+ 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,
223
223
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
224
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
224
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
225
225
  logging: this._options.logging,
226
226
  });
227
227
  if (_response.ok) {
@@ -277,18 +277,18 @@ export class CommentsClient {
277
277
  }
278
278
  __delete(account_id, comment_id, requestOptions) {
279
279
  return __awaiter(this, void 0, void 0, function* () {
280
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
280
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
281
281
  const _authRequest = yield this._options.authProvider.getAuthRequest();
282
- 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);
283
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
284
- 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)}/comments/${core.url.encodePathParam(comment_id)}`),
282
+ 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);
283
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
284
+ 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)}/comments/${core.url.encodePathParam(comment_id)}`),
285
285
  method: "DELETE",
286
286
  headers: _headers,
287
287
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
288
- 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,
289
- 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,
288
+ 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,
289
+ 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,
290
290
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
291
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
291
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
292
292
  logging: this._options.logging,
293
293
  });
294
294
  if (_response.ok) {
@@ -368,25 +368,25 @@ export class CommentsClient {
368
368
  }
369
369
  __update(account_id, comment_id, request, requestOptions) {
370
370
  return __awaiter(this, void 0, void 0, function* () {
371
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
371
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
372
372
  const { timestamp_as_timecode: timestampAsTimecode } = request, _body = __rest(request, ["timestamp_as_timecode"]);
373
373
  const _queryParams = {
374
374
  timestamp_as_timecode: timestampAsTimecode,
375
375
  };
376
376
  const _authRequest = yield this._options.authProvider.getAuthRequest();
377
- 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);
378
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
379
- 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)}/comments/${core.url.encodePathParam(comment_id)}`),
377
+ 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);
378
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
379
+ 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)}/comments/${core.url.encodePathParam(comment_id)}`),
380
380
  method: "PATCH",
381
381
  headers: _headers,
382
382
  contentType: "application/json",
383
383
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
384
384
  requestType: "json",
385
385
  body: _body,
386
- 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,
387
- 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,
386
+ 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,
387
+ 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,
388
388
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
389
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
389
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
390
390
  logging: this._options.logging,
391
391
  });
392
392
  if (_response.ok) {
@@ -449,17 +449,17 @@ export class CommentsClient {
449
449
  return __awaiter(this, arguments, void 0, function* (account_id, file_id, _request = {}, requestOptions) {
450
450
  var _a, _b;
451
451
  const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
452
- var _a, _b, _c, _d, _e, _f, _g, _h;
452
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
453
453
  const _authRequest = yield this._options.authProvider.getAuthRequest();
454
- 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);
455
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
454
+ 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);
455
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
456
456
  url: _requestUrl,
457
457
  method: "GET",
458
458
  headers: _headers,
459
- timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
460
- maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
459
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
460
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
461
461
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
462
- fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
462
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
463
463
  logging: this._options.logging,
464
464
  });
465
465
  if (_response.ok) {
@@ -566,25 +566,25 @@ export class CommentsClient {
566
566
  }
567
567
  __create(account_id, file_id, request, requestOptions) {
568
568
  return __awaiter(this, void 0, void 0, function* () {
569
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
569
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
570
570
  const { timestamp_as_timecode: timestampAsTimecode } = request, _body = __rest(request, ["timestamp_as_timecode"]);
571
571
  const _queryParams = {
572
572
  timestamp_as_timecode: timestampAsTimecode,
573
573
  };
574
574
  const _authRequest = yield this._options.authProvider.getAuthRequest();
575
- 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);
576
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
577
- 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)}/comments`),
575
+ 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);
576
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
577
+ 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)}/comments`),
578
578
  method: "POST",
579
579
  headers: _headers,
580
580
  contentType: "application/json",
581
581
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
582
582
  requestType: "json",
583
583
  body: _body,
584
- 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,
585
- 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,
584
+ 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,
585
+ 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,
586
586
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
587
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
587
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
588
588
  logging: this._options.logging,
589
589
  });
590
590
  if (_response.ok) {