@purpleschool/multisite 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/controller/http/ai-proxy.ts +6 -0
- package/api/controller/http/auth.ts +7 -0
- package/api/controller/http/cloud-payments.ts +6 -0
- package/api/controller/http/file.ts +7 -0
- package/api/controller/http/health.ts +4 -0
- package/api/controller/http/image-generation.ts +15 -0
- package/api/controller/http/index.ts +12 -0
- package/api/controller/http/payment.ts +6 -0
- package/api/controller/http/product.ts +7 -0
- package/api/controller/http/subscription.ts +8 -0
- package/api/controller/http/transaction.ts +6 -0
- package/api/controller/http/unregistered-user.ts +1 -0
- package/api/controller/http/user.ts +5 -0
- package/api/controller/index.ts +2 -0
- package/api/index.ts +2 -0
- package/api/routes.ts +76 -0
- package/build/api/controller/http/ai-proxy.js +7 -0
- package/build/api/controller/http/auth.js +8 -0
- package/build/api/controller/http/cloud-payments.js +7 -0
- package/build/api/controller/http/file.js +8 -0
- package/build/api/controller/http/health.js +6 -0
- package/build/api/controller/http/image-generation.js +17 -0
- package/build/api/controller/http/index.js +28 -0
- package/build/api/controller/http/payment.js +7 -0
- package/build/api/controller/http/product.js +9 -0
- package/build/api/controller/http/subscription.js +9 -0
- package/build/api/controller/http/transaction.js +7 -0
- package/build/api/controller/http/unregistered-user.js +4 -0
- package/build/api/controller/http/user.js +7 -0
- package/build/api/controller/index.js +17 -0
- package/build/api/index.js +18 -0
- package/build/api/routes.js +103 -0
- package/build/commands/auth/index.js +18 -0
- package/build/commands/auth/login.command.js +17 -0
- package/build/commands/auth/register.command.js +17 -0
- package/build/commands/file/index.js +17 -0
- package/build/commands/file/upload-file.command.js +11 -0
- package/build/commands/image-generation/execute-image-generation.command.js +17 -0
- package/build/commands/image-generation/index.js +23 -0
- package/build/commands/image-generation/proxy-image-generation-callback.command.js +21 -0
- package/build/commands/image-generation/retry-image-generation-job.command.js +17 -0
- package/build/commands/image-generation/set-reaction-to-image-generation-job.command.js +26 -0
- package/build/commands/image-generation/soft-delete-image-generation-job-by-uuid.command.js +10 -0
- package/build/commands/image-generation/soft-delete-image-generation-jobs-by-criteria.command.js +10 -0
- package/build/commands/image-generation/update-image-generation-job-title.command.js +14 -0
- package/build/commands/index.js +24 -0
- package/build/commands/payment/cloud-payments.command.js +47 -0
- package/build/commands/payment/index.js +17 -0
- package/build/commands/product/buy-product.command.js +17 -0
- package/build/commands/product/index.js +17 -0
- package/build/commands/subscription/buy-subscription.command.js +17 -0
- package/build/commands/subscription/index.js +17 -0
- package/build/commands/transaction/index.js +17 -0
- package/build/commands/transaction/write-off.command.js +19 -0
- package/build/commands/unregistered-user/index.js +17 -0
- package/build/commands/unregistered-user/upsert-unregistered-user.command.js +16 -0
- package/build/constants/common/enums/index.js +17 -0
- package/build/constants/common/enums/user-reaction.enum.js +8 -0
- package/build/constants/common/index.js +17 -0
- package/build/constants/errors/errors.js +298 -0
- package/build/constants/errors/index.js +17 -0
- package/build/constants/files/enums/file-type.enum.js +7 -0
- package/build/constants/files/enums/index.js +17 -0
- package/build/constants/files/index.js +17 -0
- package/build/constants/image-generation/enums/image-generation-model-strategy.enum.js +18 -0
- package/build/constants/image-generation/enums/image-generation-resolution.enum.js +9 -0
- package/build/constants/image-generation/enums/index.js +18 -0
- package/build/constants/image-generation/index.js +17 -0
- package/build/constants/index.js +28 -0
- package/build/constants/order/enums/index.js +18 -0
- package/build/constants/order/enums/order-status.enum.js +9 -0
- package/build/constants/order/enums/order-type.enum.js +7 -0
- package/build/constants/order/index.js +17 -0
- package/build/constants/payment/enums/index.js +17 -0
- package/build/constants/payment/enums/payment-status.enum.js +7 -0
- package/build/constants/payment/index.js +17 -0
- package/build/constants/subscription/free-subscription-id.constant.js +4 -0
- package/build/constants/subscription/index.js +17 -0
- package/build/constants/tools/enums/index.js +20 -0
- package/build/constants/tools/enums/job-request-origin.enum.js +7 -0
- package/build/constants/tools/enums/job-status.enum.js +9 -0
- package/build/constants/tools/enums/tool-model-status.enum.js +8 -0
- package/build/constants/tools/enums/tool-type.enum.js +7 -0
- package/build/constants/tools/index.js +17 -0
- package/build/constants/transaction/enums/index.js +17 -0
- package/build/constants/transaction/enums/transaction-status.enum.js +9 -0
- package/build/constants/transaction/index.js +17 -0
- package/build/constants/user/enums/index.js +18 -0
- package/build/constants/user/enums/user-role.enum.js +9 -0
- package/build/constants/user/enums/user-status.enum.js +9 -0
- package/build/constants/user/index.js +17 -0
- package/build/constants/user-to-product/enums/index.js +17 -0
- package/build/constants/user-to-product/enums/user-to-product-status.enum.js +7 -0
- package/build/constants/user-to-product/index.js +17 -0
- package/build/constants/user-to-subscription/enums/index.js +17 -0
- package/build/constants/user-to-subscription/enums/user-to-subscription-status.enum.js +7 -0
- package/build/constants/user-to-subscription/index.js +17 -0
- package/build/index.js +21 -0
- package/build/models/cloud-payments-widget-data.schema.js +17 -0
- package/build/models/cloud-payments-widget.schema.js +17 -0
- package/build/models/common/attached-file.schema.js +14 -0
- package/build/models/common/icon-variants.schema.js +12 -0
- package/build/models/common/index.js +20 -0
- package/build/models/common/json-value.schema.js +6 -0
- package/build/models/common/receipt.schema.js +18 -0
- package/build/models/file.schema.js +15 -0
- package/build/models/image-generation/image-generation-config.schema.js +10 -0
- package/build/models/image-generation/image-generation-job-attempt.schema.js +11 -0
- package/build/models/image-generation/image-generation-job-params.schema.js +12 -0
- package/build/models/image-generation/image-generation-job-request-params.schema.js +11 -0
- package/build/models/image-generation/image-generation-job.schema.js +32 -0
- package/build/models/image-generation/image-generation-model-params.schema.js +20 -0
- package/build/models/image-generation/image-generation-model.schema.js +30 -0
- package/build/models/image-generation/image-generation-preset.schema.js +10 -0
- package/build/models/image-generation/image-generation-pricing-rule.schema.js +14 -0
- package/build/models/image-generation/image-generation-vendor.schema.js +9 -0
- package/build/models/image-generation/index.js +26 -0
- package/build/models/index.js +25 -0
- package/build/models/product.schema.js +12 -0
- package/build/models/subscription.schema.js +14 -0
- package/build/models/tools/index.js +17 -0
- package/build/models/tools/vendor.schema.js +11 -0
- package/build/models/user.schema.js +13 -0
- package/build/queries/file/find-files.command.js +20 -0
- package/build/queries/file/get-file.command.js +14 -0
- package/build/queries/file/index.js +18 -0
- package/build/queries/image-generation/find-image-generation-jobs.command.js +20 -0
- package/build/queries/image-generation/get-image-generation-config.command.js +11 -0
- package/build/queries/image-generation/get-image-generation-job.command.js +14 -0
- package/build/queries/image-generation/get-image-generation-price.command.js +19 -0
- package/build/queries/image-generation/index.js +20 -0
- package/build/queries/index.js +22 -0
- package/build/queries/payment/get-payment-history.command.js +18 -0
- package/build/queries/payment/index.js +17 -0
- package/build/queries/product/find-products.command.js +11 -0
- package/build/queries/product/index.js +17 -0
- package/build/queries/subscription/find-subscriptions.command.js +11 -0
- package/build/queries/subscription/index.js +17 -0
- package/build/queries/user/get-my-products.command.js +19 -0
- package/build/queries/user/get-my-subscriptions.command.js +21 -0
- package/build/queries/user/get-user.command.js +16 -0
- package/build/queries/user/index.js +19 -0
- package/commands/auth/index.ts +2 -0
- package/commands/auth/login.command.ts +18 -0
- package/commands/auth/register.command.ts +18 -0
- package/commands/file/index.ts +1 -0
- package/commands/file/upload-file.command.ts +10 -0
- package/commands/image-generation/execute-image-generation.command.ts +20 -0
- package/commands/image-generation/index.ts +7 -0
- package/commands/image-generation/proxy-image-generation-callback.command.ts +21 -0
- package/commands/image-generation/retry-image-generation-job.command.ts +20 -0
- package/commands/image-generation/set-reaction-to-image-generation-job.command.ts +29 -0
- package/commands/image-generation/soft-delete-image-generation-job-by-uuid.command.ts +10 -0
- package/commands/image-generation/soft-delete-image-generation-jobs-by-criteria.command.ts +10 -0
- package/commands/image-generation/update-image-generation-job-title.command.ts +17 -0
- package/commands/index.ts +8 -0
- package/commands/payment/cloud-payments.command.ts +53 -0
- package/commands/payment/index.ts +1 -0
- package/commands/product/buy-product.command.ts +20 -0
- package/commands/product/index.ts +1 -0
- package/commands/subscription/buy-subscription.command.ts +20 -0
- package/commands/subscription/index.ts +1 -0
- package/commands/transaction/index.ts +1 -0
- package/commands/transaction/write-off.command.ts +19 -0
- package/commands/unregistered-user/index.ts +2 -0
- package/commands/unregistered-user/upsert-unregistered-user.command.ts +17 -0
- package/constants/common/enums/index.ts +2 -0
- package/constants/common/enums/user-reaction.enum.ts +5 -0
- package/constants/common/index.ts +2 -0
- package/constants/errors/errors.ts +308 -0
- package/constants/errors/index.ts +2 -0
- package/constants/files/enums/file-type.enum.ts +4 -0
- package/constants/files/enums/index.ts +2 -0
- package/constants/files/index.ts +2 -0
- package/constants/image-generation/enums/image-generation-model-strategy.enum.ts +15 -0
- package/constants/image-generation/enums/image-generation-resolution.enum.ts +6 -0
- package/constants/image-generation/enums/index.ts +2 -0
- package/constants/image-generation/index.ts +2 -0
- package/constants/index.ts +12 -0
- package/constants/order/enums/index.ts +3 -0
- package/constants/order/enums/order-status.enum.ts +6 -0
- package/constants/order/enums/order-type.enum.ts +4 -0
- package/constants/order/index.ts +2 -0
- package/constants/payment/enums/index.ts +2 -0
- package/constants/payment/enums/payment-status.enum.ts +4 -0
- package/constants/payment/index.ts +2 -0
- package/constants/subscription/free-subscription-id.constant.ts +2 -0
- package/constants/subscription/index.ts +2 -0
- package/constants/tools/enums/index.ts +4 -0
- package/constants/tools/enums/job-request-origin.enum.ts +4 -0
- package/constants/tools/enums/job-status.enum.ts +6 -0
- package/constants/tools/enums/tool-model-status.enum.ts +5 -0
- package/constants/tools/enums/tool-type.enum.ts +4 -0
- package/constants/tools/index.ts +2 -0
- package/constants/transaction/enums/index.ts +2 -0
- package/constants/transaction/enums/transaction-status.enum.ts +6 -0
- package/constants/transaction/index.ts +2 -0
- package/constants/user/enums/index.ts +3 -0
- package/constants/user/enums/user-role.enum.ts +6 -0
- package/constants/user/enums/user-status.enum.ts +6 -0
- package/constants/user/index.ts +2 -0
- package/constants/user-to-product/enums/index.ts +2 -0
- package/constants/user-to-product/enums/user-to-product-status.enum.ts +4 -0
- package/constants/user-to-product/index.ts +2 -0
- package/constants/user-to-subscription/enums/index.ts +2 -0
- package/constants/user-to-subscription/enums/user-to-subscription-status.enum.ts +4 -0
- package/constants/user-to-subscription/index.ts +2 -0
- package/index.ts +5 -0
- package/models/cloud-payments-widget-data.schema.ts +19 -0
- package/models/cloud-payments-widget.schema.ts +15 -0
- package/models/common/attached-file.schema.ts +14 -0
- package/models/common/icon-variants.schema.ts +13 -0
- package/models/common/index.ts +4 -0
- package/models/common/json-value.schema.ts +11 -0
- package/models/common/receipt.schema.ts +20 -0
- package/models/file.schema.ts +14 -0
- package/models/image-generation/image-generation-config.schema.ts +11 -0
- package/models/image-generation/image-generation-job-attempt.schema.ts +12 -0
- package/models/image-generation/image-generation-job-params.schema.ts +11 -0
- package/models/image-generation/image-generation-job-request-params.schema.ts +11 -0
- package/models/image-generation/image-generation-job.schema.ts +30 -0
- package/models/image-generation/image-generation-model-params.schema.ts +22 -0
- package/models/image-generation/image-generation-model.schema.ts +28 -0
- package/models/image-generation/image-generation-preset.schema.ts +11 -0
- package/models/image-generation/image-generation-pricing-rule.schema.ts +20 -0
- package/models/image-generation/image-generation-vendor.schema.ts +9 -0
- package/models/image-generation/index.ts +10 -0
- package/models/index.ts +9 -0
- package/models/product.schema.ts +10 -0
- package/models/subscription.schema.ts +12 -0
- package/models/tools/index.ts +2 -0
- package/models/tools/vendor.schema.ts +12 -0
- package/models/user.schema.ts +11 -0
- package/package.json +18 -0
- package/queries/file/find-files.command.ts +21 -0
- package/queries/file/get-file.command.ts +15 -0
- package/queries/file/index.ts +3 -0
- package/queries/image-generation/find-image-generation-jobs.command.ts +21 -0
- package/queries/image-generation/get-image-generation-config.command.ts +9 -0
- package/queries/image-generation/get-image-generation-job.command.ts +15 -0
- package/queries/image-generation/get-image-generation-price.command.ts +19 -0
- package/queries/image-generation/index.ts +4 -0
- package/queries/index.ts +7 -0
- package/queries/payment/get-payment-history.command.ts +17 -0
- package/queries/payment/index.ts +2 -0
- package/queries/product/find-products.command.ts +10 -0
- package/queries/product/index.ts +2 -0
- package/queries/subscription/find-subscriptions.command.ts +10 -0
- package/queries/subscription/index.ts +2 -0
- package/queries/user/get-my-products.command.ts +19 -0
- package/queries/user/get-my-subscriptions.command.ts +21 -0
- package/queries/user/get-user.command.ts +14 -0
- package/queries/user/index.ts +3 -0
- package/tsconfig.json +104 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AttachedFileSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.AttachedFileSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
url: zod_1.z.string().url(),
|
|
9
|
+
name: zod_1.z.string(),
|
|
10
|
+
mimeType: zod_1.z.string(),
|
|
11
|
+
type: zod_1.z.nativeEnum(constants_1.FILE_TYPE),
|
|
12
|
+
size: zod_1.z.number().int().nonnegative(),
|
|
13
|
+
duration: zod_1.z.number().optional().nullable(),
|
|
14
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IconVariantsSchema = exports.IconVariantSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.IconVariantSchema = zod_1.z.object({
|
|
6
|
+
png: zod_1.z.string().url().optional(),
|
|
7
|
+
svg: zod_1.z.string().url().optional(),
|
|
8
|
+
});
|
|
9
|
+
exports.IconVariantsSchema = zod_1.z.object({
|
|
10
|
+
light: exports.IconVariantSchema,
|
|
11
|
+
dark: exports.IconVariantSchema,
|
|
12
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./attached-file.schema"), exports);
|
|
18
|
+
__exportStar(require("./icon-variants.schema"), exports);
|
|
19
|
+
__exportStar(require("./json-value.schema"), exports);
|
|
20
|
+
__exportStar(require("./receipt.schema"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JsonValueSchema = exports.JsonPrimitiveSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.JsonPrimitiveSchema = zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean(), zod_1.z.null()]);
|
|
6
|
+
exports.JsonValueSchema = zod_1.z.lazy(() => zod_1.z.union([exports.JsonPrimitiveSchema, zod_1.z.array(exports.JsonValueSchema), zod_1.z.record(exports.JsonValueSchema)]));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReceiptSchema = exports.ReceiptItemSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ReceiptItemSchema = zod_1.z.object({
|
|
6
|
+
label: zod_1.z.string().min(1),
|
|
7
|
+
price: zod_1.z.number().nonnegative(),
|
|
8
|
+
quantity: zod_1.z.number().int().positive(),
|
|
9
|
+
amount: zod_1.z.number().nonnegative(),
|
|
10
|
+
vat: zod_1.z.number().int().nonnegative(),
|
|
11
|
+
});
|
|
12
|
+
exports.ReceiptSchema = zod_1.z.object({
|
|
13
|
+
items: zod_1.z.array(exports.ReceiptItemSchema),
|
|
14
|
+
taxationSystem: zod_1.z.number().int().nonnegative(),
|
|
15
|
+
email: zod_1.z.string().email(),
|
|
16
|
+
isBso: zod_1.z.boolean(),
|
|
17
|
+
amounts: zod_1.z.object({ electronic: zod_1.z.number().nonnegative() }),
|
|
18
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
exports.FileSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
name: zod_1.z.string(),
|
|
9
|
+
key: zod_1.z.string(),
|
|
10
|
+
url: zod_1.z.string().url(),
|
|
11
|
+
mimeType: zod_1.z.string(),
|
|
12
|
+
size: zod_1.z.number().int().nonnegative(),
|
|
13
|
+
type: zod_1.z.nativeEnum(constants_1.FILE_TYPE),
|
|
14
|
+
createdAt: zod_1.z.string().datetime().or(zod_1.z.date()).optional(),
|
|
15
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const image_generation_vendor_schema_1 = require("./image-generation-vendor.schema");
|
|
6
|
+
const image_generation_preset_schema_1 = require("./image-generation-preset.schema");
|
|
7
|
+
exports.ImageGenerationConfigSchema = zod_1.z.object({
|
|
8
|
+
vendors: zod_1.z.array(image_generation_vendor_schema_1.ImageGenerationVendorSchema),
|
|
9
|
+
presets: zod_1.z.array(image_generation_preset_schema_1.ImageGenerationPresetSchema),
|
|
10
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationJobAttemptSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.ImageGenerationJobAttemptSchema = zod_1.z.object({
|
|
7
|
+
order: zod_1.z.number().int().positive(),
|
|
8
|
+
status: zod_1.z.nativeEnum(constants_1.JOB_STATUS),
|
|
9
|
+
error: zod_1.z.string().nullable(),
|
|
10
|
+
timestamp: zod_1.z.string().datetime().or(zod_1.z.date()),
|
|
11
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationJobParamsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
exports.ImageGenerationJobParamsSchema = zod_1.z.object({
|
|
8
|
+
aspectRatio: zod_1.z.string().min(1),
|
|
9
|
+
attachedFiles: zod_1.z.array(common_1.AttachedFileSchema).optional().default([]),
|
|
10
|
+
enhancePrompt: zod_1.z.boolean().optional().default(false),
|
|
11
|
+
resolution: zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_RESOLUTION).optional(),
|
|
12
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationJobRequestParamsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.ImageGenerationJobRequestParamsSchema = zod_1.z.object({
|
|
7
|
+
aspectRatio: zod_1.z.string().min(1),
|
|
8
|
+
attachedFiles: zod_1.z.array(zod_1.z.string().uuid()).optional().default([]),
|
|
9
|
+
enhancePrompt: zod_1.z.boolean().optional().default(false),
|
|
10
|
+
resolution: zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_RESOLUTION).optional(),
|
|
11
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationJobSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const image_generation_job_params_schema_1 = require("./image-generation-job-params.schema");
|
|
7
|
+
const image_generation_job_attempt_schema_1 = require("./image-generation-job-attempt.schema");
|
|
8
|
+
exports.ImageGenerationJobSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
modelId: zod_1.z.string().uuid(),
|
|
11
|
+
prompt: zod_1.z.string(),
|
|
12
|
+
title: zod_1.z.string(),
|
|
13
|
+
params: image_generation_job_params_schema_1.ImageGenerationJobParamsSchema,
|
|
14
|
+
price: zod_1.z.number().int().nonnegative(),
|
|
15
|
+
status: zod_1.z.nativeEnum(constants_1.JOB_STATUS),
|
|
16
|
+
error: zod_1.z.string().nullable().optional(),
|
|
17
|
+
reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
|
|
18
|
+
dislikeReason: zod_1.z.string().nullable(),
|
|
19
|
+
externalId: zod_1.z.string().nullable(),
|
|
20
|
+
output: zod_1.z.array(zod_1.z.string().url()),
|
|
21
|
+
presetId: zod_1.z.string().uuid().nullable().optional(),
|
|
22
|
+
attempts: zod_1.z.array(image_generation_job_attempt_schema_1.ImageGenerationJobAttemptSchema),
|
|
23
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
24
|
+
unregisteredUserId: zod_1.z.string().nullable().optional(),
|
|
25
|
+
origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN),
|
|
26
|
+
isDeleted: zod_1.z.boolean(),
|
|
27
|
+
internalError: zod_1.z.string().nullable(),
|
|
28
|
+
tokenReservationId: zod_1.z.string().uuid().nullable().optional(),
|
|
29
|
+
createdAt: zod_1.z.string().datetime().or(zod_1.z.date()).optional(),
|
|
30
|
+
updatedAt: zod_1.z.string().datetime().or(zod_1.z.date()).optional(),
|
|
31
|
+
completedAt: zod_1.z.string().datetime().or(zod_1.z.date()).nullable().optional(),
|
|
32
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationModelParamsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.ImageGenerationModelParamsSchema = zod_1.z.object({
|
|
7
|
+
aspectRatio: zod_1.z.record(zod_1.z.string(), zod_1.z.union([
|
|
8
|
+
zod_1.z.object({
|
|
9
|
+
width: zod_1.z.number().int().positive(),
|
|
10
|
+
height: zod_1.z.number().int().positive(),
|
|
11
|
+
}),
|
|
12
|
+
zod_1.z.literal('auto'),
|
|
13
|
+
])),
|
|
14
|
+
quality: zod_1.z.union([zod_1.z.string(), zod_1.z.record(zod_1.z.string(), zod_1.z.string())]).optional(),
|
|
15
|
+
resolution: zod_1.z
|
|
16
|
+
.object({
|
|
17
|
+
options: zod_1.z.array(zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_RESOLUTION)),
|
|
18
|
+
})
|
|
19
|
+
.optional(),
|
|
20
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationModelSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const image_generation_model_params_schema_1 = require("./image-generation-model-params.schema");
|
|
8
|
+
const image_generation_pricing_rule_schema_1 = require("./image-generation-pricing-rule.schema");
|
|
9
|
+
exports.ImageGenerationModelSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
title: zod_1.z.string(),
|
|
12
|
+
model: zod_1.z.string(),
|
|
13
|
+
description: zod_1.z.string(),
|
|
14
|
+
price: zod_1.z.number().int().nonnegative(),
|
|
15
|
+
canUse: zod_1.z.boolean(),
|
|
16
|
+
pricingRules: image_generation_pricing_rule_schema_1.ImageGenerationPricingRulesSchema,
|
|
17
|
+
params: image_generation_model_params_schema_1.ImageGenerationModelParamsSchema,
|
|
18
|
+
strategy: zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_MODEL_STRATEGY),
|
|
19
|
+
status: zod_1.z.nativeEnum(constants_1.TOOL_MODEL_STATUS),
|
|
20
|
+
statusCheckEndpoint: zod_1.z.string().nullable().optional(),
|
|
21
|
+
maxPromptLength: zod_1.z.number().int(),
|
|
22
|
+
iconVariants: common_1.IconVariantsSchema,
|
|
23
|
+
supportsImageAttachment: zod_1.z.boolean(),
|
|
24
|
+
maxAttachedImages: zod_1.z.number().int(),
|
|
25
|
+
translatePrompt: zod_1.z.boolean(),
|
|
26
|
+
order: zod_1.z.number().int(),
|
|
27
|
+
vendorId: zod_1.z.string().uuid(),
|
|
28
|
+
createdAt: zod_1.z.string().datetime().or(zod_1.z.date()).optional(),
|
|
29
|
+
updatedAt: zod_1.z.string().datetime().or(zod_1.z.date()).optional(),
|
|
30
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationPresetSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ImageGenerationPresetSchema = zod_1.z.object({
|
|
6
|
+
uuid: zod_1.z.string().uuid(),
|
|
7
|
+
title: zod_1.z.string(),
|
|
8
|
+
sample: zod_1.z.string().url(),
|
|
9
|
+
order: zod_1.z.number().int(),
|
|
10
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationPricingRulesSchema = exports.ImageGenerationPricingRuleSchema = exports.ImageGenerationPricingRuleConditionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
exports.ImageGenerationPricingRuleConditionSchema = zod_1.z.object({
|
|
7
|
+
resolution: zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_RESOLUTION).optional(),
|
|
8
|
+
withoutSub: zod_1.z.boolean().optional(),
|
|
9
|
+
});
|
|
10
|
+
exports.ImageGenerationPricingRuleSchema = zod_1.z.object({
|
|
11
|
+
condition: exports.ImageGenerationPricingRuleConditionSchema,
|
|
12
|
+
value: zod_1.z.number().int(),
|
|
13
|
+
});
|
|
14
|
+
exports.ImageGenerationPricingRulesSchema = zod_1.z.array(exports.ImageGenerationPricingRuleSchema);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImageGenerationVendorSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const vendor_schema_1 = require("../tools/vendor.schema");
|
|
6
|
+
const image_generation_model_schema_1 = require("./image-generation-model.schema");
|
|
7
|
+
exports.ImageGenerationVendorSchema = vendor_schema_1.VendorSchema.extend({
|
|
8
|
+
models: zod_1.z.array(image_generation_model_schema_1.ImageGenerationModelSchema),
|
|
9
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
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("./image-generation-model.schema"), exports);
|
|
18
|
+
__exportStar(require("./image-generation-job.schema"), exports);
|
|
19
|
+
__exportStar(require("./image-generation-job-attempt.schema"), exports);
|
|
20
|
+
__exportStar(require("./image-generation-job-params.schema"), exports);
|
|
21
|
+
__exportStar(require("./image-generation-job-request-params.schema"), exports);
|
|
22
|
+
__exportStar(require("./image-generation-model-params.schema"), exports);
|
|
23
|
+
__exportStar(require("./image-generation-pricing-rule.schema"), exports);
|
|
24
|
+
__exportStar(require("./image-generation-vendor.schema"), exports);
|
|
25
|
+
__exportStar(require("./image-generation-preset.schema"), exports);
|
|
26
|
+
__exportStar(require("./image-generation-config.schema"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
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("./user.schema"), exports);
|
|
18
|
+
__exportStar(require("./product.schema"), exports);
|
|
19
|
+
__exportStar(require("./subscription.schema"), exports);
|
|
20
|
+
__exportStar(require("./cloud-payments-widget.schema"), exports);
|
|
21
|
+
__exportStar(require("./cloud-payments-widget-data.schema"), exports);
|
|
22
|
+
__exportStar(require("./image-generation"), exports);
|
|
23
|
+
__exportStar(require("./file.schema"), exports);
|
|
24
|
+
__exportStar(require("./common"), exports);
|
|
25
|
+
__exportStar(require("./tools"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.ProductSchema = zod_1.z.object({
|
|
6
|
+
uuid: zod_1.z.string().uuid(),
|
|
7
|
+
siteId: zod_1.z.string().uuid(),
|
|
8
|
+
name: zod_1.z.string().min(1).max(200),
|
|
9
|
+
description: zod_1.z.string().min(1).max(2000),
|
|
10
|
+
tokens: zod_1.z.number().int().min(0),
|
|
11
|
+
price: zod_1.z.number().int().min(0),
|
|
12
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscriptionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.SubscriptionSchema = zod_1.z.object({
|
|
6
|
+
uuid: zod_1.z.string().uuid(),
|
|
7
|
+
siteId: zod_1.z.string().uuid(),
|
|
8
|
+
name: zod_1.z.string().min(1).max(200),
|
|
9
|
+
description: zod_1.z.string().min(1).max(2000),
|
|
10
|
+
price: zod_1.z.number().int().min(0),
|
|
11
|
+
period: zod_1.z.number().int().min(1).max(36),
|
|
12
|
+
tokens: zod_1.z.number().int().min(0),
|
|
13
|
+
carryoverPercent: zod_1.z.number().int().min(0).max(100),
|
|
14
|
+
});
|
|
@@ -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("./vendor.schema"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VendorSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../common");
|
|
6
|
+
exports.VendorSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
title: zod_1.z.string(),
|
|
9
|
+
order: zod_1.z.number().int(),
|
|
10
|
+
iconVariants: common_1.IconVariantsSchema,
|
|
11
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
exports.UserSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid().optional(),
|
|
8
|
+
siteId: zod_1.z.string().uuid().optional(),
|
|
9
|
+
email: zod_1.z.string().email(),
|
|
10
|
+
password: zod_1.z.string().min(6).max(128),
|
|
11
|
+
role: zod_1.z.nativeEnum(constants_1.USER_ROLE).optional(),
|
|
12
|
+
status: zod_1.z.nativeEnum(constants_1.USER_STATUS).optional(),
|
|
13
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindFilesCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var FindFilesCommand;
|
|
7
|
+
(function (FindFilesCommand) {
|
|
8
|
+
FindFilesCommand.RequestQuerySchema = zod_1.z.object({
|
|
9
|
+
limit: zod_1.z.coerce.number().int().min(1).max(100).default(20),
|
|
10
|
+
offset: zod_1.z.coerce.number().int().min(0).default(0),
|
|
11
|
+
});
|
|
12
|
+
FindFilesCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
data: zod_1.z.array(models_1.FileSchema),
|
|
14
|
+
meta: zod_1.z.object({
|
|
15
|
+
limit: zod_1.z.number().int(),
|
|
16
|
+
offset: zod_1.z.number().int(),
|
|
17
|
+
total: zod_1.z.number().int(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(FindFilesCommand || (exports.FindFilesCommand = FindFilesCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetFileCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var GetFileCommand;
|
|
7
|
+
(function (GetFileCommand) {
|
|
8
|
+
GetFileCommand.RequestParamSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
GetFileCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.FileSchema,
|
|
13
|
+
});
|
|
14
|
+
})(GetFileCommand || (exports.GetFileCommand = GetFileCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./get-file.command"), exports);
|
|
18
|
+
__exportStar(require("./find-files.command"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindImageGenerationJobsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var FindImageGenerationJobsCommand;
|
|
7
|
+
(function (FindImageGenerationJobsCommand) {
|
|
8
|
+
FindImageGenerationJobsCommand.RequestQuerySchema = zod_1.z.object({
|
|
9
|
+
limit: zod_1.z.coerce.number().int().min(1).max(100).default(20),
|
|
10
|
+
offset: zod_1.z.coerce.number().int().min(0).default(0),
|
|
11
|
+
});
|
|
12
|
+
FindImageGenerationJobsCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
data: zod_1.z.array(models_1.ImageGenerationJobSchema),
|
|
14
|
+
meta: zod_1.z.object({
|
|
15
|
+
limit: zod_1.z.number().int(),
|
|
16
|
+
offset: zod_1.z.number().int(),
|
|
17
|
+
total: zod_1.z.number().int(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(FindImageGenerationJobsCommand || (exports.FindImageGenerationJobsCommand = FindImageGenerationJobsCommand = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetImageGenerationConfigCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var GetImageGenerationConfigCommand;
|
|
7
|
+
(function (GetImageGenerationConfigCommand) {
|
|
8
|
+
GetImageGenerationConfigCommand.ResponseSchema = zod_1.z.object({
|
|
9
|
+
data: models_1.ImageGenerationConfigSchema,
|
|
10
|
+
});
|
|
11
|
+
})(GetImageGenerationConfigCommand || (exports.GetImageGenerationConfigCommand = GetImageGenerationConfigCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetImageGenerationJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var GetImageGenerationJobCommand;
|
|
7
|
+
(function (GetImageGenerationJobCommand) {
|
|
8
|
+
GetImageGenerationJobCommand.RequestParamSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
GetImageGenerationJobCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.ImageGenerationJobSchema,
|
|
13
|
+
});
|
|
14
|
+
})(GetImageGenerationJobCommand || (exports.GetImageGenerationJobCommand = GetImageGenerationJobCommand = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetImageGenerationPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
var GetImageGenerationPriceCommand;
|
|
7
|
+
(function (GetImageGenerationPriceCommand) {
|
|
8
|
+
GetImageGenerationPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
modelId: zod_1.z.string().uuid(),
|
|
10
|
+
params: zod_1.z.object({
|
|
11
|
+
resolution: zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_RESOLUTION).optional(),
|
|
12
|
+
}),
|
|
13
|
+
});
|
|
14
|
+
GetImageGenerationPriceCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
data: zod_1.z.object({
|
|
16
|
+
price: zod_1.z.number().int().nonnegative(),
|
|
17
|
+
}),
|
|
18
|
+
});
|
|
19
|
+
})(GetImageGenerationPriceCommand || (exports.GetImageGenerationPriceCommand = GetImageGenerationPriceCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-image-generation-config.command"), exports);
|
|
18
|
+
__exportStar(require("./get-image-generation-job.command"), exports);
|
|
19
|
+
__exportStar(require("./find-image-generation-jobs.command"), exports);
|
|
20
|
+
__exportStar(require("./get-image-generation-price.command"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
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("./product"), exports);
|
|
18
|
+
__exportStar(require("./subscription"), exports);
|
|
19
|
+
__exportStar(require("./payment"), exports);
|
|
20
|
+
__exportStar(require("./file"), exports);
|
|
21
|
+
__exportStar(require("./user"), exports);
|
|
22
|
+
__exportStar(require("./image-generation"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPaymentHistoryCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
var GetPaymentHistoryCommand;
|
|
7
|
+
(function (GetPaymentHistoryCommand) {
|
|
8
|
+
GetPaymentHistoryCommand.ResponseItemSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
status: zod_1.z.nativeEnum(constants_1.PAYMENT_STATUS),
|
|
11
|
+
sum: zod_1.z.number(),
|
|
12
|
+
createdAt: zod_1.z.string().datetime().or(zod_1.z.date()),
|
|
13
|
+
orderId: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
GetPaymentHistoryCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
data: zod_1.z.array(GetPaymentHistoryCommand.ResponseItemSchema),
|
|
17
|
+
});
|
|
18
|
+
})(GetPaymentHistoryCommand || (exports.GetPaymentHistoryCommand = GetPaymentHistoryCommand = {}));
|
|
@@ -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("./get-payment-history.command"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindProductsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var FindProductsCommand;
|
|
7
|
+
(function (FindProductsCommand) {
|
|
8
|
+
FindProductsCommand.ResponseSchema = zod_1.z.object({
|
|
9
|
+
data: zod_1.z.array(models_1.ProductSchema),
|
|
10
|
+
});
|
|
11
|
+
})(FindProductsCommand || (exports.FindProductsCommand = FindProductsCommand = {}));
|
|
@@ -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("./find-products.command"), exports);
|