@purpleschool/gptbot 0.8.56 → 0.8.57
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/ai-model.ts +0 -1
- package/api/controllers/http/ai-proxy.ts +5 -0
- package/api/controllers/http/b2b.ts +10 -0
- package/api/controllers/http/index.ts +2 -4
- package/api/controllers/http/page.ts +0 -1
- package/api/controllers/http/paraphrase.ts +0 -6
- package/api/controllers/http/payment.ts +0 -1
- package/api/controllers/http/presentation.ts +0 -1
- package/api/controllers/http/product.ts +1 -1
- package/api/controllers/http/referral.ts +1 -1
- package/api/controllers/http/review.ts +0 -1
- package/api/controllers/http/subscription.ts +1 -1
- package/api/controllers/http/ui-notification.ts +2 -2
- package/api/controllers/http/user-to-subscription.ts +0 -1
- package/api/controllers/http/user.ts +0 -2
- package/api/routes.ts +27 -141
- package/build/api/controllers/http/ai-model.js +0 -1
- package/build/api/controllers/http/ai-proxy.js +7 -0
- package/build/api/controllers/http/b2b.js +12 -0
- package/build/api/controllers/http/index.js +2 -4
- package/build/api/controllers/http/page.js +0 -1
- package/build/api/controllers/http/paraphrase.js +0 -6
- package/build/api/controllers/http/payment.js +0 -1
- package/build/api/controllers/http/presentation.js +0 -1
- package/build/api/controllers/http/product.js +1 -1
- package/build/api/controllers/http/referral.js +1 -1
- package/build/api/controllers/http/review.js +0 -1
- package/build/api/controllers/http/subscription.js +1 -1
- package/build/api/controllers/http/ui-notification.js +2 -2
- package/build/api/controllers/http/user-to-subscription.js +0 -1
- package/build/api/controllers/http/user.js +0 -2
- package/build/api/routes.js +27 -101
- package/build/commands/ai-model/index.js +0 -2
- package/build/commands/b2b/get-api-key.command.js +12 -0
- package/build/{constants/community/community-post-report/enums → commands/b2b}/index.js +5 -1
- package/build/commands/b2b/refresh-api-key.command.js +12 -0
- package/build/commands/b2b/send-image-request.command.js +24 -0
- package/build/commands/b2b/send-text-request.command.js +22 -0
- package/build/commands/b2b/submit-balance-top-up-form.command.js +19 -0
- package/build/commands/folder/find-folder-by-uuid-with-chats.command.js +0 -1
- package/build/commands/folder/find-folders-by-user.command.js +0 -1
- package/build/commands/index.js +1 -2
- package/build/commands/payment/check.command.js +1 -1
- package/build/commands/payment/index.js +0 -1
- package/build/commands/review/create-review.command.js +1 -1
- package/build/commands/review/find-reviews.command.js +1 -1
- package/build/commands/review/index.js +0 -2
- package/build/commands/subscription/create-custom-subscription-plan.command.js +1 -1
- package/build/commands/tools/image-editor/retry-image-editor-job.command.js +0 -10
- package/build/commands/tools/image-editor/set-reaction-to-image-editor-job.command.js +1 -11
- package/build/commands/tools/index.js +0 -1
- package/build/commands/tools/music/retry-music-job.command.js +0 -4
- package/build/commands/tools/music/set-reaction-to-music-job.command.js +1 -11
- package/build/commands/tools/paraphrase/index.js +1 -7
- package/build/commands/tools/presentation/index.js +0 -1
- package/build/commands/tools/stt/set-reaction-to-stt-job.command.js +1 -11
- package/build/commands/tools/tts/set-reaction-to-tts-job.command.js +1 -11
- package/build/commands/tools/video/retry-video-job.command.js +0 -5
- package/build/commands/tools/video/set-reaction-to-video-job.command.js +1 -11
- package/build/commands/tools/video-editor/retry-video-editor-job.command.js +0 -5
- package/build/commands/tools/video-editor/set-reaction-to-video-editor-job.command.js +1 -11
- package/build/commands/tools/writer/set-reaction.writer-document.command.js +1 -11
- package/build/commands/user/find-users-by-criteria.command.js +1 -1
- package/build/commands/user/get-me.command.js +0 -2
- package/build/commands/user/get-user-products.command.js +1 -1
- package/build/commands/user/get-user-subscriptions.command.js +1 -1
- package/build/commands/user/index.js +0 -2
- package/build/commands/user-to-subscription/index.js +0 -1
- package/build/commands/webmaster-click/get-webmaster-clicks-overview.command.js +6 -3
- package/build/constants/cloud-payments/index.js +1 -2
- package/build/constants/errors/errors.js +21 -257
- package/build/constants/form-submission/enums/form-type.enum.js +1 -0
- package/build/constants/index.js +0 -4
- package/build/constants/page/enums/page-type.enum.js +0 -1
- package/build/constants/payment/enums/index.js +0 -1
- package/build/constants/payment/enums/payment-status.enum.js +0 -1
- package/build/constants/presentation/enums/slide-content-type.enum.js +0 -1
- package/build/constants/presentation/maps/slide-layout-map.constant.js +0 -1
- package/build/constants/subscription/enums/subscription-feature-type.enum.js +0 -6
- package/build/constants/subscription/enums/subscription-status.enum.js +2 -2
- package/build/constants/tool/enums/index.js +0 -1
- package/build/constants/tool/enums/tool-job-status.enum.js +0 -1
- package/build/constants/tool-video/enums/video-pricing-rule-type.enum.js +0 -1
- package/build/helpers/index.js +0 -2
- package/build/helpers/video/calculate-video-price.helper.js +1 -5
- package/build/models/api-key.schema.js +15 -0
- package/build/models/index.js +1 -2
- package/build/models/order.schema.js +0 -1
- package/build/models/page.schema.js +1 -2
- package/build/models/payment.schema.js +2 -5
- package/build/models/review.schema.js +0 -2
- package/build/models/subscription-feature.schema.js +1 -27
- package/build/models/tool.schema.js +0 -3
- package/build/models/tools/image-editor/image-editor-config.schema.js +0 -1
- package/build/models/tools/image-editor/image-editor-job.schema.js +2 -11
- package/build/models/tools/image-editor/image-editor-model.schema.js +1 -9
- package/build/models/tools/index.js +0 -2
- package/build/models/tools/music/music-track.schema.js +0 -1
- package/build/models/tools/paraphrase/paraphrase-job.schema.js +0 -5
- package/build/models/tools/presentation/pptx-export-payload.schema.js +1 -34
- package/build/models/tools/presentation/slide-content-edit.schema.js +1 -18
- package/build/models/tools/presentation/slide-content.schema.js +1 -26
- package/build/models/tools/stt/stt-job.schema.js +0 -1
- package/build/models/tools/tts/tts-job.schema.js +0 -1
- package/build/models/tools/video/video-job.schema.js +0 -2
- package/build/models/tools/video/video-model.schema.js +1 -8
- package/build/models/tools/video-editor/video-editor-job.schema.js +0 -1
- package/build/models/tools/writer/writer-document-outline.schema.js +2 -1
- package/build/models/webmaster-click.schema.js +2 -2
- package/commands/ai-model/index.ts +0 -2
- package/commands/{community/get-count-of-likes-on-my-posts.command.ts → b2b/get-api-key.command.ts} +4 -2
- package/commands/b2b/index.ts +5 -0
- package/commands/{tools/image-generation/delete-all-image-generation-jobs.command.ts → b2b/refresh-api-key.command.ts} +5 -2
- package/commands/b2b/send-image-request.command.ts +28 -0
- package/commands/b2b/send-text-request.command.ts +26 -0
- package/commands/b2b/submit-balance-top-up-form.command.ts +20 -0
- package/commands/folder/find-folder-by-uuid-with-chats.command.ts +0 -1
- package/commands/folder/find-folders-by-user.command.ts +0 -1
- package/commands/index.ts +1 -2
- package/commands/payment/check.command.ts +1 -1
- package/commands/payment/index.ts +0 -1
- package/commands/review/create-review.command.ts +1 -1
- package/commands/review/find-reviews.command.ts +1 -1
- package/commands/review/index.ts +0 -2
- package/commands/subscription/create-custom-subscription-plan.command.ts +1 -1
- package/commands/tools/image-editor/retry-image-editor-job.command.ts +1 -13
- package/commands/tools/image-editor/set-reaction-to-image-editor-job.command.ts +3 -16
- package/commands/tools/index.ts +0 -1
- package/commands/tools/music/retry-music-job.command.ts +1 -7
- package/commands/tools/music/set-reaction-to-music-job.command.ts +3 -16
- package/commands/tools/paraphrase/index.ts +1 -7
- package/commands/tools/presentation/index.ts +0 -1
- package/commands/tools/stt/set-reaction-to-stt-job.command.ts +3 -16
- package/commands/tools/tts/set-reaction-to-tts-job.command.ts +3 -16
- package/commands/tools/video/retry-video-job.command.ts +1 -8
- package/commands/tools/video/set-reaction-to-video-job.command.ts +3 -16
- package/commands/tools/video-editor/retry-video-editor-job.command.ts +0 -7
- package/commands/tools/video-editor/set-reaction-to-video-editor-job.command.ts +3 -16
- package/commands/tools/writer/set-reaction.writer-document.command.ts +3 -16
- package/commands/user/find-users-by-criteria.command.ts +1 -1
- package/commands/user/get-me.command.ts +0 -2
- package/commands/user/get-user-products.command.ts +2 -2
- package/commands/user/get-user-subscriptions.command.ts +2 -2
- package/commands/user/index.ts +0 -2
- package/commands/user-to-subscription/index.ts +0 -1
- package/commands/webmaster-click/get-webmaster-clicks-overview.command.ts +8 -3
- package/constants/cloud-payments/index.ts +0 -2
- package/constants/errors/errors.ts +21 -258
- package/constants/form-submission/enums/form-type.enum.ts +1 -0
- package/constants/index.ts +0 -4
- package/constants/page/enums/page-type.enum.ts +0 -1
- package/constants/payment/enums/index.ts +0 -1
- package/constants/payment/enums/payment-status.enum.ts +0 -1
- package/constants/presentation/enums/slide-content-type.enum.ts +0 -1
- package/constants/presentation/maps/slide-layout-map.constant.ts +0 -1
- package/constants/subscription/enums/subscription-feature-type.enum.ts +0 -6
- package/constants/subscription/enums/subscription-status.enum.ts +2 -2
- package/constants/tool/enums/index.ts +0 -1
- package/constants/tool/enums/tool-job-status.enum.ts +0 -1
- package/constants/tool-video/enums/video-pricing-rule-type.enum.ts +0 -1
- package/helpers/index.ts +0 -2
- package/helpers/video/calculate-video-price.helper.ts +1 -7
- package/models/api-key.schema.ts +10 -0
- package/models/index.ts +1 -2
- package/models/order.schema.ts +0 -1
- package/models/page.schema.ts +1 -2
- package/models/payment.schema.ts +1 -5
- package/models/review.schema.ts +0 -2
- package/models/subscription-feature.schema.ts +0 -34
- package/models/tool.schema.ts +0 -3
- package/models/tools/image-editor/image-editor-config.schema.ts +0 -1
- package/models/tools/image-editor/image-editor-job.schema.ts +2 -13
- package/models/tools/image-editor/image-editor-model.schema.ts +0 -16
- package/models/tools/index.ts +0 -2
- package/models/tools/music/music-track.schema.ts +0 -1
- package/models/tools/paraphrase/paraphrase-job.schema.ts +0 -5
- package/models/tools/presentation/pptx-export-payload.schema.ts +0 -34
- package/models/tools/presentation/slide-content-edit.schema.ts +0 -21
- package/models/tools/presentation/slide-content.schema.ts +0 -45
- package/models/tools/stt/stt-job.schema.ts +0 -1
- package/models/tools/tts/tts-job.schema.ts +0 -1
- package/models/tools/video/video-job.schema.ts +0 -2
- package/models/tools/video/video-model.schema.ts +1 -8
- package/models/tools/video-editor/video-editor-job.schema.ts +0 -1
- package/models/tools/writer/writer-document-outline.schema.ts +2 -1
- package/models/webmaster-click.schema.ts +2 -2
- package/package.json +1 -1
- package/api/controllers/http/community.ts +0 -25
- package/api/controllers/http/image-generation.ts +0 -14
- package/api/controllers/http/kie.ts +0 -5
- package/api/controllers/http/user-profile.ts +0 -8
- package/build/api/controllers/http/community.js +0 -25
- package/build/api/controllers/http/image-generation.js +0 -16
- package/build/api/controllers/http/kie.js +0 -7
- package/build/api/controllers/http/user-profile.js +0 -10
- package/build/commands/ai-model/find-formatted-ai-model-v2.command.js +0 -23
- package/build/commands/ai-model/find-model-pages.command.js +0 -31
- package/build/commands/community/archive-community-post.command.js +0 -13
- package/build/commands/community/create-community-post.command.js +0 -34
- package/build/commands/community/delete-community-post.command.js +0 -13
- package/build/commands/community/get-all-community-posts-by-criteria.command.js +0 -25
- package/build/commands/community/get-community-post-by-uuid.command.js +0 -14
- package/build/commands/community/get-count-of-likes-on-my-posts.command.js +0 -10
- package/build/commands/community/get-my-community-posts-by-criteria.command.js +0 -32
- package/build/commands/community/get-my-favorite-community-posts.command.js +0 -19
- package/build/commands/community/get-my-likes-community-posts.command.js +0 -19
- package/build/commands/community/index.js +0 -29
- package/build/commands/community/send-report-to-community-post.command.js +0 -15
- package/build/commands/community/set-favorite-community-post.command.js +0 -13
- package/build/commands/community/set-like-community-post.command.js +0 -14
- package/build/commands/community/share-my-community-post.command.js +0 -13
- package/build/commands/payment/refund-payment.command.js +0 -15
- package/build/commands/review/find-all-reviews.command.js +0 -20
- package/build/commands/review/get-review-count.command.js +0 -15
- package/build/commands/tools/image-generation/delete-all-image-generation-jobs.command.js +0 -10
- package/build/commands/tools/image-generation/delete-image-generation-job-by-uuid.command.js +0 -13
- package/build/commands/tools/image-generation/find-image-generation-job-by-uuid.command.js +0 -14
- package/build/commands/tools/image-generation/find-image-generation-jobs.command.js +0 -18
- package/build/commands/tools/image-generation/get-image-generation-config.command.js +0 -11
- package/build/commands/tools/image-generation/image-generation.command.js +0 -23
- package/build/commands/tools/image-generation/index.js +0 -24
- package/build/commands/tools/image-generation/set-reaction-to-image-generation-job.command.js +0 -28
- package/build/commands/tools/image-generation/update-image-generation-job-title.command.js +0 -17
- package/build/commands/tools/paraphrase/delete-all-paraphrase-jobs.command.js +0 -8
- package/build/commands/tools/paraphrase/delete-paraphrase-job-by-uuid.command.js +0 -11
- package/build/commands/tools/paraphrase/find-paraphrase-jobs.command.js +0 -18
- package/build/commands/tools/paraphrase/retry-paraphrase-job.command.js +0 -14
- package/build/commands/tools/paraphrase/set-reaction-to-paraphrase-job.command.js +0 -28
- package/build/commands/tools/paraphrase/update-paraphrase-job-title.command.js +0 -17
- package/build/commands/tools/presentation/set-reaction-to-presentation.command.js +0 -28
- package/build/commands/user/cancel-user-subscription.command.js +0 -21
- package/build/commands/user/get-user-payments.command.js +0 -26
- package/build/commands/user-profile/delete-avatar.command.js +0 -12
- package/build/commands/user-profile/get-user-profile-by-user-id.command.js +0 -14
- package/build/commands/user-profile/index.js +0 -20
- package/build/commands/user-profile/update-profile.command.js +0 -14
- package/build/commands/user-profile/upload-avatar.command.js +0 -11
- package/build/commands/user-to-subscription/delete-user-to-subscription.command.js +0 -16
- package/build/constants/community/community-post-report/enums/community-post-report-reason.enum.js +0 -18
- package/build/constants/community/community-post-report/index.js +0 -17
- package/build/constants/community/default-pagination.constant.js +0 -6
- package/build/constants/community/enums/community-aspect-ratio.enum.js +0 -11
- package/build/constants/community/enums/community-post-visibility.enum.js +0 -8
- package/build/constants/community/enums/community-status.enum.js +0 -11
- package/build/constants/community/enums/community-tool-type.enum.js +0 -10
- package/build/constants/community/enums/community-type.enum.js +0 -11
- package/build/constants/community/enums/index.js +0 -21
- package/build/constants/community/index.js +0 -19
- package/build/constants/model/enums/index.js +0 -17
- package/build/constants/model/enums/unified-model-content-type.enum.js +0 -21
- package/build/constants/model/index.js +0 -17
- package/build/constants/payment/enums/payment-sort-by.enum.js +0 -10
- package/build/constants/tool/enums/tool-content-type.enum.js +0 -17
- package/build/constants/tool-image-generation/enums/image-generation-resolution.enum.js +0 -9
- package/build/constants/tool-image-generation/enums/index.js +0 -17
- package/build/constants/tool-image-generation/index.js +0 -17
- package/build/constants/user-profile/index.js +0 -17
- package/build/constants/user-profile/user-profile.constant.js +0 -10
- package/build/helpers/image-editor/calculate-image-editor-price.helper.js +0 -13
- package/build/helpers/image-editor/index.js +0 -17
- package/build/helpers/image-generation/calculate-image-generation-price.helper.js +0 -16
- package/build/helpers/image-generation/index.js +0 -17
- package/build/models/community/community-post-media-data.schema.js +0 -53
- package/build/models/community/community-post-report/community-post-report.schema.js +0 -13
- package/build/models/community/community-post-report/index.js +0 -17
- package/build/models/community/community-post.schema.js +0 -44
- package/build/models/community/index.js +0 -19
- package/build/models/tools/common/attached-tool-file.schema.js +0 -13
- package/build/models/tools/common/index.js +0 -17
- package/build/models/tools/image-generation/image-generation-config.schema.js +0 -23
- package/build/models/tools/image-generation/image-generation-job.schema.js +0 -35
- package/build/models/tools/image-generation/image-generation-model.schema.js +0 -41
- package/build/models/tools/image-generation/index.js +0 -19
- package/build/models/user-profile.schema.js +0 -16
- package/commands/ai-model/find-formatted-ai-model-v2.command.ts +0 -23
- package/commands/ai-model/find-model-pages.command.ts +0 -34
- package/commands/community/archive-community-post.command.ts +0 -13
- package/commands/community/create-community-post.command.ts +0 -40
- package/commands/community/delete-community-post.command.ts +0 -13
- package/commands/community/get-all-community-posts-by-criteria.command.ts +0 -29
- package/commands/community/get-community-post-by-uuid.command.ts +0 -16
- package/commands/community/get-my-community-posts-by-criteria.command.ts +0 -40
- package/commands/community/get-my-favorite-community-posts.command.ts +0 -19
- package/commands/community/get-my-likes-community-posts.command.ts +0 -19
- package/commands/community/index.ts +0 -13
- package/commands/community/send-report-to-community-post.command.ts +0 -17
- package/commands/community/set-favorite-community-post.command.ts +0 -13
- package/commands/community/set-like-community-post.command.ts +0 -14
- package/commands/community/share-my-community-post.command.ts +0 -13
- package/commands/payment/refund-payment.command.ts +0 -17
- package/commands/review/find-all-reviews.command.ts +0 -19
- package/commands/review/get-review-count.command.ts +0 -13
- package/commands/tools/image-generation/delete-image-generation-job-by-uuid.command.ts +0 -13
- package/commands/tools/image-generation/find-image-generation-job-by-uuid.command.ts +0 -16
- package/commands/tools/image-generation/find-image-generation-jobs.command.ts +0 -18
- package/commands/tools/image-generation/get-image-generation-config.command.ts +0 -9
- package/commands/tools/image-generation/image-generation.command.ts +0 -25
- package/commands/tools/image-generation/index.ts +0 -8
- package/commands/tools/image-generation/set-reaction-to-image-generation-job.command.ts +0 -33
- package/commands/tools/image-generation/update-image-generation-job-title.command.ts +0 -19
- package/commands/tools/paraphrase/delete-all-paraphrase-jobs.command.ts +0 -6
- package/commands/tools/paraphrase/delete-paraphrase-job-by-uuid.command.ts +0 -11
- package/commands/tools/paraphrase/find-paraphrase-jobs.command.ts +0 -18
- package/commands/tools/paraphrase/retry-paraphrase-job.command.ts +0 -14
- package/commands/tools/paraphrase/set-reaction-to-paraphrase-job.command.ts +0 -33
- package/commands/tools/paraphrase/update-paraphrase-job-title.command.ts +0 -19
- package/commands/tools/presentation/set-reaction-to-presentation.command.ts +0 -33
- package/commands/user/cancel-user-subscription.command.ts +0 -21
- package/commands/user/get-user-payments.command.ts +0 -27
- package/commands/user-profile/delete-avatar.command.ts +0 -14
- package/commands/user-profile/get-user-profile-by-user-id.command.ts +0 -16
- package/commands/user-profile/index.ts +0 -4
- package/commands/user-profile/update-profile.command.ts +0 -16
- package/commands/user-profile/upload-avatar.command.ts +0 -10
- package/commands/user-to-subscription/delete-user-to-subscription.command.ts +0 -18
- package/constants/community/community-post-report/enums/community-post-report-reason.enum.ts +0 -14
- package/constants/community/community-post-report/enums/index.ts +0 -1
- package/constants/community/community-post-report/index.ts +0 -1
- package/constants/community/default-pagination.constant.ts +0 -4
- package/constants/community/enums/community-aspect-ratio.enum.ts +0 -7
- package/constants/community/enums/community-post-visibility.enum.ts +0 -4
- package/constants/community/enums/community-status.enum.ts +0 -7
- package/constants/community/enums/community-tool-type.enum.ts +0 -6
- package/constants/community/enums/community-type.enum.ts +0 -7
- package/constants/community/enums/index.ts +0 -5
- package/constants/community/index.ts +0 -3
- package/constants/model/enums/index.ts +0 -1
- package/constants/model/enums/unified-model-content-type.enum.ts +0 -17
- package/constants/model/index.ts +0 -1
- package/constants/payment/enums/payment-sort-by.enum.ts +0 -6
- package/constants/tool/enums/tool-content-type.enum.ts +0 -13
- package/constants/tool-image-generation/enums/image-generation-resolution.enum.ts +0 -5
- package/constants/tool-image-generation/enums/index.ts +0 -1
- package/constants/tool-image-generation/index.ts +0 -1
- package/constants/user-profile/index.ts +0 -1
- package/constants/user-profile/user-profile.constant.ts +0 -14
- package/helpers/image-editor/calculate-image-editor-price.helper.ts +0 -23
- package/helpers/image-editor/index.ts +0 -1
- package/helpers/image-generation/calculate-image-generation-price.helper.ts +0 -29
- package/helpers/image-generation/index.ts +0 -1
- package/models/community/community-post-media-data.schema.ts +0 -65
- package/models/community/community-post-report/community-post-report.schema.ts +0 -11
- package/models/community/community-post-report/index.ts +0 -1
- package/models/community/community-post.schema.ts +0 -48
- package/models/community/index.ts +0 -3
- package/models/tools/common/attached-tool-file.schema.ts +0 -13
- package/models/tools/common/index.ts +0 -1
- package/models/tools/image-generation/image-generation-config.schema.ts +0 -29
- package/models/tools/image-generation/image-generation-job.schema.ts +0 -42
- package/models/tools/image-generation/image-generation-model.schema.ts +0 -52
- package/models/tools/image-generation/index.ts +0 -3
- package/models/user-profile.schema.ts +0 -15
|
@@ -4,7 +4,6 @@ exports.TOOL_JOB_STATUS = void 0;
|
|
|
4
4
|
var TOOL_JOB_STATUS;
|
|
5
5
|
(function (TOOL_JOB_STATUS) {
|
|
6
6
|
TOOL_JOB_STATUS["PENDING"] = "pending";
|
|
7
|
-
TOOL_JOB_STATUS["PROCESSING"] = "processing";
|
|
8
7
|
TOOL_JOB_STATUS["COMPLETED"] = "completed";
|
|
9
8
|
TOOL_JOB_STATUS["FAILED"] = "failed";
|
|
10
9
|
})(TOOL_JOB_STATUS || (exports.TOOL_JOB_STATUS = TOOL_JOB_STATUS = {}));
|
|
@@ -4,5 +4,4 @@ exports.VIDEO_PRICING_RULE_TYPE = void 0;
|
|
|
4
4
|
var VIDEO_PRICING_RULE_TYPE;
|
|
5
5
|
(function (VIDEO_PRICING_RULE_TYPE) {
|
|
6
6
|
VIDEO_PRICING_RULE_TYPE["FLAT"] = "flat";
|
|
7
|
-
VIDEO_PRICING_RULE_TYPE["PER_SECOND"] = "per_second";
|
|
8
7
|
})(VIDEO_PRICING_RULE_TYPE || (exports.VIDEO_PRICING_RULE_TYPE = VIDEO_PRICING_RULE_TYPE = {}));
|
package/build/helpers/index.js
CHANGED
|
@@ -22,5 +22,3 @@ __exportStar(require("./tts"), exports);
|
|
|
22
22
|
__exportStar(require("./video"), exports);
|
|
23
23
|
__exportStar(require("./video-editor"), exports);
|
|
24
24
|
__exportStar(require("./writer"), exports);
|
|
25
|
-
__exportStar(require("./image-editor"), exports);
|
|
26
|
-
__exportStar(require("./image-generation"), exports);
|
|
@@ -17,11 +17,7 @@ function matchesCondition(condition, params) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
function calculateVideoGenerationPrice({ pricePerSecond, params, rules, }) {
|
|
20
|
-
const
|
|
21
|
-
.filter((r) => r.type === constants_1.VIDEO_PRICING_RULE_TYPE.PER_SECOND)
|
|
22
|
-
.find((r) => matchesCondition(r.condition, params));
|
|
23
|
-
const effectivePricePerSecond = perSecondRule ? perSecondRule.value : pricePerSecond;
|
|
24
|
-
const base = effectivePricePerSecond * params.duration;
|
|
20
|
+
const base = pricePerSecond * params.duration;
|
|
25
21
|
const flatMarkup = rules.reduce((sum, r) => {
|
|
26
22
|
if (r.type !== constants_1.VIDEO_PRICING_RULE_TYPE.FLAT) {
|
|
27
23
|
return sum;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ApiKeySchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.ApiKeySchema = zod_1.default.object({
|
|
9
|
+
uuid: zod_1.default.string().uuid(),
|
|
10
|
+
userId: zod_1.default.string().uuid(),
|
|
11
|
+
key: zod_1.default.string(),
|
|
12
|
+
isActive: zod_1.default.boolean(),
|
|
13
|
+
createdAt: zod_1.default.date(),
|
|
14
|
+
updatedAt: zod_1.default.date(),
|
|
15
|
+
});
|
package/build/models/index.js
CHANGED
|
@@ -70,5 +70,4 @@ __exportStar(require("./webmaster.schema"), exports);
|
|
|
70
70
|
__exportStar(require("./webmaster-balance.schema"), exports);
|
|
71
71
|
__exportStar(require("./user-referrals.schema"), exports);
|
|
72
72
|
__exportStar(require("./webmaster-click.schema"), exports);
|
|
73
|
-
__exportStar(require("./
|
|
74
|
-
__exportStar(require("./user-profile.schema"), exports);
|
|
73
|
+
__exportStar(require("./api-key.schema"), exports);
|
|
@@ -10,7 +10,6 @@ exports.OrderSchema = zod_1.z.object({
|
|
|
10
10
|
productId: zod_1.z.nullable(zod_1.z.string().uuid()),
|
|
11
11
|
subscriptionId: zod_1.z.nullable(zod_1.z.string().uuid()),
|
|
12
12
|
sum: zod_1.z.number(),
|
|
13
|
-
description: zod_1.z.string(),
|
|
14
13
|
createdAt: zod_1.z.date(),
|
|
15
14
|
updatedAt: zod_1.z.date(),
|
|
16
15
|
});
|
|
@@ -15,8 +15,7 @@ exports.PageSchema = zod_1.z.object({
|
|
|
15
15
|
aIModelId: zod_1.z.string().uuid().nullable().optional(),
|
|
16
16
|
toolId: zod_1.z.string().uuid().nullable().optional(),
|
|
17
17
|
toolOptionId: zod_1.z.string().uuid().nullable().optional(),
|
|
18
|
-
|
|
19
|
-
toolTitle: zod_1.z.string().optional().nullable(),
|
|
18
|
+
toolTitle: zod_1.z.string().nullable(),
|
|
20
19
|
type: zod_1.z.nativeEnum(constants_1.PageType),
|
|
21
20
|
createdAt: zod_1.z.date(),
|
|
22
21
|
updatedAt: zod_1.z.date(),
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PaymentSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.PaymentSchema = zod_1.z.object({
|
|
6
6
|
uuid: zod_1.z.string().uuid(),
|
|
7
7
|
link: zod_1.z.nullable(zod_1.z.string()),
|
|
8
|
-
status: zod_1.z.
|
|
8
|
+
status: zod_1.z.boolean(),
|
|
9
9
|
sum: zod_1.z.number(),
|
|
10
10
|
orderId: zod_1.z.string().uuid(),
|
|
11
11
|
createdAt: zod_1.z.date(),
|
|
12
12
|
updatedAt: zod_1.z.date(),
|
|
13
13
|
});
|
|
14
|
-
exports.PaymentWithDescriptionSchema = exports.PaymentSchema.extend({
|
|
15
|
-
description: zod_1.z.string(),
|
|
16
|
-
});
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ReviewSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const constants_1 = require("../constants");
|
|
6
5
|
exports.ReviewSchema = zod_1.z.object({
|
|
7
6
|
uuid: zod_1.z.string().uuid(),
|
|
8
7
|
email: zod_1.z.string().email(),
|
|
9
8
|
name: zod_1.z.string(),
|
|
10
9
|
text: zod_1.z.string(),
|
|
11
10
|
rating: zod_1.z.number().int().step(1).min(0).max(5),
|
|
12
|
-
status: zod_1.z.nativeEnum(constants_1.REVIEW_STATUS),
|
|
13
11
|
createdAt: zod_1.z.date(),
|
|
14
12
|
updatedAt: zod_1.z.date(),
|
|
15
13
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscriptionFeatureSchema = exports.
|
|
3
|
+
exports.SubscriptionFeatureSchema = exports.MusicModelAccessFeatureSchema = exports.MusicQuotaFeatureSchema = exports.PresentationQuotaFeatureSchema = exports.VideoModelAccessFeatureSchema = exports.VideoQuotaFeatureSchema = exports.STTQuotaFeatureSchema = exports.STTModelAccessFeatureSchema = exports.TTSQuotaFeatureSchema = exports.ImageGenerationQuotaFeatureSchema = exports.TtsModelAccessFeatureSchema = exports.AdvancedToolsAccessFeatureSchema = exports.WebSearchFeatureSchema = exports.ExtendedContextFeatureSchema = exports.MaxInputLengthFeatureSchema = exports.RequestsQuotaFeatureSchema = exports.AiModelAccessFeatureSchema = exports.CarryoverBalanceFeatureSchema = exports.TokensFeatureSchema = exports.SubscriptionFeatureBaseSchema = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
exports.SubscriptionFeatureBaseSchema = zod_1.z.object({
|
|
@@ -121,28 +121,6 @@ exports.MusicModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.ex
|
|
|
121
121
|
isAvailable: zod_1.z.boolean(),
|
|
122
122
|
modelId: zod_1.z.string(),
|
|
123
123
|
});
|
|
124
|
-
exports.WriterQuotaFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
125
|
-
kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.WRITER),
|
|
126
|
-
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.WRITER_QUOTA),
|
|
127
|
-
value: zod_1.z.number(),
|
|
128
|
-
});
|
|
129
|
-
exports.WriterModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
130
|
-
kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.WRITER),
|
|
131
|
-
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.WRITER_MODEL_ACCESS),
|
|
132
|
-
isAvailable: zod_1.z.boolean(),
|
|
133
|
-
modelId: zod_1.z.string(),
|
|
134
|
-
});
|
|
135
|
-
exports.ImageEditorQuotaFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
136
|
-
kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.IMAGE_EDITOR),
|
|
137
|
-
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.IMAGE_EDITOR_QUOTA),
|
|
138
|
-
value: zod_1.z.number(),
|
|
139
|
-
});
|
|
140
|
-
exports.ImageEditorModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
141
|
-
kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.IMAGE_EDITOR),
|
|
142
|
-
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.IMAGE_EDITOR_MODEL_ACCESS),
|
|
143
|
-
isAvailable: zod_1.z.boolean(),
|
|
144
|
-
modelId: zod_1.z.string(),
|
|
145
|
-
});
|
|
146
124
|
exports.SubscriptionFeatureSchema = zod_1.z.union([
|
|
147
125
|
exports.AiModelAccessFeatureSchema,
|
|
148
126
|
exports.RequestsQuotaFeatureSchema,
|
|
@@ -162,8 +140,4 @@ exports.SubscriptionFeatureSchema = zod_1.z.union([
|
|
|
162
140
|
exports.CarryoverBalanceFeatureSchema,
|
|
163
141
|
exports.MusicQuotaFeatureSchema,
|
|
164
142
|
exports.MusicModelAccessFeatureSchema,
|
|
165
|
-
exports.WriterQuotaFeatureSchema,
|
|
166
|
-
exports.WriterModelAccessFeatureSchema,
|
|
167
|
-
exports.ImageEditorQuotaFeatureSchema,
|
|
168
|
-
exports.ImageEditorModelAccessFeatureSchema,
|
|
169
143
|
]);
|
|
@@ -8,9 +8,6 @@ exports.ToolSchema = zod_1.z.object({
|
|
|
8
8
|
title: zod_1.z.string(),
|
|
9
9
|
description: zod_1.z.string(),
|
|
10
10
|
icon: zod_1.z.string(),
|
|
11
|
-
alias: zod_1.z.string(),
|
|
12
|
-
bgColor: zod_1.z.string(),
|
|
13
|
-
iconColor: zod_1.z.string(),
|
|
14
11
|
order: zod_1.z.number(),
|
|
15
12
|
contentType: zod_1.z.string(),
|
|
16
13
|
});
|
|
@@ -4,24 +4,15 @@ exports.ImageEditorJobSchema = exports.ImageEditorJobParamsSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
6
|
const tool_job_schema_1 = require("../../tool-job.schema");
|
|
7
|
-
const file_schema_1 = require("../../file.schema");
|
|
8
|
-
const common_1 = require("../common");
|
|
9
7
|
exports.ImageEditorJobParamsSchema = zod_1.z.object({
|
|
10
|
-
|
|
8
|
+
imageUrls: zod_1.z.array(zod_1.z.string()).optional(),
|
|
11
9
|
systemPromptId: zod_1.z.string().optional(),
|
|
12
|
-
imageUrls: zod_1.z.string().array().optional(),
|
|
13
10
|
});
|
|
14
11
|
exports.ImageEditorJobSchema = tool_job_schema_1.ToolJobSchema.extend({
|
|
15
12
|
title: zod_1.z.string(),
|
|
16
13
|
prompt: zod_1.z.string(),
|
|
17
14
|
reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
|
|
18
|
-
imageUrls: zod_1.z.string().
|
|
19
|
-
images: zod_1.z
|
|
20
|
-
.array(file_schema_1.FileSchema.pick({
|
|
21
|
-
uuid: true,
|
|
22
|
-
url: true,
|
|
23
|
-
}))
|
|
24
|
-
.nullable(),
|
|
15
|
+
imageUrls: zod_1.z.array(zod_1.z.string()).nullable(),
|
|
25
16
|
params: exports.ImageEditorJobParamsSchema,
|
|
26
17
|
modelId: zod_1.z.string(),
|
|
27
18
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ImageEditorModelSchema = exports.
|
|
3
|
+
exports.ImageEditorModelSchema = exports.ImageEditorModelParamsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const icon_variants_schema_1 = require("../../icon-variants.schema");
|
|
6
6
|
const unlocked_by_subscription_schema_1 = require("../../unlocked-by-subscription.schema");
|
|
@@ -11,13 +11,6 @@ exports.ImageEditorModelParamsSchema = zod_1.z.object({
|
|
|
11
11
|
acceptedTypes: zod_1.z.array(zod_1.z.string()),
|
|
12
12
|
}),
|
|
13
13
|
});
|
|
14
|
-
exports.ImageEditorModelPricingRuleConditionSchema = zod_1.z.object({
|
|
15
|
-
withoutSub: zod_1.z.boolean().optional(),
|
|
16
|
-
});
|
|
17
|
-
exports.ImageEditorModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
|
|
18
|
-
condition: exports.ImageEditorModelPricingRuleConditionSchema,
|
|
19
|
-
value: zod_1.z.number(),
|
|
20
|
-
}));
|
|
21
14
|
exports.ImageEditorModelSchema = zod_1.z.object({
|
|
22
15
|
uuid: zod_1.z.string(),
|
|
23
16
|
title: zod_1.z.string(),
|
|
@@ -27,7 +20,6 @@ exports.ImageEditorModelSchema = zod_1.z.object({
|
|
|
27
20
|
icons: icon_variants_schema_1.IconVariantsSchema,
|
|
28
21
|
maxInputLength: zod_1.z.number(),
|
|
29
22
|
params: exports.ImageEditorModelParamsSchema,
|
|
30
|
-
pricingRules: exports.ImageEditorModelPricingRulesSchema,
|
|
31
23
|
unlockedBy: unlocked_by_subscription_schema_1.UnlockedBySchema.nullable(),
|
|
32
24
|
canUse: zod_1.z.boolean(),
|
|
33
25
|
});
|
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./common"), exports);
|
|
18
17
|
__exportStar(require("./language"), exports);
|
|
19
18
|
__exportStar(require("./paraphrase"), exports);
|
|
20
19
|
__exportStar(require("./presentation"), exports);
|
|
@@ -25,4 +24,3 @@ __exportStar(require("./writer"), exports);
|
|
|
25
24
|
__exportStar(require("./image-editor"), exports);
|
|
26
25
|
__exportStar(require("./video-editor"), exports);
|
|
27
26
|
__exportStar(require("./music"), exports);
|
|
28
|
-
__exportStar(require("./image-generation"), exports);
|
|
@@ -8,7 +8,6 @@ exports.MusicTrackSchema = zod_1.z.object({
|
|
|
8
8
|
audioId: zod_1.z.string(),
|
|
9
9
|
audioUrl: zod_1.z.string(),
|
|
10
10
|
coverUrl: zod_1.z.string(),
|
|
11
|
-
prompt: zod_1.z.string().nullable(),
|
|
12
11
|
tags: zod_1.z.string(),
|
|
13
12
|
duration: zod_1.z.number(),
|
|
14
13
|
genJobId: zod_1.z.string().nullable().optional(),
|
|
@@ -3,14 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ParaphraseToolJobSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const tool_job_schema_1 = require("../../tool-job.schema");
|
|
6
|
-
const constants_1 = require("../../../constants");
|
|
7
6
|
exports.ParaphraseToolJobSchema = tool_job_schema_1.ToolJobSchema.extend({
|
|
8
7
|
styleId: zod_1.z.string().uuid().nullable().optional(),
|
|
9
8
|
modelId: zod_1.z.string().uuid().nullable().optional(),
|
|
10
9
|
userInput: zod_1.z.string(),
|
|
11
|
-
title: zod_1.z.string(),
|
|
12
|
-
typeId: zod_1.z.string(),
|
|
13
|
-
intensity: zod_1.z.nativeEnum(constants_1.PARAPHRASING_INTENSITY),
|
|
14
|
-
reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
|
|
15
10
|
aiOutput: zod_1.z.string().nullable().optional(),
|
|
16
11
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PPTXExportPayloadSchema = exports.PPTXSlideSchema = exports.SlideBackground = exports.PPTXShapeSchema = exports.
|
|
3
|
+
exports.PPTXExportPayloadSchema = exports.PPTXSlideSchema = exports.SlideBackground = exports.PPTXShapeSchema = exports.PPTXTableShapeSchema = exports.PPTXTableRowSchema = exports.PPTXTableCellSchema = exports.PPTXCustomShapeSchema = exports.PPTXPictureBoxSchema = exports.PPTXTextBoxSchema = exports.PPTXParagraphSchema = exports.PPTXFontSchema = exports.PPTXPositionSchema = exports.PPTXMarginSchema = exports.PPTXFillSchema = exports.PPTXShadowSchema = exports.PPTX_CUSTOM_SHAPE_TYPE = exports.PPTX_SHADOW_TYPE = exports.PPTX_FILL_TYPE = exports.PPTX_BORDER_TYPE = exports.PPTX_OBJECT_FIT = exports.PPTX_V_ALIGN = exports.PPTX_H_ALIGN = exports.PPTX_SHAPE_TYPE = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
var PPTX_SHAPE_TYPE;
|
|
6
6
|
(function (PPTX_SHAPE_TYPE) {
|
|
@@ -8,22 +8,7 @@ var PPTX_SHAPE_TYPE;
|
|
|
8
8
|
PPTX_SHAPE_TYPE["PICTURE_BOX"] = "picture_box";
|
|
9
9
|
PPTX_SHAPE_TYPE["CUSTOM_SHAPE"] = "custom_shape";
|
|
10
10
|
PPTX_SHAPE_TYPE["TABLE"] = "table";
|
|
11
|
-
PPTX_SHAPE_TYPE["CHEVRON"] = "chevron";
|
|
12
11
|
})(PPTX_SHAPE_TYPE || (exports.PPTX_SHAPE_TYPE = PPTX_SHAPE_TYPE = {}));
|
|
13
|
-
var PPTX_CHEVRON_DIRECTION;
|
|
14
|
-
(function (PPTX_CHEVRON_DIRECTION) {
|
|
15
|
-
PPTX_CHEVRON_DIRECTION["RIGHT"] = "right";
|
|
16
|
-
PPTX_CHEVRON_DIRECTION["LEFT"] = "left";
|
|
17
|
-
PPTX_CHEVRON_DIRECTION["UP"] = "up";
|
|
18
|
-
PPTX_CHEVRON_DIRECTION["DOWN"] = "down";
|
|
19
|
-
})(PPTX_CHEVRON_DIRECTION || (exports.PPTX_CHEVRON_DIRECTION = PPTX_CHEVRON_DIRECTION = {}));
|
|
20
|
-
var PPTX_ARROW_TYPE;
|
|
21
|
-
(function (PPTX_ARROW_TYPE) {
|
|
22
|
-
PPTX_ARROW_TYPE["RIGHT"] = "rightArrow";
|
|
23
|
-
PPTX_ARROW_TYPE["LEFT"] = "leftArrow";
|
|
24
|
-
PPTX_ARROW_TYPE["UP"] = "upArrow";
|
|
25
|
-
PPTX_ARROW_TYPE["DOWN"] = "downArrow";
|
|
26
|
-
})(PPTX_ARROW_TYPE || (exports.PPTX_ARROW_TYPE = PPTX_ARROW_TYPE = {}));
|
|
27
12
|
var PPTX_H_ALIGN;
|
|
28
13
|
(function (PPTX_H_ALIGN) {
|
|
29
14
|
PPTX_H_ALIGN["LEFT"] = "left";
|
|
@@ -176,30 +161,12 @@ exports.PPTXTableShapeSchema = zod_1.z.object({
|
|
|
176
161
|
px: zod_1.z.number(),
|
|
177
162
|
}),
|
|
178
163
|
});
|
|
179
|
-
// Chevron
|
|
180
|
-
exports.PPTXChevronShapeSchema = zod_1.z.object({
|
|
181
|
-
type: zod_1.z.literal(PPTX_SHAPE_TYPE.CHEVRON),
|
|
182
|
-
direction: zod_1.z.nativeEnum(PPTX_CHEVRON_DIRECTION).default(PPTX_CHEVRON_DIRECTION.RIGHT),
|
|
183
|
-
position: exports.PPTXPositionSchema,
|
|
184
|
-
fill: exports.PPTXFillSchema.optional(),
|
|
185
|
-
text: zod_1.z.string().optional(),
|
|
186
|
-
font: exports.PPTXFontSchema.optional(),
|
|
187
|
-
align: zod_1.z
|
|
188
|
-
.nativeEnum(PPTX_H_ALIGN)
|
|
189
|
-
.optional()
|
|
190
|
-
.default('center'),
|
|
191
|
-
valign: zod_1.z
|
|
192
|
-
.nativeEnum(PPTX_V_ALIGN)
|
|
193
|
-
.optional()
|
|
194
|
-
.default('middle'),
|
|
195
|
-
});
|
|
196
164
|
// Overview
|
|
197
165
|
exports.PPTXShapeSchema = zod_1.z.discriminatedUnion('type', [
|
|
198
166
|
exports.PPTXTextBoxSchema,
|
|
199
167
|
exports.PPTXPictureBoxSchema,
|
|
200
168
|
exports.PPTXCustomShapeSchema,
|
|
201
169
|
exports.PPTXTableShapeSchema,
|
|
202
|
-
exports.PPTXChevronShapeSchema,
|
|
203
170
|
]);
|
|
204
171
|
exports.SlideBackground = zod_1.z.union([
|
|
205
172
|
exports.PPTXFillSchema,
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SlideContentUserEditSchema = exports.
|
|
6
|
+
exports.SlideContentUserEditSchema = exports.ChartSlideDataUserEditSchema = exports.BarChartSlideDataUserEditSchema = exports.TableSlideDataUserEditSchema = exports.SectionBreakSlideDataUserEditSchema = exports.ImageSlideDataUserEditSchema = exports.ContentsSlideDataUserEditSchema = exports.StructuredListSlideDataUserEditSchema = exports.TextSlideDataUserEditSchema = exports.ThankYouSlideDataUserEditSchema = exports.CoverSlideDataUserEditSchema = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
const slide_content_schema_1 = require("./slide-content.schema");
|
|
9
9
|
const constants_1 = require("../../../constants");
|
|
@@ -116,22 +116,6 @@ exports.ChartSlideDataUserEditSchema = zod_1.default.object({
|
|
|
116
116
|
chart: zod_1.default.discriminatedUnion('type', [exports.BarChartSlideDataUserEditSchema]),
|
|
117
117
|
version: zod_1.default.literal(1),
|
|
118
118
|
});
|
|
119
|
-
exports.TimelineSlideDataUserEditSchema = zod_1.default.object({
|
|
120
|
-
contentType: zod_1.default.literal(constants_1.SLIDE_CONTENT_TYPE.TIMELINE),
|
|
121
|
-
title: zod_1.default.string().min(1).max(500),
|
|
122
|
-
description: zod_1.default.string().min(1).max(1000),
|
|
123
|
-
timeline: zod_1.default.object({
|
|
124
|
-
events: zod_1.default
|
|
125
|
-
.array(zod_1.default.object({
|
|
126
|
-
date: zod_1.default.string().min(1).max(100),
|
|
127
|
-
title: zod_1.default.string().min(1).max(200),
|
|
128
|
-
description: zod_1.default.string().min(1).max(500),
|
|
129
|
-
}))
|
|
130
|
-
.min(2)
|
|
131
|
-
.max(10),
|
|
132
|
-
}),
|
|
133
|
-
version: zod_1.default.literal(1),
|
|
134
|
-
});
|
|
135
119
|
exports.SlideContentUserEditSchema = zod_1.default.discriminatedUnion('contentType', [
|
|
136
120
|
exports.CoverSlideDataUserEditSchema,
|
|
137
121
|
exports.StructuredListSlideDataUserEditSchema,
|
|
@@ -142,5 +126,4 @@ exports.SlideContentUserEditSchema = zod_1.default.discriminatedUnion('contentTy
|
|
|
142
126
|
exports.ThankYouSlideDataUserEditSchema,
|
|
143
127
|
exports.TableSlideDataUserEditSchema,
|
|
144
128
|
exports.ChartSlideDataUserEditSchema,
|
|
145
|
-
exports.TimelineSlideDataUserEditSchema,
|
|
146
129
|
]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SlideContentSchema = exports.
|
|
3
|
+
exports.SlideContentSchema = exports.ChartSlideDataSchema = exports.BarChartSlideDataSchema = exports.TableSlideDataSchema = exports.SectionBreakSlideDataSchema = exports.ImageSlideDataSchema = exports.ContentsSlideDataSchema = exports.TextSlideDataSchema = exports.StructuredListSlideDataSchema = exports.ThankYouSlideDataSchema = exports.CoverSlideDataSchema = exports.IconSlotSchema = exports.ImageSlotSchema = exports.SLIDE_CHART_TYPE = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
6
|
var SLIDE_CHART_TYPE;
|
|
@@ -180,30 +180,6 @@ exports.ChartSlideDataSchema = zod_1.z.object({
|
|
|
180
180
|
chart: zod_1.z.discriminatedUnion('type', [exports.BarChartSlideDataSchema]),
|
|
181
181
|
version: zod_1.z.literal(1),
|
|
182
182
|
});
|
|
183
|
-
exports.TimelineSlideDataSchema = zod_1.z.object({
|
|
184
|
-
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.TIMELINE),
|
|
185
|
-
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
186
|
-
description: zod_1.z.string().describe('Brief context for the timeline').min(10).max(200),
|
|
187
|
-
timeline: zod_1.z.object({
|
|
188
|
-
events: zod_1.z
|
|
189
|
-
.array(zod_1.z.object({
|
|
190
|
-
date: zod_1.z
|
|
191
|
-
.string()
|
|
192
|
-
.describe('Date or time period label. MUST be general/approximate if exact date unknown (e.g., "Early 2020s", "Mid-1990s", "Recent years")')
|
|
193
|
-
.min(2)
|
|
194
|
-
.max(50),
|
|
195
|
-
title: zod_1.z.string().describe('Event title in 2-4 words').min(5).max(80),
|
|
196
|
-
description: zod_1.z
|
|
197
|
-
.string()
|
|
198
|
-
.describe('Brief description of the event or milestone')
|
|
199
|
-
.min(20)
|
|
200
|
-
.max(150),
|
|
201
|
-
}))
|
|
202
|
-
.length(5)
|
|
203
|
-
.describe('Timeline must contain exactly 5 chronological events'),
|
|
204
|
-
}),
|
|
205
|
-
version: zod_1.z.literal(1),
|
|
206
|
-
});
|
|
207
183
|
exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
208
184
|
exports.CoverSlideDataSchema,
|
|
209
185
|
exports.StructuredListSlideDataSchema,
|
|
@@ -214,5 +190,4 @@ exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
|
214
190
|
exports.ThankYouSlideDataSchema,
|
|
215
191
|
exports.TableSlideDataSchema,
|
|
216
192
|
exports.ChartSlideDataSchema,
|
|
217
|
-
exports.TimelineSlideDataSchema,
|
|
218
193
|
]);
|
|
@@ -15,7 +15,6 @@ exports.TTSJobSchema = tool_job_schema_1.ToolJobSchema.extend({
|
|
|
15
15
|
title: zod_1.z.string(),
|
|
16
16
|
reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
|
|
17
17
|
aiResponse: zod_1.z.string().nullable(),
|
|
18
|
-
duration: zod_1.z.string(),
|
|
19
18
|
params: exports.TTSJobParamsSchema,
|
|
20
19
|
modelId: zod_1.z.string(),
|
|
21
20
|
voiceId: zod_1.z.string(),
|
|
@@ -8,8 +8,6 @@ exports.VideoJobParamsSchema = zod_1.z.object({
|
|
|
8
8
|
imageUrls: zod_1.z.string().array().optional(),
|
|
9
9
|
duration: zod_1.z.number().optional(),
|
|
10
10
|
aspectRatio: zod_1.z.string().optional(),
|
|
11
|
-
imageIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
12
|
-
resolution: zod_1.z.string().optional(),
|
|
13
11
|
});
|
|
14
12
|
exports.VideoJobSchema = tool_job_schema_1.ToolJobSchema.extend({
|
|
15
13
|
title: zod_1.z.string(),
|
|
@@ -20,22 +20,15 @@ exports.VideoModelParamsSchema = zod_1.z.object({
|
|
|
20
20
|
})
|
|
21
21
|
.optional(),
|
|
22
22
|
quality: zod_1.z.string().optional(),
|
|
23
|
-
resolution: zod_1.z
|
|
24
|
-
.object({
|
|
25
|
-
options: zod_1.z.array(zod_1.z.string()),
|
|
26
|
-
})
|
|
27
|
-
.optional(),
|
|
28
23
|
});
|
|
29
24
|
exports.VideoGenerationRequestParamsSchema = zod_1.z.object({
|
|
30
25
|
imageUrls: zod_1.z.string().array().optional(),
|
|
31
26
|
duration: zod_1.z.number(),
|
|
32
27
|
aspectRatio: zod_1.z.string().optional(),
|
|
33
28
|
quality: zod_1.z.string().optional(),
|
|
34
|
-
resolution: zod_1.z.string().optional(),
|
|
35
29
|
});
|
|
36
30
|
exports.VideoModelPricingRuleConditionSchema = zod_1.z.object({
|
|
37
|
-
aspectRatio: zod_1.z.string()
|
|
38
|
-
resolution: zod_1.z.string().optional(),
|
|
31
|
+
aspectRatio: zod_1.z.string(),
|
|
39
32
|
});
|
|
40
33
|
exports.VideoModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
|
|
41
34
|
type: zod_1.z.nativeEnum(constants_1.VIDEO_PRICING_RULE_TYPE),
|
|
@@ -8,7 +8,6 @@ exports.VideoEditorJobSchema = tool_job_schema_1.ToolJobSchema.extend({
|
|
|
8
8
|
title: zod_1.z.string(),
|
|
9
9
|
prompt: zod_1.z.string(),
|
|
10
10
|
reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
|
|
11
|
-
inputVideoId: zod_1.z.string().nullable(),
|
|
12
11
|
inputVideoUrl: zod_1.z.string(),
|
|
13
12
|
outputVideoUrl: zod_1.z.string().nullable(),
|
|
14
13
|
modelId: zod_1.z.string(),
|
|
@@ -7,10 +7,11 @@ exports.WriterDocumentOutlineSubsectionSchema = zod_1.z.object({
|
|
|
7
7
|
title: zod_1.z
|
|
8
8
|
.string()
|
|
9
9
|
.min(3)
|
|
10
|
+
.max(120)
|
|
10
11
|
.describe(`Concise title of the subsection. Meant to elaborate on its parent section's title.`),
|
|
11
12
|
});
|
|
12
13
|
exports.WriterDocumentOutlineSectionSchema = zod_1.z.object({
|
|
13
|
-
title: zod_1.z.string().min(3).describe(`Concise title of the paper section.`),
|
|
14
|
+
title: zod_1.z.string().min(3).max(120).describe(`Concise title of the paper section.`),
|
|
14
15
|
type: zod_1.z.nativeEnum(constants_1.WRITER_DOCUMENT_SECTION_TYPE),
|
|
15
16
|
subsections: zod_1.z
|
|
16
17
|
.array(exports.WriterDocumentOutlineSubsectionSchema)
|
|
@@ -7,9 +7,9 @@ exports.WebmasterClickSchema = void 0;
|
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
exports.WebmasterClickSchema = zod_1.default.object({
|
|
9
9
|
uuid: zod_1.default.string().uuid(),
|
|
10
|
+
aliasUsed: zod_1.default.string(),
|
|
10
11
|
webmasterId: zod_1.default.string().uuid(),
|
|
11
|
-
|
|
12
|
-
day: zod_1.default.date().nullable(),
|
|
12
|
+
unregisteredUserId: zod_1.default.string().uuid().nullable(),
|
|
13
13
|
createdAt: zod_1.default.date(),
|
|
14
14
|
updatedAt: zod_1.default.date(),
|
|
15
15
|
});
|
|
@@ -3,6 +3,4 @@ export * from './delete-ai-model.command';
|
|
|
3
3
|
export * from './find-ai-model.command';
|
|
4
4
|
export * from './find-ai-models-available-to-user.comand';
|
|
5
5
|
export * from './find-formatted-ai-model.command';
|
|
6
|
-
export * from './find-formatted-ai-model-v2.command';
|
|
7
|
-
export * from './find-model-pages.command';
|
|
8
6
|
export * from './update-ai-model.command';
|
package/commands/{community/get-count-of-likes-on-my-posts.command.ts → b2b/get-api-key.command.ts}
RENAMED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
export namespace
|
|
3
|
+
export namespace GetApiKeyCommand {
|
|
4
4
|
export const ResponseSchema = z.object({
|
|
5
|
-
data: z.
|
|
5
|
+
data: z.object({
|
|
6
|
+
apiKey: z.string(),
|
|
7
|
+
}),
|
|
6
8
|
});
|
|
7
9
|
|
|
8
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
export namespace
|
|
3
|
+
export namespace RefreshApiKeyCommand {
|
|
4
4
|
export const ResponseSchema = z.object({
|
|
5
|
-
data: z.
|
|
5
|
+
data: z.object({
|
|
6
|
+
apiKey: z.string(),
|
|
7
|
+
}),
|
|
6
8
|
});
|
|
9
|
+
|
|
7
10
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
11
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AI_MODEL_CONFIG_PARAM, AI_MODEL_FEATURE } from '../../constants';
|
|
3
|
+
|
|
4
|
+
export namespace SendImageRequestCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
model: z.string(),
|
|
7
|
+
prompt: z.string(),
|
|
8
|
+
params: z.array(
|
|
9
|
+
z.object({
|
|
10
|
+
type: z.nativeEnum(AI_MODEL_CONFIG_PARAM),
|
|
11
|
+
option: z.string().uuid(),
|
|
12
|
+
}),
|
|
13
|
+
),
|
|
14
|
+
refinePrompt: z.boolean().default(false),
|
|
15
|
+
features: z.array(z.nativeEnum(AI_MODEL_FEATURE)).optional().default([]),
|
|
16
|
+
files: z.array(z.string().uuid()).optional().default([]),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
20
|
+
|
|
21
|
+
export const ResponseSchema = z.object({
|
|
22
|
+
data: z.object({
|
|
23
|
+
urls: z.array(z.string()),
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AI_MODEL_FEATURE } from '../../constants';
|
|
3
|
+
|
|
4
|
+
export namespace SendTextRequestCommand {
|
|
5
|
+
export const BodySchema = z.object({
|
|
6
|
+
model: z.string(),
|
|
7
|
+
prompt: z.string(),
|
|
8
|
+
files: z.array(z.string().uuid()),
|
|
9
|
+
features: z.array(z.nativeEnum(AI_MODEL_FEATURE)),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const HeadersSchema = z.object({
|
|
13
|
+
'x-rugpt-key': z.string(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const ResponseSchema = z.object({
|
|
17
|
+
data: z.object({
|
|
18
|
+
text: z.string(),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// ✅ Types
|
|
23
|
+
export type Body = z.infer<typeof BodySchema>;
|
|
24
|
+
export type Headers = z.infer<typeof HeadersSchema>;
|
|
25
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace SubmitBalanceTopUpFormCommand {
|
|
4
|
+
export const BodySchema = z.object({
|
|
5
|
+
amount: z.number().int().min(10000, {
|
|
6
|
+
message: 'Minimum top-up amount is 10000',
|
|
7
|
+
}),
|
|
8
|
+
description: z.string().optional(),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: z.object({
|
|
13
|
+
uuid: z.string().uuid(),
|
|
14
|
+
createdAt: z.date(),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type Body = z.infer<typeof BodySchema>;
|
|
19
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
+
}
|