@schedulin/sdk 0.3.0 → 0.4.0

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 (191) hide show
  1. package/cjs/api/errors/BadRequestError.d.ts +7 -0
  2. package/cjs/api/errors/BadRequestError.js +54 -0
  3. package/cjs/api/errors/ConflictError.d.ts +7 -0
  4. package/cjs/api/errors/ConflictError.js +54 -0
  5. package/cjs/api/errors/ForbiddenError.d.ts +7 -0
  6. package/cjs/api/errors/ForbiddenError.js +54 -0
  7. package/cjs/api/errors/NotFoundError.d.ts +7 -0
  8. package/cjs/api/errors/NotFoundError.js +54 -0
  9. package/cjs/api/errors/PaymentRequiredError.d.ts +7 -0
  10. package/cjs/api/errors/PaymentRequiredError.js +54 -0
  11. package/cjs/api/errors/TooManyRequestsError.d.ts +7 -0
  12. package/cjs/api/errors/TooManyRequestsError.js +54 -0
  13. package/cjs/api/errors/UnprocessableEntityError.d.ts +7 -0
  14. package/cjs/api/errors/UnprocessableEntityError.js +54 -0
  15. package/cjs/api/errors/index.d.ts +7 -0
  16. package/cjs/api/errors/index.js +7 -0
  17. package/cjs/api/resources/ai/client/Client.d.ts +11 -2
  18. package/cjs/api/resources/ai/client/Client.js +27 -0
  19. package/cjs/api/resources/ai/index.d.ts +1 -0
  20. package/cjs/api/resources/ai/index.js +1 -0
  21. package/cjs/api/resources/ai/types/GenerateImageAiResponse.d.ts +3 -0
  22. package/cjs/api/resources/ai/types/GenerateImageAiResponse.js +3 -0
  23. package/cjs/api/resources/ai/types/index.d.ts +1 -0
  24. package/cjs/api/resources/ai/types/index.js +17 -0
  25. package/cjs/api/resources/index.d.ts +2 -0
  26. package/cjs/api/resources/index.js +2 -0
  27. package/cjs/api/resources/media/client/Client.d.ts +59 -9
  28. package/cjs/api/resources/media/client/Client.js +159 -4
  29. package/cjs/api/resources/media/client/requests/UpdateMediaRequest.d.ts +2 -3
  30. package/cjs/api/resources/media/types/CreateUploadLinkMediaResponse.d.ts +4 -0
  31. package/cjs/api/resources/media/types/CreateUploadLinkMediaResponse.js +3 -0
  32. package/cjs/api/resources/media/types/DeleteMediaResponse.d.ts +4 -0
  33. package/cjs/api/resources/media/types/DeleteMediaResponse.js +3 -0
  34. package/cjs/api/resources/media/types/SetTagsMediaResponse.d.ts +4 -0
  35. package/cjs/api/resources/media/types/SetTagsMediaResponse.js +3 -0
  36. package/cjs/api/resources/media/types/index.d.ts +3 -0
  37. package/cjs/api/resources/media/types/index.js +3 -0
  38. package/cjs/api/resources/platforms/client/Client.d.ts +4 -0
  39. package/cjs/api/resources/platforms/client/Client.js +12 -0
  40. package/cjs/api/resources/posts/client/Client.d.ts +56 -1
  41. package/cjs/api/resources/posts/client/Client.js +165 -0
  42. package/cjs/api/resources/posts/types/CountByTabPostsResponse.d.ts +7 -0
  43. package/cjs/api/resources/posts/types/CountByTabPostsResponse.js +3 -0
  44. package/cjs/api/resources/posts/types/CreatePostsResponse.d.ts +1 -0
  45. package/cjs/api/resources/posts/types/index.d.ts +1 -0
  46. package/cjs/api/resources/posts/types/index.js +1 -0
  47. package/cjs/api/resources/socialAccounts/client/Client.d.ts +93 -0
  48. package/cjs/api/resources/socialAccounts/client/Client.js +289 -0
  49. package/cjs/api/resources/socialAccounts/client/requests/ListDiscordChannelsSocialAccountsRequest.d.ts +9 -0
  50. package/cjs/api/resources/socialAccounts/client/requests/ListDiscordChannelsSocialAccountsRequest.js +3 -0
  51. package/cjs/api/resources/socialAccounts/client/requests/ListSlackChannelsSocialAccountsRequest.d.ts +9 -0
  52. package/cjs/api/resources/socialAccounts/client/requests/ListSlackChannelsSocialAccountsRequest.js +3 -0
  53. package/cjs/api/resources/socialAccounts/client/requests/index.d.ts +2 -0
  54. package/cjs/api/resources/socialAccounts/types/ListDiscordChannelsSocialAccountsResponse.d.ts +12 -0
  55. package/cjs/api/resources/socialAccounts/types/ListDiscordChannelsSocialAccountsResponse.js +3 -0
  56. package/cjs/api/resources/socialAccounts/types/ListSlackChannelsSocialAccountsResponse.d.ts +12 -0
  57. package/cjs/api/resources/socialAccounts/types/ListSlackChannelsSocialAccountsResponse.js +3 -0
  58. package/cjs/api/resources/socialAccounts/types/index.d.ts +2 -0
  59. package/cjs/api/resources/socialAccounts/types/index.js +2 -0
  60. package/cjs/api/resources/tags/client/Client.d.ts +21 -0
  61. package/cjs/api/resources/tags/client/Client.js +63 -0
  62. package/cjs/api/resources/webhooks/client/Client.d.ts +51 -8
  63. package/cjs/api/resources/webhooks/client/Client.js +133 -1
  64. package/cjs/api/resources/webhooks/index.d.ts +1 -0
  65. package/cjs/api/resources/webhooks/index.js +1 -0
  66. package/cjs/api/resources/webhooks/types/DeleteWebhooksResponse.d.ts +3 -0
  67. package/cjs/api/resources/webhooks/types/DeleteWebhooksResponse.js +3 -0
  68. package/cjs/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.d.ts +4 -0
  69. package/cjs/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.js +3 -0
  70. package/cjs/api/resources/webhooks/types/ListWebhooksResponse.d.ts +4 -0
  71. package/cjs/api/resources/webhooks/types/ListWebhooksResponse.js +3 -0
  72. package/cjs/api/resources/webhooks/types/TestWebhooksResponse.d.ts +3 -0
  73. package/cjs/api/resources/webhooks/types/TestWebhooksResponse.js +3 -0
  74. package/cjs/api/resources/webhooks/types/index.d.ts +4 -0
  75. package/cjs/api/resources/webhooks/types/index.js +20 -0
  76. package/cjs/api/types/AiGeneration.d.ts +27 -0
  77. package/cjs/api/types/AiGeneration.js +14 -0
  78. package/cjs/api/types/ErrorResponse.d.ts +14 -2
  79. package/cjs/api/types/Media.d.ts +4 -0
  80. package/cjs/api/types/MediaUpdate.d.ts +1 -1
  81. package/cjs/api/types/Post.d.ts +3 -0
  82. package/cjs/api/types/PostMedia.d.ts +14 -0
  83. package/cjs/api/types/PostMedia.js +3 -0
  84. package/cjs/api/types/PostWithRelations.d.ts +5 -68
  85. package/cjs/api/types/PostWithRelations.js +0 -54
  86. package/cjs/api/types/RateLimitErrorResponse.d.ts +17 -0
  87. package/cjs/api/types/RateLimitErrorResponse.js +3 -0
  88. package/cjs/api/types/ValidationErrorResponse.d.ts +17 -0
  89. package/cjs/api/types/ValidationErrorResponse.js +3 -0
  90. package/cjs/api/types/WebhookDelivery.d.ts +20 -0
  91. package/cjs/api/types/WebhookDelivery.js +12 -0
  92. package/cjs/api/types/WebhookEndpoint.d.ts +26 -0
  93. package/cjs/api/types/WebhookEndpoint.js +16 -0
  94. package/cjs/api/types/index.d.ts +6 -0
  95. package/cjs/api/types/index.js +6 -0
  96. package/esm/api/errors/BadRequestError.d.mts +7 -0
  97. package/esm/api/errors/BadRequestError.mjs +17 -0
  98. package/esm/api/errors/ConflictError.d.mts +7 -0
  99. package/esm/api/errors/ConflictError.mjs +17 -0
  100. package/esm/api/errors/ForbiddenError.d.mts +7 -0
  101. package/esm/api/errors/ForbiddenError.mjs +17 -0
  102. package/esm/api/errors/NotFoundError.d.mts +7 -0
  103. package/esm/api/errors/NotFoundError.mjs +17 -0
  104. package/esm/api/errors/PaymentRequiredError.d.mts +7 -0
  105. package/esm/api/errors/PaymentRequiredError.mjs +17 -0
  106. package/esm/api/errors/TooManyRequestsError.d.mts +7 -0
  107. package/esm/api/errors/TooManyRequestsError.mjs +17 -0
  108. package/esm/api/errors/UnprocessableEntityError.d.mts +7 -0
  109. package/esm/api/errors/UnprocessableEntityError.mjs +17 -0
  110. package/esm/api/errors/index.d.mts +7 -0
  111. package/esm/api/errors/index.mjs +7 -0
  112. package/esm/api/resources/ai/client/Client.d.mts +11 -2
  113. package/esm/api/resources/ai/client/Client.mjs +27 -0
  114. package/esm/api/resources/ai/index.d.mts +1 -0
  115. package/esm/api/resources/ai/index.mjs +1 -0
  116. package/esm/api/resources/ai/types/GenerateImageAiResponse.d.mts +3 -0
  117. package/esm/api/resources/ai/types/GenerateImageAiResponse.mjs +2 -0
  118. package/esm/api/resources/ai/types/index.d.mts +1 -0
  119. package/esm/api/resources/ai/types/index.mjs +1 -0
  120. package/esm/api/resources/index.d.mts +2 -0
  121. package/esm/api/resources/index.mjs +2 -0
  122. package/esm/api/resources/media/client/Client.d.mts +59 -9
  123. package/esm/api/resources/media/client/Client.mjs +159 -4
  124. package/esm/api/resources/media/client/requests/UpdateMediaRequest.d.mts +2 -3
  125. package/esm/api/resources/media/types/CreateUploadLinkMediaResponse.d.mts +4 -0
  126. package/esm/api/resources/media/types/CreateUploadLinkMediaResponse.mjs +2 -0
  127. package/esm/api/resources/media/types/DeleteMediaResponse.d.mts +4 -0
  128. package/esm/api/resources/media/types/DeleteMediaResponse.mjs +2 -0
  129. package/esm/api/resources/media/types/SetTagsMediaResponse.d.mts +4 -0
  130. package/esm/api/resources/media/types/SetTagsMediaResponse.mjs +2 -0
  131. package/esm/api/resources/media/types/index.d.mts +3 -0
  132. package/esm/api/resources/media/types/index.mjs +3 -0
  133. package/esm/api/resources/platforms/client/Client.d.mts +4 -0
  134. package/esm/api/resources/platforms/client/Client.mjs +12 -0
  135. package/esm/api/resources/posts/client/Client.d.mts +56 -1
  136. package/esm/api/resources/posts/client/Client.mjs +165 -0
  137. package/esm/api/resources/posts/types/CountByTabPostsResponse.d.mts +7 -0
  138. package/esm/api/resources/posts/types/CountByTabPostsResponse.mjs +2 -0
  139. package/esm/api/resources/posts/types/CreatePostsResponse.d.mts +1 -0
  140. package/esm/api/resources/posts/types/index.d.mts +1 -0
  141. package/esm/api/resources/posts/types/index.mjs +1 -0
  142. package/esm/api/resources/socialAccounts/client/Client.d.mts +93 -0
  143. package/esm/api/resources/socialAccounts/client/Client.mjs +289 -0
  144. package/esm/api/resources/socialAccounts/client/requests/ListDiscordChannelsSocialAccountsRequest.d.mts +9 -0
  145. package/esm/api/resources/socialAccounts/client/requests/ListDiscordChannelsSocialAccountsRequest.mjs +2 -0
  146. package/esm/api/resources/socialAccounts/client/requests/ListSlackChannelsSocialAccountsRequest.d.mts +9 -0
  147. package/esm/api/resources/socialAccounts/client/requests/ListSlackChannelsSocialAccountsRequest.mjs +2 -0
  148. package/esm/api/resources/socialAccounts/client/requests/index.d.mts +2 -0
  149. package/esm/api/resources/socialAccounts/types/ListDiscordChannelsSocialAccountsResponse.d.mts +12 -0
  150. package/esm/api/resources/socialAccounts/types/ListDiscordChannelsSocialAccountsResponse.mjs +2 -0
  151. package/esm/api/resources/socialAccounts/types/ListSlackChannelsSocialAccountsResponse.d.mts +12 -0
  152. package/esm/api/resources/socialAccounts/types/ListSlackChannelsSocialAccountsResponse.mjs +2 -0
  153. package/esm/api/resources/socialAccounts/types/index.d.mts +2 -0
  154. package/esm/api/resources/socialAccounts/types/index.mjs +2 -0
  155. package/esm/api/resources/tags/client/Client.d.mts +21 -0
  156. package/esm/api/resources/tags/client/Client.mjs +63 -0
  157. package/esm/api/resources/webhooks/client/Client.d.mts +51 -8
  158. package/esm/api/resources/webhooks/client/Client.mjs +133 -1
  159. package/esm/api/resources/webhooks/index.d.mts +1 -0
  160. package/esm/api/resources/webhooks/index.mjs +1 -0
  161. package/esm/api/resources/webhooks/types/DeleteWebhooksResponse.d.mts +3 -0
  162. package/esm/api/resources/webhooks/types/DeleteWebhooksResponse.mjs +2 -0
  163. package/esm/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.d.mts +4 -0
  164. package/esm/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.mjs +2 -0
  165. package/esm/api/resources/webhooks/types/ListWebhooksResponse.d.mts +4 -0
  166. package/esm/api/resources/webhooks/types/ListWebhooksResponse.mjs +2 -0
  167. package/esm/api/resources/webhooks/types/TestWebhooksResponse.d.mts +3 -0
  168. package/esm/api/resources/webhooks/types/TestWebhooksResponse.mjs +2 -0
  169. package/esm/api/resources/webhooks/types/index.d.mts +4 -0
  170. package/esm/api/resources/webhooks/types/index.mjs +4 -0
  171. package/esm/api/types/AiGeneration.d.mts +27 -0
  172. package/esm/api/types/AiGeneration.mjs +11 -0
  173. package/esm/api/types/ErrorResponse.d.mts +14 -2
  174. package/esm/api/types/Media.d.mts +4 -0
  175. package/esm/api/types/MediaUpdate.d.mts +1 -1
  176. package/esm/api/types/Post.d.mts +3 -0
  177. package/esm/api/types/PostMedia.d.mts +14 -0
  178. package/esm/api/types/PostMedia.mjs +2 -0
  179. package/esm/api/types/PostWithRelations.d.mts +5 -68
  180. package/esm/api/types/PostWithRelations.mjs +1 -53
  181. package/esm/api/types/RateLimitErrorResponse.d.mts +17 -0
  182. package/esm/api/types/RateLimitErrorResponse.mjs +2 -0
  183. package/esm/api/types/ValidationErrorResponse.d.mts +17 -0
  184. package/esm/api/types/ValidationErrorResponse.mjs +2 -0
  185. package/esm/api/types/WebhookDelivery.d.mts +20 -0
  186. package/esm/api/types/WebhookDelivery.mjs +9 -0
  187. package/esm/api/types/WebhookEndpoint.d.mts +26 -0
  188. package/esm/api/types/WebhookEndpoint.mjs +13 -0
  189. package/esm/api/types/index.d.mts +6 -0
  190. package/esm/api/types/index.mjs +6 -0
  191. package/package.json +1 -1
@@ -15,7 +15,11 @@ export declare class SocialAccountsClient {
15
15
  *
16
16
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
17
17
  *
18
+ * @throws {@link Schedulin.BadRequestError}
18
19
  * @throws {@link Schedulin.UnauthorizedError}
20
+ * @throws {@link Schedulin.ForbiddenError}
21
+ * @throws {@link Schedulin.UnprocessableEntityError}
22
+ * @throws {@link Schedulin.TooManyRequestsError}
19
23
  * @throws {@link Schedulin.InternalServerError}
20
24
  * @throws {@link errors.SchedulinError}
21
25
  * @throws {@link errors.SchedulinTimeoutError}
@@ -31,7 +35,12 @@ export declare class SocialAccountsClient {
31
35
  * @param {Schedulin.ListWhopCompaniesSocialAccountsRequest} request
32
36
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
33
37
  *
38
+ * @throws {@link Schedulin.BadRequestError}
34
39
  * @throws {@link Schedulin.UnauthorizedError}
40
+ * @throws {@link Schedulin.ForbiddenError}
41
+ * @throws {@link Schedulin.NotFoundError}
42
+ * @throws {@link Schedulin.UnprocessableEntityError}
43
+ * @throws {@link Schedulin.TooManyRequestsError}
35
44
  * @throws {@link Schedulin.InternalServerError}
36
45
  * @throws {@link errors.SchedulinError}
37
46
  * @throws {@link errors.SchedulinTimeoutError}
@@ -49,7 +58,12 @@ export declare class SocialAccountsClient {
49
58
  * @param {Schedulin.ListWhopForumsSocialAccountsRequest} request
50
59
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
51
60
  *
61
+ * @throws {@link Schedulin.BadRequestError}
52
62
  * @throws {@link Schedulin.UnauthorizedError}
63
+ * @throws {@link Schedulin.ForbiddenError}
64
+ * @throws {@link Schedulin.NotFoundError}
65
+ * @throws {@link Schedulin.UnprocessableEntityError}
66
+ * @throws {@link Schedulin.TooManyRequestsError}
53
67
  * @throws {@link Schedulin.InternalServerError}
54
68
  * @throws {@link errors.SchedulinError}
55
69
  * @throws {@link errors.SchedulinTimeoutError}
@@ -62,13 +76,65 @@ export declare class SocialAccountsClient {
62
76
  */
63
77
  listWhopForums(request: Schedulin.ListWhopForumsSocialAccountsRequest, requestOptions?: SocialAccountsClient.RequestOptions): core.HttpResponsePromise<Schedulin.ListWhopForumsSocialAccountsResponse>;
64
78
  private __listWhopForums;
79
+ /**
80
+ * List the text and announcement channels the Schedulin bot can post into for a connected Discord server. Use an item id as `platformConfiguration.channel` when creating a Discord post.
81
+ *
82
+ * @param {Schedulin.ListDiscordChannelsSocialAccountsRequest} request
83
+ * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
84
+ *
85
+ * @throws {@link Schedulin.BadRequestError}
86
+ * @throws {@link Schedulin.UnauthorizedError}
87
+ * @throws {@link Schedulin.ForbiddenError}
88
+ * @throws {@link Schedulin.NotFoundError}
89
+ * @throws {@link Schedulin.UnprocessableEntityError}
90
+ * @throws {@link Schedulin.TooManyRequestsError}
91
+ * @throws {@link Schedulin.InternalServerError}
92
+ * @throws {@link errors.SchedulinError}
93
+ * @throws {@link errors.SchedulinTimeoutError}
94
+ *
95
+ * @example
96
+ * await client.socialAccounts.listDiscordChannels({
97
+ * id: "id"
98
+ * })
99
+ */
100
+ listDiscordChannels(request: Schedulin.ListDiscordChannelsSocialAccountsRequest, requestOptions?: SocialAccountsClient.RequestOptions): core.HttpResponsePromise<Schedulin.ListDiscordChannelsSocialAccountsResponse>;
101
+ private __listDiscordChannels;
102
+ /**
103
+ * List the channels in a connected Slack workspace that the Schedulin bot can post into (public channels, plus private channels it was invited to). Use an item id as `platformConfiguration.channel` when creating a Slack post.
104
+ *
105
+ * @param {Schedulin.ListSlackChannelsSocialAccountsRequest} request
106
+ * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
107
+ *
108
+ * @throws {@link Schedulin.BadRequestError}
109
+ * @throws {@link Schedulin.UnauthorizedError}
110
+ * @throws {@link Schedulin.ForbiddenError}
111
+ * @throws {@link Schedulin.NotFoundError}
112
+ * @throws {@link Schedulin.UnprocessableEntityError}
113
+ * @throws {@link Schedulin.TooManyRequestsError}
114
+ * @throws {@link Schedulin.InternalServerError}
115
+ * @throws {@link errors.SchedulinError}
116
+ * @throws {@link errors.SchedulinTimeoutError}
117
+ *
118
+ * @example
119
+ * await client.socialAccounts.listSlackChannels({
120
+ * id: "id"
121
+ * })
122
+ */
123
+ listSlackChannels(request: Schedulin.ListSlackChannelsSocialAccountsRequest, requestOptions?: SocialAccountsClient.RequestOptions): core.HttpResponsePromise<Schedulin.ListSlackChannelsSocialAccountsResponse>;
124
+ private __listSlackChannels;
65
125
  /**
66
126
  * Update social media account settings and information
67
127
  *
68
128
  * @param {Schedulin.UpdateSocialAccountsRequest} request
69
129
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
70
130
  *
131
+ * @throws {@link Schedulin.BadRequestError}
71
132
  * @throws {@link Schedulin.UnauthorizedError}
133
+ * @throws {@link Schedulin.ForbiddenError}
134
+ * @throws {@link Schedulin.NotFoundError}
135
+ * @throws {@link Schedulin.ConflictError}
136
+ * @throws {@link Schedulin.UnprocessableEntityError}
137
+ * @throws {@link Schedulin.TooManyRequestsError}
72
138
  * @throws {@link Schedulin.InternalServerError}
73
139
  * @throws {@link errors.SchedulinError}
74
140
  * @throws {@link errors.SchedulinTimeoutError}
@@ -86,7 +152,13 @@ export declare class SocialAccountsClient {
86
152
  * @param {Schedulin.DeleteSocialAccountsRequest} request
87
153
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
88
154
  *
155
+ * @throws {@link Schedulin.BadRequestError}
89
156
  * @throws {@link Schedulin.UnauthorizedError}
157
+ * @throws {@link Schedulin.ForbiddenError}
158
+ * @throws {@link Schedulin.NotFoundError}
159
+ * @throws {@link Schedulin.ConflictError}
160
+ * @throws {@link Schedulin.UnprocessableEntityError}
161
+ * @throws {@link Schedulin.TooManyRequestsError}
90
162
  * @throws {@link Schedulin.InternalServerError}
91
163
  * @throws {@link errors.SchedulinError}
92
164
  * @throws {@link errors.SchedulinTimeoutError}
@@ -104,7 +176,13 @@ export declare class SocialAccountsClient {
104
176
  * @param {Schedulin.UpdateTimezoneSocialAccountsRequest} request
105
177
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
106
178
  *
179
+ * @throws {@link Schedulin.BadRequestError}
107
180
  * @throws {@link Schedulin.UnauthorizedError}
181
+ * @throws {@link Schedulin.ForbiddenError}
182
+ * @throws {@link Schedulin.NotFoundError}
183
+ * @throws {@link Schedulin.ConflictError}
184
+ * @throws {@link Schedulin.UnprocessableEntityError}
185
+ * @throws {@link Schedulin.TooManyRequestsError}
108
186
  * @throws {@link Schedulin.InternalServerError}
109
187
  * @throws {@link errors.SchedulinError}
110
188
  * @throws {@link errors.SchedulinTimeoutError}
@@ -123,7 +201,12 @@ export declare class SocialAccountsClient {
123
201
  * @param {Schedulin.NextSlotsSocialAccountsRequest} request
124
202
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
125
203
  *
204
+ * @throws {@link Schedulin.BadRequestError}
126
205
  * @throws {@link Schedulin.UnauthorizedError}
206
+ * @throws {@link Schedulin.ForbiddenError}
207
+ * @throws {@link Schedulin.NotFoundError}
208
+ * @throws {@link Schedulin.UnprocessableEntityError}
209
+ * @throws {@link Schedulin.TooManyRequestsError}
127
210
  * @throws {@link Schedulin.InternalServerError}
128
211
  * @throws {@link errors.SchedulinError}
129
212
  * @throws {@link errors.SchedulinTimeoutError}
@@ -141,7 +224,12 @@ export declare class SocialAccountsClient {
141
224
  * @param {Schedulin.PinterestBoardsSocialAccountsRequest} request
142
225
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
143
226
  *
227
+ * @throws {@link Schedulin.BadRequestError}
144
228
  * @throws {@link Schedulin.UnauthorizedError}
229
+ * @throws {@link Schedulin.ForbiddenError}
230
+ * @throws {@link Schedulin.NotFoundError}
231
+ * @throws {@link Schedulin.UnprocessableEntityError}
232
+ * @throws {@link Schedulin.TooManyRequestsError}
145
233
  * @throws {@link Schedulin.InternalServerError}
146
234
  * @throws {@link errors.SchedulinError}
147
235
  * @throws {@link errors.SchedulinTimeoutError}
@@ -159,7 +247,12 @@ export declare class SocialAccountsClient {
159
247
  * @param {Schedulin.TiktokCreatorInfoSocialAccountsRequest} request
160
248
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
161
249
  *
250
+ * @throws {@link Schedulin.BadRequestError}
162
251
  * @throws {@link Schedulin.UnauthorizedError}
252
+ * @throws {@link Schedulin.ForbiddenError}
253
+ * @throws {@link Schedulin.NotFoundError}
254
+ * @throws {@link Schedulin.UnprocessableEntityError}
255
+ * @throws {@link Schedulin.TooManyRequestsError}
163
256
  * @throws {@link Schedulin.InternalServerError}
164
257
  * @throws {@link errors.SchedulinError}
165
258
  * @throws {@link errors.SchedulinTimeoutError}
@@ -72,7 +72,11 @@ class SocialAccountsClient {
72
72
  *
73
73
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
74
74
  *
75
+ * @throws {@link Schedulin.BadRequestError}
75
76
  * @throws {@link Schedulin.UnauthorizedError}
77
+ * @throws {@link Schedulin.ForbiddenError}
78
+ * @throws {@link Schedulin.UnprocessableEntityError}
79
+ * @throws {@link Schedulin.TooManyRequestsError}
76
80
  * @throws {@link Schedulin.InternalServerError}
77
81
  * @throws {@link errors.SchedulinError}
78
82
  * @throws {@link errors.SchedulinTimeoutError}
@@ -104,8 +108,16 @@ class SocialAccountsClient {
104
108
  }
105
109
  if (_response.error.reason === "status-code") {
106
110
  switch (_response.error.statusCode) {
111
+ case 400:
112
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
107
113
  case 401:
108
114
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
115
+ case 403:
116
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
117
+ case 422:
118
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
119
+ case 429:
120
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
109
121
  case 500:
110
122
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
111
123
  default:
@@ -125,7 +137,12 @@ class SocialAccountsClient {
125
137
  * @param {Schedulin.ListWhopCompaniesSocialAccountsRequest} request
126
138
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
127
139
  *
140
+ * @throws {@link Schedulin.BadRequestError}
128
141
  * @throws {@link Schedulin.UnauthorizedError}
142
+ * @throws {@link Schedulin.ForbiddenError}
143
+ * @throws {@link Schedulin.NotFoundError}
144
+ * @throws {@link Schedulin.UnprocessableEntityError}
145
+ * @throws {@link Schedulin.TooManyRequestsError}
129
146
  * @throws {@link Schedulin.InternalServerError}
130
147
  * @throws {@link errors.SchedulinError}
131
148
  * @throws {@link errors.SchedulinTimeoutError}
@@ -163,8 +180,18 @@ class SocialAccountsClient {
163
180
  }
164
181
  if (_response.error.reason === "status-code") {
165
182
  switch (_response.error.statusCode) {
183
+ case 400:
184
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
166
185
  case 401:
167
186
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
187
+ case 403:
188
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
189
+ case 404:
190
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
191
+ case 422:
192
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
193
+ case 429:
194
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
168
195
  case 500:
169
196
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
170
197
  default:
@@ -184,7 +211,12 @@ class SocialAccountsClient {
184
211
  * @param {Schedulin.ListWhopForumsSocialAccountsRequest} request
185
212
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
186
213
  *
214
+ * @throws {@link Schedulin.BadRequestError}
187
215
  * @throws {@link Schedulin.UnauthorizedError}
216
+ * @throws {@link Schedulin.ForbiddenError}
217
+ * @throws {@link Schedulin.NotFoundError}
218
+ * @throws {@link Schedulin.UnprocessableEntityError}
219
+ * @throws {@link Schedulin.TooManyRequestsError}
188
220
  * @throws {@link Schedulin.InternalServerError}
189
221
  * @throws {@link errors.SchedulinError}
190
222
  * @throws {@link errors.SchedulinTimeoutError}
@@ -230,8 +262,18 @@ class SocialAccountsClient {
230
262
  }
231
263
  if (_response.error.reason === "status-code") {
232
264
  switch (_response.error.statusCode) {
265
+ case 400:
266
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
233
267
  case 401:
234
268
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
269
+ case 403:
270
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
271
+ case 404:
272
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
273
+ case 422:
274
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
275
+ case 429:
276
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
235
277
  case 500:
236
278
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
237
279
  default:
@@ -245,13 +287,167 @@ class SocialAccountsClient {
245
287
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/social-accounts/{id}/whop-forums");
246
288
  });
247
289
  }
290
+ /**
291
+ * List the text and announcement channels the Schedulin bot can post into for a connected Discord server. Use an item id as `platformConfiguration.channel` when creating a Discord post.
292
+ *
293
+ * @param {Schedulin.ListDiscordChannelsSocialAccountsRequest} request
294
+ * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
295
+ *
296
+ * @throws {@link Schedulin.BadRequestError}
297
+ * @throws {@link Schedulin.UnauthorizedError}
298
+ * @throws {@link Schedulin.ForbiddenError}
299
+ * @throws {@link Schedulin.NotFoundError}
300
+ * @throws {@link Schedulin.UnprocessableEntityError}
301
+ * @throws {@link Schedulin.TooManyRequestsError}
302
+ * @throws {@link Schedulin.InternalServerError}
303
+ * @throws {@link errors.SchedulinError}
304
+ * @throws {@link errors.SchedulinTimeoutError}
305
+ *
306
+ * @example
307
+ * await client.socialAccounts.listDiscordChannels({
308
+ * id: "id"
309
+ * })
310
+ */
311
+ listDiscordChannels(request, requestOptions) {
312
+ return core.HttpResponsePromise.fromPromise(this.__listDiscordChannels(request, requestOptions));
313
+ }
314
+ __listDiscordChannels(request, requestOptions) {
315
+ return __awaiter(this, void 0, void 0, function* () {
316
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
317
+ const { id } = request;
318
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
319
+ 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);
320
+ const _response = yield core.fetcher({
321
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchedulinEnvironment.Default, `v0/social-accounts/${core.url.encodePathParam(id)}/discord-channels`),
322
+ method: "GET",
323
+ headers: _headers,
324
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
325
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
326
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
327
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
328
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
329
+ logging: this._options.logging,
330
+ });
331
+ if (_response.ok) {
332
+ return {
333
+ data: _response.body,
334
+ rawResponse: _response.rawResponse,
335
+ };
336
+ }
337
+ if (_response.error.reason === "status-code") {
338
+ switch (_response.error.statusCode) {
339
+ case 400:
340
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
341
+ case 401:
342
+ throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
343
+ case 403:
344
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
345
+ case 404:
346
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
347
+ case 422:
348
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
349
+ case 429:
350
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
351
+ case 500:
352
+ throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
353
+ default:
354
+ throw new errors.SchedulinError({
355
+ statusCode: _response.error.statusCode,
356
+ body: _response.error.body,
357
+ rawResponse: _response.rawResponse,
358
+ });
359
+ }
360
+ }
361
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/social-accounts/{id}/discord-channels");
362
+ });
363
+ }
364
+ /**
365
+ * List the channels in a connected Slack workspace that the Schedulin bot can post into (public channels, plus private channels it was invited to). Use an item id as `platformConfiguration.channel` when creating a Slack post.
366
+ *
367
+ * @param {Schedulin.ListSlackChannelsSocialAccountsRequest} request
368
+ * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
369
+ *
370
+ * @throws {@link Schedulin.BadRequestError}
371
+ * @throws {@link Schedulin.UnauthorizedError}
372
+ * @throws {@link Schedulin.ForbiddenError}
373
+ * @throws {@link Schedulin.NotFoundError}
374
+ * @throws {@link Schedulin.UnprocessableEntityError}
375
+ * @throws {@link Schedulin.TooManyRequestsError}
376
+ * @throws {@link Schedulin.InternalServerError}
377
+ * @throws {@link errors.SchedulinError}
378
+ * @throws {@link errors.SchedulinTimeoutError}
379
+ *
380
+ * @example
381
+ * await client.socialAccounts.listSlackChannels({
382
+ * id: "id"
383
+ * })
384
+ */
385
+ listSlackChannels(request, requestOptions) {
386
+ return core.HttpResponsePromise.fromPromise(this.__listSlackChannels(request, requestOptions));
387
+ }
388
+ __listSlackChannels(request, requestOptions) {
389
+ return __awaiter(this, void 0, void 0, function* () {
390
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
391
+ const { id } = request;
392
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
393
+ 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);
394
+ const _response = yield core.fetcher({
395
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchedulinEnvironment.Default, `v0/social-accounts/${core.url.encodePathParam(id)}/slack-channels`),
396
+ method: "GET",
397
+ headers: _headers,
398
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
399
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
400
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
401
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
402
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
403
+ logging: this._options.logging,
404
+ });
405
+ if (_response.ok) {
406
+ return {
407
+ data: _response.body,
408
+ rawResponse: _response.rawResponse,
409
+ };
410
+ }
411
+ if (_response.error.reason === "status-code") {
412
+ switch (_response.error.statusCode) {
413
+ case 400:
414
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
415
+ case 401:
416
+ throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
417
+ case 403:
418
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
419
+ case 404:
420
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
421
+ case 422:
422
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
423
+ case 429:
424
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
425
+ case 500:
426
+ throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
427
+ default:
428
+ throw new errors.SchedulinError({
429
+ statusCode: _response.error.statusCode,
430
+ body: _response.error.body,
431
+ rawResponse: _response.rawResponse,
432
+ });
433
+ }
434
+ }
435
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/social-accounts/{id}/slack-channels");
436
+ });
437
+ }
248
438
  /**
249
439
  * Update social media account settings and information
250
440
  *
251
441
  * @param {Schedulin.UpdateSocialAccountsRequest} request
252
442
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
253
443
  *
444
+ * @throws {@link Schedulin.BadRequestError}
254
445
  * @throws {@link Schedulin.UnauthorizedError}
446
+ * @throws {@link Schedulin.ForbiddenError}
447
+ * @throws {@link Schedulin.NotFoundError}
448
+ * @throws {@link Schedulin.ConflictError}
449
+ * @throws {@link Schedulin.UnprocessableEntityError}
450
+ * @throws {@link Schedulin.TooManyRequestsError}
255
451
  * @throws {@link Schedulin.InternalServerError}
256
452
  * @throws {@link errors.SchedulinError}
257
453
  * @throws {@link errors.SchedulinTimeoutError}
@@ -292,8 +488,20 @@ class SocialAccountsClient {
292
488
  }
293
489
  if (_response.error.reason === "status-code") {
294
490
  switch (_response.error.statusCode) {
491
+ case 400:
492
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
295
493
  case 401:
296
494
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
495
+ case 403:
496
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
497
+ case 404:
498
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
499
+ case 409:
500
+ throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
501
+ case 422:
502
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
503
+ case 429:
504
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
297
505
  case 500:
298
506
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
299
507
  default:
@@ -313,7 +521,13 @@ class SocialAccountsClient {
313
521
  * @param {Schedulin.DeleteSocialAccountsRequest} request
314
522
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
315
523
  *
524
+ * @throws {@link Schedulin.BadRequestError}
316
525
  * @throws {@link Schedulin.UnauthorizedError}
526
+ * @throws {@link Schedulin.ForbiddenError}
527
+ * @throws {@link Schedulin.NotFoundError}
528
+ * @throws {@link Schedulin.ConflictError}
529
+ * @throws {@link Schedulin.UnprocessableEntityError}
530
+ * @throws {@link Schedulin.TooManyRequestsError}
317
531
  * @throws {@link Schedulin.InternalServerError}
318
532
  * @throws {@link errors.SchedulinError}
319
533
  * @throws {@link errors.SchedulinTimeoutError}
@@ -354,8 +568,20 @@ class SocialAccountsClient {
354
568
  }
355
569
  if (_response.error.reason === "status-code") {
356
570
  switch (_response.error.statusCode) {
571
+ case 400:
572
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
357
573
  case 401:
358
574
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
575
+ case 403:
576
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
577
+ case 404:
578
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
579
+ case 409:
580
+ throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
581
+ case 422:
582
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
583
+ case 429:
584
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
359
585
  case 500:
360
586
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
361
587
  default:
@@ -375,7 +601,13 @@ class SocialAccountsClient {
375
601
  * @param {Schedulin.UpdateTimezoneSocialAccountsRequest} request
376
602
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
377
603
  *
604
+ * @throws {@link Schedulin.BadRequestError}
378
605
  * @throws {@link Schedulin.UnauthorizedError}
606
+ * @throws {@link Schedulin.ForbiddenError}
607
+ * @throws {@link Schedulin.NotFoundError}
608
+ * @throws {@link Schedulin.ConflictError}
609
+ * @throws {@link Schedulin.UnprocessableEntityError}
610
+ * @throws {@link Schedulin.TooManyRequestsError}
379
611
  * @throws {@link Schedulin.InternalServerError}
380
612
  * @throws {@link errors.SchedulinError}
381
613
  * @throws {@link errors.SchedulinTimeoutError}
@@ -417,8 +649,20 @@ class SocialAccountsClient {
417
649
  }
418
650
  if (_response.error.reason === "status-code") {
419
651
  switch (_response.error.statusCode) {
652
+ case 400:
653
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
420
654
  case 401:
421
655
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
656
+ case 403:
657
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
658
+ case 404:
659
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
660
+ case 409:
661
+ throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
662
+ case 422:
663
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
664
+ case 429:
665
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
422
666
  case 500:
423
667
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
424
668
  default:
@@ -438,7 +682,12 @@ class SocialAccountsClient {
438
682
  * @param {Schedulin.NextSlotsSocialAccountsRequest} request
439
683
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
440
684
  *
685
+ * @throws {@link Schedulin.BadRequestError}
441
686
  * @throws {@link Schedulin.UnauthorizedError}
687
+ * @throws {@link Schedulin.ForbiddenError}
688
+ * @throws {@link Schedulin.NotFoundError}
689
+ * @throws {@link Schedulin.UnprocessableEntityError}
690
+ * @throws {@link Schedulin.TooManyRequestsError}
442
691
  * @throws {@link Schedulin.InternalServerError}
443
692
  * @throws {@link errors.SchedulinError}
444
693
  * @throws {@link errors.SchedulinTimeoutError}
@@ -484,8 +733,18 @@ class SocialAccountsClient {
484
733
  }
485
734
  if (_response.error.reason === "status-code") {
486
735
  switch (_response.error.statusCode) {
736
+ case 400:
737
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
487
738
  case 401:
488
739
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
740
+ case 403:
741
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
742
+ case 404:
743
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
744
+ case 422:
745
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
746
+ case 429:
747
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
489
748
  case 500:
490
749
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
491
750
  default:
@@ -505,7 +764,12 @@ class SocialAccountsClient {
505
764
  * @param {Schedulin.PinterestBoardsSocialAccountsRequest} request
506
765
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
507
766
  *
767
+ * @throws {@link Schedulin.BadRequestError}
508
768
  * @throws {@link Schedulin.UnauthorizedError}
769
+ * @throws {@link Schedulin.ForbiddenError}
770
+ * @throws {@link Schedulin.NotFoundError}
771
+ * @throws {@link Schedulin.UnprocessableEntityError}
772
+ * @throws {@link Schedulin.TooManyRequestsError}
509
773
  * @throws {@link Schedulin.InternalServerError}
510
774
  * @throws {@link errors.SchedulinError}
511
775
  * @throws {@link errors.SchedulinTimeoutError}
@@ -543,8 +807,18 @@ class SocialAccountsClient {
543
807
  }
544
808
  if (_response.error.reason === "status-code") {
545
809
  switch (_response.error.statusCode) {
810
+ case 400:
811
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
546
812
  case 401:
547
813
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
814
+ case 403:
815
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
816
+ case 404:
817
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
818
+ case 422:
819
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
820
+ case 429:
821
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
548
822
  case 500:
549
823
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
550
824
  default:
@@ -564,7 +838,12 @@ class SocialAccountsClient {
564
838
  * @param {Schedulin.TiktokCreatorInfoSocialAccountsRequest} request
565
839
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
566
840
  *
841
+ * @throws {@link Schedulin.BadRequestError}
567
842
  * @throws {@link Schedulin.UnauthorizedError}
843
+ * @throws {@link Schedulin.ForbiddenError}
844
+ * @throws {@link Schedulin.NotFoundError}
845
+ * @throws {@link Schedulin.UnprocessableEntityError}
846
+ * @throws {@link Schedulin.TooManyRequestsError}
568
847
  * @throws {@link Schedulin.InternalServerError}
569
848
  * @throws {@link errors.SchedulinError}
570
849
  * @throws {@link errors.SchedulinTimeoutError}
@@ -602,8 +881,18 @@ class SocialAccountsClient {
602
881
  }
603
882
  if (_response.error.reason === "status-code") {
604
883
  switch (_response.error.statusCode) {
884
+ case 400:
885
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
605
886
  case 401:
606
887
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
888
+ case 403:
889
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
890
+ case 404:
891
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
892
+ case 422:
893
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
894
+ case 429:
895
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
607
896
  case 500:
608
897
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
609
898
  default:
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "id"
5
+ * }
6
+ */
7
+ export interface ListDiscordChannelsSocialAccountsRequest {
8
+ id: string;
9
+ }
@@ -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 });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "id"
5
+ * }
6
+ */
7
+ export interface ListSlackChannelsSocialAccountsRequest {
8
+ id: string;
9
+ }
@@ -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,4 +1,6 @@
1
1
  export type { DeleteSocialAccountsRequest } from "./DeleteSocialAccountsRequest.js";
2
+ export type { ListDiscordChannelsSocialAccountsRequest } from "./ListDiscordChannelsSocialAccountsRequest.js";
3
+ export type { ListSlackChannelsSocialAccountsRequest } from "./ListSlackChannelsSocialAccountsRequest.js";
2
4
  export type { ListWhopCompaniesSocialAccountsRequest } from "./ListWhopCompaniesSocialAccountsRequest.js";
3
5
  export type { ListWhopForumsSocialAccountsRequest } from "./ListWhopForumsSocialAccountsRequest.js";
4
6
  export type { NextSlotsSocialAccountsRequest } from "./NextSlotsSocialAccountsRequest.js";
@@ -0,0 +1,12 @@
1
+ export interface ListDiscordChannelsSocialAccountsResponse {
2
+ items: ListDiscordChannelsSocialAccountsResponse.Items.Item[];
3
+ }
4
+ export declare namespace ListDiscordChannelsSocialAccountsResponse {
5
+ type Items = Items.Item[];
6
+ namespace Items {
7
+ interface Item {
8
+ id: string;
9
+ name: string;
10
+ }
11
+ }
12
+ }