@foru-ms/sdk 2.0.5 → 2.0.7

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 (98) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +1 -1
  3. package/dist/cjs/Client.js +1 -1
  4. package/dist/cjs/api/resources/auth/client/Client.d.ts +13 -1
  5. package/dist/cjs/api/resources/auth/client/Client.js +29 -5
  6. package/dist/cjs/api/resources/auth/types/GetAuthMeResponse.d.ts +7 -2
  7. package/dist/cjs/api/resources/auth/types/PostAuthForgotPasswordResponse.d.ts +7 -2
  8. package/dist/cjs/api/resources/auth/types/PostAuthLoginResponse.d.ts +20 -1
  9. package/dist/cjs/api/resources/auth/types/PostAuthRegisterResponse.d.ts +20 -1
  10. package/dist/cjs/api/resources/auth/types/PostAuthResetPasswordResponse.d.ts +6 -1
  11. package/dist/cjs/api/resources/integrations/client/Client.d.ts +1 -1
  12. package/dist/cjs/api/resources/integrations/client/Client.js +1 -1
  13. package/dist/cjs/api/resources/integrations/types/GetIntegrationsResponse.d.ts +35 -32
  14. package/dist/cjs/api/resources/integrations/types/GetIntegrationsResponse.js +15 -12
  15. package/dist/cjs/api/resources/notifications/client/Client.d.ts +1 -1
  16. package/dist/cjs/api/resources/notifications/client/Client.js +1 -1
  17. package/dist/cjs/api/resources/notifications/types/GetNotificationsResponse.d.ts +35 -32
  18. package/dist/cjs/api/resources/posts/client/Client.d.ts +1 -1
  19. package/dist/cjs/api/resources/posts/client/Client.js +1 -1
  20. package/dist/cjs/api/resources/posts/types/GetPostsResponse.d.ts +28 -25
  21. package/dist/cjs/api/resources/privateMessages/client/Client.d.ts +1 -1
  22. package/dist/cjs/api/resources/privateMessages/client/Client.js +1 -1
  23. package/dist/cjs/api/resources/privateMessages/types/GetPrivateMessagesResponse.d.ts +31 -28
  24. package/dist/cjs/api/resources/reports/client/Client.d.ts +1 -1
  25. package/dist/cjs/api/resources/reports/client/Client.js +1 -1
  26. package/dist/cjs/api/resources/reports/types/GetReportsResponse.d.ts +33 -30
  27. package/dist/cjs/api/resources/roles/client/Client.d.ts +1 -1
  28. package/dist/cjs/api/resources/roles/client/Client.js +1 -1
  29. package/dist/cjs/api/resources/roles/types/GetRolesResponse.d.ts +27 -24
  30. package/dist/cjs/api/resources/ssOs/client/Client.d.ts +1 -1
  31. package/dist/cjs/api/resources/ssOs/client/Client.js +1 -1
  32. package/dist/cjs/api/resources/ssOs/types/GetSsoResponse.d.ts +32 -29
  33. package/dist/cjs/api/resources/ssOs/types/GetSsoResponse.js +12 -9
  34. package/dist/cjs/api/resources/tags/client/Client.d.ts +1 -1
  35. package/dist/cjs/api/resources/tags/client/Client.js +1 -1
  36. package/dist/cjs/api/resources/tags/types/GetTagsResponse.d.ts +27 -24
  37. package/dist/cjs/api/resources/threads/client/Client.d.ts +1 -1
  38. package/dist/cjs/api/resources/threads/client/Client.js +1 -1
  39. package/dist/cjs/api/resources/threads/types/GetThreadsResponse.d.ts +55 -52
  40. package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
  41. package/dist/cjs/api/resources/users/client/Client.js +1 -1
  42. package/dist/cjs/api/resources/users/types/GetUsersResponse.d.ts +46 -43
  43. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +1 -1
  44. package/dist/cjs/api/resources/webhooks/client/Client.js +1 -1
  45. package/dist/cjs/api/resources/webhooks/types/GetWebhooksResponse.d.ts +29 -26
  46. package/dist/cjs/auth/HeaderAuthProvider.d.ts +1 -1
  47. package/dist/cjs/version.d.ts +1 -1
  48. package/dist/cjs/version.js +1 -1
  49. package/dist/esm/BaseClient.mjs +2 -2
  50. package/dist/esm/Client.d.mts +1 -1
  51. package/dist/esm/Client.mjs +1 -1
  52. package/dist/esm/api/resources/auth/client/Client.d.mts +13 -1
  53. package/dist/esm/api/resources/auth/client/Client.mjs +29 -5
  54. package/dist/esm/api/resources/auth/types/GetAuthMeResponse.d.mts +7 -2
  55. package/dist/esm/api/resources/auth/types/PostAuthForgotPasswordResponse.d.mts +7 -2
  56. package/dist/esm/api/resources/auth/types/PostAuthLoginResponse.d.mts +20 -1
  57. package/dist/esm/api/resources/auth/types/PostAuthRegisterResponse.d.mts +20 -1
  58. package/dist/esm/api/resources/auth/types/PostAuthResetPasswordResponse.d.mts +6 -1
  59. package/dist/esm/api/resources/integrations/client/Client.d.mts +1 -1
  60. package/dist/esm/api/resources/integrations/client/Client.mjs +1 -1
  61. package/dist/esm/api/resources/integrations/types/GetIntegrationsResponse.d.mts +35 -32
  62. package/dist/esm/api/resources/integrations/types/GetIntegrationsResponse.mjs +15 -12
  63. package/dist/esm/api/resources/notifications/client/Client.d.mts +1 -1
  64. package/dist/esm/api/resources/notifications/client/Client.mjs +1 -1
  65. package/dist/esm/api/resources/notifications/types/GetNotificationsResponse.d.mts +35 -32
  66. package/dist/esm/api/resources/posts/client/Client.d.mts +1 -1
  67. package/dist/esm/api/resources/posts/client/Client.mjs +1 -1
  68. package/dist/esm/api/resources/posts/types/GetPostsResponse.d.mts +28 -25
  69. package/dist/esm/api/resources/privateMessages/client/Client.d.mts +1 -1
  70. package/dist/esm/api/resources/privateMessages/client/Client.mjs +1 -1
  71. package/dist/esm/api/resources/privateMessages/types/GetPrivateMessagesResponse.d.mts +31 -28
  72. package/dist/esm/api/resources/reports/client/Client.d.mts +1 -1
  73. package/dist/esm/api/resources/reports/client/Client.mjs +1 -1
  74. package/dist/esm/api/resources/reports/types/GetReportsResponse.d.mts +33 -30
  75. package/dist/esm/api/resources/roles/client/Client.d.mts +1 -1
  76. package/dist/esm/api/resources/roles/client/Client.mjs +1 -1
  77. package/dist/esm/api/resources/roles/types/GetRolesResponse.d.mts +27 -24
  78. package/dist/esm/api/resources/ssOs/client/Client.d.mts +1 -1
  79. package/dist/esm/api/resources/ssOs/client/Client.mjs +1 -1
  80. package/dist/esm/api/resources/ssOs/types/GetSsoResponse.d.mts +32 -29
  81. package/dist/esm/api/resources/ssOs/types/GetSsoResponse.mjs +12 -9
  82. package/dist/esm/api/resources/tags/client/Client.d.mts +1 -1
  83. package/dist/esm/api/resources/tags/client/Client.mjs +1 -1
  84. package/dist/esm/api/resources/tags/types/GetTagsResponse.d.mts +27 -24
  85. package/dist/esm/api/resources/threads/client/Client.d.mts +1 -1
  86. package/dist/esm/api/resources/threads/client/Client.mjs +1 -1
  87. package/dist/esm/api/resources/threads/types/GetThreadsResponse.d.mts +55 -52
  88. package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
  89. package/dist/esm/api/resources/users/client/Client.mjs +1 -1
  90. package/dist/esm/api/resources/users/types/GetUsersResponse.d.mts +46 -43
  91. package/dist/esm/api/resources/webhooks/client/Client.d.mts +1 -1
  92. package/dist/esm/api/resources/webhooks/client/Client.mjs +1 -1
  93. package/dist/esm/api/resources/webhooks/types/GetWebhooksResponse.d.mts +29 -26
  94. package/dist/esm/auth/HeaderAuthProvider.d.mts +1 -1
  95. package/dist/esm/version.d.mts +1 -1
  96. package/dist/esm/version.mjs +1 -1
  97. package/package.json +2 -4
  98. package/reference.md +56 -0
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@foru-ms/sdk",
46
- "X-Fern-SDK-Version": "2.0.5",
47
- "User-Agent": "@foru-ms/sdk/2.0.5",
46
+ "X-Fern-SDK-Version": "2.0.7",
47
+ "User-Agent": "@foru-ms/sdk/2.0.7",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -31,7 +31,7 @@ export declare class ForumClient {
31
31
  protected _webhooks: WebhooksClient | undefined;
32
32
  protected _integrations: IntegrationsClient | undefined;
33
33
  protected _ssOs: SsOsClient | undefined;
34
- constructor(options?: ForumClient.Options);
34
+ constructor(options: ForumClient.Options);
35
35
  get auth(): AuthClient;
36
36
  get tags(): TagsClient;
37
37
  get threads(): ThreadsClient;
@@ -16,7 +16,7 @@ const Client_js_11 = require("./api/resources/users/client/Client.js");
16
16
  const Client_js_12 = require("./api/resources/webhooks/client/Client.js");
17
17
  const BaseClient_js_1 = require("./BaseClient.js");
18
18
  class ForumClient {
19
- constructor(options = {}) {
19
+ constructor(options) {
20
20
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
21
21
  }
22
22
  get auth() {
@@ -9,12 +9,15 @@ export declare namespace AuthClient {
9
9
  }
10
10
  export declare class AuthClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<AuthClient.Options>;
12
- constructor(options?: AuthClient.Options);
12
+ constructor(options: AuthClient.Options);
13
13
  /**
14
+ * Register a new user in your forum instance. Requires API key for instance identification. Returns a JWT token for subsequent authenticated requests.
15
+ *
14
16
  * @param {Forum.PostAuthRegisterRequest} request
15
17
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
16
18
  *
17
19
  * @throws {@link Forum.BadRequestError}
20
+ * @throws {@link Forum.UnauthorizedError}
18
21
  * @throws {@link Forum.PaymentRequiredError}
19
22
  * @throws {@link Forum.TooManyRequestsError}
20
23
  * @throws {@link Forum.InternalServerError}
@@ -29,10 +32,13 @@ export declare class AuthClient {
29
32
  register(request: Forum.PostAuthRegisterRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<Forum.PostAuthRegisterResponse>;
30
33
  private __register;
31
34
  /**
35
+ * Authenticate an existing user. Requires API key for instance identification. Returns a JWT token for subsequent authenticated requests.
36
+ *
32
37
  * @param {Forum.PostAuthLoginRequest} request
33
38
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
34
39
  *
35
40
  * @throws {@link Forum.BadRequestError}
41
+ * @throws {@link Forum.UnauthorizedError}
36
42
  * @throws {@link Forum.PaymentRequiredError}
37
43
  * @throws {@link Forum.TooManyRequestsError}
38
44
  * @throws {@link Forum.InternalServerError}
@@ -59,10 +65,13 @@ export declare class AuthClient {
59
65
  getCurrentUser(requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<Forum.GetAuthMeResponse>;
60
66
  private __getCurrentUser;
61
67
  /**
68
+ * Request a password reset email. Requires API key for instance identification.
69
+ *
62
70
  * @param {Forum.PostAuthForgotPasswordRequest} request
63
71
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
64
72
  *
65
73
  * @throws {@link Forum.BadRequestError}
74
+ * @throws {@link Forum.UnauthorizedError}
66
75
  * @throws {@link Forum.PaymentRequiredError}
67
76
  * @throws {@link Forum.TooManyRequestsError}
68
77
  * @throws {@link Forum.InternalServerError}
@@ -75,10 +84,13 @@ export declare class AuthClient {
75
84
  requestPasswordReset(request: Forum.PostAuthForgotPasswordRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<Forum.PostAuthForgotPasswordResponse>;
76
85
  private __requestPasswordReset;
77
86
  /**
87
+ * Reset password using a reset token. Requires API key for instance identification.
88
+ *
78
89
  * @param {Forum.PostAuthResetPasswordRequest} request
79
90
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
80
91
  *
81
92
  * @throws {@link Forum.BadRequestError}
93
+ * @throws {@link Forum.UnauthorizedError}
82
94
  * @throws {@link Forum.PaymentRequiredError}
83
95
  * @throws {@link Forum.TooManyRequestsError}
84
96
  * @throws {@link Forum.InternalServerError}
@@ -52,14 +52,17 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
52
52
  const errors = __importStar(require("../../../../errors/index.js"));
53
53
  const Forum = __importStar(require("../../../index.js"));
54
54
  class AuthClient {
55
- constructor(options = {}) {
55
+ constructor(options) {
56
56
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
57
  }
58
58
  /**
59
+ * Register a new user in your forum instance. Requires API key for instance identification. Returns a JWT token for subsequent authenticated requests.
60
+ *
59
61
  * @param {Forum.PostAuthRegisterRequest} request
60
62
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
61
63
  *
62
64
  * @throws {@link Forum.BadRequestError}
65
+ * @throws {@link Forum.UnauthorizedError}
63
66
  * @throws {@link Forum.PaymentRequiredError}
64
67
  * @throws {@link Forum.TooManyRequestsError}
65
68
  * @throws {@link Forum.InternalServerError}
@@ -77,7 +80,8 @@ class AuthClient {
77
80
  __register(request, requestOptions) {
78
81
  return __awaiter(this, void 0, void 0, function* () {
79
82
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
80
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
83
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
84
+ 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);
81
85
  const _response = yield core.fetcher({
82
86
  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, "auth/register"),
83
87
  method: "POST",
@@ -99,6 +103,8 @@ class AuthClient {
99
103
  switch (_response.error.statusCode) {
100
104
  case 400:
101
105
  throw new Forum.BadRequestError(_response.error.body, _response.rawResponse);
106
+ case 401:
107
+ throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
102
108
  case 402:
103
109
  throw new Forum.PaymentRequiredError(_response.error.body, _response.rawResponse);
104
110
  case 429:
@@ -117,10 +123,13 @@ class AuthClient {
117
123
  });
118
124
  }
119
125
  /**
126
+ * Authenticate an existing user. Requires API key for instance identification. Returns a JWT token for subsequent authenticated requests.
127
+ *
120
128
  * @param {Forum.PostAuthLoginRequest} request
121
129
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
122
130
  *
123
131
  * @throws {@link Forum.BadRequestError}
132
+ * @throws {@link Forum.UnauthorizedError}
124
133
  * @throws {@link Forum.PaymentRequiredError}
125
134
  * @throws {@link Forum.TooManyRequestsError}
126
135
  * @throws {@link Forum.InternalServerError}
@@ -137,7 +146,8 @@ class AuthClient {
137
146
  __login(request, requestOptions) {
138
147
  return __awaiter(this, void 0, void 0, function* () {
139
148
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
140
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
149
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
150
+ 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);
141
151
  const _response = yield core.fetcher({
142
152
  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, "auth/login"),
143
153
  method: "POST",
@@ -159,6 +169,8 @@ class AuthClient {
159
169
  switch (_response.error.statusCode) {
160
170
  case 400:
161
171
  throw new Forum.BadRequestError(_response.error.body, _response.rawResponse);
172
+ case 401:
173
+ throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
162
174
  case 402:
163
175
  throw new Forum.PaymentRequiredError(_response.error.body, _response.rawResponse);
164
176
  case 429:
@@ -231,10 +243,13 @@ class AuthClient {
231
243
  });
232
244
  }
233
245
  /**
246
+ * Request a password reset email. Requires API key for instance identification.
247
+ *
234
248
  * @param {Forum.PostAuthForgotPasswordRequest} request
235
249
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
236
250
  *
237
251
  * @throws {@link Forum.BadRequestError}
252
+ * @throws {@link Forum.UnauthorizedError}
238
253
  * @throws {@link Forum.PaymentRequiredError}
239
254
  * @throws {@link Forum.TooManyRequestsError}
240
255
  * @throws {@link Forum.InternalServerError}
@@ -250,7 +265,8 @@ class AuthClient {
250
265
  __requestPasswordReset(request, requestOptions) {
251
266
  return __awaiter(this, void 0, void 0, function* () {
252
267
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
253
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
268
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
269
+ 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);
254
270
  const _response = yield core.fetcher({
255
271
  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, "auth/forgot-password"),
256
272
  method: "POST",
@@ -272,6 +288,8 @@ class AuthClient {
272
288
  switch (_response.error.statusCode) {
273
289
  case 400:
274
290
  throw new Forum.BadRequestError(_response.error.body, _response.rawResponse);
291
+ case 401:
292
+ throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
275
293
  case 402:
276
294
  throw new Forum.PaymentRequiredError(_response.error.body, _response.rawResponse);
277
295
  case 429:
@@ -290,10 +308,13 @@ class AuthClient {
290
308
  });
291
309
  }
292
310
  /**
311
+ * Reset password using a reset token. Requires API key for instance identification.
312
+ *
293
313
  * @param {Forum.PostAuthResetPasswordRequest} request
294
314
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
295
315
  *
296
316
  * @throws {@link Forum.BadRequestError}
317
+ * @throws {@link Forum.UnauthorizedError}
297
318
  * @throws {@link Forum.PaymentRequiredError}
298
319
  * @throws {@link Forum.TooManyRequestsError}
299
320
  * @throws {@link Forum.InternalServerError}
@@ -309,7 +330,8 @@ class AuthClient {
309
330
  __resetPassword(request, requestOptions) {
310
331
  return __awaiter(this, void 0, void 0, function* () {
311
332
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
312
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
333
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
334
+ 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);
313
335
  const _response = yield core.fetcher({
314
336
  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, "auth/reset-password"),
315
337
  method: "POST",
@@ -331,6 +353,8 @@ class AuthClient {
331
353
  switch (_response.error.statusCode) {
332
354
  case 400:
333
355
  throw new Forum.BadRequestError(_response.error.body, _response.rawResponse);
356
+ case 401:
357
+ throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
334
358
  case 402:
335
359
  throw new Forum.PaymentRequiredError(_response.error.body, _response.rawResponse);
336
360
  case 429:
@@ -1,4 +1,9 @@
1
1
  export interface GetAuthMeResponse {
2
- id: string;
3
- username: string;
2
+ data: GetAuthMeResponse.Data;
3
+ }
4
+ export declare namespace GetAuthMeResponse {
5
+ interface Data {
6
+ id: string;
7
+ username: string;
8
+ }
4
9
  }
@@ -1,4 +1,9 @@
1
1
  export interface PostAuthForgotPasswordResponse {
2
- message: string;
3
- resetToken?: string;
2
+ data: PostAuthForgotPasswordResponse.Data;
3
+ }
4
+ export declare namespace PostAuthForgotPasswordResponse {
5
+ interface Data {
6
+ message: string;
7
+ resetToken?: string;
8
+ }
4
9
  }
@@ -1,3 +1,22 @@
1
1
  export interface PostAuthLoginResponse {
2
- token: string;
2
+ data: PostAuthLoginResponse.Data;
3
+ }
4
+ export declare namespace PostAuthLoginResponse {
5
+ interface Data {
6
+ /** JWT token for authenticated requests */
7
+ token: string;
8
+ /** Authenticated user profile */
9
+ user: Data.User;
10
+ }
11
+ namespace Data {
12
+ /**
13
+ * Authenticated user profile
14
+ */
15
+ interface User {
16
+ id: string;
17
+ username: string;
18
+ email?: string;
19
+ displayName: string | null;
20
+ }
21
+ }
3
22
  }
@@ -1,3 +1,22 @@
1
1
  export interface PostAuthRegisterResponse {
2
- token: string;
2
+ data: PostAuthRegisterResponse.Data;
3
+ }
4
+ export declare namespace PostAuthRegisterResponse {
5
+ interface Data {
6
+ /** JWT token for authenticated requests */
7
+ token: string;
8
+ /** Registered user profile */
9
+ user: Data.User;
10
+ }
11
+ namespace Data {
12
+ /**
13
+ * Registered user profile
14
+ */
15
+ interface User {
16
+ id: string;
17
+ username: string;
18
+ email?: string;
19
+ displayName: string | null;
20
+ }
21
+ }
3
22
  }
@@ -1,3 +1,8 @@
1
1
  export interface PostAuthResetPasswordResponse {
2
- message: string;
2
+ data: PostAuthResetPasswordResponse.Data;
3
+ }
4
+ export declare namespace PostAuthResetPasswordResponse {
5
+ interface Data {
6
+ message: string;
7
+ }
3
8
  }
@@ -9,7 +9,7 @@ export declare namespace IntegrationsClient {
9
9
  }
10
10
  export declare class IntegrationsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<IntegrationsClient.Options>;
12
- constructor(options?: IntegrationsClient.Options);
12
+ constructor(options: IntegrationsClient.Options);
13
13
  /**
14
14
  * @param {Forum.GetIntegrationsRequest} request
15
15
  * @param {IntegrationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -63,7 +63,7 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
63
63
  const errors = __importStar(require("../../../../errors/index.js"));
64
64
  const Forum = __importStar(require("../../../index.js"));
65
65
  class IntegrationsClient {
66
- constructor(options = {}) {
66
+ constructor(options) {
67
67
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
68
  }
69
69
  /**
@@ -1,39 +1,42 @@
1
1
  export interface GetIntegrationsResponse {
2
- data: GetIntegrationsResponse.Data.Item[];
3
- meta: GetIntegrationsResponse.Meta;
2
+ data: GetIntegrationsResponse.Data;
4
3
  }
5
4
  export declare namespace GetIntegrationsResponse {
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
- /** Integration type */
11
- type: Item.Type;
12
- /** Integration name */
13
- name: string;
14
- /** Whether integration is active */
15
- active: boolean;
16
- /** Integration creation timestamp */
17
- createdAt: string;
18
- /** Integration last update timestamp */
19
- updatedAt: string;
20
- }
21
- namespace Item {
22
- /** Integration type */
23
- const Type: {
24
- readonly Slack: "SLACK";
25
- readonly Discord: "DISCORD";
26
- readonly Salesforce: "SALESFORCE";
27
- readonly Hubspot: "HUBSPOT";
28
- readonly Okta: "OKTA";
29
- readonly Auth0: "AUTH0";
30
- };
31
- type Type = (typeof Type)[keyof typeof Type];
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ id: string;
17
+ /** Integration type */
18
+ type: Item.Type;
19
+ /** Integration name */
20
+ name: string;
21
+ /** Whether integration is active */
22
+ active: boolean;
23
+ /** Integration creation timestamp */
24
+ createdAt: string;
25
+ /** Integration last update timestamp */
26
+ updatedAt: string;
27
+ }
28
+ namespace Item {
29
+ /** Integration type */
30
+ const Type: {
31
+ readonly Slack: "SLACK";
32
+ readonly Discord: "DISCORD";
33
+ readonly Salesforce: "SALESFORCE";
34
+ readonly Hubspot: "HUBSPOT";
35
+ readonly Okta: "OKTA";
36
+ readonly Auth0: "AUTH0";
37
+ };
38
+ type Type = (typeof Type)[keyof typeof Type];
39
+ }
32
40
  }
33
41
  }
34
- interface Meta {
35
- total: number;
36
- page: number;
37
- limit: number;
38
- }
39
42
  }
@@ -6,17 +6,20 @@ var GetIntegrationsResponse;
6
6
  (function (GetIntegrationsResponse) {
7
7
  let Data;
8
8
  (function (Data) {
9
- let Item;
10
- (function (Item) {
11
- /** Integration type */
12
- Item.Type = {
13
- Slack: "SLACK",
14
- Discord: "DISCORD",
15
- Salesforce: "SALESFORCE",
16
- Hubspot: "HUBSPOT",
17
- Okta: "OKTA",
18
- Auth0: "AUTH0",
19
- };
20
- })(Item = Data.Item || (Data.Item = {}));
9
+ let Items;
10
+ (function (Items) {
11
+ let Item;
12
+ (function (Item) {
13
+ /** Integration type */
14
+ Item.Type = {
15
+ Slack: "SLACK",
16
+ Discord: "DISCORD",
17
+ Salesforce: "SALESFORCE",
18
+ Hubspot: "HUBSPOT",
19
+ Okta: "OKTA",
20
+ Auth0: "AUTH0",
21
+ };
22
+ })(Item = Items.Item || (Items.Item = {}));
23
+ })(Items = Data.Items || (Data.Items = {}));
21
24
  })(Data = GetIntegrationsResponse.Data || (GetIntegrationsResponse.Data = {}));
22
25
  })(GetIntegrationsResponse || (exports.GetIntegrationsResponse = GetIntegrationsResponse = {}));
@@ -9,7 +9,7 @@ export declare namespace NotificationsClient {
9
9
  }
10
10
  export declare class NotificationsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<NotificationsClient.Options>;
12
- constructor(options?: NotificationsClient.Options);
12
+ constructor(options: NotificationsClient.Options);
13
13
  /**
14
14
  * @param {Forum.GetNotificationsRequest} request
15
15
  * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -63,7 +63,7 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
63
63
  const errors = __importStar(require("../../../../errors/index.js"));
64
64
  const Forum = __importStar(require("../../../index.js"));
65
65
  class NotificationsClient {
66
- constructor(options = {}) {
66
+ constructor(options) {
67
67
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
68
  }
69
69
  /**
@@ -1,39 +1,42 @@
1
1
  export interface GetNotificationsResponse {
2
- data: GetNotificationsResponse.Data.Item[];
3
- meta: GetNotificationsResponse.Meta;
2
+ data: GetNotificationsResponse.Data;
4
3
  }
5
4
  export declare namespace GetNotificationsResponse {
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
- /** Recipient user ID */
11
- userId: string;
12
- /** User ID who triggered the notification */
13
- notifierId: string;
14
- /** Notification type */
15
- type: string | null;
16
- /** Notification text content */
17
- description: string | null;
18
- /** Notification status (read, unread, dismissed, archived) */
19
- status: string | null;
20
- /** Related thread ID */
21
- threadId: string | null;
22
- /** Related post ID */
23
- postId: string | null;
24
- /** Related private message ID */
25
- privateMessageId: string | null;
26
- /** Additional notification data */
27
- extendedData: Record<string, unknown> | null;
28
- /** Notification creation timestamp */
29
- createdAt: string;
30
- /** Notification last update timestamp */
31
- updatedAt: string;
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ id: string;
17
+ /** Recipient user ID */
18
+ userId: string;
19
+ /** User ID who triggered the notification */
20
+ notifierId: string;
21
+ /** Notification type */
22
+ type: string | null;
23
+ /** Notification text content */
24
+ description: string | null;
25
+ /** Notification status (read, unread, dismissed, archived) */
26
+ status: string | null;
27
+ /** Related thread ID */
28
+ threadId: string | null;
29
+ /** Related post ID */
30
+ postId: string | null;
31
+ /** Related private message ID */
32
+ privateMessageId: string | null;
33
+ /** Additional notification data */
34
+ extendedData: Record<string, unknown> | null;
35
+ /** Notification creation timestamp */
36
+ createdAt: string;
37
+ /** Notification last update timestamp */
38
+ updatedAt: string;
39
+ }
32
40
  }
33
41
  }
34
- interface Meta {
35
- total: number;
36
- page: number;
37
- limit: number;
38
- }
39
42
  }
@@ -9,7 +9,7 @@ export declare namespace PostsClient {
9
9
  }
10
10
  export declare class PostsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<PostsClient.Options>;
12
- constructor(options?: PostsClient.Options);
12
+ constructor(options: PostsClient.Options);
13
13
  /**
14
14
  * @param {Forum.GetPostsRequest} request
15
15
  * @param {PostsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -63,7 +63,7 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
63
63
  const errors = __importStar(require("../../../../errors/index.js"));
64
64
  const Forum = __importStar(require("../../../index.js"));
65
65
  class PostsClient {
66
- constructor(options = {}) {
66
+ constructor(options) {
67
67
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
68
  }
69
69
  /**
@@ -1,32 +1,35 @@
1
1
  export interface GetPostsResponse {
2
- data: GetPostsResponse.Data.Item[];
3
- meta: GetPostsResponse.Meta;
2
+ data: GetPostsResponse.Data;
4
3
  }
5
4
  export declare namespace GetPostsResponse {
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 ID to post in */
10
- threadId: string;
11
- /** Post content (Markdown supported) */
12
- body: string;
13
- /** Author user ID (required for API key auth, ignored for JWT auth) */
14
- userId?: string;
15
- /** Parent post ID for threading */
16
- parentId?: string;
17
- extendedData?: Record<string, unknown>;
18
- id: string;
19
- /** Nesting level for threaded replies */
20
- depth: number | null;
21
- /** Post creation timestamp */
22
- createdAt: string;
23
- /** Post last update timestamp */
24
- updatedAt: string;
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ /** Thread ID to post in */
17
+ threadId: string;
18
+ /** Post content (Markdown supported) */
19
+ body: string;
20
+ /** Author user ID (required for API key auth, ignored for JWT auth) */
21
+ userId?: string;
22
+ /** Parent post ID for threading */
23
+ parentId?: string;
24
+ extendedData?: Record<string, unknown>;
25
+ id: string;
26
+ /** Nesting level for threaded replies */
27
+ depth: number | null;
28
+ /** Post creation timestamp */
29
+ createdAt: string;
30
+ /** Post last update timestamp */
31
+ updatedAt: string;
32
+ }
25
33
  }
26
34
  }
27
- interface Meta {
28
- total: number;
29
- page: number;
30
- limit: number;
31
- }
32
35
  }
@@ -9,7 +9,7 @@ export declare namespace PrivateMessagesClient {
9
9
  }
10
10
  export declare class PrivateMessagesClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<PrivateMessagesClient.Options>;
12
- constructor(options?: PrivateMessagesClient.Options);
12
+ constructor(options: PrivateMessagesClient.Options);
13
13
  /**
14
14
  * @param {Forum.GetPrivateMessagesRequest} request
15
15
  * @param {PrivateMessagesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -63,7 +63,7 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
63
63
  const errors = __importStar(require("../../../../errors/index.js"));
64
64
  const Forum = __importStar(require("../../../index.js"));
65
65
  class PrivateMessagesClient {
66
- constructor(options = {}) {
66
+ constructor(options) {
67
67
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
68
  }
69
69
  /**