@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 webhooks
|
|
31
31
|
*/
|
|
32
32
|
export class WebhooksClient {
|
|
33
|
-
constructor(options) {
|
|
33
|
+
constructor(options = {}) {
|
|
34
34
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -54,25 +54,23 @@ export class WebhooksClient {
|
|
|
54
54
|
}
|
|
55
55
|
__list() {
|
|
56
56
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
57
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
57
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
58
58
|
const { limit, cursor } = request;
|
|
59
59
|
const _queryParams = {
|
|
60
60
|
limit,
|
|
61
61
|
cursor,
|
|
62
62
|
};
|
|
63
63
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
64
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
68
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ForumEnvironment.Production, "webhooks"),
|
|
64
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
65
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
66
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, "webhooks"),
|
|
69
67
|
method: "GET",
|
|
70
68
|
headers: _headers,
|
|
71
69
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
72
|
-
timeoutMs: ((
|
|
73
|
-
maxRetries: (
|
|
70
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
71
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
74
72
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
75
|
-
fetchFn: (
|
|
73
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
76
74
|
logging: this._options.logging,
|
|
77
75
|
});
|
|
78
76
|
if (_response.ok) {
|
|
@@ -125,23 +123,21 @@ export class WebhooksClient {
|
|
|
125
123
|
}
|
|
126
124
|
__create(request, requestOptions) {
|
|
127
125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
126
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
129
127
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
130
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
134
|
-
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, "webhooks"),
|
|
128
|
+
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);
|
|
129
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
130
|
+
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, "webhooks"),
|
|
135
131
|
method: "POST",
|
|
136
132
|
headers: _headers,
|
|
137
133
|
contentType: "application/json",
|
|
138
134
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
139
135
|
requestType: "json",
|
|
140
136
|
body: request,
|
|
141
|
-
timeoutMs: ((
|
|
142
|
-
maxRetries: (
|
|
137
|
+
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,
|
|
138
|
+
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,
|
|
143
139
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
144
|
-
fetchFn: (
|
|
140
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
145
141
|
logging: this._options.logging,
|
|
146
142
|
});
|
|
147
143
|
if (_response.ok) {
|
|
@@ -194,21 +190,19 @@ export class WebhooksClient {
|
|
|
194
190
|
}
|
|
195
191
|
__retrieve(request, requestOptions) {
|
|
196
192
|
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
193
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
198
194
|
const { id } = request;
|
|
199
195
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
200
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
204
|
-
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
196
|
+
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);
|
|
197
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
198
|
+
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
205
199
|
method: "GET",
|
|
206
200
|
headers: _headers,
|
|
207
201
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
208
|
-
timeoutMs: ((
|
|
209
|
-
maxRetries: (
|
|
202
|
+
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,
|
|
203
|
+
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,
|
|
210
204
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
211
|
-
fetchFn: (
|
|
205
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
212
206
|
logging: this._options.logging,
|
|
213
207
|
});
|
|
214
208
|
if (_response.ok) {
|
|
@@ -261,21 +255,19 @@ export class WebhooksClient {
|
|
|
261
255
|
}
|
|
262
256
|
__delete(request, requestOptions) {
|
|
263
257
|
return __awaiter(this, void 0, void 0, function* () {
|
|
264
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
258
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
265
259
|
const { id } = request;
|
|
266
260
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
267
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
271
|
-
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
261
|
+
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);
|
|
262
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
263
|
+
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
272
264
|
method: "DELETE",
|
|
273
265
|
headers: _headers,
|
|
274
266
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
275
|
-
timeoutMs: ((
|
|
276
|
-
maxRetries: (
|
|
267
|
+
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,
|
|
268
|
+
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,
|
|
277
269
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
278
|
-
fetchFn: (
|
|
270
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
279
271
|
logging: this._options.logging,
|
|
280
272
|
});
|
|
281
273
|
if (_response.ok) {
|
|
@@ -329,24 +321,22 @@ export class WebhooksClient {
|
|
|
329
321
|
}
|
|
330
322
|
__update(request, requestOptions) {
|
|
331
323
|
return __awaiter(this, void 0, void 0, function* () {
|
|
332
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
324
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
333
325
|
const { id } = request, _body = __rest(request, ["id"]);
|
|
334
326
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
335
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
339
|
-
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
327
|
+
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);
|
|
328
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
329
|
+
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, `webhooks/${core.url.encodePathParam(id)}`),
|
|
340
330
|
method: "PATCH",
|
|
341
331
|
headers: _headers,
|
|
342
332
|
contentType: "application/json",
|
|
343
333
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
344
334
|
requestType: "json",
|
|
345
335
|
body: _body,
|
|
346
|
-
timeoutMs: ((
|
|
347
|
-
maxRetries: (
|
|
336
|
+
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,
|
|
337
|
+
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,
|
|
348
338
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
349
|
-
fetchFn: (
|
|
339
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
350
340
|
logging: this._options.logging,
|
|
351
341
|
});
|
|
352
342
|
if (_response.ok) {
|
|
@@ -400,25 +390,23 @@ export class WebhooksClient {
|
|
|
400
390
|
}
|
|
401
391
|
__listDeliveries(request, requestOptions) {
|
|
402
392
|
return __awaiter(this, void 0, void 0, function* () {
|
|
403
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
393
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
404
394
|
const { id, cursor, limit } = request;
|
|
405
395
|
const _queryParams = {
|
|
406
396
|
cursor,
|
|
407
397
|
limit,
|
|
408
398
|
};
|
|
409
399
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
410
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
414
|
-
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, `webhooks/${core.url.encodePathParam(id)}/deliveries`),
|
|
400
|
+
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);
|
|
401
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
402
|
+
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, `webhooks/${core.url.encodePathParam(id)}/deliveries`),
|
|
415
403
|
method: "GET",
|
|
416
404
|
headers: _headers,
|
|
417
405
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
418
|
-
timeoutMs: ((
|
|
419
|
-
maxRetries: (
|
|
406
|
+
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,
|
|
407
|
+
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,
|
|
420
408
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
421
|
-
fetchFn: (
|
|
409
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
422
410
|
logging: this._options.logging,
|
|
423
411
|
});
|
|
424
412
|
if (_response.ok) {
|
|
@@ -465,21 +453,19 @@ export class WebhooksClient {
|
|
|
465
453
|
}
|
|
466
454
|
__retrieveDelivery(request, requestOptions) {
|
|
467
455
|
return __awaiter(this, void 0, void 0, function* () {
|
|
468
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
456
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
469
457
|
const { id, subId } = request;
|
|
470
458
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
471
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
475
|
-
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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
|
|
459
|
+
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);
|
|
460
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
461
|
+
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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
|
|
476
462
|
method: "GET",
|
|
477
463
|
headers: _headers,
|
|
478
464
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
479
|
-
timeoutMs: ((
|
|
480
|
-
maxRetries: (
|
|
465
|
+
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,
|
|
466
|
+
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,
|
|
481
467
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
482
|
-
fetchFn: (
|
|
468
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
483
469
|
logging: this._options.logging,
|
|
484
470
|
});
|
|
485
471
|
if (_response.ok) {
|
|
@@ -529,21 +515,19 @@ export class WebhooksClient {
|
|
|
529
515
|
}
|
|
530
516
|
__deleteDelivery(request, requestOptions) {
|
|
531
517
|
return __awaiter(this, void 0, void 0, function* () {
|
|
532
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
518
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
533
519
|
const { id, subId } = request;
|
|
534
520
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
535
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
539
|
-
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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
|
|
521
|
+
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);
|
|
522
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
523
|
+
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, `webhooks/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(subId)}`),
|
|
540
524
|
method: "DELETE",
|
|
541
525
|
headers: _headers,
|
|
542
526
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
543
|
-
timeoutMs: ((
|
|
544
|
-
maxRetries: (
|
|
527
|
+
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,
|
|
528
|
+
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,
|
|
545
529
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
546
|
-
fetchFn: (
|
|
530
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
547
531
|
logging: this._options.logging,
|
|
548
532
|
});
|
|
549
533
|
if (_response.ok) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface OwnershipInfo {
|
|
2
|
+
handle: string;
|
|
3
|
+
owner: OwnershipInfo.Owner;
|
|
4
|
+
creator: OwnershipInfo.Creator;
|
|
5
|
+
isCurrentUserOwner: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare namespace OwnershipInfo {
|
|
8
|
+
interface Owner {
|
|
9
|
+
id: string;
|
|
10
|
+
email: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
}
|
|
13
|
+
interface Creator {
|
|
14
|
+
id: string;
|
|
15
|
+
email: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from "./Auth.mjs";
|
|
|
2
2
|
export * from "./AuthListResponse.mjs";
|
|
3
3
|
export * from "./AuthResponse.mjs";
|
|
4
4
|
export * from "./BillingInfo.mjs";
|
|
5
|
+
export * from "./ConflictErrorBody.mjs";
|
|
5
6
|
export * from "./ErrorResponse.mjs";
|
|
6
7
|
export * from "./ForgotPasswordResponse.mjs";
|
|
7
8
|
export * from "./Instance.mjs";
|
|
@@ -22,6 +23,7 @@ export * from "./NotificationList.mjs";
|
|
|
22
23
|
export * from "./NotificationListResponse.mjs";
|
|
23
24
|
export * from "./NotificationResponse.mjs";
|
|
24
25
|
export * from "./NotificationUpdate.mjs";
|
|
26
|
+
export * from "./OwnershipInfo.mjs";
|
|
25
27
|
export * from "./Post.mjs";
|
|
26
28
|
export * from "./PostCreate.mjs";
|
|
27
29
|
export * from "./PostList.mjs";
|
|
@@ -45,6 +47,7 @@ export * from "./PrivateMessageReplyListResponse.mjs";
|
|
|
45
47
|
export * from "./PrivateMessageReplyResponse.mjs";
|
|
46
48
|
export * from "./PrivateMessageResponse.mjs";
|
|
47
49
|
export * from "./PrivateMessageUpdate.mjs";
|
|
50
|
+
export * from "./ProvisioningAuthResponse.mjs";
|
|
48
51
|
export * from "./RegisterResponse.mjs";
|
|
49
52
|
export * from "./Report.mjs";
|
|
50
53
|
export * from "./ReportCreate.mjs";
|
|
@@ -2,6 +2,7 @@ export * from "./Auth.mjs";
|
|
|
2
2
|
export * from "./AuthListResponse.mjs";
|
|
3
3
|
export * from "./AuthResponse.mjs";
|
|
4
4
|
export * from "./BillingInfo.mjs";
|
|
5
|
+
export * from "./ConflictErrorBody.mjs";
|
|
5
6
|
export * from "./ErrorResponse.mjs";
|
|
6
7
|
export * from "./ForgotPasswordResponse.mjs";
|
|
7
8
|
export * from "./Instance.mjs";
|
|
@@ -22,6 +23,7 @@ export * from "./NotificationList.mjs";
|
|
|
22
23
|
export * from "./NotificationListResponse.mjs";
|
|
23
24
|
export * from "./NotificationResponse.mjs";
|
|
24
25
|
export * from "./NotificationUpdate.mjs";
|
|
26
|
+
export * from "./OwnershipInfo.mjs";
|
|
25
27
|
export * from "./Post.mjs";
|
|
26
28
|
export * from "./PostCreate.mjs";
|
|
27
29
|
export * from "./PostList.mjs";
|
|
@@ -45,6 +47,7 @@ export * from "./PrivateMessageReplyListResponse.mjs";
|
|
|
45
47
|
export * from "./PrivateMessageReplyResponse.mjs";
|
|
46
48
|
export * from "./PrivateMessageResponse.mjs";
|
|
47
49
|
export * from "./PrivateMessageUpdate.mjs";
|
|
50
|
+
export * from "./ProvisioningAuthResponse.mjs";
|
|
48
51
|
export * from "./RegisterResponse.mjs";
|
|
49
52
|
export * from "./Report.mjs";
|
|
50
53
|
export * from "./ReportCreate.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.1.
|
|
1
|
+
export declare const SDK_VERSION = "2.1.6";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "2.1.
|
|
1
|
+
export const SDK_VERSION = "2.1.6";
|