vidspotai-shared 1.0.82 → 1.0.83
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/lib/globals/aiModels/enums.d.ts +11 -1
- package/lib/globals/aiModels/enums.d.ts.map +1 -1
- package/lib/globals/aiModels/enums.js +24 -1
- package/lib/globals/aiModels/index.d.ts.map +1 -1
- package/lib/globals/aiModels/index.js +2 -0
- package/lib/globals/aiModels/providers/anthropic.d.ts +12 -0
- package/lib/globals/aiModels/providers/anthropic.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/anthropic.js +88 -0
- package/lib/globals/aiModels/providers/google.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/google.js +82 -0
- package/lib/globals/aiModels/providers/openai.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/openai.js +63 -4
- package/lib/globals/aiModels/tierHelpers.d.ts +12 -0
- package/lib/globals/aiModels/tierHelpers.d.ts.map +1 -1
- package/lib/globals/aiModels/tierHelpers.js +83 -0
- package/lib/globals/aiModels/types.d.ts +19 -0
- package/lib/globals/aiModels/types.d.ts.map +1 -1
- package/lib/globals/types.d.ts +120 -1
- package/lib/globals/types.d.ts.map +1 -1
- package/lib/globals/types.js +135 -1
- package/lib/models/agent.model.d.ts +41 -1
- package/lib/models/agent.model.d.ts.map +1 -1
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/index.js +1 -0
- package/lib/models/social.model.d.ts +180 -0
- package/lib/models/social.model.d.ts.map +1 -0
- package/lib/models/social.model.js +2 -0
- package/lib/models/user.model.d.ts +10 -0
- package/lib/models/user.model.d.ts.map +1 -1
- package/lib/models/video.model.d.ts +6 -0
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/schemas/brief.schema.d.ts +46 -0
- package/lib/schemas/brief.schema.d.ts.map +1 -1
- package/lib/schemas/brief.schema.js +72 -1
- package/lib/schemas/index.d.ts +1 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +1 -0
- package/lib/schemas/project.schema.d.ts +67 -0
- package/lib/schemas/project.schema.d.ts.map +1 -1
- package/lib/schemas/project.schema.js +12 -0
- package/lib/schemas/social.schema.d.ts +91 -0
- package/lib/schemas/social.schema.d.ts.map +1 -0
- package/lib/schemas/social.schema.js +114 -0
- package/lib/schemas/videoPlan.schema.d.ts +114 -0
- package/lib/schemas/videoPlan.schema.d.ts.map +1 -1
- package/lib/schemas/videoPlan.schema.js +141 -1
- package/lib/services/agent/chatAgent.d.ts +25 -1
- package/lib/services/agent/chatAgent.d.ts.map +1 -1
- package/lib/services/agent/chatAgent.js +145 -9
- package/lib/services/agent/costPreflight.d.ts +11 -1
- package/lib/services/agent/costPreflight.d.ts.map +1 -1
- package/lib/services/agent/costPreflight.js +18 -1
- package/lib/services/agent/covers/coverPlanner.d.ts +41 -0
- package/lib/services/agent/covers/coverPlanner.d.ts.map +1 -0
- package/lib/services/agent/covers/coverPlanner.js +278 -0
- package/lib/services/agent/covers/covers.schema.d.ts +158 -0
- package/lib/services/agent/covers/covers.schema.d.ts.map +1 -0
- package/lib/services/agent/covers/covers.schema.js +166 -0
- package/lib/services/agent/covers/index.d.ts +3 -0
- package/lib/services/agent/covers/index.d.ts.map +1 -0
- package/lib/services/agent/covers/index.js +18 -0
- package/lib/services/agent/critic.d.ts +10 -0
- package/lib/services/agent/critic.d.ts.map +1 -1
- package/lib/services/agent/critic.js +37 -1
- package/lib/services/agent/editClassifier.d.ts +2 -2
- package/lib/services/agent/editClassifier.js +2 -2
- package/lib/services/agent/editExisting/editAssembler.d.ts +78 -0
- package/lib/services/agent/editExisting/editAssembler.d.ts.map +1 -0
- package/lib/services/agent/editExisting/editAssembler.js +172 -0
- package/lib/services/agent/editExisting/editExisting.schema.d.ts +119 -0
- package/lib/services/agent/editExisting/editExisting.schema.d.ts.map +1 -0
- package/lib/services/agent/editExisting/editExisting.schema.js +157 -0
- package/lib/services/agent/editExisting/highlightPicker.d.ts +48 -0
- package/lib/services/agent/editExisting/highlightPicker.d.ts.map +1 -0
- package/lib/services/agent/editExisting/highlightPicker.js +199 -0
- package/lib/services/agent/editExisting/index.d.ts +4 -0
- package/lib/services/agent/editExisting/index.d.ts.map +1 -0
- package/lib/services/agent/editExisting/index.js +19 -0
- package/lib/services/agent/eval/seedBriefs.d.ts +4 -3
- package/lib/services/agent/eval/seedBriefs.d.ts.map +1 -1
- package/lib/services/agent/eval/seedBriefs.js +283 -3
- package/lib/services/agent/eval/types.d.ts +10 -0
- package/lib/services/agent/eval/types.d.ts.map +1 -1
- package/lib/services/agent/executor/core.d.ts +70 -0
- package/lib/services/agent/executor/core.d.ts.map +1 -0
- package/lib/services/agent/executor/core.js +250 -0
- package/lib/services/agent/executor/duration.d.ts +20 -0
- package/lib/services/agent/executor/duration.d.ts.map +1 -0
- package/lib/services/agent/executor/duration.js +46 -0
- package/lib/services/agent/executor/index.d.ts +15 -0
- package/lib/services/agent/executor/index.d.ts.map +1 -0
- package/lib/services/agent/executor/index.js +32 -0
- package/lib/services/agent/executor/types.d.ts +183 -0
- package/lib/services/agent/executor/types.d.ts.map +1 -0
- package/lib/services/agent/executor/types.js +29 -0
- package/lib/services/agent/executor/visual.d.ts +32 -0
- package/lib/services/agent/executor/visual.d.ts.map +1 -0
- package/lib/services/agent/executor/visual.js +400 -0
- package/lib/services/agent/executor/voice.d.ts +17 -0
- package/lib/services/agent/executor/voice.d.ts.map +1 -0
- package/lib/services/agent/executor/voice.js +119 -0
- package/lib/services/agent/extendChain.d.ts +101 -0
- package/lib/services/agent/extendChain.d.ts.map +1 -0
- package/lib/services/agent/extendChain.js +177 -0
- package/lib/services/agent/index.d.ts +11 -1
- package/lib/services/agent/index.d.ts.map +1 -1
- package/lib/services/agent/index.js +11 -1
- package/lib/services/agent/llmCaller.d.ts +7 -8
- package/lib/services/agent/llmCaller.d.ts.map +1 -1
- package/lib/services/agent/llmCallerAnthropic.d.ts +44 -31
- package/lib/services/agent/llmCallerAnthropic.d.ts.map +1 -1
- package/lib/services/agent/llmCallerAnthropic.js +135 -60
- package/lib/services/agent/llmCallerFactory.d.ts +34 -0
- package/lib/services/agent/llmCallerFactory.d.ts.map +1 -0
- package/lib/services/agent/llmCallerFactory.js +31 -0
- package/lib/services/agent/llmCallerGemini.d.ts +62 -0
- package/lib/services/agent/llmCallerGemini.d.ts.map +1 -0
- package/lib/services/agent/llmCallerGemini.js +235 -0
- package/lib/services/agent/llmCallerOpenai.d.ts +56 -0
- package/lib/services/agent/llmCallerOpenai.d.ts.map +1 -0
- package/lib/services/agent/llmCallerOpenai.js +230 -0
- package/lib/services/agent/llmCallerRegistry.d.ts.map +1 -1
- package/lib/services/agent/llmCallerRegistry.js +7 -7
- package/lib/services/agent/llmCallerRouting.d.ts +63 -0
- package/lib/services/agent/llmCallerRouting.d.ts.map +1 -0
- package/lib/services/agent/llmCallerRouting.js +124 -0
- package/lib/services/agent/llmModelRegistry.d.ts +59 -0
- package/lib/services/agent/llmModelRegistry.d.ts.map +1 -0
- package/lib/services/agent/llmModelRegistry.js +168 -0
- package/lib/services/agent/llmRetry.d.ts +57 -0
- package/lib/services/agent/llmRetry.d.ts.map +1 -0
- package/lib/services/agent/llmRetry.js +102 -0
- package/lib/services/agent/modelRouter.d.ts +3 -3
- package/lib/services/agent/modelRouter.d.ts.map +1 -1
- package/lib/services/agent/modelRouter.js +27 -13
- package/lib/services/agent/planMutations.d.ts +54 -1
- package/lib/services/agent/planMutations.d.ts.map +1 -1
- package/lib/services/agent/planMutations.js +78 -0
- package/lib/services/agent/planner/Planner.d.ts +0 -17
- package/lib/services/agent/planner/Planner.d.ts.map +1 -1
- package/lib/services/agent/planner/Planner.js +67 -303
- package/lib/services/agent/planner/overlayRegen.d.ts +38 -0
- package/lib/services/agent/planner/overlayRegen.d.ts.map +1 -0
- package/lib/services/agent/planner/overlayRegen.js +145 -0
- package/lib/services/agent/planner/plannerMessages.d.ts +34 -0
- package/lib/services/agent/planner/plannerMessages.d.ts.map +1 -0
- package/lib/services/agent/planner/plannerMessages.js +185 -0
- package/lib/services/agent/planner/promptSections.d.ts +12 -0
- package/lib/services/agent/planner/promptSections.d.ts.map +1 -1
- package/lib/services/agent/planner/promptSections.js +57 -0
- package/lib/services/agent/planner/scriptFirstPlanner.d.ts +35 -0
- package/lib/services/agent/planner/scriptFirstPlanner.d.ts.map +1 -0
- package/lib/services/agent/planner/scriptFirstPlanner.js +140 -0
- package/lib/services/agent/planner/structuralRules.d.ts +10 -0
- package/lib/services/agent/planner/structuralRules.d.ts.map +1 -1
- package/lib/services/agent/planner/structuralRules.js +92 -9
- package/lib/services/agent/planner/validators.d.ts +18 -0
- package/lib/services/agent/planner/validators.d.ts.map +1 -1
- package/lib/services/agent/planner/validators.js +97 -0
- package/lib/services/agent/planner.d.ts +2 -1
- package/lib/services/agent/planner.d.ts.map +1 -1
- package/lib/services/agent/planner.js +5 -1
- package/lib/services/agent/priorProject.d.ts +26 -0
- package/lib/services/agent/priorProject.d.ts.map +1 -0
- package/lib/services/agent/priorProject.js +51 -0
- package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
- package/lib/services/agent/providerFallback/chains.js +27 -15
- package/lib/services/agent/repurpose/index.d.ts +3 -0
- package/lib/services/agent/repurpose/index.d.ts.map +1 -0
- package/lib/services/agent/repurpose/index.js +18 -0
- package/lib/services/agent/repurpose/repurpose.schema.d.ts +132 -0
- package/lib/services/agent/repurpose/repurpose.schema.d.ts.map +1 -0
- package/lib/services/agent/repurpose/repurpose.schema.js +144 -0
- package/lib/services/agent/repurpose/shortsPicker.d.ts +25 -0
- package/lib/services/agent/repurpose/shortsPicker.d.ts.map +1 -0
- package/lib/services/agent/repurpose/shortsPicker.js +218 -0
- package/lib/services/agent/runHelpers.d.ts +21 -2
- package/lib/services/agent/runHelpers.d.ts.map +1 -1
- package/lib/services/agent/runHelpers.js +71 -2
- package/lib/services/agent/tools/animateImage.tool.d.ts +1 -0
- package/lib/services/agent/tools/animateImage.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/animateImage.tool.js +12 -0
- package/lib/services/agent/tools/chapterOutline.tool.d.ts +42 -0
- package/lib/services/agent/tools/chapterOutline.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/chapterOutline.tool.js +115 -0
- package/lib/services/agent/tools/composeScene.tool.d.ts +63 -0
- package/lib/services/agent/tools/composeScene.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/estimateCost.tool.d.ts +27 -0
- package/lib/services/agent/tools/estimateCost.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/estimateCost.tool.js +55 -7
- package/lib/services/agent/tools/extendVideo.tool.d.ts +26 -0
- package/lib/services/agent/tools/extendVideo.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/extendVideo.tool.js +149 -0
- package/lib/services/agent/tools/generateScript.tool.d.ts +184 -0
- package/lib/services/agent/tools/generateScript.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/generateScript.tool.js +123 -0
- package/lib/services/agent/tools/generateVideo.tool.d.ts +1 -0
- package/lib/services/agent/tools/generateVideo.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/generateVideo.tool.js +20 -1
- package/lib/services/agent/tools/index.d.ts +4 -0
- package/lib/services/agent/tools/index.d.ts.map +1 -1
- package/lib/services/agent/tools/index.js +4 -0
- package/lib/services/agent/tools/matchBrollToScript.tool.d.ts +50 -0
- package/lib/services/agent/tools/matchBrollToScript.tool.d.ts.map +1 -0
- package/lib/services/agent/tools/matchBrollToScript.tool.js +139 -0
- package/lib/services/agent/tools/planVideo.tool.d.ts +56 -0
- package/lib/services/agent/tools/planVideo.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/planVideo.tool.js +3 -3
- package/lib/services/agent/tools/render.tool.d.ts +21 -0
- package/lib/services/agent/tools/render.tool.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +18 -3
- package/lib/services/aiGen/providers/anthropic/anthropic.service.d.ts +26 -0
- package/lib/services/aiGen/providers/anthropic/anthropic.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/anthropic/anthropic.service.js +95 -0
- package/lib/services/aiGen/providers/google/google.service.d.ts +24 -1
- package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/google.service.js +87 -243
- package/lib/services/aiGen/providers/google/googleErrors.d.ts +13 -0
- package/lib/services/aiGen/providers/google/googleErrors.d.ts.map +1 -0
- package/lib/services/aiGen/providers/google/googleErrors.js +102 -0
- package/lib/services/aiGen/providers/google/googleFetch.d.ts +8 -0
- package/lib/services/aiGen/providers/google/googleFetch.d.ts.map +1 -0
- package/lib/services/aiGen/providers/google/googleFetch.js +96 -0
- package/lib/services/aiGen/providers/google/googleMusic.d.ts +15 -0
- package/lib/services/aiGen/providers/google/googleMusic.d.ts.map +1 -0
- package/lib/services/aiGen/providers/google/googleMusic.js +77 -0
- package/lib/services/aiGen/providers/kling/kling.service.d.ts +7 -3
- package/lib/services/aiGen/providers/kling/kling.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/kling.service.js +23 -367
- package/lib/services/aiGen/providers/kling/klingCredits.d.ts +9 -0
- package/lib/services/aiGen/providers/kling/klingCredits.d.ts.map +1 -0
- package/lib/services/aiGen/providers/kling/klingCredits.js +63 -0
- package/lib/services/aiGen/providers/kling/klingRequests.d.ts +32 -0
- package/lib/services/aiGen/providers/kling/klingRequests.d.ts.map +1 -0
- package/lib/services/aiGen/providers/kling/klingRequests.js +194 -0
- package/lib/services/aiGen/providers/kling/klingStatus.d.ts +16 -0
- package/lib/services/aiGen/providers/kling/klingStatus.d.ts.map +1 -0
- package/lib/services/aiGen/providers/kling/klingStatus.js +173 -0
- package/lib/services/bullmq.service.d.ts +61 -0
- package/lib/services/bullmq.service.d.ts.map +1 -1
- package/lib/services/bullmq.service.js +101 -1
- package/lib/services/crypto/index.d.ts +2 -0
- package/lib/services/crypto/index.d.ts.map +1 -0
- package/lib/services/crypto/index.js +17 -0
- package/lib/services/crypto/tokenVault.d.ts +47 -0
- package/lib/services/crypto/tokenVault.d.ts.map +1 -0
- package/lib/services/crypto/tokenVault.js +179 -0
- package/lib/services/editor/captionStyleHint.d.ts +3 -0
- package/lib/services/editor/captionStyleHint.d.ts.map +1 -0
- package/lib/services/editor/captionStyleHint.js +112 -0
- package/lib/services/editor/planToProject.d.ts +7 -66
- package/lib/services/editor/planToProject.d.ts.map +1 -1
- package/lib/services/editor/planToProject.helpers.d.ts +40 -0
- package/lib/services/editor/planToProject.helpers.d.ts.map +1 -0
- package/lib/services/editor/planToProject.helpers.js +177 -0
- package/lib/services/editor/planToProject.js +197 -180
- package/lib/services/editor/planToProject.types.d.ts +94 -0
- package/lib/services/editor/planToProject.types.d.ts.map +1 -0
- package/lib/services/editor/planToProject.types.js +2 -0
- package/lib/services/firestore.service.d.ts +5 -0
- package/lib/services/firestore.service.d.ts.map +1 -1
- package/lib/services/firestore.service.js +13 -0
- package/lib/services/index.d.ts +12 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +12 -0
- package/lib/services/promptEnhancer/index.d.ts +18 -0
- package/lib/services/promptEnhancer/index.d.ts.map +1 -0
- package/lib/services/promptEnhancer/index.js +33 -0
- package/lib/services/promptEnhancer/models.d.ts +54 -0
- package/lib/services/promptEnhancer/models.d.ts.map +1 -0
- package/lib/services/promptEnhancer/models.js +37 -0
- package/lib/services/promptEnhancer/profiles/agent.profile.d.ts +14 -0
- package/lib/services/promptEnhancer/profiles/agent.profile.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/agent.profile.js +40 -0
- package/lib/services/promptEnhancer/profiles/avatar.profile.d.ts +13 -0
- package/lib/services/promptEnhancer/profiles/avatar.profile.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/avatar.profile.js +40 -0
- package/lib/services/promptEnhancer/profiles/base.d.ts +28 -0
- package/lib/services/promptEnhancer/profiles/base.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/base.js +35 -0
- package/lib/services/promptEnhancer/profiles/image.profile.d.ts +11 -0
- package/lib/services/promptEnhancer/profiles/image.profile.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/image.profile.js +42 -0
- package/lib/services/promptEnhancer/profiles/index.d.ts +12 -0
- package/lib/services/promptEnhancer/profiles/index.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/index.js +33 -0
- package/lib/services/promptEnhancer/profiles/video.profile.d.ts +15 -0
- package/lib/services/promptEnhancer/profiles/video.profile.d.ts.map +1 -0
- package/lib/services/promptEnhancer/profiles/video.profile.js +81 -0
- package/lib/services/promptEnhancer/promptEnhancer.service.d.ts +45 -0
- package/lib/services/promptEnhancer/promptEnhancer.service.d.ts.map +1 -0
- package/lib/services/promptEnhancer/promptEnhancer.service.js +157 -0
- package/lib/services/promptEnhancer/schema.d.ts +19 -0
- package/lib/services/promptEnhancer/schema.d.ts.map +1 -0
- package/lib/services/promptEnhancer/schema.js +43 -0
- package/lib/services/promptEnhancer/types.d.ts +112 -0
- package/lib/services/promptEnhancer/types.d.ts.map +1 -0
- package/lib/services/promptEnhancer/types.js +2 -0
- package/lib/services/socialAI/captionGen.d.ts +81 -0
- package/lib/services/socialAI/captionGen.d.ts.map +1 -0
- package/lib/services/socialAI/captionGen.js +206 -0
- package/lib/services/socialAI/hookScore.d.ts +85 -0
- package/lib/services/socialAI/hookScore.d.ts.map +1 -0
- package/lib/services/socialAI/hookScore.js +170 -0
- package/lib/services/socialAI/index.d.ts +3 -0
- package/lib/services/socialAI/index.d.ts.map +1 -0
- package/lib/services/socialAI/index.js +18 -0
- package/lib/services/socialAccounts/index.d.ts +2 -0
- package/lib/services/socialAccounts/index.d.ts.map +1 -0
- package/lib/services/socialAccounts/index.js +17 -0
- package/lib/services/socialAccounts/socialAccountService.d.ts +25 -0
- package/lib/services/socialAccounts/socialAccountService.d.ts.map +1 -0
- package/lib/services/socialAccounts/socialAccountService.js +105 -0
- package/lib/services/socialEngage/factory.d.ts +7 -0
- package/lib/services/socialEngage/factory.d.ts.map +1 -0
- package/lib/services/socialEngage/factory.js +25 -0
- package/lib/services/socialEngage/index.d.ts +6 -0
- package/lib/services/socialEngage/index.d.ts.map +1 -0
- package/lib/services/socialEngage/index.js +21 -0
- package/lib/services/socialEngage/meta.engage.d.ts +17 -0
- package/lib/services/socialEngage/meta.engage.d.ts.map +1 -0
- package/lib/services/socialEngage/meta.engage.js +128 -0
- package/lib/services/socialEngage/metaWebhook.d.ts +50 -0
- package/lib/services/socialEngage/metaWebhook.d.ts.map +1 -0
- package/lib/services/socialEngage/metaWebhook.js +93 -0
- package/lib/services/socialEngage/types.d.ts +72 -0
- package/lib/services/socialEngage/types.d.ts.map +1 -0
- package/lib/services/socialEngage/types.js +10 -0
- package/lib/services/socialEngage/youtube.engage.d.ts +9 -0
- package/lib/services/socialEngage/youtube.engage.d.ts.map +1 -0
- package/lib/services/socialEngage/youtube.engage.js +87 -0
- package/lib/services/socialFormat/aspectGeometry.d.ts +74 -0
- package/lib/services/socialFormat/aspectGeometry.d.ts.map +1 -0
- package/lib/services/socialFormat/aspectGeometry.js +135 -0
- package/lib/services/socialFormat/index.d.ts +2 -0
- package/lib/services/socialFormat/index.d.ts.map +1 -0
- package/lib/services/socialFormat/index.js +19 -0
- package/lib/services/socialInsights/index.d.ts +3 -0
- package/lib/services/socialInsights/index.d.ts.map +1 -0
- package/lib/services/socialInsights/index.js +18 -0
- package/lib/services/socialInsights/recommendations.d.ts +131 -0
- package/lib/services/socialInsights/recommendations.d.ts.map +1 -0
- package/lib/services/socialInsights/recommendations.js +277 -0
- package/lib/services/socialInsights/timeBuckets.d.ts +35 -0
- package/lib/services/socialInsights/timeBuckets.d.ts.map +1 -0
- package/lib/services/socialInsights/timeBuckets.js +78 -0
- package/lib/services/socialMetrics/factory.d.ts +5 -0
- package/lib/services/socialMetrics/factory.d.ts.map +1 -0
- package/lib/services/socialMetrics/factory.js +24 -0
- package/lib/services/socialMetrics/index.d.ts +6 -0
- package/lib/services/socialMetrics/index.d.ts.map +1 -0
- package/lib/services/socialMetrics/index.js +21 -0
- package/lib/services/socialMetrics/meta.metrics.d.ts +22 -0
- package/lib/services/socialMetrics/meta.metrics.d.ts.map +1 -0
- package/lib/services/socialMetrics/meta.metrics.js +137 -0
- package/lib/services/socialMetrics/tiktok.metrics.d.ts +8 -0
- package/lib/services/socialMetrics/tiktok.metrics.d.ts.map +1 -0
- package/lib/services/socialMetrics/tiktok.metrics.js +43 -0
- package/lib/services/socialMetrics/types.d.ts +54 -0
- package/lib/services/socialMetrics/types.d.ts.map +1 -0
- package/lib/services/socialMetrics/types.js +2 -0
- package/lib/services/socialMetrics/youtube.metrics.d.ts +8 -0
- package/lib/services/socialMetrics/youtube.metrics.d.ts.map +1 -0
- package/lib/services/socialMetrics/youtube.metrics.js +43 -0
- package/lib/services/socialOAuth/factory.d.ts +7 -0
- package/lib/services/socialOAuth/factory.d.ts.map +1 -0
- package/lib/services/socialOAuth/factory.js +42 -0
- package/lib/services/socialOAuth/index.d.ts +11 -0
- package/lib/services/socialOAuth/index.d.ts.map +1 -0
- package/lib/services/socialOAuth/index.js +26 -0
- package/lib/services/socialOAuth/linkedin.oauth.d.ts +14 -0
- package/lib/services/socialOAuth/linkedin.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/linkedin.oauth.js +127 -0
- package/lib/services/socialOAuth/meta.oauth.d.ts +31 -0
- package/lib/services/socialOAuth/meta.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/meta.oauth.js +214 -0
- package/lib/services/socialOAuth/oauthState.d.ts +14 -0
- package/lib/services/socialOAuth/oauthState.d.ts.map +1 -0
- package/lib/services/socialOAuth/oauthState.js +66 -0
- package/lib/services/socialOAuth/pinterest.oauth.d.ts +15 -0
- package/lib/services/socialOAuth/pinterest.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/pinterest.oauth.js +126 -0
- package/lib/services/socialOAuth/threads.oauth.d.ts +14 -0
- package/lib/services/socialOAuth/threads.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/threads.oauth.js +129 -0
- package/lib/services/socialOAuth/tiktok.oauth.d.ts +15 -0
- package/lib/services/socialOAuth/tiktok.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/tiktok.oauth.js +151 -0
- package/lib/services/socialOAuth/types.d.ts +67 -0
- package/lib/services/socialOAuth/types.d.ts.map +1 -0
- package/lib/services/socialOAuth/types.js +2 -0
- package/lib/services/socialOAuth/x.oauth.d.ts +17 -0
- package/lib/services/socialOAuth/x.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/x.oauth.js +134 -0
- package/lib/services/socialOAuth/youtube.oauth.d.ts +15 -0
- package/lib/services/socialOAuth/youtube.oauth.d.ts.map +1 -0
- package/lib/services/socialOAuth/youtube.oauth.js +156 -0
- package/lib/services/socialPublish/factory.d.ts +5 -0
- package/lib/services/socialPublish/factory.d.ts.map +1 -0
- package/lib/services/socialPublish/factory.js +32 -0
- package/lib/services/socialPublish/index.d.ts +10 -0
- package/lib/services/socialPublish/index.d.ts.map +1 -0
- package/lib/services/socialPublish/index.js +25 -0
- package/lib/services/socialPublish/linkedin.publish.d.ts +9 -0
- package/lib/services/socialPublish/linkedin.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/linkedin.publish.js +143 -0
- package/lib/services/socialPublish/meta.publish.d.ts +28 -0
- package/lib/services/socialPublish/meta.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/meta.publish.js +149 -0
- package/lib/services/socialPublish/pinterest.publish.d.ts +13 -0
- package/lib/services/socialPublish/pinterest.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/pinterest.publish.js +130 -0
- package/lib/services/socialPublish/threads.publish.d.ts +12 -0
- package/lib/services/socialPublish/threads.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/threads.publish.js +96 -0
- package/lib/services/socialPublish/tiktok.publish.d.ts +13 -0
- package/lib/services/socialPublish/tiktok.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/tiktok.publish.js +118 -0
- package/lib/services/socialPublish/types.d.ts +47 -0
- package/lib/services/socialPublish/types.d.ts.map +1 -0
- package/lib/services/socialPublish/types.js +2 -0
- package/lib/services/socialPublish/x.publish.d.ts +12 -0
- package/lib/services/socialPublish/x.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/x.publish.js +147 -0
- package/lib/services/socialPublish/youtube.publish.d.ts +9 -0
- package/lib/services/socialPublish/youtube.publish.d.ts.map +1 -0
- package/lib/services/socialPublish/youtube.publish.js +107 -0
- package/lib/services/stock/index.d.ts +2 -0
- package/lib/services/stock/index.d.ts.map +1 -0
- package/lib/services/stock/index.js +17 -0
- package/lib/services/stock/realPersonSafety.d.ts +99 -0
- package/lib/services/stock/realPersonSafety.d.ts.map +1 -0
- package/lib/services/stock/realPersonSafety.js +248 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +1 -0
- package/lib/utils/renderTier.d.ts +26 -0
- package/lib/utils/renderTier.d.ts.map +1 -0
- package/lib/utils/renderTier.js +34 -0
- package/package.json +1 -1
|
@@ -1,162 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TRACK_ID = void 0;
|
|
4
|
-
exports.buildOverlayClipsForScene = buildOverlayClipsForScene;
|
|
3
|
+
exports.buildOverlayClipsForScene = exports.TRACK_ID = void 0;
|
|
5
4
|
exports.planToProject = planToProject;
|
|
6
5
|
const project_schema_1 = require("../../schemas/project.schema");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
caption: "track-caption",
|
|
14
|
-
};
|
|
15
|
-
// ─── strategy → clip kind ────────────────────────────────────────────────
|
|
16
|
-
const STILL_STRATEGIES = new Set([
|
|
17
|
-
"stock-image-ken-burns",
|
|
18
|
-
"ai-image-static",
|
|
19
|
-
]);
|
|
20
|
-
function isStillStrategy(s) {
|
|
21
|
-
return STILL_STRATEGIES.has(s);
|
|
22
|
-
}
|
|
23
|
-
/** A passable URL we can put in skeleton clips so ProjectSchema.url() passes. */
|
|
24
|
-
const PLACEHOLDER_URL = "data:,placeholder";
|
|
25
|
-
// ─── aspect → size defaults ──────────────────────────────────────────────
|
|
26
|
-
function sizeForAspect(aspect) {
|
|
27
|
-
switch (aspect) {
|
|
28
|
-
case "9:16":
|
|
29
|
-
return { width: 1080, height: 1920 };
|
|
30
|
-
case "1:1":
|
|
31
|
-
return { width: 1080, height: 1080 };
|
|
32
|
-
case "4:5":
|
|
33
|
-
return { width: 1080, height: 1350 };
|
|
34
|
-
case "16:9":
|
|
35
|
-
return { width: 1920, height: 1080 };
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
// ─── transition kind → renderable subset ─────────────────────────────────
|
|
39
|
-
const TRANSITION_KIND_MAP = {
|
|
40
|
-
none: null,
|
|
41
|
-
cut: null,
|
|
42
|
-
fade: "fade",
|
|
43
|
-
crossfade: "crossfade",
|
|
44
|
-
wipe: "wipe",
|
|
45
|
-
whipPan: "whipPan",
|
|
46
|
-
dipToBlack: "dipToBlack",
|
|
47
|
-
dipToWhite: "dipToWhite",
|
|
48
|
-
};
|
|
49
|
-
// ─── provenance builder ──────────────────────────────────────────────────
|
|
50
|
-
function provenanceForScene(scene, outcome) {
|
|
51
|
-
const attempted = outcome?.attemptedProviders;
|
|
52
|
-
const source = (attempted && attempted.length > 0 ? attempted[0] : undefined) ??
|
|
53
|
-
scene.preferredProvider ??
|
|
54
|
-
scene.strategy;
|
|
55
|
-
return {
|
|
56
|
-
tier: scene.tier,
|
|
57
|
-
source,
|
|
58
|
-
modelKey: outcome?.modelKey ?? scene.preferredModel,
|
|
59
|
-
prompt: scene.prompt,
|
|
60
|
-
assetHash: outcome?.assetHash,
|
|
61
|
-
creditsSpent: outcome?.creditsSpent ?? scene.estimatedCredits,
|
|
62
|
-
generationId: outcome?.generationId,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
// ─── overlay role → text styling defaults ────────────────────────────────
|
|
66
|
-
function fontSizeForOverlay(o, frameHeight) {
|
|
67
|
-
// Explicit px wins.
|
|
68
|
-
if (typeof o.fontSize === "number")
|
|
69
|
-
return o.fontSize;
|
|
70
|
-
// sizePct (2–20% of frame height) → px. Resolution-independent.
|
|
71
|
-
if (typeof o.sizePct === "number") {
|
|
72
|
-
return Math.max(8, Math.round((o.sizePct / 100) * frameHeight));
|
|
73
|
-
}
|
|
74
|
-
switch (o.role) {
|
|
75
|
-
case "headline":
|
|
76
|
-
return 96;
|
|
77
|
-
case "cta":
|
|
78
|
-
return 72;
|
|
79
|
-
case "subheadline":
|
|
80
|
-
case "body":
|
|
81
|
-
return 48;
|
|
82
|
-
case "watermark":
|
|
83
|
-
case "disclaimer":
|
|
84
|
-
case "label":
|
|
85
|
-
return 28;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
function fontWeightForOverlay(o) {
|
|
89
|
-
if (o.weight) {
|
|
90
|
-
return { regular: 400, medium: 500, bold: 700, black: 900 }[o.weight];
|
|
91
|
-
}
|
|
92
|
-
switch (o.role) {
|
|
93
|
-
case "headline":
|
|
94
|
-
case "cta":
|
|
95
|
-
return 900;
|
|
96
|
-
case "subheadline":
|
|
97
|
-
return 700;
|
|
98
|
-
case "watermark":
|
|
99
|
-
case "disclaimer":
|
|
100
|
-
return 400;
|
|
101
|
-
default:
|
|
102
|
-
return 700;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
6
|
+
const planToProject_helpers_1 = require("./planToProject.helpers");
|
|
7
|
+
// Re-export the public surface so `export * from "./editor/planToProject"`
|
|
8
|
+
// (services/index.ts) keeps surfacing these for existing importers.
|
|
9
|
+
var planToProject_helpers_2 = require("./planToProject.helpers");
|
|
10
|
+
Object.defineProperty(exports, "TRACK_ID", { enumerable: true, get: function () { return planToProject_helpers_2.TRACK_ID; } });
|
|
11
|
+
Object.defineProperty(exports, "buildOverlayClipsForScene", { enumerable: true, get: function () { return planToProject_helpers_2.buildOverlayClipsForScene; } });
|
|
105
12
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
13
|
+
* planToProject — pure translator from an approved VideoPlan + per-scene
|
|
14
|
+
* executor outcomes into the canonical Project IR. The Project is what gets
|
|
15
|
+
* persisted to Firestore (videos/{id}.project) and consumed by both editor
|
|
16
|
+
* (via projectToDesign) and the headless stitcher.
|
|
17
|
+
*
|
|
18
|
+
* The translator is pure (no I/O, no Firestore, no provider calls). The
|
|
19
|
+
* caller resolves any base64 → URL uploads (e.g. voiceover MP3) before
|
|
20
|
+
* passing outcomes; this keeps the function testable and round-trippable.
|
|
110
21
|
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
22
|
+
* Skeleton mode: if outcomes is missing or a scene's visualUrl is absent,
|
|
23
|
+
* a placeholder data URL is emitted so the Project is schema-valid and the
|
|
24
|
+
* editor can render a grey placeholder pinned to the scene's intended
|
|
25
|
+
* duration. Worker fills in the real URL via Firestore update later.
|
|
26
|
+
*
|
|
27
|
+
* Input/outcome types live in ./planToProject.types; the pure clip-builder
|
|
28
|
+
* helpers (track ids, size/transition lookups, overlay styling) in
|
|
29
|
+
* ./planToProject.helpers.
|
|
114
30
|
*/
|
|
115
|
-
function buildOverlayClipsForScene(sceneIndex, offsetMs, sceneDurationMs, overlays, frameHeight) {
|
|
116
|
-
const clips = [];
|
|
117
|
-
for (const [oi, overlay] of overlays.entries()) {
|
|
118
|
-
const overlayFrom = offsetMs + Math.max(0, overlay.startMs ?? 0);
|
|
119
|
-
const overlayTo = offsetMs + Math.min(sceneDurationMs, overlay.endMs ?? sceneDurationMs);
|
|
120
|
-
if (overlayTo <= overlayFrom)
|
|
121
|
-
continue;
|
|
122
|
-
clips.push({
|
|
123
|
-
id: `scene-${sceneIndex}-overlay-${oi}`,
|
|
124
|
-
trackId: exports.TRACK_ID.text,
|
|
125
|
-
type: "text",
|
|
126
|
-
display: { from: overlayFrom, to: overlayTo },
|
|
127
|
-
name: overlay.role,
|
|
128
|
-
text: overlay.text,
|
|
129
|
-
fontFamily: overlay.font ?? "Poppins",
|
|
130
|
-
fontSize: fontSizeForOverlay(overlay, frameHeight),
|
|
131
|
-
fontWeight: fontWeightForOverlay(overlay),
|
|
132
|
-
color: overlay.color ?? "#ffffff",
|
|
133
|
-
align: "center",
|
|
134
|
-
backgroundColor: overlay.bgColor,
|
|
135
|
-
effects: [],
|
|
136
|
-
transform: { x: 0, y: 0, scaleX: 1, scaleY: 1, rotation: 0, opacity: 1 },
|
|
137
|
-
locked: false,
|
|
138
|
-
metadata: {
|
|
139
|
-
sceneIndex,
|
|
140
|
-
role: overlay.role,
|
|
141
|
-
position: overlay.position,
|
|
142
|
-
emphasis: overlay.emphasis,
|
|
143
|
-
animation: overlay.animation,
|
|
144
|
-
bgStyle: overlay.bgStyle,
|
|
145
|
-
sizePct: overlay.sizePct,
|
|
146
|
-
persistAcrossScenes: overlay.persistAcrossScenes ?? false,
|
|
147
|
-
},
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
return clips;
|
|
151
|
-
}
|
|
152
|
-
// ─── main ────────────────────────────────────────────────────────────────
|
|
153
31
|
function planToProject(input) {
|
|
154
32
|
const { plan, projectId, name, agentRunId, musicUrl, musicDurationMs } = input;
|
|
155
33
|
const outcomes = input.outcomes ?? {};
|
|
156
34
|
const now = new Date().toISOString();
|
|
157
35
|
const createdAt = input.createdAt ?? now;
|
|
158
36
|
const updatedAt = input.updatedAt ?? now;
|
|
159
|
-
const size = sizeForAspect(plan.aspect);
|
|
37
|
+
const size = (0, planToProject_helpers_1.sizeForAspect)(plan.aspect);
|
|
160
38
|
// Walk scenes in order; build clips per kind and accumulate offset.
|
|
161
39
|
const clips = [];
|
|
162
40
|
const transitions = [];
|
|
@@ -165,6 +43,7 @@ function planToProject(input) {
|
|
|
165
43
|
let hasVoiceover = false;
|
|
166
44
|
let hasOverlays = false;
|
|
167
45
|
let hasCaptions = false;
|
|
46
|
+
let hasBroll = false;
|
|
168
47
|
const sortedScenes = [...plan.scenes].sort((a, b) => a.sceneIndex - b.sceneIndex);
|
|
169
48
|
for (const scene of sortedScenes) {
|
|
170
49
|
const outcome = outcomes[scene.sceneIndex];
|
|
@@ -181,12 +60,34 @@ function planToProject(input) {
|
|
|
181
60
|
const sceneDurationMs = Math.max(plannedSceneDurationMs, voDurationMs);
|
|
182
61
|
const display = { from: offsetMs, to: offsetMs + sceneDurationMs };
|
|
183
62
|
const visualClipId = `scene-${scene.sceneIndex}-visual`;
|
|
184
|
-
const visualUrl = outcome?.visualUrl || PLACEHOLDER_URL;
|
|
185
|
-
const provenance = provenanceForScene(scene, outcome);
|
|
186
|
-
|
|
63
|
+
const visualUrl = outcome?.visualUrl || planToProject_helpers_1.PLACEHOLDER_URL;
|
|
64
|
+
const provenance = (0, planToProject_helpers_1.provenanceForScene)(scene, outcome);
|
|
65
|
+
// AG-2 / L-4: an extend chain resolves to ≥2 sub-clips for one scene. They
|
|
66
|
+
// render as adjacent video clips across the scene window. Track the first
|
|
67
|
+
// sub-clip (transition target) and last sub-clip (next scene's transition
|
|
68
|
+
// source) so cross-scene transitions still anchor correctly.
|
|
69
|
+
const chainClips = outcome?.clips;
|
|
70
|
+
let firstVisualClipId = visualClipId;
|
|
71
|
+
let lastVisualClipId = visualClipId;
|
|
72
|
+
// Gap #1 follow-up (skip-generation). Visual was preserved verbatim and the
|
|
73
|
+
// executor skipped its gen, so there's no real URL to build from. Don't emit
|
|
74
|
+
// a placeholder twin — the preserve-override below injects the real clip(s).
|
|
75
|
+
// We still anchor this scene's transitions on the preserved visual ids (the
|
|
76
|
+
// chain's first/last) so cross-scene transitions reference clips that exist.
|
|
77
|
+
const visualFrozen = input.frozenVisualScenes?.has(scene.sceneIndex) ?? false;
|
|
78
|
+
if (visualFrozen) {
|
|
79
|
+
const sceneVisuals = (input.preserveClips ?? [])
|
|
80
|
+
.filter((c) => c.id === visualClipId || c.id.startsWith(`${visualClipId}-`))
|
|
81
|
+
.sort((a, b) => a.display.from - b.display.from);
|
|
82
|
+
if (sceneVisuals.length > 0) {
|
|
83
|
+
firstVisualClipId = sceneVisuals[0].id;
|
|
84
|
+
lastVisualClipId = sceneVisuals[sceneVisuals.length - 1].id;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else if ((0, planToProject_helpers_1.isStillStrategy)(scene.strategy)) {
|
|
187
88
|
const imageClip = {
|
|
188
89
|
id: visualClipId,
|
|
189
|
-
trackId:
|
|
90
|
+
trackId: planToProject_helpers_1.TRACK_ID.visual,
|
|
190
91
|
type: "image",
|
|
191
92
|
display,
|
|
192
93
|
name: `Scene ${scene.sceneIndex + 1}`,
|
|
@@ -206,10 +107,51 @@ function planToProject(input) {
|
|
|
206
107
|
};
|
|
207
108
|
clips.push(imageClip);
|
|
208
109
|
}
|
|
110
|
+
else if (chainClips && chainClips.length >= 2) {
|
|
111
|
+
// Multi-clip scene (extend chain): split the scene window proportionally
|
|
112
|
+
// to each sub-clip's nominal seconds; the last absorbs rounding so the
|
|
113
|
+
// sub-clips tile the window with no gaps. No intra-scene transitions —
|
|
114
|
+
// the extensions are a single continuous shot (hard cut/none between).
|
|
115
|
+
const totalSec = chainClips.reduce((s, c) => s + Math.max(0.001, c.durationSec), 0);
|
|
116
|
+
let subFrom = offsetMs;
|
|
117
|
+
chainClips.forEach((c, k) => {
|
|
118
|
+
const isLast = k === chainClips.length - 1;
|
|
119
|
+
const subTo = isLast
|
|
120
|
+
? offsetMs + sceneDurationMs
|
|
121
|
+
: subFrom + Math.round(sceneDurationMs * (c.durationSec / totalSec));
|
|
122
|
+
const subId = `${visualClipId}-${k}`;
|
|
123
|
+
const subClip = {
|
|
124
|
+
id: subId,
|
|
125
|
+
trackId: planToProject_helpers_1.TRACK_ID.visual,
|
|
126
|
+
type: "video",
|
|
127
|
+
display: { from: subFrom, to: subTo },
|
|
128
|
+
name: k === 0 ? `Scene ${scene.sceneIndex + 1}` : `Scene ${scene.sceneIndex + 1} (cont. ${k})`,
|
|
129
|
+
src: c.visualUrl || planToProject_helpers_1.PLACEHOLDER_URL,
|
|
130
|
+
volume: scene.voiceoverLine ? 0 : 1,
|
|
131
|
+
playbackRate: 1,
|
|
132
|
+
provenance,
|
|
133
|
+
effects: [],
|
|
134
|
+
transform: { x: 0, y: 0, scaleX: 1, scaleY: 1, rotation: 0, opacity: 1 },
|
|
135
|
+
locked: false,
|
|
136
|
+
metadata: {
|
|
137
|
+
sceneIndex: scene.sceneIndex,
|
|
138
|
+
strategy: scene.strategy,
|
|
139
|
+
layout: scene.layout,
|
|
140
|
+
extendClipIndex: k,
|
|
141
|
+
extendSourceTaskId: c.taskId,
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
clips.push(subClip);
|
|
145
|
+
if (k === 0)
|
|
146
|
+
firstVisualClipId = subId;
|
|
147
|
+
lastVisualClipId = subId;
|
|
148
|
+
subFrom = subTo;
|
|
149
|
+
});
|
|
150
|
+
}
|
|
209
151
|
else {
|
|
210
152
|
const videoClip = {
|
|
211
153
|
id: visualClipId,
|
|
212
|
-
trackId:
|
|
154
|
+
trackId: planToProject_helpers_1.TRACK_ID.visual,
|
|
213
155
|
type: "video",
|
|
214
156
|
display,
|
|
215
157
|
name: `Scene ${scene.sceneIndex + 1}`,
|
|
@@ -228,20 +170,22 @@ function planToProject(input) {
|
|
|
228
170
|
};
|
|
229
171
|
clips.push(videoClip);
|
|
230
172
|
}
|
|
231
|
-
// Transition between previous scene's visual and this one.
|
|
173
|
+
// Transition between previous scene's visual and this one. For a multi-clip
|
|
174
|
+
// scene the transition lands on the FIRST sub-clip; the next scene's
|
|
175
|
+
// transition will source from this scene's LAST sub-clip.
|
|
232
176
|
if (prevVisualClipId && scene.transitionIn) {
|
|
233
|
-
const kind = TRANSITION_KIND_MAP[scene.transitionIn];
|
|
177
|
+
const kind = planToProject_helpers_1.TRANSITION_KIND_MAP[scene.transitionIn];
|
|
234
178
|
if (kind) {
|
|
235
179
|
transitions.push({
|
|
236
180
|
id: `transition-${scene.sceneIndex}`,
|
|
237
181
|
fromClipId: prevVisualClipId,
|
|
238
|
-
toClipId:
|
|
182
|
+
toClipId: firstVisualClipId,
|
|
239
183
|
kind,
|
|
240
184
|
durationMs: 400,
|
|
241
185
|
});
|
|
242
186
|
}
|
|
243
187
|
}
|
|
244
|
-
prevVisualClipId =
|
|
188
|
+
prevVisualClipId = lastVisualClipId;
|
|
245
189
|
// Voiceover clip.
|
|
246
190
|
if (scene.voiceoverLine && outcome?.voiceoverUrl) {
|
|
247
191
|
hasVoiceover = true;
|
|
@@ -255,7 +199,7 @@ function planToProject(input) {
|
|
|
255
199
|
: sceneDurationMs;
|
|
256
200
|
const voClip = {
|
|
257
201
|
id: `scene-${scene.sceneIndex}-vo`,
|
|
258
|
-
trackId:
|
|
202
|
+
trackId: planToProject_helpers_1.TRACK_ID.voiceover,
|
|
259
203
|
type: "audio",
|
|
260
204
|
display: { from: offsetMs, to: offsetMs + voClipDurationMs },
|
|
261
205
|
name: `VO ${scene.sceneIndex + 1}`,
|
|
@@ -277,7 +221,7 @@ function planToProject(input) {
|
|
|
277
221
|
clips.push(voClip);
|
|
278
222
|
}
|
|
279
223
|
// Overlay text clips.
|
|
280
|
-
const overlayClips = buildOverlayClipsForScene(scene.sceneIndex, offsetMs, sceneDurationMs, scene.overlays ?? [], size.height);
|
|
224
|
+
const overlayClips = (0, planToProject_helpers_1.buildOverlayClipsForScene)(scene.sceneIndex, offsetMs, sceneDurationMs, scene.overlays ?? [], size.height);
|
|
281
225
|
if (overlayClips.length > 0)
|
|
282
226
|
hasOverlays = true;
|
|
283
227
|
for (const clip of overlayClips)
|
|
@@ -286,17 +230,25 @@ function planToProject(input) {
|
|
|
286
230
|
if (outcome?.captionWords && outcome.captionWords.length > 0) {
|
|
287
231
|
hasCaptions = true;
|
|
288
232
|
const text = outcome.captionWords.map((w) => w.word).join(" ");
|
|
233
|
+
// CH-8 — apply persisted caption styling (set by the chat
|
|
234
|
+
// change_caption_style tool): per-scene override wins over the
|
|
235
|
+
// plan-level style, which wins over the renderer defaults, per field.
|
|
236
|
+
const cs = { ...plan.captionStyle, ...scene.captionStyle };
|
|
289
237
|
const captionClip = {
|
|
290
238
|
id: `scene-${scene.sceneIndex}-caption`,
|
|
291
|
-
trackId:
|
|
239
|
+
trackId: planToProject_helpers_1.TRACK_ID.caption,
|
|
292
240
|
type: "caption",
|
|
293
241
|
display,
|
|
294
242
|
name: `Captions ${scene.sceneIndex + 1}`,
|
|
295
243
|
text,
|
|
296
244
|
words: outcome.captionWords,
|
|
297
|
-
fontFamily: "Poppins",
|
|
298
|
-
fontSize: 48,
|
|
299
|
-
|
|
245
|
+
fontFamily: cs?.fontFamily ?? "Poppins",
|
|
246
|
+
fontSize: cs?.fontSize ?? 48,
|
|
247
|
+
// CH-1 — weight is optional; leave it unset so the renderer applies
|
|
248
|
+
// its default bold (800) unless the style explicitly overrides it.
|
|
249
|
+
...(cs?.fontWeight !== undefined ? { fontWeight: cs.fontWeight } : {}),
|
|
250
|
+
color: cs?.color ?? "#ffffff",
|
|
251
|
+
...(cs?.highlightColor ? { highlightColor: cs.highlightColor } : {}),
|
|
300
252
|
language: "en",
|
|
301
253
|
effects: [],
|
|
302
254
|
transform: { x: 0, y: 0, scaleX: 1, scaleY: 1, rotation: 0, opacity: 1 },
|
|
@@ -305,6 +257,34 @@ function planToProject(input) {
|
|
|
305
257
|
};
|
|
306
258
|
clips.push(captionClip);
|
|
307
259
|
}
|
|
260
|
+
// CH-6 — B-roll overlays: each renders on the second video lane (above the
|
|
261
|
+
// main visual) within this scene's window. assetUrl points at an existing
|
|
262
|
+
// asset (no generation here); volume 0 so the overlay is silent by default.
|
|
263
|
+
if (scene.broll?.length) {
|
|
264
|
+
scene.broll.forEach((b, k) => {
|
|
265
|
+
const start = display.from + Math.max(0, Math.min(sceneDurationMs - 1, b.startMs ?? 0));
|
|
266
|
+
const maxTo = display.from + sceneDurationMs;
|
|
267
|
+
const to = b.durationMs ? Math.min(start + b.durationMs, maxTo) : maxTo;
|
|
268
|
+
const brollId = `scene-${scene.sceneIndex}-broll-${k}`;
|
|
269
|
+
const common = {
|
|
270
|
+
id: brollId,
|
|
271
|
+
trackId: planToProject_helpers_1.TRACK_ID.broll,
|
|
272
|
+
display: { from: start, to },
|
|
273
|
+
name: `B-roll ${scene.sceneIndex + 1}.${k + 1}`,
|
|
274
|
+
src: b.assetUrl,
|
|
275
|
+
provenance: (0, planToProject_helpers_1.provenanceForScene)(scene, outcome),
|
|
276
|
+
effects: [],
|
|
277
|
+
transform: { x: 0, y: 0, scaleX: 1, scaleY: 1, rotation: 0, opacity: 1 },
|
|
278
|
+
locked: false,
|
|
279
|
+
metadata: { sceneIndex: scene.sceneIndex, broll: true },
|
|
280
|
+
};
|
|
281
|
+
const brollClip = b.kind === "image"
|
|
282
|
+
? { ...common, type: "image" }
|
|
283
|
+
: { ...common, type: "video", volume: 0, playbackRate: 1 };
|
|
284
|
+
clips.push(brollClip);
|
|
285
|
+
hasBroll = true;
|
|
286
|
+
});
|
|
287
|
+
}
|
|
308
288
|
offsetMs += sceneDurationMs;
|
|
309
289
|
}
|
|
310
290
|
// Music: one clip spanning the full duration on the music track.
|
|
@@ -316,14 +296,14 @@ function planToProject(input) {
|
|
|
316
296
|
(plan.music?.durationSec ? plan.music.durationSec * 1000 : offsetMs);
|
|
317
297
|
const musicClip = {
|
|
318
298
|
id: "music",
|
|
319
|
-
trackId:
|
|
299
|
+
trackId: planToProject_helpers_1.TRACK_ID.music,
|
|
320
300
|
type: "audio",
|
|
321
301
|
display: { from: 0, to: offsetMs },
|
|
322
302
|
name: "Music",
|
|
323
303
|
src: resolvedMusicUrl,
|
|
324
304
|
volume: 0.4,
|
|
325
305
|
trim: musicMs > offsetMs ? { from: 0, to: offsetMs } : undefined,
|
|
326
|
-
duckAgainstTrackId: hasVoiceover ?
|
|
306
|
+
duckAgainstTrackId: hasVoiceover ? planToProject_helpers_1.TRACK_ID.voiceover : undefined,
|
|
327
307
|
fadeInMs: 1500,
|
|
328
308
|
fadeOutMs: 1000,
|
|
329
309
|
provenance: {
|
|
@@ -342,19 +322,68 @@ function planToProject(input) {
|
|
|
342
322
|
};
|
|
343
323
|
clips.push(musicClip);
|
|
344
324
|
}
|
|
325
|
+
// Stage 7 (lock enforcement) — overlay preserved clips verbatim. Runs after
|
|
326
|
+
// ALL clips (incl. music) are built so a preserved clip cleanly displaces
|
|
327
|
+
// its freshly-rebuilt twin by id (ids are deterministic: scene-N-visual /
|
|
328
|
+
// -vo / -caption / -overlay-K / -broll-K, plus "music"). A preserved clip
|
|
329
|
+
// with no rebuilt twin (e.g. a user-added clip not tied to any plan scene)
|
|
330
|
+
// is appended so it survives the rebuild. We keep the prior clip object
|
|
331
|
+
// as-is: it carries the user's edits, which exist nowhere in plan+outcome.
|
|
332
|
+
//
|
|
333
|
+
// Known v0 limitation: a preserved clip keeps its prior display.from/to, so
|
|
334
|
+
// if neighbouring (regenerated) scenes change duration the frozen clip can
|
|
335
|
+
// drift out of alignment. Full timeline reconciliation is the diff engine's
|
|
336
|
+
// job; preserving verbatim (the user locked position too) is the safe read,
|
|
337
|
+
// and matches the coarse over-preserve contract in planMutations.
|
|
338
|
+
if (input.preserveClips?.length) {
|
|
339
|
+
const preservedById = new Map(input.preserveClips.map((c) => [c.id, c]));
|
|
340
|
+
for (let i = 0; i < clips.length; i++) {
|
|
341
|
+
const replacement = preservedById.get(clips[i].id);
|
|
342
|
+
if (replacement) {
|
|
343
|
+
clips[i] = replacement;
|
|
344
|
+
preservedById.delete(replacement.id);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
for (const leftover of preservedById.values()) {
|
|
348
|
+
clips.push(leftover);
|
|
349
|
+
// Make sure the leftover's track gets declared below.
|
|
350
|
+
switch (leftover.trackId) {
|
|
351
|
+
case planToProject_helpers_1.TRACK_ID.broll:
|
|
352
|
+
hasBroll = true;
|
|
353
|
+
break;
|
|
354
|
+
case planToProject_helpers_1.TRACK_ID.voiceover:
|
|
355
|
+
hasVoiceover = true;
|
|
356
|
+
break;
|
|
357
|
+
case planToProject_helpers_1.TRACK_ID.music:
|
|
358
|
+
hasMusic = true;
|
|
359
|
+
break;
|
|
360
|
+
case planToProject_helpers_1.TRACK_ID.text:
|
|
361
|
+
hasOverlays = true;
|
|
362
|
+
break;
|
|
363
|
+
case planToProject_helpers_1.TRACK_ID.caption:
|
|
364
|
+
hasCaptions = true;
|
|
365
|
+
break;
|
|
366
|
+
default: break; // visual track is always declared
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
345
370
|
// Build tracks list (only declare tracks that actually have clips).
|
|
346
371
|
const tracks = [];
|
|
347
372
|
let trackIndex = 0;
|
|
348
373
|
// Stacking: visual at 0, captions/text above, audio below in order.
|
|
349
|
-
tracks.push(makeTrack(
|
|
374
|
+
tracks.push((0, planToProject_helpers_1.makeTrack)(planToProject_helpers_1.TRACK_ID.visual, "video", trackIndex++, "Video"));
|
|
375
|
+
// CH-6 — B-roll lane sits directly above the main video (higher index =
|
|
376
|
+
// painted on top) so overlays show over the scene's primary visual.
|
|
377
|
+
if (hasBroll)
|
|
378
|
+
tracks.push((0, planToProject_helpers_1.makeTrack)(planToProject_helpers_1.TRACK_ID.broll, "video", trackIndex++, "B-roll"));
|
|
350
379
|
if (hasVoiceover)
|
|
351
|
-
tracks.push(makeTrack(
|
|
380
|
+
tracks.push((0, planToProject_helpers_1.makeTrack)(planToProject_helpers_1.TRACK_ID.voiceover, "audio", trackIndex++, "Voiceover"));
|
|
352
381
|
if (hasMusic)
|
|
353
|
-
tracks.push(makeTrack(
|
|
382
|
+
tracks.push((0, planToProject_helpers_1.makeTrack)(planToProject_helpers_1.TRACK_ID.music, "audio", trackIndex++, "Music"));
|
|
354
383
|
if (hasOverlays)
|
|
355
|
-
tracks.push(makeTrack(
|
|
384
|
+
tracks.push((0, planToProject_helpers_1.makeTrack)(planToProject_helpers_1.TRACK_ID.text, "text", trackIndex++, "Text"));
|
|
356
385
|
if (hasCaptions)
|
|
357
|
-
tracks.push(makeTrack(
|
|
386
|
+
tracks.push((0, planToProject_helpers_1.makeTrack)(planToProject_helpers_1.TRACK_ID.caption, "caption", trackIndex++, "Captions"));
|
|
358
387
|
const durationMs = Math.max(1, offsetMs);
|
|
359
388
|
return {
|
|
360
389
|
schemaVersion: project_schema_1.PROJECT_SCHEMA_VERSION,
|
|
@@ -381,15 +410,3 @@ function planToProject(input) {
|
|
|
381
410
|
updatedAt,
|
|
382
411
|
};
|
|
383
412
|
}
|
|
384
|
-
function makeTrack(id, kind, index, name) {
|
|
385
|
-
return {
|
|
386
|
-
id,
|
|
387
|
-
kind,
|
|
388
|
-
name,
|
|
389
|
-
index,
|
|
390
|
-
muted: false,
|
|
391
|
-
hidden: false,
|
|
392
|
-
locked: false,
|
|
393
|
-
gainDb: 0,
|
|
394
|
-
};
|
|
395
|
-
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { Clip } from "../../schemas/project.schema";
|
|
2
|
+
import type { VideoPlan } from "../../schemas/videoPlan.schema";
|
|
3
|
+
/**
|
|
4
|
+
* Input/outcome types for planToProject. Kept separate from the translator so
|
|
5
|
+
* callers (executor host, regen handlers) can import the shapes without pulling
|
|
6
|
+
* the full builder.
|
|
7
|
+
*/
|
|
8
|
+
export interface SceneRenderOutcome {
|
|
9
|
+
/** Resolved URL for the scene's visual asset (image or video). */
|
|
10
|
+
visualUrl?: string;
|
|
11
|
+
/**
|
|
12
|
+
* AG-2 / L-4 extend chain. When a scene's visual was built as a source clip +
|
|
13
|
+
* N native extensions (too-long scene on an extend-capable model), the host's
|
|
14
|
+
* resolveExtendChain fills this with the sub-clips in render order. When
|
|
15
|
+
* present (length ≥ 2) planToProject lays them out as adjacent video clips
|
|
16
|
+
* spanning the scene's time window, which the renderer concatenates. A single
|
|
17
|
+
* resolved clip falls back to the `visualUrl` path.
|
|
18
|
+
*/
|
|
19
|
+
clips?: Array<{
|
|
20
|
+
visualUrl: string;
|
|
21
|
+
durationSec: number;
|
|
22
|
+
taskId?: string;
|
|
23
|
+
}>;
|
|
24
|
+
/** Resolved URL for the scene's voiceover. */
|
|
25
|
+
voiceoverUrl?: string;
|
|
26
|
+
/**
|
|
27
|
+
* VO duration in ms used by planToProject to size the clip's display
|
|
28
|
+
* window. When set from a probed actual mp3 (preferred), reflects real
|
|
29
|
+
* playback length; when set from the wpm estimator it can undershoot
|
|
30
|
+
* emotive/punctuated lines by 400–900ms and the editor's Remotion Audio
|
|
31
|
+
* truncates at endAt. Caller should set the actual when available.
|
|
32
|
+
*/
|
|
33
|
+
voiceoverDurationMs?: number;
|
|
34
|
+
/** Resolved URL for an external captions file (.vtt/.srt) if any. */
|
|
35
|
+
captionsUrl?: string;
|
|
36
|
+
/** Word-level caption timing (start/end ms within scene). */
|
|
37
|
+
captionWords?: Array<{
|
|
38
|
+
word: string;
|
|
39
|
+
start: number;
|
|
40
|
+
end: number;
|
|
41
|
+
}>;
|
|
42
|
+
/** Final model key the executor landed on (may differ from preferredModel). */
|
|
43
|
+
modelKey?: string;
|
|
44
|
+
/** Provider chain walked, primary first; recorded in provenance. */
|
|
45
|
+
attemptedProviders?: string[];
|
|
46
|
+
/** P-UNS-2: stock attribution to record in clip provenance (Unsplash credit). */
|
|
47
|
+
attribution?: {
|
|
48
|
+
name: string;
|
|
49
|
+
url?: string;
|
|
50
|
+
};
|
|
51
|
+
/** Provider idempotency key (used for reuse on regen). */
|
|
52
|
+
generationId?: string;
|
|
53
|
+
/** Credits actually spent on this scene. */
|
|
54
|
+
creditsSpent?: number;
|
|
55
|
+
/** Content hash of the visual asset, when computed. */
|
|
56
|
+
assetHash?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface PlanToProjectInput {
|
|
59
|
+
plan: VideoPlan;
|
|
60
|
+
outcomes?: Record<number, SceneRenderOutcome | undefined>;
|
|
61
|
+
projectId: string;
|
|
62
|
+
name?: string;
|
|
63
|
+
agentRunId?: string;
|
|
64
|
+
/** When set, overrides plan.music.url (caller can swap to CDN-hosted version). */
|
|
65
|
+
musicUrl?: string;
|
|
66
|
+
/** Music duration in ms; falls back to plan.music.durationSec*1000 if unset. */
|
|
67
|
+
musicDurationMs?: number;
|
|
68
|
+
/** Project createdAt; defaults to now. */
|
|
69
|
+
createdAt?: string;
|
|
70
|
+
/** Project updatedAt; defaults to now. */
|
|
71
|
+
updatedAt?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Stage 7 (lock enforcement) — clips from the prior project that must be
|
|
74
|
+
* reproduced verbatim, displacing any freshly-built clip with the same id.
|
|
75
|
+
* Supply the output of `computePreservedClips(priorProject, allowedMutations)`.
|
|
76
|
+
* A locked/user-placed clip carries edits (trim, volume, text, position)
|
|
77
|
+
* that exist nowhere in the plan, so it cannot be rebuilt — only kept as-is.
|
|
78
|
+
* Empty / unset on a first run or when nothing is protected (a no-op).
|
|
79
|
+
*/
|
|
80
|
+
preserveClips?: Clip[];
|
|
81
|
+
/**
|
|
82
|
+
* Gap #1 follow-up (skip-generation). Scene indices whose visual is frozen
|
|
83
|
+
* (preserved verbatim — see `preserveClips`). For these we DON'T build a
|
|
84
|
+
* placeholder visual clip from plan+outcome: the executor skipped generation
|
|
85
|
+
* so there's no real URL, and a placeholder twin would either be redundantly
|
|
86
|
+
* overridden (single-clip ids match) or — worse — leak a stray PLACEHOLDER
|
|
87
|
+
* clip when the preserved visual is an extend-chain (ids `-0`/`-1` don't
|
|
88
|
+
* match the rebuilt single `scene-N-visual`). Instead we skip the build and
|
|
89
|
+
* let the preserve-override inject the real clip(s), anchoring transitions on
|
|
90
|
+
* the preserved ids. Derive via `computeFrozenScenes(preserveClips).visual`.
|
|
91
|
+
*/
|
|
92
|
+
frozenVisualScenes?: ReadonlySet<number>;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=planToProject.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planToProject.types.d.ts","sourceRoot":"","sources":["../../../src/services/editor/planToProject.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAEhE;;;;GAIG;AAEH,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3E,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,iFAAiF;IACjF,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC,CAAC;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC;IACvB;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC1C"}
|
|
@@ -8,6 +8,7 @@ import { IImageJobModel } from "../models/image.model";
|
|
|
8
8
|
import { INotificationModel } from "../models/notification.model";
|
|
9
9
|
import { IRefModel } from "../models/ref.model";
|
|
10
10
|
import { IMediaUploadModel } from "../models/mediaUpload.model";
|
|
11
|
+
import { ISocialAccountModel, ISocialAnalyticsModel, ISocialInboxItemModel, ISocialPostModel } from "../models/social.model";
|
|
11
12
|
import { IShareModel } from "../models/share.model";
|
|
12
13
|
import { IUserModel } from "../models/user.model";
|
|
13
14
|
import { IVideoJobModel } from "../models/video.model";
|
|
@@ -50,6 +51,10 @@ export declare class FirestoreService {
|
|
|
50
51
|
static agentRunsCol: CollectionReference<IAgentRunModel, DocumentData>;
|
|
51
52
|
static sharesCol: CollectionReference<IShareModel, DocumentData>;
|
|
52
53
|
static mediaUploadsCol: CollectionReference<IMediaUploadModel, DocumentData>;
|
|
54
|
+
static socialAccountsCol: CollectionReference<ISocialAccountModel, DocumentData>;
|
|
55
|
+
static socialPostsCol: CollectionReference<ISocialPostModel, DocumentData>;
|
|
56
|
+
static socialAnalyticsCol: CollectionReference<ISocialAnalyticsModel, DocumentData>;
|
|
57
|
+
static socialInboxCol: CollectionReference<ISocialInboxItemModel, DocumentData>;
|
|
53
58
|
/** Add new document with generated ID */
|
|
54
59
|
static appendNewRecord<T>(collectionRef: CollectionReference<T>, data: T): Promise<DocumentReference<T>>;
|
|
55
60
|
/** Add or overwrite a document with a specific ID */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firestore.service.d.ts","sourceRoot":"","sources":["../../src/services/firestore.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,gBAAgB,EAEhB,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EAGlB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAevD;;;;GAIG;AACH,qBAAa,gBAAgB;IAE3B,MAAM,CAAC,YAAY,oDAEqC;IAExD,MAAM,CAAC,YAAY,oDAEqC;IAExD,MAAM,CAAC,gBAAgB,wDAEqC;IAE5D,MAAM,CAAC,OAAO,+CAEqC;IAEnD,MAAM,CAAC,QAAQ,gDAEqC;IAEpD,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;qBAEqC;IAEtD,MAAM,CAAC,aAAa,uDAEuC;IAE3D,MAAM,CAAC,gBAAgB,0DAEuC;IAE9D,MAAM,CAAC,YAAY,oDAEqC;IAExD,MAAM,CAAC,cAAc,uDAEsC;IAE3D,MAAM,CAAC,gBAAgB,wDAEqC;IAE5D,MAAM,CAAC,YAAY,oDAEqC;IAExD,MAAM,CAAC,SAAS,iDAEqC;IAErD,MAAM,CAAC,eAAe,uDAEqC;
|
|
1
|
+
{"version":3,"file":"firestore.service.d.ts","sourceRoot":"","sources":["../../src/services/firestore.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,gBAAgB,EAEhB,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EAGlB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAevD;;;;GAIG;AACH,qBAAa,gBAAgB;IAE3B,MAAM,CAAC,YAAY,oDAEqC;IAExD,MAAM,CAAC,YAAY,oDAEqC;IAExD,MAAM,CAAC,gBAAgB,wDAEqC;IAE5D,MAAM,CAAC,OAAO,+CAEqC;IAEnD,MAAM,CAAC,QAAQ,gDAEqC;IAEpD,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;qBAEqC;IAEtD,MAAM,CAAC,aAAa,uDAEuC;IAE3D,MAAM,CAAC,gBAAgB,0DAEuC;IAE9D,MAAM,CAAC,YAAY,oDAEqC;IAExD,MAAM,CAAC,cAAc,uDAEsC;IAE3D,MAAM,CAAC,gBAAgB,wDAEqC;IAE5D,MAAM,CAAC,YAAY,oDAEqC;IAExD,MAAM,CAAC,SAAS,iDAEqC;IAErD,MAAM,CAAC,eAAe,uDAEqC;IAG3D,MAAM,CAAC,iBAAiB,yDAEqC;IAE7D,MAAM,CAAC,cAAc,sDAEqC;IAE1D,MAAM,CAAC,kBAAkB,2DAEsC;IAE/D,MAAM,CAAC,cAAc,2DAE0C;IAI/D,yCAAyC;WAC5B,eAAe,CAAC,CAAC,EAC5B,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,EACrC,IAAI,EAAE,CAAC,GACN,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAMhC,qDAAqD;WACxC,OAAO,CAAC,CAAC,EACpB,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,EACrC,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,CAAC,GACN,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAMhC,0CAA0C;WAC7B,UAAU,CAAC,CAAC,EACvB,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,GACpC,OAAO,CAAC,CAAC,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAKlC,kCAAkC;WACrB,WAAW,CAAC,CAAC,EACxB,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,EACrC,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,CAAC,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAO5C,+BAA+B;WAClB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAIrE,+CAA+C;WAClC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAS3E,gCAAgC;WACnB,iBAAiB,CAAC,CAAC,SAAS,YAAY,EACnD,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,EACrC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,GAAG,EACV,OAAO,CAAC,EAAE;QACR,YAAY,CAAC,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;QAChC,cAAc,CAAC,EAAE,gBAAgB,CAAC;QAClC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GACA,OAAO,CAAC,CAAC,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAsBlC,8CAA8C;WACjC,UAAU,CAAC,CAAC,EACvB,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,EACrC,EAAE,EAAE,MAAM,EACV,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC,EAC9B,OAAO,GAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAwB,GACrD,OAAO,CAAC,IAAI,CAAC;IAWhB,OAAO,CAAC,MAAM,CAAC,aAAa;IA2B5B,0CAA0C;WAC7B,cAAc,CACzB,EAAE,EAAE,MAAM,EACV,cAAc,EAAE,OAAO,CAAC,UAAU,CAAC,GAClC,OAAO,CAAC,IAAI,CAAC;IAIhB,sBAAsB;WACT,UAAU,CAAC,CAAC,EACvB,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,EACrC,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC;IAKhB,kCAAkC;WACrB,cAAc,CAAC,CAAC,EAC3B,OAAO,EAAE,CAAC,EAAE,EAAE,iBAAiB,CAAC,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,CAAC,CAAC;CAGd"}
|
|
@@ -156,3 +156,16 @@ FirestoreService.sharesCol = firebase_1.firestore
|
|
|
156
156
|
FirestoreService.mediaUploadsCol = firebase_1.firestore
|
|
157
157
|
.collection("mediaUploads")
|
|
158
158
|
.withConverter(collectionConverter());
|
|
159
|
+
// 🔹 X8 Social Suite — see notes/SOCIAL_SUITE_PLAN.md
|
|
160
|
+
FirestoreService.socialAccountsCol = firebase_1.firestore
|
|
161
|
+
.collection("socialAccounts")
|
|
162
|
+
.withConverter(collectionConverter());
|
|
163
|
+
FirestoreService.socialPostsCol = firebase_1.firestore
|
|
164
|
+
.collection("socialPosts")
|
|
165
|
+
.withConverter(collectionConverter());
|
|
166
|
+
FirestoreService.socialAnalyticsCol = firebase_1.firestore
|
|
167
|
+
.collection("socialAnalytics")
|
|
168
|
+
.withConverter(collectionConverter());
|
|
169
|
+
FirestoreService.socialInboxCol = firebase_1.firestore
|
|
170
|
+
.collection("socialInbox")
|
|
171
|
+
.withConverter(collectionConverter());
|