@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.
- package/dist/cjs/BaseClient.d.ts +1 -0
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/auth/client/Client.js +30 -30
- package/dist/cjs/api/resources/auth/types/GetAuthMeResponse.d.ts +7 -2
- package/dist/cjs/api/resources/auth/types/PostAuthForgotPasswordResponse.d.ts +7 -2
- package/dist/cjs/api/resources/auth/types/PostAuthLoginResponse.d.ts +20 -1
- package/dist/cjs/api/resources/auth/types/PostAuthRegisterResponse.d.ts +20 -1
- package/dist/cjs/api/resources/auth/types/PostAuthResetPasswordResponse.d.ts +6 -1
- package/dist/cjs/api/resources/integrations/client/Client.js +30 -30
- package/dist/cjs/api/resources/integrations/types/GetIntegrationsResponse.d.ts +35 -32
- package/dist/cjs/api/resources/integrations/types/GetIntegrationsResponse.js +15 -12
- package/dist/cjs/api/resources/notifications/client/Client.js +30 -30
- package/dist/cjs/api/resources/notifications/types/GetNotificationsResponse.d.ts +35 -32
- package/dist/cjs/api/resources/posts/client/Client.js +78 -78
- package/dist/cjs/api/resources/posts/types/GetPostsResponse.d.ts +28 -25
- package/dist/cjs/api/resources/privateMessages/client/Client.js +48 -48
- package/dist/cjs/api/resources/privateMessages/types/GetPrivateMessagesResponse.d.ts +31 -28
- package/dist/cjs/api/resources/reports/client/Client.js +24 -24
- package/dist/cjs/api/resources/reports/types/GetReportsResponse.d.ts +33 -30
- package/dist/cjs/api/resources/roles/client/Client.js +30 -30
- package/dist/cjs/api/resources/roles/types/GetRolesResponse.d.ts +27 -24
- package/dist/cjs/api/resources/ssOs/client/Client.js +30 -30
- package/dist/cjs/api/resources/ssOs/types/GetSsoResponse.d.ts +32 -29
- package/dist/cjs/api/resources/ssOs/types/GetSsoResponse.js +12 -9
- package/dist/cjs/api/resources/tags/client/Client.js +48 -48
- package/dist/cjs/api/resources/tags/types/GetTagsResponse.d.ts +27 -24
- package/dist/cjs/api/resources/threads/client/Client.js +114 -114
- package/dist/cjs/api/resources/threads/types/GetThreadsResponse.d.ts +55 -52
- package/dist/cjs/api/resources/users/client/Client.js +60 -60
- package/dist/cjs/api/resources/users/types/GetUsersResponse.d.ts +46 -43
- package/dist/cjs/api/resources/webhooks/client/Client.js +42 -42
- package/dist/cjs/api/resources/webhooks/types/GetWebhooksResponse.d.ts +29 -26
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +1 -0
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/auth/client/Client.mjs +30 -30
- package/dist/esm/api/resources/auth/types/GetAuthMeResponse.d.mts +7 -2
- package/dist/esm/api/resources/auth/types/PostAuthForgotPasswordResponse.d.mts +7 -2
- package/dist/esm/api/resources/auth/types/PostAuthLoginResponse.d.mts +20 -1
- package/dist/esm/api/resources/auth/types/PostAuthRegisterResponse.d.mts +20 -1
- package/dist/esm/api/resources/auth/types/PostAuthResetPasswordResponse.d.mts +6 -1
- package/dist/esm/api/resources/integrations/client/Client.mjs +30 -30
- package/dist/esm/api/resources/integrations/types/GetIntegrationsResponse.d.mts +35 -32
- package/dist/esm/api/resources/integrations/types/GetIntegrationsResponse.mjs +15 -12
- package/dist/esm/api/resources/notifications/client/Client.mjs +30 -30
- package/dist/esm/api/resources/notifications/types/GetNotificationsResponse.d.mts +35 -32
- package/dist/esm/api/resources/posts/client/Client.mjs +78 -78
- package/dist/esm/api/resources/posts/types/GetPostsResponse.d.mts +28 -25
- package/dist/esm/api/resources/privateMessages/client/Client.mjs +48 -48
- package/dist/esm/api/resources/privateMessages/types/GetPrivateMessagesResponse.d.mts +31 -28
- package/dist/esm/api/resources/reports/client/Client.mjs +24 -24
- package/dist/esm/api/resources/reports/types/GetReportsResponse.d.mts +33 -30
- package/dist/esm/api/resources/roles/client/Client.mjs +30 -30
- package/dist/esm/api/resources/roles/types/GetRolesResponse.d.mts +27 -24
- package/dist/esm/api/resources/ssOs/client/Client.mjs +30 -30
- package/dist/esm/api/resources/ssOs/types/GetSsoResponse.d.mts +32 -29
- package/dist/esm/api/resources/ssOs/types/GetSsoResponse.mjs +12 -9
- package/dist/esm/api/resources/tags/client/Client.mjs +48 -48
- package/dist/esm/api/resources/tags/types/GetTagsResponse.d.mts +27 -24
- package/dist/esm/api/resources/threads/client/Client.mjs +114 -114
- package/dist/esm/api/resources/threads/types/GetThreadsResponse.d.mts +55 -52
- package/dist/esm/api/resources/users/client/Client.mjs +60 -60
- package/dist/esm/api/resources/users/types/GetUsersResponse.d.mts +46 -43
- package/dist/esm/api/resources/webhooks/client/Client.mjs +42 -42
- package/dist/esm/api/resources/webhooks/types/GetWebhooksResponse.d.mts +29 -26
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- 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((
|
|
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: ((
|
|
59
|
-
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: (
|
|
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((
|
|
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: ((
|
|
122
|
-
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: (
|
|
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((
|
|
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: ((
|
|
183
|
-
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: (
|
|
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((
|
|
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: ((
|
|
244
|
-
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: (
|
|
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((
|
|
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: ((
|
|
311
|
-
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: (
|
|
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((
|
|
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: ((
|
|
373
|
-
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: (
|
|
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((
|
|
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: ((
|
|
435
|
-
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: (
|
|
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
|
|
3
|
-
meta: GetWebhooksResponse.Meta;
|
|
2
|
+
data: GetWebhooksResponse.Data;
|
|
4
3
|
}
|
|
5
4
|
export declare namespace GetWebhooksResponse {
|
|
6
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.8";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "2.0.
|
|
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.
|
|
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"
|