@ai-grator/api 0.2.66 → 0.3.67
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/admin/endpoints/admin.ts +16 -0
- package/admin/endpoints/commands/create-admin-trend-category.command.ts +29 -0
- package/admin/endpoints/commands/create-admin-trend.command.ts +30 -0
- package/admin/endpoints/commands/delete-admin-trend-category.command.ts +28 -0
- package/admin/endpoints/commands/delete-admin-trend.command.ts +28 -0
- package/admin/endpoints/commands/index.ts +9 -0
- package/admin/endpoints/commands/probe-admin-trend-reference-video.command.ts +37 -0
- package/admin/endpoints/commands/reorder-admin-trends.command.ts +31 -0
- package/admin/endpoints/commands/update-admin-trend-category.command.ts +36 -0
- package/admin/endpoints/commands/update-admin-trend-status.command.ts +37 -0
- package/admin/endpoints/commands/update-admin-trend.command.ts +36 -0
- package/admin/endpoints/queries/get-admin-trend-categories.query.ts +22 -0
- package/admin/endpoints/queries/get-admin-trend.query.ts +29 -0
- package/admin/endpoints/queries/get-admin-trends.query.ts +36 -0
- package/admin/endpoints/queries/index.ts +3 -0
- package/admin/models/admin-trend-category-response.schema.ts +11 -0
- package/admin/models/admin-trend-response.schema.ts +61 -0
- package/admin/models/index.ts +2 -0
- package/build/admin/endpoints/admin.d.ts +12 -0
- package/build/admin/endpoints/admin.d.ts.map +1 -1
- package/build/admin/endpoints/admin.js +14 -0
- package/build/admin/endpoints/commands/create-admin-trend-category.command.d.ts +41 -0
- package/build/admin/endpoints/commands/create-admin-trend-category.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/create-admin-trend-category.command.js +25 -0
- package/build/admin/endpoints/commands/create-admin-trend.command.d.ts +144 -0
- package/build/admin/endpoints/commands/create-admin-trend.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/create-admin-trend.command.js +26 -0
- package/build/admin/endpoints/commands/delete-admin-trend-category.command.d.ts +26 -0
- package/build/admin/endpoints/commands/delete-admin-trend-category.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/delete-admin-trend-category.command.js +25 -0
- package/build/admin/endpoints/commands/delete-admin-trend.command.d.ts +26 -0
- package/build/admin/endpoints/commands/delete-admin-trend.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/delete-admin-trend.command.js +25 -0
- package/build/admin/endpoints/commands/index.d.ts +9 -0
- package/build/admin/endpoints/commands/index.d.ts.map +1 -1
- package/build/admin/endpoints/commands/index.js +9 -0
- package/build/admin/endpoints/commands/probe-admin-trend-reference-video.command.d.ts +37 -0
- package/build/admin/endpoints/commands/probe-admin-trend-reference-video.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/probe-admin-trend-reference-video.command.js +32 -0
- package/build/admin/endpoints/commands/reorder-admin-trends.command.d.ts +26 -0
- package/build/admin/endpoints/commands/reorder-admin-trends.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/reorder-admin-trends.command.js +28 -0
- package/build/admin/endpoints/commands/update-admin-trend-category.command.d.ts +49 -0
- package/build/admin/endpoints/commands/update-admin-trend-category.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-trend-category.command.js +31 -0
- package/build/admin/endpoints/commands/update-admin-trend-status.command.d.ts +118 -0
- package/build/admin/endpoints/commands/update-admin-trend-status.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-trend-status.command.js +32 -0
- package/build/admin/endpoints/commands/update-admin-trend.command.d.ts +151 -0
- package/build/admin/endpoints/commands/update-admin-trend.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-trend.command.js +31 -0
- package/build/admin/endpoints/queries/get-admin-trend-categories.query.d.ts +32 -0
- package/build/admin/endpoints/queries/get-admin-trend-categories.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-trend-categories.query.js +21 -0
- package/build/admin/endpoints/queries/get-admin-trend.query.d.ts +110 -0
- package/build/admin/endpoints/queries/get-admin-trend.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-trend.query.js +26 -0
- package/build/admin/endpoints/queries/get-admin-trends.query.d.ts +63 -0
- package/build/admin/endpoints/queries/get-admin-trends.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-trends.query.js +33 -0
- package/build/admin/endpoints/queries/index.d.ts +3 -0
- package/build/admin/endpoints/queries/index.d.ts.map +1 -1
- package/build/admin/endpoints/queries/index.js +3 -0
- package/build/admin/models/admin-trend-category-response.schema.d.ts +10 -0
- package/build/admin/models/admin-trend-category-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-trend-category-response.schema.js +11 -0
- package/build/admin/models/admin-trend-response.schema.d.ts +79 -0
- package/build/admin/models/admin-trend-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-trend-response.schema.js +53 -0
- package/build/admin/models/index.d.ts +2 -0
- package/build/admin/models/index.d.ts.map +1 -1
- package/build/admin/models/index.js +2 -0
- package/build/errors/errors.d.ts +216 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +216 -0
- package/build/generation-job/endpoints/commands/create-generation-job.command.d.ts +2 -2
- package/build/generation-job/endpoints/commands/update-generation-job.command.d.ts +2 -2
- package/build/generation-job/endpoints/queries/get-generation-job-by-uuid.query.d.ts +2 -2
- package/build/generation-job/endpoints/queries/get-generation-job-history.query.d.ts +3 -3
- package/build/generation-job/endpoints/queries/get-generation-jobs.query.d.ts +2 -2
- package/build/generation-job/models/generation-job-response.schema.d.ts +1 -1
- package/build/generation-job/models/generation-job-response.schema.js +1 -1
- package/build/generation-job-chat/endpoints/commands/create-generation-job-chat.command.d.ts +2 -0
- package/build/generation-job-chat/endpoints/commands/create-generation-job-chat.command.d.ts.map +1 -1
- package/build/generation-job-chat/endpoints/commands/update-generation-job-chat.command.d.ts +2 -0
- package/build/generation-job-chat/endpoints/commands/update-generation-job-chat.command.d.ts.map +1 -1
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.d.ts +2 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.d.ts.map +1 -1
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.d.ts +2 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.d.ts.map +1 -1
- package/build/generation-job-chat/models/generation-job-chat-response.schema.d.ts +1 -0
- package/build/generation-job-chat/models/generation-job-chat-response.schema.d.ts.map +1 -1
- package/build/generation-job-chat/models/generation-job-chat-response.schema.js +1 -0
- package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts +2 -0
- package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts.map +1 -1
- package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts +2 -0
- package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts.map +1 -1
- package/build/generation-model/models/generation-model-response.schema.d.ts +3 -0
- package/build/generation-model/models/generation-model-response.schema.d.ts.map +1 -1
- package/build/generation-model/models/generation-model-response.schema.js +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -0
- package/build/referral/endpoints/referral.d.ts +3 -0
- package/build/referral/endpoints/referral.d.ts.map +1 -1
- package/build/referral/endpoints/referral.js +3 -0
- package/build/referral/models/index.d.ts +1 -0
- package/build/referral/models/index.d.ts.map +1 -1
- package/build/referral/models/index.js +1 -0
- package/build/referral/models/referral-advertising-stats.schema.d.ts +101 -0
- package/build/referral/models/referral-advertising-stats.schema.d.ts.map +1 -0
- package/build/referral/models/referral-advertising-stats.schema.js +62 -0
- package/build/trend/endpoints/commands/generate-trend.command.d.ts +142 -0
- package/build/trend/endpoints/commands/generate-trend.command.d.ts.map +1 -0
- package/build/trend/endpoints/commands/generate-trend.command.js +54 -0
- package/build/trend/endpoints/commands/index.d.ts +2 -0
- package/build/trend/endpoints/commands/index.d.ts.map +1 -0
- package/build/trend/endpoints/commands/index.js +17 -0
- package/build/trend/endpoints/index.d.ts +4 -0
- package/build/trend/endpoints/index.d.ts.map +1 -0
- package/build/trend/endpoints/index.js +19 -0
- package/build/trend/endpoints/queries/get-public-trend-by-slug.query.d.ts +92 -0
- package/build/trend/endpoints/queries/get-public-trend-by-slug.query.d.ts.map +1 -0
- package/build/trend/endpoints/queries/get-public-trend-by-slug.query.js +24 -0
- package/build/trend/endpoints/queries/index.d.ts +4 -0
- package/build/trend/endpoints/queries/index.d.ts.map +1 -0
- package/build/trend/endpoints/queries/index.js +19 -0
- package/build/trend/endpoints/queries/list-public-trend-categories.query.d.ts +26 -0
- package/build/trend/endpoints/queries/list-public-trend-categories.query.d.ts.map +1 -0
- package/build/trend/endpoints/queries/list-public-trend-categories.query.js +19 -0
- package/build/trend/endpoints/queries/list-public-trends.query.d.ts +69 -0
- package/build/trend/endpoints/queries/list-public-trends.query.d.ts.map +1 -0
- package/build/trend/endpoints/queries/list-public-trends.query.js +28 -0
- package/build/trend/endpoints/trend.d.ts +11 -0
- package/build/trend/endpoints/trend.d.ts.map +1 -0
- package/build/trend/endpoints/trend.js +13 -0
- package/build/trend/enums/index.d.ts +6 -0
- package/build/trend/enums/index.d.ts.map +1 -0
- package/build/trend/enums/index.js +21 -0
- package/build/trend/enums/trend-aspect-ratio.enum.d.ts +9 -0
- package/build/trend/enums/trend-aspect-ratio.enum.d.ts.map +1 -0
- package/build/trend/enums/trend-aspect-ratio.enum.js +12 -0
- package/build/trend/enums/trend-field-type.enum.d.ts +5 -0
- package/build/trend/enums/trend-field-type.enum.d.ts.map +1 -0
- package/build/trend/enums/trend-field-type.enum.js +8 -0
- package/build/trend/enums/trend-limits.d.ts +11 -0
- package/build/trend/enums/trend-limits.d.ts.map +1 -0
- package/build/trend/enums/trend-limits.js +13 -0
- package/build/trend/enums/trend-quality.enum.d.ts +7 -0
- package/build/trend/enums/trend-quality.enum.d.ts.map +1 -0
- package/build/trend/enums/trend-quality.enum.js +10 -0
- package/build/trend/enums/trend-status.enum.d.ts +5 -0
- package/build/trend/enums/trend-status.enum.d.ts.map +1 -0
- package/build/trend/enums/trend-status.enum.js +8 -0
- package/build/trend/helpers/index.d.ts +2 -0
- package/build/trend/helpers/index.d.ts.map +1 -0
- package/build/trend/helpers/index.js +17 -0
- package/build/trend/helpers/trend-field-reference.helper.d.ts +4 -0
- package/build/trend/helpers/trend-field-reference.helper.d.ts.map +1 -0
- package/build/trend/helpers/trend-field-reference.helper.js +12 -0
- package/build/trend/index.d.ts +5 -0
- package/build/trend/index.d.ts.map +1 -0
- package/build/trend/index.js +20 -0
- package/build/trend/models/index.d.ts +5 -0
- package/build/trend/models/index.d.ts.map +1 -0
- package/build/trend/models/index.js +20 -0
- package/build/trend/models/public-trend.schema.d.ts +88 -0
- package/build/trend/models/public-trend.schema.d.ts.map +1 -0
- package/build/trend/models/public-trend.schema.js +44 -0
- package/build/trend/models/trend-category-input.schema.d.ts +7 -0
- package/build/trend/models/trend-category-input.schema.d.ts.map +1 -0
- package/build/trend/models/trend-category-input.schema.js +10 -0
- package/build/trend/models/trend-common.schema.d.ts +10 -0
- package/build/trend/models/trend-common.schema.d.ts.map +1 -0
- package/build/trend/models/trend-common.schema.js +17 -0
- package/build/trend/models/trend-input.schema.d.ts +33 -0
- package/build/trend/models/trend-input.schema.d.ts.map +1 -0
- package/build/trend/models/trend-input.schema.js +54 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/video-generation-chain/endpoints/commands/cancel-video-generation-chain.command.d.ts +112 -0
- package/build/video-generation-chain/endpoints/commands/cancel-video-generation-chain.command.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/commands/cancel-video-generation-chain.command.js +26 -0
- package/build/video-generation-chain/endpoints/commands/create-video-generation-chain.command.d.ts +120 -0
- package/build/video-generation-chain/endpoints/commands/create-video-generation-chain.command.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/commands/create-video-generation-chain.command.js +52 -0
- package/build/video-generation-chain/endpoints/commands/index.d.ts +6 -0
- package/build/video-generation-chain/endpoints/commands/index.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/commands/index.js +21 -0
- package/build/video-generation-chain/endpoints/commands/regenerate-video-generation-chain-scene.command.d.ts +114 -0
- package/build/video-generation-chain/endpoints/commands/regenerate-video-generation-chain-scene.command.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/commands/regenerate-video-generation-chain-scene.command.js +25 -0
- package/build/video-generation-chain/endpoints/commands/resume-video-generation-chain.command.d.ts +113 -0
- package/build/video-generation-chain/endpoints/commands/resume-video-generation-chain.command.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/commands/resume-video-generation-chain.command.js +27 -0
- package/build/video-generation-chain/endpoints/commands/update-video-generation-chain-scene.command.d.ts +127 -0
- package/build/video-generation-chain/endpoints/commands/update-video-generation-chain-scene.command.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/commands/update-video-generation-chain-scene.command.js +43 -0
- package/build/video-generation-chain/endpoints/index.d.ts +4 -0
- package/build/video-generation-chain/endpoints/index.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/index.js +19 -0
- package/build/video-generation-chain/endpoints/queries/get-video-generation-chain-by-uuid.query.d.ts +111 -0
- package/build/video-generation-chain/endpoints/queries/get-video-generation-chain-by-uuid.query.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/queries/get-video-generation-chain-by-uuid.query.js +25 -0
- package/build/video-generation-chain/endpoints/queries/get-video-generation-chain-config.query.d.ts +109 -0
- package/build/video-generation-chain/endpoints/queries/get-video-generation-chain-config.query.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/queries/get-video-generation-chain-config.query.js +22 -0
- package/build/video-generation-chain/endpoints/queries/get-video-generation-chains.query.d.ts +54 -0
- package/build/video-generation-chain/endpoints/queries/get-video-generation-chains.query.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/queries/get-video-generation-chains.query.js +26 -0
- package/build/video-generation-chain/endpoints/queries/index.d.ts +4 -0
- package/build/video-generation-chain/endpoints/queries/index.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/queries/index.js +19 -0
- package/build/video-generation-chain/endpoints/video-generation-chain.d.ts +12 -0
- package/build/video-generation-chain/endpoints/video-generation-chain.d.ts.map +1 -0
- package/build/video-generation-chain/endpoints/video-generation-chain.js +14 -0
- package/build/video-generation-chain/enums/index.d.ts +5 -0
- package/build/video-generation-chain/enums/index.d.ts.map +1 -0
- package/build/video-generation-chain/enums/index.js +20 -0
- package/build/video-generation-chain/enums/video-generation-chain-frame-slot.enum.d.ts +6 -0
- package/build/video-generation-chain/enums/video-generation-chain-frame-slot.enum.d.ts.map +1 -0
- package/build/video-generation-chain/enums/video-generation-chain-frame-slot.enum.js +13 -0
- package/build/video-generation-chain/enums/video-generation-chain-limits.d.ts +3 -0
- package/build/video-generation-chain/enums/video-generation-chain-limits.d.ts.map +1 -0
- package/build/video-generation-chain/enums/video-generation-chain-limits.js +5 -0
- package/build/video-generation-chain/enums/video-generation-chain-scene-status.enum.d.ts +7 -0
- package/build/video-generation-chain/enums/video-generation-chain-scene-status.enum.d.ts.map +1 -0
- package/build/video-generation-chain/enums/video-generation-chain-scene-status.enum.js +10 -0
- package/build/video-generation-chain/enums/video-generation-chain-status.enum.d.ts +9 -0
- package/build/video-generation-chain/enums/video-generation-chain-status.enum.d.ts.map +1 -0
- package/build/video-generation-chain/enums/video-generation-chain-status.enum.js +12 -0
- package/build/video-generation-chain/index.d.ts +4 -0
- package/build/video-generation-chain/index.d.ts.map +1 -0
- package/build/video-generation-chain/index.js +19 -0
- package/build/video-generation-chain/models/index.d.ts +4 -0
- package/build/video-generation-chain/models/index.d.ts.map +1 -0
- package/build/video-generation-chain/models/index.js +19 -0
- package/build/video-generation-chain/models/video-generation-chain-response.schema.d.ts +73 -0
- package/build/video-generation-chain/models/video-generation-chain-response.schema.d.ts.map +1 -0
- package/build/video-generation-chain/models/video-generation-chain-response.schema.js +24 -0
- package/build/video-generation-chain/models/video-generation-chain-scene-input.schema.d.ts +9 -0
- package/build/video-generation-chain/models/video-generation-chain-scene-input.schema.d.ts.map +1 -0
- package/build/video-generation-chain/models/video-generation-chain-scene-input.schema.js +15 -0
- package/build/video-generation-chain/models/video-generation-chain-scene-response.schema.d.ts +44 -0
- package/build/video-generation-chain/models/video-generation-chain-scene-response.schema.d.ts.map +1 -0
- package/build/video-generation-chain/models/video-generation-chain-scene-response.schema.js +24 -0
- package/errors/errors.ts +216 -0
- package/generation-job/models/generation-job-response.schema.ts +1 -1
- package/generation-job-chat/models/generation-job-chat-response.schema.ts +1 -0
- package/generation-model/models/generation-model-response.schema.ts +1 -0
- package/index.ts +2 -0
- package/package.json +1 -1
- package/referral/endpoints/referral.ts +3 -0
- package/referral/models/index.ts +1 -0
- package/referral/models/referral-advertising-stats.schema.ts +79 -0
- package/trend/endpoints/commands/generate-trend.command.ts +63 -0
- package/trend/endpoints/commands/index.ts +1 -0
- package/trend/endpoints/index.ts +3 -0
- package/trend/endpoints/queries/get-public-trend-by-slug.query.ts +27 -0
- package/trend/endpoints/queries/index.ts +3 -0
- package/trend/endpoints/queries/list-public-trend-categories.query.ts +20 -0
- package/trend/endpoints/queries/list-public-trends.query.ts +31 -0
- package/trend/endpoints/trend.ts +13 -0
- package/trend/enums/index.ts +5 -0
- package/trend/enums/trend-aspect-ratio.enum.ts +8 -0
- package/trend/enums/trend-field-type.enum.ts +4 -0
- package/trend/enums/trend-limits.ts +10 -0
- package/trend/enums/trend-quality.enum.ts +7 -0
- package/trend/enums/trend-status.enum.ts +4 -0
- package/trend/helpers/index.ts +1 -0
- package/trend/helpers/trend-field-reference.helper.ts +9 -0
- package/trend/index.ts +4 -0
- package/trend/models/index.ts +4 -0
- package/trend/models/public-trend.schema.ts +58 -0
- package/trend/models/trend-category-input.schema.ts +10 -0
- package/trend/models/trend-common.schema.ts +26 -0
- package/trend/models/trend-input.schema.ts +69 -0
- package/video-generation-chain/endpoints/commands/cancel-video-generation-chain.command.ts +26 -0
- package/video-generation-chain/endpoints/commands/create-video-generation-chain.command.ts +59 -0
- package/video-generation-chain/endpoints/commands/index.ts +5 -0
- package/video-generation-chain/endpoints/commands/regenerate-video-generation-chain-scene.command.ts +25 -0
- package/video-generation-chain/endpoints/commands/resume-video-generation-chain.command.ts +27 -0
- package/video-generation-chain/endpoints/commands/update-video-generation-chain-scene.command.ts +49 -0
- package/video-generation-chain/endpoints/index.ts +3 -0
- package/video-generation-chain/endpoints/queries/get-video-generation-chain-by-uuid.query.ts +25 -0
- package/video-generation-chain/endpoints/queries/get-video-generation-chain-config.query.ts +23 -0
- package/video-generation-chain/endpoints/queries/get-video-generation-chains.query.ts +26 -0
- package/video-generation-chain/endpoints/queries/index.ts +3 -0
- package/video-generation-chain/endpoints/video-generation-chain.ts +12 -0
- package/video-generation-chain/enums/index.ts +4 -0
- package/video-generation-chain/enums/video-generation-chain-frame-slot.enum.ts +10 -0
- package/video-generation-chain/enums/video-generation-chain-limits.ts +2 -0
- package/video-generation-chain/enums/video-generation-chain-scene-status.enum.ts +6 -0
- package/video-generation-chain/enums/video-generation-chain-status.enum.ts +8 -0
- package/video-generation-chain/index.ts +3 -0
- package/video-generation-chain/models/index.ts +3 -0
- package/video-generation-chain/models/video-generation-chain-response.schema.ts +28 -0
- package/video-generation-chain/models/video-generation-chain-scene-input.schema.ts +17 -0
- package/video-generation-chain/models/video-generation-chain-scene-response.schema.ts +26 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { VideoGenerationChainResponseSchema } from '../../models';
|
|
4
|
+
import { VIDEO_GENERATION_CHAIN_ROUTES } from '../video-generation-chain';
|
|
5
|
+
|
|
6
|
+
export const ResumeVideoGenerationChainCommandParams = z.object({
|
|
7
|
+
uuid: z.uuid(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const ResumeVideoGenerationChainCommandResponse = VideoGenerationChainResponseSchema;
|
|
11
|
+
|
|
12
|
+
export const ResumeVideoGenerationChainCommand = defineContract({
|
|
13
|
+
method: HTTP_METHODS.POST,
|
|
14
|
+
path: VIDEO_GENERATION_CHAIN_ROUTES.RESUME(':uuid'),
|
|
15
|
+
summary: 'Resume a paused generation chain from the first ungenerated scene',
|
|
16
|
+
request: {
|
|
17
|
+
params: ResumeVideoGenerationChainCommandParams,
|
|
18
|
+
},
|
|
19
|
+
responses: {
|
|
20
|
+
200: ResumeVideoGenerationChainCommandResponse,
|
|
21
|
+
400: HttpErrorResponseSchema,
|
|
22
|
+
401: HttpErrorResponseSchema,
|
|
23
|
+
404: HttpErrorResponseSchema,
|
|
24
|
+
409: HttpErrorResponseSchema,
|
|
25
|
+
500: HttpErrorResponseSchema,
|
|
26
|
+
},
|
|
27
|
+
});
|
package/video-generation-chain/endpoints/commands/update-video-generation-chain-scene.command.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { VIDEO_GENERATION_CHAIN_MAX_SCENES } from '../../enums';
|
|
4
|
+
import {
|
|
5
|
+
VideoGenerationChainResponseSchema,
|
|
6
|
+
VideoGenerationChainSceneAttachmentsSchema,
|
|
7
|
+
VideoGenerationChainSceneParamsSchema,
|
|
8
|
+
} from '../../models';
|
|
9
|
+
import { VIDEO_GENERATION_CHAIN_ROUTES } from '../video-generation-chain';
|
|
10
|
+
|
|
11
|
+
export const VideoGenerationChainSceneParams = z.object({
|
|
12
|
+
uuid: z.uuid(),
|
|
13
|
+
index: z.coerce
|
|
14
|
+
.number()
|
|
15
|
+
.int()
|
|
16
|
+
.min(0)
|
|
17
|
+
.max(VIDEO_GENERATION_CHAIN_MAX_SCENES - 1),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const UpdateVideoGenerationChainSceneCommandParams = VideoGenerationChainSceneParams;
|
|
21
|
+
|
|
22
|
+
export const UpdateVideoGenerationChainSceneCommandBody = z
|
|
23
|
+
.object({
|
|
24
|
+
params: VideoGenerationChainSceneParamsSchema.optional(),
|
|
25
|
+
attachments: VideoGenerationChainSceneAttachmentsSchema.optional(),
|
|
26
|
+
})
|
|
27
|
+
.refine((body) => body.params !== undefined || body.attachments !== undefined, {
|
|
28
|
+
message: 'At least one of params or attachments is required',
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const UpdateVideoGenerationChainSceneCommandResponse = VideoGenerationChainResponseSchema;
|
|
32
|
+
|
|
33
|
+
export const UpdateVideoGenerationChainSceneCommand = defineContract({
|
|
34
|
+
method: HTTP_METHODS.PATCH,
|
|
35
|
+
path: VIDEO_GENERATION_CHAIN_ROUTES.UPDATE_SCENE(':uuid', ':index'),
|
|
36
|
+
summary: 'Update a pending or failed scene of a paused generation chain',
|
|
37
|
+
request: {
|
|
38
|
+
params: UpdateVideoGenerationChainSceneCommandParams,
|
|
39
|
+
body: UpdateVideoGenerationChainSceneCommandBody,
|
|
40
|
+
},
|
|
41
|
+
responses: {
|
|
42
|
+
200: UpdateVideoGenerationChainSceneCommandResponse,
|
|
43
|
+
400: HttpErrorResponseSchema,
|
|
44
|
+
401: HttpErrorResponseSchema,
|
|
45
|
+
404: HttpErrorResponseSchema,
|
|
46
|
+
409: HttpErrorResponseSchema,
|
|
47
|
+
500: HttpErrorResponseSchema,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { VideoGenerationChainResponseSchema } from '../../models';
|
|
4
|
+
import { VIDEO_GENERATION_CHAIN_ROUTES } from '../video-generation-chain';
|
|
5
|
+
|
|
6
|
+
export const GetVideoGenerationChainByUuidQueryParams = z.object({
|
|
7
|
+
uuid: z.uuid(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const GetVideoGenerationChainByUuidQueryResponse = VideoGenerationChainResponseSchema;
|
|
11
|
+
|
|
12
|
+
export const GetVideoGenerationChainByUuidQuery = defineContract({
|
|
13
|
+
method: HTTP_METHODS.GET,
|
|
14
|
+
path: VIDEO_GENERATION_CHAIN_ROUTES.GET_BY_UUID(':uuid'),
|
|
15
|
+
summary: 'Get generation chain with its scenes',
|
|
16
|
+
request: {
|
|
17
|
+
params: GetVideoGenerationChainByUuidQueryParams,
|
|
18
|
+
},
|
|
19
|
+
responses: {
|
|
20
|
+
200: GetVideoGenerationChainByUuidQueryResponse,
|
|
21
|
+
401: HttpErrorResponseSchema,
|
|
22
|
+
404: HttpErrorResponseSchema,
|
|
23
|
+
500: HttpErrorResponseSchema,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { GenerationModelResponseSchema } from '../../../generation-model';
|
|
4
|
+
import { VIDEO_GENERATION_CHAIN_ROUTES } from '../video-generation-chain';
|
|
5
|
+
|
|
6
|
+
export const GetVideoGenerationChainConfigResponse = z.object({
|
|
7
|
+
models: z.array(GenerationModelResponseSchema),
|
|
8
|
+
minScenes: z.int().positive(),
|
|
9
|
+
maxScenes: z.int().positive(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type GetVideoGenerationChainConfigResponseType = z.infer<typeof GetVideoGenerationChainConfigResponse>;
|
|
13
|
+
|
|
14
|
+
export const GetVideoGenerationChainConfigQuery = defineContract({
|
|
15
|
+
method: HTTP_METHODS.GET,
|
|
16
|
+
path: VIDEO_GENERATION_CHAIN_ROUTES.GET_CONFIG,
|
|
17
|
+
summary: 'Get generation chain config (available models and scene limits)',
|
|
18
|
+
responses: {
|
|
19
|
+
200: GetVideoGenerationChainConfigResponse,
|
|
20
|
+
401: HttpErrorResponseSchema,
|
|
21
|
+
500: HttpErrorResponseSchema,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, defineCursorPaginationQuery, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { VideoGenerationChainListItemSchema } from '../../models';
|
|
4
|
+
import { VIDEO_GENERATION_CHAIN_ROUTES } from '../video-generation-chain';
|
|
5
|
+
|
|
6
|
+
export const GetVideoGenerationChainsQueryQuery = defineCursorPaginationQuery(z.uuid());
|
|
7
|
+
|
|
8
|
+
export const GetVideoGenerationChainsQueryResponse = z.object({
|
|
9
|
+
chains: z.array(VideoGenerationChainListItemSchema),
|
|
10
|
+
nextCursor: z.uuid().nullable(),
|
|
11
|
+
hasMore: z.boolean(),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const GetVideoGenerationChainsQuery = defineContract({
|
|
15
|
+
method: HTTP_METHODS.GET,
|
|
16
|
+
path: VIDEO_GENERATION_CHAIN_ROUTES.GET_ALL,
|
|
17
|
+
summary: 'Get generation chains of the current user with cursor pagination',
|
|
18
|
+
request: {
|
|
19
|
+
query: GetVideoGenerationChainsQueryQuery,
|
|
20
|
+
},
|
|
21
|
+
responses: {
|
|
22
|
+
200: GetVideoGenerationChainsQueryResponse,
|
|
23
|
+
401: HttpErrorResponseSchema,
|
|
24
|
+
500: HttpErrorResponseSchema,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const VIDEO_GENERATION_CHAIN_CONTROLLER = 'video-generation-chains' as const;
|
|
2
|
+
|
|
3
|
+
export const VIDEO_GENERATION_CHAIN_ROUTES = {
|
|
4
|
+
CREATE: '',
|
|
5
|
+
GET_ALL: '',
|
|
6
|
+
GET_CONFIG: 'config',
|
|
7
|
+
GET_BY_UUID: (uuid: string) => `${uuid}`,
|
|
8
|
+
RESUME: (uuid: string) => `${uuid}/resume`,
|
|
9
|
+
CANCEL: (uuid: string) => `${uuid}/cancel`,
|
|
10
|
+
UPDATE_SCENE: (uuid: string, index: string) => `${uuid}/scenes/${index}`,
|
|
11
|
+
REGENERATE_SCENE: (uuid: string, index: string) => `${uuid}/scenes/${index}/regenerate`,
|
|
12
|
+
} as const;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export enum VIDEO_GENERATION_CHAIN_FRAME_SLOT {
|
|
2
|
+
FIRST_FRAME = 'first_frame_url',
|
|
3
|
+
LAST_FRAME = 'last_frame_url',
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const VIDEO_GENERATION_CHAIN_RESERVED_PARAM_KEYS: readonly string[] = [
|
|
7
|
+
VIDEO_GENERATION_CHAIN_FRAME_SLOT.FIRST_FRAME,
|
|
8
|
+
VIDEO_GENERATION_CHAIN_FRAME_SLOT.LAST_FRAME,
|
|
9
|
+
'return_last_frame',
|
|
10
|
+
];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { VIDEO_GENERATION_CHAIN_STATUS } from '../enums';
|
|
3
|
+
import { VideoGenerationChainSceneResponseSchema } from './video-generation-chain-scene-response.schema';
|
|
4
|
+
|
|
5
|
+
export const VideoGenerationChainStatusSchema = z.enum(VIDEO_GENERATION_CHAIN_STATUS);
|
|
6
|
+
|
|
7
|
+
export const VideoGenerationChainSummarySchema = z.object({
|
|
8
|
+
uuid: z.uuid(),
|
|
9
|
+
modelId: z.uuid(),
|
|
10
|
+
status: VideoGenerationChainStatusSchema,
|
|
11
|
+
errorCode: z.string().nullable(),
|
|
12
|
+
errorMessage: z.string().nullable(),
|
|
13
|
+
finishedAt: z.iso.datetime().nullable(),
|
|
14
|
+
createdAt: z.iso.datetime(),
|
|
15
|
+
updatedAt: z.iso.datetime(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const VideoGenerationChainResponseSchema = VideoGenerationChainSummarySchema.extend({
|
|
19
|
+
scenes: z.array(VideoGenerationChainSceneResponseSchema),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const VideoGenerationChainListItemSchema = VideoGenerationChainSummarySchema.extend({
|
|
23
|
+
scenesTotal: z.number().int().nonnegative(),
|
|
24
|
+
scenesSucceeded: z.number().int().nonnegative(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type VideoGenerationChainResponseSchemaType = z.infer<typeof VideoGenerationChainResponseSchema>;
|
|
28
|
+
export type VideoGenerationChainListItemSchemaType = z.infer<typeof VideoGenerationChainListItemSchema>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { VIDEO_GENERATION_CHAIN_RESERVED_PARAM_KEYS } from '../enums';
|
|
3
|
+
|
|
4
|
+
export const VideoGenerationChainSceneParamsSchema = z
|
|
5
|
+
.record(z.string(), z.unknown())
|
|
6
|
+
.refine((params) => VIDEO_GENERATION_CHAIN_RESERVED_PARAM_KEYS.every((key) => !(key in params)), {
|
|
7
|
+
message: `Params must not contain: ${VIDEO_GENERATION_CHAIN_RESERVED_PARAM_KEYS.join(', ')}`,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const VideoGenerationChainSceneAttachmentsSchema = z.record(z.string(), z.array(z.uuid()));
|
|
11
|
+
|
|
12
|
+
export const VideoGenerationChainSceneInputSchema = z.object({
|
|
13
|
+
params: VideoGenerationChainSceneParamsSchema,
|
|
14
|
+
attachments: VideoGenerationChainSceneAttachmentsSchema.optional(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type VideoGenerationChainSceneInputSchemaType = z.infer<typeof VideoGenerationChainSceneInputSchema>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { GenerationJobAttachmentFileSchema, GenerationJobOutputSchema } from '../../generation-job';
|
|
3
|
+
import { VIDEO_GENERATION_CHAIN_SCENE_STATUS } from '../enums';
|
|
4
|
+
|
|
5
|
+
export const VideoGenerationChainSceneStatusSchema = z.enum(VIDEO_GENERATION_CHAIN_SCENE_STATUS);
|
|
6
|
+
|
|
7
|
+
export const VideoGenerationChainSceneFrameSchema = z.object({
|
|
8
|
+
uuid: z.uuid(),
|
|
9
|
+
url: z.url(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const VideoGenerationChainSceneResponseSchema = z.object({
|
|
13
|
+
index: z.number().int().nonnegative(),
|
|
14
|
+
status: VideoGenerationChainSceneStatusSchema,
|
|
15
|
+
params: z.record(z.string(), z.unknown()),
|
|
16
|
+
attachments: z.record(z.string(), z.array(GenerationJobAttachmentFileSchema)),
|
|
17
|
+
generationJobId: z.uuid().nullable(),
|
|
18
|
+
output: GenerationJobOutputSchema.nullable(),
|
|
19
|
+
lastFrame: VideoGenerationChainSceneFrameSchema.nullable(),
|
|
20
|
+
errorCode: z.string().nullable(),
|
|
21
|
+
errorMessage: z.string().nullable(),
|
|
22
|
+
startedAt: z.iso.datetime().nullable(),
|
|
23
|
+
finishedAt: z.iso.datetime().nullable(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export type VideoGenerationChainSceneResponseSchemaType = z.infer<typeof VideoGenerationChainSceneResponseSchema>;
|