@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 PrivateMessagesClient {
|
|
|
83
83
|
}
|
|
84
84
|
__listAllPrivateMessages() {
|
|
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 PrivateMessagesClient {
|
|
|
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, "private-messages"),
|
|
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 PrivateMessagesClient {
|
|
|
153
153
|
}
|
|
154
154
|
__createAPrivateMessage(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, "private-messages"),
|
|
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 PrivateMessagesClient {
|
|
|
216
216
|
}
|
|
217
217
|
__getAPrivateMessage(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, `private-messages/${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 PrivateMessagesClient {
|
|
|
277
277
|
}
|
|
278
278
|
__deleteAPrivateMessage(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, `private-messages/${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) {
|
|
@@ -340,7 +340,7 @@ class PrivateMessagesClient {
|
|
|
340
340
|
}
|
|
341
341
|
__listPrivateMessageReplies(request, requestOptions) {
|
|
342
342
|
return __awaiter(this, void 0, void 0, function* () {
|
|
343
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
343
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
344
344
|
const { id, cursor, limit } = request;
|
|
345
345
|
const _queryParams = {};
|
|
346
346
|
if (cursor != null) {
|
|
@@ -351,15 +351,15 @@ class PrivateMessagesClient {
|
|
|
351
351
|
}
|
|
352
352
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
353
353
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
354
|
-
const _response = yield core.fetcher({
|
|
355
|
-
url: core.url.join((
|
|
354
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
355
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `private-messages/${core.url.encodePathParam(id)}/replies`),
|
|
356
356
|
method: "GET",
|
|
357
357
|
headers: _headers,
|
|
358
358
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
359
|
-
timeoutMs: ((
|
|
360
|
-
maxRetries: (
|
|
359
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
360
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
361
361
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
362
|
-
fetchFn: (
|
|
362
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
363
363
|
logging: this._options.logging,
|
|
364
364
|
});
|
|
365
365
|
if (_response.ok) {
|
|
@@ -411,22 +411,22 @@ class PrivateMessagesClient {
|
|
|
411
411
|
}
|
|
412
412
|
__createAReplyInPrivateMessage(request, requestOptions) {
|
|
413
413
|
return __awaiter(this, void 0, void 0, function* () {
|
|
414
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
414
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
415
415
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
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, `private-messages/${core.url.encodePathParam(id)}/replies`),
|
|
420
420
|
method: "POST",
|
|
421
421
|
headers: _headers,
|
|
422
422
|
contentType: "application/json",
|
|
423
423
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
424
424
|
requestType: "json",
|
|
425
425
|
body: _body,
|
|
426
|
-
timeoutMs: ((
|
|
427
|
-
maxRetries: (
|
|
426
|
+
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,
|
|
427
|
+
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,
|
|
428
428
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
429
|
-
fetchFn: (
|
|
429
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
430
430
|
logging: this._options.logging,
|
|
431
431
|
});
|
|
432
432
|
if (_response.ok) {
|
|
@@ -478,19 +478,19 @@ class PrivateMessagesClient {
|
|
|
478
478
|
}
|
|
479
479
|
__getAReplyFromPrivateMessage(request, requestOptions) {
|
|
480
480
|
return __awaiter(this, void 0, void 0, function* () {
|
|
481
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
481
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
482
482
|
const { id, subId } = request;
|
|
483
483
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
484
484
|
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);
|
|
485
|
-
const _response = yield core.fetcher({
|
|
486
|
-
url: core.url.join((
|
|
485
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
486
|
+
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)}`),
|
|
487
487
|
method: "GET",
|
|
488
488
|
headers: _headers,
|
|
489
489
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
490
|
-
timeoutMs: ((
|
|
491
|
-
maxRetries: (
|
|
490
|
+
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,
|
|
491
|
+
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,
|
|
492
492
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
493
|
-
fetchFn: (
|
|
493
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
494
494
|
logging: this._options.logging,
|
|
495
495
|
});
|
|
496
496
|
if (_response.ok) {
|
|
@@ -540,19 +540,19 @@ class PrivateMessagesClient {
|
|
|
540
540
|
}
|
|
541
541
|
__deleteAReplyFromPrivateMessage(request, requestOptions) {
|
|
542
542
|
return __awaiter(this, void 0, void 0, function* () {
|
|
543
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
543
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
544
544
|
const { id, subId } = request;
|
|
545
545
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
546
546
|
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);
|
|
547
|
-
const _response = yield core.fetcher({
|
|
548
|
-
url: core.url.join((
|
|
547
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
548
|
+
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)}`),
|
|
549
549
|
method: "DELETE",
|
|
550
550
|
headers: _headers,
|
|
551
551
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
552
|
-
timeoutMs: ((
|
|
553
|
-
maxRetries: (
|
|
552
|
+
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,
|
|
553
|
+
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,
|
|
554
554
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
555
|
-
fetchFn: (
|
|
555
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
556
556
|
logging: this._options.logging,
|
|
557
557
|
});
|
|
558
558
|
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
|
}
|
|
@@ -72,7 +72,7 @@ class ReportsClient {
|
|
|
72
72
|
}
|
|
73
73
|
__listAllReports() {
|
|
74
74
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
75
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
75
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
76
76
|
const { page, limit, search } = request;
|
|
77
77
|
const _queryParams = {};
|
|
78
78
|
if (page != null) {
|
|
@@ -86,15 +86,15 @@ class ReportsClient {
|
|
|
86
86
|
}
|
|
87
87
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
88
88
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
89
|
-
const _response = yield core.fetcher({
|
|
90
|
-
url: core.url.join((
|
|
89
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
90
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, "reports"),
|
|
91
91
|
method: "GET",
|
|
92
92
|
headers: _headers,
|
|
93
93
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
94
|
-
timeoutMs: ((
|
|
95
|
-
maxRetries: (
|
|
94
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
95
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
96
96
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
97
|
-
fetchFn: (
|
|
97
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
98
98
|
logging: this._options.logging,
|
|
99
99
|
});
|
|
100
100
|
if (_response.ok) {
|
|
@@ -141,21 +141,21 @@ class ReportsClient {
|
|
|
141
141
|
}
|
|
142
142
|
__createAReport(request, requestOptions) {
|
|
143
143
|
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
144
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
145
145
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
146
146
|
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);
|
|
147
|
-
const _response = yield core.fetcher({
|
|
148
|
-
url: core.url.join((
|
|
147
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
148
|
+
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"),
|
|
149
149
|
method: "POST",
|
|
150
150
|
headers: _headers,
|
|
151
151
|
contentType: "application/json",
|
|
152
152
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
153
153
|
requestType: "json",
|
|
154
154
|
body: request,
|
|
155
|
-
timeoutMs: ((
|
|
156
|
-
maxRetries: (
|
|
155
|
+
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,
|
|
156
|
+
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,
|
|
157
157
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
158
|
-
fetchFn: (
|
|
158
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
159
159
|
logging: this._options.logging,
|
|
160
160
|
});
|
|
161
161
|
if (_response.ok) {
|
|
@@ -204,19 +204,19 @@ class ReportsClient {
|
|
|
204
204
|
}
|
|
205
205
|
__getAReport(request, requestOptions) {
|
|
206
206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
207
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
208
208
|
const { id } = request;
|
|
209
209
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
210
210
|
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);
|
|
211
|
-
const _response = yield core.fetcher({
|
|
212
|
-
url: core.url.join((
|
|
211
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
212
|
+
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)}`),
|
|
213
213
|
method: "GET",
|
|
214
214
|
headers: _headers,
|
|
215
215
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
216
|
-
timeoutMs: ((
|
|
217
|
-
maxRetries: (
|
|
216
|
+
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,
|
|
217
|
+
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,
|
|
218
218
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
219
|
-
fetchFn: (
|
|
219
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
220
220
|
logging: this._options.logging,
|
|
221
221
|
});
|
|
222
222
|
if (_response.ok) {
|
|
@@ -265,19 +265,19 @@ class ReportsClient {
|
|
|
265
265
|
}
|
|
266
266
|
__deleteAReport(request, requestOptions) {
|
|
267
267
|
return __awaiter(this, void 0, void 0, function* () {
|
|
268
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
268
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
269
269
|
const { id } = request;
|
|
270
270
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
271
271
|
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);
|
|
272
|
-
const _response = yield core.fetcher({
|
|
273
|
-
url: core.url.join((
|
|
272
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
273
|
+
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)}`),
|
|
274
274
|
method: "DELETE",
|
|
275
275
|
headers: _headers,
|
|
276
276
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
277
|
-
timeoutMs: ((
|
|
278
|
-
maxRetries: (
|
|
277
|
+
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,
|
|
278
|
+
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,
|
|
279
279
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
280
|
-
fetchFn: (
|
|
280
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
281
281
|
logging: this._options.logging,
|
|
282
282
|
});
|
|
283
283
|
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
|
}
|