vidspotai-shared 1.0.82 → 1.0.84

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.
Files changed (442) hide show
  1. package/lib/globals/aiModels/enums.d.ts +11 -1
  2. package/lib/globals/aiModels/enums.d.ts.map +1 -1
  3. package/lib/globals/aiModels/enums.js +24 -1
  4. package/lib/globals/aiModels/index.d.ts.map +1 -1
  5. package/lib/globals/aiModels/index.js +2 -0
  6. package/lib/globals/aiModels/providers/anthropic.d.ts +12 -0
  7. package/lib/globals/aiModels/providers/anthropic.d.ts.map +1 -0
  8. package/lib/globals/aiModels/providers/anthropic.js +88 -0
  9. package/lib/globals/aiModels/providers/google.d.ts.map +1 -1
  10. package/lib/globals/aiModels/providers/google.js +82 -0
  11. package/lib/globals/aiModels/providers/openai.d.ts.map +1 -1
  12. package/lib/globals/aiModels/providers/openai.js +63 -4
  13. package/lib/globals/aiModels/tierHelpers.d.ts +12 -0
  14. package/lib/globals/aiModels/tierHelpers.d.ts.map +1 -1
  15. package/lib/globals/aiModels/tierHelpers.js +83 -0
  16. package/lib/globals/aiModels/types.d.ts +19 -0
  17. package/lib/globals/aiModels/types.d.ts.map +1 -1
  18. package/lib/globals/types.d.ts +120 -1
  19. package/lib/globals/types.d.ts.map +1 -1
  20. package/lib/globals/types.js +135 -1
  21. package/lib/models/agent.model.d.ts +41 -1
  22. package/lib/models/agent.model.d.ts.map +1 -1
  23. package/lib/models/index.d.ts +1 -0
  24. package/lib/models/index.d.ts.map +1 -1
  25. package/lib/models/index.js +1 -0
  26. package/lib/models/social.model.d.ts +180 -0
  27. package/lib/models/social.model.d.ts.map +1 -0
  28. package/lib/models/social.model.js +2 -0
  29. package/lib/models/user.model.d.ts +10 -0
  30. package/lib/models/user.model.d.ts.map +1 -1
  31. package/lib/models/video.model.d.ts +6 -0
  32. package/lib/models/video.model.d.ts.map +1 -1
  33. package/lib/schemas/brief.schema.d.ts +46 -0
  34. package/lib/schemas/brief.schema.d.ts.map +1 -1
  35. package/lib/schemas/brief.schema.js +72 -1
  36. package/lib/schemas/index.d.ts +1 -0
  37. package/lib/schemas/index.d.ts.map +1 -1
  38. package/lib/schemas/index.js +1 -0
  39. package/lib/schemas/project.schema.d.ts +67 -0
  40. package/lib/schemas/project.schema.d.ts.map +1 -1
  41. package/lib/schemas/project.schema.js +12 -0
  42. package/lib/schemas/social.schema.d.ts +91 -0
  43. package/lib/schemas/social.schema.d.ts.map +1 -0
  44. package/lib/schemas/social.schema.js +114 -0
  45. package/lib/schemas/videoPlan.schema.d.ts +114 -0
  46. package/lib/schemas/videoPlan.schema.d.ts.map +1 -1
  47. package/lib/schemas/videoPlan.schema.js +141 -1
  48. package/lib/services/agent/chatAgent.d.ts +25 -1
  49. package/lib/services/agent/chatAgent.d.ts.map +1 -1
  50. package/lib/services/agent/chatAgent.js +145 -9
  51. package/lib/services/agent/costPreflight.d.ts +11 -1
  52. package/lib/services/agent/costPreflight.d.ts.map +1 -1
  53. package/lib/services/agent/costPreflight.js +18 -1
  54. package/lib/services/agent/covers/coverPlanner.d.ts +41 -0
  55. package/lib/services/agent/covers/coverPlanner.d.ts.map +1 -0
  56. package/lib/services/agent/covers/coverPlanner.js +278 -0
  57. package/lib/services/agent/covers/covers.schema.d.ts +158 -0
  58. package/lib/services/agent/covers/covers.schema.d.ts.map +1 -0
  59. package/lib/services/agent/covers/covers.schema.js +166 -0
  60. package/lib/services/agent/covers/index.d.ts +3 -0
  61. package/lib/services/agent/covers/index.d.ts.map +1 -0
  62. package/lib/services/agent/covers/index.js +18 -0
  63. package/lib/services/agent/critic.d.ts +10 -0
  64. package/lib/services/agent/critic.d.ts.map +1 -1
  65. package/lib/services/agent/critic.js +37 -1
  66. package/lib/services/agent/editClassifier.d.ts +2 -2
  67. package/lib/services/agent/editClassifier.js +2 -2
  68. package/lib/services/agent/editExisting/editAssembler.d.ts +78 -0
  69. package/lib/services/agent/editExisting/editAssembler.d.ts.map +1 -0
  70. package/lib/services/agent/editExisting/editAssembler.js +172 -0
  71. package/lib/services/agent/editExisting/editExisting.schema.d.ts +119 -0
  72. package/lib/services/agent/editExisting/editExisting.schema.d.ts.map +1 -0
  73. package/lib/services/agent/editExisting/editExisting.schema.js +157 -0
  74. package/lib/services/agent/editExisting/highlightPicker.d.ts +48 -0
  75. package/lib/services/agent/editExisting/highlightPicker.d.ts.map +1 -0
  76. package/lib/services/agent/editExisting/highlightPicker.js +199 -0
  77. package/lib/services/agent/editExisting/index.d.ts +4 -0
  78. package/lib/services/agent/editExisting/index.d.ts.map +1 -0
  79. package/lib/services/agent/editExisting/index.js +19 -0
  80. package/lib/services/agent/eval/seedBriefs.d.ts +4 -3
  81. package/lib/services/agent/eval/seedBriefs.d.ts.map +1 -1
  82. package/lib/services/agent/eval/seedBriefs.js +283 -3
  83. package/lib/services/agent/eval/types.d.ts +10 -0
  84. package/lib/services/agent/eval/types.d.ts.map +1 -1
  85. package/lib/services/agent/executor/core.d.ts +70 -0
  86. package/lib/services/agent/executor/core.d.ts.map +1 -0
  87. package/lib/services/agent/executor/core.js +250 -0
  88. package/lib/services/agent/executor/duration.d.ts +20 -0
  89. package/lib/services/agent/executor/duration.d.ts.map +1 -0
  90. package/lib/services/agent/executor/duration.js +46 -0
  91. package/lib/services/agent/executor/index.d.ts +15 -0
  92. package/lib/services/agent/executor/index.d.ts.map +1 -0
  93. package/lib/services/agent/executor/index.js +32 -0
  94. package/lib/services/agent/executor/types.d.ts +183 -0
  95. package/lib/services/agent/executor/types.d.ts.map +1 -0
  96. package/lib/services/agent/executor/types.js +29 -0
  97. package/lib/services/agent/executor/visual.d.ts +32 -0
  98. package/lib/services/agent/executor/visual.d.ts.map +1 -0
  99. package/lib/services/agent/executor/visual.js +400 -0
  100. package/lib/services/agent/executor/voice.d.ts +17 -0
  101. package/lib/services/agent/executor/voice.d.ts.map +1 -0
  102. package/lib/services/agent/executor/voice.js +119 -0
  103. package/lib/services/agent/extendChain.d.ts +101 -0
  104. package/lib/services/agent/extendChain.d.ts.map +1 -0
  105. package/lib/services/agent/extendChain.js +177 -0
  106. package/lib/services/agent/index.d.ts +11 -1
  107. package/lib/services/agent/index.d.ts.map +1 -1
  108. package/lib/services/agent/index.js +11 -1
  109. package/lib/services/agent/llmCaller.d.ts +7 -8
  110. package/lib/services/agent/llmCaller.d.ts.map +1 -1
  111. package/lib/services/agent/llmCallerAnthropic.d.ts +44 -31
  112. package/lib/services/agent/llmCallerAnthropic.d.ts.map +1 -1
  113. package/lib/services/agent/llmCallerAnthropic.js +135 -60
  114. package/lib/services/agent/llmCallerFactory.d.ts +34 -0
  115. package/lib/services/agent/llmCallerFactory.d.ts.map +1 -0
  116. package/lib/services/agent/llmCallerFactory.js +31 -0
  117. package/lib/services/agent/llmCallerGemini.d.ts +62 -0
  118. package/lib/services/agent/llmCallerGemini.d.ts.map +1 -0
  119. package/lib/services/agent/llmCallerGemini.js +235 -0
  120. package/lib/services/agent/llmCallerOpenai.d.ts +56 -0
  121. package/lib/services/agent/llmCallerOpenai.d.ts.map +1 -0
  122. package/lib/services/agent/llmCallerOpenai.js +230 -0
  123. package/lib/services/agent/llmCallerRegistry.d.ts.map +1 -1
  124. package/lib/services/agent/llmCallerRegistry.js +7 -7
  125. package/lib/services/agent/llmCallerRouting.d.ts +63 -0
  126. package/lib/services/agent/llmCallerRouting.d.ts.map +1 -0
  127. package/lib/services/agent/llmCallerRouting.js +124 -0
  128. package/lib/services/agent/llmModelRegistry.d.ts +59 -0
  129. package/lib/services/agent/llmModelRegistry.d.ts.map +1 -0
  130. package/lib/services/agent/llmModelRegistry.js +168 -0
  131. package/lib/services/agent/llmRetry.d.ts +57 -0
  132. package/lib/services/agent/llmRetry.d.ts.map +1 -0
  133. package/lib/services/agent/llmRetry.js +102 -0
  134. package/lib/services/agent/modelRouter.d.ts +3 -3
  135. package/lib/services/agent/modelRouter.d.ts.map +1 -1
  136. package/lib/services/agent/modelRouter.js +27 -13
  137. package/lib/services/agent/planMutations.d.ts +54 -1
  138. package/lib/services/agent/planMutations.d.ts.map +1 -1
  139. package/lib/services/agent/planMutations.js +78 -0
  140. package/lib/services/agent/planner/Planner.d.ts +0 -17
  141. package/lib/services/agent/planner/Planner.d.ts.map +1 -1
  142. package/lib/services/agent/planner/Planner.js +67 -303
  143. package/lib/services/agent/planner/overlayRegen.d.ts +38 -0
  144. package/lib/services/agent/planner/overlayRegen.d.ts.map +1 -0
  145. package/lib/services/agent/planner/overlayRegen.js +145 -0
  146. package/lib/services/agent/planner/plannerMessages.d.ts +34 -0
  147. package/lib/services/agent/planner/plannerMessages.d.ts.map +1 -0
  148. package/lib/services/agent/planner/plannerMessages.js +185 -0
  149. package/lib/services/agent/planner/promptSections.d.ts +12 -0
  150. package/lib/services/agent/planner/promptSections.d.ts.map +1 -1
  151. package/lib/services/agent/planner/promptSections.js +57 -0
  152. package/lib/services/agent/planner/scriptFirstPlanner.d.ts +35 -0
  153. package/lib/services/agent/planner/scriptFirstPlanner.d.ts.map +1 -0
  154. package/lib/services/agent/planner/scriptFirstPlanner.js +140 -0
  155. package/lib/services/agent/planner/structuralRules.d.ts +10 -0
  156. package/lib/services/agent/planner/structuralRules.d.ts.map +1 -1
  157. package/lib/services/agent/planner/structuralRules.js +92 -9
  158. package/lib/services/agent/planner/validators.d.ts +18 -0
  159. package/lib/services/agent/planner/validators.d.ts.map +1 -1
  160. package/lib/services/agent/planner/validators.js +97 -0
  161. package/lib/services/agent/planner.d.ts +2 -1
  162. package/lib/services/agent/planner.d.ts.map +1 -1
  163. package/lib/services/agent/planner.js +5 -1
  164. package/lib/services/agent/priorProject.d.ts +26 -0
  165. package/lib/services/agent/priorProject.d.ts.map +1 -0
  166. package/lib/services/agent/priorProject.js +51 -0
  167. package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
  168. package/lib/services/agent/providerFallback/chains.js +27 -15
  169. package/lib/services/agent/repurpose/index.d.ts +3 -0
  170. package/lib/services/agent/repurpose/index.d.ts.map +1 -0
  171. package/lib/services/agent/repurpose/index.js +18 -0
  172. package/lib/services/agent/repurpose/repurpose.schema.d.ts +132 -0
  173. package/lib/services/agent/repurpose/repurpose.schema.d.ts.map +1 -0
  174. package/lib/services/agent/repurpose/repurpose.schema.js +144 -0
  175. package/lib/services/agent/repurpose/shortsPicker.d.ts +25 -0
  176. package/lib/services/agent/repurpose/shortsPicker.d.ts.map +1 -0
  177. package/lib/services/agent/repurpose/shortsPicker.js +218 -0
  178. package/lib/services/agent/runHelpers.d.ts +21 -2
  179. package/lib/services/agent/runHelpers.d.ts.map +1 -1
  180. package/lib/services/agent/runHelpers.js +71 -2
  181. package/lib/services/agent/tools/animateImage.tool.d.ts +1 -0
  182. package/lib/services/agent/tools/animateImage.tool.d.ts.map +1 -1
  183. package/lib/services/agent/tools/animateImage.tool.js +12 -0
  184. package/lib/services/agent/tools/chapterOutline.tool.d.ts +42 -0
  185. package/lib/services/agent/tools/chapterOutline.tool.d.ts.map +1 -0
  186. package/lib/services/agent/tools/chapterOutline.tool.js +115 -0
  187. package/lib/services/agent/tools/composeScene.tool.d.ts +63 -0
  188. package/lib/services/agent/tools/composeScene.tool.d.ts.map +1 -1
  189. package/lib/services/agent/tools/estimateCost.tool.d.ts +27 -0
  190. package/lib/services/agent/tools/estimateCost.tool.d.ts.map +1 -1
  191. package/lib/services/agent/tools/estimateCost.tool.js +55 -7
  192. package/lib/services/agent/tools/extendVideo.tool.d.ts +26 -0
  193. package/lib/services/agent/tools/extendVideo.tool.d.ts.map +1 -0
  194. package/lib/services/agent/tools/extendVideo.tool.js +149 -0
  195. package/lib/services/agent/tools/generateScript.tool.d.ts +184 -0
  196. package/lib/services/agent/tools/generateScript.tool.d.ts.map +1 -0
  197. package/lib/services/agent/tools/generateScript.tool.js +123 -0
  198. package/lib/services/agent/tools/generateVideo.tool.d.ts +1 -0
  199. package/lib/services/agent/tools/generateVideo.tool.d.ts.map +1 -1
  200. package/lib/services/agent/tools/generateVideo.tool.js +20 -1
  201. package/lib/services/agent/tools/index.d.ts +4 -0
  202. package/lib/services/agent/tools/index.d.ts.map +1 -1
  203. package/lib/services/agent/tools/index.js +4 -0
  204. package/lib/services/agent/tools/matchBrollToScript.tool.d.ts +50 -0
  205. package/lib/services/agent/tools/matchBrollToScript.tool.d.ts.map +1 -0
  206. package/lib/services/agent/tools/matchBrollToScript.tool.js +139 -0
  207. package/lib/services/agent/tools/planVideo.tool.d.ts +56 -0
  208. package/lib/services/agent/tools/planVideo.tool.d.ts.map +1 -1
  209. package/lib/services/agent/tools/planVideo.tool.js +3 -3
  210. package/lib/services/agent/tools/render.tool.d.ts +21 -0
  211. package/lib/services/agent/tools/render.tool.d.ts.map +1 -1
  212. package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
  213. package/lib/services/aiGen/aiGenFactory.service.js +18 -3
  214. package/lib/services/aiGen/providers/anthropic/anthropic.service.d.ts +26 -0
  215. package/lib/services/aiGen/providers/anthropic/anthropic.service.d.ts.map +1 -0
  216. package/lib/services/aiGen/providers/anthropic/anthropic.service.js +95 -0
  217. package/lib/services/aiGen/providers/google/google.service.d.ts +24 -1
  218. package/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
  219. package/lib/services/aiGen/providers/google/google.service.js +96 -244
  220. package/lib/services/aiGen/providers/google/googleErrors.d.ts +13 -0
  221. package/lib/services/aiGen/providers/google/googleErrors.d.ts.map +1 -0
  222. package/lib/services/aiGen/providers/google/googleErrors.js +102 -0
  223. package/lib/services/aiGen/providers/google/googleFetch.d.ts +8 -0
  224. package/lib/services/aiGen/providers/google/googleFetch.d.ts.map +1 -0
  225. package/lib/services/aiGen/providers/google/googleFetch.js +96 -0
  226. package/lib/services/aiGen/providers/google/googleMusic.d.ts +15 -0
  227. package/lib/services/aiGen/providers/google/googleMusic.d.ts.map +1 -0
  228. package/lib/services/aiGen/providers/google/googleMusic.js +77 -0
  229. package/lib/services/aiGen/providers/kling/kling.service.d.ts +7 -3
  230. package/lib/services/aiGen/providers/kling/kling.service.d.ts.map +1 -1
  231. package/lib/services/aiGen/providers/kling/kling.service.js +23 -367
  232. package/lib/services/aiGen/providers/kling/klingCredits.d.ts +9 -0
  233. package/lib/services/aiGen/providers/kling/klingCredits.d.ts.map +1 -0
  234. package/lib/services/aiGen/providers/kling/klingCredits.js +63 -0
  235. package/lib/services/aiGen/providers/kling/klingRequests.d.ts +32 -0
  236. package/lib/services/aiGen/providers/kling/klingRequests.d.ts.map +1 -0
  237. package/lib/services/aiGen/providers/kling/klingRequests.js +194 -0
  238. package/lib/services/aiGen/providers/kling/klingStatus.d.ts +16 -0
  239. package/lib/services/aiGen/providers/kling/klingStatus.d.ts.map +1 -0
  240. package/lib/services/aiGen/providers/kling/klingStatus.js +173 -0
  241. package/lib/services/bullmq.service.d.ts +61 -0
  242. package/lib/services/bullmq.service.d.ts.map +1 -1
  243. package/lib/services/bullmq.service.js +101 -1
  244. package/lib/services/crypto/index.d.ts +2 -0
  245. package/lib/services/crypto/index.d.ts.map +1 -0
  246. package/lib/services/crypto/index.js +17 -0
  247. package/lib/services/crypto/tokenVault.d.ts +47 -0
  248. package/lib/services/crypto/tokenVault.d.ts.map +1 -0
  249. package/lib/services/crypto/tokenVault.js +179 -0
  250. package/lib/services/editor/captionStyleHint.d.ts +3 -0
  251. package/lib/services/editor/captionStyleHint.d.ts.map +1 -0
  252. package/lib/services/editor/captionStyleHint.js +112 -0
  253. package/lib/services/editor/planToProject.d.ts +7 -66
  254. package/lib/services/editor/planToProject.d.ts.map +1 -1
  255. package/lib/services/editor/planToProject.helpers.d.ts +40 -0
  256. package/lib/services/editor/planToProject.helpers.d.ts.map +1 -0
  257. package/lib/services/editor/planToProject.helpers.js +177 -0
  258. package/lib/services/editor/planToProject.js +197 -180
  259. package/lib/services/editor/planToProject.types.d.ts +94 -0
  260. package/lib/services/editor/planToProject.types.d.ts.map +1 -0
  261. package/lib/services/editor/planToProject.types.js +2 -0
  262. package/lib/services/firestore.service.d.ts +5 -0
  263. package/lib/services/firestore.service.d.ts.map +1 -1
  264. package/lib/services/firestore.service.js +13 -0
  265. package/lib/services/index.d.ts +12 -0
  266. package/lib/services/index.d.ts.map +1 -1
  267. package/lib/services/index.js +12 -0
  268. package/lib/services/promptEnhancer/index.d.ts +18 -0
  269. package/lib/services/promptEnhancer/index.d.ts.map +1 -0
  270. package/lib/services/promptEnhancer/index.js +33 -0
  271. package/lib/services/promptEnhancer/models.d.ts +54 -0
  272. package/lib/services/promptEnhancer/models.d.ts.map +1 -0
  273. package/lib/services/promptEnhancer/models.js +37 -0
  274. package/lib/services/promptEnhancer/profiles/agent.profile.d.ts +14 -0
  275. package/lib/services/promptEnhancer/profiles/agent.profile.d.ts.map +1 -0
  276. package/lib/services/promptEnhancer/profiles/agent.profile.js +40 -0
  277. package/lib/services/promptEnhancer/profiles/avatar.profile.d.ts +13 -0
  278. package/lib/services/promptEnhancer/profiles/avatar.profile.d.ts.map +1 -0
  279. package/lib/services/promptEnhancer/profiles/avatar.profile.js +40 -0
  280. package/lib/services/promptEnhancer/profiles/base.d.ts +28 -0
  281. package/lib/services/promptEnhancer/profiles/base.d.ts.map +1 -0
  282. package/lib/services/promptEnhancer/profiles/base.js +35 -0
  283. package/lib/services/promptEnhancer/profiles/image.profile.d.ts +11 -0
  284. package/lib/services/promptEnhancer/profiles/image.profile.d.ts.map +1 -0
  285. package/lib/services/promptEnhancer/profiles/image.profile.js +42 -0
  286. package/lib/services/promptEnhancer/profiles/index.d.ts +12 -0
  287. package/lib/services/promptEnhancer/profiles/index.d.ts.map +1 -0
  288. package/lib/services/promptEnhancer/profiles/index.js +33 -0
  289. package/lib/services/promptEnhancer/profiles/video.profile.d.ts +15 -0
  290. package/lib/services/promptEnhancer/profiles/video.profile.d.ts.map +1 -0
  291. package/lib/services/promptEnhancer/profiles/video.profile.js +81 -0
  292. package/lib/services/promptEnhancer/promptEnhancer.service.d.ts +45 -0
  293. package/lib/services/promptEnhancer/promptEnhancer.service.d.ts.map +1 -0
  294. package/lib/services/promptEnhancer/promptEnhancer.service.js +157 -0
  295. package/lib/services/promptEnhancer/schema.d.ts +19 -0
  296. package/lib/services/promptEnhancer/schema.d.ts.map +1 -0
  297. package/lib/services/promptEnhancer/schema.js +43 -0
  298. package/lib/services/promptEnhancer/types.d.ts +112 -0
  299. package/lib/services/promptEnhancer/types.d.ts.map +1 -0
  300. package/lib/services/promptEnhancer/types.js +2 -0
  301. package/lib/services/socialAI/captionGen.d.ts +81 -0
  302. package/lib/services/socialAI/captionGen.d.ts.map +1 -0
  303. package/lib/services/socialAI/captionGen.js +206 -0
  304. package/lib/services/socialAI/hookScore.d.ts +85 -0
  305. package/lib/services/socialAI/hookScore.d.ts.map +1 -0
  306. package/lib/services/socialAI/hookScore.js +170 -0
  307. package/lib/services/socialAI/index.d.ts +3 -0
  308. package/lib/services/socialAI/index.d.ts.map +1 -0
  309. package/lib/services/socialAI/index.js +18 -0
  310. package/lib/services/socialAccounts/index.d.ts +2 -0
  311. package/lib/services/socialAccounts/index.d.ts.map +1 -0
  312. package/lib/services/socialAccounts/index.js +17 -0
  313. package/lib/services/socialAccounts/socialAccountService.d.ts +25 -0
  314. package/lib/services/socialAccounts/socialAccountService.d.ts.map +1 -0
  315. package/lib/services/socialAccounts/socialAccountService.js +105 -0
  316. package/lib/services/socialEngage/factory.d.ts +7 -0
  317. package/lib/services/socialEngage/factory.d.ts.map +1 -0
  318. package/lib/services/socialEngage/factory.js +25 -0
  319. package/lib/services/socialEngage/index.d.ts +6 -0
  320. package/lib/services/socialEngage/index.d.ts.map +1 -0
  321. package/lib/services/socialEngage/index.js +21 -0
  322. package/lib/services/socialEngage/meta.engage.d.ts +17 -0
  323. package/lib/services/socialEngage/meta.engage.d.ts.map +1 -0
  324. package/lib/services/socialEngage/meta.engage.js +128 -0
  325. package/lib/services/socialEngage/metaWebhook.d.ts +50 -0
  326. package/lib/services/socialEngage/metaWebhook.d.ts.map +1 -0
  327. package/lib/services/socialEngage/metaWebhook.js +93 -0
  328. package/lib/services/socialEngage/types.d.ts +72 -0
  329. package/lib/services/socialEngage/types.d.ts.map +1 -0
  330. package/lib/services/socialEngage/types.js +10 -0
  331. package/lib/services/socialEngage/youtube.engage.d.ts +9 -0
  332. package/lib/services/socialEngage/youtube.engage.d.ts.map +1 -0
  333. package/lib/services/socialEngage/youtube.engage.js +87 -0
  334. package/lib/services/socialFormat/aspectGeometry.d.ts +74 -0
  335. package/lib/services/socialFormat/aspectGeometry.d.ts.map +1 -0
  336. package/lib/services/socialFormat/aspectGeometry.js +135 -0
  337. package/lib/services/socialFormat/index.d.ts +2 -0
  338. package/lib/services/socialFormat/index.d.ts.map +1 -0
  339. package/lib/services/socialFormat/index.js +19 -0
  340. package/lib/services/socialInsights/index.d.ts +3 -0
  341. package/lib/services/socialInsights/index.d.ts.map +1 -0
  342. package/lib/services/socialInsights/index.js +18 -0
  343. package/lib/services/socialInsights/recommendations.d.ts +131 -0
  344. package/lib/services/socialInsights/recommendations.d.ts.map +1 -0
  345. package/lib/services/socialInsights/recommendations.js +277 -0
  346. package/lib/services/socialInsights/timeBuckets.d.ts +35 -0
  347. package/lib/services/socialInsights/timeBuckets.d.ts.map +1 -0
  348. package/lib/services/socialInsights/timeBuckets.js +78 -0
  349. package/lib/services/socialMetrics/factory.d.ts +5 -0
  350. package/lib/services/socialMetrics/factory.d.ts.map +1 -0
  351. package/lib/services/socialMetrics/factory.js +24 -0
  352. package/lib/services/socialMetrics/index.d.ts +6 -0
  353. package/lib/services/socialMetrics/index.d.ts.map +1 -0
  354. package/lib/services/socialMetrics/index.js +21 -0
  355. package/lib/services/socialMetrics/meta.metrics.d.ts +22 -0
  356. package/lib/services/socialMetrics/meta.metrics.d.ts.map +1 -0
  357. package/lib/services/socialMetrics/meta.metrics.js +137 -0
  358. package/lib/services/socialMetrics/tiktok.metrics.d.ts +8 -0
  359. package/lib/services/socialMetrics/tiktok.metrics.d.ts.map +1 -0
  360. package/lib/services/socialMetrics/tiktok.metrics.js +43 -0
  361. package/lib/services/socialMetrics/types.d.ts +54 -0
  362. package/lib/services/socialMetrics/types.d.ts.map +1 -0
  363. package/lib/services/socialMetrics/types.js +2 -0
  364. package/lib/services/socialMetrics/youtube.metrics.d.ts +8 -0
  365. package/lib/services/socialMetrics/youtube.metrics.d.ts.map +1 -0
  366. package/lib/services/socialMetrics/youtube.metrics.js +43 -0
  367. package/lib/services/socialOAuth/factory.d.ts +7 -0
  368. package/lib/services/socialOAuth/factory.d.ts.map +1 -0
  369. package/lib/services/socialOAuth/factory.js +42 -0
  370. package/lib/services/socialOAuth/index.d.ts +11 -0
  371. package/lib/services/socialOAuth/index.d.ts.map +1 -0
  372. package/lib/services/socialOAuth/index.js +26 -0
  373. package/lib/services/socialOAuth/linkedin.oauth.d.ts +14 -0
  374. package/lib/services/socialOAuth/linkedin.oauth.d.ts.map +1 -0
  375. package/lib/services/socialOAuth/linkedin.oauth.js +127 -0
  376. package/lib/services/socialOAuth/meta.oauth.d.ts +31 -0
  377. package/lib/services/socialOAuth/meta.oauth.d.ts.map +1 -0
  378. package/lib/services/socialOAuth/meta.oauth.js +214 -0
  379. package/lib/services/socialOAuth/oauthState.d.ts +14 -0
  380. package/lib/services/socialOAuth/oauthState.d.ts.map +1 -0
  381. package/lib/services/socialOAuth/oauthState.js +66 -0
  382. package/lib/services/socialOAuth/pinterest.oauth.d.ts +15 -0
  383. package/lib/services/socialOAuth/pinterest.oauth.d.ts.map +1 -0
  384. package/lib/services/socialOAuth/pinterest.oauth.js +126 -0
  385. package/lib/services/socialOAuth/threads.oauth.d.ts +14 -0
  386. package/lib/services/socialOAuth/threads.oauth.d.ts.map +1 -0
  387. package/lib/services/socialOAuth/threads.oauth.js +129 -0
  388. package/lib/services/socialOAuth/tiktok.oauth.d.ts +15 -0
  389. package/lib/services/socialOAuth/tiktok.oauth.d.ts.map +1 -0
  390. package/lib/services/socialOAuth/tiktok.oauth.js +151 -0
  391. package/lib/services/socialOAuth/types.d.ts +67 -0
  392. package/lib/services/socialOAuth/types.d.ts.map +1 -0
  393. package/lib/services/socialOAuth/types.js +2 -0
  394. package/lib/services/socialOAuth/x.oauth.d.ts +17 -0
  395. package/lib/services/socialOAuth/x.oauth.d.ts.map +1 -0
  396. package/lib/services/socialOAuth/x.oauth.js +134 -0
  397. package/lib/services/socialOAuth/youtube.oauth.d.ts +15 -0
  398. package/lib/services/socialOAuth/youtube.oauth.d.ts.map +1 -0
  399. package/lib/services/socialOAuth/youtube.oauth.js +156 -0
  400. package/lib/services/socialPublish/factory.d.ts +5 -0
  401. package/lib/services/socialPublish/factory.d.ts.map +1 -0
  402. package/lib/services/socialPublish/factory.js +32 -0
  403. package/lib/services/socialPublish/index.d.ts +10 -0
  404. package/lib/services/socialPublish/index.d.ts.map +1 -0
  405. package/lib/services/socialPublish/index.js +25 -0
  406. package/lib/services/socialPublish/linkedin.publish.d.ts +9 -0
  407. package/lib/services/socialPublish/linkedin.publish.d.ts.map +1 -0
  408. package/lib/services/socialPublish/linkedin.publish.js +143 -0
  409. package/lib/services/socialPublish/meta.publish.d.ts +28 -0
  410. package/lib/services/socialPublish/meta.publish.d.ts.map +1 -0
  411. package/lib/services/socialPublish/meta.publish.js +149 -0
  412. package/lib/services/socialPublish/pinterest.publish.d.ts +13 -0
  413. package/lib/services/socialPublish/pinterest.publish.d.ts.map +1 -0
  414. package/lib/services/socialPublish/pinterest.publish.js +130 -0
  415. package/lib/services/socialPublish/threads.publish.d.ts +12 -0
  416. package/lib/services/socialPublish/threads.publish.d.ts.map +1 -0
  417. package/lib/services/socialPublish/threads.publish.js +96 -0
  418. package/lib/services/socialPublish/tiktok.publish.d.ts +13 -0
  419. package/lib/services/socialPublish/tiktok.publish.d.ts.map +1 -0
  420. package/lib/services/socialPublish/tiktok.publish.js +118 -0
  421. package/lib/services/socialPublish/types.d.ts +47 -0
  422. package/lib/services/socialPublish/types.d.ts.map +1 -0
  423. package/lib/services/socialPublish/types.js +2 -0
  424. package/lib/services/socialPublish/x.publish.d.ts +12 -0
  425. package/lib/services/socialPublish/x.publish.d.ts.map +1 -0
  426. package/lib/services/socialPublish/x.publish.js +147 -0
  427. package/lib/services/socialPublish/youtube.publish.d.ts +9 -0
  428. package/lib/services/socialPublish/youtube.publish.d.ts.map +1 -0
  429. package/lib/services/socialPublish/youtube.publish.js +107 -0
  430. package/lib/services/stock/index.d.ts +2 -0
  431. package/lib/services/stock/index.d.ts.map +1 -0
  432. package/lib/services/stock/index.js +17 -0
  433. package/lib/services/stock/realPersonSafety.d.ts +99 -0
  434. package/lib/services/stock/realPersonSafety.d.ts.map +1 -0
  435. package/lib/services/stock/realPersonSafety.js +248 -0
  436. package/lib/utils/index.d.ts +1 -0
  437. package/lib/utils/index.d.ts.map +1 -1
  438. package/lib/utils/index.js +1 -0
  439. package/lib/utils/renderTier.d.ts +26 -0
  440. package/lib/utils/renderTier.d.ts.map +1 -0
  441. package/lib/utils/renderTier.js +34 -0
  442. package/package.json +1 -1
@@ -0,0 +1,194 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildVideoGenerateRequest = buildVideoGenerateRequest;
4
+ exports.buildExtendBody = buildExtendBody;
5
+ exports.buildOmniVideoBody = buildOmniVideoBody;
6
+ exports.buildMotionControlBody = buildMotionControlBody;
7
+ exports.buildAvatarRequest = buildAvatarRequest;
8
+ exports.buildLipSyncBody = buildLipSyncBody;
9
+ const types_1 = require("../../types");
10
+ const cameraAdapter_1 = require("./cameraAdapter");
11
+ /**
12
+ * Pure request-body builders mapping our provider-agnostic
13
+ * VideoGenerationParams onto Kling's per-endpoint request shapes. No I/O —
14
+ * KlingService calls these, then submits the result. Keeping them here makes
15
+ * the per-endpoint field wiring testable in isolation and the service class a
16
+ * thin dispatcher.
17
+ */
18
+ /**
19
+ * text2video / image2video body. Routes by the presence of inputImageUrl and
20
+ * wires the shared optional fields (negative prompt, cfg, camera control,
21
+ * audio/sound tier) plus the i2v-only mask / tail-frame fields.
22
+ */
23
+ function buildVideoGenerateRequest(params, modelId) {
24
+ // Common optional fields shared by text2video and image2video endpoints.
25
+ const optional = {};
26
+ if (params.negativePrompt)
27
+ optional.negative_prompt = params.negativePrompt;
28
+ if (params.cfgScale !== undefined)
29
+ optional.cfg_scale = params.cfgScale;
30
+ if (params.callbackUrl)
31
+ optional.callback_url = params.callbackUrl;
32
+ if (params.externalTaskId)
33
+ optional.external_task_id = params.externalTaskId;
34
+ if (params.cameraControl) {
35
+ const cc = (0, cameraAdapter_1.toKlingCameraControl)(params.cameraControl);
36
+ if (cc)
37
+ optional.camera_control = cc;
38
+ }
39
+ // v2.6 uses `sound: "on"|"off"` as a pricing-tier toggle. v3 uses
40
+ // `generate_audio: boolean` for native audio synthesis. Route by model.
41
+ if (params.audio !== undefined) {
42
+ if (params.modelKey === "kling-v3.0") {
43
+ optional.generate_audio = Boolean(params.audio);
44
+ }
45
+ else if (params.modelKey === "kling-v2.6") {
46
+ optional.sound = params.audio ? "on" : "off";
47
+ }
48
+ }
49
+ const isImageToVideo = !!params.inputImageUrl;
50
+ if (isImageToVideo) {
51
+ const i2v = {
52
+ model_name: modelId,
53
+ prompt: params.prompt,
54
+ image: params.inputImageUrl,
55
+ duration: params.duration || 5,
56
+ mode: params.mode || types_1.EVideoMode.STANDARD,
57
+ ...optional,
58
+ };
59
+ if (params.aspectRatio)
60
+ i2v.aspect_ratio = params.aspectRatio;
61
+ if (params.lastFrameImageUrl)
62
+ i2v.image_tail = params.lastFrameImageUrl;
63
+ if (params.staticMaskUrl)
64
+ i2v.static_mask = params.staticMaskUrl;
65
+ if (params.dynamicMasks?.length) {
66
+ i2v.dynamic_masks = params.dynamicMasks.slice(0, 6).map((d) => ({
67
+ mask: d.maskUrl,
68
+ trajectories: d.trajectories,
69
+ }));
70
+ }
71
+ return i2v;
72
+ }
73
+ return {
74
+ model_name: modelId,
75
+ prompt: params.prompt,
76
+ aspect_ratio: params.aspectRatio || "16:9",
77
+ duration: params.duration || 5,
78
+ mode: params.mode || types_1.EVideoMode.STANDARD,
79
+ ...optional,
80
+ };
81
+ }
82
+ /** Video-extend body (continue a prior Kling task by its video_id). */
83
+ function buildExtendBody(params) {
84
+ const body = { video_id: params.sourceTaskId };
85
+ if (params.prompt)
86
+ body.prompt = params.prompt;
87
+ if (params.negativePrompt)
88
+ body.negative_prompt = params.negativePrompt;
89
+ if (params.cfgScale !== undefined)
90
+ body.cfg_scale = params.cfgScale;
91
+ if (params.callbackUrl)
92
+ body.callback_url = params.callbackUrl;
93
+ if (params.externalTaskId)
94
+ body.external_task_id = params.externalTaskId;
95
+ return body;
96
+ }
97
+ /** OmniVideo body: start/end/reference frames, reference videos, multi-shot. */
98
+ function buildOmniVideoBody(params, modelId) {
99
+ const body = {
100
+ model_name: modelId,
101
+ mode: params.mode || types_1.EVideoMode.STANDARD,
102
+ duration: String(params.duration ?? 5),
103
+ };
104
+ if (params.prompt)
105
+ body.prompt = params.prompt;
106
+ if (params.aspectRatio)
107
+ body.aspect_ratio = params.aspectRatio;
108
+ if (params.callbackUrl)
109
+ body.callback_url = params.callbackUrl;
110
+ if (params.externalTaskId)
111
+ body.external_task_id = params.externalTaskId;
112
+ if (params.audio !== undefined)
113
+ body.sound = params.audio ? "on" : "off";
114
+ // Build image_list: start frame, end frame, plain reference images.
115
+ const imageList = [];
116
+ if (params.inputImageUrl) {
117
+ imageList.push({ image_url: params.inputImageUrl, type: "first_frame" });
118
+ }
119
+ if (params.lastFrameImageUrl) {
120
+ imageList.push({ image_url: params.lastFrameImageUrl, type: "end_frame" });
121
+ }
122
+ for (const url of params.referenceImageUrls ?? []) {
123
+ imageList.push({ image_url: url });
124
+ }
125
+ if (imageList.length)
126
+ body.image_list = imageList;
127
+ // Build video_list: reference videos (feature type) or base videos (editing).
128
+ if (params.referenceVideoUrls?.length) {
129
+ body.video_list = params.referenceVideoUrls.map((url) => ({
130
+ video_url: url,
131
+ refer_type: "feature",
132
+ }));
133
+ }
134
+ // Multi-shot support. MultiShot is Shot[] directly (not { shots: Shot[] }).
135
+ if (params.multiShot?.length) {
136
+ body.multi_shot = true;
137
+ body.shot_type = "customize";
138
+ body.multi_prompt = params.multiShot.map((s, i) => ({
139
+ index: i + 1,
140
+ prompt: s.prompt,
141
+ ...(s.duration !== undefined ? { duration: String(s.duration) } : {}),
142
+ }));
143
+ }
144
+ return body;
145
+ }
146
+ /** Motion-control body (character image + motion reference video). */
147
+ function buildMotionControlBody(params, modelId) {
148
+ const body = {
149
+ model_name: modelId,
150
+ image_url: params.inputImageUrl,
151
+ video_url: params.inputVideoUrl,
152
+ };
153
+ if (params.prompt)
154
+ body.prompt = params.prompt;
155
+ if (params.mode)
156
+ body.mode = params.mode;
157
+ if (params.callbackUrl)
158
+ body.callback_url = params.callbackUrl;
159
+ if (params.externalTaskId)
160
+ body.external_task_id = params.externalTaskId;
161
+ return body;
162
+ }
163
+ /** Avatar (image+audio → lipsync video) body. */
164
+ function buildAvatarRequest(params) {
165
+ return {
166
+ image: params.inputImageUrl,
167
+ sound_file: params.inputAudioUrl,
168
+ prompt: params.prompt,
169
+ mode: params.mode || "std",
170
+ ...(params.callbackUrl ? { callback_url: params.callbackUrl } : {}),
171
+ ...(params.externalTaskId ? { external_task_id: params.externalTaskId } : {}),
172
+ };
173
+ }
174
+ /**
175
+ * Advanced-lip-sync body. Takes the resolved face (from identify-face) and the
176
+ * session id; auto-selects the first detected face's window for the audio.
177
+ */
178
+ function buildLipSyncBody(params, sessionId, face) {
179
+ const audioDurationMs = params.audioDurationMs ?? 60000;
180
+ return {
181
+ session_id: sessionId,
182
+ face_choose: [{
183
+ face_id: face.face_id,
184
+ sound_file: params.inputAudioUrl,
185
+ sound_insert_time: face.start_time,
186
+ sound_start_time: 0,
187
+ sound_end_time: audioDurationMs,
188
+ sound_volume: 1,
189
+ original_audio_volume: 1,
190
+ }],
191
+ ...(params.callbackUrl ? { callback_url: params.callbackUrl } : {}),
192
+ ...(params.externalTaskId ? { external_task_id: params.externalTaskId } : {}),
193
+ };
194
+ }
@@ -0,0 +1,16 @@
1
+ import { VideoStatusParams, VideoStatusResult } from "../types";
2
+ /**
3
+ * Kling status polling + result stashing. Extracted from KlingService so the
4
+ * class stays a thin transport/dispatch layer. These take a `request` dep (the
5
+ * service's bound requestWithTimeoutRetry) plus the submit timeout, so they
6
+ * reuse the JWT auth + IPv4-pinned agents without holding a class reference.
7
+ */
8
+ export interface KlingStatusDeps {
9
+ /** Bound KlingService.requestWithTimeoutRetry. */
10
+ request: <T>(endpoint: string, method: "POST" | "GET", body?: any, maxAttempts?: number, timeout?: number) => Promise<T>;
11
+ /** Submit-endpoint timeout (also used for the potentially-large video download). */
12
+ generateTimeout: number;
13
+ }
14
+ export declare function checkRegularVideoStatus(deps: KlingStatusDeps, { task, outputFilename, outputFilePath }: VideoStatusParams): Promise<VideoStatusResult>;
15
+ export declare function checkAvatarVideoStatus(deps: KlingStatusDeps, { task, outputFilename, outputFilePath }: VideoStatusParams): Promise<VideoStatusResult>;
16
+ //# sourceMappingURL=klingStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"klingStatus.d.ts","sourceRoot":"","sources":["../../../../../src/services/aiGen/providers/kling/klingStatus.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGhE;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,OAAO,EAAE,CAAC,CAAC,EACT,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GAAG,KAAK,EACtB,IAAI,CAAC,EAAE,GAAG,EACV,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,MAAM,KACb,OAAO,CAAC,CAAC,CAAC,CAAC;IAChB,oFAAoF;IACpF,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,eAAe,EACrB,EAAE,IAAI,EAAE,cAAc,EAAE,cAAyB,EAAE,EAAE,iBAAiB,GACrE,OAAO,CAAC,iBAAiB,CAAC,CAyE5B;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,eAAe,EACrB,EAAE,IAAI,EAAE,cAAc,EAAE,cAAyB,EAAE,EAAE,iBAAiB,GACrE,OAAO,CAAC,iBAAiB,CAAC,CAqG5B"}
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.checkRegularVideoStatus = checkRegularVideoStatus;
7
+ exports.checkAvatarVideoStatus = checkAvatarVideoStatus;
8
+ const axios_1 = __importDefault(require("axios"));
9
+ const http_1 = __importDefault(require("http"));
10
+ const https_1 = __importDefault(require("https"));
11
+ const types_1 = require("../../../../globals/types");
12
+ const firebase_1 = require("../../../../libs/firebase");
13
+ const logger_1 = require("../../../../utils/logger");
14
+ async function checkRegularVideoStatus(deps, { task, outputFilename, outputFilePath = "videos" }) {
15
+ const startTime = Date.now();
16
+ // Try each Kling status endpoint in order until one returns non-404.
17
+ // We don't persist which endpoint was used at submit time, so we probe all of them.
18
+ const statusEndpoints = [
19
+ `/v1/videos/text2video/${task}`,
20
+ `/v1/videos/image2video/${task}`,
21
+ `/v1/videos/video-extend/${task}`,
22
+ `/v1/videos/omni-video/${task}`,
23
+ `/v1/videos/motion-control/${task}`,
24
+ `/v1/videos/advanced-lip-sync/${task}`,
25
+ ];
26
+ let result;
27
+ for (const ep of statusEndpoints) {
28
+ try {
29
+ result = await deps.request(ep, "GET");
30
+ break; // found it
31
+ }
32
+ catch (err) {
33
+ if (err.response?.status !== 404)
34
+ throw err;
35
+ // 404 → try next endpoint
36
+ }
37
+ }
38
+ if (!result) {
39
+ return {
40
+ status: types_1.EVideoSceneStatus.FAILED,
41
+ errorMessage: `Task ${task} not found on any Kling status endpoint`,
42
+ };
43
+ }
44
+ logger_1.logger.info("Kling checkVideoStatus polled", { task, durationMs: Date.now() - startTime, status: result.data.task_status });
45
+ if (result.data.task_status === "succeed") {
46
+ const videoUrl = result.data.task_result?.videos?.[0]?.url;
47
+ if (!videoUrl) {
48
+ return {
49
+ status: types_1.EVideoSceneStatus.FAILED,
50
+ errorMessage: "No video URL in response",
51
+ };
52
+ }
53
+ const filePath = `${outputFilePath}/${outputFilename}.mp4`;
54
+ const file = (0, firebase_1.getBucket)().file(filePath);
55
+ // Download video using axios — use generateTimeout since video files can be large
56
+ const videoResp = await axios_1.default.get(videoUrl, {
57
+ responseType: "arraybuffer",
58
+ timeout: deps.generateTimeout,
59
+ });
60
+ const buffer = Buffer.from(videoResp.data);
61
+ await file.save(buffer, { contentType: "video/mp4" });
62
+ const [signedUrl] = await file.getSignedUrl({
63
+ action: "read",
64
+ expires: "03-09-2491",
65
+ });
66
+ return {
67
+ videoUrl: signedUrl,
68
+ status: types_1.EVideoSceneStatus.COMPLETED,
69
+ };
70
+ }
71
+ if (result.data.task_status === "failed") {
72
+ return {
73
+ status: types_1.EVideoSceneStatus.FAILED,
74
+ errorMessage: result.data.task_status_msg || result.message || "Kling task failed (no reason provided)",
75
+ };
76
+ }
77
+ return { status: types_1.EVideoSceneStatus.PENDING };
78
+ }
79
+ async function checkAvatarVideoStatus(deps, { task, outputFilename, outputFilePath = "videos" }) {
80
+ const startTime = Date.now();
81
+ const result = await deps.request(`/v1/videos/avatar/image2video/${task}`, "GET");
82
+ logger_1.logger.info("Kling checkAvatarVideoStatus polled", { task, durationMs: Date.now() - startTime, status: result?.data?.task_status, statusMsg: result?.data?.task_status_msg || undefined });
83
+ if (!result) {
84
+ return {
85
+ status: types_1.EVideoSceneStatus.FAILED,
86
+ errorMessage: "No response from Kling Avatar API",
87
+ };
88
+ }
89
+ if (result.data.task_status === "succeed") {
90
+ const videoUrl = result.data.task_result?.videos?.[0]?.url;
91
+ if (!videoUrl) {
92
+ return {
93
+ status: types_1.EVideoSceneStatus.FAILED,
94
+ errorMessage: "No video URL in avatar response",
95
+ };
96
+ }
97
+ // Kling task is done. Now download from Kling's CDN, push to GCS, and
98
+ // mint a signed URL. Any of these three can hiccup (Kling CDN slow,
99
+ // GCS 503, signedURL service blip) — historically the whole call threw
100
+ // and the outer TaskPoller burned a poll attempt re-asking Kling for a
101
+ // status that's already known. Wrap the post-success work in its own
102
+ // bounded retry so a transient blip doesn't poison the poll loop.
103
+ const filePath = `${outputFilePath}/${outputFilename}.mp4`;
104
+ const file = (0, firebase_1.getBucket)().file(filePath);
105
+ const maxAttempts = 3;
106
+ let lastErr;
107
+ // Force IPv4 on the download. The Kling-returned video URL frequently
108
+ // resolves to a CDN host where IPv6 is broken or routes us to a
109
+ // geo-blocked PoP, producing an AggregateError(ETIMEDOUT) where both
110
+ // happy-eyeballs sockets fail. Pinning v4 avoids the IPv6 dead-end.
111
+ const v4Http = new http_1.default.Agent({ family: 4, keepAlive: true });
112
+ const v4Https = new https_1.default.Agent({ family: 4, keepAlive: true });
113
+ // Parse host so we can log which CDN we couldn't reach.
114
+ let downloadHost = "unknown";
115
+ try {
116
+ downloadHost = new URL(videoUrl).host;
117
+ }
118
+ catch {
119
+ /* leave as unknown */
120
+ }
121
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
122
+ try {
123
+ const videoResp = await axios_1.default.get(videoUrl, {
124
+ responseType: "arraybuffer",
125
+ timeout: deps.generateTimeout,
126
+ httpAgent: v4Http,
127
+ httpsAgent: v4Https,
128
+ });
129
+ const buffer = Buffer.from(videoResp.data);
130
+ await file.save(buffer, { contentType: "video/mp4" });
131
+ const [signedUrl] = await file.getSignedUrl({
132
+ action: "read",
133
+ expires: "03-09-2491",
134
+ });
135
+ return {
136
+ videoUrl: signedUrl,
137
+ status: types_1.EVideoSceneStatus.COMPLETED,
138
+ };
139
+ }
140
+ catch (err) {
141
+ lastErr = err;
142
+ const isErr = err instanceof Error;
143
+ logger_1.logger.warn("Kling avatar post-success stash failed", {
144
+ task,
145
+ attempt,
146
+ maxAttempts,
147
+ downloadHost,
148
+ errName: isErr ? err.name : typeof err,
149
+ errCode: isErr ? err.code : undefined,
150
+ httpStatus: isErr ? err.response?.status : undefined,
151
+ msg: isErr ? err.message : String(err),
152
+ });
153
+ if (attempt < maxAttempts) {
154
+ await new Promise((r) => setTimeout(r, 2000 * 2 ** (attempt - 1)));
155
+ }
156
+ }
157
+ }
158
+ // All internal retries exhausted — surface as pending so the outer
159
+ // TaskPoller retries the WHOLE checkVideoStatus call (with its own
160
+ // budget). Throwing here would burn an outer attempt with no extra
161
+ // signal beyond what we already logged.
162
+ throw lastErr instanceof Error
163
+ ? lastErr
164
+ : new Error(`Kling avatar stash failed after ${maxAttempts} attempts`);
165
+ }
166
+ if (result.data.task_status === "failed") {
167
+ return {
168
+ status: types_1.EVideoSceneStatus.FAILED,
169
+ errorMessage: result.data.task_status_msg || result.message || "Kling avatar task failed (no reason provided)",
170
+ };
171
+ }
172
+ return { status: types_1.EVideoSceneStatus.PENDING };
173
+ }
@@ -42,11 +42,72 @@ declare class BullMQService {
42
42
  private getConnection;
43
43
  /** Initialize BullMQ service (like your initRedis) */
44
44
  init(): Promise<void>;
45
+ /**
46
+ * Dev enqueue gate (single source of truth for ALL queues).
47
+ *
48
+ * When iterating on the Firebase Functions locally you don't want every test
49
+ * request to drop a real job into Redis — the node worker (whenever it next
50
+ * runs) would drain the whole backlog and burn provider credits. In dev we
51
+ * therefore SKIP enqueue by default; opt back in by setting `ENABLE_QUEUE=true`
52
+ * (or the legacy `ENABLE_VIDEO_QUEUE=true`) in the env of whichever process is
53
+ * enqueuing — set it in BOTH functions + node when you want the full pipeline.
54
+ *
55
+ * In production this is always false (NODE_ENV=production), so prod always
56
+ * enqueues. Centralised here so it covers video, poster, render, image, agent
57
+ * and social queues uniformly rather than per-controller flags.
58
+ */
59
+ private enqueueDisabledInDev;
45
60
  /** Add a job */
46
61
  addJob(queueName: string, data: JobData, opts?: {
47
62
  jobId?: string;
48
63
  delay?: number;
64
+ /** Retry attempts (default BullMQ = 1, i.e. no retry). */
65
+ attempts?: number;
66
+ /** Backoff between retries when `attempts` > 1. */
67
+ backoff?: {
68
+ type: "fixed" | "exponential";
69
+ delay: number;
70
+ };
71
+ /**
72
+ * Override the default completed/failed retention. Numbers cap by count;
73
+ * objects can cap by `{ age, count }`. Defaults below keep Redis from
74
+ * filling up on the 30MB Redis Cloud hobby plan.
75
+ */
76
+ removeOnComplete?: number | {
77
+ age?: number;
78
+ count?: number;
79
+ };
80
+ removeOnFail?: number | {
81
+ age?: number;
82
+ count?: number;
83
+ };
49
84
  }): Promise<void>;
85
+ /** Get (or lazily create) the Queue handle for a name, reusing the cache. */
86
+ private getQueue;
87
+ /**
88
+ * Admin: obliterate the given queues — removes ALL jobs in every state
89
+ * (wait/active/completed/failed/delayed) AND the leftover per-job hashes.
90
+ * `force` so it proceeds even if jobs are mid-flight. Used by the
91
+ * `queue:flush:*` scripts. Returns the queue names actually processed.
92
+ */
93
+ obliterateQueues(queueNames: string[]): Promise<string[]>;
94
+ /** Admin: per-queue depth + orphaned per-job hash count (read-only). */
95
+ getQueueStats(queueNames: string[]): Promise<Array<{
96
+ queue: string;
97
+ wait: number;
98
+ active: number;
99
+ delayed: number;
100
+ completed: number;
101
+ failed: number;
102
+ hashes: number;
103
+ }>>;
104
+ /** Admin: Redis memory snapshot (read-only). */
105
+ redisMemoryInfo(): Promise<{
106
+ usedHuman: string;
107
+ usedRaw: number;
108
+ maxRaw: number;
109
+ dbsize: number;
110
+ }>;
50
111
  startWorkers(queueNames: string[], processor: (job: Job) => Promise<void>, perQueueOptions?: Record<string, {
51
112
  lockDuration?: number;
52
113
  stalledInterval?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"bullmq.service.d.ts","sourceRoot":"","sources":["../../src/services/bullmq.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAgB,EAAwB,YAAY,EAAE,MAAM,SAAS,CAAC;AAItE,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAc1C,UAAU,oBAAoB;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,cAAM,aAAa;IACjB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAgB;IACvC,OAAO,CAAC,MAAM,CAAiC;IAC/C,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,YAAY,CAAgB;IAIpC,OAAO,CAAC,UAAU,CAAC,CAAc;IACjC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO;WAQO,WAAW,CAAC,OAAO,EAAE,oBAAoB;IAOvD;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,CAAC,aAAa;IAOrB,sDAAsD;IACzC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBlC,gBAAgB;IACH,MAAM,CACjB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,OAAO,EACb,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;IAUpC,YAAY,CACjB,UAAU,EAAE,MAAM,EAAE,EACpB,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,EACtC,eAAe,CAAC,EAAE,MAAM,CACtB,MAAM,EACN;QACE,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CACF;CAyIJ;AASD,eAAO,MAAM,MAAM,eAGjB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC"}
1
+ {"version":3,"file":"bullmq.service.d.ts","sourceRoot":"","sources":["../../src/services/bullmq.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAgB,EAAwB,YAAY,EAAE,MAAM,SAAS,CAAC;AAItE,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAc1C,UAAU,oBAAoB;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,cAAM,aAAa;IACjB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAgB;IACvC,OAAO,CAAC,MAAM,CAAiC;IAC/C,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,YAAY,CAAgB;IAIpC,OAAO,CAAC,UAAU,CAAC,CAAc;IACjC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO;WAQO,WAAW,CAAC,OAAO,EAAE,oBAAoB;IAOvD;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,CAAC,aAAa;IAOrB,sDAAsD;IACzC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBlC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,oBAAoB;IAQ5B,gBAAgB;IACH,MAAM,CACjB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,OAAO,EACb,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,0DAA0D;QAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,mDAAmD;QACnD,OAAO,CAAC,EAAE;YAAE,IAAI,EAAE,OAAO,GAAG,aAAa,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3D;;;;WAIG;QACH,gBAAgB,CAAC,EAAE,MAAM,GAAG;YAAE,GAAG,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC7D,YAAY,CAAC,EAAE,MAAM,GAAG;YAAE,GAAG,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAC1D;IA+BH,6EAA6E;IAC7E,OAAO,CAAC,QAAQ;IAQhB;;;;;OAKG;IACU,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAUtE,wEAAwE;IAC3D,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CACvD,KAAK,CAAC;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CACH;IAgCD,gDAAgD;IACnC,eAAe,IAAI,OAAO,CAAC;QACtC,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IAWK,YAAY,CACjB,UAAU,EAAE,MAAM,EAAE,EACpB,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,EACtC,eAAe,CAAC,EAAE,MAAM,CACtB,MAAM,EACN;QACE,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CACF;CAyIJ;AASD,eAAO,MAAM,MAAM,eAGjB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC"}
@@ -83,14 +83,114 @@ class BullMQService {
83
83
  throw err;
84
84
  }
85
85
  }
86
+ /**
87
+ * Dev enqueue gate (single source of truth for ALL queues).
88
+ *
89
+ * When iterating on the Firebase Functions locally you don't want every test
90
+ * request to drop a real job into Redis — the node worker (whenever it next
91
+ * runs) would drain the whole backlog and burn provider credits. In dev we
92
+ * therefore SKIP enqueue by default; opt back in by setting `ENABLE_QUEUE=true`
93
+ * (or the legacy `ENABLE_VIDEO_QUEUE=true`) in the env of whichever process is
94
+ * enqueuing — set it in BOTH functions + node when you want the full pipeline.
95
+ *
96
+ * In production this is always false (NODE_ENV=production), so prod always
97
+ * enqueues. Centralised here so it covers video, poster, render, image, agent
98
+ * and social queues uniformly rather than per-controller flags.
99
+ */
100
+ enqueueDisabledInDev() {
101
+ if (process.env.NODE_ENV !== "development")
102
+ return false;
103
+ const enabled = process.env.ENABLE_QUEUE === "true" ||
104
+ process.env.ENABLE_VIDEO_QUEUE === "true";
105
+ return !enabled;
106
+ }
86
107
  /** Add a job */
87
108
  async addJob(queueName, data, opts) {
109
+ // Dev gate — skip the actual enqueue unless explicitly opted in. Logged so
110
+ // it's obvious in the emulator output why nothing showed up in the queue.
111
+ if (this.enqueueDisabledInDev()) {
112
+ logger_1.logger.info("[BullMQ] enqueue skipped (dev): set ENABLE_QUEUE=true to enqueue", { queueName, jobId: opts?.jobId });
113
+ return;
114
+ }
88
115
  if (!this.initialized)
89
116
  await this.init();
90
117
  const queue = this.queues.get(queueName) ??
91
118
  new bullmq_1.Queue(queueName, { connection: this.getConnection() });
92
119
  this.queues.set(queueName, queue);
93
- await queue.add(opts?.jobId || "default", data, { delay: opts?.delay });
120
+ await queue.add(opts?.jobId || "default", data, {
121
+ delay: opts?.delay,
122
+ attempts: opts?.attempts,
123
+ backoff: opts?.backoff,
124
+ // Auto-evict finished jobs so their hashes don't accumulate forever.
125
+ // Without this BullMQ keeps every completed/failed job hash with no TTL
126
+ // (this is what filled prod Redis to ~75% of 30MB / 41k orphan keys).
127
+ // Completed: keep 1 day or last 1000. Failed: keep longer (7 days /
128
+ // last 5000) since failures are worth inspecting.
129
+ removeOnComplete: opts?.removeOnComplete ?? { age: 24 * 3600, count: 1000 },
130
+ removeOnFail: opts?.removeOnFail ?? { age: 7 * 24 * 3600, count: 5000 },
131
+ });
132
+ }
133
+ /** Get (or lazily create) the Queue handle for a name, reusing the cache. */
134
+ getQueue(queueName) {
135
+ const queue = this.queues.get(queueName) ??
136
+ new bullmq_1.Queue(queueName, { connection: this.getConnection() });
137
+ this.queues.set(queueName, queue);
138
+ return queue;
139
+ }
140
+ /**
141
+ * Admin: obliterate the given queues — removes ALL jobs in every state
142
+ * (wait/active/completed/failed/delayed) AND the leftover per-job hashes.
143
+ * `force` so it proceeds even if jobs are mid-flight. Used by the
144
+ * `queue:flush:*` scripts. Returns the queue names actually processed.
145
+ */
146
+ async obliterateQueues(queueNames) {
147
+ if (!this.initialized)
148
+ await this.init();
149
+ const done = [];
150
+ for (const name of queueNames) {
151
+ await this.getQueue(name).obliterate({ force: true });
152
+ done.push(name);
153
+ }
154
+ return done;
155
+ }
156
+ /** Admin: per-queue depth + orphaned per-job hash count (read-only). */
157
+ async getQueueStats(queueNames) {
158
+ if (!this.initialized)
159
+ await this.init();
160
+ const conn = this.getConnection();
161
+ const out = [];
162
+ for (const queue of queueNames) {
163
+ const [wait, active, delayed, completed, failed] = await Promise.all([
164
+ conn.llen(`bull:${queue}:wait`),
165
+ conn.llen(`bull:${queue}:active`),
166
+ conn.zcard(`bull:${queue}:delayed`),
167
+ conn.zcard(`bull:${queue}:completed`),
168
+ conn.zcard(`bull:${queue}:failed`),
169
+ ]);
170
+ // Count bull:<queue>:<numericId> hashes — the orphans that accumulate
171
+ // when removeOnComplete/removeOnFail isn't set.
172
+ let hashes = 0;
173
+ let cursor = "0";
174
+ do {
175
+ const [next, keys] = await conn.scan(cursor, "MATCH", `bull:${queue}:*`, "COUNT", 1000);
176
+ cursor = next;
177
+ hashes += keys.filter((k) => /:\d+$/.test(k)).length;
178
+ } while (cursor !== "0");
179
+ out.push({ queue, wait, active, delayed, completed, failed, hashes });
180
+ }
181
+ return out;
182
+ }
183
+ /** Admin: Redis memory snapshot (read-only). */
184
+ async redisMemoryInfo() {
185
+ if (!this.initialized)
186
+ await this.init();
187
+ const conn = this.getConnection();
188
+ const mem = await conn.info("memory");
189
+ const usedHuman = /used_memory_human:(.+)/.exec(mem)?.[1]?.trim() ?? "?";
190
+ const usedRaw = Number(/used_memory:(\d+)/.exec(mem)?.[1] ?? 0);
191
+ const maxRaw = Number(/maxmemory:(\d+)/.exec(mem)?.[1] ?? 0);
192
+ const dbsize = await conn.dbsize();
193
+ return { usedHuman, usedRaw, maxRaw, dbsize };
94
194
  }
95
195
  startWorkers(queueNames, processor, perQueueOptions) {
96
196
  const start = async () => {
@@ -0,0 +1,2 @@
1
+ export * from "./tokenVault";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/crypto/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./tokenVault"), exports);
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Token vault — symmetric encryption for secrets stored at rest in Firestore.
3
+ *
4
+ * Social-account OAuth tokens (access + refresh) must NEVER live in Firestore as
5
+ * plaintext: anyone with a DB export (or an over-broad security rule) would
6
+ * inherit publish/DM/analytics access to every connected account. We encrypt
7
+ * them with AES-256-GCM (authenticated encryption) before write and decrypt only
8
+ * inside workers / Cloud Functions at call time.
9
+ *
10
+ * Key management: the 32-byte key comes from `SOCIAL_TOKEN_ENC_KEY` (hex or
11
+ * base64). In dev it can sit in `.env`; in prod it should be sourced from GCP
12
+ * Secret Manager and injected as an env var. Rotating the key is supported via
13
+ * a key-id prefix on the ciphertext (`v1:`) so a future key can decrypt old
14
+ * blobs by id — see `EncryptedBlob` format below.
15
+ *
16
+ * Ciphertext wire format (single string, safe for Firestore):
17
+ * `<keyId>:<base64(iv)>:<base64(authTag)>:<base64(ciphertext)>`
18
+ * keyId lets us roll keys without a migration; iv is random per-encrypt (GCM
19
+ * must never reuse an iv under the same key).
20
+ */
21
+ /** True when at least the current key is configured. Use to gate features. */
22
+ export declare function isTokenVaultConfigured(): boolean;
23
+ /**
24
+ * Encrypt a plaintext secret. Returns the opaque wire-format string to store.
25
+ * Empty/whitespace input throws — callers should not persist empty tokens.
26
+ */
27
+ export declare function encryptToken(plaintext: string): string;
28
+ /**
29
+ * Decrypt a wire-format string produced by `encryptToken`. Throws if the blob is
30
+ * malformed, the key id is unknown, or the auth tag fails (tampering / wrong
31
+ * key). Never logs the plaintext.
32
+ */
33
+ export declare function decryptToken(blob: string): string;
34
+ /**
35
+ * Safe wrapper: decrypt, returning null instead of throwing. Use on read paths
36
+ * where a single corrupt/rotated blob shouldn't crash a batch (e.g. analytics
37
+ * poller iterating many accounts).
38
+ */
39
+ export declare function tryDecryptToken(blob: string | undefined | null): string | null;
40
+ /**
41
+ * Constant-time compare for opaque secrets (e.g. OAuth `state`, webhook
42
+ * signatures). Avoids leaking length/contents via early-exit timing.
43
+ */
44
+ export declare function safeEqual(a: string, b: string): boolean;
45
+ /** Test-only: reset the memoized key cache so env changes take effect. */
46
+ export declare function __resetTokenVaultCacheForTests(): void;
47
+ //# sourceMappingURL=tokenVault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenVault.d.ts","sourceRoot":"","sources":["../../../src/services/crypto/tokenVault.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AA8DH,8EAA8E;AAC9E,wBAAgB,sBAAsB,IAAI,OAAO,CAMhD;AAcD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAgBtD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA6BjD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAO9E;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAKvD;AAED,0EAA0E;AAC1E,wBAAgB,8BAA8B,IAAI,IAAI,CAErD"}