@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
|
@@ -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 posts
|
|
31
31
|
*/
|
|
32
32
|
export class PostsClient {
|
|
33
|
-
constructor(options) {
|
|
33
|
+
constructor(options = {}) {
|
|
34
34
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -52,7 +52,7 @@ export class PostsClient {
|
|
|
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, userId, sort, search, type: type_ } = request;
|
|
57
57
|
const _queryParams = {
|
|
58
58
|
limit,
|
|
@@ -63,18 +63,16 @@ export class PostsClient {
|
|
|
63
63
|
type: type_ != null ? type_ : undefined,
|
|
64
64
|
};
|
|
65
65
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
66
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
70
|
-
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, "posts"),
|
|
66
|
+
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);
|
|
67
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
68
|
+
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, "posts"),
|
|
71
69
|
method: "GET",
|
|
72
70
|
headers: _headers,
|
|
73
71
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
74
|
-
timeoutMs: ((
|
|
75
|
-
maxRetries: (
|
|
72
|
+
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,
|
|
73
|
+
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,
|
|
76
74
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
77
|
-
fetchFn: (
|
|
75
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
78
76
|
logging: this._options.logging,
|
|
79
77
|
});
|
|
80
78
|
if (_response.ok) {
|
|
@@ -124,23 +122,21 @@ export class PostsClient {
|
|
|
124
122
|
}
|
|
125
123
|
__create(request, requestOptions) {
|
|
126
124
|
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
125
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
128
126
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
129
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
133
|
-
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, "posts"),
|
|
127
|
+
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);
|
|
128
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
129
|
+
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, "posts"),
|
|
134
130
|
method: "POST",
|
|
135
131
|
headers: _headers,
|
|
136
132
|
contentType: "application/json",
|
|
137
133
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
138
134
|
requestType: "json",
|
|
139
135
|
body: request,
|
|
140
|
-
timeoutMs: ((
|
|
141
|
-
maxRetries: (
|
|
136
|
+
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,
|
|
137
|
+
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,
|
|
142
138
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
143
|
-
fetchFn: (
|
|
139
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
144
140
|
logging: this._options.logging,
|
|
145
141
|
});
|
|
146
142
|
if (_response.ok) {
|
|
@@ -191,21 +187,19 @@ export class PostsClient {
|
|
|
191
187
|
}
|
|
192
188
|
__retrieve(request, requestOptions) {
|
|
193
189
|
return __awaiter(this, void 0, void 0, function* () {
|
|
194
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
190
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
195
191
|
const { id } = request;
|
|
196
192
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
197
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
201
|
-
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, `posts/${core.url.encodePathParam(id)}`),
|
|
193
|
+
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);
|
|
194
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
195
|
+
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, `posts/${core.url.encodePathParam(id)}`),
|
|
202
196
|
method: "GET",
|
|
203
197
|
headers: _headers,
|
|
204
198
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
205
|
-
timeoutMs: ((
|
|
206
|
-
maxRetries: (
|
|
199
|
+
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,
|
|
200
|
+
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,
|
|
207
201
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
208
|
-
fetchFn: (
|
|
202
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
209
203
|
logging: this._options.logging,
|
|
210
204
|
});
|
|
211
205
|
if (_response.ok) {
|
|
@@ -256,21 +250,19 @@ export class PostsClient {
|
|
|
256
250
|
}
|
|
257
251
|
__delete(request, requestOptions) {
|
|
258
252
|
return __awaiter(this, void 0, void 0, function* () {
|
|
259
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
253
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
260
254
|
const { id } = request;
|
|
261
255
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
262
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
266
|
-
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, `posts/${core.url.encodePathParam(id)}`),
|
|
256
|
+
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);
|
|
257
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
258
|
+
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, `posts/${core.url.encodePathParam(id)}`),
|
|
267
259
|
method: "DELETE",
|
|
268
260
|
headers: _headers,
|
|
269
261
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
270
|
-
timeoutMs: ((
|
|
271
|
-
maxRetries: (
|
|
262
|
+
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,
|
|
263
|
+
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,
|
|
272
264
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
273
|
-
fetchFn: (
|
|
265
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
274
266
|
logging: this._options.logging,
|
|
275
267
|
});
|
|
276
268
|
if (_response.ok) {
|
|
@@ -322,24 +314,22 @@ export class PostsClient {
|
|
|
322
314
|
}
|
|
323
315
|
__update(request, requestOptions) {
|
|
324
316
|
return __awaiter(this, void 0, void 0, function* () {
|
|
325
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
317
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
326
318
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
327
319
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
328
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
332
|
-
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, `posts/${core.url.encodePathParam(id)}`),
|
|
320
|
+
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);
|
|
321
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
322
|
+
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, `posts/${core.url.encodePathParam(id)}`),
|
|
333
323
|
method: "PATCH",
|
|
334
324
|
headers: _headers,
|
|
335
325
|
contentType: "application/json",
|
|
336
326
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
337
327
|
requestType: "json",
|
|
338
328
|
body: _body,
|
|
339
|
-
timeoutMs: ((
|
|
340
|
-
maxRetries: (
|
|
329
|
+
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,
|
|
330
|
+
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,
|
|
341
331
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
342
|
-
fetchFn: (
|
|
332
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
343
333
|
logging: this._options.logging,
|
|
344
334
|
});
|
|
345
335
|
if (_response.ok) {
|
|
@@ -391,7 +381,7 @@ export class PostsClient {
|
|
|
391
381
|
}
|
|
392
382
|
__listReactions(request, requestOptions) {
|
|
393
383
|
return __awaiter(this, void 0, void 0, function* () {
|
|
394
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
384
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
395
385
|
const { id, limit, cursor, type: type_ } = request;
|
|
396
386
|
const _queryParams = {
|
|
397
387
|
limit,
|
|
@@ -399,18 +389,16 @@ export class PostsClient {
|
|
|
399
389
|
type: type_ != null ? type_ : undefined,
|
|
400
390
|
};
|
|
401
391
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
402
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
406
|
-
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, `posts/${core.url.encodePathParam(id)}/reactions`),
|
|
392
|
+
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);
|
|
393
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
394
|
+
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, `posts/${core.url.encodePathParam(id)}/reactions`),
|
|
407
395
|
method: "GET",
|
|
408
396
|
headers: _headers,
|
|
409
397
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
410
|
-
timeoutMs: ((
|
|
411
|
-
maxRetries: (
|
|
398
|
+
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,
|
|
399
|
+
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,
|
|
412
400
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
413
|
-
fetchFn: (
|
|
401
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
414
402
|
logging: this._options.logging,
|
|
415
403
|
});
|
|
416
404
|
if (_response.ok) {
|
|
@@ -460,24 +448,22 @@ export class PostsClient {
|
|
|
460
448
|
}
|
|
461
449
|
__createReaction(request, requestOptions) {
|
|
462
450
|
return __awaiter(this, void 0, void 0, function* () {
|
|
463
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
451
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
464
452
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
465
453
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
466
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
470
|
-
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, `posts/${core.url.encodePathParam(id)}/reactions`),
|
|
454
|
+
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);
|
|
455
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
456
|
+
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, `posts/${core.url.encodePathParam(id)}/reactions`),
|
|
471
457
|
method: "POST",
|
|
472
458
|
headers: _headers,
|
|
473
459
|
contentType: "application/json",
|
|
474
460
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
475
461
|
requestType: "json",
|
|
476
462
|
body: _body,
|
|
477
|
-
timeoutMs: ((
|
|
478
|
-
maxRetries: (
|
|
463
|
+
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,
|
|
464
|
+
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,
|
|
479
465
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
480
|
-
fetchFn: (
|
|
466
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
481
467
|
logging: this._options.logging,
|
|
482
468
|
});
|
|
483
469
|
if (_response.ok) {
|
|
@@ -526,21 +512,19 @@ export class PostsClient {
|
|
|
526
512
|
}
|
|
527
513
|
__deleteReaction(request, requestOptions) {
|
|
528
514
|
return __awaiter(this, void 0, void 0, function* () {
|
|
529
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
515
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
530
516
|
const { id, subId } = request;
|
|
531
517
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
532
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
536
|
-
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, `posts/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
|
|
518
|
+
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);
|
|
519
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
520
|
+
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, `posts/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
|
|
537
521
|
method: "DELETE",
|
|
538
522
|
headers: _headers,
|
|
539
523
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
540
|
-
timeoutMs: ((
|
|
541
|
-
maxRetries: (
|
|
524
|
+
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,
|
|
525
|
+
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,
|
|
542
526
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
543
|
-
fetchFn: (
|
|
527
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
544
528
|
logging: this._options.logging,
|
|
545
529
|
});
|
|
546
530
|
if (_response.ok) {
|
|
@@ -587,21 +571,19 @@ export class PostsClient {
|
|
|
587
571
|
}
|
|
588
572
|
__retrieveReaction(request, requestOptions) {
|
|
589
573
|
return __awaiter(this, void 0, void 0, function* () {
|
|
590
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
574
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
591
575
|
const { id, subId } = request;
|
|
592
576
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
593
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
597
|
-
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, `posts/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
|
|
577
|
+
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);
|
|
578
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
579
|
+
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, `posts/${core.url.encodePathParam(id)}/reactions/${core.url.encodePathParam(subId)}`),
|
|
598
580
|
method: "GET",
|
|
599
581
|
headers: _headers,
|
|
600
582
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
601
|
-
timeoutMs: ((
|
|
602
|
-
maxRetries: (
|
|
583
|
+
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,
|
|
584
|
+
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,
|
|
603
585
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
604
|
-
fetchFn: (
|
|
586
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
605
587
|
logging: this._options.logging,
|
|
606
588
|
});
|
|
607
589
|
if (_response.ok) {
|
|
@@ -649,7 +631,7 @@ export class PostsClient {
|
|
|
649
631
|
}
|
|
650
632
|
__listPosts(request, requestOptions) {
|
|
651
633
|
return __awaiter(this, void 0, void 0, function* () {
|
|
652
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
634
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
653
635
|
const { id, limit, cursor, userId, sort, search, type: type_ } = request;
|
|
654
636
|
const _queryParams = {
|
|
655
637
|
limit,
|
|
@@ -660,18 +642,16 @@ export class PostsClient {
|
|
|
660
642
|
type: type_ != null ? type_ : undefined,
|
|
661
643
|
};
|
|
662
644
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
663
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
667
|
-
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, `posts/${core.url.encodePathParam(id)}/posts`),
|
|
645
|
+
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);
|
|
646
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
647
|
+
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, `posts/${core.url.encodePathParam(id)}/posts`),
|
|
668
648
|
method: "GET",
|
|
669
649
|
headers: _headers,
|
|
670
650
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
671
|
-
timeoutMs: ((
|
|
672
|
-
maxRetries: (
|
|
651
|
+
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,
|
|
652
|
+
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,
|
|
673
653
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
674
|
-
fetchFn: (
|
|
654
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
675
655
|
logging: this._options.logging,
|
|
676
656
|
});
|
|
677
657
|
if (_response.ok) {
|
|
@@ -718,21 +698,19 @@ export class PostsClient {
|
|
|
718
698
|
}
|
|
719
699
|
__retrievePost(request, requestOptions) {
|
|
720
700
|
return __awaiter(this, void 0, void 0, function* () {
|
|
721
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
701
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
722
702
|
const { id, subId } = request;
|
|
723
703
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
724
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
728
|
-
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, `posts/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
|
|
704
|
+
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);
|
|
705
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
706
|
+
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, `posts/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
|
|
729
707
|
method: "GET",
|
|
730
708
|
headers: _headers,
|
|
731
709
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
732
|
-
timeoutMs: ((
|
|
733
|
-
maxRetries: (
|
|
710
|
+
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,
|
|
711
|
+
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,
|
|
734
712
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
735
|
-
fetchFn: (
|
|
713
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
736
714
|
logging: this._options.logging,
|
|
737
715
|
});
|
|
738
716
|
if (_response.ok) {
|
|
@@ -779,21 +757,19 @@ export class PostsClient {
|
|
|
779
757
|
}
|
|
780
758
|
__deletePost(request, requestOptions) {
|
|
781
759
|
return __awaiter(this, void 0, void 0, function* () {
|
|
782
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
760
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
783
761
|
const { id, subId } = request;
|
|
784
762
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
785
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
789
|
-
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, `posts/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
|
|
763
|
+
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);
|
|
764
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
765
|
+
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, `posts/${core.url.encodePathParam(id)}/posts/${core.url.encodePathParam(subId)}`),
|
|
790
766
|
method: "DELETE",
|
|
791
767
|
headers: _headers,
|
|
792
768
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
793
|
-
timeoutMs: ((
|
|
794
|
-
maxRetries: (
|
|
769
|
+
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,
|
|
770
|
+
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,
|
|
795
771
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
796
|
-
fetchFn: (
|
|
772
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
797
773
|
logging: this._options.logging,
|
|
798
774
|
});
|
|
799
775
|
if (_response.ok) {
|
|
@@ -12,7 +12,7 @@ export declare namespace PrivateMessagesClient {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class PrivateMessagesClient {
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<PrivateMessagesClient.Options>;
|
|
15
|
-
constructor(options
|
|
15
|
+
constructor(options?: PrivateMessagesClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Retrieve a paginated list of private messages. Use cursor for pagination.
|
|
18
18
|
*
|