@foru-ms/sdk 2.1.5 → 2.1.7

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 (129) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/BaseClient.d.ts +0 -4
  3. package/dist/cjs/BaseClient.js +2 -3
  4. package/dist/cjs/Client.d.ts +1 -1
  5. package/dist/cjs/Client.js +1 -1
  6. package/dist/cjs/api/resources/auth/client/Client.d.ts +1 -1
  7. package/dist/cjs/api/resources/auth/client/Client.js +36 -46
  8. package/dist/cjs/api/resources/integrations/client/Client.d.ts +1 -1
  9. package/dist/cjs/api/resources/integrations/client/Client.js +36 -46
  10. package/dist/cjs/api/resources/notifications/client/Client.d.ts +1 -1
  11. package/dist/cjs/api/resources/notifications/client/Client.js +36 -46
  12. package/dist/cjs/api/resources/posts/client/Client.d.ts +1 -1
  13. package/dist/cjs/api/resources/posts/client/Client.js +85 -109
  14. package/dist/cjs/api/resources/privateMessages/client/Client.d.ts +1 -1
  15. package/dist/cjs/api/resources/privateMessages/client/Client.js +64 -82
  16. package/dist/cjs/api/resources/provisioning/client/Client.d.ts +25 -3
  17. package/dist/cjs/api/resources/provisioning/client/Client.js +234 -233
  18. package/dist/cjs/api/resources/provisioning/client/requests/AddDomainProvisioningRequest.d.ts +3 -0
  19. package/dist/cjs/api/resources/provisioning/client/requests/CreateInstance.d.ts +3 -0
  20. package/dist/cjs/api/resources/provisioning/client/requests/CreateWebhookProvisioningRequest.d.ts +3 -0
  21. package/dist/cjs/api/resources/provisioning/client/requests/DeleteInstance.d.ts +3 -0
  22. package/dist/cjs/api/resources/provisioning/client/requests/DeleteWebhookProvisioningRequest.d.ts +3 -0
  23. package/dist/cjs/api/resources/provisioning/client/requests/ExportDataProvisioningRequest.d.ts +3 -0
  24. package/dist/cjs/api/resources/provisioning/client/requests/GetBillingProvisioningRequest.d.ts +3 -0
  25. package/dist/cjs/api/resources/provisioning/client/requests/GetOwnershipProvisioningRequest.d.ts +3 -0
  26. package/dist/cjs/api/resources/provisioning/client/requests/GetUsageProvisioningRequest.d.ts +3 -0
  27. package/dist/cjs/api/resources/provisioning/client/requests/InviteTeamProvisioningRequest.d.ts +3 -0
  28. package/dist/cjs/api/resources/provisioning/client/requests/ListDomainsProvisioningRequest.d.ts +3 -0
  29. package/dist/cjs/api/resources/provisioning/client/requests/ListProvisioningRequest.d.ts +5 -1
  30. package/dist/cjs/api/resources/provisioning/client/requests/ListTeamProvisioningRequest.d.ts +3 -0
  31. package/dist/cjs/api/resources/provisioning/client/requests/ListWebhooksProvisioningRequest.d.ts +3 -0
  32. package/dist/cjs/api/resources/provisioning/client/requests/RegenerateApiKeyProvisioningRequest.d.ts +3 -0
  33. package/dist/cjs/api/resources/provisioning/client/requests/RemoveDomainProvisioningRequest.d.ts +3 -0
  34. package/dist/cjs/api/resources/provisioning/client/requests/RemoveTeamMemberProvisioningRequest.d.ts +3 -0
  35. package/dist/cjs/api/resources/provisioning/client/requests/TransferOwnershipProvisioningRequest.d.ts +3 -0
  36. package/dist/cjs/api/resources/provisioning/client/requests/UpdateInstance.d.ts +3 -0
  37. package/dist/cjs/api/resources/provisioning/client/requests/UpdateWebhookProvisioningRequest.d.ts +3 -0
  38. package/dist/cjs/api/resources/provisioning/client/requests/UpgradeInstance.d.ts +3 -0
  39. package/dist/cjs/api/resources/reports/client/Client.d.ts +1 -1
  40. package/dist/cjs/api/resources/reports/client/Client.js +36 -46
  41. package/dist/cjs/api/resources/roles/client/Client.d.ts +1 -1
  42. package/dist/cjs/api/resources/roles/client/Client.js +36 -46
  43. package/dist/cjs/api/resources/search/client/Client.d.ts +1 -1
  44. package/dist/cjs/api/resources/search/client/Client.js +8 -10
  45. package/dist/cjs/api/resources/ssOs/client/Client.d.ts +1 -1
  46. package/dist/cjs/api/resources/ssOs/client/Client.js +36 -46
  47. package/dist/cjs/api/resources/tags/client/Client.d.ts +1 -1
  48. package/dist/cjs/api/resources/tags/client/Client.js +57 -73
  49. package/dist/cjs/api/resources/threads/client/Client.d.ts +1 -1
  50. package/dist/cjs/api/resources/threads/client/Client.js +127 -163
  51. package/dist/cjs/api/resources/threads/types/UpdateThreadsResponse.d.ts +20 -0
  52. package/dist/cjs/api/resources/threads/types/UpdateThreadsResponse.js +19 -0
  53. package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
  54. package/dist/cjs/api/resources/users/client/Client.js +78 -100
  55. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +1 -1
  56. package/dist/cjs/api/resources/webhooks/client/Client.js +57 -73
  57. package/dist/cjs/api/types/Thread.d.ts +22 -0
  58. package/dist/cjs/api/types/Thread.js +16 -0
  59. package/dist/cjs/api/types/ThreadListResponse.d.ts +20 -0
  60. package/dist/cjs/api/types/ThreadListResponse.js +25 -0
  61. package/dist/cjs/api/types/ThreadResponse.d.ts +20 -0
  62. package/dist/cjs/api/types/ThreadResponse.js +19 -0
  63. package/dist/cjs/version.d.ts +1 -1
  64. package/dist/cjs/version.js +1 -1
  65. package/dist/esm/BaseClient.d.mts +0 -4
  66. package/dist/esm/BaseClient.mjs +2 -3
  67. package/dist/esm/Client.d.mts +1 -1
  68. package/dist/esm/Client.mjs +1 -1
  69. package/dist/esm/api/resources/auth/client/Client.d.mts +1 -1
  70. package/dist/esm/api/resources/auth/client/Client.mjs +37 -47
  71. package/dist/esm/api/resources/integrations/client/Client.d.mts +1 -1
  72. package/dist/esm/api/resources/integrations/client/Client.mjs +37 -47
  73. package/dist/esm/api/resources/notifications/client/Client.d.mts +1 -1
  74. package/dist/esm/api/resources/notifications/client/Client.mjs +37 -47
  75. package/dist/esm/api/resources/posts/client/Client.d.mts +1 -1
  76. package/dist/esm/api/resources/posts/client/Client.mjs +86 -110
  77. package/dist/esm/api/resources/privateMessages/client/Client.d.mts +1 -1
  78. package/dist/esm/api/resources/privateMessages/client/Client.mjs +65 -83
  79. package/dist/esm/api/resources/provisioning/client/Client.d.mts +25 -3
  80. package/dist/esm/api/resources/provisioning/client/Client.mjs +234 -233
  81. package/dist/esm/api/resources/provisioning/client/requests/AddDomainProvisioningRequest.d.mts +3 -0
  82. package/dist/esm/api/resources/provisioning/client/requests/CreateInstance.d.mts +3 -0
  83. package/dist/esm/api/resources/provisioning/client/requests/CreateWebhookProvisioningRequest.d.mts +3 -0
  84. package/dist/esm/api/resources/provisioning/client/requests/DeleteInstance.d.mts +3 -0
  85. package/dist/esm/api/resources/provisioning/client/requests/DeleteWebhookProvisioningRequest.d.mts +3 -0
  86. package/dist/esm/api/resources/provisioning/client/requests/ExportDataProvisioningRequest.d.mts +3 -0
  87. package/dist/esm/api/resources/provisioning/client/requests/GetBillingProvisioningRequest.d.mts +3 -0
  88. package/dist/esm/api/resources/provisioning/client/requests/GetOwnershipProvisioningRequest.d.mts +3 -0
  89. package/dist/esm/api/resources/provisioning/client/requests/GetUsageProvisioningRequest.d.mts +3 -0
  90. package/dist/esm/api/resources/provisioning/client/requests/InviteTeamProvisioningRequest.d.mts +3 -0
  91. package/dist/esm/api/resources/provisioning/client/requests/ListDomainsProvisioningRequest.d.mts +3 -0
  92. package/dist/esm/api/resources/provisioning/client/requests/ListProvisioningRequest.d.mts +5 -1
  93. package/dist/esm/api/resources/provisioning/client/requests/ListTeamProvisioningRequest.d.mts +3 -0
  94. package/dist/esm/api/resources/provisioning/client/requests/ListWebhooksProvisioningRequest.d.mts +3 -0
  95. package/dist/esm/api/resources/provisioning/client/requests/RegenerateApiKeyProvisioningRequest.d.mts +3 -0
  96. package/dist/esm/api/resources/provisioning/client/requests/RemoveDomainProvisioningRequest.d.mts +3 -0
  97. package/dist/esm/api/resources/provisioning/client/requests/RemoveTeamMemberProvisioningRequest.d.mts +3 -0
  98. package/dist/esm/api/resources/provisioning/client/requests/TransferOwnershipProvisioningRequest.d.mts +3 -0
  99. package/dist/esm/api/resources/provisioning/client/requests/UpdateInstance.d.mts +3 -0
  100. package/dist/esm/api/resources/provisioning/client/requests/UpdateWebhookProvisioningRequest.d.mts +3 -0
  101. package/dist/esm/api/resources/provisioning/client/requests/UpgradeInstance.d.mts +3 -0
  102. package/dist/esm/api/resources/reports/client/Client.d.mts +1 -1
  103. package/dist/esm/api/resources/reports/client/Client.mjs +37 -47
  104. package/dist/esm/api/resources/roles/client/Client.d.mts +1 -1
  105. package/dist/esm/api/resources/roles/client/Client.mjs +37 -47
  106. package/dist/esm/api/resources/search/client/Client.d.mts +1 -1
  107. package/dist/esm/api/resources/search/client/Client.mjs +9 -11
  108. package/dist/esm/api/resources/ssOs/client/Client.d.mts +1 -1
  109. package/dist/esm/api/resources/ssOs/client/Client.mjs +37 -47
  110. package/dist/esm/api/resources/tags/client/Client.d.mts +1 -1
  111. package/dist/esm/api/resources/tags/client/Client.mjs +58 -74
  112. package/dist/esm/api/resources/threads/client/Client.d.mts +1 -1
  113. package/dist/esm/api/resources/threads/client/Client.mjs +128 -164
  114. package/dist/esm/api/resources/threads/types/UpdateThreadsResponse.d.mts +20 -0
  115. package/dist/esm/api/resources/threads/types/UpdateThreadsResponse.mjs +18 -1
  116. package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
  117. package/dist/esm/api/resources/users/client/Client.mjs +79 -101
  118. package/dist/esm/api/resources/webhooks/client/Client.d.mts +1 -1
  119. package/dist/esm/api/resources/webhooks/client/Client.mjs +58 -74
  120. package/dist/esm/api/types/Thread.d.mts +22 -0
  121. package/dist/esm/api/types/Thread.mjs +15 -1
  122. package/dist/esm/api/types/ThreadListResponse.d.mts +20 -0
  123. package/dist/esm/api/types/ThreadListResponse.mjs +24 -1
  124. package/dist/esm/api/types/ThreadResponse.d.mts +20 -0
  125. package/dist/esm/api/types/ThreadResponse.mjs +18 -1
  126. package/dist/esm/version.d.mts +1 -1
  127. package/dist/esm/version.mjs +1 -1
  128. package/package.json +1 -1
  129. package/reference.md +23 -1
package/README.md CHANGED
@@ -46,7 +46,7 @@ Instantiate and use the client with the following:
46
46
  ```typescript
47
47
  import { ForumClient } from "@foru-ms/sdk";
48
48
 
49
- const client = new ForumClient({ apiKey: "YOUR_API_KEY", provisioningKey: "YOUR_PROVISIONING_KEY" });
49
+ const client = new ForumClient({ apiKey: "YOUR_API_KEY" });
50
50
  await client.auth.register({
51
51
  username: "username",
52
52
  email: "email",
@@ -5,8 +5,6 @@ export type BaseClientOptions = {
5
5
  environment?: core.Supplier<environments.ForumEnvironment | string>;
6
6
  /** Specify a custom URL to connect the client to. */
7
7
  baseUrl?: core.Supplier<string>;
8
- /** Override the x-provisioning-key header */
9
- provisioningKey: core.Supplier<string>;
10
8
  /** Additional headers to include in requests. */
11
9
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
12
10
  /** The default maximum time to wait for a response in seconds. */
@@ -26,8 +24,6 @@ export interface BaseRequestOptions {
26
24
  maxRetries?: number;
27
25
  /** A hook to abort the request. */
28
26
  abortSignal?: AbortSignal;
29
- /** Override the x-provisioning-key header */
30
- provisioningKey?: string;
31
27
  /** Additional query string parameters to include in the request. */
32
28
  queryParams?: Record<string, unknown>;
33
29
  /** Additional headers to include in the request. */
@@ -43,11 +43,10 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@foru-ms/sdk",
46
- "X-Fern-SDK-Version": "2.1.5",
47
- "User-Agent": "@foru-ms/sdk/2.1.5",
46
+ "X-Fern-SDK-Version": "2.1.7",
47
+ "User-Agent": "@foru-ms/sdk/2.1.7",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
- "x-provisioning-key": options === null || options === void 0 ? void 0 : options.provisioningKey,
51
50
  }, options === null || options === void 0 ? void 0 : options.headers);
52
51
  return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
53
52
  }
@@ -35,7 +35,7 @@ export declare class ForumClient {
35
35
  protected _integrations: IntegrationsClient | undefined;
36
36
  protected _ssOs: SsOsClient | undefined;
37
37
  protected _provisioning: ProvisioningClient | undefined;
38
- constructor(options: ForumClient.Options);
38
+ constructor(options?: ForumClient.Options);
39
39
  get auth(): AuthClient;
40
40
  get search(): SearchClient;
41
41
  get tags(): TagsClient;
@@ -18,7 +18,7 @@ const Client_js_13 = require("./api/resources/users/client/Client.js");
18
18
  const Client_js_14 = require("./api/resources/webhooks/client/Client.js");
19
19
  const BaseClient_js_1 = require("./BaseClient.js");
20
20
  class ForumClient {
21
- constructor(options) {
21
+ constructor(options = {}) {
22
22
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
23
23
  }
24
24
  get auth() {
@@ -12,7 +12,7 @@ export declare namespace AuthClient {
12
12
  */
13
13
  export declare class AuthClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<AuthClient.Options>;
15
- constructor(options: AuthClient.Options);
15
+ constructor(options?: AuthClient.Options);
16
16
  /**
17
17
  * Register a new user in your forum instance. Requires API key for instance identification. Returns a JWT token for subsequent authenticated requests.
18
18
  *
@@ -55,7 +55,7 @@ const Forum = __importStar(require("../../../index.js"));
55
55
  * Operations for auth
56
56
  */
57
57
  class AuthClient {
58
- constructor(options) {
58
+ constructor(options = {}) {
59
59
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
60
60
  }
61
61
  /**
@@ -82,23 +82,21 @@ class AuthClient {
82
82
  }
83
83
  __register(request, requestOptions) {
84
84
  return __awaiter(this, void 0, void 0, function* () {
85
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
85
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
86
86
  const _authRequest = yield this._options.authProvider.getAuthRequest();
87
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
88
- "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
89
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
90
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
91
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "auth/register"),
87
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
88
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
89
+ 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.ForumEnvironment.Production, "auth/register"),
92
90
  method: "POST",
93
91
  headers: _headers,
94
92
  contentType: "application/json",
95
93
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
96
94
  requestType: "json",
97
95
  body: request,
98
- timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
99
- maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
96
+ 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,
97
+ 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,
100
98
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
101
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
99
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
102
100
  logging: this._options.logging,
103
101
  });
104
102
  if (_response.ok) {
@@ -150,23 +148,21 @@ class AuthClient {
150
148
  }
151
149
  __login(request, requestOptions) {
152
150
  return __awaiter(this, void 0, void 0, function* () {
153
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
151
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
154
152
  const _authRequest = yield this._options.authProvider.getAuthRequest();
155
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
156
- "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
157
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
158
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
159
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "auth/login"),
153
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
154
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
155
+ 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.ForumEnvironment.Production, "auth/login"),
160
156
  method: "POST",
161
157
  headers: _headers,
162
158
  contentType: "application/json",
163
159
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
164
160
  requestType: "json",
165
161
  body: request,
166
- timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
167
- maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
162
+ 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,
163
+ 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,
168
164
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
169
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
165
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
170
166
  logging: this._options.logging,
171
167
  });
172
168
  if (_response.ok) {
@@ -211,20 +207,18 @@ class AuthClient {
211
207
  }
212
208
  __me(requestOptions) {
213
209
  return __awaiter(this, void 0, void 0, function* () {
214
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
210
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
215
211
  const _authRequest = yield this._options.authProvider.getAuthRequest();
216
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
217
- "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
218
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
219
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
220
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "auth/me"),
212
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
213
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
214
+ 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.ForumEnvironment.Production, "auth/me"),
221
215
  method: "GET",
222
216
  headers: _headers,
223
217
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
224
- timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
225
- maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
218
+ 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,
219
+ 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,
226
220
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
227
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
221
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
228
222
  logging: this._options.logging,
229
223
  });
230
224
  if (_response.ok) {
@@ -273,23 +267,21 @@ class AuthClient {
273
267
  }
274
268
  __forgotPassword(request, requestOptions) {
275
269
  return __awaiter(this, void 0, void 0, function* () {
276
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
270
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
277
271
  const _authRequest = yield this._options.authProvider.getAuthRequest();
278
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
279
- "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
280
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
281
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
282
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "auth/forgot-password"),
272
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
273
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
274
+ 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.ForumEnvironment.Production, "auth/forgot-password"),
283
275
  method: "POST",
284
276
  headers: _headers,
285
277
  contentType: "application/json",
286
278
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
287
279
  requestType: "json",
288
280
  body: request,
289
- timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
290
- maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
281
+ 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,
282
+ 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,
291
283
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
292
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
284
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
293
285
  logging: this._options.logging,
294
286
  });
295
287
  if (_response.ok) {
@@ -340,23 +332,21 @@ class AuthClient {
340
332
  }
341
333
  __resetPassword(request, requestOptions) {
342
334
  return __awaiter(this, void 0, void 0, function* () {
343
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
335
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
344
336
  const _authRequest = yield this._options.authProvider.getAuthRequest();
345
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
346
- "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
347
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
348
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
349
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "auth/reset-password"),
337
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
338
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
339
+ 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.ForumEnvironment.Production, "auth/reset-password"),
350
340
  method: "POST",
351
341
  headers: _headers,
352
342
  contentType: "application/json",
353
343
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
354
344
  requestType: "json",
355
345
  body: request,
356
- timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
357
- maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
346
+ 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,
347
+ 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,
358
348
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
359
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
349
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
360
350
  logging: this._options.logging,
361
351
  });
362
352
  if (_response.ok) {
@@ -12,7 +12,7 @@ export declare namespace IntegrationsClient {
12
12
  */
13
13
  export declare class IntegrationsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<IntegrationsClient.Options>;
15
- constructor(options: IntegrationsClient.Options);
15
+ constructor(options?: IntegrationsClient.Options);
16
16
  /**
17
17
  * Retrieve a paginated list of integrations. Use cursor for pagination.
18
18
  *
@@ -66,7 +66,7 @@ const Forum = __importStar(require("../../../index.js"));
66
66
  * Operations for integrations
67
67
  */
68
68
  class IntegrationsClient {
69
- constructor(options) {
69
+ constructor(options = {}) {
70
70
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
71
71
  }
72
72
  /**
@@ -90,25 +90,23 @@ class IntegrationsClient {
90
90
  }
91
91
  __list() {
92
92
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
93
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
93
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
94
94
  const { limit, cursor } = request;
95
95
  const _queryParams = {
96
96
  limit,
97
97
  cursor,
98
98
  };
99
99
  const _authRequest = yield this._options.authProvider.getAuthRequest();
100
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
101
- "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
102
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
103
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
104
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "integrations"),
100
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
101
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
102
+ 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.ForumEnvironment.Production, "integrations"),
105
103
  method: "GET",
106
104
  headers: _headers,
107
105
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
108
- timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
109
- maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
106
+ 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,
107
+ 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,
110
108
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
111
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
109
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
112
110
  logging: this._options.logging,
113
111
  });
114
112
  if (_response.ok) {
@@ -163,23 +161,21 @@ class IntegrationsClient {
163
161
  }
164
162
  __create(request, requestOptions) {
165
163
  return __awaiter(this, void 0, void 0, function* () {
166
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
164
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
167
165
  const _authRequest = yield this._options.authProvider.getAuthRequest();
168
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
169
- "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
170
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
171
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
172
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "integrations"),
166
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
167
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
168
+ 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.ForumEnvironment.Production, "integrations"),
173
169
  method: "POST",
174
170
  headers: _headers,
175
171
  contentType: "application/json",
176
172
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
177
173
  requestType: "json",
178
174
  body: request,
179
- timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
180
- maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
175
+ 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,
176
+ 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,
181
177
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
182
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
178
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
183
179
  logging: this._options.logging,
184
180
  });
185
181
  if (_response.ok) {
@@ -232,21 +228,19 @@ class IntegrationsClient {
232
228
  }
233
229
  __retrieve(request, requestOptions) {
234
230
  return __awaiter(this, void 0, void 0, function* () {
235
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
231
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
236
232
  const { id } = request;
237
233
  const _authRequest = yield this._options.authProvider.getAuthRequest();
238
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
239
- "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
240
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
241
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
242
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
234
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
235
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
236
+ 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.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
243
237
  method: "GET",
244
238
  headers: _headers,
245
239
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
246
- timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
247
- maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
240
+ 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,
241
+ 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,
248
242
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
249
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
243
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
250
244
  logging: this._options.logging,
251
245
  });
252
246
  if (_response.ok) {
@@ -299,21 +293,19 @@ class IntegrationsClient {
299
293
  }
300
294
  __delete(request, requestOptions) {
301
295
  return __awaiter(this, void 0, void 0, function* () {
302
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
296
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
303
297
  const { id } = request;
304
298
  const _authRequest = yield this._options.authProvider.getAuthRequest();
305
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
306
- "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
307
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
308
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
309
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
299
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
300
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
301
+ 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.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
310
302
  method: "DELETE",
311
303
  headers: _headers,
312
304
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
313
- timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
314
- maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
305
+ 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,
306
+ 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,
315
307
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
316
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
308
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
317
309
  logging: this._options.logging,
318
310
  });
319
311
  if (_response.ok) {
@@ -367,24 +359,22 @@ class IntegrationsClient {
367
359
  }
368
360
  __update(request, requestOptions) {
369
361
  return __awaiter(this, void 0, void 0, function* () {
370
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
362
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
371
363
  const { id } = request, _body = __rest(request, ["id"]);
372
364
  const _authRequest = yield this._options.authProvider.getAuthRequest();
373
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
374
- "x-provisioning-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.provisioningKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.provisioningKey,
375
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
376
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
377
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
365
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
366
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
367
+ 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.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
378
368
  method: "PATCH",
379
369
  headers: _headers,
380
370
  contentType: "application/json",
381
371
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
382
372
  requestType: "json",
383
373
  body: _body,
384
- timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
385
- maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
374
+ 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,
375
+ 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
376
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
387
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
377
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
388
378
  logging: this._options.logging,
389
379
  });
390
380
  if (_response.ok) {
@@ -12,7 +12,7 @@ export declare namespace NotificationsClient {
12
12
  */
13
13
  export declare class NotificationsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<NotificationsClient.Options>;
15
- constructor(options: NotificationsClient.Options);
15
+ constructor(options?: NotificationsClient.Options);
16
16
  /**
17
17
  * Retrieve a paginated list of notifications. Use cursor for pagination.
18
18
  *