@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
@@ -47,7 +47,7 @@ export class IntegrationsClient {
47
47
  }
48
48
  __listAllIntegrations() {
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 IntegrationsClient {
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, "integrations"),
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, "integrations"),
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) {
@@ -119,21 +119,21 @@ export class IntegrationsClient {
119
119
  }
120
120
  __createAnIntegration(request, requestOptions) {
121
121
  return __awaiter(this, void 0, void 0, function* () {
122
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
122
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
123
123
  const _authRequest = yield this._options.authProvider.getAuthRequest();
124
124
  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);
125
- const _response = yield core.fetcher({
126
- 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, "integrations"),
125
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
126
+ 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, "integrations"),
127
127
  method: "POST",
128
128
  headers: _headers,
129
129
  contentType: "application/json",
130
130
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
131
131
  requestType: "json",
132
132
  body: request,
133
- 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,
134
- 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,
133
+ 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,
134
+ 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,
135
135
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
136
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
136
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
137
137
  logging: this._options.logging,
138
138
  });
139
139
  if (_response.ok) {
@@ -182,19 +182,19 @@ export class IntegrationsClient {
182
182
  }
183
183
  __getAnIntegration(request, requestOptions) {
184
184
  return __awaiter(this, void 0, void 0, function* () {
185
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
185
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
186
186
  const { id } = request;
187
187
  const _authRequest = yield this._options.authProvider.getAuthRequest();
188
188
  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);
189
- const _response = yield core.fetcher({
190
- 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, `integrations/${core.url.encodePathParam(id)}`),
189
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
190
+ 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, `integrations/${core.url.encodePathParam(id)}`),
191
191
  method: "GET",
192
192
  headers: _headers,
193
193
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
194
- 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,
195
- 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,
194
+ 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,
195
+ 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,
196
196
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
197
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
197
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
198
198
  logging: this._options.logging,
199
199
  });
200
200
  if (_response.ok) {
@@ -243,19 +243,19 @@ export class IntegrationsClient {
243
243
  }
244
244
  __deleteAnIntegration(request, requestOptions) {
245
245
  return __awaiter(this, void 0, void 0, function* () {
246
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
246
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
247
247
  const { id } = request;
248
248
  const _authRequest = yield this._options.authProvider.getAuthRequest();
249
249
  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);
250
- const _response = yield core.fetcher({
251
- 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, `integrations/${core.url.encodePathParam(id)}`),
250
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
251
+ 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, `integrations/${core.url.encodePathParam(id)}`),
252
252
  method: "DELETE",
253
253
  headers: _headers,
254
254
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
255
- 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,
256
- 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,
255
+ 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,
256
+ 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,
257
257
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
258
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
258
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
259
259
  logging: this._options.logging,
260
260
  });
261
261
  if (_response.ok) {
@@ -305,22 +305,22 @@ export class IntegrationsClient {
305
305
  }
306
306
  __updateAnIntegration(request, requestOptions) {
307
307
  return __awaiter(this, void 0, void 0, function* () {
308
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
308
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
309
309
  const { id } = request, _body = __rest(request, ["id"]);
310
310
  const _authRequest = yield this._options.authProvider.getAuthRequest();
311
311
  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);
312
- const _response = yield core.fetcher({
313
- 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, `integrations/${core.url.encodePathParam(id)}`),
312
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
313
+ 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, `integrations/${core.url.encodePathParam(id)}`),
314
314
  method: "PATCH",
315
315
  headers: _headers,
316
316
  contentType: "application/json",
317
317
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
318
318
  requestType: "json",
319
319
  body: _body,
320
- 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,
321
- 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,
320
+ 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,
321
+ 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,
322
322
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
323
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
323
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
324
324
  logging: this._options.logging,
325
325
  });
326
326
  if (_response.ok) {
@@ -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
  }
@@ -3,17 +3,20 @@ export var GetIntegrationsResponse;
3
3
  (function (GetIntegrationsResponse) {
4
4
  let Data;
5
5
  (function (Data) {
6
- let Item;
7
- (function (Item) {
8
- /** Integration type */
9
- Item.Type = {
10
- Slack: "SLACK",
11
- Discord: "DISCORD",
12
- Salesforce: "SALESFORCE",
13
- Hubspot: "HUBSPOT",
14
- Okta: "OKTA",
15
- Auth0: "AUTH0",
16
- };
17
- })(Item = Data.Item || (Data.Item = {}));
6
+ let Items;
7
+ (function (Items) {
8
+ let Item;
9
+ (function (Item) {
10
+ /** Integration type */
11
+ Item.Type = {
12
+ Slack: "SLACK",
13
+ Discord: "DISCORD",
14
+ Salesforce: "SALESFORCE",
15
+ Hubspot: "HUBSPOT",
16
+ Okta: "OKTA",
17
+ Auth0: "AUTH0",
18
+ };
19
+ })(Item = Items.Item || (Items.Item = {}));
20
+ })(Items = Data.Items || (Data.Items = {}));
18
21
  })(Data = GetIntegrationsResponse.Data || (GetIntegrationsResponse.Data = {}));
19
22
  })(GetIntegrationsResponse || (GetIntegrationsResponse = {}));
@@ -47,7 +47,7 @@ export class NotificationsClient {
47
47
  }
48
48
  __listAllNotifications() {
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 NotificationsClient {
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, "notifications"),
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, "notifications"),
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) {
@@ -117,21 +117,21 @@ export class NotificationsClient {
117
117
  }
118
118
  __createANotification(request, requestOptions) {
119
119
  return __awaiter(this, void 0, void 0, function* () {
120
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
120
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
121
121
  const _authRequest = yield this._options.authProvider.getAuthRequest();
122
122
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
123
- const _response = yield core.fetcher({
124
- url: core.url.join((_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, "notifications"),
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, "notifications"),
125
125
  method: "POST",
126
126
  headers: _headers,
127
127
  contentType: "application/json",
128
128
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
129
129
  requestType: "json",
130
130
  body: request,
131
- timeoutMs: ((_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,
132
- 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,
131
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
132
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
133
133
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
134
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
134
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
135
135
  logging: this._options.logging,
136
136
  });
137
137
  if (_response.ok) {
@@ -180,19 +180,19 @@ export class NotificationsClient {
180
180
  }
181
181
  __getANotification(request, requestOptions) {
182
182
  return __awaiter(this, void 0, void 0, function* () {
183
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
183
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
184
184
  const { id } = request;
185
185
  const _authRequest = yield this._options.authProvider.getAuthRequest();
186
186
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
187
- const _response = yield core.fetcher({
188
- url: core.url.join((_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, `notifications/${core.url.encodePathParam(id)}`),
187
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
188
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `notifications/${core.url.encodePathParam(id)}`),
189
189
  method: "GET",
190
190
  headers: _headers,
191
191
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
192
- timeoutMs: ((_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,
193
- 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,
192
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
193
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
194
194
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
195
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
195
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
196
196
  logging: this._options.logging,
197
197
  });
198
198
  if (_response.ok) {
@@ -241,19 +241,19 @@ export class NotificationsClient {
241
241
  }
242
242
  __deleteANotification(request, requestOptions) {
243
243
  return __awaiter(this, void 0, void 0, function* () {
244
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
244
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
245
245
  const { id } = request;
246
246
  const _authRequest = yield this._options.authProvider.getAuthRequest();
247
247
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
248
- const _response = yield core.fetcher({
249
- url: core.url.join((_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, `notifications/${core.url.encodePathParam(id)}`),
248
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
249
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `notifications/${core.url.encodePathParam(id)}`),
250
250
  method: "DELETE",
251
251
  headers: _headers,
252
252
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
253
- timeoutMs: ((_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,
254
- 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,
253
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
254
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
255
255
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
256
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
256
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
257
257
  logging: this._options.logging,
258
258
  });
259
259
  if (_response.ok) {
@@ -303,22 +303,22 @@ export class NotificationsClient {
303
303
  }
304
304
  __updateANotification(request, requestOptions) {
305
305
  return __awaiter(this, void 0, void 0, function* () {
306
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
306
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
307
307
  const { id } = request, _body = __rest(request, ["id"]);
308
308
  const _authRequest = yield this._options.authProvider.getAuthRequest();
309
309
  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);
310
- const _response = yield core.fetcher({
311
- 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, `notifications/${core.url.encodePathParam(id)}`),
310
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
311
+ 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, `notifications/${core.url.encodePathParam(id)}`),
312
312
  method: "PATCH",
313
313
  headers: _headers,
314
314
  contentType: "application/json",
315
315
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
316
316
  requestType: "json",
317
317
  body: _body,
318
- 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,
319
- 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,
318
+ 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,
319
+ 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,
320
320
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
321
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
321
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
322
322
  logging: this._options.logging,
323
323
  });
324
324
  if (_response.ok) {
@@ -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
  }