@foru-ms/sdk 2.0.7 → 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/integrations/client/Client.js +30 -30
- package/dist/cjs/api/resources/notifications/client/Client.js +30 -30
- package/dist/cjs/api/resources/posts/client/Client.js +78 -78
- package/dist/cjs/api/resources/privateMessages/client/Client.js +48 -48
- package/dist/cjs/api/resources/reports/client/Client.js +24 -24
- package/dist/cjs/api/resources/roles/client/Client.js +30 -30
- package/dist/cjs/api/resources/ssOs/client/Client.js +30 -30
- package/dist/cjs/api/resources/tags/client/Client.js +48 -48
- package/dist/cjs/api/resources/threads/client/Client.js +114 -114
- package/dist/cjs/api/resources/users/client/Client.js +60 -60
- package/dist/cjs/api/resources/webhooks/client/Client.js +42 -42
- 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/integrations/client/Client.mjs +30 -30
- package/dist/esm/api/resources/notifications/client/Client.mjs +30 -30
- package/dist/esm/api/resources/posts/client/Client.mjs +78 -78
- package/dist/esm/api/resources/privateMessages/client/Client.mjs +48 -48
- package/dist/esm/api/resources/reports/client/Client.mjs +24 -24
- package/dist/esm/api/resources/roles/client/Client.mjs +30 -30
- package/dist/esm/api/resources/ssOs/client/Client.mjs +30 -30
- package/dist/esm/api/resources/tags/client/Client.mjs +48 -48
- package/dist/esm/api/resources/threads/client/Client.mjs +114 -114
- package/dist/esm/api/resources/users/client/Client.mjs +60 -60
- package/dist/esm/api/resources/webhooks/client/Client.mjs +42 -42
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/BaseClient.d.ts
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/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@foru-ms/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "2.0.
|
|
47
|
-
"User-Agent": "@foru-ms/sdk/2.0.
|
|
46
|
+
"X-Fern-SDK-Version": "2.0.8",
|
|
47
|
+
"User-Agent": "@foru-ms/sdk/2.0.8",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -79,21 +79,21 @@ class AuthClient {
|
|
|
79
79
|
}
|
|
80
80
|
__register(request, requestOptions) {
|
|
81
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
82
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
83
83
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
84
84
|
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);
|
|
85
|
-
const _response = yield core.fetcher({
|
|
86
|
-
url: core.url.join((
|
|
85
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
86
|
+
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"),
|
|
87
87
|
method: "POST",
|
|
88
88
|
headers: _headers,
|
|
89
89
|
contentType: "application/json",
|
|
90
90
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
91
91
|
requestType: "json",
|
|
92
92
|
body: request,
|
|
93
|
-
timeoutMs: ((
|
|
94
|
-
maxRetries: (
|
|
93
|
+
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,
|
|
94
|
+
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,
|
|
95
95
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
-
fetchFn: (
|
|
96
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
97
97
|
logging: this._options.logging,
|
|
98
98
|
});
|
|
99
99
|
if (_response.ok) {
|
|
@@ -145,21 +145,21 @@ class AuthClient {
|
|
|
145
145
|
}
|
|
146
146
|
__login(request, requestOptions) {
|
|
147
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
148
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
149
149
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
150
150
|
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);
|
|
151
|
-
const _response = yield core.fetcher({
|
|
152
|
-
url: core.url.join((
|
|
151
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
152
|
+
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"),
|
|
153
153
|
method: "POST",
|
|
154
154
|
headers: _headers,
|
|
155
155
|
contentType: "application/json",
|
|
156
156
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
157
157
|
requestType: "json",
|
|
158
158
|
body: request,
|
|
159
|
-
timeoutMs: ((
|
|
160
|
-
maxRetries: (
|
|
159
|
+
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,
|
|
160
|
+
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,
|
|
161
161
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
162
|
-
fetchFn: (
|
|
162
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
163
163
|
logging: this._options.logging,
|
|
164
164
|
});
|
|
165
165
|
if (_response.ok) {
|
|
@@ -204,18 +204,18 @@ class AuthClient {
|
|
|
204
204
|
}
|
|
205
205
|
__getCurrentUser(requestOptions) {
|
|
206
206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
207
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
208
208
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
209
209
|
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);
|
|
210
|
-
const _response = yield core.fetcher({
|
|
211
|
-
url: core.url.join((
|
|
210
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
211
|
+
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"),
|
|
212
212
|
method: "GET",
|
|
213
213
|
headers: _headers,
|
|
214
214
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
215
|
-
timeoutMs: ((
|
|
216
|
-
maxRetries: (
|
|
215
|
+
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,
|
|
216
|
+
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,
|
|
217
217
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
218
|
-
fetchFn: (
|
|
218
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
219
219
|
logging: this._options.logging,
|
|
220
220
|
});
|
|
221
221
|
if (_response.ok) {
|
|
@@ -264,21 +264,21 @@ class AuthClient {
|
|
|
264
264
|
}
|
|
265
265
|
__requestPasswordReset(request, requestOptions) {
|
|
266
266
|
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
267
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
268
268
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
269
269
|
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);
|
|
270
|
-
const _response = yield core.fetcher({
|
|
271
|
-
url: core.url.join((
|
|
270
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
271
|
+
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"),
|
|
272
272
|
method: "POST",
|
|
273
273
|
headers: _headers,
|
|
274
274
|
contentType: "application/json",
|
|
275
275
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
276
276
|
requestType: "json",
|
|
277
277
|
body: request,
|
|
278
|
-
timeoutMs: ((
|
|
279
|
-
maxRetries: (
|
|
278
|
+
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,
|
|
279
|
+
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,
|
|
280
280
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
281
|
-
fetchFn: (
|
|
281
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
282
282
|
logging: this._options.logging,
|
|
283
283
|
});
|
|
284
284
|
if (_response.ok) {
|
|
@@ -329,21 +329,21 @@ class AuthClient {
|
|
|
329
329
|
}
|
|
330
330
|
__resetPassword(request, requestOptions) {
|
|
331
331
|
return __awaiter(this, void 0, void 0, function* () {
|
|
332
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
332
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
333
333
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
334
334
|
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);
|
|
335
|
-
const _response = yield core.fetcher({
|
|
336
|
-
url: core.url.join((
|
|
335
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
336
|
+
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"),
|
|
337
337
|
method: "POST",
|
|
338
338
|
headers: _headers,
|
|
339
339
|
contentType: "application/json",
|
|
340
340
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
341
341
|
requestType: "json",
|
|
342
342
|
body: request,
|
|
343
|
-
timeoutMs: ((
|
|
344
|
-
maxRetries: (
|
|
343
|
+
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,
|
|
344
|
+
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,
|
|
345
345
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
346
|
-
fetchFn: (
|
|
346
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
347
347
|
logging: this._options.logging,
|
|
348
348
|
});
|
|
349
349
|
if (_response.ok) {
|
|
@@ -83,7 +83,7 @@ class IntegrationsClient {
|
|
|
83
83
|
}
|
|
84
84
|
__listAllIntegrations() {
|
|
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 IntegrationsClient {
|
|
|
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, "integrations"),
|
|
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) {
|
|
@@ -155,21 +155,21 @@ class IntegrationsClient {
|
|
|
155
155
|
}
|
|
156
156
|
__createAnIntegration(request, requestOptions) {
|
|
157
157
|
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
158
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
159
159
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
160
160
|
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);
|
|
161
|
-
const _response = yield core.fetcher({
|
|
162
|
-
url: core.url.join((
|
|
161
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
162
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, "integrations"),
|
|
163
163
|
method: "POST",
|
|
164
164
|
headers: _headers,
|
|
165
165
|
contentType: "application/json",
|
|
166
166
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
167
167
|
requestType: "json",
|
|
168
168
|
body: request,
|
|
169
|
-
timeoutMs: ((
|
|
170
|
-
maxRetries: (
|
|
169
|
+
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,
|
|
170
|
+
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,
|
|
171
171
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
172
|
-
fetchFn: (
|
|
172
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
173
173
|
logging: this._options.logging,
|
|
174
174
|
});
|
|
175
175
|
if (_response.ok) {
|
|
@@ -218,19 +218,19 @@ class IntegrationsClient {
|
|
|
218
218
|
}
|
|
219
219
|
__getAnIntegration(request, requestOptions) {
|
|
220
220
|
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
221
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
222
222
|
const { id } = request;
|
|
223
223
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
224
224
|
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);
|
|
225
|
-
const _response = yield core.fetcher({
|
|
226
|
-
url: core.url.join((
|
|
225
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
226
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
|
|
227
227
|
method: "GET",
|
|
228
228
|
headers: _headers,
|
|
229
229
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
230
|
-
timeoutMs: ((
|
|
231
|
-
maxRetries: (
|
|
230
|
+
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,
|
|
231
|
+
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,
|
|
232
232
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
233
|
-
fetchFn: (
|
|
233
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
234
234
|
logging: this._options.logging,
|
|
235
235
|
});
|
|
236
236
|
if (_response.ok) {
|
|
@@ -279,19 +279,19 @@ class IntegrationsClient {
|
|
|
279
279
|
}
|
|
280
280
|
__deleteAnIntegration(request, requestOptions) {
|
|
281
281
|
return __awaiter(this, void 0, void 0, function* () {
|
|
282
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
282
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
283
283
|
const { id } = request;
|
|
284
284
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
285
285
|
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);
|
|
286
|
-
const _response = yield core.fetcher({
|
|
287
|
-
url: core.url.join((
|
|
286
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
287
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
|
|
288
288
|
method: "DELETE",
|
|
289
289
|
headers: _headers,
|
|
290
290
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
291
|
-
timeoutMs: ((
|
|
292
|
-
maxRetries: (
|
|
291
|
+
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,
|
|
292
|
+
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,
|
|
293
293
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
294
|
-
fetchFn: (
|
|
294
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
295
295
|
logging: this._options.logging,
|
|
296
296
|
});
|
|
297
297
|
if (_response.ok) {
|
|
@@ -341,22 +341,22 @@ class IntegrationsClient {
|
|
|
341
341
|
}
|
|
342
342
|
__updateAnIntegration(request, requestOptions) {
|
|
343
343
|
return __awaiter(this, void 0, void 0, function* () {
|
|
344
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
344
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
345
345
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
346
346
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
347
347
|
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);
|
|
348
|
-
const _response = yield core.fetcher({
|
|
349
|
-
url: core.url.join((
|
|
348
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
349
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
|
|
350
350
|
method: "PATCH",
|
|
351
351
|
headers: _headers,
|
|
352
352
|
contentType: "application/json",
|
|
353
353
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
354
354
|
requestType: "json",
|
|
355
355
|
body: _body,
|
|
356
|
-
timeoutMs: ((
|
|
357
|
-
maxRetries: (
|
|
356
|
+
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,
|
|
357
|
+
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,
|
|
358
358
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
359
|
-
fetchFn: (
|
|
359
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
360
360
|
logging: this._options.logging,
|
|
361
361
|
});
|
|
362
362
|
if (_response.ok) {
|
|
@@ -83,7 +83,7 @@ class NotificationsClient {
|
|
|
83
83
|
}
|
|
84
84
|
__listAllNotifications() {
|
|
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 NotificationsClient {
|
|
|
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, "notifications"),
|
|
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) {
|
|
@@ -153,21 +153,21 @@ class NotificationsClient {
|
|
|
153
153
|
}
|
|
154
154
|
__createANotification(request, requestOptions) {
|
|
155
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
156
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
157
157
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
158
158
|
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);
|
|
159
|
-
const _response = yield core.fetcher({
|
|
160
|
-
url: core.url.join((
|
|
159
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
160
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, "notifications"),
|
|
161
161
|
method: "POST",
|
|
162
162
|
headers: _headers,
|
|
163
163
|
contentType: "application/json",
|
|
164
164
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
165
165
|
requestType: "json",
|
|
166
166
|
body: request,
|
|
167
|
-
timeoutMs: ((
|
|
168
|
-
maxRetries: (
|
|
167
|
+
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,
|
|
168
|
+
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,
|
|
169
169
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
170
|
-
fetchFn: (
|
|
170
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
171
171
|
logging: this._options.logging,
|
|
172
172
|
});
|
|
173
173
|
if (_response.ok) {
|
|
@@ -216,19 +216,19 @@ class NotificationsClient {
|
|
|
216
216
|
}
|
|
217
217
|
__getANotification(request, requestOptions) {
|
|
218
218
|
return __awaiter(this, void 0, void 0, function* () {
|
|
219
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
219
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
220
220
|
const { id } = request;
|
|
221
221
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
222
222
|
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);
|
|
223
|
-
const _response = yield core.fetcher({
|
|
224
|
-
url: core.url.join((
|
|
223
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
224
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `notifications/${core.url.encodePathParam(id)}`),
|
|
225
225
|
method: "GET",
|
|
226
226
|
headers: _headers,
|
|
227
227
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
228
|
-
timeoutMs: ((
|
|
229
|
-
maxRetries: (
|
|
228
|
+
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,
|
|
229
|
+
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,
|
|
230
230
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
231
|
-
fetchFn: (
|
|
231
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
232
232
|
logging: this._options.logging,
|
|
233
233
|
});
|
|
234
234
|
if (_response.ok) {
|
|
@@ -277,19 +277,19 @@ class NotificationsClient {
|
|
|
277
277
|
}
|
|
278
278
|
__deleteANotification(request, requestOptions) {
|
|
279
279
|
return __awaiter(this, void 0, void 0, function* () {
|
|
280
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
280
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
281
281
|
const { id } = request;
|
|
282
282
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
283
283
|
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);
|
|
284
|
-
const _response = yield core.fetcher({
|
|
285
|
-
url: core.url.join((
|
|
284
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
285
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `notifications/${core.url.encodePathParam(id)}`),
|
|
286
286
|
method: "DELETE",
|
|
287
287
|
headers: _headers,
|
|
288
288
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
289
|
-
timeoutMs: ((
|
|
290
|
-
maxRetries: (
|
|
289
|
+
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,
|
|
290
|
+
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,
|
|
291
291
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
292
|
-
fetchFn: (
|
|
292
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
293
293
|
logging: this._options.logging,
|
|
294
294
|
});
|
|
295
295
|
if (_response.ok) {
|
|
@@ -339,22 +339,22 @@ class NotificationsClient {
|
|
|
339
339
|
}
|
|
340
340
|
__updateANotification(request, requestOptions) {
|
|
341
341
|
return __awaiter(this, void 0, void 0, function* () {
|
|
342
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
342
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
343
343
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
344
344
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
345
345
|
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);
|
|
346
|
-
const _response = yield core.fetcher({
|
|
347
|
-
url: core.url.join((
|
|
346
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
347
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `notifications/${core.url.encodePathParam(id)}`),
|
|
348
348
|
method: "PATCH",
|
|
349
349
|
headers: _headers,
|
|
350
350
|
contentType: "application/json",
|
|
351
351
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
352
352
|
requestType: "json",
|
|
353
353
|
body: _body,
|
|
354
|
-
timeoutMs: ((
|
|
355
|
-
maxRetries: (
|
|
354
|
+
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,
|
|
355
|
+
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,
|
|
356
356
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
357
|
-
fetchFn: (
|
|
357
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
358
358
|
logging: this._options.logging,
|
|
359
359
|
});
|
|
360
360
|
if (_response.ok) {
|