clhq-postgres-module 1.1.0-alpha.162 → 1.1.0-alpha.164
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/dist/entities/ai-video-job.entity.d.ts +42 -0
- package/dist/entities/ai-video-job.entity.js +147 -0
- package/dist/entities/ai-video-scene-task.entity.d.ts +40 -0
- package/dist/entities/ai-video-scene-task.entity.js +149 -0
- package/dist/entities/asset-category.entity.d.ts +11 -0
- package/dist/entities/asset-category.entity.js +54 -0
- package/dist/entities/asset.entity.d.ts +6 -1
- package/dist/entities/asset.entity.js +5 -0
- package/dist/entities/brand-asset.entity.d.ts +26 -0
- package/dist/entities/brand-asset.entity.js +78 -0
- package/dist/entities/brand-kit.entity.d.ts +20 -0
- package/dist/entities/brand-kit.entity.js +91 -0
- package/dist/entities/index.d.ts +6 -0
- package/dist/entities/index.js +6 -0
- package/dist/entities/project-brand-override.entity.d.ts +12 -0
- package/dist/entities/project-brand-override.entity.js +64 -0
- package/dist/entities/workspace.entity.d.ts +4 -0
- package/dist/entities/workspace.entity.js +24 -1
- package/dist/postgres.module.js +2 -0
- package/dist/repositories/ai-video-job.repository.d.ts +19 -0
- package/dist/repositories/ai-video-job.repository.js +78 -0
- package/dist/repositories/ai-video-scene-task.repository.d.ts +15 -0
- package/dist/repositories/ai-video-scene-task.repository.js +65 -0
- package/dist/repositories/asset-category.repository.d.ts +9 -0
- package/dist/repositories/asset-category.repository.js +43 -0
- package/dist/repositories/brand-asset.repository.d.ts +12 -0
- package/dist/repositories/brand-asset.repository.js +54 -0
- package/dist/repositories/brand-kit.repository.d.ts +11 -0
- package/dist/repositories/brand-kit.repository.js +52 -0
- package/dist/repositories/index.d.ts +6 -0
- package/dist/repositories/index.js +13 -1
- package/dist/repositories/project-brand-override.repository.d.ts +10 -0
- package/dist/repositories/project-brand-override.repository.js +50 -0
- package/dist/repositories/repository.module.js +12 -0
- package/package.json +7 -5
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare enum AiVideoJobStatus {
|
|
2
|
+
PENDING = "pending",
|
|
3
|
+
GENERATING_SCRIPT = "generating_script",
|
|
4
|
+
GENERATING_VOICE = "generating_voice",
|
|
5
|
+
FINDING_MUSIC = "finding_music",
|
|
6
|
+
FINDING_VISUALS = "finding_visuals",
|
|
7
|
+
GENERATING_SCENES = "generating_scenes",
|
|
8
|
+
ASSEMBLING_VIDEO = "assembling_video",
|
|
9
|
+
RENDERING_VIDEO = "rendering_video",
|
|
10
|
+
COMPLETED = "completed",
|
|
11
|
+
FAILED = "failed"
|
|
12
|
+
}
|
|
13
|
+
export declare class AiVideoJob {
|
|
14
|
+
id: string;
|
|
15
|
+
userId: string;
|
|
16
|
+
workspaceId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
projectTitle: string;
|
|
19
|
+
prompt: string;
|
|
20
|
+
agentId: string;
|
|
21
|
+
duration: number;
|
|
22
|
+
aspectRatio: string;
|
|
23
|
+
language: string;
|
|
24
|
+
style: string;
|
|
25
|
+
voiceEnabled: boolean;
|
|
26
|
+
voiceId: string;
|
|
27
|
+
musicEnabled: boolean;
|
|
28
|
+
status: AiVideoJobStatus;
|
|
29
|
+
progress: number;
|
|
30
|
+
totalDurationSeconds: number;
|
|
31
|
+
totalScenes: number;
|
|
32
|
+
script: string;
|
|
33
|
+
voiceAudioUrl: string;
|
|
34
|
+
backgroundMusicUrl: string;
|
|
35
|
+
outputUrl: string;
|
|
36
|
+
canvasProjectId: string;
|
|
37
|
+
isPremiumUser: boolean;
|
|
38
|
+
klingScenesCount: number;
|
|
39
|
+
errorMessage: string;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
updatedAt: Date;
|
|
42
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AiVideoJob = exports.AiVideoJobStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
var AiVideoJobStatus;
|
|
15
|
+
(function (AiVideoJobStatus) {
|
|
16
|
+
AiVideoJobStatus["PENDING"] = "pending";
|
|
17
|
+
AiVideoJobStatus["GENERATING_SCRIPT"] = "generating_script";
|
|
18
|
+
AiVideoJobStatus["GENERATING_VOICE"] = "generating_voice";
|
|
19
|
+
AiVideoJobStatus["FINDING_MUSIC"] = "finding_music";
|
|
20
|
+
AiVideoJobStatus["FINDING_VISUALS"] = "finding_visuals";
|
|
21
|
+
AiVideoJobStatus["GENERATING_SCENES"] = "generating_scenes";
|
|
22
|
+
AiVideoJobStatus["ASSEMBLING_VIDEO"] = "assembling_video";
|
|
23
|
+
AiVideoJobStatus["RENDERING_VIDEO"] = "rendering_video";
|
|
24
|
+
AiVideoJobStatus["COMPLETED"] = "completed";
|
|
25
|
+
AiVideoJobStatus["FAILED"] = "failed";
|
|
26
|
+
})(AiVideoJobStatus || (exports.AiVideoJobStatus = AiVideoJobStatus = {}));
|
|
27
|
+
let AiVideoJob = class AiVideoJob {
|
|
28
|
+
};
|
|
29
|
+
exports.AiVideoJob = AiVideoJob;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.PrimaryColumn)({ type: 'varchar' }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], AiVideoJob.prototype, "id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ name: 'user_id', type: 'varchar' }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], AiVideoJob.prototype, "userId", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ name: 'workspace_id', type: 'varchar', nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], AiVideoJob.prototype, "workspaceId", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ name: 'project_id', type: 'varchar', nullable: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], AiVideoJob.prototype, "projectId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ name: 'project_title', type: 'varchar', nullable: true }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], AiVideoJob.prototype, "projectTitle", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'text' }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], AiVideoJob.prototype, "prompt", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ name: 'agent_id', type: 'varchar' }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], AiVideoJob.prototype, "agentId", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], AiVideoJob.prototype, "duration", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ name: 'aspect_ratio', type: 'varchar', default: '16:9' }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], AiVideoJob.prototype, "aspectRatio", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ type: 'varchar', default: 'en' }),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], AiVideoJob.prototype, "language", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({ type: 'varchar', default: 'cinematic' }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], AiVideoJob.prototype, "style", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ name: 'voice_enabled', type: 'boolean', default: false }),
|
|
76
|
+
__metadata("design:type", Boolean)
|
|
77
|
+
], AiVideoJob.prototype, "voiceEnabled", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ name: 'voice_id', type: 'varchar', nullable: true }),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], AiVideoJob.prototype, "voiceId", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ name: 'music_enabled', type: 'boolean', default: false }),
|
|
84
|
+
__metadata("design:type", Boolean)
|
|
85
|
+
], AiVideoJob.prototype, "musicEnabled", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typeorm_1.Column)({ type: 'varchar', default: AiVideoJobStatus.PENDING }),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], AiVideoJob.prototype, "status", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.Column)({ type: 'integer', default: 0 }),
|
|
92
|
+
__metadata("design:type", Number)
|
|
93
|
+
], AiVideoJob.prototype, "progress", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, typeorm_1.Column)({ name: 'total_duration_seconds', type: 'integer', default: 0 }),
|
|
96
|
+
__metadata("design:type", Number)
|
|
97
|
+
], AiVideoJob.prototype, "totalDurationSeconds", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, typeorm_1.Column)({ name: 'total_scenes', type: 'integer', default: 0 }),
|
|
100
|
+
__metadata("design:type", Number)
|
|
101
|
+
], AiVideoJob.prototype, "totalScenes", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
104
|
+
__metadata("design:type", String)
|
|
105
|
+
], AiVideoJob.prototype, "script", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.Column)({ name: 'voice_audio_url', type: 'text', nullable: true }),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], AiVideoJob.prototype, "voiceAudioUrl", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, typeorm_1.Column)({ name: 'background_music_url', type: 'text', nullable: true }),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], AiVideoJob.prototype, "backgroundMusicUrl", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, typeorm_1.Column)({ name: 'output_url', type: 'text', nullable: true }),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], AiVideoJob.prototype, "outputUrl", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, typeorm_1.Column)({ name: 'canvas_project_id', type: 'varchar', nullable: true }),
|
|
120
|
+
__metadata("design:type", String)
|
|
121
|
+
], AiVideoJob.prototype, "canvasProjectId", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, typeorm_1.Column)({ name: 'is_premium_user', type: 'boolean', default: false }),
|
|
124
|
+
__metadata("design:type", Boolean)
|
|
125
|
+
], AiVideoJob.prototype, "isPremiumUser", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, typeorm_1.Column)({ name: 'kling_scenes_count', type: 'integer', default: 0 }),
|
|
128
|
+
__metadata("design:type", Number)
|
|
129
|
+
], AiVideoJob.prototype, "klingScenesCount", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, typeorm_1.Column)({ name: 'error_message', type: 'text', nullable: true }),
|
|
132
|
+
__metadata("design:type", String)
|
|
133
|
+
], AiVideoJob.prototype, "errorMessage", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
136
|
+
__metadata("design:type", Date)
|
|
137
|
+
], AiVideoJob.prototype, "createdAt", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
140
|
+
__metadata("design:type", Date)
|
|
141
|
+
], AiVideoJob.prototype, "updatedAt", void 0);
|
|
142
|
+
exports.AiVideoJob = AiVideoJob = __decorate([
|
|
143
|
+
(0, typeorm_1.Entity)('ai_video_jobs'),
|
|
144
|
+
(0, typeorm_1.Index)(['userId']),
|
|
145
|
+
(0, typeorm_1.Index)(['status']),
|
|
146
|
+
(0, typeorm_1.Index)(['createdAt'])
|
|
147
|
+
], AiVideoJob);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AiVideoJob } from './ai-video-job.entity';
|
|
2
|
+
export declare enum AiVideoSceneTaskStatus {
|
|
3
|
+
PENDING = "pending",
|
|
4
|
+
SEARCHING_STOCK = "searching_stock",
|
|
5
|
+
SUBMITTING_KLING = "submitting_kling",
|
|
6
|
+
GENERATING = "generating",
|
|
7
|
+
COMPLETED = "completed",
|
|
8
|
+
FAILED = "failed"
|
|
9
|
+
}
|
|
10
|
+
export declare class AiVideoSceneTask {
|
|
11
|
+
id: string;
|
|
12
|
+
jobId: string;
|
|
13
|
+
job: AiVideoJob;
|
|
14
|
+
sceneOrder: number;
|
|
15
|
+
sceneTitle: string;
|
|
16
|
+
description: string;
|
|
17
|
+
narration: string;
|
|
18
|
+
durationSeconds: number;
|
|
19
|
+
style: string;
|
|
20
|
+
shotType: string;
|
|
21
|
+
stockSearchQuery: string;
|
|
22
|
+
pexelsVideoId: number;
|
|
23
|
+
pixabayVideoId: number;
|
|
24
|
+
stockVideoUrl: string;
|
|
25
|
+
stockVideoConfidence: number;
|
|
26
|
+
mediaType: string;
|
|
27
|
+
klingTaskId: string;
|
|
28
|
+
outputUrl: string;
|
|
29
|
+
s3Url: string;
|
|
30
|
+
klingSubmitRequest: object;
|
|
31
|
+
klingSubmitResponse: object;
|
|
32
|
+
klingPollLog: object[];
|
|
33
|
+
voiceAudioUrl: string;
|
|
34
|
+
voiceoverDurationSeconds: number;
|
|
35
|
+
status: AiVideoSceneTaskStatus;
|
|
36
|
+
progress: number;
|
|
37
|
+
errorMessage: string;
|
|
38
|
+
createdAt: Date;
|
|
39
|
+
updatedAt: Date;
|
|
40
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AiVideoSceneTask = exports.AiVideoSceneTaskStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const ai_video_job_entity_1 = require("./ai-video-job.entity");
|
|
15
|
+
var AiVideoSceneTaskStatus;
|
|
16
|
+
(function (AiVideoSceneTaskStatus) {
|
|
17
|
+
AiVideoSceneTaskStatus["PENDING"] = "pending";
|
|
18
|
+
AiVideoSceneTaskStatus["SEARCHING_STOCK"] = "searching_stock";
|
|
19
|
+
AiVideoSceneTaskStatus["SUBMITTING_KLING"] = "submitting_kling";
|
|
20
|
+
AiVideoSceneTaskStatus["GENERATING"] = "generating";
|
|
21
|
+
AiVideoSceneTaskStatus["COMPLETED"] = "completed";
|
|
22
|
+
AiVideoSceneTaskStatus["FAILED"] = "failed";
|
|
23
|
+
})(AiVideoSceneTaskStatus || (exports.AiVideoSceneTaskStatus = AiVideoSceneTaskStatus = {}));
|
|
24
|
+
let AiVideoSceneTask = class AiVideoSceneTask {
|
|
25
|
+
};
|
|
26
|
+
exports.AiVideoSceneTask = AiVideoSceneTask;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.PrimaryColumn)({ type: 'varchar' }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], AiVideoSceneTask.prototype, "id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ name: 'job_id', type: 'varchar' }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], AiVideoSceneTask.prototype, "jobId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.ManyToOne)(() => ai_video_job_entity_1.AiVideoJob, { onDelete: 'CASCADE' }),
|
|
37
|
+
(0, typeorm_1.JoinColumn)({ name: 'job_id' }),
|
|
38
|
+
__metadata("design:type", ai_video_job_entity_1.AiVideoJob)
|
|
39
|
+
], AiVideoSceneTask.prototype, "job", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ name: 'scene_order', type: 'integer' }),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], AiVideoSceneTask.prototype, "sceneOrder", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ name: 'scene_title', type: 'varchar', nullable: true }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], AiVideoSceneTask.prototype, "sceneTitle", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], AiVideoSceneTask.prototype, "description", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], AiVideoSceneTask.prototype, "narration", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ name: 'duration_seconds', type: 'integer', nullable: true }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], AiVideoSceneTask.prototype, "durationSeconds", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], AiVideoSceneTask.prototype, "style", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ name: 'shot_type', type: 'varchar', nullable: true }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], AiVideoSceneTask.prototype, "shotType", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ name: 'stock_search_query', type: 'text', nullable: true }),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], AiVideoSceneTask.prototype, "stockSearchQuery", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ name: 'pexels_video_id', type: 'integer', nullable: true }),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], AiVideoSceneTask.prototype, "pexelsVideoId", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ name: 'pixabay_video_id', type: 'integer', nullable: true }),
|
|
78
|
+
__metadata("design:type", Number)
|
|
79
|
+
], AiVideoSceneTask.prototype, "pixabayVideoId", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({ name: 'stock_video_url', type: 'text', nullable: true }),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], AiVideoSceneTask.prototype, "stockVideoUrl", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ name: 'stock_video_confidence', type: 'decimal', precision: 3, scale: 2, nullable: true }),
|
|
86
|
+
__metadata("design:type", Number)
|
|
87
|
+
], AiVideoSceneTask.prototype, "stockVideoConfidence", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ name: 'media_type', type: 'varchar', default: 'video' }),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], AiVideoSceneTask.prototype, "mediaType", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.Column)({ name: 'kling_task_id', type: 'varchar', nullable: true }),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], AiVideoSceneTask.prototype, "klingTaskId", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({ name: 'output_url', type: 'text', nullable: true }),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], AiVideoSceneTask.prototype, "outputUrl", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({ name: 's3_url', type: 'text', nullable: true }),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], AiVideoSceneTask.prototype, "s3Url", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typeorm_1.Column)({ name: 'kling_submit_request', type: 'jsonb', nullable: true }),
|
|
106
|
+
__metadata("design:type", Object)
|
|
107
|
+
], AiVideoSceneTask.prototype, "klingSubmitRequest", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.Column)({ name: 'kling_submit_response', type: 'jsonb', nullable: true }),
|
|
110
|
+
__metadata("design:type", Object)
|
|
111
|
+
], AiVideoSceneTask.prototype, "klingSubmitResponse", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, typeorm_1.Column)({ name: 'kling_poll_log', type: 'jsonb', default: '[]' }),
|
|
114
|
+
__metadata("design:type", Array)
|
|
115
|
+
], AiVideoSceneTask.prototype, "klingPollLog", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, typeorm_1.Column)({ name: 'voice_audio_url', type: 'text', nullable: true }),
|
|
118
|
+
__metadata("design:type", String)
|
|
119
|
+
], AiVideoSceneTask.prototype, "voiceAudioUrl", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, typeorm_1.Column)({ name: 'voiceover_duration_seconds', type: 'decimal', precision: 6, scale: 2, nullable: true }),
|
|
122
|
+
__metadata("design:type", Number)
|
|
123
|
+
], AiVideoSceneTask.prototype, "voiceoverDurationSeconds", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, typeorm_1.Column)({ type: 'varchar', default: AiVideoSceneTaskStatus.PENDING }),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], AiVideoSceneTask.prototype, "status", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, typeorm_1.Column)({ type: 'integer', default: 0 }),
|
|
130
|
+
__metadata("design:type", Number)
|
|
131
|
+
], AiVideoSceneTask.prototype, "progress", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, typeorm_1.Column)({ name: 'error_message', type: 'text', nullable: true }),
|
|
134
|
+
__metadata("design:type", String)
|
|
135
|
+
], AiVideoSceneTask.prototype, "errorMessage", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
138
|
+
__metadata("design:type", Date)
|
|
139
|
+
], AiVideoSceneTask.prototype, "createdAt", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
142
|
+
__metadata("design:type", Date)
|
|
143
|
+
], AiVideoSceneTask.prototype, "updatedAt", void 0);
|
|
144
|
+
exports.AiVideoSceneTask = AiVideoSceneTask = __decorate([
|
|
145
|
+
(0, typeorm_1.Entity)('ai_video_scene_tasks'),
|
|
146
|
+
(0, typeorm_1.Index)(['jobId']),
|
|
147
|
+
(0, typeorm_1.Index)(['jobId', 'sceneOrder']),
|
|
148
|
+
(0, typeorm_1.Index)(['status'])
|
|
149
|
+
], AiVideoSceneTask);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Workspace } from './workspace.entity';
|
|
2
|
+
export declare class AssetCategory {
|
|
3
|
+
id: string;
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
workspace: Workspace;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string | null;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
updatedAt: Date;
|
|
10
|
+
deletedAt: Date | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AssetCategory = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const workspace_entity_1 = require("./workspace.entity");
|
|
15
|
+
let AssetCategory = class AssetCategory {
|
|
16
|
+
};
|
|
17
|
+
exports.AssetCategory = AssetCategory;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], AssetCategory.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ name: 'workspace_id', type: 'uuid' }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], AssetCategory.prototype, "workspaceId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.ManyToOne)(() => workspace_entity_1.Workspace, { nullable: false, onDelete: 'CASCADE' }),
|
|
28
|
+
(0, typeorm_1.JoinColumn)({ name: 'workspace_id' }),
|
|
29
|
+
__metadata("design:type", workspace_entity_1.Workspace)
|
|
30
|
+
], AssetCategory.prototype, "workspace", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], AssetCategory.prototype, "name", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], AssetCategory.prototype, "description", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
41
|
+
__metadata("design:type", Date)
|
|
42
|
+
], AssetCategory.prototype, "createdAt", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
45
|
+
__metadata("design:type", Date)
|
|
46
|
+
], AssetCategory.prototype, "updatedAt", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.DeleteDateColumn)({ name: 'deleted_at', nullable: true }),
|
|
49
|
+
__metadata("design:type", Date)
|
|
50
|
+
], AssetCategory.prototype, "deletedAt", void 0);
|
|
51
|
+
exports.AssetCategory = AssetCategory = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)('asset_categories'),
|
|
53
|
+
(0, typeorm_1.Index)(['workspaceId'])
|
|
54
|
+
], AssetCategory);
|
|
@@ -5,7 +5,12 @@ export declare enum AssetType {
|
|
|
5
5
|
VIDEO = "video",
|
|
6
6
|
AUDIO = "audio",
|
|
7
7
|
FONT = "font",
|
|
8
|
-
OTHER = "other"
|
|
8
|
+
OTHER = "other",
|
|
9
|
+
LOGO = "logo",
|
|
10
|
+
WATERMARK = "watermark",
|
|
11
|
+
OVERLAY = "overlay",
|
|
12
|
+
BACKGROUND = "background",
|
|
13
|
+
ICON = "icon"
|
|
9
14
|
}
|
|
10
15
|
export declare enum AssetStatus {
|
|
11
16
|
UPLOADING = "uploading",
|
|
@@ -20,6 +20,11 @@ var AssetType;
|
|
|
20
20
|
AssetType["AUDIO"] = "audio";
|
|
21
21
|
AssetType["FONT"] = "font";
|
|
22
22
|
AssetType["OTHER"] = "other";
|
|
23
|
+
AssetType["LOGO"] = "logo";
|
|
24
|
+
AssetType["WATERMARK"] = "watermark";
|
|
25
|
+
AssetType["OVERLAY"] = "overlay";
|
|
26
|
+
AssetType["BACKGROUND"] = "background";
|
|
27
|
+
AssetType["ICON"] = "icon";
|
|
23
28
|
})(AssetType || (exports.AssetType = AssetType = {}));
|
|
24
29
|
var AssetStatus;
|
|
25
30
|
(function (AssetStatus) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BrandKit } from './brand-kit.entity';
|
|
2
|
+
import { Asset } from './asset.entity';
|
|
3
|
+
export declare enum BrandAssetRole {
|
|
4
|
+
LOGO_PRIMARY = "logo_primary",
|
|
5
|
+
LOGO_SECONDARY = "logo_secondary",
|
|
6
|
+
LOGO_FAVICON = "logo_favicon",
|
|
7
|
+
WATERMARK = "watermark",
|
|
8
|
+
FOOTER_OVERLAY = "footer_overlay",
|
|
9
|
+
INTRO_WATERMARK = "intro_watermark",
|
|
10
|
+
HEADING_FONT = "heading_font",
|
|
11
|
+
BODY_FONT = "body_font",
|
|
12
|
+
CAPTION_FONT = "caption_font",
|
|
13
|
+
BACKGROUND = "background",
|
|
14
|
+
GUIDELINE_PDF = "guideline_pdf"
|
|
15
|
+
}
|
|
16
|
+
export declare class BrandAsset {
|
|
17
|
+
id: string;
|
|
18
|
+
brandKitId: string;
|
|
19
|
+
brandKit: BrandKit;
|
|
20
|
+
assetId: string;
|
|
21
|
+
asset: Asset;
|
|
22
|
+
role: BrandAssetRole;
|
|
23
|
+
isActive: boolean;
|
|
24
|
+
createdAt: Date;
|
|
25
|
+
updatedAt: Date;
|
|
26
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BrandAsset = exports.BrandAssetRole = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const brand_kit_entity_1 = require("./brand-kit.entity");
|
|
15
|
+
const asset_entity_1 = require("./asset.entity");
|
|
16
|
+
var BrandAssetRole;
|
|
17
|
+
(function (BrandAssetRole) {
|
|
18
|
+
BrandAssetRole["LOGO_PRIMARY"] = "logo_primary";
|
|
19
|
+
BrandAssetRole["LOGO_SECONDARY"] = "logo_secondary";
|
|
20
|
+
BrandAssetRole["LOGO_FAVICON"] = "logo_favicon";
|
|
21
|
+
BrandAssetRole["WATERMARK"] = "watermark";
|
|
22
|
+
BrandAssetRole["FOOTER_OVERLAY"] = "footer_overlay";
|
|
23
|
+
BrandAssetRole["INTRO_WATERMARK"] = "intro_watermark";
|
|
24
|
+
BrandAssetRole["HEADING_FONT"] = "heading_font";
|
|
25
|
+
BrandAssetRole["BODY_FONT"] = "body_font";
|
|
26
|
+
BrandAssetRole["CAPTION_FONT"] = "caption_font";
|
|
27
|
+
BrandAssetRole["BACKGROUND"] = "background";
|
|
28
|
+
BrandAssetRole["GUIDELINE_PDF"] = "guideline_pdf";
|
|
29
|
+
})(BrandAssetRole || (exports.BrandAssetRole = BrandAssetRole = {}));
|
|
30
|
+
let BrandAsset = class BrandAsset {
|
|
31
|
+
};
|
|
32
|
+
exports.BrandAsset = BrandAsset;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], BrandAsset.prototype, "id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ name: 'brand_kit_id', type: 'uuid' }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], BrandAsset.prototype, "brandKitId", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.ManyToOne)(() => brand_kit_entity_1.BrandKit, { nullable: false, onDelete: 'CASCADE' }),
|
|
43
|
+
(0, typeorm_1.JoinColumn)({ name: 'brand_kit_id' }),
|
|
44
|
+
__metadata("design:type", brand_kit_entity_1.BrandKit)
|
|
45
|
+
], BrandAsset.prototype, "brandKit", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ name: 'asset_id', type: 'uuid' }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], BrandAsset.prototype, "assetId", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.ManyToOne)(() => asset_entity_1.Asset, { nullable: false, onDelete: 'CASCADE' }),
|
|
52
|
+
(0, typeorm_1.JoinColumn)({ name: 'asset_id' }),
|
|
53
|
+
__metadata("design:type", asset_entity_1.Asset)
|
|
54
|
+
], BrandAsset.prototype, "asset", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({
|
|
57
|
+
type: 'enum',
|
|
58
|
+
enum: BrandAssetRole,
|
|
59
|
+
}),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], BrandAsset.prototype, "role", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ name: 'is_active', type: 'boolean', default: true }),
|
|
64
|
+
__metadata("design:type", Boolean)
|
|
65
|
+
], BrandAsset.prototype, "isActive", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
68
|
+
__metadata("design:type", Date)
|
|
69
|
+
], BrandAsset.prototype, "createdAt", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
72
|
+
__metadata("design:type", Date)
|
|
73
|
+
], BrandAsset.prototype, "updatedAt", void 0);
|
|
74
|
+
exports.BrandAsset = BrandAsset = __decorate([
|
|
75
|
+
(0, typeorm_1.Entity)('brand_assets'),
|
|
76
|
+
(0, typeorm_1.Index)(['brandKitId']),
|
|
77
|
+
(0, typeorm_1.Index)(['brandKitId', 'role'])
|
|
78
|
+
], BrandAsset);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Workspace } from './workspace.entity';
|
|
2
|
+
import { Asset } from './asset.entity';
|
|
3
|
+
export declare class BrandKit {
|
|
4
|
+
id: string;
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
workspace: Workspace;
|
|
7
|
+
name: string;
|
|
8
|
+
primaryColors: string[];
|
|
9
|
+
secondaryColors: string[];
|
|
10
|
+
neutralColors: string[];
|
|
11
|
+
headingFontId: string | null;
|
|
12
|
+
headingFont: Asset | null;
|
|
13
|
+
bodyFontId: string | null;
|
|
14
|
+
bodyFont: Asset | null;
|
|
15
|
+
captionFontId: string | null;
|
|
16
|
+
captionFont: Asset | null;
|
|
17
|
+
isActive: boolean;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
updatedAt: Date;
|
|
20
|
+
}
|