@schedulin/sdk 0.3.1 → 0.4.1

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 (169) 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 +58 -8
  28. package/cjs/api/resources/media/client/Client.js +158 -3
  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 +58 -1
  48. package/cjs/api/resources/socialAccounts/client/Client.js +172 -1
  49. package/cjs/api/resources/tags/client/Client.d.ts +21 -0
  50. package/cjs/api/resources/tags/client/Client.js +63 -0
  51. package/cjs/api/resources/webhooks/client/Client.d.ts +51 -8
  52. package/cjs/api/resources/webhooks/client/Client.js +133 -1
  53. package/cjs/api/resources/webhooks/index.d.ts +1 -0
  54. package/cjs/api/resources/webhooks/index.js +1 -0
  55. package/cjs/api/resources/webhooks/types/DeleteWebhooksResponse.d.ts +3 -0
  56. package/cjs/api/resources/webhooks/types/DeleteWebhooksResponse.js +3 -0
  57. package/cjs/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.d.ts +4 -0
  58. package/cjs/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.js +3 -0
  59. package/cjs/api/resources/webhooks/types/ListWebhooksResponse.d.ts +4 -0
  60. package/cjs/api/resources/webhooks/types/ListWebhooksResponse.js +3 -0
  61. package/cjs/api/resources/webhooks/types/TestWebhooksResponse.d.ts +3 -0
  62. package/cjs/api/resources/webhooks/types/TestWebhooksResponse.js +3 -0
  63. package/cjs/api/resources/webhooks/types/index.d.ts +4 -0
  64. package/cjs/api/resources/webhooks/types/index.js +20 -0
  65. package/cjs/api/types/AiGeneration.d.ts +27 -0
  66. package/cjs/api/types/AiGeneration.js +14 -0
  67. package/cjs/api/types/ErrorResponse.d.ts +14 -2
  68. package/cjs/api/types/Media.d.ts +4 -0
  69. package/cjs/api/types/MediaUpdate.d.ts +1 -1
  70. package/cjs/api/types/Post.d.ts +3 -0
  71. package/cjs/api/types/PostMedia.d.ts +14 -0
  72. package/cjs/api/types/PostMedia.js +3 -0
  73. package/cjs/api/types/PostWithRelations.d.ts +5 -68
  74. package/cjs/api/types/PostWithRelations.js +0 -54
  75. package/cjs/api/types/RateLimitErrorResponse.d.ts +17 -0
  76. package/cjs/api/types/RateLimitErrorResponse.js +3 -0
  77. package/cjs/api/types/ValidationErrorResponse.d.ts +17 -0
  78. package/cjs/api/types/ValidationErrorResponse.js +3 -0
  79. package/cjs/api/types/WebhookDelivery.d.ts +20 -0
  80. package/cjs/api/types/WebhookDelivery.js +12 -0
  81. package/cjs/api/types/WebhookEndpoint.d.ts +26 -0
  82. package/cjs/api/types/WebhookEndpoint.js +16 -0
  83. package/cjs/api/types/index.d.ts +6 -0
  84. package/cjs/api/types/index.js +6 -0
  85. package/esm/api/errors/BadRequestError.d.mts +7 -0
  86. package/esm/api/errors/BadRequestError.mjs +17 -0
  87. package/esm/api/errors/ConflictError.d.mts +7 -0
  88. package/esm/api/errors/ConflictError.mjs +17 -0
  89. package/esm/api/errors/ForbiddenError.d.mts +7 -0
  90. package/esm/api/errors/ForbiddenError.mjs +17 -0
  91. package/esm/api/errors/NotFoundError.d.mts +7 -0
  92. package/esm/api/errors/NotFoundError.mjs +17 -0
  93. package/esm/api/errors/PaymentRequiredError.d.mts +7 -0
  94. package/esm/api/errors/PaymentRequiredError.mjs +17 -0
  95. package/esm/api/errors/TooManyRequestsError.d.mts +7 -0
  96. package/esm/api/errors/TooManyRequestsError.mjs +17 -0
  97. package/esm/api/errors/UnprocessableEntityError.d.mts +7 -0
  98. package/esm/api/errors/UnprocessableEntityError.mjs +17 -0
  99. package/esm/api/errors/index.d.mts +7 -0
  100. package/esm/api/errors/index.mjs +7 -0
  101. package/esm/api/resources/ai/client/Client.d.mts +11 -2
  102. package/esm/api/resources/ai/client/Client.mjs +27 -0
  103. package/esm/api/resources/ai/index.d.mts +1 -0
  104. package/esm/api/resources/ai/index.mjs +1 -0
  105. package/esm/api/resources/ai/types/GenerateImageAiResponse.d.mts +3 -0
  106. package/esm/api/resources/ai/types/GenerateImageAiResponse.mjs +2 -0
  107. package/esm/api/resources/ai/types/index.d.mts +1 -0
  108. package/esm/api/resources/ai/types/index.mjs +1 -0
  109. package/esm/api/resources/index.d.mts +2 -0
  110. package/esm/api/resources/index.mjs +2 -0
  111. package/esm/api/resources/media/client/Client.d.mts +58 -8
  112. package/esm/api/resources/media/client/Client.mjs +158 -3
  113. package/esm/api/resources/media/client/requests/UpdateMediaRequest.d.mts +2 -3
  114. package/esm/api/resources/media/types/CreateUploadLinkMediaResponse.d.mts +4 -0
  115. package/esm/api/resources/media/types/CreateUploadLinkMediaResponse.mjs +2 -0
  116. package/esm/api/resources/media/types/DeleteMediaResponse.d.mts +4 -0
  117. package/esm/api/resources/media/types/DeleteMediaResponse.mjs +2 -0
  118. package/esm/api/resources/media/types/SetTagsMediaResponse.d.mts +4 -0
  119. package/esm/api/resources/media/types/SetTagsMediaResponse.mjs +2 -0
  120. package/esm/api/resources/media/types/index.d.mts +3 -0
  121. package/esm/api/resources/media/types/index.mjs +3 -0
  122. package/esm/api/resources/platforms/client/Client.d.mts +4 -0
  123. package/esm/api/resources/platforms/client/Client.mjs +12 -0
  124. package/esm/api/resources/posts/client/Client.d.mts +56 -1
  125. package/esm/api/resources/posts/client/Client.mjs +165 -0
  126. package/esm/api/resources/posts/types/CountByTabPostsResponse.d.mts +7 -0
  127. package/esm/api/resources/posts/types/CountByTabPostsResponse.mjs +2 -0
  128. package/esm/api/resources/posts/types/CreatePostsResponse.d.mts +1 -0
  129. package/esm/api/resources/posts/types/index.d.mts +1 -0
  130. package/esm/api/resources/posts/types/index.mjs +1 -0
  131. package/esm/api/resources/socialAccounts/client/Client.d.mts +58 -1
  132. package/esm/api/resources/socialAccounts/client/Client.mjs +172 -1
  133. package/esm/api/resources/tags/client/Client.d.mts +21 -0
  134. package/esm/api/resources/tags/client/Client.mjs +63 -0
  135. package/esm/api/resources/webhooks/client/Client.d.mts +51 -8
  136. package/esm/api/resources/webhooks/client/Client.mjs +133 -1
  137. package/esm/api/resources/webhooks/index.d.mts +1 -0
  138. package/esm/api/resources/webhooks/index.mjs +1 -0
  139. package/esm/api/resources/webhooks/types/DeleteWebhooksResponse.d.mts +3 -0
  140. package/esm/api/resources/webhooks/types/DeleteWebhooksResponse.mjs +2 -0
  141. package/esm/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.d.mts +4 -0
  142. package/esm/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.mjs +2 -0
  143. package/esm/api/resources/webhooks/types/ListWebhooksResponse.d.mts +4 -0
  144. package/esm/api/resources/webhooks/types/ListWebhooksResponse.mjs +2 -0
  145. package/esm/api/resources/webhooks/types/TestWebhooksResponse.d.mts +3 -0
  146. package/esm/api/resources/webhooks/types/TestWebhooksResponse.mjs +2 -0
  147. package/esm/api/resources/webhooks/types/index.d.mts +4 -0
  148. package/esm/api/resources/webhooks/types/index.mjs +4 -0
  149. package/esm/api/types/AiGeneration.d.mts +27 -0
  150. package/esm/api/types/AiGeneration.mjs +11 -0
  151. package/esm/api/types/ErrorResponse.d.mts +14 -2
  152. package/esm/api/types/Media.d.mts +4 -0
  153. package/esm/api/types/MediaUpdate.d.mts +1 -1
  154. package/esm/api/types/Post.d.mts +3 -0
  155. package/esm/api/types/PostMedia.d.mts +14 -0
  156. package/esm/api/types/PostMedia.mjs +2 -0
  157. package/esm/api/types/PostWithRelations.d.mts +5 -68
  158. package/esm/api/types/PostWithRelations.mjs +1 -53
  159. package/esm/api/types/RateLimitErrorResponse.d.mts +17 -0
  160. package/esm/api/types/RateLimitErrorResponse.mjs +2 -0
  161. package/esm/api/types/ValidationErrorResponse.d.mts +17 -0
  162. package/esm/api/types/ValidationErrorResponse.mjs +2 -0
  163. package/esm/api/types/WebhookDelivery.d.mts +20 -0
  164. package/esm/api/types/WebhookDelivery.mjs +9 -0
  165. package/esm/api/types/WebhookEndpoint.d.mts +26 -0
  166. package/esm/api/types/WebhookEndpoint.mjs +13 -0
  167. package/esm/api/types/index.d.mts +6 -0
  168. package/esm/api/types/index.mjs +6 -0
  169. 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}
@@ -68,7 +82,12 @@ export declare class SocialAccountsClient {
68
82
  * @param {Schedulin.ListDiscordChannelsSocialAccountsRequest} request
69
83
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
70
84
  *
85
+ * @throws {@link Schedulin.BadRequestError}
71
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}
72
91
  * @throws {@link Schedulin.InternalServerError}
73
92
  * @throws {@link errors.SchedulinError}
74
93
  * @throws {@link errors.SchedulinTimeoutError}
@@ -86,7 +105,12 @@ export declare class SocialAccountsClient {
86
105
  * @param {Schedulin.ListSlackChannelsSocialAccountsRequest} request
87
106
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
88
107
  *
108
+ * @throws {@link Schedulin.BadRequestError}
89
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}
90
114
  * @throws {@link Schedulin.InternalServerError}
91
115
  * @throws {@link errors.SchedulinError}
92
116
  * @throws {@link errors.SchedulinTimeoutError}
@@ -104,7 +128,13 @@ export declare class SocialAccountsClient {
104
128
  * @param {Schedulin.UpdateSocialAccountsRequest} request
105
129
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
106
130
  *
131
+ * @throws {@link Schedulin.BadRequestError}
107
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}
108
138
  * @throws {@link Schedulin.InternalServerError}
109
139
  * @throws {@link errors.SchedulinError}
110
140
  * @throws {@link errors.SchedulinTimeoutError}
@@ -117,12 +147,18 @@ export declare class SocialAccountsClient {
117
147
  update(request: Schedulin.UpdateSocialAccountsRequest, requestOptions?: SocialAccountsClient.RequestOptions): core.HttpResponsePromise<Schedulin.UpdateSocialAccountsResponse>;
118
148
  private __update;
119
149
  /**
120
- * Remove a connected social media account
150
+ * Remove a connected social media account. This permanently deletes ALL of the account's posts (scheduled, drafts and published history) and cannot be undone. To keep history, reconnect the account instead of deleting it.
121
151
  *
122
152
  * @param {Schedulin.DeleteSocialAccountsRequest} request
123
153
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
124
154
  *
155
+ * @throws {@link Schedulin.BadRequestError}
125
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}
126
162
  * @throws {@link Schedulin.InternalServerError}
127
163
  * @throws {@link errors.SchedulinError}
128
164
  * @throws {@link errors.SchedulinTimeoutError}
@@ -140,7 +176,13 @@ export declare class SocialAccountsClient {
140
176
  * @param {Schedulin.UpdateTimezoneSocialAccountsRequest} request
141
177
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
142
178
  *
179
+ * @throws {@link Schedulin.BadRequestError}
143
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}
144
186
  * @throws {@link Schedulin.InternalServerError}
145
187
  * @throws {@link errors.SchedulinError}
146
188
  * @throws {@link errors.SchedulinTimeoutError}
@@ -159,7 +201,12 @@ export declare class SocialAccountsClient {
159
201
  * @param {Schedulin.NextSlotsSocialAccountsRequest} request
160
202
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
161
203
  *
204
+ * @throws {@link Schedulin.BadRequestError}
162
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}
163
210
  * @throws {@link Schedulin.InternalServerError}
164
211
  * @throws {@link errors.SchedulinError}
165
212
  * @throws {@link errors.SchedulinTimeoutError}
@@ -177,7 +224,12 @@ export declare class SocialAccountsClient {
177
224
  * @param {Schedulin.PinterestBoardsSocialAccountsRequest} request
178
225
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
179
226
  *
227
+ * @throws {@link Schedulin.BadRequestError}
180
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}
181
233
  * @throws {@link Schedulin.InternalServerError}
182
234
  * @throws {@link errors.SchedulinError}
183
235
  * @throws {@link errors.SchedulinTimeoutError}
@@ -195,7 +247,12 @@ export declare class SocialAccountsClient {
195
247
  * @param {Schedulin.TiktokCreatorInfoSocialAccountsRequest} request
196
248
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
197
249
  *
250
+ * @throws {@link Schedulin.BadRequestError}
198
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}
199
256
  * @throws {@link Schedulin.InternalServerError}
200
257
  * @throws {@link errors.SchedulinError}
201
258
  * @throws {@link errors.SchedulinTimeoutError}
@@ -36,7 +36,11 @@ export class SocialAccountsClient {
36
36
  *
37
37
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
38
38
  *
39
+ * @throws {@link Schedulin.BadRequestError}
39
40
  * @throws {@link Schedulin.UnauthorizedError}
41
+ * @throws {@link Schedulin.ForbiddenError}
42
+ * @throws {@link Schedulin.UnprocessableEntityError}
43
+ * @throws {@link Schedulin.TooManyRequestsError}
40
44
  * @throws {@link Schedulin.InternalServerError}
41
45
  * @throws {@link errors.SchedulinError}
42
46
  * @throws {@link errors.SchedulinTimeoutError}
@@ -68,8 +72,16 @@ export class SocialAccountsClient {
68
72
  }
69
73
  if (_response.error.reason === "status-code") {
70
74
  switch (_response.error.statusCode) {
75
+ case 400:
76
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
71
77
  case 401:
72
78
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
79
+ case 403:
80
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
81
+ case 422:
82
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
83
+ case 429:
84
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
73
85
  case 500:
74
86
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
75
87
  default:
@@ -89,7 +101,12 @@ export class SocialAccountsClient {
89
101
  * @param {Schedulin.ListWhopCompaniesSocialAccountsRequest} request
90
102
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
91
103
  *
104
+ * @throws {@link Schedulin.BadRequestError}
92
105
  * @throws {@link Schedulin.UnauthorizedError}
106
+ * @throws {@link Schedulin.ForbiddenError}
107
+ * @throws {@link Schedulin.NotFoundError}
108
+ * @throws {@link Schedulin.UnprocessableEntityError}
109
+ * @throws {@link Schedulin.TooManyRequestsError}
93
110
  * @throws {@link Schedulin.InternalServerError}
94
111
  * @throws {@link errors.SchedulinError}
95
112
  * @throws {@link errors.SchedulinTimeoutError}
@@ -127,8 +144,18 @@ export class SocialAccountsClient {
127
144
  }
128
145
  if (_response.error.reason === "status-code") {
129
146
  switch (_response.error.statusCode) {
147
+ case 400:
148
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
130
149
  case 401:
131
150
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
151
+ case 403:
152
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
153
+ case 404:
154
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
155
+ case 422:
156
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
157
+ case 429:
158
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
132
159
  case 500:
133
160
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
134
161
  default:
@@ -148,7 +175,12 @@ export class SocialAccountsClient {
148
175
  * @param {Schedulin.ListWhopForumsSocialAccountsRequest} request
149
176
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
150
177
  *
178
+ * @throws {@link Schedulin.BadRequestError}
151
179
  * @throws {@link Schedulin.UnauthorizedError}
180
+ * @throws {@link Schedulin.ForbiddenError}
181
+ * @throws {@link Schedulin.NotFoundError}
182
+ * @throws {@link Schedulin.UnprocessableEntityError}
183
+ * @throws {@link Schedulin.TooManyRequestsError}
152
184
  * @throws {@link Schedulin.InternalServerError}
153
185
  * @throws {@link errors.SchedulinError}
154
186
  * @throws {@link errors.SchedulinTimeoutError}
@@ -194,8 +226,18 @@ export class SocialAccountsClient {
194
226
  }
195
227
  if (_response.error.reason === "status-code") {
196
228
  switch (_response.error.statusCode) {
229
+ case 400:
230
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
197
231
  case 401:
198
232
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
233
+ case 403:
234
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
235
+ case 404:
236
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
237
+ case 422:
238
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
239
+ case 429:
240
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
199
241
  case 500:
200
242
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
201
243
  default:
@@ -215,7 +257,12 @@ export class SocialAccountsClient {
215
257
  * @param {Schedulin.ListDiscordChannelsSocialAccountsRequest} request
216
258
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
217
259
  *
260
+ * @throws {@link Schedulin.BadRequestError}
218
261
  * @throws {@link Schedulin.UnauthorizedError}
262
+ * @throws {@link Schedulin.ForbiddenError}
263
+ * @throws {@link Schedulin.NotFoundError}
264
+ * @throws {@link Schedulin.UnprocessableEntityError}
265
+ * @throws {@link Schedulin.TooManyRequestsError}
219
266
  * @throws {@link Schedulin.InternalServerError}
220
267
  * @throws {@link errors.SchedulinError}
221
268
  * @throws {@link errors.SchedulinTimeoutError}
@@ -253,8 +300,18 @@ export class SocialAccountsClient {
253
300
  }
254
301
  if (_response.error.reason === "status-code") {
255
302
  switch (_response.error.statusCode) {
303
+ case 400:
304
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
256
305
  case 401:
257
306
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
307
+ case 403:
308
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
309
+ case 404:
310
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
311
+ case 422:
312
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
313
+ case 429:
314
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
258
315
  case 500:
259
316
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
260
317
  default:
@@ -274,7 +331,12 @@ export class SocialAccountsClient {
274
331
  * @param {Schedulin.ListSlackChannelsSocialAccountsRequest} request
275
332
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
276
333
  *
334
+ * @throws {@link Schedulin.BadRequestError}
277
335
  * @throws {@link Schedulin.UnauthorizedError}
336
+ * @throws {@link Schedulin.ForbiddenError}
337
+ * @throws {@link Schedulin.NotFoundError}
338
+ * @throws {@link Schedulin.UnprocessableEntityError}
339
+ * @throws {@link Schedulin.TooManyRequestsError}
278
340
  * @throws {@link Schedulin.InternalServerError}
279
341
  * @throws {@link errors.SchedulinError}
280
342
  * @throws {@link errors.SchedulinTimeoutError}
@@ -312,8 +374,18 @@ export class SocialAccountsClient {
312
374
  }
313
375
  if (_response.error.reason === "status-code") {
314
376
  switch (_response.error.statusCode) {
377
+ case 400:
378
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
315
379
  case 401:
316
380
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
381
+ case 403:
382
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
383
+ case 404:
384
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
385
+ case 422:
386
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
387
+ case 429:
388
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
317
389
  case 500:
318
390
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
319
391
  default:
@@ -333,7 +405,13 @@ export class SocialAccountsClient {
333
405
  * @param {Schedulin.UpdateSocialAccountsRequest} request
334
406
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
335
407
  *
408
+ * @throws {@link Schedulin.BadRequestError}
336
409
  * @throws {@link Schedulin.UnauthorizedError}
410
+ * @throws {@link Schedulin.ForbiddenError}
411
+ * @throws {@link Schedulin.NotFoundError}
412
+ * @throws {@link Schedulin.ConflictError}
413
+ * @throws {@link Schedulin.UnprocessableEntityError}
414
+ * @throws {@link Schedulin.TooManyRequestsError}
337
415
  * @throws {@link Schedulin.InternalServerError}
338
416
  * @throws {@link errors.SchedulinError}
339
417
  * @throws {@link errors.SchedulinTimeoutError}
@@ -374,8 +452,20 @@ export class SocialAccountsClient {
374
452
  }
375
453
  if (_response.error.reason === "status-code") {
376
454
  switch (_response.error.statusCode) {
455
+ case 400:
456
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
377
457
  case 401:
378
458
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
459
+ case 403:
460
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
461
+ case 404:
462
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
463
+ case 409:
464
+ throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
465
+ case 422:
466
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
467
+ case 429:
468
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
379
469
  case 500:
380
470
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
381
471
  default:
@@ -390,12 +480,18 @@ export class SocialAccountsClient {
390
480
  });
391
481
  }
392
482
  /**
393
- * Remove a connected social media account
483
+ * Remove a connected social media account. This permanently deletes ALL of the account's posts (scheduled, drafts and published history) and cannot be undone. To keep history, reconnect the account instead of deleting it.
394
484
  *
395
485
  * @param {Schedulin.DeleteSocialAccountsRequest} request
396
486
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
397
487
  *
488
+ * @throws {@link Schedulin.BadRequestError}
398
489
  * @throws {@link Schedulin.UnauthorizedError}
490
+ * @throws {@link Schedulin.ForbiddenError}
491
+ * @throws {@link Schedulin.NotFoundError}
492
+ * @throws {@link Schedulin.ConflictError}
493
+ * @throws {@link Schedulin.UnprocessableEntityError}
494
+ * @throws {@link Schedulin.TooManyRequestsError}
399
495
  * @throws {@link Schedulin.InternalServerError}
400
496
  * @throws {@link errors.SchedulinError}
401
497
  * @throws {@link errors.SchedulinTimeoutError}
@@ -436,8 +532,20 @@ export class SocialAccountsClient {
436
532
  }
437
533
  if (_response.error.reason === "status-code") {
438
534
  switch (_response.error.statusCode) {
535
+ case 400:
536
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
439
537
  case 401:
440
538
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
539
+ case 403:
540
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
541
+ case 404:
542
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
543
+ case 409:
544
+ throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
545
+ case 422:
546
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
547
+ case 429:
548
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
441
549
  case 500:
442
550
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
443
551
  default:
@@ -457,7 +565,13 @@ export class SocialAccountsClient {
457
565
  * @param {Schedulin.UpdateTimezoneSocialAccountsRequest} request
458
566
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
459
567
  *
568
+ * @throws {@link Schedulin.BadRequestError}
460
569
  * @throws {@link Schedulin.UnauthorizedError}
570
+ * @throws {@link Schedulin.ForbiddenError}
571
+ * @throws {@link Schedulin.NotFoundError}
572
+ * @throws {@link Schedulin.ConflictError}
573
+ * @throws {@link Schedulin.UnprocessableEntityError}
574
+ * @throws {@link Schedulin.TooManyRequestsError}
461
575
  * @throws {@link Schedulin.InternalServerError}
462
576
  * @throws {@link errors.SchedulinError}
463
577
  * @throws {@link errors.SchedulinTimeoutError}
@@ -499,8 +613,20 @@ export class SocialAccountsClient {
499
613
  }
500
614
  if (_response.error.reason === "status-code") {
501
615
  switch (_response.error.statusCode) {
616
+ case 400:
617
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
502
618
  case 401:
503
619
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
620
+ case 403:
621
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
622
+ case 404:
623
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
624
+ case 409:
625
+ throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
626
+ case 422:
627
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
628
+ case 429:
629
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
504
630
  case 500:
505
631
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
506
632
  default:
@@ -520,7 +646,12 @@ export class SocialAccountsClient {
520
646
  * @param {Schedulin.NextSlotsSocialAccountsRequest} request
521
647
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
522
648
  *
649
+ * @throws {@link Schedulin.BadRequestError}
523
650
  * @throws {@link Schedulin.UnauthorizedError}
651
+ * @throws {@link Schedulin.ForbiddenError}
652
+ * @throws {@link Schedulin.NotFoundError}
653
+ * @throws {@link Schedulin.UnprocessableEntityError}
654
+ * @throws {@link Schedulin.TooManyRequestsError}
524
655
  * @throws {@link Schedulin.InternalServerError}
525
656
  * @throws {@link errors.SchedulinError}
526
657
  * @throws {@link errors.SchedulinTimeoutError}
@@ -566,8 +697,18 @@ export class SocialAccountsClient {
566
697
  }
567
698
  if (_response.error.reason === "status-code") {
568
699
  switch (_response.error.statusCode) {
700
+ case 400:
701
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
569
702
  case 401:
570
703
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
704
+ case 403:
705
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
706
+ case 404:
707
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
708
+ case 422:
709
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
710
+ case 429:
711
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
571
712
  case 500:
572
713
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
573
714
  default:
@@ -587,7 +728,12 @@ export class SocialAccountsClient {
587
728
  * @param {Schedulin.PinterestBoardsSocialAccountsRequest} request
588
729
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
589
730
  *
731
+ * @throws {@link Schedulin.BadRequestError}
590
732
  * @throws {@link Schedulin.UnauthorizedError}
733
+ * @throws {@link Schedulin.ForbiddenError}
734
+ * @throws {@link Schedulin.NotFoundError}
735
+ * @throws {@link Schedulin.UnprocessableEntityError}
736
+ * @throws {@link Schedulin.TooManyRequestsError}
591
737
  * @throws {@link Schedulin.InternalServerError}
592
738
  * @throws {@link errors.SchedulinError}
593
739
  * @throws {@link errors.SchedulinTimeoutError}
@@ -625,8 +771,18 @@ export class SocialAccountsClient {
625
771
  }
626
772
  if (_response.error.reason === "status-code") {
627
773
  switch (_response.error.statusCode) {
774
+ case 400:
775
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
628
776
  case 401:
629
777
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
778
+ case 403:
779
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
780
+ case 404:
781
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
782
+ case 422:
783
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
784
+ case 429:
785
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
630
786
  case 500:
631
787
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
632
788
  default:
@@ -646,7 +802,12 @@ export class SocialAccountsClient {
646
802
  * @param {Schedulin.TiktokCreatorInfoSocialAccountsRequest} request
647
803
  * @param {SocialAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
648
804
  *
805
+ * @throws {@link Schedulin.BadRequestError}
649
806
  * @throws {@link Schedulin.UnauthorizedError}
807
+ * @throws {@link Schedulin.ForbiddenError}
808
+ * @throws {@link Schedulin.NotFoundError}
809
+ * @throws {@link Schedulin.UnprocessableEntityError}
810
+ * @throws {@link Schedulin.TooManyRequestsError}
650
811
  * @throws {@link Schedulin.InternalServerError}
651
812
  * @throws {@link errors.SchedulinError}
652
813
  * @throws {@link errors.SchedulinTimeoutError}
@@ -684,8 +845,18 @@ export class SocialAccountsClient {
684
845
  }
685
846
  if (_response.error.reason === "status-code") {
686
847
  switch (_response.error.statusCode) {
848
+ case 400:
849
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
687
850
  case 401:
688
851
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
852
+ case 403:
853
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
854
+ case 404:
855
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
856
+ case 422:
857
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
858
+ case 429:
859
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
689
860
  case 500:
690
861
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
691
862
  default:
@@ -16,7 +16,11 @@ export declare class TagsClient {
16
16
  * @param {Schedulin.ListTagsRequest} request
17
17
  * @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
18
18
  *
19
+ * @throws {@link Schedulin.BadRequestError}
19
20
  * @throws {@link Schedulin.UnauthorizedError}
21
+ * @throws {@link Schedulin.ForbiddenError}
22
+ * @throws {@link Schedulin.UnprocessableEntityError}
23
+ * @throws {@link Schedulin.TooManyRequestsError}
20
24
  * @throws {@link Schedulin.InternalServerError}
21
25
  * @throws {@link errors.SchedulinError}
22
26
  * @throws {@link errors.SchedulinTimeoutError}
@@ -32,7 +36,12 @@ export declare class TagsClient {
32
36
  * @param {Schedulin.CreateTagsRequest} request
33
37
  * @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
34
38
  *
39
+ * @throws {@link Schedulin.BadRequestError}
35
40
  * @throws {@link Schedulin.UnauthorizedError}
41
+ * @throws {@link Schedulin.ForbiddenError}
42
+ * @throws {@link Schedulin.ConflictError}
43
+ * @throws {@link Schedulin.UnprocessableEntityError}
44
+ * @throws {@link Schedulin.TooManyRequestsError}
36
45
  * @throws {@link Schedulin.InternalServerError}
37
46
  * @throws {@link errors.SchedulinError}
38
47
  * @throws {@link errors.SchedulinTimeoutError}
@@ -51,7 +60,13 @@ export declare class TagsClient {
51
60
  * @param {Schedulin.UpdateTagsRequest} request
52
61
  * @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
53
62
  *
63
+ * @throws {@link Schedulin.BadRequestError}
54
64
  * @throws {@link Schedulin.UnauthorizedError}
65
+ * @throws {@link Schedulin.ForbiddenError}
66
+ * @throws {@link Schedulin.NotFoundError}
67
+ * @throws {@link Schedulin.ConflictError}
68
+ * @throws {@link Schedulin.UnprocessableEntityError}
69
+ * @throws {@link Schedulin.TooManyRequestsError}
55
70
  * @throws {@link Schedulin.InternalServerError}
56
71
  * @throws {@link errors.SchedulinError}
57
72
  * @throws {@link errors.SchedulinTimeoutError}
@@ -69,7 +84,13 @@ export declare class TagsClient {
69
84
  * @param {Schedulin.DeleteTagsRequest} request
70
85
  * @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
71
86
  *
87
+ * @throws {@link Schedulin.BadRequestError}
72
88
  * @throws {@link Schedulin.UnauthorizedError}
89
+ * @throws {@link Schedulin.ForbiddenError}
90
+ * @throws {@link Schedulin.NotFoundError}
91
+ * @throws {@link Schedulin.ConflictError}
92
+ * @throws {@link Schedulin.UnprocessableEntityError}
93
+ * @throws {@link Schedulin.TooManyRequestsError}
73
94
  * @throws {@link Schedulin.InternalServerError}
74
95
  * @throws {@link errors.SchedulinError}
75
96
  * @throws {@link errors.SchedulinTimeoutError}