@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
|
@@ -47,7 +47,7 @@ export class PostsClient {
|
|
|
47
47
|
}
|
|
48
48
|
__listAllPosts() {
|
|
49
49
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
50
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
50
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
51
51
|
const { page, limit, search } = request;
|
|
52
52
|
const _queryParams = {};
|
|
53
53
|
if (page != null) {
|
|
@@ -61,15 +61,15 @@ export class PostsClient {
|
|
|
61
61
|
}
|
|
62
62
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
63
63
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
64
|
-
const _response = yield core.fetcher({
|
|
65
|
-
url: core.url.join((
|
|
64
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
65
|
+
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, "posts"),
|
|
66
66
|
method: "GET",
|
|
67
67
|
headers: _headers,
|
|
68
68
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
69
|
-
timeoutMs: ((
|
|
70
|
-
maxRetries: (
|
|
69
|
+
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,
|
|
70
|
+
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,
|
|
71
71
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
72
|
-
fetchFn: (
|
|
72
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
73
73
|
logging: this._options.logging,
|
|
74
74
|
});
|
|
75
75
|
if (_response.ok) {
|
|
@@ -117,21 +117,21 @@ export class PostsClient {
|
|
|
117
117
|
}
|
|
118
118
|
__createAPost(request, requestOptions) {
|
|
119
119
|
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
120
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
121
121
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
122
122
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
123
|
-
const _response = yield core.fetcher({
|
|
124
|
-
url: core.url.join((
|
|
123
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
124
|
+
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, "posts"),
|
|
125
125
|
method: "POST",
|
|
126
126
|
headers: _headers,
|
|
127
127
|
contentType: "application/json",
|
|
128
128
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
129
129
|
requestType: "json",
|
|
130
130
|
body: request,
|
|
131
|
-
timeoutMs: ((
|
|
132
|
-
maxRetries: (
|
|
131
|
+
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,
|
|
132
|
+
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,
|
|
133
133
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
134
|
-
fetchFn: (
|
|
134
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
135
135
|
logging: this._options.logging,
|
|
136
136
|
});
|
|
137
137
|
if (_response.ok) {
|
|
@@ -180,19 +180,19 @@ export class PostsClient {
|
|
|
180
180
|
}
|
|
181
181
|
__getAPost(request, requestOptions) {
|
|
182
182
|
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
183
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
184
184
|
const { id } = request;
|
|
185
185
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
186
186
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
187
|
-
const _response = yield core.fetcher({
|
|
188
|
-
url: core.url.join((
|
|
187
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
188
|
+
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, `posts/${core.url.encodePathParam(id)}`),
|
|
189
189
|
method: "GET",
|
|
190
190
|
headers: _headers,
|
|
191
191
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
192
|
-
timeoutMs: ((
|
|
193
|
-
maxRetries: (
|
|
192
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
193
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
194
194
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
195
|
-
fetchFn: (
|
|
195
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
196
196
|
logging: this._options.logging,
|
|
197
197
|
});
|
|
198
198
|
if (_response.ok) {
|
|
@@ -241,19 +241,19 @@ export class PostsClient {
|
|
|
241
241
|
}
|
|
242
242
|
__deleteAPost(request, requestOptions) {
|
|
243
243
|
return __awaiter(this, void 0, void 0, function* () {
|
|
244
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
244
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
245
245
|
const { id } = request;
|
|
246
246
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
247
247
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
248
|
-
const _response = yield core.fetcher({
|
|
249
|
-
url: core.url.join((
|
|
248
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
249
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `posts/${core.url.encodePathParam(id)}`),
|
|
250
250
|
method: "DELETE",
|
|
251
251
|
headers: _headers,
|
|
252
252
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
253
|
-
timeoutMs: ((
|
|
254
|
-
maxRetries: (
|
|
253
|
+
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,
|
|
254
|
+
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,
|
|
255
255
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
256
|
-
fetchFn: (
|
|
256
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
257
257
|
logging: this._options.logging,
|
|
258
258
|
});
|
|
259
259
|
if (_response.ok) {
|
|
@@ -303,22 +303,22 @@ export class PostsClient {
|
|
|
303
303
|
}
|
|
304
304
|
__updateAPost(request, requestOptions) {
|
|
305
305
|
return __awaiter(this, void 0, void 0, function* () {
|
|
306
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
306
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
307
307
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
308
308
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
309
309
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
310
|
-
const _response = yield core.fetcher({
|
|
311
|
-
url: core.url.join((
|
|
310
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
311
|
+
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, `posts/${core.url.encodePathParam(id)}`),
|
|
312
312
|
method: "PATCH",
|
|
313
313
|
headers: _headers,
|
|
314
314
|
contentType: "application/json",
|
|
315
315
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
316
316
|
requestType: "json",
|
|
317
317
|
body: _body,
|
|
318
|
-
timeoutMs: ((
|
|
319
|
-
maxRetries: (
|
|
318
|
+
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,
|
|
319
|
+
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,
|
|
320
320
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
321
|
-
fetchFn: (
|
|
321
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
322
322
|
logging: this._options.logging,
|
|
323
323
|
});
|
|
324
324
|
if (_response.ok) {
|
|
@@ -368,7 +368,7 @@ export class PostsClient {
|
|
|
368
368
|
}
|
|
369
369
|
__listPostReactions(request, requestOptions) {
|
|
370
370
|
return __awaiter(this, void 0, void 0, function* () {
|
|
371
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
371
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
372
372
|
const { id, cursor, limit } = request;
|
|
373
373
|
const _queryParams = {};
|
|
374
374
|
if (cursor != null) {
|
|
@@ -379,15 +379,15 @@ export class PostsClient {
|
|
|
379
379
|
}
|
|
380
380
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
381
381
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
382
|
-
const _response = yield core.fetcher({
|
|
383
|
-
url: core.url.join((
|
|
382
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
383
|
+
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, `posts/${core.url.encodePathParam(id)}/reactions`),
|
|
384
384
|
method: "GET",
|
|
385
385
|
headers: _headers,
|
|
386
386
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
387
|
-
timeoutMs: ((
|
|
388
|
-
maxRetries: (
|
|
387
|
+
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,
|
|
388
|
+
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,
|
|
389
389
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
390
|
-
fetchFn: (
|
|
390
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
391
391
|
logging: this._options.logging,
|
|
392
392
|
});
|
|
393
393
|
if (_response.ok) {
|
|
@@ -435,22 +435,22 @@ export class PostsClient {
|
|
|
435
435
|
}
|
|
436
436
|
__createAReactionInPost(request, requestOptions) {
|
|
437
437
|
return __awaiter(this, void 0, void 0, function* () {
|
|
438
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
438
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
439
439
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
440
440
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
441
441
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
442
|
-
const _response = yield core.fetcher({
|
|
443
|
-
url: core.url.join((
|
|
442
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
443
|
+
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, `posts/${core.url.encodePathParam(id)}/reactions`),
|
|
444
444
|
method: "POST",
|
|
445
445
|
headers: _headers,
|
|
446
446
|
contentType: "application/json",
|
|
447
447
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
448
448
|
requestType: "json",
|
|
449
449
|
body: _body,
|
|
450
|
-
timeoutMs: ((
|
|
451
|
-
maxRetries: (
|
|
450
|
+
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,
|
|
451
|
+
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,
|
|
452
452
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
453
|
-
fetchFn: (
|
|
453
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
454
454
|
logging: this._options.logging,
|
|
455
455
|
});
|
|
456
456
|
if (_response.ok) {
|
|
@@ -500,19 +500,19 @@ export class PostsClient {
|
|
|
500
500
|
}
|
|
501
501
|
__removeYourReactionFromPost(request, requestOptions) {
|
|
502
502
|
return __awaiter(this, void 0, void 0, function* () {
|
|
503
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
503
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
504
504
|
const { id } = request;
|
|
505
505
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
506
506
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
507
|
-
const _response = yield core.fetcher({
|
|
508
|
-
url: core.url.join((
|
|
507
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
508
|
+
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, `posts/${core.url.encodePathParam(id)}/reactions`),
|
|
509
509
|
method: "DELETE",
|
|
510
510
|
headers: _headers,
|
|
511
511
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
512
|
-
timeoutMs: ((
|
|
513
|
-
maxRetries: (
|
|
512
|
+
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,
|
|
513
|
+
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,
|
|
514
514
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
515
|
-
fetchFn: (
|
|
515
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
516
516
|
logging: this._options.logging,
|
|
517
517
|
});
|
|
518
518
|
if (_response.ok) {
|
|
@@ -559,19 +559,19 @@ export class PostsClient {
|
|
|
559
559
|
}
|
|
560
560
|
__getAReactionFromPost(request, requestOptions) {
|
|
561
561
|
return __awaiter(this, void 0, void 0, function* () {
|
|
562
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
562
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
563
563
|
const { id, subId } = request;
|
|
564
564
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
565
565
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
566
|
-
const _response = yield core.fetcher({
|
|
567
|
-
url: core.url.join((
|
|
566
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
567
|
+
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, `posts/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
|
|
568
568
|
method: "GET",
|
|
569
569
|
headers: _headers,
|
|
570
570
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
571
|
-
timeoutMs: ((
|
|
572
|
-
maxRetries: (
|
|
571
|
+
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,
|
|
572
|
+
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,
|
|
573
573
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
574
|
-
fetchFn: (
|
|
574
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
575
575
|
logging: this._options.logging,
|
|
576
576
|
});
|
|
577
577
|
if (_response.ok) {
|
|
@@ -621,19 +621,19 @@ export class PostsClient {
|
|
|
621
621
|
}
|
|
622
622
|
__deleteAReactionFromPost(request, requestOptions) {
|
|
623
623
|
return __awaiter(this, void 0, void 0, function* () {
|
|
624
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
624
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
625
625
|
const { id, subId } = request;
|
|
626
626
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
627
627
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
628
|
-
const _response = yield core.fetcher({
|
|
629
|
-
url: core.url.join((
|
|
628
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
629
|
+
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, `posts/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
|
|
630
630
|
method: "DELETE",
|
|
631
631
|
headers: _headers,
|
|
632
632
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
633
|
-
timeoutMs: ((
|
|
634
|
-
maxRetries: (
|
|
633
|
+
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,
|
|
634
|
+
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,
|
|
635
635
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
636
|
-
fetchFn: (
|
|
636
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
637
637
|
logging: this._options.logging,
|
|
638
638
|
});
|
|
639
639
|
if (_response.ok) {
|
|
@@ -682,7 +682,7 @@ export class PostsClient {
|
|
|
682
682
|
}
|
|
683
683
|
__listPostPosts(request, requestOptions) {
|
|
684
684
|
return __awaiter(this, void 0, void 0, function* () {
|
|
685
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
685
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
686
686
|
const { id, cursor, limit } = request;
|
|
687
687
|
const _queryParams = {};
|
|
688
688
|
if (cursor != null) {
|
|
@@ -693,15 +693,15 @@ export class PostsClient {
|
|
|
693
693
|
}
|
|
694
694
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
695
695
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
696
|
-
const _response = yield core.fetcher({
|
|
697
|
-
url: core.url.join((
|
|
696
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
697
|
+
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, `posts/${core.url.encodePathParam(id)}/posts`),
|
|
698
698
|
method: "GET",
|
|
699
699
|
headers: _headers,
|
|
700
700
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
701
|
-
timeoutMs: ((
|
|
702
|
-
maxRetries: (
|
|
701
|
+
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,
|
|
702
|
+
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,
|
|
703
703
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
704
|
-
fetchFn: (
|
|
704
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
705
705
|
logging: this._options.logging,
|
|
706
706
|
});
|
|
707
707
|
if (_response.ok) {
|
|
@@ -748,19 +748,19 @@ export class PostsClient {
|
|
|
748
748
|
}
|
|
749
749
|
__getAPostFromPost(request, requestOptions) {
|
|
750
750
|
return __awaiter(this, void 0, void 0, function* () {
|
|
751
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
751
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
752
752
|
const { id, subId } = request;
|
|
753
753
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
754
754
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
755
|
-
const _response = yield core.fetcher({
|
|
756
|
-
url: core.url.join((
|
|
755
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
756
|
+
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, `posts/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
|
|
757
757
|
method: "GET",
|
|
758
758
|
headers: _headers,
|
|
759
759
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
760
|
-
timeoutMs: ((
|
|
761
|
-
maxRetries: (
|
|
760
|
+
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,
|
|
761
|
+
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,
|
|
762
762
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
763
|
-
fetchFn: (
|
|
763
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
764
764
|
logging: this._options.logging,
|
|
765
765
|
});
|
|
766
766
|
if (_response.ok) {
|
|
@@ -807,19 +807,19 @@ export class PostsClient {
|
|
|
807
807
|
}
|
|
808
808
|
__deleteAPostFromPost(request, requestOptions) {
|
|
809
809
|
return __awaiter(this, void 0, void 0, function* () {
|
|
810
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
810
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
811
811
|
const { id, subId } = request;
|
|
812
812
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
813
813
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
814
|
-
const _response = yield core.fetcher({
|
|
815
|
-
url: core.url.join((
|
|
814
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
815
|
+
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, `posts/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
|
|
816
816
|
method: "DELETE",
|
|
817
817
|
headers: _headers,
|
|
818
818
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
819
|
-
timeoutMs: ((
|
|
820
|
-
maxRetries: (
|
|
819
|
+
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,
|
|
820
|
+
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,
|
|
821
821
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
822
|
-
fetchFn: (
|
|
822
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
823
823
|
logging: this._options.logging,
|
|
824
824
|
});
|
|
825
825
|
if (_response.ok) {
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
export interface GetPostsResponse {
|
|
2
|
-
data: GetPostsResponse.Data
|
|
3
|
-
meta: GetPostsResponse.Meta;
|
|
2
|
+
data: GetPostsResponse.Data;
|
|
4
3
|
}
|
|
5
4
|
export declare namespace GetPostsResponse {
|
|
6
|
-
|
|
5
|
+
interface Data {
|
|
6
|
+
items: Data.Items.Item[];
|
|
7
|
+
/** Cursor for next page */
|
|
8
|
+
nextCursor?: string;
|
|
9
|
+
/** Total count of items */
|
|
10
|
+
count: number;
|
|
11
|
+
}
|
|
7
12
|
namespace Data {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
type Items = Items.Item[];
|
|
14
|
+
namespace Items {
|
|
15
|
+
interface Item {
|
|
16
|
+
/** Thread ID to post in */
|
|
17
|
+
threadId: string;
|
|
18
|
+
/** Post content (Markdown supported) */
|
|
19
|
+
body: string;
|
|
20
|
+
/** Author user ID (required for API key auth, ignored for JWT auth) */
|
|
21
|
+
userId?: string;
|
|
22
|
+
/** Parent post ID for threading */
|
|
23
|
+
parentId?: string;
|
|
24
|
+
extendedData?: Record<string, unknown>;
|
|
25
|
+
id: string;
|
|
26
|
+
/** Nesting level for threaded replies */
|
|
27
|
+
depth: number | null;
|
|
28
|
+
/** Post creation timestamp */
|
|
29
|
+
createdAt: string;
|
|
30
|
+
/** Post last update timestamp */
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
}
|
|
25
33
|
}
|
|
26
34
|
}
|
|
27
|
-
interface Meta {
|
|
28
|
-
total: number;
|
|
29
|
-
page: number;
|
|
30
|
-
limit: number;
|
|
31
|
-
}
|
|
32
35
|
}
|