@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,15 @@
|
|
|
1
|
+
export const IMAGE_GENERATION_PRIVATE_CONTROLLER = 'image-generation/private' as const;
|
|
2
|
+
export const IMAGE_GENERATION_PUBLIC_CONTROLLER = 'image-generation/public' as const;
|
|
3
|
+
|
|
4
|
+
export const IMAGE_GENERATION_ROUTES = {
|
|
5
|
+
CONFIG: 'config',
|
|
6
|
+
PRICE: 'price',
|
|
7
|
+
EXECUTE: 'execute',
|
|
8
|
+
GET_JOBS: 'jobs',
|
|
9
|
+
GET_JOB: (uuid: string) => `jobs/${uuid}`,
|
|
10
|
+
UPDATE: (uuid: string) => `jobs/${uuid}`,
|
|
11
|
+
SET_REACTION: (uuid: string) => `jobs/${uuid}/reaction`,
|
|
12
|
+
DELETE: (uuid: string) => `jobs/${uuid}`,
|
|
13
|
+
DELETE_ALL: 'jobs',
|
|
14
|
+
RETRY: (uuid: string) => `jobs/${uuid}/retry`,
|
|
15
|
+
} as const;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './auth';
|
|
2
|
+
export * from './user';
|
|
3
|
+
export * from './product';
|
|
4
|
+
export * from './subscription';
|
|
5
|
+
export * from './payment';
|
|
6
|
+
export * from './cloud-payments';
|
|
7
|
+
export * from './transaction';
|
|
8
|
+
export * from './health';
|
|
9
|
+
export * from './image-generation';
|
|
10
|
+
export * from './ai-proxy';
|
|
11
|
+
export * from './file';
|
|
12
|
+
export * from './unregistered-user';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const UNREGISTERED_USER_CONTROLLER = 'unregistered-user' as const;
|
package/api/index.ts
ADDED
package/api/routes.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as CONTROLLERS from './controller';
|
|
2
|
+
|
|
3
|
+
export const ROOT = '/api' as const;
|
|
4
|
+
|
|
5
|
+
export const REST_API = {
|
|
6
|
+
HEALTH: {
|
|
7
|
+
PING: `${ROOT}/${CONTROLLERS.HEALTH_ROUTES.PING}`,
|
|
8
|
+
},
|
|
9
|
+
AUTH: {
|
|
10
|
+
REGISTER: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.REGISTER}`,
|
|
11
|
+
LOGIN: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
|
|
12
|
+
},
|
|
13
|
+
UNREGISTERED_USER: {
|
|
14
|
+
UPSERT: `${ROOT}/${CONTROLLERS.UNREGISTERED_USER_CONTROLLER}`,
|
|
15
|
+
},
|
|
16
|
+
USERS: {
|
|
17
|
+
GET: `${ROOT}/${CONTROLLERS.USER_CONTROLLER}`,
|
|
18
|
+
},
|
|
19
|
+
PRODUCT_PUBLIC: {
|
|
20
|
+
GET: `${ROOT}/${CONTROLLERS.PRODUCT_PUBLIC_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.GET_ALL}`,
|
|
21
|
+
},
|
|
22
|
+
PRODUCT_PRIVATE: {
|
|
23
|
+
GET: `${ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.GET_ALL}`,
|
|
24
|
+
BUY: (uuid: string) =>
|
|
25
|
+
`${ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.PRODUCT_ROUTES.BUY}`,
|
|
26
|
+
},
|
|
27
|
+
SUBSCRIPTION_PUBLIC: {
|
|
28
|
+
GET: `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PUBLIC_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
|
|
29
|
+
},
|
|
30
|
+
SUBSCRIPTION_PRIVATE: {
|
|
31
|
+
GET: `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
|
|
32
|
+
BUY: (uuid: string) =>
|
|
33
|
+
`${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.BUY}`,
|
|
34
|
+
},
|
|
35
|
+
PAYMENT: {
|
|
36
|
+
HISTORY: `${ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.HISTORY}`,
|
|
37
|
+
},
|
|
38
|
+
CLOUD_PAYMENTS: {
|
|
39
|
+
CALLBACK: (type: string) =>
|
|
40
|
+
`${ROOT}/${CONTROLLERS.CLOUD_PAYMENTS_CONTROLLER}/${CONTROLLERS.CLOUD_PAYMENTS_ROUTES.CALLBACK}/${type}`,
|
|
41
|
+
},
|
|
42
|
+
IMAGE_GENERATION_PUBLIC: {
|
|
43
|
+
CONFIG: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PUBLIC_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.CONFIG}`,
|
|
44
|
+
PRICE: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PUBLIC_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.PRICE}`,
|
|
45
|
+
},
|
|
46
|
+
IMAGE_GENERATION_PRIVATE: {
|
|
47
|
+
CONFIG: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.CONFIG}`,
|
|
48
|
+
EXECUTE: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.EXECUTE}`,
|
|
49
|
+
LIST_JOBS: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.GET_JOBS}`,
|
|
50
|
+
GET_JOB: (uuid: string) =>
|
|
51
|
+
`${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.GET_JOB(uuid)}`,
|
|
52
|
+
UPDATE: (uuid: string) =>
|
|
53
|
+
`${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.UPDATE(uuid)}`,
|
|
54
|
+
SET_REACTION: (uuid: string) =>
|
|
55
|
+
`${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.SET_REACTION(uuid)}`,
|
|
56
|
+
DELETE: (uuid: string) =>
|
|
57
|
+
`${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.DELETE(uuid)}`,
|
|
58
|
+
DELETE_ALL: `${ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.DELETE_ALL}`,
|
|
59
|
+
},
|
|
60
|
+
AI_PROXY: {
|
|
61
|
+
IMAGE_GENERATION_CALLBACK: `${ROOT}/${CONTROLLERS.AI_PROXY_CONTROLLER}/${CONTROLLERS.AI_PROXY_ROUTES.IMAGE_GENERATION_CALLBACK}`,
|
|
62
|
+
},
|
|
63
|
+
FILES_PRIVATE: {
|
|
64
|
+
UPLOAD: `${ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD}`,
|
|
65
|
+
LIST: `${ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}`,
|
|
66
|
+
GET: (uuid: string) => `${ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}/${uuid}`,
|
|
67
|
+
},
|
|
68
|
+
FILES_PUBLIC: {
|
|
69
|
+
UPLOAD: `${ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD}`,
|
|
70
|
+
LIST: `${ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}`,
|
|
71
|
+
GET: (uuid: string) => `${ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}/${uuid}`,
|
|
72
|
+
},
|
|
73
|
+
TRANSACTION: {
|
|
74
|
+
WRITE_OFF: `${ROOT}/${CONTROLLERS.TRANSACTION_CONTROLLER}/${CONTROLLERS.TRANSACTION_ROUTES.WRITE_OFF}`,
|
|
75
|
+
},
|
|
76
|
+
} as const;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_PROXY_ROUTES = exports.AI_PROXY_CONTROLLER = void 0;
|
|
4
|
+
exports.AI_PROXY_CONTROLLER = 'ai-proxy';
|
|
5
|
+
exports.AI_PROXY_ROUTES = {
|
|
6
|
+
IMAGE_GENERATION_CALLBACK: 'image-generation/callback',
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLOUD_PAYMENTS_ROUTES = exports.CLOUD_PAYMENTS_CONTROLLER = void 0;
|
|
4
|
+
exports.CLOUD_PAYMENTS_CONTROLLER = 'cloud-payments';
|
|
5
|
+
exports.CLOUD_PAYMENTS_ROUTES = {
|
|
6
|
+
CALLBACK: 'callback',
|
|
7
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FILE_ROUTES = exports.FILE_PUBLIC_CONTROLLER = exports.FILE_PRIVATE_CONTROLLER = void 0;
|
|
4
|
+
exports.FILE_PRIVATE_CONTROLLER = 'files/private';
|
|
5
|
+
exports.FILE_PUBLIC_CONTROLLER = 'files/public';
|
|
6
|
+
exports.FILE_ROUTES = {
|
|
7
|
+
UPLOAD: 'upload',
|
|
8
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IMAGE_GENERATION_ROUTES = exports.IMAGE_GENERATION_PUBLIC_CONTROLLER = exports.IMAGE_GENERATION_PRIVATE_CONTROLLER = void 0;
|
|
4
|
+
exports.IMAGE_GENERATION_PRIVATE_CONTROLLER = 'image-generation/private';
|
|
5
|
+
exports.IMAGE_GENERATION_PUBLIC_CONTROLLER = 'image-generation/public';
|
|
6
|
+
exports.IMAGE_GENERATION_ROUTES = {
|
|
7
|
+
CONFIG: 'config',
|
|
8
|
+
PRICE: 'price',
|
|
9
|
+
EXECUTE: 'execute',
|
|
10
|
+
GET_JOBS: 'jobs',
|
|
11
|
+
GET_JOB: (uuid) => `jobs/${uuid}`,
|
|
12
|
+
UPDATE: (uuid) => `jobs/${uuid}`,
|
|
13
|
+
SET_REACTION: (uuid) => `jobs/${uuid}/reaction`,
|
|
14
|
+
DELETE: (uuid) => `jobs/${uuid}`,
|
|
15
|
+
DELETE_ALL: 'jobs',
|
|
16
|
+
RETRY: (uuid) => `jobs/${uuid}/retry`,
|
|
17
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
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("./auth"), exports);
|
|
18
|
+
__exportStar(require("./user"), exports);
|
|
19
|
+
__exportStar(require("./product"), exports);
|
|
20
|
+
__exportStar(require("./subscription"), exports);
|
|
21
|
+
__exportStar(require("./payment"), exports);
|
|
22
|
+
__exportStar(require("./cloud-payments"), exports);
|
|
23
|
+
__exportStar(require("./transaction"), exports);
|
|
24
|
+
__exportStar(require("./health"), exports);
|
|
25
|
+
__exportStar(require("./image-generation"), exports);
|
|
26
|
+
__exportStar(require("./ai-proxy"), exports);
|
|
27
|
+
__exportStar(require("./file"), exports);
|
|
28
|
+
__exportStar(require("./unregistered-user"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PRODUCT_ROUTES = exports.PRODUCT_PUBLIC_CONTROLLER = exports.PRODUCT_PRIVATE_CONTROLLER = void 0;
|
|
4
|
+
exports.PRODUCT_PRIVATE_CONTROLLER = 'product/private';
|
|
5
|
+
exports.PRODUCT_PUBLIC_CONTROLLER = 'product/public';
|
|
6
|
+
exports.PRODUCT_ROUTES = {
|
|
7
|
+
GET_ALL: 'all',
|
|
8
|
+
BUY: 'buy',
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUBSCRIPTION_ROUTES = exports.SUBSCRIPTION_PUBLIC_CONTROLLER = exports.SUBSCRIPTION_PRIVATE_CONTROLLER = void 0;
|
|
4
|
+
exports.SUBSCRIPTION_PRIVATE_CONTROLLER = 'subscription/private';
|
|
5
|
+
exports.SUBSCRIPTION_PUBLIC_CONTROLLER = 'subscription/public';
|
|
6
|
+
exports.SUBSCRIPTION_ROUTES = {
|
|
7
|
+
GET_ALL: 'all',
|
|
8
|
+
BUY: 'buy',
|
|
9
|
+
};
|
|
@@ -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("./http"), exports);
|
|
@@ -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("./controller"), exports);
|
|
18
|
+
__exportStar(require("./routes"), exports);
|
|
@@ -0,0 +1,103 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.REST_API = exports.ROOT = void 0;
|
|
37
|
+
const CONTROLLERS = __importStar(require("./controller"));
|
|
38
|
+
exports.ROOT = '/api';
|
|
39
|
+
exports.REST_API = {
|
|
40
|
+
HEALTH: {
|
|
41
|
+
PING: `${exports.ROOT}/${CONTROLLERS.HEALTH_ROUTES.PING}`,
|
|
42
|
+
},
|
|
43
|
+
AUTH: {
|
|
44
|
+
REGISTER: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.REGISTER}`,
|
|
45
|
+
LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
|
|
46
|
+
},
|
|
47
|
+
UNREGISTERED_USER: {
|
|
48
|
+
UPSERT: `${exports.ROOT}/${CONTROLLERS.UNREGISTERED_USER_CONTROLLER}`,
|
|
49
|
+
},
|
|
50
|
+
USERS: {
|
|
51
|
+
GET: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}`,
|
|
52
|
+
},
|
|
53
|
+
PRODUCT_PUBLIC: {
|
|
54
|
+
GET: `${exports.ROOT}/${CONTROLLERS.PRODUCT_PUBLIC_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.GET_ALL}`,
|
|
55
|
+
},
|
|
56
|
+
PRODUCT_PRIVATE: {
|
|
57
|
+
GET: `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.GET_ALL}`,
|
|
58
|
+
BUY: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.PRODUCT_ROUTES.BUY}`,
|
|
59
|
+
},
|
|
60
|
+
SUBSCRIPTION_PUBLIC: {
|
|
61
|
+
GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PUBLIC_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
|
|
62
|
+
},
|
|
63
|
+
SUBSCRIPTION_PRIVATE: {
|
|
64
|
+
GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
|
|
65
|
+
BUY: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${uuid}/${CONTROLLERS.SUBSCRIPTION_ROUTES.BUY}`,
|
|
66
|
+
},
|
|
67
|
+
PAYMENT: {
|
|
68
|
+
HISTORY: `${exports.ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.HISTORY}`,
|
|
69
|
+
},
|
|
70
|
+
CLOUD_PAYMENTS: {
|
|
71
|
+
CALLBACK: (type) => `${exports.ROOT}/${CONTROLLERS.CLOUD_PAYMENTS_CONTROLLER}/${CONTROLLERS.CLOUD_PAYMENTS_ROUTES.CALLBACK}/${type}`,
|
|
72
|
+
},
|
|
73
|
+
IMAGE_GENERATION_PUBLIC: {
|
|
74
|
+
CONFIG: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PUBLIC_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.CONFIG}`,
|
|
75
|
+
PRICE: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PUBLIC_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.PRICE}`,
|
|
76
|
+
},
|
|
77
|
+
IMAGE_GENERATION_PRIVATE: {
|
|
78
|
+
CONFIG: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.CONFIG}`,
|
|
79
|
+
EXECUTE: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.EXECUTE}`,
|
|
80
|
+
LIST_JOBS: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.GET_JOBS}`,
|
|
81
|
+
GET_JOB: (uuid) => `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.GET_JOB(uuid)}`,
|
|
82
|
+
UPDATE: (uuid) => `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.UPDATE(uuid)}`,
|
|
83
|
+
SET_REACTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.SET_REACTION(uuid)}`,
|
|
84
|
+
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.DELETE(uuid)}`,
|
|
85
|
+
DELETE_ALL: `${exports.ROOT}/${CONTROLLERS.IMAGE_GENERATION_PRIVATE_CONTROLLER}/${CONTROLLERS.IMAGE_GENERATION_ROUTES.DELETE_ALL}`,
|
|
86
|
+
},
|
|
87
|
+
AI_PROXY: {
|
|
88
|
+
IMAGE_GENERATION_CALLBACK: `${exports.ROOT}/${CONTROLLERS.AI_PROXY_CONTROLLER}/${CONTROLLERS.AI_PROXY_ROUTES.IMAGE_GENERATION_CALLBACK}`,
|
|
89
|
+
},
|
|
90
|
+
FILES_PRIVATE: {
|
|
91
|
+
UPLOAD: `${exports.ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD}`,
|
|
92
|
+
LIST: `${exports.ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}`,
|
|
93
|
+
GET: (uuid) => `${exports.ROOT}/${CONTROLLERS.FILE_PRIVATE_CONTROLLER}/${uuid}`,
|
|
94
|
+
},
|
|
95
|
+
FILES_PUBLIC: {
|
|
96
|
+
UPLOAD: `${exports.ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD}`,
|
|
97
|
+
LIST: `${exports.ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}`,
|
|
98
|
+
GET: (uuid) => `${exports.ROOT}/${CONTROLLERS.FILE_PUBLIC_CONTROLLER}/${uuid}`,
|
|
99
|
+
},
|
|
100
|
+
TRANSACTION: {
|
|
101
|
+
WRITE_OFF: `${exports.ROOT}/${CONTROLLERS.TRANSACTION_CONTROLLER}/${CONTROLLERS.TRANSACTION_ROUTES.WRITE_OFF}`,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
@@ -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("./login.command"), exports);
|
|
18
|
+
__exportStar(require("./register.command"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoginCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var LoginCommand;
|
|
7
|
+
(function (LoginCommand) {
|
|
8
|
+
LoginCommand.RequestSchema = models_1.UserSchema.pick({
|
|
9
|
+
email: true,
|
|
10
|
+
password: true,
|
|
11
|
+
});
|
|
12
|
+
LoginCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
data: zod_1.z.object({
|
|
14
|
+
accessToken: zod_1.z.string(),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
})(LoginCommand || (exports.LoginCommand = LoginCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RegisterCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var RegisterCommand;
|
|
7
|
+
(function (RegisterCommand) {
|
|
8
|
+
RegisterCommand.RequestSchema = models_1.UserSchema.pick({
|
|
9
|
+
email: true,
|
|
10
|
+
password: true,
|
|
11
|
+
});
|
|
12
|
+
RegisterCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
data: zod_1.z.object({
|
|
14
|
+
accessToken: zod_1.z.string(),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
})(RegisterCommand || (exports.RegisterCommand = RegisterCommand = {}));
|
|
@@ -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("./upload-file.command"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UploadFileCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var UploadFileCommand;
|
|
7
|
+
(function (UploadFileCommand) {
|
|
8
|
+
UploadFileCommand.ResponseSchema = zod_1.z.object({
|
|
9
|
+
data: models_1.FileSchema,
|
|
10
|
+
});
|
|
11
|
+
})(UploadFileCommand || (exports.UploadFileCommand = UploadFileCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExecuteImageGenerationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var ExecuteImageGenerationCommand;
|
|
7
|
+
(function (ExecuteImageGenerationCommand) {
|
|
8
|
+
ExecuteImageGenerationCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
modelId: zod_1.z.string().uuid(),
|
|
10
|
+
prompt: zod_1.z.string().min(1).max(4000),
|
|
11
|
+
presetId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
params: models_1.ImageGenerationJobRequestParamsSchema,
|
|
13
|
+
});
|
|
14
|
+
ExecuteImageGenerationCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
data: models_1.ImageGenerationJobSchema,
|
|
16
|
+
});
|
|
17
|
+
})(ExecuteImageGenerationCommand || (exports.ExecuteImageGenerationCommand = ExecuteImageGenerationCommand = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
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("./execute-image-generation.command"), exports);
|
|
18
|
+
__exportStar(require("./retry-image-generation-job.command"), exports);
|
|
19
|
+
__exportStar(require("./set-reaction-to-image-generation-job.command"), exports);
|
|
20
|
+
__exportStar(require("./update-image-generation-job-title.command"), exports);
|
|
21
|
+
__exportStar(require("./soft-delete-image-generation-job-by-uuid.command"), exports);
|
|
22
|
+
__exportStar(require("./soft-delete-image-generation-jobs-by-criteria.command"), exports);
|
|
23
|
+
__exportStar(require("./proxy-image-generation-callback.command"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProxyImageGenerationCallbackCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var ProxyImageGenerationCallbackCommand;
|
|
6
|
+
(function (ProxyImageGenerationCallbackCommand) {
|
|
7
|
+
ProxyImageGenerationCallbackCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
model: zod_1.z.string(),
|
|
9
|
+
response: zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
data: zod_1.z.array(zod_1.z.string()),
|
|
12
|
+
externalId: zod_1.z.string(),
|
|
13
|
+
type: zod_1.z.string(),
|
|
14
|
+
errorMsg: zod_1.z.string().optional(),
|
|
15
|
+
})
|
|
16
|
+
.optional(),
|
|
17
|
+
});
|
|
18
|
+
ProxyImageGenerationCallbackCommand.ResponseSchema = zod_1.z.object({
|
|
19
|
+
ok: zod_1.z.boolean(),
|
|
20
|
+
});
|
|
21
|
+
})(ProxyImageGenerationCallbackCommand || (exports.ProxyImageGenerationCallbackCommand = ProxyImageGenerationCallbackCommand = {}));
|