@filmwhisper/shared-types 0.1.0

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.
@@ -0,0 +1,283 @@
1
+ /**
2
+ * Zod schemas for fw-files core types.
3
+ * Source of truth — interfaces are derived via z.infer<>.
4
+ *
5
+ * Validation rules beyond structural types:
6
+ * - Timestamps: start_ms >= 0, end_ms > start_ms
7
+ * - Confidence: 0..1
8
+ * - Progress: 0..100
9
+ * - Summaries: non-empty
10
+ */
11
+ import { z } from "zod";
12
+ export declare const ProcessingStatusSchema: z.ZodEnum<{
13
+ pending: "pending";
14
+ running: "running";
15
+ complete: "complete";
16
+ failed: "failed";
17
+ }>;
18
+ export declare const JobStatusSchema: z.ZodEnum<{
19
+ pending: "pending";
20
+ running: "running";
21
+ complete: "complete";
22
+ failed: "failed";
23
+ cancelled: "cancelled";
24
+ }>;
25
+ export declare const ReviewStatusSchema: z.ZodEnum<{
26
+ keep: "keep";
27
+ exclude: "exclude";
28
+ needs_review: "needs_review";
29
+ }>;
30
+ export declare const ExportFormatSchema: z.ZodEnum<{
31
+ "premiere-xml": "premiere-xml";
32
+ "davinci-xml": "davinci-xml";
33
+ fcpxml: "fcpxml";
34
+ }>;
35
+ export declare const RevisionScopeSchema: z.ZodEnum<{
36
+ project: "project";
37
+ timeline: "timeline";
38
+ reviews: "reviews";
39
+ jobs: "jobs";
40
+ fts: "fts";
41
+ }>;
42
+ export declare const UtteranceSchema: z.ZodObject<{
43
+ speaker_label: z.ZodString;
44
+ text: z.ZodString;
45
+ start_ms: z.ZodNumber;
46
+ end_ms: z.ZodNumber;
47
+ confidence: z.ZodNumber;
48
+ }, z.core.$strip>;
49
+ export declare const SegmentSchema: z.ZodObject<{
50
+ segment_index: z.ZodNumber;
51
+ start_ms: z.ZodNumber;
52
+ end_ms: z.ZodNumber;
53
+ editorial_role: z.ZodString;
54
+ energy: z.ZodNumber;
55
+ story_value: z.ZodNumber;
56
+ summary: z.ZodString;
57
+ }, z.core.$strip>;
58
+ export declare const TranscriptSchema: z.ZodObject<{
59
+ speakers: z.ZodArray<z.ZodString>;
60
+ utterances: z.ZodArray<z.ZodObject<{
61
+ speaker_label: z.ZodString;
62
+ text: z.ZodString;
63
+ start_ms: z.ZodNumber;
64
+ end_ms: z.ZodNumber;
65
+ confidence: z.ZodNumber;
66
+ }, z.core.$strip>>;
67
+ }, z.core.$strip>;
68
+ export declare const TechnicalAnalysisSchema: z.ZodObject<{
69
+ scenes: z.ZodArray<z.ZodObject<{
70
+ start_ms: z.ZodNumber;
71
+ end_ms: z.ZodNumber;
72
+ score: z.ZodNumber;
73
+ }, z.core.$strip>>;
74
+ audio_levels: z.ZodObject<{
75
+ mean_volume_db: z.ZodNumber;
76
+ max_volume_db: z.ZodNumber;
77
+ }, z.core.$strip>;
78
+ silence_ranges: z.ZodArray<z.ZodObject<{
79
+ start_ms: z.ZodNumber;
80
+ end_ms: z.ZodNumber;
81
+ }, z.core.$strip>>;
82
+ duration_ms: z.ZodNumber;
83
+ }, z.core.$strip>;
84
+ export declare const SemanticAnalysisSchema: z.ZodObject<{
85
+ subject: z.ZodString;
86
+ editorial_role: z.ZodString;
87
+ energy: z.ZodNumber;
88
+ shot_type: z.ZodString;
89
+ story_value: z.ZodNumber;
90
+ summary: z.ZodString;
91
+ }, z.core.$strip>;
92
+ export declare const AssetAnalysisSchema: z.ZodObject<{
93
+ technical: z.ZodOptional<z.ZodObject<{
94
+ scenes: z.ZodArray<z.ZodObject<{
95
+ start_ms: z.ZodNumber;
96
+ end_ms: z.ZodNumber;
97
+ score: z.ZodNumber;
98
+ }, z.core.$strip>>;
99
+ audio_levels: z.ZodObject<{
100
+ mean_volume_db: z.ZodNumber;
101
+ max_volume_db: z.ZodNumber;
102
+ }, z.core.$strip>;
103
+ silence_ranges: z.ZodArray<z.ZodObject<{
104
+ start_ms: z.ZodNumber;
105
+ end_ms: z.ZodNumber;
106
+ }, z.core.$strip>>;
107
+ duration_ms: z.ZodNumber;
108
+ }, z.core.$strip>>;
109
+ semantic: z.ZodOptional<z.ZodObject<{
110
+ subject: z.ZodString;
111
+ editorial_role: z.ZodString;
112
+ energy: z.ZodNumber;
113
+ shot_type: z.ZodString;
114
+ story_value: z.ZodNumber;
115
+ summary: z.ZodString;
116
+ }, z.core.$strip>>;
117
+ segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
118
+ segment_index: z.ZodNumber;
119
+ start_ms: z.ZodNumber;
120
+ end_ms: z.ZodNumber;
121
+ editorial_role: z.ZodString;
122
+ energy: z.ZodNumber;
123
+ story_value: z.ZodNumber;
124
+ summary: z.ZodString;
125
+ }, z.core.$strip>>>;
126
+ }, z.core.$strip>;
127
+ export declare const FwProjectSchema: z.ZodObject<{
128
+ fw_version: z.ZodString;
129
+ schema: z.ZodLiteral<"project">;
130
+ name: z.ZodString;
131
+ source_path: z.ZodString;
132
+ language: z.ZodString;
133
+ proxy_spec: z.ZodOptional<z.ZodString>;
134
+ target_duration_seconds: z.ZodOptional<z.ZodNumber>;
135
+ created_at: z.ZodString;
136
+ updated_at: z.ZodString;
137
+ }, z.core.$strip>;
138
+ export declare const FwAssetSchema: z.ZodObject<{
139
+ fw_version: z.ZodString;
140
+ schema: z.ZodLiteral<"asset">;
141
+ asset_hash: z.ZodString;
142
+ filename: z.ZodString;
143
+ source_path: z.ZodString;
144
+ duration_seconds: z.ZodNumber;
145
+ created_at: z.ZodString;
146
+ updated_at: z.ZodString;
147
+ transcode_status: z.ZodEnum<{
148
+ pending: "pending";
149
+ running: "running";
150
+ complete: "complete";
151
+ failed: "failed";
152
+ }>;
153
+ transcribe_status: z.ZodEnum<{
154
+ pending: "pending";
155
+ running: "running";
156
+ complete: "complete";
157
+ failed: "failed";
158
+ }>;
159
+ analyze_status: z.ZodEnum<{
160
+ pending: "pending";
161
+ running: "running";
162
+ complete: "complete";
163
+ failed: "failed";
164
+ }>;
165
+ proxy_path: z.ZodOptional<z.ZodString>;
166
+ analysis: z.ZodOptional<z.ZodObject<{
167
+ technical: z.ZodOptional<z.ZodObject<{
168
+ scenes: z.ZodArray<z.ZodObject<{
169
+ start_ms: z.ZodNumber;
170
+ end_ms: z.ZodNumber;
171
+ score: z.ZodNumber;
172
+ }, z.core.$strip>>;
173
+ audio_levels: z.ZodObject<{
174
+ mean_volume_db: z.ZodNumber;
175
+ max_volume_db: z.ZodNumber;
176
+ }, z.core.$strip>;
177
+ silence_ranges: z.ZodArray<z.ZodObject<{
178
+ start_ms: z.ZodNumber;
179
+ end_ms: z.ZodNumber;
180
+ }, z.core.$strip>>;
181
+ duration_ms: z.ZodNumber;
182
+ }, z.core.$strip>>;
183
+ semantic: z.ZodOptional<z.ZodObject<{
184
+ subject: z.ZodString;
185
+ editorial_role: z.ZodString;
186
+ energy: z.ZodNumber;
187
+ shot_type: z.ZodString;
188
+ story_value: z.ZodNumber;
189
+ summary: z.ZodString;
190
+ }, z.core.$strip>>;
191
+ segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
192
+ segment_index: z.ZodNumber;
193
+ start_ms: z.ZodNumber;
194
+ end_ms: z.ZodNumber;
195
+ editorial_role: z.ZodString;
196
+ energy: z.ZodNumber;
197
+ story_value: z.ZodNumber;
198
+ summary: z.ZodString;
199
+ }, z.core.$strip>>>;
200
+ }, z.core.$strip>>;
201
+ transcript: z.ZodOptional<z.ZodObject<{
202
+ speakers: z.ZodArray<z.ZodString>;
203
+ utterances: z.ZodArray<z.ZodObject<{
204
+ speaker_label: z.ZodString;
205
+ text: z.ZodString;
206
+ start_ms: z.ZodNumber;
207
+ end_ms: z.ZodNumber;
208
+ confidence: z.ZodNumber;
209
+ }, z.core.$strip>>;
210
+ }, z.core.$strip>>;
211
+ segments: z.ZodOptional<z.ZodArray<z.ZodObject<{
212
+ segment_index: z.ZodNumber;
213
+ start_ms: z.ZodNumber;
214
+ end_ms: z.ZodNumber;
215
+ editorial_role: z.ZodString;
216
+ energy: z.ZodNumber;
217
+ story_value: z.ZodNumber;
218
+ summary: z.ZodString;
219
+ }, z.core.$strip>>>;
220
+ }, z.core.$strip>;
221
+ export declare const RevisionEntrySchema: z.ZodObject<{
222
+ scope: z.ZodEnum<{
223
+ project: "project";
224
+ timeline: "timeline";
225
+ reviews: "reviews";
226
+ jobs: "jobs";
227
+ fts: "fts";
228
+ }>;
229
+ revision: z.ZodNumber;
230
+ }, z.core.$strip>;
231
+ export declare const JobSchema: z.ZodObject<{
232
+ job_id: z.ZodString;
233
+ type: z.ZodString;
234
+ status: z.ZodEnum<{
235
+ pending: "pending";
236
+ running: "running";
237
+ complete: "complete";
238
+ failed: "failed";
239
+ cancelled: "cancelled";
240
+ }>;
241
+ progress_pct: z.ZodNumber;
242
+ result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
243
+ error: z.ZodOptional<z.ZodString>;
244
+ created_at: z.ZodString;
245
+ updated_at: z.ZodString;
246
+ }, z.core.$strip>;
247
+ export declare const TimelineClipSchema: z.ZodObject<{
248
+ id: z.ZodString;
249
+ asset_hash: z.ZodString;
250
+ clip_index: z.ZodNumber;
251
+ in_point_ms: z.ZodNumber;
252
+ out_point_ms: z.ZodNumber;
253
+ editorial_rationale: z.ZodOptional<z.ZodString>;
254
+ created_at: z.ZodString;
255
+ updated_at: z.ZodString;
256
+ }, z.core.$strip>;
257
+ export declare const SegmentReviewSchema: z.ZodObject<{
258
+ asset_hash: z.ZodString;
259
+ segment_index: z.ZodNumber;
260
+ status: z.ZodEnum<{
261
+ keep: "keep";
262
+ exclude: "exclude";
263
+ needs_review: "needs_review";
264
+ }>;
265
+ reviewer: z.ZodOptional<z.ZodString>;
266
+ updated_at: z.ZodString;
267
+ }, z.core.$strip>;
268
+ export type Segment = z.infer<typeof SegmentSchema>;
269
+ export type Utterance = z.infer<typeof UtteranceSchema>;
270
+ export type Transcript = z.infer<typeof TranscriptSchema>;
271
+ export type AssetAnalysis = z.infer<typeof AssetAnalysisSchema>;
272
+ export type FwProject = z.infer<typeof FwProjectSchema>;
273
+ export type FwAsset = z.infer<typeof FwAssetSchema>;
274
+ export type ProcessingStatus = z.infer<typeof ProcessingStatusSchema>;
275
+ export type JobStatus = z.infer<typeof JobStatusSchema>;
276
+ export type ReviewStatus = z.infer<typeof ReviewStatusSchema>;
277
+ export type ExportFormat = z.infer<typeof ExportFormatSchema>;
278
+ export type RevisionScope = z.infer<typeof RevisionScopeSchema>;
279
+ export type RevisionEntry = z.infer<typeof RevisionEntrySchema>;
280
+ export type Job = z.infer<typeof JobSchema>;
281
+ export type TimelineClip = z.infer<typeof TimelineClipSchema>;
282
+ export type SegmentReview = z.infer<typeof SegmentReviewSchema>;
283
+ //# sourceMappingURL=fw-files.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fw-files.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/fw-files.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,sBAAsB;;;;;EAKjC,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;EAI7B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;EAI7B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;EAM9B,CAAC;AAMH,eAAO,MAAM,eAAe;;;;;;iBAiB3B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;iBAmBzB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;iBAG3B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;iBAelC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;iBAOjC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI9B,CAAC;AAMH,eAAO,MAAM,eAAe;;;;;;;;;;iBAU1B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;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C,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAC5C,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Zod schemas for fw-files core types.
3
+ * Source of truth — interfaces are derived via z.infer<>.
4
+ *
5
+ * Validation rules beyond structural types:
6
+ * - Timestamps: start_ms >= 0, end_ms > start_ms
7
+ * - Confidence: 0..1
8
+ * - Progress: 0..100
9
+ * - Summaries: non-empty
10
+ */
11
+ import { z } from "zod";
12
+ // ============================================================
13
+ // Enum Schemas
14
+ // ============================================================
15
+ export const ProcessingStatusSchema = z.enum([
16
+ "pending",
17
+ "running",
18
+ "complete",
19
+ "failed",
20
+ ]);
21
+ export const JobStatusSchema = z.enum([
22
+ "pending",
23
+ "running",
24
+ "complete",
25
+ "failed",
26
+ "cancelled",
27
+ ]);
28
+ export const ReviewStatusSchema = z.enum([
29
+ "keep",
30
+ "exclude",
31
+ "needs_review",
32
+ ]);
33
+ export const ExportFormatSchema = z.enum([
34
+ "premiere-xml",
35
+ "davinci-xml",
36
+ "fcpxml",
37
+ ]);
38
+ export const RevisionScopeSchema = z.enum([
39
+ "timeline",
40
+ "reviews",
41
+ "project",
42
+ "jobs",
43
+ "fts",
44
+ ]);
45
+ // ============================================================
46
+ // Core Data Schemas
47
+ // ============================================================
48
+ export const UtteranceSchema = z.object({
49
+ speaker_label: z.string(),
50
+ text: z.string(),
51
+ start_ms: z.number().int().nonnegative(),
52
+ end_ms: z.number().int().nonnegative(),
53
+ confidence: z.number().min(0).max(1),
54
+ }).check((ctx) => {
55
+ if (ctx.value.end_ms <= ctx.value.start_ms) {
56
+ ctx.issues.push({
57
+ input: ctx.value,
58
+ code: "custom",
59
+ message: "end_ms must be greater than start_ms",
60
+ path: ["end_ms"],
61
+ });
62
+ }
63
+ });
64
+ export const SegmentSchema = z.object({
65
+ segment_index: z.number().int().nonnegative(),
66
+ start_ms: z.number().int().nonnegative(),
67
+ end_ms: z.number().int().nonnegative(),
68
+ editorial_role: z.string(),
69
+ energy: z.number(),
70
+ story_value: z.number(),
71
+ summary: z.string().min(1),
72
+ }).check((ctx) => {
73
+ if (ctx.value.end_ms <= ctx.value.start_ms) {
74
+ ctx.issues.push({
75
+ input: ctx.value,
76
+ code: "custom",
77
+ message: "end_ms must be greater than start_ms",
78
+ path: ["end_ms"],
79
+ });
80
+ }
81
+ });
82
+ export const TranscriptSchema = z.object({
83
+ speakers: z.array(z.string()),
84
+ utterances: z.array(UtteranceSchema),
85
+ });
86
+ export const TechnicalAnalysisSchema = z.object({
87
+ scenes: z.array(z.object({
88
+ start_ms: z.number().int().nonnegative(),
89
+ end_ms: z.number().int().nonnegative(),
90
+ score: z.number(),
91
+ })),
92
+ audio_levels: z.object({
93
+ mean_volume_db: z.number(),
94
+ max_volume_db: z.number(),
95
+ }),
96
+ silence_ranges: z.array(z.object({
97
+ start_ms: z.number().int().nonnegative(),
98
+ end_ms: z.number().int().nonnegative(),
99
+ })),
100
+ duration_ms: z.number().int().nonnegative(),
101
+ });
102
+ export const SemanticAnalysisSchema = z.object({
103
+ subject: z.string(),
104
+ editorial_role: z.string(),
105
+ energy: z.number(),
106
+ shot_type: z.string(),
107
+ story_value: z.number(),
108
+ summary: z.string(),
109
+ });
110
+ export const AssetAnalysisSchema = z.object({
111
+ technical: TechnicalAnalysisSchema.optional(),
112
+ semantic: SemanticAnalysisSchema.optional(),
113
+ segments: z.array(SegmentSchema).optional(),
114
+ });
115
+ // ============================================================
116
+ // .fw JSON File Schemas
117
+ // ============================================================
118
+ export const FwProjectSchema = z.object({
119
+ fw_version: z.string(),
120
+ schema: z.literal("project"),
121
+ name: z.string().min(1),
122
+ source_path: z.string().min(1),
123
+ language: z.string(),
124
+ proxy_spec: z.string().optional(),
125
+ target_duration_seconds: z.number().positive().optional(),
126
+ created_at: z.string(),
127
+ updated_at: z.string(),
128
+ });
129
+ export const FwAssetSchema = z.object({
130
+ fw_version: z.string(),
131
+ schema: z.literal("asset"),
132
+ asset_hash: z.string(),
133
+ filename: z.string(),
134
+ source_path: z.string(),
135
+ duration_seconds: z.number().nonnegative(),
136
+ created_at: z.string(),
137
+ updated_at: z.string(),
138
+ transcode_status: ProcessingStatusSchema,
139
+ transcribe_status: ProcessingStatusSchema,
140
+ analyze_status: ProcessingStatusSchema,
141
+ proxy_path: z.string().optional(),
142
+ analysis: AssetAnalysisSchema.optional(),
143
+ transcript: TranscriptSchema.optional(),
144
+ segments: z.array(SegmentSchema).optional(),
145
+ });
146
+ // ============================================================
147
+ // SQLite Row Schemas
148
+ // ============================================================
149
+ export const RevisionEntrySchema = z.object({
150
+ scope: RevisionScopeSchema,
151
+ revision: z.number().int().nonnegative(),
152
+ });
153
+ export const JobSchema = z.object({
154
+ job_id: z.string(),
155
+ type: z.string(),
156
+ status: JobStatusSchema,
157
+ progress_pct: z.number().min(0).max(100),
158
+ result: z.record(z.string(), z.unknown()).optional(),
159
+ error: z.string().optional(),
160
+ created_at: z.string(),
161
+ updated_at: z.string(),
162
+ });
163
+ export const TimelineClipSchema = z.object({
164
+ id: z.string(),
165
+ asset_hash: z.string(),
166
+ clip_index: z.number().int().nonnegative(),
167
+ in_point_ms: z.number().int().nonnegative(),
168
+ out_point_ms: z.number().int().nonnegative(),
169
+ editorial_rationale: z.string().optional(),
170
+ created_at: z.string(),
171
+ updated_at: z.string(),
172
+ }).check((ctx) => {
173
+ if (ctx.value.out_point_ms <= ctx.value.in_point_ms) {
174
+ ctx.issues.push({
175
+ input: ctx.value,
176
+ code: "custom",
177
+ message: "out_point_ms must be greater than in_point_ms",
178
+ path: ["out_point_ms"],
179
+ });
180
+ }
181
+ });
182
+ export const SegmentReviewSchema = z.object({
183
+ asset_hash: z.string(),
184
+ segment_index: z.number().int().nonnegative(),
185
+ status: ReviewStatusSchema,
186
+ reviewer: z.string().optional(),
187
+ updated_at: z.string(),
188
+ });
189
+ //# sourceMappingURL=fw-files.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fw-files.schema.js","sourceRoot":"","sources":["../../src/schemas/fw-files.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+DAA+D;AAC/D,eAAe;AACf,+DAA+D;AAE/D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,SAAS;IACT,SAAS;IACT,UAAU;IACV,QAAQ;CACT,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,SAAS;IACT,SAAS;IACT,UAAU;IACV,QAAQ;IACR,WAAW;CACZ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,MAAM;IACN,SAAS;IACT,cAAc;CACf,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,cAAc;IACd,aAAa;IACb,QAAQ;CACT,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC;IACxC,UAAU;IACV,SAAS;IACT,SAAS;IACT,MAAM;IACN,KAAK;CACN,CAAC,CAAC;AAEH,+DAA+D;AAC/D,oBAAoB;AACpB,+DAA+D;AAE/D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WA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C,CAAC,MAAM,CAAC;IAC1C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC7C,MAAM,EAAE,kBAAkB;IAC1B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@filmwhisper/shared-types",
3
+ "version": "0.1.0",
4
+ "description": "Shared TypeScript types and IPC contract for FilmWhisper v2",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "package.json"
18
+ ],
19
+ "devDependencies": {
20
+ "typescript": "^5.7.0",
21
+ "vitest": "^3.2.4"
22
+ },
23
+ "dependencies": {
24
+ "zod": "^4.3.6"
25
+ },
26
+ "scripts": {
27
+ "build": "tsc",
28
+ "test": "vitest run --passWithNoTests",
29
+ "test:watch": "vitest",
30
+ "generate:json-schema": "tsx scripts/generate-json-schema.ts",
31
+ "type-check": "tsc --noEmit",
32
+ "lint": "echo 'no lint configured yet'"
33
+ }
34
+ }