@purpleschool/gptbot 0.9.97 → 0.10.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/controllers/http/auth.ts +1 -0
- package/api/controllers/http/b2b.ts +1 -0
- package/api/controllers/http/index.ts +4 -0
- package/api/controllers/http/interior-design.ts +14 -0
- package/api/controllers/http/marketplace-card.ts +14 -0
- package/api/controllers/http/page.ts +2 -0
- package/api/controllers/http/payment.ts +1 -0
- package/api/controllers/http/solving-edu-task.ts +14 -0
- package/api/controllers/http/subscription.ts +1 -1
- package/api/controllers/http/team-account.ts +21 -0
- package/api/routes.ts +121 -2
- package/build/api/controllers/http/auth.js +1 -0
- package/build/api/controllers/http/b2b.js +1 -0
- package/build/api/controllers/http/index.js +4 -0
- package/build/api/controllers/http/interior-design.js +16 -0
- package/build/api/controllers/http/marketplace-card.js +16 -0
- package/build/api/controllers/http/page.js +2 -0
- package/build/api/controllers/http/payment.js +1 -0
- package/build/api/controllers/http/solving-edu-task.js +16 -0
- package/build/api/controllers/http/subscription.js +1 -1
- package/build/api/controllers/http/team-account.js +23 -0
- package/build/api/routes.js +91 -2
- package/build/commands/b2b/get-b2b-documentation.command.js +99 -0
- package/build/commands/b2b/index.js +2 -0
- package/build/commands/b2b/send-text-request.command.js +2 -5
- package/build/commands/b2b/upload-b2b-file.command.js +12 -0
- package/build/commands/cabinet/get-user-statistics-by-month.command.js +4 -0
- package/build/commands/chat/archive-all.command.js +1 -4
- package/build/commands/chat/check-limit.command.js +7 -0
- package/build/commands/chat/create-chat.command.js +0 -1
- package/build/commands/chat/find-chats.command.js +1 -1
- package/build/commands/chat/get-last-active-chat-command.js +0 -1
- package/build/commands/index.js +3 -0
- package/build/commands/message/create-text-message.command.js +1 -0
- package/build/commands/page/find-pages-by-criteria.command.js +36 -0
- package/build/commands/page/index.js +1 -0
- package/build/commands/payment/find-payments-by-criteria.command.js +53 -0
- package/build/commands/payment/index.js +1 -0
- package/build/commands/product/buy-product.command.js +25 -1
- package/build/commands/subscription/buy-subscription.command.js +24 -1
- package/build/commands/subscription/index.js +0 -1
- package/build/commands/subscription/upgrade-subscription.command.js +25 -1
- package/build/commands/team-account/accept-team-account-invite.command.js +14 -0
- package/build/commands/team-account/create-manual-team-product.command.js +15 -0
- package/build/commands/team-account/create-manual-team-subscription.command.js +16 -0
- package/build/commands/team-account/create-team-account.command.js +16 -0
- package/build/commands/team-account/find-current-team-account-products.command.js +11 -0
- package/build/commands/team-account/find-current-team-account-subscriptions.command.js +11 -0
- package/build/commands/team-account/find-team-account-members.command.js +11 -0
- package/build/commands/team-account/find-team-account-operations.command.js +15 -0
- package/build/commands/team-account/find-team-account-products.command.js +11 -0
- package/build/commands/team-account/find-team-account-subscriptions.command.js +11 -0
- package/build/commands/team-account/find-team-accounts-by-name.command.js +18 -0
- package/build/commands/team-account/get-my-team-account.command.js +11 -0
- package/build/commands/team-account/get-team-account-balance.command.js +15 -0
- package/build/commands/team-account/index.js +33 -0
- package/build/commands/team-account/invite-team-account-member.command.js +17 -0
- package/build/commands/team-account/refund-team-account-balance.command.js +14 -0
- package/build/commands/team-account/remove-team-account-member.command.js +15 -0
- package/build/commands/team-account/update-team-account-member.command.js +23 -0
- package/build/commands/team-account/update-team-account.command.js +18 -0
- package/build/commands/team-to-product/add-team-to-product.command.js +16 -0
- package/build/commands/team-to-product/get-team-to-product-by-uuid.command.js +14 -0
- package/build/commands/team-to-product/get-team-to-products.command.js +14 -0
- package/build/commands/team-to-product/index.js +20 -0
- package/build/commands/team-to-product/update-team-to-product.command.js +21 -0
- package/build/commands/team-to-subscription/add-team-to-subscription.command.js +20 -0
- package/build/commands/team-to-subscription/get-team-to-subscription-by-uuid.command.js +14 -0
- package/build/commands/team-to-subscription/get-team-to-subscriptions.command.js +14 -0
- package/build/commands/team-to-subscription/index.js +20 -0
- package/build/commands/team-to-subscription/update-team-to-subscription.command.js +31 -0
- package/build/commands/tools/image-editor/image-editor.command.js +1 -0
- package/build/commands/tools/image-editor/retry-image-editor-job.command.js +1 -0
- package/build/commands/tools/index.js +3 -0
- package/build/commands/tools/interior-design/delete-all-interior-design-jobs.command.js +8 -0
- package/build/commands/tools/interior-design/delete-interior-design-job-by-uuid.command.js +11 -0
- package/build/commands/tools/interior-design/find-interior-design-job-by-uuid.command.js +14 -0
- package/build/commands/tools/interior-design/find-interior-design-jobs.command.js +18 -0
- package/build/commands/tools/interior-design/get-interior-design-tool-config.command.js +11 -0
- package/build/commands/tools/interior-design/index.js +25 -0
- package/build/commands/tools/interior-design/interior-design.command.js +20 -0
- package/build/commands/tools/interior-design/retry-interior-design-job.command.js +25 -0
- package/build/commands/tools/interior-design/set-reaction-to-interior-design-job.command.js +28 -0
- package/build/commands/tools/interior-design/update-interior-design-job-title.command.js +17 -0
- package/build/commands/tools/marketplace-card/delete-all-marketplace-card-jobs.command.js +10 -0
- package/build/commands/tools/marketplace-card/delete-marketplace-card-by-uuid.command.js +13 -0
- package/build/commands/tools/marketplace-card/execute-marketplace-card.command.js +48 -0
- package/build/commands/tools/marketplace-card/find-marketplace-card-job-by-uuid.command.js +14 -0
- package/build/commands/tools/marketplace-card/find-marketplace-card-jobs.command.js +18 -0
- package/build/commands/tools/marketplace-card/get-marketplace-card-config.command.js +11 -0
- package/build/commands/tools/marketplace-card/index.js +25 -0
- package/build/commands/tools/marketplace-card/retry-marketplace-card-job.command.js +51 -0
- package/build/commands/tools/marketplace-card/set-reaction-to-marketplace-card.command.js +28 -0
- package/build/commands/tools/marketplace-card/update-marketplace-card-job-title.command.js +17 -0
- package/build/commands/tools/solving-edu-task/delete-all-solving-edu-task-jobs.command.js +10 -0
- package/build/commands/tools/solving-edu-task/delete-solving-edu-task-job-by-uuid.command.js +13 -0
- package/build/commands/tools/solving-edu-task/find-solving-edu-task-job-by-uuid.command.js +14 -0
- package/build/commands/tools/solving-edu-task/find-solving-edu-task-jobs.command.js +18 -0
- package/build/commands/tools/solving-edu-task/get-solving-edu-task-tool-config.command.js +11 -0
- package/build/commands/tools/solving-edu-task/index.js +25 -0
- package/build/commands/tools/solving-edu-task/retry-solving-edu-task-job.command.js +23 -0
- package/build/commands/tools/solving-edu-task/set-reaction-to-solving-edu-task-job.command.js +28 -0
- package/build/commands/tools/solving-edu-task/solving-edu-task.command.js +30 -0
- package/build/commands/tools/solving-edu-task/update-solving-edu-task-job-title.command.js +17 -0
- package/build/commands/user/get-me.command.js +2 -1
- package/build/commands/user/get-user-payments.command.js +3 -1
- package/build/constants/ai-model/enums/index.js +0 -1
- package/build/constants/billing/enums/billing-scope.enum.js +8 -0
- package/build/constants/{errors → billing/enums}/index.js +1 -2
- package/build/constants/billing/index.js +17 -0
- package/build/constants/cabinet/enums/index.js +1 -0
- package/build/constants/cabinet/enums/statistics-metric-type.enum.js +8 -0
- package/build/constants/index.js +2 -1
- package/build/constants/model/enums/unified-model-content-type.enum.js +2 -1
- package/build/constants/page/enums/index.js +1 -0
- package/build/constants/page/enums/page-sort-by.enum.js +8 -0
- package/build/constants/payment/enums/index.js +1 -0
- package/build/constants/payment/enums/payment-provider.enum.js +8 -0
- package/build/constants/subscription/enums/subscription-feature-type.enum.js +5 -1
- package/build/constants/subscription/enums/user-to-subscription-marks.enum.js +1 -0
- package/build/constants/team-account/enums/index.js +20 -0
- package/build/constants/team-account/enums/team-account-invite-status.enum.js +10 -0
- package/build/constants/team-account/enums/team-account-member-role.enum.js +9 -0
- package/build/constants/team-account/enums/team-account-member-status.enum.js +11 -0
- package/build/constants/team-account/enums/team-account-operation-type.enum.js +10 -0
- package/build/constants/team-account/index.js +17 -0
- package/build/constants/tool/enums/index.js +0 -1
- package/build/constants/transaction/enums/user-balance-status.enum.js +3 -0
- package/build/constants/ui-notification/enums/ui-notification-type.enum.js +1 -0
- package/build/constants/user/enums/user-status.js +1 -0
- package/build/helpers/index.js +1 -0
- package/build/helpers/interior-design/calculate-interior-design-price.helper.js +13 -0
- package/build/helpers/interior-design/index.js +17 -0
- package/build/models/ai-model.schema.js +0 -1
- package/build/models/b2b/b2b-completions-stream-chunk.schema.js +10 -0
- package/build/models/b2b/b2b-file-upload-response.schema.js +11 -0
- package/build/models/b2b/index.js +18 -0
- package/build/models/chat.schema.js +1 -1
- package/build/models/community/community-post-media-data.schema.js +1 -0
- package/build/models/index.js +3 -0
- package/build/models/json-value.schema.js +13 -0
- package/build/models/message.schema.js +1 -0
- package/build/models/payment.schema.js +8 -3
- package/build/models/product.schema.js +2 -0
- package/build/models/prompt.schema.js +0 -2
- package/build/models/subscription-feature.schema.js +24 -3
- package/build/models/subscription.schema.js +1 -0
- package/build/models/team-account/index.js +23 -0
- package/build/models/team-account/team-account-invite.schema.js +20 -0
- package/build/models/team-account/team-account-member-list-item.schema.js +17 -0
- package/build/models/team-account/team-account-member.schema.js +17 -0
- package/build/models/team-account/team-account-operation.schema.js +12 -0
- package/build/models/team-account/team-account.schema.js +14 -0
- package/build/models/team-account/team-to-product.schema.js +21 -0
- package/build/models/team-account/team-to-subscription.schema.js +31 -0
- package/build/models/tools/image-editor/image-editor-job.schema.js +1 -0
- package/build/models/tools/image-editor/image-editor-model.schema.js +6 -0
- package/build/models/tools/image-generation/image-generation-model.schema.js +8 -5
- package/build/models/tools/index.js +3 -0
- package/build/models/tools/interior-design/index.js +19 -0
- package/build/models/tools/interior-design/interior-design-config.schema.js +23 -0
- package/build/models/tools/interior-design/interior-design-job.schema.js +27 -0
- package/build/models/tools/interior-design/interior-design-model.schema.js +34 -0
- package/build/models/tools/marketplace-card/index.js +18 -0
- package/build/models/tools/marketplace-card/marketplace-card-config.schema.js +30 -0
- package/build/models/tools/marketplace-card/marketplace-card-job.schema.js +24 -0
- package/build/models/tools/solving-edu-task/index.js +19 -0
- package/build/models/tools/solving-edu-task/solving-edu-task-config.schema.js +8 -0
- package/build/models/tools/solving-edu-task/solving-edu-task-job.schema.js +25 -0
- package/build/models/tools/solving-edu-task/solving-edu-task-model.schema.js +22 -0
- package/build/models/tools/video-editor/video-editor-job.schema.js +14 -1
- package/build/models/user-profile.schema.js +1 -0
- package/commands/b2b/get-b2b-documentation.command.ts +121 -0
- package/commands/b2b/index.ts +2 -0
- package/commands/b2b/send-text-request.command.ts +2 -5
- package/commands/b2b/upload-b2b-file.command.ts +14 -0
- package/commands/cabinet/get-user-statistics-by-month.command.ts +5 -1
- package/commands/chat/archive-all.command.ts +2 -4
- package/commands/chat/check-limit.command.ts +7 -0
- package/commands/chat/create-chat.command.ts +0 -1
- package/commands/chat/find-chats.command.ts +2 -5
- package/commands/chat/get-last-active-chat-command.ts +0 -1
- package/commands/index.ts +3 -0
- package/commands/message/create-text-message.command.ts +1 -0
- package/commands/page/find-pages-by-criteria.command.ts +50 -0
- package/commands/page/index.ts +1 -0
- package/commands/payment/find-payments-by-criteria.command.ts +63 -0
- package/commands/payment/index.ts +1 -0
- package/commands/product/buy-product.command.ts +27 -1
- package/commands/subscription/buy-subscription.command.ts +26 -1
- package/commands/subscription/index.ts +0 -1
- package/commands/subscription/upgrade-subscription.command.ts +27 -1
- package/commands/team-account/accept-team-account-invite.command.ts +16 -0
- package/commands/team-account/create-manual-team-product.command.ts +17 -0
- package/commands/team-account/create-manual-team-subscription.command.ts +18 -0
- package/commands/team-account/create-team-account.command.ts +18 -0
- package/commands/team-account/find-current-team-account-products.command.ts +10 -0
- package/commands/team-account/find-current-team-account-subscriptions.command.ts +10 -0
- package/commands/team-account/find-team-account-members.command.ts +10 -0
- package/commands/team-account/find-team-account-operations.command.ts +17 -0
- package/commands/team-account/find-team-account-products.command.ts +10 -0
- package/commands/team-account/find-team-account-subscriptions.command.ts +10 -0
- package/commands/team-account/find-team-accounts-by-name.command.ts +20 -0
- package/commands/team-account/get-my-team-account.command.ts +10 -0
- package/commands/team-account/get-team-account-balance.command.ts +14 -0
- package/commands/team-account/index.ts +17 -0
- package/commands/team-account/invite-team-account-member.command.ts +19 -0
- package/commands/team-account/refund-team-account-balance.command.ts +16 -0
- package/commands/team-account/remove-team-account-member.command.ts +17 -0
- package/commands/team-account/update-team-account-member.command.ts +25 -0
- package/commands/team-account/update-team-account.command.ts +24 -0
- package/commands/team-to-product/add-team-to-product.command.ts +18 -0
- package/commands/team-to-product/get-team-to-product-by-uuid.command.ts +16 -0
- package/commands/team-to-product/get-team-to-products.command.ts +16 -0
- package/commands/team-to-product/index.ts +4 -0
- package/commands/team-to-product/update-team-to-product.command.ts +26 -0
- package/commands/team-to-subscription/add-team-to-subscription.command.ts +22 -0
- package/commands/team-to-subscription/get-team-to-subscription-by-uuid.command.ts +16 -0
- package/commands/team-to-subscription/get-team-to-subscriptions.command.ts +16 -0
- package/commands/team-to-subscription/index.ts +4 -0
- package/commands/team-to-subscription/update-team-to-subscription.command.ts +36 -0
- package/commands/tools/image-editor/image-editor.command.ts +1 -0
- package/commands/tools/image-editor/retry-image-editor-job.command.ts +1 -0
- package/commands/tools/index.ts +3 -0
- package/commands/tools/interior-design/delete-all-interior-design-jobs.command.ts +6 -0
- package/commands/tools/interior-design/delete-interior-design-job-by-uuid.command.ts +11 -0
- package/commands/tools/interior-design/find-interior-design-job-by-uuid.command.ts +16 -0
- package/commands/tools/interior-design/find-interior-design-jobs.command.ts +18 -0
- package/commands/tools/interior-design/get-interior-design-tool-config.command.ts +10 -0
- package/commands/tools/interior-design/index.ts +9 -0
- package/commands/tools/interior-design/interior-design.command.ts +21 -0
- package/commands/tools/interior-design/retry-interior-design-job.command.ts +27 -0
- package/commands/tools/interior-design/set-reaction-to-interior-design-job.command.ts +33 -0
- package/commands/tools/interior-design/update-interior-design-job-title.command.ts +19 -0
- package/commands/tools/marketplace-card/delete-all-marketplace-card-jobs.command.ts +8 -0
- package/commands/tools/marketplace-card/delete-marketplace-card-by-uuid.command.ts +13 -0
- package/commands/tools/marketplace-card/execute-marketplace-card.command.ts +53 -0
- package/commands/tools/marketplace-card/find-marketplace-card-job-by-uuid.command.ts +16 -0
- package/commands/tools/marketplace-card/find-marketplace-card-jobs.command.ts +18 -0
- package/commands/tools/marketplace-card/get-marketplace-card-config.command.ts +9 -0
- package/commands/tools/marketplace-card/index.ts +9 -0
- package/commands/tools/marketplace-card/retry-marketplace-card-job.command.ts +57 -0
- package/commands/tools/marketplace-card/set-reaction-to-marketplace-card.command.ts +33 -0
- package/commands/tools/marketplace-card/update-marketplace-card-job-title.command.ts +19 -0
- package/commands/tools/solving-edu-task/delete-all-solving-edu-task-jobs.command.ts +8 -0
- package/commands/tools/solving-edu-task/delete-solving-edu-task-job-by-uuid.command.ts +13 -0
- package/commands/tools/solving-edu-task/find-solving-edu-task-job-by-uuid.command.ts +16 -0
- package/commands/tools/solving-edu-task/find-solving-edu-task-jobs.command.ts +18 -0
- package/commands/tools/solving-edu-task/get-solving-edu-task-tool-config.command.ts +9 -0
- package/commands/tools/solving-edu-task/index.ts +9 -0
- package/commands/tools/solving-edu-task/retry-solving-edu-task-job.command.ts +25 -0
- package/commands/tools/solving-edu-task/set-reaction-to-solving-edu-task-job.command.ts +33 -0
- package/commands/tools/solving-edu-task/solving-edu-task.command.ts +31 -0
- package/commands/tools/solving-edu-task/update-solving-edu-task-job-title.command.ts +19 -0
- package/commands/user/get-me.command.ts +2 -1
- package/commands/user/get-user-payments.command.ts +4 -2
- package/constants/ai-model/enums/index.ts +0 -1
- package/constants/billing/enums/billing-scope.enum.ts +4 -0
- package/constants/billing/enums/index.ts +1 -0
- package/constants/billing/index.ts +1 -0
- package/constants/cabinet/enums/index.ts +1 -0
- package/constants/cabinet/enums/statistics-metric-type.enum.ts +4 -0
- package/constants/index.ts +2 -1
- package/constants/model/enums/unified-model-content-type.enum.ts +2 -1
- package/constants/page/enums/index.ts +1 -0
- package/constants/page/enums/page-sort-by.enum.ts +4 -0
- package/constants/payment/enums/index.ts +1 -0
- package/constants/payment/enums/payment-provider.enum.ts +4 -0
- package/constants/subscription/enums/subscription-feature-type.enum.ts +5 -1
- package/constants/subscription/enums/user-to-subscription-marks.enum.ts +1 -0
- package/constants/team-account/enums/index.ts +4 -0
- package/constants/team-account/enums/team-account-invite-status.enum.ts +6 -0
- package/constants/team-account/enums/team-account-member-role.enum.ts +5 -0
- package/constants/team-account/enums/team-account-member-status.enum.ts +7 -0
- package/constants/team-account/enums/team-account-operation-type.enum.ts +6 -0
- package/constants/team-account/index.ts +1 -0
- package/constants/tool/enums/index.ts +0 -1
- package/constants/transaction/enums/user-balance-status.enum.ts +3 -0
- package/constants/ui-notification/enums/ui-notification-type.enum.ts +1 -0
- package/constants/user/enums/user-status.ts +1 -0
- package/helpers/index.ts +1 -0
- package/helpers/interior-design/calculate-interior-design-price.helper.ts +23 -0
- package/helpers/interior-design/index.ts +1 -0
- package/models/ai-model.schema.ts +3 -7
- package/models/b2b/b2b-completions-stream-chunk.schema.ts +10 -0
- package/models/b2b/b2b-file-upload-response.schema.ts +14 -0
- package/models/b2b/index.ts +2 -0
- package/models/chat.schema.ts +1 -1
- package/models/community/community-post-media-data.schema.ts +1 -0
- package/models/index.ts +3 -0
- package/models/json-value.schema.ts +23 -0
- package/models/message.schema.ts +1 -0
- package/models/payment.schema.ts +7 -2
- package/models/product.schema.ts +2 -0
- package/models/prompt.schema.ts +0 -2
- package/models/subscription-feature.schema.ts +32 -7
- package/models/subscription.schema.ts +7 -1
- package/models/team-account/index.ts +7 -0
- package/models/team-account/team-account-invite.schema.ts +18 -0
- package/models/team-account/team-account-member-list-item.schema.ts +15 -0
- package/models/team-account/team-account-member.schema.ts +15 -0
- package/models/team-account/team-account-operation.schema.ts +10 -0
- package/models/team-account/team-account.schema.ts +12 -0
- package/models/team-account/team-to-product.schema.ts +20 -0
- package/models/team-account/team-to-subscription.schema.ts +33 -0
- package/models/tools/image-editor/image-editor-job.schema.ts +1 -0
- package/models/tools/image-editor/image-editor-model.schema.ts +9 -0
- package/models/tools/image-generation/image-generation-model.schema.ts +8 -5
- package/models/tools/index.ts +3 -0
- package/models/tools/interior-design/index.ts +3 -0
- package/models/tools/interior-design/interior-design-config.schema.ts +29 -0
- package/models/tools/interior-design/interior-design-job.schema.ts +32 -0
- package/models/tools/interior-design/interior-design-model.schema.ts +45 -0
- package/models/tools/marketplace-card/index.ts +2 -0
- package/models/tools/marketplace-card/marketplace-card-config.schema.ts +33 -0
- package/models/tools/marketplace-card/marketplace-card-job.schema.ts +25 -0
- package/models/tools/solving-edu-task/index.ts +3 -0
- package/models/tools/solving-edu-task/solving-edu-task-config.schema.ts +8 -0
- package/models/tools/solving-edu-task/solving-edu-task-job.schema.ts +28 -0
- package/models/tools/solving-edu-task/solving-edu-task-model.schema.ts +25 -0
- package/models/tools/video-editor/video-editor-job.schema.ts +14 -1
- package/models/user-profile.schema.ts +1 -0
- package/package.json +1 -1
- package/build/commands/subscription/create-custom-subscription-plan.command.js +0 -24
- package/build/constants/ai-model/enums/ai-model-content-type.enum.js +0 -7
- package/build/constants/errors/errors.js +0 -4376
- package/build/constants/errors/verbose.js +0 -9
- package/build/constants/tool/enums/tool-type.enum.js +0 -12
- package/commands/subscription/create-custom-subscription-plan.command.ts +0 -26
- package/constants/ai-model/enums/ai-model-content-type.enum.ts +0 -7
- package/constants/errors/errors.ts +0 -4416
- package/constants/errors/index.ts +0 -2
- package/constants/errors/verbose.ts +0 -7
- package/constants/tool/enums/tool-type.enum.ts +0 -8
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
BILLING_SCOPE,
|
|
4
|
+
SUBSCRIPTION_ACTION,
|
|
5
|
+
SUBSCRIPTION_PLAN,
|
|
6
|
+
SUBSCRIPTION_TYPE,
|
|
7
|
+
} from '../constants';
|
|
3
8
|
import { SubscriptionFeatureSchema } from './subscription-feature.schema';
|
|
4
9
|
|
|
5
10
|
export const SubscriptionSchema = z.object({
|
|
@@ -8,6 +13,7 @@ export const SubscriptionSchema = z.object({
|
|
|
8
13
|
name: z.string().min(3).max(16384),
|
|
9
14
|
requests: z.number(),
|
|
10
15
|
price: z.number(),
|
|
16
|
+
billingScope: z.nativeEnum(BILLING_SCOPE),
|
|
11
17
|
plan: z.nativeEnum(SUBSCRIPTION_PLAN),
|
|
12
18
|
type: z.nativeEnum(SUBSCRIPTION_TYPE),
|
|
13
19
|
discount: z.number(),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './team-account.schema';
|
|
2
|
+
export * from './team-account-member.schema';
|
|
3
|
+
export * from './team-account-member-list-item.schema';
|
|
4
|
+
export * from './team-account-invite.schema';
|
|
5
|
+
export * from './team-account-operation.schema';
|
|
6
|
+
export * from './team-to-subscription.schema';
|
|
7
|
+
export * from './team-to-product.schema';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const TeamAccountInviteSchema = z.object({
|
|
4
|
+
uuid: z.string().uuid(),
|
|
5
|
+
teamAccountId: z.string().uuid(),
|
|
6
|
+
email: z.string().email(),
|
|
7
|
+
invitedByUserId: z.string().uuid(),
|
|
8
|
+
acceptedByUserId: z.string().uuid().nullable(),
|
|
9
|
+
tokenHash: z.string(),
|
|
10
|
+
role: z.string(),
|
|
11
|
+
tokenLimit: z.number().int().nullable(),
|
|
12
|
+
status: z.string(),
|
|
13
|
+
expiresAt: z.date(),
|
|
14
|
+
acceptedAt: z.date().nullable(),
|
|
15
|
+
revokedAt: z.date().nullable(),
|
|
16
|
+
createdAt: z.date(),
|
|
17
|
+
updatedAt: z.date(),
|
|
18
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TEAM_ACCOUNT_INVITE_STATUS, TEAM_ACCOUNT_MEMBER_ROLE } from '../../constants';
|
|
3
|
+
|
|
4
|
+
export const TeamAccountMemberListItemSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
userId: z.string().uuid().nullable(),
|
|
7
|
+
name: z.string().nullable(),
|
|
8
|
+
email: z.string().email(),
|
|
9
|
+
role: z.nativeEnum(TEAM_ACCOUNT_MEMBER_ROLE),
|
|
10
|
+
inviteStatus: z.nativeEnum(TEAM_ACCOUNT_INVITE_STATUS).nullable(),
|
|
11
|
+
balance: z.object({
|
|
12
|
+
remaining: z.number().int().nullable(),
|
|
13
|
+
limit: z.number().int().nullable(),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const TeamAccountMemberSchema = z.object({
|
|
4
|
+
uuid: z.string().uuid(),
|
|
5
|
+
teamAccountId: z.string().uuid(),
|
|
6
|
+
userId: z.string().uuid(),
|
|
7
|
+
role: z.string(),
|
|
8
|
+
status: z.string(),
|
|
9
|
+
tokenLimit: z.number().int().nullable(),
|
|
10
|
+
spentTokens: z.number().int(),
|
|
11
|
+
joinedAt: z.date(),
|
|
12
|
+
leftAt: z.date().nullable(),
|
|
13
|
+
createdAt: z.date(),
|
|
14
|
+
updatedAt: z.date(),
|
|
15
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const TeamAccountOperationSchema = z.object({
|
|
4
|
+
uuid: z.string().uuid(),
|
|
5
|
+
teamAccountId: z.string().uuid(),
|
|
6
|
+
initiatorUserId: z.string().uuid().nullable(),
|
|
7
|
+
type: z.string(),
|
|
8
|
+
amount: z.number().int(),
|
|
9
|
+
createdAt: z.date(),
|
|
10
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const TeamAccountSchema = z.object({
|
|
4
|
+
uuid: z.string().uuid(),
|
|
5
|
+
ownerUserId: z.string().uuid(),
|
|
6
|
+
name: z.string(),
|
|
7
|
+
email: z.string().email(),
|
|
8
|
+
logoUrl: z.string().nullable(),
|
|
9
|
+
isActive: z.boolean(),
|
|
10
|
+
createdAt: z.date(),
|
|
11
|
+
updatedAt: z.date(),
|
|
12
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PRODUCT_STATUS } from '../../constants';
|
|
3
|
+
import { ProductSchema } from '../product.schema';
|
|
4
|
+
|
|
5
|
+
export const TeamToProductSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
teamAccountId: z.string().uuid(),
|
|
8
|
+
productId: z.string().uuid(),
|
|
9
|
+
initTokenBalance: z.number(),
|
|
10
|
+
tokenBalance: z.number(),
|
|
11
|
+
status: z.nativeEnum(PRODUCT_STATUS),
|
|
12
|
+
expiresAt: z.date().nullable(),
|
|
13
|
+
orderId: z.string().uuid().nullable(),
|
|
14
|
+
createdAt: z.date(),
|
|
15
|
+
updatedAt: z.date(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const TeamToProductWithProductSchema = TeamToProductSchema.extend({
|
|
19
|
+
product: ProductSchema,
|
|
20
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SUBSCRIPTION_STATUS, USER_TO_SUBSCRIPTION_TYPE } from '../../constants';
|
|
3
|
+
import { SubscriptionSchema } from '../subscription.schema';
|
|
4
|
+
|
|
5
|
+
export const TeamToSubscriptionSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
teamAccountId: z.string().uuid(),
|
|
8
|
+
subscriptionId: z.string().uuid(),
|
|
9
|
+
cloudPaymentsSubscriptionId: z.string().nullable(),
|
|
10
|
+
zenpaymentsInvoiceNumber: z.string().nullable(),
|
|
11
|
+
initTokenBalance: z.number(),
|
|
12
|
+
tokenBalance: z.number(),
|
|
13
|
+
initCarriedOverTokenBalance: z.number(),
|
|
14
|
+
carriedOverTokenBalance: z.number(),
|
|
15
|
+
startDate: z.date().nullable(),
|
|
16
|
+
endDate: z.date().nullable(),
|
|
17
|
+
status: z.nativeEnum(SUBSCRIPTION_STATUS),
|
|
18
|
+
active: z.boolean(),
|
|
19
|
+
type: z.nativeEnum(USER_TO_SUBSCRIPTION_TYPE),
|
|
20
|
+
intervalEndDate: z.date().nullable(),
|
|
21
|
+
marks: z.array(z.string()),
|
|
22
|
+
downgradedFromTeamSubscriptionId: z.string().uuid().nullable(),
|
|
23
|
+
orderId: z.string().uuid().nullable(),
|
|
24
|
+
createdAt: z.date(),
|
|
25
|
+
updatedAt: z.date(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const TeamToSubscriptionWithSubscriptionSchema = z.intersection(
|
|
29
|
+
TeamToSubscriptionSchema,
|
|
30
|
+
z.object({
|
|
31
|
+
subscription: SubscriptionSchema,
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
@@ -8,6 +8,7 @@ export const ImageEditorJobParamsSchema = z.object({
|
|
|
8
8
|
attachedFiles: z.array(AttachedToolFileSchema),
|
|
9
9
|
systemPromptId: z.string().optional(),
|
|
10
10
|
imageUrls: z.string().array().optional(),
|
|
11
|
+
aspectRatio: z.string().optional(),
|
|
11
12
|
});
|
|
12
13
|
|
|
13
14
|
export type ImageEditorJobParams = z.infer<typeof ImageEditorJobParamsSchema>;
|
|
@@ -8,6 +8,15 @@ export const ImageEditorModelParamsSchema = z.object({
|
|
|
8
8
|
maxImages: z.number(),
|
|
9
9
|
acceptedTypes: z.array(z.string()),
|
|
10
10
|
}),
|
|
11
|
+
aspectRatio: z
|
|
12
|
+
.record(
|
|
13
|
+
z.string(),
|
|
14
|
+
z.object({
|
|
15
|
+
width: z.number(),
|
|
16
|
+
height: z.number(),
|
|
17
|
+
}),
|
|
18
|
+
)
|
|
19
|
+
.optional(),
|
|
11
20
|
});
|
|
12
21
|
|
|
13
22
|
export type ImageEditorModelParams = z.infer<typeof ImageEditorModelParamsSchema>;
|
|
@@ -5,12 +5,15 @@ import { UnlockedBySchema } from '../../unlocked-by-subscription.schema';
|
|
|
5
5
|
export const ImageGenerationModelParamsSchema = z.object({
|
|
6
6
|
aspectRatio: z.record(
|
|
7
7
|
z.string(),
|
|
8
|
-
z.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
z.union([
|
|
9
|
+
z.object({
|
|
10
|
+
width: z.number(),
|
|
11
|
+
height: z.number(),
|
|
12
|
+
}),
|
|
13
|
+
z.string(),
|
|
14
|
+
]),
|
|
12
15
|
),
|
|
13
|
-
quality: z.string().optional(),
|
|
16
|
+
quality: z.union([z.string(), z.record(z.string())]).optional(),
|
|
14
17
|
resolution: z
|
|
15
18
|
.object({
|
|
16
19
|
options: z.array(z.nativeEnum(IMAGE_GENERATION_RESOLUTION)),
|
package/models/tools/index.ts
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { InteriorDesignModelSchema } from './interior-design-model.schema';
|
|
3
|
+
|
|
4
|
+
export const InteriorDesignStylesSchema = z.object({
|
|
5
|
+
uuid: z.string(),
|
|
6
|
+
title: z.string(),
|
|
7
|
+
prompt: z.string(),
|
|
8
|
+
sample: z.string(),
|
|
9
|
+
order: z.number(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type InteriorDesignStyles = z.infer<typeof InteriorDesignStylesSchema>;
|
|
13
|
+
|
|
14
|
+
export const InteriorDesignRoomTypesSchema = z.object({
|
|
15
|
+
uuid: z.string(),
|
|
16
|
+
title: z.string(),
|
|
17
|
+
prompt: z.string(),
|
|
18
|
+
order: z.number(),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export type InteriorDesignRoomTypes = z.infer<typeof InteriorDesignRoomTypesSchema>;
|
|
22
|
+
|
|
23
|
+
export const InteriorDesignConfigSchema = z.object({
|
|
24
|
+
models: z.array(InteriorDesignModelSchema),
|
|
25
|
+
styles: z.array(InteriorDesignStylesSchema),
|
|
26
|
+
roomTypes: z.array(InteriorDesignRoomTypesSchema),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export type InteriorDesignConfig = z.infer<typeof InteriorDesignConfigSchema>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { USER_REACTION } from '../../../constants';
|
|
3
|
+
import { ToolJobSchema } from '../../tool-job.schema';
|
|
4
|
+
import { FileSchema } from '../../file.schema';
|
|
5
|
+
import { AttachedToolFileSchema } from '../common';
|
|
6
|
+
|
|
7
|
+
export const InteriorDesignJobParamsSchema = z.object({
|
|
8
|
+
attachedFiles: z.array(AttachedToolFileSchema),
|
|
9
|
+
styleId: z.string().optional(),
|
|
10
|
+
roomTypeId: z.string().optional(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type InteriorDesignJobParams = z.infer<typeof InteriorDesignJobParamsSchema>;
|
|
14
|
+
|
|
15
|
+
export const InteriorDesignJobSchema = ToolJobSchema.extend({
|
|
16
|
+
title: z.string(),
|
|
17
|
+
prompt: z.string(),
|
|
18
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
19
|
+
imageUrls: z.string().array(),
|
|
20
|
+
images: z
|
|
21
|
+
.array(
|
|
22
|
+
FileSchema.pick({
|
|
23
|
+
uuid: true,
|
|
24
|
+
url: true,
|
|
25
|
+
}),
|
|
26
|
+
)
|
|
27
|
+
.nullable(),
|
|
28
|
+
params: InteriorDesignJobParamsSchema,
|
|
29
|
+
modelId: z.string(),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export type InteriorDesignJob = z.infer<typeof InteriorDesignJobSchema>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IconVariantsSchema } from '../../icon-variants.schema';
|
|
3
|
+
import { UnlockedBySchema } from '../../unlocked-by-subscription.schema';
|
|
4
|
+
|
|
5
|
+
export const InteriorDesignModelParamsSchema = z.object({
|
|
6
|
+
imageAttachment: z.object({
|
|
7
|
+
supported: z.boolean(),
|
|
8
|
+
maxImages: z.number(),
|
|
9
|
+
acceptedTypes: z.array(z.string()),
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type InteriorDesignModelParams = z.infer<typeof InteriorDesignModelParamsSchema>;
|
|
14
|
+
|
|
15
|
+
export const InteriorDesignModelPricingRuleConditionSchema = z.object({
|
|
16
|
+
withoutSub: z.boolean().optional(),
|
|
17
|
+
});
|
|
18
|
+
export type InteriorDesignModelPricingRuleCondition = z.infer<
|
|
19
|
+
typeof InteriorDesignModelPricingRuleConditionSchema
|
|
20
|
+
>;
|
|
21
|
+
|
|
22
|
+
export const InteriorDesignModelPricingRulesSchema = z.array(
|
|
23
|
+
z.object({
|
|
24
|
+
condition: InteriorDesignModelPricingRuleConditionSchema,
|
|
25
|
+
value: z.number(),
|
|
26
|
+
}),
|
|
27
|
+
);
|
|
28
|
+
export type InteriorDesignModelPricingRules = z.infer<typeof InteriorDesignModelPricingRulesSchema>;
|
|
29
|
+
|
|
30
|
+
export const InteriorDesignModelSchema = z.object({
|
|
31
|
+
uuid: z.string(),
|
|
32
|
+
title: z.string(),
|
|
33
|
+
description: z.string(),
|
|
34
|
+
price: z.number(),
|
|
35
|
+
status: z.string(),
|
|
36
|
+
order: z.number(),
|
|
37
|
+
icons: IconVariantsSchema,
|
|
38
|
+
maxPromptLength: z.number(),
|
|
39
|
+
params: InteriorDesignModelParamsSchema,
|
|
40
|
+
pricingRules: InteriorDesignModelPricingRulesSchema,
|
|
41
|
+
unlockedBy: UnlockedBySchema.nullable(),
|
|
42
|
+
canUse: z.boolean(),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export type InteriorDesignModel = z.infer<typeof InteriorDesignModelSchema>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IconVariantsSchema } from '../../icon-variants.schema';
|
|
3
|
+
|
|
4
|
+
export const MarketplaceCardStylePresetSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
previewImageUrl: z.string(),
|
|
7
|
+
order: z.number(),
|
|
8
|
+
isActive: z.boolean(),
|
|
9
|
+
});
|
|
10
|
+
export type MarketplaceCardStylePreset = z.infer<typeof MarketplaceCardStylePresetSchema>;
|
|
11
|
+
|
|
12
|
+
export const MarketplaceCardModelSchema = z.object({
|
|
13
|
+
uuid: z.string().uuid(),
|
|
14
|
+
price: z.number(),
|
|
15
|
+
params: z.object({
|
|
16
|
+
imageAttachment: z.object({
|
|
17
|
+
supported: z.boolean(),
|
|
18
|
+
maxImages: z.number(),
|
|
19
|
+
acceptedTypes: z.array(z.string()),
|
|
20
|
+
}),
|
|
21
|
+
}),
|
|
22
|
+
iconVariants: IconVariantsSchema,
|
|
23
|
+
maxPromptLength: z.number(),
|
|
24
|
+
supportsImageAttachment: z.boolean(),
|
|
25
|
+
maxAttachedImages: z.number(),
|
|
26
|
+
});
|
|
27
|
+
export type MarketplaceCardModel = z.infer<typeof MarketplaceCardModelSchema>;
|
|
28
|
+
|
|
29
|
+
export const MarketplaceCardConfigSchema = z.object({
|
|
30
|
+
styles: z.array(MarketplaceCardStylePresetSchema),
|
|
31
|
+
models: z.array(MarketplaceCardModelSchema),
|
|
32
|
+
});
|
|
33
|
+
export type MarketplaceCardConfigModel = z.infer<typeof MarketplaceCardConfigSchema>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { USER_REACTION } from '../../../constants';
|
|
3
|
+
import { ToolJobSchema } from '../../tool-job.schema';
|
|
4
|
+
|
|
5
|
+
export const MarketplaceCardJobSchema = ToolJobSchema.extend({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
title: z.string(),
|
|
8
|
+
subtitle: z.string().nullable(),
|
|
9
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
10
|
+
stylePresetId: z.string().uuid().nullable(),
|
|
11
|
+
advantages: z.array(z.string()),
|
|
12
|
+
tags: z.array(z.string()),
|
|
13
|
+
isCustom: z.boolean(),
|
|
14
|
+
customStylePrompt: z.string().nullable(),
|
|
15
|
+
inputImages: z.array(
|
|
16
|
+
z.object({
|
|
17
|
+
uuid: z.string().uuid(),
|
|
18
|
+
url: z.string(),
|
|
19
|
+
}),
|
|
20
|
+
),
|
|
21
|
+
resultImages: z.array(z.string()).nullable(),
|
|
22
|
+
backgroundDescription: z.string().nullable(),
|
|
23
|
+
price: z.number(),
|
|
24
|
+
});
|
|
25
|
+
export type MarketplaceCardJob = z.infer<typeof MarketplaceCardJobSchema>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SolvingEduTaskModelSchema } from './solving-edu-task-model.schema';
|
|
3
|
+
|
|
4
|
+
export const SolvingEduTaskConfigSchema = z.object({
|
|
5
|
+
models: z.array(SolvingEduTaskModelSchema),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export type SolvingEduTaskConfig = z.infer<typeof SolvingEduTaskConfigSchema>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { USER_REACTION } from '../../../constants';
|
|
3
|
+
import { AttachedToolFileSchema } from '../common';
|
|
4
|
+
import { TOOL_JOB_STATUS } from '../../../constants';
|
|
5
|
+
|
|
6
|
+
export const SolvingEduTaskJobParamsSchema = z.object({
|
|
7
|
+
attachedFiles: z.array(AttachedToolFileSchema),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type SolvingEduTaskJobParams = z.infer<typeof SolvingEduTaskJobParamsSchema>;
|
|
11
|
+
|
|
12
|
+
export const SolvingEduTaskJobSchema = z.object({
|
|
13
|
+
uuid: z.string().uuid(),
|
|
14
|
+
prompt: z.string(),
|
|
15
|
+
aiOutput: z.string().nullable().optional(),
|
|
16
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
17
|
+
title: z.string(),
|
|
18
|
+
status: z.nativeEnum(TOOL_JOB_STATUS),
|
|
19
|
+
modelId: z.string(),
|
|
20
|
+
price: z.number(),
|
|
21
|
+
params: SolvingEduTaskJobParamsSchema,
|
|
22
|
+
error: z.string().nullable(),
|
|
23
|
+
userId: z.string().nullable().optional(),
|
|
24
|
+
createdAt: z.date(),
|
|
25
|
+
updatedAt: z.date(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export type SolvingEduTaskJob = z.infer<typeof SolvingEduTaskJobSchema>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TOOL_MODEL_STATUS } from '../../../constants';
|
|
3
|
+
|
|
4
|
+
export const SolvingEduTaskModelParamsSchema = z.object({
|
|
5
|
+
imageAttachment: z.object({
|
|
6
|
+
supported: z.boolean(),
|
|
7
|
+
maxImages: z.number(),
|
|
8
|
+
acceptedTypes: z.array(z.string()),
|
|
9
|
+
}),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type SolvingEduTaskModelParams = z.infer<typeof SolvingEduTaskModelParamsSchema>;
|
|
13
|
+
|
|
14
|
+
export const SolvingEduTaskModelSchema = z.object({
|
|
15
|
+
uuid: z.string(),
|
|
16
|
+
title: z.string(),
|
|
17
|
+
description: z.string(),
|
|
18
|
+
price: z.number(),
|
|
19
|
+
order: z.number(),
|
|
20
|
+
status: z.nativeEnum(TOOL_MODEL_STATUS),
|
|
21
|
+
maxPromptLength: z.number(),
|
|
22
|
+
params: SolvingEduTaskModelParamsSchema,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export type SolvingEduTaskModel = z.infer<typeof SolvingEduTaskModelSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ToolJobSchema } from '../../tool-job.schema';
|
|
3
2
|
import { USER_REACTION } from '../../../constants';
|
|
3
|
+
import { ToolJobSchema } from '../../tool-job.schema';
|
|
4
4
|
|
|
5
5
|
export const VideoEditorJobSchema = ToolJobSchema.extend({
|
|
6
6
|
title: z.string(),
|
|
@@ -9,9 +9,22 @@ export const VideoEditorJobSchema = ToolJobSchema.extend({
|
|
|
9
9
|
inputVideoId: z.string().nullable(),
|
|
10
10
|
inputVideoUrl: z.string(),
|
|
11
11
|
outputVideoUrl: z.string().nullable(),
|
|
12
|
+
video: z
|
|
13
|
+
.object({
|
|
14
|
+
uuid: z.string(),
|
|
15
|
+
url: z.string(),
|
|
16
|
+
})
|
|
17
|
+
.nullable(),
|
|
18
|
+
preview: z
|
|
19
|
+
.object({
|
|
20
|
+
uuid: z.string(),
|
|
21
|
+
url: z.string(),
|
|
22
|
+
})
|
|
23
|
+
.nullable(),
|
|
12
24
|
modelId: z.string(),
|
|
13
25
|
isPublished: z.boolean(),
|
|
14
26
|
postId: z.string().nullable(),
|
|
27
|
+
thumbnail: z.string().nullable(),
|
|
15
28
|
});
|
|
16
29
|
|
|
17
30
|
export type VideoEditorJob = z.infer<typeof VideoEditorJobSchema>;
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateCustomSubscriptionPlanCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../models");
|
|
6
|
-
var CreateCustomSubscriptionPlanCommand;
|
|
7
|
-
(function (CreateCustomSubscriptionPlanCommand) {
|
|
8
|
-
CreateCustomSubscriptionPlanCommand.RequestSchema = zod_1.z.object({
|
|
9
|
-
tokens: zod_1.z
|
|
10
|
-
.number()
|
|
11
|
-
.refine((val) => val % 500 === 0, {
|
|
12
|
-
message: 'tokens must be a multiple of 500',
|
|
13
|
-
})
|
|
14
|
-
.refine((val) => val > 1000, {
|
|
15
|
-
message: 'tokens must be greater than 1000',
|
|
16
|
-
})
|
|
17
|
-
.refine((val) => val <= 10000, {
|
|
18
|
-
message: 'tokens must be equal or less than 10000',
|
|
19
|
-
}),
|
|
20
|
-
});
|
|
21
|
-
CreateCustomSubscriptionPlanCommand.ResponseSchema = zod_1.z.object({
|
|
22
|
-
data: zod_1.z.array(models_1.SubscriptionSchema),
|
|
23
|
-
});
|
|
24
|
-
})(CreateCustomSubscriptionPlanCommand || (exports.CreateCustomSubscriptionPlanCommand = CreateCustomSubscriptionPlanCommand = {}));
|