@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
|
@@ -12,7 +12,7 @@ export declare namespace UsersClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class UsersClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<UsersClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: UsersClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a paginated list of users. 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 users
|
|
31
31
|
*/
|
|
32
32
|
export class UsersClient {
|
|
33
|
-
constructor(options) {
|
|
33
|
+
constructor(options = {}) {
|
|
34
34
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -52,7 +52,7 @@ export class UsersClient {
|
|
|
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, search, sort } = request;
|
|
57
57
|
const _queryParams = {
|
|
58
58
|
limit,
|
|
@@ -61,18 +61,16 @@ export class UsersClient {
|
|
|
61
61
|
sort: sort != null ? sort : undefined,
|
|
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, "users"),
|
|
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, "users"),
|
|
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) {
|
|
@@ -121,23 +119,21 @@ export class UsersClient {
|
|
|
121
119
|
}
|
|
122
120
|
__create(request, requestOptions) {
|
|
123
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
122
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
125
123
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
126
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
130
|
-
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, "users"),
|
|
124
|
+
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);
|
|
125
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
126
|
+
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, "users"),
|
|
131
127
|
method: "POST",
|
|
132
128
|
headers: _headers,
|
|
133
129
|
contentType: "application/json",
|
|
134
130
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
135
131
|
requestType: "json",
|
|
136
132
|
body: request,
|
|
137
|
-
timeoutMs: ((
|
|
138
|
-
maxRetries: (
|
|
133
|
+
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,
|
|
134
|
+
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,
|
|
139
135
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
140
|
-
fetchFn: (
|
|
136
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
141
137
|
logging: this._options.logging,
|
|
142
138
|
});
|
|
143
139
|
if (_response.ok) {
|
|
@@ -188,21 +184,19 @@ export class UsersClient {
|
|
|
188
184
|
}
|
|
189
185
|
__retrieve(request, requestOptions) {
|
|
190
186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
191
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
187
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
192
188
|
const { id } = request;
|
|
193
189
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
194
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
198
|
-
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, `users/${core.url.encodePathParam(id)}`),
|
|
190
|
+
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);
|
|
191
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
192
|
+
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, `users/${core.url.encodePathParam(id)}`),
|
|
199
193
|
method: "GET",
|
|
200
194
|
headers: _headers,
|
|
201
195
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
202
|
-
timeoutMs: ((
|
|
203
|
-
maxRetries: (
|
|
196
|
+
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,
|
|
197
|
+
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,
|
|
204
198
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
205
|
-
fetchFn: (
|
|
199
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
206
200
|
logging: this._options.logging,
|
|
207
201
|
});
|
|
208
202
|
if (_response.ok) {
|
|
@@ -253,21 +247,19 @@ export class UsersClient {
|
|
|
253
247
|
}
|
|
254
248
|
__delete(request, requestOptions) {
|
|
255
249
|
return __awaiter(this, void 0, void 0, function* () {
|
|
256
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
250
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
257
251
|
const { id } = request;
|
|
258
252
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
259
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
263
|
-
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, `users/${core.url.encodePathParam(id)}`),
|
|
253
|
+
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);
|
|
254
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
255
|
+
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, `users/${core.url.encodePathParam(id)}`),
|
|
264
256
|
method: "DELETE",
|
|
265
257
|
headers: _headers,
|
|
266
258
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
267
|
-
timeoutMs: ((
|
|
268
|
-
maxRetries: (
|
|
259
|
+
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,
|
|
260
|
+
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,
|
|
269
261
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
270
|
-
fetchFn: (
|
|
262
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
271
263
|
logging: this._options.logging,
|
|
272
264
|
});
|
|
273
265
|
if (_response.ok) {
|
|
@@ -319,24 +311,22 @@ export class UsersClient {
|
|
|
319
311
|
}
|
|
320
312
|
__update(request, requestOptions) {
|
|
321
313
|
return __awaiter(this, void 0, void 0, function* () {
|
|
322
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
314
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
323
315
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
324
316
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
325
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
329
|
-
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, `users/${core.url.encodePathParam(id)}`),
|
|
317
|
+
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);
|
|
318
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
319
|
+
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, `users/${core.url.encodePathParam(id)}`),
|
|
330
320
|
method: "PATCH",
|
|
331
321
|
headers: _headers,
|
|
332
322
|
contentType: "application/json",
|
|
333
323
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
334
324
|
requestType: "json",
|
|
335
325
|
body: _body,
|
|
336
|
-
timeoutMs: ((
|
|
337
|
-
maxRetries: (
|
|
326
|
+
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,
|
|
327
|
+
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,
|
|
338
328
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
339
|
-
fetchFn: (
|
|
329
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
340
330
|
logging: this._options.logging,
|
|
341
331
|
});
|
|
342
332
|
if (_response.ok) {
|
|
@@ -388,25 +378,23 @@ export class UsersClient {
|
|
|
388
378
|
}
|
|
389
379
|
__listFollowers(request, requestOptions) {
|
|
390
380
|
return __awaiter(this, void 0, void 0, function* () {
|
|
391
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
381
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
392
382
|
const { id, limit, cursor } = request;
|
|
393
383
|
const _queryParams = {
|
|
394
384
|
limit,
|
|
395
385
|
cursor,
|
|
396
386
|
};
|
|
397
387
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
398
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
402
|
-
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, `users/${core.url.encodePathParam(id)}/followers`),
|
|
388
|
+
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);
|
|
389
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
390
|
+
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, `users/${core.url.encodePathParam(id)}/followers`),
|
|
403
391
|
method: "GET",
|
|
404
392
|
headers: _headers,
|
|
405
393
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
406
|
-
timeoutMs: ((
|
|
407
|
-
maxRetries: (
|
|
394
|
+
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,
|
|
395
|
+
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,
|
|
408
396
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
409
|
-
fetchFn: (
|
|
397
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
410
398
|
logging: this._options.logging,
|
|
411
399
|
});
|
|
412
400
|
if (_response.ok) {
|
|
@@ -453,21 +441,19 @@ export class UsersClient {
|
|
|
453
441
|
}
|
|
454
442
|
__retrieveFollower(request, requestOptions) {
|
|
455
443
|
return __awaiter(this, void 0, void 0, function* () {
|
|
456
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
444
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
457
445
|
const { id, subId } = request;
|
|
458
446
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
459
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
463
|
-
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, `users/${core.url.encodePathParam(id)}/followers/${core.url.encodePathParam(subId)}`),
|
|
447
|
+
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);
|
|
448
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
449
|
+
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, `users/${core.url.encodePathParam(id)}/followers/${core.url.encodePathParam(subId)}`),
|
|
464
450
|
method: "GET",
|
|
465
451
|
headers: _headers,
|
|
466
452
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
467
|
-
timeoutMs: ((
|
|
468
|
-
maxRetries: (
|
|
453
|
+
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,
|
|
454
|
+
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,
|
|
469
455
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
470
|
-
fetchFn: (
|
|
456
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
471
457
|
logging: this._options.logging,
|
|
472
458
|
});
|
|
473
459
|
if (_response.ok) {
|
|
@@ -514,21 +500,19 @@ export class UsersClient {
|
|
|
514
500
|
}
|
|
515
501
|
__deleteFollower(request, requestOptions) {
|
|
516
502
|
return __awaiter(this, void 0, void 0, function* () {
|
|
517
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
503
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
518
504
|
const { id, subId } = request;
|
|
519
505
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
520
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
524
|
-
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, `users/${core.url.encodePathParam(id)}/followers/${core.url.encodePathParam(subId)}`),
|
|
506
|
+
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);
|
|
507
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
508
|
+
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, `users/${core.url.encodePathParam(id)}/followers/${core.url.encodePathParam(subId)}`),
|
|
525
509
|
method: "DELETE",
|
|
526
510
|
headers: _headers,
|
|
527
511
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
528
|
-
timeoutMs: ((
|
|
529
|
-
maxRetries: (
|
|
512
|
+
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,
|
|
513
|
+
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,
|
|
530
514
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
531
|
-
fetchFn: (
|
|
515
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
532
516
|
logging: this._options.logging,
|
|
533
517
|
});
|
|
534
518
|
if (_response.ok) {
|
|
@@ -576,25 +560,23 @@ export class UsersClient {
|
|
|
576
560
|
}
|
|
577
561
|
__listFollowing(request, requestOptions) {
|
|
578
562
|
return __awaiter(this, void 0, void 0, function* () {
|
|
579
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
563
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
580
564
|
const { id, limit, cursor } = request;
|
|
581
565
|
const _queryParams = {
|
|
582
566
|
limit,
|
|
583
567
|
cursor,
|
|
584
568
|
};
|
|
585
569
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
586
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
590
|
-
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, `users/${core.url.encodePathParam(id)}/following`),
|
|
570
|
+
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);
|
|
571
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
572
|
+
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, `users/${core.url.encodePathParam(id)}/following`),
|
|
591
573
|
method: "GET",
|
|
592
574
|
headers: _headers,
|
|
593
575
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
594
|
-
timeoutMs: ((
|
|
595
|
-
maxRetries: (
|
|
576
|
+
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,
|
|
577
|
+
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,
|
|
596
578
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
597
|
-
fetchFn: (
|
|
579
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
598
580
|
logging: this._options.logging,
|
|
599
581
|
});
|
|
600
582
|
if (_response.ok) {
|
|
@@ -641,21 +623,19 @@ export class UsersClient {
|
|
|
641
623
|
}
|
|
642
624
|
__retrieveFollowing(request, requestOptions) {
|
|
643
625
|
return __awaiter(this, void 0, void 0, function* () {
|
|
644
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
626
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
645
627
|
const { id, subId } = request;
|
|
646
628
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
647
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
651
|
-
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, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
|
|
629
|
+
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);
|
|
630
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
631
|
+
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, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
|
|
652
632
|
method: "GET",
|
|
653
633
|
headers: _headers,
|
|
654
634
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
655
|
-
timeoutMs: ((
|
|
656
|
-
maxRetries: (
|
|
635
|
+
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,
|
|
636
|
+
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,
|
|
657
637
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
658
|
-
fetchFn: (
|
|
638
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
659
639
|
logging: this._options.logging,
|
|
660
640
|
});
|
|
661
641
|
if (_response.ok) {
|
|
@@ -702,21 +682,19 @@ export class UsersClient {
|
|
|
702
682
|
}
|
|
703
683
|
__deleteFollowing(request, requestOptions) {
|
|
704
684
|
return __awaiter(this, void 0, void 0, function* () {
|
|
705
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
685
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
706
686
|
const { id, subId } = request;
|
|
707
687
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
708
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
712
|
-
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, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
|
|
688
|
+
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);
|
|
689
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
690
|
+
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, `users/${core.url.encodePathParam(id)}/following/${core.url.encodePathParam(subId)}`),
|
|
713
691
|
method: "DELETE",
|
|
714
692
|
headers: _headers,
|
|
715
693
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
716
|
-
timeoutMs: ((
|
|
717
|
-
maxRetries: (
|
|
694
|
+
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,
|
|
695
|
+
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,
|
|
718
696
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
719
|
-
fetchFn: (
|
|
697
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
720
698
|
logging: this._options.logging,
|
|
721
699
|
});
|
|
722
700
|
if (_response.ok) {
|
|
@@ -12,7 +12,7 @@ export declare namespace WebhooksClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class WebhooksClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<WebhooksClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: WebhooksClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a paginated list of webhooks. Use cursor for pagination.
|
|
18
18
|
*
|