@foru-ms/sdk 2.0.7 → 2.0.8
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/dist/cjs/BaseClient.d.ts +1 -0
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/auth/client/Client.js +30 -30
- package/dist/cjs/api/resources/integrations/client/Client.js +30 -30
- package/dist/cjs/api/resources/notifications/client/Client.js +30 -30
- package/dist/cjs/api/resources/posts/client/Client.js +78 -78
- package/dist/cjs/api/resources/privateMessages/client/Client.js +48 -48
- package/dist/cjs/api/resources/reports/client/Client.js +24 -24
- package/dist/cjs/api/resources/roles/client/Client.js +30 -30
- package/dist/cjs/api/resources/ssOs/client/Client.js +30 -30
- package/dist/cjs/api/resources/tags/client/Client.js +48 -48
- package/dist/cjs/api/resources/threads/client/Client.js +114 -114
- package/dist/cjs/api/resources/users/client/Client.js +60 -60
- package/dist/cjs/api/resources/webhooks/client/Client.js +42 -42
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +1 -0
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/auth/client/Client.mjs +30 -30
- package/dist/esm/api/resources/integrations/client/Client.mjs +30 -30
- package/dist/esm/api/resources/notifications/client/Client.mjs +30 -30
- package/dist/esm/api/resources/posts/client/Client.mjs +78 -78
- package/dist/esm/api/resources/privateMessages/client/Client.mjs +48 -48
- package/dist/esm/api/resources/reports/client/Client.mjs +24 -24
- package/dist/esm/api/resources/roles/client/Client.mjs +30 -30
- package/dist/esm/api/resources/ssOs/client/Client.mjs +30 -30
- package/dist/esm/api/resources/tags/client/Client.mjs +48 -48
- package/dist/esm/api/resources/threads/client/Client.mjs +114 -114
- package/dist/esm/api/resources/users/client/Client.mjs +60 -60
- package/dist/esm/api/resources/webhooks/client/Client.mjs +42 -42
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -83,7 +83,7 @@ class UsersClient {
|
|
|
83
83
|
}
|
|
84
84
|
__listAllUsers() {
|
|
85
85
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
86
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
87
87
|
const { page, limit, search } = request;
|
|
88
88
|
const _queryParams = {};
|
|
89
89
|
if (page != null) {
|
|
@@ -97,15 +97,15 @@ class UsersClient {
|
|
|
97
97
|
}
|
|
98
98
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
99
99
|
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);
|
|
100
|
-
const _response = yield core.fetcher({
|
|
101
|
-
url: core.url.join((
|
|
100
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
101
|
+
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, "users"),
|
|
102
102
|
method: "GET",
|
|
103
103
|
headers: _headers,
|
|
104
104
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
105
|
-
timeoutMs: ((
|
|
106
|
-
maxRetries: (
|
|
105
|
+
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,
|
|
106
|
+
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,
|
|
107
107
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
108
|
-
fetchFn: (
|
|
108
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
109
109
|
logging: this._options.logging,
|
|
110
110
|
});
|
|
111
111
|
if (_response.ok) {
|
|
@@ -152,19 +152,19 @@ class UsersClient {
|
|
|
152
152
|
}
|
|
153
153
|
__getAUser(request, requestOptions) {
|
|
154
154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
155
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
156
156
|
const { id } = request;
|
|
157
157
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
158
158
|
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);
|
|
159
|
-
const _response = yield core.fetcher({
|
|
160
|
-
url: core.url.join((
|
|
159
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
160
|
+
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, `users/${core.url.encodePathParam(id)}`),
|
|
161
161
|
method: "GET",
|
|
162
162
|
headers: _headers,
|
|
163
163
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
164
|
-
timeoutMs: ((
|
|
165
|
-
maxRetries: (
|
|
164
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
165
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
166
166
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
167
|
-
fetchFn: (
|
|
167
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
168
168
|
logging: this._options.logging,
|
|
169
169
|
});
|
|
170
170
|
if (_response.ok) {
|
|
@@ -213,19 +213,19 @@ class UsersClient {
|
|
|
213
213
|
}
|
|
214
214
|
__deleteAUser(request, requestOptions) {
|
|
215
215
|
return __awaiter(this, void 0, void 0, function* () {
|
|
216
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
216
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
217
217
|
const { id } = request;
|
|
218
218
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
219
219
|
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);
|
|
220
|
-
const _response = yield core.fetcher({
|
|
221
|
-
url: core.url.join((
|
|
220
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
221
|
+
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, `users/${core.url.encodePathParam(id)}`),
|
|
222
222
|
method: "DELETE",
|
|
223
223
|
headers: _headers,
|
|
224
224
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
225
|
-
timeoutMs: ((
|
|
226
|
-
maxRetries: (
|
|
225
|
+
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,
|
|
226
|
+
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,
|
|
227
227
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
228
|
-
fetchFn: (
|
|
228
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
229
229
|
logging: this._options.logging,
|
|
230
230
|
});
|
|
231
231
|
if (_response.ok) {
|
|
@@ -275,22 +275,22 @@ class UsersClient {
|
|
|
275
275
|
}
|
|
276
276
|
__updateAUser(request, requestOptions) {
|
|
277
277
|
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
278
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
279
279
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
280
280
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
281
281
|
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);
|
|
282
|
-
const _response = yield core.fetcher({
|
|
283
|
-
url: core.url.join((
|
|
282
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
283
|
+
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, `users/${core.url.encodePathParam(id)}`),
|
|
284
284
|
method: "PATCH",
|
|
285
285
|
headers: _headers,
|
|
286
286
|
contentType: "application/json",
|
|
287
287
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
288
288
|
requestType: "json",
|
|
289
289
|
body: _body,
|
|
290
|
-
timeoutMs: ((
|
|
291
|
-
maxRetries: (
|
|
290
|
+
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,
|
|
291
|
+
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,
|
|
292
292
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
293
|
-
fetchFn: (
|
|
293
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
294
294
|
logging: this._options.logging,
|
|
295
295
|
});
|
|
296
296
|
if (_response.ok) {
|
|
@@ -340,7 +340,7 @@ class UsersClient {
|
|
|
340
340
|
}
|
|
341
341
|
__listUserFollowers(request, requestOptions) {
|
|
342
342
|
return __awaiter(this, void 0, void 0, function* () {
|
|
343
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
343
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
344
344
|
const { id, cursor, limit } = request;
|
|
345
345
|
const _queryParams = {};
|
|
346
346
|
if (cursor != null) {
|
|
@@ -351,15 +351,15 @@ class UsersClient {
|
|
|
351
351
|
}
|
|
352
352
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
353
353
|
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);
|
|
354
|
-
const _response = yield core.fetcher({
|
|
355
|
-
url: core.url.join((
|
|
354
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
355
|
+
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, `users/${core.url.encodePathParam(id)}/followers`),
|
|
356
356
|
method: "GET",
|
|
357
357
|
headers: _headers,
|
|
358
358
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
359
|
-
timeoutMs: ((
|
|
360
|
-
maxRetries: (
|
|
359
|
+
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,
|
|
360
|
+
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,
|
|
361
361
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
362
|
-
fetchFn: (
|
|
362
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
363
363
|
logging: this._options.logging,
|
|
364
364
|
});
|
|
365
365
|
if (_response.ok) {
|
|
@@ -406,19 +406,19 @@ class UsersClient {
|
|
|
406
406
|
}
|
|
407
407
|
__getAFollowerFromUser(request, requestOptions) {
|
|
408
408
|
return __awaiter(this, void 0, void 0, function* () {
|
|
409
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
409
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
410
410
|
const { id, subId } = request;
|
|
411
411
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
412
412
|
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);
|
|
413
|
-
const _response = yield core.fetcher({
|
|
414
|
-
url: core.url.join((
|
|
413
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
414
|
+
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, `users/${core.url.encodePathParam(id)}/followers/${core.url.encodePathParam(subId)}`),
|
|
415
415
|
method: "GET",
|
|
416
416
|
headers: _headers,
|
|
417
417
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
418
|
-
timeoutMs: ((
|
|
419
|
-
maxRetries: (
|
|
418
|
+
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,
|
|
419
|
+
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,
|
|
420
420
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
421
|
-
fetchFn: (
|
|
421
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
422
422
|
logging: this._options.logging,
|
|
423
423
|
});
|
|
424
424
|
if (_response.ok) {
|
|
@@ -468,19 +468,19 @@ class UsersClient {
|
|
|
468
468
|
}
|
|
469
469
|
__deleteAFollowerFromUser(request, requestOptions) {
|
|
470
470
|
return __awaiter(this, void 0, void 0, function* () {
|
|
471
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
471
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
472
472
|
const { id, subId } = request;
|
|
473
473
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
474
474
|
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);
|
|
475
|
-
const _response = yield core.fetcher({
|
|
476
|
-
url: core.url.join((
|
|
475
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
476
|
+
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, `users/${core.url.encodePathParam(id)}/followers/${core.url.encodePathParam(subId)}`),
|
|
477
477
|
method: "DELETE",
|
|
478
478
|
headers: _headers,
|
|
479
479
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
480
|
-
timeoutMs: ((
|
|
481
|
-
maxRetries: (
|
|
480
|
+
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,
|
|
481
|
+
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,
|
|
482
482
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
483
|
-
fetchFn: (
|
|
483
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
484
484
|
logging: this._options.logging,
|
|
485
485
|
});
|
|
486
486
|
if (_response.ok) {
|
|
@@ -529,7 +529,7 @@ class UsersClient {
|
|
|
529
529
|
}
|
|
530
530
|
__listUserFollowing(request, requestOptions) {
|
|
531
531
|
return __awaiter(this, void 0, void 0, function* () {
|
|
532
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
532
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
533
533
|
const { id, cursor, limit } = request;
|
|
534
534
|
const _queryParams = {};
|
|
535
535
|
if (cursor != null) {
|
|
@@ -540,15 +540,15 @@ class UsersClient {
|
|
|
540
540
|
}
|
|
541
541
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
542
542
|
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);
|
|
543
|
-
const _response = yield core.fetcher({
|
|
544
|
-
url: core.url.join((
|
|
543
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
544
|
+
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, `users/${core.url.encodePathParam(id)}/following`),
|
|
545
545
|
method: "GET",
|
|
546
546
|
headers: _headers,
|
|
547
547
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
548
|
-
timeoutMs: ((
|
|
549
|
-
maxRetries: (
|
|
548
|
+
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,
|
|
549
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
550
550
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
551
|
-
fetchFn: (
|
|
551
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
552
552
|
logging: this._options.logging,
|
|
553
553
|
});
|
|
554
554
|
if (_response.ok) {
|
|
@@ -595,19 +595,19 @@ class UsersClient {
|
|
|
595
595
|
}
|
|
596
596
|
__getAFollowingFromUser(request, requestOptions) {
|
|
597
597
|
return __awaiter(this, void 0, void 0, function* () {
|
|
598
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
598
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
599
599
|
const { id, subId } = request;
|
|
600
600
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
601
601
|
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);
|
|
602
|
-
const _response = yield core.fetcher({
|
|
603
|
-
url: core.url.join((
|
|
602
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
603
|
+
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, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
|
|
604
604
|
method: "GET",
|
|
605
605
|
headers: _headers,
|
|
606
606
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
607
|
-
timeoutMs: ((
|
|
608
|
-
maxRetries: (
|
|
607
|
+
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,
|
|
608
|
+
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,
|
|
609
609
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
610
|
-
fetchFn: (
|
|
610
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
611
611
|
logging: this._options.logging,
|
|
612
612
|
});
|
|
613
613
|
if (_response.ok) {
|
|
@@ -657,19 +657,19 @@ class UsersClient {
|
|
|
657
657
|
}
|
|
658
658
|
__deleteAFollowingFromUser(request, requestOptions) {
|
|
659
659
|
return __awaiter(this, void 0, void 0, function* () {
|
|
660
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
660
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
661
661
|
const { id, subId } = request;
|
|
662
662
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
663
663
|
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);
|
|
664
|
-
const _response = yield core.fetcher({
|
|
665
|
-
url: core.url.join((
|
|
664
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
665
|
+
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, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
|
|
666
666
|
method: "DELETE",
|
|
667
667
|
headers: _headers,
|
|
668
668
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
669
|
-
timeoutMs: ((
|
|
670
|
-
maxRetries: (
|
|
669
|
+
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,
|
|
670
|
+
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,
|
|
671
671
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
672
|
-
fetchFn: (
|
|
672
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
673
673
|
logging: this._options.logging,
|
|
674
674
|
});
|
|
675
675
|
if (_response.ok) {
|
|
@@ -72,7 +72,7 @@ class WebhooksClient {
|
|
|
72
72
|
}
|
|
73
73
|
__listAllWebhooks() {
|
|
74
74
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
75
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
75
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
76
76
|
const { page, limit, search } = request;
|
|
77
77
|
const _queryParams = {};
|
|
78
78
|
if (page != null) {
|
|
@@ -86,15 +86,15 @@ class WebhooksClient {
|
|
|
86
86
|
}
|
|
87
87
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
88
88
|
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);
|
|
89
|
-
const _response = yield core.fetcher({
|
|
90
|
-
url: core.url.join((
|
|
89
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
90
|
+
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"),
|
|
91
91
|
method: "GET",
|
|
92
92
|
headers: _headers,
|
|
93
93
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
94
|
-
timeoutMs: ((
|
|
95
|
-
maxRetries: (
|
|
94
|
+
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,
|
|
95
|
+
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,
|
|
96
96
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
97
|
-
fetchFn: (
|
|
97
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
98
98
|
logging: this._options.logging,
|
|
99
99
|
});
|
|
100
100
|
if (_response.ok) {
|
|
@@ -143,21 +143,21 @@ class WebhooksClient {
|
|
|
143
143
|
}
|
|
144
144
|
__createAWebhook(request, requestOptions) {
|
|
145
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
146
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
147
147
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
148
148
|
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);
|
|
149
|
-
const _response = yield core.fetcher({
|
|
150
|
-
url: core.url.join((
|
|
149
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
150
|
+
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"),
|
|
151
151
|
method: "POST",
|
|
152
152
|
headers: _headers,
|
|
153
153
|
contentType: "application/json",
|
|
154
154
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
155
155
|
requestType: "json",
|
|
156
156
|
body: request,
|
|
157
|
-
timeoutMs: ((
|
|
158
|
-
maxRetries: (
|
|
157
|
+
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,
|
|
158
|
+
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,
|
|
159
159
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
160
|
-
fetchFn: (
|
|
160
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
161
161
|
logging: this._options.logging,
|
|
162
162
|
});
|
|
163
163
|
if (_response.ok) {
|
|
@@ -206,19 +206,19 @@ class WebhooksClient {
|
|
|
206
206
|
}
|
|
207
207
|
__getAWebhook(request, requestOptions) {
|
|
208
208
|
return __awaiter(this, void 0, void 0, function* () {
|
|
209
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
209
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
210
210
|
const { id } = request;
|
|
211
211
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
212
212
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
213
|
-
const _response = yield core.fetcher({
|
|
214
|
-
url: core.url.join((
|
|
213
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
214
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `webhooks/${core.url.encodePathParam(id)}`),
|
|
215
215
|
method: "GET",
|
|
216
216
|
headers: _headers,
|
|
217
217
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
218
|
-
timeoutMs: ((
|
|
219
|
-
maxRetries: (
|
|
218
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
219
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
220
220
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
221
|
-
fetchFn: (
|
|
221
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
222
222
|
logging: this._options.logging,
|
|
223
223
|
});
|
|
224
224
|
if (_response.ok) {
|
|
@@ -267,19 +267,19 @@ class WebhooksClient {
|
|
|
267
267
|
}
|
|
268
268
|
__deleteAWebhook(request, requestOptions) {
|
|
269
269
|
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
270
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
271
271
|
const { id } = request;
|
|
272
272
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
273
273
|
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);
|
|
274
|
-
const _response = yield core.fetcher({
|
|
275
|
-
url: core.url.join((
|
|
274
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
275
|
+
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)}`),
|
|
276
276
|
method: "DELETE",
|
|
277
277
|
headers: _headers,
|
|
278
278
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
279
|
-
timeoutMs: ((
|
|
280
|
-
maxRetries: (
|
|
279
|
+
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,
|
|
280
|
+
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,
|
|
281
281
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
282
|
-
fetchFn: (
|
|
282
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
283
283
|
logging: this._options.logging,
|
|
284
284
|
});
|
|
285
285
|
if (_response.ok) {
|
|
@@ -327,7 +327,7 @@ class WebhooksClient {
|
|
|
327
327
|
}
|
|
328
328
|
__listWebhookDeliveries(request, requestOptions) {
|
|
329
329
|
return __awaiter(this, void 0, void 0, function* () {
|
|
330
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
330
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
331
331
|
const { id, cursor, limit } = request;
|
|
332
332
|
const _queryParams = {};
|
|
333
333
|
if (cursor != null) {
|
|
@@ -338,15 +338,15 @@ class WebhooksClient {
|
|
|
338
338
|
}
|
|
339
339
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
340
340
|
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);
|
|
341
|
-
const _response = yield core.fetcher({
|
|
342
|
-
url: core.url.join((
|
|
341
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
342
|
+
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`),
|
|
343
343
|
method: "GET",
|
|
344
344
|
headers: _headers,
|
|
345
345
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
346
|
-
timeoutMs: ((
|
|
347
|
-
maxRetries: (
|
|
346
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
347
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
348
348
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
349
|
-
fetchFn: (
|
|
349
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
350
350
|
logging: this._options.logging,
|
|
351
351
|
});
|
|
352
352
|
if (_response.ok) {
|
|
@@ -396,19 +396,19 @@ class WebhooksClient {
|
|
|
396
396
|
}
|
|
397
397
|
__getADeliveryFromWebhook(request, requestOptions) {
|
|
398
398
|
return __awaiter(this, void 0, void 0, function* () {
|
|
399
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
399
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
400
400
|
const { id, subId } = request;
|
|
401
401
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
402
402
|
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);
|
|
403
|
-
const _response = yield core.fetcher({
|
|
404
|
-
url: core.url.join((
|
|
403
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
404
|
+
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)}`),
|
|
405
405
|
method: "GET",
|
|
406
406
|
headers: _headers,
|
|
407
407
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
408
|
-
timeoutMs: ((
|
|
409
|
-
maxRetries: (
|
|
408
|
+
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,
|
|
409
|
+
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,
|
|
410
410
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
411
|
-
fetchFn: (
|
|
411
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
412
412
|
logging: this._options.logging,
|
|
413
413
|
});
|
|
414
414
|
if (_response.ok) {
|
|
@@ -458,19 +458,19 @@ class WebhooksClient {
|
|
|
458
458
|
}
|
|
459
459
|
__deleteADeliveryFromWebhook(request, requestOptions) {
|
|
460
460
|
return __awaiter(this, void 0, void 0, function* () {
|
|
461
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
461
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
462
462
|
const { id, subId } = request;
|
|
463
463
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
464
464
|
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);
|
|
465
|
-
const _response = yield core.fetcher({
|
|
466
|
-
url: core.url.join((
|
|
465
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
466
|
+
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)}`),
|
|
467
467
|
method: "DELETE",
|
|
468
468
|
headers: _headers,
|
|
469
469
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
470
|
-
timeoutMs: ((
|
|
471
|
-
maxRetries: (
|
|
470
|
+
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,
|
|
471
|
+
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,
|
|
472
472
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
473
|
-
fetchFn: (
|
|
473
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
474
474
|
logging: this._options.logging,
|
|
475
475
|
});
|
|
476
476
|
if (_response.ok) {
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.8";
|
package/dist/cjs/version.js
CHANGED
|
@@ -13,6 +13,7 @@ export type BaseClientOptions = {
|
|
|
13
13
|
maxRetries?: number;
|
|
14
14
|
/** Provide a custom fetch implementation. Useful for platforms that don't have a built-in fetch or need a custom implementation. */
|
|
15
15
|
fetch?: typeof fetch;
|
|
16
|
+
fetcher?: core.FetchFunction;
|
|
16
17
|
/** Configure logging for the client. */
|
|
17
18
|
logging?: core.logging.LogConfig | core.logging.Logger;
|
|
18
19
|
} & HeaderAuthProvider.AuthOptions;
|
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ 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.0.
|
|
10
|
-
"User-Agent": "@foru-ms/sdk/2.0.
|
|
9
|
+
"X-Fern-SDK-Version": "2.0.8",
|
|
10
|
+
"User-Agent": "@foru-ms/sdk/2.0.8",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|