@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
|
@@ -72,7 +72,7 @@ class WebhooksClient {
|
|
|
72
72
|
}
|
|
73
73
|
__listAllWebhooks() {
|
|
74
74
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
75
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
75
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
76
76
|
const { page, limit, search } = request;
|
|
77
77
|
const _queryParams = {};
|
|
78
78
|
if (page != null) {
|
|
@@ -86,15 +86,15 @@ class WebhooksClient {
|
|
|
86
86
|
}
|
|
87
87
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
88
88
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
89
|
-
const _response = yield core.fetcher({
|
|
90
|
-
url: core.url.join((
|
|
89
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
90
|
+
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"),
|
|
91
91
|
method: "GET",
|
|
92
92
|
headers: _headers,
|
|
93
93
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
94
|
-
timeoutMs: ((
|
|
95
|
-
maxRetries: (
|
|
94
|
+
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,
|
|
95
|
+
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,
|
|
96
96
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
97
|
-
fetchFn: (
|
|
97
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
98
98
|
logging: this._options.logging,
|
|
99
99
|
});
|
|
100
100
|
if (_response.ok) {
|
|
@@ -143,21 +143,21 @@ class WebhooksClient {
|
|
|
143
143
|
}
|
|
144
144
|
__createAWebhook(request, requestOptions) {
|
|
145
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
146
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
147
147
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
148
148
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
149
|
-
const _response = yield core.fetcher({
|
|
150
|
-
url: core.url.join((
|
|
149
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
150
|
+
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"),
|
|
151
151
|
method: "POST",
|
|
152
152
|
headers: _headers,
|
|
153
153
|
contentType: "application/json",
|
|
154
154
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
155
155
|
requestType: "json",
|
|
156
156
|
body: request,
|
|
157
|
-
timeoutMs: ((
|
|
158
|
-
maxRetries: (
|
|
157
|
+
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,
|
|
158
|
+
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,
|
|
159
159
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
160
|
-
fetchFn: (
|
|
160
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
161
161
|
logging: this._options.logging,
|
|
162
162
|
});
|
|
163
163
|
if (_response.ok) {
|
|
@@ -206,19 +206,19 @@ class WebhooksClient {
|
|
|
206
206
|
}
|
|
207
207
|
__getAWebhook(request, requestOptions) {
|
|
208
208
|
return __awaiter(this, void 0, void 0, function* () {
|
|
209
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
209
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
210
210
|
const { id } = request;
|
|
211
211
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
212
212
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
213
|
-
const _response = yield core.fetcher({
|
|
214
|
-
url: core.url.join((
|
|
213
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
214
|
+
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)}`),
|
|
215
215
|
method: "GET",
|
|
216
216
|
headers: _headers,
|
|
217
217
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
218
|
-
timeoutMs: ((
|
|
219
|
-
maxRetries: (
|
|
218
|
+
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,
|
|
219
|
+
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,
|
|
220
220
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
221
|
-
fetchFn: (
|
|
221
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
222
222
|
logging: this._options.logging,
|
|
223
223
|
});
|
|
224
224
|
if (_response.ok) {
|
|
@@ -267,19 +267,19 @@ class WebhooksClient {
|
|
|
267
267
|
}
|
|
268
268
|
__deleteAWebhook(request, requestOptions) {
|
|
269
269
|
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
270
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
271
271
|
const { id } = request;
|
|
272
272
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
273
273
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
274
|
-
const _response = yield core.fetcher({
|
|
275
|
-
url: core.url.join((
|
|
274
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
275
|
+
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)}`),
|
|
276
276
|
method: "DELETE",
|
|
277
277
|
headers: _headers,
|
|
278
278
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
279
|
-
timeoutMs: ((
|
|
280
|
-
maxRetries: (
|
|
279
|
+
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,
|
|
280
|
+
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,
|
|
281
281
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
282
|
-
fetchFn: (
|
|
282
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
283
283
|
logging: this._options.logging,
|
|
284
284
|
});
|
|
285
285
|
if (_response.ok) {
|
|
@@ -327,7 +327,7 @@ class WebhooksClient {
|
|
|
327
327
|
}
|
|
328
328
|
__listWebhookDeliveries(request, requestOptions) {
|
|
329
329
|
return __awaiter(this, void 0, void 0, function* () {
|
|
330
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
330
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
331
331
|
const { id, cursor, limit } = request;
|
|
332
332
|
const _queryParams = {};
|
|
333
333
|
if (cursor != null) {
|
|
@@ -338,15 +338,15 @@ class WebhooksClient {
|
|
|
338
338
|
}
|
|
339
339
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
340
340
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
341
|
-
const _response = yield core.fetcher({
|
|
342
|
-
url: core.url.join((
|
|
341
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
342
|
+
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`),
|
|
343
343
|
method: "GET",
|
|
344
344
|
headers: _headers,
|
|
345
345
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
346
|
-
timeoutMs: ((
|
|
347
|
-
maxRetries: (
|
|
346
|
+
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,
|
|
347
|
+
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,
|
|
348
348
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
349
|
-
fetchFn: (
|
|
349
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
350
350
|
logging: this._options.logging,
|
|
351
351
|
});
|
|
352
352
|
if (_response.ok) {
|
|
@@ -396,19 +396,19 @@ class WebhooksClient {
|
|
|
396
396
|
}
|
|
397
397
|
__getADeliveryFromWebhook(request, requestOptions) {
|
|
398
398
|
return __awaiter(this, void 0, void 0, function* () {
|
|
399
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
399
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
400
400
|
const { id, subId } = request;
|
|
401
401
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
402
402
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
403
|
-
const _response = yield core.fetcher({
|
|
404
|
-
url: core.url.join((
|
|
403
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
404
|
+
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)}`),
|
|
405
405
|
method: "GET",
|
|
406
406
|
headers: _headers,
|
|
407
407
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
408
|
-
timeoutMs: ((
|
|
409
|
-
maxRetries: (
|
|
408
|
+
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,
|
|
409
|
+
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,
|
|
410
410
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
411
|
-
fetchFn: (
|
|
411
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
412
412
|
logging: this._options.logging,
|
|
413
413
|
});
|
|
414
414
|
if (_response.ok) {
|
|
@@ -458,19 +458,19 @@ class WebhooksClient {
|
|
|
458
458
|
}
|
|
459
459
|
__deleteADeliveryFromWebhook(request, requestOptions) {
|
|
460
460
|
return __awaiter(this, void 0, void 0, function* () {
|
|
461
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
461
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
462
462
|
const { id, subId } = request;
|
|
463
463
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
464
464
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
465
|
-
const _response = yield core.fetcher({
|
|
466
|
-
url: core.url.join((
|
|
465
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
466
|
+
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)}`),
|
|
467
467
|
method: "DELETE",
|
|
468
468
|
headers: _headers,
|
|
469
469
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
470
|
-
timeoutMs: ((
|
|
471
|
-
maxRetries: (
|
|
470
|
+
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,
|
|
471
|
+
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,
|
|
472
472
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
473
|
-
fetchFn: (
|
|
473
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
474
474
|
logging: this._options.logging,
|
|
475
475
|
});
|
|
476
476
|
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/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.8";
|
package/dist/cjs/version.js
CHANGED
|
@@ -13,6 +13,7 @@ export type BaseClientOptions = {
|
|
|
13
13
|
maxRetries?: number;
|
|
14
14
|
/** Provide a custom fetch implementation. Useful for platforms that don't have a built-in fetch or need a custom implementation. */
|
|
15
15
|
fetch?: typeof fetch;
|
|
16
|
+
fetcher?: core.FetchFunction;
|
|
16
17
|
/** Configure logging for the client. */
|
|
17
18
|
logging?: core.logging.LogConfig | core.logging.Logger;
|
|
18
19
|
} & HeaderAuthProvider.AuthOptions;
|
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@foru-ms/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "2.0.
|
|
10
|
-
"User-Agent": "@foru-ms/sdk/2.0.
|
|
9
|
+
"X-Fern-SDK-Version": "2.0.8",
|
|
10
|
+
"User-Agent": "@foru-ms/sdk/2.0.8",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -43,21 +43,21 @@ export class AuthClient {
|
|
|
43
43
|
}
|
|
44
44
|
__register(request, requestOptions) {
|
|
45
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
46
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
47
47
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
48
48
|
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);
|
|
49
|
-
const _response = yield core.fetcher({
|
|
50
|
-
url: core.url.join((
|
|
49
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
50
|
+
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, "auth/register"),
|
|
51
51
|
method: "POST",
|
|
52
52
|
headers: _headers,
|
|
53
53
|
contentType: "application/json",
|
|
54
54
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
55
55
|
requestType: "json",
|
|
56
56
|
body: request,
|
|
57
|
-
timeoutMs: ((
|
|
58
|
-
maxRetries: (
|
|
57
|
+
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,
|
|
58
|
+
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,
|
|
59
59
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
60
|
-
fetchFn: (
|
|
60
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
61
61
|
logging: this._options.logging,
|
|
62
62
|
});
|
|
63
63
|
if (_response.ok) {
|
|
@@ -109,21 +109,21 @@ export class AuthClient {
|
|
|
109
109
|
}
|
|
110
110
|
__login(request, requestOptions) {
|
|
111
111
|
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
112
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
113
113
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
114
114
|
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);
|
|
115
|
-
const _response = yield core.fetcher({
|
|
116
|
-
url: core.url.join((
|
|
115
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
116
|
+
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, "auth/login"),
|
|
117
117
|
method: "POST",
|
|
118
118
|
headers: _headers,
|
|
119
119
|
contentType: "application/json",
|
|
120
120
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
121
121
|
requestType: "json",
|
|
122
122
|
body: request,
|
|
123
|
-
timeoutMs: ((
|
|
124
|
-
maxRetries: (
|
|
123
|
+
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,
|
|
124
|
+
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,
|
|
125
125
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
126
|
-
fetchFn: (
|
|
126
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
127
127
|
logging: this._options.logging,
|
|
128
128
|
});
|
|
129
129
|
if (_response.ok) {
|
|
@@ -168,18 +168,18 @@ export class AuthClient {
|
|
|
168
168
|
}
|
|
169
169
|
__getCurrentUser(requestOptions) {
|
|
170
170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
171
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
172
172
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
173
173
|
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);
|
|
174
|
-
const _response = yield core.fetcher({
|
|
175
|
-
url: core.url.join((
|
|
174
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
175
|
+
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, "auth/me"),
|
|
176
176
|
method: "GET",
|
|
177
177
|
headers: _headers,
|
|
178
178
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
179
|
-
timeoutMs: ((
|
|
180
|
-
maxRetries: (
|
|
179
|
+
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,
|
|
180
|
+
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,
|
|
181
181
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
182
|
-
fetchFn: (
|
|
182
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
183
183
|
logging: this._options.logging,
|
|
184
184
|
});
|
|
185
185
|
if (_response.ok) {
|
|
@@ -228,21 +228,21 @@ export class AuthClient {
|
|
|
228
228
|
}
|
|
229
229
|
__requestPasswordReset(request, requestOptions) {
|
|
230
230
|
return __awaiter(this, void 0, void 0, function* () {
|
|
231
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
231
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
232
232
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
233
233
|
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);
|
|
234
|
-
const _response = yield core.fetcher({
|
|
235
|
-
url: core.url.join((
|
|
234
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
235
|
+
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, "auth/forgot-password"),
|
|
236
236
|
method: "POST",
|
|
237
237
|
headers: _headers,
|
|
238
238
|
contentType: "application/json",
|
|
239
239
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
240
240
|
requestType: "json",
|
|
241
241
|
body: request,
|
|
242
|
-
timeoutMs: ((
|
|
243
|
-
maxRetries: (
|
|
242
|
+
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,
|
|
243
|
+
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,
|
|
244
244
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
245
|
-
fetchFn: (
|
|
245
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
246
246
|
logging: this._options.logging,
|
|
247
247
|
});
|
|
248
248
|
if (_response.ok) {
|
|
@@ -293,21 +293,21 @@ export class AuthClient {
|
|
|
293
293
|
}
|
|
294
294
|
__resetPassword(request, requestOptions) {
|
|
295
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
296
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
296
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
297
297
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
298
298
|
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);
|
|
299
|
-
const _response = yield core.fetcher({
|
|
300
|
-
url: core.url.join((
|
|
299
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
300
|
+
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, "auth/reset-password"),
|
|
301
301
|
method: "POST",
|
|
302
302
|
headers: _headers,
|
|
303
303
|
contentType: "application/json",
|
|
304
304
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
305
305
|
requestType: "json",
|
|
306
306
|
body: request,
|
|
307
|
-
timeoutMs: ((
|
|
308
|
-
maxRetries: (
|
|
307
|
+
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,
|
|
308
|
+
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,
|
|
309
309
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
310
|
-
fetchFn: (
|
|
310
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
311
311
|
logging: this._options.logging,
|
|
312
312
|
});
|
|
313
313
|
if (_response.ok) {
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export interface PostAuthForgotPasswordResponse {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
data: PostAuthForgotPasswordResponse.Data;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace PostAuthForgotPasswordResponse {
|
|
5
|
+
interface Data {
|
|
6
|
+
message: string;
|
|
7
|
+
resetToken?: string;
|
|
8
|
+
}
|
|
4
9
|
}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
export interface PostAuthLoginResponse {
|
|
2
|
-
|
|
2
|
+
data: PostAuthLoginResponse.Data;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace PostAuthLoginResponse {
|
|
5
|
+
interface Data {
|
|
6
|
+
/** JWT token for authenticated requests */
|
|
7
|
+
token: string;
|
|
8
|
+
/** Authenticated user profile */
|
|
9
|
+
user: Data.User;
|
|
10
|
+
}
|
|
11
|
+
namespace Data {
|
|
12
|
+
/**
|
|
13
|
+
* Authenticated user profile
|
|
14
|
+
*/
|
|
15
|
+
interface User {
|
|
16
|
+
id: string;
|
|
17
|
+
username: string;
|
|
18
|
+
email?: string;
|
|
19
|
+
displayName: string | null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
3
22
|
}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
export interface PostAuthRegisterResponse {
|
|
2
|
-
|
|
2
|
+
data: PostAuthRegisterResponse.Data;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace PostAuthRegisterResponse {
|
|
5
|
+
interface Data {
|
|
6
|
+
/** JWT token for authenticated requests */
|
|
7
|
+
token: string;
|
|
8
|
+
/** Registered user profile */
|
|
9
|
+
user: Data.User;
|
|
10
|
+
}
|
|
11
|
+
namespace Data {
|
|
12
|
+
/**
|
|
13
|
+
* Registered user profile
|
|
14
|
+
*/
|
|
15
|
+
interface User {
|
|
16
|
+
id: string;
|
|
17
|
+
username: string;
|
|
18
|
+
email?: string;
|
|
19
|
+
displayName: string | null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
3
22
|
}
|