@foru-ms/sdk 2.1.4 → 2.1.6
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/README.md +1 -1
- package/dist/cjs/BaseClient.d.ts +0 -4
- package/dist/cjs/BaseClient.js +2 -3
- package/dist/cjs/Client.d.ts +1 -1
- package/dist/cjs/Client.js +1 -1
- package/dist/cjs/api/errors/ConflictError.d.ts +6 -0
- package/dist/cjs/api/errors/ConflictError.js +54 -0
- package/dist/cjs/api/errors/ForbiddenError.d.ts +6 -0
- package/dist/cjs/api/errors/ForbiddenError.js +54 -0
- package/dist/cjs/api/errors/index.d.ts +2 -0
- package/dist/cjs/api/errors/index.js +2 -0
- package/dist/cjs/api/resources/auth/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/auth/client/Client.js +36 -46
- package/dist/cjs/api/resources/integrations/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/integrations/client/Client.js +36 -46
- package/dist/cjs/api/resources/notifications/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/notifications/client/Client.js +36 -46
- package/dist/cjs/api/resources/posts/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/posts/client/Client.js +85 -109
- package/dist/cjs/api/resources/privateMessages/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/privateMessages/client/Client.js +64 -82
- package/dist/cjs/api/resources/provisioning/client/Client.d.ts +97 -3
- package/dist/cjs/api/resources/provisioning/client/Client.js +472 -214
- package/dist/cjs/api/resources/provisioning/client/requests/AddDomainProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/CreateInstance.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/CreateWebhookProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/DeleteInstance.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/DeleteWebhookProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/ExportDataProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/GetBillingProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/GetOwnershipProvisioningRequest.d.ts +13 -0
- package/dist/cjs/api/resources/provisioning/client/requests/GetOwnershipProvisioningRequest.js +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/GetUsageProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/InviteTeamProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/ListDomainsProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/ListProvisioningRequest.d.ts +5 -1
- package/dist/cjs/api/resources/provisioning/client/requests/ListTeamProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/ListWebhooksProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/LoginProvisioningRequest.d.ts +13 -0
- package/dist/cjs/api/resources/provisioning/client/requests/LoginProvisioningRequest.js +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/RegenerateApiKeyProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/RegisterProvisioningRequest.d.ts +15 -0
- package/dist/cjs/api/resources/provisioning/client/requests/RegisterProvisioningRequest.js +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/RemoveDomainProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/RemoveTeamMemberProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/TransferOwnershipProvisioningRequest.d.ts +15 -0
- package/dist/cjs/api/resources/provisioning/client/requests/TransferOwnershipProvisioningRequest.js +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/UpdateInstance.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/UpdateWebhookProvisioningRequest.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/UpgradeInstance.d.ts +3 -0
- package/dist/cjs/api/resources/provisioning/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/provisioning/types/GetOwnershipProvisioningResponse.d.ts +4 -0
- package/dist/cjs/api/resources/provisioning/types/GetOwnershipProvisioningResponse.js +3 -0
- package/dist/cjs/api/resources/provisioning/types/LoginProvisioningResponse.d.ts +4 -0
- package/dist/cjs/api/resources/provisioning/types/LoginProvisioningResponse.js +3 -0
- package/dist/cjs/api/resources/provisioning/types/RegisterProvisioningResponse.d.ts +4 -0
- package/dist/cjs/api/resources/provisioning/types/RegisterProvisioningResponse.js +3 -0
- package/dist/cjs/api/resources/provisioning/types/TransferOwnershipProvisioningResponse.d.ts +16 -0
- package/dist/cjs/api/resources/provisioning/types/TransferOwnershipProvisioningResponse.js +3 -0
- package/dist/cjs/api/resources/provisioning/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/provisioning/types/index.js +4 -0
- package/dist/cjs/api/resources/reports/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/reports/client/Client.js +36 -46
- package/dist/cjs/api/resources/roles/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/roles/client/Client.js +36 -46
- package/dist/cjs/api/resources/search/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/search/client/Client.js +8 -10
- package/dist/cjs/api/resources/ssOs/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/ssOs/client/Client.js +36 -46
- package/dist/cjs/api/resources/tags/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tags/client/Client.js +57 -73
- package/dist/cjs/api/resources/threads/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/threads/client/Client.js +127 -163
- package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/Client.js +78 -100
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +57 -73
- package/dist/cjs/api/types/ConflictErrorBody.d.ts +13 -0
- package/dist/cjs/api/types/ConflictErrorBody.js +3 -0
- package/dist/cjs/api/types/OwnershipInfo.d.ts +18 -0
- package/dist/cjs/api/types/OwnershipInfo.js +3 -0
- package/dist/cjs/api/types/ProvisioningAuthResponse.d.ts +5 -0
- package/dist/cjs/api/types/ProvisioningAuthResponse.js +3 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +0 -4
- package/dist/esm/BaseClient.mjs +2 -3
- package/dist/esm/Client.d.mts +1 -1
- package/dist/esm/Client.mjs +1 -1
- package/dist/esm/api/errors/ConflictError.d.mts +6 -0
- package/dist/esm/api/errors/ConflictError.mjs +17 -0
- package/dist/esm/api/errors/ForbiddenError.d.mts +6 -0
- package/dist/esm/api/errors/ForbiddenError.mjs +17 -0
- package/dist/esm/api/errors/index.d.mts +2 -0
- package/dist/esm/api/errors/index.mjs +2 -0
- package/dist/esm/api/resources/auth/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/auth/client/Client.mjs +37 -47
- package/dist/esm/api/resources/integrations/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/integrations/client/Client.mjs +37 -47
- package/dist/esm/api/resources/notifications/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/notifications/client/Client.mjs +37 -47
- package/dist/esm/api/resources/posts/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/posts/client/Client.mjs +86 -110
- package/dist/esm/api/resources/privateMessages/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/privateMessages/client/Client.mjs +65 -83
- package/dist/esm/api/resources/provisioning/client/Client.d.mts +97 -3
- package/dist/esm/api/resources/provisioning/client/Client.mjs +472 -214
- package/dist/esm/api/resources/provisioning/client/requests/AddDomainProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/CreateInstance.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/CreateWebhookProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/DeleteInstance.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/DeleteWebhookProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/ExportDataProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/GetBillingProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/GetOwnershipProvisioningRequest.d.mts +13 -0
- package/dist/esm/api/resources/provisioning/client/requests/GetOwnershipProvisioningRequest.mjs +2 -0
- package/dist/esm/api/resources/provisioning/client/requests/GetUsageProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/InviteTeamProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/ListDomainsProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/ListProvisioningRequest.d.mts +5 -1
- package/dist/esm/api/resources/provisioning/client/requests/ListTeamProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/ListWebhooksProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/LoginProvisioningRequest.d.mts +13 -0
- package/dist/esm/api/resources/provisioning/client/requests/LoginProvisioningRequest.mjs +2 -0
- package/dist/esm/api/resources/provisioning/client/requests/RegenerateApiKeyProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/RegisterProvisioningRequest.d.mts +15 -0
- package/dist/esm/api/resources/provisioning/client/requests/RegisterProvisioningRequest.mjs +2 -0
- package/dist/esm/api/resources/provisioning/client/requests/RemoveDomainProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/RemoveTeamMemberProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/TransferOwnershipProvisioningRequest.d.mts +15 -0
- package/dist/esm/api/resources/provisioning/client/requests/TransferOwnershipProvisioningRequest.mjs +2 -0
- package/dist/esm/api/resources/provisioning/client/requests/UpdateInstance.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/UpdateWebhookProvisioningRequest.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/UpgradeInstance.d.mts +3 -0
- package/dist/esm/api/resources/provisioning/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/provisioning/types/GetOwnershipProvisioningResponse.d.mts +4 -0
- package/dist/esm/api/resources/provisioning/types/GetOwnershipProvisioningResponse.mjs +2 -0
- package/dist/esm/api/resources/provisioning/types/LoginProvisioningResponse.d.mts +4 -0
- package/dist/esm/api/resources/provisioning/types/LoginProvisioningResponse.mjs +2 -0
- package/dist/esm/api/resources/provisioning/types/RegisterProvisioningResponse.d.mts +4 -0
- package/dist/esm/api/resources/provisioning/types/RegisterProvisioningResponse.mjs +2 -0
- package/dist/esm/api/resources/provisioning/types/TransferOwnershipProvisioningResponse.d.mts +16 -0
- package/dist/esm/api/resources/provisioning/types/TransferOwnershipProvisioningResponse.mjs +2 -0
- package/dist/esm/api/resources/provisioning/types/index.d.mts +4 -0
- package/dist/esm/api/resources/provisioning/types/index.mjs +4 -0
- package/dist/esm/api/resources/reports/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/reports/client/Client.mjs +37 -47
- package/dist/esm/api/resources/roles/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/roles/client/Client.mjs +37 -47
- package/dist/esm/api/resources/search/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/search/client/Client.mjs +9 -11
- package/dist/esm/api/resources/ssOs/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/ssOs/client/Client.mjs +37 -47
- package/dist/esm/api/resources/tags/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tags/client/Client.mjs +58 -74
- package/dist/esm/api/resources/threads/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/threads/client/Client.mjs +128 -164
- package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/users/client/Client.mjs +79 -101
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +58 -74
- package/dist/esm/api/types/ConflictErrorBody.d.mts +13 -0
- package/dist/esm/api/types/ConflictErrorBody.mjs +2 -0
- package/dist/esm/api/types/OwnershipInfo.d.mts +18 -0
- package/dist/esm/api/types/OwnershipInfo.mjs +2 -0
- package/dist/esm/api/types/ProvisioningAuthResponse.d.mts +5 -0
- package/dist/esm/api/types/ProvisioningAuthResponse.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +286 -1
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -19,7 +19,7 @@ import * as Forum from "../../../index.mjs";
|
|
|
19
19
|
* Operations for auth
|
|
20
20
|
*/
|
|
21
21
|
export class AuthClient {
|
|
22
|
-
constructor(options) {
|
|
22
|
+
constructor(options = {}) {
|
|
23
23
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
@@ -46,23 +46,21 @@ export class AuthClient {
|
|
|
46
46
|
}
|
|
47
47
|
__register(request, requestOptions) {
|
|
48
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
49
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
50
50
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
51
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
55
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "auth/register"),
|
|
51
|
+
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);
|
|
52
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
53
|
+
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"),
|
|
56
54
|
method: "POST",
|
|
57
55
|
headers: _headers,
|
|
58
56
|
contentType: "application/json",
|
|
59
57
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
60
58
|
requestType: "json",
|
|
61
59
|
body: request,
|
|
62
|
-
timeoutMs: ((
|
|
63
|
-
maxRetries: (
|
|
60
|
+
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,
|
|
61
|
+
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,
|
|
64
62
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
65
|
-
fetchFn: (
|
|
63
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
66
64
|
logging: this._options.logging,
|
|
67
65
|
});
|
|
68
66
|
if (_response.ok) {
|
|
@@ -114,23 +112,21 @@ export class AuthClient {
|
|
|
114
112
|
}
|
|
115
113
|
__login(request, requestOptions) {
|
|
116
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
115
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
118
116
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
119
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
123
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "auth/login"),
|
|
117
|
+
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);
|
|
118
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
119
|
+
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"),
|
|
124
120
|
method: "POST",
|
|
125
121
|
headers: _headers,
|
|
126
122
|
contentType: "application/json",
|
|
127
123
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
128
124
|
requestType: "json",
|
|
129
125
|
body: request,
|
|
130
|
-
timeoutMs: ((
|
|
131
|
-
maxRetries: (
|
|
126
|
+
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,
|
|
127
|
+
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,
|
|
132
128
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
133
|
-
fetchFn: (
|
|
129
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
134
130
|
logging: this._options.logging,
|
|
135
131
|
});
|
|
136
132
|
if (_response.ok) {
|
|
@@ -175,20 +171,18 @@ export class AuthClient {
|
|
|
175
171
|
}
|
|
176
172
|
__me(requestOptions) {
|
|
177
173
|
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
174
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
179
175
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
180
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
184
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "auth/me"),
|
|
176
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
177
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
178
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, "auth/me"),
|
|
185
179
|
method: "GET",
|
|
186
180
|
headers: _headers,
|
|
187
181
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
188
|
-
timeoutMs: ((
|
|
189
|
-
maxRetries: (
|
|
182
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
183
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
190
184
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
191
|
-
fetchFn: (
|
|
185
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
192
186
|
logging: this._options.logging,
|
|
193
187
|
});
|
|
194
188
|
if (_response.ok) {
|
|
@@ -237,23 +231,21 @@ export class AuthClient {
|
|
|
237
231
|
}
|
|
238
232
|
__forgotPassword(request, requestOptions) {
|
|
239
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
234
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
241
235
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
242
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
246
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "auth/forgot-password"),
|
|
236
|
+
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);
|
|
237
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
238
|
+
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"),
|
|
247
239
|
method: "POST",
|
|
248
240
|
headers: _headers,
|
|
249
241
|
contentType: "application/json",
|
|
250
242
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
251
243
|
requestType: "json",
|
|
252
244
|
body: request,
|
|
253
|
-
timeoutMs: ((
|
|
254
|
-
maxRetries: (
|
|
245
|
+
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,
|
|
246
|
+
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,
|
|
255
247
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
256
|
-
fetchFn: (
|
|
248
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
257
249
|
logging: this._options.logging,
|
|
258
250
|
});
|
|
259
251
|
if (_response.ok) {
|
|
@@ -304,23 +296,21 @@ export class AuthClient {
|
|
|
304
296
|
}
|
|
305
297
|
__resetPassword(request, requestOptions) {
|
|
306
298
|
return __awaiter(this, void 0, void 0, function* () {
|
|
307
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
299
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
308
300
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
309
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
313
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "auth/reset-password"),
|
|
301
|
+
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);
|
|
302
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
303
|
+
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"),
|
|
314
304
|
method: "POST",
|
|
315
305
|
headers: _headers,
|
|
316
306
|
contentType: "application/json",
|
|
317
307
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
318
308
|
requestType: "json",
|
|
319
309
|
body: request,
|
|
320
|
-
timeoutMs: ((
|
|
321
|
-
maxRetries: (
|
|
310
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
311
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
322
312
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
323
|
-
fetchFn: (
|
|
313
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
324
314
|
logging: this._options.logging,
|
|
325
315
|
});
|
|
326
316
|
if (_response.ok) {
|
|
@@ -12,7 +12,7 @@ export declare namespace IntegrationsClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class IntegrationsClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<IntegrationsClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: IntegrationsClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a paginated list of integrations. Use cursor for pagination.
|
|
18
18
|
*
|
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
23
|
-
import { mergeHeaders
|
|
23
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
24
24
|
import * as core from "../../../../core/index.mjs";
|
|
25
25
|
import * as environments from "../../../../environments.mjs";
|
|
26
26
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -30,7 +30,7 @@ import * as Forum from "../../../index.mjs";
|
|
|
30
30
|
* Operations for integrations
|
|
31
31
|
*/
|
|
32
32
|
export class IntegrationsClient {
|
|
33
|
-
constructor(options) {
|
|
33
|
+
constructor(options = {}) {
|
|
34
34
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -54,25 +54,23 @@ export class IntegrationsClient {
|
|
|
54
54
|
}
|
|
55
55
|
__list() {
|
|
56
56
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
57
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
57
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
58
58
|
const { limit, cursor } = request;
|
|
59
59
|
const _queryParams = {
|
|
60
60
|
limit,
|
|
61
61
|
cursor,
|
|
62
62
|
};
|
|
63
63
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
64
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
68
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "integrations"),
|
|
64
|
+
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);
|
|
65
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
66
|
+
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"),
|
|
69
67
|
method: "GET",
|
|
70
68
|
headers: _headers,
|
|
71
69
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
72
|
-
timeoutMs: ((
|
|
73
|
-
maxRetries: (
|
|
70
|
+
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,
|
|
71
|
+
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,
|
|
74
72
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
75
|
-
fetchFn: (
|
|
73
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
76
74
|
logging: this._options.logging,
|
|
77
75
|
});
|
|
78
76
|
if (_response.ok) {
|
|
@@ -127,23 +125,21 @@ export class IntegrationsClient {
|
|
|
127
125
|
}
|
|
128
126
|
__create(request, requestOptions) {
|
|
129
127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
128
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
131
129
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
132
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
136
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "integrations"),
|
|
130
|
+
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);
|
|
131
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
132
|
+
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"),
|
|
137
133
|
method: "POST",
|
|
138
134
|
headers: _headers,
|
|
139
135
|
contentType: "application/json",
|
|
140
136
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
141
137
|
requestType: "json",
|
|
142
138
|
body: request,
|
|
143
|
-
timeoutMs: ((
|
|
144
|
-
maxRetries: (
|
|
139
|
+
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,
|
|
140
|
+
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,
|
|
145
141
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
146
|
-
fetchFn: (
|
|
142
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
147
143
|
logging: this._options.logging,
|
|
148
144
|
});
|
|
149
145
|
if (_response.ok) {
|
|
@@ -196,21 +192,19 @@ export class IntegrationsClient {
|
|
|
196
192
|
}
|
|
197
193
|
__retrieve(request, requestOptions) {
|
|
198
194
|
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
195
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
200
196
|
const { id } = request;
|
|
201
197
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
202
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
206
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
|
|
198
|
+
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);
|
|
199
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
200
|
+
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)}`),
|
|
207
201
|
method: "GET",
|
|
208
202
|
headers: _headers,
|
|
209
203
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
210
|
-
timeoutMs: ((
|
|
211
|
-
maxRetries: (
|
|
204
|
+
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,
|
|
205
|
+
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,
|
|
212
206
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
213
|
-
fetchFn: (
|
|
207
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
214
208
|
logging: this._options.logging,
|
|
215
209
|
});
|
|
216
210
|
if (_response.ok) {
|
|
@@ -263,21 +257,19 @@ export class IntegrationsClient {
|
|
|
263
257
|
}
|
|
264
258
|
__delete(request, requestOptions) {
|
|
265
259
|
return __awaiter(this, void 0, void 0, function* () {
|
|
266
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
260
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
267
261
|
const { id } = request;
|
|
268
262
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
269
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
273
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
|
|
263
|
+
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);
|
|
264
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
265
|
+
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)}`),
|
|
274
266
|
method: "DELETE",
|
|
275
267
|
headers: _headers,
|
|
276
268
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
277
|
-
timeoutMs: ((
|
|
278
|
-
maxRetries: (
|
|
269
|
+
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,
|
|
270
|
+
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,
|
|
279
271
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
280
|
-
fetchFn: (
|
|
272
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
281
273
|
logging: this._options.logging,
|
|
282
274
|
});
|
|
283
275
|
if (_response.ok) {
|
|
@@ -331,24 +323,22 @@ export class IntegrationsClient {
|
|
|
331
323
|
}
|
|
332
324
|
__update(request, requestOptions) {
|
|
333
325
|
return __awaiter(this, void 0, void 0, function* () {
|
|
334
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
326
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
335
327
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
336
328
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
337
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
341
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `integrations/${core.url.encodePathParam(id)}`),
|
|
329
|
+
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);
|
|
330
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
331
|
+
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)}`),
|
|
342
332
|
method: "PATCH",
|
|
343
333
|
headers: _headers,
|
|
344
334
|
contentType: "application/json",
|
|
345
335
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
346
336
|
requestType: "json",
|
|
347
337
|
body: _body,
|
|
348
|
-
timeoutMs: ((
|
|
349
|
-
maxRetries: (
|
|
338
|
+
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,
|
|
339
|
+
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,
|
|
350
340
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
351
|
-
fetchFn: (
|
|
341
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
352
342
|
logging: this._options.logging,
|
|
353
343
|
});
|
|
354
344
|
if (_response.ok) {
|
|
@@ -12,7 +12,7 @@ export declare namespace NotificationsClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class NotificationsClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<NotificationsClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: NotificationsClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a paginated list of notifications. Use cursor for pagination.
|
|
18
18
|
*
|
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
23
|
-
import { mergeHeaders
|
|
23
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
24
24
|
import * as core from "../../../../core/index.mjs";
|
|
25
25
|
import * as environments from "../../../../environments.mjs";
|
|
26
26
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -30,7 +30,7 @@ import * as Forum from "../../../index.mjs";
|
|
|
30
30
|
* Operations for notifications
|
|
31
31
|
*/
|
|
32
32
|
export class NotificationsClient {
|
|
33
|
-
constructor(options) {
|
|
33
|
+
constructor(options = {}) {
|
|
34
34
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -52,7 +52,7 @@ export class NotificationsClient {
|
|
|
52
52
|
}
|
|
53
53
|
__list() {
|
|
54
54
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
55
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
55
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
56
56
|
const { limit, cursor, status, userId } = request;
|
|
57
57
|
const _queryParams = {
|
|
58
58
|
limit,
|
|
@@ -61,18 +61,16 @@ export class NotificationsClient {
|
|
|
61
61
|
userId,
|
|
62
62
|
};
|
|
63
63
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
64
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
68
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "notifications"),
|
|
64
|
+
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);
|
|
65
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
66
|
+
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"),
|
|
69
67
|
method: "GET",
|
|
70
68
|
headers: _headers,
|
|
71
69
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
72
|
-
timeoutMs: ((
|
|
73
|
-
maxRetries: (
|
|
70
|
+
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,
|
|
71
|
+
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,
|
|
74
72
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
75
|
-
fetchFn: (
|
|
73
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
76
74
|
logging: this._options.logging,
|
|
77
75
|
});
|
|
78
76
|
if (_response.ok) {
|
|
@@ -122,23 +120,21 @@ export class NotificationsClient {
|
|
|
122
120
|
}
|
|
123
121
|
__create(request, requestOptions) {
|
|
124
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
123
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
126
124
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
127
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
131
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "notifications"),
|
|
125
|
+
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);
|
|
126
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
127
|
+
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"),
|
|
132
128
|
method: "POST",
|
|
133
129
|
headers: _headers,
|
|
134
130
|
contentType: "application/json",
|
|
135
131
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
136
132
|
requestType: "json",
|
|
137
133
|
body: request,
|
|
138
|
-
timeoutMs: ((
|
|
139
|
-
maxRetries: (
|
|
134
|
+
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,
|
|
135
|
+
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,
|
|
140
136
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
141
|
-
fetchFn: (
|
|
137
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
142
138
|
logging: this._options.logging,
|
|
143
139
|
});
|
|
144
140
|
if (_response.ok) {
|
|
@@ -189,21 +185,19 @@ export class NotificationsClient {
|
|
|
189
185
|
}
|
|
190
186
|
__retrieve(request, requestOptions) {
|
|
191
187
|
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
188
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
193
189
|
const { id } = request;
|
|
194
190
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
195
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
199
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `notifications/${core.url.encodePathParam(id)}`),
|
|
191
|
+
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);
|
|
192
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
193
|
+
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)}`),
|
|
200
194
|
method: "GET",
|
|
201
195
|
headers: _headers,
|
|
202
196
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
203
|
-
timeoutMs: ((
|
|
204
|
-
maxRetries: (
|
|
197
|
+
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,
|
|
198
|
+
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,
|
|
205
199
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
206
|
-
fetchFn: (
|
|
200
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
207
201
|
logging: this._options.logging,
|
|
208
202
|
});
|
|
209
203
|
if (_response.ok) {
|
|
@@ -254,21 +248,19 @@ export class NotificationsClient {
|
|
|
254
248
|
}
|
|
255
249
|
__delete(request, requestOptions) {
|
|
256
250
|
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
251
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
258
252
|
const { id } = request;
|
|
259
253
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
260
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
264
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `notifications/${core.url.encodePathParam(id)}`),
|
|
254
|
+
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);
|
|
255
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
256
|
+
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)}`),
|
|
265
257
|
method: "DELETE",
|
|
266
258
|
headers: _headers,
|
|
267
259
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
268
|
-
timeoutMs: ((
|
|
269
|
-
maxRetries: (
|
|
260
|
+
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,
|
|
261
|
+
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,
|
|
270
262
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
271
|
-
fetchFn: (
|
|
263
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
272
264
|
logging: this._options.logging,
|
|
273
265
|
});
|
|
274
266
|
if (_response.ok) {
|
|
@@ -320,24 +312,22 @@ export class NotificationsClient {
|
|
|
320
312
|
}
|
|
321
313
|
__update(request, requestOptions) {
|
|
322
314
|
return __awaiter(this, void 0, void 0, function* () {
|
|
323
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
315
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
324
316
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
325
317
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
326
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
330
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, `notifications/${core.url.encodePathParam(id)}`),
|
|
318
|
+
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);
|
|
319
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
320
|
+
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)}`),
|
|
331
321
|
method: "PATCH",
|
|
332
322
|
headers: _headers,
|
|
333
323
|
contentType: "application/json",
|
|
334
324
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
335
325
|
requestType: "json",
|
|
336
326
|
body: _body,
|
|
337
|
-
timeoutMs: ((
|
|
338
|
-
maxRetries: (
|
|
327
|
+
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,
|
|
328
|
+
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,
|
|
339
329
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
340
|
-
fetchFn: (
|
|
330
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
341
331
|
logging: this._options.logging,
|
|
342
332
|
});
|
|
343
333
|
if (_response.ok) {
|
|
@@ -12,7 +12,7 @@ export declare namespace PostsClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class PostsClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<PostsClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: PostsClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a paginated list of posts. Use cursor for pagination.
|
|
18
18
|
*
|