@purpleschool/gptbot 0.9.97 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +22 -0
- package/build/models/team-account/team-account-invite.schema.js +20 -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 +6 -0
- package/models/team-account/team-account-invite.schema.ts +18 -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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TeamToProductSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace UpdateTeamToProductCommand {
|
|
5
|
+
export const RequestParamSchema = TeamToProductSchema.pick({
|
|
6
|
+
uuid: true,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
10
|
+
|
|
11
|
+
export const RequestSchema = TeamToProductSchema.pick({
|
|
12
|
+
initTokenBalance: true,
|
|
13
|
+
tokenBalance: true,
|
|
14
|
+
status: true,
|
|
15
|
+
expiresAt: true,
|
|
16
|
+
orderId: true,
|
|
17
|
+
}).partial();
|
|
18
|
+
|
|
19
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
20
|
+
|
|
21
|
+
export const ResponseSchema = z.object({
|
|
22
|
+
data: TeamToProductSchema,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TeamToSubscriptionSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace AddTeamToSubscriptionCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
teamAccountId: z.string().uuid(),
|
|
7
|
+
subscriptionId: z.string().uuid(),
|
|
8
|
+
cloudPaymentsSubscriptionId: z.string().optional(),
|
|
9
|
+
zenpaymentsInvoiceNumber: z.string().optional(),
|
|
10
|
+
startDate: z.coerce.date().optional(),
|
|
11
|
+
downgradedFromTeamSubscriptionId: z.string().uuid().nullable().optional(),
|
|
12
|
+
orderId: z.string().uuid(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
16
|
+
|
|
17
|
+
export const ResponseSchema = z.object({
|
|
18
|
+
data: TeamToSubscriptionSchema,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TeamToSubscriptionSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetTeamToSubscriptionByUuidCommand {
|
|
5
|
+
export const RequestSchema = TeamToSubscriptionSchema.pick({
|
|
6
|
+
uuid: true,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: TeamToSubscriptionSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TeamToSubscriptionWithSubscriptionSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetTeamToSubscriptionsCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
teamAccountId: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: z.array(TeamToSubscriptionWithSubscriptionSchema),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TeamToSubscriptionSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace UpdateTeamToSubscriptionCommand {
|
|
5
|
+
export const RequestParamSchema = TeamToSubscriptionSchema.pick({
|
|
6
|
+
uuid: true,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
10
|
+
|
|
11
|
+
export const RequestSchema = TeamToSubscriptionSchema.pick({
|
|
12
|
+
cloudPaymentsSubscriptionId: true,
|
|
13
|
+
zenpaymentsInvoiceNumber: true,
|
|
14
|
+
initTokenBalance: true,
|
|
15
|
+
tokenBalance: true,
|
|
16
|
+
initCarriedOverTokenBalance: true,
|
|
17
|
+
carriedOverTokenBalance: true,
|
|
18
|
+
startDate: true,
|
|
19
|
+
endDate: true,
|
|
20
|
+
status: true,
|
|
21
|
+
active: true,
|
|
22
|
+
type: true,
|
|
23
|
+
intervalEndDate: true,
|
|
24
|
+
marks: true,
|
|
25
|
+
downgradedFromTeamSubscriptionId: true,
|
|
26
|
+
orderId: true,
|
|
27
|
+
}).partial();
|
|
28
|
+
|
|
29
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
30
|
+
|
|
31
|
+
export const ResponseSchema = z.object({
|
|
32
|
+
data: TeamToSubscriptionSchema,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
36
|
+
}
|
package/commands/tools/index.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace DeleteInteriorDesignJobByUuidCommand {
|
|
4
|
+
export const RequestParamsSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
});
|
|
7
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = z.void();
|
|
10
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { InteriorDesignJobSchema, ToolJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace FindInteriorDesignJobByUUIDCommand {
|
|
5
|
+
export const RequestParamsSchema = ToolJobSchema.pick({
|
|
6
|
+
uuid: true,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestParamsSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: InteriorDesignJobSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { InteriorDesignJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace FindInteriorDesignJobsCommand {
|
|
5
|
+
export const RequestQuerySchema = z.object({
|
|
6
|
+
limit: z.coerce.number().min(1).optional(),
|
|
7
|
+
offset: z.coerce.number().min(0).default(0).optional(),
|
|
8
|
+
title: z.string().optional(),
|
|
9
|
+
});
|
|
10
|
+
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
11
|
+
|
|
12
|
+
export const ResponseSchema = z.object({
|
|
13
|
+
data: z.array(InteriorDesignJobSchema),
|
|
14
|
+
totalPages: z.number(),
|
|
15
|
+
page: z.number(),
|
|
16
|
+
});
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { InteriorDesignConfigSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetInteriorDesignToolConfigCommand {
|
|
5
|
+
export const ResponseSchema = z.object({
|
|
6
|
+
data: InteriorDesignConfigSchema,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './delete-interior-design-job-by-uuid.command';
|
|
2
|
+
export * from './delete-all-interior-design-jobs.command';
|
|
3
|
+
export * from './retry-interior-design-job.command';
|
|
4
|
+
export * from './set-reaction-to-interior-design-job.command';
|
|
5
|
+
export * from './interior-design.command';
|
|
6
|
+
export * from './update-interior-design-job-title.command';
|
|
7
|
+
export * from './find-interior-design-job-by-uuid.command';
|
|
8
|
+
export * from './find-interior-design-jobs.command';
|
|
9
|
+
export * from './get-interior-design-tool-config.command';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ToolJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace InteriorDesignCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
modelId: z.string().uuid(),
|
|
7
|
+
prompt: z.string(),
|
|
8
|
+
params: z.object({
|
|
9
|
+
imageUrls: z.array(z.string()),
|
|
10
|
+
styleId: z.string().optional(),
|
|
11
|
+
roomTypeId: z.string().optional(),
|
|
12
|
+
}),
|
|
13
|
+
});
|
|
14
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
15
|
+
|
|
16
|
+
export const ResponseSchema = z.object({
|
|
17
|
+
data: ToolJobSchema,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { InteriorDesignJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace RetryInteriorDesignJobCommand {
|
|
5
|
+
export const RequestParamsSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
9
|
+
|
|
10
|
+
export const RequestBodySchema = z.object({
|
|
11
|
+
modelId: z.string().uuid().optional(),
|
|
12
|
+
prompt: z.string().optional(),
|
|
13
|
+
params: z
|
|
14
|
+
.object({
|
|
15
|
+
attachedFiles: z.string().array(),
|
|
16
|
+
styleId: z.string().optional(),
|
|
17
|
+
roomTypeId: z.string().optional(),
|
|
18
|
+
})
|
|
19
|
+
.optional(),
|
|
20
|
+
});
|
|
21
|
+
export type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
22
|
+
|
|
23
|
+
export const ResponseSchema = z.object({
|
|
24
|
+
data: InteriorDesignJobSchema,
|
|
25
|
+
});
|
|
26
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { InteriorDesignJobSchema } from '../../../models';
|
|
3
|
+
import { USER_REACTION } from '../../../constants';
|
|
4
|
+
|
|
5
|
+
export namespace SetReactionToInteriorDesignJobCommand {
|
|
6
|
+
export const RequestSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
9
|
+
dislikeReason: z.string().nullable().default(null),
|
|
10
|
+
})
|
|
11
|
+
.refine(
|
|
12
|
+
(data) => {
|
|
13
|
+
if (data.reaction !== USER_REACTION.DISLIKED && data.dislikeReason) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
return true;
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
message: 'Dislike reason is not allowed when reaction is not DISLIKED',
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
23
|
+
|
|
24
|
+
export const RequestParamsSchema = z.object({
|
|
25
|
+
uuid: z.string().uuid(),
|
|
26
|
+
});
|
|
27
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
28
|
+
|
|
29
|
+
export const ResponseSchema = z.object({
|
|
30
|
+
data: InteriorDesignJobSchema,
|
|
31
|
+
});
|
|
32
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { InteriorDesignJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace UpdateInteriorDesignJobTitleCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
title: z.string().min(1).max(40).trim(),
|
|
7
|
+
});
|
|
8
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
9
|
+
|
|
10
|
+
export const RequestParamsSchema = z.object({
|
|
11
|
+
uuid: z.string().uuid(),
|
|
12
|
+
});
|
|
13
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = z.object({
|
|
16
|
+
data: InteriorDesignJobSchema,
|
|
17
|
+
});
|
|
18
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace DeleteMarketplaceCardJobByUUIDCommand {
|
|
4
|
+
export const RequestParamsSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
});
|
|
7
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = z.object({
|
|
10
|
+
data: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MarketplaceCardJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace ExecuteMarketplaceCardCommand {
|
|
5
|
+
export const RequestSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
title: z.string(),
|
|
8
|
+
subtitle: z.string().nullable().optional(),
|
|
9
|
+
advantages: z.array(z.string()),
|
|
10
|
+
tags: z.array(z.string()),
|
|
11
|
+
stylePresetId: z.string().uuid().nullable().optional(),
|
|
12
|
+
isCustom: z.boolean(),
|
|
13
|
+
customStylePrompt: z.string().nullable().optional(),
|
|
14
|
+
inputImages: z.array(z.string()),
|
|
15
|
+
backgroundDescription: z.string().nullable().optional(),
|
|
16
|
+
})
|
|
17
|
+
.superRefine((data, ctx) => {
|
|
18
|
+
const hasPreset = Boolean(data.stylePresetId);
|
|
19
|
+
const hasCustomPrompt = Boolean(data.customStylePrompt);
|
|
20
|
+
|
|
21
|
+
if (!hasPreset && !hasCustomPrompt) {
|
|
22
|
+
ctx.addIssue({
|
|
23
|
+
code: z.ZodIssueCode.custom,
|
|
24
|
+
message: 'customStylePrompt is required when stylePresetId is not provided',
|
|
25
|
+
path: ['customStylePrompt'],
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (data.isCustom && !hasCustomPrompt) {
|
|
30
|
+
ctx.addIssue({
|
|
31
|
+
code: z.ZodIssueCode.custom,
|
|
32
|
+
message: 'customStylePrompt is required when isCustom is true',
|
|
33
|
+
path: ['customStylePrompt'],
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!data.isCustom && hasCustomPrompt) {
|
|
38
|
+
ctx.addIssue({
|
|
39
|
+
code: z.ZodIssueCode.custom,
|
|
40
|
+
message: 'customStylePrompt must be empty when isCustom is false',
|
|
41
|
+
path: ['customStylePrompt'],
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
47
|
+
|
|
48
|
+
export const ResponseSchema = z.object({
|
|
49
|
+
data: MarketplaceCardJobSchema,
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MarketplaceCardJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace FindMarketplaceCardJobByUUIDCommand {
|
|
5
|
+
export const RequestParamsSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestParamsSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: MarketplaceCardJobSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MarketplaceCardJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace FindMarketplaceCardJobsCommand {
|
|
5
|
+
export const RequestQuerySchema = z.object({
|
|
6
|
+
limit: z.coerce.number().min(1).optional(),
|
|
7
|
+
offset: z.coerce.number().min(0).default(0).optional(),
|
|
8
|
+
title: z.string().optional(),
|
|
9
|
+
});
|
|
10
|
+
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
11
|
+
|
|
12
|
+
export const ResponseSchema = z.object({
|
|
13
|
+
data: z.array(MarketplaceCardJobSchema),
|
|
14
|
+
totalPages: z.number(),
|
|
15
|
+
page: z.number(),
|
|
16
|
+
});
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MarketplaceCardConfigSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetMarketplaceCardConfigCommand {
|
|
5
|
+
export const ResponseSchema = z.object({
|
|
6
|
+
data: MarketplaceCardConfigSchema,
|
|
7
|
+
});
|
|
8
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './execute-marketplace-card.command';
|
|
2
|
+
export * from './find-marketplace-card-job-by-uuid.command';
|
|
3
|
+
export * from './find-marketplace-card-jobs.command';
|
|
4
|
+
export * from './get-marketplace-card-config.command';
|
|
5
|
+
export * from './retry-marketplace-card-job.command';
|
|
6
|
+
export * from './set-reaction-to-marketplace-card.command';
|
|
7
|
+
export * from './delete-marketplace-card-by-uuid.command';
|
|
8
|
+
export * from './delete-all-marketplace-card-jobs.command';
|
|
9
|
+
export * from './update-marketplace-card-job-title.command';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MarketplaceCardJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace RetryMarketplaceCardJobCommand {
|
|
5
|
+
export const RequestParamsSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
9
|
+
|
|
10
|
+
export const RequestBodySchema = z
|
|
11
|
+
.object({
|
|
12
|
+
title: z.string(),
|
|
13
|
+
subtitle: z.string().nullable().optional(),
|
|
14
|
+
advantages: z.array(z.string()),
|
|
15
|
+
tags: z.array(z.string()),
|
|
16
|
+
stylePresetId: z.string().uuid().nullable().optional(),
|
|
17
|
+
isCustom: z.boolean(),
|
|
18
|
+
customStylePrompt: z.string().nullable().optional(),
|
|
19
|
+
inputImages: z.array(z.string()),
|
|
20
|
+
backgroundDescription: z.string().nullable().optional(),
|
|
21
|
+
})
|
|
22
|
+
.superRefine((data, ctx) => {
|
|
23
|
+
const hasPreset = Boolean(data.stylePresetId);
|
|
24
|
+
const hasCustomPrompt = Boolean(data.customStylePrompt);
|
|
25
|
+
|
|
26
|
+
if (!hasPreset && !hasCustomPrompt) {
|
|
27
|
+
ctx.addIssue({
|
|
28
|
+
code: z.ZodIssueCode.custom,
|
|
29
|
+
message: 'customStylePrompt is required when stylePresetId is not provided',
|
|
30
|
+
path: ['customStylePrompt'],
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (data.isCustom && !hasCustomPrompt) {
|
|
35
|
+
ctx.addIssue({
|
|
36
|
+
code: z.ZodIssueCode.custom,
|
|
37
|
+
message: 'customStylePrompt is required when isCustom is true',
|
|
38
|
+
path: ['customStylePrompt'],
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (!data.isCustom && hasCustomPrompt) {
|
|
43
|
+
ctx.addIssue({
|
|
44
|
+
code: z.ZodIssueCode.custom,
|
|
45
|
+
message: 'customStylePrompt must be empty when isCustom is false',
|
|
46
|
+
path: ['customStylePrompt'],
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
52
|
+
|
|
53
|
+
export const ResponseSchema = z.object({
|
|
54
|
+
data: MarketplaceCardJobSchema,
|
|
55
|
+
});
|
|
56
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
57
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MarketplaceCardJobSchema } from '../../../models';
|
|
3
|
+
import { USER_REACTION } from '../../../constants';
|
|
4
|
+
|
|
5
|
+
export namespace SetReactionToMarketplaceCardJobCommand {
|
|
6
|
+
export const RequestSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
9
|
+
dislikeReason: z.string().nullable().default(null),
|
|
10
|
+
})
|
|
11
|
+
.refine(
|
|
12
|
+
(data) => {
|
|
13
|
+
if (data.reaction !== USER_REACTION.DISLIKED && data.dislikeReason) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
return true;
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
message: 'Dislike reason is not allowed when reaction is not DISLIKED',
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
23
|
+
|
|
24
|
+
export const RequestParamsSchema = z.object({
|
|
25
|
+
uuid: z.string().uuid(),
|
|
26
|
+
});
|
|
27
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
28
|
+
|
|
29
|
+
export const ResponseSchema = z.object({
|
|
30
|
+
data: MarketplaceCardJobSchema,
|
|
31
|
+
});
|
|
32
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MarketplaceCardJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace UpdateMarketplaceCardJobTitleCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
title: z.string(),
|
|
7
|
+
});
|
|
8
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
9
|
+
|
|
10
|
+
export const RequestParamsSchema = z.object({
|
|
11
|
+
uuid: z.string().uuid(),
|
|
12
|
+
});
|
|
13
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = z.object({
|
|
16
|
+
data: MarketplaceCardJobSchema,
|
|
17
|
+
});
|
|
18
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace DeleteSolvingEduTaskJobByUUIDCommand {
|
|
4
|
+
export const RequestParamsSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
});
|
|
7
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = z.object({
|
|
10
|
+
data: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SolvingEduTaskJobSchema, ToolJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace FindSolvingEduTaskJobByUUIDCommand {
|
|
5
|
+
export const RequestParamsSchema = ToolJobSchema.pick({
|
|
6
|
+
uuid: true,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestParamsSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: SolvingEduTaskJobSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SolvingEduTaskJobSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace FindSolvingEduTaskJobsCommand {
|
|
5
|
+
export const RequestQuerySchema = z.object({
|
|
6
|
+
limit: z.coerce.number().min(1).optional(),
|
|
7
|
+
offset: z.coerce.number().min(0).default(0).optional(),
|
|
8
|
+
title: z.string().optional(),
|
|
9
|
+
});
|
|
10
|
+
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
11
|
+
|
|
12
|
+
export const ResponseSchema = z.object({
|
|
13
|
+
data: z.array(SolvingEduTaskJobSchema),
|
|
14
|
+
totalPages: z.number(),
|
|
15
|
+
page: z.number(),
|
|
16
|
+
});
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SolvingEduTaskConfigSchema } from '../../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetSolvingEduTaskToolConfigCommand {
|
|
5
|
+
export const ResponseSchema = z.object({
|
|
6
|
+
data: SolvingEduTaskConfigSchema,
|
|
7
|
+
});
|
|
8
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
9
|
+
}
|