vidspotai-shared 1.0.82-dev.0 → 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 +115 -10
- 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 +70 -3
- 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 +117 -3
- 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 +4 -4
- 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/recorder.d.ts +13 -1
- package/lib/services/agent/eval/recorder.d.ts.map +1 -1
- package/lib/services/agent/eval/recorder.js +59 -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 +65 -2
- package/lib/services/agent/tools/composeScene.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/estimateCost.tool.d.ts +28 -1
- 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 +57 -1
- 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 +22 -1
- 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/helpers.d.ts +8 -0
- package/lib/services/aiGen/helpers.d.ts.map +1 -1
- package/lib/services/aiGen/helpers.js +12 -0
- 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 +25 -1
- package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/google.service.js +136 -237
- package/lib/services/aiGen/providers/google/googleApiKeys.d.ts +71 -0
- package/lib/services/aiGen/providers/google/googleApiKeys.d.ts.map +1 -0
- package/lib/services/aiGen/providers/google/googleApiKeys.js +137 -0
- 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/googleKeyPool.d.ts +52 -0
- package/lib/services/aiGen/providers/google/googleKeyPool.d.ts.map +1 -0
- package/lib/services/aiGen/providers/google/googleKeyPool.js +129 -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/aiGen/providers/pixverse/pixverse.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/pixverse/pixverse.service.js +7 -1
- 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 +124 -2
- 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 +13 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +13 -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/rateLimiter/distributedRateLimiter.service.d.ts +60 -5
- package/lib/services/rateLimiter/distributedRateLimiter.service.d.ts.map +1 -1
- package/lib/services/rateLimiter/distributedRateLimiter.service.js +184 -16
- 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/services/translation/index.d.ts +2 -0
- package/lib/services/translation/index.d.ts.map +1 -0
- package/lib/services/translation/index.js +9 -0
- package/lib/services/translation/translation.service.d.ts +50 -0
- package/lib/services/translation/translation.service.d.ts.map +1 -0
- package/lib/services/translation/translation.service.js +211 -0
- package/lib/utils/helpers.d.ts +2 -4
- package/lib/utils/helpers.d.ts.map +1 -1
- package/lib/utils/helpers.js +9 -63
- 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
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MetaOAuthProvider = void 0;
|
|
4
|
+
const types_1 = require("../../globals/types");
|
|
5
|
+
const logger_1 = require("../../utils/logger");
|
|
6
|
+
/**
|
|
7
|
+
* Meta (Facebook + Instagram) OAuth provider — Phase 3 of the Social Suite.
|
|
8
|
+
*
|
|
9
|
+
* One Facebook Login grant unlocks BOTH surfaces: every FB Page the user manages
|
|
10
|
+
* and each Page's linked IG Business/Creator account. We therefore key the OAuth
|
|
11
|
+
* factory with BOTH ESocialProvider.FACEBOOK and ESocialProvider.INSTAGRAM, each
|
|
12
|
+
* constructing a MetaOAuthProvider whose `target` decides which accounts the
|
|
13
|
+
* callback persists (Pages vs IG accounts). The auth dialog + token exchange are
|
|
14
|
+
* identical for both.
|
|
15
|
+
*
|
|
16
|
+
* Token model (important — differs from YouTube):
|
|
17
|
+
* - We exchange the short-lived user token for a LONG-LIVED user token
|
|
18
|
+
* (`fb_exchange_token`, ~60 days).
|
|
19
|
+
* - We then read `/me/accounts`, whose Page access tokens — when derived from a
|
|
20
|
+
* long-lived user token — DO NOT EXPIRE. We store the Page token per account
|
|
21
|
+
* and use it for both FB and the linked IG account (IG publishing/insights run
|
|
22
|
+
* through the managing Page token). So there is no refresh token and no
|
|
23
|
+
* proactive refresh; we set a far-future expiry and let a 401 on use trigger a
|
|
24
|
+
* reconnect. (Plan §3.)
|
|
25
|
+
*
|
|
26
|
+
* Config (env):
|
|
27
|
+
* META_APP_ID — Meta app id
|
|
28
|
+
* META_APP_SECRET — Meta app secret
|
|
29
|
+
* META_GRAPH_VERSION (optional, default v21.0)
|
|
30
|
+
*/
|
|
31
|
+
const DEFAULT_GRAPH_VERSION = "v21.0";
|
|
32
|
+
/** Pages/IG publishing + insights. Business scopes add lead/ads management. */
|
|
33
|
+
const BASE_SCOPES = [
|
|
34
|
+
"pages_show_list",
|
|
35
|
+
"pages_read_engagement",
|
|
36
|
+
"pages_manage_posts",
|
|
37
|
+
"business_management",
|
|
38
|
+
"instagram_basic",
|
|
39
|
+
"instagram_content_publish",
|
|
40
|
+
"instagram_manage_insights",
|
|
41
|
+
"read_insights",
|
|
42
|
+
];
|
|
43
|
+
const BUSINESS_SCOPES = [
|
|
44
|
+
"pages_manage_engagement", // comment moderation (G-features)
|
|
45
|
+
"instagram_manage_comments",
|
|
46
|
+
"leads_retrieval",
|
|
47
|
+
"ads_management",
|
|
48
|
+
];
|
|
49
|
+
/** Page tokens from a long-lived user token don't expire; use a far horizon. */
|
|
50
|
+
const PAGE_TOKEN_HORIZON_MS = 1000 * 60 * 60 * 24 * 365 * 5;
|
|
51
|
+
class MetaOAuthProvider {
|
|
52
|
+
constructor(target) {
|
|
53
|
+
if (target !== types_1.ESocialProvider.FACEBOOK &&
|
|
54
|
+
target !== types_1.ESocialProvider.INSTAGRAM) {
|
|
55
|
+
throw new Error(`MetaOAuth: unsupported target '${target}'`);
|
|
56
|
+
}
|
|
57
|
+
this.provider = target;
|
|
58
|
+
this.target = target;
|
|
59
|
+
}
|
|
60
|
+
graphVersion() {
|
|
61
|
+
return process.env.META_GRAPH_VERSION || DEFAULT_GRAPH_VERSION;
|
|
62
|
+
}
|
|
63
|
+
graph(path) {
|
|
64
|
+
return `https://graph.facebook.com/${this.graphVersion()}${path}`;
|
|
65
|
+
}
|
|
66
|
+
appId() {
|
|
67
|
+
const id = process.env.META_APP_ID;
|
|
68
|
+
if (!id)
|
|
69
|
+
throw new Error("MetaOAuth: META_APP_ID not set");
|
|
70
|
+
return id;
|
|
71
|
+
}
|
|
72
|
+
appSecret() {
|
|
73
|
+
const secret = process.env.META_APP_SECRET;
|
|
74
|
+
if (!secret)
|
|
75
|
+
throw new Error("MetaOAuth: META_APP_SECRET not set");
|
|
76
|
+
return secret;
|
|
77
|
+
}
|
|
78
|
+
getAuthUrl({ state, redirectUri, requestBusinessScopes, }) {
|
|
79
|
+
const scopes = requestBusinessScopes
|
|
80
|
+
? [...BASE_SCOPES, ...BUSINESS_SCOPES]
|
|
81
|
+
: BASE_SCOPES;
|
|
82
|
+
const params = new URLSearchParams({
|
|
83
|
+
client_id: this.appId(),
|
|
84
|
+
redirect_uri: redirectUri,
|
|
85
|
+
response_type: "code",
|
|
86
|
+
scope: scopes.join(","),
|
|
87
|
+
state,
|
|
88
|
+
});
|
|
89
|
+
return `https://www.facebook.com/${this.graphVersion()}/dialog/oauth?${params.toString()}`;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Single-account path is unused for Meta (one grant → many accounts), but the
|
|
93
|
+
* interface requires it. We return the first resolved account so any caller
|
|
94
|
+
* that ignores `exchangeCodeMulti` still gets something sensible.
|
|
95
|
+
*/
|
|
96
|
+
async exchangeCode(params) {
|
|
97
|
+
const all = await this.exchangeCodeMulti(params);
|
|
98
|
+
const first = all[0];
|
|
99
|
+
if (!first) {
|
|
100
|
+
throw new Error(this.target === types_1.ESocialProvider.INSTAGRAM
|
|
101
|
+
? "MetaOAuth: no IG Business account linked to any managed Page"
|
|
102
|
+
: "MetaOAuth: no Facebook Pages found on this account");
|
|
103
|
+
}
|
|
104
|
+
return first;
|
|
105
|
+
}
|
|
106
|
+
async exchangeCodeMulti(params) {
|
|
107
|
+
const { code, redirectUri } = params;
|
|
108
|
+
// 1. code → short-lived user token.
|
|
109
|
+
const short = await this.getJson(this.graph(`/oauth/access_token?${new URLSearchParams({
|
|
110
|
+
client_id: this.appId(),
|
|
111
|
+
client_secret: this.appSecret(),
|
|
112
|
+
redirect_uri: redirectUri,
|
|
113
|
+
code,
|
|
114
|
+
}).toString()}`));
|
|
115
|
+
if (!short.access_token) {
|
|
116
|
+
throw new Error(`MetaOAuth: code exchange returned no token ${short.error?.message ?? ""}`.trim());
|
|
117
|
+
}
|
|
118
|
+
// 2. short-lived → long-lived user token (~60d).
|
|
119
|
+
const longLived = await this.getJson(this.graph(`/oauth/access_token?${new URLSearchParams({
|
|
120
|
+
grant_type: "fb_exchange_token",
|
|
121
|
+
client_id: this.appId(),
|
|
122
|
+
client_secret: this.appSecret(),
|
|
123
|
+
fb_exchange_token: short.access_token,
|
|
124
|
+
}).toString()}`));
|
|
125
|
+
const userToken = longLived.access_token ?? short.access_token;
|
|
126
|
+
// 3. List managed Pages (each carries a Page access token).
|
|
127
|
+
const pages = await this.getJson(this.graph(`/me/accounts?fields=id,name,access_token,instagram_business_account&access_token=${encodeURIComponent(userToken)}`));
|
|
128
|
+
const list = pages.data ?? [];
|
|
129
|
+
if (!list.length) {
|
|
130
|
+
logger_1.logger.warn("MetaOAuth: user manages no Pages", { target: this.target });
|
|
131
|
+
return [];
|
|
132
|
+
}
|
|
133
|
+
return this.target === types_1.ESocialProvider.FACEBOOK
|
|
134
|
+
? await this.resolveFacebookPages(list)
|
|
135
|
+
: await this.resolveInstagramAccounts(list);
|
|
136
|
+
}
|
|
137
|
+
async resolveFacebookPages(pages) {
|
|
138
|
+
const out = [];
|
|
139
|
+
for (const p of pages) {
|
|
140
|
+
if (!p.id || !p.access_token)
|
|
141
|
+
continue;
|
|
142
|
+
let avatarUrl;
|
|
143
|
+
try {
|
|
144
|
+
const pic = await this.getJson(this.graph(`/${p.id}/picture?type=large&redirect=false&access_token=${encodeURIComponent(p.access_token)}`));
|
|
145
|
+
avatarUrl = pic.data?.url;
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
// avatar is best-effort
|
|
149
|
+
}
|
|
150
|
+
out.push({
|
|
151
|
+
account: {
|
|
152
|
+
providerAccountId: p.id,
|
|
153
|
+
displayName: p.name ?? "Facebook Page",
|
|
154
|
+
avatarUrl,
|
|
155
|
+
kind: types_1.ESocialAccountKind.PAGE,
|
|
156
|
+
},
|
|
157
|
+
tokens: this.pageTokens(p.access_token),
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
return out;
|
|
161
|
+
}
|
|
162
|
+
async resolveInstagramAccounts(pages) {
|
|
163
|
+
const out = [];
|
|
164
|
+
for (const p of pages) {
|
|
165
|
+
const igId = p.instagram_business_account?.id;
|
|
166
|
+
if (!igId || !p.access_token)
|
|
167
|
+
continue;
|
|
168
|
+
let profile = {};
|
|
169
|
+
try {
|
|
170
|
+
profile = await this.getJson(this.graph(`/${igId}?fields=username,name,profile_picture_url&access_token=${encodeURIComponent(p.access_token)}`));
|
|
171
|
+
}
|
|
172
|
+
catch {
|
|
173
|
+
// profile lookup is best-effort
|
|
174
|
+
}
|
|
175
|
+
out.push({
|
|
176
|
+
account: {
|
|
177
|
+
providerAccountId: igId,
|
|
178
|
+
displayName: profile.name ?? profile.username ?? "Instagram account",
|
|
179
|
+
handle: profile.username,
|
|
180
|
+
avatarUrl: profile.profile_picture_url,
|
|
181
|
+
kind: types_1.ESocialAccountKind.BUSINESS,
|
|
182
|
+
},
|
|
183
|
+
// IG publishing/insights run through the managing Page's token.
|
|
184
|
+
tokens: this.pageTokens(p.access_token),
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
return out;
|
|
188
|
+
}
|
|
189
|
+
pageTokens(pageToken) {
|
|
190
|
+
return {
|
|
191
|
+
accessToken: pageToken,
|
|
192
|
+
// No refresh token: Page tokens from a long-lived user token don't expire.
|
|
193
|
+
expiresAt: Date.now() + PAGE_TOKEN_HORIZON_MS,
|
|
194
|
+
scopes: [],
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Meta Page tokens don't expire, so refresh should never be called by the
|
|
199
|
+
* daemon (far-future expiry). If it is, surface a reconnect rather than
|
|
200
|
+
* silently returning a possibly-revoked token.
|
|
201
|
+
*/
|
|
202
|
+
async refresh() {
|
|
203
|
+
throw new Error("MetaOAuth: page tokens are long-lived — reconnect required if revoked");
|
|
204
|
+
}
|
|
205
|
+
async getJson(url) {
|
|
206
|
+
const resp = await fetch(url);
|
|
207
|
+
const json = (await resp.json());
|
|
208
|
+
if (!resp.ok || json.error) {
|
|
209
|
+
throw new Error(`MetaOAuth: graph ${resp.status} ${json.error?.message ?? ""}`.trim());
|
|
210
|
+
}
|
|
211
|
+
return json;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
exports.MetaOAuthProvider = MetaOAuthProvider;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ESocialProvider } from "../../globals/types";
|
|
2
|
+
export interface OAuthStatePayload {
|
|
3
|
+
userId: string;
|
|
4
|
+
provider: ESocialProvider;
|
|
5
|
+
/** App path to return to after connect (optional). */
|
|
6
|
+
returnTo?: string;
|
|
7
|
+
/** Whether business-tier scopes were requested. */
|
|
8
|
+
business?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Produce a signed state string to hand to the provider's auth URL. */
|
|
11
|
+
export declare function signOAuthState(payload: OAuthStatePayload, nonce: string): string;
|
|
12
|
+
/** Verify + decode a state string. Returns null if invalid, forged, or expired. */
|
|
13
|
+
export declare function verifyOAuthState(state: string): OAuthStatePayload | null;
|
|
14
|
+
//# sourceMappingURL=oauthState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauthState.d.ts","sourceRoot":"","sources":["../../../src/services/socialOAuth/oauthState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAetD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,eAAe,CAAC;IAC1B,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAgCD,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhF;AAED,mFAAmF;AACnF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAuBxE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.signOAuthState = signOAuthState;
|
|
4
|
+
exports.verifyOAuthState = verifyOAuthState;
|
|
5
|
+
const crypto_1 = require("crypto");
|
|
6
|
+
const tokenVault_1 = require("../crypto/tokenVault");
|
|
7
|
+
/**
|
|
8
|
+
* Stateless, signed OAuth `state` for the social connect flow. The OAuth
|
|
9
|
+
* callback (`/v1/social/oauth/callback/:provider`) is UNAUTHENTICATED — the
|
|
10
|
+
* provider redirects the browser there with no Firebase token — so we carry the
|
|
11
|
+
* initiating user's id inside a signed, time-boxed `state` rather than a server
|
|
12
|
+
* session. HMAC-SHA256 prevents forgery; the TTL bounds replay.
|
|
13
|
+
*
|
|
14
|
+
* Secret: `SOCIAL_OAUTH_STATE_SECRET`, falling back to `SOCIAL_TOKEN_ENC_KEY`.
|
|
15
|
+
*/
|
|
16
|
+
const TTL_MS = 10 * 60 * 1000; // 10 minutes to complete consent
|
|
17
|
+
function secret() {
|
|
18
|
+
const s = process.env.SOCIAL_OAUTH_STATE_SECRET ?? process.env.SOCIAL_TOKEN_ENC_KEY;
|
|
19
|
+
if (!s) {
|
|
20
|
+
throw new Error("oauthState: set SOCIAL_OAUTH_STATE_SECRET (or SOCIAL_TOKEN_ENC_KEY)");
|
|
21
|
+
}
|
|
22
|
+
return s;
|
|
23
|
+
}
|
|
24
|
+
function b64url(buf) {
|
|
25
|
+
return buf
|
|
26
|
+
.toString("base64")
|
|
27
|
+
.replace(/\+/g, "-")
|
|
28
|
+
.replace(/\//g, "_")
|
|
29
|
+
.replace(/=+$/, "");
|
|
30
|
+
}
|
|
31
|
+
function sign(body) {
|
|
32
|
+
return b64url((0, crypto_1.createHmac)("sha256", secret()).update(body).digest());
|
|
33
|
+
}
|
|
34
|
+
/** Produce a signed state string to hand to the provider's auth URL. */
|
|
35
|
+
function signOAuthState(payload, nonce) {
|
|
36
|
+
const full = { ...payload, iat: Date.now(), n: nonce };
|
|
37
|
+
const body = b64url(Buffer.from(JSON.stringify(full), "utf8"));
|
|
38
|
+
return `${body}.${sign(body)}`;
|
|
39
|
+
}
|
|
40
|
+
/** Verify + decode a state string. Returns null if invalid, forged, or expired. */
|
|
41
|
+
function verifyOAuthState(state) {
|
|
42
|
+
const dot = state.lastIndexOf(".");
|
|
43
|
+
if (dot <= 0)
|
|
44
|
+
return null;
|
|
45
|
+
const body = state.slice(0, dot);
|
|
46
|
+
const sig = state.slice(dot + 1);
|
|
47
|
+
if (!(0, tokenVault_1.safeEqual)(sig, sign(body)))
|
|
48
|
+
return null;
|
|
49
|
+
try {
|
|
50
|
+
const json = Buffer.from(body.replace(/-/g, "+").replace(/_/g, "/"), "base64").toString("utf8");
|
|
51
|
+
const parsed = JSON.parse(json);
|
|
52
|
+
if (!parsed.userId || !parsed.provider)
|
|
53
|
+
return null;
|
|
54
|
+
if (Date.now() - parsed.iat > TTL_MS)
|
|
55
|
+
return null;
|
|
56
|
+
return {
|
|
57
|
+
userId: parsed.userId,
|
|
58
|
+
provider: parsed.provider,
|
|
59
|
+
returnTo: parsed.returnTo,
|
|
60
|
+
business: parsed.business,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ESocialProvider } from "../../globals/types";
|
|
2
|
+
import { AuthUrlParams, ConnectResult, ExchangeCodeParams, ISocialOAuthProvider, OAuthTokens } from "./types";
|
|
3
|
+
export declare class PinterestOAuthProvider implements ISocialOAuthProvider {
|
|
4
|
+
readonly provider = ESocialProvider.PINTEREST;
|
|
5
|
+
private clientId;
|
|
6
|
+
private clientSecret;
|
|
7
|
+
private basicAuth;
|
|
8
|
+
getAuthUrl({ state, redirectUri, requestBusinessScopes, }: AuthUrlParams): string;
|
|
9
|
+
exchangeCode({ code, redirectUri, }: ExchangeCodeParams): Promise<ConnectResult>;
|
|
10
|
+
refresh(refreshToken: string): Promise<OAuthTokens>;
|
|
11
|
+
private postToken;
|
|
12
|
+
private toTokens;
|
|
13
|
+
private resolveAccount;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=pinterest.oauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pinterest.oauth.d.ts","sourceRoot":"","sources":["../../../src/services/socialOAuth/pinterest.oauth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EACL,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACZ,MAAM,SAAS,CAAC;AAsCjB,qBAAa,sBAAuB,YAAW,oBAAoB;IACjE,QAAQ,CAAC,QAAQ,6BAA6B;IAE9C,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,SAAS;IAMjB,UAAU,CAAC,EACT,KAAK,EACL,WAAW,EACX,qBAAqB,GACtB,EAAE,aAAa,GAAG,MAAM;IAcnB,YAAY,CAAC,EACjB,IAAI,EACJ,WAAW,GACZ,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAgBxC,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;YAe3C,SAAS;IAsBvB,OAAO,CAAC,QAAQ;YAaF,cAAc;CAoB7B"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PinterestOAuthProvider = void 0;
|
|
4
|
+
const types_1 = require("../../globals/types");
|
|
5
|
+
/**
|
|
6
|
+
* Pinterest OAuth provider (v5 API). Phase 6 — fast-follow adapter.
|
|
7
|
+
*
|
|
8
|
+
* Config (env):
|
|
9
|
+
* PINTEREST_CLIENT_ID
|
|
10
|
+
* PINTEREST_CLIENT_SECRET
|
|
11
|
+
*
|
|
12
|
+
* Token calls use HTTP Basic (client_id:client_secret). Access token ~30 days;
|
|
13
|
+
* refresh token ~1 year. A connected app starts in "trial" (sandbox) until
|
|
14
|
+
* Pinterest approves standard access. (Plan §G.)
|
|
15
|
+
*/
|
|
16
|
+
const AUTH_ENDPOINT = "https://www.pinterest.com/oauth/";
|
|
17
|
+
const TOKEN_ENDPOINT = "https://api.pinterest.com/v5/oauth/token";
|
|
18
|
+
const ACCOUNT_ENDPOINT = "https://api.pinterest.com/v5/user_account";
|
|
19
|
+
const BASE_SCOPES = ["boards:read", "pins:read", "pins:write", "user_accounts:read"];
|
|
20
|
+
const BUSINESS_SCOPES = ["boards:read_secret", "pins:read_secret"];
|
|
21
|
+
class PinterestOAuthProvider {
|
|
22
|
+
constructor() {
|
|
23
|
+
this.provider = types_1.ESocialProvider.PINTEREST;
|
|
24
|
+
}
|
|
25
|
+
clientId() {
|
|
26
|
+
const v = process.env.PINTEREST_CLIENT_ID;
|
|
27
|
+
if (!v)
|
|
28
|
+
throw new Error("PinterestOAuth: PINTEREST_CLIENT_ID not set");
|
|
29
|
+
return v;
|
|
30
|
+
}
|
|
31
|
+
clientSecret() {
|
|
32
|
+
const v = process.env.PINTEREST_CLIENT_SECRET;
|
|
33
|
+
if (!v)
|
|
34
|
+
throw new Error("PinterestOAuth: PINTEREST_CLIENT_SECRET not set");
|
|
35
|
+
return v;
|
|
36
|
+
}
|
|
37
|
+
basicAuth() {
|
|
38
|
+
return Buffer.from(`${this.clientId()}:${this.clientSecret()}`).toString("base64");
|
|
39
|
+
}
|
|
40
|
+
getAuthUrl({ state, redirectUri, requestBusinessScopes, }) {
|
|
41
|
+
const scopes = requestBusinessScopes
|
|
42
|
+
? [...BASE_SCOPES, ...BUSINESS_SCOPES]
|
|
43
|
+
: BASE_SCOPES;
|
|
44
|
+
const params = new URLSearchParams({
|
|
45
|
+
response_type: "code",
|
|
46
|
+
client_id: this.clientId(),
|
|
47
|
+
redirect_uri: redirectUri,
|
|
48
|
+
scope: scopes.join(","),
|
|
49
|
+
state,
|
|
50
|
+
});
|
|
51
|
+
return `${AUTH_ENDPOINT}?${params.toString()}`;
|
|
52
|
+
}
|
|
53
|
+
async exchangeCode({ code, redirectUri, }) {
|
|
54
|
+
const token = await this.postToken(new URLSearchParams({
|
|
55
|
+
grant_type: "authorization_code",
|
|
56
|
+
code,
|
|
57
|
+
redirect_uri: redirectUri,
|
|
58
|
+
}));
|
|
59
|
+
if (!token.access_token) {
|
|
60
|
+
throw new Error("PinterestOAuth: token exchange returned no access_token");
|
|
61
|
+
}
|
|
62
|
+
const tokens = this.toTokens(token);
|
|
63
|
+
const account = await this.resolveAccount(token.access_token);
|
|
64
|
+
return { account, tokens };
|
|
65
|
+
}
|
|
66
|
+
async refresh(refreshToken) {
|
|
67
|
+
const token = await this.postToken(new URLSearchParams({
|
|
68
|
+
grant_type: "refresh_token",
|
|
69
|
+
refresh_token: refreshToken,
|
|
70
|
+
}));
|
|
71
|
+
if (!token.access_token) {
|
|
72
|
+
throw new Error("PinterestOAuth: refresh returned no access_token");
|
|
73
|
+
}
|
|
74
|
+
const tokens = this.toTokens(token);
|
|
75
|
+
if (!tokens.refreshToken)
|
|
76
|
+
tokens.refreshToken = refreshToken;
|
|
77
|
+
return tokens;
|
|
78
|
+
}
|
|
79
|
+
async postToken(body) {
|
|
80
|
+
const resp = await fetch(TOKEN_ENDPOINT, {
|
|
81
|
+
method: "POST",
|
|
82
|
+
headers: {
|
|
83
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
84
|
+
Authorization: `Basic ${this.basicAuth()}`,
|
|
85
|
+
},
|
|
86
|
+
body: body.toString(),
|
|
87
|
+
});
|
|
88
|
+
const json = (await resp.json());
|
|
89
|
+
if (!resp.ok || json.error) {
|
|
90
|
+
throw new Error(`PinterestOAuth: token endpoint ${resp.status} ${json.error ?? ""} ${json.error_description ?? json.message ?? ""}`.trim());
|
|
91
|
+
}
|
|
92
|
+
return json;
|
|
93
|
+
}
|
|
94
|
+
toTokens(token) {
|
|
95
|
+
const now = Date.now();
|
|
96
|
+
return {
|
|
97
|
+
accessToken: token.access_token,
|
|
98
|
+
refreshToken: token.refresh_token,
|
|
99
|
+
expiresAt: now + (token.expires_in ?? 30 * 24 * 3600) * 1000,
|
|
100
|
+
refreshExpiresAt: token.refresh_token_expires_in
|
|
101
|
+
? now + token.refresh_token_expires_in * 1000
|
|
102
|
+
: undefined,
|
|
103
|
+
scopes: token.scope ? token.scope.split(/[ ,]/).filter(Boolean) : [],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
async resolveAccount(accessToken) {
|
|
107
|
+
const resp = await fetch(ACCOUNT_ENDPOINT, {
|
|
108
|
+
headers: { Authorization: `Bearer ${accessToken}` },
|
|
109
|
+
});
|
|
110
|
+
const json = (await resp.json());
|
|
111
|
+
if (!resp.ok || !json.username) {
|
|
112
|
+
throw new Error(`PinterestOAuth: user_account ${resp.status}`);
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
// Pinterest v5 keys the account by username (no separate stable id).
|
|
116
|
+
providerAccountId: json.username,
|
|
117
|
+
displayName: json.business_name ?? json.username,
|
|
118
|
+
handle: json.username,
|
|
119
|
+
avatarUrl: json.profile_image,
|
|
120
|
+
kind: json.account_type === "BUSINESS"
|
|
121
|
+
? types_1.ESocialAccountKind.BUSINESS
|
|
122
|
+
: types_1.ESocialAccountKind.PERSONAL,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
exports.PinterestOAuthProvider = PinterestOAuthProvider;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ESocialProvider } from "../../globals/types";
|
|
2
|
+
import { AuthUrlParams, ConnectResult, ExchangeCodeParams, ISocialOAuthProvider, OAuthTokens } from "./types";
|
|
3
|
+
export declare class ThreadsOAuthProvider implements ISocialOAuthProvider {
|
|
4
|
+
readonly provider = ESocialProvider.THREADS;
|
|
5
|
+
private appId;
|
|
6
|
+
private appSecret;
|
|
7
|
+
getAuthUrl({ state, redirectUri, requestBusinessScopes, }: AuthUrlParams): string;
|
|
8
|
+
exchangeCode({ code, redirectUri, }: ExchangeCodeParams): Promise<ConnectResult>;
|
|
9
|
+
refresh(refreshToken: string): Promise<OAuthTokens>;
|
|
10
|
+
private toLongLived;
|
|
11
|
+
private toTokens;
|
|
12
|
+
private resolveAccount;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=threads.oauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threads.oauth.d.ts","sourceRoot":"","sources":["../../../src/services/socialOAuth/threads.oauth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EACL,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACZ,MAAM,SAAS,CAAC;AA4CjB,qBAAa,oBAAqB,YAAW,oBAAoB;IAC/D,QAAQ,CAAC,QAAQ,2BAA2B;IAE5C,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,SAAS;IAMjB,UAAU,CAAC,EACT,KAAK,EACL,WAAW,EACX,qBAAqB,GACtB,EAAE,aAAa,GAAG,MAAM;IAcnB,YAAY,CAAC,EACjB,IAAI,EACJ,WAAW,GACZ,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IA2BxC,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;YAgB3C,WAAW;IAgBzB,OAAO,CAAC,QAAQ;YAYF,cAAc;CAkB7B"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThreadsOAuthProvider = void 0;
|
|
4
|
+
const types_1 = require("../../globals/types");
|
|
5
|
+
/**
|
|
6
|
+
* Threads (Meta) OAuth provider. Phase 6 — fast-follow adapter. Threads has its
|
|
7
|
+
* OWN app + API host (graph.threads.net), separate from the Facebook/IG Graph.
|
|
8
|
+
*
|
|
9
|
+
* Config (env):
|
|
10
|
+
* THREADS_APP_ID — Threads app client id
|
|
11
|
+
* THREADS_APP_SECRET — Threads app client secret
|
|
12
|
+
*
|
|
13
|
+
* Token model (plan §3): short-lived code exchange → exchange for a LONG-LIVED
|
|
14
|
+
* token (~60 days) → refresh before expiry. The refresh daemon handles renewal.
|
|
15
|
+
*/
|
|
16
|
+
const AUTH_ENDPOINT = "https://threads.net/oauth/authorize";
|
|
17
|
+
const TOKEN_ENDPOINT = "https://graph.threads.net/oauth/access_token";
|
|
18
|
+
const LONG_LIVED_ENDPOINT = "https://graph.threads.net/access_token";
|
|
19
|
+
const REFRESH_ENDPOINT = "https://graph.threads.net/refresh_access_token";
|
|
20
|
+
const ME_ENDPOINT = "https://graph.threads.net/v1.0/me?fields=id,username,name,threads_profile_picture_url";
|
|
21
|
+
const BASE_SCOPES = ["threads_basic", "threads_content_publish"];
|
|
22
|
+
const BUSINESS_SCOPES = ["threads_manage_insights", "threads_manage_replies"];
|
|
23
|
+
class ThreadsOAuthProvider {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.provider = types_1.ESocialProvider.THREADS;
|
|
26
|
+
}
|
|
27
|
+
appId() {
|
|
28
|
+
const v = process.env.THREADS_APP_ID;
|
|
29
|
+
if (!v)
|
|
30
|
+
throw new Error("ThreadsOAuth: THREADS_APP_ID not set");
|
|
31
|
+
return v;
|
|
32
|
+
}
|
|
33
|
+
appSecret() {
|
|
34
|
+
const v = process.env.THREADS_APP_SECRET;
|
|
35
|
+
if (!v)
|
|
36
|
+
throw new Error("ThreadsOAuth: THREADS_APP_SECRET not set");
|
|
37
|
+
return v;
|
|
38
|
+
}
|
|
39
|
+
getAuthUrl({ state, redirectUri, requestBusinessScopes, }) {
|
|
40
|
+
const scopes = requestBusinessScopes
|
|
41
|
+
? [...BASE_SCOPES, ...BUSINESS_SCOPES]
|
|
42
|
+
: BASE_SCOPES;
|
|
43
|
+
const params = new URLSearchParams({
|
|
44
|
+
client_id: this.appId(),
|
|
45
|
+
redirect_uri: redirectUri,
|
|
46
|
+
response_type: "code",
|
|
47
|
+
scope: scopes.join(","),
|
|
48
|
+
state,
|
|
49
|
+
});
|
|
50
|
+
return `${AUTH_ENDPOINT}?${params.toString()}`;
|
|
51
|
+
}
|
|
52
|
+
async exchangeCode({ code, redirectUri, }) {
|
|
53
|
+
// 1. Short-lived token (also returns the Threads user id).
|
|
54
|
+
const shortResp = await fetch(TOKEN_ENDPOINT, {
|
|
55
|
+
method: "POST",
|
|
56
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
57
|
+
body: new URLSearchParams({
|
|
58
|
+
client_id: this.appId(),
|
|
59
|
+
client_secret: this.appSecret(),
|
|
60
|
+
grant_type: "authorization_code",
|
|
61
|
+
redirect_uri: redirectUri,
|
|
62
|
+
// Threads strips a trailing "#_" the browser may append.
|
|
63
|
+
code: code.replace(/#_$/, ""),
|
|
64
|
+
}).toString(),
|
|
65
|
+
});
|
|
66
|
+
const short = (await shortResp.json());
|
|
67
|
+
if (!shortResp.ok || short.error_type || !short.access_token) {
|
|
68
|
+
throw new Error(`ThreadsOAuth: code exchange ${shortResp.status} ${short.error_message ?? ""}`.trim());
|
|
69
|
+
}
|
|
70
|
+
// 2. Exchange for a long-lived (~60d) token.
|
|
71
|
+
const tokens = await this.toLongLived(short.access_token);
|
|
72
|
+
const account = await this.resolveAccount(tokens.accessToken);
|
|
73
|
+
return { account, tokens };
|
|
74
|
+
}
|
|
75
|
+
async refresh(refreshToken) {
|
|
76
|
+
// Threads long-lived tokens are refreshed (not re-granted) once ≥24h old.
|
|
77
|
+
const url = `${REFRESH_ENDPOINT}?${new URLSearchParams({
|
|
78
|
+
grant_type: "th_refresh_token",
|
|
79
|
+
access_token: refreshToken,
|
|
80
|
+
}).toString()}`;
|
|
81
|
+
const resp = await fetch(url);
|
|
82
|
+
const json = (await resp.json());
|
|
83
|
+
if (!resp.ok || json.error || !json.access_token) {
|
|
84
|
+
throw new Error(`ThreadsOAuth: refresh ${resp.status} ${json.error?.message ?? ""}`.trim());
|
|
85
|
+
}
|
|
86
|
+
return this.toTokens(json);
|
|
87
|
+
}
|
|
88
|
+
async toLongLived(shortToken) {
|
|
89
|
+
const url = `${LONG_LIVED_ENDPOINT}?${new URLSearchParams({
|
|
90
|
+
grant_type: "th_exchange_token",
|
|
91
|
+
client_secret: this.appSecret(),
|
|
92
|
+
access_token: shortToken,
|
|
93
|
+
}).toString()}`;
|
|
94
|
+
const resp = await fetch(url);
|
|
95
|
+
const json = (await resp.json());
|
|
96
|
+
if (!resp.ok || json.error || !json.access_token) {
|
|
97
|
+
throw new Error(`ThreadsOAuth: long-lived exchange ${resp.status} ${json.error?.message ?? ""}`.trim());
|
|
98
|
+
}
|
|
99
|
+
return this.toTokens(json);
|
|
100
|
+
}
|
|
101
|
+
toTokens(json) {
|
|
102
|
+
// Long-lived token doubles as its own refresh token (refresh_access_token
|
|
103
|
+
// takes the current access token). No separate refresh secret.
|
|
104
|
+
const accessToken = json.access_token;
|
|
105
|
+
return {
|
|
106
|
+
accessToken,
|
|
107
|
+
refreshToken: accessToken,
|
|
108
|
+
expiresAt: Date.now() + (json.expires_in ?? 60 * 24 * 3600) * 1000,
|
|
109
|
+
scopes: [],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
async resolveAccount(accessToken) {
|
|
113
|
+
const resp = await fetch(ME_ENDPOINT, {
|
|
114
|
+
headers: { Authorization: `Bearer ${accessToken}` },
|
|
115
|
+
});
|
|
116
|
+
const json = (await resp.json());
|
|
117
|
+
if (!resp.ok || json.error || !json.id) {
|
|
118
|
+
throw new Error(`ThreadsOAuth: /me ${resp.status} ${json.error?.message ?? ""}`.trim());
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
providerAccountId: json.id,
|
|
122
|
+
displayName: json.name ?? json.username ?? "Threads account",
|
|
123
|
+
handle: json.username,
|
|
124
|
+
avatarUrl: json.threads_profile_picture_url,
|
|
125
|
+
kind: types_1.ESocialAccountKind.CREATOR,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.ThreadsOAuthProvider = ThreadsOAuthProvider;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ESocialProvider } from "../../globals/types";
|
|
2
|
+
import { AuthUrlParams, ConnectResult, ExchangeCodeParams, ISocialOAuthProvider, OAuthTokens } from "./types";
|
|
3
|
+
export declare class TikTokOAuthProvider implements ISocialOAuthProvider {
|
|
4
|
+
readonly provider = ESocialProvider.TIKTOK;
|
|
5
|
+
private clientKey;
|
|
6
|
+
private clientSecret;
|
|
7
|
+
getAuthUrl({ state, redirectUri, requestBusinessScopes, }: AuthUrlParams): string;
|
|
8
|
+
exchangeCode({ code, redirectUri, }: ExchangeCodeParams): Promise<ConnectResult>;
|
|
9
|
+
refresh(refreshToken: string): Promise<OAuthTokens>;
|
|
10
|
+
revoke(token: string): Promise<void>;
|
|
11
|
+
private postToken;
|
|
12
|
+
private toTokens;
|
|
13
|
+
private resolveAccount;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=tiktok.oauth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiktok.oauth.d.ts","sourceRoot":"","sources":["../../../src/services/socialOAuth/tiktok.oauth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EACL,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACZ,MAAM,SAAS,CAAC;AAoDjB,qBAAa,mBAAoB,YAAW,oBAAoB;IAC9D,QAAQ,CAAC,QAAQ,0BAA0B;IAE3C,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,YAAY;IAMpB,UAAU,CAAC,EACT,KAAK,EACL,WAAW,EACX,qBAAqB,GACtB,EAAE,aAAa,GAAG,MAAM;IAcnB,YAAY,CAAC,EACjB,IAAI,EACJ,WAAW,GACZ,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAiBxC,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAenD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAkB5B,SAAS;IAsBvB,OAAO,CAAC,QAAQ;YAaF,cAAc;CAmB7B"}
|