@foru-ms/sdk 2.1.15 → 2.1.17

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.
Files changed (86) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +0 -3
  3. package/dist/cjs/Client.js +22 -27
  4. package/dist/cjs/api/resources/index.d.ts +0 -3
  5. package/dist/cjs/api/resources/index.js +1 -4
  6. package/dist/cjs/api/resources/threads/client/Client.d.ts +73 -0
  7. package/dist/cjs/api/resources/threads/client/Client.js +254 -0
  8. package/dist/cjs/api/resources/{pollVotes/client/requests/CreatevotePollVotesRequest.d.ts → threads/client/requests/CreatePollVoteThreadsRequest.d.ts} +1 -1
  9. package/dist/cjs/api/resources/{pollVotes/client/requests/DeleteOwnvotePollVotesRequest.d.ts → threads/client/requests/DeleteOwnPollVoteThreadsRequest.d.ts} +1 -1
  10. package/dist/cjs/api/resources/{pollVotes/client/requests/DeletevotePollVotesRequest.d.ts → threads/client/requests/DeletePollVoteThreadsRequest.d.ts} +2 -2
  11. package/dist/cjs/api/resources/threads/client/requests/ListPollVotesThreadsRequest.d.ts +16 -0
  12. package/dist/cjs/api/resources/threads/client/requests/index.d.ts +4 -0
  13. package/dist/cjs/api/resources/threads/types/DeleteOwnPollVoteThreadsResponse.d.ts +8 -0
  14. package/dist/cjs/api/resources/threads/types/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/threads/types/index.js +1 -0
  16. package/dist/cjs/api/types/{PollVotesResponse.d.ts → PollVoteResponse.d.ts} +3 -3
  17. package/dist/cjs/api/types/PollVoteResponse.js +3 -0
  18. package/dist/cjs/api/types/PollVotesListResponse.d.ts +22 -0
  19. package/dist/cjs/api/types/PollVotesListResponse.js +3 -0
  20. package/dist/cjs/api/types/ThreadPoll.d.ts +5 -0
  21. package/dist/cjs/api/types/ThreadPollListResponse.d.ts +5 -0
  22. package/dist/cjs/api/types/ThreadPollResponse.d.ts +5 -0
  23. package/dist/cjs/api/types/index.d.ts +2 -1
  24. package/dist/cjs/api/types/index.js +2 -1
  25. package/dist/cjs/version.d.ts +1 -1
  26. package/dist/cjs/version.js +1 -1
  27. package/dist/esm/BaseClient.mjs +2 -2
  28. package/dist/esm/Client.d.mts +0 -3
  29. package/dist/esm/Client.mjs +0 -5
  30. package/dist/esm/api/resources/index.d.mts +0 -3
  31. package/dist/esm/api/resources/index.mjs +0 -3
  32. package/dist/esm/api/resources/threads/client/Client.d.mts +73 -0
  33. package/dist/esm/api/resources/threads/client/Client.mjs +254 -0
  34. package/dist/esm/api/resources/{pollVotes/client/requests/CreatevotePollVotesRequest.d.mts → threads/client/requests/CreatePollVoteThreadsRequest.d.mts} +1 -1
  35. package/dist/esm/api/resources/{pollVotes/client/requests/DeleteOwnvotePollVotesRequest.d.mts → threads/client/requests/DeleteOwnPollVoteThreadsRequest.d.mts} +1 -1
  36. package/dist/esm/api/resources/{pollVotes/client/requests/DeletevotePollVotesRequest.d.mts → threads/client/requests/DeletePollVoteThreadsRequest.d.mts} +2 -2
  37. package/dist/esm/api/resources/threads/client/requests/ListPollVotesThreadsRequest.d.mts +16 -0
  38. package/dist/esm/api/resources/threads/client/requests/index.d.mts +4 -0
  39. package/dist/esm/api/resources/threads/types/DeleteOwnPollVoteThreadsResponse.d.mts +8 -0
  40. package/dist/esm/api/resources/threads/types/index.d.mts +1 -0
  41. package/dist/esm/api/resources/threads/types/index.mjs +1 -0
  42. package/dist/esm/api/types/{PollVotesResponse.d.mts → PollVoteResponse.d.mts} +3 -3
  43. package/dist/esm/api/types/PollVoteResponse.mjs +2 -0
  44. package/dist/esm/api/types/PollVotesListResponse.d.mts +22 -0
  45. package/dist/esm/api/types/PollVotesListResponse.mjs +2 -0
  46. package/dist/esm/api/types/ThreadPoll.d.mts +5 -0
  47. package/dist/esm/api/types/ThreadPollListResponse.d.mts +5 -0
  48. package/dist/esm/api/types/ThreadPollResponse.d.mts +5 -0
  49. package/dist/esm/api/types/index.d.mts +2 -1
  50. package/dist/esm/api/types/index.mjs +2 -1
  51. package/dist/esm/version.d.mts +1 -1
  52. package/dist/esm/version.mjs +1 -1
  53. package/package.json +1 -1
  54. package/reference.md +79 -15
  55. package/dist/cjs/api/resources/pollVotes/client/Client.d.ts +0 -68
  56. package/dist/cjs/api/resources/pollVotes/client/Client.js +0 -256
  57. package/dist/cjs/api/resources/pollVotes/client/index.d.ts +0 -1
  58. package/dist/cjs/api/resources/pollVotes/client/index.js +0 -17
  59. package/dist/cjs/api/resources/pollVotes/client/requests/index.d.ts +0 -3
  60. package/dist/cjs/api/resources/pollVotes/client/requests/index.js +0 -2
  61. package/dist/cjs/api/resources/pollVotes/index.d.ts +0 -2
  62. package/dist/cjs/api/resources/pollVotes/index.js +0 -18
  63. package/dist/cjs/api/resources/pollVotes/types/DeleteOwnvotePollVotesResponse.d.ts +0 -8
  64. package/dist/cjs/api/resources/pollVotes/types/index.d.ts +0 -1
  65. package/dist/cjs/api/resources/pollVotes/types/index.js +0 -17
  66. package/dist/esm/api/resources/pollVotes/client/Client.d.mts +0 -68
  67. package/dist/esm/api/resources/pollVotes/client/Client.mjs +0 -219
  68. package/dist/esm/api/resources/pollVotes/client/index.d.mts +0 -1
  69. package/dist/esm/api/resources/pollVotes/client/index.mjs +0 -1
  70. package/dist/esm/api/resources/pollVotes/client/requests/index.d.mts +0 -3
  71. package/dist/esm/api/resources/pollVotes/client/requests/index.mjs +0 -1
  72. package/dist/esm/api/resources/pollVotes/index.d.mts +0 -2
  73. package/dist/esm/api/resources/pollVotes/index.mjs +0 -2
  74. package/dist/esm/api/resources/pollVotes/types/DeleteOwnvotePollVotesResponse.d.mts +0 -8
  75. package/dist/esm/api/resources/pollVotes/types/index.d.mts +0 -1
  76. package/dist/esm/api/resources/pollVotes/types/index.mjs +0 -1
  77. /package/dist/cjs/api/resources/{pollVotes/client/requests/CreatevotePollVotesRequest.js → threads/client/requests/CreatePollVoteThreadsRequest.js} +0 -0
  78. /package/dist/cjs/api/resources/{pollVotes/client/requests/DeleteOwnvotePollVotesRequest.js → threads/client/requests/DeleteOwnPollVoteThreadsRequest.js} +0 -0
  79. /package/dist/cjs/api/resources/{pollVotes/client/requests/DeletevotePollVotesRequest.js → threads/client/requests/DeletePollVoteThreadsRequest.js} +0 -0
  80. /package/dist/cjs/api/resources/{pollVotes/types/DeleteOwnvotePollVotesResponse.js → threads/client/requests/ListPollVotesThreadsRequest.js} +0 -0
  81. /package/dist/cjs/api/{types/PollVotesResponse.js → resources/threads/types/DeleteOwnPollVoteThreadsResponse.js} +0 -0
  82. /package/dist/esm/api/resources/{pollVotes/client/requests/CreatevotePollVotesRequest.mjs → threads/client/requests/CreatePollVoteThreadsRequest.mjs} +0 -0
  83. /package/dist/esm/api/resources/{pollVotes/client/requests/DeleteOwnvotePollVotesRequest.mjs → threads/client/requests/DeleteOwnPollVoteThreadsRequest.mjs} +0 -0
  84. /package/dist/esm/api/resources/{pollVotes/client/requests/DeletevotePollVotesRequest.mjs → threads/client/requests/DeletePollVoteThreadsRequest.mjs} +0 -0
  85. /package/dist/esm/api/resources/{pollVotes/types/DeleteOwnvotePollVotesResponse.mjs → threads/client/requests/ListPollVotesThreadsRequest.mjs} +0 -0
  86. /package/dist/esm/api/{types/PollVotesResponse.mjs → resources/threads/types/DeleteOwnPollVoteThreadsResponse.mjs} +0 -0
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./DeleteOwnvotePollVotesResponse.js"), exports);
@@ -1,68 +0,0 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
- import * as core from "../../../../core/index.mjs";
4
- import * as Forum from "../../../index.mjs";
5
- export declare namespace PollVotesClient {
6
- type Options = BaseClientOptions;
7
- interface RequestOptions extends BaseRequestOptions {
8
- }
9
- }
10
- export declare class PollVotesClient {
11
- protected readonly _options: NormalizedClientOptionsWithAuth<PollVotesClient.Options>;
12
- constructor(options?: PollVotesClient.Options);
13
- /**
14
- * Create a vote in the Thread's Poll.
15
- *
16
- * @param {Forum.CreatevotePollVotesRequest} request
17
- * @param {PollVotesClient.RequestOptions} requestOptions - Request-specific configuration.
18
- *
19
- * @throws {@link Forum.BadRequestError}
20
- * @throws {@link Forum.UnauthorizedError}
21
- * @throws {@link Forum.NotFoundError}
22
- * @throws {@link Forum.TooManyRequestsError}
23
- * @throws {@link Forum.InternalServerError}
24
- *
25
- * @example
26
- * await client.pollVotes.createvote({
27
- * id: "id",
28
- * optionId: "optionId"
29
- * })
30
- */
31
- createvote(request: Forum.CreatevotePollVotesRequest, requestOptions?: PollVotesClient.RequestOptions): core.HttpResponsePromise<Forum.PollVotesResponse>;
32
- private __createvote;
33
- /**
34
- * Removes the authenticated user's vote. No ID needed.
35
- *
36
- * @param {Forum.DeleteOwnvotePollVotesRequest} request
37
- * @param {PollVotesClient.RequestOptions} requestOptions - Request-specific configuration.
38
- *
39
- * @throws {@link Forum.UnauthorizedError}
40
- * @throws {@link Forum.NotFoundError}
41
- * @throws {@link Forum.TooManyRequestsError}
42
- * @throws {@link Forum.InternalServerError}
43
- *
44
- * @example
45
- * await client.pollVotes.deleteOwnvote({
46
- * id: "id"
47
- * })
48
- */
49
- deleteOwnvote(request: Forum.DeleteOwnvotePollVotesRequest, requestOptions?: PollVotesClient.RequestOptions): core.HttpResponsePromise<Forum.DeleteOwnvotePollVotesResponse>;
50
- private __deleteOwnvote;
51
- /**
52
- * @param {Forum.DeletevotePollVotesRequest} request
53
- * @param {PollVotesClient.RequestOptions} requestOptions - Request-specific configuration.
54
- *
55
- * @throws {@link Forum.UnauthorizedError}
56
- * @throws {@link Forum.NotFoundError}
57
- * @throws {@link Forum.TooManyRequestsError}
58
- * @throws {@link Forum.InternalServerError}
59
- *
60
- * @example
61
- * await client.pollVotes.deletevote({
62
- * id: "id",
63
- * nestedId: "nestedId"
64
- * })
65
- */
66
- deletevote(request: Forum.DeletevotePollVotesRequest, requestOptions?: PollVotesClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
67
- private __deletevote;
68
- }
@@ -1,219 +0,0 @@
1
- // This file was auto-generated by Fern from our API Definition.
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __rest = (this && this.__rest) || function (s, e) {
12
- var t = {};
13
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
- t[p] = s[p];
15
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
- t[p[i]] = s[p[i]];
19
- }
20
- return t;
21
- };
22
- import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../core/headers.mjs";
24
- import * as core from "../../../../core/index.mjs";
25
- import * as environments from "../../../../environments.mjs";
26
- import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
27
- import * as errors from "../../../../errors/index.mjs";
28
- import * as Forum from "../../../index.mjs";
29
- export class PollVotesClient {
30
- constructor(options = {}) {
31
- this._options = normalizeClientOptionsWithAuth(options);
32
- }
33
- /**
34
- * Create a vote in the Thread's Poll.
35
- *
36
- * @param {Forum.CreatevotePollVotesRequest} request
37
- * @param {PollVotesClient.RequestOptions} requestOptions - Request-specific configuration.
38
- *
39
- * @throws {@link Forum.BadRequestError}
40
- * @throws {@link Forum.UnauthorizedError}
41
- * @throws {@link Forum.NotFoundError}
42
- * @throws {@link Forum.TooManyRequestsError}
43
- * @throws {@link Forum.InternalServerError}
44
- *
45
- * @example
46
- * await client.pollVotes.createvote({
47
- * id: "id",
48
- * optionId: "optionId"
49
- * })
50
- */
51
- createvote(request, requestOptions) {
52
- return core.HttpResponsePromise.fromPromise(this.__createvote(request, requestOptions));
53
- }
54
- __createvote(request, requestOptions) {
55
- return __awaiter(this, void 0, void 0, function* () {
56
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
57
- const { id } = request, _body = __rest(request, ["id"]);
58
- const _authRequest = yield this._options.authProvider.getAuthRequest();
59
- 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);
60
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
61
- 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`),
62
- method: "POST",
63
- headers: _headers,
64
- contentType: "application/json",
65
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
66
- requestType: "json",
67
- body: _body,
68
- 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,
69
- 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,
70
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
71
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
72
- logging: this._options.logging,
73
- });
74
- if (_response.ok) {
75
- return { data: _response.body, rawResponse: _response.rawResponse };
76
- }
77
- if (_response.error.reason === "status-code") {
78
- switch (_response.error.statusCode) {
79
- case 400:
80
- throw new Forum.BadRequestError(_response.error.body, _response.rawResponse);
81
- case 401:
82
- throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
83
- case 404:
84
- throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
85
- case 429:
86
- throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
87
- case 500:
88
- throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
89
- default:
90
- throw new errors.ForumError({
91
- statusCode: _response.error.statusCode,
92
- body: _response.error.body,
93
- rawResponse: _response.rawResponse,
94
- });
95
- }
96
- }
97
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/threads/{id}/poll/votes");
98
- });
99
- }
100
- /**
101
- * Removes the authenticated user's vote. No ID needed.
102
- *
103
- * @param {Forum.DeleteOwnvotePollVotesRequest} request
104
- * @param {PollVotesClient.RequestOptions} requestOptions - Request-specific configuration.
105
- *
106
- * @throws {@link Forum.UnauthorizedError}
107
- * @throws {@link Forum.NotFoundError}
108
- * @throws {@link Forum.TooManyRequestsError}
109
- * @throws {@link Forum.InternalServerError}
110
- *
111
- * @example
112
- * await client.pollVotes.deleteOwnvote({
113
- * id: "id"
114
- * })
115
- */
116
- deleteOwnvote(request, requestOptions) {
117
- return core.HttpResponsePromise.fromPromise(this.__deleteOwnvote(request, requestOptions));
118
- }
119
- __deleteOwnvote(request, requestOptions) {
120
- return __awaiter(this, void 0, void 0, function* () {
121
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
122
- const { id } = request;
123
- const _authRequest = yield this._options.authProvider.getAuthRequest();
124
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
125
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
126
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/poll/votes`),
127
- method: "DELETE",
128
- headers: _headers,
129
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
130
- 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,
131
- 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,
132
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
133
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
134
- logging: this._options.logging,
135
- });
136
- if (_response.ok) {
137
- return { data: _response.body, rawResponse: _response.rawResponse };
138
- }
139
- if (_response.error.reason === "status-code") {
140
- switch (_response.error.statusCode) {
141
- case 401:
142
- throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
143
- case 404:
144
- throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
145
- case 429:
146
- throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
147
- case 500:
148
- throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
149
- default:
150
- throw new errors.ForumError({
151
- statusCode: _response.error.statusCode,
152
- body: _response.error.body,
153
- rawResponse: _response.rawResponse,
154
- });
155
- }
156
- }
157
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/threads/{id}/poll/votes");
158
- });
159
- }
160
- /**
161
- * @param {Forum.DeletevotePollVotesRequest} request
162
- * @param {PollVotesClient.RequestOptions} requestOptions - Request-specific configuration.
163
- *
164
- * @throws {@link Forum.UnauthorizedError}
165
- * @throws {@link Forum.NotFoundError}
166
- * @throws {@link Forum.TooManyRequestsError}
167
- * @throws {@link Forum.InternalServerError}
168
- *
169
- * @example
170
- * await client.pollVotes.deletevote({
171
- * id: "id",
172
- * nestedId: "nestedId"
173
- * })
174
- */
175
- deletevote(request, requestOptions) {
176
- return core.HttpResponsePromise.fromPromise(this.__deletevote(request, requestOptions));
177
- }
178
- __deletevote(request, requestOptions) {
179
- return __awaiter(this, void 0, void 0, function* () {
180
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
181
- const { id, nestedId } = request;
182
- const _authRequest = yield this._options.authProvider.getAuthRequest();
183
- 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);
184
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
185
- 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)}`),
186
- method: "DELETE",
187
- headers: _headers,
188
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
189
- 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,
190
- 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,
191
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
192
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
193
- logging: this._options.logging,
194
- });
195
- if (_response.ok) {
196
- return { data: _response.body, rawResponse: _response.rawResponse };
197
- }
198
- if (_response.error.reason === "status-code") {
199
- switch (_response.error.statusCode) {
200
- case 401:
201
- throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
202
- case 404:
203
- throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
204
- case 429:
205
- throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
206
- case 500:
207
- throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
208
- default:
209
- throw new errors.ForumError({
210
- statusCode: _response.error.statusCode,
211
- body: _response.error.body,
212
- rawResponse: _response.rawResponse,
213
- });
214
- }
215
- }
216
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/threads/{id}/poll/votes/{nestedId}");
217
- });
218
- }
219
- }
@@ -1 +0,0 @@
1
- export * from "./requests/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./requests/index.mjs";
@@ -1,3 +0,0 @@
1
- export type { CreatevotePollVotesRequest } from "./CreatevotePollVotesRequest.mjs";
2
- export type { DeleteOwnvotePollVotesRequest } from "./DeleteOwnvotePollVotesRequest.mjs";
3
- export type { DeletevotePollVotesRequest } from "./DeletevotePollVotesRequest.mjs";
@@ -1,2 +0,0 @@
1
- export * from "./client/index.mjs";
2
- export * from "./types/index.mjs";
@@ -1,2 +0,0 @@
1
- export * from "./client/index.mjs";
2
- export * from "./types/index.mjs";
@@ -1,8 +0,0 @@
1
- export interface DeleteOwnvotePollVotesResponse {
2
- data: DeleteOwnvotePollVotesResponse.Data;
3
- }
4
- export declare namespace DeleteOwnvotePollVotesResponse {
5
- interface Data {
6
- success: boolean;
7
- }
8
- }
@@ -1 +0,0 @@
1
- export * from "./DeleteOwnvotePollVotesResponse.mjs";
@@ -1 +0,0 @@
1
- export * from "./DeleteOwnvotePollVotesResponse.mjs";