@contractspec/lib.contracts-integrations 2.0.0 → 2.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.
package/dist/index.js CHANGED
@@ -1653,6 +1653,13 @@ function registerNotionIntegration(registry) {
1653
1653
  return registry.register(notionIntegrationSpec);
1654
1654
  }
1655
1655
 
1656
+ // src/integrations/providers/video.ts
1657
+ var VIDEO_FORMATS = {
1658
+ landscape: { type: "landscape", width: 1920, height: 1080 },
1659
+ portrait: { type: "portrait", width: 1080, height: 1920 },
1660
+ square: { type: "square", width: 1080, height: 1080 }
1661
+ };
1662
+
1656
1663
  // src/integrations/providers/granola.ts
1657
1664
  import { StabilityEnum as StabilityEnum20 } from "@contractspec/lib.contracts-spec/ownership";
1658
1665
  var granolaIntegrationSpec = defineIntegration({
@@ -3635,6 +3642,7 @@ export {
3635
3642
  defineIntegration,
3636
3643
  createDefaultIntegrationSpecRegistry,
3637
3644
  assertPrimaryOpenBankingReady,
3645
+ VIDEO_FORMATS,
3638
3646
  UpdateIntegrationConnection,
3639
3647
  TestIntegrationConnection,
3640
3648
  POSTHOG_LLM_TELEMETRY_EVENTS,
@@ -1653,6 +1653,13 @@ function registerNotionIntegration(registry) {
1653
1653
  return registry.register(notionIntegrationSpec);
1654
1654
  }
1655
1655
 
1656
+ // src/integrations/providers/video.ts
1657
+ var VIDEO_FORMATS = {
1658
+ landscape: { type: "landscape", width: 1920, height: 1080 },
1659
+ portrait: { type: "portrait", width: 1080, height: 1920 },
1660
+ square: { type: "square", width: 1080, height: 1080 }
1661
+ };
1662
+
1656
1663
  // src/integrations/providers/granola.ts
1657
1664
  import { StabilityEnum as StabilityEnum20 } from "@contractspec/lib.contracts-spec/ownership";
1658
1665
  var granolaIntegrationSpec = defineIntegration({
@@ -3231,6 +3238,7 @@ export {
3231
3238
  defineIntegration,
3232
3239
  createDefaultIntegrationSpecRegistry,
3233
3240
  assertPrimaryOpenBankingReady,
3241
+ VIDEO_FORMATS,
3234
3242
  POSTHOG_LLM_TELEMETRY_EVENTS,
3235
3243
  POSTHOG_LLM_PII_FIELDS,
3236
3244
  POSTHOG_EVALUATION_TEMPLATES,
@@ -30,6 +30,7 @@ export * from './posthog-llm-telemetry';
30
30
  export * from './linear';
31
31
  export * from './jira';
32
32
  export * from './notion';
33
+ export * from './video';
33
34
  export * from './granola';
34
35
  export * from './tldv';
35
36
  export * from './fireflies';
@@ -1653,6 +1653,13 @@ function registerNotionIntegration(registry) {
1653
1653
  return registry.register(notionIntegrationSpec);
1654
1654
  }
1655
1655
 
1656
+ // src/integrations/providers/video.ts
1657
+ var VIDEO_FORMATS = {
1658
+ landscape: { type: "landscape", width: 1920, height: 1080 },
1659
+ portrait: { type: "portrait", width: 1080, height: 1920 },
1660
+ square: { type: "square", width: 1080, height: 1080 }
1661
+ };
1662
+
1656
1663
  // src/integrations/providers/granola.ts
1657
1664
  import { StabilityEnum as StabilityEnum20 } from "@contractspec/lib.contracts-spec/ownership";
1658
1665
  var granolaIntegrationSpec = defineIntegration({
@@ -2088,6 +2095,7 @@ export {
2088
2095
  falIntegrationSpec,
2089
2096
  elevenLabsIntegrationSpec,
2090
2097
  createDefaultIntegrationSpecRegistry,
2098
+ VIDEO_FORMATS,
2091
2099
  POSTHOG_LLM_TELEMETRY_EVENTS,
2092
2100
  POSTHOG_LLM_PII_FIELDS,
2093
2101
  POSTHOG_EVALUATION_TEMPLATES
@@ -0,0 +1,171 @@
1
+ export interface VideoFormatLandscape {
2
+ type: 'landscape';
3
+ width: 1920;
4
+ height: 1080;
5
+ }
6
+ export interface VideoFormatPortrait {
7
+ type: 'portrait';
8
+ width: 1080;
9
+ height: 1920;
10
+ }
11
+ export interface VideoFormatSquare {
12
+ type: 'square';
13
+ width: 1080;
14
+ height: 1080;
15
+ }
16
+ export interface VideoFormatCustom {
17
+ type: 'custom';
18
+ width: number;
19
+ height: number;
20
+ }
21
+ export type VideoFormat = VideoFormatLandscape | VideoFormatPortrait | VideoFormatSquare | VideoFormatCustom;
22
+ export declare const VIDEO_FORMATS: {
23
+ landscape: {
24
+ readonly type: "landscape";
25
+ readonly width: 1920;
26
+ readonly height: 1080;
27
+ };
28
+ portrait: {
29
+ readonly type: "portrait";
30
+ readonly width: 1080;
31
+ readonly height: 1920;
32
+ };
33
+ square: {
34
+ readonly type: "square";
35
+ readonly width: 1080;
36
+ readonly height: 1080;
37
+ };
38
+ };
39
+ export interface NarrationConfig {
40
+ enabled: boolean;
41
+ voiceId?: string;
42
+ language?: string;
43
+ style?: 'professional' | 'casual' | 'technical';
44
+ }
45
+ export interface VideoStyleOverrides {
46
+ /** Override brand primary color */
47
+ primaryColor?: string;
48
+ /** Override brand accent color */
49
+ accentColor?: string;
50
+ /** Background color or gradient CSS value */
51
+ background?: string;
52
+ /** Font family override */
53
+ fontFamily?: string;
54
+ /** Show watermark / logo */
55
+ showBranding?: boolean;
56
+ /** Dark mode */
57
+ darkMode?: boolean;
58
+ }
59
+ export interface VideoScene {
60
+ id: string;
61
+ /** Maps to a registered Remotion composition ID */
62
+ compositionId: string;
63
+ /** Input props passed to the Remotion composition */
64
+ props: Record<string, unknown>;
65
+ /** Duration in frames */
66
+ durationInFrames: number;
67
+ /** Optional narration text for this scene */
68
+ narrationText?: string;
69
+ /** Transition to next scene */
70
+ transition?: SceneTransition;
71
+ }
72
+ export type SceneTransitionType = 'fade' | 'slide-left' | 'slide-right' | 'wipe' | 'none';
73
+ export interface SceneTransition {
74
+ type: SceneTransitionType;
75
+ durationInFrames: number;
76
+ }
77
+ export interface AudioTrack {
78
+ /** Audio data as Uint8Array (e.g., from VoiceProvider) */
79
+ data?: Uint8Array;
80
+ /** Or a URL/path to the audio file */
81
+ src?: string;
82
+ format: 'mp3' | 'wav' | 'ogg';
83
+ durationSeconds: number;
84
+ /** Volume 0-1 */
85
+ volume?: number;
86
+ }
87
+ export interface VideoProject {
88
+ id: string;
89
+ /** The scenes composing this video in order */
90
+ scenes: VideoScene[];
91
+ /** Total duration across all scenes */
92
+ totalDurationInFrames: number;
93
+ fps: number;
94
+ /** Video dimensions */
95
+ format: VideoFormat;
96
+ /** Audio tracks */
97
+ audio?: {
98
+ narration?: AudioTrack;
99
+ backgroundMusic?: AudioTrack;
100
+ };
101
+ /** Metadata for the rendered file */
102
+ metadata?: VideoProjectMetadata;
103
+ }
104
+ export interface VideoProjectMetadata {
105
+ title?: string;
106
+ description?: string;
107
+ tags?: string[];
108
+ createdAt?: string;
109
+ }
110
+ export type VideoCodec = 'h264' | 'h265' | 'vp8' | 'vp9';
111
+ export type VideoOutputFormat = 'mp4' | 'webm' | 'gif';
112
+ export interface RenderConfig {
113
+ /** Output codec */
114
+ codec?: VideoCodec;
115
+ /** Output container format */
116
+ outputFormat?: VideoOutputFormat;
117
+ /** Constant Rate Factor (quality). Lower = better. Default 18. */
118
+ crf?: number;
119
+ /** Output file path */
120
+ outputPath: string;
121
+ /** Generate additional format variants (square, portrait) */
122
+ autoVariants?: boolean;
123
+ /** Pixel format. Default 'yuv420p'. */
124
+ pixelFormat?: string;
125
+ /** Number of rendering threads. Default: CPU count. */
126
+ concurrency?: number;
127
+ }
128
+ export interface RenderResult {
129
+ outputPath: string;
130
+ format: VideoOutputFormat;
131
+ codec: VideoCodec;
132
+ durationSeconds: number;
133
+ fileSizeBytes: number;
134
+ dimensions: {
135
+ width: number;
136
+ height: number;
137
+ };
138
+ /** Additional format variants if autoVariants was true */
139
+ variants?: RenderResult[];
140
+ }
141
+ export interface VideoProvider {
142
+ /**
143
+ * Render a video project to a file.
144
+ * Implementations may use local Remotion renderer, Lambda, Cloud Run, etc.
145
+ */
146
+ render(project: VideoProject, config: RenderConfig): Promise<RenderResult>;
147
+ /**
148
+ * Get a still frame from a composition (useful for thumbnails).
149
+ */
150
+ renderStill?(compositionId: string, props: Record<string, unknown>, frame: number, format: VideoFormat): Promise<Uint8Array>;
151
+ }
152
+ export interface CompositionMeta {
153
+ id: string;
154
+ displayName: string;
155
+ description: string;
156
+ /** Default duration in frames */
157
+ defaultDurationInFrames: number;
158
+ fps: number;
159
+ /** Default dimensions */
160
+ defaultFormat: VideoFormat;
161
+ /** Schema of expected input props (for validation / UI generation) */
162
+ propsSchema?: Record<string, unknown>;
163
+ /** Tags for categorization */
164
+ tags?: string[];
165
+ }
166
+ export interface CompositionRegistry {
167
+ register(meta: CompositionMeta): void;
168
+ get(id: string): CompositionMeta | undefined;
169
+ list(): CompositionMeta[];
170
+ listByTag(tag: string): CompositionMeta[];
171
+ }
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ // src/integrations/providers/video.ts
3
+ var VIDEO_FORMATS = {
4
+ landscape: { type: "landscape", width: 1920, height: 1080 },
5
+ portrait: { type: "portrait", width: 1080, height: 1920 },
6
+ square: { type: "square", width: 1080, height: 1080 }
7
+ };
8
+ export {
9
+ VIDEO_FORMATS
10
+ };
@@ -1652,6 +1652,13 @@ function registerNotionIntegration(registry) {
1652
1652
  return registry.register(notionIntegrationSpec);
1653
1653
  }
1654
1654
 
1655
+ // src/integrations/providers/video.ts
1656
+ var VIDEO_FORMATS = {
1657
+ landscape: { type: "landscape", width: 1920, height: 1080 },
1658
+ portrait: { type: "portrait", width: 1080, height: 1920 },
1659
+ square: { type: "square", width: 1080, height: 1080 }
1660
+ };
1661
+
1655
1662
  // src/integrations/providers/granola.ts
1656
1663
  import { StabilityEnum as StabilityEnum20 } from "@contractspec/lib.contracts-spec/ownership";
1657
1664
  var granolaIntegrationSpec = defineIntegration({
@@ -3634,6 +3641,7 @@ export {
3634
3641
  defineIntegration,
3635
3642
  createDefaultIntegrationSpecRegistry,
3636
3643
  assertPrimaryOpenBankingReady,
3644
+ VIDEO_FORMATS,
3637
3645
  UpdateIntegrationConnection,
3638
3646
  TestIntegrationConnection,
3639
3647
  POSTHOG_LLM_TELEMETRY_EVENTS,
@@ -1652,6 +1652,13 @@ function registerNotionIntegration(registry) {
1652
1652
  return registry.register(notionIntegrationSpec);
1653
1653
  }
1654
1654
 
1655
+ // src/integrations/providers/video.ts
1656
+ var VIDEO_FORMATS = {
1657
+ landscape: { type: "landscape", width: 1920, height: 1080 },
1658
+ portrait: { type: "portrait", width: 1080, height: 1920 },
1659
+ square: { type: "square", width: 1080, height: 1080 }
1660
+ };
1661
+
1655
1662
  // src/integrations/providers/granola.ts
1656
1663
  import { StabilityEnum as StabilityEnum20 } from "@contractspec/lib.contracts-spec/ownership";
1657
1664
  var granolaIntegrationSpec = defineIntegration({
@@ -3230,6 +3237,7 @@ export {
3230
3237
  defineIntegration,
3231
3238
  createDefaultIntegrationSpecRegistry,
3232
3239
  assertPrimaryOpenBankingReady,
3240
+ VIDEO_FORMATS,
3233
3241
  POSTHOG_LLM_TELEMETRY_EVENTS,
3234
3242
  POSTHOG_LLM_PII_FIELDS,
3235
3243
  POSTHOG_EVALUATION_TEMPLATES,
@@ -1652,6 +1652,13 @@ function registerNotionIntegration(registry) {
1652
1652
  return registry.register(notionIntegrationSpec);
1653
1653
  }
1654
1654
 
1655
+ // src/integrations/providers/video.ts
1656
+ var VIDEO_FORMATS = {
1657
+ landscape: { type: "landscape", width: 1920, height: 1080 },
1658
+ portrait: { type: "portrait", width: 1080, height: 1920 },
1659
+ square: { type: "square", width: 1080, height: 1080 }
1660
+ };
1661
+
1655
1662
  // src/integrations/providers/granola.ts
1656
1663
  import { StabilityEnum as StabilityEnum20 } from "@contractspec/lib.contracts-spec/ownership";
1657
1664
  var granolaIntegrationSpec = defineIntegration({
@@ -2087,6 +2094,7 @@ export {
2087
2094
  falIntegrationSpec,
2088
2095
  elevenLabsIntegrationSpec,
2089
2096
  createDefaultIntegrationSpecRegistry,
2097
+ VIDEO_FORMATS,
2090
2098
  POSTHOG_LLM_TELEMETRY_EVENTS,
2091
2099
  POSTHOG_LLM_PII_FIELDS,
2092
2100
  POSTHOG_EVALUATION_TEMPLATES
@@ -0,0 +1,9 @@
1
+ // src/integrations/providers/video.ts
2
+ var VIDEO_FORMATS = {
3
+ landscape: { type: "landscape", width: 1920, height: 1080 },
4
+ portrait: { type: "portrait", width: 1080, height: 1920 },
5
+ square: { type: "square", width: 1080, height: 1080 }
6
+ };
7
+ export {
8
+ VIDEO_FORMATS
9
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.contracts-integrations",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Integration contract definitions for external services",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -19,16 +19,16 @@
19
19
  "dev": "contractspec-bun-build dev"
20
20
  },
21
21
  "dependencies": {
22
- "@aws-sdk/client-secrets-manager": "^3.988.0",
23
- "@contractspec/lib.contracts-spec": "2.0.0",
24
- "@contractspec/lib.schema": "2.0.0",
22
+ "@aws-sdk/client-secrets-manager": "^3.991.0",
23
+ "@contractspec/lib.contracts-spec": "2.1.0",
24
+ "@contractspec/lib.schema": "2.1.0",
25
25
  "@google-cloud/secret-manager": "^6.1.1",
26
26
  "google-gax": "^5.0.6"
27
27
  },
28
28
  "devDependencies": {
29
- "@contractspec/tool.typescript": "2.0.0",
29
+ "@contractspec/tool.typescript": "2.1.0",
30
30
  "typescript": "^5.9.3",
31
- "@contractspec/tool.bun": "2.0.0"
31
+ "@contractspec/tool.bun": "2.1.0"
32
32
  },
33
33
  "files": [
34
34
  "dist",
@@ -455,6 +455,12 @@
455
455
  "node": "./dist/node/integrations/providers/vector-store.js",
456
456
  "default": "./dist/integrations/providers/vector-store.js"
457
457
  },
458
+ "./integrations/providers/video": {
459
+ "types": "./dist/integrations/providers/video.d.ts",
460
+ "bun": "./dist/integrations/providers/video.js",
461
+ "node": "./dist/node/integrations/providers/video.js",
462
+ "default": "./dist/integrations/providers/video.js"
463
+ },
458
464
  "./integrations/providers/voice": {
459
465
  "types": "./dist/integrations/providers/voice.d.ts",
460
466
  "bun": "./dist/integrations/providers/voice.js",
@@ -952,6 +958,12 @@
952
958
  "node": "./dist/node/integrations/providers/vector-store.js",
953
959
  "default": "./dist/integrations/providers/vector-store.js"
954
960
  },
961
+ "./integrations/providers/video": {
962
+ "types": "./dist/integrations/providers/video.d.ts",
963
+ "bun": "./dist/integrations/providers/video.js",
964
+ "node": "./dist/node/integrations/providers/video.js",
965
+ "default": "./dist/integrations/providers/video.js"
966
+ },
955
967
  "./integrations/providers/voice": {
956
968
  "types": "./dist/integrations/providers/voice.d.ts",
957
969
  "bun": "./dist/integrations/providers/voice.js",