@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
@@ -36,7 +36,7 @@ export class WebhooksClient {
36
36
  }
37
37
  __listAllWebhooks() {
38
38
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
39
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
40
40
  const { page, limit, search } = request;
41
41
  const _queryParams = {};
42
42
  if (page != null) {
@@ -50,15 +50,15 @@ export class WebhooksClient {
50
50
  }
51
51
  const _authRequest = yield this._options.authProvider.getAuthRequest();
52
52
  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);
53
- const _response = yield core.fetcher({
54
- 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, "webhooks"),
53
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
54
+ 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, "webhooks"),
55
55
  method: "GET",
56
56
  headers: _headers,
57
57
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
58
- 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,
59
- 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,
58
+ 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,
59
+ 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,
60
60
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
61
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
61
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
62
62
  logging: this._options.logging,
63
63
  });
64
64
  if (_response.ok) {
@@ -107,21 +107,21 @@ export class WebhooksClient {
107
107
  }
108
108
  __createAWebhook(request, requestOptions) {
109
109
  return __awaiter(this, void 0, void 0, function* () {
110
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
110
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
111
111
  const _authRequest = yield this._options.authProvider.getAuthRequest();
112
112
  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);
113
- const _response = yield core.fetcher({
114
- 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, "webhooks"),
113
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
114
+ 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, "webhooks"),
115
115
  method: "POST",
116
116
  headers: _headers,
117
117
  contentType: "application/json",
118
118
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
119
119
  requestType: "json",
120
120
  body: request,
121
- 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,
122
- 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,
121
+ 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,
122
+ 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,
123
123
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
124
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
124
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
125
125
  logging: this._options.logging,
126
126
  });
127
127
  if (_response.ok) {
@@ -170,19 +170,19 @@ export class WebhooksClient {
170
170
  }
171
171
  __getAWebhook(request, requestOptions) {
172
172
  return __awaiter(this, void 0, void 0, function* () {
173
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
173
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
174
174
  const { id } = request;
175
175
  const _authRequest = yield this._options.authProvider.getAuthRequest();
176
176
  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);
177
- const _response = yield core.fetcher({
178
- 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, `webhooks/${core.url.encodePathParam(id)}`),
177
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
178
+ 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, `webhooks/${core.url.encodePathParam(id)}`),
179
179
  method: "GET",
180
180
  headers: _headers,
181
181
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
182
- 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,
183
- 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,
182
+ 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,
183
+ 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,
184
184
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
185
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
185
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
186
186
  logging: this._options.logging,
187
187
  });
188
188
  if (_response.ok) {
@@ -231,19 +231,19 @@ export class WebhooksClient {
231
231
  }
232
232
  __deleteAWebhook(request, requestOptions) {
233
233
  return __awaiter(this, void 0, void 0, function* () {
234
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
234
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
235
235
  const { id } = request;
236
236
  const _authRequest = yield this._options.authProvider.getAuthRequest();
237
237
  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);
238
- const _response = yield core.fetcher({
239
- 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, `webhooks/${core.url.encodePathParam(id)}`),
238
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
239
+ 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, `webhooks/${core.url.encodePathParam(id)}`),
240
240
  method: "DELETE",
241
241
  headers: _headers,
242
242
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
243
- 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,
244
- 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,
243
+ 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,
244
+ 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,
245
245
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
246
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
246
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
247
247
  logging: this._options.logging,
248
248
  });
249
249
  if (_response.ok) {
@@ -291,7 +291,7 @@ export class WebhooksClient {
291
291
  }
292
292
  __listWebhookDeliveries(request, requestOptions) {
293
293
  return __awaiter(this, void 0, void 0, function* () {
294
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
294
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
295
295
  const { id, cursor, limit } = request;
296
296
  const _queryParams = {};
297
297
  if (cursor != null) {
@@ -302,15 +302,15 @@ export class WebhooksClient {
302
302
  }
303
303
  const _authRequest = yield this._options.authProvider.getAuthRequest();
304
304
  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);
305
- const _response = yield core.fetcher({
306
- 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, `webhooks/${core.url.encodePathParam(id)}/deliveries`),
305
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
306
+ 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, `webhooks/${core.url.encodePathParam(id)}/deliveries`),
307
307
  method: "GET",
308
308
  headers: _headers,
309
309
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
310
- 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,
311
- 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,
310
+ 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,
311
+ 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,
312
312
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
313
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
313
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
314
314
  logging: this._options.logging,
315
315
  });
316
316
  if (_response.ok) {
@@ -360,19 +360,19 @@ export class WebhooksClient {
360
360
  }
361
361
  __getADeliveryFromWebhook(request, requestOptions) {
362
362
  return __awaiter(this, void 0, void 0, function* () {
363
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
363
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
364
364
  const { id, subId } = request;
365
365
  const _authRequest = yield this._options.authProvider.getAuthRequest();
366
366
  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);
367
- const _response = yield core.fetcher({
368
- 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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
367
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
368
+ 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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
369
369
  method: "GET",
370
370
  headers: _headers,
371
371
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
372
- 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,
373
- 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,
372
+ 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,
373
+ 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,
374
374
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
375
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
375
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
376
376
  logging: this._options.logging,
377
377
  });
378
378
  if (_response.ok) {
@@ -422,19 +422,19 @@ export class WebhooksClient {
422
422
  }
423
423
  __deleteADeliveryFromWebhook(request, requestOptions) {
424
424
  return __awaiter(this, void 0, void 0, function* () {
425
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
425
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
426
426
  const { id, subId } = request;
427
427
  const _authRequest = yield this._options.authProvider.getAuthRequest();
428
428
  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);
429
- const _response = yield core.fetcher({
430
- 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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
429
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
430
+ 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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
431
431
  method: "DELETE",
432
432
  headers: _headers,
433
433
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
434
- 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,
435
- 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,
434
+ 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,
435
+ 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,
436
436
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
437
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
437
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
438
438
  logging: this._options.logging,
439
439
  });
440
440
  if (_response.ok) {
@@ -1,33 +1,36 @@
1
1
  export interface GetWebhooksResponse {
2
- data: GetWebhooksResponse.Data.Item[];
3
- meta: GetWebhooksResponse.Meta;
2
+ data: GetWebhooksResponse.Data;
4
3
  }
5
4
  export declare namespace GetWebhooksResponse {
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
- /** Webhook name */
11
- name: string;
12
- /** Webhook endpoint URL */
13
- url: string;
14
- /** Event types to trigger on */
15
- events: string[];
16
- /** Whether webhook is active */
17
- active: boolean;
18
- /** Last trigger timestamp */
19
- lastTriggered: string | null;
20
- /** Consecutive failure count */
21
- failureCount: number;
22
- /** Webhook creation timestamp */
23
- createdAt: string;
24
- /** Webhook last update timestamp */
25
- updatedAt: string;
13
+ type Items = Items.Item[];
14
+ namespace Items {
15
+ interface Item {
16
+ id: string;
17
+ /** Webhook name */
18
+ name: string;
19
+ /** Webhook endpoint URL */
20
+ url: string;
21
+ /** Event types to trigger on */
22
+ events: string[];
23
+ /** Whether webhook is active */
24
+ active: boolean;
25
+ /** Last trigger timestamp */
26
+ lastTriggered: string | null;
27
+ /** Consecutive failure count */
28
+ failureCount: number;
29
+ /** Webhook creation timestamp */
30
+ createdAt: string;
31
+ /** Webhook last update timestamp */
32
+ updatedAt: string;
33
+ }
26
34
  }
27
35
  }
28
- interface Meta {
29
- total: number;
30
- page: number;
31
- limit: number;
32
- }
33
36
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.6";
1
+ export declare const SDK_VERSION = "2.0.8";
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.0.6";
1
+ export const SDK_VERSION = "2.0.8";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foru-ms/sdk",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,15 +42,13 @@
42
42
  "build:cjs": "tsc --project ./tsconfig.cjs.json",
43
43
  "build:esm": "tsc --project ./tsconfig.esm.json && node scripts/rename-to-esm-files.js dist/esm",
44
44
  "test": "vitest",
45
- "test:unit": "vitest --project unit",
46
- "test:wire": "vitest --project wire"
45
+ "test:unit": "vitest --project unit"
47
46
  },
48
47
  "dependencies": {},
49
48
  "devDependencies": {
50
49
  "webpack": "^5.97.1",
51
50
  "ts-loader": "^9.5.1",
52
51
  "vitest": "^3.2.4",
53
- "msw": "2.11.2",
54
52
  "@types/node": "^18.19.70",
55
53
  "typescript": "~5.7.2",
56
54
  "@biomejs/biome": "2.3.1"