@foru-ms/sdk 2.0.6 → 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/auth/types/GetAuthMeResponse.d.ts +7 -2
- package/dist/cjs/api/resources/auth/types/PostAuthForgotPasswordResponse.d.ts +7 -2
- package/dist/cjs/api/resources/auth/types/PostAuthLoginResponse.d.ts +20 -1
- package/dist/cjs/api/resources/auth/types/PostAuthRegisterResponse.d.ts +20 -1
- package/dist/cjs/api/resources/auth/types/PostAuthResetPasswordResponse.d.ts +6 -1
- package/dist/cjs/api/resources/integrations/client/Client.js +30 -30
- package/dist/cjs/api/resources/integrations/types/GetIntegrationsResponse.d.ts +35 -32
- package/dist/cjs/api/resources/integrations/types/GetIntegrationsResponse.js +15 -12
- package/dist/cjs/api/resources/notifications/client/Client.js +30 -30
- package/dist/cjs/api/resources/notifications/types/GetNotificationsResponse.d.ts +35 -32
- package/dist/cjs/api/resources/posts/client/Client.js +78 -78
- package/dist/cjs/api/resources/posts/types/GetPostsResponse.d.ts +28 -25
- package/dist/cjs/api/resources/privateMessages/client/Client.js +48 -48
- package/dist/cjs/api/resources/privateMessages/types/GetPrivateMessagesResponse.d.ts +31 -28
- package/dist/cjs/api/resources/reports/client/Client.js +24 -24
- package/dist/cjs/api/resources/reports/types/GetReportsResponse.d.ts +33 -30
- package/dist/cjs/api/resources/roles/client/Client.js +30 -30
- package/dist/cjs/api/resources/roles/types/GetRolesResponse.d.ts +27 -24
- package/dist/cjs/api/resources/ssOs/client/Client.js +30 -30
- package/dist/cjs/api/resources/ssOs/types/GetSsoResponse.d.ts +32 -29
- package/dist/cjs/api/resources/ssOs/types/GetSsoResponse.js +12 -9
- package/dist/cjs/api/resources/tags/client/Client.js +48 -48
- package/dist/cjs/api/resources/tags/types/GetTagsResponse.d.ts +27 -24
- package/dist/cjs/api/resources/threads/client/Client.js +114 -114
- package/dist/cjs/api/resources/threads/types/GetThreadsResponse.d.ts +55 -52
- package/dist/cjs/api/resources/users/client/Client.js +60 -60
- package/dist/cjs/api/resources/users/types/GetUsersResponse.d.ts +46 -43
- package/dist/cjs/api/resources/webhooks/client/Client.js +42 -42
- package/dist/cjs/api/resources/webhooks/types/GetWebhooksResponse.d.ts +29 -26
- 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/auth/types/GetAuthMeResponse.d.mts +7 -2
- package/dist/esm/api/resources/auth/types/PostAuthForgotPasswordResponse.d.mts +7 -2
- package/dist/esm/api/resources/auth/types/PostAuthLoginResponse.d.mts +20 -1
- package/dist/esm/api/resources/auth/types/PostAuthRegisterResponse.d.mts +20 -1
- package/dist/esm/api/resources/auth/types/PostAuthResetPasswordResponse.d.mts +6 -1
- package/dist/esm/api/resources/integrations/client/Client.mjs +30 -30
- package/dist/esm/api/resources/integrations/types/GetIntegrationsResponse.d.mts +35 -32
- package/dist/esm/api/resources/integrations/types/GetIntegrationsResponse.mjs +15 -12
- package/dist/esm/api/resources/notifications/client/Client.mjs +30 -30
- package/dist/esm/api/resources/notifications/types/GetNotificationsResponse.d.mts +35 -32
- package/dist/esm/api/resources/posts/client/Client.mjs +78 -78
- package/dist/esm/api/resources/posts/types/GetPostsResponse.d.mts +28 -25
- package/dist/esm/api/resources/privateMessages/client/Client.mjs +48 -48
- package/dist/esm/api/resources/privateMessages/types/GetPrivateMessagesResponse.d.mts +31 -28
- package/dist/esm/api/resources/reports/client/Client.mjs +24 -24
- package/dist/esm/api/resources/reports/types/GetReportsResponse.d.mts +33 -30
- package/dist/esm/api/resources/roles/client/Client.mjs +30 -30
- package/dist/esm/api/resources/roles/types/GetRolesResponse.d.mts +27 -24
- package/dist/esm/api/resources/ssOs/client/Client.mjs +30 -30
- package/dist/esm/api/resources/ssOs/types/GetSsoResponse.d.mts +32 -29
- package/dist/esm/api/resources/ssOs/types/GetSsoResponse.mjs +12 -9
- package/dist/esm/api/resources/tags/client/Client.mjs +48 -48
- package/dist/esm/api/resources/tags/types/GetTagsResponse.d.mts +27 -24
- package/dist/esm/api/resources/threads/client/Client.mjs +114 -114
- package/dist/esm/api/resources/threads/types/GetThreadsResponse.d.mts +55 -52
- package/dist/esm/api/resources/users/client/Client.mjs +60 -60
- package/dist/esm/api/resources/users/types/GetUsersResponse.d.mts +46 -43
- package/dist/esm/api/resources/webhooks/client/Client.mjs +42 -42
- package/dist/esm/api/resources/webhooks/types/GetWebhooksResponse.d.mts +29 -26
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -4
|
@@ -83,7 +83,7 @@ class ThreadsClient {
|
|
|
83
83
|
}
|
|
84
84
|
__listAllThreads() {
|
|
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 ThreadsClient {
|
|
|
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, "threads"),
|
|
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) {
|
|
@@ -153,21 +153,21 @@ class ThreadsClient {
|
|
|
153
153
|
}
|
|
154
154
|
__createAThread(request, requestOptions) {
|
|
155
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
156
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
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, "threads"),
|
|
161
161
|
method: "POST",
|
|
162
162
|
headers: _headers,
|
|
163
163
|
contentType: "application/json",
|
|
164
164
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
165
165
|
requestType: "json",
|
|
166
166
|
body: request,
|
|
167
|
-
timeoutMs: ((
|
|
168
|
-
maxRetries: (
|
|
167
|
+
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,
|
|
168
|
+
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,
|
|
169
169
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
170
|
-
fetchFn: (
|
|
170
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
171
171
|
logging: this._options.logging,
|
|
172
172
|
});
|
|
173
173
|
if (_response.ok) {
|
|
@@ -216,19 +216,19 @@ class ThreadsClient {
|
|
|
216
216
|
}
|
|
217
217
|
__getAThread(request, requestOptions) {
|
|
218
218
|
return __awaiter(this, void 0, void 0, function* () {
|
|
219
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
219
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
220
220
|
const { id } = request;
|
|
221
221
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
222
222
|
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);
|
|
223
|
-
const _response = yield core.fetcher({
|
|
224
|
-
url: core.url.join((
|
|
223
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
224
|
+
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, `threads/${core.url.encodePathParam(id)}`),
|
|
225
225
|
method: "GET",
|
|
226
226
|
headers: _headers,
|
|
227
227
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
228
|
-
timeoutMs: ((
|
|
229
|
-
maxRetries: (
|
|
228
|
+
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,
|
|
229
|
+
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,
|
|
230
230
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
231
|
-
fetchFn: (
|
|
231
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
232
232
|
logging: this._options.logging,
|
|
233
233
|
});
|
|
234
234
|
if (_response.ok) {
|
|
@@ -277,19 +277,19 @@ class ThreadsClient {
|
|
|
277
277
|
}
|
|
278
278
|
__deleteAThread(request, requestOptions) {
|
|
279
279
|
return __awaiter(this, void 0, void 0, function* () {
|
|
280
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
280
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
281
281
|
const { id } = request;
|
|
282
282
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
283
283
|
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);
|
|
284
|
-
const _response = yield core.fetcher({
|
|
285
|
-
url: core.url.join((
|
|
284
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
285
|
+
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, `threads/${core.url.encodePathParam(id)}`),
|
|
286
286
|
method: "DELETE",
|
|
287
287
|
headers: _headers,
|
|
288
288
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
289
|
-
timeoutMs: ((
|
|
290
|
-
maxRetries: (
|
|
289
|
+
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,
|
|
290
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
291
291
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
292
|
-
fetchFn: (
|
|
292
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
293
293
|
logging: this._options.logging,
|
|
294
294
|
});
|
|
295
295
|
if (_response.ok) {
|
|
@@ -339,22 +339,22 @@ class ThreadsClient {
|
|
|
339
339
|
}
|
|
340
340
|
__updateAThread(request, requestOptions) {
|
|
341
341
|
return __awaiter(this, void 0, void 0, function* () {
|
|
342
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
342
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
343
343
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
344
344
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
345
345
|
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);
|
|
346
|
-
const _response = yield core.fetcher({
|
|
347
|
-
url: core.url.join((
|
|
346
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
347
|
+
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, `threads/${core.url.encodePathParam(id)}`),
|
|
348
348
|
method: "PATCH",
|
|
349
349
|
headers: _headers,
|
|
350
350
|
contentType: "application/json",
|
|
351
351
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
352
352
|
requestType: "json",
|
|
353
353
|
body: _body,
|
|
354
|
-
timeoutMs: ((
|
|
355
|
-
maxRetries: (
|
|
354
|
+
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,
|
|
355
|
+
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,
|
|
356
356
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
357
|
-
fetchFn: (
|
|
357
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
358
358
|
logging: this._options.logging,
|
|
359
359
|
});
|
|
360
360
|
if (_response.ok) {
|
|
@@ -404,7 +404,7 @@ class ThreadsClient {
|
|
|
404
404
|
}
|
|
405
405
|
__listThreadPosts(request, requestOptions) {
|
|
406
406
|
return __awaiter(this, void 0, void 0, function* () {
|
|
407
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
407
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
408
408
|
const { id, cursor, limit } = request;
|
|
409
409
|
const _queryParams = {};
|
|
410
410
|
if (cursor != null) {
|
|
@@ -415,15 +415,15 @@ class ThreadsClient {
|
|
|
415
415
|
}
|
|
416
416
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
417
417
|
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);
|
|
418
|
-
const _response = yield core.fetcher({
|
|
419
|
-
url: core.url.join((
|
|
418
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
419
|
+
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, `threads/${core.url.encodePathParam(id)}/posts`),
|
|
420
420
|
method: "GET",
|
|
421
421
|
headers: _headers,
|
|
422
422
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
423
|
-
timeoutMs: ((
|
|
424
|
-
maxRetries: (
|
|
423
|
+
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,
|
|
424
|
+
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,
|
|
425
425
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
426
|
-
fetchFn: (
|
|
426
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
427
427
|
logging: this._options.logging,
|
|
428
428
|
});
|
|
429
429
|
if (_response.ok) {
|
|
@@ -470,19 +470,19 @@ class ThreadsClient {
|
|
|
470
470
|
}
|
|
471
471
|
__getAPostFromThread(request, requestOptions) {
|
|
472
472
|
return __awaiter(this, void 0, void 0, function* () {
|
|
473
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
473
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
474
474
|
const { id, subId } = request;
|
|
475
475
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
476
476
|
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);
|
|
477
|
-
const _response = yield core.fetcher({
|
|
478
|
-
url: core.url.join((
|
|
477
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
478
|
+
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, `threads/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
|
|
479
479
|
method: "GET",
|
|
480
480
|
headers: _headers,
|
|
481
481
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
482
|
-
timeoutMs: ((
|
|
483
|
-
maxRetries: (
|
|
482
|
+
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,
|
|
483
|
+
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,
|
|
484
484
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
485
|
-
fetchFn: (
|
|
485
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
486
486
|
logging: this._options.logging,
|
|
487
487
|
});
|
|
488
488
|
if (_response.ok) {
|
|
@@ -529,19 +529,19 @@ class ThreadsClient {
|
|
|
529
529
|
}
|
|
530
530
|
__deleteAPostFromThread(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, subId } = request;
|
|
534
534
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
535
535
|
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);
|
|
536
|
-
const _response = yield core.fetcher({
|
|
537
|
-
url: core.url.join((
|
|
536
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
537
|
+
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, `threads/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
|
|
538
538
|
method: "DELETE",
|
|
539
539
|
headers: _headers,
|
|
540
540
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
541
|
-
timeoutMs: ((
|
|
542
|
-
maxRetries: (
|
|
541
|
+
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,
|
|
542
|
+
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,
|
|
543
543
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
544
|
-
fetchFn: (
|
|
544
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
545
545
|
logging: this._options.logging,
|
|
546
546
|
});
|
|
547
547
|
if (_response.ok) {
|
|
@@ -590,7 +590,7 @@ class ThreadsClient {
|
|
|
590
590
|
}
|
|
591
591
|
__listThreadReactions(request, requestOptions) {
|
|
592
592
|
return __awaiter(this, void 0, void 0, function* () {
|
|
593
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
593
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
594
594
|
const { id, cursor, limit } = request;
|
|
595
595
|
const _queryParams = {};
|
|
596
596
|
if (cursor != null) {
|
|
@@ -601,15 +601,15 @@ class ThreadsClient {
|
|
|
601
601
|
}
|
|
602
602
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
603
603
|
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);
|
|
604
|
-
const _response = yield core.fetcher({
|
|
605
|
-
url: core.url.join((
|
|
604
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
605
|
+
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, `threads/${core.url.encodePathParam(id)}/reactions`),
|
|
606
606
|
method: "GET",
|
|
607
607
|
headers: _headers,
|
|
608
608
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
609
|
-
timeoutMs: ((
|
|
610
|
-
maxRetries: (
|
|
609
|
+
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,
|
|
610
|
+
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,
|
|
611
611
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
612
|
-
fetchFn: (
|
|
612
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
613
613
|
logging: this._options.logging,
|
|
614
614
|
});
|
|
615
615
|
if (_response.ok) {
|
|
@@ -657,22 +657,22 @@ class ThreadsClient {
|
|
|
657
657
|
}
|
|
658
658
|
__createAReactionInThread(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 } = request, _body = __rest(request, ["id"]);
|
|
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, `threads/${core.url.encodePathParam(id)}/reactions`),
|
|
666
666
|
method: "POST",
|
|
667
667
|
headers: _headers,
|
|
668
668
|
contentType: "application/json",
|
|
669
669
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
670
670
|
requestType: "json",
|
|
671
671
|
body: _body,
|
|
672
|
-
timeoutMs: ((
|
|
673
|
-
maxRetries: (
|
|
672
|
+
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,
|
|
673
|
+
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,
|
|
674
674
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
675
|
-
fetchFn: (
|
|
675
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
676
676
|
logging: this._options.logging,
|
|
677
677
|
});
|
|
678
678
|
if (_response.ok) {
|
|
@@ -722,19 +722,19 @@ class ThreadsClient {
|
|
|
722
722
|
}
|
|
723
723
|
__removeYourReactionFromThread(request, requestOptions) {
|
|
724
724
|
return __awaiter(this, void 0, void 0, function* () {
|
|
725
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
725
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
726
726
|
const { id } = request;
|
|
727
727
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
728
728
|
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);
|
|
729
|
-
const _response = yield core.fetcher({
|
|
730
|
-
url: core.url.join((
|
|
729
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
730
|
+
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, `threads/${core.url.encodePathParam(id)}/reactions`),
|
|
731
731
|
method: "DELETE",
|
|
732
732
|
headers: _headers,
|
|
733
733
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
734
|
-
timeoutMs: ((
|
|
735
|
-
maxRetries: (
|
|
734
|
+
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,
|
|
735
|
+
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,
|
|
736
736
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
737
|
-
fetchFn: (
|
|
737
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
738
738
|
logging: this._options.logging,
|
|
739
739
|
});
|
|
740
740
|
if (_response.ok) {
|
|
@@ -784,19 +784,19 @@ class ThreadsClient {
|
|
|
784
784
|
}
|
|
785
785
|
__getAReactionFromThread(request, requestOptions) {
|
|
786
786
|
return __awaiter(this, void 0, void 0, function* () {
|
|
787
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
787
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
788
788
|
const { id, subId } = request;
|
|
789
789
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
790
790
|
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);
|
|
791
|
-
const _response = yield core.fetcher({
|
|
792
|
-
url: core.url.join((
|
|
791
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
792
|
+
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, `threads/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
|
|
793
793
|
method: "GET",
|
|
794
794
|
headers: _headers,
|
|
795
795
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
796
|
-
timeoutMs: ((
|
|
797
|
-
maxRetries: (
|
|
796
|
+
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,
|
|
797
|
+
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,
|
|
798
798
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
799
|
-
fetchFn: (
|
|
799
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
800
800
|
logging: this._options.logging,
|
|
801
801
|
});
|
|
802
802
|
if (_response.ok) {
|
|
@@ -846,19 +846,19 @@ class ThreadsClient {
|
|
|
846
846
|
}
|
|
847
847
|
__deleteAReactionFromThread(request, requestOptions) {
|
|
848
848
|
return __awaiter(this, void 0, void 0, function* () {
|
|
849
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
849
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
850
850
|
const { id, subId } = request;
|
|
851
851
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
852
852
|
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);
|
|
853
|
-
const _response = yield core.fetcher({
|
|
854
|
-
url: core.url.join((
|
|
853
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
854
|
+
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, `threads/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
|
|
855
855
|
method: "DELETE",
|
|
856
856
|
headers: _headers,
|
|
857
857
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
858
|
-
timeoutMs: ((
|
|
859
|
-
maxRetries: (
|
|
858
|
+
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,
|
|
859
|
+
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,
|
|
860
860
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
861
|
-
fetchFn: (
|
|
861
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
862
862
|
logging: this._options.logging,
|
|
863
863
|
});
|
|
864
864
|
if (_response.ok) {
|
|
@@ -907,7 +907,7 @@ class ThreadsClient {
|
|
|
907
907
|
}
|
|
908
908
|
__listThreadSubscribers(request, requestOptions) {
|
|
909
909
|
return __awaiter(this, void 0, void 0, function* () {
|
|
910
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
910
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
911
911
|
const { id, cursor, limit } = request;
|
|
912
912
|
const _queryParams = {};
|
|
913
913
|
if (cursor != null) {
|
|
@@ -918,15 +918,15 @@ class ThreadsClient {
|
|
|
918
918
|
}
|
|
919
919
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
920
920
|
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);
|
|
921
|
-
const _response = yield core.fetcher({
|
|
922
|
-
url: core.url.join((
|
|
921
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
922
|
+
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, `threads/${core.url.encodePathParam(id)}/subscribers`),
|
|
923
923
|
method: "GET",
|
|
924
924
|
headers: _headers,
|
|
925
925
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
926
|
-
timeoutMs: ((
|
|
927
|
-
maxRetries: (
|
|
926
|
+
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,
|
|
927
|
+
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,
|
|
928
928
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
929
|
-
fetchFn: (
|
|
929
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
930
930
|
logging: this._options.logging,
|
|
931
931
|
});
|
|
932
932
|
if (_response.ok) {
|
|
@@ -976,19 +976,19 @@ class ThreadsClient {
|
|
|
976
976
|
}
|
|
977
977
|
__getASubscriberFromThread(request, requestOptions) {
|
|
978
978
|
return __awaiter(this, void 0, void 0, function* () {
|
|
979
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
979
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
980
980
|
const { id, subId } = request;
|
|
981
981
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
982
982
|
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);
|
|
983
|
-
const _response = yield core.fetcher({
|
|
984
|
-
url: core.url.join((
|
|
983
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
984
|
+
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, `threads/${core.url.encodePathParam(id)}/subscribers/${core.url.encodePathParam(subId)}`),
|
|
985
985
|
method: "GET",
|
|
986
986
|
headers: _headers,
|
|
987
987
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
988
|
-
timeoutMs: ((
|
|
989
|
-
maxRetries: (
|
|
988
|
+
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,
|
|
989
|
+
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,
|
|
990
990
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
991
|
-
fetchFn: (
|
|
991
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
992
992
|
logging: this._options.logging,
|
|
993
993
|
});
|
|
994
994
|
if (_response.ok) {
|
|
@@ -1038,19 +1038,19 @@ class ThreadsClient {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
__deleteASubscriberFromThread(request, requestOptions) {
|
|
1040
1040
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1041
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1041
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1042
1042
|
const { id, subId } = request;
|
|
1043
1043
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1044
1044
|
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);
|
|
1045
|
-
const _response = yield core.fetcher({
|
|
1046
|
-
url: core.url.join((
|
|
1045
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1046
|
+
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, `threads/${core.url.encodePathParam(id)}/subscribers/${core.url.encodePathParam(subId)}`),
|
|
1047
1047
|
method: "DELETE",
|
|
1048
1048
|
headers: _headers,
|
|
1049
1049
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1050
|
-
timeoutMs: ((
|
|
1051
|
-
maxRetries: (
|
|
1050
|
+
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,
|
|
1051
|
+
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,
|
|
1052
1052
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1053
|
-
fetchFn: (
|
|
1053
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
1054
1054
|
logging: this._options.logging,
|
|
1055
1055
|
});
|
|
1056
1056
|
if (_response.ok) {
|
|
@@ -1099,19 +1099,19 @@ class ThreadsClient {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
__getThreadPoll(request, requestOptions) {
|
|
1101
1101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1102
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1102
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1103
1103
|
const { id } = request;
|
|
1104
1104
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1105
1105
|
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);
|
|
1106
|
-
const _response = yield core.fetcher({
|
|
1107
|
-
url: core.url.join((
|
|
1106
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1107
|
+
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, `threads/${core.url.encodePathParam(id)}/poll`),
|
|
1108
1108
|
method: "GET",
|
|
1109
1109
|
headers: _headers,
|
|
1110
1110
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1111
|
-
timeoutMs: ((
|
|
1112
|
-
maxRetries: (
|
|
1111
|
+
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,
|
|
1112
|
+
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,
|
|
1113
1113
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1114
|
-
fetchFn: (
|
|
1114
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
1115
1115
|
logging: this._options.logging,
|
|
1116
1116
|
});
|
|
1117
1117
|
if (_response.ok) {
|
|
@@ -1162,22 +1162,22 @@ class ThreadsClient {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
__createThreadPoll(request, requestOptions) {
|
|
1164
1164
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1165
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1165
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1166
1166
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
1167
1167
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1168
1168
|
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);
|
|
1169
|
-
const _response = yield core.fetcher({
|
|
1170
|
-
url: core.url.join((
|
|
1169
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1170
|
+
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, `threads/${core.url.encodePathParam(id)}/poll`),
|
|
1171
1171
|
method: "POST",
|
|
1172
1172
|
headers: _headers,
|
|
1173
1173
|
contentType: "application/json",
|
|
1174
1174
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1175
1175
|
requestType: "json",
|
|
1176
1176
|
body: _body,
|
|
1177
|
-
timeoutMs: ((
|
|
1178
|
-
maxRetries: (
|
|
1177
|
+
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,
|
|
1178
|
+
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,
|
|
1179
1179
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1180
|
-
fetchFn: (
|
|
1180
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
1181
1181
|
logging: this._options.logging,
|
|
1182
1182
|
});
|
|
1183
1183
|
if (_response.ok) {
|
|
@@ -1226,22 +1226,22 @@ class ThreadsClient {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
__updateThreadPoll(request, requestOptions) {
|
|
1228
1228
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1229
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1229
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1230
1230
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
1231
1231
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1232
1232
|
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);
|
|
1233
|
-
const _response = yield core.fetcher({
|
|
1234
|
-
url: core.url.join((
|
|
1233
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1234
|
+
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, `threads/${core.url.encodePathParam(id)}/poll`),
|
|
1235
1235
|
method: "PATCH",
|
|
1236
1236
|
headers: _headers,
|
|
1237
1237
|
contentType: "application/json",
|
|
1238
1238
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1239
1239
|
requestType: "json",
|
|
1240
1240
|
body: _body,
|
|
1241
|
-
timeoutMs: ((
|
|
1242
|
-
maxRetries: (
|
|
1241
|
+
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,
|
|
1242
|
+
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,
|
|
1243
1243
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1244
|
-
fetchFn: (
|
|
1244
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
1245
1245
|
logging: this._options.logging,
|
|
1246
1246
|
});
|
|
1247
1247
|
if (_response.ok) {
|