@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
  }
@@ -47,7 +47,7 @@ export class UsersClient {
47
47
  }
48
48
  __listAllUsers() {
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 UsersClient {
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((_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"),
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, "users"),
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: ((_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,
70
- 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,
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: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
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) {
@@ -116,19 +116,19 @@ export class UsersClient {
116
116
  }
117
117
  __getAUser(request, requestOptions) {
118
118
  return __awaiter(this, void 0, void 0, function* () {
119
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
119
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
120
120
  const { id } = request;
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((_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)}`),
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, `users/${core.url.encodePathParam(id)}`),
125
125
  method: "GET",
126
126
  headers: _headers,
127
127
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
128
- 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,
129
- 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,
128
+ 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,
129
+ 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,
130
130
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
131
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
131
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
132
132
  logging: this._options.logging,
133
133
  });
134
134
  if (_response.ok) {
@@ -177,19 +177,19 @@ export class UsersClient {
177
177
  }
178
178
  __deleteAUser(request, requestOptions) {
179
179
  return __awaiter(this, void 0, void 0, function* () {
180
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
180
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
181
181
  const { id } = request;
182
182
  const _authRequest = yield this._options.authProvider.getAuthRequest();
183
183
  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);
184
- const _response = yield core.fetcher({
185
- 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)}`),
184
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
185
+ 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)}`),
186
186
  method: "DELETE",
187
187
  headers: _headers,
188
188
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
189
- 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,
190
- 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,
189
+ 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,
190
+ 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,
191
191
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
192
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
192
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
193
193
  logging: this._options.logging,
194
194
  });
195
195
  if (_response.ok) {
@@ -239,22 +239,22 @@ export class UsersClient {
239
239
  }
240
240
  __updateAUser(request, requestOptions) {
241
241
  return __awaiter(this, void 0, void 0, function* () {
242
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
242
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
243
243
  const { id } = request, _body = __rest(request, ["id"]);
244
244
  const _authRequest = yield this._options.authProvider.getAuthRequest();
245
245
  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);
246
- const _response = yield core.fetcher({
247
- 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)}`),
246
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
247
+ 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)}`),
248
248
  method: "PATCH",
249
249
  headers: _headers,
250
250
  contentType: "application/json",
251
251
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
252
252
  requestType: "json",
253
253
  body: _body,
254
- 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,
255
- 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,
254
+ 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,
255
+ 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,
256
256
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
257
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
257
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
258
258
  logging: this._options.logging,
259
259
  });
260
260
  if (_response.ok) {
@@ -304,7 +304,7 @@ export class UsersClient {
304
304
  }
305
305
  __listUserFollowers(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 UsersClient {
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((_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`),
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, `users/${core.url.encodePathParam(id)}/followers`),
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: ((_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,
324
- 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,
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: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
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) {
@@ -370,19 +370,19 @@ export class UsersClient {
370
370
  }
371
371
  __getAFollowerFromUser(request, requestOptions) {
372
372
  return __awaiter(this, void 0, void 0, function* () {
373
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
373
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
374
374
  const { id, subId } = request;
375
375
  const _authRequest = yield this._options.authProvider.getAuthRequest();
376
376
  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);
377
- const _response = yield core.fetcher({
378
- 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)}`),
377
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
378
+ 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)}`),
379
379
  method: "GET",
380
380
  headers: _headers,
381
381
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
382
- 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,
383
- 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,
382
+ 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,
383
+ 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,
384
384
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
385
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
385
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
386
386
  logging: this._options.logging,
387
387
  });
388
388
  if (_response.ok) {
@@ -432,19 +432,19 @@ export class UsersClient {
432
432
  }
433
433
  __deleteAFollowerFromUser(request, requestOptions) {
434
434
  return __awaiter(this, void 0, void 0, function* () {
435
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
435
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
436
436
  const { id, subId } = request;
437
437
  const _authRequest = yield this._options.authProvider.getAuthRequest();
438
438
  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);
439
- const _response = yield core.fetcher({
440
- 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)}`),
439
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
440
+ 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)}`),
441
441
  method: "DELETE",
442
442
  headers: _headers,
443
443
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
444
- 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,
445
- 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,
444
+ 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,
445
+ 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,
446
446
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
447
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
447
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
448
448
  logging: this._options.logging,
449
449
  });
450
450
  if (_response.ok) {
@@ -493,7 +493,7 @@ export class UsersClient {
493
493
  }
494
494
  __listUserFollowing(request, requestOptions) {
495
495
  return __awaiter(this, void 0, void 0, function* () {
496
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
496
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
497
497
  const { id, cursor, limit } = request;
498
498
  const _queryParams = {};
499
499
  if (cursor != null) {
@@ -504,15 +504,15 @@ export class UsersClient {
504
504
  }
505
505
  const _authRequest = yield this._options.authProvider.getAuthRequest();
506
506
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
507
- const _response = yield core.fetcher({
508
- url: core.url.join((_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`),
507
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
508
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/following`),
509
509
  method: "GET",
510
510
  headers: _headers,
511
511
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
512
- 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,
513
- 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,
512
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
513
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
514
514
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
515
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
515
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
516
516
  logging: this._options.logging,
517
517
  });
518
518
  if (_response.ok) {
@@ -559,19 +559,19 @@ export class UsersClient {
559
559
  }
560
560
  __getAFollowingFromUser(request, requestOptions) {
561
561
  return __awaiter(this, void 0, void 0, function* () {
562
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
562
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
563
563
  const { id, subId } = request;
564
564
  const _authRequest = yield this._options.authProvider.getAuthRequest();
565
565
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
566
- const _response = yield core.fetcher({
567
- url: core.url.join((_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)}`),
566
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
567
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
568
568
  method: "GET",
569
569
  headers: _headers,
570
570
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
571
- timeoutMs: ((_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,
572
- 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,
571
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
572
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
573
573
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
574
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
574
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
575
575
  logging: this._options.logging,
576
576
  });
577
577
  if (_response.ok) {
@@ -621,19 +621,19 @@ export class UsersClient {
621
621
  }
622
622
  __deleteAFollowingFromUser(request, requestOptions) {
623
623
  return __awaiter(this, void 0, void 0, function* () {
624
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
624
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
625
625
  const { id, subId } = request;
626
626
  const _authRequest = yield this._options.authProvider.getAuthRequest();
627
627
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
628
- const _response = yield core.fetcher({
629
- url: core.url.join((_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)}`),
628
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
629
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
630
630
  method: "DELETE",
631
631
  headers: _headers,
632
632
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
633
- timeoutMs: ((_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,
634
- 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,
633
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
634
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
635
635
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
636
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
636
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
637
637
  logging: this._options.logging,
638
638
  });
639
639
  if (_response.ok) {
@@ -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
  }