@schedulin/sdk 0.3.1 → 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 (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 +57 -0
  48. package/cjs/api/resources/socialAccounts/client/Client.js +171 -0
  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 +57 -0
  132. package/esm/api/resources/socialAccounts/client/Client.mjs +171 -0
  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 WebhooksClient {
15
15
  *
16
16
  * @param {WebhooksClient.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}
@@ -23,7 +27,7 @@ export declare class WebhooksClient {
23
27
  * @example
24
28
  * await client.webhooks.list()
25
29
  */
26
- list(requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<unknown>;
30
+ list(requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schedulin.ListWebhooksResponse>;
27
31
  private __list;
28
32
  /**
29
33
  * Register an HTTPS endpoint for event deliveries. The response includes the signing secret ONCE — store it; later reads return a masked value.
@@ -31,7 +35,12 @@ export declare class WebhooksClient {
31
35
  * @param {Schedulin.CreateWebhooksRequest} request
32
36
  * @param {WebhooksClient.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.ConflictError}
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}
@@ -42,7 +51,7 @@ export declare class WebhooksClient {
42
51
  * events: ["post.published"]
43
52
  * })
44
53
  */
45
- create(request: Schedulin.CreateWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<unknown>;
54
+ create(request: Schedulin.CreateWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schedulin.WebhookEndpoint>;
46
55
  private __create;
47
56
  /**
48
57
  * Retrieve one webhook endpoint, including failure counters. The signing secret is masked.
@@ -50,7 +59,12 @@ export declare class WebhooksClient {
50
59
  * @param {Schedulin.RetrieveWebhooksRequest} request
51
60
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
52
61
  *
62
+ * @throws {@link Schedulin.BadRequestError}
53
63
  * @throws {@link Schedulin.UnauthorizedError}
64
+ * @throws {@link Schedulin.ForbiddenError}
65
+ * @throws {@link Schedulin.NotFoundError}
66
+ * @throws {@link Schedulin.UnprocessableEntityError}
67
+ * @throws {@link Schedulin.TooManyRequestsError}
54
68
  * @throws {@link Schedulin.InternalServerError}
55
69
  * @throws {@link errors.SchedulinError}
56
70
  * @throws {@link errors.SchedulinTimeoutError}
@@ -60,7 +74,7 @@ export declare class WebhooksClient {
60
74
  * id: "id"
61
75
  * })
62
76
  */
63
- retrieve(request: Schedulin.RetrieveWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<unknown>;
77
+ retrieve(request: Schedulin.RetrieveWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schedulin.WebhookEndpoint>;
64
78
  private __retrieve;
65
79
  /**
66
80
  * Delete a webhook endpoint and its delivery history. Deliveries already in flight are dropped.
@@ -68,7 +82,13 @@ export declare class WebhooksClient {
68
82
  * @param {Schedulin.DeleteWebhooksRequest} request
69
83
  * @param {WebhooksClient.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.ConflictError}
90
+ * @throws {@link Schedulin.UnprocessableEntityError}
91
+ * @throws {@link Schedulin.TooManyRequestsError}
72
92
  * @throws {@link Schedulin.InternalServerError}
73
93
  * @throws {@link errors.SchedulinError}
74
94
  * @throws {@link errors.SchedulinTimeoutError}
@@ -78,7 +98,7 @@ export declare class WebhooksClient {
78
98
  * id: "id"
79
99
  * })
80
100
  */
81
- delete(request: Schedulin.DeleteWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<unknown>;
101
+ delete(request: Schedulin.DeleteWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schedulin.DeleteWebhooksResponse>;
82
102
  private __delete;
83
103
  /**
84
104
  * Update URL, subscribed events, description, or enabled state. Re-enabling resets the failure streak.
@@ -86,7 +106,13 @@ export declare class WebhooksClient {
86
106
  * @param {Schedulin.UpdateWebhooksRequest} request
87
107
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
88
108
  *
109
+ * @throws {@link Schedulin.BadRequestError}
89
110
  * @throws {@link Schedulin.UnauthorizedError}
111
+ * @throws {@link Schedulin.ForbiddenError}
112
+ * @throws {@link Schedulin.NotFoundError}
113
+ * @throws {@link Schedulin.ConflictError}
114
+ * @throws {@link Schedulin.UnprocessableEntityError}
115
+ * @throws {@link Schedulin.TooManyRequestsError}
90
116
  * @throws {@link Schedulin.InternalServerError}
91
117
  * @throws {@link errors.SchedulinError}
92
118
  * @throws {@link errors.SchedulinTimeoutError}
@@ -96,7 +122,7 @@ export declare class WebhooksClient {
96
122
  * id: "id"
97
123
  * })
98
124
  */
99
- update(request: Schedulin.UpdateWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<unknown>;
125
+ update(request: Schedulin.UpdateWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schedulin.WebhookEndpoint>;
100
126
  private __update;
101
127
  /**
102
128
  * Generate a new signing secret for the endpoint and return it ONCE. The old secret stops signing immediately.
@@ -104,7 +130,13 @@ export declare class WebhooksClient {
104
130
  * @param {Schedulin.RotateSecretWebhooksRequest} request
105
131
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
106
132
  *
133
+ * @throws {@link Schedulin.BadRequestError}
107
134
  * @throws {@link Schedulin.UnauthorizedError}
135
+ * @throws {@link Schedulin.ForbiddenError}
136
+ * @throws {@link Schedulin.NotFoundError}
137
+ * @throws {@link Schedulin.ConflictError}
138
+ * @throws {@link Schedulin.UnprocessableEntityError}
139
+ * @throws {@link Schedulin.TooManyRequestsError}
108
140
  * @throws {@link Schedulin.InternalServerError}
109
141
  * @throws {@link errors.SchedulinError}
110
142
  * @throws {@link errors.SchedulinTimeoutError}
@@ -114,7 +146,7 @@ export declare class WebhooksClient {
114
146
  * id: "id"
115
147
  * })
116
148
  */
117
- rotateSecret(request: Schedulin.RotateSecretWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<unknown>;
149
+ rotateSecret(request: Schedulin.RotateSecretWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schedulin.WebhookEndpoint>;
118
150
  private __rotateSecret;
119
151
  /**
120
152
  * Send a signed `ping` event to the endpoint URL and record it in the delivery history.
@@ -122,7 +154,13 @@ export declare class WebhooksClient {
122
154
  * @param {Schedulin.TestWebhooksRequest} request
123
155
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
124
156
  *
157
+ * @throws {@link Schedulin.BadRequestError}
125
158
  * @throws {@link Schedulin.UnauthorizedError}
159
+ * @throws {@link Schedulin.ForbiddenError}
160
+ * @throws {@link Schedulin.NotFoundError}
161
+ * @throws {@link Schedulin.ConflictError}
162
+ * @throws {@link Schedulin.UnprocessableEntityError}
163
+ * @throws {@link Schedulin.TooManyRequestsError}
126
164
  * @throws {@link Schedulin.InternalServerError}
127
165
  * @throws {@link errors.SchedulinError}
128
166
  * @throws {@link errors.SchedulinTimeoutError}
@@ -132,7 +170,7 @@ export declare class WebhooksClient {
132
170
  * id: "id"
133
171
  * })
134
172
  */
135
- test(request: Schedulin.TestWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<unknown>;
173
+ test(request: Schedulin.TestWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schedulin.TestWebhooksResponse>;
136
174
  private __test;
137
175
  /**
138
176
  * Delivery history for a webhook endpoint: event, status, attempts, last response code, and payload.
@@ -140,7 +178,12 @@ export declare class WebhooksClient {
140
178
  * @param {Schedulin.ListDeliveriesWebhooksRequest} request
141
179
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
142
180
  *
181
+ * @throws {@link Schedulin.BadRequestError}
143
182
  * @throws {@link Schedulin.UnauthorizedError}
183
+ * @throws {@link Schedulin.ForbiddenError}
184
+ * @throws {@link Schedulin.NotFoundError}
185
+ * @throws {@link Schedulin.UnprocessableEntityError}
186
+ * @throws {@link Schedulin.TooManyRequestsError}
144
187
  * @throws {@link Schedulin.InternalServerError}
145
188
  * @throws {@link errors.SchedulinError}
146
189
  * @throws {@link errors.SchedulinTimeoutError}
@@ -150,6 +193,6 @@ export declare class WebhooksClient {
150
193
  * id: "id"
151
194
  * })
152
195
  */
153
- listDeliveries(request: Schedulin.ListDeliveriesWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<unknown>;
196
+ listDeliveries(request: Schedulin.ListDeliveriesWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schedulin.ListDeliveriesWebhooksResponse>;
154
197
  private __listDeliveries;
155
198
  }
@@ -72,7 +72,11 @@ class WebhooksClient {
72
72
  *
73
73
  * @param {WebhooksClient.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 WebhooksClient {
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 WebhooksClient {
125
137
  * @param {Schedulin.CreateWebhooksRequest} request
126
138
  * @param {WebhooksClient.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.ConflictError}
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 WebhooksClient {
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 409:
190
+ throw new Schedulin.ConflictError(_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 WebhooksClient {
184
211
  * @param {Schedulin.RetrieveWebhooksRequest} request
185
212
  * @param {WebhooksClient.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}
@@ -219,8 +251,18 @@ class WebhooksClient {
219
251
  }
220
252
  if (_response.error.reason === "status-code") {
221
253
  switch (_response.error.statusCode) {
254
+ case 400:
255
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
222
256
  case 401:
223
257
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
258
+ case 403:
259
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
260
+ case 404:
261
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
262
+ case 422:
263
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
264
+ case 429:
265
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
224
266
  case 500:
225
267
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
226
268
  default:
@@ -240,7 +282,13 @@ class WebhooksClient {
240
282
  * @param {Schedulin.DeleteWebhooksRequest} request
241
283
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
242
284
  *
285
+ * @throws {@link Schedulin.BadRequestError}
243
286
  * @throws {@link Schedulin.UnauthorizedError}
287
+ * @throws {@link Schedulin.ForbiddenError}
288
+ * @throws {@link Schedulin.NotFoundError}
289
+ * @throws {@link Schedulin.ConflictError}
290
+ * @throws {@link Schedulin.UnprocessableEntityError}
291
+ * @throws {@link Schedulin.TooManyRequestsError}
244
292
  * @throws {@link Schedulin.InternalServerError}
245
293
  * @throws {@link errors.SchedulinError}
246
294
  * @throws {@link errors.SchedulinTimeoutError}
@@ -278,8 +326,20 @@ class WebhooksClient {
278
326
  }
279
327
  if (_response.error.reason === "status-code") {
280
328
  switch (_response.error.statusCode) {
329
+ case 400:
330
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
281
331
  case 401:
282
332
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
333
+ case 403:
334
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
335
+ case 404:
336
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
337
+ case 409:
338
+ throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
339
+ case 422:
340
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
341
+ case 429:
342
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
283
343
  case 500:
284
344
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
285
345
  default:
@@ -299,7 +359,13 @@ class WebhooksClient {
299
359
  * @param {Schedulin.UpdateWebhooksRequest} request
300
360
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
301
361
  *
362
+ * @throws {@link Schedulin.BadRequestError}
302
363
  * @throws {@link Schedulin.UnauthorizedError}
364
+ * @throws {@link Schedulin.ForbiddenError}
365
+ * @throws {@link Schedulin.NotFoundError}
366
+ * @throws {@link Schedulin.ConflictError}
367
+ * @throws {@link Schedulin.UnprocessableEntityError}
368
+ * @throws {@link Schedulin.TooManyRequestsError}
303
369
  * @throws {@link Schedulin.InternalServerError}
304
370
  * @throws {@link errors.SchedulinError}
305
371
  * @throws {@link errors.SchedulinTimeoutError}
@@ -337,8 +403,20 @@ class WebhooksClient {
337
403
  }
338
404
  if (_response.error.reason === "status-code") {
339
405
  switch (_response.error.statusCode) {
406
+ case 400:
407
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
340
408
  case 401:
341
409
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
410
+ case 403:
411
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
412
+ case 404:
413
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
414
+ case 409:
415
+ throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
416
+ case 422:
417
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
418
+ case 429:
419
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
342
420
  case 500:
343
421
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
344
422
  default:
@@ -358,7 +436,13 @@ class WebhooksClient {
358
436
  * @param {Schedulin.RotateSecretWebhooksRequest} request
359
437
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
360
438
  *
439
+ * @throws {@link Schedulin.BadRequestError}
361
440
  * @throws {@link Schedulin.UnauthorizedError}
441
+ * @throws {@link Schedulin.ForbiddenError}
442
+ * @throws {@link Schedulin.NotFoundError}
443
+ * @throws {@link Schedulin.ConflictError}
444
+ * @throws {@link Schedulin.UnprocessableEntityError}
445
+ * @throws {@link Schedulin.TooManyRequestsError}
362
446
  * @throws {@link Schedulin.InternalServerError}
363
447
  * @throws {@link errors.SchedulinError}
364
448
  * @throws {@link errors.SchedulinTimeoutError}
@@ -396,8 +480,20 @@ class WebhooksClient {
396
480
  }
397
481
  if (_response.error.reason === "status-code") {
398
482
  switch (_response.error.statusCode) {
483
+ case 400:
484
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
399
485
  case 401:
400
486
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
487
+ case 403:
488
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
489
+ case 404:
490
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
491
+ case 409:
492
+ throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
493
+ case 422:
494
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
495
+ case 429:
496
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
401
497
  case 500:
402
498
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
403
499
  default:
@@ -417,7 +513,13 @@ class WebhooksClient {
417
513
  * @param {Schedulin.TestWebhooksRequest} request
418
514
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
419
515
  *
516
+ * @throws {@link Schedulin.BadRequestError}
420
517
  * @throws {@link Schedulin.UnauthorizedError}
518
+ * @throws {@link Schedulin.ForbiddenError}
519
+ * @throws {@link Schedulin.NotFoundError}
520
+ * @throws {@link Schedulin.ConflictError}
521
+ * @throws {@link Schedulin.UnprocessableEntityError}
522
+ * @throws {@link Schedulin.TooManyRequestsError}
421
523
  * @throws {@link Schedulin.InternalServerError}
422
524
  * @throws {@link errors.SchedulinError}
423
525
  * @throws {@link errors.SchedulinTimeoutError}
@@ -455,8 +557,20 @@ class WebhooksClient {
455
557
  }
456
558
  if (_response.error.reason === "status-code") {
457
559
  switch (_response.error.statusCode) {
560
+ case 400:
561
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
458
562
  case 401:
459
563
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
564
+ case 403:
565
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
566
+ case 404:
567
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
568
+ case 409:
569
+ throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
570
+ case 422:
571
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
572
+ case 429:
573
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
460
574
  case 500:
461
575
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
462
576
  default:
@@ -476,7 +590,12 @@ class WebhooksClient {
476
590
  * @param {Schedulin.ListDeliveriesWebhooksRequest} request
477
591
  * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
478
592
  *
593
+ * @throws {@link Schedulin.BadRequestError}
479
594
  * @throws {@link Schedulin.UnauthorizedError}
595
+ * @throws {@link Schedulin.ForbiddenError}
596
+ * @throws {@link Schedulin.NotFoundError}
597
+ * @throws {@link Schedulin.UnprocessableEntityError}
598
+ * @throws {@link Schedulin.TooManyRequestsError}
480
599
  * @throws {@link Schedulin.InternalServerError}
481
600
  * @throws {@link errors.SchedulinError}
482
601
  * @throws {@link errors.SchedulinTimeoutError}
@@ -515,12 +634,25 @@ class WebhooksClient {
515
634
  logging: this._options.logging,
516
635
  });
517
636
  if (_response.ok) {
518
- return { data: _response.body, rawResponse: _response.rawResponse };
637
+ return {
638
+ data: _response.body,
639
+ rawResponse: _response.rawResponse,
640
+ };
519
641
  }
520
642
  if (_response.error.reason === "status-code") {
521
643
  switch (_response.error.statusCode) {
644
+ case 400:
645
+ throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
522
646
  case 401:
523
647
  throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
648
+ case 403:
649
+ throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
650
+ case 404:
651
+ throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
652
+ case 422:
653
+ throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
654
+ case 429:
655
+ throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
524
656
  case 500:
525
657
  throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
526
658
  default:
@@ -1 +1,2 @@
1
1
  export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,3 @@
1
+ export interface DeleteWebhooksResponse {
2
+ success: boolean;
3
+ }
@@ -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,4 @@
1
+ import type * as Schedulin from "../../../index.js";
2
+ export interface ListDeliveriesWebhooksResponse {
3
+ data: Schedulin.WebhookDelivery[];
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type * as Schedulin from "../../../index.js";
2
+ export interface ListWebhooksResponse {
3
+ data: Schedulin.WebhookEndpoint[];
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface TestWebhooksResponse {
2
+ deliveryId: string;
3
+ }
@@ -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,4 @@
1
+ export * from "./DeleteWebhooksResponse.js";
2
+ export * from "./ListDeliveriesWebhooksResponse.js";
3
+ export * from "./ListWebhooksResponse.js";
4
+ export * from "./TestWebhooksResponse.js";
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./DeleteWebhooksResponse.js"), exports);
18
+ __exportStar(require("./ListDeliveriesWebhooksResponse.js"), exports);
19
+ __exportStar(require("./ListWebhooksResponse.js"), exports);
20
+ __exportStar(require("./TestWebhooksResponse.js"), exports);
@@ -0,0 +1,27 @@
1
+ export interface AiGeneration {
2
+ id: string;
3
+ type: string;
4
+ status: AiGeneration.Status;
5
+ modelKey: string;
6
+ prompt: string;
7
+ imageUrl: string | null;
8
+ resultUrl: string | null;
9
+ width: number | null;
10
+ height: number | null;
11
+ durationSeconds: number | null;
12
+ costMicros: number;
13
+ estimatedCostMicros: number;
14
+ errorMessage: string | null;
15
+ createdAt: string;
16
+ updatedAt: string;
17
+ }
18
+ export declare namespace AiGeneration {
19
+ const Status: {
20
+ readonly Pending: "PENDING";
21
+ readonly Processing: "PROCESSING";
22
+ readonly Completed: "COMPLETED";
23
+ readonly Failed: "FAILED";
24
+ readonly Cancelled: "CANCELLED";
25
+ };
26
+ type Status = (typeof Status)[keyof typeof Status];
27
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AiGeneration = void 0;
5
+ var AiGeneration;
6
+ (function (AiGeneration) {
7
+ AiGeneration.Status = {
8
+ Pending: "PENDING",
9
+ Processing: "PROCESSING",
10
+ Completed: "COMPLETED",
11
+ Failed: "FAILED",
12
+ Cancelled: "CANCELLED",
13
+ };
14
+ })(AiGeneration || (exports.AiGeneration = AiGeneration = {}));
@@ -1,10 +1,22 @@
1
1
  /**
2
- * Error envelope. The machine-readable `code` and HTTP `status` are always present; the human-readable reason is in `data.message` (or `data.fieldErrors` for 422 validation errors).
2
+ * Error envelope. The machine-readable `code` and HTTP `status` are always present; the human-readable reason is in `message` / `data.message`.
3
3
  */
4
4
  export interface ErrorResponse {
5
5
  /** e.g. "BAD_REQUEST", "UNAUTHORIZED", "NOT_FOUND". */
6
6
  code: string;
7
7
  status: number;
8
8
  message?: string | undefined;
9
- data?: Record<string, unknown> | undefined;
9
+ defined?: boolean | undefined;
10
+ data?: ErrorResponse.Data | undefined;
11
+ }
12
+ export declare namespace ErrorResponse {
13
+ interface Data {
14
+ message?: string | undefined;
15
+ /** End-user-safe explanation, when available. */
16
+ userMessage?: string | undefined;
17
+ errorTag?: string | undefined;
18
+ isRetryable?: boolean | undefined;
19
+ /** Accepts any additional properties */
20
+ [key: string]: any;
21
+ }
10
22
  }
@@ -1,3 +1,4 @@
1
+ import type * as Schedulin from "../index.js";
1
2
  export interface Media {
2
3
  id: string;
3
4
  url: string;
@@ -11,4 +12,7 @@ export interface Media {
11
12
  bucket: string;
12
13
  key: string;
13
14
  size: number | null;
15
+ alt: string | null;
16
+ thumbnailUrl: string | null;
17
+ tags?: Schedulin.Tag[] | undefined;
14
18
  }
@@ -1,6 +1,6 @@
1
1
  export interface MediaUpdate {
2
2
  id: string;
3
- url: string;
3
+ url?: string | undefined;
4
4
  mimeType?: string | undefined;
5
5
  width?: number | undefined;
6
6
  height?: number | undefined;
@@ -14,6 +14,9 @@ export interface Post {
14
14
  platformConfiguration: Record<string, unknown> | null;
15
15
  socialAccountId: string;
16
16
  url: string | null;
17
+ title: string | null;
18
+ postedAt: string | null;
19
+ errorMessage: string | null;
17
20
  createdAt: string;
18
21
  updatedAt: string;
19
22
  }
@@ -0,0 +1,14 @@
1
+ export interface PostMedia {
2
+ id: string;
3
+ url: string;
4
+ name: string;
5
+ mimeType: string;
6
+ width: number | null;
7
+ height: number | null;
8
+ duration: number | null;
9
+ size: number | null;
10
+ alt: string | null;
11
+ thumbnailUrl: string | null;
12
+ createdAt: string;
13
+ updatedAt: string;
14
+ }
@@ -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 });