@ai-grator/api 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_common/error.contract.ts +21 -0
- package/_common/http-contract.helper.ts +25 -0
- package/_common/index.ts +4 -0
- package/_common/success.contract.ts +9 -0
- package/_common/types/cursor-pagination.type.ts +9 -0
- package/_common/types/icon.type.ts +8 -0
- package/_common/types/index.ts +2 -0
- package/admin/endpoints/admin.ts +13 -0
- package/admin/endpoints/commands/create-admin-partner-bonus-operation.command.ts +45 -0
- package/admin/endpoints/commands/index.ts +3 -0
- package/admin/endpoints/commands/update-admin-partner-referral-config.command.ts +48 -0
- package/admin/endpoints/commands/update-admin-referral-config.command.ts +39 -0
- package/admin/endpoints/index.ts +3 -0
- package/admin/endpoints/queries/get-admin-partner-bonus-operations.query.ts +39 -0
- package/admin/endpoints/queries/get-admin-partner-l2-bonuses.query.ts +37 -0
- package/admin/endpoints/queries/get-admin-partner-referral-config.query.ts +29 -0
- package/admin/endpoints/queries/get-admin-partner-referrals.query.ts +37 -0
- package/admin/endpoints/queries/get-admin-partner.query.ts +29 -0
- package/admin/endpoints/queries/get-admin-partners.query.ts +36 -0
- package/admin/endpoints/queries/get-admin-referral-config.query.ts +17 -0
- package/admin/endpoints/queries/index.ts +7 -0
- package/admin/enums/admin-bonus-history-operation-type.enum.ts +6 -0
- package/admin/enums/admin-bonus-operation-type.enum.ts +4 -0
- package/admin/enums/admin-partner-rates-type.enum.ts +4 -0
- package/admin/enums/index.ts +3 -0
- package/admin/index.ts +3 -0
- package/admin/models/admin-bonus-operation-response.schema.ts +16 -0
- package/admin/models/admin-partner-bonus-operation-response.schema.ts +13 -0
- package/admin/models/admin-partner-details-response.schema.ts +17 -0
- package/admin/models/admin-partner-l2-bonus-response.schema.ts +11 -0
- package/admin/models/admin-partner-referral-config-response.schema.ts +13 -0
- package/admin/models/admin-partner-referral-response.schema.ts +13 -0
- package/admin/models/admin-partner-response.schema.ts +18 -0
- package/admin/models/admin-referral-config-response.schema.ts +8 -0
- package/admin/models/index.ts +8 -0
- package/ai-model/endpoints/ai-model.ts +6 -0
- package/ai-model/endpoints/index.ts +2 -0
- package/ai-model/endpoints/queries/get-ai-model-by-uuid.query.ts +24 -0
- package/ai-model/endpoints/queries/get-ai-models.query.ts +23 -0
- package/ai-model/endpoints/queries/index.ts +2 -0
- package/ai-model/index.ts +2 -0
- package/ai-model/models/ai-model-response.schema.ts +34 -0
- package/ai-model/models/index.ts +1 -0
- package/article/endpoints/article.ts +17 -0
- package/article/endpoints/commands/create-article.command.ts +38 -0
- package/article/endpoints/commands/delete-article.command.ts +25 -0
- package/article/endpoints/commands/index.ts +4 -0
- package/article/endpoints/commands/publish-article.command.ts +26 -0
- package/article/endpoints/commands/update-article.command.ts +49 -0
- package/article/endpoints/index.ts +3 -0
- package/article/endpoints/queries/get-article-by-uuid.query.ts +26 -0
- package/article/endpoints/queries/get-articles.query.ts +27 -0
- package/article/endpoints/queries/get-published-by-slug.query.ts +24 -0
- package/article/endpoints/queries/index.ts +4 -0
- package/article/endpoints/queries/list-published.query.ts +28 -0
- package/article/enums/article-status.enum.ts +4 -0
- package/article/enums/index.ts +1 -0
- package/article/index.ts +3 -0
- package/article/models/article-content.schema.ts +13 -0
- package/article/models/article-response.schema.ts +21 -0
- package/article/models/index.ts +4 -0
- package/article/models/published-article-card.schema.ts +19 -0
- package/article/models/published-article-detail.schema.ts +22 -0
- package/auth/endpoints/auth.ts +14 -0
- package/auth/endpoints/commands/change-password.command.ts +28 -0
- package/auth/endpoints/commands/delete-account.command.ts +17 -0
- package/auth/endpoints/commands/index.ts +10 -0
- package/auth/endpoints/commands/login.command.ts +29 -0
- package/auth/endpoints/commands/logout.command.ts +16 -0
- package/auth/endpoints/commands/refresh.command.ts +19 -0
- package/auth/endpoints/commands/register.command.ts +35 -0
- package/auth/endpoints/commands/reset-password.command.ts +25 -0
- package/auth/endpoints/commands/restore-password.command.ts +26 -0
- package/auth/endpoints/commands/verify-email-retry.command.ts +28 -0
- package/auth/endpoints/commands/verify-email.command.ts +28 -0
- package/auth/endpoints/index.ts +2 -0
- package/auth/index.ts +1 -0
- package/build/_common/error.contract.d.ts +13 -0
- package/build/_common/error.contract.d.ts.map +1 -0
- package/build/_common/error.contract.js +17 -0
- package/build/_common/http-contract.helper.d.ts +21 -0
- package/build/_common/http-contract.helper.d.ts.map +1 -0
- package/build/_common/http-contract.helper.js +15 -0
- package/build/_common/index.d.ts +5 -0
- package/build/_common/index.d.ts.map +1 -0
- package/build/_common/index.js +20 -0
- package/build/_common/success.contract.d.ts +6 -0
- package/build/_common/success.contract.d.ts.map +1 -0
- package/build/_common/success.contract.js +7 -0
- package/build/_common/types/cursor-pagination.type.d.ts +7 -0
- package/build/_common/types/cursor-pagination.type.d.ts.map +1 -0
- package/build/_common/types/cursor-pagination.type.js +10 -0
- package/build/_common/types/icon.type.d.ts +7 -0
- package/build/_common/types/icon.type.d.ts.map +1 -0
- package/build/_common/types/icon.type.js +8 -0
- package/build/_common/types/index.d.ts +3 -0
- package/build/_common/types/index.d.ts.map +1 -0
- package/build/_common/types/index.js +18 -0
- package/build/admin/endpoints/admin.d.ts +13 -0
- package/build/admin/endpoints/admin.d.ts.map +1 -0
- package/build/admin/endpoints/admin.js +15 -0
- package/build/admin/endpoints/commands/create-admin-partner-bonus-operation.command.d.ts +59 -0
- package/build/admin/endpoints/commands/create-admin-partner-bonus-operation.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/create-admin-partner-bonus-operation.command.js +34 -0
- package/build/admin/endpoints/commands/index.d.ts +4 -0
- package/build/admin/endpoints/commands/index.d.ts.map +1 -0
- package/build/admin/endpoints/commands/index.js +19 -0
- package/build/admin/endpoints/commands/update-admin-partner-referral-config.command.d.ts +93 -0
- package/build/admin/endpoints/commands/update-admin-partner-referral-config.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-partner-referral-config.command.js +37 -0
- package/build/admin/endpoints/commands/update-admin-referral-config.command.d.ts +58 -0
- package/build/admin/endpoints/commands/update-admin-referral-config.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-referral-config.command.js +36 -0
- package/build/admin/endpoints/index.d.ts +4 -0
- package/build/admin/endpoints/index.d.ts.map +1 -0
- package/build/admin/endpoints/index.js +19 -0
- package/build/admin/endpoints/queries/get-admin-partner-bonus-operations.query.d.ts +57 -0
- package/build/admin/endpoints/queries/get-admin-partner-bonus-operations.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-partner-bonus-operations.query.js +32 -0
- package/build/admin/endpoints/queries/get-admin-partner-l2-bonuses.query.d.ts +55 -0
- package/build/admin/endpoints/queries/get-admin-partner-l2-bonuses.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-partner-l2-bonuses.query.js +32 -0
- package/build/admin/endpoints/queries/get-admin-partner-referral-config.query.d.ts +74 -0
- package/build/admin/endpoints/queries/get-admin-partner-referral-config.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-partner-referral-config.query.js +26 -0
- package/build/admin/endpoints/queries/get-admin-partner-referrals.query.d.ts +59 -0
- package/build/admin/endpoints/queries/get-admin-partner-referrals.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-partner-referrals.query.js +32 -0
- package/build/admin/endpoints/queries/get-admin-partner.query.d.ts +46 -0
- package/build/admin/endpoints/queries/get-admin-partner.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-partner.query.js +26 -0
- package/build/admin/endpoints/queries/get-admin-partners.query.d.ts +65 -0
- package/build/admin/endpoints/queries/get-admin-partners.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-partners.query.js +33 -0
- package/build/admin/endpoints/queries/get-admin-referral-config.query.d.ts +34 -0
- package/build/admin/endpoints/queries/get-admin-referral-config.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-referral-config.query.js +18 -0
- package/build/admin/endpoints/queries/index.d.ts +8 -0
- package/build/admin/endpoints/queries/index.d.ts.map +1 -0
- package/build/admin/endpoints/queries/index.js +23 -0
- package/build/admin/enums/admin-bonus-history-operation-type.enum.d.ts +7 -0
- package/build/admin/enums/admin-bonus-history-operation-type.enum.d.ts.map +1 -0
- package/build/admin/enums/admin-bonus-history-operation-type.enum.js +10 -0
- package/build/admin/enums/admin-bonus-operation-type.enum.d.ts +5 -0
- package/build/admin/enums/admin-bonus-operation-type.enum.d.ts.map +1 -0
- package/build/admin/enums/admin-bonus-operation-type.enum.js +8 -0
- package/build/admin/enums/admin-partner-rates-type.enum.d.ts +5 -0
- package/build/admin/enums/admin-partner-rates-type.enum.d.ts.map +1 -0
- package/build/admin/enums/admin-partner-rates-type.enum.js +8 -0
- package/build/admin/enums/index.d.ts +4 -0
- package/build/admin/enums/index.d.ts.map +1 -0
- package/build/admin/enums/index.js +19 -0
- package/build/admin/index.d.ts +4 -0
- package/build/admin/index.d.ts.map +1 -0
- package/build/admin/index.js +19 -0
- package/build/admin/models/admin-bonus-operation-response.schema.d.ts +15 -0
- package/build/admin/models/admin-bonus-operation-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-bonus-operation-response.schema.js +16 -0
- package/build/admin/models/admin-partner-bonus-operation-response.schema.d.ts +12 -0
- package/build/admin/models/admin-partner-bonus-operation-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-partner-bonus-operation-response.schema.js +13 -0
- package/build/admin/models/admin-partner-details-response.schema.d.ts +16 -0
- package/build/admin/models/admin-partner-details-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-partner-details-response.schema.js +17 -0
- package/build/admin/models/admin-partner-l2-bonus-response.schema.d.ts +10 -0
- package/build/admin/models/admin-partner-l2-bonus-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-partner-l2-bonus-response.schema.js +11 -0
- package/build/admin/models/admin-partner-referral-config-response.schema.d.ts +29 -0
- package/build/admin/models/admin-partner-referral-config-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-partner-referral-config-response.schema.js +13 -0
- package/build/admin/models/admin-partner-referral-response.schema.d.ts +12 -0
- package/build/admin/models/admin-partner-referral-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-partner-referral-response.schema.js +13 -0
- package/build/admin/models/admin-partner-response.schema.d.ts +17 -0
- package/build/admin/models/admin-partner-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-partner-response.schema.js +18 -0
- package/build/admin/models/admin-referral-config-response.schema.d.ts +14 -0
- package/build/admin/models/admin-referral-config-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-referral-config-response.schema.js +8 -0
- package/build/admin/models/index.d.ts +9 -0
- package/build/admin/models/index.d.ts.map +1 -0
- package/build/admin/models/index.js +24 -0
- package/build/ai-model/endpoints/ai-model.d.ts +6 -0
- package/build/ai-model/endpoints/ai-model.d.ts.map +1 -0
- package/build/ai-model/endpoints/ai-model.js +8 -0
- package/build/ai-model/endpoints/index.d.ts +3 -0
- package/build/ai-model/endpoints/index.d.ts.map +1 -0
- package/build/ai-model/endpoints/index.js +18 -0
- package/build/ai-model/endpoints/queries/get-ai-model-by-uuid.query.d.ts +68 -0
- package/build/ai-model/endpoints/queries/get-ai-model-by-uuid.query.d.ts.map +1 -0
- package/build/ai-model/endpoints/queries/get-ai-model-by-uuid.query.js +24 -0
- package/build/ai-model/endpoints/queries/get-ai-models.query.d.ts +69 -0
- package/build/ai-model/endpoints/queries/get-ai-models.query.d.ts.map +1 -0
- package/build/ai-model/endpoints/queries/get-ai-models.query.js +22 -0
- package/build/ai-model/endpoints/queries/index.d.ts +3 -0
- package/build/ai-model/endpoints/queries/index.d.ts.map +1 -0
- package/build/ai-model/endpoints/queries/index.js +18 -0
- package/build/ai-model/index.d.ts +3 -0
- package/build/ai-model/index.d.ts.map +1 -0
- package/build/ai-model/index.js +18 -0
- package/build/ai-model/models/ai-model-response.schema.d.ts +38 -0
- package/build/ai-model/models/ai-model-response.schema.d.ts.map +1 -0
- package/build/ai-model/models/ai-model-response.schema.js +32 -0
- package/build/ai-model/models/index.d.ts +2 -0
- package/build/ai-model/models/index.d.ts.map +1 -0
- package/build/ai-model/models/index.js +17 -0
- package/build/article/endpoints/article.d.ts +15 -0
- package/build/article/endpoints/article.d.ts.map +1 -0
- package/build/article/endpoints/article.js +17 -0
- package/build/article/endpoints/commands/create-article.command.d.ts +89 -0
- package/build/article/endpoints/commands/create-article.command.d.ts.map +1 -0
- package/build/article/endpoints/commands/create-article.command.js +38 -0
- package/build/article/endpoints/commands/delete-article.command.d.ts +24 -0
- package/build/article/endpoints/commands/delete-article.command.d.ts.map +1 -0
- package/build/article/endpoints/commands/delete-article.command.js +25 -0
- package/build/article/endpoints/commands/index.d.ts +5 -0
- package/build/article/endpoints/commands/index.d.ts.map +1 -0
- package/build/article/endpoints/commands/index.js +20 -0
- package/build/article/endpoints/commands/publish-article.command.d.ts +64 -0
- package/build/article/endpoints/commands/publish-article.command.d.ts.map +1 -0
- package/build/article/endpoints/commands/publish-article.command.js +26 -0
- package/build/article/endpoints/commands/update-article.command.d.ts +96 -0
- package/build/article/endpoints/commands/update-article.command.d.ts.map +1 -0
- package/build/article/endpoints/commands/update-article.command.js +48 -0
- package/build/article/endpoints/index.d.ts +4 -0
- package/build/article/endpoints/index.d.ts.map +1 -0
- package/build/article/endpoints/index.js +19 -0
- package/build/article/endpoints/queries/get-article-by-uuid.query.d.ts +64 -0
- package/build/article/endpoints/queries/get-article-by-uuid.query.d.ts.map +1 -0
- package/build/article/endpoints/queries/get-article-by-uuid.query.js +26 -0
- package/build/article/endpoints/queries/get-articles.query.d.ts +73 -0
- package/build/article/endpoints/queries/get-articles.query.d.ts.map +1 -0
- package/build/article/endpoints/queries/get-articles.query.js +27 -0
- package/build/article/endpoints/queries/get-published-by-slug.query.d.ts +68 -0
- package/build/article/endpoints/queries/get-published-by-slug.query.d.ts.map +1 -0
- package/build/article/endpoints/queries/get-published-by-slug.query.js +24 -0
- package/build/article/endpoints/queries/index.d.ts +5 -0
- package/build/article/endpoints/queries/index.d.ts.map +1 -0
- package/build/article/endpoints/queries/index.js +20 -0
- package/build/article/endpoints/queries/list-published.query.d.ts +59 -0
- package/build/article/endpoints/queries/list-published.query.d.ts.map +1 -0
- package/build/article/endpoints/queries/list-published.query.js +28 -0
- package/build/article/enums/article-status.enum.d.ts +5 -0
- package/build/article/enums/article-status.enum.d.ts.map +1 -0
- package/build/article/enums/article-status.enum.js +8 -0
- package/build/article/enums/index.d.ts +2 -0
- package/build/article/enums/index.d.ts.map +1 -0
- package/build/article/enums/index.js +17 -0
- package/build/article/index.d.ts +4 -0
- package/build/article/index.d.ts.map +1 -0
- package/build/article/index.js +19 -0
- package/build/article/models/article-content.schema.d.ts +15 -0
- package/build/article/models/article-content.schema.d.ts.map +1 -0
- package/build/article/models/article-content.schema.js +12 -0
- package/build/article/models/article-response.schema.d.ts +25 -0
- package/build/article/models/article-response.schema.d.ts.map +1 -0
- package/build/article/models/article-response.schema.js +21 -0
- package/build/article/models/index.d.ts +5 -0
- package/build/article/models/index.d.ts.map +1 -0
- package/build/article/models/index.js +20 -0
- package/build/article/models/published-article-card.schema.d.ts +21 -0
- package/build/article/models/published-article-card.schema.d.ts.map +1 -0
- package/build/article/models/published-article-card.schema.js +18 -0
- package/build/article/models/published-article-detail.schema.d.ts +31 -0
- package/build/article/models/published-article-detail.schema.d.ts.map +1 -0
- package/build/article/models/published-article-detail.schema.js +21 -0
- package/build/auth/endpoints/auth.d.ts +14 -0
- package/build/auth/endpoints/auth.d.ts.map +1 -0
- package/build/auth/endpoints/auth.js +16 -0
- package/build/auth/endpoints/commands/change-password.command.d.ts +28 -0
- package/build/auth/endpoints/commands/change-password.command.d.ts.map +1 -0
- package/build/auth/endpoints/commands/change-password.command.js +29 -0
- package/build/auth/endpoints/commands/delete-account.command.d.ts +15 -0
- package/build/auth/endpoints/commands/delete-account.command.d.ts.map +1 -0
- package/build/auth/endpoints/commands/delete-account.command.js +19 -0
- package/build/auth/endpoints/commands/index.d.ts +11 -0
- package/build/auth/endpoints/commands/index.d.ts.map +1 -0
- package/build/auth/endpoints/commands/index.js +26 -0
- package/build/auth/endpoints/commands/login.command.d.ts +31 -0
- package/build/auth/endpoints/commands/login.command.d.ts.map +1 -0
- package/build/auth/endpoints/commands/login.command.js +30 -0
- package/build/auth/endpoints/commands/logout.command.d.ts +14 -0
- package/build/auth/endpoints/commands/logout.command.d.ts.map +1 -0
- package/build/auth/endpoints/commands/logout.command.js +18 -0
- package/build/auth/endpoints/commands/refresh.command.d.ts +19 -0
- package/build/auth/endpoints/commands/refresh.command.d.ts.map +1 -0
- package/build/auth/endpoints/commands/refresh.command.js +21 -0
- package/build/auth/endpoints/commands/register.command.d.ts +40 -0
- package/build/auth/endpoints/commands/register.command.d.ts.map +1 -0
- package/build/auth/endpoints/commands/register.command.js +35 -0
- package/build/auth/endpoints/commands/reset-password.command.d.ts +24 -0
- package/build/auth/endpoints/commands/reset-password.command.d.ts.map +1 -0
- package/build/auth/endpoints/commands/reset-password.command.js +26 -0
- package/build/auth/endpoints/commands/restore-password.command.d.ts +26 -0
- package/build/auth/endpoints/commands/restore-password.command.d.ts.map +1 -0
- package/build/auth/endpoints/commands/restore-password.command.js +27 -0
- package/build/auth/endpoints/commands/verify-email-retry.command.d.ts +30 -0
- package/build/auth/endpoints/commands/verify-email-retry.command.d.ts.map +1 -0
- package/build/auth/endpoints/commands/verify-email-retry.command.js +29 -0
- package/build/auth/endpoints/commands/verify-email.command.d.ts +30 -0
- package/build/auth/endpoints/commands/verify-email.command.d.ts.map +1 -0
- package/build/auth/endpoints/commands/verify-email.command.js +29 -0
- package/build/auth/endpoints/index.d.ts +3 -0
- package/build/auth/endpoints/index.d.ts.map +1 -0
- package/build/auth/endpoints/index.js +18 -0
- package/build/auth/index.d.ts +2 -0
- package/build/auth/index.d.ts.map +1 -0
- package/build/auth/index.js +17 -0
- package/build/category/endpoints/category.d.ts +9 -0
- package/build/category/endpoints/category.d.ts.map +1 -0
- package/build/category/endpoints/category.js +11 -0
- package/build/category/endpoints/commands/create-category.command.d.ts +40 -0
- package/build/category/endpoints/commands/create-category.command.d.ts.map +1 -0
- package/build/category/endpoints/commands/create-category.command.js +29 -0
- package/build/category/endpoints/commands/delete-category.command.d.ts +24 -0
- package/build/category/endpoints/commands/delete-category.command.d.ts.map +1 -0
- package/build/category/endpoints/commands/delete-category.command.js +25 -0
- package/build/category/endpoints/commands/index.d.ts +4 -0
- package/build/category/endpoints/commands/index.d.ts.map +1 -0
- package/build/category/endpoints/commands/index.js +19 -0
- package/build/category/endpoints/commands/update-category.command.d.ts +46 -0
- package/build/category/endpoints/commands/update-category.command.d.ts.map +1 -0
- package/build/category/endpoints/commands/update-category.command.js +38 -0
- package/build/category/endpoints/index.d.ts +4 -0
- package/build/category/endpoints/index.d.ts.map +1 -0
- package/build/category/endpoints/index.js +19 -0
- package/build/category/endpoints/queries/get-categories.query.d.ts +31 -0
- package/build/category/endpoints/queries/get-categories.query.d.ts.map +1 -0
- package/build/category/endpoints/queries/get-categories.query.js +21 -0
- package/build/category/endpoints/queries/get-category-by-uuid.query.d.ts +36 -0
- package/build/category/endpoints/queries/get-category-by-uuid.query.d.ts.map +1 -0
- package/build/category/endpoints/queries/get-category-by-uuid.query.js +26 -0
- package/build/category/endpoints/queries/index.d.ts +3 -0
- package/build/category/endpoints/queries/index.d.ts.map +1 -0
- package/build/category/endpoints/queries/index.js +18 -0
- package/build/category/index.d.ts +3 -0
- package/build/category/index.d.ts.map +1 -0
- package/build/category/index.js +18 -0
- package/build/category/models/category-response.schema.d.ts +10 -0
- package/build/category/models/category-response.schema.d.ts.map +1 -0
- package/build/category/models/category-response.schema.js +11 -0
- package/build/category/models/index.d.ts +2 -0
- package/build/category/models/index.d.ts.map +1 -0
- package/build/category/models/index.js +17 -0
- package/build/chat/endpoints/chat.d.ts +9 -0
- package/build/chat/endpoints/chat.d.ts.map +1 -0
- package/build/chat/endpoints/chat.js +11 -0
- package/build/chat/endpoints/commands/create-chat.command.d.ts +50 -0
- package/build/chat/endpoints/commands/create-chat.command.d.ts.map +1 -0
- package/build/chat/endpoints/commands/create-chat.command.js +24 -0
- package/build/chat/endpoints/commands/delete-chat.command.d.ts +22 -0
- package/build/chat/endpoints/commands/delete-chat.command.d.ts.map +1 -0
- package/build/chat/endpoints/commands/delete-chat.command.js +23 -0
- package/build/chat/endpoints/commands/index.d.ts +4 -0
- package/build/chat/endpoints/commands/index.d.ts.map +1 -0
- package/build/chat/endpoints/commands/index.js +19 -0
- package/build/chat/endpoints/commands/update-chat.command.d.ts +57 -0
- package/build/chat/endpoints/commands/update-chat.command.d.ts.map +1 -0
- package/build/chat/endpoints/commands/update-chat.command.js +33 -0
- package/build/chat/endpoints/index.d.ts +4 -0
- package/build/chat/endpoints/index.d.ts.map +1 -0
- package/build/chat/endpoints/index.js +19 -0
- package/build/chat/endpoints/queries/get-chat-by-uuid.query.d.ts +50 -0
- package/build/chat/endpoints/queries/get-chat-by-uuid.query.d.ts.map +1 -0
- package/build/chat/endpoints/queries/get-chat-by-uuid.query.js +24 -0
- package/build/chat/endpoints/queries/get-chats.query.d.ts +59 -0
- package/build/chat/endpoints/queries/get-chats.query.d.ts.map +1 -0
- package/build/chat/endpoints/queries/get-chats.query.js +25 -0
- package/build/chat/endpoints/queries/index.d.ts +3 -0
- package/build/chat/endpoints/queries/index.d.ts.map +1 -0
- package/build/chat/endpoints/queries/index.js +18 -0
- package/build/chat/enums/chat-status.enum.d.ts +6 -0
- package/build/chat/enums/chat-status.enum.d.ts.map +1 -0
- package/build/chat/enums/chat-status.enum.js +9 -0
- package/build/chat/enums/index.d.ts +2 -0
- package/build/chat/enums/index.d.ts.map +1 -0
- package/build/chat/enums/index.js +17 -0
- package/build/chat/index.d.ts +4 -0
- package/build/chat/index.d.ts.map +1 -0
- package/build/chat/index.js +19 -0
- package/build/chat/models/chat-response.schema.d.ts +28 -0
- package/build/chat/models/chat-response.schema.d.ts.map +1 -0
- package/build/chat/models/chat-response.schema.js +21 -0
- package/build/chat/models/index.d.ts +2 -0
- package/build/chat/models/index.d.ts.map +1 -0
- package/build/chat/models/index.js +17 -0
- package/build/errors/errors.d.ts +680 -0
- package/build/errors/errors.d.ts.map +1 -0
- package/build/errors/errors.js +682 -0
- package/build/errors/index.d.ts +2 -0
- package/build/errors/index.d.ts.map +1 -0
- package/build/errors/index.js +17 -0
- package/build/feedback-survey/endpoints/commands/create-feedback-survey-submission.command.d.ts +60 -0
- package/build/feedback-survey/endpoints/commands/create-feedback-survey-submission.command.d.ts.map +1 -0
- package/build/feedback-survey/endpoints/commands/create-feedback-survey-submission.command.js +26 -0
- package/build/feedback-survey/endpoints/commands/index.d.ts +2 -0
- package/build/feedback-survey/endpoints/commands/index.d.ts.map +1 -0
- package/build/feedback-survey/endpoints/commands/index.js +17 -0
- package/build/feedback-survey/endpoints/feedback-survey.d.ts +11 -0
- package/build/feedback-survey/endpoints/feedback-survey.d.ts.map +1 -0
- package/build/feedback-survey/endpoints/feedback-survey.js +13 -0
- package/build/feedback-survey/endpoints/index.d.ts +4 -0
- package/build/feedback-survey/endpoints/index.d.ts.map +1 -0
- package/build/feedback-survey/endpoints/index.js +19 -0
- package/build/feedback-survey/endpoints/queries/get-feedback-survey-questionnaire.query.d.ts +52 -0
- package/build/feedback-survey/endpoints/queries/get-feedback-survey-questionnaire.query.d.ts.map +1 -0
- package/build/feedback-survey/endpoints/queries/get-feedback-survey-questionnaire.query.js +20 -0
- package/build/feedback-survey/endpoints/queries/get-feedback-survey-status.query.d.ts +17 -0
- package/build/feedback-survey/endpoints/queries/get-feedback-survey-status.query.d.ts.map +1 -0
- package/build/feedback-survey/endpoints/queries/get-feedback-survey-status.query.js +17 -0
- package/build/feedback-survey/endpoints/queries/get-feedback-survey-submissions.query.d.ts +59 -0
- package/build/feedback-survey/endpoints/queries/get-feedback-survey-submissions.query.d.ts.map +1 -0
- package/build/feedback-survey/endpoints/queries/get-feedback-survey-submissions.query.js +27 -0
- package/build/feedback-survey/endpoints/queries/index.d.ts +4 -0
- package/build/feedback-survey/endpoints/queries/index.d.ts.map +1 -0
- package/build/feedback-survey/endpoints/queries/index.js +19 -0
- package/build/feedback-survey/enums/index.d.ts +2 -0
- package/build/feedback-survey/enums/index.d.ts.map +1 -0
- package/build/feedback-survey/enums/index.js +17 -0
- package/build/feedback-survey/enums/question-type.enum.d.ts +7 -0
- package/build/feedback-survey/enums/question-type.enum.d.ts.map +1 -0
- package/build/feedback-survey/enums/question-type.enum.js +10 -0
- package/build/feedback-survey/index.d.ts +4 -0
- package/build/feedback-survey/index.d.ts.map +1 -0
- package/build/feedback-survey/index.js +19 -0
- package/build/feedback-survey/models/answer-input.schema.d.ts +9 -0
- package/build/feedback-survey/models/answer-input.schema.d.ts.map +1 -0
- package/build/feedback-survey/models/answer-input.schema.js +10 -0
- package/build/feedback-survey/models/answer-response.schema.d.ts +12 -0
- package/build/feedback-survey/models/answer-response.schema.d.ts.map +1 -0
- package/build/feedback-survey/models/answer-response.schema.js +13 -0
- package/build/feedback-survey/models/feedback-survey-submission-response.schema.d.ts +17 -0
- package/build/feedback-survey/models/feedback-survey-submission-response.schema.d.ts.map +1 -0
- package/build/feedback-survey/models/feedback-survey-submission-response.schema.js +11 -0
- package/build/feedback-survey/models/index.d.ts +7 -0
- package/build/feedback-survey/models/index.d.ts.map +1 -0
- package/build/feedback-survey/models/index.js +22 -0
- package/build/feedback-survey/models/question-option-response.schema.d.ts +10 -0
- package/build/feedback-survey/models/question-option-response.schema.d.ts.map +1 -0
- package/build/feedback-survey/models/question-option-response.schema.js +11 -0
- package/build/feedback-survey/models/question-response.schema.d.ts +22 -0
- package/build/feedback-survey/models/question-response.schema.d.ts.map +1 -0
- package/build/feedback-survey/models/question-response.schema.js +18 -0
- package/build/feedback-survey/models/status-response.schema.d.ts +6 -0
- package/build/feedback-survey/models/status-response.schema.d.ts.map +1 -0
- package/build/feedback-survey/models/status-response.schema.js +7 -0
- package/build/file/endpoints/commands/index.d.ts +2 -0
- package/build/file/endpoints/commands/index.d.ts.map +1 -0
- package/build/file/endpoints/commands/index.js +17 -0
- package/build/file/endpoints/commands/upload-file.command.d.ts +59 -0
- package/build/file/endpoints/commands/upload-file.command.d.ts.map +1 -0
- package/build/file/endpoints/commands/upload-file.command.js +30 -0
- package/build/file/endpoints/file.d.ts +5 -0
- package/build/file/endpoints/file.d.ts.map +1 -0
- package/build/file/endpoints/file.js +7 -0
- package/build/file/endpoints/index.d.ts +3 -0
- package/build/file/endpoints/index.d.ts.map +1 -0
- package/build/file/endpoints/index.js +18 -0
- package/build/file/endpoints/queries/index.d.ts +2 -0
- package/build/file/endpoints/queries/index.d.ts.map +1 -0
- package/build/file/endpoints/queries/index.js +2 -0
- package/build/file/enums/file.enum.d.ts +19 -0
- package/build/file/enums/file.enum.d.ts.map +1 -0
- package/build/file/enums/file.enum.js +88 -0
- package/build/file/enums/index.d.ts +2 -0
- package/build/file/enums/index.d.ts.map +1 -0
- package/build/file/enums/index.js +17 -0
- package/build/file/index.d.ts +4 -0
- package/build/file/index.d.ts.map +1 -0
- package/build/file/index.js +19 -0
- package/build/file/models/file-response.schema.d.ts +20 -0
- package/build/file/models/file-response.schema.d.ts.map +1 -0
- package/build/file/models/file-response.schema.js +21 -0
- package/build/file/models/index.d.ts +2 -0
- package/build/file/models/index.d.ts.map +1 -0
- package/build/file/models/index.js +17 -0
- package/build/generation-job/endpoints/commands/create-generation-job.command.d.ts +63 -0
- package/build/generation-job/endpoints/commands/create-generation-job.command.d.ts.map +1 -0
- package/build/generation-job/endpoints/commands/create-generation-job.command.js +30 -0
- package/build/generation-job/endpoints/commands/delete-generation-job.command.d.ts +22 -0
- package/build/generation-job/endpoints/commands/delete-generation-job.command.d.ts.map +1 -0
- package/build/generation-job/endpoints/commands/delete-generation-job.command.js +23 -0
- package/build/generation-job/endpoints/commands/index.d.ts +4 -0
- package/build/generation-job/endpoints/commands/index.d.ts.map +1 -0
- package/build/generation-job/endpoints/commands/index.js +19 -0
- package/build/generation-job/endpoints/commands/update-generation-job.command.d.ts +77 -0
- package/build/generation-job/endpoints/commands/update-generation-job.command.d.ts.map +1 -0
- package/build/generation-job/endpoints/commands/update-generation-job.command.js +38 -0
- package/build/generation-job/endpoints/generation-job.d.ts +10 -0
- package/build/generation-job/endpoints/generation-job.d.ts.map +1 -0
- package/build/generation-job/endpoints/generation-job.js +12 -0
- package/build/generation-job/endpoints/index.d.ts +4 -0
- package/build/generation-job/endpoints/index.d.ts.map +1 -0
- package/build/generation-job/endpoints/index.js +19 -0
- package/build/generation-job/endpoints/queries/get-generation-job-by-uuid.query.d.ts +54 -0
- package/build/generation-job/endpoints/queries/get-generation-job-by-uuid.query.d.ts.map +1 -0
- package/build/generation-job/endpoints/queries/get-generation-job-by-uuid.query.js +24 -0
- package/build/generation-job/endpoints/queries/get-generation-job-history.query.d.ts +94 -0
- package/build/generation-job/endpoints/queries/get-generation-job-history.query.d.ts.map +1 -0
- package/build/generation-job/endpoints/queries/get-generation-job-history.query.js +35 -0
- package/build/generation-job/endpoints/queries/get-generation-jobs.query.d.ts +57 -0
- package/build/generation-job/endpoints/queries/get-generation-jobs.query.d.ts.map +1 -0
- package/build/generation-job/endpoints/queries/get-generation-jobs.query.js +26 -0
- package/build/generation-job/endpoints/queries/index.d.ts +4 -0
- package/build/generation-job/endpoints/queries/index.d.ts.map +1 -0
- package/build/generation-job/endpoints/queries/index.js +19 -0
- package/build/generation-job/enums/generation-job-status.enum.d.ts +8 -0
- package/build/generation-job/enums/generation-job-status.enum.d.ts.map +1 -0
- package/build/generation-job/enums/generation-job-status.enum.js +11 -0
- package/build/generation-job/enums/index.d.ts +2 -0
- package/build/generation-job/enums/index.d.ts.map +1 -0
- package/build/generation-job/enums/index.js +17 -0
- package/build/generation-job/index.d.ts +4 -0
- package/build/generation-job/index.d.ts.map +1 -0
- package/build/generation-job/index.js +19 -0
- package/build/generation-job/models/generation-job-response.schema.d.ts +26 -0
- package/build/generation-job/models/generation-job-response.schema.d.ts.map +1 -0
- package/build/generation-job/models/generation-job-response.schema.js +26 -0
- package/build/generation-job/models/index.d.ts +2 -0
- package/build/generation-job/models/index.d.ts.map +1 -0
- package/build/generation-job/models/index.js +17 -0
- package/build/generation-job-chat/endpoints/commands/create-generation-job-chat.command.d.ts +42 -0
- package/build/generation-job-chat/endpoints/commands/create-generation-job-chat.command.d.ts.map +1 -0
- package/build/generation-job-chat/endpoints/commands/create-generation-job-chat.command.js +27 -0
- package/build/generation-job-chat/endpoints/commands/delete-generation-job-chat.command.d.ts +22 -0
- package/build/generation-job-chat/endpoints/commands/delete-generation-job-chat.command.d.ts.map +1 -0
- package/build/generation-job-chat/endpoints/commands/delete-generation-job-chat.command.js +23 -0
- package/build/generation-job-chat/endpoints/commands/index.d.ts +4 -0
- package/build/generation-job-chat/endpoints/commands/index.d.ts.map +1 -0
- package/build/generation-job-chat/endpoints/commands/index.js +19 -0
- package/build/generation-job-chat/endpoints/commands/update-generation-job-chat.command.d.ts +45 -0
- package/build/generation-job-chat/endpoints/commands/update-generation-job-chat.command.d.ts.map +1 -0
- package/build/generation-job-chat/endpoints/commands/update-generation-job-chat.command.js +33 -0
- package/build/generation-job-chat/endpoints/generation-job-chat.d.ts +9 -0
- package/build/generation-job-chat/endpoints/generation-job-chat.d.ts.map +1 -0
- package/build/generation-job-chat/endpoints/generation-job-chat.js +11 -0
- package/build/generation-job-chat/endpoints/index.d.ts +4 -0
- package/build/generation-job-chat/endpoints/index.d.ts.map +1 -0
- package/build/generation-job-chat/endpoints/index.js +19 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.d.ts +38 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.d.ts.map +1 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.js +24 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.d.ts +49 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.d.ts.map +1 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.js +28 -0
- package/build/generation-job-chat/endpoints/queries/index.d.ts +3 -0
- package/build/generation-job-chat/endpoints/queries/index.d.ts.map +1 -0
- package/build/generation-job-chat/endpoints/queries/index.js +18 -0
- package/build/generation-job-chat/index.d.ts +3 -0
- package/build/generation-job-chat/index.d.ts.map +1 -0
- package/build/generation-job-chat/index.js +18 -0
- package/build/generation-job-chat/models/generation-job-chat-response.schema.d.ts +12 -0
- package/build/generation-job-chat/models/generation-job-chat-response.schema.d.ts.map +1 -0
- package/build/generation-job-chat/models/generation-job-chat-response.schema.js +14 -0
- package/build/generation-job-chat/models/index.d.ts +2 -0
- package/build/generation-job-chat/models/index.d.ts.map +1 -0
- package/build/generation-job-chat/models/index.js +17 -0
- package/build/generation-model/endpoints/generation-model.d.ts +7 -0
- package/build/generation-model/endpoints/generation-model.d.ts.map +1 -0
- package/build/generation-model/endpoints/generation-model.js +9 -0
- package/build/generation-model/endpoints/index.d.ts +3 -0
- package/build/generation-model/endpoints/index.d.ts.map +1 -0
- package/build/generation-model/endpoints/index.js +18 -0
- package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts +85 -0
- package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts.map +1 -0
- package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.js +25 -0
- package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts +77 -0
- package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts.map +1 -0
- package/build/generation-model/endpoints/queries/get-generation-models.query.js +19 -0
- package/build/generation-model/endpoints/queries/get-generation-price.query.d.ts +32 -0
- package/build/generation-model/endpoints/queries/get-generation-price.query.d.ts.map +1 -0
- package/build/generation-model/endpoints/queries/get-generation-price.query.js +29 -0
- package/build/generation-model/endpoints/queries/index.d.ts +4 -0
- package/build/generation-model/endpoints/queries/index.d.ts.map +1 -0
- package/build/generation-model/endpoints/queries/index.js +19 -0
- package/build/generation-model/enums/generation-type.enum.d.ts +5 -0
- package/build/generation-model/enums/generation-type.enum.d.ts.map +1 -0
- package/build/generation-model/enums/generation-type.enum.js +8 -0
- package/build/generation-model/enums/index.d.ts +2 -0
- package/build/generation-model/enums/index.d.ts.map +1 -0
- package/build/generation-model/enums/index.js +17 -0
- package/build/generation-model/index.d.ts +4 -0
- package/build/generation-model/index.d.ts.map +1 -0
- package/build/generation-model/index.js +19 -0
- package/build/generation-model/models/generation-model-response.schema.d.ts +36 -0
- package/build/generation-model/models/generation-model-response.schema.d.ts.map +1 -0
- package/build/generation-model/models/generation-model-response.schema.js +23 -0
- package/build/generation-model/models/index.d.ts +3 -0
- package/build/generation-model/models/index.d.ts.map +1 -0
- package/build/generation-model/models/index.js +18 -0
- package/build/generation-model/models/pricing-policy.schema.d.ts +52 -0
- package/build/generation-model/models/pricing-policy.schema.d.ts.map +1 -0
- package/build/generation-model/models/pricing-policy.schema.js +29 -0
- package/build/index.d.ts +17 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +32 -0
- package/build/message/endpoints/commands/create-message.command.d.ts +68 -0
- package/build/message/endpoints/commands/create-message.command.d.ts.map +1 -0
- package/build/message/endpoints/commands/create-message.command.js +48 -0
- package/build/message/endpoints/commands/delete-message.command.d.ts +22 -0
- package/build/message/endpoints/commands/delete-message.command.d.ts.map +1 -0
- package/build/message/endpoints/commands/delete-message.command.js +23 -0
- package/build/message/endpoints/commands/index.d.ts +3 -0
- package/build/message/endpoints/commands/index.d.ts.map +1 -0
- package/build/message/endpoints/commands/index.js +18 -0
- package/build/message/endpoints/index.d.ts +4 -0
- package/build/message/endpoints/index.d.ts.map +1 -0
- package/build/message/endpoints/index.js +19 -0
- package/build/message/endpoints/message.d.ts +9 -0
- package/build/message/endpoints/message.d.ts.map +1 -0
- package/build/message/endpoints/message.js +11 -0
- package/build/message/endpoints/queries/get-message-by-uuid.query.d.ts +74 -0
- package/build/message/endpoints/queries/get-message-by-uuid.query.d.ts.map +1 -0
- package/build/message/endpoints/queries/get-message-by-uuid.query.js +24 -0
- package/build/message/endpoints/queries/get-message-price-estimate.query.d.ts +41 -0
- package/build/message/endpoints/queries/get-message-price-estimate.query.d.ts.map +1 -0
- package/build/message/endpoints/queries/get-message-price-estimate.query.js +35 -0
- package/build/message/endpoints/queries/get-messages-by-chat.query.d.ts +90 -0
- package/build/message/endpoints/queries/get-messages-by-chat.query.d.ts.map +1 -0
- package/build/message/endpoints/queries/get-messages-by-chat.query.js +30 -0
- package/build/message/endpoints/queries/index.d.ts +4 -0
- package/build/message/endpoints/queries/index.d.ts.map +1 -0
- package/build/message/endpoints/queries/index.js +19 -0
- package/build/message/enums/index.d.ts +3 -0
- package/build/message/enums/index.d.ts.map +1 -0
- package/build/message/enums/index.js +18 -0
- package/build/message/enums/message-roles.enum.d.ts +5 -0
- package/build/message/enums/message-roles.enum.d.ts.map +1 -0
- package/build/message/enums/message-roles.enum.js +8 -0
- package/build/message/enums/message-status.enum.d.ts +10 -0
- package/build/message/enums/message-status.enum.d.ts.map +1 -0
- package/build/message/enums/message-status.enum.js +13 -0
- package/build/message/index.d.ts +4 -0
- package/build/message/index.d.ts.map +1 -0
- package/build/message/index.js +19 -0
- package/build/message/models/index.d.ts +2 -0
- package/build/message/models/index.d.ts.map +1 -0
- package/build/message/models/index.js +17 -0
- package/build/message/models/message-response.schema.d.ts +31 -0
- package/build/message/models/message-response.schema.d.ts.map +1 -0
- package/build/message/models/message-response.schema.js +17 -0
- package/build/payment/endpoints/commands/create-payment.command.d.ts +119 -0
- package/build/payment/endpoints/commands/create-payment.command.d.ts.map +1 -0
- package/build/payment/endpoints/commands/create-payment.command.js +40 -0
- package/build/payment/endpoints/commands/index.d.ts +2 -0
- package/build/payment/endpoints/commands/index.d.ts.map +1 -0
- package/build/payment/endpoints/commands/index.js +17 -0
- package/build/payment/endpoints/index.d.ts +3 -0
- package/build/payment/endpoints/index.d.ts.map +1 -0
- package/build/payment/endpoints/index.js +18 -0
- package/build/payment/endpoints/payment.d.ts +5 -0
- package/build/payment/endpoints/payment.d.ts.map +1 -0
- package/build/payment/endpoints/payment.js +7 -0
- package/build/payment/enums/index.d.ts +2 -0
- package/build/payment/enums/index.d.ts.map +1 -0
- package/build/payment/enums/index.js +17 -0
- package/build/payment/enums/payment-status.enum.d.ts +7 -0
- package/build/payment/enums/payment-status.enum.d.ts.map +1 -0
- package/build/payment/enums/payment-status.enum.js +10 -0
- package/build/payment/index.d.ts +4 -0
- package/build/payment/index.d.ts.map +1 -0
- package/build/payment/index.js +19 -0
- package/build/payment/models/index.d.ts +2 -0
- package/build/payment/models/index.d.ts.map +1 -0
- package/build/payment/models/index.js +17 -0
- package/build/payment/models/payment-response.schema.d.ts +50 -0
- package/build/payment/models/payment-response.schema.d.ts.map +1 -0
- package/build/payment/models/payment-response.schema.js +45 -0
- package/build/referral/endpoints/index.d.ts +2 -0
- package/build/referral/endpoints/index.d.ts.map +1 -0
- package/build/referral/endpoints/index.js +17 -0
- package/build/referral/endpoints/referral.d.ts +7 -0
- package/build/referral/endpoints/referral.d.ts.map +1 -0
- package/build/referral/endpoints/referral.js +9 -0
- package/build/referral/enums/bonus-history-filter.enum.d.ts +6 -0
- package/build/referral/enums/bonus-history-filter.enum.d.ts.map +1 -0
- package/build/referral/enums/bonus-history-filter.enum.js +9 -0
- package/build/referral/enums/index.d.ts +4 -0
- package/build/referral/enums/index.d.ts.map +1 -0
- package/build/referral/enums/index.js +19 -0
- package/build/referral/enums/referral-reward-status.enum.d.ts +6 -0
- package/build/referral/enums/referral-reward-status.enum.d.ts.map +1 -0
- package/build/referral/enums/referral-reward-status.enum.js +9 -0
- package/build/referral/enums/referral-status.enum.d.ts +6 -0
- package/build/referral/enums/referral-status.enum.d.ts.map +1 -0
- package/build/referral/enums/referral-status.enum.js +9 -0
- package/build/referral/index.d.ts +4 -0
- package/build/referral/index.d.ts.map +1 -0
- package/build/referral/index.js +19 -0
- package/build/referral/models/bonus-history-response.schema.d.ts +88 -0
- package/build/referral/models/bonus-history-response.schema.d.ts.map +1 -0
- package/build/referral/models/bonus-history-response.schema.js +27 -0
- package/build/referral/models/index.d.ts +5 -0
- package/build/referral/models/index.d.ts.map +1 -0
- package/build/referral/models/index.js +20 -0
- package/build/referral/models/partner-referral-rate-config.schema.d.ts +10 -0
- package/build/referral/models/partner-referral-rate-config.schema.d.ts.map +1 -0
- package/build/referral/models/partner-referral-rate-config.schema.js +11 -0
- package/build/referral/models/referral-config-response.schema.d.ts +24 -0
- package/build/referral/models/referral-config-response.schema.d.ts.map +1 -0
- package/build/referral/models/referral-config-response.schema.js +16 -0
- package/build/referral/models/referral-stats-response.schema.d.ts +21 -0
- package/build/referral/models/referral-stats-response.schema.d.ts.map +1 -0
- package/build/referral/models/referral-stats-response.schema.js +17 -0
- package/build/scripts/generate-openapi.d.ts +2 -0
- package/build/scripts/generate-openapi.d.ts.map +1 -0
- package/build/scripts/generate-openapi.js +536 -0
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/users/endpoints/index.d.ts +3 -0
- package/build/users/endpoints/index.d.ts.map +1 -0
- package/build/users/endpoints/index.js +18 -0
- package/build/users/endpoints/queries/get-profile.query.d.ts +13 -0
- package/build/users/endpoints/queries/get-profile.query.d.ts.map +1 -0
- package/build/users/endpoints/queries/get-profile.query.js +14 -0
- package/build/users/endpoints/queries/get-stat.query.d.ts +9 -0
- package/build/users/endpoints/queries/get-stat.query.d.ts.map +1 -0
- package/build/users/endpoints/queries/get-stat.query.js +10 -0
- package/build/users/endpoints/queries/index.d.ts +3 -0
- package/build/users/endpoints/queries/index.d.ts.map +1 -0
- package/build/users/endpoints/queries/index.js +18 -0
- package/build/users/endpoints/user.d.ts +6 -0
- package/build/users/endpoints/user.d.ts.map +1 -0
- package/build/users/endpoints/user.js +8 -0
- package/build/users/enums/index.d.ts +3 -0
- package/build/users/enums/index.d.ts.map +1 -0
- package/build/users/enums/index.js +18 -0
- package/build/users/enums/user-roles.enum.d.ts +5 -0
- package/build/users/enums/user-roles.enum.d.ts.map +1 -0
- package/build/users/enums/user-roles.enum.js +8 -0
- package/build/users/enums/user-status.enum.d.ts +6 -0
- package/build/users/enums/user-status.enum.d.ts.map +1 -0
- package/build/users/enums/user-status.enum.js +9 -0
- package/build/users/index.d.ts +3 -0
- package/build/users/index.d.ts.map +1 -0
- package/build/users/index.js +18 -0
- package/build/wallet/endpoints/index.d.ts +3 -0
- package/build/wallet/endpoints/index.d.ts.map +1 -0
- package/build/wallet/endpoints/index.js +18 -0
- package/build/wallet/endpoints/queries/get-wallet-balance.query.d.ts +20 -0
- package/build/wallet/endpoints/queries/get-wallet-balance.query.d.ts.map +1 -0
- package/build/wallet/endpoints/queries/get-wallet-balance.query.js +18 -0
- package/build/wallet/endpoints/queries/get-wallet-transactions.query.d.ts +53 -0
- package/build/wallet/endpoints/queries/get-wallet-transactions.query.d.ts.map +1 -0
- package/build/wallet/endpoints/queries/get-wallet-transactions.query.js +30 -0
- package/build/wallet/endpoints/queries/index.d.ts +3 -0
- package/build/wallet/endpoints/queries/index.d.ts.map +1 -0
- package/build/wallet/endpoints/queries/index.js +18 -0
- package/build/wallet/endpoints/wallet.d.ts +6 -0
- package/build/wallet/endpoints/wallet.d.ts.map +1 -0
- package/build/wallet/endpoints/wallet.js +8 -0
- package/build/wallet/enums/index.d.ts +4 -0
- package/build/wallet/enums/index.d.ts.map +1 -0
- package/build/wallet/enums/index.js +19 -0
- package/build/wallet/enums/wallet-transaction-source-type.enum.d.ts +10 -0
- package/build/wallet/enums/wallet-transaction-source-type.enum.d.ts.map +1 -0
- package/build/wallet/enums/wallet-transaction-source-type.enum.js +13 -0
- package/build/wallet/enums/wallet-transaction-status.enum.d.ts +7 -0
- package/build/wallet/enums/wallet-transaction-status.enum.d.ts.map +1 -0
- package/build/wallet/enums/wallet-transaction-status.enum.js +10 -0
- package/build/wallet/enums/wallet-transaction-type.enum.d.ts +7 -0
- package/build/wallet/enums/wallet-transaction-type.enum.d.ts.map +1 -0
- package/build/wallet/enums/wallet-transaction-type.enum.js +10 -0
- package/build/wallet/index.d.ts +4 -0
- package/build/wallet/index.d.ts.map +1 -0
- package/build/wallet/index.js +19 -0
- package/build/wallet/models/index.d.ts +3 -0
- package/build/wallet/models/index.d.ts.map +1 -0
- package/build/wallet/models/index.js +18 -0
- package/build/wallet/models/wallet-balance-response.schema.d.ts +7 -0
- package/build/wallet/models/wallet-balance-response.schema.d.ts.map +1 -0
- package/build/wallet/models/wallet-balance-response.schema.js +8 -0
- package/build/wallet/models/wallet-transaction-response.schema.d.ts +13 -0
- package/build/wallet/models/wallet-transaction-response.schema.d.ts.map +1 -0
- package/build/wallet/models/wallet-transaction-response.schema.js +14 -0
- package/category/endpoints/category.ts +9 -0
- package/category/endpoints/commands/create-category.command.ts +30 -0
- package/category/endpoints/commands/delete-category.command.ts +25 -0
- package/category/endpoints/commands/index.ts +3 -0
- package/category/endpoints/commands/update-category.command.ts +39 -0
- package/category/endpoints/index.ts +3 -0
- package/category/endpoints/queries/get-categories.query.ts +20 -0
- package/category/endpoints/queries/get-category-by-uuid.query.ts +26 -0
- package/category/endpoints/queries/index.ts +2 -0
- package/category/index.ts +2 -0
- package/category/models/category-response.schema.ts +11 -0
- package/category/models/index.ts +1 -0
- package/chat/endpoints/chat.ts +9 -0
- package/chat/endpoints/commands/create-chat.command.ts +24 -0
- package/chat/endpoints/commands/delete-chat.command.ts +23 -0
- package/chat/endpoints/commands/index.ts +3 -0
- package/chat/endpoints/commands/update-chat.command.ts +34 -0
- package/chat/endpoints/index.ts +3 -0
- package/chat/endpoints/queries/get-chat-by-uuid.query.ts +24 -0
- package/chat/endpoints/queries/get-chats.query.ts +25 -0
- package/chat/endpoints/queries/index.ts +2 -0
- package/chat/enums/chat-status.enum.ts +5 -0
- package/chat/enums/index.ts +1 -0
- package/chat/index.ts +3 -0
- package/chat/models/chat-response.schema.ts +24 -0
- package/chat/models/index.ts +1 -0
- package/errors/errors.ts +680 -0
- package/errors/index.ts +1 -0
- package/feedback-survey/endpoints/commands/create-feedback-survey-submission.command.ts +26 -0
- package/feedback-survey/endpoints/commands/index.ts +1 -0
- package/feedback-survey/endpoints/feedback-survey.ts +13 -0
- package/feedback-survey/endpoints/index.ts +3 -0
- package/feedback-survey/endpoints/queries/get-feedback-survey-questionnaire.query.ts +19 -0
- package/feedback-survey/endpoints/queries/get-feedback-survey-status.query.ts +16 -0
- package/feedback-survey/endpoints/queries/get-feedback-survey-submissions.query.ts +27 -0
- package/feedback-survey/endpoints/queries/index.ts +3 -0
- package/feedback-survey/enums/index.ts +1 -0
- package/feedback-survey/enums/question-type.enum.ts +6 -0
- package/feedback-survey/index.ts +3 -0
- package/feedback-survey/models/answer-input.schema.ts +10 -0
- package/feedback-survey/models/answer-response.schema.ts +13 -0
- package/feedback-survey/models/feedback-survey-submission-response.schema.ts +11 -0
- package/feedback-survey/models/index.ts +6 -0
- package/feedback-survey/models/question-option-response.schema.ts +11 -0
- package/feedback-survey/models/question-response.schema.ts +18 -0
- package/feedback-survey/models/status-response.schema.ts +7 -0
- package/file/endpoints/commands/index.ts +1 -0
- package/file/endpoints/commands/upload-file.command.ts +30 -0
- package/file/endpoints/file.ts +5 -0
- package/file/endpoints/index.ts +2 -0
- package/file/endpoints/queries/index.ts +0 -0
- package/file/enums/file.enum.ts +101 -0
- package/file/enums/index.ts +1 -0
- package/file/index.ts +3 -0
- package/file/models/file-response.schema.ts +21 -0
- package/file/models/index.ts +1 -0
- package/generation-job/endpoints/commands/create-generation-job.command.ts +30 -0
- package/generation-job/endpoints/commands/delete-generation-job.command.ts +23 -0
- package/generation-job/endpoints/commands/index.ts +3 -0
- package/generation-job/endpoints/commands/update-generation-job.command.ts +39 -0
- package/generation-job/endpoints/generation-job.ts +10 -0
- package/generation-job/endpoints/index.ts +3 -0
- package/generation-job/endpoints/queries/get-generation-job-by-uuid.query.ts +24 -0
- package/generation-job/endpoints/queries/get-generation-job-history.query.ts +38 -0
- package/generation-job/endpoints/queries/get-generation-jobs.query.ts +26 -0
- package/generation-job/endpoints/queries/index.ts +3 -0
- package/generation-job/enums/generation-job-status.enum.ts +7 -0
- package/generation-job/enums/index.ts +1 -0
- package/generation-job/index.ts +3 -0
- package/generation-job/models/generation-job-response.schema.ts +29 -0
- package/generation-job/models/index.ts +1 -0
- package/generation-job-chat/endpoints/commands/create-generation-job-chat.command.ts +27 -0
- package/generation-job-chat/endpoints/commands/delete-generation-job-chat.command.ts +23 -0
- package/generation-job-chat/endpoints/commands/index.ts +3 -0
- package/generation-job-chat/endpoints/commands/update-generation-job-chat.command.ts +34 -0
- package/generation-job-chat/endpoints/generation-job-chat.ts +9 -0
- package/generation-job-chat/endpoints/index.ts +3 -0
- package/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.ts +24 -0
- package/generation-job-chat/endpoints/queries/get-generation-job-chats.query.ts +28 -0
- package/generation-job-chat/endpoints/queries/index.ts +2 -0
- package/generation-job-chat/index.ts +2 -0
- package/generation-job-chat/models/generation-job-chat-response.schema.ts +14 -0
- package/generation-job-chat/models/index.ts +1 -0
- package/generation-model/endpoints/generation-model.ts +7 -0
- package/generation-model/endpoints/index.ts +2 -0
- package/generation-model/endpoints/queries/get-generation-models-by-type.query.ts +25 -0
- package/generation-model/endpoints/queries/get-generation-models.query.ts +18 -0
- package/generation-model/endpoints/queries/get-generation-price.query.ts +30 -0
- package/generation-model/endpoints/queries/index.ts +3 -0
- package/generation-model/enums/generation-type.enum.ts +4 -0
- package/generation-model/enums/index.ts +1 -0
- package/generation-model/index.ts +3 -0
- package/generation-model/models/generation-model-response.schema.ts +25 -0
- package/generation-model/models/index.ts +2 -0
- package/generation-model/models/pricing-policy.schema.ts +35 -0
- package/index.ts +16 -0
- package/message/endpoints/commands/create-message.command.ts +50 -0
- package/message/endpoints/commands/delete-message.command.ts +23 -0
- package/message/endpoints/commands/index.ts +2 -0
- package/message/endpoints/index.ts +3 -0
- package/message/endpoints/message.ts +9 -0
- package/message/endpoints/queries/get-message-by-uuid.query.ts +24 -0
- package/message/endpoints/queries/get-message-price-estimate.query.ts +35 -0
- package/message/endpoints/queries/get-messages-by-chat.query.ts +31 -0
- package/message/endpoints/queries/index.ts +3 -0
- package/message/enums/index.ts +2 -0
- package/message/enums/message-roles.enum.ts +4 -0
- package/message/enums/message-status.enum.ts +9 -0
- package/message/index.ts +3 -0
- package/message/models/index.ts +1 -0
- package/message/models/message-response.schema.ts +17 -0
- package/package.json +15 -0
- package/payment/endpoints/commands/create-payment.command.ts +41 -0
- package/payment/endpoints/commands/index.ts +1 -0
- package/payment/endpoints/index.ts +2 -0
- package/payment/endpoints/payment.ts +5 -0
- package/payment/enums/index.ts +1 -0
- package/payment/enums/payment-status.enum.ts +6 -0
- package/payment/index.ts +3 -0
- package/payment/models/index.ts +1 -0
- package/payment/models/payment-response.schema.ts +53 -0
- package/referral/endpoints/index.ts +1 -0
- package/referral/endpoints/referral.ts +7 -0
- package/referral/enums/bonus-history-filter.enum.ts +5 -0
- package/referral/enums/index.ts +3 -0
- package/referral/enums/referral-reward-status.enum.ts +5 -0
- package/referral/enums/referral-status.enum.ts +5 -0
- package/referral/index.ts +3 -0
- package/referral/models/bonus-history-response.schema.ts +36 -0
- package/referral/models/index.ts +4 -0
- package/referral/models/partner-referral-rate-config.schema.ts +11 -0
- package/referral/models/referral-config-response.schema.ts +19 -0
- package/referral/models/referral-stats-response.schema.ts +20 -0
- package/scripts/generate-openapi.ts +700 -0
- package/tsconfig.json +20 -0
- package/users/endpoints/index.ts +2 -0
- package/users/endpoints/queries/get-profile.query.ts +14 -0
- package/users/endpoints/queries/get-stat.query.ts +10 -0
- package/users/endpoints/queries/index.ts +2 -0
- package/users/endpoints/user.ts +6 -0
- package/users/enums/index.ts +2 -0
- package/users/enums/user-roles.enum.ts +4 -0
- package/users/enums/user-status.enum.ts +5 -0
- package/users/index.ts +2 -0
- package/wallet/endpoints/index.ts +2 -0
- package/wallet/endpoints/queries/get-wallet-balance.query.ts +17 -0
- package/wallet/endpoints/queries/get-wallet-transactions.query.ts +30 -0
- package/wallet/endpoints/queries/index.ts +2 -0
- package/wallet/endpoints/wallet.ts +6 -0
- package/wallet/enums/index.ts +3 -0
- package/wallet/enums/wallet-transaction-source-type.enum.ts +9 -0
- package/wallet/enums/wallet-transaction-status.enum.ts +6 -0
- package/wallet/enums/wallet-transaction-type.enum.ts +6 -0
- package/wallet/index.ts +3 -0
- package/wallet/models/index.ts +2 -0
- package/wallet/models/wallet-balance-response.schema.ts +8 -0
- package/wallet/models/wallet-transaction-response.schema.ts +14 -0
|
@@ -0,0 +1,700 @@
|
|
|
1
|
+
import { mkdir, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { dirname, resolve } from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { OpenAPIRegistry, OpenApiGeneratorV3 } from '@asteasolutions/zod-to-openapi';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
|
|
7
|
+
import type { HttpContract } from '../_common/http-contract.helper';
|
|
8
|
+
import { HttpErrorResponseSchema } from '../_common/error.contract';
|
|
9
|
+
import { HttpSuccessResponseSchema } from '../_common/success.contract';
|
|
10
|
+
import { AUTH_CONTROLLER } from '../auth/endpoints/auth';
|
|
11
|
+
import { AuthChangePasswordSchema, ChangePasswordCommand } from '../auth/endpoints/commands/change-password.command';
|
|
12
|
+
import { AuthDeleteAccountSchema, DeleteAccountCommand } from '../auth/endpoints/commands/delete-account.command';
|
|
13
|
+
import { AuthLoginSchema, LoginCommand } from '../auth/endpoints/commands/login.command';
|
|
14
|
+
import { AuthRegisterSchema, RegisterCommand } from '../auth/endpoints/commands/register.command';
|
|
15
|
+
import { AuthResetPasswordSchema, ResetPasswordCommand } from '../auth/endpoints/commands/reset-password.command';
|
|
16
|
+
import { AuthRestorePasswordSchema, RestorePasswordCommand } from '../auth/endpoints/commands/restore-password.command';
|
|
17
|
+
import { AuthVerifyEmailSchema, VerifyEmailCommand } from '../auth/endpoints/commands/verify-email.command';
|
|
18
|
+
import {
|
|
19
|
+
AuthVerifyEmailRetrySchema,
|
|
20
|
+
VerifyEmailRetryCommand,
|
|
21
|
+
} from '../auth/endpoints/commands/verify-email-retry.command';
|
|
22
|
+
import { CHAT_CONTROLLER } from '../chat/endpoints/chat';
|
|
23
|
+
import {
|
|
24
|
+
CreateChatCommand,
|
|
25
|
+
CreateChatCommandBody,
|
|
26
|
+
CreateChatCommandResponse,
|
|
27
|
+
} from '../chat/endpoints/commands/create-chat.command';
|
|
28
|
+
import {
|
|
29
|
+
DeleteChatCommand,
|
|
30
|
+
DeleteChatCommandParams,
|
|
31
|
+
DeleteChatCommandResponse,
|
|
32
|
+
} from '../chat/endpoints/commands/delete-chat.command';
|
|
33
|
+
import {
|
|
34
|
+
UpdateChatCommand,
|
|
35
|
+
UpdateChatCommandBody,
|
|
36
|
+
UpdateChatCommandParams,
|
|
37
|
+
UpdateChatCommandResponse,
|
|
38
|
+
} from '../chat/endpoints/commands/update-chat.command';
|
|
39
|
+
import {
|
|
40
|
+
GetChatByUuidQuery,
|
|
41
|
+
GetChatByUuidQueryParams,
|
|
42
|
+
GetChatByUuidQueryResponse,
|
|
43
|
+
} from '../chat/endpoints/queries/get-chat-by-uuid.query';
|
|
44
|
+
import { GetChatsQuery, GetChatsQueryResponse } from '../chat/endpoints/queries/get-chats.query';
|
|
45
|
+
import { MESSAGE_CONTROLLER } from '../message/endpoints/message';
|
|
46
|
+
import {
|
|
47
|
+
CreateMessageCommand,
|
|
48
|
+
CreateMessageCommandBody,
|
|
49
|
+
CreateMessageCommandResponse,
|
|
50
|
+
} from '../message/endpoints/commands/create-message.command';
|
|
51
|
+
import {
|
|
52
|
+
DeleteMessageCommand,
|
|
53
|
+
DeleteMessageCommandParams,
|
|
54
|
+
DeleteMessageCommandResponse,
|
|
55
|
+
} from '../message/endpoints/commands/delete-message.command';
|
|
56
|
+
import {
|
|
57
|
+
GetMessageByUuidQuery,
|
|
58
|
+
GetMessageByUuidQueryParams,
|
|
59
|
+
GetMessageByUuidQueryResponse,
|
|
60
|
+
} from '../message/endpoints/queries/get-message-by-uuid.query';
|
|
61
|
+
import {
|
|
62
|
+
GetMessagesByChatQuery,
|
|
63
|
+
GetMessagesByChatQueryParams,
|
|
64
|
+
GetMessagesByChatQueryResponse,
|
|
65
|
+
} from '../message/endpoints/queries/get-messages-by-chat.query';
|
|
66
|
+
import {
|
|
67
|
+
GetMessagePriceEstimateQuery,
|
|
68
|
+
GetMessagePriceEstimateQueryQuery,
|
|
69
|
+
GetMessagePriceEstimateQueryResponse,
|
|
70
|
+
} from '../message/endpoints/queries/get-message-price-estimate.query';
|
|
71
|
+
import { FILE_CONTROLLER } from '../file/endpoints/file';
|
|
72
|
+
import {
|
|
73
|
+
UploadFileCommand,
|
|
74
|
+
UploadFileCommandBody,
|
|
75
|
+
UploadFileCommandResponse,
|
|
76
|
+
} from '../file/endpoints/commands/upload-file.command';
|
|
77
|
+
import { WALLET_CONTROLLER } from '../wallet/endpoints/wallet';
|
|
78
|
+
import {
|
|
79
|
+
GetWalletBalanceQuery,
|
|
80
|
+
GetWalletBalanceQueryResponse,
|
|
81
|
+
} from '../wallet/endpoints/queries/get-wallet-balance.query';
|
|
82
|
+
import {
|
|
83
|
+
GetWalletTransactionsQuery,
|
|
84
|
+
GetWalletTransactionsQueryQuery,
|
|
85
|
+
GetWalletTransactionsQueryResponse,
|
|
86
|
+
} from '../wallet/endpoints/queries/get-wallet-transactions.query';
|
|
87
|
+
import { PAYMENT_CONTROLLER } from '../payment/endpoints/payment';
|
|
88
|
+
import {
|
|
89
|
+
CreatePaymentCommand,
|
|
90
|
+
CreatePaymentCommandBody,
|
|
91
|
+
CreatePaymentCommandResponse,
|
|
92
|
+
} from '../payment/endpoints/commands/create-payment.command';
|
|
93
|
+
import { AI_MODELS_CONTROLLER } from '../ai-model/endpoints/ai-model';
|
|
94
|
+
import {
|
|
95
|
+
GetAiModelByUuidQuery,
|
|
96
|
+
GetAiModelByUuidQueryParams,
|
|
97
|
+
GetAiModelByUuidQueryResponse,
|
|
98
|
+
} from '../ai-model/endpoints/queries/get-ai-model-by-uuid.query';
|
|
99
|
+
import { GetAllAiModelsQuery, GetAllAiModelsQueryResponse } from '../ai-model/endpoints/queries/get-ai-models.query';
|
|
100
|
+
import { GENERATION_MODEL_CONTROLLER } from '../generation-model/endpoints/generation-model';
|
|
101
|
+
import {
|
|
102
|
+
GetGenerationModelsQuery,
|
|
103
|
+
GetGenerationModelsQueryResponse,
|
|
104
|
+
} from '../generation-model/endpoints/queries/get-generation-models.query';
|
|
105
|
+
import {
|
|
106
|
+
GetGenerationModelsByTypeQuery,
|
|
107
|
+
GetGenerationModelsByTypeQueryParams,
|
|
108
|
+
GetGenerationModelsByTypeQueryResponse,
|
|
109
|
+
} from '../generation-model/endpoints/queries/get-generation-models-by-type.query';
|
|
110
|
+
import { GENERATION_JOB_CONTROLLER } from '../generation-job/endpoints/generation-job';
|
|
111
|
+
import {
|
|
112
|
+
CreateGenerationJobCommand,
|
|
113
|
+
CreateGenerationJobCommandBody,
|
|
114
|
+
CreateGenerationJobCommandResponse,
|
|
115
|
+
} from '../generation-job/endpoints/commands/create-generation-job.command';
|
|
116
|
+
import {
|
|
117
|
+
DeleteGenerationJobCommand,
|
|
118
|
+
DeleteGenerationJobCommandParams,
|
|
119
|
+
DeleteGenerationJobCommandResponse,
|
|
120
|
+
} from '../generation-job/endpoints/commands/delete-generation-job.command';
|
|
121
|
+
import {
|
|
122
|
+
UpdateGenerationJobCommand,
|
|
123
|
+
UpdateGenerationJobCommandBody,
|
|
124
|
+
UpdateGenerationJobCommandParams,
|
|
125
|
+
UpdateGenerationJobCommandResponse,
|
|
126
|
+
} from '../generation-job/endpoints/commands/update-generation-job.command';
|
|
127
|
+
import {
|
|
128
|
+
GetGenerationJobByUuidQuery,
|
|
129
|
+
GetGenerationJobByUuidQueryParams,
|
|
130
|
+
GetGenerationJobByUuidQueryResponse,
|
|
131
|
+
} from '../generation-job/endpoints/queries/get-generation-job-by-uuid.query';
|
|
132
|
+
import {
|
|
133
|
+
GetGenerationJobsQuery,
|
|
134
|
+
GetGenerationJobsQueryResponse,
|
|
135
|
+
} from '../generation-job/endpoints/queries/get-generation-jobs.query';
|
|
136
|
+
import {
|
|
137
|
+
GetGenerationJobHistoryQuery,
|
|
138
|
+
GetGenerationJobHistoryQueryQuery,
|
|
139
|
+
GetGenerationJobHistoryQueryResponse,
|
|
140
|
+
} from '../generation-job/endpoints/queries/get-generation-job-history.query';
|
|
141
|
+
import { GENERATION_JOB_CHAT_CONTROLLER } from '../generation-job-chat/endpoints/generation-job-chat';
|
|
142
|
+
import {
|
|
143
|
+
CreateGenerationJobChatCommand,
|
|
144
|
+
CreateGenerationJobChatCommandBody,
|
|
145
|
+
CreateGenerationJobChatCommandResponse,
|
|
146
|
+
} from '../generation-job-chat/endpoints/commands/create-generation-job-chat.command';
|
|
147
|
+
import {
|
|
148
|
+
UpdateGenerationJobChatCommand,
|
|
149
|
+
UpdateGenerationJobChatCommandBody,
|
|
150
|
+
UpdateGenerationJobChatCommandParams,
|
|
151
|
+
UpdateGenerationJobChatCommandResponse,
|
|
152
|
+
} from '../generation-job-chat/endpoints/commands/update-generation-job-chat.command';
|
|
153
|
+
import {
|
|
154
|
+
DeleteGenerationJobChatCommand,
|
|
155
|
+
DeleteGenerationJobChatCommandParams,
|
|
156
|
+
DeleteGenerationJobChatCommandResponse,
|
|
157
|
+
} from '../generation-job-chat/endpoints/commands/delete-generation-job-chat.command';
|
|
158
|
+
import {
|
|
159
|
+
GetGenerationJobChatsQuery,
|
|
160
|
+
GetGenerationJobChatsQueryQuery,
|
|
161
|
+
GetGenerationJobChatsQueryResponse,
|
|
162
|
+
} from '../generation-job-chat/endpoints/queries/get-generation-job-chats.query';
|
|
163
|
+
import {
|
|
164
|
+
GetGenerationJobChatByUuidQuery,
|
|
165
|
+
GetGenerationJobChatByUuidQueryParams,
|
|
166
|
+
GetGenerationJobChatByUuidQueryResponse,
|
|
167
|
+
} from '../generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query';
|
|
168
|
+
import {
|
|
169
|
+
GetGenerationPriceQuery,
|
|
170
|
+
GetGenerationPriceBodyParams,
|
|
171
|
+
GetGenerationPriceBody,
|
|
172
|
+
GetGenerationPriceResponse,
|
|
173
|
+
} from '../generation-model/endpoints/queries/get-generation-price.query';
|
|
174
|
+
|
|
175
|
+
const supportedHttpMethods = new Set(['get', 'post', 'put', 'patch', 'delete']);
|
|
176
|
+
|
|
177
|
+
function toOpenApiPath(controller: string, routePath: string): string {
|
|
178
|
+
const normalizedController = controller.replace(/^\/+|\/+$/g, '');
|
|
179
|
+
const normalizedRoute = routePath.replace(/^\/+|\/+$/g, '');
|
|
180
|
+
const joined = `/${normalizedController}/${normalizedRoute}`.replace(/\/+/g, '/');
|
|
181
|
+
|
|
182
|
+
return joined.replace(/:([^/]+)/g, '{$1}');
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function buildResponses(
|
|
186
|
+
contractsResponses: HttpContract['responses'],
|
|
187
|
+
schemaResolver: (schema: z.ZodTypeAny) => z.ZodTypeAny,
|
|
188
|
+
) {
|
|
189
|
+
const entries = Object.entries(contractsResponses).map(([status, schema]) => {
|
|
190
|
+
return [
|
|
191
|
+
status,
|
|
192
|
+
{
|
|
193
|
+
description: `HTTP ${status}`,
|
|
194
|
+
content: {
|
|
195
|
+
'application/json': {
|
|
196
|
+
schema: schemaResolver(schema),
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
];
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
return Object.fromEntries(entries);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function buildSseSuccessResponses(
|
|
207
|
+
contractsResponses: HttpContract['responses'],
|
|
208
|
+
successStatus: number,
|
|
209
|
+
schemaResolver: (schema: z.ZodTypeAny) => z.ZodTypeAny,
|
|
210
|
+
) {
|
|
211
|
+
const entries = Object.entries(contractsResponses).map(([status, schema]) => {
|
|
212
|
+
const statusCode = Number(status);
|
|
213
|
+
const contentType = statusCode === successStatus ? 'text/event-stream' : 'application/json';
|
|
214
|
+
|
|
215
|
+
return [
|
|
216
|
+
status,
|
|
217
|
+
{
|
|
218
|
+
description: `HTTP ${status}`,
|
|
219
|
+
content: {
|
|
220
|
+
[contentType]: {
|
|
221
|
+
schema: schemaResolver(schema),
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
];
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
return Object.fromEntries(entries);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
async function main() {
|
|
232
|
+
const registry = new OpenAPIRegistry();
|
|
233
|
+
const schemaMap = new WeakMap<z.ZodTypeAny, z.ZodTypeAny>();
|
|
234
|
+
|
|
235
|
+
const registerSchema = <T extends z.ZodTypeAny>(name: string, schema: T): T => {
|
|
236
|
+
const registered = schema.meta({ id: name });
|
|
237
|
+
schemaMap.set(schema, registered);
|
|
238
|
+
return registered;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
const resolveSchema = <T extends z.ZodTypeAny>(schema: T): T => (schemaMap.get(schema) as T | undefined) ?? schema;
|
|
242
|
+
|
|
243
|
+
registerSchema('HttpErrorResponse', HttpErrorResponseSchema);
|
|
244
|
+
registerSchema('HttpSuccessResponse', HttpSuccessResponseSchema);
|
|
245
|
+
registerSchema('AuthLoginRequest', AuthLoginSchema.LoginCommandBody);
|
|
246
|
+
registerSchema('AuthLoginResponse', AuthLoginSchema.LoginCommandResponse);
|
|
247
|
+
registerSchema('AuthRegisterRequest', AuthRegisterSchema.RegisterCommandBody);
|
|
248
|
+
registerSchema('AuthRegisterResponse', AuthRegisterSchema.RegisterCommandResponse);
|
|
249
|
+
registerSchema('AuthResetPasswordRequest', AuthResetPasswordSchema.ResetPasswordCommandBody);
|
|
250
|
+
registerSchema('AuthResetPasswordResponse', AuthResetPasswordSchema.ResetPasswordCommandResponse);
|
|
251
|
+
registerSchema('AuthRestorePasswordRequest', AuthRestorePasswordSchema.RestorePasswordCommandBody);
|
|
252
|
+
registerSchema('AuthRestorePasswordResponse', AuthRestorePasswordSchema.RestorePasswordCommandResponse);
|
|
253
|
+
registerSchema('AuthVerifyEmailRequest', AuthVerifyEmailSchema.VerifyEmailCommandBody);
|
|
254
|
+
registerSchema('AuthVerifyEmailResponse', AuthVerifyEmailSchema.VerifyEmailCommandResponse);
|
|
255
|
+
registerSchema('AuthVerifyEmailRetryRequest', AuthVerifyEmailRetrySchema.VerifyEmailRetryCommandBody);
|
|
256
|
+
registerSchema('AuthVerifyEmailRetryResponse', AuthVerifyEmailRetrySchema.VerifyEmailRetryCommandResponse);
|
|
257
|
+
registerSchema('AuthDeleteAccountResponse', AuthDeleteAccountSchema.DeleteAccountCommandResponse);
|
|
258
|
+
registerSchema('AuthChangePasswordRequest', AuthChangePasswordSchema.ChangePasswordCommandBody);
|
|
259
|
+
registerSchema('AuthChangePasswordResponse', AuthChangePasswordSchema.ChangePasswordCommandResponse);
|
|
260
|
+
registerSchema('ChatCreateRequest', CreateChatCommandBody);
|
|
261
|
+
registerSchema('ChatCreateResponse', CreateChatCommandResponse);
|
|
262
|
+
registerSchema('ChatGetAllResponse', GetChatsQueryResponse);
|
|
263
|
+
registerSchema('ChatGetByUuidParams', GetChatByUuidQueryParams);
|
|
264
|
+
registerSchema('ChatGetByUuidResponse', GetChatByUuidQueryResponse);
|
|
265
|
+
registerSchema('ChatUpdateParams', UpdateChatCommandParams);
|
|
266
|
+
registerSchema('ChatUpdateRequest', UpdateChatCommandBody);
|
|
267
|
+
registerSchema('ChatUpdateResponse', UpdateChatCommandResponse);
|
|
268
|
+
registerSchema('ChatDeleteParams', DeleteChatCommandParams);
|
|
269
|
+
registerSchema('ChatDeleteResponse', DeleteChatCommandResponse);
|
|
270
|
+
registerSchema('MessageCreateRequest', CreateMessageCommandBody);
|
|
271
|
+
registerSchema('MessageCreateResponse', CreateMessageCommandResponse);
|
|
272
|
+
registerSchema('MessageGetByUuidParams', GetMessageByUuidQueryParams);
|
|
273
|
+
registerSchema('MessageGetByUuidResponse', GetMessageByUuidQueryResponse);
|
|
274
|
+
registerSchema('MessageGetByChatParams', GetMessagesByChatQueryParams);
|
|
275
|
+
registerSchema('MessageGetByChatResponse', GetMessagesByChatQueryResponse);
|
|
276
|
+
registerSchema('MessagePriceEstimateQuery', GetMessagePriceEstimateQueryQuery);
|
|
277
|
+
registerSchema('MessagePriceEstimateResponse', GetMessagePriceEstimateQueryResponse);
|
|
278
|
+
registerSchema('MessageDeleteParams', DeleteMessageCommandParams);
|
|
279
|
+
registerSchema('MessageDeleteResponse', DeleteMessageCommandResponse);
|
|
280
|
+
registerSchema('FileUploadRequest', UploadFileCommandBody);
|
|
281
|
+
registerSchema('FileUploadResponse', UploadFileCommandResponse);
|
|
282
|
+
registerSchema('WalletBalanceResponse', GetWalletBalanceQueryResponse);
|
|
283
|
+
registerSchema('WalletTransactionsQuery', GetWalletTransactionsQueryQuery);
|
|
284
|
+
registerSchema('WalletTransactionsResponse', GetWalletTransactionsQueryResponse);
|
|
285
|
+
registerSchema('PaymentCreateRequest', CreatePaymentCommandBody);
|
|
286
|
+
registerSchema('PaymentCreateResponse', CreatePaymentCommandResponse);
|
|
287
|
+
registerSchema('AiModelsGetAllResponse', GetAllAiModelsQueryResponse);
|
|
288
|
+
registerSchema('AiModelsGetByUuidParams', GetAiModelByUuidQueryParams);
|
|
289
|
+
registerSchema('AiModelsGetByUuidResponse', GetAiModelByUuidQueryResponse);
|
|
290
|
+
registerSchema('GenerationModelGetAllResponse', GetGenerationModelsQueryResponse);
|
|
291
|
+
registerSchema('GenerationModelGetByTypeParams', GetGenerationModelsByTypeQueryParams);
|
|
292
|
+
registerSchema('GenerationModelGetByTypeResponse', GetGenerationModelsByTypeQueryResponse);
|
|
293
|
+
registerSchema('GenerationJobCreateRequest', CreateGenerationJobCommandBody);
|
|
294
|
+
registerSchema('GenerationJobCreateResponse', CreateGenerationJobCommandResponse);
|
|
295
|
+
registerSchema('GenerationJobGetAllResponse', GetGenerationJobsQueryResponse);
|
|
296
|
+
registerSchema('GenerationJobGetByUuidParams', GetGenerationJobByUuidQueryParams);
|
|
297
|
+
registerSchema('GenerationJobGetByUuidResponse', GetGenerationJobByUuidQueryResponse);
|
|
298
|
+
registerSchema('GenerationJobUpdateParams', UpdateGenerationJobCommandParams);
|
|
299
|
+
registerSchema('GenerationJobUpdateRequest', UpdateGenerationJobCommandBody);
|
|
300
|
+
registerSchema('GenerationJobUpdateResponse', UpdateGenerationJobCommandResponse);
|
|
301
|
+
registerSchema('GenerationJobDeleteParams', DeleteGenerationJobCommandParams);
|
|
302
|
+
registerSchema('GenerationJobDeleteResponse', DeleteGenerationJobCommandResponse);
|
|
303
|
+
registerSchema('GenerationJobHistoryQuery', GetGenerationJobHistoryQueryQuery);
|
|
304
|
+
registerSchema('GenerationJobHistoryResponse', GetGenerationJobHistoryQueryResponse);
|
|
305
|
+
registerSchema('GenerationJobChatCreateRequest', CreateGenerationJobChatCommandBody);
|
|
306
|
+
registerSchema('GenerationJobChatCreateResponse', CreateGenerationJobChatCommandResponse);
|
|
307
|
+
registerSchema('GenerationJobChatGetAllQuery', GetGenerationJobChatsQueryQuery);
|
|
308
|
+
registerSchema('GenerationJobChatGetAllResponse', GetGenerationJobChatsQueryResponse);
|
|
309
|
+
registerSchema('GenerationJobChatGetByUuidParams', GetGenerationJobChatByUuidQueryParams);
|
|
310
|
+
registerSchema('GenerationJobChatGetByUuidResponse', GetGenerationJobChatByUuidQueryResponse);
|
|
311
|
+
registerSchema('GenerationJobChatUpdateParams', UpdateGenerationJobChatCommandParams);
|
|
312
|
+
registerSchema('GenerationJobChatUpdateRequest', UpdateGenerationJobChatCommandBody);
|
|
313
|
+
registerSchema('GenerationJobChatUpdateResponse', UpdateGenerationJobChatCommandResponse);
|
|
314
|
+
registerSchema('GenerationJobChatDeleteParams', DeleteGenerationJobChatCommandParams);
|
|
315
|
+
registerSchema('GenerationJobChatDeleteResponse', DeleteGenerationJobChatCommandResponse);
|
|
316
|
+
registerSchema('GenerationPriceParams', GetGenerationPriceBodyParams);
|
|
317
|
+
registerSchema('GenerationPriceRequest', GetGenerationPriceBody);
|
|
318
|
+
registerSchema('GenerationPriceResponse', GetGenerationPriceResponse);
|
|
319
|
+
|
|
320
|
+
const authContracts: HttpContract[] = [
|
|
321
|
+
RegisterCommand,
|
|
322
|
+
LoginCommand,
|
|
323
|
+
DeleteAccountCommand,
|
|
324
|
+
ResetPasswordCommand,
|
|
325
|
+
RestorePasswordCommand,
|
|
326
|
+
ChangePasswordCommand,
|
|
327
|
+
VerifyEmailCommand,
|
|
328
|
+
VerifyEmailRetryCommand,
|
|
329
|
+
];
|
|
330
|
+
const chatContracts: HttpContract[] = [
|
|
331
|
+
CreateChatCommand,
|
|
332
|
+
GetChatsQuery,
|
|
333
|
+
GetChatByUuidQuery,
|
|
334
|
+
UpdateChatCommand,
|
|
335
|
+
DeleteChatCommand,
|
|
336
|
+
];
|
|
337
|
+
const messageContracts: HttpContract[] = [
|
|
338
|
+
CreateMessageCommand,
|
|
339
|
+
GetMessagePriceEstimateQuery,
|
|
340
|
+
GetMessagesByChatQuery,
|
|
341
|
+
GetMessageByUuidQuery,
|
|
342
|
+
DeleteMessageCommand,
|
|
343
|
+
];
|
|
344
|
+
const fileContracts: HttpContract[] = [UploadFileCommand];
|
|
345
|
+
const walletContracts: HttpContract[] = [GetWalletBalanceQuery, GetWalletTransactionsQuery];
|
|
346
|
+
const paymentContracts: HttpContract[] = [CreatePaymentCommand];
|
|
347
|
+
const aiModelContracts: HttpContract[] = [GetAllAiModelsQuery, GetAiModelByUuidQuery];
|
|
348
|
+
const generationModelContracts: HttpContract[] = [
|
|
349
|
+
GetGenerationModelsQuery,
|
|
350
|
+
GetGenerationModelsByTypeQuery,
|
|
351
|
+
GetGenerationPriceQuery,
|
|
352
|
+
];
|
|
353
|
+
const generationJobContracts: HttpContract[] = [
|
|
354
|
+
CreateGenerationJobCommand,
|
|
355
|
+
GetGenerationJobsQuery,
|
|
356
|
+
GetGenerationJobByUuidQuery,
|
|
357
|
+
GetGenerationJobHistoryQuery,
|
|
358
|
+
UpdateGenerationJobCommand,
|
|
359
|
+
DeleteGenerationJobCommand,
|
|
360
|
+
];
|
|
361
|
+
const generationJobChatContracts: HttpContract[] = [
|
|
362
|
+
CreateGenerationJobChatCommand,
|
|
363
|
+
GetGenerationJobChatsQuery,
|
|
364
|
+
GetGenerationJobChatByUuidQuery,
|
|
365
|
+
UpdateGenerationJobChatCommand,
|
|
366
|
+
DeleteGenerationJobChatCommand,
|
|
367
|
+
];
|
|
368
|
+
|
|
369
|
+
for (const contract of authContracts) {
|
|
370
|
+
const method = contract.method.toLowerCase();
|
|
371
|
+
if (!supportedHttpMethods.has(method)) {
|
|
372
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
registry.registerPath({
|
|
376
|
+
method: method as 'get' | 'post' | 'put' | 'patch' | 'delete',
|
|
377
|
+
path: toOpenApiPath(AUTH_CONTROLLER, contract.path),
|
|
378
|
+
summary: contract.summary,
|
|
379
|
+
tags: ['Auth'],
|
|
380
|
+
request: {
|
|
381
|
+
...(contract.request?.body
|
|
382
|
+
? {
|
|
383
|
+
body: {
|
|
384
|
+
required: true,
|
|
385
|
+
content: {
|
|
386
|
+
'application/json': {
|
|
387
|
+
schema: resolveSchema(contract.request.body),
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
}
|
|
392
|
+
: {}),
|
|
393
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
394
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
395
|
+
},
|
|
396
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
for (const contract of chatContracts) {
|
|
401
|
+
const method = contract.method.toLowerCase();
|
|
402
|
+
if (!supportedHttpMethods.has(method)) {
|
|
403
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
registry.registerPath({
|
|
407
|
+
method: method as 'get' | 'post' | 'put' | 'patch' | 'delete',
|
|
408
|
+
path: toOpenApiPath(CHAT_CONTROLLER, contract.path),
|
|
409
|
+
summary: contract.summary,
|
|
410
|
+
tags: ['Chat'],
|
|
411
|
+
request: {
|
|
412
|
+
...(contract.request?.body
|
|
413
|
+
? {
|
|
414
|
+
body: {
|
|
415
|
+
required: true,
|
|
416
|
+
content: {
|
|
417
|
+
'application/json': {
|
|
418
|
+
schema: resolveSchema(contract.request.body),
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
}
|
|
423
|
+
: {}),
|
|
424
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
425
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
426
|
+
},
|
|
427
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
for (const contract of messageContracts) {
|
|
432
|
+
const method = contract.method.toLowerCase();
|
|
433
|
+
if (!supportedHttpMethods.has(method)) {
|
|
434
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
registry.registerPath({
|
|
438
|
+
method: method as 'get' | 'post' | 'put' | 'patch' | 'delete',
|
|
439
|
+
path: toOpenApiPath(MESSAGE_CONTROLLER, contract.path),
|
|
440
|
+
summary: contract.summary,
|
|
441
|
+
tags: ['Message'],
|
|
442
|
+
request: {
|
|
443
|
+
...(contract.request?.body
|
|
444
|
+
? {
|
|
445
|
+
body: {
|
|
446
|
+
required: true,
|
|
447
|
+
content: {
|
|
448
|
+
'application/json': {
|
|
449
|
+
schema: resolveSchema(contract.request.body),
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
}
|
|
454
|
+
: {}),
|
|
455
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
456
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
457
|
+
},
|
|
458
|
+
responses:
|
|
459
|
+
contract === CreateMessageCommand
|
|
460
|
+
? buildSseSuccessResponses(contract.responses, 201, resolveSchema)
|
|
461
|
+
: buildResponses(contract.responses, resolveSchema),
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
for (const contract of fileContracts) {
|
|
466
|
+
const method = contract.method.toLowerCase();
|
|
467
|
+
if (!supportedHttpMethods.has(method)) {
|
|
468
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
registry.registerPath({
|
|
472
|
+
method: method as 'get' | 'post' | 'put' | 'patch' | 'delete',
|
|
473
|
+
path: toOpenApiPath(FILE_CONTROLLER, contract.path),
|
|
474
|
+
summary: contract.summary,
|
|
475
|
+
tags: ['File'],
|
|
476
|
+
request: {
|
|
477
|
+
...(contract.request?.body
|
|
478
|
+
? {
|
|
479
|
+
body: {
|
|
480
|
+
required: true,
|
|
481
|
+
content: {
|
|
482
|
+
'multipart/form-data': {
|
|
483
|
+
schema: resolveSchema(contract.request.body),
|
|
484
|
+
},
|
|
485
|
+
},
|
|
486
|
+
},
|
|
487
|
+
}
|
|
488
|
+
: {}),
|
|
489
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
490
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
491
|
+
},
|
|
492
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
for (const contract of walletContracts) {
|
|
497
|
+
const method = contract.method.toLowerCase();
|
|
498
|
+
if (!supportedHttpMethods.has(method)) {
|
|
499
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
registry.registerPath({
|
|
503
|
+
method: method as 'get' | 'post' | 'put' | 'patch' | 'delete',
|
|
504
|
+
path: toOpenApiPath(WALLET_CONTROLLER, contract.path),
|
|
505
|
+
summary: contract.summary,
|
|
506
|
+
tags: ['Wallet'],
|
|
507
|
+
request: {
|
|
508
|
+
...(contract.request?.body
|
|
509
|
+
? {
|
|
510
|
+
body: {
|
|
511
|
+
required: true,
|
|
512
|
+
content: {
|
|
513
|
+
'application/json': {
|
|
514
|
+
schema: resolveSchema(contract.request.body),
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
}
|
|
519
|
+
: {}),
|
|
520
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
521
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
522
|
+
},
|
|
523
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
for (const contract of paymentContracts) {
|
|
528
|
+
const method = contract.method.toLowerCase();
|
|
529
|
+
if (!supportedHttpMethods.has(method)) {
|
|
530
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
registry.registerPath({
|
|
534
|
+
method: method as 'get' | 'post' | 'put' | 'patch' | 'delete',
|
|
535
|
+
path: toOpenApiPath(PAYMENT_CONTROLLER, contract.path),
|
|
536
|
+
summary: contract.summary,
|
|
537
|
+
tags: ['Payment'],
|
|
538
|
+
request: {
|
|
539
|
+
...(contract.request?.body
|
|
540
|
+
? {
|
|
541
|
+
body: {
|
|
542
|
+
required: true,
|
|
543
|
+
content: {
|
|
544
|
+
'application/json': {
|
|
545
|
+
schema: resolveSchema(contract.request.body),
|
|
546
|
+
},
|
|
547
|
+
},
|
|
548
|
+
},
|
|
549
|
+
}
|
|
550
|
+
: {}),
|
|
551
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
552
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
553
|
+
},
|
|
554
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
for (const contract of aiModelContracts) {
|
|
559
|
+
const method = contract.method.toLowerCase();
|
|
560
|
+
if (!supportedHttpMethods.has(method)) {
|
|
561
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
registry.registerPath({
|
|
565
|
+
method: method as 'get' | 'post' | 'put' | 'patch' | 'delete',
|
|
566
|
+
path: toOpenApiPath(AI_MODELS_CONTROLLER, contract.path),
|
|
567
|
+
summary: contract.summary,
|
|
568
|
+
tags: ['AI Models'],
|
|
569
|
+
request: {
|
|
570
|
+
...(contract.request?.body
|
|
571
|
+
? {
|
|
572
|
+
body: {
|
|
573
|
+
required: true,
|
|
574
|
+
content: {
|
|
575
|
+
'application/json': {
|
|
576
|
+
schema: resolveSchema(contract.request.body),
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
},
|
|
580
|
+
}
|
|
581
|
+
: {}),
|
|
582
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
583
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
584
|
+
},
|
|
585
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
for (const contract of generationModelContracts) {
|
|
590
|
+
const method = contract.method.toLowerCase();
|
|
591
|
+
if (!supportedHttpMethods.has(method)) {
|
|
592
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
registry.registerPath({
|
|
596
|
+
method: method as 'get' | 'post' | 'put' | 'patch' | 'delete',
|
|
597
|
+
path: toOpenApiPath(GENERATION_MODEL_CONTROLLER, contract.path),
|
|
598
|
+
summary: contract.summary,
|
|
599
|
+
tags: ['Generation Models'],
|
|
600
|
+
request: {
|
|
601
|
+
...(contract.request?.body
|
|
602
|
+
? {
|
|
603
|
+
body: {
|
|
604
|
+
required: true,
|
|
605
|
+
content: {
|
|
606
|
+
'application/json': {
|
|
607
|
+
schema: resolveSchema(contract.request.body),
|
|
608
|
+
},
|
|
609
|
+
},
|
|
610
|
+
},
|
|
611
|
+
}
|
|
612
|
+
: {}),
|
|
613
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
614
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
615
|
+
},
|
|
616
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
for (const contract of generationJobContracts) {
|
|
621
|
+
const method = contract.method.toLowerCase();
|
|
622
|
+
if (!supportedHttpMethods.has(method)) {
|
|
623
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
registry.registerPath({
|
|
627
|
+
method: method as 'get' | 'post' | 'put' | 'patch' | 'delete',
|
|
628
|
+
path: toOpenApiPath(GENERATION_JOB_CONTROLLER, contract.path),
|
|
629
|
+
summary: contract.summary,
|
|
630
|
+
tags: ['Generation Jobs'],
|
|
631
|
+
request: {
|
|
632
|
+
...(contract.request?.body
|
|
633
|
+
? {
|
|
634
|
+
body: {
|
|
635
|
+
required: true,
|
|
636
|
+
content: {
|
|
637
|
+
'application/json': {
|
|
638
|
+
schema: resolveSchema(contract.request.body),
|
|
639
|
+
},
|
|
640
|
+
},
|
|
641
|
+
},
|
|
642
|
+
}
|
|
643
|
+
: {}),
|
|
644
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
645
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
646
|
+
},
|
|
647
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
for (const contract of generationJobChatContracts) {
|
|
652
|
+
const method = contract.method.toLowerCase();
|
|
653
|
+
if (!supportedHttpMethods.has(method)) {
|
|
654
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
registry.registerPath({
|
|
658
|
+
method: method as 'get' | 'post' | 'put' | 'patch' | 'delete',
|
|
659
|
+
path: toOpenApiPath(GENERATION_JOB_CHAT_CONTROLLER, contract.path),
|
|
660
|
+
summary: contract.summary,
|
|
661
|
+
tags: ['Generation Job Chats'],
|
|
662
|
+
request: {
|
|
663
|
+
...(contract.request?.body
|
|
664
|
+
? {
|
|
665
|
+
body: {
|
|
666
|
+
required: true,
|
|
667
|
+
content: {
|
|
668
|
+
'application/json': {
|
|
669
|
+
schema: resolveSchema(contract.request.body),
|
|
670
|
+
},
|
|
671
|
+
},
|
|
672
|
+
},
|
|
673
|
+
}
|
|
674
|
+
: {}),
|
|
675
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
676
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
677
|
+
},
|
|
678
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
const generator = new OpenApiGeneratorV3(registry.definitions);
|
|
683
|
+
const document = generator.generateDocument({
|
|
684
|
+
openapi: '3.0.0',
|
|
685
|
+
info: {
|
|
686
|
+
title: 'AI Aggregator API',
|
|
687
|
+
version: '1.0.0',
|
|
688
|
+
},
|
|
689
|
+
servers: [{ url: '/' }],
|
|
690
|
+
});
|
|
691
|
+
|
|
692
|
+
const outputPath = resolve(process.cwd(), process.argv[2] ?? 'libs/contract/build/openapi.json');
|
|
693
|
+
|
|
694
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
695
|
+
await writeFile(outputPath, JSON.stringify(document, null, 2), 'utf-8');
|
|
696
|
+
|
|
697
|
+
console.log(`OpenAPI generated: ${outputPath}`);
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
void main();
|