@purpleschool/gptbot 0.8.57 → 0.8.59
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 +1 -0
- package/api/controllers/http/community.ts +25 -0
- package/api/controllers/http/image-generation.ts +14 -0
- package/api/controllers/http/index.ts +3 -0
- package/api/controllers/http/page.ts +1 -0
- package/api/controllers/http/paraphrase.ts +6 -0
- package/api/controllers/http/payment.ts +1 -0
- package/api/controllers/http/presentation.ts +1 -0
- package/api/controllers/http/product.ts +1 -1
- package/api/controllers/http/referral.ts +1 -1
- package/api/controllers/http/review.ts +1 -0
- package/api/controllers/http/subscription.ts +1 -1
- package/api/controllers/http/ui-notification.ts +2 -2
- package/api/controllers/http/user-profile.ts +8 -0
- package/api/controllers/http/user-to-subscription.ts +1 -0
- package/api/controllers/http/user.ts +2 -0
- package/api/routes.ts +140 -18
- package/build/api/controllers/http/ai-model.js +1 -0
- package/build/api/controllers/http/community.js +25 -0
- package/build/api/controllers/http/image-generation.js +16 -0
- package/build/api/controllers/http/index.js +3 -0
- package/build/api/controllers/http/page.js +1 -0
- package/build/api/controllers/http/paraphrase.js +6 -0
- package/build/api/controllers/http/payment.js +1 -0
- package/build/api/controllers/http/presentation.js +1 -0
- 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 +1 -0
- 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-profile.js +10 -0
- package/build/api/controllers/http/user-to-subscription.js +1 -0
- package/build/api/controllers/http/user.js +2 -0
- package/build/api/routes.js +100 -18
- package/build/commands/ai-model/find-formatted-ai-model-v2.command.js +23 -0
- package/build/commands/ai-model/find-model-pages.command.js +31 -0
- package/build/commands/ai-model/index.js +2 -0
- package/build/commands/b2b/submit-balance-top-up-form.command.js +5 -3
- package/build/commands/community/archive-community-post.command.js +13 -0
- package/build/commands/community/create-community-post.command.js +34 -0
- package/build/commands/community/delete-community-post.command.js +13 -0
- package/build/commands/community/get-all-community-posts-by-criteria.command.js +25 -0
- package/build/commands/community/get-community-post-by-uuid.command.js +14 -0
- package/build/commands/community/get-count-of-likes-on-my-posts.command.js +10 -0
- package/build/commands/community/get-my-community-posts-by-criteria.command.js +32 -0
- package/build/commands/community/get-my-favorite-community-posts.command.js +19 -0
- package/build/commands/community/get-my-likes-community-posts.command.js +19 -0
- package/build/commands/community/index.js +29 -0
- package/build/commands/community/send-report-to-community-post.command.js +15 -0
- package/build/commands/community/set-favorite-community-post.command.js +13 -0
- package/build/commands/community/set-like-community-post.command.js +14 -0
- package/build/commands/community/share-my-community-post.command.js +13 -0
- package/build/commands/folder/find-folder-by-uuid-with-chats.command.js +1 -0
- package/build/commands/folder/find-folders-by-user.command.js +1 -0
- package/build/commands/index.js +2 -0
- package/build/commands/payment/check.command.js +1 -1
- package/build/commands/payment/index.js +1 -0
- package/build/commands/payment/refund-payment.command.js +15 -0
- package/build/commands/review/create-review.command.js +1 -1
- package/build/commands/review/find-all-reviews.command.js +20 -0
- package/build/commands/review/find-reviews.command.js +1 -1
- package/build/commands/review/get-review-count.command.js +15 -0
- package/build/commands/review/index.js +2 -0
- package/build/commands/subscription/create-custom-subscription-plan.command.js +1 -1
- package/build/commands/tools/image-editor/retry-image-editor-job.command.js +10 -0
- package/build/commands/tools/image-editor/set-reaction-to-image-editor-job.command.js +11 -1
- package/build/commands/tools/image-generation/delete-all-image-generation-jobs.command.js +10 -0
- package/build/commands/tools/image-generation/delete-image-generation-job-by-uuid.command.js +13 -0
- package/build/commands/tools/image-generation/find-image-generation-job-by-uuid.command.js +14 -0
- package/build/commands/tools/image-generation/find-image-generation-jobs.command.js +18 -0
- package/build/commands/tools/image-generation/get-image-generation-config.command.js +11 -0
- package/build/commands/tools/image-generation/image-generation.command.js +23 -0
- package/build/commands/tools/image-generation/index.js +24 -0
- package/build/commands/tools/image-generation/set-reaction-to-image-generation-job.command.js +28 -0
- package/build/commands/tools/image-generation/update-image-generation-job-title.command.js +17 -0
- package/build/commands/tools/index.js +1 -0
- package/build/commands/tools/music/retry-music-job.command.js +4 -0
- package/build/commands/tools/music/set-reaction-to-music-job.command.js +11 -1
- package/build/commands/tools/paraphrase/delete-all-paraphrase-jobs.command.js +8 -0
- package/build/commands/tools/paraphrase/delete-paraphrase-job-by-uuid.command.js +11 -0
- package/build/commands/tools/paraphrase/find-paraphrase-jobs.command.js +18 -0
- package/build/commands/tools/paraphrase/index.js +7 -1
- package/build/commands/tools/paraphrase/retry-paraphrase-job.command.js +14 -0
- package/build/commands/tools/paraphrase/set-reaction-to-paraphrase-job.command.js +28 -0
- package/build/commands/tools/paraphrase/update-paraphrase-job-title.command.js +17 -0
- package/build/commands/tools/presentation/index.js +1 -0
- package/build/commands/tools/presentation/set-reaction-to-presentation.command.js +28 -0
- package/build/commands/tools/stt/set-reaction-to-stt-job.command.js +11 -1
- package/build/commands/tools/tts/set-reaction-to-tts-job.command.js +11 -1
- package/build/commands/tools/video/retry-video-job.command.js +5 -0
- package/build/commands/tools/video/set-reaction-to-video-job.command.js +11 -1
- package/build/commands/tools/video-editor/retry-video-editor-job.command.js +5 -0
- package/build/commands/tools/video-editor/set-reaction-to-video-editor-job.command.js +11 -1
- package/build/commands/tools/writer/set-reaction.writer-document.command.js +11 -1
- package/build/commands/user/cancel-user-subscription.command.js +21 -0
- package/build/commands/user/find-users-by-criteria.command.js +1 -1
- package/build/commands/user/get-me.command.js +2 -0
- package/build/commands/user/get-user-payments.command.js +26 -0
- 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 +2 -0
- package/build/commands/user-profile/delete-avatar.command.js +12 -0
- package/build/commands/user-profile/get-user-profile-by-user-id.command.js +14 -0
- package/build/commands/user-profile/index.js +20 -0
- package/build/commands/user-profile/update-profile.command.js +14 -0
- package/build/commands/user-profile/upload-avatar.command.js +11 -0
- package/build/commands/user-to-subscription/delete-user-to-subscription.command.js +16 -0
- package/build/commands/user-to-subscription/index.js +1 -0
- package/build/commands/webmaster-click/get-webmaster-clicks-overview.command.js +3 -6
- package/build/constants/cloud-payments/index.js +2 -1
- package/build/constants/community/community-post-report/enums/community-post-report-reason.enum.js +18 -0
- package/build/constants/community/community-post-report/enums/index.js +17 -0
- package/build/constants/community/community-post-report/index.js +17 -0
- package/build/constants/community/default-pagination.constant.js +6 -0
- package/build/constants/community/enums/community-aspect-ratio.enum.js +11 -0
- package/build/constants/community/enums/community-post-visibility.enum.js +8 -0
- package/build/constants/community/enums/community-status.enum.js +11 -0
- package/build/constants/community/enums/community-tool-type.enum.js +10 -0
- package/build/constants/community/enums/community-type.enum.js +11 -0
- package/build/constants/community/enums/index.js +21 -0
- package/build/constants/community/index.js +19 -0
- package/build/constants/errors/errors.js +275 -14
- package/build/constants/index.js +4 -0
- package/build/constants/model/enums/index.js +17 -0
- package/build/constants/model/enums/unified-model-content-type.enum.js +21 -0
- package/build/constants/model/index.js +17 -0
- package/build/constants/page/enums/page-type.enum.js +1 -0
- package/build/constants/payment/enums/index.js +1 -0
- package/build/constants/payment/enums/payment-sort-by.enum.js +10 -0
- package/build/constants/payment/enums/payment-status.enum.js +1 -0
- package/build/constants/presentation/enums/slide-content-type.enum.js +1 -0
- package/build/constants/presentation/maps/slide-layout-map.constant.js +1 -0
- package/build/constants/subscription/enums/subscription-feature-type.enum.js +6 -0
- package/build/constants/subscription/enums/subscription-status.enum.js +2 -2
- package/build/constants/tool/enums/index.js +1 -0
- package/build/constants/tool/enums/tool-content-type.enum.js +17 -0
- package/build/constants/tool/enums/tool-job-status.enum.js +1 -0
- package/build/constants/tool-image-generation/enums/image-generation-resolution.enum.js +9 -0
- package/build/constants/tool-image-generation/enums/index.js +17 -0
- package/build/constants/tool-image-generation/index.js +17 -0
- package/build/constants/tool-video/enums/video-pricing-rule-type.enum.js +1 -0
- package/build/constants/user-profile/index.js +17 -0
- package/build/constants/user-profile/user-profile.constant.js +10 -0
- package/build/helpers/image-editor/calculate-image-editor-price.helper.js +13 -0
- package/build/helpers/image-editor/index.js +17 -0
- package/build/helpers/image-generation/calculate-image-generation-price.helper.js +16 -0
- package/build/helpers/image-generation/index.js +17 -0
- package/build/helpers/index.js +2 -0
- package/build/helpers/video/calculate-video-price.helper.js +5 -1
- package/build/models/community/community-post-media-data.schema.js +53 -0
- package/build/models/community/community-post-report/community-post-report.schema.js +13 -0
- package/build/models/community/community-post-report/index.js +17 -0
- package/build/models/community/community-post.schema.js +44 -0
- package/build/models/community/index.js +19 -0
- package/build/models/index.js +2 -0
- package/build/models/order.schema.js +1 -0
- package/build/models/page.schema.js +2 -1
- package/build/models/payment.schema.js +5 -2
- package/build/models/review.schema.js +2 -0
- package/build/models/subscription-feature.schema.js +27 -1
- package/build/models/tool.schema.js +3 -0
- package/build/models/tools/common/attached-tool-file.schema.js +13 -0
- package/build/models/tools/common/index.js +17 -0
- package/build/models/tools/image-editor/image-editor-config.schema.js +1 -0
- package/build/models/tools/image-editor/image-editor-job.schema.js +11 -2
- package/build/models/tools/image-editor/image-editor-model.schema.js +9 -1
- package/build/models/tools/image-generation/image-generation-config.schema.js +23 -0
- package/build/models/tools/image-generation/image-generation-job.schema.js +35 -0
- package/build/models/tools/image-generation/image-generation-model.schema.js +41 -0
- package/build/models/tools/image-generation/index.js +19 -0
- package/build/models/tools/index.js +2 -0
- package/build/models/tools/music/music-track.schema.js +1 -0
- package/build/models/tools/paraphrase/paraphrase-job.schema.js +5 -0
- package/build/models/tools/presentation/pptx-export-payload.schema.js +34 -1
- package/build/models/tools/presentation/slide-content-edit.schema.js +18 -1
- package/build/models/tools/presentation/slide-content.schema.js +26 -1
- package/build/models/tools/stt/stt-job.schema.js +1 -0
- package/build/models/tools/tts/tts-job.schema.js +1 -0
- package/build/models/tools/video/video-job.schema.js +2 -0
- package/build/models/tools/video/video-model.schema.js +8 -1
- package/build/models/tools/video-editor/video-editor-job.schema.js +1 -0
- package/build/models/tools/writer/writer-document-outline.schema.js +1 -2
- package/build/models/user-profile.schema.js +16 -0
- package/build/models/webmaster-click.schema.js +2 -2
- package/commands/ai-model/find-formatted-ai-model-v2.command.ts +23 -0
- package/commands/ai-model/find-model-pages.command.ts +34 -0
- package/commands/ai-model/index.ts +2 -0
- package/commands/b2b/submit-balance-top-up-form.command.ts +5 -3
- package/commands/community/archive-community-post.command.ts +13 -0
- package/commands/community/create-community-post.command.ts +40 -0
- package/commands/community/delete-community-post.command.ts +13 -0
- package/commands/community/get-all-community-posts-by-criteria.command.ts +29 -0
- package/commands/community/get-community-post-by-uuid.command.ts +16 -0
- package/commands/community/get-count-of-likes-on-my-posts.command.ts +9 -0
- package/commands/community/get-my-community-posts-by-criteria.command.ts +40 -0
- package/commands/community/get-my-favorite-community-posts.command.ts +19 -0
- package/commands/community/get-my-likes-community-posts.command.ts +19 -0
- package/commands/community/index.ts +13 -0
- package/commands/community/send-report-to-community-post.command.ts +17 -0
- package/commands/community/set-favorite-community-post.command.ts +13 -0
- package/commands/community/set-like-community-post.command.ts +14 -0
- package/commands/community/share-my-community-post.command.ts +13 -0
- package/commands/folder/find-folder-by-uuid-with-chats.command.ts +1 -0
- package/commands/folder/find-folders-by-user.command.ts +1 -0
- package/commands/index.ts +2 -0
- package/commands/payment/check.command.ts +1 -1
- package/commands/payment/index.ts +1 -0
- package/commands/payment/refund-payment.command.ts +17 -0
- package/commands/review/create-review.command.ts +1 -1
- package/commands/review/find-all-reviews.command.ts +19 -0
- package/commands/review/find-reviews.command.ts +1 -1
- package/commands/review/get-review-count.command.ts +13 -0
- package/commands/review/index.ts +2 -0
- package/commands/subscription/create-custom-subscription-plan.command.ts +1 -1
- package/commands/tools/image-editor/retry-image-editor-job.command.ts +13 -1
- package/commands/tools/image-editor/set-reaction-to-image-editor-job.command.ts +16 -3
- package/commands/tools/image-generation/delete-all-image-generation-jobs.command.ts +8 -0
- package/commands/tools/image-generation/delete-image-generation-job-by-uuid.command.ts +13 -0
- package/commands/tools/image-generation/find-image-generation-job-by-uuid.command.ts +16 -0
- package/commands/tools/image-generation/find-image-generation-jobs.command.ts +18 -0
- package/commands/tools/image-generation/get-image-generation-config.command.ts +9 -0
- package/commands/tools/image-generation/image-generation.command.ts +25 -0
- package/commands/tools/image-generation/index.ts +8 -0
- package/commands/tools/image-generation/set-reaction-to-image-generation-job.command.ts +33 -0
- package/commands/tools/image-generation/update-image-generation-job-title.command.ts +19 -0
- package/commands/tools/index.ts +1 -0
- package/commands/tools/music/retry-music-job.command.ts +7 -1
- package/commands/tools/music/set-reaction-to-music-job.command.ts +16 -3
- package/commands/tools/paraphrase/delete-all-paraphrase-jobs.command.ts +6 -0
- package/commands/tools/paraphrase/delete-paraphrase-job-by-uuid.command.ts +11 -0
- package/commands/tools/paraphrase/find-paraphrase-jobs.command.ts +18 -0
- package/commands/tools/paraphrase/index.ts +7 -1
- package/commands/tools/paraphrase/retry-paraphrase-job.command.ts +14 -0
- package/commands/tools/paraphrase/set-reaction-to-paraphrase-job.command.ts +33 -0
- package/commands/tools/paraphrase/update-paraphrase-job-title.command.ts +19 -0
- package/commands/tools/presentation/index.ts +1 -0
- package/commands/tools/presentation/set-reaction-to-presentation.command.ts +33 -0
- package/commands/tools/stt/set-reaction-to-stt-job.command.ts +16 -3
- package/commands/tools/tts/set-reaction-to-tts-job.command.ts +16 -3
- package/commands/tools/video/retry-video-job.command.ts +8 -1
- package/commands/tools/video/set-reaction-to-video-job.command.ts +16 -3
- package/commands/tools/video-editor/retry-video-editor-job.command.ts +7 -0
- package/commands/tools/video-editor/set-reaction-to-video-editor-job.command.ts +16 -3
- package/commands/tools/writer/set-reaction.writer-document.command.ts +16 -3
- package/commands/user/cancel-user-subscription.command.ts +21 -0
- package/commands/user/find-users-by-criteria.command.ts +1 -1
- package/commands/user/get-me.command.ts +2 -0
- package/commands/user/get-user-payments.command.ts +27 -0
- 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 +2 -0
- package/commands/user-profile/delete-avatar.command.ts +14 -0
- package/commands/user-profile/get-user-profile-by-user-id.command.ts +16 -0
- package/commands/user-profile/index.ts +4 -0
- package/commands/user-profile/update-profile.command.ts +16 -0
- package/commands/user-profile/upload-avatar.command.ts +10 -0
- package/commands/user-to-subscription/delete-user-to-subscription.command.ts +18 -0
- package/commands/user-to-subscription/index.ts +1 -0
- package/commands/webmaster-click/get-webmaster-clicks-overview.command.ts +3 -8
- package/constants/cloud-payments/index.ts +2 -0
- package/constants/community/community-post-report/enums/community-post-report-reason.enum.ts +14 -0
- package/constants/community/community-post-report/enums/index.ts +1 -0
- package/constants/community/community-post-report/index.ts +1 -0
- package/constants/community/default-pagination.constant.ts +4 -0
- package/constants/community/enums/community-aspect-ratio.enum.ts +7 -0
- package/constants/community/enums/community-post-visibility.enum.ts +4 -0
- package/constants/community/enums/community-status.enum.ts +7 -0
- package/constants/community/enums/community-tool-type.enum.ts +6 -0
- package/constants/community/enums/community-type.enum.ts +7 -0
- package/constants/community/enums/index.ts +5 -0
- package/constants/community/index.ts +3 -0
- package/constants/errors/errors.ts +276 -14
- package/constants/index.ts +4 -0
- package/constants/model/enums/index.ts +1 -0
- package/constants/model/enums/unified-model-content-type.enum.ts +17 -0
- package/constants/model/index.ts +1 -0
- package/constants/page/enums/page-type.enum.ts +1 -0
- package/constants/payment/enums/index.ts +1 -0
- package/constants/payment/enums/payment-sort-by.enum.ts +6 -0
- package/constants/payment/enums/payment-status.enum.ts +1 -0
- package/constants/presentation/enums/slide-content-type.enum.ts +1 -0
- package/constants/presentation/maps/slide-layout-map.constant.ts +1 -0
- package/constants/subscription/enums/subscription-feature-type.enum.ts +6 -0
- package/constants/subscription/enums/subscription-status.enum.ts +2 -2
- package/constants/tool/enums/index.ts +1 -0
- package/constants/tool/enums/tool-content-type.enum.ts +13 -0
- package/constants/tool/enums/tool-job-status.enum.ts +1 -0
- package/constants/tool-image-generation/enums/image-generation-resolution.enum.ts +5 -0
- package/constants/tool-image-generation/enums/index.ts +1 -0
- package/constants/tool-image-generation/index.ts +1 -0
- package/constants/tool-video/enums/video-pricing-rule-type.enum.ts +1 -0
- package/constants/user-profile/index.ts +1 -0
- package/constants/user-profile/user-profile.constant.ts +14 -0
- package/helpers/image-editor/calculate-image-editor-price.helper.ts +23 -0
- package/helpers/image-editor/index.ts +1 -0
- package/helpers/image-generation/calculate-image-generation-price.helper.ts +29 -0
- package/helpers/image-generation/index.ts +1 -0
- package/helpers/index.ts +2 -0
- package/helpers/video/calculate-video-price.helper.ts +7 -1
- package/models/community/community-post-media-data.schema.ts +65 -0
- package/models/community/community-post-report/community-post-report.schema.ts +11 -0
- package/models/community/community-post-report/index.ts +1 -0
- package/models/community/community-post.schema.ts +48 -0
- package/models/community/index.ts +3 -0
- package/models/index.ts +2 -0
- package/models/order.schema.ts +1 -0
- package/models/page.schema.ts +2 -1
- package/models/payment.schema.ts +5 -1
- package/models/review.schema.ts +2 -0
- package/models/subscription-feature.schema.ts +34 -0
- package/models/tool.schema.ts +3 -0
- package/models/tools/common/attached-tool-file.schema.ts +13 -0
- package/models/tools/common/index.ts +1 -0
- package/models/tools/image-editor/image-editor-config.schema.ts +1 -0
- package/models/tools/image-editor/image-editor-job.schema.ts +13 -2
- package/models/tools/image-editor/image-editor-model.schema.ts +16 -0
- package/models/tools/image-generation/image-generation-config.schema.ts +29 -0
- package/models/tools/image-generation/image-generation-job.schema.ts +42 -0
- package/models/tools/image-generation/image-generation-model.schema.ts +52 -0
- package/models/tools/image-generation/index.ts +3 -0
- package/models/tools/index.ts +2 -0
- package/models/tools/music/music-track.schema.ts +1 -0
- package/models/tools/paraphrase/paraphrase-job.schema.ts +5 -0
- package/models/tools/presentation/pptx-export-payload.schema.ts +34 -0
- package/models/tools/presentation/slide-content-edit.schema.ts +21 -0
- package/models/tools/presentation/slide-content.schema.ts +45 -0
- package/models/tools/stt/stt-job.schema.ts +1 -0
- package/models/tools/tts/tts-job.schema.ts +1 -0
- package/models/tools/video/video-job.schema.ts +2 -0
- package/models/tools/video/video-model.schema.ts +8 -1
- package/models/tools/video-editor/video-editor-job.schema.ts +1 -0
- package/models/tools/writer/writer-document-outline.schema.ts +1 -2
- package/models/user-profile.schema.ts +15 -0
- package/models/webmaster-click.schema.ts +2 -2
- package/package.json +1 -1
|
@@ -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.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;
|
|
3
|
+
exports.PPTXExportPayloadSchema = exports.PPTXSlideSchema = exports.SlideBackground = exports.PPTXShapeSchema = exports.PPTXChevronShapeSchema = 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_ARROW_TYPE = exports.PPTX_CHEVRON_DIRECTION = 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,7 +8,22 @@ 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";
|
|
11
12
|
})(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 = {}));
|
|
12
27
|
var PPTX_H_ALIGN;
|
|
13
28
|
(function (PPTX_H_ALIGN) {
|
|
14
29
|
PPTX_H_ALIGN["LEFT"] = "left";
|
|
@@ -161,12 +176,30 @@ exports.PPTXTableShapeSchema = zod_1.z.object({
|
|
|
161
176
|
px: zod_1.z.number(),
|
|
162
177
|
}),
|
|
163
178
|
});
|
|
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
|
+
});
|
|
164
196
|
// Overview
|
|
165
197
|
exports.PPTXShapeSchema = zod_1.z.discriminatedUnion('type', [
|
|
166
198
|
exports.PPTXTextBoxSchema,
|
|
167
199
|
exports.PPTXPictureBoxSchema,
|
|
168
200
|
exports.PPTXCustomShapeSchema,
|
|
169
201
|
exports.PPTXTableShapeSchema,
|
|
202
|
+
exports.PPTXChevronShapeSchema,
|
|
170
203
|
]);
|
|
171
204
|
exports.SlideBackground = zod_1.z.union([
|
|
172
205
|
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.ChartSlideDataUserEditSchema = exports.BarChartSlideDataUserEditSchema = exports.TableSlideDataUserEditSchema = exports.SectionBreakSlideDataUserEditSchema = exports.ImageSlideDataUserEditSchema = exports.ContentsSlideDataUserEditSchema = exports.StructuredListSlideDataUserEditSchema = exports.TextSlideDataUserEditSchema = exports.ThankYouSlideDataUserEditSchema = exports.CoverSlideDataUserEditSchema = void 0;
|
|
6
|
+
exports.SlideContentUserEditSchema = exports.TimelineSlideDataUserEditSchema = 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,6 +116,22 @@ 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
|
+
});
|
|
119
135
|
exports.SlideContentUserEditSchema = zod_1.default.discriminatedUnion('contentType', [
|
|
120
136
|
exports.CoverSlideDataUserEditSchema,
|
|
121
137
|
exports.StructuredListSlideDataUserEditSchema,
|
|
@@ -126,4 +142,5 @@ exports.SlideContentUserEditSchema = zod_1.default.discriminatedUnion('contentTy
|
|
|
126
142
|
exports.ThankYouSlideDataUserEditSchema,
|
|
127
143
|
exports.TableSlideDataUserEditSchema,
|
|
128
144
|
exports.ChartSlideDataUserEditSchema,
|
|
145
|
+
exports.TimelineSlideDataUserEditSchema,
|
|
129
146
|
]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
3
|
+
exports.SlideContentSchema = exports.TimelineSlideDataSchema = 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,6 +180,30 @@ 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
|
+
});
|
|
183
207
|
exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
184
208
|
exports.CoverSlideDataSchema,
|
|
185
209
|
exports.StructuredListSlideDataSchema,
|
|
@@ -190,4 +214,5 @@ exports.SlideContentSchema = zod_1.z.discriminatedUnion('contentType', [
|
|
|
190
214
|
exports.ThankYouSlideDataSchema,
|
|
191
215
|
exports.TableSlideDataSchema,
|
|
192
216
|
exports.ChartSlideDataSchema,
|
|
217
|
+
exports.TimelineSlideDataSchema,
|
|
193
218
|
]);
|
|
@@ -15,6 +15,7 @@ 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(),
|
|
18
19
|
params: exports.TTSJobParamsSchema,
|
|
19
20
|
modelId: zod_1.z.string(),
|
|
20
21
|
voiceId: zod_1.z.string(),
|
|
@@ -8,6 +8,8 @@ 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(),
|
|
11
13
|
});
|
|
12
14
|
exports.VideoJobSchema = tool_job_schema_1.ToolJobSchema.extend({
|
|
13
15
|
title: zod_1.z.string(),
|
|
@@ -20,15 +20,22 @@ 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(),
|
|
23
28
|
});
|
|
24
29
|
exports.VideoGenerationRequestParamsSchema = zod_1.z.object({
|
|
25
30
|
imageUrls: zod_1.z.string().array().optional(),
|
|
26
31
|
duration: zod_1.z.number(),
|
|
27
32
|
aspectRatio: zod_1.z.string().optional(),
|
|
28
33
|
quality: zod_1.z.string().optional(),
|
|
34
|
+
resolution: zod_1.z.string().optional(),
|
|
29
35
|
});
|
|
30
36
|
exports.VideoModelPricingRuleConditionSchema = zod_1.z.object({
|
|
31
|
-
aspectRatio: zod_1.z.string(),
|
|
37
|
+
aspectRatio: zod_1.z.string().optional(),
|
|
38
|
+
resolution: zod_1.z.string().optional(),
|
|
32
39
|
});
|
|
33
40
|
exports.VideoModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
|
|
34
41
|
type: zod_1.z.nativeEnum(constants_1.VIDEO_PRICING_RULE_TYPE),
|
|
@@ -8,6 +8,7 @@ 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(),
|
|
11
12
|
inputVideoUrl: zod_1.z.string(),
|
|
12
13
|
outputVideoUrl: zod_1.z.string().nullable(),
|
|
13
14
|
modelId: zod_1.z.string(),
|
|
@@ -7,11 +7,10 @@ exports.WriterDocumentOutlineSubsectionSchema = zod_1.z.object({
|
|
|
7
7
|
title: zod_1.z
|
|
8
8
|
.string()
|
|
9
9
|
.min(3)
|
|
10
|
-
.max(120)
|
|
11
10
|
.describe(`Concise title of the subsection. Meant to elaborate on its parent section's title.`),
|
|
12
11
|
});
|
|
13
12
|
exports.WriterDocumentOutlineSectionSchema = zod_1.z.object({
|
|
14
|
-
title: zod_1.z.string().min(3).
|
|
13
|
+
title: zod_1.z.string().min(3).describe(`Concise title of the paper section.`),
|
|
15
14
|
type: zod_1.z.nativeEnum(constants_1.WRITER_DOCUMENT_SECTION_TYPE),
|
|
16
15
|
subsections: zod_1.z
|
|
17
16
|
.array(exports.WriterDocumentOutlineSubsectionSchema)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserProfileResponseSchema = exports.UserProfileSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.UserProfileSchema = zod_1.z.object({
|
|
6
|
+
userId: zod_1.z.string().uuid(),
|
|
7
|
+
name: zod_1.z.string().nullable(),
|
|
8
|
+
avatarUrl: zod_1.z.string().url().nullable(),
|
|
9
|
+
avatarKey: zod_1.z.string().nullable(),
|
|
10
|
+
createdAt: zod_1.z.date(),
|
|
11
|
+
updatedAt: zod_1.z.date(),
|
|
12
|
+
});
|
|
13
|
+
exports.UserProfileResponseSchema = exports.UserProfileSchema.omit({
|
|
14
|
+
createdAt: true,
|
|
15
|
+
updatedAt: true,
|
|
16
|
+
});
|
|
@@ -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(),
|
|
11
10
|
webmasterId: zod_1.default.string().uuid(),
|
|
12
|
-
|
|
11
|
+
counter: zod_1.default.number(),
|
|
12
|
+
day: zod_1.default.date().nullable(),
|
|
13
13
|
createdAt: zod_1.default.date(),
|
|
14
14
|
updatedAt: zod_1.default.date(),
|
|
15
15
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UNIFIED_MODEL_CONTENT_TYPE } from '../../constants/model/enums/unified-model-content-type.enum';
|
|
3
|
+
import { IconVariantsSchema } from '../../models/icon-variants.schema';
|
|
4
|
+
|
|
5
|
+
const FormattedModelSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
title: z.string(),
|
|
8
|
+
description: z.string().nullable(),
|
|
9
|
+
contentType: z.nativeEnum(UNIFIED_MODEL_CONTENT_TYPE),
|
|
10
|
+
order: z.number(),
|
|
11
|
+
icons: IconVariantsSchema,
|
|
12
|
+
pageAlias: z.string().nullable().optional(),
|
|
13
|
+
toolId: z.string().uuid().nullable().optional(),
|
|
14
|
+
isToolModel: z.boolean(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export namespace FindFormattedAIModelV2Command {
|
|
18
|
+
export const ResponseSchema = z.object({
|
|
19
|
+
data: z.array(FormattedModelSchema),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IconVariantsSchema } from '../../models/icon-variants.schema';
|
|
3
|
+
import { UNIFIED_MODEL_CONTENT_TYPE } from '../../constants/model/enums/unified-model-content-type.enum';
|
|
4
|
+
|
|
5
|
+
const ModelSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
title: z.string(),
|
|
8
|
+
description: z.string().nullable(),
|
|
9
|
+
contentType: z.nativeEnum(UNIFIED_MODEL_CONTENT_TYPE),
|
|
10
|
+
order: z.number(),
|
|
11
|
+
icons: IconVariantsSchema,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const PageWithModelSchema = z.object({
|
|
15
|
+
uuid: z.string().uuid(),
|
|
16
|
+
title: z.string(),
|
|
17
|
+
alias: z.string(),
|
|
18
|
+
type: z.string(),
|
|
19
|
+
toolId: z.string().uuid().nullable(),
|
|
20
|
+
toolModelId: z.string().uuid().nullable(),
|
|
21
|
+
toolOptionId: z.string().uuid().nullable(),
|
|
22
|
+
aIModelId: z.string().uuid().nullable(),
|
|
23
|
+
model: ModelSchema,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export type PageWithModel = z.infer<typeof PageWithModelSchema>;
|
|
27
|
+
|
|
28
|
+
export namespace FindModelPagesCommand {
|
|
29
|
+
export const ResponseSchema = z.object({
|
|
30
|
+
data: z.array(PageWithModelSchema),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
34
|
+
}
|
|
@@ -3,4 +3,6 @@ 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';
|
|
6
8
|
export * from './update-ai-model.command';
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { ORGANIZATION_TYPE } from '../../constants';
|
|
2
3
|
|
|
3
4
|
export namespace SubmitBalanceTopUpFormCommand {
|
|
4
5
|
export const BodySchema = z.object({
|
|
6
|
+
organizationType: z.nativeEnum(ORGANIZATION_TYPE),
|
|
7
|
+
tin: z.string().regex(/^\d{10}$|^\d{12}$/, 'ИНН должен быть длинной в 10 или 12 цифр'),
|
|
8
|
+
telegram: z.string(),
|
|
5
9
|
amount: z.number().int().min(10000, {
|
|
6
10
|
message: 'Minimum top-up amount is 10000',
|
|
7
11
|
}),
|
|
8
|
-
description: z.string().optional(),
|
|
9
12
|
});
|
|
10
13
|
|
|
11
14
|
export const ResponseSchema = z.object({
|
|
12
15
|
data: z.object({
|
|
13
|
-
|
|
14
|
-
createdAt: z.date(),
|
|
16
|
+
isSuccess: z.boolean(),
|
|
15
17
|
}),
|
|
16
18
|
});
|
|
17
19
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace ArchiveCommunityPostCommand {
|
|
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,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ResponseCommunityPostSchema } from '../../models';
|
|
3
|
+
import { COMMUNITY_POST_VISIBILITY, COMMUNITY_TOOL_TYPE } from '../../constants';
|
|
4
|
+
|
|
5
|
+
export namespace CreateCommunityPostCommand {
|
|
6
|
+
export const RequestBodySchema = z
|
|
7
|
+
.object({
|
|
8
|
+
visibility: z.nativeEnum(COMMUNITY_POST_VISIBILITY),
|
|
9
|
+
caption: z.string().max(500).nullable().optional(),
|
|
10
|
+
messageId: z.string().uuid().nullable().optional(),
|
|
11
|
+
toolJobId: z.string().uuid().nullable().optional(),
|
|
12
|
+
toolType: z.nativeEnum(COMMUNITY_TOOL_TYPE).nullable().optional(),
|
|
13
|
+
})
|
|
14
|
+
.refine(
|
|
15
|
+
(data) => {
|
|
16
|
+
const hasMessageId = data.messageId != null;
|
|
17
|
+
const hasToolJobId = data.toolJobId != null;
|
|
18
|
+
|
|
19
|
+
if (!(hasMessageId !== hasToolJobId)) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (hasToolJobId && data.toolType == null) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return true;
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
message: 'Either messageId or toolJobId must be provided, but not both.',
|
|
31
|
+
path: ['messageId'],
|
|
32
|
+
},
|
|
33
|
+
);
|
|
34
|
+
export type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
35
|
+
|
|
36
|
+
export const ResponseSchema = z.object({
|
|
37
|
+
data: ResponseCommunityPostSchema,
|
|
38
|
+
});
|
|
39
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace DeleteCommunityPostCommand {
|
|
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,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ResponseCommunityPostSchema } from '../../models';
|
|
3
|
+
import { SORT_ORDER, COMMUNITY_POST_TYPE } from '../../constants';
|
|
4
|
+
|
|
5
|
+
export namespace GetAllCommunityPostsCommand {
|
|
6
|
+
export const RequestQuerySchema = z.object({
|
|
7
|
+
// Pagination
|
|
8
|
+
cursor: z.string().uuid().nullable().optional(),
|
|
9
|
+
limit: z.coerce.number().int().positive().max(100).default(30).optional(),
|
|
10
|
+
|
|
11
|
+
// Sorting
|
|
12
|
+
sortBy: z.enum(['publishedAt', 'views', 'likesCount']).optional(),
|
|
13
|
+
sortOrder: z.nativeEnum(SORT_ORDER).optional(),
|
|
14
|
+
|
|
15
|
+
// Criteria
|
|
16
|
+
userId: z.string().uuid().optional(),
|
|
17
|
+
type: z.nativeEnum(COMMUNITY_POST_TYPE).optional(),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
21
|
+
|
|
22
|
+
export const ResponseSchema = z.object({
|
|
23
|
+
data: z.array(ResponseCommunityPostSchema),
|
|
24
|
+
cursor: z.string().uuid().nullable(),
|
|
25
|
+
hasNext: z.boolean(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ResponseCommunityPostSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetCommunityPostByUuidCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: ResponseCommunityPostSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ResponseCommunityPostSchema } from '../../models';
|
|
3
|
+
import {
|
|
4
|
+
COMMUNITY_POST_STATUS,
|
|
5
|
+
COMMUNITY_POST_TYPE,
|
|
6
|
+
COMMUNITY_POST_VISIBILITY,
|
|
7
|
+
DEFAULT_PAGINATION_LIMIT,
|
|
8
|
+
SORT_ORDER,
|
|
9
|
+
} from '../../constants';
|
|
10
|
+
|
|
11
|
+
export namespace GetMyCommunityPostsByCriteriaCommand {
|
|
12
|
+
export const RequestQuerySchema = z.object({
|
|
13
|
+
// Pagination
|
|
14
|
+
cursor: z.string().uuid().nullable().optional(),
|
|
15
|
+
limit: z.coerce
|
|
16
|
+
.number()
|
|
17
|
+
.int()
|
|
18
|
+
.positive()
|
|
19
|
+
.max(100)
|
|
20
|
+
.default(DEFAULT_PAGINATION_LIMIT)
|
|
21
|
+
.optional(),
|
|
22
|
+
|
|
23
|
+
// Sorting
|
|
24
|
+
sortBy: z.enum(['publishedAt', 'views', 'likesCount']).optional(),
|
|
25
|
+
sortOrder: z.nativeEnum(SORT_ORDER).optional(),
|
|
26
|
+
|
|
27
|
+
// Criteria
|
|
28
|
+
visibility: z.nativeEnum(COMMUNITY_POST_VISIBILITY).optional(),
|
|
29
|
+
type: z.nativeEnum(COMMUNITY_POST_TYPE).optional(),
|
|
30
|
+
status: z.nativeEnum(COMMUNITY_POST_STATUS).optional(),
|
|
31
|
+
});
|
|
32
|
+
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
33
|
+
|
|
34
|
+
export const ResponseSchema = z.object({
|
|
35
|
+
data: z.array(ResponseCommunityPostSchema),
|
|
36
|
+
cursor: z.string().uuid().nullable(),
|
|
37
|
+
hasNext: z.boolean(),
|
|
38
|
+
});
|
|
39
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { DEFAULT_PAGINATION_LIMIT, SORT_ORDER } from '../../constants';
|
|
3
|
+
import { ResponseCommunityPostSchema } from '../../models';
|
|
4
|
+
|
|
5
|
+
export namespace GetMyFavoriteCommunityPostsCommand {
|
|
6
|
+
export const RequestQuerySchema = z.object({
|
|
7
|
+
offset: z.coerce.number().int().min(0).default(0).optional(),
|
|
8
|
+
limit: z.coerce.number().int().min(1).max(100).default(DEFAULT_PAGINATION_LIMIT).optional(),
|
|
9
|
+
sortOrder: z.nativeEnum(SORT_ORDER).optional(),
|
|
10
|
+
});
|
|
11
|
+
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = z.object({
|
|
14
|
+
data: z.array(ResponseCommunityPostSchema),
|
|
15
|
+
page: z.number(),
|
|
16
|
+
totalPages: z.number(),
|
|
17
|
+
});
|
|
18
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { DEFAULT_PAGINATION_LIMIT, SORT_ORDER } from '../../constants';
|
|
3
|
+
import { ResponseCommunityPostSchema } from '../../models';
|
|
4
|
+
|
|
5
|
+
export namespace GetMyLikesCommunityPostsCommand {
|
|
6
|
+
export const RequestQuerySchema = z.object({
|
|
7
|
+
offset: z.coerce.number().int().min(0).default(0).optional(),
|
|
8
|
+
limit: z.coerce.number().int().min(1).max(100).default(DEFAULT_PAGINATION_LIMIT).optional(),
|
|
9
|
+
sortOrder: z.nativeEnum(SORT_ORDER).optional(),
|
|
10
|
+
});
|
|
11
|
+
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
12
|
+
|
|
13
|
+
export const ResponseSchema = z.object({
|
|
14
|
+
data: z.array(ResponseCommunityPostSchema),
|
|
15
|
+
page: z.number(),
|
|
16
|
+
totalPages: z.number(),
|
|
17
|
+
});
|
|
18
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './get-all-community-posts-by-criteria.command';
|
|
2
|
+
export * from './get-community-post-by-uuid.command';
|
|
3
|
+
export * from './create-community-post.command';
|
|
4
|
+
export * from './set-like-community-post.command';
|
|
5
|
+
export * from './set-favorite-community-post.command';
|
|
6
|
+
export * from './delete-community-post.command';
|
|
7
|
+
export * from './archive-community-post.command';
|
|
8
|
+
export * from './get-my-community-posts-by-criteria.command';
|
|
9
|
+
export * from './share-my-community-post.command';
|
|
10
|
+
export * from './get-my-likes-community-posts.command';
|
|
11
|
+
export * from './get-my-favorite-community-posts.command';
|
|
12
|
+
export * from './send-report-to-community-post.command';
|
|
13
|
+
export * from './get-count-of-likes-on-my-posts.command';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { COMMUNITY_POST_REPORT_REASON } from '../../constants';
|
|
3
|
+
|
|
4
|
+
export namespace SendReportToCommunityPostCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
9
|
+
|
|
10
|
+
export const RequestBodySchema = z.object({
|
|
11
|
+
reason: z.nativeEnum(COMMUNITY_POST_REPORT_REASON),
|
|
12
|
+
});
|
|
13
|
+
export type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = z.void();
|
|
16
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace SetFavoriteCommunityPostCommand {
|
|
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,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ResponseCommunityPostSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace SetLikeCommunityPostCommand {
|
|
5
|
+
export const RequestParamsSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
9
|
+
|
|
10
|
+
export const ResponseSchema = z.object({
|
|
11
|
+
data: ResponseCommunityPostSchema,
|
|
12
|
+
});
|
|
13
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace ShareMyCommunityPostCommand {
|
|
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.string().url(),
|
|
11
|
+
});
|
|
12
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
13
|
+
}
|
|
@@ -11,6 +11,7 @@ export namespace FindFolderByUuidWithChatsCommand {
|
|
|
11
11
|
export const RequestSchema = z.object({
|
|
12
12
|
limit: z.coerce.number().min(1),
|
|
13
13
|
offset: z.coerce.number().min(0).default(0),
|
|
14
|
+
title: z.string().optional(),
|
|
14
15
|
});
|
|
15
16
|
|
|
16
17
|
export type Request = z.infer<typeof RequestSchema>;
|