@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.
Files changed (100) 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/users/client/Client.d.ts +8 -8
  25. package/dist/cjs/api/resources/users/client/Client.js +10 -10
  26. package/dist/{esm/api/resources/users/client/requests/DeleteFollowerUsersRequest.d.mts → cjs/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.d.ts} +1 -1
  27. package/dist/cjs/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.js +3 -0
  28. package/dist/cjs/api/resources/users/client/requests/{DeleteFollowingUsersRequest.d.ts → DeleteFollowingByIdUsersRequest.d.ts} +1 -1
  29. package/dist/cjs/api/resources/users/client/requests/DeleteFollowingByIdUsersRequest.js +3 -0
  30. package/dist/cjs/api/resources/users/client/requests/index.d.ts +2 -2
  31. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +4 -4
  32. package/dist/cjs/api/resources/webhooks/client/Client.js +5 -5
  33. package/dist/cjs/api/resources/webhooks/client/requests/{DeleteDeliveryWebhooksRequest.d.ts → DeleteDeliveryByIdWebhooksRequest.d.ts} +1 -1
  34. package/dist/cjs/api/resources/webhooks/client/requests/DeleteDeliveryByIdWebhooksRequest.js +3 -0
  35. package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +1 -1
  36. package/dist/cjs/api/types/ThreadSubscriberCreate.d.ts +4 -0
  37. package/dist/cjs/api/types/ThreadSubscriberCreate.js +3 -0
  38. package/dist/cjs/api/types/index.d.ts +1 -0
  39. package/dist/cjs/api/types/index.js +1 -0
  40. package/dist/cjs/version.d.ts +1 -1
  41. package/dist/cjs/version.js +1 -1
  42. package/dist/esm/BaseClient.mjs +2 -2
  43. package/dist/esm/api/resources/posts/client/Client.d.mts +25 -7
  44. package/dist/esm/api/resources/posts/client/Client.mjs +70 -10
  45. package/dist/esm/api/resources/posts/client/requests/{DeletePostPostsRequest.d.mts → DeletePostByIdPostsRequest.d.mts} +1 -1
  46. package/dist/esm/api/resources/posts/client/requests/DeleteReactionByIdPostsRequest.d.mts +13 -0
  47. package/dist/esm/api/resources/posts/client/requests/DeleteReactionPostsRequest.d.mts +1 -4
  48. package/dist/esm/api/resources/posts/client/requests/index.d.mts +2 -1
  49. package/dist/esm/api/resources/privateMessages/client/Client.d.mts +4 -4
  50. package/dist/esm/api/resources/privateMessages/client/Client.mjs +5 -5
  51. package/dist/{cjs/api/resources/privateMessages/client/requests/DeleteReplyPrivateMessagesRequest.d.ts → esm/api/resources/privateMessages/client/requests/DeleteReplyByIdPrivateMessagesRequest.d.mts} +1 -1
  52. package/dist/esm/api/resources/privateMessages/client/requests/index.d.mts +1 -1
  53. package/dist/esm/api/resources/tags/client/Client.d.mts +4 -4
  54. package/dist/esm/api/resources/tags/client/Client.mjs +5 -5
  55. package/dist/{cjs/api/resources/tags/client/requests/DeleteSubscriberTagsRequest.d.ts → esm/api/resources/tags/client/requests/DeleteSubscriberByIdTagsRequest.d.mts} +1 -1
  56. package/dist/esm/api/resources/tags/client/requests/index.d.mts +1 -1
  57. package/dist/esm/api/resources/threads/client/Client.d.mts +48 -11
  58. package/dist/esm/api/resources/threads/client/Client.mjs +141 -15
  59. package/dist/esm/api/resources/threads/client/requests/CreateSubscriberThreadsRequest.d.mts +12 -0
  60. package/dist/{cjs/api/resources/threads/client/requests/DeletePostThreadsRequest.d.ts → esm/api/resources/threads/client/requests/DeletePostByIdThreadsRequest.d.mts} +1 -1
  61. package/dist/esm/api/resources/threads/client/requests/DeleteReactionByIdThreadsRequest.d.mts +13 -0
  62. package/dist/esm/api/resources/threads/client/requests/DeleteReactionThreadsRequest.d.mts +1 -4
  63. package/dist/esm/api/resources/threads/client/requests/{DeleteSubscriberThreadsRequest.d.mts → DeleteSubscriberByIdThreadsRequest.d.mts} +1 -1
  64. package/dist/esm/api/resources/threads/client/requests/index.d.mts +4 -2
  65. package/dist/esm/api/resources/users/client/Client.d.mts +8 -8
  66. package/dist/esm/api/resources/users/client/Client.mjs +10 -10
  67. package/dist/{cjs/api/resources/users/client/requests/DeleteFollowerUsersRequest.d.ts → esm/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.d.mts} +1 -1
  68. package/dist/esm/api/resources/users/client/requests/DeleteFollowerByIdUsersRequest.mjs +2 -0
  69. package/dist/esm/api/resources/users/client/requests/{DeleteFollowingUsersRequest.d.mts → DeleteFollowingByIdUsersRequest.d.mts} +1 -1
  70. package/dist/esm/api/resources/users/client/requests/DeleteFollowingByIdUsersRequest.mjs +2 -0
  71. package/dist/esm/api/resources/users/client/requests/index.d.mts +2 -2
  72. package/dist/esm/api/resources/webhooks/client/Client.d.mts +4 -4
  73. package/dist/esm/api/resources/webhooks/client/Client.mjs +5 -5
  74. package/dist/esm/api/resources/webhooks/client/requests/{DeleteDeliveryWebhooksRequest.d.mts → DeleteDeliveryByIdWebhooksRequest.d.mts} +1 -1
  75. package/dist/esm/api/resources/webhooks/client/requests/DeleteDeliveryByIdWebhooksRequest.mjs +2 -0
  76. package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +1 -1
  77. package/dist/esm/api/types/ThreadSubscriberCreate.d.mts +4 -0
  78. package/dist/esm/api/types/ThreadSubscriberCreate.mjs +2 -0
  79. package/dist/esm/api/types/index.d.mts +1 -0
  80. package/dist/esm/api/types/index.mjs +1 -0
  81. package/dist/esm/version.d.mts +1 -1
  82. package/dist/esm/version.mjs +1 -1
  83. package/package.json +1 -1
  84. package/reference.md +225 -30
  85. /package/dist/cjs/api/resources/posts/client/requests/{DeletePostPostsRequest.js → DeletePostByIdPostsRequest.js} +0 -0
  86. /package/dist/cjs/api/resources/{privateMessages/client/requests/DeleteReplyPrivateMessagesRequest.js → posts/client/requests/DeleteReactionByIdPostsRequest.js} +0 -0
  87. /package/dist/cjs/api/resources/{tags/client/requests/DeleteSubscriberTagsRequest.js → privateMessages/client/requests/DeleteReplyByIdPrivateMessagesRequest.js} +0 -0
  88. /package/dist/cjs/api/resources/{threads/client/requests/DeletePostThreadsRequest.js → tags/client/requests/DeleteSubscriberByIdTagsRequest.js} +0 -0
  89. /package/dist/cjs/api/resources/threads/client/requests/{DeleteSubscriberThreadsRequest.js → CreateSubscriberThreadsRequest.js} +0 -0
  90. /package/dist/cjs/api/resources/{users/client/requests/DeleteFollowerUsersRequest.js → threads/client/requests/DeletePostByIdThreadsRequest.js} +0 -0
  91. /package/dist/cjs/api/resources/{users/client/requests/DeleteFollowingUsersRequest.js → threads/client/requests/DeleteReactionByIdThreadsRequest.js} +0 -0
  92. /package/dist/cjs/api/resources/{webhooks/client/requests/DeleteDeliveryWebhooksRequest.js → threads/client/requests/DeleteSubscriberByIdThreadsRequest.js} +0 -0
  93. /package/dist/esm/api/resources/posts/client/requests/{DeletePostPostsRequest.mjs → DeletePostByIdPostsRequest.mjs} +0 -0
  94. /package/dist/esm/api/resources/{privateMessages/client/requests/DeleteReplyPrivateMessagesRequest.mjs → posts/client/requests/DeleteReactionByIdPostsRequest.mjs} +0 -0
  95. /package/dist/esm/api/resources/{tags/client/requests/DeleteSubscriberTagsRequest.mjs → privateMessages/client/requests/DeleteReplyByIdPrivateMessagesRequest.mjs} +0 -0
  96. /package/dist/esm/api/resources/{threads/client/requests/DeletePostThreadsRequest.mjs → tags/client/requests/DeleteSubscriberByIdTagsRequest.mjs} +0 -0
  97. /package/dist/esm/api/resources/threads/client/requests/{DeleteSubscriberThreadsRequest.mjs → CreateSubscriberThreadsRequest.mjs} +0 -0
  98. /package/dist/esm/api/resources/{users/client/requests/DeleteFollowerUsersRequest.mjs → threads/client/requests/DeletePostByIdThreadsRequest.mjs} +0 -0
  99. /package/dist/esm/api/resources/{users/client/requests/DeleteFollowingUsersRequest.mjs → threads/client/requests/DeleteReactionByIdThreadsRequest.mjs} +0 -0
  100. /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.DeletePostThreadsRequest} request
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.deletePost({
500
+ * await client.threads.deletePostById({
501
501
  * id: "id",
502
502
  * subId: "subId"
503
503
  * })
504
504
  */
505
- deletePost(request, requestOptions) {
506
- return core.HttpResponsePromise.fromPromise(this.__deletePost(request, requestOptions));
505
+ deletePostById(request, requestOptions) {
506
+ return core.HttpResponsePromise.fromPromise(this.__deletePostById(request, requestOptions));
507
507
  }
508
- __deletePost(request, requestOptions) {
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, subId } = request;
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/${core.url.encodePathParam(subId)}`),
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/{subId}");
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.DeleteSubscriberThreadsRequest} request
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.deleteSubscriber({
1124
+ * await client.threads.deleteSubscriberById({
999
1125
  * id: "id",
1000
1126
  * subId: "subId"
1001
1127
  * })
1002
1128
  */
1003
- deleteSubscriber(request, requestOptions) {
1004
- return core.HttpResponsePromise.fromPromise(this.__deleteSubscriber(request, requestOptions));
1129
+ deleteSubscriberById(request, requestOptions) {
1130
+ return core.HttpResponsePromise.fromPromise(this.__deleteSubscriberById(request, requestOptions));
1005
1131
  }
1006
- __deleteSubscriber(request, requestOptions) {
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;
@@ -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.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 { DeletePostThreadsRequest } from "./DeletePostThreadsRequest.mjs";
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 { DeleteSubscriberThreadsRequest } from "./DeleteSubscriberThreadsRequest.mjs";
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.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
  }
@@ -607,7 +607,7 @@ export class UsersClient {
607
607
  });
608
608
  }
609
609
  /**
610
- * @param {Forum.DeleteFollowerUsersRequest} request
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.deleteFollower({
619
+ * await client.users.deleteFollowerById({
620
620
  * id: "id",
621
621
  * subId: "subId"
622
622
  * })
623
623
  */
624
- deleteFollower(request, requestOptions) {
625
- return core.HttpResponsePromise.fromPromise(this.__deleteFollower(request, requestOptions));
624
+ deleteFollowerById(request, requestOptions) {
625
+ return core.HttpResponsePromise.fromPromise(this.__deleteFollowerById(request, requestOptions));
626
626
  }
627
- __deleteFollower(request, requestOptions) {
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.DeleteFollowingUsersRequest} request
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.deleteFollowing({
801
+ * await client.users.deleteFollowingById({
802
802
  * id: "id",
803
803
  * subId: "subId"
804
804
  * })
805
805
  */
806
- deleteFollowing(request, requestOptions) {
807
- return core.HttpResponsePromise.fromPromise(this.__deleteFollowing(request, requestOptions));
806
+ deleteFollowingById(request, requestOptions) {
807
+ return core.HttpResponsePromise.fromPromise(this.__deleteFollowingById(request, requestOptions));
808
808
  }
809
- __deleteFollowing(request, requestOptions) {
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;
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,7 +1,7 @@
1
1
  export type { CreateFollowerUsersRequest } from "./CreateFollowerUsersRequest.mjs";
2
2
  export type { CreateUsersRequest } from "./CreateUsersRequest.mjs";
3
- export type { DeleteFollowerUsersRequest } from "./DeleteFollowerUsersRequest.mjs";
4
- export type { DeleteFollowingUsersRequest } from "./DeleteFollowingUsersRequest.mjs";
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.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
  }
@@ -496,7 +496,7 @@ export class WebhooksClient {
496
496
  });
497
497
  }
498
498
  /**
499
- * @param {Forum.DeleteDeliveryWebhooksRequest} request
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.deleteDelivery({
508
+ * await client.webhooks.deleteDeliveryById({
509
509
  * id: "id",
510
510
  * subId: "subId"
511
511
  * })
512
512
  */
513
- deleteDelivery(request, requestOptions) {
514
- return core.HttpResponsePromise.fromPromise(this.__deleteDelivery(request, requestOptions));
513
+ deleteDeliveryById(request, requestOptions) {
514
+ return core.HttpResponsePromise.fromPromise(this.__deleteDeliveryById(request, requestOptions));
515
515
  }
516
- __deleteDelivery(request, requestOptions) {
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;
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,5 +1,5 @@
1
1
  export type { CreateWebhooksRequest } from "./CreateWebhooksRequest.mjs";
2
- export type { DeleteDeliveryWebhooksRequest } from "./DeleteDeliveryWebhooksRequest.mjs";
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";
@@ -0,0 +1,4 @@
1
+ export interface ThreadSubscriberCreate {
2
+ /** Optional custom data */
3
+ extendedData?: Record<string, unknown>;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.1.18";
1
+ export declare const SDK_VERSION = "2.1.19";
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.1.18";
1
+ export const SDK_VERSION = "2.1.19";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foru-ms/sdk",
3
- "version": "2.1.18",
3
+ "version": "2.1.19",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",