@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.
- package/README.md +1 -1
- package/dist/cjs/BaseClient.d.ts +0 -4
- package/dist/cjs/BaseClient.js +2 -3
- package/dist/cjs/Client.d.ts +1 -1
- package/dist/cjs/Client.js +1 -1
- package/dist/cjs/api/resources/auth/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/auth/client/Client.js +36 -46
- package/dist/cjs/api/resources/integrations/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/integrations/client/Client.js +36 -46
- package/dist/cjs/api/resources/notifications/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/notifications/client/Client.js +36 -46
- package/dist/cjs/api/resources/posts/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/posts/client/Client.js +85 -109
- package/dist/cjs/api/resources/privateMessages/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/privateMessages/client/Client.js +64 -82
- package/dist/cjs/api/resources/provisioning/client/Client.d.ts +25 -3
- package/dist/cjs/api/resources/provisioning/client/Client.js +234 -233
- package/dist/cjs/api/resources/provisioning/client/requests/AddDomainProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/CreateInstance.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/CreateWebhookProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/DeleteInstance.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/DeleteWebhookProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/ExportDataProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/GetBillingProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/GetOwnershipProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/GetUsageProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/InviteTeamProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/ListDomainsProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/ListProvisioningRequest.d.ts +5 -1
- package/dist/cjs/api/resources/provisioning/client/requests/ListTeamProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/ListWebhooksProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/RegenerateApiKeyProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/RemoveDomainProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/RemoveTeamMemberProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/TransferOwnershipProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/UpdateInstance.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/UpdateWebhookProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/UpgradeInstance.d.ts +3 -0
- package/dist/cjs/api/resources/reports/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/reports/client/Client.js +36 -46
- package/dist/cjs/api/resources/roles/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/roles/client/Client.js +36 -46
- package/dist/cjs/api/resources/search/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/search/client/Client.js +8 -10
- package/dist/cjs/api/resources/ssOs/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/ssOs/client/Client.js +36 -46
- package/dist/cjs/api/resources/tags/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tags/client/Client.js +57 -73
- package/dist/cjs/api/resources/threads/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/threads/client/Client.js +127 -163
- package/dist/cjs/api/resources/threads/types/UpdateThreadsResponse.d.ts +20 -0
- package/dist/cjs/api/resources/threads/types/UpdateThreadsResponse.js +19 -0
- package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/Client.js +78 -100
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +57 -73
- package/dist/cjs/api/types/Thread.d.ts +22 -0
- package/dist/cjs/api/types/Thread.js +16 -0
- package/dist/cjs/api/types/ThreadListResponse.d.ts +20 -0
- package/dist/cjs/api/types/ThreadListResponse.js +25 -0
- package/dist/cjs/api/types/ThreadResponse.d.ts +20 -0
- package/dist/cjs/api/types/ThreadResponse.js +19 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +0 -4
- package/dist/esm/BaseClient.mjs +2 -3
- package/dist/esm/Client.d.mts +1 -1
- package/dist/esm/Client.mjs +1 -1
- package/dist/esm/api/resources/auth/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/auth/client/Client.mjs +37 -47
- package/dist/esm/api/resources/integrations/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/integrations/client/Client.mjs +37 -47
- package/dist/esm/api/resources/notifications/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/notifications/client/Client.mjs +37 -47
- package/dist/esm/api/resources/posts/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/posts/client/Client.mjs +86 -110
- package/dist/esm/api/resources/privateMessages/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/privateMessages/client/Client.mjs +65 -83
- package/dist/esm/api/resources/provisioning/client/Client.d.mts +25 -3
- package/dist/esm/api/resources/provisioning/client/Client.mjs +234 -233
- package/dist/esm/api/resources/provisioning/client/requests/AddDomainProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/CreateInstance.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/CreateWebhookProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/DeleteInstance.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/DeleteWebhookProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/ExportDataProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/GetBillingProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/GetOwnershipProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/GetUsageProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/InviteTeamProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/ListDomainsProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/ListProvisioningRequest.d.mts +5 -1
- package/dist/esm/api/resources/provisioning/client/requests/ListTeamProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/ListWebhooksProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/RegenerateApiKeyProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/RemoveDomainProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/RemoveTeamMemberProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/TransferOwnershipProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/UpdateInstance.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/UpdateWebhookProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/UpgradeInstance.d.mts +3 -0
- package/dist/esm/api/resources/reports/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/reports/client/Client.mjs +37 -47
- package/dist/esm/api/resources/roles/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/roles/client/Client.mjs +37 -47
- package/dist/esm/api/resources/search/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/search/client/Client.mjs +9 -11
- package/dist/esm/api/resources/ssOs/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/ssOs/client/Client.mjs +37 -47
- package/dist/esm/api/resources/tags/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tags/client/Client.mjs +58 -74
- package/dist/esm/api/resources/threads/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/threads/client/Client.mjs +128 -164
- package/dist/esm/api/resources/threads/types/UpdateThreadsResponse.d.mts +20 -0
- package/dist/esm/api/resources/threads/types/UpdateThreadsResponse.mjs +18 -1
- package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/users/client/Client.mjs +79 -101
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +58 -74
- package/dist/esm/api/types/Thread.d.mts +22 -0
- package/dist/esm/api/types/Thread.mjs +15 -1
- package/dist/esm/api/types/ThreadListResponse.d.mts +20 -0
- package/dist/esm/api/types/ThreadListResponse.mjs +24 -1
- package/dist/esm/api/types/ThreadResponse.d.mts +20 -0
- package/dist/esm/api/types/ThreadResponse.mjs +18 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +23 -1
|
@@ -66,7 +66,7 @@ const Forum = __importStar(require("../../../index.js"));
|
|
|
66
66
|
* Operations for webhooks
|
|
67
67
|
*/
|
|
68
68
|
class WebhooksClient {
|
|
69
|
-
constructor(options) {
|
|
69
|
+
constructor(options = {}) {
|
|
70
70
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -90,25 +90,23 @@ class WebhooksClient {
|
|
|
90
90
|
}
|
|
91
91
|
__list() {
|
|
92
92
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
93
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
93
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
94
94
|
const { limit, cursor } = request;
|
|
95
95
|
const _queryParams = {
|
|
96
96
|
limit,
|
|
97
97
|
cursor,
|
|
98
98
|
};
|
|
99
99
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
100
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
104
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "webhooks"),
|
|
100
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
101
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
102
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, "webhooks"),
|
|
105
103
|
method: "GET",
|
|
106
104
|
headers: _headers,
|
|
107
105
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
108
|
-
timeoutMs: ((
|
|
109
|
-
maxRetries: (
|
|
106
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
107
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
110
108
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
-
fetchFn: (
|
|
109
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
112
110
|
logging: this._options.logging,
|
|
113
111
|
});
|
|
114
112
|
if (_response.ok) {
|
|
@@ -161,23 +159,21 @@ class WebhooksClient {
|
|
|
161
159
|
}
|
|
162
160
|
__create(request, requestOptions) {
|
|
163
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
162
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
165
163
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
166
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
170
|
-
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, "webhooks"),
|
|
164
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
165
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
166
|
+
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, "webhooks"),
|
|
171
167
|
method: "POST",
|
|
172
168
|
headers: _headers,
|
|
173
169
|
contentType: "application/json",
|
|
174
170
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
175
171
|
requestType: "json",
|
|
176
172
|
body: request,
|
|
177
|
-
timeoutMs: ((
|
|
178
|
-
maxRetries: (
|
|
173
|
+
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,
|
|
174
|
+
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,
|
|
179
175
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
180
|
-
fetchFn: (
|
|
176
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
181
177
|
logging: this._options.logging,
|
|
182
178
|
});
|
|
183
179
|
if (_response.ok) {
|
|
@@ -230,21 +226,19 @@ class WebhooksClient {
|
|
|
230
226
|
}
|
|
231
227
|
__retrieve(request, requestOptions) {
|
|
232
228
|
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
229
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
234
230
|
const { id } = request;
|
|
235
231
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
236
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
240
|
-
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
232
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
233
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
234
|
+
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
241
235
|
method: "GET",
|
|
242
236
|
headers: _headers,
|
|
243
237
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
244
|
-
timeoutMs: ((
|
|
245
|
-
maxRetries: (
|
|
238
|
+
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,
|
|
239
|
+
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,
|
|
246
240
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
247
|
-
fetchFn: (
|
|
241
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
248
242
|
logging: this._options.logging,
|
|
249
243
|
});
|
|
250
244
|
if (_response.ok) {
|
|
@@ -297,21 +291,19 @@ class WebhooksClient {
|
|
|
297
291
|
}
|
|
298
292
|
__delete(request, requestOptions) {
|
|
299
293
|
return __awaiter(this, void 0, void 0, function* () {
|
|
300
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
294
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
301
295
|
const { id } = request;
|
|
302
296
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
303
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
307
|
-
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
297
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
298
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
299
|
+
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
308
300
|
method: "DELETE",
|
|
309
301
|
headers: _headers,
|
|
310
302
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
311
|
-
timeoutMs: ((
|
|
312
|
-
maxRetries: (
|
|
303
|
+
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,
|
|
304
|
+
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,
|
|
313
305
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
314
|
-
fetchFn: (
|
|
306
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
315
307
|
logging: this._options.logging,
|
|
316
308
|
});
|
|
317
309
|
if (_response.ok) {
|
|
@@ -365,24 +357,22 @@ class WebhooksClient {
|
|
|
365
357
|
}
|
|
366
358
|
__update(request, requestOptions) {
|
|
367
359
|
return __awaiter(this, void 0, void 0, function* () {
|
|
368
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
360
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
369
361
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
370
362
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
371
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
375
|
-
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
363
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
364
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
365
|
+
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
376
366
|
method: "PATCH",
|
|
377
367
|
headers: _headers,
|
|
378
368
|
contentType: "application/json",
|
|
379
369
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
380
370
|
requestType: "json",
|
|
381
371
|
body: _body,
|
|
382
|
-
timeoutMs: ((
|
|
383
|
-
maxRetries: (
|
|
372
|
+
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,
|
|
373
|
+
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,
|
|
384
374
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
385
|
-
fetchFn: (
|
|
375
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
386
376
|
logging: this._options.logging,
|
|
387
377
|
});
|
|
388
378
|
if (_response.ok) {
|
|
@@ -436,25 +426,23 @@ class WebhooksClient {
|
|
|
436
426
|
}
|
|
437
427
|
__listDeliveries(request, requestOptions) {
|
|
438
428
|
return __awaiter(this, void 0, void 0, function* () {
|
|
439
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
429
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
440
430
|
const { id, cursor, limit } = request;
|
|
441
431
|
const _queryParams = {
|
|
442
432
|
cursor,
|
|
443
433
|
limit,
|
|
444
434
|
};
|
|
445
435
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
446
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
450
|
-
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, `webhooks/${core.url.encodePathParam(id)}/deliveries`),
|
|
436
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
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, `webhooks/${core.url.encodePathParam(id)}/deliveries`),
|
|
451
439
|
method: "GET",
|
|
452
440
|
headers: _headers,
|
|
453
441
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
454
|
-
timeoutMs: ((
|
|
455
|
-
maxRetries: (
|
|
442
|
+
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,
|
|
443
|
+
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,
|
|
456
444
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
457
|
-
fetchFn: (
|
|
445
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
458
446
|
logging: this._options.logging,
|
|
459
447
|
});
|
|
460
448
|
if (_response.ok) {
|
|
@@ -501,21 +489,19 @@ class WebhooksClient {
|
|
|
501
489
|
}
|
|
502
490
|
__retrieveDelivery(request, requestOptions) {
|
|
503
491
|
return __awaiter(this, void 0, void 0, function* () {
|
|
504
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
492
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
505
493
|
const { id, subId } = request;
|
|
506
494
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
507
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
511
|
-
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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
|
|
495
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
496
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
497
|
+
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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
|
|
512
498
|
method: "GET",
|
|
513
499
|
headers: _headers,
|
|
514
500
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
515
|
-
timeoutMs: ((
|
|
516
|
-
maxRetries: (
|
|
501
|
+
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,
|
|
502
|
+
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,
|
|
517
503
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
518
|
-
fetchFn: (
|
|
504
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
519
505
|
logging: this._options.logging,
|
|
520
506
|
});
|
|
521
507
|
if (_response.ok) {
|
|
@@ -565,21 +551,19 @@ class WebhooksClient {
|
|
|
565
551
|
}
|
|
566
552
|
__deleteDelivery(request, requestOptions) {
|
|
567
553
|
return __awaiter(this, void 0, void 0, function* () {
|
|
568
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
554
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
569
555
|
const { id, subId } = request;
|
|
570
556
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
571
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
575
|
-
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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
|
|
557
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
558
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
559
|
+
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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
|
|
576
560
|
method: "DELETE",
|
|
577
561
|
headers: _headers,
|
|
578
562
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
579
|
-
timeoutMs: ((
|
|
580
|
-
maxRetries: (
|
|
563
|
+
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,
|
|
564
|
+
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,
|
|
581
565
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
582
|
-
fetchFn: (
|
|
566
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
583
567
|
logging: this._options.logging,
|
|
584
568
|
});
|
|
585
569
|
if (_response.ok) {
|
|
@@ -25,6 +25,28 @@ export interface Thread {
|
|
|
25
25
|
postsCount: number;
|
|
26
26
|
/** Timestamp of the last post */
|
|
27
27
|
lastPostAt: string | null;
|
|
28
|
+
/** Thread reactions */
|
|
29
|
+
reactions?: Thread.Reactions.Item[];
|
|
28
30
|
createdAt: string;
|
|
29
31
|
updatedAt: string;
|
|
30
32
|
}
|
|
33
|
+
export declare namespace Thread {
|
|
34
|
+
type Reactions = Reactions.Item[];
|
|
35
|
+
namespace Reactions {
|
|
36
|
+
interface Item {
|
|
37
|
+
id: string;
|
|
38
|
+
type: Item.Type;
|
|
39
|
+
userId: string;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
}
|
|
42
|
+
namespace Item {
|
|
43
|
+
const Type: {
|
|
44
|
+
readonly Upvote: "UPVOTE";
|
|
45
|
+
readonly Downvote: "DOWNVOTE";
|
|
46
|
+
readonly Like: "LIKE";
|
|
47
|
+
readonly Dislike: "DISLIKE";
|
|
48
|
+
};
|
|
49
|
+
type Type = (typeof Type)[keyof typeof Type];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -1,3 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Thread = void 0;
|
|
5
|
+
var Thread;
|
|
6
|
+
(function (Thread) {
|
|
7
|
+
let Reactions;
|
|
8
|
+
(function (Reactions) {
|
|
9
|
+
let Item;
|
|
10
|
+
(function (Item) {
|
|
11
|
+
Item.Type = {
|
|
12
|
+
Upvote: "UPVOTE",
|
|
13
|
+
Downvote: "DOWNVOTE",
|
|
14
|
+
Like: "LIKE",
|
|
15
|
+
Dislike: "DISLIKE",
|
|
16
|
+
};
|
|
17
|
+
})(Item = Reactions.Item || (Reactions.Item = {}));
|
|
18
|
+
})(Reactions = Thread.Reactions || (Thread.Reactions = {}));
|
|
19
|
+
})(Thread || (exports.Thread = Thread = {}));
|
|
@@ -38,6 +38,8 @@ export declare namespace ThreadListResponse {
|
|
|
38
38
|
postsCount: number;
|
|
39
39
|
/** Timestamp of the last post */
|
|
40
40
|
lastPostAt: string | null;
|
|
41
|
+
/** Thread reactions */
|
|
42
|
+
reactions?: Item.Reactions.Item[];
|
|
41
43
|
createdAt: string;
|
|
42
44
|
updatedAt: string;
|
|
43
45
|
}
|
|
@@ -61,6 +63,24 @@ export declare namespace ThreadListResponse {
|
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
}
|
|
66
|
+
type Reactions = Reactions.Item[];
|
|
67
|
+
namespace Reactions {
|
|
68
|
+
interface Item {
|
|
69
|
+
id: string;
|
|
70
|
+
type: Item.Type;
|
|
71
|
+
userId: string;
|
|
72
|
+
createdAt: string;
|
|
73
|
+
}
|
|
74
|
+
namespace Item {
|
|
75
|
+
const Type: {
|
|
76
|
+
readonly Upvote: "UPVOTE";
|
|
77
|
+
readonly Downvote: "DOWNVOTE";
|
|
78
|
+
readonly Like: "LIKE";
|
|
79
|
+
readonly Dislike: "DISLIKE";
|
|
80
|
+
};
|
|
81
|
+
type Type = (typeof Type)[keyof typeof Type];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
64
84
|
}
|
|
65
85
|
}
|
|
66
86
|
}
|
|
@@ -1,3 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ThreadListResponse = void 0;
|
|
5
|
+
var ThreadListResponse;
|
|
6
|
+
(function (ThreadListResponse) {
|
|
7
|
+
let Data;
|
|
8
|
+
(function (Data) {
|
|
9
|
+
let Items;
|
|
10
|
+
(function (Items) {
|
|
11
|
+
let Item;
|
|
12
|
+
(function (Item_1) {
|
|
13
|
+
let Reactions;
|
|
14
|
+
(function (Reactions) {
|
|
15
|
+
let Item;
|
|
16
|
+
(function (Item) {
|
|
17
|
+
Item.Type = {
|
|
18
|
+
Upvote: "UPVOTE",
|
|
19
|
+
Downvote: "DOWNVOTE",
|
|
20
|
+
Like: "LIKE",
|
|
21
|
+
Dislike: "DISLIKE",
|
|
22
|
+
};
|
|
23
|
+
})(Item = Reactions.Item || (Reactions.Item = {}));
|
|
24
|
+
})(Reactions = Item_1.Reactions || (Item_1.Reactions = {}));
|
|
25
|
+
})(Item = Items.Item || (Items.Item = {}));
|
|
26
|
+
})(Items = Data.Items || (Data.Items = {}));
|
|
27
|
+
})(Data = ThreadListResponse.Data || (ThreadListResponse.Data = {}));
|
|
28
|
+
})(ThreadListResponse || (exports.ThreadListResponse = ThreadListResponse = {}));
|
|
@@ -28,6 +28,8 @@ export declare namespace ThreadResponse {
|
|
|
28
28
|
postsCount: number;
|
|
29
29
|
/** Timestamp of the last post */
|
|
30
30
|
lastPostAt: string | null;
|
|
31
|
+
/** Thread reactions */
|
|
32
|
+
reactions?: Data.Reactions.Item[];
|
|
31
33
|
createdAt: string;
|
|
32
34
|
updatedAt: string;
|
|
33
35
|
}
|
|
@@ -51,5 +53,23 @@ export declare namespace ThreadResponse {
|
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
}
|
|
56
|
+
type Reactions = Reactions.Item[];
|
|
57
|
+
namespace Reactions {
|
|
58
|
+
interface Item {
|
|
59
|
+
id: string;
|
|
60
|
+
type: Item.Type;
|
|
61
|
+
userId: string;
|
|
62
|
+
createdAt: string;
|
|
63
|
+
}
|
|
64
|
+
namespace Item {
|
|
65
|
+
const Type: {
|
|
66
|
+
readonly Upvote: "UPVOTE";
|
|
67
|
+
readonly Downvote: "DOWNVOTE";
|
|
68
|
+
readonly Like: "LIKE";
|
|
69
|
+
readonly Dislike: "DISLIKE";
|
|
70
|
+
};
|
|
71
|
+
type Type = (typeof Type)[keyof typeof Type];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
54
74
|
}
|
|
55
75
|
}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ThreadResponse = void 0;
|
|
5
|
+
var ThreadResponse;
|
|
6
|
+
(function (ThreadResponse) {
|
|
7
|
+
let Data;
|
|
8
|
+
(function (Data) {
|
|
9
|
+
let Reactions;
|
|
10
|
+
(function (Reactions) {
|
|
11
|
+
let Item;
|
|
12
|
+
(function (Item) {
|
|
13
|
+
Item.Type = {
|
|
14
|
+
Upvote: "UPVOTE",
|
|
15
|
+
Downvote: "DOWNVOTE",
|
|
16
|
+
Like: "LIKE",
|
|
17
|
+
Dislike: "DISLIKE",
|
|
18
|
+
};
|
|
19
|
+
})(Item = Reactions.Item || (Reactions.Item = {}));
|
|
20
|
+
})(Reactions = Data.Reactions || (Data.Reactions = {}));
|
|
21
|
+
})(Data = ThreadResponse.Data || (ThreadResponse.Data = {}));
|
|
22
|
+
})(ThreadResponse || (exports.ThreadResponse = ThreadResponse = {}));
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.1.
|
|
1
|
+
export declare const SDK_VERSION = "2.1.7";
|
package/dist/cjs/version.js
CHANGED
|
@@ -5,8 +5,6 @@ export type BaseClientOptions = {
|
|
|
5
5
|
environment?: core.Supplier<environments.ForumEnvironment | string>;
|
|
6
6
|
/** Specify a custom URL to connect the client to. */
|
|
7
7
|
baseUrl?: core.Supplier<string>;
|
|
8
|
-
/** Override the x-provisioning-key header */
|
|
9
|
-
provisioningKey: core.Supplier<string>;
|
|
10
8
|
/** Additional headers to include in requests. */
|
|
11
9
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
12
10
|
/** The default maximum time to wait for a response in seconds. */
|
|
@@ -26,8 +24,6 @@ export interface BaseRequestOptions {
|
|
|
26
24
|
maxRetries?: number;
|
|
27
25
|
/** A hook to abort the request. */
|
|
28
26
|
abortSignal?: AbortSignal;
|
|
29
|
-
/** Override the x-provisioning-key header */
|
|
30
|
-
provisioningKey?: string;
|
|
31
27
|
/** Additional query string parameters to include in the request. */
|
|
32
28
|
queryParams?: Record<string, unknown>;
|
|
33
29
|
/** Additional headers to include in the request. */
|
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,11 +6,10 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@foru-ms/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "2.1.
|
|
10
|
-
"User-Agent": "@foru-ms/sdk/2.1.
|
|
9
|
+
"X-Fern-SDK-Version": "2.1.7",
|
|
10
|
+
"User-Agent": "@foru-ms/sdk/2.1.7",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
|
-
"x-provisioning-key": options === null || options === void 0 ? void 0 : options.provisioningKey,
|
|
14
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
15
14
|
return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
|
|
16
15
|
}
|
package/dist/esm/Client.d.mts
CHANGED
|
@@ -35,7 +35,7 @@ export declare class ForumClient {
|
|
|
35
35
|
protected _integrations: IntegrationsClient | undefined;
|
|
36
36
|
protected _ssOs: SsOsClient | undefined;
|
|
37
37
|
protected _provisioning: ProvisioningClient | undefined;
|
|
38
|
-
constructor(options
|
|
38
|
+
constructor(options?: ForumClient.Options);
|
|
39
39
|
get auth(): AuthClient;
|
|
40
40
|
get search(): SearchClient;
|
|
41
41
|
get tags(): TagsClient;
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { UsersClient } from "./api/resources/users/client/Client.mjs";
|
|
|
15
15
|
import { WebhooksClient } from "./api/resources/webhooks/client/Client.mjs";
|
|
16
16
|
import { normalizeClientOptionsWithAuth } from "./BaseClient.mjs";
|
|
17
17
|
export class ForumClient {
|
|
18
|
-
constructor(options) {
|
|
18
|
+
constructor(options = {}) {
|
|
19
19
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
20
20
|
}
|
|
21
21
|
get auth() {
|
|
@@ -12,7 +12,7 @@ export declare namespace AuthClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class AuthClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<AuthClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: AuthClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Register a new user in your forum instance. Requires API key for instance identification. Returns a JWT token for subsequent authenticated requests.
|
|
18
18
|
*
|