@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
@@ -8,6 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
11
22
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
23
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
13
24
  import * as core from "../../../../core/index.mjs";
@@ -19,7 +30,7 @@ import * as Forum from "../../../index.mjs";
19
30
  * Platform-level instance management using your provisioning key
20
31
  */
21
32
  export class ProvisioningClient {
22
- constructor(options) {
33
+ constructor(options = {}) {
23
34
  this._options = normalizeClientOptionsWithAuth(options);
24
35
  }
25
36
  /**
@@ -33,31 +44,31 @@ export class ProvisioningClient {
33
44
  * @throws {@link Forum.InternalServerError}
34
45
  *
35
46
  * @example
36
- * await client.provisioning.list()
47
+ * await client.provisioning.list({
48
+ * "x-provisioning-key": "x-provisioning-key"
49
+ * })
37
50
  */
38
- list(request = {}, requestOptions) {
51
+ list(request, requestOptions) {
39
52
  return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
40
53
  }
41
- __list() {
42
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
43
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
44
- const { handle } = request;
54
+ __list(request, requestOptions) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
57
+ const { handle, "x-provisioning-key": provisioningKey } = request;
45
58
  const _queryParams = {
46
59
  handle,
47
60
  };
48
61
  const _authRequest = yield this._options.authProvider.getAuthRequest();
49
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
50
- "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,
51
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
52
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
53
- 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, "provisioning/instances"),
62
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), 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.ForumEnvironment.Production, "provisioning/instances"),
54
65
  method: "GET",
55
66
  headers: _headers,
56
67
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
57
- 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,
58
- 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,
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,
59
70
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
60
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
71
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
61
72
  logging: this._options.logging,
62
73
  });
63
74
  if (_response.ok) {
@@ -94,6 +105,7 @@ export class ProvisioningClient {
94
105
  *
95
106
  * @example
96
107
  * await client.provisioning.create({
108
+ * "x-provisioning-key": "x-provisioning-key",
97
109
  * name: "name",
98
110
  * handle: "handle"
99
111
  * })
@@ -103,23 +115,22 @@ export class ProvisioningClient {
103
115
  }
104
116
  __create(request, requestOptions) {
105
117
  return __awaiter(this, void 0, void 0, function* () {
106
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
118
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
119
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
107
120
  const _authRequest = yield this._options.authProvider.getAuthRequest();
108
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
109
- "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,
110
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
111
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
112
- 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, "provisioning/instances"),
121
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
122
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
123
+ 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, "provisioning/instances"),
113
124
  method: "POST",
114
125
  headers: _headers,
115
126
  contentType: "application/json",
116
127
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
117
128
  requestType: "json",
118
- body: request,
119
- 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,
120
- 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,
129
+ body: _body,
130
+ 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,
131
+ 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,
121
132
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
122
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
133
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
123
134
  logging: this._options.logging,
124
135
  });
125
136
  if (_response.ok) {
@@ -157,6 +168,7 @@ export class ProvisioningClient {
157
168
  *
158
169
  * @example
159
170
  * await client.provisioning.update({
171
+ * "x-provisioning-key": "x-provisioning-key",
160
172
  * handle: "handle"
161
173
  * })
162
174
  */
@@ -165,23 +177,22 @@ export class ProvisioningClient {
165
177
  }
166
178
  __update(request, requestOptions) {
167
179
  return __awaiter(this, void 0, void 0, function* () {
168
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
180
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
181
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
169
182
  const _authRequest = yield this._options.authProvider.getAuthRequest();
170
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
171
- "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,
172
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
173
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
174
- 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, "provisioning/instances"),
183
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
184
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
185
+ 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, "provisioning/instances"),
175
186
  method: "PUT",
176
187
  headers: _headers,
177
188
  contentType: "application/json",
178
189
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
179
190
  requestType: "json",
180
- body: request,
181
- 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,
182
- 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,
191
+ body: _body,
192
+ 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,
193
+ 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,
183
194
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
184
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
195
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
185
196
  logging: this._options.logging,
186
197
  });
187
198
  if (_response.ok) {
@@ -221,6 +232,7 @@ export class ProvisioningClient {
221
232
  *
222
233
  * @example
223
234
  * await client.provisioning.delete({
235
+ * "x-provisioning-key": "x-provisioning-key",
224
236
  * handle: "handle"
225
237
  * })
226
238
  */
@@ -229,23 +241,22 @@ export class ProvisioningClient {
229
241
  }
230
242
  __delete(request, requestOptions) {
231
243
  return __awaiter(this, void 0, void 0, function* () {
232
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
244
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
245
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
233
246
  const _authRequest = yield this._options.authProvider.getAuthRequest();
234
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
235
- "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,
236
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
237
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
238
- 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, "provisioning/instances"),
247
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
248
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
249
+ 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, "provisioning/instances"),
239
250
  method: "DELETE",
240
251
  headers: _headers,
241
252
  contentType: "application/json",
242
253
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
243
254
  requestType: "json",
244
- body: request,
245
- 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,
246
- 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,
255
+ body: _body,
256
+ 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,
257
+ 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,
247
258
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
248
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
259
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
249
260
  logging: this._options.logging,
250
261
  });
251
262
  if (_response.ok) {
@@ -284,6 +295,7 @@ export class ProvisioningClient {
284
295
  *
285
296
  * @example
286
297
  * await client.provisioning.getBilling({
298
+ * "x-provisioning-key": "x-provisioning-key",
287
299
  * handle: "handle"
288
300
  * })
289
301
  */
@@ -292,24 +304,22 @@ export class ProvisioningClient {
292
304
  }
293
305
  __getBilling(request, requestOptions) {
294
306
  return __awaiter(this, void 0, void 0, function* () {
295
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
296
- const { handle } = request;
307
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
308
+ const { handle, "x-provisioning-key": provisioningKey } = request;
297
309
  const _queryParams = {
298
310
  handle,
299
311
  };
300
312
  const _authRequest = yield this._options.authProvider.getAuthRequest();
301
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
302
- "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,
303
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
304
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
305
- 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, "provisioning/instances/billing"),
313
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
314
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
315
+ 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, "provisioning/instances/billing"),
306
316
  method: "GET",
307
317
  headers: _headers,
308
318
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
309
- 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,
310
- 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,
319
+ 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,
320
+ 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,
311
321
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
312
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
322
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
313
323
  logging: this._options.logging,
314
324
  });
315
325
  if (_response.ok) {
@@ -347,6 +357,7 @@ export class ProvisioningClient {
347
357
  *
348
358
  * @example
349
359
  * await client.provisioning.changePlan({
360
+ * "x-provisioning-key": "x-provisioning-key",
350
361
  * handle: "handle",
351
362
  * plan: "FREE"
352
363
  * })
@@ -356,23 +367,22 @@ export class ProvisioningClient {
356
367
  }
357
368
  __changePlan(request, requestOptions) {
358
369
  return __awaiter(this, void 0, void 0, function* () {
359
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
370
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
371
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
360
372
  const _authRequest = yield this._options.authProvider.getAuthRequest();
361
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
362
- "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,
363
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
364
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
365
- 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, "provisioning/instances/billing"),
373
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
374
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
375
+ 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, "provisioning/instances/billing"),
366
376
  method: "POST",
367
377
  headers: _headers,
368
378
  contentType: "application/json",
369
379
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
370
380
  requestType: "json",
371
- body: request,
372
- 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,
373
- 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,
381
+ body: _body,
382
+ 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,
383
+ 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,
374
384
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
375
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
385
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
376
386
  logging: this._options.logging,
377
387
  });
378
388
  if (_response.ok) {
@@ -411,6 +421,7 @@ export class ProvisioningClient {
411
421
  *
412
422
  * @example
413
423
  * await client.provisioning.regenerateApiKey({
424
+ * "x-provisioning-key": "x-provisioning-key",
414
425
  * handle: "handle"
415
426
  * })
416
427
  */
@@ -419,23 +430,22 @@ export class ProvisioningClient {
419
430
  }
420
431
  __regenerateApiKey(request, requestOptions) {
421
432
  return __awaiter(this, void 0, void 0, function* () {
422
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
433
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
434
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
423
435
  const _authRequest = yield this._options.authProvider.getAuthRequest();
424
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
425
- "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,
426
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
427
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
428
- 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, "provisioning/instances/api-key"),
436
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
437
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
438
+ 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, "provisioning/instances/api-key"),
429
439
  method: "POST",
430
440
  headers: _headers,
431
441
  contentType: "application/json",
432
442
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
433
443
  requestType: "json",
434
- body: request,
435
- 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,
436
- 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,
444
+ body: _body,
445
+ 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,
446
+ 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,
437
447
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
438
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
448
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
439
449
  logging: this._options.logging,
440
450
  });
441
451
  if (_response.ok) {
@@ -475,6 +485,7 @@ export class ProvisioningClient {
475
485
  *
476
486
  * @example
477
487
  * await client.provisioning.getUsage({
488
+ * "x-provisioning-key": "x-provisioning-key",
478
489
  * handle: "handle"
479
490
  * })
480
491
  */
@@ -483,24 +494,22 @@ export class ProvisioningClient {
483
494
  }
484
495
  __getUsage(request, requestOptions) {
485
496
  return __awaiter(this, void 0, void 0, function* () {
486
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
487
- const { handle } = request;
497
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
498
+ const { handle, "x-provisioning-key": provisioningKey } = request;
488
499
  const _queryParams = {
489
500
  handle,
490
501
  };
491
502
  const _authRequest = yield this._options.authProvider.getAuthRequest();
492
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
493
- "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,
494
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
495
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
496
- 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, "provisioning/instances/usage"),
503
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
504
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
505
+ 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, "provisioning/instances/usage"),
497
506
  method: "GET",
498
507
  headers: _headers,
499
508
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
500
- 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,
501
- 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,
509
+ 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,
510
+ 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,
502
511
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
503
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
512
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
504
513
  logging: this._options.logging,
505
514
  });
506
515
  if (_response.ok) {
@@ -537,6 +546,7 @@ export class ProvisioningClient {
537
546
  *
538
547
  * @example
539
548
  * await client.provisioning.listTeam({
549
+ * "x-provisioning-key": "x-provisioning-key",
540
550
  * handle: "handle"
541
551
  * })
542
552
  */
@@ -545,24 +555,22 @@ export class ProvisioningClient {
545
555
  }
546
556
  __listTeam(request, requestOptions) {
547
557
  return __awaiter(this, void 0, void 0, function* () {
548
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
549
- const { handle } = request;
558
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
559
+ const { handle, "x-provisioning-key": provisioningKey } = request;
550
560
  const _queryParams = {
551
561
  handle,
552
562
  };
553
563
  const _authRequest = yield this._options.authProvider.getAuthRequest();
554
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
555
- "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,
556
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
557
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
558
- 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, "provisioning/instances/team"),
564
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
565
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
566
+ 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, "provisioning/instances/team"),
559
567
  method: "GET",
560
568
  headers: _headers,
561
569
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
562
- 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,
563
- 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,
570
+ 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,
571
+ 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,
564
572
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
565
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
573
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
566
574
  logging: this._options.logging,
567
575
  });
568
576
  if (_response.ok) {
@@ -600,6 +608,7 @@ export class ProvisioningClient {
600
608
  *
601
609
  * @example
602
610
  * await client.provisioning.inviteTeam({
611
+ * "x-provisioning-key": "x-provisioning-key",
603
612
  * handle: "handle",
604
613
  * members: [{
605
614
  * email: "email"
@@ -611,23 +620,22 @@ export class ProvisioningClient {
611
620
  }
612
621
  __inviteTeam(request, requestOptions) {
613
622
  return __awaiter(this, void 0, void 0, function* () {
614
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
623
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
624
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
615
625
  const _authRequest = yield this._options.authProvider.getAuthRequest();
616
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
617
- "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,
618
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
619
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
620
- 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, "provisioning/instances/team"),
626
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
627
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
628
+ 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, "provisioning/instances/team"),
621
629
  method: "POST",
622
630
  headers: _headers,
623
631
  contentType: "application/json",
624
632
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
625
633
  requestType: "json",
626
- body: request,
627
- 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,
628
- 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,
634
+ body: _body,
635
+ 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,
636
+ 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,
629
637
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
630
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
638
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
631
639
  logging: this._options.logging,
632
640
  });
633
641
  if (_response.ok) {
@@ -667,6 +675,7 @@ export class ProvisioningClient {
667
675
  *
668
676
  * @example
669
677
  * await client.provisioning.removeTeamMember({
678
+ * "x-provisioning-key": "x-provisioning-key",
670
679
  * handle: "handle",
671
680
  * email: "email"
672
681
  * })
@@ -676,23 +685,22 @@ export class ProvisioningClient {
676
685
  }
677
686
  __removeTeamMember(request, requestOptions) {
678
687
  return __awaiter(this, void 0, void 0, function* () {
679
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
688
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
689
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
680
690
  const _authRequest = yield this._options.authProvider.getAuthRequest();
681
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
682
- "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,
683
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
684
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
685
- 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, "provisioning/instances/team"),
691
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
692
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
693
+ 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, "provisioning/instances/team"),
686
694
  method: "DELETE",
687
695
  headers: _headers,
688
696
  contentType: "application/json",
689
697
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
690
698
  requestType: "json",
691
- body: request,
692
- 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,
693
- 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,
699
+ body: _body,
700
+ 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,
701
+ 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,
694
702
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
695
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
703
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
696
704
  logging: this._options.logging,
697
705
  });
698
706
  if (_response.ok) {
@@ -734,6 +742,7 @@ export class ProvisioningClient {
734
742
  *
735
743
  * @example
736
744
  * await client.provisioning.listDomains({
745
+ * "x-provisioning-key": "x-provisioning-key",
737
746
  * handle: "handle"
738
747
  * })
739
748
  */
@@ -742,24 +751,22 @@ export class ProvisioningClient {
742
751
  }
743
752
  __listDomains(request, requestOptions) {
744
753
  return __awaiter(this, void 0, void 0, function* () {
745
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
746
- const { handle } = request;
754
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
755
+ const { handle, "x-provisioning-key": provisioningKey } = request;
747
756
  const _queryParams = {
748
757
  handle,
749
758
  };
750
759
  const _authRequest = yield this._options.authProvider.getAuthRequest();
751
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
752
- "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,
753
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
754
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
755
- 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, "provisioning/instances/domains"),
760
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
761
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
762
+ 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, "provisioning/instances/domains"),
756
763
  method: "GET",
757
764
  headers: _headers,
758
765
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
759
- 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,
760
- 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,
766
+ 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,
767
+ 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,
761
768
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
762
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
769
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
763
770
  logging: this._options.logging,
764
771
  });
765
772
  if (_response.ok) {
@@ -800,6 +807,7 @@ export class ProvisioningClient {
800
807
  *
801
808
  * @example
802
809
  * await client.provisioning.addDomain({
810
+ * "x-provisioning-key": "x-provisioning-key",
803
811
  * handle: "handle",
804
812
  * name: "name"
805
813
  * })
@@ -809,23 +817,22 @@ export class ProvisioningClient {
809
817
  }
810
818
  __addDomain(request, requestOptions) {
811
819
  return __awaiter(this, void 0, void 0, function* () {
812
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
820
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
821
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
813
822
  const _authRequest = yield this._options.authProvider.getAuthRequest();
814
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
815
- "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,
816
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
817
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
818
- 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, "provisioning/instances/domains"),
823
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
824
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
825
+ 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, "provisioning/instances/domains"),
819
826
  method: "POST",
820
827
  headers: _headers,
821
828
  contentType: "application/json",
822
829
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
823
830
  requestType: "json",
824
- body: request,
825
- 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,
826
- 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,
831
+ body: _body,
832
+ 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,
833
+ 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,
827
834
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
828
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
835
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
829
836
  logging: this._options.logging,
830
837
  });
831
838
  if (_response.ok) {
@@ -865,6 +872,7 @@ export class ProvisioningClient {
865
872
  *
866
873
  * @example
867
874
  * await client.provisioning.removeDomain({
875
+ * "x-provisioning-key": "x-provisioning-key",
868
876
  * handle: "handle",
869
877
  * name: "name"
870
878
  * })
@@ -874,23 +882,22 @@ export class ProvisioningClient {
874
882
  }
875
883
  __removeDomain(request, requestOptions) {
876
884
  return __awaiter(this, void 0, void 0, function* () {
877
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
885
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
886
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
878
887
  const _authRequest = yield this._options.authProvider.getAuthRequest();
879
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
880
- "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,
881
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
882
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
883
- 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, "provisioning/instances/domains"),
888
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
889
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
890
+ 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, "provisioning/instances/domains"),
884
891
  method: "DELETE",
885
892
  headers: _headers,
886
893
  contentType: "application/json",
887
894
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
888
895
  requestType: "json",
889
- body: request,
890
- 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,
891
- 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,
896
+ body: _body,
897
+ 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,
898
+ 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,
892
899
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
893
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
900
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
894
901
  logging: this._options.logging,
895
902
  });
896
903
  if (_response.ok) {
@@ -932,6 +939,7 @@ export class ProvisioningClient {
932
939
  *
933
940
  * @example
934
941
  * await client.provisioning.exportData({
942
+ * "x-provisioning-key": "x-provisioning-key",
935
943
  * handle: "handle"
936
944
  * })
937
945
  */
@@ -940,23 +948,22 @@ export class ProvisioningClient {
940
948
  }
941
949
  __exportData(request, requestOptions) {
942
950
  return __awaiter(this, void 0, void 0, function* () {
943
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
951
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
952
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
944
953
  const _authRequest = yield this._options.authProvider.getAuthRequest();
945
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
946
- "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,
947
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
948
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
949
- 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, "provisioning/instances/export"),
954
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
955
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
956
+ 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, "provisioning/instances/export"),
950
957
  method: "POST",
951
958
  headers: _headers,
952
959
  contentType: "application/json",
953
960
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
954
961
  requestType: "json",
955
- body: request,
956
- 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,
957
- 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,
962
+ body: _body,
963
+ 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,
964
+ 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,
958
965
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
959
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
966
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
960
967
  logging: this._options.logging,
961
968
  });
962
969
  if (_response.ok) {
@@ -993,6 +1000,7 @@ export class ProvisioningClient {
993
1000
  *
994
1001
  * @example
995
1002
  * await client.provisioning.listWebhooks({
1003
+ * "x-provisioning-key": "x-provisioning-key",
996
1004
  * handle: "handle"
997
1005
  * })
998
1006
  */
@@ -1001,24 +1009,22 @@ export class ProvisioningClient {
1001
1009
  }
1002
1010
  __listWebhooks(request, requestOptions) {
1003
1011
  return __awaiter(this, void 0, void 0, function* () {
1004
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1005
- const { handle } = request;
1012
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1013
+ const { handle, "x-provisioning-key": provisioningKey } = request;
1006
1014
  const _queryParams = {
1007
1015
  handle,
1008
1016
  };
1009
1017
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1010
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1011
- "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,
1012
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1013
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1014
- 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, "provisioning/instances/webhooks"),
1018
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1019
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1020
+ 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, "provisioning/instances/webhooks"),
1015
1021
  method: "GET",
1016
1022
  headers: _headers,
1017
1023
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1018
- 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,
1019
- 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,
1024
+ 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,
1025
+ 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,
1020
1026
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1021
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1027
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1022
1028
  logging: this._options.logging,
1023
1029
  });
1024
1030
  if (_response.ok) {
@@ -1059,6 +1065,7 @@ export class ProvisioningClient {
1059
1065
  *
1060
1066
  * @example
1061
1067
  * await client.provisioning.createWebhook({
1068
+ * "x-provisioning-key": "x-provisioning-key",
1062
1069
  * handle: "handle",
1063
1070
  * url: "url",
1064
1071
  * events: ["events"]
@@ -1069,23 +1076,22 @@ export class ProvisioningClient {
1069
1076
  }
1070
1077
  __createWebhook(request, requestOptions) {
1071
1078
  return __awaiter(this, void 0, void 0, function* () {
1072
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1079
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1080
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
1073
1081
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1074
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1075
- "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,
1076
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1077
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1078
- 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, "provisioning/instances/webhooks"),
1082
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1083
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1084
+ 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, "provisioning/instances/webhooks"),
1079
1085
  method: "POST",
1080
1086
  headers: _headers,
1081
1087
  contentType: "application/json",
1082
1088
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1083
1089
  requestType: "json",
1084
- body: request,
1085
- 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,
1086
- 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,
1090
+ body: _body,
1091
+ 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,
1092
+ 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,
1087
1093
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1088
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1094
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1089
1095
  logging: this._options.logging,
1090
1096
  });
1091
1097
  if (_response.ok) {
@@ -1128,6 +1134,7 @@ export class ProvisioningClient {
1128
1134
  *
1129
1135
  * @example
1130
1136
  * await client.provisioning.updateWebhook({
1137
+ * "x-provisioning-key": "x-provisioning-key",
1131
1138
  * handle: "handle",
1132
1139
  * webhookId: "webhookId"
1133
1140
  * })
@@ -1137,23 +1144,22 @@ export class ProvisioningClient {
1137
1144
  }
1138
1145
  __updateWebhook(request, requestOptions) {
1139
1146
  return __awaiter(this, void 0, void 0, function* () {
1140
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1147
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1148
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
1141
1149
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1142
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1143
- "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,
1144
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1145
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1146
- 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, "provisioning/instances/webhooks"),
1150
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1151
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1152
+ 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, "provisioning/instances/webhooks"),
1147
1153
  method: "PUT",
1148
1154
  headers: _headers,
1149
1155
  contentType: "application/json",
1150
1156
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1151
1157
  requestType: "json",
1152
- body: request,
1153
- 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,
1154
- 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,
1158
+ body: _body,
1159
+ 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,
1160
+ 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,
1155
1161
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1156
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1162
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1157
1163
  logging: this._options.logging,
1158
1164
  });
1159
1165
  if (_response.ok) {
@@ -1196,6 +1202,7 @@ export class ProvisioningClient {
1196
1202
  *
1197
1203
  * @example
1198
1204
  * await client.provisioning.deleteWebhook({
1205
+ * "x-provisioning-key": "x-provisioning-key",
1199
1206
  * handle: "handle",
1200
1207
  * webhookId: "webhookId"
1201
1208
  * })
@@ -1205,23 +1212,22 @@ export class ProvisioningClient {
1205
1212
  }
1206
1213
  __deleteWebhook(request, requestOptions) {
1207
1214
  return __awaiter(this, void 0, void 0, function* () {
1208
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1215
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1216
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
1209
1217
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1210
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1211
- "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,
1212
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1213
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1214
- 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, "provisioning/instances/webhooks"),
1218
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1219
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1220
+ 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, "provisioning/instances/webhooks"),
1215
1221
  method: "DELETE",
1216
1222
  headers: _headers,
1217
1223
  contentType: "application/json",
1218
1224
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1219
1225
  requestType: "json",
1220
- body: request,
1221
- 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,
1222
- 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,
1226
+ body: _body,
1227
+ 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,
1228
+ 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,
1223
1229
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1224
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1230
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1225
1231
  logging: this._options.logging,
1226
1232
  });
1227
1233
  if (_response.ok) {
@@ -1264,6 +1270,7 @@ export class ProvisioningClient {
1264
1270
  *
1265
1271
  * @example
1266
1272
  * await client.provisioning.getOwnership({
1273
+ * "x-provisioning-key": "x-provisioning-key",
1267
1274
  * handle: "handle"
1268
1275
  * })
1269
1276
  */
@@ -1272,24 +1279,22 @@ export class ProvisioningClient {
1272
1279
  }
1273
1280
  __getOwnership(request, requestOptions) {
1274
1281
  return __awaiter(this, void 0, void 0, function* () {
1275
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1276
- const { handle } = request;
1282
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1283
+ const { handle, "x-provisioning-key": provisioningKey } = request;
1277
1284
  const _queryParams = {
1278
1285
  handle,
1279
1286
  };
1280
1287
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1281
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1282
- "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,
1283
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1284
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1285
- 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, "provisioning/instances/ownership"),
1288
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1289
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1290
+ 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, "provisioning/instances/ownership"),
1286
1291
  method: "GET",
1287
1292
  headers: _headers,
1288
1293
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1289
- 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,
1290
- 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,
1294
+ 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,
1295
+ 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,
1291
1296
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1292
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1297
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1293
1298
  logging: this._options.logging,
1294
1299
  });
1295
1300
  if (_response.ok) {
@@ -1332,6 +1337,7 @@ export class ProvisioningClient {
1332
1337
  *
1333
1338
  * @example
1334
1339
  * await client.provisioning.transferOwnership({
1340
+ * "x-provisioning-key": "x-provisioning-key",
1335
1341
  * handle: "handle",
1336
1342
  * newOwnerEmail: "newOwnerEmail"
1337
1343
  * })
@@ -1341,23 +1347,22 @@ export class ProvisioningClient {
1341
1347
  }
1342
1348
  __transferOwnership(request, requestOptions) {
1343
1349
  return __awaiter(this, void 0, void 0, function* () {
1344
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1350
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1351
+ const { "x-provisioning-key": provisioningKey } = request, _body = __rest(request, ["x-provisioning-key"]);
1345
1352
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1346
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1347
- "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,
1348
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1349
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1350
- 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, "provisioning/instances/ownership"),
1353
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-provisioning-key": provisioningKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1354
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1355
+ 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, "provisioning/instances/ownership"),
1351
1356
  method: "POST",
1352
1357
  headers: _headers,
1353
1358
  contentType: "application/json",
1354
1359
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1355
1360
  requestType: "json",
1356
- body: request,
1357
- 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,
1358
- 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,
1361
+ body: _body,
1362
+ 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,
1363
+ 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,
1359
1364
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1360
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1365
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1361
1366
  logging: this._options.logging,
1362
1367
  });
1363
1368
  if (_response.ok) {
@@ -1408,23 +1413,21 @@ export class ProvisioningClient {
1408
1413
  }
1409
1414
  __register(request, requestOptions) {
1410
1415
  return __awaiter(this, void 0, void 0, function* () {
1411
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1416
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1412
1417
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1413
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1414
- "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,
1415
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1416
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1417
- 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, "provisioning/register"),
1418
+ 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);
1419
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1420
+ 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, "provisioning/register"),
1418
1421
  method: "POST",
1419
1422
  headers: _headers,
1420
1423
  contentType: "application/json",
1421
1424
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1422
1425
  requestType: "json",
1423
1426
  body: request,
1424
- 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,
1425
- 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,
1427
+ 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,
1428
+ 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,
1426
1429
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1427
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1430
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1428
1431
  logging: this._options.logging,
1429
1432
  });
1430
1433
  if (_response.ok) {
@@ -1469,23 +1472,21 @@ export class ProvisioningClient {
1469
1472
  }
1470
1473
  __login(request, requestOptions) {
1471
1474
  return __awaiter(this, void 0, void 0, function* () {
1472
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1475
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1473
1476
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1474
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1475
- "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,
1476
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1477
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1478
- 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, "provisioning/login"),
1477
+ 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);
1478
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1479
+ 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, "provisioning/login"),
1479
1480
  method: "POST",
1480
1481
  headers: _headers,
1481
1482
  contentType: "application/json",
1482
1483
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1483
1484
  requestType: "json",
1484
1485
  body: request,
1485
- 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,
1486
- 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,
1486
+ 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,
1487
+ 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,
1487
1488
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1488
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1489
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1489
1490
  logging: this._options.logging,
1490
1491
  });
1491
1492
  if (_response.ok) {