@foru-ms/sdk 2.1.18 → 2.1.19
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/posts/client/Client.d.ts +25 -7
- package/dist/cjs/api/resources/posts/client/Client.js +70 -10
- package/dist/cjs/api/resources/posts/client/requests/{DeletePostPostsRequest.d.ts → DeletePostByIdPostsRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/posts/client/requests/DeleteReactionByIdPostsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/posts/client/requests/DeleteReactionPostsRequest.d.ts +1 -4
- package/dist/cjs/api/resources/posts/client/requests/index.d.ts +2 -1
- package/dist/cjs/api/resources/privateMessages/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/privateMessages/client/Client.js +5 -5
- package/dist/{esm/api/resources/privateMessages/client/requests/DeleteReplyPrivateMessagesRequest.d.mts → cjs/api/resources/privateMessages/client/requests/DeleteReplyByIdPrivateMessagesRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/privateMessages/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/tags/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/tags/client/Client.js +5 -5
- package/dist/{esm/api/resources/tags/client/requests/DeleteSubscriberTagsRequest.d.mts → cjs/api/resources/tags/client/requests/DeleteSubscriberByIdTagsRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/tags/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/threads/client/Client.d.ts +48 -11
- package/dist/cjs/api/resources/threads/client/Client.js +141 -15
- package/dist/cjs/api/resources/threads/client/requests/CreateSubscriberThreadsRequest.d.ts +12 -0
- package/dist/{esm/api/resources/threads/client/requests/DeletePostThreadsRequest.d.mts → cjs/api/resources/threads/client/requests/DeletePostByIdThreadsRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/threads/client/requests/DeleteReactionByIdThreadsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/threads/client/requests/DeleteReactionThreadsRequest.d.ts +1 -4
- package/dist/cjs/api/resources/threads/client/requests/{DeleteSubscriberThreadsRequest.d.ts → DeleteSubscriberByIdThreadsRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/threads/client/requests/index.d.ts +4 -2
- package/dist/cjs/api/resources/users/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/users/client/Client.js +10 -10
- package/dist/{esm/api/resources/users/client/requests/DeleteFollowerUsersRequest.d.mts → cjs/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.js +3 -0
- package/dist/cjs/api/resources/users/client/requests/{DeleteFollowingUsersRequest.d.ts → DeleteFollowingByIdUsersRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/users/client/requests/DeleteFollowingByIdUsersRequest.js +3 -0
- package/dist/cjs/api/resources/users/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/webhooks/client/Client.js +5 -5
- package/dist/cjs/api/resources/webhooks/client/requests/{DeleteDeliveryWebhooksRequest.d.ts → DeleteDeliveryByIdWebhooksRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/webhooks/client/requests/DeleteDeliveryByIdWebhooksRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/types/ThreadSubscriberCreate.d.ts +4 -0
- package/dist/cjs/api/types/ThreadSubscriberCreate.js +3 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -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/posts/client/Client.d.mts +25 -7
- package/dist/esm/api/resources/posts/client/Client.mjs +70 -10
- package/dist/esm/api/resources/posts/client/requests/{DeletePostPostsRequest.d.mts → DeletePostByIdPostsRequest.d.mts} +1 -1
- package/dist/esm/api/resources/posts/client/requests/DeleteReactionByIdPostsRequest.d.mts +13 -0
- package/dist/esm/api/resources/posts/client/requests/DeleteReactionPostsRequest.d.mts +1 -4
- package/dist/esm/api/resources/posts/client/requests/index.d.mts +2 -1
- package/dist/esm/api/resources/privateMessages/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/privateMessages/client/Client.mjs +5 -5
- package/dist/{cjs/api/resources/privateMessages/client/requests/DeleteReplyPrivateMessagesRequest.d.ts → esm/api/resources/privateMessages/client/requests/DeleteReplyByIdPrivateMessagesRequest.d.mts} +1 -1
- package/dist/esm/api/resources/privateMessages/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/tags/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/tags/client/Client.mjs +5 -5
- package/dist/{cjs/api/resources/tags/client/requests/DeleteSubscriberTagsRequest.d.ts → esm/api/resources/tags/client/requests/DeleteSubscriberByIdTagsRequest.d.mts} +1 -1
- package/dist/esm/api/resources/tags/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/threads/client/Client.d.mts +48 -11
- package/dist/esm/api/resources/threads/client/Client.mjs +141 -15
- package/dist/esm/api/resources/threads/client/requests/CreateSubscriberThreadsRequest.d.mts +12 -0
- package/dist/{cjs/api/resources/threads/client/requests/DeletePostThreadsRequest.d.ts → esm/api/resources/threads/client/requests/DeletePostByIdThreadsRequest.d.mts} +1 -1
- package/dist/esm/api/resources/threads/client/requests/DeleteReactionByIdThreadsRequest.d.mts +13 -0
- package/dist/esm/api/resources/threads/client/requests/DeleteReactionThreadsRequest.d.mts +1 -4
- package/dist/esm/api/resources/threads/client/requests/{DeleteSubscriberThreadsRequest.d.mts → DeleteSubscriberByIdThreadsRequest.d.mts} +1 -1
- package/dist/esm/api/resources/threads/client/requests/index.d.mts +4 -2
- package/dist/esm/api/resources/users/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/users/client/Client.mjs +10 -10
- package/dist/{cjs/api/resources/users/client/requests/DeleteFollowerUsersRequest.d.ts → esm/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.d.mts} +1 -1
- package/dist/esm/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.mjs +2 -0
- package/dist/esm/api/resources/users/client/requests/{DeleteFollowingUsersRequest.d.mts → DeleteFollowingByIdUsersRequest.d.mts} +1 -1
- package/dist/esm/api/resources/users/client/requests/DeleteFollowingByIdUsersRequest.mjs +2 -0
- package/dist/esm/api/resources/users/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/webhooks/client/Client.mjs +5 -5
- package/dist/esm/api/resources/webhooks/client/requests/{DeleteDeliveryWebhooksRequest.d.mts → DeleteDeliveryByIdWebhooksRequest.d.mts} +1 -1
- package/dist/esm/api/resources/webhooks/client/requests/DeleteDeliveryByIdWebhooksRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +1 -1
- package/dist/esm/api/types/ThreadSubscriberCreate.d.mts +4 -0
- package/dist/esm/api/types/ThreadSubscriberCreate.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +225 -30
- /package/dist/cjs/api/resources/posts/client/requests/{DeletePostPostsRequest.js → DeletePostByIdPostsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{privateMessages/client/requests/DeleteReplyPrivateMessagesRequest.js → posts/client/requests/DeleteReactionByIdPostsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{tags/client/requests/DeleteSubscriberTagsRequest.js → privateMessages/client/requests/DeleteReplyByIdPrivateMessagesRequest.js} +0 -0
- /package/dist/cjs/api/resources/{threads/client/requests/DeletePostThreadsRequest.js → tags/client/requests/DeleteSubscriberByIdTagsRequest.js} +0 -0
- /package/dist/cjs/api/resources/threads/client/requests/{DeleteSubscriberThreadsRequest.js → CreateSubscriberThreadsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{users/client/requests/DeleteFollowerUsersRequest.js → threads/client/requests/DeletePostByIdThreadsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{users/client/requests/DeleteFollowingUsersRequest.js → threads/client/requests/DeleteReactionByIdThreadsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{webhooks/client/requests/DeleteDeliveryWebhooksRequest.js → threads/client/requests/DeleteSubscriberByIdThreadsRequest.js} +0 -0
- /package/dist/esm/api/resources/posts/client/requests/{DeletePostPostsRequest.mjs → DeletePostByIdPostsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{privateMessages/client/requests/DeleteReplyPrivateMessagesRequest.mjs → posts/client/requests/DeleteReactionByIdPostsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{tags/client/requests/DeleteSubscriberTagsRequest.mjs → privateMessages/client/requests/DeleteReplyByIdPrivateMessagesRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{threads/client/requests/DeletePostThreadsRequest.mjs → tags/client/requests/DeleteSubscriberByIdTagsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/threads/client/requests/{DeleteSubscriberThreadsRequest.mjs → CreateSubscriberThreadsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{users/client/requests/DeleteFollowerUsersRequest.mjs → threads/client/requests/DeletePostByIdThreadsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{users/client/requests/DeleteFollowingUsersRequest.mjs → threads/client/requests/DeleteReactionByIdThreadsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{webhooks/client/requests/DeleteDeliveryWebhooksRequest.mjs → threads/client/requests/DeleteSubscriberByIdThreadsRequest.mjs} +0 -0
|
@@ -488,7 +488,7 @@ export class ThreadsClient {
|
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
490
|
/**
|
|
491
|
-
* @param {Forum.
|
|
491
|
+
* @param {Forum.DeletePostByIdThreadsRequest} request
|
|
492
492
|
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
493
493
|
*
|
|
494
494
|
* @throws {@link Forum.UnauthorizedError}
|
|
@@ -497,15 +497,15 @@ export class ThreadsClient {
|
|
|
497
497
|
* @throws {@link Forum.InternalServerError}
|
|
498
498
|
*
|
|
499
499
|
* @example
|
|
500
|
-
* await client.threads.
|
|
500
|
+
* await client.threads.deletePostById({
|
|
501
501
|
* id: "id",
|
|
502
502
|
* subId: "subId"
|
|
503
503
|
* })
|
|
504
504
|
*/
|
|
505
|
-
|
|
506
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
505
|
+
deletePostById(request, requestOptions) {
|
|
506
|
+
return core.HttpResponsePromise.fromPromise(this.__deletePostById(request, requestOptions));
|
|
507
507
|
}
|
|
508
|
-
|
|
508
|
+
__deletePostById(request, requestOptions) {
|
|
509
509
|
return __awaiter(this, void 0, void 0, function* () {
|
|
510
510
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
511
511
|
const { id, subId } = request;
|
|
@@ -679,6 +679,8 @@ export class ThreadsClient {
|
|
|
679
679
|
});
|
|
680
680
|
}
|
|
681
681
|
/**
|
|
682
|
+
* Removes the authenticated user's reaction. No subId needed.
|
|
683
|
+
*
|
|
682
684
|
* @param {Forum.DeleteReactionThreadsRequest} request
|
|
683
685
|
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
684
686
|
*
|
|
@@ -689,8 +691,7 @@ export class ThreadsClient {
|
|
|
689
691
|
*
|
|
690
692
|
* @example
|
|
691
693
|
* await client.threads.deleteReaction({
|
|
692
|
-
* id: "id"
|
|
693
|
-
* subId: "subId"
|
|
694
|
+
* id: "id"
|
|
694
695
|
* })
|
|
695
696
|
*/
|
|
696
697
|
deleteReaction(request, requestOptions) {
|
|
@@ -699,11 +700,11 @@ export class ThreadsClient {
|
|
|
699
700
|
__deleteReaction(request, requestOptions) {
|
|
700
701
|
return __awaiter(this, void 0, void 0, function* () {
|
|
701
702
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
702
|
-
const { id
|
|
703
|
+
const { id } = request;
|
|
703
704
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
704
705
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
705
706
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
706
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ForumEnvironment.Production, `threads/${core.url.encodePathParam(id)}/reactions
|
|
707
|
+
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)}/reactions`),
|
|
707
708
|
method: "DELETE",
|
|
708
709
|
headers: _headers,
|
|
709
710
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -734,7 +735,7 @@ export class ThreadsClient {
|
|
|
734
735
|
});
|
|
735
736
|
}
|
|
736
737
|
}
|
|
737
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/threads/{id}/reactions
|
|
738
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/threads/{id}/reactions");
|
|
738
739
|
});
|
|
739
740
|
}
|
|
740
741
|
/**
|
|
@@ -799,6 +800,65 @@ export class ThreadsClient {
|
|
|
799
800
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/threads/{id}/reactions/{subId}");
|
|
800
801
|
});
|
|
801
802
|
}
|
|
803
|
+
/**
|
|
804
|
+
* @param {Forum.DeleteReactionByIdThreadsRequest} request
|
|
805
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
806
|
+
*
|
|
807
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
808
|
+
* @throws {@link Forum.NotFoundError}
|
|
809
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
810
|
+
* @throws {@link Forum.InternalServerError}
|
|
811
|
+
*
|
|
812
|
+
* @example
|
|
813
|
+
* await client.threads.deleteReactionById({
|
|
814
|
+
* id: "id",
|
|
815
|
+
* subId: "subId"
|
|
816
|
+
* })
|
|
817
|
+
*/
|
|
818
|
+
deleteReactionById(request, requestOptions) {
|
|
819
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteReactionById(request, requestOptions));
|
|
820
|
+
}
|
|
821
|
+
__deleteReactionById(request, requestOptions) {
|
|
822
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
823
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
824
|
+
const { id, subId } = request;
|
|
825
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
826
|
+
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);
|
|
827
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
828
|
+
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)}/reactions/${core.url.encodePathParam(subId)}`),
|
|
829
|
+
method: "DELETE",
|
|
830
|
+
headers: _headers,
|
|
831
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
832
|
+
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,
|
|
833
|
+
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,
|
|
834
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
835
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
836
|
+
logging: this._options.logging,
|
|
837
|
+
});
|
|
838
|
+
if (_response.ok) {
|
|
839
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
840
|
+
}
|
|
841
|
+
if (_response.error.reason === "status-code") {
|
|
842
|
+
switch (_response.error.statusCode) {
|
|
843
|
+
case 401:
|
|
844
|
+
throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
845
|
+
case 404:
|
|
846
|
+
throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
|
|
847
|
+
case 429:
|
|
848
|
+
throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
849
|
+
case 500:
|
|
850
|
+
throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
|
|
851
|
+
default:
|
|
852
|
+
throw new errors.ForumError({
|
|
853
|
+
statusCode: _response.error.statusCode,
|
|
854
|
+
body: _response.error.body,
|
|
855
|
+
rawResponse: _response.rawResponse,
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/threads/{id}/reactions/{subId}");
|
|
860
|
+
});
|
|
861
|
+
}
|
|
802
862
|
/**
|
|
803
863
|
* Retrieve a paginated list of subscribers for Thread.
|
|
804
864
|
*
|
|
@@ -863,6 +923,72 @@ export class ThreadsClient {
|
|
|
863
923
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/threads/{id}/subscribers");
|
|
864
924
|
});
|
|
865
925
|
}
|
|
926
|
+
/**
|
|
927
|
+
* Create a Subscriber in Thread.
|
|
928
|
+
*
|
|
929
|
+
* @param {Forum.CreateSubscriberThreadsRequest} request
|
|
930
|
+
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
931
|
+
*
|
|
932
|
+
* @throws {@link Forum.BadRequestError}
|
|
933
|
+
* @throws {@link Forum.UnauthorizedError}
|
|
934
|
+
* @throws {@link Forum.NotFoundError}
|
|
935
|
+
* @throws {@link Forum.TooManyRequestsError}
|
|
936
|
+
* @throws {@link Forum.InternalServerError}
|
|
937
|
+
*
|
|
938
|
+
* @example
|
|
939
|
+
* await client.threads.createSubscriber({
|
|
940
|
+
* id: "id"
|
|
941
|
+
* })
|
|
942
|
+
*/
|
|
943
|
+
createSubscriber(request, requestOptions) {
|
|
944
|
+
return core.HttpResponsePromise.fromPromise(this.__createSubscriber(request, requestOptions));
|
|
945
|
+
}
|
|
946
|
+
__createSubscriber(request, requestOptions) {
|
|
947
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
948
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
949
|
+
const { id } = request, _body = __rest(request, ["id"]);
|
|
950
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
951
|
+
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);
|
|
952
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
953
|
+
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`),
|
|
954
|
+
method: "POST",
|
|
955
|
+
headers: _headers,
|
|
956
|
+
contentType: "application/json",
|
|
957
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
958
|
+
requestType: "json",
|
|
959
|
+
body: _body,
|
|
960
|
+
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,
|
|
961
|
+
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,
|
|
962
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
963
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
964
|
+
logging: this._options.logging,
|
|
965
|
+
});
|
|
966
|
+
if (_response.ok) {
|
|
967
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
968
|
+
}
|
|
969
|
+
if (_response.error.reason === "status-code") {
|
|
970
|
+
switch (_response.error.statusCode) {
|
|
971
|
+
case 400:
|
|
972
|
+
throw new Forum.BadRequestError(_response.error.body, _response.rawResponse);
|
|
973
|
+
case 401:
|
|
974
|
+
throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
975
|
+
case 404:
|
|
976
|
+
throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
|
|
977
|
+
case 429:
|
|
978
|
+
throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
979
|
+
case 500:
|
|
980
|
+
throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
|
|
981
|
+
default:
|
|
982
|
+
throw new errors.ForumError({
|
|
983
|
+
statusCode: _response.error.statusCode,
|
|
984
|
+
body: _response.error.body,
|
|
985
|
+
rawResponse: _response.rawResponse,
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/threads/{id}/subscribers");
|
|
990
|
+
});
|
|
991
|
+
}
|
|
866
992
|
/**
|
|
867
993
|
* Unsubscribe from this thread. Removes the authenticated user's subscription. No subId needed.
|
|
868
994
|
*
|
|
@@ -986,7 +1112,7 @@ export class ThreadsClient {
|
|
|
986
1112
|
});
|
|
987
1113
|
}
|
|
988
1114
|
/**
|
|
989
|
-
* @param {Forum.
|
|
1115
|
+
* @param {Forum.DeleteSubscriberByIdThreadsRequest} request
|
|
990
1116
|
* @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
991
1117
|
*
|
|
992
1118
|
* @throws {@link Forum.UnauthorizedError}
|
|
@@ -995,15 +1121,15 @@ export class ThreadsClient {
|
|
|
995
1121
|
* @throws {@link Forum.InternalServerError}
|
|
996
1122
|
*
|
|
997
1123
|
* @example
|
|
998
|
-
* await client.threads.
|
|
1124
|
+
* await client.threads.deleteSubscriberById({
|
|
999
1125
|
* id: "id",
|
|
1000
1126
|
* subId: "subId"
|
|
1001
1127
|
* })
|
|
1002
1128
|
*/
|
|
1003
|
-
|
|
1004
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1129
|
+
deleteSubscriberById(request, requestOptions) {
|
|
1130
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteSubscriberById(request, requestOptions));
|
|
1005
1131
|
}
|
|
1006
|
-
|
|
1132
|
+
__deleteSubscriberById(request, requestOptions) {
|
|
1007
1133
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1008
1134
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1009
1135
|
const { id, subId } = request;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export type { CreatePollThreadsRequest } from "./CreatePollThreadsRequest.mjs";
|
|
2
2
|
export type { CreatePollVoteThreadsRequest } from "./CreatePollVoteThreadsRequest.mjs";
|
|
3
3
|
export { CreateReactionThreadsRequest } from "./CreateReactionThreadsRequest.mjs";
|
|
4
|
+
export type { CreateSubscriberThreadsRequest } from "./CreateSubscriberThreadsRequest.mjs";
|
|
4
5
|
export type { CreateThreadsRequest } from "./CreateThreadsRequest.mjs";
|
|
5
6
|
export type { DeleteOwnPollVoteThreadsRequest } from "./DeleteOwnPollVoteThreadsRequest.mjs";
|
|
6
7
|
export type { DeletePollVoteThreadsRequest } from "./DeletePollVoteThreadsRequest.mjs";
|
|
7
|
-
export type {
|
|
8
|
+
export type { DeletePostByIdThreadsRequest } from "./DeletePostByIdThreadsRequest.mjs";
|
|
9
|
+
export type { DeleteReactionByIdThreadsRequest } from "./DeleteReactionByIdThreadsRequest.mjs";
|
|
8
10
|
export type { DeleteReactionThreadsRequest } from "./DeleteReactionThreadsRequest.mjs";
|
|
9
|
-
export type {
|
|
11
|
+
export type { DeleteSubscriberByIdThreadsRequest } from "./DeleteSubscriberByIdThreadsRequest.mjs";
|
|
10
12
|
export type { DeleteThreadsRequest } from "./DeleteThreadsRequest.mjs";
|
|
11
13
|
export type { ListPollVotesThreadsRequest } from "./ListPollVotesThreadsRequest.mjs";
|
|
12
14
|
export type { ListPostsThreadsRequest } from "./ListPostsThreadsRequest.mjs";
|
|
@@ -179,7 +179,7 @@ export declare class UsersClient {
|
|
|
179
179
|
retrieveFollower(request: Forum.RetrieveFollowerUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<Forum.RetrieveFollowerUsersResponse>;
|
|
180
180
|
private __retrieveFollower;
|
|
181
181
|
/**
|
|
182
|
-
* @param {Forum.
|
|
182
|
+
* @param {Forum.DeleteFollowerByIdUsersRequest} request
|
|
183
183
|
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
184
184
|
*
|
|
185
185
|
* @throws {@link Forum.UnauthorizedError}
|
|
@@ -188,13 +188,13 @@ export declare class UsersClient {
|
|
|
188
188
|
* @throws {@link Forum.InternalServerError}
|
|
189
189
|
*
|
|
190
190
|
* @example
|
|
191
|
-
* await client.users.
|
|
191
|
+
* await client.users.deleteFollowerById({
|
|
192
192
|
* id: "id",
|
|
193
193
|
* subId: "subId"
|
|
194
194
|
* })
|
|
195
195
|
*/
|
|
196
|
-
|
|
197
|
-
private
|
|
196
|
+
deleteFollowerById(request: Forum.DeleteFollowerByIdUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
|
|
197
|
+
private __deleteFollowerById;
|
|
198
198
|
/**
|
|
199
199
|
* Retrieve a paginated list of following for User.
|
|
200
200
|
*
|
|
@@ -231,7 +231,7 @@ export declare class UsersClient {
|
|
|
231
231
|
retrieveFollowing(request: Forum.RetrieveFollowingUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<Forum.RetrieveFollowingUsersResponse>;
|
|
232
232
|
private __retrieveFollowing;
|
|
233
233
|
/**
|
|
234
|
-
* @param {Forum.
|
|
234
|
+
* @param {Forum.DeleteFollowingByIdUsersRequest} request
|
|
235
235
|
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
236
236
|
*
|
|
237
237
|
* @throws {@link Forum.UnauthorizedError}
|
|
@@ -240,11 +240,11 @@ export declare class UsersClient {
|
|
|
240
240
|
* @throws {@link Forum.InternalServerError}
|
|
241
241
|
*
|
|
242
242
|
* @example
|
|
243
|
-
* await client.users.
|
|
243
|
+
* await client.users.deleteFollowingById({
|
|
244
244
|
* id: "id",
|
|
245
245
|
* subId: "subId"
|
|
246
246
|
* })
|
|
247
247
|
*/
|
|
248
|
-
|
|
249
|
-
private
|
|
248
|
+
deleteFollowingById(request: Forum.DeleteFollowingByIdUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
|
|
249
|
+
private __deleteFollowingById;
|
|
250
250
|
}
|
|
@@ -607,7 +607,7 @@ export class UsersClient {
|
|
|
607
607
|
});
|
|
608
608
|
}
|
|
609
609
|
/**
|
|
610
|
-
* @param {Forum.
|
|
610
|
+
* @param {Forum.DeleteFollowerByIdUsersRequest} request
|
|
611
611
|
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
612
612
|
*
|
|
613
613
|
* @throws {@link Forum.UnauthorizedError}
|
|
@@ -616,15 +616,15 @@ export class UsersClient {
|
|
|
616
616
|
* @throws {@link Forum.InternalServerError}
|
|
617
617
|
*
|
|
618
618
|
* @example
|
|
619
|
-
* await client.users.
|
|
619
|
+
* await client.users.deleteFollowerById({
|
|
620
620
|
* id: "id",
|
|
621
621
|
* subId: "subId"
|
|
622
622
|
* })
|
|
623
623
|
*/
|
|
624
|
-
|
|
625
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
624
|
+
deleteFollowerById(request, requestOptions) {
|
|
625
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteFollowerById(request, requestOptions));
|
|
626
626
|
}
|
|
627
|
-
|
|
627
|
+
__deleteFollowerById(request, requestOptions) {
|
|
628
628
|
return __awaiter(this, void 0, void 0, function* () {
|
|
629
629
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
630
630
|
const { id, subId } = request;
|
|
@@ -789,7 +789,7 @@ export class UsersClient {
|
|
|
789
789
|
});
|
|
790
790
|
}
|
|
791
791
|
/**
|
|
792
|
-
* @param {Forum.
|
|
792
|
+
* @param {Forum.DeleteFollowingByIdUsersRequest} request
|
|
793
793
|
* @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
794
794
|
*
|
|
795
795
|
* @throws {@link Forum.UnauthorizedError}
|
|
@@ -798,15 +798,15 @@ export class UsersClient {
|
|
|
798
798
|
* @throws {@link Forum.InternalServerError}
|
|
799
799
|
*
|
|
800
800
|
* @example
|
|
801
|
-
* await client.users.
|
|
801
|
+
* await client.users.deleteFollowingById({
|
|
802
802
|
* id: "id",
|
|
803
803
|
* subId: "subId"
|
|
804
804
|
* })
|
|
805
805
|
*/
|
|
806
|
-
|
|
807
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
806
|
+
deleteFollowingById(request, requestOptions) {
|
|
807
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteFollowingById(request, requestOptions));
|
|
808
808
|
}
|
|
809
|
-
|
|
809
|
+
__deleteFollowingById(request, requestOptions) {
|
|
810
810
|
return __awaiter(this, void 0, void 0, function* () {
|
|
811
811
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
812
812
|
const { id, subId } = request;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { CreateFollowerUsersRequest } from "./CreateFollowerUsersRequest.mjs";
|
|
2
2
|
export type { CreateUsersRequest } from "./CreateUsersRequest.mjs";
|
|
3
|
-
export type {
|
|
4
|
-
export type {
|
|
3
|
+
export type { DeleteFollowerByIdUsersRequest } from "./DeleteFollowerByIdUsersRequest.mjs";
|
|
4
|
+
export type { DeleteFollowingByIdUsersRequest } from "./DeleteFollowingByIdUsersRequest.mjs";
|
|
5
5
|
export type { DeleteUsersRequest } from "./DeleteUsersRequest.mjs";
|
|
6
6
|
export type { ListFollowersUsersRequest } from "./ListFollowersUsersRequest.mjs";
|
|
7
7
|
export type { ListFollowingUsersRequest } from "./ListFollowingUsersRequest.mjs";
|
|
@@ -156,7 +156,7 @@ export declare class WebhooksClient {
|
|
|
156
156
|
retrieveDelivery(request: Forum.RetrieveDeliveryWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Forum.RetrieveDeliveryWebhooksResponse>;
|
|
157
157
|
private __retrieveDelivery;
|
|
158
158
|
/**
|
|
159
|
-
* @param {Forum.
|
|
159
|
+
* @param {Forum.DeleteDeliveryByIdWebhooksRequest} request
|
|
160
160
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
161
161
|
*
|
|
162
162
|
* @throws {@link Forum.UnauthorizedError}
|
|
@@ -165,11 +165,11 @@ export declare class WebhooksClient {
|
|
|
165
165
|
* @throws {@link Forum.InternalServerError}
|
|
166
166
|
*
|
|
167
167
|
* @example
|
|
168
|
-
* await client.webhooks.
|
|
168
|
+
* await client.webhooks.deleteDeliveryById({
|
|
169
169
|
* id: "id",
|
|
170
170
|
* subId: "subId"
|
|
171
171
|
* })
|
|
172
172
|
*/
|
|
173
|
-
|
|
174
|
-
private
|
|
173
|
+
deleteDeliveryById(request: Forum.DeleteDeliveryByIdWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
|
|
174
|
+
private __deleteDeliveryById;
|
|
175
175
|
}
|
|
@@ -496,7 +496,7 @@ export class WebhooksClient {
|
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
498
|
/**
|
|
499
|
-
* @param {Forum.
|
|
499
|
+
* @param {Forum.DeleteDeliveryByIdWebhooksRequest} request
|
|
500
500
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
501
501
|
*
|
|
502
502
|
* @throws {@link Forum.UnauthorizedError}
|
|
@@ -505,15 +505,15 @@ export class WebhooksClient {
|
|
|
505
505
|
* @throws {@link Forum.InternalServerError}
|
|
506
506
|
*
|
|
507
507
|
* @example
|
|
508
|
-
* await client.webhooks.
|
|
508
|
+
* await client.webhooks.deleteDeliveryById({
|
|
509
509
|
* id: "id",
|
|
510
510
|
* subId: "subId"
|
|
511
511
|
* })
|
|
512
512
|
*/
|
|
513
|
-
|
|
514
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
513
|
+
deleteDeliveryById(request, requestOptions) {
|
|
514
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteDeliveryById(request, requestOptions));
|
|
515
515
|
}
|
|
516
|
-
|
|
516
|
+
__deleteDeliveryById(request, requestOptions) {
|
|
517
517
|
return __awaiter(this, void 0, void 0, function* () {
|
|
518
518
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
519
519
|
const { id, subId } = request;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { CreateWebhooksRequest } from "./CreateWebhooksRequest.mjs";
|
|
2
|
-
export type {
|
|
2
|
+
export type { DeleteDeliveryByIdWebhooksRequest } from "./DeleteDeliveryByIdWebhooksRequest.mjs";
|
|
3
3
|
export type { DeleteWebhooksRequest } from "./DeleteWebhooksRequest.mjs";
|
|
4
4
|
export type { ListDeliveriesWebhooksRequest } from "./ListDeliveriesWebhooksRequest.mjs";
|
|
5
5
|
export type { ListWebhooksRequest } from "./ListWebhooksRequest.mjs";
|
|
@@ -102,6 +102,7 @@ export * from "./ThreadReactionListResponse.mjs";
|
|
|
102
102
|
export * from "./ThreadReactionResponse.mjs";
|
|
103
103
|
export * from "./ThreadResponse.mjs";
|
|
104
104
|
export * from "./ThreadSubscriber.mjs";
|
|
105
|
+
export * from "./ThreadSubscriberCreate.mjs";
|
|
105
106
|
export * from "./ThreadSubscriberListResponse.mjs";
|
|
106
107
|
export * from "./ThreadSubscriberResponse.mjs";
|
|
107
108
|
export * from "./ThreadUpdate.mjs";
|
|
@@ -102,6 +102,7 @@ export * from "./ThreadReactionListResponse.mjs";
|
|
|
102
102
|
export * from "./ThreadReactionResponse.mjs";
|
|
103
103
|
export * from "./ThreadResponse.mjs";
|
|
104
104
|
export * from "./ThreadSubscriber.mjs";
|
|
105
|
+
export * from "./ThreadSubscriberCreate.mjs";
|
|
105
106
|
export * from "./ThreadSubscriberListResponse.mjs";
|
|
106
107
|
export * from "./ThreadSubscriberResponse.mjs";
|
|
107
108
|
export * from "./ThreadUpdate.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.19";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "2.1.
|
|
1
|
+
export const SDK_VERSION = "2.1.19";
|