@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
|
*
|
|
@@ -66,7 +66,7 @@ const Forum = __importStar(require("../../../index.js"));
|
|
|
66
66
|
* Operations for users
|
|
67
67
|
*/
|
|
68
68
|
class UsersClient {
|
|
69
|
-
constructor(options) {
|
|
69
|
+
constructor(options = {}) {
|
|
70
70
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -88,7 +88,7 @@ class UsersClient {
|
|
|
88
88
|
}
|
|
89
89
|
__list() {
|
|
90
90
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
91
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
91
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
92
92
|
const { limit, cursor, search, sort } = request;
|
|
93
93
|
const _queryParams = {
|
|
94
94
|
limit,
|
|
@@ -97,18 +97,16 @@ class UsersClient {
|
|
|
97
97
|
sort: sort != null ? sort : undefined,
|
|
98
98
|
};
|
|
99
99
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
100
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
104
|
-
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"),
|
|
100
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
101
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
102
|
+
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"),
|
|
105
103
|
method: "GET",
|
|
106
104
|
headers: _headers,
|
|
107
105
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
108
|
-
timeoutMs: ((
|
|
109
|
-
maxRetries: (
|
|
106
|
+
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,
|
|
107
|
+
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,
|
|
110
108
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
-
fetchFn: (
|
|
109
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
112
110
|
logging: this._options.logging,
|
|
113
111
|
});
|
|
114
112
|
if (_response.ok) {
|
|
@@ -157,23 +155,21 @@ class UsersClient {
|
|
|
157
155
|
}
|
|
158
156
|
__create(request, requestOptions) {
|
|
159
157
|
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
158
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
161
159
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
162
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
166
|
-
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"),
|
|
160
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
161
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
162
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, "users"),
|
|
167
163
|
method: "POST",
|
|
168
164
|
headers: _headers,
|
|
169
165
|
contentType: "application/json",
|
|
170
166
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
171
167
|
requestType: "json",
|
|
172
168
|
body: request,
|
|
173
|
-
timeoutMs: ((
|
|
174
|
-
maxRetries: (
|
|
169
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
170
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
175
171
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
176
|
-
fetchFn: (
|
|
172
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
177
173
|
logging: this._options.logging,
|
|
178
174
|
});
|
|
179
175
|
if (_response.ok) {
|
|
@@ -224,21 +220,19 @@ class UsersClient {
|
|
|
224
220
|
}
|
|
225
221
|
__retrieve(request, requestOptions) {
|
|
226
222
|
return __awaiter(this, void 0, void 0, function* () {
|
|
227
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
223
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
228
224
|
const { id } = request;
|
|
229
225
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
230
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
234
|
-
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)}`),
|
|
226
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
227
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
228
|
+
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)}`),
|
|
235
229
|
method: "GET",
|
|
236
230
|
headers: _headers,
|
|
237
231
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
238
|
-
timeoutMs: ((
|
|
239
|
-
maxRetries: (
|
|
232
|
+
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,
|
|
233
|
+
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,
|
|
240
234
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
241
|
-
fetchFn: (
|
|
235
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
242
236
|
logging: this._options.logging,
|
|
243
237
|
});
|
|
244
238
|
if (_response.ok) {
|
|
@@ -289,21 +283,19 @@ class UsersClient {
|
|
|
289
283
|
}
|
|
290
284
|
__delete(request, requestOptions) {
|
|
291
285
|
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
286
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
293
287
|
const { id } = request;
|
|
294
288
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
295
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
299
|
-
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)}`),
|
|
289
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
290
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
291
|
+
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)}`),
|
|
300
292
|
method: "DELETE",
|
|
301
293
|
headers: _headers,
|
|
302
294
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
303
|
-
timeoutMs: ((
|
|
304
|
-
maxRetries: (
|
|
295
|
+
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,
|
|
296
|
+
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,
|
|
305
297
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
306
|
-
fetchFn: (
|
|
298
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
307
299
|
logging: this._options.logging,
|
|
308
300
|
});
|
|
309
301
|
if (_response.ok) {
|
|
@@ -355,24 +347,22 @@ class UsersClient {
|
|
|
355
347
|
}
|
|
356
348
|
__update(request, requestOptions) {
|
|
357
349
|
return __awaiter(this, void 0, void 0, function* () {
|
|
358
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
350
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
359
351
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
360
352
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
361
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
365
|
-
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)}`),
|
|
353
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
354
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
355
|
+
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)}`),
|
|
366
356
|
method: "PATCH",
|
|
367
357
|
headers: _headers,
|
|
368
358
|
contentType: "application/json",
|
|
369
359
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
370
360
|
requestType: "json",
|
|
371
361
|
body: _body,
|
|
372
|
-
timeoutMs: ((
|
|
373
|
-
maxRetries: (
|
|
362
|
+
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,
|
|
363
|
+
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,
|
|
374
364
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
375
|
-
fetchFn: (
|
|
365
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
376
366
|
logging: this._options.logging,
|
|
377
367
|
});
|
|
378
368
|
if (_response.ok) {
|
|
@@ -424,25 +414,23 @@ class UsersClient {
|
|
|
424
414
|
}
|
|
425
415
|
__listFollowers(request, requestOptions) {
|
|
426
416
|
return __awaiter(this, void 0, void 0, function* () {
|
|
427
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
417
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
428
418
|
const { id, limit, cursor } = request;
|
|
429
419
|
const _queryParams = {
|
|
430
420
|
limit,
|
|
431
421
|
cursor,
|
|
432
422
|
};
|
|
433
423
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
434
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
438
|
-
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`),
|
|
424
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
425
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
426
|
+
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`),
|
|
439
427
|
method: "GET",
|
|
440
428
|
headers: _headers,
|
|
441
429
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
442
|
-
timeoutMs: ((
|
|
443
|
-
maxRetries: (
|
|
430
|
+
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,
|
|
431
|
+
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,
|
|
444
432
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
445
|
-
fetchFn: (
|
|
433
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
446
434
|
logging: this._options.logging,
|
|
447
435
|
});
|
|
448
436
|
if (_response.ok) {
|
|
@@ -489,21 +477,19 @@ class UsersClient {
|
|
|
489
477
|
}
|
|
490
478
|
__retrieveFollower(request, requestOptions) {
|
|
491
479
|
return __awaiter(this, void 0, void 0, function* () {
|
|
492
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
480
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
493
481
|
const { id, subId } = request;
|
|
494
482
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
495
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
499
|
-
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)}`),
|
|
483
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
484
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
485
|
+
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)}`),
|
|
500
486
|
method: "GET",
|
|
501
487
|
headers: _headers,
|
|
502
488
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
503
|
-
timeoutMs: ((
|
|
504
|
-
maxRetries: (
|
|
489
|
+
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,
|
|
490
|
+
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,
|
|
505
491
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
506
|
-
fetchFn: (
|
|
492
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
507
493
|
logging: this._options.logging,
|
|
508
494
|
});
|
|
509
495
|
if (_response.ok) {
|
|
@@ -550,21 +536,19 @@ class UsersClient {
|
|
|
550
536
|
}
|
|
551
537
|
__deleteFollower(request, requestOptions) {
|
|
552
538
|
return __awaiter(this, void 0, void 0, function* () {
|
|
553
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
539
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
554
540
|
const { id, subId } = request;
|
|
555
541
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
556
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
560
|
-
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)}`),
|
|
542
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
543
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
544
|
+
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)}`),
|
|
561
545
|
method: "DELETE",
|
|
562
546
|
headers: _headers,
|
|
563
547
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
564
|
-
timeoutMs: ((
|
|
565
|
-
maxRetries: (
|
|
548
|
+
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,
|
|
549
|
+
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,
|
|
566
550
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
567
|
-
fetchFn: (
|
|
551
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
568
552
|
logging: this._options.logging,
|
|
569
553
|
});
|
|
570
554
|
if (_response.ok) {
|
|
@@ -612,25 +596,23 @@ class UsersClient {
|
|
|
612
596
|
}
|
|
613
597
|
__listFollowing(request, requestOptions) {
|
|
614
598
|
return __awaiter(this, void 0, void 0, function* () {
|
|
615
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
599
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
616
600
|
const { id, limit, cursor } = request;
|
|
617
601
|
const _queryParams = {
|
|
618
602
|
limit,
|
|
619
603
|
cursor,
|
|
620
604
|
};
|
|
621
605
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
622
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
626
|
-
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`),
|
|
606
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
607
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
608
|
+
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`),
|
|
627
609
|
method: "GET",
|
|
628
610
|
headers: _headers,
|
|
629
611
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
630
|
-
timeoutMs: ((
|
|
631
|
-
maxRetries: (
|
|
612
|
+
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,
|
|
613
|
+
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,
|
|
632
614
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
633
|
-
fetchFn: (
|
|
615
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
634
616
|
logging: this._options.logging,
|
|
635
617
|
});
|
|
636
618
|
if (_response.ok) {
|
|
@@ -677,21 +659,19 @@ class UsersClient {
|
|
|
677
659
|
}
|
|
678
660
|
__retrieveFollowing(request, requestOptions) {
|
|
679
661
|
return __awaiter(this, void 0, void 0, function* () {
|
|
680
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
662
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
681
663
|
const { id, subId } = request;
|
|
682
664
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
683
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
687
|
-
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)}`),
|
|
665
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
666
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
667
|
+
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)}`),
|
|
688
668
|
method: "GET",
|
|
689
669
|
headers: _headers,
|
|
690
670
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
691
|
-
timeoutMs: ((
|
|
692
|
-
maxRetries: (
|
|
671
|
+
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,
|
|
672
|
+
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,
|
|
693
673
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
694
|
-
fetchFn: (
|
|
674
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
695
675
|
logging: this._options.logging,
|
|
696
676
|
});
|
|
697
677
|
if (_response.ok) {
|
|
@@ -738,21 +718,19 @@ class UsersClient {
|
|
|
738
718
|
}
|
|
739
719
|
__deleteFollowing(request, requestOptions) {
|
|
740
720
|
return __awaiter(this, void 0, void 0, function* () {
|
|
741
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
721
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
742
722
|
const { id, subId } = request;
|
|
743
723
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
744
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
748
|
-
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)}`),
|
|
724
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
725
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
726
|
+
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)}`),
|
|
749
727
|
method: "DELETE",
|
|
750
728
|
headers: _headers,
|
|
751
729
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
752
|
-
timeoutMs: ((
|
|
753
|
-
maxRetries: (
|
|
730
|
+
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,
|
|
731
|
+
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,
|
|
754
732
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
755
|
-
fetchFn: (
|
|
733
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
756
734
|
logging: this._options.logging,
|
|
757
735
|
});
|
|
758
736
|
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
|
*
|