@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 PrivateMessagesClient {
|
|
|
47
47
|
}
|
|
48
48
|
__listAllPrivateMessages() {
|
|
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 PrivateMessagesClient {
|
|
|
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, "private-messages"),
|
|
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 PrivateMessagesClient {
|
|
|
117
117
|
}
|
|
118
118
|
__createAPrivateMessage(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, "private-messages"),
|
|
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 PrivateMessagesClient {
|
|
|
180
180
|
}
|
|
181
181
|
__getAPrivateMessage(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, `private-messages/${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 PrivateMessagesClient {
|
|
|
241
241
|
}
|
|
242
242
|
__deleteAPrivateMessage(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, `private-messages/${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) {
|
|
@@ -304,7 +304,7 @@ export class PrivateMessagesClient {
|
|
|
304
304
|
}
|
|
305
305
|
__listPrivateMessageReplies(request, requestOptions) {
|
|
306
306
|
return __awaiter(this, void 0, void 0, function* () {
|
|
307
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
307
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
308
308
|
const { id, cursor, limit } = request;
|
|
309
309
|
const _queryParams = {};
|
|
310
310
|
if (cursor != null) {
|
|
@@ -315,15 +315,15 @@ export class PrivateMessagesClient {
|
|
|
315
315
|
}
|
|
316
316
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
317
317
|
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);
|
|
318
|
-
const _response = yield core.fetcher({
|
|
319
|
-
url: core.url.join((
|
|
318
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
319
|
+
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, `private-messages/${core.url.encodePathParam(id)}/replies`),
|
|
320
320
|
method: "GET",
|
|
321
321
|
headers: _headers,
|
|
322
322
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
323
|
-
timeoutMs: ((
|
|
324
|
-
maxRetries: (
|
|
323
|
+
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,
|
|
324
|
+
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,
|
|
325
325
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
326
|
-
fetchFn: (
|
|
326
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
327
327
|
logging: this._options.logging,
|
|
328
328
|
});
|
|
329
329
|
if (_response.ok) {
|
|
@@ -375,22 +375,22 @@ export class PrivateMessagesClient {
|
|
|
375
375
|
}
|
|
376
376
|
__createAReplyInPrivateMessage(request, requestOptions) {
|
|
377
377
|
return __awaiter(this, void 0, void 0, function* () {
|
|
378
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
378
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
379
379
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
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, `private-messages/${core.url.encodePathParam(id)}/replies`),
|
|
384
384
|
method: "POST",
|
|
385
385
|
headers: _headers,
|
|
386
386
|
contentType: "application/json",
|
|
387
387
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
388
388
|
requestType: "json",
|
|
389
389
|
body: _body,
|
|
390
|
-
timeoutMs: ((
|
|
391
|
-
maxRetries: (
|
|
390
|
+
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,
|
|
391
|
+
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,
|
|
392
392
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
393
|
-
fetchFn: (
|
|
393
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
394
394
|
logging: this._options.logging,
|
|
395
395
|
});
|
|
396
396
|
if (_response.ok) {
|
|
@@ -442,19 +442,19 @@ export class PrivateMessagesClient {
|
|
|
442
442
|
}
|
|
443
443
|
__getAReplyFromPrivateMessage(request, requestOptions) {
|
|
444
444
|
return __awaiter(this, void 0, void 0, function* () {
|
|
445
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
445
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
446
446
|
const { id, subId } = request;
|
|
447
447
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
448
448
|
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);
|
|
449
|
-
const _response = yield core.fetcher({
|
|
450
|
-
url: core.url.join((
|
|
449
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
450
|
+
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, `private-messages/${core.url.encodePathParam(id)}/replies/${core.url.encodePathParam(subId)}`),
|
|
451
451
|
method: "GET",
|
|
452
452
|
headers: _headers,
|
|
453
453
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
454
|
-
timeoutMs: ((
|
|
455
|
-
maxRetries: (
|
|
454
|
+
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,
|
|
455
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
456
456
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
457
|
-
fetchFn: (
|
|
457
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
458
458
|
logging: this._options.logging,
|
|
459
459
|
});
|
|
460
460
|
if (_response.ok) {
|
|
@@ -504,19 +504,19 @@ export class PrivateMessagesClient {
|
|
|
504
504
|
}
|
|
505
505
|
__deleteAReplyFromPrivateMessage(request, requestOptions) {
|
|
506
506
|
return __awaiter(this, void 0, void 0, function* () {
|
|
507
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
507
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
508
508
|
const { id, subId } = request;
|
|
509
509
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
510
510
|
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);
|
|
511
|
-
const _response = yield core.fetcher({
|
|
512
|
-
url: core.url.join((
|
|
511
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
512
|
+
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, `private-messages/${core.url.encodePathParam(id)}/replies/${core.url.encodePathParam(subId)}`),
|
|
513
513
|
method: "DELETE",
|
|
514
514
|
headers: _headers,
|
|
515
515
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
516
|
-
timeoutMs: ((
|
|
517
|
-
maxRetries: (
|
|
516
|
+
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,
|
|
517
|
+
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,
|
|
518
518
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
519
|
-
fetchFn: (
|
|
519
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
520
520
|
logging: this._options.logging,
|
|
521
521
|
});
|
|
522
522
|
if (_response.ok) {
|
|
@@ -1,35 +1,38 @@
|
|
|
1
1
|
export interface GetPrivateMessagesResponse {
|
|
2
|
-
data: GetPrivateMessagesResponse.Data
|
|
3
|
-
meta: GetPrivateMessagesResponse.Meta;
|
|
2
|
+
data: GetPrivateMessagesResponse.Data;
|
|
4
3
|
}
|
|
5
4
|
export declare namespace GetPrivateMessagesResponse {
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
type Items = Items.Item[];
|
|
14
|
+
namespace Items {
|
|
15
|
+
interface Item {
|
|
16
|
+
/** Recipient User ID */
|
|
17
|
+
recipientId: string;
|
|
18
|
+
/** Sender user ID (required for API key auth, ignored for JWT auth) */
|
|
19
|
+
senderId?: string;
|
|
20
|
+
/** Message title (optional for replies) */
|
|
21
|
+
title?: string;
|
|
22
|
+
/** Message content */
|
|
23
|
+
body: string;
|
|
24
|
+
/** Parent Message ID (for replies) */
|
|
25
|
+
parentId?: string;
|
|
26
|
+
/** Extended data */
|
|
27
|
+
extendedData?: Record<string, unknown>;
|
|
28
|
+
id: string;
|
|
29
|
+
/** Message status (sent, delivered, read, archived) */
|
|
30
|
+
status: string | null;
|
|
31
|
+
/** Message sent timestamp */
|
|
32
|
+
createdAt: string;
|
|
33
|
+
/** Message last update timestamp */
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
}
|
|
28
36
|
}
|
|
29
37
|
}
|
|
30
|
-
interface Meta {
|
|
31
|
-
total: number;
|
|
32
|
-
page: number;
|
|
33
|
-
limit: number;
|
|
34
|
-
}
|
|
35
38
|
}
|
|
@@ -36,7 +36,7 @@ export class ReportsClient {
|
|
|
36
36
|
}
|
|
37
37
|
__listAllReports() {
|
|
38
38
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
39
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
39
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
40
40
|
const { page, limit, search } = request;
|
|
41
41
|
const _queryParams = {};
|
|
42
42
|
if (page != null) {
|
|
@@ -50,15 +50,15 @@ export class ReportsClient {
|
|
|
50
50
|
}
|
|
51
51
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
52
52
|
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);
|
|
53
|
-
const _response = yield core.fetcher({
|
|
54
|
-
url: core.url.join((
|
|
53
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
54
|
+
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, "reports"),
|
|
55
55
|
method: "GET",
|
|
56
56
|
headers: _headers,
|
|
57
57
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
58
|
-
timeoutMs: ((
|
|
59
|
-
maxRetries: (
|
|
58
|
+
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,
|
|
59
|
+
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,
|
|
60
60
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
61
|
-
fetchFn: (
|
|
61
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
62
62
|
logging: this._options.logging,
|
|
63
63
|
});
|
|
64
64
|
if (_response.ok) {
|
|
@@ -105,21 +105,21 @@ export class ReportsClient {
|
|
|
105
105
|
}
|
|
106
106
|
__createAReport(request, requestOptions) {
|
|
107
107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
108
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
109
109
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
110
110
|
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);
|
|
111
|
-
const _response = yield core.fetcher({
|
|
112
|
-
url: core.url.join((
|
|
111
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
112
|
+
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, "reports"),
|
|
113
113
|
method: "POST",
|
|
114
114
|
headers: _headers,
|
|
115
115
|
contentType: "application/json",
|
|
116
116
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
117
117
|
requestType: "json",
|
|
118
118
|
body: request,
|
|
119
|
-
timeoutMs: ((
|
|
120
|
-
maxRetries: (
|
|
119
|
+
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,
|
|
120
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
121
121
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
122
|
-
fetchFn: (
|
|
122
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
123
123
|
logging: this._options.logging,
|
|
124
124
|
});
|
|
125
125
|
if (_response.ok) {
|
|
@@ -168,19 +168,19 @@ export class ReportsClient {
|
|
|
168
168
|
}
|
|
169
169
|
__getAReport(request, requestOptions) {
|
|
170
170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
171
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
172
172
|
const { id } = request;
|
|
173
173
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
174
174
|
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);
|
|
175
|
-
const _response = yield core.fetcher({
|
|
176
|
-
url: core.url.join((
|
|
175
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
176
|
+
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, `reports/${core.url.encodePathParam(id)}`),
|
|
177
177
|
method: "GET",
|
|
178
178
|
headers: _headers,
|
|
179
179
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
180
|
-
timeoutMs: ((
|
|
181
|
-
maxRetries: (
|
|
180
|
+
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,
|
|
181
|
+
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,
|
|
182
182
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
183
|
-
fetchFn: (
|
|
183
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
184
184
|
logging: this._options.logging,
|
|
185
185
|
});
|
|
186
186
|
if (_response.ok) {
|
|
@@ -229,19 +229,19 @@ export class ReportsClient {
|
|
|
229
229
|
}
|
|
230
230
|
__deleteAReport(request, requestOptions) {
|
|
231
231
|
return __awaiter(this, void 0, void 0, function* () {
|
|
232
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
232
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
233
233
|
const { id } = request;
|
|
234
234
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
235
235
|
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);
|
|
236
|
-
const _response = yield core.fetcher({
|
|
237
|
-
url: core.url.join((
|
|
236
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
237
|
+
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, `reports/${core.url.encodePathParam(id)}`),
|
|
238
238
|
method: "DELETE",
|
|
239
239
|
headers: _headers,
|
|
240
240
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
241
|
-
timeoutMs: ((
|
|
242
|
-
maxRetries: (
|
|
241
|
+
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,
|
|
242
|
+
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,
|
|
243
243
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
244
|
-
fetchFn: (
|
|
244
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
245
245
|
logging: this._options.logging,
|
|
246
246
|
});
|
|
247
247
|
if (_response.ok) {
|
|
@@ -1,37 +1,40 @@
|
|
|
1
1
|
export interface GetReportsResponse {
|
|
2
|
-
data: GetReportsResponse.Data
|
|
3
|
-
meta: GetReportsResponse.Meta;
|
|
2
|
+
data: GetReportsResponse.Data;
|
|
4
3
|
}
|
|
5
4
|
export declare namespace GetReportsResponse {
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
type Items = Items.Item[];
|
|
14
|
+
namespace Items {
|
|
15
|
+
interface Item {
|
|
16
|
+
/** Report type (e.g. spam, abuse) */
|
|
17
|
+
type: string;
|
|
18
|
+
/** Reason for reporting */
|
|
19
|
+
description?: string;
|
|
20
|
+
/** Reporter user ID (required for API key auth, ignored for JWT auth) */
|
|
21
|
+
userId?: string;
|
|
22
|
+
/** ID of user being reported */
|
|
23
|
+
reportedId?: string;
|
|
24
|
+
/** ID of thread being reported */
|
|
25
|
+
threadId?: string;
|
|
26
|
+
/** ID of post being reported */
|
|
27
|
+
postId?: string;
|
|
28
|
+
/** ID of private message being reported */
|
|
29
|
+
privateMessageId?: string;
|
|
30
|
+
id: string;
|
|
31
|
+
/** Report status (pending, reviewed, resolved, dismissed) */
|
|
32
|
+
status: string | null;
|
|
33
|
+
/** Report creation timestamp */
|
|
34
|
+
createdAt: string;
|
|
35
|
+
/** Report last update timestamp */
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
}
|
|
30
38
|
}
|
|
31
39
|
}
|
|
32
|
-
interface Meta {
|
|
33
|
-
total: number;
|
|
34
|
-
page: number;
|
|
35
|
-
limit: number;
|
|
36
|
-
}
|
|
37
40
|
}
|