@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,7 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Schedulin from "../index.js";
|
|
4
|
+
export declare class BadRequestError extends errors.SchedulinError {
|
|
5
|
+
readonly body: Schedulin.ErrorResponse;
|
|
6
|
+
constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.BadRequestError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class BadRequestError extends errors.SchedulinError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "BadRequestError",
|
|
43
|
+
statusCode: 400,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = "BadRequestError";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.BadRequestError = BadRequestError;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Schedulin from "../index.js";
|
|
4
|
+
export declare class ConflictError extends errors.SchedulinError {
|
|
5
|
+
readonly body: Schedulin.ErrorResponse;
|
|
6
|
+
constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ConflictError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class ConflictError extends errors.SchedulinError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "ConflictError",
|
|
43
|
+
statusCode: 409,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = "ConflictError";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.ConflictError = ConflictError;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Schedulin from "../index.js";
|
|
4
|
+
export declare class ForbiddenError extends errors.SchedulinError {
|
|
5
|
+
readonly body: Schedulin.ErrorResponse;
|
|
6
|
+
constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ForbiddenError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class ForbiddenError extends errors.SchedulinError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "ForbiddenError",
|
|
43
|
+
statusCode: 403,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = "ForbiddenError";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.ForbiddenError = ForbiddenError;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Schedulin from "../index.js";
|
|
4
|
+
export declare class NotFoundError extends errors.SchedulinError {
|
|
5
|
+
readonly body: Schedulin.ErrorResponse;
|
|
6
|
+
constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.NotFoundError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class NotFoundError extends errors.SchedulinError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "NotFoundError",
|
|
43
|
+
statusCode: 404,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = "NotFoundError";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.NotFoundError = NotFoundError;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Schedulin from "../index.js";
|
|
4
|
+
export declare class PaymentRequiredError extends errors.SchedulinError {
|
|
5
|
+
readonly body: Schedulin.ErrorResponse;
|
|
6
|
+
constructor(body: Schedulin.ErrorResponse, rawResponse?: core.RawResponse);
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.PaymentRequiredError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class PaymentRequiredError extends errors.SchedulinError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "PaymentRequiredError",
|
|
43
|
+
statusCode: 402,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = "PaymentRequiredError";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.PaymentRequiredError = PaymentRequiredError;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Schedulin from "../index.js";
|
|
4
|
+
export declare class TooManyRequestsError extends errors.SchedulinError {
|
|
5
|
+
readonly body: Schedulin.RateLimitErrorResponse;
|
|
6
|
+
constructor(body: Schedulin.RateLimitErrorResponse, rawResponse?: core.RawResponse);
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.TooManyRequestsError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class TooManyRequestsError extends errors.SchedulinError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "TooManyRequestsError",
|
|
43
|
+
statusCode: 429,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = "TooManyRequestsError";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.TooManyRequestsError = TooManyRequestsError;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
2
|
+
import * as errors from "../../errors/index.js";
|
|
3
|
+
import type * as Schedulin from "../index.js";
|
|
4
|
+
export declare class UnprocessableEntityError extends errors.SchedulinError {
|
|
5
|
+
readonly body: Schedulin.ValidationErrorResponse;
|
|
6
|
+
constructor(body: Schedulin.ValidationErrorResponse, rawResponse?: core.RawResponse);
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.UnprocessableEntityError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class UnprocessableEntityError extends errors.SchedulinError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "UnprocessableEntityError",
|
|
43
|
+
statusCode: 422,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = "UnprocessableEntityError";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.UnprocessableEntityError = UnprocessableEntityError;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
export * from "./BadRequestError.js";
|
|
2
|
+
export * from "./ConflictError.js";
|
|
3
|
+
export * from "./ForbiddenError.js";
|
|
1
4
|
export * from "./InternalServerError.js";
|
|
5
|
+
export * from "./NotFoundError.js";
|
|
6
|
+
export * from "./PaymentRequiredError.js";
|
|
7
|
+
export * from "./TooManyRequestsError.js";
|
|
2
8
|
export * from "./UnauthorizedError.js";
|
|
9
|
+
export * from "./UnprocessableEntityError.js";
|
package/cjs/api/errors/index.js
CHANGED
|
@@ -14,5 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./BadRequestError.js"), exports);
|
|
18
|
+
__exportStar(require("./ConflictError.js"), exports);
|
|
19
|
+
__exportStar(require("./ForbiddenError.js"), exports);
|
|
17
20
|
__exportStar(require("./InternalServerError.js"), exports);
|
|
21
|
+
__exportStar(require("./NotFoundError.js"), exports);
|
|
22
|
+
__exportStar(require("./PaymentRequiredError.js"), exports);
|
|
23
|
+
__exportStar(require("./TooManyRequestsError.js"), exports);
|
|
18
24
|
__exportStar(require("./UnauthorizedError.js"), exports);
|
|
25
|
+
__exportStar(require("./UnprocessableEntityError.js"), exports);
|
|
@@ -16,7 +16,12 @@ export declare class AiClient {
|
|
|
16
16
|
* @param {Schedulin.GenerateImageAiRequest} request
|
|
17
17
|
* @param {AiClient.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.ConflictError}
|
|
23
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
24
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
20
25
|
* @throws {@link Schedulin.InternalServerError}
|
|
21
26
|
* @throws {@link errors.SchedulinError}
|
|
22
27
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -26,7 +31,7 @@ export declare class AiClient {
|
|
|
26
31
|
* prompt: "prompt"
|
|
27
32
|
* })
|
|
28
33
|
*/
|
|
29
|
-
generateImage(request: Schedulin.GenerateImageAiRequest, requestOptions?: AiClient.RequestOptions): core.HttpResponsePromise<
|
|
34
|
+
generateImage(request: Schedulin.GenerateImageAiRequest, requestOptions?: AiClient.RequestOptions): core.HttpResponsePromise<Schedulin.GenerateImageAiResponse>;
|
|
30
35
|
private __generateImage;
|
|
31
36
|
/**
|
|
32
37
|
* Get the status and details of a generation job
|
|
@@ -34,7 +39,11 @@ export declare class AiClient {
|
|
|
34
39
|
* @param {Schedulin.GetGenerationAiRequest} request
|
|
35
40
|
* @param {AiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
41
|
*
|
|
42
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
37
43
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
44
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
45
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
46
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
38
47
|
* @throws {@link Schedulin.InternalServerError}
|
|
39
48
|
* @throws {@link errors.SchedulinError}
|
|
40
49
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -44,6 +53,6 @@ export declare class AiClient {
|
|
|
44
53
|
* id: "id"
|
|
45
54
|
* })
|
|
46
55
|
*/
|
|
47
|
-
getGeneration(request: Schedulin.GetGenerationAiRequest, requestOptions?: AiClient.RequestOptions): core.HttpResponsePromise<
|
|
56
|
+
getGeneration(request: Schedulin.GetGenerationAiRequest, requestOptions?: AiClient.RequestOptions): core.HttpResponsePromise<Schedulin.AiGeneration>;
|
|
48
57
|
private __getGeneration;
|
|
49
58
|
}
|
|
@@ -62,7 +62,12 @@ class AiClient {
|
|
|
62
62
|
* @param {Schedulin.GenerateImageAiRequest} request
|
|
63
63
|
* @param {AiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
64
|
*
|
|
65
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
65
66
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
67
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
68
|
+
* @throws {@link Schedulin.ConflictError}
|
|
69
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
70
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
66
71
|
* @throws {@link Schedulin.InternalServerError}
|
|
67
72
|
* @throws {@link errors.SchedulinError}
|
|
68
73
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -99,8 +104,18 @@ class AiClient {
|
|
|
99
104
|
}
|
|
100
105
|
if (_response.error.reason === "status-code") {
|
|
101
106
|
switch (_response.error.statusCode) {
|
|
107
|
+
case 400:
|
|
108
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
102
109
|
case 401:
|
|
103
110
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
111
|
+
case 403:
|
|
112
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
113
|
+
case 409:
|
|
114
|
+
throw new Schedulin.ConflictError(_response.error.body, _response.rawResponse);
|
|
115
|
+
case 422:
|
|
116
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
117
|
+
case 429:
|
|
118
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
104
119
|
case 500:
|
|
105
120
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
106
121
|
default:
|
|
@@ -120,7 +135,11 @@ class AiClient {
|
|
|
120
135
|
* @param {Schedulin.GetGenerationAiRequest} request
|
|
121
136
|
* @param {AiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
137
|
*
|
|
138
|
+
* @throws {@link Schedulin.BadRequestError}
|
|
123
139
|
* @throws {@link Schedulin.UnauthorizedError}
|
|
140
|
+
* @throws {@link Schedulin.ForbiddenError}
|
|
141
|
+
* @throws {@link Schedulin.UnprocessableEntityError}
|
|
142
|
+
* @throws {@link Schedulin.TooManyRequestsError}
|
|
124
143
|
* @throws {@link Schedulin.InternalServerError}
|
|
125
144
|
* @throws {@link errors.SchedulinError}
|
|
126
145
|
* @throws {@link errors.SchedulinTimeoutError}
|
|
@@ -162,8 +181,16 @@ class AiClient {
|
|
|
162
181
|
}
|
|
163
182
|
if (_response.error.reason === "status-code") {
|
|
164
183
|
switch (_response.error.statusCode) {
|
|
184
|
+
case 400:
|
|
185
|
+
throw new Schedulin.BadRequestError(_response.error.body, _response.rawResponse);
|
|
165
186
|
case 401:
|
|
166
187
|
throw new Schedulin.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
188
|
+
case 403:
|
|
189
|
+
throw new Schedulin.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
190
|
+
case 422:
|
|
191
|
+
throw new Schedulin.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
192
|
+
case 429:
|
|
193
|
+
throw new Schedulin.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
167
194
|
case 500:
|
|
168
195
|
throw new Schedulin.InternalServerError(_response.error.body, _response.rawResponse);
|
|
169
196
|
default:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GenerateImageAiResponse.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./GenerateImageAiResponse.js"), exports);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./ai/client/requests/index.js";
|
|
2
2
|
export * as ai from "./ai/index.js";
|
|
3
|
+
export * from "./ai/types/index.js";
|
|
3
4
|
export * from "./media/client/requests/index.js";
|
|
4
5
|
export * as media from "./media/index.js";
|
|
5
6
|
export * from "./media/types/index.js";
|
|
@@ -16,3 +17,4 @@ export * as tags from "./tags/index.js";
|
|
|
16
17
|
export * from "./tags/types/index.js";
|
|
17
18
|
export * from "./webhooks/client/requests/index.js";
|
|
18
19
|
export * as webhooks from "./webhooks/index.js";
|
|
20
|
+
export * from "./webhooks/types/index.js";
|
|
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.webhooks = exports.tags = exports.socialAccounts = exports.posts = exports.platforms = exports.media = exports.ai = void 0;
|
|
40
40
|
__exportStar(require("./ai/client/requests/index.js"), exports);
|
|
41
41
|
exports.ai = __importStar(require("./ai/index.js"));
|
|
42
|
+
__exportStar(require("./ai/types/index.js"), exports);
|
|
42
43
|
__exportStar(require("./media/client/requests/index.js"), exports);
|
|
43
44
|
exports.media = __importStar(require("./media/index.js"));
|
|
44
45
|
__exportStar(require("./media/types/index.js"), exports);
|
|
@@ -55,3 +56,4 @@ exports.tags = __importStar(require("./tags/index.js"));
|
|
|
55
56
|
__exportStar(require("./tags/types/index.js"), exports);
|
|
56
57
|
__exportStar(require("./webhooks/client/requests/index.js"), exports);
|
|
57
58
|
exports.webhooks = __importStar(require("./webhooks/index.js"));
|
|
59
|
+
__exportStar(require("./webhooks/types/index.js"), exports);
|