@schedulin/sdk 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +59 -9
- package/cjs/api/resources/media/client/Client.js +159 -4
- 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 +93 -0
- package/cjs/api/resources/socialAccounts/client/Client.js +289 -0
- package/cjs/api/resources/socialAccounts/client/requests/ListDiscordChannelsSocialAccountsRequest.d.ts +9 -0
- package/cjs/api/resources/socialAccounts/client/requests/ListDiscordChannelsSocialAccountsRequest.js +3 -0
- package/cjs/api/resources/socialAccounts/client/requests/ListSlackChannelsSocialAccountsRequest.d.ts +9 -0
- package/cjs/api/resources/socialAccounts/client/requests/ListSlackChannelsSocialAccountsRequest.js +3 -0
- package/cjs/api/resources/socialAccounts/client/requests/index.d.ts +2 -0
- package/cjs/api/resources/socialAccounts/types/ListDiscordChannelsSocialAccountsResponse.d.ts +12 -0
- package/cjs/api/resources/socialAccounts/types/ListDiscordChannelsSocialAccountsResponse.js +3 -0
- package/cjs/api/resources/socialAccounts/types/ListSlackChannelsSocialAccountsResponse.d.ts +12 -0
- package/cjs/api/resources/socialAccounts/types/ListSlackChannelsSocialAccountsResponse.js +3 -0
- package/cjs/api/resources/socialAccounts/types/index.d.ts +2 -0
- package/cjs/api/resources/socialAccounts/types/index.js +2 -0
- 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 +59 -9
- package/esm/api/resources/media/client/Client.mjs +159 -4
- 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 +93 -0
- package/esm/api/resources/socialAccounts/client/Client.mjs +289 -0
- package/esm/api/resources/socialAccounts/client/requests/ListDiscordChannelsSocialAccountsRequest.d.mts +9 -0
- package/esm/api/resources/socialAccounts/client/requests/ListDiscordChannelsSocialAccountsRequest.mjs +2 -0
- package/esm/api/resources/socialAccounts/client/requests/ListSlackChannelsSocialAccountsRequest.d.mts +9 -0
- package/esm/api/resources/socialAccounts/client/requests/ListSlackChannelsSocialAccountsRequest.mjs +2 -0
- package/esm/api/resources/socialAccounts/client/requests/index.d.mts +2 -0
- package/esm/api/resources/socialAccounts/types/ListDiscordChannelsSocialAccountsResponse.d.mts +12 -0
- package/esm/api/resources/socialAccounts/types/ListDiscordChannelsSocialAccountsResponse.mjs +2 -0
- package/esm/api/resources/socialAccounts/types/ListSlackChannelsSocialAccountsResponse.d.mts +12 -0
- package/esm/api/resources/socialAccounts/types/ListSlackChannelsSocialAccountsResponse.mjs +2 -0
- package/esm/api/resources/socialAccounts/types/index.d.mts +2 -0
- package/esm/api/resources/socialAccounts/types/index.mjs +2 -0
- 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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ListSlackChannelsSocialAccountsResponse {
|
|
2
|
+
items: ListSlackChannelsSocialAccountsResponse.Items.Item[];
|
|
3
|
+
}
|
|
4
|
+
export declare namespace ListSlackChannelsSocialAccountsResponse {
|
|
5
|
+
type Items = Items.Item[];
|
|
6
|
+
namespace Items {
|
|
7
|
+
interface Item {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from "./DeleteSocialAccountsResponse.js";
|
|
2
|
+
export * from "./ListDiscordChannelsSocialAccountsResponse.js";
|
|
3
|
+
export * from "./ListSlackChannelsSocialAccountsResponse.js";
|
|
2
4
|
export * from "./ListSocialAccountsResponse.js";
|
|
3
5
|
export * from "./ListWhopCompaniesSocialAccountsResponse.js";
|
|
4
6
|
export * from "./ListWhopForumsSocialAccountsResponse.js";
|
|
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./DeleteSocialAccountsResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./ListDiscordChannelsSocialAccountsResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./ListSlackChannelsSocialAccountsResponse.js"), exports);
|
|
18
20
|
__exportStar(require("./ListSocialAccountsResponse.js"), exports);
|
|
19
21
|
__exportStar(require("./ListWhopCompaniesSocialAccountsResponse.js"), exports);
|
|
20
22
|
__exportStar(require("./ListWhopForumsSocialAccountsResponse.js"), exports);
|
|
@@ -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}
|
|
@@ -73,7 +73,11 @@ class TagsClient {
|
|
|
73
73
|
* @param {Schedulin.ListTagsRequest} request
|
|
74
74
|
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
75
75
|
*
|
|
76
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
76
77
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
78
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
79
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
80
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
77
81
|
* @throws {@link Schedulin.InternalServerError}
|
|
78
82
|
* @throws {@link errors.SchedulinError}
|
|
79
83
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -114,8 +118,16 @@ class TagsClient {
|
|
|
114
118
|
}
|
|
115
119
|
if (_response.error.reason === "status-code") {
|
|
116
120
|
switch (_response.error.statusCode) {
|
|
121
|
+
case 400:
|
|
122
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
117
123
|
case 401:
|
|
118
124
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
125
|
+
case 403:
|
|
126
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
127
|
+
case 422:
|
|
128
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
129
|
+
case 429:
|
|
130
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
119
131
|
case 500:
|
|
120
132
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
121
133
|
default:
|
|
@@ -135,7 +147,12 @@ class TagsClient {
|
|
|
135
147
|
* @param {Schedulin.CreateTagsRequest} request
|
|
136
148
|
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
137
149
|
*
|
|
150
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
138
151
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
152
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
153
|
+
* @throws {@link Schedulin.ConflictError}
|
|
154
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
155
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
139
156
|
* @throws {@link Schedulin.InternalServerError}
|
|
140
157
|
* @throws {@link errors.SchedulinError}
|
|
141
158
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -173,8 +190,18 @@ class TagsClient {
|
|
|
173
190
|
}
|
|
174
191
|
if (_response.error.reason === "status-code") {
|
|
175
192
|
switch (_response.error.statusCode) {
|
|
193
|
+
case 400:
|
|
194
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
176
195
|
case 401:
|
|
177
196
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
197
|
+
case 403:
|
|
198
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
199
|
+
case 409:
|
|
200
|
+
throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
|
|
201
|
+
case 422:
|
|
202
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
203
|
+
case 429:
|
|
204
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
178
205
|
case 500:
|
|
179
206
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
180
207
|
default:
|
|
@@ -194,7 +221,13 @@ class TagsClient {
|
|
|
194
221
|
* @param {Schedulin.UpdateTagsRequest} request
|
|
195
222
|
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
196
223
|
*
|
|
224
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
197
225
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
226
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
227
|
+
* @throws {@link Schedulin.NotFoundError}
|
|
228
|
+
* @throws {@link Schedulin.ConflictError}
|
|
229
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
230
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
198
231
|
* @throws {@link Schedulin.InternalServerError}
|
|
199
232
|
* @throws {@link errors.SchedulinError}
|
|
200
233
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -232,8 +265,20 @@ class TagsClient {
|
|
|
232
265
|
}
|
|
233
266
|
if (_response.error.reason === "status-code") {
|
|
234
267
|
switch (_response.error.statusCode) {
|
|
268
|
+
case 400:
|
|
269
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
235
270
|
case 401:
|
|
236
271
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
272
|
+
case 403:
|
|
273
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
274
|
+
case 404:
|
|
275
|
+
throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
|
|
276
|
+
case 409:
|
|
277
|
+
throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
|
|
278
|
+
case 422:
|
|
279
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
280
|
+
case 429:
|
|
281
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
237
282
|
case 500:
|
|
238
283
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
239
284
|
default:
|
|
@@ -253,7 +298,13 @@ class TagsClient {
|
|
|
253
298
|
* @param {Schedulin.DeleteTagsRequest} request
|
|
254
299
|
* @param {TagsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
255
300
|
*
|
|
301
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
256
302
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
303
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
304
|
+
* @throws {@link Schedulin.NotFoundError}
|
|
305
|
+
* @throws {@link Schedulin.ConflictError}
|
|
306
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
307
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
257
308
|
* @throws {@link Schedulin.InternalServerError}
|
|
258
309
|
* @throws {@link errors.SchedulinError}
|
|
259
310
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -291,8 +342,20 @@ class TagsClient {
|
|
|
291
342
|
}
|
|
292
343
|
if (_response.error.reason === "status-code") {
|
|
293
344
|
switch (_response.error.statusCode) {
|
|
345
|
+
case 400:
|
|
346
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
294
347
|
case 401:
|
|
295
348
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
349
|
+
case 403:
|
|
350
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
351
|
+
case 404:
|
|
352
|
+
throw new Schedulin.NotFoundError(_response.error.body, _response.rawResponse);
|
|
353
|
+
case 409:
|
|
354
|
+
throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
|
|
355
|
+
case 422:
|
|
356
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
357
|
+
case 429:
|
|
358
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
296
359
|
case 500:
|
|
297
360
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
298
361
|
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
|
}
|
|
@@ -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 {
|
|
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:
|