@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
|
@@ -83,7 +83,7 @@ class RolesClient {
|
|
|
83
83
|
}
|
|
84
84
|
__listAllRoles() {
|
|
85
85
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
86
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
87
87
|
const { page, limit, search } = request;
|
|
88
88
|
const _queryParams = {};
|
|
89
89
|
if (page != null) {
|
|
@@ -97,15 +97,15 @@ class RolesClient {
|
|
|
97
97
|
}
|
|
98
98
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
99
99
|
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);
|
|
100
|
-
const _response = yield core.fetcher({
|
|
101
|
-
url: core.url.join((
|
|
100
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
101
|
+
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, "roles"),
|
|
102
102
|
method: "GET",
|
|
103
103
|
headers: _headers,
|
|
104
104
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
105
|
-
timeoutMs: ((
|
|
106
|
-
maxRetries: (
|
|
105
|
+
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,
|
|
106
|
+
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,
|
|
107
107
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
108
|
-
fetchFn: (
|
|
108
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
109
109
|
logging: this._options.logging,
|
|
110
110
|
});
|
|
111
111
|
if (_response.ok) {
|
|
@@ -152,21 +152,21 @@ class RolesClient {
|
|
|
152
152
|
}
|
|
153
153
|
__createARole(request, requestOptions) {
|
|
154
154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
155
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
156
156
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
157
157
|
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);
|
|
158
|
-
const _response = yield core.fetcher({
|
|
159
|
-
url: core.url.join((
|
|
158
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
159
|
+
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, "roles"),
|
|
160
160
|
method: "POST",
|
|
161
161
|
headers: _headers,
|
|
162
162
|
contentType: "application/json",
|
|
163
163
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
164
164
|
requestType: "json",
|
|
165
165
|
body: request,
|
|
166
|
-
timeoutMs: ((
|
|
167
|
-
maxRetries: (
|
|
166
|
+
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,
|
|
167
|
+
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,
|
|
168
168
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
169
|
-
fetchFn: (
|
|
169
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
170
170
|
logging: this._options.logging,
|
|
171
171
|
});
|
|
172
172
|
if (_response.ok) {
|
|
@@ -215,19 +215,19 @@ class RolesClient {
|
|
|
215
215
|
}
|
|
216
216
|
__getARole(request, requestOptions) {
|
|
217
217
|
return __awaiter(this, void 0, void 0, function* () {
|
|
218
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
218
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
219
219
|
const { id } = request;
|
|
220
220
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
221
221
|
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);
|
|
222
|
-
const _response = yield core.fetcher({
|
|
223
|
-
url: core.url.join((
|
|
222
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
223
|
+
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, `roles/${core.url.encodePathParam(id)}`),
|
|
224
224
|
method: "GET",
|
|
225
225
|
headers: _headers,
|
|
226
226
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
227
|
-
timeoutMs: ((
|
|
228
|
-
maxRetries: (
|
|
227
|
+
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,
|
|
228
|
+
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,
|
|
229
229
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
230
|
-
fetchFn: (
|
|
230
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
231
231
|
logging: this._options.logging,
|
|
232
232
|
});
|
|
233
233
|
if (_response.ok) {
|
|
@@ -276,19 +276,19 @@ class RolesClient {
|
|
|
276
276
|
}
|
|
277
277
|
__deleteARole(request, requestOptions) {
|
|
278
278
|
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
279
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
280
280
|
const { id } = request;
|
|
281
281
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
282
282
|
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);
|
|
283
|
-
const _response = yield core.fetcher({
|
|
284
|
-
url: core.url.join((
|
|
283
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
284
|
+
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, `roles/${core.url.encodePathParam(id)}`),
|
|
285
285
|
method: "DELETE",
|
|
286
286
|
headers: _headers,
|
|
287
287
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
288
|
-
timeoutMs: ((
|
|
289
|
-
maxRetries: (
|
|
288
|
+
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,
|
|
289
|
+
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,
|
|
290
290
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
291
|
-
fetchFn: (
|
|
291
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
292
292
|
logging: this._options.logging,
|
|
293
293
|
});
|
|
294
294
|
if (_response.ok) {
|
|
@@ -338,22 +338,22 @@ class RolesClient {
|
|
|
338
338
|
}
|
|
339
339
|
__updateARole(request, requestOptions) {
|
|
340
340
|
return __awaiter(this, void 0, void 0, function* () {
|
|
341
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
341
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
342
342
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
343
343
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
344
344
|
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);
|
|
345
|
-
const _response = yield core.fetcher({
|
|
346
|
-
url: core.url.join((
|
|
345
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
346
|
+
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, `roles/${core.url.encodePathParam(id)}`),
|
|
347
347
|
method: "PATCH",
|
|
348
348
|
headers: _headers,
|
|
349
349
|
contentType: "application/json",
|
|
350
350
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
351
351
|
requestType: "json",
|
|
352
352
|
body: _body,
|
|
353
|
-
timeoutMs: ((
|
|
354
|
-
maxRetries: (
|
|
353
|
+
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,
|
|
354
|
+
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,
|
|
355
355
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
356
|
-
fetchFn: (
|
|
356
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
357
357
|
logging: this._options.logging,
|
|
358
358
|
});
|
|
359
359
|
if (_response.ok) {
|
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
export interface GetRolesResponse {
|
|
2
|
-
data: GetRolesResponse.Data
|
|
3
|
-
meta: GetRolesResponse.Meta;
|
|
2
|
+
data: GetRolesResponse.Data;
|
|
4
3
|
}
|
|
5
4
|
export declare namespace GetRolesResponse {
|
|
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
|
-
|
|
13
|
+
type Items = Items.Item[];
|
|
14
|
+
namespace Items {
|
|
15
|
+
interface Item {
|
|
16
|
+
/** Role name */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Role slug (unique identifier) */
|
|
19
|
+
slug?: string;
|
|
20
|
+
/** Role description */
|
|
21
|
+
description?: string;
|
|
22
|
+
/** Role color hex */
|
|
23
|
+
color?: string;
|
|
24
|
+
/** Extended data */
|
|
25
|
+
extendedData?: Record<string, unknown>;
|
|
26
|
+
id: string;
|
|
27
|
+
/** Role creation timestamp */
|
|
28
|
+
createdAt: string;
|
|
29
|
+
/** Role last update timestamp */
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
}
|
|
24
32
|
}
|
|
25
33
|
}
|
|
26
|
-
interface Meta {
|
|
27
|
-
total: number;
|
|
28
|
-
page: number;
|
|
29
|
-
limit: number;
|
|
30
|
-
}
|
|
31
34
|
}
|
|
@@ -83,7 +83,7 @@ class SsOsClient {
|
|
|
83
83
|
}
|
|
84
84
|
__listAllSsOs() {
|
|
85
85
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
86
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
87
87
|
const { page, limit, search } = request;
|
|
88
88
|
const _queryParams = {};
|
|
89
89
|
if (page != null) {
|
|
@@ -97,15 +97,15 @@ class SsOsClient {
|
|
|
97
97
|
}
|
|
98
98
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
99
99
|
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);
|
|
100
|
-
const _response = yield core.fetcher({
|
|
101
|
-
url: core.url.join((
|
|
100
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
101
|
+
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, "sso"),
|
|
102
102
|
method: "GET",
|
|
103
103
|
headers: _headers,
|
|
104
104
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
105
|
-
timeoutMs: ((
|
|
106
|
-
maxRetries: (
|
|
105
|
+
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,
|
|
106
|
+
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,
|
|
107
107
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
108
|
-
fetchFn: (
|
|
108
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
109
109
|
logging: this._options.logging,
|
|
110
110
|
});
|
|
111
111
|
if (_response.ok) {
|
|
@@ -158,21 +158,21 @@ class SsOsClient {
|
|
|
158
158
|
}
|
|
159
159
|
__createAnSso(request, requestOptions) {
|
|
160
160
|
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
161
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
162
162
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
163
163
|
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);
|
|
164
|
-
const _response = yield core.fetcher({
|
|
165
|
-
url: core.url.join((
|
|
164
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
165
|
+
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, "sso"),
|
|
166
166
|
method: "POST",
|
|
167
167
|
headers: _headers,
|
|
168
168
|
contentType: "application/json",
|
|
169
169
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
170
170
|
requestType: "json",
|
|
171
171
|
body: request,
|
|
172
|
-
timeoutMs: ((
|
|
173
|
-
maxRetries: (
|
|
172
|
+
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,
|
|
173
|
+
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,
|
|
174
174
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
175
|
-
fetchFn: (
|
|
175
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
176
176
|
logging: this._options.logging,
|
|
177
177
|
});
|
|
178
178
|
if (_response.ok) {
|
|
@@ -221,19 +221,19 @@ class SsOsClient {
|
|
|
221
221
|
}
|
|
222
222
|
__getAnSso(request, requestOptions) {
|
|
223
223
|
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
224
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
225
225
|
const { id } = request;
|
|
226
226
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
227
227
|
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);
|
|
228
|
-
const _response = yield core.fetcher({
|
|
229
|
-
url: core.url.join((
|
|
228
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
229
|
+
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, `sso/${core.url.encodePathParam(id)}`),
|
|
230
230
|
method: "GET",
|
|
231
231
|
headers: _headers,
|
|
232
232
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
233
|
-
timeoutMs: ((
|
|
234
|
-
maxRetries: (
|
|
233
|
+
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,
|
|
234
|
+
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,
|
|
235
235
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
236
|
-
fetchFn: (
|
|
236
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
237
237
|
logging: this._options.logging,
|
|
238
238
|
});
|
|
239
239
|
if (_response.ok) {
|
|
@@ -282,19 +282,19 @@ class SsOsClient {
|
|
|
282
282
|
}
|
|
283
283
|
__deleteAnSso(request, requestOptions) {
|
|
284
284
|
return __awaiter(this, void 0, void 0, function* () {
|
|
285
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
285
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
286
286
|
const { id } = request;
|
|
287
287
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
288
288
|
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);
|
|
289
|
-
const _response = yield core.fetcher({
|
|
290
|
-
url: core.url.join((
|
|
289
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
290
|
+
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, `sso/${core.url.encodePathParam(id)}`),
|
|
291
291
|
method: "DELETE",
|
|
292
292
|
headers: _headers,
|
|
293
293
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
294
|
-
timeoutMs: ((
|
|
295
|
-
maxRetries: (
|
|
294
|
+
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,
|
|
295
|
+
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,
|
|
296
296
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
297
|
-
fetchFn: (
|
|
297
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
298
298
|
logging: this._options.logging,
|
|
299
299
|
});
|
|
300
300
|
if (_response.ok) {
|
|
@@ -344,22 +344,22 @@ class SsOsClient {
|
|
|
344
344
|
}
|
|
345
345
|
__updateAnSso(request, requestOptions) {
|
|
346
346
|
return __awaiter(this, void 0, void 0, function* () {
|
|
347
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
347
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
348
348
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
349
349
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
350
350
|
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);
|
|
351
|
-
const _response = yield core.fetcher({
|
|
352
|
-
url: core.url.join((
|
|
351
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
352
|
+
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, `sso/${core.url.encodePathParam(id)}`),
|
|
353
353
|
method: "PATCH",
|
|
354
354
|
headers: _headers,
|
|
355
355
|
contentType: "application/json",
|
|
356
356
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
357
357
|
requestType: "json",
|
|
358
358
|
body: _body,
|
|
359
|
-
timeoutMs: ((
|
|
360
|
-
maxRetries: (
|
|
359
|
+
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,
|
|
360
|
+
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,
|
|
361
361
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
362
|
-
fetchFn: (
|
|
362
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
363
363
|
logging: this._options.logging,
|
|
364
364
|
});
|
|
365
365
|
if (_response.ok) {
|
|
@@ -1,36 +1,39 @@
|
|
|
1
1
|
export interface GetSsoResponse {
|
|
2
|
-
data: GetSsoResponse.Data
|
|
3
|
-
meta: GetSsoResponse.Meta;
|
|
2
|
+
data: GetSsoResponse.Data;
|
|
4
3
|
}
|
|
5
4
|
export declare namespace GetSsoResponse {
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
type Items = Items.Item[];
|
|
14
|
+
namespace Items {
|
|
15
|
+
interface Item {
|
|
16
|
+
id: string;
|
|
17
|
+
/** SSO provider type */
|
|
18
|
+
provider: Item.Provider;
|
|
19
|
+
/** Email domain for this provider */
|
|
20
|
+
domain: string;
|
|
21
|
+
/** Whether SSO is active */
|
|
22
|
+
active: boolean;
|
|
23
|
+
/** SSO configuration creation timestamp */
|
|
24
|
+
createdAt: string;
|
|
25
|
+
/** SSO configuration last update timestamp */
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
}
|
|
28
|
+
namespace Item {
|
|
29
|
+
/** SSO provider type */
|
|
30
|
+
const Provider: {
|
|
31
|
+
readonly Okta: "OKTA";
|
|
32
|
+
readonly Auth0: "AUTH0";
|
|
33
|
+
readonly Saml: "SAML";
|
|
34
|
+
};
|
|
35
|
+
type Provider = (typeof Provider)[keyof typeof Provider];
|
|
36
|
+
}
|
|
29
37
|
}
|
|
30
38
|
}
|
|
31
|
-
interface Meta {
|
|
32
|
-
total: number;
|
|
33
|
-
page: number;
|
|
34
|
-
limit: number;
|
|
35
|
-
}
|
|
36
39
|
}
|
|
@@ -6,14 +6,17 @@ var GetSsoResponse;
|
|
|
6
6
|
(function (GetSsoResponse) {
|
|
7
7
|
let Data;
|
|
8
8
|
(function (Data) {
|
|
9
|
-
let
|
|
10
|
-
(function (
|
|
11
|
-
|
|
12
|
-
Item
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
let Items;
|
|
10
|
+
(function (Items) {
|
|
11
|
+
let Item;
|
|
12
|
+
(function (Item) {
|
|
13
|
+
/** SSO provider type */
|
|
14
|
+
Item.Provider = {
|
|
15
|
+
Okta: "OKTA",
|
|
16
|
+
Auth0: "AUTH0",
|
|
17
|
+
Saml: "SAML",
|
|
18
|
+
};
|
|
19
|
+
})(Item = Items.Item || (Items.Item = {}));
|
|
20
|
+
})(Items = Data.Items || (Data.Items = {}));
|
|
18
21
|
})(Data = GetSsoResponse.Data || (GetSsoResponse.Data = {}));
|
|
19
22
|
})(GetSsoResponse || (exports.GetSsoResponse = GetSsoResponse = {}));
|