@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.
- package/cjs/api/errors/BadRequestError.d.ts +7 -0
- package/cjs/api/errors/BadRequestError.js +54 -0
- package/cjs/api/errors/ConflictError.d.ts +7 -0
- package/cjs/api/errors/ConflictError.js +54 -0
- package/cjs/api/errors/ForbiddenError.d.ts +7 -0
- package/cjs/api/errors/ForbiddenError.js +54 -0
- package/cjs/api/errors/NotFoundError.d.ts +7 -0
- package/cjs/api/errors/NotFoundError.js +54 -0
- package/cjs/api/errors/PaymentRequiredError.d.ts +7 -0
- package/cjs/api/errors/PaymentRequiredError.js +54 -0
- package/cjs/api/errors/TooManyRequestsError.d.ts +7 -0
- package/cjs/api/errors/TooManyRequestsError.js +54 -0
- package/cjs/api/errors/UnprocessableEntityError.d.ts +7 -0
- package/cjs/api/errors/UnprocessableEntityError.js +54 -0
- package/cjs/api/errors/index.d.ts +7 -0
- package/cjs/api/errors/index.js +7 -0
- package/cjs/api/resources/ai/client/Client.d.ts +11 -2
- package/cjs/api/resources/ai/client/Client.js +27 -0
- package/cjs/api/resources/ai/index.d.ts +1 -0
- package/cjs/api/resources/ai/index.js +1 -0
- package/cjs/api/resources/ai/types/GenerateImageAiResponse.d.ts +3 -0
- package/cjs/api/resources/ai/types/GenerateImageAiResponse.js +3 -0
- package/cjs/api/resources/ai/types/index.d.ts +1 -0
- package/cjs/api/resources/ai/types/index.js +17 -0
- package/cjs/api/resources/index.d.ts +2 -0
- package/cjs/api/resources/index.js +2 -0
- package/cjs/api/resources/media/client/Client.d.ts +58 -8
- package/cjs/api/resources/media/client/Client.js +158 -3
- package/cjs/api/resources/media/client/requests/UpdateMediaRequest.d.ts +2 -3
- package/cjs/api/resources/media/types/CreateUploadLinkMediaResponse.d.ts +4 -0
- package/cjs/api/resources/media/types/CreateUploadLinkMediaResponse.js +3 -0
- package/cjs/api/resources/media/types/DeleteMediaResponse.d.ts +4 -0
- package/cjs/api/resources/media/types/DeleteMediaResponse.js +3 -0
- package/cjs/api/resources/media/types/SetTagsMediaResponse.d.ts +4 -0
- package/cjs/api/resources/media/types/SetTagsMediaResponse.js +3 -0
- package/cjs/api/resources/media/types/index.d.ts +3 -0
- package/cjs/api/resources/media/types/index.js +3 -0
- package/cjs/api/resources/platforms/client/Client.d.ts +4 -0
- package/cjs/api/resources/platforms/client/Client.js +12 -0
- package/cjs/api/resources/posts/client/Client.d.ts +56 -1
- package/cjs/api/resources/posts/client/Client.js +165 -0
- package/cjs/api/resources/posts/types/CountByTabPostsResponse.d.ts +7 -0
- package/cjs/api/resources/posts/types/CountByTabPostsResponse.js +3 -0
- package/cjs/api/resources/posts/types/CreatePostsResponse.d.ts +1 -0
- package/cjs/api/resources/posts/types/index.d.ts +1 -0
- package/cjs/api/resources/posts/types/index.js +1 -0
- package/cjs/api/resources/socialAccounts/client/Client.d.ts +58 -1
- package/cjs/api/resources/socialAccounts/client/Client.js +172 -1
- package/cjs/api/resources/tags/client/Client.d.ts +21 -0
- package/cjs/api/resources/tags/client/Client.js +63 -0
- package/cjs/api/resources/webhooks/client/Client.d.ts +51 -8
- package/cjs/api/resources/webhooks/client/Client.js +133 -1
- package/cjs/api/resources/webhooks/index.d.ts +1 -0
- package/cjs/api/resources/webhooks/index.js +1 -0
- package/cjs/api/resources/webhooks/types/DeleteWebhooksResponse.d.ts +3 -0
- package/cjs/api/resources/webhooks/types/DeleteWebhooksResponse.js +3 -0
- package/cjs/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.d.ts +4 -0
- package/cjs/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.js +3 -0
- package/cjs/api/resources/webhooks/types/ListWebhooksResponse.d.ts +4 -0
- package/cjs/api/resources/webhooks/types/ListWebhooksResponse.js +3 -0
- package/cjs/api/resources/webhooks/types/TestWebhooksResponse.d.ts +3 -0
- package/cjs/api/resources/webhooks/types/TestWebhooksResponse.js +3 -0
- package/cjs/api/resources/webhooks/types/index.d.ts +4 -0
- package/cjs/api/resources/webhooks/types/index.js +20 -0
- package/cjs/api/types/AiGeneration.d.ts +27 -0
- package/cjs/api/types/AiGeneration.js +14 -0
- package/cjs/api/types/ErrorResponse.d.ts +14 -2
- package/cjs/api/types/Media.d.ts +4 -0
- package/cjs/api/types/MediaUpdate.d.ts +1 -1
- package/cjs/api/types/Post.d.ts +3 -0
- package/cjs/api/types/PostMedia.d.ts +14 -0
- package/cjs/api/types/PostMedia.js +3 -0
- package/cjs/api/types/PostWithRelations.d.ts +5 -68
- package/cjs/api/types/PostWithRelations.js +0 -54
- package/cjs/api/types/RateLimitErrorResponse.d.ts +17 -0
- package/cjs/api/types/RateLimitErrorResponse.js +3 -0
- package/cjs/api/types/ValidationErrorResponse.d.ts +17 -0
- package/cjs/api/types/ValidationErrorResponse.js +3 -0
- package/cjs/api/types/WebhookDelivery.d.ts +20 -0
- package/cjs/api/types/WebhookDelivery.js +12 -0
- package/cjs/api/types/WebhookEndpoint.d.ts +26 -0
- package/cjs/api/types/WebhookEndpoint.js +16 -0
- package/cjs/api/types/index.d.ts +6 -0
- package/cjs/api/types/index.js +6 -0
- package/esm/api/errors/BadRequestError.d.mts +7 -0
- package/esm/api/errors/BadRequestError.mjs +17 -0
- package/esm/api/errors/ConflictError.d.mts +7 -0
- package/esm/api/errors/ConflictError.mjs +17 -0
- package/esm/api/errors/ForbiddenError.d.mts +7 -0
- package/esm/api/errors/ForbiddenError.mjs +17 -0
- package/esm/api/errors/NotFoundError.d.mts +7 -0
- package/esm/api/errors/NotFoundError.mjs +17 -0
- package/esm/api/errors/PaymentRequiredError.d.mts +7 -0
- package/esm/api/errors/PaymentRequiredError.mjs +17 -0
- package/esm/api/errors/TooManyRequestsError.d.mts +7 -0
- package/esm/api/errors/TooManyRequestsError.mjs +17 -0
- package/esm/api/errors/UnprocessableEntityError.d.mts +7 -0
- package/esm/api/errors/UnprocessableEntityError.mjs +17 -0
- package/esm/api/errors/index.d.mts +7 -0
- package/esm/api/errors/index.mjs +7 -0
- package/esm/api/resources/ai/client/Client.d.mts +11 -2
- package/esm/api/resources/ai/client/Client.mjs +27 -0
- package/esm/api/resources/ai/index.d.mts +1 -0
- package/esm/api/resources/ai/index.mjs +1 -0
- package/esm/api/resources/ai/types/GenerateImageAiResponse.d.mts +3 -0
- package/esm/api/resources/ai/types/GenerateImageAiResponse.mjs +2 -0
- package/esm/api/resources/ai/types/index.d.mts +1 -0
- package/esm/api/resources/ai/types/index.mjs +1 -0
- package/esm/api/resources/index.d.mts +2 -0
- package/esm/api/resources/index.mjs +2 -0
- package/esm/api/resources/media/client/Client.d.mts +58 -8
- package/esm/api/resources/media/client/Client.mjs +158 -3
- package/esm/api/resources/media/client/requests/UpdateMediaRequest.d.mts +2 -3
- package/esm/api/resources/media/types/CreateUploadLinkMediaResponse.d.mts +4 -0
- package/esm/api/resources/media/types/CreateUploadLinkMediaResponse.mjs +2 -0
- package/esm/api/resources/media/types/DeleteMediaResponse.d.mts +4 -0
- package/esm/api/resources/media/types/DeleteMediaResponse.mjs +2 -0
- package/esm/api/resources/media/types/SetTagsMediaResponse.d.mts +4 -0
- package/esm/api/resources/media/types/SetTagsMediaResponse.mjs +2 -0
- package/esm/api/resources/media/types/index.d.mts +3 -0
- package/esm/api/resources/media/types/index.mjs +3 -0
- package/esm/api/resources/platforms/client/Client.d.mts +4 -0
- package/esm/api/resources/platforms/client/Client.mjs +12 -0
- package/esm/api/resources/posts/client/Client.d.mts +56 -1
- package/esm/api/resources/posts/client/Client.mjs +165 -0
- package/esm/api/resources/posts/types/CountByTabPostsResponse.d.mts +7 -0
- package/esm/api/resources/posts/types/CountByTabPostsResponse.mjs +2 -0
- package/esm/api/resources/posts/types/CreatePostsResponse.d.mts +1 -0
- package/esm/api/resources/posts/types/index.d.mts +1 -0
- package/esm/api/resources/posts/types/index.mjs +1 -0
- package/esm/api/resources/socialAccounts/client/Client.d.mts +58 -1
- package/esm/api/resources/socialAccounts/client/Client.mjs +172 -1
- package/esm/api/resources/tags/client/Client.d.mts +21 -0
- package/esm/api/resources/tags/client/Client.mjs +63 -0
- package/esm/api/resources/webhooks/client/Client.d.mts +51 -8
- package/esm/api/resources/webhooks/client/Client.mjs +133 -1
- package/esm/api/resources/webhooks/index.d.mts +1 -0
- package/esm/api/resources/webhooks/index.mjs +1 -0
- package/esm/api/resources/webhooks/types/DeleteWebhooksResponse.d.mts +3 -0
- package/esm/api/resources/webhooks/types/DeleteWebhooksResponse.mjs +2 -0
- package/esm/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.d.mts +4 -0
- package/esm/api/resources/webhooks/types/ListDeliveriesWebhooksResponse.mjs +2 -0
- package/esm/api/resources/webhooks/types/ListWebhooksResponse.d.mts +4 -0
- package/esm/api/resources/webhooks/types/ListWebhooksResponse.mjs +2 -0
- package/esm/api/resources/webhooks/types/TestWebhooksResponse.d.mts +3 -0
- package/esm/api/resources/webhooks/types/TestWebhooksResponse.mjs +2 -0
- package/esm/api/resources/webhooks/types/index.d.mts +4 -0
- package/esm/api/resources/webhooks/types/index.mjs +4 -0
- package/esm/api/types/AiGeneration.d.mts +27 -0
- package/esm/api/types/AiGeneration.mjs +11 -0
- package/esm/api/types/ErrorResponse.d.mts +14 -2
- package/esm/api/types/Media.d.mts +4 -0
- package/esm/api/types/MediaUpdate.d.mts +1 -1
- package/esm/api/types/Post.d.mts +3 -0
- package/esm/api/types/PostMedia.d.mts +14 -0
- package/esm/api/types/PostMedia.mjs +2 -0
- package/esm/api/types/PostWithRelations.d.mts +5 -68
- package/esm/api/types/PostWithRelations.mjs +1 -53
- package/esm/api/types/RateLimitErrorResponse.d.mts +17 -0
- package/esm/api/types/RateLimitErrorResponse.mjs +2 -0
- package/esm/api/types/ValidationErrorResponse.d.mts +17 -0
- package/esm/api/types/ValidationErrorResponse.mjs +2 -0
- package/esm/api/types/WebhookDelivery.d.mts +20 -0
- package/esm/api/types/WebhookDelivery.mjs +9 -0
- package/esm/api/types/WebhookEndpoint.d.mts +26 -0
- package/esm/api/types/WebhookEndpoint.mjs +13 -0
- package/esm/api/types/index.d.mts +6 -0
- package/esm/api/types/index.mjs +6 -0
- package/package.json +1 -1
|
@@ -37,7 +37,11 @@ export class TagsClient {
|
|
|
37
37
|
* @param {Schedulin.ListTagsRequest} request
|
|
38
38
|
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
39
|
*
|
|
40
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
40
41
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
42
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
43
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
44
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
41
45
|
* @throws {@link Schedulin.InternalServerError}
|
|
42
46
|
* @throws {@link errors.SchedulinError}
|
|
43
47
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -78,8 +82,16 @@ export class TagsClient {
|
|
|
78
82
|
}
|
|
79
83
|
if (_response.error.reason === "status-code") {
|
|
80
84
|
switch (_response.error.statusCode) {
|
|
85
|
+
case 400:
|
|
86
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
81
87
|
case 401:
|
|
82
88
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
89
|
+
case 403:
|
|
90
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
91
|
+
case 422:
|
|
92
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
93
|
+
case 429:
|
|
94
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
83
95
|
case 500:
|
|
84
96
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
85
97
|
default:
|
|
@@ -99,7 +111,12 @@ export class TagsClient {
|
|
|
99
111
|
* @param {Schedulin.CreateTagsRequest} request
|
|
100
112
|
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
113
|
*
|
|
114
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
102
115
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
116
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
117
|
+
* @throws {@link Schedulin.ConflictError}
|
|
118
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
119
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
103
120
|
* @throws {@link Schedulin.InternalServerError}
|
|
104
121
|
* @throws {@link errors.SchedulinError}
|
|
105
122
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -137,8 +154,18 @@ export class TagsClient {
|
|
|
137
154
|
}
|
|
138
155
|
if (_response.error.reason === "status-code") {
|
|
139
156
|
switch (_response.error.statusCode) {
|
|
157
|
+
case 400:
|
|
158
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
140
159
|
case 401:
|
|
141
160
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
161
|
+
case 403:
|
|
162
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
163
|
+
case 409:
|
|
164
|
+
throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
|
|
165
|
+
case 422:
|
|
166
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
167
|
+
case 429:
|
|
168
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
142
169
|
case 500:
|
|
143
170
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
144
171
|
default:
|
|
@@ -158,7 +185,13 @@ export class TagsClient {
|
|
|
158
185
|
* @param {Schedulin.UpdateTagsRequest} request
|
|
159
186
|
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
160
187
|
*
|
|
188
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
161
189
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
190
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
191
|
+
* @throws {@link Schedulin.NotFoundError}
|
|
192
|
+
* @throws {@link Schedulin.ConflictError}
|
|
193
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
194
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
162
195
|
* @throws {@link Schedulin.InternalServerError}
|
|
163
196
|
* @throws {@link errors.SchedulinError}
|
|
164
197
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -196,8 +229,20 @@ export class TagsClient {
|
|
|
196
229
|
}
|
|
197
230
|
if (_response.error.reason === "status-code") {
|
|
198
231
|
switch (_response.error.statusCode) {
|
|
232
|
+
case 400:
|
|
233
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
199
234
|
case 401:
|
|
200
235
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
236
|
+
case 403:
|
|
237
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
238
|
+
case 404:
|
|
239
|
+
throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
|
|
240
|
+
case 409:
|
|
241
|
+
throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
|
|
242
|
+
case 422:
|
|
243
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
244
|
+
case 429:
|
|
245
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
201
246
|
case 500:
|
|
202
247
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
203
248
|
default:
|
|
@@ -217,7 +262,13 @@ export class TagsClient {
|
|
|
217
262
|
* @param {Schedulin.DeleteTagsRequest} request
|
|
218
263
|
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
219
264
|
*
|
|
265
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
220
266
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
267
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
268
|
+
* @throws {@link Schedulin.NotFoundError}
|
|
269
|
+
* @throws {@link Schedulin.ConflictError}
|
|
270
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
271
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
221
272
|
* @throws {@link Schedulin.InternalServerError}
|
|
222
273
|
* @throws {@link errors.SchedulinError}
|
|
223
274
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -255,8 +306,20 @@ export class TagsClient {
|
|
|
255
306
|
}
|
|
256
307
|
if (_response.error.reason === "status-code") {
|
|
257
308
|
switch (_response.error.statusCode) {
|
|
309
|
+
case 400:
|
|
310
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
258
311
|
case 401:
|
|
259
312
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
313
|
+
case 403:
|
|
314
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
315
|
+
case 404:
|
|
316
|
+
throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
|
|
317
|
+
case 409:
|
|
318
|
+
throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
|
|
319
|
+
case 422:
|
|
320
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
321
|
+
case 429:
|
|
322
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
260
323
|
case 500:
|
|
261
324
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
262
325
|
default:
|
|
@@ -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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
196
|
+
listDeliveries(request: Schedulin.ListDeliveriesWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Schedulin.ListDeliveriesWebhooksResponse>;
|
|
154
197
|
private __listDeliveries;
|
|
155
198
|
}
|
|
@@ -36,7 +36,11 @@ export class WebhooksClient {
|
|
|
36
36
|
*
|
|
37
37
|
* @param {WebhooksClient.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 WebhooksClient {
|
|
|
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 WebhooksClient {
|
|
|
89
101
|
* @param {Schedulin.CreateWebhooksRequest} request
|
|
90
102
|
* @param {WebhooksClient.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.ConflictError}
|
|
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 WebhooksClient {
|
|
|
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 409:
|
|
154
|
+
throw new Schedulin.ConflictError(_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 WebhooksClient {
|
|
|
148
175
|
* @param {Schedulin.RetrieveWebhooksRequest} request
|
|
149
176
|
* @param {WebhooksClient.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}
|
|
@@ -183,8 +215,18 @@ export class WebhooksClient {
|
|
|
183
215
|
}
|
|
184
216
|
if (_response.error.reason === "status-code") {
|
|
185
217
|
switch (_response.error.statusCode) {
|
|
218
|
+
case 400:
|
|
219
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
186
220
|
case 401:
|
|
187
221
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
222
|
+
case 403:
|
|
223
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
224
|
+
case 404:
|
|
225
|
+
throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
|
|
226
|
+
case 422:
|
|
227
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
228
|
+
case 429:
|
|
229
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
188
230
|
case 500:
|
|
189
231
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
190
232
|
default:
|
|
@@ -204,7 +246,13 @@ export class WebhooksClient {
|
|
|
204
246
|
* @param {Schedulin.DeleteWebhooksRequest} request
|
|
205
247
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
206
248
|
*
|
|
249
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
207
250
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
251
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
252
|
+
* @throws {@link Schedulin.NotFoundError}
|
|
253
|
+
* @throws {@link Schedulin.ConflictError}
|
|
254
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
255
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
208
256
|
* @throws {@link Schedulin.InternalServerError}
|
|
209
257
|
* @throws {@link errors.SchedulinError}
|
|
210
258
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -242,8 +290,20 @@ export class WebhooksClient {
|
|
|
242
290
|
}
|
|
243
291
|
if (_response.error.reason === "status-code") {
|
|
244
292
|
switch (_response.error.statusCode) {
|
|
293
|
+
case 400:
|
|
294
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
245
295
|
case 401:
|
|
246
296
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
297
|
+
case 403:
|
|
298
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
299
|
+
case 404:
|
|
300
|
+
throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
|
|
301
|
+
case 409:
|
|
302
|
+
throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
|
|
303
|
+
case 422:
|
|
304
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
305
|
+
case 429:
|
|
306
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
247
307
|
case 500:
|
|
248
308
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
249
309
|
default:
|
|
@@ -263,7 +323,13 @@ export class WebhooksClient {
|
|
|
263
323
|
* @param {Schedulin.UpdateWebhooksRequest} request
|
|
264
324
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
265
325
|
*
|
|
326
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
266
327
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
328
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
329
|
+
* @throws {@link Schedulin.NotFoundError}
|
|
330
|
+
* @throws {@link Schedulin.ConflictError}
|
|
331
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
332
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
267
333
|
* @throws {@link Schedulin.InternalServerError}
|
|
268
334
|
* @throws {@link errors.SchedulinError}
|
|
269
335
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -301,8 +367,20 @@ export class WebhooksClient {
|
|
|
301
367
|
}
|
|
302
368
|
if (_response.error.reason === "status-code") {
|
|
303
369
|
switch (_response.error.statusCode) {
|
|
370
|
+
case 400:
|
|
371
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
304
372
|
case 401:
|
|
305
373
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
374
|
+
case 403:
|
|
375
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
376
|
+
case 404:
|
|
377
|
+
throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
|
|
378
|
+
case 409:
|
|
379
|
+
throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
|
|
380
|
+
case 422:
|
|
381
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
382
|
+
case 429:
|
|
383
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
306
384
|
case 500:
|
|
307
385
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
308
386
|
default:
|
|
@@ -322,7 +400,13 @@ export class WebhooksClient {
|
|
|
322
400
|
* @param {Schedulin.RotateSecretWebhooksRequest} request
|
|
323
401
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
324
402
|
*
|
|
403
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
325
404
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
405
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
406
|
+
* @throws {@link Schedulin.NotFoundError}
|
|
407
|
+
* @throws {@link Schedulin.ConflictError}
|
|
408
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
409
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
326
410
|
* @throws {@link Schedulin.InternalServerError}
|
|
327
411
|
* @throws {@link errors.SchedulinError}
|
|
328
412
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -360,8 +444,20 @@ export class WebhooksClient {
|
|
|
360
444
|
}
|
|
361
445
|
if (_response.error.reason === "status-code") {
|
|
362
446
|
switch (_response.error.statusCode) {
|
|
447
|
+
case 400:
|
|
448
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
363
449
|
case 401:
|
|
364
450
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
451
|
+
case 403:
|
|
452
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
453
|
+
case 404:
|
|
454
|
+
throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
|
|
455
|
+
case 409:
|
|
456
|
+
throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
|
|
457
|
+
case 422:
|
|
458
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
459
|
+
case 429:
|
|
460
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
365
461
|
case 500:
|
|
366
462
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
367
463
|
default:
|
|
@@ -381,7 +477,13 @@ export class WebhooksClient {
|
|
|
381
477
|
* @param {Schedulin.TestWebhooksRequest} request
|
|
382
478
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
383
479
|
*
|
|
480
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
384
481
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
482
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
483
|
+
* @throws {@link Schedulin.NotFoundError}
|
|
484
|
+
* @throws {@link Schedulin.ConflictError}
|
|
485
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
486
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
385
487
|
* @throws {@link Schedulin.InternalServerError}
|
|
386
488
|
* @throws {@link errors.SchedulinError}
|
|
387
489
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -419,8 +521,20 @@ export class WebhooksClient {
|
|
|
419
521
|
}
|
|
420
522
|
if (_response.error.reason === "status-code") {
|
|
421
523
|
switch (_response.error.statusCode) {
|
|
524
|
+
case 400:
|
|
525
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
422
526
|
case 401:
|
|
423
527
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
528
|
+
case 403:
|
|
529
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
530
|
+
case 404:
|
|
531
|
+
throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
|
|
532
|
+
case 409:
|
|
533
|
+
throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
|
|
534
|
+
case 422:
|
|
535
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
536
|
+
case 429:
|
|
537
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
424
538
|
case 500:
|
|
425
539
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
426
540
|
default:
|
|
@@ -440,7 +554,12 @@ export class WebhooksClient {
|
|
|
440
554
|
* @param {Schedulin.ListDeliveriesWebhooksRequest} request
|
|
441
555
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
442
556
|
*
|
|
557
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
443
558
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
559
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
560
|
+
* @throws {@link Schedulin.NotFoundError}
|
|
561
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
562
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
444
563
|
* @throws {@link Schedulin.InternalServerError}
|
|
445
564
|
* @throws {@link errors.SchedulinError}
|
|
446
565
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -479,12 +598,25 @@ export class WebhooksClient {
|
|
|
479
598
|
logging: this._options.logging,
|
|
480
599
|
});
|
|
481
600
|
if (_response.ok) {
|
|
482
|
-
return {
|
|
601
|
+
return {
|
|
602
|
+
data: _response.body,
|
|
603
|
+
rawResponse: _response.rawResponse,
|
|
604
|
+
};
|
|
483
605
|
}
|
|
484
606
|
if (_response.error.reason === "status-code") {
|
|
485
607
|
switch (_response.error.statusCode) {
|
|
608
|
+
case 400:
|
|
609
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
486
610
|
case 401:
|
|
487
611
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
612
|
+
case 403:
|
|
613
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
614
|
+
case 404:
|
|
615
|
+
throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
|
|
616
|
+
case 422:
|
|
617
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
618
|
+
case 429:
|
|
619
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
488
620
|
case 500:
|
|
489
621
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
490
622
|
default:
|
|
@@ -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
|
+
}
|