@happyvertical/smrt-video 0.51.32 → 0.51.34
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/__smrt-register__.d.ts +2 -0
- package/dist/__smrt-register__.d.ts.map +1 -0
- package/dist/character-asset.d.ts +22 -0
- package/dist/character-asset.d.ts.map +1 -0
- package/dist/character-assets.d.ts +11 -0
- package/dist/character-assets.d.ts.map +1 -0
- package/dist/character-owned-asset.d.ts +19 -0
- package/dist/character-owned-asset.d.ts.map +1 -0
- package/dist/character.d.ts +152 -0
- package/dist/character.d.ts.map +1 -0
- package/dist/characters.d.ts +23 -0
- package/dist/characters.d.ts.map +1 -0
- package/dist/composite-job.d.ts +89 -0
- package/dist/composite-job.d.ts.map +1 -0
- package/dist/index.d.ts +58 -1283
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/media-bundle-persistence.d.ts +2 -0
- package/dist/media-bundle-persistence.d.ts.map +1 -0
- package/dist/owned-asset-utils.d.ts +24 -0
- package/dist/owned-asset-utils.d.ts.map +1 -0
- package/dist/performer-asset.d.ts +22 -0
- package/dist/performer-asset.d.ts.map +1 -0
- package/dist/performer-assets.d.ts +11 -0
- package/dist/performer-assets.d.ts.map +1 -0
- package/dist/performer-owned-asset.d.ts +19 -0
- package/dist/performer-owned-asset.d.ts.map +1 -0
- package/dist/performer.d.ts +117 -0
- package/dist/performer.d.ts.map +1 -0
- package/dist/personality-profile.d.ts +10 -0
- package/dist/personality-profile.d.ts.map +1 -0
- package/dist/scene-asset.d.ts +22 -0
- package/dist/scene-asset.d.ts.map +1 -0
- package/dist/scene-assets.d.ts +11 -0
- package/dist/scene-assets.d.ts.map +1 -0
- package/dist/scene-owned-asset.d.ts +19 -0
- package/dist/scene-owned-asset.d.ts.map +1 -0
- package/dist/scene.d.ts +179 -0
- package/dist/scene.d.ts.map +1 -0
- package/dist/smrt-knowledge.json +4 -4
- package/dist/video-composition-asset.d.ts +21 -0
- package/dist/video-composition-asset.d.ts.map +1 -0
- package/dist/video-composition.d.ts +77 -0
- package/dist/video-composition.d.ts.map +1 -0
- package/dist/video-compositions.d.ts +13 -0
- package/dist/video-compositions.d.ts.map +1 -0
- package/dist/video-content.d.ts +10 -0
- package/dist/video-content.d.ts.map +1 -0
- package/dist/video-sequence-asset.d.ts +21 -0
- package/dist/video-sequence-asset.d.ts.map +1 -0
- package/dist/video-sequence.d.ts +66 -0
- package/dist/video-sequence.d.ts.map +1 -0
- package/dist/video-sequences.d.ts +13 -0
- package/dist/video-sequences.d.ts.map +1 -0
- package/dist/video-shot-asset.d.ts +21 -0
- package/dist/video-shot-asset.d.ts.map +1 -0
- package/dist/video-shot-character.d.ts +56 -0
- package/dist/video-shot-character.d.ts.map +1 -0
- package/dist/video-shot-characters.d.ts +13 -0
- package/dist/video-shot-characters.d.ts.map +1 -0
- package/dist/video-shot.d.ts +142 -0
- package/dist/video-shot.d.ts.map +1 -0
- package/dist/video-shots.d.ts +15 -0
- package/dist/video-shots.d.ts.map +1 -0
- package/dist/video-workflow.d.ts +187 -0
- package/dist/video-workflow.d.ts.map +1 -0
- package/package.json +10 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__smrt-register__.d.ts","sourceRoot":"","sources":["../src/__smrt-register__.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CharacterAsset - legacy STI asset subclass for Character-owned assets
|
|
3
|
+
*
|
|
4
|
+
* @deprecated Character owned assets are now modeled canonically through
|
|
5
|
+
* `CharacterOwnedAsset` join rows in `character_assets`. This legacy subtype
|
|
6
|
+
* remains readable during migration.
|
|
7
|
+
*/
|
|
8
|
+
import { Asset, type AssetOptions } from '@happyvertical/smrt-assets';
|
|
9
|
+
/** Roles a character asset can play */
|
|
10
|
+
export type CharacterAssetRole = 'seed-image' | 'base-motion' | 'logo';
|
|
11
|
+
export interface CharacterAssetOptions extends AssetOptions {
|
|
12
|
+
/** Character this asset belongs to */
|
|
13
|
+
characterId?: string | null;
|
|
14
|
+
/** Role of this asset for the character */
|
|
15
|
+
role?: CharacterAssetRole;
|
|
16
|
+
}
|
|
17
|
+
export declare class CharacterAsset extends Asset {
|
|
18
|
+
characterId: string | null;
|
|
19
|
+
role: CharacterAssetRole;
|
|
20
|
+
constructor(options?: CharacterAssetOptions);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=character-asset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-asset.d.ts","sourceRoot":"","sources":["../src/character-asset.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAItE,uCAAuC;AACvC,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,aAAa,GAAG,MAAM,CAAC;AAEvE,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,2CAA2C;IAC3C,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED,qBAKa,cAAe,SAAQ,KAAK;IAEvC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAElC,IAAI,EAAE,kBAAkB,CAAgB;gBAE5B,OAAO,GAAE,qBAA0B;CAMhD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SmrtCollectionOptions } from '@happyvertical/smrt-core';
|
|
2
|
+
import { SmrtJunction } from '@happyvertical/smrt-core';
|
|
3
|
+
import { CharacterOwnedAsset } from './character-owned-asset.js';
|
|
4
|
+
export interface CharacterOwnedAssetCollectionOptions extends SmrtCollectionOptions {
|
|
5
|
+
}
|
|
6
|
+
export declare class CharacterOwnedAssetCollection extends SmrtJunction<CharacterOwnedAsset> {
|
|
7
|
+
static readonly _itemClass: typeof CharacterOwnedAsset;
|
|
8
|
+
protected leftField: string;
|
|
9
|
+
protected rightField: string;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=character-assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-assets.d.ts","sourceRoot":"","sources":["../src/character-assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAQ,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,MAAM,WAAW,oCACf,SAAQ,qBAAqB;CAAG;AAElC,qBAKa,6BAA8B,SAAQ,YAAY,CAAC,mBAAmB,CAAC;IAClF,MAAM,CAAC,QAAQ,CAAC,UAAU,6BAAuB;IACjD,SAAS,CAAC,SAAS,SAAiB;IACpC,SAAS,CAAC,UAAU,SAAa;CAClC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
2
|
+
import { SmrtObject } from '@happyvertical/smrt-core';
|
|
3
|
+
import type { CharacterAssetRole } from './character-asset.js';
|
|
4
|
+
export interface CharacterOwnedAssetOptions extends SmrtObjectOptions {
|
|
5
|
+
characterId?: string;
|
|
6
|
+
assetId?: string;
|
|
7
|
+
role?: CharacterAssetRole;
|
|
8
|
+
sortOrder?: number;
|
|
9
|
+
tenantId?: string | null;
|
|
10
|
+
}
|
|
11
|
+
export declare class CharacterOwnedAsset extends SmrtObject {
|
|
12
|
+
tenantId: string | null;
|
|
13
|
+
characterId: string;
|
|
14
|
+
assetId: string;
|
|
15
|
+
role: CharacterAssetRole;
|
|
16
|
+
sortOrder: number;
|
|
17
|
+
constructor(options?: CharacterOwnedAssetOptions);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=character-owned-asset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-owned-asset.d.ts","sourceRoot":"","sources":["../src/character-owned-asset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAIL,UAAU,EAEX,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,qBASa,mBAAoB,SAAQ,UAAU;IAEjD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAG/B,WAAW,SAAM;IAGjB,OAAO,SAAM;IAGb,IAAI,EAAE,kBAAkB,CAAgB;IAGxC,SAAS,SAAK;gBAEF,OAAO,GAAE,0BAA+B;CAQrD"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Character Model
|
|
3
|
+
*
|
|
4
|
+
* Manages virtual characters for AI-powered video production.
|
|
5
|
+
* Each character combines a visual identity with a voice profile.
|
|
6
|
+
*
|
|
7
|
+
* Renamed from PersonalityProfile. A Character is the role being played
|
|
8
|
+
* (outfit, voice, branding). A Performer is the physical likeness/face DNA.
|
|
9
|
+
* "A Performer plays Characters."
|
|
10
|
+
*/
|
|
11
|
+
import type { Asset } from '@happyvertical/smrt-assets';
|
|
12
|
+
import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
13
|
+
import { SmrtObject } from '@happyvertical/smrt-core';
|
|
14
|
+
import type { CharacterAssetRole } from './character-asset.js';
|
|
15
|
+
/**
|
|
16
|
+
* Character status
|
|
17
|
+
*/
|
|
18
|
+
export type CharacterStatus = 'pending' | 'ready';
|
|
19
|
+
/**
|
|
20
|
+
* Scene-specific configuration for a character
|
|
21
|
+
*/
|
|
22
|
+
export interface CharacterSceneConfig {
|
|
23
|
+
/** Scene ID */
|
|
24
|
+
sceneId: string;
|
|
25
|
+
/** Preferred viewpoint ID (for 360° scenes) */
|
|
26
|
+
viewpointId?: string;
|
|
27
|
+
/** Anchor point ID for placement */
|
|
28
|
+
anchorPointId?: string;
|
|
29
|
+
/** Character scale in this scene */
|
|
30
|
+
scale: number;
|
|
31
|
+
/** Character position in this scene (normalized 0-1) */
|
|
32
|
+
position: {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Branding configuration for video overlays
|
|
39
|
+
*/
|
|
40
|
+
export interface BrandingConfig {
|
|
41
|
+
/** Asset ID for logo overlay */
|
|
42
|
+
logoAssetId?: string | null;
|
|
43
|
+
/** Primary brand color (hex) */
|
|
44
|
+
primaryColor?: string | null;
|
|
45
|
+
/** Background color (hex) */
|
|
46
|
+
backgroundColor?: string | null;
|
|
47
|
+
/** Lower-third template name */
|
|
48
|
+
lowerThirdTemplate?: string | null;
|
|
49
|
+
/** Font family for text overlays */
|
|
50
|
+
fontFamily?: string | null;
|
|
51
|
+
/** Whether to show news ticker */
|
|
52
|
+
tickerEnabled?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Character creation options
|
|
56
|
+
*/
|
|
57
|
+
export interface CharacterOptions extends SmrtObjectOptions {
|
|
58
|
+
/** Human-readable name for the character */
|
|
59
|
+
name?: string;
|
|
60
|
+
/** Description of the character persona */
|
|
61
|
+
description?: string | null;
|
|
62
|
+
/** Asset ID of the seed image for image-to-video generation */
|
|
63
|
+
imageAssetId?: string | null;
|
|
64
|
+
/** Asset ID of pre-baked base motion video */
|
|
65
|
+
baseMotionAssetId?: string | null;
|
|
66
|
+
/** Voice profile ID for speech synthesis */
|
|
67
|
+
voiceProfileId?: string | null;
|
|
68
|
+
/** Branding configuration for video overlays */
|
|
69
|
+
brandingKit?: BrandingConfig;
|
|
70
|
+
/** Character status */
|
|
71
|
+
status?: CharacterStatus;
|
|
72
|
+
/** Linked performer for IP-Adapter face consistency */
|
|
73
|
+
performerId?: string | null;
|
|
74
|
+
/** Default scene for this character */
|
|
75
|
+
defaultSceneId?: string | null;
|
|
76
|
+
/** Scene-specific configurations */
|
|
77
|
+
sceneConfigs?: CharacterSceneConfig[];
|
|
78
|
+
/** 1-1 profile record for this character */
|
|
79
|
+
profileId?: string | null;
|
|
80
|
+
/** Tenant ID for multi-tenant isolation */
|
|
81
|
+
tenantId?: string | null;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Virtual character for AI-powered video production
|
|
85
|
+
*
|
|
86
|
+
* Character represents a virtual persona combining:
|
|
87
|
+
* - Visual identity: Seed image for I2V (image-to-video) generation
|
|
88
|
+
* - Voice identity: Link to a VoiceProfile for TTS
|
|
89
|
+
* - Branding: Logo overlays, lower-thirds, colors
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```typescript
|
|
93
|
+
* import { Character } from '@happyvertical/smrt-video';
|
|
94
|
+
*
|
|
95
|
+
* const character = new Character({
|
|
96
|
+
* name: 'Bentley News Anchor',
|
|
97
|
+
* description: 'Professional news anchor for local broadcasts',
|
|
98
|
+
* imageAssetId: 'asset-123',
|
|
99
|
+
* voiceProfileId: 'voice-456',
|
|
100
|
+
* brandingKit: {
|
|
101
|
+
* logoAssetId: 'asset-789',
|
|
102
|
+
* primaryColor: '#1a73e8',
|
|
103
|
+
* lowerThirdTemplate: 'news-standard',
|
|
104
|
+
* tickerEnabled: true,
|
|
105
|
+
* },
|
|
106
|
+
* });
|
|
107
|
+
* await character.save();
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
export declare class Character extends SmrtObject {
|
|
111
|
+
/** Tenant ID for multi-tenant isolation */
|
|
112
|
+
tenantId: string | null;
|
|
113
|
+
/** Human-readable name for the character */
|
|
114
|
+
name: string;
|
|
115
|
+
/** Description of the character persona */
|
|
116
|
+
description: string | null;
|
|
117
|
+
/** Asset ID of the seed image for I2V generation */
|
|
118
|
+
imageAssetId: string | null;
|
|
119
|
+
/** Asset ID of pre-baked base motion video */
|
|
120
|
+
baseMotionAssetId: string | null;
|
|
121
|
+
/** Voice profile ID for speech synthesis */
|
|
122
|
+
voiceProfileId: string | null;
|
|
123
|
+
/** Branding configuration for video overlays */
|
|
124
|
+
brandingKit: BrandingConfig;
|
|
125
|
+
/** Character status */
|
|
126
|
+
status: CharacterStatus;
|
|
127
|
+
/** Linked performer for IP-Adapter face consistency */
|
|
128
|
+
performerId: string | null;
|
|
129
|
+
/** Default scene for this character */
|
|
130
|
+
defaultSceneId: string | null;
|
|
131
|
+
/** Scene-specific configurations */
|
|
132
|
+
sceneConfigs: CharacterSceneConfig[];
|
|
133
|
+
/** 1-1 profile record for this character */
|
|
134
|
+
profileId: string | null;
|
|
135
|
+
constructor(options?: CharacterOptions);
|
|
136
|
+
private getCharacterAssetCollection;
|
|
137
|
+
private getLegacyFieldAssetIds;
|
|
138
|
+
private setLegacyFieldAssetId;
|
|
139
|
+
private clearLegacyFieldAssetId;
|
|
140
|
+
getAssets(role?: CharacterAssetRole): Promise<Asset[]>;
|
|
141
|
+
getAssetByRole(role: CharacterAssetRole): Promise<Asset | null>;
|
|
142
|
+
addAsset(asset: Asset, role?: CharacterAssetRole, sortOrder?: number): Promise<void>;
|
|
143
|
+
removeAsset(assetId: string, role?: CharacterAssetRole): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Check if the character has a pre-baked base motion video
|
|
146
|
+
* @deprecated Use getAssetByRole('base-motion') instead
|
|
147
|
+
*/
|
|
148
|
+
get hasBaseMotion(): boolean;
|
|
149
|
+
/** Check if the character is complete and ready for video generation */
|
|
150
|
+
get isComplete(): boolean;
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=character.d.ts.map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CAAa;IAEpC,uDAAuD;IAEvD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAElC,uCAAuC;IAEvC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAQ;IAErC,oCAAoC;IACpC,YAAY,EAAE,oBAAoB,EAAE,CAAM;IAE1C,4CAA4C;IAE5C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;gBAEpB,OAAO,GAAE,gBAAqB;YAyB5B,2BAA2B;IAOzC,OAAO,CAAC,sBAAsB;IAoB9B,OAAO,CAAC,qBAAqB;IAiC7B,OAAO,CAAC,uBAAuB;IAiCzB,SAAS,CAAC,IAAI,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAiCtD,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAK/D,QAAQ,CACZ,KAAK,EAAE,KAAK,EACZ,IAAI,GAAE,kBAAiC,EACvC,SAAS,SAAI,GACZ,OAAO,CAAC,IAAI,CAAC;IAoBV,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAa5E;;;OAGG;IACH,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,wEAAwE;IACxE,IAAI,UAAU,IAAI,OAAO,CAMxB;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CharacterCollection - Collection manager for Character instances
|
|
3
|
+
*/
|
|
4
|
+
import { SmrtCollection } from '@happyvertical/smrt-core';
|
|
5
|
+
import { Character } from './character.js';
|
|
6
|
+
export declare class CharacterCollection extends SmrtCollection<Character> {
|
|
7
|
+
static readonly _itemClass: typeof Character;
|
|
8
|
+
/** Find all characters belonging to a specific tenant */
|
|
9
|
+
findByTenant(tenantId: string): Promise<Character[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Find all global characters (no tenant association).
|
|
12
|
+
*
|
|
13
|
+
* Routes through the shared tenant-global helper so it does not throw under
|
|
14
|
+
* an active tenant context (an explicit `tenant_id IS NULL` filter would be
|
|
15
|
+
* flagged as an isolation violation). (#1600)
|
|
16
|
+
*/
|
|
17
|
+
findGlobal(): Promise<Character[]>;
|
|
18
|
+
/** Find characters by performer */
|
|
19
|
+
findByPerformer(performerId: string): Promise<Character[]>;
|
|
20
|
+
/** Find characters that are ready for video generation */
|
|
21
|
+
findReady(): Promise<Character[]>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=characters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"characters.d.ts","sourceRoot":"","sources":["../src/characters.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,SAAS,CAAC;IAChE,MAAM,CAAC,QAAQ,CAAC,UAAU,mBAAa;IAEvC,yDAAyD;IACnD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAI1D;;;;;;OAMG;IACG,UAAU,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAIxC,mCAAmC;IAC7B,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAIhE,0DAA0D;IACpD,SAAS,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;CAGxC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CompositeJob Model
|
|
3
|
+
*
|
|
4
|
+
* Tracks the progress of compositing a character video onto a scene background.
|
|
5
|
+
*/
|
|
6
|
+
import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
7
|
+
import { SmrtObject } from '@happyvertical/smrt-core';
|
|
8
|
+
/**
|
|
9
|
+
* Composite job status
|
|
10
|
+
*/
|
|
11
|
+
export type CompositeJobStatus = 'pending' | 'removing_bg' | 'analyzing_light' | 'compositing' | 'complete' | 'failed';
|
|
12
|
+
/**
|
|
13
|
+
* Composite job creation options
|
|
14
|
+
*/
|
|
15
|
+
export interface CompositeJobOptions extends SmrtObjectOptions {
|
|
16
|
+
/** Character video asset ID (after lip-sync) */
|
|
17
|
+
characterVideoAssetId?: string | null;
|
|
18
|
+
/** Scene ID to composite onto */
|
|
19
|
+
sceneId?: string | null;
|
|
20
|
+
/** Viewpoint ID (for 360° scenes) */
|
|
21
|
+
viewpointId?: string | null;
|
|
22
|
+
/** Anchor point ID for placement */
|
|
23
|
+
anchorPointId?: string | null;
|
|
24
|
+
/** Character scale */
|
|
25
|
+
scale?: number;
|
|
26
|
+
/** Character position (normalized 0-1) */
|
|
27
|
+
position?: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
};
|
|
31
|
+
/** Job status */
|
|
32
|
+
status?: CompositeJobStatus;
|
|
33
|
+
/** Progress percentage (0-100) */
|
|
34
|
+
progress?: number;
|
|
35
|
+
/** Output video asset ID */
|
|
36
|
+
outputAssetId?: string | null;
|
|
37
|
+
/** Error message if failed */
|
|
38
|
+
errorMessage?: string | null;
|
|
39
|
+
/** Tenant ID for multi-tenant isolation */
|
|
40
|
+
tenantId?: string | null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Composite job for tracking virtual production compositing
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* import { CompositeJob } from '@happyvertical/smrt-video';
|
|
48
|
+
*
|
|
49
|
+
* const job = new CompositeJob({
|
|
50
|
+
* characterVideoAssetId: 'asset-video-123',
|
|
51
|
+
* sceneId: 'scene-townhall',
|
|
52
|
+
* scale: 0.8,
|
|
53
|
+
* position: { x: 0.5, y: 0.7 },
|
|
54
|
+
* });
|
|
55
|
+
* await job.save();
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare class CompositeJob extends SmrtObject {
|
|
59
|
+
tenantId: string | null;
|
|
60
|
+
/** Character video asset ID (after lip-sync) */
|
|
61
|
+
characterVideoAssetId: string | null;
|
|
62
|
+
/** Scene ID to composite onto */
|
|
63
|
+
sceneId: string | null;
|
|
64
|
+
/** Viewpoint ID (for 360° scenes) */
|
|
65
|
+
viewpointId: string | null;
|
|
66
|
+
/** Anchor point ID for placement */
|
|
67
|
+
anchorPointId: string | null;
|
|
68
|
+
/** Character scale */
|
|
69
|
+
scale: number;
|
|
70
|
+
/** Character position (normalized 0-1) */
|
|
71
|
+
position: {
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
};
|
|
75
|
+
/** Job status */
|
|
76
|
+
status: CompositeJobStatus;
|
|
77
|
+
/** Progress percentage (0-100) */
|
|
78
|
+
progress: number;
|
|
79
|
+
/** Output video asset ID */
|
|
80
|
+
outputAssetId: string | null;
|
|
81
|
+
/** Error message if failed */
|
|
82
|
+
errorMessage: string | null;
|
|
83
|
+
constructor(options?: CompositeJobOptions);
|
|
84
|
+
/** Check if the job is complete */
|
|
85
|
+
get isComplete(): boolean;
|
|
86
|
+
/** Check if the job is in progress */
|
|
87
|
+
get isProcessing(): boolean;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=composite-job.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composite-job.d.ts","sourceRoot":"","sources":["../src/composite-job.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAGL,UAAU,EAEX,MAAM,0BAA0B,CAAC;AAIlC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,aAAa,GACb,iBAAiB,GACjB,aAAa,GACb,UAAU,GACV,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,mBAAoB,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