@treasuredata/tdx 0.9.7 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (556) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +2 -2
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/activations.js.map +1 -1
  9. package/dist/commands/agent-command.js +1 -1
  10. package/dist/commands/agent-command.js.map +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/api-command.js.map +1 -1
  13. package/dist/commands/auth-command.js +1 -1
  14. package/dist/commands/auth-command.js.map +1 -1
  15. package/dist/commands/chat-command.js +1 -1
  16. package/dist/commands/chat-command.js.map +1 -1
  17. package/dist/commands/claude-command.js +1 -1
  18. package/dist/commands/claude-statusline-command.js +1 -1
  19. package/dist/commands/claude-statusline-command.js.map +1 -1
  20. package/dist/commands/claude-usage-command.js +1 -1
  21. package/dist/commands/claude-usage-command.js.map +1 -1
  22. package/dist/commands/command.d.ts +2 -2
  23. package/dist/commands/command.d.ts.map +1 -1
  24. package/dist/commands/command.js +1 -1
  25. package/dist/commands/command.js.map +1 -1
  26. package/dist/commands/connection-command.js +1 -1
  27. package/dist/commands/connection-command.js.map +1 -1
  28. package/dist/commands/context-command.js +1 -1
  29. package/dist/commands/databases.js +1 -1
  30. package/dist/commands/databases.js.map +1 -1
  31. package/dist/commands/describe.js +1 -1
  32. package/dist/commands/describe.js.map +1 -1
  33. package/dist/commands/engage-command.js +1 -1
  34. package/dist/commands/engage-command.js.map +1 -1
  35. package/dist/commands/job-command.js +1 -1
  36. package/dist/commands/job-command.js.map +1 -1
  37. package/dist/commands/journey-command.d.ts.map +1 -1
  38. package/dist/commands/journey-command.js +1 -1
  39. package/dist/commands/journey-command.js.map +1 -1
  40. package/dist/commands/journey-validate-command.d.ts +18 -0
  41. package/dist/commands/journey-validate-command.d.ts.map +1 -0
  42. package/dist/commands/journey-validate-command.js +1 -0
  43. package/dist/commands/journey-validate-command.js.map +1 -0
  44. package/dist/commands/llm-command.js +1 -1
  45. package/dist/commands/llm-command.js.map +1 -1
  46. package/dist/commands/llm-proxy.js +1 -1
  47. package/dist/commands/parent-segment-command.js +1 -1
  48. package/dist/commands/parent-segment-command.js.map +1 -1
  49. package/dist/commands/profiles-command.js +1 -1
  50. package/dist/commands/profiles-command.js.map +1 -1
  51. package/dist/commands/query-command.js +1 -1
  52. package/dist/commands/query-command.js.map +1 -1
  53. package/dist/commands/segment-command.js +1 -1
  54. package/dist/commands/segment-command.js.map +1 -1
  55. package/dist/commands/segment-create-command.js +1 -1
  56. package/dist/commands/segment-create-command.js.map +1 -1
  57. package/dist/commands/segment-fields-command.js +1 -1
  58. package/dist/commands/segment-fields-command.js.map +1 -1
  59. package/dist/commands/segment-pull-command.d.ts +1 -6
  60. package/dist/commands/segment-pull-command.d.ts.map +1 -1
  61. package/dist/commands/segment-pull-command.js +1 -1
  62. package/dist/commands/segment-pull-command.js.map +1 -1
  63. package/dist/commands/segment-push-command.d.ts +2 -0
  64. package/dist/commands/segment-push-command.d.ts.map +1 -1
  65. package/dist/commands/segment-push-command.js +1 -1
  66. package/dist/commands/segment-push-command.js.map +1 -1
  67. package/dist/commands/segment-update-command.js +1 -1
  68. package/dist/commands/segment-update-command.js.map +1 -1
  69. package/dist/commands/segment-use-command.js +1 -1
  70. package/dist/commands/segment-use-command.js.map +1 -1
  71. package/dist/commands/segment-validate-command.d.ts +18 -0
  72. package/dist/commands/segment-validate-command.d.ts.map +1 -0
  73. package/dist/commands/segment-validate-command.js +1 -0
  74. package/dist/commands/segment-validate-command.js.map +1 -0
  75. package/dist/commands/segments.js +1 -1
  76. package/dist/commands/segments.js.map +1 -1
  77. package/dist/commands/show.js +1 -1
  78. package/dist/commands/show.js.map +1 -1
  79. package/dist/commands/tables.js +1 -1
  80. package/dist/commands/tables.js.map +1 -1
  81. package/dist/commands/use-command.js +1 -1
  82. package/dist/commands/use-command.js.map +1 -1
  83. package/dist/commands/user-command.js +1 -1
  84. package/dist/commands/user-command.js.map +1 -1
  85. package/dist/commands/workflow-command.js +1 -1
  86. package/dist/commands/workflow-command.js.map +1 -1
  87. package/dist/core/auth.d.ts +1 -1
  88. package/dist/core/auth.d.ts.map +1 -1
  89. package/dist/core/auth.js +1 -1
  90. package/dist/{utils → core}/command-output.d.ts +1 -1
  91. package/dist/core/command-output.d.ts.map +1 -0
  92. package/dist/core/command-output.js +1 -0
  93. package/dist/core/command-output.js.map +1 -0
  94. package/dist/core/config.d.ts +1 -1
  95. package/dist/core/config.d.ts.map +1 -1
  96. package/dist/core/config.js +1 -1
  97. package/dist/core/config.js.map +1 -1
  98. package/dist/core/connection-cache.d.ts +1 -1
  99. package/dist/core/connection-cache.d.ts.map +1 -1
  100. package/dist/core/connection-cache.js +1 -1
  101. package/dist/core/constants.d.ts.map +1 -0
  102. package/dist/core/constants.js +1 -0
  103. package/dist/core/constants.js.map +1 -0
  104. package/dist/core/credential-cache.js +1 -1
  105. package/dist/core/global-context.d.ts +2 -2
  106. package/dist/core/global-context.d.ts.map +1 -1
  107. package/dist/core/global-context.js +1 -1
  108. package/dist/core/keychain.js +1 -1
  109. package/dist/core/profile.d.ts +1 -1
  110. package/dist/core/profile.d.ts.map +1 -1
  111. package/dist/core/profile.js +1 -1
  112. package/dist/core/project-config.d.ts +1 -1
  113. package/dist/core/project-config.d.ts.map +1 -1
  114. package/dist/core/project-config.js +1 -1
  115. package/dist/core/session.d.ts +1 -1
  116. package/dist/core/session.d.ts.map +1 -1
  117. package/dist/core/session.js +1 -1
  118. package/dist/core/user-cache.d.ts +1 -1
  119. package/dist/core/user-cache.d.ts.map +1 -1
  120. package/dist/core/user-cache.js +1 -1
  121. package/dist/index.d.ts +6 -6
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +1 -1
  124. package/dist/index.js.map +1 -1
  125. package/dist/proxy/anthropic-adapter.d.ts +2 -2
  126. package/dist/proxy/anthropic-adapter.d.ts.map +1 -1
  127. package/dist/proxy/anthropic-adapter.js +1 -1
  128. package/dist/proxy/claude-usage-tracker.js +1 -1
  129. package/dist/proxy/claude-usage-tracker.js.map +1 -1
  130. package/dist/proxy/context-signature.d.ts +1 -1
  131. package/dist/proxy/context-signature.d.ts.map +1 -1
  132. package/dist/proxy/context-signature.js +1 -1
  133. package/dist/proxy/context-signature.js.map +1 -1
  134. package/dist/proxy/conversation-utils.d.ts +1 -1
  135. package/dist/proxy/conversation-utils.d.ts.map +1 -1
  136. package/dist/proxy/conversation-utils.js +1 -1
  137. package/dist/proxy/server.js +1 -1
  138. package/dist/proxy/server.js.map +1 -1
  139. package/dist/proxy/session-cache.d.ts +1 -1
  140. package/dist/proxy/session-cache.d.ts.map +1 -1
  141. package/dist/proxy/session-cache.js +1 -1
  142. package/dist/sdk/agent/agent-config.d.ts.map +1 -0
  143. package/dist/sdk/agent/agent-config.js +1 -0
  144. package/dist/sdk/agent/agent-config.js.map +1 -0
  145. package/dist/sdk/agent/agent-ref-parser.d.ts.map +1 -0
  146. package/dist/sdk/agent/agent-ref-parser.js +1 -0
  147. package/dist/sdk/agent/agent-ref-parser.js.map +1 -0
  148. package/dist/sdk/agent/agent-yaml.d.ts +71 -176
  149. package/dist/sdk/agent/agent-yaml.d.ts.map +1 -1
  150. package/dist/sdk/agent/agent-yaml.js +1 -1
  151. package/dist/sdk/agent/agent-yaml.js.map +1 -1
  152. package/dist/sdk/agent/types/agent-def.d.ts +182 -0
  153. package/dist/sdk/agent/types/agent-def.d.ts.map +1 -0
  154. package/dist/sdk/agent/types/agent-def.js.map +1 -0
  155. package/dist/sdk/api.d.ts +2 -2
  156. package/dist/sdk/api.d.ts.map +1 -1
  157. package/dist/sdk/api.js +1 -1
  158. package/dist/sdk/api.js.map +1 -1
  159. package/dist/{client → sdk/client}/cdp-api-client.d.ts +24 -9
  160. package/dist/sdk/client/cdp-api-client.d.ts.map +1 -0
  161. package/dist/sdk/client/cdp-api-client.js +1 -0
  162. package/dist/sdk/client/cdp-api-client.js.map +1 -0
  163. package/dist/{types → sdk/client}/endpoints.d.ts +1 -1
  164. package/dist/sdk/client/endpoints.d.ts.map +1 -0
  165. package/dist/sdk/client/endpoints.js +1 -0
  166. package/dist/sdk/client/endpoints.js.map +1 -0
  167. package/dist/{client → sdk/client}/engage-api-client.d.ts +1 -1
  168. package/dist/sdk/client/engage-api-client.d.ts.map +1 -0
  169. package/dist/sdk/client/engage-api-client.js +1 -0
  170. package/dist/sdk/client/engage-api-client.js.map +1 -0
  171. package/dist/{client → sdk/client}/http-client.d.ts +2 -2
  172. package/dist/sdk/client/http-client.d.ts.map +1 -0
  173. package/dist/sdk/client/http-client.js +1 -0
  174. package/dist/sdk/client/http-client.js.map +1 -0
  175. package/dist/{client → sdk/client}/llm-api-client.d.ts +8 -8
  176. package/dist/sdk/client/llm-api-client.d.ts.map +1 -0
  177. package/dist/sdk/client/llm-api-client.js +1 -0
  178. package/dist/sdk/client/llm-api-client.js.map +1 -0
  179. package/dist/sdk/client/rate-limiter.d.ts.map +1 -0
  180. package/dist/sdk/client/rate-limiter.js +1 -0
  181. package/dist/sdk/client/rate-limiter.js.map +1 -0
  182. package/dist/{client → sdk/client}/td-api-client.d.ts +2 -2
  183. package/dist/sdk/client/td-api-client.d.ts.map +1 -0
  184. package/dist/sdk/client/td-api-client.js +1 -0
  185. package/dist/sdk/client/td-api-client.js.map +1 -0
  186. package/dist/{client → sdk/client}/trino-api-client.d.ts +2 -2
  187. package/dist/sdk/client/trino-api-client.d.ts.map +1 -0
  188. package/dist/sdk/client/trino-api-client.js +1 -0
  189. package/dist/sdk/client/trino-api-client.js.map +1 -0
  190. package/dist/{client → sdk/client}/workflow-client.d.ts +2 -2
  191. package/dist/sdk/client/workflow-client.d.ts.map +1 -0
  192. package/dist/sdk/client/workflow-client.js +1 -0
  193. package/dist/sdk/client/workflow-client.js.map +1 -0
  194. package/dist/sdk/connection-validator.d.ts +1 -1
  195. package/dist/sdk/connection-validator.d.ts.map +1 -1
  196. package/dist/sdk/connection-validator.js +1 -1
  197. package/dist/sdk/connection.d.ts +1 -1
  198. package/dist/sdk/connection.d.ts.map +1 -1
  199. package/dist/sdk/connection.js +1 -1
  200. package/dist/sdk/connection.js.map +1 -1
  201. package/dist/sdk/engage.d.ts +1 -1
  202. package/dist/sdk/engage.d.ts.map +1 -1
  203. package/dist/sdk/engage.js +1 -1
  204. package/dist/sdk/engage.js.map +1 -1
  205. package/dist/sdk/errors.js +1 -1
  206. package/dist/sdk/index.d.ts +18 -18
  207. package/dist/sdk/index.d.ts.map +1 -1
  208. package/dist/sdk/index.js +1 -1
  209. package/dist/sdk/index.js.map +1 -1
  210. package/dist/sdk/io/index.d.ts +9 -0
  211. package/dist/sdk/io/index.d.ts.map +1 -0
  212. package/dist/sdk/io/index.js +1 -0
  213. package/dist/sdk/io/index.js.map +1 -0
  214. package/dist/sdk/io/node-filesystem.d.ts +13 -0
  215. package/dist/sdk/io/node-filesystem.d.ts.map +1 -0
  216. package/dist/sdk/io/node-filesystem.js +1 -0
  217. package/dist/sdk/io/node-filesystem.js.map +1 -0
  218. package/dist/sdk/io/types.d.ts +39 -0
  219. package/dist/sdk/io/types.d.ts.map +1 -0
  220. package/dist/sdk/io/types.js.map +1 -0
  221. package/dist/sdk/job.d.ts +1 -1
  222. package/dist/sdk/job.d.ts.map +1 -1
  223. package/dist/sdk/job.js +1 -1
  224. package/dist/sdk/job.js.map +1 -1
  225. package/dist/sdk/journey.d.ts +23 -1
  226. package/dist/sdk/journey.d.ts.map +1 -1
  227. package/dist/sdk/journey.js +1 -1
  228. package/dist/sdk/journey.js.map +1 -1
  229. package/dist/sdk/llm/chat-cache.d.ts.map +1 -0
  230. package/dist/sdk/llm/chat-cache.js +1 -0
  231. package/dist/sdk/llm/chat-cache.js.map +1 -0
  232. package/dist/sdk/{llm.d.ts → llm/index.d.ts} +2 -2
  233. package/dist/sdk/llm/index.d.ts.map +1 -0
  234. package/dist/sdk/llm/index.js +1 -0
  235. package/dist/sdk/llm/index.js.map +1 -0
  236. package/dist/{utils → sdk/llm}/llm-backup-utils.d.ts +2 -2
  237. package/dist/sdk/llm/llm-backup-utils.d.ts.map +1 -0
  238. package/dist/sdk/llm/llm-backup-utils.js +1 -0
  239. package/dist/sdk/llm/llm-backup-utils.js.map +1 -0
  240. package/dist/sdk/llm/model-aliases.d.ts.map +1 -0
  241. package/dist/sdk/llm/model-aliases.js +1 -0
  242. package/dist/sdk/llm/model-aliases.js.map +1 -0
  243. package/dist/sdk/llm/model-factors.d.ts.map +1 -0
  244. package/dist/sdk/llm/model-factors.js +1 -0
  245. package/dist/sdk/llm/model-factors.js.map +1 -0
  246. package/dist/sdk/{query.d.ts → query/index.d.ts} +2 -2
  247. package/dist/sdk/query/index.d.ts.map +1 -0
  248. package/dist/sdk/query/index.js +1 -0
  249. package/dist/sdk/query/index.js.map +1 -0
  250. package/dist/sdk/query/sql-parser.d.ts.map +1 -0
  251. package/dist/sdk/query/sql-parser.js +1 -0
  252. package/dist/sdk/query/sql-parser.js.map +1 -0
  253. package/dist/sdk/segment/child-segment-yaml.d.ts +84 -257
  254. package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
  255. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  256. package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
  257. package/dist/{utils → sdk/segment}/fields-display.d.ts +1 -1
  258. package/dist/sdk/segment/fields-display.d.ts.map +1 -0
  259. package/dist/sdk/segment/fields-display.js +1 -0
  260. package/dist/sdk/segment/fields-display.js.map +1 -0
  261. package/dist/sdk/segment/file-discovery.d.ts +39 -0
  262. package/dist/sdk/segment/file-discovery.d.ts.map +1 -0
  263. package/dist/sdk/segment/file-discovery.js +1 -0
  264. package/dist/sdk/segment/file-discovery.js.map +1 -0
  265. package/dist/{utils → sdk/segment}/journey-utils.d.ts +62 -9
  266. package/dist/sdk/segment/journey-utils.d.ts.map +1 -0
  267. package/dist/sdk/segment/journey-utils.js +1 -0
  268. package/dist/sdk/segment/journey-utils.js.map +1 -0
  269. package/dist/sdk/segment/journey-yaml.d.ts +81 -465
  270. package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
  271. package/dist/sdk/segment/journey-yaml.js +1 -1
  272. package/dist/sdk/segment/journey-yaml.js.map +1 -1
  273. package/dist/sdk/segment/parent-segment-preview.d.ts +14 -14
  274. package/dist/sdk/segment/parent-segment-preview.d.ts.map +1 -1
  275. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  276. package/dist/sdk/segment/parent-segment-preview.js.map +1 -1
  277. package/dist/sdk/segment/parent-segment-yaml.d.ts +16 -158
  278. package/dist/sdk/segment/parent-segment-yaml.d.ts.map +1 -1
  279. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  280. package/dist/sdk/segment/parent-segment-yaml.js.map +1 -1
  281. package/dist/sdk/segment/pull-workflow.d.ts +91 -0
  282. package/dist/sdk/segment/pull-workflow.d.ts.map +1 -0
  283. package/dist/sdk/segment/pull-workflow.js +1 -0
  284. package/dist/sdk/segment/pull-workflow.js.map +1 -0
  285. package/dist/sdk/segment/push-workflow.d.ts +953 -0
  286. package/dist/sdk/segment/push-workflow.d.ts.map +1 -0
  287. package/dist/sdk/segment/push-workflow.js +1 -0
  288. package/dist/sdk/segment/push-workflow.js.map +1 -0
  289. package/dist/sdk/segment/resolution-context.d.ts +43 -0
  290. package/dist/sdk/segment/resolution-context.d.ts.map +1 -0
  291. package/dist/sdk/segment/resolution-context.js +1 -0
  292. package/dist/sdk/segment/resolution-context.js.map +1 -0
  293. package/dist/{utils → sdk/segment}/segment-path-parser.d.ts +2 -1
  294. package/dist/sdk/segment/segment-path-parser.d.ts.map +1 -0
  295. package/dist/sdk/segment/segment-path-parser.js +1 -0
  296. package/dist/sdk/segment/segment-path-parser.js.map +1 -0
  297. package/dist/sdk/segment/segment-ref-parser.d.ts.map +1 -0
  298. package/dist/sdk/segment/segment-ref-parser.js +1 -0
  299. package/dist/sdk/segment/segment-ref-parser.js.map +1 -0
  300. package/dist/sdk/segment/target-resolution.d.ts +162 -0
  301. package/dist/sdk/segment/target-resolution.d.ts.map +1 -0
  302. package/dist/sdk/segment/target-resolution.js +1 -0
  303. package/dist/sdk/segment/target-resolution.js.map +1 -0
  304. package/dist/{utils → sdk/segment}/tdx-config.d.ts +8 -0
  305. package/dist/sdk/segment/tdx-config.d.ts.map +1 -0
  306. package/dist/sdk/segment/tdx-config.js +1 -0
  307. package/dist/sdk/segment/tdx-config.js.map +1 -0
  308. package/dist/sdk/segment/types/journey-def.d.ts +323 -0
  309. package/dist/sdk/segment/types/journey-def.d.ts.map +1 -0
  310. package/dist/sdk/segment/types/journey-def.js.map +1 -0
  311. package/dist/sdk/segment/types/parent-segment-def.d.ts +157 -0
  312. package/dist/sdk/segment/types/parent-segment-def.d.ts.map +1 -0
  313. package/dist/sdk/segment/types/parent-segment-def.js.map +1 -0
  314. package/dist/sdk/segment/types/segment-def.d.ts +284 -0
  315. package/dist/sdk/segment/types/segment-def.d.ts.map +1 -0
  316. package/dist/sdk/segment/types/segment-def.js.map +1 -0
  317. package/dist/sdk/segment/validate-files.d.ts +94 -0
  318. package/dist/sdk/segment/validate-files.d.ts.map +1 -0
  319. package/dist/sdk/segment/validate-files.js +1 -0
  320. package/dist/sdk/segment/validate-files.js.map +1 -0
  321. package/dist/sdk/segment/yaml-validator.d.ts +101 -0
  322. package/dist/sdk/segment/yaml-validator.d.ts.map +1 -0
  323. package/dist/sdk/segment/yaml-validator.js +1 -0
  324. package/dist/sdk/segment/yaml-validator.js.map +1 -0
  325. package/dist/sdk/segment.d.ts +59 -15
  326. package/dist/sdk/segment.d.ts.map +1 -1
  327. package/dist/sdk/segment.js +1 -1
  328. package/dist/sdk/segment.js.map +1 -1
  329. package/dist/sdk/types/anthropic.d.ts.map +1 -0
  330. package/dist/sdk/types/anthropic.js.map +1 -0
  331. package/dist/{types → sdk/types}/cdp.d.ts +2 -2
  332. package/dist/sdk/types/cdp.d.ts.map +1 -0
  333. package/dist/sdk/types/cdp.js.map +1 -0
  334. package/dist/sdk/types/connection.d.ts.map +1 -0
  335. package/dist/sdk/types/connection.js.map +1 -0
  336. package/dist/sdk/types/connector-schema.d.ts.map +1 -0
  337. package/dist/sdk/types/connector-schema.js.map +1 -0
  338. package/dist/sdk/types/database.d.ts.map +1 -0
  339. package/dist/sdk/types/database.js.map +1 -0
  340. package/dist/sdk/types/engage.d.ts.map +1 -0
  341. package/dist/sdk/types/engage.js +1 -0
  342. package/dist/sdk/types/engage.js.map +1 -0
  343. package/dist/{types → sdk/types}/index.d.ts +6 -4
  344. package/dist/sdk/types/index.d.ts.map +1 -0
  345. package/dist/sdk/types/index.js +1 -0
  346. package/dist/sdk/types/index.js.map +1 -0
  347. package/dist/sdk/types/job.d.ts.map +1 -0
  348. package/dist/sdk/types/job.js +1 -0
  349. package/dist/sdk/types/job.js.map +1 -0
  350. package/dist/{types → sdk/types}/llm.d.ts +2 -2
  351. package/dist/sdk/types/llm.d.ts.map +1 -0
  352. package/dist/sdk/types/llm.js +1 -0
  353. package/dist/sdk/types/llm.js.map +1 -0
  354. package/dist/sdk/types/progress.d.ts +42 -0
  355. package/dist/sdk/types/progress.d.ts.map +1 -0
  356. package/dist/sdk/types/progress.js +1 -0
  357. package/dist/sdk/types/progress.js.map +1 -0
  358. package/dist/sdk/types/resolution-context.d.ts +85 -0
  359. package/dist/sdk/types/resolution-context.d.ts.map +1 -0
  360. package/dist/sdk/types/resolution-context.js +1 -0
  361. package/dist/sdk/types/resolution-context.js.map +1 -0
  362. package/dist/sdk/types/trino.d.ts.map +1 -0
  363. package/dist/sdk/types/trino.js +1 -0
  364. package/dist/sdk/types/trino.js.map +1 -0
  365. package/dist/sdk/types/workflow.d.ts.map +1 -0
  366. package/dist/sdk/types/workflow.js +1 -0
  367. package/dist/sdk/types/workflow.js.map +1 -0
  368. package/dist/sdk/user.d.ts +1 -1
  369. package/dist/sdk/user.d.ts.map +1 -1
  370. package/dist/sdk/user.js +1 -1
  371. package/dist/sdk/user.js.map +1 -1
  372. package/dist/sdk/util/format-detector.d.ts.map +1 -0
  373. package/dist/sdk/util/format-detector.js +1 -0
  374. package/dist/sdk/util/format-detector.js.map +1 -0
  375. package/dist/{utils → sdk/util}/formatters.d.ts +1 -1
  376. package/dist/sdk/util/formatters.d.ts.map +1 -0
  377. package/dist/sdk/util/formatters.js +1 -0
  378. package/dist/sdk/util/formatters.js.map +1 -0
  379. package/dist/sdk/util/index.d.ts +9 -0
  380. package/dist/sdk/util/index.d.ts.map +1 -0
  381. package/dist/sdk/util/index.js +1 -0
  382. package/dist/sdk/util/index.js.map +1 -0
  383. package/dist/sdk/util/tree-formatter.d.ts.map +1 -0
  384. package/dist/sdk/util/tree-formatter.js +1 -0
  385. package/dist/sdk/util/tree-formatter.js.map +1 -0
  386. package/dist/sdk/{workflow.d.ts → workflow/index.d.ts} +2 -2
  387. package/dist/sdk/workflow/index.d.ts.map +1 -0
  388. package/dist/sdk/workflow/index.js +1 -0
  389. package/dist/sdk/workflow/index.js.map +1 -0
  390. package/dist/sdk/workflow/workflow-utils.d.ts.map +1 -0
  391. package/dist/sdk/workflow/workflow-utils.js +1 -0
  392. package/dist/sdk/workflow/workflow-utils.js.map +1 -0
  393. package/dist/utils/async.js +1 -1
  394. package/dist/utils/colors.js +1 -1
  395. package/dist/utils/diff.js +1 -1
  396. package/dist/utils/file-permissions.js +1 -1
  397. package/dist/utils/json-loader.js +1 -1
  398. package/dist/utils/option-validation.js +1 -1
  399. package/dist/utils/port.js +1 -1
  400. package/dist/utils/process.js +1 -1
  401. package/dist/utils/prompt.js +1 -1
  402. package/dist/utils/spinner.d.ts +12 -12
  403. package/dist/utils/spinner.d.ts.map +1 -1
  404. package/dist/utils/spinner.js +1 -1
  405. package/dist/utils/spinner.js.map +1 -1
  406. package/dist/utils/sse-parser.d.ts +1 -1
  407. package/dist/utils/sse-parser.d.ts.map +1 -1
  408. package/dist/utils/sse-parser.js +1 -1
  409. package/dist/utils/string-utils.js +1 -1
  410. package/dist/utils/table-ref-parser.js +1 -1
  411. package/dist/utils/tdx-logger.js +1 -1
  412. package/dist/utils/version-check.js +1 -1
  413. package/package.json +1 -1
  414. package/dist/client/cdp-api-client.d.ts.map +0 -1
  415. package/dist/client/cdp-api-client.js +0 -1
  416. package/dist/client/cdp-api-client.js.map +0 -1
  417. package/dist/client/engage-api-client.d.ts.map +0 -1
  418. package/dist/client/engage-api-client.js +0 -1
  419. package/dist/client/engage-api-client.js.map +0 -1
  420. package/dist/client/http-client.d.ts.map +0 -1
  421. package/dist/client/http-client.js +0 -1
  422. package/dist/client/http-client.js.map +0 -1
  423. package/dist/client/llm-api-client.d.ts.map +0 -1
  424. package/dist/client/llm-api-client.js +0 -1
  425. package/dist/client/llm-api-client.js.map +0 -1
  426. package/dist/client/rate-limiter.d.ts.map +0 -1
  427. package/dist/client/rate-limiter.js +0 -1
  428. package/dist/client/rate-limiter.js.map +0 -1
  429. package/dist/client/td-api-client.d.ts.map +0 -1
  430. package/dist/client/td-api-client.js +0 -1
  431. package/dist/client/td-api-client.js.map +0 -1
  432. package/dist/client/trino-api-client.d.ts.map +0 -1
  433. package/dist/client/trino-api-client.js +0 -1
  434. package/dist/client/trino-api-client.js.map +0 -1
  435. package/dist/client/workflow-client.d.ts.map +0 -1
  436. package/dist/client/workflow-client.js +0 -1
  437. package/dist/client/workflow-client.js.map +0 -1
  438. package/dist/sdk/llm.d.ts.map +0 -1
  439. package/dist/sdk/llm.js +0 -1
  440. package/dist/sdk/llm.js.map +0 -1
  441. package/dist/sdk/query.d.ts.map +0 -1
  442. package/dist/sdk/query.js +0 -1
  443. package/dist/sdk/query.js.map +0 -1
  444. package/dist/sdk/workflow.d.ts.map +0 -1
  445. package/dist/sdk/workflow.js +0 -1
  446. package/dist/sdk/workflow.js.map +0 -1
  447. package/dist/types/anthropic.d.ts.map +0 -1
  448. package/dist/types/anthropic.js.map +0 -1
  449. package/dist/types/cdp.d.ts.map +0 -1
  450. package/dist/types/cdp.js.map +0 -1
  451. package/dist/types/connection.d.ts.map +0 -1
  452. package/dist/types/connection.js.map +0 -1
  453. package/dist/types/connector-schema.d.ts.map +0 -1
  454. package/dist/types/connector-schema.js.map +0 -1
  455. package/dist/types/database.d.ts.map +0 -1
  456. package/dist/types/database.js.map +0 -1
  457. package/dist/types/endpoints.d.ts.map +0 -1
  458. package/dist/types/endpoints.js +0 -1
  459. package/dist/types/endpoints.js.map +0 -1
  460. package/dist/types/engage.d.ts.map +0 -1
  461. package/dist/types/engage.js.map +0 -1
  462. package/dist/types/index.d.ts.map +0 -1
  463. package/dist/types/index.js +0 -1
  464. package/dist/types/index.js.map +0 -1
  465. package/dist/types/job.d.ts.map +0 -1
  466. package/dist/types/job.js.map +0 -1
  467. package/dist/types/llm.d.ts.map +0 -1
  468. package/dist/types/llm.js.map +0 -1
  469. package/dist/types/trino.d.ts.map +0 -1
  470. package/dist/types/trino.js.map +0 -1
  471. package/dist/types/workflow.d.ts.map +0 -1
  472. package/dist/types/workflow.js.map +0 -1
  473. package/dist/utils/agent-config.d.ts.map +0 -1
  474. package/dist/utils/agent-config.js +0 -1
  475. package/dist/utils/agent-config.js.map +0 -1
  476. package/dist/utils/agent-ref-parser.d.ts.map +0 -1
  477. package/dist/utils/agent-ref-parser.js +0 -1
  478. package/dist/utils/agent-ref-parser.js.map +0 -1
  479. package/dist/utils/chat-cache.d.ts.map +0 -1
  480. package/dist/utils/chat-cache.js +0 -1
  481. package/dist/utils/chat-cache.js.map +0 -1
  482. package/dist/utils/command-output.d.ts.map +0 -1
  483. package/dist/utils/command-output.js +0 -1
  484. package/dist/utils/command-output.js.map +0 -1
  485. package/dist/utils/constants.d.ts.map +0 -1
  486. package/dist/utils/constants.js +0 -1
  487. package/dist/utils/constants.js.map +0 -1
  488. package/dist/utils/fields-display.d.ts.map +0 -1
  489. package/dist/utils/fields-display.js +0 -1
  490. package/dist/utils/fields-display.js.map +0 -1
  491. package/dist/utils/format-detector.d.ts.map +0 -1
  492. package/dist/utils/format-detector.js +0 -1
  493. package/dist/utils/format-detector.js.map +0 -1
  494. package/dist/utils/formatters.d.ts.map +0 -1
  495. package/dist/utils/formatters.js +0 -1
  496. package/dist/utils/formatters.js.map +0 -1
  497. package/dist/utils/journey-utils.d.ts.map +0 -1
  498. package/dist/utils/journey-utils.js +0 -1
  499. package/dist/utils/journey-utils.js.map +0 -1
  500. package/dist/utils/llm-backup-utils.d.ts.map +0 -1
  501. package/dist/utils/llm-backup-utils.js +0 -1
  502. package/dist/utils/llm-backup-utils.js.map +0 -1
  503. package/dist/utils/model-aliases.d.ts.map +0 -1
  504. package/dist/utils/model-aliases.js +0 -1
  505. package/dist/utils/model-aliases.js.map +0 -1
  506. package/dist/utils/model-factors.d.ts.map +0 -1
  507. package/dist/utils/model-factors.js +0 -1
  508. package/dist/utils/model-factors.js.map +0 -1
  509. package/dist/utils/segment-path-parser.d.ts.map +0 -1
  510. package/dist/utils/segment-path-parser.js +0 -1
  511. package/dist/utils/segment-path-parser.js.map +0 -1
  512. package/dist/utils/segment-ref-parser.d.ts.map +0 -1
  513. package/dist/utils/segment-ref-parser.js +0 -1
  514. package/dist/utils/segment-ref-parser.js.map +0 -1
  515. package/dist/utils/sql-parser.d.ts.map +0 -1
  516. package/dist/utils/sql-parser.js +0 -1
  517. package/dist/utils/sql-parser.js.map +0 -1
  518. package/dist/utils/tdx-config.d.ts.map +0 -1
  519. package/dist/utils/tdx-config.js +0 -1
  520. package/dist/utils/tdx-config.js.map +0 -1
  521. package/dist/utils/tree-formatter.d.ts.map +0 -1
  522. package/dist/utils/tree-formatter.js +0 -1
  523. package/dist/utils/tree-formatter.js.map +0 -1
  524. package/dist/utils/workflow-utils.d.ts.map +0 -1
  525. package/dist/utils/workflow-utils.js +0 -1
  526. package/dist/utils/workflow-utils.js.map +0 -1
  527. /package/dist/{utils → core}/constants.d.ts +0 -0
  528. /package/dist/{utils → sdk/agent}/agent-config.d.ts +0 -0
  529. /package/dist/{utils → sdk/agent}/agent-ref-parser.d.ts +0 -0
  530. /package/dist/{types/anthropic.js → sdk/agent/types/agent-def.js} +0 -0
  531. /package/dist/{client → sdk/client}/rate-limiter.d.ts +0 -0
  532. /package/dist/{types/cdp.js → sdk/io/types.js} +0 -0
  533. /package/dist/{utils → sdk/llm}/chat-cache.d.ts +0 -0
  534. /package/dist/{utils → sdk/llm}/model-aliases.d.ts +0 -0
  535. /package/dist/{utils → sdk/llm}/model-factors.d.ts +0 -0
  536. /package/dist/{utils → sdk/query}/sql-parser.d.ts +0 -0
  537. /package/dist/{utils → sdk/segment}/segment-ref-parser.d.ts +0 -0
  538. /package/dist/{types/connection.js → sdk/segment/types/journey-def.js} +0 -0
  539. /package/dist/{types/connector-schema.js → sdk/segment/types/parent-segment-def.js} +0 -0
  540. /package/dist/{types/database.js → sdk/segment/types/segment-def.js} +0 -0
  541. /package/dist/{types → sdk/types}/anthropic.d.ts +0 -0
  542. /package/dist/{types/engage.js → sdk/types/anthropic.js} +0 -0
  543. /package/dist/{types/job.js → sdk/types/cdp.js} +0 -0
  544. /package/dist/{types → sdk/types}/connection.d.ts +0 -0
  545. /package/dist/{types/llm.js → sdk/types/connection.js} +0 -0
  546. /package/dist/{types → sdk/types}/connector-schema.d.ts +0 -0
  547. /package/dist/{types/trino.js → sdk/types/connector-schema.js} +0 -0
  548. /package/dist/{types → sdk/types}/database.d.ts +0 -0
  549. /package/dist/{types/workflow.js → sdk/types/database.js} +0 -0
  550. /package/dist/{types → sdk/types}/engage.d.ts +0 -0
  551. /package/dist/{types → sdk/types}/job.d.ts +0 -0
  552. /package/dist/{types → sdk/types}/trino.d.ts +0 -0
  553. /package/dist/{types → sdk/types}/workflow.d.ts +0 -0
  554. /package/dist/{utils → sdk/util}/format-detector.d.ts +0 -0
  555. /package/dist/{utils → sdk/util}/tree-formatter.d.ts +0 -0
  556. /package/dist/{utils → sdk/workflow}/workflow-utils.d.ts +0 -0
@@ -0,0 +1,953 @@
1
+ /**
2
+ * Push workflow for child segments and journeys.
3
+ *
4
+ * This module provides types and helper functions for pushing child segments
5
+ * and journeys to Treasure Data. The complex execution logic with progress
6
+ * reporting remains in the command layer.
7
+ */
8
+ /**
9
+ * Placeholder prefix for pending embedded segments.
10
+ * Used to mark segments that will be created after the journey exists.
11
+ */
12
+ export declare const PENDING_SEGMENT_PREFIX = "__pending_";
13
+ /**
14
+ * Placeholder prefix for pending embedded activations.
15
+ * Used to mark activations that will be created after the journey exists.
16
+ */
17
+ export declare const PENDING_ACTIVATION_PREFIX = "__pending_act_";
18
+ /**
19
+ * Create a pending segment placeholder ID
20
+ */
21
+ export declare function createPendingSegmentId(name: string): string;
22
+ /**
23
+ * Check if a segment ID is a pending placeholder
24
+ */
25
+ export declare function isPendingSegmentId(segmentId: string): boolean;
26
+ /**
27
+ * Extract the original name from a pending segment placeholder
28
+ */
29
+ export declare function extractPendingSegmentName(segmentId: string): string;
30
+ /**
31
+ * Create a pending activation placeholder ID
32
+ */
33
+ export declare function createPendingActivationId(name: string): string;
34
+ /**
35
+ * Check if an activation ID is a pending placeholder
36
+ */
37
+ export declare function isPendingActivationId(activationId: string): boolean;
38
+ /**
39
+ * Extract the original name from a pending activation placeholder
40
+ */
41
+ export declare function extractPendingActivationName(activationId: string): string;
42
+ /**
43
+ * Ensure required fields for CDP API journey requests.
44
+ * CDP API requires description and state fields to be set.
45
+ */
46
+ export declare function ensureJourneyDefaults(attrs: Record<string, unknown>): void;
47
+ /**
48
+ * Calculate TD folder path from local path, accounting for scoped push
49
+ *
50
+ * @param localFolderPath - Relative path from the source directory
51
+ * @param isScoped - Whether this is a scoped push (from subdirectory)
52
+ * @param scopedFolderPath - The scoped folder path (relative to config root)
53
+ * @returns The full TD folder path
54
+ */
55
+ export declare function resolveTDFolderPath(localFolderPath: string, isScoped: boolean, scopedFolderPath: string): string;
56
+ /**
57
+ * Add folders to create for a single folder path.
58
+ * Adds all parent folders that don't exist in the pathToId map.
59
+ *
60
+ * @param folderPath - The target folder path
61
+ * @param folderPathToId - Map of existing folder paths to IDs
62
+ * @param foldersToCreate - Set to add new folders to
63
+ */
64
+ export declare function addFoldersToCreate(folderPath: string, folderPathToId: Map<string, string>, foldersToCreate: Set<string>): void;
65
+ import type { ActivationResponse, CreateActivationRequest, SegmentResponse, Journey, SegmentFolder, JourneyListItem, JourneyActivationStep } from '../types/cdp.js';
66
+ import type { SegmentDef, ActivationDef } from './types/segment-def.js';
67
+ import { type JourneyDef, type JourneyResponseToDefContext } from './journey-yaml.js';
68
+ import { type ActivationConversionContext } from './child-segment-yaml.js';
69
+ export type { ActivationConversionContext };
70
+ import type { RuleDef } from './types/segment-def.js';
71
+ import type { SegmentSDK } from '../segment.js';
72
+ import type { JourneySDK } from '../journey.js';
73
+ import type { UserSDK } from '../user.js';
74
+ import type { ConnectionSDK } from '../connection.js';
75
+ import type { ProgressReporter } from '../types/progress.js';
76
+ import { type ValidationResult } from './yaml-validator.js';
77
+ /**
78
+ * Dependencies for the push workflow.
79
+ * These are the SDK instances needed for fetching and resolving data.
80
+ */
81
+ export interface PushWorkflowDeps {
82
+ segment: SegmentSDK;
83
+ journey: JourneySDK;
84
+ user: UserSDK;
85
+ connection: ConnectionSDK;
86
+ }
87
+ /**
88
+ * Options for preparePushSegments.
89
+ */
90
+ export interface PreparePushSegmentsOptions {
91
+ /** Source directory (defaults to resolving from tdx.json) */
92
+ sourceDir?: string;
93
+ /** Push only a single file */
94
+ singleFilePath?: string;
95
+ /** Only process journeys (skip segments) */
96
+ journeysOnly?: boolean;
97
+ /** Include deletion of server resources not in local YAML */
98
+ includeDelete?: boolean;
99
+ /** Progress callback */
100
+ onProgress?: (phase: string, detail?: string) => void;
101
+ }
102
+ /**
103
+ * Activation sync action during push
104
+ */
105
+ export interface ActivationAction {
106
+ /** Action type: create, update, or delete */
107
+ type: 'create' | 'update' | 'delete';
108
+ /** Activation name */
109
+ name: string;
110
+ /** YAML activation definition (for create/update) */
111
+ yamlActivation?: ActivationDef;
112
+ /** Existing activation response (for update/delete) */
113
+ existingActivation?: ActivationResponse;
114
+ /** Formatted diff string */
115
+ diff?: string;
116
+ /** Pre-validated API request (set during planning to avoid re-validation during execution) */
117
+ validatedRequest?: CreateActivationRequest;
118
+ }
119
+ /**
120
+ * Segment file to be pushed
121
+ */
122
+ export interface SegmentPushFile {
123
+ /** Path relative to source directory */
124
+ relativePath: string;
125
+ /** Absolute path on filesystem */
126
+ absolutePath: string;
127
+ /** Parsed YAML configuration */
128
+ yamlConfig: SegmentDef;
129
+ /** TD folder path (e.g., "marketing/campaigns") */
130
+ folderPath: string;
131
+ /** Existing segment if updating */
132
+ existingSegment?: SegmentResponse;
133
+ /** Existing activations for this segment */
134
+ existingActivations: ActivationResponse[];
135
+ /** Whether this is a new segment */
136
+ isNew: boolean;
137
+ /** Whether this segment has changes */
138
+ hasChanges: boolean;
139
+ /** Formatted diff string */
140
+ diff?: string;
141
+ /** Activation actions to perform */
142
+ activationActions: ActivationAction[];
143
+ }
144
+ /**
145
+ * Journey file to be pushed
146
+ */
147
+ export interface JourneyPushFile {
148
+ /** Path relative to source directory */
149
+ relativePath: string;
150
+ /** Absolute path on filesystem */
151
+ absolutePath: string;
152
+ /** Parsed YAML configuration */
153
+ yamlConfig: JourneyDef;
154
+ /** TD folder path */
155
+ folderPath: string;
156
+ /** Existing journey if updating */
157
+ existingJourney?: Journey;
158
+ /** Whether this is a new journey */
159
+ isNew: boolean;
160
+ /** Whether this journey has changes */
161
+ hasChanges: boolean;
162
+ /** Formatted diff string */
163
+ diff?: string;
164
+ }
165
+ /**
166
+ * Result of push preparation (preview)
167
+ */
168
+ export interface PushPrepareResult {
169
+ /** Resolved parent segment name */
170
+ parentName: string;
171
+ /** Parent segment ID */
172
+ parentId: string;
173
+ /** Source directory */
174
+ sourceDir: string;
175
+ /** Segment files to push */
176
+ segmentFiles: SegmentPushFile[];
177
+ /** Journey files to push */
178
+ journeyFiles: JourneyPushFile[];
179
+ /** Folders to create (paths) */
180
+ foldersToCreate: string[];
181
+ /** Segments to delete (if --delete flag) */
182
+ segmentsToDelete: SegmentResponse[];
183
+ /** Journeys to delete (if --delete flag) */
184
+ journeysToDelete: Journey[];
185
+ /** Summary counts */
186
+ counts: {
187
+ segments: {
188
+ new: number;
189
+ changed: number;
190
+ unchanged: number;
191
+ };
192
+ journeys: {
193
+ new: number;
194
+ changed: number;
195
+ unchanged: number;
196
+ };
197
+ activations: {
198
+ create: number;
199
+ update: number;
200
+ delete: number;
201
+ };
202
+ folders: number;
203
+ deletions: {
204
+ segments: number;
205
+ journeys: number;
206
+ };
207
+ };
208
+ /** Whether there are any changes to push */
209
+ hasChanges: boolean;
210
+ /** Pre-built execution context (to avoid re-fetching during execution) */
211
+ executionContext?: PushExecutionContext;
212
+ }
213
+ /**
214
+ * Execution context containing all resolved IDs and maps needed for push.
215
+ * This is built during preparation to avoid re-fetching during execution.
216
+ */
217
+ export interface PushExecutionContext {
218
+ /** Root folder ID from parent segment */
219
+ rootFolderId?: string;
220
+ /** Folder path to ID map */
221
+ folderPathToId: Map<string, string>;
222
+ /** Folder ID to path map */
223
+ folderIdToPath: Map<string, string>;
224
+ /** Segment name to ID map */
225
+ segmentNameToId: Map<string, string>;
226
+ /** Activations indexed by segment ID */
227
+ activationsBySegmentId: Map<string, ActivationResponse[]>;
228
+ /** User email to ID map */
229
+ emailToIdMap: Map<string, number>;
230
+ /** User ID to email map */
231
+ idToEmailMap: Map<number, string>;
232
+ /** Connection name to ID map */
233
+ connectionNameToIdMap: Map<string, number>;
234
+ /** Connection ID to name map */
235
+ connectionIdToNameMap: Map<string, string>;
236
+ /** Connection name to type map */
237
+ connectionNameToTypeMap: Map<string, string>;
238
+ }
239
+ /**
240
+ * Progress event types during push operation
241
+ */
242
+ export type PushProgressEvent = {
243
+ type: 'folder_creating';
244
+ folder: string;
245
+ } | {
246
+ type: 'folder_created';
247
+ folder: string;
248
+ folderId: string;
249
+ } | {
250
+ type: 'segment_creating';
251
+ name: string;
252
+ } | {
253
+ type: 'segment_created';
254
+ name: string;
255
+ segmentId: string;
256
+ } | {
257
+ type: 'segment_updating';
258
+ name: string;
259
+ } | {
260
+ type: 'segment_updated';
261
+ name: string;
262
+ } | {
263
+ type: 'segment_deleting';
264
+ name: string;
265
+ } | {
266
+ type: 'segment_deleted';
267
+ name: string;
268
+ } | {
269
+ type: 'activation_creating';
270
+ segmentName: string;
271
+ activationName: string;
272
+ } | {
273
+ type: 'activation_created';
274
+ segmentName: string;
275
+ activationName: string;
276
+ } | {
277
+ type: 'activation_updating';
278
+ segmentName: string;
279
+ activationName: string;
280
+ } | {
281
+ type: 'activation_updated';
282
+ segmentName: string;
283
+ activationName: string;
284
+ } | {
285
+ type: 'activation_deleting';
286
+ segmentName: string;
287
+ activationName: string;
288
+ } | {
289
+ type: 'activation_deleted';
290
+ segmentName: string;
291
+ activationName: string;
292
+ } | {
293
+ type: 'journey_creating';
294
+ name: string;
295
+ } | {
296
+ type: 'journey_created';
297
+ name: string;
298
+ journeyId: string;
299
+ } | {
300
+ type: 'journey_updating';
301
+ name: string;
302
+ } | {
303
+ type: 'journey_updated';
304
+ name: string;
305
+ } | {
306
+ type: 'journey_deleting';
307
+ name: string;
308
+ } | {
309
+ type: 'journey_deleted';
310
+ name: string;
311
+ } | {
312
+ type: 'embedded_segment_creating';
313
+ journeyName: string;
314
+ segmentName: string;
315
+ } | {
316
+ type: 'embedded_segment_created';
317
+ journeyName: string;
318
+ segmentName: string;
319
+ } | {
320
+ type: 'embedded_activation_creating';
321
+ journeyName: string;
322
+ activationName: string;
323
+ } | {
324
+ type: 'embedded_activation_created';
325
+ journeyName: string;
326
+ activationName: string;
327
+ };
328
+ /**
329
+ * Result of a push operation (async task with progress)
330
+ */
331
+ export interface PushTaskResult<T> {
332
+ data: T;
333
+ }
334
+ /**
335
+ * Callbacks for customizing push UI behavior.
336
+ * All callbacks are optional - defaults will be used if not provided.
337
+ */
338
+ export interface PushUICallbacks {
339
+ /**
340
+ * Execute an async task with progress indication.
341
+ * This wraps operations like API calls that may take time.
342
+ * @param message - Description of the operation
343
+ * @param task - Async function to execute
344
+ * @returns Task result
345
+ */
346
+ withProgress: <T>(message: string, task: () => Promise<T>) => Promise<PushTaskResult<T>>;
347
+ /**
348
+ * Called when a progress event occurs during execution.
349
+ * @param event - The progress event
350
+ */
351
+ onProgress?: (event: PushProgressEvent) => void;
352
+ /**
353
+ * Display the push summary before confirmation.
354
+ * @param prepared - The prepared push result
355
+ * @param parentName - Parent segment name
356
+ * @param sourceDir - Source directory path
357
+ */
358
+ displaySummary?: (prepared: PushPrepareResult, parentName: string, sourceDir: string) => void;
359
+ /**
360
+ * Display diff for a changed item.
361
+ * @param type - Item type ('segment' | 'journey')
362
+ * @param name - Item name
363
+ * @param diff - Diff string (or undefined if no diff)
364
+ * @param isNew - Whether this is a new item
365
+ */
366
+ displayDiff?: (type: 'segment' | 'journey', name: string, diff: string | undefined, isNew: boolean) => void;
367
+ /**
368
+ * Ask for user confirmation before executing push.
369
+ * @param totalChanges - Number of total changes
370
+ * @returns true if confirmed, false to abort
371
+ */
372
+ confirm?: (totalChanges: number) => Promise<boolean>;
373
+ /**
374
+ * Log an info message (e.g., blue for folder creation).
375
+ * Reserved for future use.
376
+ */
377
+ logInfo?: (message: string) => void;
378
+ /**
379
+ * Log a success message (e.g., green for created/updated items).
380
+ */
381
+ logSuccess?: (message: string) => void;
382
+ /**
383
+ * Log a warning message (e.g., yellow for updates).
384
+ * Reserved for future use.
385
+ */
386
+ logWarning?: (message: string) => void;
387
+ /**
388
+ * Log a deleted item (e.g., red for deletions).
389
+ */
390
+ logDeleted?: (message: string) => void;
391
+ }
392
+ /**
393
+ * Prepare segment files for push by calculating diffs and activation actions.
394
+ *
395
+ * @param parsedSegments - Parsed segment YAML files
396
+ * @param context - Execution context with resolved maps
397
+ * @param activationContext - Context for activation validation
398
+ * @param isScoped - Whether this is a scoped push
399
+ * @param scopedFolderPath - The scoped folder path
400
+ * @returns Prepared segment files and folders to create
401
+ */
402
+ export declare function prepareSegmentFiles(parsedSegments: ParsedSegmentFile[], context: {
403
+ segmentByFolderAndName: Map<string, SegmentResponse>;
404
+ activationsBySegmentId: Map<string, ActivationResponse[]>;
405
+ folderPathToId: Map<string, string>;
406
+ idToEmailMap: Map<number, string>;
407
+ connectionIdToNameMap: Map<string, string>;
408
+ }, activationContext: ActivationConversionContext, isScoped: boolean, scopedFolderPath: string): Promise<{
409
+ segmentFiles: SegmentPushFile[];
410
+ foldersToCreate: Set<string>;
411
+ }>;
412
+ /**
413
+ * Info passed to fetchJourney callback for progress reporting
414
+ */
415
+ export interface JourneyFetchInfo {
416
+ /** Journey ID to fetch */
417
+ journeyId: string;
418
+ /** Journey name (for display) */
419
+ journeyName: string;
420
+ /** Version number (for multi-version fetches) */
421
+ versionNumber?: number;
422
+ /** Whether this is a multi-version fetch */
423
+ isMultiVersion: boolean;
424
+ }
425
+ /**
426
+ * Context for journey preparation with fetch callbacks
427
+ */
428
+ export interface JourneyPrepContext {
429
+ /** Fetch a single journey by ID (without spinner - progress is handled via reporter) */
430
+ fetchJourney: (info: JourneyFetchInfo) => Promise<Journey>;
431
+ /** Map from journey bundle lookup key to list of journey versions */
432
+ journeyBundlesByFolderAndName: Map<string, JourneyListItem[]>;
433
+ /** Map from folder path to folder ID */
434
+ folderPathToId: Map<string, string>;
435
+ /** Map from user ID to email */
436
+ idToEmailMap: Map<number, string>;
437
+ /** Map from connection ID to name */
438
+ connectionIdToNameMap: Map<string, string>;
439
+ /** Existing segments for context building */
440
+ existingSegments: SegmentResponse[];
441
+ /** Parent segment ID */
442
+ parentId: string;
443
+ /** SDK deps for context creation */
444
+ deps: PushWorkflowDeps;
445
+ /** Progress reporter for status updates */
446
+ progress?: ProgressReporter;
447
+ /** Pre-fetched journey details by ID (optimization to avoid individual getJourney calls) */
448
+ journeyById?: Map<string, Journey>;
449
+ /** Pre-fetched activation steps by ID (optimization to avoid individual getActivation calls) */
450
+ activationStepsById?: Map<string, JourneyActivationStep>;
451
+ }
452
+ /**
453
+ * Prepare journey files for push by calculating diffs.
454
+ *
455
+ * @param parsedJourneys - Parsed journey YAML files
456
+ * @param context - Context with fetch callbacks and maps
457
+ * @param isScoped - Whether this is a scoped push
458
+ * @param scopedFolderPath - The scoped folder path
459
+ * @returns Prepared journey files and folders to create
460
+ */
461
+ export declare function prepareJourneyFiles(parsedJourneys: ParsedJourneyFile[], context: JourneyPrepContext, isScoped: boolean, scopedFolderPath: string): Promise<{
462
+ journeyFiles: JourneyPushFile[];
463
+ foldersToCreate: Set<string>;
464
+ }>;
465
+ /**
466
+ * Calculate activation actions (create/update/delete) by comparing YAML with existing.
467
+ * Matches activations by name within a segment.
468
+ */
469
+ export declare function calculateActivationActions(yamlActivations: ActivationDef[], existingActivations: ActivationResponse[], idToEmailMap?: Map<number, string>, connectionIdToNameMap?: Map<string, string>): ActivationAction[];
470
+ /**
471
+ * Result of segment diff calculation
472
+ */
473
+ export interface SegmentDiffResult {
474
+ /** Whether this is a new segment */
475
+ isNew: boolean;
476
+ /** Whether there are changes */
477
+ hasChanges: boolean;
478
+ /** Formatted diff string (only if has changes or is new) */
479
+ diff?: string;
480
+ }
481
+ /**
482
+ * Calculate diff for a segment comparing local YAML with existing server state.
483
+ *
484
+ * @param yamlConfig - Local YAML segment configuration
485
+ * @param existingSegment - Existing segment from server (undefined if new)
486
+ * @param existingActivations - Existing activations for the segment
487
+ * @param idToEmailMap - Map of user IDs to emails for comparison
488
+ * @param connectionIdToNameMap - Map of connection IDs to names
489
+ * @returns Diff result with isNew, hasChanges, and formatted diff
490
+ */
491
+ export declare function calculateSegmentDiff(yamlConfig: SegmentDef, existingSegment: SegmentResponse | undefined, existingActivations: ActivationResponse[], idToEmailMap?: Map<number, string>, connectionIdToNameMap?: Map<string, string>): SegmentDiffResult;
492
+ /**
493
+ * Result of journey diff calculation
494
+ */
495
+ export interface JourneyDiffResult {
496
+ /** Whether this is a new journey */
497
+ isNew: boolean;
498
+ /** Whether there are changes */
499
+ hasChanges: boolean;
500
+ /** Formatted diff string (only if has changes or is new) */
501
+ diff?: string;
502
+ }
503
+ /**
504
+ * Calculate diff for a journey comparing local YAML with server state.
505
+ *
506
+ * @param localYaml - Local YAML journey configuration
507
+ * @param existingYaml - Existing journey converted to YAML format (undefined if new)
508
+ * @returns Diff result with isNew, hasChanges, and formatted diff
509
+ */
510
+ export declare function calculateJourneyDiff(localYaml: JourneyDef, existingYaml: JourneyDef | undefined): JourneyDiffResult;
511
+ /**
512
+ * Find segments on server that are not in local YAML files.
513
+ * These are candidates for deletion.
514
+ *
515
+ * @param existingSegments - All segments from server
516
+ * @param localSegments - Local segment configs with folder paths
517
+ * @param folderIdToPath - Map of folder IDs to paths
518
+ * @param scopedFolderPath - Scoped folder path (if scoped push)
519
+ * @param isScoped - Whether this is a scoped push
520
+ * @returns Segments that exist on server but not in YAML
521
+ */
522
+ export declare function findSegmentsToDelete(existingSegments: SegmentResponse[], localSegments: Array<{
523
+ yamlConfig: SegmentDef;
524
+ folderPath: string;
525
+ }>, folderIdToPath: Map<string, string>, scopedFolderPath: string, isScoped: boolean): SegmentResponse[];
526
+ /**
527
+ * Journey list item for deletion check
528
+ */
529
+ export interface JourneyListItemForDeletion {
530
+ folderId?: string | null;
531
+ journeyBundleName: string;
532
+ }
533
+ /**
534
+ * Find journeys on server that are not in local YAML files.
535
+ * These are candidates for deletion.
536
+ *
537
+ * @param existingJourneys - All journeys from server
538
+ * @param localJourneys - Local journey configs with folder paths
539
+ * @param folderIdToPath - Map of folder IDs to paths
540
+ * @param scopedFolderPath - Scoped folder path (if scoped push)
541
+ * @param isScoped - Whether this is a scoped push
542
+ * @returns Journeys that exist on server but not in YAML
543
+ */
544
+ export declare function findJourneysToDelete<T extends JourneyListItemForDeletion>(existingJourneys: T[], localJourneys: Array<{
545
+ yamlConfig: JourneyDef;
546
+ folderPath: string;
547
+ }>, folderIdToPath: Map<string, string>, scopedFolderPath: string, isScoped: boolean): T[];
548
+ /**
549
+ * Build a map from "folderPath:segmentName" to segment for lookup during push.
550
+ * This allows matching local segments to existing server segments by folder + name.
551
+ *
552
+ * @param segments - Array of existing segments from server
553
+ * @param folderIdToPath - Map from folder ID to folder path
554
+ * @returns Map keyed by "folderPath:segmentName"
555
+ */
556
+ export declare function buildSegmentLookupMap(segments: SegmentResponse[], folderIdToPath: Map<string, string>): Map<string, SegmentResponse>;
557
+ /**
558
+ * Build a map from segment name to segment ID.
559
+ * Used for journey segment reference resolution.
560
+ *
561
+ * @param segments - Array of existing segments from server
562
+ * @returns Map from segment name to ID
563
+ */
564
+ export declare function buildSegmentNameToIdMap(segments: SegmentResponse[]): Map<string, string>;
565
+ /**
566
+ * Journey list item with required fields for bundle grouping.
567
+ */
568
+ export interface JourneyListItemForBundleMap {
569
+ id: string;
570
+ folderId?: string | null;
571
+ journeyBundleName: string;
572
+ versionNumber?: number | null;
573
+ }
574
+ /**
575
+ * Build a map from "folderPath:journeyBundleName" to journey versions.
576
+ * Groups all versions of a journey bundle together, sorted by version number.
577
+ *
578
+ * @param journeys - Array of existing journeys from server
579
+ * @param folderIdToPath - Map from folder ID to folder path
580
+ * @returns Map keyed by "folderPath:journeyBundleName", values are sorted by version
581
+ */
582
+ export declare function buildJourneyBundleLookupMap<T extends JourneyListItemForBundleMap>(journeys: T[], folderIdToPath: Map<string, string>): Map<string, T[]>;
583
+ /**
584
+ * Collect folders that need to be created for a set of folder paths.
585
+ * Returns all parent folders that don't exist in the folderPathToId map.
586
+ *
587
+ * @param folderPaths - Array of folder paths that need to exist
588
+ * @param folderPathToId - Map of existing folder paths to IDs
589
+ * @returns Set of folder paths that need to be created (in creation order)
590
+ */
591
+ export declare function collectFoldersToCreate(folderPaths: string[], folderPathToId: Map<string, string>): Set<string>;
592
+ /**
593
+ * Parsed local segment file with folder path
594
+ */
595
+ export interface ParsedSegmentFile {
596
+ yamlConfig: SegmentDef;
597
+ folderPath: string;
598
+ sourcePath: string;
599
+ }
600
+ /**
601
+ * Parsed local journey file with folder path
602
+ */
603
+ export interface ParsedJourneyFile {
604
+ yamlConfig: JourneyDef;
605
+ folderPath: string;
606
+ sourcePath: string;
607
+ }
608
+ /**
609
+ * Result of parsing and classifying local YAML files
610
+ */
611
+ export interface ParsedLocalFiles {
612
+ segments: ParsedSegmentFile[];
613
+ journeys: ParsedJourneyFile[];
614
+ }
615
+ /**
616
+ * Parse and classify YAML files into segments and journeys.
617
+ * Segments are normalized to match server-converted YAML format.
618
+ *
619
+ * @param yamlFiles - Array of absolute paths to YAML files
620
+ * @param sourceDir - Source directory (for calculating relative paths)
621
+ * @param options - Options for parsing
622
+ * @returns Parsed and classified segments and journeys
623
+ * @throws Error if any file cannot be parsed
624
+ */
625
+ export declare function parseAndClassifyYamlFiles(yamlFiles: string[], sourceDir: string, options?: {
626
+ skipSegments?: boolean;
627
+ }): ParsedLocalFiles;
628
+ /**
629
+ * File validation error with source information
630
+ */
631
+ export interface FileValidationError {
632
+ filePath: string;
633
+ source: string;
634
+ result: ValidationResult;
635
+ isJourney: boolean;
636
+ }
637
+ /**
638
+ * Validate parsed YAML files for segment and journey definitions.
639
+ * Runs offline validation to catch syntax errors before pushing.
640
+ *
641
+ * @param parsed - Parsed segments and journeys from parseAndClassifyYamlFiles
642
+ * @param sourceDir - Source directory for relative paths in error messages
643
+ * @returns Array of validation errors (empty if all valid)
644
+ */
645
+ export declare function validateParsedFiles(parsed: ParsedLocalFiles, sourceDir: string): FileValidationError[];
646
+ /**
647
+ * Format validation errors for display.
648
+ * Returns formatted error messages suitable for CLI output.
649
+ */
650
+ export declare function formatValidationErrors(errors: FileValidationError[]): string;
651
+ /**
652
+ * Result of building local expanded rule mappings for journey comparison.
653
+ */
654
+ export interface LocalExpandedRuleMappings {
655
+ /** Set of segment names defined in local YAML */
656
+ existingLocalSegmentNames: Set<string>;
657
+ /** Map from segment name to normalized rule */
658
+ localSegmentRules: Map<string, RuleDef>;
659
+ /** Map from expanded rule hash to local segment names ordered by usage */
660
+ localExpandedRuleToNames: Map<string, string[]>;
661
+ }
662
+ /**
663
+ * Build local expanded rule mappings for journey comparison.
664
+ * This allows matching server segments to local segments by expanded rule content.
665
+ *
666
+ * Key insight: Instead of matching by segment reference NAMES (which are unstable),
667
+ * we match by EXPANDED rule content. When a rule references another segment via
668
+ * include/exclude, we expand it to include the actual referenced rule's content.
669
+ *
670
+ * @param segments - Map of segment name to embedded segment definition from local YAML
671
+ * @returns Mappings for comparing server segments to local YAML
672
+ */
673
+ export declare function buildLocalExpandedRuleMappings(journey: JourneyDef): LocalExpandedRuleMappings;
674
+ /**
675
+ * Create a resolver function for segment names to IDs.
676
+ * Used when resolving include/exclude references in embedded segment rules.
677
+ *
678
+ * @param segmentNameToId - Map of segment names to IDs
679
+ * @param embeddedSegmentName - Name of the embedded segment containing the reference (for error messages)
680
+ * @returns Resolver function that throws SDKError if segment is not found
681
+ */
682
+ export declare function createSegmentIdResolver(segmentNameToId: Map<string, string>, embeddedSegmentName: string): (segmentName: string) => Promise<string>;
683
+ /**
684
+ * Extract root folder ID from parent segment response.
685
+ * Used as default folder for new journeys.
686
+ *
687
+ * @param parentSegment - Parent segment response with relationships
688
+ * @returns Root folder ID or undefined
689
+ */
690
+ export declare function extractRootFolderId(parentSegment: {
691
+ relationships?: {
692
+ parentSegmentFolder?: {
693
+ data?: {
694
+ id?: string;
695
+ };
696
+ };
697
+ parentFolder?: {
698
+ data?: {
699
+ id?: string;
700
+ };
701
+ };
702
+ };
703
+ }): string | undefined;
704
+ /**
705
+ * Connection maps for resolving names/IDs in activations.
706
+ */
707
+ export interface ConnectionMaps {
708
+ /** Map from connection name to ID */
709
+ nameToId: Map<string, number>;
710
+ /** Map from connection ID to name */
711
+ idToName: Map<string, string>;
712
+ /** Map from connection name to type */
713
+ nameToType: Map<string, string>;
714
+ }
715
+ /**
716
+ * Build connection maps from a list of connections.
717
+ *
718
+ * @param connections - Array of connections with id, name, and type
719
+ * @returns Connection maps for name/ID resolution
720
+ */
721
+ export declare function buildConnectionMaps(connections: Array<{
722
+ id: string;
723
+ name: string;
724
+ type: string;
725
+ }>): ConnectionMaps;
726
+ /**
727
+ * Push statistics for segments, journeys, activations, and folders.
728
+ */
729
+ export interface PushStats<TJourneyToDelete = JourneyListItemForDeletion> {
730
+ segments: {
731
+ new: SegmentPushFile[];
732
+ changed: SegmentPushFile[];
733
+ unchanged: SegmentPushFile[];
734
+ toDelete: SegmentResponse[];
735
+ };
736
+ journeys: {
737
+ new: JourneyPushFile[];
738
+ changed: JourneyPushFile[];
739
+ unchanged: JourneyPushFile[];
740
+ toDelete: TJourneyToDelete[];
741
+ };
742
+ activations: {
743
+ all: ActivationAction[];
744
+ toCreate: ActivationAction[];
745
+ toUpdate: ActivationAction[];
746
+ toDelete: ActivationAction[];
747
+ };
748
+ folders: {
749
+ toCreate: string[];
750
+ };
751
+ counts: {
752
+ segments: {
753
+ new: number;
754
+ changed: number;
755
+ unchanged: number;
756
+ toDelete: number;
757
+ };
758
+ journeys: {
759
+ new: number;
760
+ changed: number;
761
+ unchanged: number;
762
+ toDelete: number;
763
+ };
764
+ activations: {
765
+ create: number;
766
+ update: number;
767
+ delete: number;
768
+ };
769
+ folders: number;
770
+ };
771
+ hasChanges: boolean;
772
+ }
773
+ /**
774
+ * Calculate statistics for a push operation.
775
+ *
776
+ * @param segmentFiles - Segment files to push
777
+ * @param journeyFiles - Journey files to push
778
+ * @param foldersToCreate - Set of folders to create
779
+ * @param segmentsToDelete - Segments on server not in YAML
780
+ * @param journeysToDelete - Journeys on server not in YAML
781
+ * @param includeDelete - Whether to include deletions
782
+ * @param journeysOnly - Whether to skip segment stats
783
+ * @returns Push statistics
784
+ */
785
+ export declare function calculatePushStats<TJourneyToDelete extends JourneyListItemForDeletion>(segmentFiles: SegmentPushFile[], journeyFiles: JourneyPushFile[], foldersToCreate: Set<string>, segmentsToDelete: SegmentResponse[], journeysToDelete: TJourneyToDelete[], includeDelete: boolean, journeysOnly: boolean): PushStats<TJourneyToDelete>;
786
+ /**
787
+ * Build the execution context from dependencies.
788
+ * This fetches all the data needed for push execution and builds lookup maps.
789
+ *
790
+ * @param deps - SDK dependencies
791
+ * @param parentId - Resolved parent segment ID
792
+ * @param existingSegments - List of existing segments
793
+ * @param existingFolders - List of existing folders
794
+ * @param journeysOnly - Skip activation fetching when only processing journeys
795
+ * @returns The execution context with all resolved maps
796
+ */
797
+ export declare function buildPushExecutionContext(deps: PushWorkflowDeps, parentId: string, parentSegment: {
798
+ relationships?: {
799
+ parentSegmentFolder?: {
800
+ data?: {
801
+ id?: string;
802
+ };
803
+ };
804
+ parentFolder?: {
805
+ data?: {
806
+ id?: string;
807
+ };
808
+ };
809
+ };
810
+ }, existingSegments: SegmentResponse[], existingFolders: SegmentFolder[], journeysOnly: boolean): Promise<PushExecutionContext>;
811
+ /**
812
+ * Create a YAML context factory for converting server journey state to comparable YAML.
813
+ *
814
+ * This is used during push to build a YAML representation of the server state that can
815
+ * be compared with the local YAML. The key difference from pull is that we need to match
816
+ * server segments to local segments by expanded rule content (not just name) to enable
817
+ * proper diff calculation.
818
+ *
819
+ * @param deps - SDK dependencies for fetching data
820
+ * @param parentId - Parent segment ID
821
+ * @param existingSegments - List of existing segments (for local cache lookup)
822
+ * @param localExpandedRuleMappings - Mappings from buildLocalExpandedRuleMappings()
823
+ * @param idToEmailMap - User ID to email mapping
824
+ * @param connectionIdToNameMap - Connection ID to name mapping
825
+ * @param prefetchedActivationSteps - Pre-fetched activation steps by ID (optional, for optimization)
826
+ * @param prefetchedJourneyById - Pre-fetched journey details by ID (optional, for jump target resolution)
827
+ * @returns Factory object with createYamlContext method
828
+ */
829
+ export declare function createPushYamlContextForBundle(deps: PushWorkflowDeps, parentId: string, existingSegments: SegmentResponse[], localExpandedRuleMappings: LocalExpandedRuleMappings, idToEmailMap: Map<number, string>, connectionIdToNameMap: Map<string, string>, prefetchedActivationSteps?: Map<string, JourneyActivationStep>, prefetchedJourneyById?: Map<string, Journey>): {
830
+ createYamlContext: (journeyId: string) => JourneyResponseToDefContext;
831
+ prefetchJourneySegments: (journeyVersionIds: string[]) => Promise<void>;
832
+ };
833
+ /**
834
+ * Options for executePushSegments
835
+ */
836
+ export interface ExecutePushSegmentsOptions {
837
+ /** Parent segment ID */
838
+ parentId: string;
839
+ }
840
+ /**
841
+ * Result of pushing segments
842
+ */
843
+ export interface PushSegmentsResult {
844
+ /** Number of segments created */
845
+ created: number;
846
+ /** Number of segments updated */
847
+ updated: number;
848
+ /** Number of segments deleted */
849
+ deleted: number;
850
+ /** Map of segment name to ID (for newly created segments) */
851
+ createdSegmentIds: Map<string, string>;
852
+ /** Activation stats */
853
+ activations: {
854
+ created: number;
855
+ updated: number;
856
+ deleted: number;
857
+ };
858
+ }
859
+ /**
860
+ * Execute segment push operations.
861
+ *
862
+ * @param deps - SDK dependencies
863
+ * @param segmentFiles - Prepared segment files to push
864
+ * @param executionContext - Execution context with resolved maps
865
+ * @param options - Push options
866
+ * @param ui - UI callbacks for progress and logging
867
+ * @returns Push result with counts and created IDs
868
+ */
869
+ export declare function executePushSegments(deps: PushWorkflowDeps, segmentFiles: SegmentPushFile[], executionContext: PushExecutionContext, options: ExecutePushSegmentsOptions, ui: PushUICallbacks): Promise<PushSegmentsResult>;
870
+ /**
871
+ * Options for executePushFolders
872
+ */
873
+ export interface ExecutePushFoldersOptions {
874
+ /** Parent segment ID */
875
+ parentId: string;
876
+ }
877
+ /**
878
+ * Execute folder creation operations.
879
+ *
880
+ * @param deps - SDK dependencies
881
+ * @param foldersToCreate - Array of folder paths to create
882
+ * @param folderPathToId - Existing folder path to ID map (will be updated)
883
+ * @param options - Push options
884
+ * @param ui - UI callbacks
885
+ * @returns Updated folder path to ID map
886
+ */
887
+ export declare function executePushFolders(deps: PushWorkflowDeps, foldersToCreate: string[], folderPathToId: Map<string, string>, options: ExecutePushFoldersOptions, ui: PushUICallbacks): Promise<Map<string, string>>;
888
+ /**
889
+ * Execute segment deletion operations.
890
+ *
891
+ * @param deps - SDK dependencies
892
+ * @param segmentsToDelete - Segments to delete
893
+ * @param ui - UI callbacks
894
+ * @returns Number of segments deleted
895
+ */
896
+ export declare function executePushSegmentDeletions(deps: PushWorkflowDeps, segmentsToDelete: SegmentResponse[], ui: PushUICallbacks): Promise<number>;
897
+ /**
898
+ * Options for executePushJourneys
899
+ */
900
+ export interface ExecutePushJourneysOptions {
901
+ /** Parent segment ID */
902
+ parentId: string;
903
+ /** Root folder ID from parent segment */
904
+ rootFolderId?: string;
905
+ /** Whether to output verbose debug info */
906
+ verbose?: boolean;
907
+ }
908
+ /**
909
+ * Result of a single journey push operation
910
+ */
911
+ export interface JourneyPushResult {
912
+ /** Action taken: created, updated, or unchanged */
913
+ action: 'created' | 'updated' | 'unchanged';
914
+ /** Journey name */
915
+ name: string;
916
+ /** Journey ID (if created or updated) */
917
+ journeyId?: string;
918
+ }
919
+ /**
920
+ * Result of pushing all journeys
921
+ */
922
+ export interface PushJourneysResult {
923
+ /** Individual journey results */
924
+ results: JourneyPushResult[];
925
+ /** Number of journeys created */
926
+ created: number;
927
+ /** Number of journeys updated */
928
+ updated: number;
929
+ /** Map of embedded segment names to IDs (created during journey push) */
930
+ embeddedSegmentNameToId: Map<string, string>;
931
+ }
932
+ /**
933
+ * Context for journey push operations.
934
+ * Provides SDK dependencies and resolution maps.
935
+ */
936
+ export interface JourneyPushExecutionContext extends PushExecutionContext {
937
+ /** Existing segments on server */
938
+ existingSegments: SegmentResponse[];
939
+ /** Activation context for creating activations */
940
+ activationContext: ActivationConversionContext;
941
+ }
942
+ /**
943
+ * Execute journey push operations.
944
+ *
945
+ * @param deps - SDK dependencies
946
+ * @param journeyFiles - Prepared journey files to push
947
+ * @param executionContext - Execution context with resolved maps
948
+ * @param options - Push options
949
+ * @param ui - UI callbacks for progress and logging
950
+ * @returns Push result with counts and created IDs
951
+ */
952
+ export declare function executePushJourneys(deps: PushWorkflowDeps, journeyFiles: JourneyPushFile[], executionContext: JourneyPushExecutionContext, options: ExecutePushJourneysOptions, ui: PushUICallbacks): Promise<PushJourneysResult>;
953
+ //# sourceMappingURL=push-workflow.d.ts.map