clhq-postgres-module 1.1.0-alpha.176 → 1.1.0-alpha.177

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.
@@ -37,6 +37,9 @@ export declare class AiVideoJob {
37
37
  isPremiumUser: boolean;
38
38
  klingScenesCount: number;
39
39
  errorMessage: string;
40
+ planId: string;
41
+ planData: object;
42
+ planApprovedAt: Date;
40
43
  createdAt: Date;
41
44
  updatedAt: Date;
42
45
  }
@@ -131,6 +131,18 @@ __decorate([
131
131
  (0, typeorm_1.Column)({ name: 'error_message', type: 'text', nullable: true }),
132
132
  __metadata("design:type", String)
133
133
  ], AiVideoJob.prototype, "errorMessage", void 0);
134
+ __decorate([
135
+ (0, typeorm_1.Column)({ name: 'plan_id', type: 'uuid', nullable: true }),
136
+ __metadata("design:type", String)
137
+ ], AiVideoJob.prototype, "planId", void 0);
138
+ __decorate([
139
+ (0, typeorm_1.Column)({ name: 'plan_data', type: 'jsonb', nullable: true }),
140
+ __metadata("design:type", Object)
141
+ ], AiVideoJob.prototype, "planData", void 0);
142
+ __decorate([
143
+ (0, typeorm_1.Column)({ name: 'plan_approved_at', type: 'timestamptz', nullable: true }),
144
+ __metadata("design:type", Date)
145
+ ], AiVideoJob.prototype, "planApprovedAt", void 0);
134
146
  __decorate([
135
147
  (0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
136
148
  __metadata("design:type", Date)
@@ -18,6 +18,7 @@ export declare class AiVideoSceneTask {
18
18
  durationSeconds: number;
19
19
  style: string;
20
20
  shotType: string;
21
+ planId: string;
21
22
  stockSearchQuery: string;
22
23
  pexelsVideoId: number;
23
24
  pixabayVideoId: number;
@@ -65,6 +65,10 @@ __decorate([
65
65
  (0, typeorm_1.Column)({ name: 'shot_type', type: 'varchar', nullable: true }),
66
66
  __metadata("design:type", String)
67
67
  ], AiVideoSceneTask.prototype, "shotType", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ name: 'plan_id', type: 'uuid', nullable: true }),
70
+ __metadata("design:type", String)
71
+ ], AiVideoSceneTask.prototype, "planId", void 0);
68
72
  __decorate([
69
73
  (0, typeorm_1.Column)({ name: 'stock_search_query', type: 'text', nullable: true }),
70
74
  __metadata("design:type", String)
@@ -82,7 +86,13 @@ __decorate([
82
86
  __metadata("design:type", String)
83
87
  ], AiVideoSceneTask.prototype, "stockVideoUrl", void 0);
84
88
  __decorate([
85
- (0, typeorm_1.Column)({ name: 'stock_video_confidence', type: 'decimal', precision: 3, scale: 2, nullable: true }),
89
+ (0, typeorm_1.Column)({
90
+ name: 'stock_video_confidence',
91
+ type: 'decimal',
92
+ precision: 3,
93
+ scale: 2,
94
+ nullable: true,
95
+ }),
86
96
  __metadata("design:type", Number)
87
97
  ], AiVideoSceneTask.prototype, "stockVideoConfidence", void 0);
88
98
  __decorate([
@@ -118,7 +128,13 @@ __decorate([
118
128
  __metadata("design:type", String)
119
129
  ], AiVideoSceneTask.prototype, "voiceAudioUrl", void 0);
120
130
  __decorate([
121
- (0, typeorm_1.Column)({ name: 'voiceover_duration_seconds', type: 'decimal', precision: 6, scale: 2, nullable: true }),
131
+ (0, typeorm_1.Column)({
132
+ name: 'voiceover_duration_seconds',
133
+ type: 'decimal',
134
+ precision: 6,
135
+ scale: 2,
136
+ nullable: true,
137
+ }),
122
138
  __metadata("design:type", Number)
123
139
  ], AiVideoSceneTask.prototype, "voiceoverDurationSeconds", void 0);
124
140
  __decorate([
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+ export declare class AddAiVideoPlanSupport1713000000053 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AddAiVideoPlanSupport1713000000053 = void 0;
4
+ class AddAiVideoPlanSupport1713000000053 {
5
+ constructor() {
6
+ this.name = 'AddAiVideoPlanSupport1713000000053';
7
+ }
8
+ async up(queryRunner) {
9
+ await queryRunner.query(`
10
+ ALTER TABLE ai_video_jobs
11
+ ADD COLUMN IF NOT EXISTS plan_id UUID,
12
+ ADD COLUMN IF NOT EXISTS plan_data JSONB,
13
+ ADD COLUMN IF NOT EXISTS plan_approved_at TIMESTAMP WITH TIME ZONE
14
+ `);
15
+ await queryRunner.query(`
16
+ ALTER TABLE ai_video_scene_tasks
17
+ ADD COLUMN IF NOT EXISTS plan_id UUID
18
+ `);
19
+ await queryRunner.query(`
20
+ COMMENT ON COLUMN ai_video_jobs.plan_id IS
21
+ 'UUID from /plan endpoint — links job to its approved plan for traceability'
22
+ `);
23
+ await queryRunner.query(`
24
+ COMMENT ON COLUMN ai_video_jobs.plan_data IS
25
+ 'Approved plan JSON (scenes, title, script) — allows plan editing and reprocessing'
26
+ `);
27
+ await queryRunner.query(`
28
+ COMMENT ON COLUMN ai_video_jobs.plan_approved_at IS
29
+ 'Timestamp when user approved the plan and started generation'
30
+ `);
31
+ await queryRunner.query(`
32
+ COMMENT ON COLUMN ai_video_scene_tasks.plan_id IS
33
+ 'Links scene task back to the originating plan for debugging'
34
+ `);
35
+ }
36
+ async down(queryRunner) {
37
+ await queryRunner.query(`
38
+ ALTER TABLE ai_video_scene_tasks DROP COLUMN IF EXISTS plan_id
39
+ `);
40
+ await queryRunner.query(`
41
+ ALTER TABLE ai_video_jobs
42
+ DROP COLUMN IF EXISTS plan_approved_at,
43
+ DROP COLUMN IF EXISTS plan_data,
44
+ DROP COLUMN IF EXISTS plan_id
45
+ `);
46
+ }
47
+ }
48
+ exports.AddAiVideoPlanSupport1713000000053 = AddAiVideoPlanSupport1713000000053;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clhq-postgres-module",
3
- "version": "1.1.0-alpha.176",
3
+ "version": "1.1.0-alpha.177",
4
4
  "description": "PostgreSQL module using TypeORM for Clippy",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",