@foru-ms/sdk 2.1.17 → 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.
Files changed (112) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/posts/client/Client.d.ts +25 -7
  3. package/dist/cjs/api/resources/posts/client/Client.js +70 -10
  4. package/dist/cjs/api/resources/posts/client/requests/{DeletePostPostsRequest.d.ts → DeletePostByIdPostsRequest.d.ts} +1 -1
  5. package/dist/cjs/api/resources/posts/client/requests/DeleteReactionByIdPostsRequest.d.ts +13 -0
  6. package/dist/cjs/api/resources/posts/client/requests/DeleteReactionPostsRequest.d.ts +1 -4
  7. package/dist/cjs/api/resources/posts/client/requests/index.d.ts +2 -1
  8. package/dist/cjs/api/resources/privateMessages/client/Client.d.ts +4 -4
  9. package/dist/cjs/api/resources/privateMessages/client/Client.js +5 -5
  10. package/dist/{esm/api/resources/privateMessages/client/requests/DeleteReplyPrivateMessagesRequest.d.mts → cjs/api/resources/privateMessages/client/requests/DeleteReplyByIdPrivateMessagesRequest.d.ts} +1 -1
  11. package/dist/cjs/api/resources/privateMessages/client/requests/index.d.ts +1 -1
  12. package/dist/cjs/api/resources/tags/client/Client.d.ts +4 -4
  13. package/dist/cjs/api/resources/tags/client/Client.js +5 -5
  14. package/dist/{esm/api/resources/tags/client/requests/DeleteSubscriberTagsRequest.d.mts → cjs/api/resources/tags/client/requests/DeleteSubscriberByIdTagsRequest.d.ts} +1 -1
  15. package/dist/cjs/api/resources/tags/client/requests/index.d.ts +1 -1
  16. package/dist/cjs/api/resources/threads/client/Client.d.ts +48 -11
  17. package/dist/cjs/api/resources/threads/client/Client.js +141 -15
  18. package/dist/cjs/api/resources/threads/client/requests/CreateSubscriberThreadsRequest.d.ts +12 -0
  19. package/dist/{esm/api/resources/threads/client/requests/DeletePostThreadsRequest.d.mts → cjs/api/resources/threads/client/requests/DeletePostByIdThreadsRequest.d.ts} +1 -1
  20. package/dist/cjs/api/resources/threads/client/requests/DeleteReactionByIdThreadsRequest.d.ts +13 -0
  21. package/dist/cjs/api/resources/threads/client/requests/DeleteReactionThreadsRequest.d.ts +1 -4
  22. package/dist/cjs/api/resources/threads/client/requests/{DeleteSubscriberThreadsRequest.d.ts → DeleteSubscriberByIdThreadsRequest.d.ts} +1 -1
  23. package/dist/cjs/api/resources/threads/client/requests/index.d.ts +4 -2
  24. package/dist/cjs/api/resources/threads/types/UpdateThreadsResponse.d.ts +2 -0
  25. package/dist/cjs/api/resources/users/client/Client.d.ts +8 -8
  26. package/dist/cjs/api/resources/users/client/Client.js +10 -10
  27. package/dist/{esm/api/resources/users/client/requests/DeleteFollowerUsersRequest.d.mts → cjs/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.d.ts} +1 -1
  28. package/dist/cjs/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.js +3 -0
  29. package/dist/cjs/api/resources/users/client/requests/{DeleteFollowingUsersRequest.d.ts → DeleteFollowingByIdUsersRequest.d.ts} +1 -1
  30. package/dist/cjs/api/resources/users/client/requests/DeleteFollowingByIdUsersRequest.js +3 -0
  31. package/dist/cjs/api/resources/users/client/requests/index.d.ts +2 -2
  32. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +4 -4
  33. package/dist/cjs/api/resources/webhooks/client/Client.js +5 -5
  34. package/dist/cjs/api/resources/webhooks/client/requests/{DeleteDeliveryWebhooksRequest.d.ts → DeleteDeliveryByIdWebhooksRequest.d.ts} +1 -1
  35. package/dist/cjs/api/resources/webhooks/client/requests/DeleteDeliveryByIdWebhooksRequest.js +3 -0
  36. package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +1 -1
  37. package/dist/cjs/api/types/ThreadListResponse.d.ts +2 -0
  38. package/dist/cjs/api/types/ThreadPoll.d.ts +2 -0
  39. package/dist/cjs/api/types/ThreadPollListResponse.d.ts +2 -0
  40. package/dist/cjs/api/types/ThreadPollResponse.d.ts +2 -0
  41. package/dist/cjs/api/types/ThreadResponse.d.ts +2 -0
  42. package/dist/cjs/api/types/ThreadSubscriberCreate.d.ts +4 -0
  43. package/dist/cjs/api/types/ThreadSubscriberCreate.js +3 -0
  44. package/dist/cjs/api/types/index.d.ts +1 -0
  45. package/dist/cjs/api/types/index.js +1 -0
  46. package/dist/cjs/version.d.ts +1 -1
  47. package/dist/cjs/version.js +1 -1
  48. package/dist/esm/BaseClient.mjs +2 -2
  49. package/dist/esm/api/resources/posts/client/Client.d.mts +25 -7
  50. package/dist/esm/api/resources/posts/client/Client.mjs +70 -10
  51. package/dist/esm/api/resources/posts/client/requests/{DeletePostPostsRequest.d.mts → DeletePostByIdPostsRequest.d.mts} +1 -1
  52. package/dist/esm/api/resources/posts/client/requests/DeleteReactionByIdPostsRequest.d.mts +13 -0
  53. package/dist/esm/api/resources/posts/client/requests/DeleteReactionPostsRequest.d.mts +1 -4
  54. package/dist/esm/api/resources/posts/client/requests/index.d.mts +2 -1
  55. package/dist/esm/api/resources/privateMessages/client/Client.d.mts +4 -4
  56. package/dist/esm/api/resources/privateMessages/client/Client.mjs +5 -5
  57. package/dist/{cjs/api/resources/privateMessages/client/requests/DeleteReplyPrivateMessagesRequest.d.ts → esm/api/resources/privateMessages/client/requests/DeleteReplyByIdPrivateMessagesRequest.d.mts} +1 -1
  58. package/dist/esm/api/resources/privateMessages/client/requests/index.d.mts +1 -1
  59. package/dist/esm/api/resources/tags/client/Client.d.mts +4 -4
  60. package/dist/esm/api/resources/tags/client/Client.mjs +5 -5
  61. package/dist/{cjs/api/resources/tags/client/requests/DeleteSubscriberTagsRequest.d.ts → esm/api/resources/tags/client/requests/DeleteSubscriberByIdTagsRequest.d.mts} +1 -1
  62. package/dist/esm/api/resources/tags/client/requests/index.d.mts +1 -1
  63. package/dist/esm/api/resources/threads/client/Client.d.mts +48 -11
  64. package/dist/esm/api/resources/threads/client/Client.mjs +141 -15
  65. package/dist/esm/api/resources/threads/client/requests/CreateSubscriberThreadsRequest.d.mts +12 -0
  66. package/dist/{cjs/api/resources/threads/client/requests/DeletePostThreadsRequest.d.ts → esm/api/resources/threads/client/requests/DeletePostByIdThreadsRequest.d.mts} +1 -1
  67. package/dist/esm/api/resources/threads/client/requests/DeleteReactionByIdThreadsRequest.d.mts +13 -0
  68. package/dist/esm/api/resources/threads/client/requests/DeleteReactionThreadsRequest.d.mts +1 -4
  69. package/dist/esm/api/resources/threads/client/requests/{DeleteSubscriberThreadsRequest.d.mts → DeleteSubscriberByIdThreadsRequest.d.mts} +1 -1
  70. package/dist/esm/api/resources/threads/client/requests/index.d.mts +4 -2
  71. package/dist/esm/api/resources/threads/types/UpdateThreadsResponse.d.mts +2 -0
  72. package/dist/esm/api/resources/users/client/Client.d.mts +8 -8
  73. package/dist/esm/api/resources/users/client/Client.mjs +10 -10
  74. package/dist/{cjs/api/resources/users/client/requests/DeleteFollowerUsersRequest.d.ts → esm/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.d.mts} +1 -1
  75. package/dist/esm/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.mjs +2 -0
  76. package/dist/esm/api/resources/users/client/requests/{DeleteFollowingUsersRequest.d.mts → DeleteFollowingByIdUsersRequest.d.mts} +1 -1
  77. package/dist/esm/api/resources/users/client/requests/DeleteFollowingByIdUsersRequest.mjs +2 -0
  78. package/dist/esm/api/resources/users/client/requests/index.d.mts +2 -2
  79. package/dist/esm/api/resources/webhooks/client/Client.d.mts +4 -4
  80. package/dist/esm/api/resources/webhooks/client/Client.mjs +5 -5
  81. package/dist/esm/api/resources/webhooks/client/requests/{DeleteDeliveryWebhooksRequest.d.mts → DeleteDeliveryByIdWebhooksRequest.d.mts} +1 -1
  82. package/dist/esm/api/resources/webhooks/client/requests/DeleteDeliveryByIdWebhooksRequest.mjs +2 -0
  83. package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +1 -1
  84. package/dist/esm/api/types/ThreadListResponse.d.mts +2 -0
  85. package/dist/esm/api/types/ThreadPoll.d.mts +2 -0
  86. package/dist/esm/api/types/ThreadPollListResponse.d.mts +2 -0
  87. package/dist/esm/api/types/ThreadPollResponse.d.mts +2 -0
  88. package/dist/esm/api/types/ThreadResponse.d.mts +2 -0
  89. package/dist/esm/api/types/ThreadSubscriberCreate.d.mts +4 -0
  90. package/dist/esm/api/types/ThreadSubscriberCreate.mjs +2 -0
  91. package/dist/esm/api/types/index.d.mts +1 -0
  92. package/dist/esm/api/types/index.mjs +1 -0
  93. package/dist/esm/version.d.mts +1 -1
  94. package/dist/esm/version.mjs +1 -1
  95. package/package.json +1 -1
  96. package/reference.md +225 -30
  97. /package/dist/cjs/api/resources/posts/client/requests/{DeletePostPostsRequest.js → DeletePostByIdPostsRequest.js} +0 -0
  98. /package/dist/cjs/api/resources/{privateMessages/client/requests/DeleteReplyPrivateMessagesRequest.js → posts/client/requests/DeleteReactionByIdPostsRequest.js} +0 -0
  99. /package/dist/cjs/api/resources/{tags/client/requests/DeleteSubscriberTagsRequest.js → privateMessages/client/requests/DeleteReplyByIdPrivateMessagesRequest.js} +0 -0
  100. /package/dist/cjs/api/resources/{threads/client/requests/DeletePostThreadsRequest.js → tags/client/requests/DeleteSubscriberByIdTagsRequest.js} +0 -0
  101. /package/dist/cjs/api/resources/threads/client/requests/{DeleteSubscriberThreadsRequest.js → CreateSubscriberThreadsRequest.js} +0 -0
  102. /package/dist/cjs/api/resources/{users/client/requests/DeleteFollowerUsersRequest.js → threads/client/requests/DeletePostByIdThreadsRequest.js} +0 -0
  103. /package/dist/cjs/api/resources/{users/client/requests/DeleteFollowingUsersRequest.js → threads/client/requests/DeleteReactionByIdThreadsRequest.js} +0 -0
  104. /package/dist/cjs/api/resources/{webhooks/client/requests/DeleteDeliveryWebhooksRequest.js → threads/client/requests/DeleteSubscriberByIdThreadsRequest.js} +0 -0
  105. /package/dist/esm/api/resources/posts/client/requests/{DeletePostPostsRequest.mjs → DeletePostByIdPostsRequest.mjs} +0 -0
  106. /package/dist/esm/api/resources/{privateMessages/client/requests/DeleteReplyPrivateMessagesRequest.mjs → posts/client/requests/DeleteReactionByIdPostsRequest.mjs} +0 -0
  107. /package/dist/esm/api/resources/{tags/client/requests/DeleteSubscriberTagsRequest.mjs → privateMessages/client/requests/DeleteReplyByIdPrivateMessagesRequest.mjs} +0 -0
  108. /package/dist/esm/api/resources/{threads/client/requests/DeletePostThreadsRequest.mjs → tags/client/requests/DeleteSubscriberByIdTagsRequest.mjs} +0 -0
  109. /package/dist/esm/api/resources/threads/client/requests/{DeleteSubscriberThreadsRequest.mjs → CreateSubscriberThreadsRequest.mjs} +0 -0
  110. /package/dist/esm/api/resources/{users/client/requests/DeleteFollowerUsersRequest.mjs → threads/client/requests/DeletePostByIdThreadsRequest.mjs} +0 -0
  111. /package/dist/esm/api/resources/{users/client/requests/DeleteFollowingUsersRequest.mjs → threads/client/requests/DeleteReactionByIdThreadsRequest.mjs} +0 -0
  112. /package/dist/esm/api/resources/{webhooks/client/requests/DeleteDeliveryWebhooksRequest.mjs → threads/client/requests/DeleteSubscriberByIdThreadsRequest.mjs} +0 -0
@@ -524,7 +524,7 @@ class ThreadsClient {
524
524
  });
525
525
  }
526
526
  /**
527
- * @param {Forum.DeletePostThreadsRequest} request
527
+ * @param {Forum.DeletePostByIdThreadsRequest} request
528
528
  * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
529
529
  *
530
530
  * @throws {@link Forum.UnauthorizedError}
@@ -533,15 +533,15 @@ class ThreadsClient {
533
533
  * @throws {@link Forum.InternalServerError}
534
534
  *
535
535
  * @example
536
- * await client.threads.deletePost({
536
+ * await client.threads.deletePostById({
537
537
  * id: "id",
538
538
  * subId: "subId"
539
539
  * })
540
540
  */
541
- deletePost(request, requestOptions) {
542
- return core.HttpResponsePromise.fromPromise(this.__deletePost(request, requestOptions));
541
+ deletePostById(request, requestOptions) {
542
+ return core.HttpResponsePromise.fromPromise(this.__deletePostById(request, requestOptions));
543
543
  }
544
- __deletePost(request, requestOptions) {
544
+ __deletePostById(request, requestOptions) {
545
545
  return __awaiter(this, void 0, void 0, function* () {
546
546
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
547
547
  const { id, subId } = request;
@@ -715,6 +715,8 @@ class ThreadsClient {
715
715
  });
716
716
  }
717
717
  /**
718
+ * Removes the authenticated user's reaction. No subId needed.
719
+ *
718
720
  * @param {Forum.DeleteReactionThreadsRequest} request
719
721
  * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
720
722
  *
@@ -725,8 +727,7 @@ class ThreadsClient {
725
727
  *
726
728
  * @example
727
729
  * await client.threads.deleteReaction({
728
- * id: "id",
729
- * subId: "subId"
730
+ * id: "id"
730
731
  * })
731
732
  */
732
733
  deleteReaction(request, requestOptions) {
@@ -735,11 +736,11 @@ class ThreadsClient {
735
736
  __deleteReaction(request, requestOptions) {
736
737
  return __awaiter(this, void 0, void 0, function* () {
737
738
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
738
- const { id, subId } = request;
739
+ const { id } = request;
739
740
  const _authRequest = yield this._options.authProvider.getAuthRequest();
740
741
  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);
741
742
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
742
- 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)}`),
743
+ 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`),
743
744
  method: "DELETE",
744
745
  headers: _headers,
745
746
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -770,7 +771,7 @@ class ThreadsClient {
770
771
  });
771
772
  }
772
773
  }
773
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/threads/{id}/reactions/{subId}");
774
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/threads/{id}/reactions");
774
775
  });
775
776
  }
776
777
  /**
@@ -835,6 +836,65 @@ class ThreadsClient {
835
836
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/threads/{id}/reactions/{subId}");
836
837
  });
837
838
  }
839
+ /**
840
+ * @param {Forum.DeleteReactionByIdThreadsRequest} request
841
+ * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
842
+ *
843
+ * @throws {@link Forum.UnauthorizedError}
844
+ * @throws {@link Forum.NotFoundError}
845
+ * @throws {@link Forum.TooManyRequestsError}
846
+ * @throws {@link Forum.InternalServerError}
847
+ *
848
+ * @example
849
+ * await client.threads.deleteReactionById({
850
+ * id: "id",
851
+ * subId: "subId"
852
+ * })
853
+ */
854
+ deleteReactionById(request, requestOptions) {
855
+ return core.HttpResponsePromise.fromPromise(this.__deleteReactionById(request, requestOptions));
856
+ }
857
+ __deleteReactionById(request, requestOptions) {
858
+ return __awaiter(this, void 0, void 0, function* () {
859
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
860
+ const { id, subId } = request;
861
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
862
+ 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);
863
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
864
+ 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)}`),
865
+ method: "DELETE",
866
+ headers: _headers,
867
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
868
+ 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,
869
+ 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,
870
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
871
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
872
+ logging: this._options.logging,
873
+ });
874
+ if (_response.ok) {
875
+ return { data: _response.body, rawResponse: _response.rawResponse };
876
+ }
877
+ if (_response.error.reason === "status-code") {
878
+ switch (_response.error.statusCode) {
879
+ case 401:
880
+ throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
881
+ case 404:
882
+ throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
883
+ case 429:
884
+ throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
885
+ case 500:
886
+ throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
887
+ default:
888
+ throw new errors.ForumError({
889
+ statusCode: _response.error.statusCode,
890
+ body: _response.error.body,
891
+ rawResponse: _response.rawResponse,
892
+ });
893
+ }
894
+ }
895
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/threads/{id}/reactions/{subId}");
896
+ });
897
+ }
838
898
  /**
839
899
  * Retrieve a paginated list of subscribers for Thread.
840
900
  *
@@ -899,6 +959,72 @@ class ThreadsClient {
899
959
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/threads/{id}/subscribers");
900
960
  });
901
961
  }
962
+ /**
963
+ * Create a Subscriber in Thread.
964
+ *
965
+ * @param {Forum.CreateSubscriberThreadsRequest} request
966
+ * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
967
+ *
968
+ * @throws {@link Forum.BadRequestError}
969
+ * @throws {@link Forum.UnauthorizedError}
970
+ * @throws {@link Forum.NotFoundError}
971
+ * @throws {@link Forum.TooManyRequestsError}
972
+ * @throws {@link Forum.InternalServerError}
973
+ *
974
+ * @example
975
+ * await client.threads.createSubscriber({
976
+ * id: "id"
977
+ * })
978
+ */
979
+ createSubscriber(request, requestOptions) {
980
+ return core.HttpResponsePromise.fromPromise(this.__createSubscriber(request, requestOptions));
981
+ }
982
+ __createSubscriber(request, requestOptions) {
983
+ return __awaiter(this, void 0, void 0, function* () {
984
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
985
+ const { id } = request, _body = __rest(request, ["id"]);
986
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
987
+ 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);
988
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
989
+ 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`),
990
+ method: "POST",
991
+ headers: _headers,
992
+ contentType: "application/json",
993
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
994
+ requestType: "json",
995
+ body: _body,
996
+ 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,
997
+ 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,
998
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
999
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1000
+ logging: this._options.logging,
1001
+ });
1002
+ if (_response.ok) {
1003
+ return { data: _response.body, rawResponse: _response.rawResponse };
1004
+ }
1005
+ if (_response.error.reason === "status-code") {
1006
+ switch (_response.error.statusCode) {
1007
+ case 400:
1008
+ throw new Forum.BadRequestError(_response.error.body, _response.rawResponse);
1009
+ case 401:
1010
+ throw new Forum.UnauthorizedError(_response.error.body, _response.rawResponse);
1011
+ case 404:
1012
+ throw new Forum.NotFoundError(_response.error.body, _response.rawResponse);
1013
+ case 429:
1014
+ throw new Forum.TooManyRequestsError(_response.error.body, _response.rawResponse);
1015
+ case 500:
1016
+ throw new Forum.InternalServerError(_response.error.body, _response.rawResponse);
1017
+ default:
1018
+ throw new errors.ForumError({
1019
+ statusCode: _response.error.statusCode,
1020
+ body: _response.error.body,
1021
+ rawResponse: _response.rawResponse,
1022
+ });
1023
+ }
1024
+ }
1025
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/threads/{id}/subscribers");
1026
+ });
1027
+ }
902
1028
  /**
903
1029
  * Unsubscribe from this thread. Removes the authenticated user's subscription. No subId needed.
904
1030
  *
@@ -1022,7 +1148,7 @@ class ThreadsClient {
1022
1148
  });
1023
1149
  }
1024
1150
  /**
1025
- * @param {Forum.DeleteSubscriberThreadsRequest} request
1151
+ * @param {Forum.DeleteSubscriberByIdThreadsRequest} request
1026
1152
  * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
1027
1153
  *
1028
1154
  * @throws {@link Forum.UnauthorizedError}
@@ -1031,15 +1157,15 @@ class ThreadsClient {
1031
1157
  * @throws {@link Forum.InternalServerError}
1032
1158
  *
1033
1159
  * @example
1034
- * await client.threads.deleteSubscriber({
1160
+ * await client.threads.deleteSubscriberById({
1035
1161
  * id: "id",
1036
1162
  * subId: "subId"
1037
1163
  * })
1038
1164
  */
1039
- deleteSubscriber(request, requestOptions) {
1040
- return core.HttpResponsePromise.fromPromise(this.__deleteSubscriber(request, requestOptions));
1165
+ deleteSubscriberById(request, requestOptions) {
1166
+ return core.HttpResponsePromise.fromPromise(this.__deleteSubscriberById(request, requestOptions));
1041
1167
  }
1042
- __deleteSubscriber(request, requestOptions) {
1168
+ __deleteSubscriberById(request, requestOptions) {
1043
1169
  return __awaiter(this, void 0, void 0, function* () {
1044
1170
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1045
1171
  const { id, subId } = request;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "id"
5
+ * }
6
+ */
7
+ export interface CreateSubscriberThreadsRequest {
8
+ /** Thread ID */
9
+ id: string;
10
+ /** Optional custom data */
11
+ extendedData?: Record<string, unknown>;
12
+ }
@@ -5,7 +5,7 @@
5
5
  * subId: "subId"
6
6
  * }
7
7
  */
8
- export interface DeletePostThreadsRequest {
8
+ export interface DeletePostByIdThreadsRequest {
9
9
  /** Thread ID */
10
10
  id: string;
11
11
  /** Post ID */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "id",
5
+ * subId: "subId"
6
+ * }
7
+ */
8
+ export interface DeleteReactionByIdThreadsRequest {
9
+ /** Thread ID */
10
+ id: string;
11
+ /** Reaction ID */
12
+ subId: string;
13
+ }
@@ -1,13 +1,10 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * id: "id",
5
- * subId: "subId"
4
+ * id: "id"
6
5
  * }
7
6
  */
8
7
  export interface DeleteReactionThreadsRequest {
9
8
  /** Thread ID */
10
9
  id: string;
11
- /** Reaction ID */
12
- subId: string;
13
10
  }
@@ -5,7 +5,7 @@
5
5
  * subId: "subId"
6
6
  * }
7
7
  */
8
- export interface DeleteSubscriberThreadsRequest {
8
+ export interface DeleteSubscriberByIdThreadsRequest {
9
9
  /** Thread ID */
10
10
  id: string;
11
11
  /** Subscriber ID */
@@ -1,12 +1,14 @@
1
1
  export type { CreatePollThreadsRequest } from "./CreatePollThreadsRequest.js";
2
2
  export type { CreatePollVoteThreadsRequest } from "./CreatePollVoteThreadsRequest.js";
3
3
  export { CreateReactionThreadsRequest } from "./CreateReactionThreadsRequest.js";
4
+ export type { CreateSubscriberThreadsRequest } from "./CreateSubscriberThreadsRequest.js";
4
5
  export type { CreateThreadsRequest } from "./CreateThreadsRequest.js";
5
6
  export type { DeleteOwnPollVoteThreadsRequest } from "./DeleteOwnPollVoteThreadsRequest.js";
6
7
  export type { DeletePollVoteThreadsRequest } from "./DeletePollVoteThreadsRequest.js";
7
- export type { DeletePostThreadsRequest } from "./DeletePostThreadsRequest.js";
8
+ export type { DeletePostByIdThreadsRequest } from "./DeletePostByIdThreadsRequest.js";
9
+ export type { DeleteReactionByIdThreadsRequest } from "./DeleteReactionByIdThreadsRequest.js";
8
10
  export type { DeleteReactionThreadsRequest } from "./DeleteReactionThreadsRequest.js";
9
- export type { DeleteSubscriberThreadsRequest } from "./DeleteSubscriberThreadsRequest.js";
11
+ export type { DeleteSubscriberByIdThreadsRequest } from "./DeleteSubscriberByIdThreadsRequest.js";
10
12
  export type { DeleteThreadsRequest } from "./DeleteThreadsRequest.js";
11
13
  export type { ListPollVotesThreadsRequest } from "./ListPollVotesThreadsRequest.js";
12
14
  export type { ListPostsThreadsRequest } from "./ListPostsThreadsRequest.js";
@@ -63,6 +63,8 @@ export declare namespace UpdateThreadsResponse {
63
63
  expiresAt: string | null;
64
64
  totalVotes: number;
65
65
  options: Poll.Options.Item[];
66
+ /** The option ID that the current user voted for, or null if they haven't voted */
67
+ userVote: string | null;
66
68
  createdAt: string;
67
69
  updatedAt: string;
68
70
  }
@@ -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.DeleteFollowerUsersRequest} request
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.deleteFollower({
191
+ * await client.users.deleteFollowerById({
192
192
  * id: "id",
193
193
  * subId: "subId"
194
194
  * })
195
195
  */
196
- deleteFollower(request: Forum.DeleteFollowerUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
197
- private __deleteFollower;
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.DeleteFollowingUsersRequest} request
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.deleteFollowing({
243
+ * await client.users.deleteFollowingById({
244
244
  * id: "id",
245
245
  * subId: "subId"
246
246
  * })
247
247
  */
248
- deleteFollowing(request: Forum.DeleteFollowingUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
249
- private __deleteFollowing;
248
+ deleteFollowingById(request: Forum.DeleteFollowingByIdUsersRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
249
+ private __deleteFollowingById;
250
250
  }
@@ -643,7 +643,7 @@ class UsersClient {
643
643
  });
644
644
  }
645
645
  /**
646
- * @param {Forum.DeleteFollowerUsersRequest} request
646
+ * @param {Forum.DeleteFollowerByIdUsersRequest} request
647
647
  * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
648
648
  *
649
649
  * @throws {@link Forum.UnauthorizedError}
@@ -652,15 +652,15 @@ class UsersClient {
652
652
  * @throws {@link Forum.InternalServerError}
653
653
  *
654
654
  * @example
655
- * await client.users.deleteFollower({
655
+ * await client.users.deleteFollowerById({
656
656
  * id: "id",
657
657
  * subId: "subId"
658
658
  * })
659
659
  */
660
- deleteFollower(request, requestOptions) {
661
- return core.HttpResponsePromise.fromPromise(this.__deleteFollower(request, requestOptions));
660
+ deleteFollowerById(request, requestOptions) {
661
+ return core.HttpResponsePromise.fromPromise(this.__deleteFollowerById(request, requestOptions));
662
662
  }
663
- __deleteFollower(request, requestOptions) {
663
+ __deleteFollowerById(request, requestOptions) {
664
664
  return __awaiter(this, void 0, void 0, function* () {
665
665
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
666
666
  const { id, subId } = request;
@@ -825,7 +825,7 @@ class UsersClient {
825
825
  });
826
826
  }
827
827
  /**
828
- * @param {Forum.DeleteFollowingUsersRequest} request
828
+ * @param {Forum.DeleteFollowingByIdUsersRequest} request
829
829
  * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
830
830
  *
831
831
  * @throws {@link Forum.UnauthorizedError}
@@ -834,15 +834,15 @@ class UsersClient {
834
834
  * @throws {@link Forum.InternalServerError}
835
835
  *
836
836
  * @example
837
- * await client.users.deleteFollowing({
837
+ * await client.users.deleteFollowingById({
838
838
  * id: "id",
839
839
  * subId: "subId"
840
840
  * })
841
841
  */
842
- deleteFollowing(request, requestOptions) {
843
- return core.HttpResponsePromise.fromPromise(this.__deleteFollowing(request, requestOptions));
842
+ deleteFollowingById(request, requestOptions) {
843
+ return core.HttpResponsePromise.fromPromise(this.__deleteFollowingById(request, requestOptions));
844
844
  }
845
- __deleteFollowing(request, requestOptions) {
845
+ __deleteFollowingById(request, requestOptions) {
846
846
  return __awaiter(this, void 0, void 0, function* () {
847
847
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
848
848
  const { id, subId } = request;
@@ -5,7 +5,7 @@
5
5
  * subId: "subId"
6
6
  * }
7
7
  */
8
- export interface DeleteFollowerUsersRequest {
8
+ export interface DeleteFollowerByIdUsersRequest {
9
9
  /** User ID */
10
10
  id: string;
11
11
  /** Follower ID */
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,7 +5,7 @@
5
5
  * subId: "subId"
6
6
  * }
7
7
  */
8
- export interface DeleteFollowingUsersRequest {
8
+ export interface DeleteFollowingByIdUsersRequest {
9
9
  /** User ID */
10
10
  id: string;
11
11
  /** Following ID */
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,7 @@
1
1
  export type { CreateFollowerUsersRequest } from "./CreateFollowerUsersRequest.js";
2
2
  export type { CreateUsersRequest } from "./CreateUsersRequest.js";
3
- export type { DeleteFollowerUsersRequest } from "./DeleteFollowerUsersRequest.js";
4
- export type { DeleteFollowingUsersRequest } from "./DeleteFollowingUsersRequest.js";
3
+ export type { DeleteFollowerByIdUsersRequest } from "./DeleteFollowerByIdUsersRequest.js";
4
+ export type { DeleteFollowingByIdUsersRequest } from "./DeleteFollowingByIdUsersRequest.js";
5
5
  export type { DeleteUsersRequest } from "./DeleteUsersRequest.js";
6
6
  export type { ListFollowersUsersRequest } from "./ListFollowersUsersRequest.js";
7
7
  export type { ListFollowingUsersRequest } from "./ListFollowingUsersRequest.js";
@@ -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.DeleteDeliveryWebhooksRequest} request
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.deleteDelivery({
168
+ * await client.webhooks.deleteDeliveryById({
169
169
  * id: "id",
170
170
  * subId: "subId"
171
171
  * })
172
172
  */
173
- deleteDelivery(request: Forum.DeleteDeliveryWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
174
- private __deleteDelivery;
173
+ deleteDeliveryById(request: Forum.DeleteDeliveryByIdWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Forum.SuccessResponse>;
174
+ private __deleteDeliveryById;
175
175
  }
@@ -532,7 +532,7 @@ class WebhooksClient {
532
532
  });
533
533
  }
534
534
  /**
535
- * @param {Forum.DeleteDeliveryWebhooksRequest} request
535
+ * @param {Forum.DeleteDeliveryByIdWebhooksRequest} request
536
536
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
537
537
  *
538
538
  * @throws {@link Forum.UnauthorizedError}
@@ -541,15 +541,15 @@ class WebhooksClient {
541
541
  * @throws {@link Forum.InternalServerError}
542
542
  *
543
543
  * @example
544
- * await client.webhooks.deleteDelivery({
544
+ * await client.webhooks.deleteDeliveryById({
545
545
  * id: "id",
546
546
  * subId: "subId"
547
547
  * })
548
548
  */
549
- deleteDelivery(request, requestOptions) {
550
- return core.HttpResponsePromise.fromPromise(this.__deleteDelivery(request, requestOptions));
549
+ deleteDeliveryById(request, requestOptions) {
550
+ return core.HttpResponsePromise.fromPromise(this.__deleteDeliveryById(request, requestOptions));
551
551
  }
552
- __deleteDelivery(request, requestOptions) {
552
+ __deleteDeliveryById(request, requestOptions) {
553
553
  return __awaiter(this, void 0, void 0, function* () {
554
554
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
555
555
  const { id, subId } = request;
@@ -5,7 +5,7 @@
5
5
  * subId: "subId"
6
6
  * }
7
7
  */
8
- export interface DeleteDeliveryWebhooksRequest {
8
+ export interface DeleteDeliveryByIdWebhooksRequest {
9
9
  /** Webhook ID */
10
10
  id: string;
11
11
  /** Delivery ID */
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,5 @@
1
1
  export type { CreateWebhooksRequest } from "./CreateWebhooksRequest.js";
2
- export type { DeleteDeliveryWebhooksRequest } from "./DeleteDeliveryWebhooksRequest.js";
2
+ export type { DeleteDeliveryByIdWebhooksRequest } from "./DeleteDeliveryByIdWebhooksRequest.js";
3
3
  export type { DeleteWebhooksRequest } from "./DeleteWebhooksRequest.js";
4
4
  export type { ListDeliveriesWebhooksRequest } from "./ListDeliveriesWebhooksRequest.js";
5
5
  export type { ListWebhooksRequest } from "./ListWebhooksRequest.js";
@@ -73,6 +73,8 @@ export declare namespace ThreadListResponse {
73
73
  expiresAt: string | null;
74
74
  totalVotes: number;
75
75
  options: Poll.Options.Item[];
76
+ /** The option ID that the current user voted for, or null if they haven't voted */
77
+ userVote: string | null;
76
78
  createdAt: string;
77
79
  updatedAt: string;
78
80
  }
@@ -6,6 +6,8 @@ export interface ThreadPoll {
6
6
  expiresAt: string | null;
7
7
  totalVotes: number;
8
8
  options: ThreadPoll.Options.Item[];
9
+ /** The option ID that the current user voted for, or null if they haven't voted */
10
+ userVote: string | null;
9
11
  createdAt: string;
10
12
  updatedAt: string;
11
13
  }
@@ -18,6 +18,8 @@ export declare namespace ThreadPollListResponse {
18
18
  expiresAt: string | null;
19
19
  totalVotes: number;
20
20
  options: Item.Options.Item[];
21
+ /** The option ID that the current user voted for, or null if they haven't voted */
22
+ userVote: string | null;
21
23
  createdAt: string;
22
24
  updatedAt: string;
23
25
  }
@@ -10,6 +10,8 @@ export declare namespace ThreadPollResponse {
10
10
  expiresAt: string | null;
11
11
  totalVotes: number;
12
12
  options: Data.Options.Item[];
13
+ /** The option ID that the current user voted for, or null if they haven't voted */
14
+ userVote: string | null;
13
15
  createdAt: string;
14
16
  updatedAt: string;
15
17
  }
@@ -63,6 +63,8 @@ export declare namespace ThreadResponse {
63
63
  expiresAt: string | null;
64
64
  totalVotes: number;
65
65
  options: Poll.Options.Item[];
66
+ /** The option ID that the current user voted for, or null if they haven't voted */
67
+ userVote: string | null;
66
68
  createdAt: string;
67
69
  updatedAt: string;
68
70
  }
@@ -0,0 +1,4 @@
1
+ export interface ThreadSubscriberCreate {
2
+ /** Optional custom data */
3
+ extendedData?: Record<string, unknown>;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -102,6 +102,7 @@ export * from "./ThreadReactionListResponse.js";
102
102
  export * from "./ThreadReactionResponse.js";
103
103
  export * from "./ThreadResponse.js";
104
104
  export * from "./ThreadSubscriber.js";
105
+ export * from "./ThreadSubscriberCreate.js";
105
106
  export * from "./ThreadSubscriberListResponse.js";
106
107
  export * from "./ThreadSubscriberResponse.js";
107
108
  export * from "./ThreadUpdate.js";
@@ -118,6 +118,7 @@ __exportStar(require("./ThreadReactionListResponse.js"), exports);
118
118
  __exportStar(require("./ThreadReactionResponse.js"), exports);
119
119
  __exportStar(require("./ThreadResponse.js"), exports);
120
120
  __exportStar(require("./ThreadSubscriber.js"), exports);
121
+ __exportStar(require("./ThreadSubscriberCreate.js"), exports);
121
122
  __exportStar(require("./ThreadSubscriberListResponse.js"), exports);
122
123
  __exportStar(require("./ThreadSubscriberResponse.js"), exports);
123
124
  __exportStar(require("./ThreadUpdate.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.1.17";
1
+ export declare const SDK_VERSION = "2.1.19";