@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.
Files changed (69) hide show
  1. package/dist/cjs/BaseClient.d.ts +1 -0
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/auth/client/Client.js +30 -30
  4. package/dist/cjs/api/resources/auth/types/GetAuthMeResponse.d.ts +7 -2
  5. package/dist/cjs/api/resources/auth/types/PostAuthForgotPasswordResponse.d.ts +7 -2
  6. package/dist/cjs/api/resources/auth/types/PostAuthLoginResponse.d.ts +20 -1
  7. package/dist/cjs/api/resources/auth/types/PostAuthRegisterResponse.d.ts +20 -1
  8. package/dist/cjs/api/resources/auth/types/PostAuthResetPasswordResponse.d.ts +6 -1
  9. package/dist/cjs/api/resources/integrations/client/Client.js +30 -30
  10. package/dist/cjs/api/resources/integrations/types/GetIntegrationsResponse.d.ts +35 -32
  11. package/dist/cjs/api/resources/integrations/types/GetIntegrationsResponse.js +15 -12
  12. package/dist/cjs/api/resources/notifications/client/Client.js +30 -30
  13. package/dist/cjs/api/resources/notifications/types/GetNotificationsResponse.d.ts +35 -32
  14. package/dist/cjs/api/resources/posts/client/Client.js +78 -78
  15. package/dist/cjs/api/resources/posts/types/GetPostsResponse.d.ts +28 -25
  16. package/dist/cjs/api/resources/privateMessages/client/Client.js +48 -48
  17. package/dist/cjs/api/resources/privateMessages/types/GetPrivateMessagesResponse.d.ts +31 -28
  18. package/dist/cjs/api/resources/reports/client/Client.js +24 -24
  19. package/dist/cjs/api/resources/reports/types/GetReportsResponse.d.ts +33 -30
  20. package/dist/cjs/api/resources/roles/client/Client.js +30 -30
  21. package/dist/cjs/api/resources/roles/types/GetRolesResponse.d.ts +27 -24
  22. package/dist/cjs/api/resources/ssOs/client/Client.js +30 -30
  23. package/dist/cjs/api/resources/ssOs/types/GetSsoResponse.d.ts +32 -29
  24. package/dist/cjs/api/resources/ssOs/types/GetSsoResponse.js +12 -9
  25. package/dist/cjs/api/resources/tags/client/Client.js +48 -48
  26. package/dist/cjs/api/resources/tags/types/GetTagsResponse.d.ts +27 -24
  27. package/dist/cjs/api/resources/threads/client/Client.js +114 -114
  28. package/dist/cjs/api/resources/threads/types/GetThreadsResponse.d.ts +55 -52
  29. package/dist/cjs/api/resources/users/client/Client.js +60 -60
  30. package/dist/cjs/api/resources/users/types/GetUsersResponse.d.ts +46 -43
  31. package/dist/cjs/api/resources/webhooks/client/Client.js +42 -42
  32. package/dist/cjs/api/resources/webhooks/types/GetWebhooksResponse.d.ts +29 -26
  33. package/dist/cjs/version.d.ts +1 -1
  34. package/dist/cjs/version.js +1 -1
  35. package/dist/esm/BaseClient.d.mts +1 -0
  36. package/dist/esm/BaseClient.mjs +2 -2
  37. package/dist/esm/api/resources/auth/client/Client.mjs +30 -30
  38. package/dist/esm/api/resources/auth/types/GetAuthMeResponse.d.mts +7 -2
  39. package/dist/esm/api/resources/auth/types/PostAuthForgotPasswordResponse.d.mts +7 -2
  40. package/dist/esm/api/resources/auth/types/PostAuthLoginResponse.d.mts +20 -1
  41. package/dist/esm/api/resources/auth/types/PostAuthRegisterResponse.d.mts +20 -1
  42. package/dist/esm/api/resources/auth/types/PostAuthResetPasswordResponse.d.mts +6 -1
  43. package/dist/esm/api/resources/integrations/client/Client.mjs +30 -30
  44. package/dist/esm/api/resources/integrations/types/GetIntegrationsResponse.d.mts +35 -32
  45. package/dist/esm/api/resources/integrations/types/GetIntegrationsResponse.mjs +15 -12
  46. package/dist/esm/api/resources/notifications/client/Client.mjs +30 -30
  47. package/dist/esm/api/resources/notifications/types/GetNotificationsResponse.d.mts +35 -32
  48. package/dist/esm/api/resources/posts/client/Client.mjs +78 -78
  49. package/dist/esm/api/resources/posts/types/GetPostsResponse.d.mts +28 -25
  50. package/dist/esm/api/resources/privateMessages/client/Client.mjs +48 -48
  51. package/dist/esm/api/resources/privateMessages/types/GetPrivateMessagesResponse.d.mts +31 -28
  52. package/dist/esm/api/resources/reports/client/Client.mjs +24 -24
  53. package/dist/esm/api/resources/reports/types/GetReportsResponse.d.mts +33 -30
  54. package/dist/esm/api/resources/roles/client/Client.mjs +30 -30
  55. package/dist/esm/api/resources/roles/types/GetRolesResponse.d.mts +27 -24
  56. package/dist/esm/api/resources/ssOs/client/Client.mjs +30 -30
  57. package/dist/esm/api/resources/ssOs/types/GetSsoResponse.d.mts +32 -29
  58. package/dist/esm/api/resources/ssOs/types/GetSsoResponse.mjs +12 -9
  59. package/dist/esm/api/resources/tags/client/Client.mjs +48 -48
  60. package/dist/esm/api/resources/tags/types/GetTagsResponse.d.mts +27 -24
  61. package/dist/esm/api/resources/threads/client/Client.mjs +114 -114
  62. package/dist/esm/api/resources/threads/types/GetThreadsResponse.d.mts +55 -52
  63. package/dist/esm/api/resources/users/client/Client.mjs +60 -60
  64. package/dist/esm/api/resources/users/types/GetUsersResponse.d.mts +46 -43
  65. package/dist/esm/api/resources/webhooks/client/Client.mjs +42 -42
  66. package/dist/esm/api/resources/webhooks/types/GetWebhooksResponse.d.mts +29 -26
  67. package/dist/esm/version.d.mts +1 -1
  68. package/dist/esm/version.mjs +1 -1
  69. package/package.json +2 -4
@@ -1,64 +1,67 @@
1
1
  export interface GetThreadsResponse {
2
- data: GetThreadsResponse.Data.Item[];
3
- meta: GetThreadsResponse.Meta;
2
+ data: GetThreadsResponse.Data;
4
3
  }
5
4
  export declare namespace GetThreadsResponse {
6
- type Data = Data.Item[];
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
- interface Item {
9
- /** Thread title */
10
- title: string;
11
- /** Thread content (Markdown supported) */
12
- body: string;
13
- /** Author user ID (required for API key auth, ignored for JWT auth) */
14
- userId?: string;
15
- /** List of tag slugs, names, or IDs to attach */
16
- tags?: string[];
17
- /** Poll data */
18
- poll?: Item.Poll;
19
- id: string;
20
- /** URL-friendly identifier */
21
- slug: string | null;
22
- /** Whether thread is locked */
23
- locked: boolean | null;
24
- /** Whether thread is pinned */
25
- pinned: boolean | null;
26
- /** View count */
27
- views: number;
28
- /** Number of posts/replies */
29
- postsCount: number;
30
- /** Timestamp of the last post */
31
- lastPostAt: string | null;
32
- /** Custom metadata */
33
- extendedData: Record<string, unknown> | null;
34
- createdAt: string;
35
- updatedAt: string;
36
- }
37
- namespace Item {
38
- /**
39
- * Poll data
40
- */
41
- interface Poll {
42
- /** Poll title */
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ /** Thread title */
43
17
  title: string;
44
- /** Poll options */
45
- options: Poll.Options.Item[];
18
+ /** Thread content (Markdown supported) */
19
+ body: string;
20
+ /** Author user ID (required for API key auth, ignored for JWT auth) */
21
+ userId?: string;
22
+ /** List of tag slugs, names, or IDs to attach */
23
+ tags?: string[];
24
+ /** Poll data */
25
+ poll?: Item.Poll;
26
+ id: string;
27
+ /** URL-friendly identifier */
28
+ slug: string | null;
29
+ /** Whether thread is locked */
30
+ locked: boolean | null;
31
+ /** Whether thread is pinned */
32
+ pinned: boolean | null;
33
+ /** View count */
34
+ views: number;
35
+ /** Number of posts/replies */
36
+ postsCount: number;
37
+ /** Timestamp of the last post */
38
+ lastPostAt: string | null;
39
+ /** Custom metadata */
40
+ extendedData: Record<string, unknown> | null;
41
+ createdAt: string;
42
+ updatedAt: string;
46
43
  }
47
- namespace Poll {
48
- type Options = Options.Item[];
49
- namespace Options {
50
- interface Item {
51
- title: string;
52
- color?: string;
53
- extendedData?: Record<string, unknown>;
44
+ namespace Item {
45
+ /**
46
+ * Poll data
47
+ */
48
+ interface Poll {
49
+ /** Poll title */
50
+ title: string;
51
+ /** Poll options */
52
+ options: Poll.Options.Item[];
53
+ }
54
+ namespace Poll {
55
+ type Options = Options.Item[];
56
+ namespace Options {
57
+ interface Item {
58
+ title: string;
59
+ color?: string;
60
+ extendedData?: Record<string, unknown>;
61
+ }
54
62
  }
55
63
  }
56
64
  }
57
65
  }
58
66
  }
59
- interface Meta {
60
- total: number;
61
- page: number;
62
- limit: number;
63
- }
64
67
  }
@@ -83,7 +83,7 @@ class UsersClient {
83
83
  }
84
84
  __listAllUsers() {
85
85
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
86
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
86
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
87
87
  const { page, limit, search } = request;
88
88
  const _queryParams = {};
89
89
  if (page != null) {
@@ -97,15 +97,15 @@ class UsersClient {
97
97
  }
98
98
  const _authRequest = yield this._options.authProvider.getAuthRequest();
99
99
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
100
- const _response = yield core.fetcher({
101
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ForumEnvironment.Production, "users"),
100
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
101
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, "users"),
102
102
  method: "GET",
103
103
  headers: _headers,
104
104
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
105
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
106
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.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: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
108
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
109
109
  logging: this._options.logging,
110
110
  });
111
111
  if (_response.ok) {
@@ -152,19 +152,19 @@ class UsersClient {
152
152
  }
153
153
  __getAUser(request, requestOptions) {
154
154
  return __awaiter(this, void 0, void 0, function* () {
155
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
155
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
156
156
  const { id } = request;
157
157
  const _authRequest = yield this._options.authProvider.getAuthRequest();
158
158
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
159
- const _response = yield core.fetcher({
160
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}`),
159
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
160
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}`),
161
161
  method: "GET",
162
162
  headers: _headers,
163
163
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
164
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
165
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
164
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
165
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
166
166
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
167
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
167
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
168
168
  logging: this._options.logging,
169
169
  });
170
170
  if (_response.ok) {
@@ -213,19 +213,19 @@ class UsersClient {
213
213
  }
214
214
  __deleteAUser(request, requestOptions) {
215
215
  return __awaiter(this, void 0, void 0, function* () {
216
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
216
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
217
217
  const { id } = request;
218
218
  const _authRequest = yield this._options.authProvider.getAuthRequest();
219
219
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
220
- const _response = yield core.fetcher({
221
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}`),
220
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
221
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}`),
222
222
  method: "DELETE",
223
223
  headers: _headers,
224
224
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
225
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
226
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
225
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
226
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
227
227
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
228
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
228
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
229
229
  logging: this._options.logging,
230
230
  });
231
231
  if (_response.ok) {
@@ -275,22 +275,22 @@ class UsersClient {
275
275
  }
276
276
  __updateAUser(request, requestOptions) {
277
277
  return __awaiter(this, void 0, void 0, function* () {
278
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
278
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
279
279
  const { id } = request, _body = __rest(request, ["id"]);
280
280
  const _authRequest = yield this._options.authProvider.getAuthRequest();
281
281
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
282
- const _response = yield core.fetcher({
283
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}`),
282
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
283
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}`),
284
284
  method: "PATCH",
285
285
  headers: _headers,
286
286
  contentType: "application/json",
287
287
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
288
288
  requestType: "json",
289
289
  body: _body,
290
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
291
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
290
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
291
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
292
292
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
293
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
293
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
294
294
  logging: this._options.logging,
295
295
  });
296
296
  if (_response.ok) {
@@ -340,7 +340,7 @@ class UsersClient {
340
340
  }
341
341
  __listUserFollowers(request, requestOptions) {
342
342
  return __awaiter(this, void 0, void 0, function* () {
343
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
343
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
344
344
  const { id, cursor, limit } = request;
345
345
  const _queryParams = {};
346
346
  if (cursor != null) {
@@ -351,15 +351,15 @@ class UsersClient {
351
351
  }
352
352
  const _authRequest = yield this._options.authProvider.getAuthRequest();
353
353
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
354
- const _response = yield core.fetcher({
355
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/followers`),
354
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
355
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/followers`),
356
356
  method: "GET",
357
357
  headers: _headers,
358
358
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
359
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
360
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.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: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
362
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
363
363
  logging: this._options.logging,
364
364
  });
365
365
  if (_response.ok) {
@@ -406,19 +406,19 @@ class UsersClient {
406
406
  }
407
407
  __getAFollowerFromUser(request, requestOptions) {
408
408
  return __awaiter(this, void 0, void 0, function* () {
409
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
409
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
410
410
  const { id, subId } = request;
411
411
  const _authRequest = yield this._options.authProvider.getAuthRequest();
412
412
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
413
- const _response = yield core.fetcher({
414
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/followers/${core.url.encodePathParam(subId)}`),
413
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
414
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/followers/${core.url.encodePathParam(subId)}`),
415
415
  method: "GET",
416
416
  headers: _headers,
417
417
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
418
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
419
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
418
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
419
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
420
420
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
421
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
421
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
422
422
  logging: this._options.logging,
423
423
  });
424
424
  if (_response.ok) {
@@ -468,19 +468,19 @@ class UsersClient {
468
468
  }
469
469
  __deleteAFollowerFromUser(request, requestOptions) {
470
470
  return __awaiter(this, void 0, void 0, function* () {
471
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
471
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
472
472
  const { id, subId } = request;
473
473
  const _authRequest = yield this._options.authProvider.getAuthRequest();
474
474
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
475
- const _response = yield core.fetcher({
476
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/followers/${core.url.encodePathParam(subId)}`),
475
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
476
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/followers/${core.url.encodePathParam(subId)}`),
477
477
  method: "DELETE",
478
478
  headers: _headers,
479
479
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
480
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
481
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
480
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
481
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
482
482
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
483
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
483
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
484
484
  logging: this._options.logging,
485
485
  });
486
486
  if (_response.ok) {
@@ -529,7 +529,7 @@ class UsersClient {
529
529
  }
530
530
  __listUserFollowing(request, requestOptions) {
531
531
  return __awaiter(this, void 0, void 0, function* () {
532
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
532
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
533
533
  const { id, cursor, limit } = request;
534
534
  const _queryParams = {};
535
535
  if (cursor != null) {
@@ -540,15 +540,15 @@ class UsersClient {
540
540
  }
541
541
  const _authRequest = yield this._options.authProvider.getAuthRequest();
542
542
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
543
- const _response = yield core.fetcher({
544
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/following`),
543
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
544
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/following`),
545
545
  method: "GET",
546
546
  headers: _headers,
547
547
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
548
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
549
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
548
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
549
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
550
550
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
551
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
551
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
552
552
  logging: this._options.logging,
553
553
  });
554
554
  if (_response.ok) {
@@ -595,19 +595,19 @@ class UsersClient {
595
595
  }
596
596
  __getAFollowingFromUser(request, requestOptions) {
597
597
  return __awaiter(this, void 0, void 0, function* () {
598
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
598
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
599
599
  const { id, subId } = request;
600
600
  const _authRequest = yield this._options.authProvider.getAuthRequest();
601
601
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
602
- const _response = yield core.fetcher({
603
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
602
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
603
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
604
604
  method: "GET",
605
605
  headers: _headers,
606
606
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
607
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
608
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
607
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
608
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
609
609
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
610
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
610
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
611
611
  logging: this._options.logging,
612
612
  });
613
613
  if (_response.ok) {
@@ -657,19 +657,19 @@ class UsersClient {
657
657
  }
658
658
  __deleteAFollowingFromUser(request, requestOptions) {
659
659
  return __awaiter(this, void 0, void 0, function* () {
660
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
660
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
661
661
  const { id, subId } = request;
662
662
  const _authRequest = yield this._options.authProvider.getAuthRequest();
663
663
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
664
- const _response = yield core.fetcher({
665
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
664
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
665
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
666
666
  method: "DELETE",
667
667
  headers: _headers,
668
668
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
669
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
670
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
669
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
670
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
671
671
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
672
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
672
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
673
673
  logging: this._options.logging,
674
674
  });
675
675
  if (_response.ok) {
@@ -1,52 +1,55 @@
1
1
  export interface GetUsersResponse {
2
- data: GetUsersResponse.Data.Item[];
3
- meta: GetUsersResponse.Meta;
2
+ data: GetUsersResponse.Data;
4
3
  }
5
4
  export declare namespace GetUsersResponse {
6
- type Data = Data.Item[];
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
- interface Item {
9
- id: string;
10
- username: string;
11
- /** Display name */
12
- displayName: string | null;
13
- /** User bio */
14
- bio: string | null;
15
- /** Forum signature */
16
- signature: string | null;
17
- /** User website URL */
18
- url: string | null;
19
- /** Total posts by user */
20
- postsCount?: number;
21
- /** Total threads by user */
22
- threadsCount?: number;
23
- /** Online status */
24
- isOnline: boolean | null;
25
- /** Last activity timestamp */
26
- lastSeenAt: string | null;
27
- /** User roles */
28
- roles?: Item.Roles.Item[];
29
- /** Custom user data */
30
- extendedData: Record<string, unknown> | null;
31
- /** Account creation timestamp */
32
- createdAt: string;
33
- /** Profile last update timestamp */
34
- updatedAt: string;
35
- }
36
- namespace Item {
37
- type Roles = Roles.Item[];
38
- namespace Roles {
39
- interface Item {
40
- id: string;
41
- name: string;
42
- slug: string | null;
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ id: string;
17
+ username: string;
18
+ /** Display name */
19
+ displayName: string | null;
20
+ /** User bio */
21
+ bio: string | null;
22
+ /** Forum signature */
23
+ signature: string | null;
24
+ /** User website URL */
25
+ url: string | null;
26
+ /** Total posts by user */
27
+ postsCount?: number;
28
+ /** Total threads by user */
29
+ threadsCount?: number;
30
+ /** Online status */
31
+ isOnline: boolean | null;
32
+ /** Last activity timestamp */
33
+ lastSeenAt: string | null;
34
+ /** User roles */
35
+ roles?: Item.Roles.Item[];
36
+ /** Custom user data */
37
+ extendedData: Record<string, unknown> | null;
38
+ /** Account creation timestamp */
39
+ createdAt: string;
40
+ /** Profile last update timestamp */
41
+ updatedAt: string;
42
+ }
43
+ namespace Item {
44
+ type Roles = Roles.Item[];
45
+ namespace Roles {
46
+ interface Item {
47
+ id: string;
48
+ name: string;
49
+ slug: string | null;
50
+ }
43
51
  }
44
52
  }
45
53
  }
46
54
  }
47
- interface Meta {
48
- total: number;
49
- page: number;
50
- limit: number;
51
- }
52
55
  }