@foru-ms/sdk 2.1.14 → 2.1.16
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/tags/client/Client.d.ts +37 -0
- package/dist/cjs/api/resources/tags/client/Client.js +126 -0
- package/dist/cjs/api/resources/tags/client/requests/CreateSubscriberTagsRequest.d.ts +12 -0
- package/dist/cjs/api/resources/tags/client/requests/CreateSubscriberTagsRequest.js +3 -0
- package/dist/cjs/api/resources/tags/client/requests/UnsubscribeTagsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/tags/client/requests/UnsubscribeTagsRequest.js +3 -0
- package/dist/cjs/api/resources/tags/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/tags/types/UnsubscribeTagsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/tags/types/UnsubscribeTagsResponse.js +3 -0
- package/dist/cjs/api/resources/tags/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/tags/types/index.js +1 -0
- package/dist/cjs/api/resources/threads/client/Client.d.ts +73 -0
- package/dist/cjs/api/resources/threads/client/Client.js +249 -0
- package/dist/cjs/api/resources/threads/client/requests/CreatePollVoteThreadsRequest.d.ts +15 -0
- package/dist/cjs/api/resources/threads/client/requests/CreatePollVoteThreadsRequest.js +3 -0
- package/dist/cjs/api/resources/threads/client/requests/DeleteOwnPollVoteThreadsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/threads/client/requests/DeleteOwnPollVoteThreadsRequest.js +3 -0
- package/dist/cjs/api/resources/threads/client/requests/DeletePollVoteThreadsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/threads/client/requests/DeletePollVoteThreadsRequest.js +3 -0
- package/dist/cjs/api/resources/threads/client/requests/UnsubscribeThreadsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/threads/client/requests/UnsubscribeThreadsRequest.js +3 -0
- package/dist/cjs/api/resources/threads/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/threads/types/DeleteOwnPollVoteThreadsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/threads/types/DeleteOwnPollVoteThreadsResponse.js +3 -0
- package/dist/cjs/api/resources/threads/types/UnsubscribeThreadsResponse.d.ts +8 -0
- package/dist/cjs/api/resources/threads/types/UnsubscribeThreadsResponse.js +3 -0
- package/dist/cjs/api/resources/threads/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/threads/types/index.js +2 -0
- package/dist/cjs/api/types/PollVoteResponse.d.ts +12 -0
- package/dist/cjs/api/types/PollVoteResponse.js +3 -0
- package/dist/cjs/api/types/TagSubscriberCreate.d.ts +4 -0
- package/dist/cjs/api/types/TagSubscriberCreate.js +3 -0
- package/dist/cjs/api/types/index.d.ts +2 -0
- package/dist/cjs/api/types/index.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/tags/client/Client.d.mts +37 -0
- package/dist/esm/api/resources/tags/client/Client.mjs +126 -0
- package/dist/esm/api/resources/tags/client/requests/CreateSubscriberTagsRequest.d.mts +12 -0
- package/dist/esm/api/resources/tags/client/requests/CreateSubscriberTagsRequest.mjs +2 -0
- package/dist/esm/api/resources/tags/client/requests/UnsubscribeTagsRequest.d.mts +10 -0
- package/dist/esm/api/resources/tags/client/requests/UnsubscribeTagsRequest.mjs +2 -0
- package/dist/esm/api/resources/tags/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/tags/types/UnsubscribeTagsResponse.d.mts +8 -0
- package/dist/esm/api/resources/tags/types/UnsubscribeTagsResponse.mjs +2 -0
- package/dist/esm/api/resources/tags/types/index.d.mts +1 -0
- package/dist/esm/api/resources/tags/types/index.mjs +1 -0
- package/dist/esm/api/resources/threads/client/Client.d.mts +73 -0
- package/dist/esm/api/resources/threads/client/Client.mjs +249 -0
- package/dist/esm/api/resources/threads/client/requests/CreatePollVoteThreadsRequest.d.mts +15 -0
- package/dist/esm/api/resources/threads/client/requests/CreatePollVoteThreadsRequest.mjs +2 -0
- package/dist/esm/api/resources/threads/client/requests/DeleteOwnPollVoteThreadsRequest.d.mts +10 -0
- package/dist/esm/api/resources/threads/client/requests/DeleteOwnPollVoteThreadsRequest.mjs +2 -0
- package/dist/esm/api/resources/threads/client/requests/DeletePollVoteThreadsRequest.d.mts +13 -0
- package/dist/esm/api/resources/threads/client/requests/DeletePollVoteThreadsRequest.mjs +2 -0
- package/dist/esm/api/resources/threads/client/requests/UnsubscribeThreadsRequest.d.mts +10 -0
- package/dist/esm/api/resources/threads/client/requests/UnsubscribeThreadsRequest.mjs +2 -0
- package/dist/esm/api/resources/threads/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/threads/types/DeleteOwnPollVoteThreadsResponse.d.mts +8 -0
- package/dist/esm/api/resources/threads/types/DeleteOwnPollVoteThreadsResponse.mjs +2 -0
- package/dist/esm/api/resources/threads/types/UnsubscribeThreadsResponse.d.mts +8 -0
- package/dist/esm/api/resources/threads/types/UnsubscribeThreadsResponse.mjs +2 -0
- package/dist/esm/api/resources/threads/types/index.d.mts +2 -0
- package/dist/esm/api/resources/threads/types/index.mjs +2 -0
- package/dist/esm/api/types/PollVoteResponse.d.mts +12 -0
- package/dist/esm/api/types/PollVoteResponse.mjs +2 -0
- package/dist/esm/api/types/TagSubscriberCreate.d.mts +4 -0
- package/dist/esm/api/types/TagSubscriberCreate.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +2 -0
- package/dist/esm/api/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +378 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@foru-ms/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "2.1.
|
|
47
|
-
"User-Agent": "@foru-ms/sdk/2.1.
|
|
46
|
+
"X-Fern-SDK-Version": "2.1.16",
|
|
47
|
+
"User-Agent": "@foru-ms/sdk/2.1.16",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -124,6 +124,43 @@ export declare class TagsClient {
|
|
|
124
124
|
*/
|
|
125
125
|
listSubscribers(request: Forum.ListSubscribersTagsRequest, requestOptions?: TagsClient.RequestOptions): core.HttpResponsePromise<Forum.TagSubscriberListResponse>;
|
|
126
126
|
private __listSubscribers;
|
|
127
|
+
/**
|
|
128
|
+
* Create a Subscriber in Tag.
|
|
129
|
+
*
|
|
130
|
+
* @param {Forum.CreateSubscriberTagsRequest} request
|
|
131
|
+
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
132
|
+
*
|
|
133
|
+
* @throws {@link Forum.BadRequestError}
|
|
134
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
135
|
+
* @throws {@link Forum.NotFoundError}
|
|
136
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
137
|
+
* @throws {@link Forum.InternalServerError}
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* await client.tags.createSubscriber({
|
|
141
|
+
* id: "id"
|
|
142
|
+
* })
|
|
143
|
+
*/
|
|
144
|
+
createSubscriber(request: Forum.CreateSubscriberTagsRequest, requestOptions?: TagsClient.RequestOptions): core.HttpResponsePromise<Forum.TagSubscriberResponse>;
|
|
145
|
+
private __createSubscriber;
|
|
146
|
+
/**
|
|
147
|
+
* Unsubscribe from this tag. Removes the authenticated user's subscription. No subId needed.
|
|
148
|
+
*
|
|
149
|
+
* @param {Forum.UnsubscribeTagsRequest} request
|
|
150
|
+
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
151
|
+
*
|
|
152
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
153
|
+
* @throws {@link Forum.NotFoundError}
|
|
154
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
155
|
+
* @throws {@link Forum.InternalServerError}
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* await client.tags.unsubscribe({
|
|
159
|
+
* id: "id"
|
|
160
|
+
* })
|
|
161
|
+
*/
|
|
162
|
+
unsubscribe(request: Forum.UnsubscribeTagsRequest, requestOptions?: TagsClient.RequestOptions): core.HttpResponsePromise<Forum.UnsubscribeTagsResponse>;
|
|
163
|
+
private __unsubscribe;
|
|
127
164
|
/**
|
|
128
165
|
* @param {Forum.RetrieveSubscriberTagsRequest} request
|
|
129
166
|
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -456,6 +456,132 @@ class TagsClient {
|
|
|
456
456
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/tags/{id}/subscribers");
|
|
457
457
|
});
|
|
458
458
|
}
|
|
459
|
+
/**
|
|
460
|
+
* Create a Subscriber in Tag.
|
|
461
|
+
*
|
|
462
|
+
* @param {Forum.CreateSubscriberTagsRequest} request
|
|
463
|
+
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
464
|
+
*
|
|
465
|
+
* @throws {@link Forum.BadRequestError}
|
|
466
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
467
|
+
* @throws {@link Forum.NotFoundError}
|
|
468
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
469
|
+
* @throws {@link Forum.InternalServerError}
|
|
470
|
+
*
|
|
471
|
+
* @example
|
|
472
|
+
* await client.tags.createSubscriber({
|
|
473
|
+
* id: "id"
|
|
474
|
+
* })
|
|
475
|
+
*/
|
|
476
|
+
createSubscriber(request, requestOptions) {
|
|
477
|
+
return core.HttpResponsePromise.fromPromise(this.__createSubscriber(request, requestOptions));
|
|
478
|
+
}
|
|
479
|
+
__createSubscriber(request, requestOptions) {
|
|
480
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
481
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
482
|
+
const { id } = request, _body = __rest(request, ["id"]);
|
|
483
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
484
|
+
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);
|
|
485
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
486
|
+
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, `tags/${core.url.encodePathParam(id)}/subscribers`),
|
|
487
|
+
method: "POST",
|
|
488
|
+
headers: _headers,
|
|
489
|
+
contentType: "application/json",
|
|
490
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
491
|
+
requestType: "json",
|
|
492
|
+
body: _body,
|
|
493
|
+
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,
|
|
494
|
+
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,
|
|
495
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
496
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
497
|
+
logging: this._options.logging,
|
|
498
|
+
});
|
|
499
|
+
if (_response.ok) {
|
|
500
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
501
|
+
}
|
|
502
|
+
if (_response.error.reason === "status-code") {
|
|
503
|
+
switch (_response.error.statusCode) {
|
|
504
|
+
case 400:
|
|
505
|
+
throw new Forum.BadRequestError(_response.error.body, _response.rawResponse);
|
|
506
|
+
case 401:
|
|
507
|
+
throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
508
|
+
case 404:
|
|
509
|
+
throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
|
|
510
|
+
case 429:
|
|
511
|
+
throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
512
|
+
case 500:
|
|
513
|
+
throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
|
|
514
|
+
default:
|
|
515
|
+
throw new errors.ForumError({
|
|
516
|
+
statusCode: _response.error.statusCode,
|
|
517
|
+
body: _response.error.body,
|
|
518
|
+
rawResponse: _response.rawResponse,
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/tags/{id}/subscribers");
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Unsubscribe from this tag. Removes the authenticated user's subscription. No subId needed.
|
|
527
|
+
*
|
|
528
|
+
* @param {Forum.UnsubscribeTagsRequest} request
|
|
529
|
+
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
530
|
+
*
|
|
531
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
532
|
+
* @throws {@link Forum.NotFoundError}
|
|
533
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
534
|
+
* @throws {@link Forum.InternalServerError}
|
|
535
|
+
*
|
|
536
|
+
* @example
|
|
537
|
+
* await client.tags.unsubscribe({
|
|
538
|
+
* id: "id"
|
|
539
|
+
* })
|
|
540
|
+
*/
|
|
541
|
+
unsubscribe(request, requestOptions) {
|
|
542
|
+
return core.HttpResponsePromise.fromPromise(this.__unsubscribe(request, requestOptions));
|
|
543
|
+
}
|
|
544
|
+
__unsubscribe(request, requestOptions) {
|
|
545
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
546
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
547
|
+
const { id } = request;
|
|
548
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
549
|
+
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);
|
|
550
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
551
|
+
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, `tags/${core.url.encodePathParam(id)}/subscribers`),
|
|
552
|
+
method: "DELETE",
|
|
553
|
+
headers: _headers,
|
|
554
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
555
|
+
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,
|
|
556
|
+
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,
|
|
557
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
558
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
559
|
+
logging: this._options.logging,
|
|
560
|
+
});
|
|
561
|
+
if (_response.ok) {
|
|
562
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
563
|
+
}
|
|
564
|
+
if (_response.error.reason === "status-code") {
|
|
565
|
+
switch (_response.error.statusCode) {
|
|
566
|
+
case 401:
|
|
567
|
+
throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
568
|
+
case 404:
|
|
569
|
+
throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
|
|
570
|
+
case 429:
|
|
571
|
+
throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
572
|
+
case 500:
|
|
573
|
+
throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
|
|
574
|
+
default:
|
|
575
|
+
throw new errors.ForumError({
|
|
576
|
+
statusCode: _response.error.statusCode,
|
|
577
|
+
body: _response.error.body,
|
|
578
|
+
rawResponse: _response.rawResponse,
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/tags/{id}/subscribers");
|
|
583
|
+
});
|
|
584
|
+
}
|
|
459
585
|
/**
|
|
460
586
|
* @param {Forum.RetrieveSubscriberTagsRequest} request
|
|
461
587
|
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { CreateSubscriberTagsRequest } from "./CreateSubscriberTagsRequest.js";
|
|
1
2
|
export type { CreateTagsRequest } from "./CreateTagsRequest.js";
|
|
2
3
|
export type { DeleteSubscriberTagsRequest } from "./DeleteSubscriberTagsRequest.js";
|
|
3
4
|
export type { DeleteTagsRequest } from "./DeleteTagsRequest.js";
|
|
@@ -5,4 +6,5 @@ export type { ListSubscribersTagsRequest } from "./ListSubscribersTagsRequest.js
|
|
|
5
6
|
export type { ListTagsRequest } from "./ListTagsRequest.js";
|
|
6
7
|
export type { RetrieveSubscriberTagsRequest } from "./RetrieveSubscriberTagsRequest.js";
|
|
7
8
|
export type { RetrieveTagsRequest } from "./RetrieveTagsRequest.js";
|
|
9
|
+
export type { UnsubscribeTagsRequest } from "./UnsubscribeTagsRequest.js";
|
|
8
10
|
export type { UpdateTagsRequest } from "./UpdateTagsRequest.js";
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./RetrieveSubscriberTagsResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./UnsubscribeTagsResponse.js"), exports);
|
|
18
19
|
__exportStar(require("./UpdateTagsResponse.js"), exports);
|
|
@@ -249,6 +249,24 @@ export declare class ThreadsClient {
|
|
|
249
249
|
*/
|
|
250
250
|
listSubscribers(request: Forum.ListSubscribersThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<Forum.ThreadSubscriberListResponse>;
|
|
251
251
|
private __listSubscribers;
|
|
252
|
+
/**
|
|
253
|
+
* Unsubscribe from this thread. Removes the authenticated user's subscription. No subId needed.
|
|
254
|
+
*
|
|
255
|
+
* @param {Forum.UnsubscribeThreadsRequest} request
|
|
256
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
257
|
+
*
|
|
258
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
259
|
+
* @throws {@link Forum.NotFoundError}
|
|
260
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
261
|
+
* @throws {@link Forum.InternalServerError}
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* await client.threads.unsubscribe({
|
|
265
|
+
* id: "id"
|
|
266
|
+
* })
|
|
267
|
+
*/
|
|
268
|
+
unsubscribe(request: Forum.UnsubscribeThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<Forum.UnsubscribeThreadsResponse>;
|
|
269
|
+
private __unsubscribe;
|
|
252
270
|
/**
|
|
253
271
|
* @param {Forum.RetrieveSubscriberThreadsRequest} request
|
|
254
272
|
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -337,4 +355,59 @@ export declare class ThreadsClient {
|
|
|
337
355
|
*/
|
|
338
356
|
updatePoll(request: Forum.UpdatePollThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<Forum.ThreadPollResponse>;
|
|
339
357
|
private __updatePoll;
|
|
358
|
+
/**
|
|
359
|
+
* Create a Vote in the Thread's Poll.
|
|
360
|
+
*
|
|
361
|
+
* @param {Forum.CreatePollVoteThreadsRequest} request
|
|
362
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
363
|
+
*
|
|
364
|
+
* @throws {@link Forum.BadRequestError}
|
|
365
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
366
|
+
* @throws {@link Forum.NotFoundError}
|
|
367
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
368
|
+
* @throws {@link Forum.InternalServerError}
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* await client.threads.createPollVote({
|
|
372
|
+
* id: "id",
|
|
373
|
+
* optionId: "optionId"
|
|
374
|
+
* })
|
|
375
|
+
*/
|
|
376
|
+
createPollVote(request: Forum.CreatePollVoteThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<Forum.PollVoteResponse>;
|
|
377
|
+
private __createPollVote;
|
|
378
|
+
/**
|
|
379
|
+
* Removes the authenticated user's Vote. No ID needed.
|
|
380
|
+
*
|
|
381
|
+
* @param {Forum.DeleteOwnPollVoteThreadsRequest} request
|
|
382
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
383
|
+
*
|
|
384
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
385
|
+
* @throws {@link Forum.NotFoundError}
|
|
386
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
387
|
+
* @throws {@link Forum.InternalServerError}
|
|
388
|
+
*
|
|
389
|
+
* @example
|
|
390
|
+
* await client.threads.deleteOwnPollVote({
|
|
391
|
+
* id: "id"
|
|
392
|
+
* })
|
|
393
|
+
*/
|
|
394
|
+
deleteOwnPollVote(request: Forum.DeleteOwnPollVoteThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<Forum.DeleteOwnPollVoteThreadsResponse>;
|
|
395
|
+
private __deleteOwnPollVote;
|
|
396
|
+
/**
|
|
397
|
+
* @param {Forum.DeletePollVoteThreadsRequest} request
|
|
398
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
399
|
+
*
|
|
400
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
401
|
+
* @throws {@link Forum.NotFoundError}
|
|
402
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
403
|
+
* @throws {@link Forum.InternalServerError}
|
|
404
|
+
*
|
|
405
|
+
* @example
|
|
406
|
+
* await client.threads.deletePollVote({
|
|
407
|
+
* id: "id",
|
|
408
|
+
* nestedId: "nestedId"
|
|
409
|
+
* })
|
|
410
|
+
*/
|
|
411
|
+
deletePollVote(request: Forum.DeletePollVoteThreadsRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
|
|
412
|
+
private __deletePollVote;
|
|
340
413
|
}
|
|
@@ -899,6 +899,66 @@ class ThreadsClient {
|
|
|
899
899
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/threads/{id}/subscribers");
|
|
900
900
|
});
|
|
901
901
|
}
|
|
902
|
+
/**
|
|
903
|
+
* Unsubscribe from this thread. Removes the authenticated user's subscription. No subId needed.
|
|
904
|
+
*
|
|
905
|
+
* @param {Forum.UnsubscribeThreadsRequest} request
|
|
906
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
907
|
+
*
|
|
908
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
909
|
+
* @throws {@link Forum.NotFoundError}
|
|
910
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
911
|
+
* @throws {@link Forum.InternalServerError}
|
|
912
|
+
*
|
|
913
|
+
* @example
|
|
914
|
+
* await client.threads.unsubscribe({
|
|
915
|
+
* id: "id"
|
|
916
|
+
* })
|
|
917
|
+
*/
|
|
918
|
+
unsubscribe(request, requestOptions) {
|
|
919
|
+
return core.HttpResponsePromise.fromPromise(this.__unsubscribe(request, requestOptions));
|
|
920
|
+
}
|
|
921
|
+
__unsubscribe(request, requestOptions) {
|
|
922
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
923
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
924
|
+
const { id } = request;
|
|
925
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
926
|
+
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);
|
|
927
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
928
|
+
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, `threads/${core.url.encodePathParam(id)}/subscribers`),
|
|
929
|
+
method: "DELETE",
|
|
930
|
+
headers: _headers,
|
|
931
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
932
|
+
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,
|
|
933
|
+
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,
|
|
934
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
935
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
936
|
+
logging: this._options.logging,
|
|
937
|
+
});
|
|
938
|
+
if (_response.ok) {
|
|
939
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
940
|
+
}
|
|
941
|
+
if (_response.error.reason === "status-code") {
|
|
942
|
+
switch (_response.error.statusCode) {
|
|
943
|
+
case 401:
|
|
944
|
+
throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
945
|
+
case 404:
|
|
946
|
+
throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
|
|
947
|
+
case 429:
|
|
948
|
+
throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
949
|
+
case 500:
|
|
950
|
+
throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
|
|
951
|
+
default:
|
|
952
|
+
throw new errors.ForumError({
|
|
953
|
+
statusCode: _response.error.statusCode,
|
|
954
|
+
body: _response.error.body,
|
|
955
|
+
rawResponse: _response.rawResponse,
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/threads/{id}/subscribers");
|
|
960
|
+
});
|
|
961
|
+
}
|
|
902
962
|
/**
|
|
903
963
|
* @param {Forum.RetrieveSubscriberThreadsRequest} request
|
|
904
964
|
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1210,5 +1270,194 @@ class ThreadsClient {
|
|
|
1210
1270
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/threads/{id}/poll");
|
|
1211
1271
|
});
|
|
1212
1272
|
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Create a Vote in the Thread's Poll.
|
|
1275
|
+
*
|
|
1276
|
+
* @param {Forum.CreatePollVoteThreadsRequest} request
|
|
1277
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1278
|
+
*
|
|
1279
|
+
* @throws {@link Forum.BadRequestError}
|
|
1280
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
1281
|
+
* @throws {@link Forum.NotFoundError}
|
|
1282
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
1283
|
+
* @throws {@link Forum.InternalServerError}
|
|
1284
|
+
*
|
|
1285
|
+
* @example
|
|
1286
|
+
* await client.threads.createPollVote({
|
|
1287
|
+
* id: "id",
|
|
1288
|
+
* optionId: "optionId"
|
|
1289
|
+
* })
|
|
1290
|
+
*/
|
|
1291
|
+
createPollVote(request, requestOptions) {
|
|
1292
|
+
return core.HttpResponsePromise.fromPromise(this.__createPollVote(request, requestOptions));
|
|
1293
|
+
}
|
|
1294
|
+
__createPollVote(request, requestOptions) {
|
|
1295
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1296
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1297
|
+
const { id } = request, _body = __rest(request, ["id"]);
|
|
1298
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1299
|
+
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);
|
|
1300
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1301
|
+
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, `threads/${core.url.encodePathParam(id)}/poll/votes`),
|
|
1302
|
+
method: "POST",
|
|
1303
|
+
headers: _headers,
|
|
1304
|
+
contentType: "application/json",
|
|
1305
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1306
|
+
requestType: "json",
|
|
1307
|
+
body: _body,
|
|
1308
|
+
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,
|
|
1309
|
+
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,
|
|
1310
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1311
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
1312
|
+
logging: this._options.logging,
|
|
1313
|
+
});
|
|
1314
|
+
if (_response.ok) {
|
|
1315
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1316
|
+
}
|
|
1317
|
+
if (_response.error.reason === "status-code") {
|
|
1318
|
+
switch (_response.error.statusCode) {
|
|
1319
|
+
case 400:
|
|
1320
|
+
throw new Forum.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1321
|
+
case 401:
|
|
1322
|
+
throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
1323
|
+
case 404:
|
|
1324
|
+
throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1325
|
+
case 429:
|
|
1326
|
+
throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
1327
|
+
case 500:
|
|
1328
|
+
throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
|
|
1329
|
+
default:
|
|
1330
|
+
throw new errors.ForumError({
|
|
1331
|
+
statusCode: _response.error.statusCode,
|
|
1332
|
+
body: _response.error.body,
|
|
1333
|
+
rawResponse: _response.rawResponse,
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/threads/{id}/poll/votes");
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1340
|
+
/**
|
|
1341
|
+
* Removes the authenticated user's Vote. No ID needed.
|
|
1342
|
+
*
|
|
1343
|
+
* @param {Forum.DeleteOwnPollVoteThreadsRequest} request
|
|
1344
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1345
|
+
*
|
|
1346
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
1347
|
+
* @throws {@link Forum.NotFoundError}
|
|
1348
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
1349
|
+
* @throws {@link Forum.InternalServerError}
|
|
1350
|
+
*
|
|
1351
|
+
* @example
|
|
1352
|
+
* await client.threads.deleteOwnPollVote({
|
|
1353
|
+
* id: "id"
|
|
1354
|
+
* })
|
|
1355
|
+
*/
|
|
1356
|
+
deleteOwnPollVote(request, requestOptions) {
|
|
1357
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteOwnPollVote(request, requestOptions));
|
|
1358
|
+
}
|
|
1359
|
+
__deleteOwnPollVote(request, requestOptions) {
|
|
1360
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1361
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1362
|
+
const { id } = request;
|
|
1363
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1364
|
+
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);
|
|
1365
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1366
|
+
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, `threads/${core.url.encodePathParam(id)}/poll/votes`),
|
|
1367
|
+
method: "DELETE",
|
|
1368
|
+
headers: _headers,
|
|
1369
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1370
|
+
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,
|
|
1371
|
+
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,
|
|
1372
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1373
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
1374
|
+
logging: this._options.logging,
|
|
1375
|
+
});
|
|
1376
|
+
if (_response.ok) {
|
|
1377
|
+
return {
|
|
1378
|
+
data: _response.body,
|
|
1379
|
+
rawResponse: _response.rawResponse,
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
if (_response.error.reason === "status-code") {
|
|
1383
|
+
switch (_response.error.statusCode) {
|
|
1384
|
+
case 401:
|
|
1385
|
+
throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
1386
|
+
case 404:
|
|
1387
|
+
throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1388
|
+
case 429:
|
|
1389
|
+
throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
1390
|
+
case 500:
|
|
1391
|
+
throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
|
|
1392
|
+
default:
|
|
1393
|
+
throw new errors.ForumError({
|
|
1394
|
+
statusCode: _response.error.statusCode,
|
|
1395
|
+
body: _response.error.body,
|
|
1396
|
+
rawResponse: _response.rawResponse,
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/threads/{id}/poll/votes");
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1403
|
+
/**
|
|
1404
|
+
* @param {Forum.DeletePollVoteThreadsRequest} request
|
|
1405
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1406
|
+
*
|
|
1407
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
1408
|
+
* @throws {@link Forum.NotFoundError}
|
|
1409
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
1410
|
+
* @throws {@link Forum.InternalServerError}
|
|
1411
|
+
*
|
|
1412
|
+
* @example
|
|
1413
|
+
* await client.threads.deletePollVote({
|
|
1414
|
+
* id: "id",
|
|
1415
|
+
* nestedId: "nestedId"
|
|
1416
|
+
* })
|
|
1417
|
+
*/
|
|
1418
|
+
deletePollVote(request, requestOptions) {
|
|
1419
|
+
return core.HttpResponsePromise.fromPromise(this.__deletePollVote(request, requestOptions));
|
|
1420
|
+
}
|
|
1421
|
+
__deletePollVote(request, requestOptions) {
|
|
1422
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1423
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1424
|
+
const { id, nestedId } = request;
|
|
1425
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1426
|
+
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);
|
|
1427
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1428
|
+
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, `threads/${core.url.encodePathParam(id)}/poll/votes/${core.url.encodePathParam(nestedId)}`),
|
|
1429
|
+
method: "DELETE",
|
|
1430
|
+
headers: _headers,
|
|
1431
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1432
|
+
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,
|
|
1433
|
+
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,
|
|
1434
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1435
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
1436
|
+
logging: this._options.logging,
|
|
1437
|
+
});
|
|
1438
|
+
if (_response.ok) {
|
|
1439
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1440
|
+
}
|
|
1441
|
+
if (_response.error.reason === "status-code") {
|
|
1442
|
+
switch (_response.error.statusCode) {
|
|
1443
|
+
case 401:
|
|
1444
|
+
throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
1445
|
+
case 404:
|
|
1446
|
+
throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1447
|
+
case 429:
|
|
1448
|
+
throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
1449
|
+
case 500:
|
|
1450
|
+
throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
|
|
1451
|
+
default:
|
|
1452
|
+
throw new errors.ForumError({
|
|
1453
|
+
statusCode: _response.error.statusCode,
|
|
1454
|
+
body: _response.error.body,
|
|
1455
|
+
rawResponse: _response.rawResponse,
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/threads/{id}/poll/votes/{nestedId}");
|
|
1460
|
+
});
|
|
1461
|
+
}
|
|
1213
1462
|
}
|
|
1214
1463
|
exports.ThreadsClient = ThreadsClient;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* id: "id",
|
|
5
|
+
* optionId: "optionId"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface CreatePollVoteThreadsRequest {
|
|
9
|
+
/** Thread ID */
|
|
10
|
+
id: string;
|
|
11
|
+
/** ID of the poll option to vote for */
|
|
12
|
+
optionId: string;
|
|
13
|
+
/** Custom extended data */
|
|
14
|
+
extendedData?: Record<string, unknown>;
|
|
15
|
+
}
|