@koda-sl/baker-cli 0.529.0 → 0.530.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.
- package/README.md +19 -0
- package/dist/{ads-6ESCXPHK.js → ads-7TEPA4KZ.js} +3 -3
- package/dist/{analytics-OUNKG2FW.js → analytics-XDWBEY57.js} +13 -13
- package/dist/{chunk-4VSD4NSZ.js → chunk-7HH4F2KX.js} +3 -3
- package/dist/{chunk-WSYQ6LWB.js → chunk-BTVK3CU7.js} +3 -1
- package/dist/chunk-BTVK3CU7.js.map +1 -0
- package/dist/{chunk-Z4ZYFIDQ.js → chunk-CKTVRR3D.js} +2 -2
- package/dist/{chunk-SXML3LQN.js → chunk-IHZUSAUX.js} +2 -2
- package/dist/{chunk-EIDJCUMM.js → chunk-OYNBUT5X.js} +2 -2
- package/dist/{chunk-B65WCT6M.js → chunk-PILLZPNC.js} +38 -2
- package/dist/chunk-PILLZPNC.js.map +1 -0
- package/dist/{chunk-ZL5YETKR.js → chunk-TE4ASZSC.js} +2 -2
- package/dist/{chunk-OXARC5HH.js → chunk-UXZZ5AEO.js} +2 -2
- package/dist/cli.js +7 -6
- package/dist/cli.js.map +1 -1
- package/dist/{create-UI2YG2KA.js → create-LPD3JAIW.js} +3 -3
- package/dist/{delete-4CUEJZ2Z.js → delete-FK3A36WP.js} +3 -3
- package/dist/{funnel-LKF6D7AA.js → funnel-XIZROHV7.js} +3 -3
- package/dist/{get-TB52FVNV.js → get-25KJJTO6.js} +3 -3
- package/dist/{google-FZVOB7HW.js → google-5JV7OMOH.js} +2 -2
- package/dist/{history-SJJX6EXI.js → history-DTQVPVFA.js} +3 -3
- package/dist/lead-routes-WVXWVG62.js +733 -0
- package/dist/lead-routes-WVXWVG62.js.map +1 -0
- package/dist/{list-PT4DVD4U.js → list-6PIJGN4M.js} +3 -3
- package/dist/{lookup-IUQWU346.js → lookup-K57ITJWF.js} +4 -4
- package/dist/{performance-6XFKDJGY.js → performance-MHJDRLEK.js} +2 -2
- package/dist/{plan-VHMWZU7F.js → plan-JYSHKPZQ.js} +3 -3
- package/dist/{questionnaire-32BQ4ZUX.js → questionnaire-Y37I64FO.js} +3 -3
- package/dist/{run-MRC4UVHU.js → run-CIXOJA3K.js} +3 -3
- package/dist/{scheduled-agents-EPPP4SCZ.js → scheduled-agents-BGMWNCAU.js} +11 -11
- package/dist/{schema-5Q6VO5MW.js → schema-NCJTDRRV.js} +2 -2
- package/dist/{sends-43FU3SJN.js → sends-MZKHZZGJ.js} +3 -3
- package/dist/{sources-PUZ4WV4Q.js → sources-ZM7LEIMM.js} +4 -4
- package/dist/{targets-3WIBMP4B.js → targets-KZBMOZUE.js} +3 -3
- package/dist/{triggers-6EXLTW35.js → triggers-35UVEDXF.js} +3 -3
- package/dist/{unstage-YSVQ6DLB.js → unstage-AVLORZLW.js} +3 -3
- package/dist/{unstage-KEMVI37X.js → unstage-E2257FEP.js} +3 -3
- package/dist/{update-USKR3UOC.js → update-GTXZRINC.js} +3 -3
- package/dist/{url-options-6MFRIDNA.js → url-options-DJZV3ADK.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-B65WCT6M.js.map +0 -1
- package/dist/chunk-WSYQ6LWB.js.map +0 -1
- /package/dist/{ads-6ESCXPHK.js.map → ads-7TEPA4KZ.js.map} +0 -0
- /package/dist/{analytics-OUNKG2FW.js.map → analytics-XDWBEY57.js.map} +0 -0
- /package/dist/{chunk-4VSD4NSZ.js.map → chunk-7HH4F2KX.js.map} +0 -0
- /package/dist/{chunk-Z4ZYFIDQ.js.map → chunk-CKTVRR3D.js.map} +0 -0
- /package/dist/{chunk-SXML3LQN.js.map → chunk-IHZUSAUX.js.map} +0 -0
- /package/dist/{chunk-EIDJCUMM.js.map → chunk-OYNBUT5X.js.map} +0 -0
- /package/dist/{chunk-ZL5YETKR.js.map → chunk-TE4ASZSC.js.map} +0 -0
- /package/dist/{chunk-OXARC5HH.js.map → chunk-UXZZ5AEO.js.map} +0 -0
- /package/dist/{create-UI2YG2KA.js.map → create-LPD3JAIW.js.map} +0 -0
- /package/dist/{delete-4CUEJZ2Z.js.map → delete-FK3A36WP.js.map} +0 -0
- /package/dist/{funnel-LKF6D7AA.js.map → funnel-XIZROHV7.js.map} +0 -0
- /package/dist/{get-TB52FVNV.js.map → get-25KJJTO6.js.map} +0 -0
- /package/dist/{google-FZVOB7HW.js.map → google-5JV7OMOH.js.map} +0 -0
- /package/dist/{history-SJJX6EXI.js.map → history-DTQVPVFA.js.map} +0 -0
- /package/dist/{list-PT4DVD4U.js.map → list-6PIJGN4M.js.map} +0 -0
- /package/dist/{lookup-IUQWU346.js.map → lookup-K57ITJWF.js.map} +0 -0
- /package/dist/{performance-6XFKDJGY.js.map → performance-MHJDRLEK.js.map} +0 -0
- /package/dist/{plan-VHMWZU7F.js.map → plan-JYSHKPZQ.js.map} +0 -0
- /package/dist/{questionnaire-32BQ4ZUX.js.map → questionnaire-Y37I64FO.js.map} +0 -0
- /package/dist/{run-MRC4UVHU.js.map → run-CIXOJA3K.js.map} +0 -0
- /package/dist/{scheduled-agents-EPPP4SCZ.js.map → scheduled-agents-BGMWNCAU.js.map} +0 -0
- /package/dist/{schema-5Q6VO5MW.js.map → schema-NCJTDRRV.js.map} +0 -0
- /package/dist/{sends-43FU3SJN.js.map → sends-MZKHZZGJ.js.map} +0 -0
- /package/dist/{sources-PUZ4WV4Q.js.map → sources-ZM7LEIMM.js.map} +0 -0
- /package/dist/{targets-3WIBMP4B.js.map → targets-KZBMOZUE.js.map} +0 -0
- /package/dist/{triggers-6EXLTW35.js.map → triggers-35UVEDXF.js.map} +0 -0
- /package/dist/{unstage-YSVQ6DLB.js.map → unstage-AVLORZLW.js.map} +0 -0
- /package/dist/{unstage-KEMVI37X.js.map → unstage-E2257FEP.js.map} +0 -0
- /package/dist/{update-USKR3UOC.js.map → update-GTXZRINC.js.map} +0 -0
- /package/dist/{url-options-6MFRIDNA.js.map → url-options-DJZV3ADK.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../api/src/lead-routes.ts","../src/commands/lead-routes/index.ts","../src/commands/lead-routes/args.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/**\n * `/api/lead-routes/*` — the `baker lead-routes` contract the CLI and the\n * backend share.\n *\n * A lead route sends every lead one ad platform's lead form collects (a Meta\n * Instant Form, a LinkedIn Lead Gen Form, a Google lead form) to one of the\n * places a website Form can send to: a Google Sheet, a HubSpot form, a webhook,\n * Zapier, an email, Pipedrive, GoHighLevel, ActiveCampaign. Delivery goes\n * through the same door a Form's side effect takes, so a destination is sealed\n * and mapped exactly the way a Form's is.\n *\n * Staged in a chat and applied at Publish: a route sends real people's details\n * to an outside system from the moment it is live.\n */\n\nexport const LEAD_ROUTE_PLATFORMS = [\"meta\", \"linkedin\", \"google\"] as const;\nexport const leadRoutePlatformSchema = z.enum(LEAD_ROUTE_PLATFORMS);\nexport type LeadRoutePlatform = z.infer<typeof leadRoutePlatformSchema>;\n\nexport const LEAD_ROUTE_PLATFORM_LABEL: Record<LeadRoutePlatform, string> = {\n meta: \"Meta\",\n linkedin: \"LinkedIn\",\n google: \"Google Ads\",\n};\n\n/** Where a route can send. A Form's delivery types, less Crmble, whose token only the dashboard's card may hold. */\n/** What each platform calls its own lead form, as a marketer knows it. */\nexport const LEAD_FORM_KIND_LABEL: Record<LeadRoutePlatform, string> = {\n meta: \"Meta Instant Form\",\n linkedin: \"LinkedIn Lead Gen Form\",\n google: \"Google Ads lead form\",\n};\n\n/**\n * The Form a lead form's leads are counted under.\n *\n * A lead an ad platform's own form collected is a Form submission like a\n * landing's: it is on the Forms list, in conversions as `submit:<slug>`, and in\n * the submissions list with its sealed answers. It is filed under this slug\n * because it has no Form file of its own — the form lives on the platform.\n */\nexport const LEAD_FORM_FLOW_PREFIX = \"lead-form-\";\n\n/** The one step a lead form is, as the submissions list counts steps. */\nexport const LEAD_FORM_STEP = \"lead_form\";\n\nexport function leadFormFlowSlug(platform: LeadRoutePlatform, formId: string): string {\n return `${LEAD_FORM_FLOW_PREFIX}${platform}-${formId}`.slice(0, 120);\n}\n\n/** The visit one lead is — one person, one form, one moment — which its deliveries are filed in too. */\nexport function leadVisitId(platform: LeadRoutePlatform, leadId: string): string {\n return `lead:${platform}:${leadId}`;\n}\n\n/** The platform a lead's own visit id names, or `null` for a browser's visit. */\nexport function leadPlatformOfVisitId(sessionId: string): LeadRoutePlatform | null {\n return LEAD_ROUTE_PLATFORMS.find((platform) => sessionId.startsWith(`lead:${platform}:`)) ?? null;\n}\n\n/** The platform and form a lead form's slug names, or `null` for a landing's own Form. */\nexport function leadFormOfFlowSlug(slug: string): { platform: LeadRoutePlatform; formId: string } | null {\n if (!slug.startsWith(LEAD_FORM_FLOW_PREFIX)) return null;\n const rest = slug.slice(LEAD_FORM_FLOW_PREFIX.length);\n const platform = LEAD_ROUTE_PLATFORMS.find((candidate) => rest.startsWith(`${candidate}-`));\n return platform ? { platform, formId: rest.slice(platform.length + 1) } : null;\n}\n\nexport const LEAD_ROUTE_DESTINATION_TYPES = [\n \"googleSpreadsheet\",\n \"hubspotForm\",\n \"httpWebhook\",\n \"zapier\",\n \"email\",\n \"pipedrive\",\n \"goHighlevelContact\",\n \"activeCampaignContact\",\n] as const;\nexport const leadRouteDestinationTypeSchema = z.enum(LEAD_ROUTE_DESTINATION_TYPES);\nexport type LeadRouteDestinationType = z.infer<typeof leadRouteDestinationTypeSchema>;\n\nexport const LEAD_ROUTE_DESTINATION_LABEL: Record<LeadRouteDestinationType, string> = {\n googleSpreadsheet: \"Google Sheets\",\n hubspotForm: \"HubSpot\",\n httpWebhook: \"Webhook\",\n zapier: \"Zapier\",\n email: \"Email\",\n pipedrive: \"Pipedrive\",\n goHighlevelContact: \"GoHighLevel\",\n activeCampaignContact: \"ActiveCampaign\",\n};\n\n/**\n * What a lead knows about the person, under one name whatever the platform\n * called the question. A platform's own predefined question (Meta's `EMAIL`,\n * LinkedIn's `EMAIL`, Google's `EMAIL`) lands here; a question the client\n * worded themselves stays an answer.\n */\nexport const LEAD_CONTACT_FIELDS = [\n \"email\",\n \"phone\",\n \"first_name\",\n \"last_name\",\n \"full_name\",\n \"company\",\n \"job_title\",\n \"city\",\n \"state\",\n \"zip\",\n \"country\",\n \"street_address\",\n \"work_email\",\n \"work_phone\",\n] as const;\nexport type LeadContactField = (typeof LEAD_CONTACT_FIELDS)[number];\n\n/** Where the lead came from: the form, the ad that opened it, when. */\nexport const LEAD_CONTEXT_FIELDS = [\n \"platform\",\n \"lead_id\",\n \"submitted_at\",\n \"form_id\",\n \"form_name\",\n \"campaign_id\",\n \"campaign_name\",\n \"ad_set_id\",\n \"ad_set_name\",\n \"ad_id\",\n \"ad_name\",\n \"is_test\",\n \"gclid\",\n] as const;\nexport type LeadContextField = (typeof LEAD_CONTEXT_FIELDS)[number];\n\n/** Every answer as `Question: answer` lines, and every consent as `Consent: yes|no`. */\nexport const LEAD_SUMMARY_FIELDS = [\"answers\", \"consents\"] as const;\n\nexport const LEAD_ANSWER_PREFIX = \"answer:\";\nexport const LEAD_TEXT_PREFIX = \"text:\";\n\n/**\n * Whether `from` names something a lead can fill: a contact or context field,\n * the answers or consents summary, one answer (`answer:<question key>`), or\n * fixed text (`text:<words>`). Pure.\n */\nexport function isLeadPath(from: string): boolean {\n if (from.startsWith(LEAD_ANSWER_PREFIX)) return from.length > LEAD_ANSWER_PREFIX.length;\n if (from.startsWith(LEAD_TEXT_PREFIX)) return true;\n return (\n (LEAD_CONTACT_FIELDS as readonly string[]).includes(from) ||\n (LEAD_CONTEXT_FIELDS as readonly string[]).includes(from) ||\n (LEAD_SUMMARY_FIELDS as readonly string[]).includes(from)\n );\n}\n\n/**\n * One value the destination receives. `key` is the destination's own name for\n * it, in the format a Form's mapping uses for the same destination: a column\n * letter for a sheet (`A`), a HubSpot field (`email`, `0-1.string.firstname`),\n * a dotted path for a webhook (`contact.email`), an ActiveCampaign field\n * (`standard.email`), a Pipedrive or GoHighLevel field\n * (`person.text.false.email`).\n */\nexport const leadRouteFieldSchema = z.object({\n key: z.string().trim().min(1),\n from: z\n .string()\n .trim()\n .min(1)\n .refine(isLeadPath, { message: \"not something a lead carries — see `baker lead-routes fields`\" }),\n});\nexport type LeadRouteField = z.infer<typeof leadRouteFieldSchema>;\n\n/** How the agent names the destination; the backend seals it the way `baker flows connect` does. */\nexport const leadRouteDestinationInputSchema = z.discriminatedUnion(\"type\", [\n z.object({\n type: z.literal(\"googleSpreadsheet\"),\n account: z.string().optional(),\n /** An existing spreadsheet id (from `baker flows options googleSpreadsheet`). */\n resourceId: z.string().optional(),\n tab: z.string().optional(),\n /** Create a spreadsheet for these leads instead, headed with the route's columns. */\n newSheet: z.object({ title: z.string().trim().min(1) }).optional(),\n }),\n /** A HubSpot form by id (`baker hubspot forms list`): the lead is submitted to it as a contact. */\n z.object({ type: z.literal(\"hubspotForm\"), formId: z.string().trim().min(1) }),\n /** A webhook with no credential in its headers. */\n z.object({ type: z.literal(\"httpWebhook\"), url: z.string().trim().url() }),\n /** A Zapier \"Catch Hook\" address. */\n z.object({ type: z.literal(\"zapier\"), url: z.string().trim().url() }),\n /** A notification email to the team: one or more addresses, comma-separated. */\n z.object({ type: z.literal(\"email\"), email: z.string().trim().min(1), subject: z.string().trim().min(1).optional() }),\n z.object({ type: z.literal(\"pipedrive\"), account: z.string().optional() }),\n z.object({ type: z.literal(\"goHighlevelContact\"), account: z.string().optional() }),\n z.object({ type: z.literal(\"activeCampaignContact\"), account: z.string().optional() }),\n]);\nexport type LeadRouteDestinationInput = z.infer<typeof leadRouteDestinationInputSchema>;\n\n/** The farthest back a new route may start: platforms keep leads for 90 days, and a re-send of months is a flood. */\nexport const LEAD_ROUTE_MAX_BACKFILL_DAYS = 30;\n\n/** How many routes one company may have, live and staged together. */\nexport const MAX_LEAD_ROUTES = 50;\n\n// --- stage (`baker lead-routes set` / `remove`) ---\n\nexport const leadRouteSetSchema = z.object({\n /** Change this live or staged route instead of adding one. */\n id: z.string().trim().min(1).optional(),\n name: z.string().trim().min(1).max(120).optional(),\n platform: leadRoutePlatformSchema,\n /** LinkedIn: the ad account. Google: the customer id. Meta: not needed — a form id is the Page's. */\n account: z.string().trim().min(1).optional(),\n formId: z.string().trim().min(1),\n destination: leadRouteDestinationInputSchema,\n /** Omitted: the destination's own defaults (see `baker lead-routes fields`). */\n fields: z.array(leadRouteFieldSchema).max(100).optional(),\n /** Also send the leads submitted since this day (YYYY-MM-DD), at most 30 days back. Default: only new leads. */\n since: z\n .string()\n .regex(/^\\d{4}-\\d{2}-\\d{2}$/, \"a date like 2026-10-01\")\n .optional(),\n});\nexport type LeadRouteSet = z.infer<typeof leadRouteSetSchema>;\n\n/** `set --id` without `--to`: change a route's mapping, start or name, keeping its form and destination. */\nexport const leadRouteAmendSchema = z.object({\n id: z.string().trim().min(1),\n name: z.string().trim().min(1).max(120).optional(),\n /** Replaces the whole mapping. */\n fields: z.array(leadRouteFieldSchema).max(100).optional(),\n /** Laid over the existing mapping by key: a new key is added, a known one replaced. */\n addFields: z.array(leadRouteFieldSchema).max(100).optional(),\n since: z\n .string()\n .regex(/^\\d{4}-\\d{2}-\\d{2}$/, \"a date like 2026-10-01\")\n .optional(),\n});\nexport type LeadRouteAmend = z.infer<typeof leadRouteAmendSchema>;\n\nexport const leadRouteStageRequestSchema = z.object({\n chatId: z.string().min(1),\n set: leadRouteSetSchema.optional(),\n amend: leadRouteAmendSchema.optional(),\n /** Stop these live routes at Publish. */\n remove: z.array(z.string().trim().min(1)).max(MAX_LEAD_ROUTES).optional(),\n});\nexport type LeadRouteStageRequest = z.infer<typeof leadRouteStageRequestSchema>;\n\n/** A destination as anyone may read it: its kind and what it points at, never its credentials. */\nexport const leadRouteDestinationViewSchema = z.object({\n type: leadRouteDestinationTypeSchema,\n label: z.string(),\n url: z.string().optional(),\n});\nexport type LeadRouteDestinationView = z.infer<typeof leadRouteDestinationViewSchema>;\n\nexport const LEAD_ROUTE_STATUSES = [\"active\", \"paused\"] as const;\n\nexport const leadRouteViewSchema = z.object({\n id: z.string(),\n name: z.string(),\n platform: leadRoutePlatformSchema,\n account: z.string().optional(),\n formId: z.string(),\n formName: z.string().optional(),\n /** The Form its leads are counted under, as submissions: `baker analytics flow|submissions --flow <formSlug>`. */\n formSlug: z.string(),\n destination: leadRouteDestinationViewSchema,\n fields: z.array(z.object({ key: z.string(), from: z.string() })),\n /** What the lead form asks, as read when the route was staged. */\n questions: z.array(z.object({ from: z.string(), label: z.string() })).optional(),\n status: z.enum(LEAD_ROUTE_STATUSES),\n /** Leads submitted from this moment on are delivered. 0 on a staged route: from the moment it is published. */\n startAt: z.number(),\n /** Only on a live route. */\n delivered: z.number().optional(),\n lastLeadAt: z.number().optional(),\n lastCheckedAt: z.number().optional(),\n /** Why the last check could not read or deliver, in words. Cleared by the next one that could. */\n lastError: z.string().optional(),\n});\nexport type LeadRouteView = z.infer<typeof leadRouteViewSchema>;\n\nexport const leadRouteStagedOpSchema = z.object({\n kind: z.enum([\"set\", \"remove\"]),\n routeId: z.string(),\n summary: z.string(),\n stagedAt: z.number(),\n route: leadRouteViewSchema.optional(),\n /** The live route as it was when this was staged: absent for a route this chat adds. */\n before: leadRouteViewSchema.optional(),\n result: z.object({ status: z.enum([\"applied\", \"skipped\"]), reason: z.string().optional() }).optional(),\n});\nexport type LeadRouteStagedOp = z.infer<typeof leadRouteStagedOpSchema>;\n\nexport const leadRouteStageResponseSchema = z.object({\n ok: z.literal(true),\n data: z.object({ staged: z.array(leadRouteStagedOpSchema) }),\n hints: z.array(z.string()).optional(),\n});\nexport type LeadRouteStageResponse = z.infer<typeof leadRouteStageResponseSchema>;\n\n// --- list (`baker lead-routes`) ---\n\nexport const leadRouteListResponseSchema = z.object({\n ok: z.literal(true),\n data: z.object({ routes: z.array(leadRouteViewSchema), staged: z.array(leadRouteStagedOpSchema) }),\n hints: z.array(z.string()).optional(),\n});\nexport type LeadRouteListResponse = z.infer<typeof leadRouteListResponseSchema>;\n\n// --- unstage (`baker lead-routes unstage`) ---\n\nexport const leadRouteUnstageRequestSchema = z.object({\n chatId: z.string().min(1),\n /** Omitted: every staged route change on this chat. */\n routeId: z.string().optional(),\n});\nexport const leadRouteUnstageResponseSchema = z.object({\n ok: z.literal(true),\n data: z.object({ removed: z.number() }),\n});\nexport type LeadRouteUnstageResponse = z.infer<typeof leadRouteUnstageResponseSchema>;\n\n// --- fields (`baker lead-routes fields`) ---\n\nexport const leadRouteFieldsRequestSchema = z.object({\n platform: leadRoutePlatformSchema,\n account: z.string().optional(),\n formId: z.string().trim().min(1),\n});\nexport type LeadRouteFieldsRequest = z.infer<typeof leadRouteFieldsRequestSchema>;\n\n/** One question on the form, and the name a route's `from` uses for it. */\nexport const leadFormQuestionSchema = z.object({\n /** What `--field <key>=<from>` takes: a contact field, or `answer:<key>`. */\n from: z.string(),\n label: z.string(),\n});\n\nexport const leadRouteFieldsResponseSchema = z.object({\n ok: z.literal(true),\n data: z.object({\n platform: leadRoutePlatformSchema,\n formId: z.string(),\n formName: z.string().optional(),\n questions: z.array(leadFormQuestionSchema),\n /** Always available, whatever the form asks. */\n context: z.array(z.string()),\n }),\n hints: z.array(z.string()).optional(),\n});\nexport type LeadRouteFieldsResponse = z.infer<typeof leadRouteFieldsResponseSchema>;\n\n// --- preview (`baker lead-routes preview`) ---\n\nexport const leadRoutePreviewRequestSchema = z\n .object({\n /** A route staged on `chatId` or live: preview it exactly as it will send. */\n id: z.string().trim().min(1).optional(),\n chatId: z.string().optional(),\n platform: leadRoutePlatformSchema.optional(),\n account: z.string().optional(),\n formId: z.string().trim().min(1).optional(),\n destinationType: leadRouteDestinationTypeSchema.optional(),\n fields: z.array(leadRouteFieldSchema).max(100).optional(),\n /** How many of the latest leads to show. */\n limit: z.number().int().min(1).max(5).optional(),\n /** Show contact details unmasked. */\n full: z.boolean().optional(),\n })\n .refine((request) => request.id !== undefined || (request.platform && request.formId && request.destinationType), {\n message: \"Name a route (--id) or a form and a destination (--platform, --form, --to)\",\n });\nexport type LeadRoutePreviewRequest = z.infer<typeof leadRoutePreviewRequestSchema>;\n\nexport const leadRoutePreviewResponseSchema = z.object({\n ok: z.literal(true),\n data: z.object({\n fields: z.array(z.object({ key: z.string(), from: z.string() })),\n /** What the destination would have received for each of the latest leads, newest first. */\n samples: z.array(z.object({ leadId: z.string(), submittedAt: z.string(), sent: z.record(z.string(), z.string()) })),\n masked: z.boolean(),\n }),\n hints: z.array(z.string()).optional(),\n});\nexport type LeadRoutePreviewResponse = z.infer<typeof leadRoutePreviewResponseSchema>;\n","import {\n LEAD_ROUTE_DESTINATION_TYPES,\n type LeadRouteDestinationType,\n type LeadRouteFieldsRequest,\n type LeadRouteFieldsResponse,\n type LeadRouteListResponse,\n type LeadRoutePlatform,\n type LeadRoutePreviewRequest,\n type LeadRoutePreviewResponse,\n type LeadRouteStageRequest,\n type LeadRouteStageResponse,\n type LeadRouteUnstageResponse,\n} from \"@baker/api/lead-routes\";\nimport { defineCommand } from \"citty\";\nimport { ApiError, apiGet, apiPost } from \"../../client.ts\";\nimport { optionalChatId, requireChatId } from \"../../env.ts\";\nimport { repeatedValues } from \"../../lib/repeatedFlags.ts\";\nimport { writeJson } from \"../../output.ts\";\nimport { registerSchema } from \"../../schemas.ts\";\nimport { LeadRouteArgsError, parseFields, parseStageArgs, previewDestinationRefusal } from \"./args.ts\";\n\n/**\n * `baker lead-routes` — send the leads an ad platform's lead form collects (a\n * Meta Instant Form, a LinkedIn Lead Gen Form, a Google lead form) to the\n * places a website Form can send to. Every change stages on this chat and\n * applies when it is published; from then on each new lead is delivered within\n * a few minutes.\n */\n\nfunction fail(err: unknown): never {\n if (err instanceof LeadRouteArgsError) {\n writeJson({ ok: false, error: { code: \"VALIDATION_ERROR\", message: err.message } });\n } else if (err instanceof ApiError) {\n writeJson({ ok: false, error: { code: err.code, message: err.message } });\n } else {\n writeJson({\n ok: false,\n error: { code: \"INTERNAL_ERROR\", message: err instanceof Error ? err.message : \"Unexpected error\" },\n });\n }\n process.exit(1);\n}\n\nconst PLATFORM_ARG = { type: \"string\", description: \"meta | linkedin | google\", required: true } as const;\nconst ACCOUNT_ARG = {\n type: \"string\",\n description: \"LinkedIn ad account id, or Google Ads customer id. Not needed for Meta\",\n required: false,\n} as const;\nconst FORM_ARG = {\n type: \"string\",\n description: \"The lead form's id (`ads meta lead-forms`, `ads linkedin lead-forms`, a Google LEAD_FORM asset id)\",\n required: true,\n} as const;\nconst FIELD_ARG = {\n type: \"string\",\n description:\n \"Repeatable. <destination key>=<lead field>: C=email, firstname=first_name, notes=answer:budget, source=text:Meta lead ad\",\n required: false,\n} as const;\n\nregisterSchema({\n command: \"lead-routes.list\",\n description:\n \"Start here: every lead form whose leads Baker sends somewhere — the form, where they go, the fields sent, whether it is active or paused, how many were delivered, the last lead and the last problem — plus `staged`: what this chat changed. Read-only.\",\n args: {},\n});\n\nregisterSchema({\n command: \"lead-routes.fields\",\n description:\n \"What a lead form asks, by the names `--field` uses: a contact field (email, phone, first_name, company…) for the platform's own questions, answer:<key> for the client's own, plus the context every lead carries (campaign_name, ad_name, submitted_at, form_name, answers, consents…). Read-only.\",\n args: { platform: PLATFORM_ARG, account: ACCOUNT_ARG, form: FORM_ARG },\n});\n\nconst OPTIONAL_PLATFORM_ARG = {\n ...PLATFORM_ARG,\n description: \"meta | linkedin | google (not with --id)\",\n required: false,\n} as const;\nconst OPTIONAL_FORM_ARG = { ...FORM_ARG, description: \"The lead form's id (not with --id)\", required: false } as const;\nconst OPTIONAL_TO_ARG = {\n type: \"string\",\n description: `${LEAD_ROUTE_DESTINATION_TYPES.join(\" | \")} (not with --id)`,\n required: false,\n} as const;\nconst PREVIEW_ID_ARG = {\n type: \"string\",\n description:\n \"A route staged on this chat or live (r1): preview it exactly as it will send — its destination and fields\",\n required: false,\n} as const;\n\n/** `set`'s destination flags, which a preview takes too: only an existing sheet or HubSpot form changes what it shows. */\nconst PREVIEW_DESTINATION_ARGS = {\n sheet: {\n type: \"string\",\n description: \"Existing spreadsheet id (needs --field; else stage, then --id)\",\n required: false,\n },\n \"new-sheet\": { type: \"string\", description: \"A sheet `set` would create: its default columns\", required: false },\n tab: { type: \"string\", description: \"Ignored by a preview\", required: false },\n \"destination-account\": { type: \"string\", description: \"Ignored by a preview\", required: false },\n \"hubspot-form\": {\n type: \"string\",\n description: \"HubSpot form id (needs --field; else stage, then --id)\",\n required: false,\n },\n url: { type: \"string\", description: \"Ignored by a preview\", required: false },\n email: { type: \"string\", description: \"Ignored by a preview\", required: false },\n subject: { type: \"string\", description: \"Ignored by a preview\", required: false },\n} as const;\n\nregisterSchema({\n command: \"lead-routes.preview\",\n description:\n \"What a destination would receive for the form's latest leads, contact details masked unless --full. Reads the platform only; nothing is sent. After `set`, `--id <route>` shows exactly what the staged route will send (an existing sheet's or a HubSpot form's own defaults included); before it, --platform/--form/--to [--field] try a mapping.\",\n args: {\n id: PREVIEW_ID_ARG,\n platform: OPTIONAL_PLATFORM_ARG,\n account: ACCOUNT_ARG,\n form: OPTIONAL_FORM_ARG,\n to: OPTIONAL_TO_ARG,\n field: FIELD_ARG,\n ...PREVIEW_DESTINATION_ARGS,\n limit: { type: \"string\", description: \"How many of the latest leads, 1-5 (default 1)\", required: false },\n full: { type: \"boolean\", description: \"Show contact details unmasked\", required: false },\n },\n});\n\nconst SET_PLATFORM_ARG = { ...PLATFORM_ARG, description: \"meta | linkedin | google\", required: false } as const;\nconst SET_FORM_ARG = { ...FORM_ARG, required: false } as const;\nconst SET_TO_ARG = {\n type: \"string\",\n description: `${LEAD_ROUTE_DESTINATION_TYPES.join(\" | \")}. Leave out with --id to keep the route's destination`,\n required: false,\n} as const;\nconst ADD_FIELD_ARG = {\n type: \"string\",\n description: \"Repeatable, with --id and no --to: add or replace one column of the route's mapping, M=answer:budget\",\n required: false,\n} as const;\n\nregisterSchema({\n command: \"lead-routes.set\",\n description:\n \"Stage a lead route: every new lead of one lead form goes to one destination, from when this chat is published. --to googleSpreadsheet (--sheet <id> | --new-sheet <title>, [--tab]), hubspotForm (--hubspot-form <id>), httpWebhook (--url, no credential), zapier (--url, a Catch Hook), email (--email, [--subject]), pipedrive | goHighlevelContact | activeCampaignContact (the connected account). Without --field the destination's defaults apply: a new sheet gets standard columns, an existing sheet its recognised headers, HubSpot the contact fields its form has, a webhook/Zapier/email the whole lead. --since YYYY-MM-DD also sends the leads since that day (at most 30 days back). --id changes an existing route: with --to and its destination flags, the whole route; without --to, only its mapping (--add-field M=answer:budget adds or replaces one column, --field replaces them all), --since or --name — its form and destination are kept.\",\n args: {\n platform: SET_PLATFORM_ARG,\n account: ACCOUNT_ARG,\n form: SET_FORM_ARG,\n to: SET_TO_ARG,\n sheet: {\n type: \"string\",\n description: \"Existing spreadsheet id (`baker flows options googleSpreadsheet`)\",\n required: false,\n },\n \"new-sheet\": { type: \"string\", description: \"Create a spreadsheet with this title for the leads\", required: false },\n tab: { type: \"string\", description: \"The sheet's tab to append to (default: the first)\", required: false },\n \"destination-account\": {\n type: \"string\",\n description:\n \"Which connected Google Drive / Pipedrive / GoHighLevel / ActiveCampaign account, when there are several\",\n required: false,\n },\n \"hubspot-form\": { type: \"string\", description: \"HubSpot form id (`baker hubspot forms list`)\", required: false },\n url: { type: \"string\", description: \"Webhook or Zapier hook address\", required: false },\n email: { type: \"string\", description: \"Who is emailed each lead, comma-separated\", required: false },\n subject: { type: \"string\", description: \"Email subject (default: New lead: <form>)\", required: false },\n field: FIELD_ARG,\n \"add-field\": ADD_FIELD_ARG,\n since: {\n type: \"string\",\n description: \"Also send leads since this day, YYYY-MM-DD, at most 30 days back\",\n required: false,\n },\n id: { type: \"string\", description: \"Change this route instead of adding one\", required: false },\n name: { type: \"string\", description: \"A name for the route\", required: false },\n },\n});\n\nregisterSchema({\n command: \"lead-routes.remove\",\n description:\n \"Stage stopping live lead routes, by id; they stop when this chat is published. A route staged in this same chat is simply taken back.\",\n args: { id: { type: \"string\", description: \"Route ids, comma-separated (r1,r2)\", required: true } },\n});\n\nregisterSchema({\n command: \"lead-routes.unstage\",\n description: \"Take back a lead route change this chat staged, before publish. --all takes back every one.\",\n args: {\n id: { type: \"string\", description: \"A routeId from `baker lead-routes list` → staged\", required: false },\n all: { type: \"boolean\", description: \"Take back every staged lead route change\", required: false },\n },\n});\n\nfunction asPlatform(value: unknown): LeadRoutePlatform {\n return value as LeadRoutePlatform;\n}\n\nconst listCommand = defineCommand({\n meta: {\n name: \"list\",\n description: \"Every lead route, live and staged in this chat.\\n\\nExample: baker lead-routes list\",\n },\n run: async () => {\n try {\n const chatId = optionalChatId();\n writeJson(await apiGet<LeadRouteListResponse>(\"/api/lead-routes\", chatId ? { chatId } : undefined));\n } catch (err) {\n fail(err);\n }\n },\n});\n\nconst fieldsCommand = defineCommand({\n meta: {\n name: \"fields\",\n description:\n \"What a lead form asks, by the names --field uses.\\n\\nExamples:\\n baker lead-routes fields --platform meta --form 1234567890\\n baker lead-routes fields --platform linkedin --account 513852526 --form 987654\",\n },\n args: { platform: PLATFORM_ARG, account: ACCOUNT_ARG, form: FORM_ARG },\n run: async ({ args }) => {\n try {\n const body: LeadRouteFieldsRequest = {\n platform: asPlatform(args.platform),\n formId: String(args.form),\n ...(args.account ? { account: String(args.account) } : {}),\n };\n writeJson(await apiPost<LeadRouteFieldsResponse>(\"/api/lead-routes/fields\", body));\n } catch (err) {\n fail(err);\n }\n },\n});\n\nconst previewCommand = defineCommand({\n meta: {\n name: \"preview\",\n description:\n \"What a destination would receive for the latest leads. Sends nothing.\\n\\nExamples:\\n baker lead-routes preview --id r1\\n baker lead-routes preview --platform meta --form 1234567890 --to httpWebhook\\n baker lead-routes preview --platform meta --form 1234567890 --to hubspotForm --field email=email --field firstname=first_name\",\n },\n args: {\n id: PREVIEW_ID_ARG,\n platform: OPTIONAL_PLATFORM_ARG,\n account: ACCOUNT_ARG,\n form: OPTIONAL_FORM_ARG,\n to: OPTIONAL_TO_ARG,\n field: FIELD_ARG,\n ...PREVIEW_DESTINATION_ARGS,\n limit: { type: \"string\", description: \"1-5\", required: false },\n full: { type: \"boolean\", description: \"Unmasked\", required: false },\n },\n run: async ({ args, rawArgs }) => {\n try {\n const fields = parseFields(repeatedValues(rawArgs, \"field\", args.field));\n const refusal = previewDestinationRefusal(\n { sheet: args.sheet as string | undefined, \"hubspot-form\": args[\"hubspot-form\"] as string | undefined },\n fields.length > 0,\n );\n if (refusal) throw new LeadRouteArgsError(refusal);\n if (!args.id && !(args.platform && args.form && args.to)) {\n throw new LeadRouteArgsError(\n \"Name a route with --id r1, or a form and a destination: --platform, --form, --to\",\n );\n }\n const chatId = optionalChatId();\n const body: LeadRoutePreviewRequest = {\n ...(args.id ? { id: String(args.id) } : {}),\n ...(chatId ? { chatId } : {}),\n ...(args.platform ? { platform: asPlatform(args.platform) } : {}),\n ...(args.form ? { formId: String(args.form) } : {}),\n ...(args.to ? { destinationType: args.to as LeadRouteDestinationType } : {}),\n ...(args.account ? { account: String(args.account) } : {}),\n ...(fields.length > 0 ? { fields } : {}),\n ...(args.limit ? { limit: Number(args.limit) } : {}),\n ...(args.full === true ? { full: true } : {}),\n };\n writeJson(await apiPost<LeadRoutePreviewResponse>(\"/api/lead-routes/preview\", body));\n } catch (err) {\n fail(err);\n }\n },\n});\n\nconst setCommand = defineCommand({\n meta: {\n name: \"set\",\n description:\n 'Stage a lead route; it starts delivering when this chat is published.\\n\\nExamples:\\n baker lead-routes set --platform meta --form 1234567890 --to googleSpreadsheet --new-sheet \"Meta leads\"\\n baker lead-routes set --platform linkedin --account 513852526 --form 987654 --to hubspotForm --hubspot-form 3f2a…\\n baker lead-routes set --platform meta --form 1234567890 --to httpWebhook --url https://hooks.example.com/leads\\n baker lead-routes set --platform google --account 3865083115 --form 555 --to email --email sales@acme.com\\n baker lead-routes set --id r1 --add-field M=answer:budget --add-field \"N=text:Facebook lead ad\"',\n },\n args: {\n platform: SET_PLATFORM_ARG,\n account: ACCOUNT_ARG,\n form: SET_FORM_ARG,\n to: SET_TO_ARG,\n sheet: { type: \"string\", description: \"Existing spreadsheet id\", required: false },\n \"new-sheet\": { type: \"string\", description: \"Create a spreadsheet with this title\", required: false },\n tab: { type: \"string\", description: \"Tab to append to\", required: false },\n \"destination-account\": { type: \"string\", description: \"Which connected account\", required: false },\n \"hubspot-form\": { type: \"string\", description: \"HubSpot form id\", required: false },\n url: { type: \"string\", description: \"Webhook or Zapier hook address\", required: false },\n email: { type: \"string\", description: \"Recipients, comma-separated\", required: false },\n subject: { type: \"string\", description: \"Email subject\", required: false },\n field: FIELD_ARG,\n \"add-field\": ADD_FIELD_ARG,\n since: { type: \"string\", description: \"YYYY-MM-DD, at most 30 days back\", required: false },\n id: { type: \"string\", description: \"Change this route\", required: false },\n name: { type: \"string\", description: \"Route name\", required: false },\n },\n run: async ({ args, rawArgs }) => {\n try {\n const text = (key: string) => {\n const value = (args as Record<string, unknown>)[key];\n return typeof value === \"string\" && value.length > 0 ? value : undefined;\n };\n const staged = parseStageArgs(\n {\n id: text(\"id\"),\n name: text(\"name\"),\n platform: text(\"platform\"),\n account: text(\"account\"),\n form: text(\"form\"),\n to: text(\"to\"),\n sheet: text(\"sheet\"),\n \"new-sheet\": text(\"new-sheet\"),\n tab: text(\"tab\"),\n \"destination-account\": text(\"destination-account\"),\n \"hubspot-form\": text(\"hubspot-form\"),\n url: text(\"url\"),\n email: text(\"email\"),\n subject: text(\"subject\"),\n since: text(\"since\"),\n },\n {\n fields: repeatedValues(rawArgs, \"field\", args.field),\n addFields: repeatedValues(rawArgs, \"add-field\", args[\"add-field\"]),\n },\n );\n const body: LeadRouteStageRequest = { chatId: requireChatId(), ...staged };\n writeJson(await apiPost<LeadRouteStageResponse>(\"/api/lead-routes/stage\", body));\n } catch (err) {\n fail(err);\n }\n },\n});\n\nconst removeCommand = defineCommand({\n meta: {\n name: \"remove\",\n description: \"Stage stopping live lead routes.\\n\\nExample: baker lead-routes remove r1\",\n },\n args: { id: { type: \"positional\", description: \"Route ids, comma-separated\", required: true } },\n run: async ({ args }) => {\n try {\n const remove = String(args.id)\n .split(\",\")\n .map((id) => id.trim())\n .filter(Boolean);\n const body: LeadRouteStageRequest = { chatId: requireChatId(), remove };\n writeJson(await apiPost<LeadRouteStageResponse>(\"/api/lead-routes/stage\", body));\n } catch (err) {\n fail(err);\n }\n },\n});\n\nconst unstageCommand = defineCommand({\n meta: {\n name: \"unstage\",\n description:\n \"Take back a staged lead route change.\\n\\nExamples:\\n baker lead-routes unstage r2\\n baker lead-routes unstage --all\",\n },\n args: {\n id: { type: \"positional\", description: \"A staged routeId\", required: false },\n all: { type: \"boolean\", description: \"Every staged change\", required: false },\n },\n run: async ({ args }) => {\n try {\n const id = typeof args.id === \"string\" && args.id.length > 0 ? args.id : undefined;\n if ((id === undefined) === (args.all !== true)) {\n throw new LeadRouteArgsError(\"Pass one route id (see `baker lead-routes list` → staged) or --all.\");\n }\n const body = { chatId: requireChatId(), ...(id ? { routeId: id } : {}) };\n writeJson(await apiPost<LeadRouteUnstageResponse>(\"/api/lead-routes/unstage\", body));\n } catch (err) {\n fail(err);\n }\n },\n});\n\nexport const leadRoutesCommand = defineCommand({\n meta: {\n name: \"lead-routes\",\n description: `Send the leads an ad platform's lead form collects — a Meta Instant Form, a LinkedIn Lead Gen Form, a Google lead form — to a Google Sheet, HubSpot, a webhook, Zapier, an email, Pipedrive, GoHighLevel or ActiveCampaign. Staged on this chat; delivering from when it is published. Subcommands: list, fields, preview, set, remove, unstage.\n\nExamples:\n baker lead-routes list\n baker lead-routes fields --platform meta --form 1234567890\n baker lead-routes set --platform meta --form 1234567890 --to googleSpreadsheet --new-sheet \"Meta leads\"\n baker lead-routes remove r1\nFull guide: __tooling__/docs/tools/baker/lead-routes.md`,\n },\n subCommands: {\n list: listCommand,\n fields: fieldsCommand,\n preview: previewCommand,\n set: setCommand,\n remove: removeCommand,\n unstage: unstageCommand,\n },\n});\n","import {\n LEAD_ROUTE_DESTINATION_TYPES,\n LEAD_ROUTE_PLATFORMS,\n type LeadRouteAmend,\n type LeadRouteDestinationInput,\n type LeadRouteField,\n type LeadRouteSet,\n leadRouteAmendSchema,\n leadRouteSetSchema,\n} from \"@baker/api/lead-routes\";\n\n/** A `baker lead-routes` call the CLI can refuse before any request. */\nexport class LeadRouteArgsError extends Error {}\n\nexport type SetFlags = {\n id?: string;\n name?: string;\n platform?: string;\n account?: string;\n form?: string;\n to?: string;\n sheet?: string;\n \"new-sheet\"?: string;\n tab?: string;\n \"destination-account\"?: string;\n \"hubspot-form\"?: string;\n url?: string;\n email?: string;\n subject?: string;\n since?: string;\n};\n\n/** `--field <key>=<from>`, each one: the destination's key, then what the lead fills it with. */\nexport function parseFields(values: readonly string[]): LeadRouteField[] {\n return values.map((value) => {\n const at = value.indexOf(\"=\");\n if (at <= 0 || at === value.length - 1) {\n throw new LeadRouteArgsError(\n `--field \"${value}\" needs the form <destination key>=<lead field>, e.g. --field C=email or --field firstname=first_name.`,\n );\n }\n return { key: value.slice(0, at).trim(), from: value.slice(at + 1).trim() };\n });\n}\n\n/** Which destination flags each `--to` takes; any other one is a mistake worth saying out loud. */\nconst DESTINATION_FLAGS = {\n googleSpreadsheet: [\"sheet\", \"new-sheet\", \"tab\", \"destination-account\"],\n hubspotForm: [\"hubspot-form\"],\n httpWebhook: [\"url\"],\n zapier: [\"url\"],\n email: [\"email\", \"subject\"],\n pipedrive: [\"destination-account\"],\n goHighlevelContact: [\"destination-account\"],\n activeCampaignContact: [\"destination-account\"],\n} as const satisfies Record<(typeof LEAD_ROUTE_DESTINATION_TYPES)[number], readonly (keyof SetFlags)[]>;\n\nconst ALL_DESTINATION_FLAGS = new Set<string>(Object.values(DESTINATION_FLAGS).flat());\n\ntype DestinationType = keyof typeof DESTINATION_FLAGS;\n\nfunction need(value: string | undefined, message: string): string {\n if (!value) throw new LeadRouteArgsError(message);\n return value;\n}\n\nfunction sheetDestination(flags: SetFlags): LeadRouteDestinationInput {\n if (!flags.sheet === !flags[\"new-sheet\"]) {\n throw new LeadRouteArgsError(\n \"Name the spreadsheet with --sheet <id> (`baker flows options googleSpreadsheet`) or make one with --new-sheet <title>.\",\n );\n }\n return {\n type: \"googleSpreadsheet\",\n ...(flags[\"destination-account\"] ? { account: flags[\"destination-account\"] } : {}),\n ...(flags.sheet ? { resourceId: flags.sheet } : {}),\n ...(flags[\"new-sheet\"] ? { newSheet: { title: flags[\"new-sheet\"] } } : {}),\n ...(flags.tab ? { tab: flags.tab } : {}),\n };\n}\n\nfunction accountDestination(type: \"pipedrive\" | \"goHighlevelContact\" | \"activeCampaignContact\") {\n return (flags: SetFlags): LeadRouteDestinationInput => ({\n type,\n ...(flags[\"destination-account\"] ? { account: flags[\"destination-account\"] } : {}),\n });\n}\n\n/** Each `--to`'s destination, from the flags it takes. */\nconst DESTINATIONS: Record<DestinationType, (flags: SetFlags) => LeadRouteDestinationInput> = {\n googleSpreadsheet: sheetDestination,\n hubspotForm: (flags) => ({\n type: \"hubspotForm\",\n formId: need(flags[\"hubspot-form\"], \"--to hubspotForm needs --hubspot-form <id> (`baker hubspot forms list`).\"),\n }),\n httpWebhook: (flags) => ({ type: \"httpWebhook\", url: need(flags.url, \"--to httpWebhook needs --url <address>.\") }),\n zapier: (flags) => ({ type: \"zapier\", url: need(flags.url, \"--to zapier needs --url <address>.\") }),\n email: (flags) => ({\n type: \"email\",\n email: need(flags.email, \"--to email needs --email <address>[,<address>…].\"),\n ...(flags.subject ? { subject: flags.subject } : {}),\n }),\n pipedrive: accountDestination(\"pipedrive\"),\n goHighlevelContact: accountDestination(\"goHighlevelContact\"),\n activeCampaignContact: accountDestination(\"activeCampaignContact\"),\n};\n\nfunction destinationOf(flags: SetFlags): LeadRouteDestinationInput {\n const to = flags.to;\n if (!to || !(LEAD_ROUTE_DESTINATION_TYPES as readonly string[]).includes(to)) {\n throw new LeadRouteArgsError(`--to must be one of ${LEAD_ROUTE_DESTINATION_TYPES.join(\", \")}.`);\n }\n const type = to as DestinationType;\n const allowed = new Set<string>(DESTINATION_FLAGS[type]);\n const stray = [...ALL_DESTINATION_FLAGS].filter((flag) => !allowed.has(flag) && flags[flag as keyof SetFlags]);\n if (stray.length > 0) {\n throw new LeadRouteArgsError(`--to ${type} does not take ${stray.map((flag) => `--${flag}`).join(\", \")}.`);\n }\n return DESTINATIONS[type](flags);\n}\n\n/** The route one `baker lead-routes set` describes, checked against the shared contract. */\nexport function parseSetArgs(flags: SetFlags, fieldValues: readonly string[]): LeadRouteSet {\n if (!flags.platform || !(LEAD_ROUTE_PLATFORMS as readonly string[]).includes(flags.platform)) {\n throw new LeadRouteArgsError(`--platform must be one of ${LEAD_ROUTE_PLATFORMS.join(\", \")}.`);\n }\n if (!flags.form) throw new LeadRouteArgsError(\"--form <lead form id> is required.\");\n const fields = parseFields(fieldValues);\n const parsed = leadRouteSetSchema.safeParse({\n ...(flags.id ? { id: flags.id } : {}),\n ...(flags.name ? { name: flags.name } : {}),\n platform: flags.platform,\n ...(flags.account ? { account: flags.account } : {}),\n formId: flags.form,\n destination: destinationOf(flags),\n ...(fields.length > 0 ? { fields } : {}),\n ...(flags.since ? { since: flags.since } : {}),\n });\n if (!parsed.success) {\n const issue = parsed.error.issues[0];\n throw new LeadRouteArgsError(`${issue?.path.join(\".\") || \"route\"}: ${issue?.message ?? \"invalid\"}`);\n }\n return parsed.data;\n}\n\n/** Flags that name a form or a destination: a change keeping both takes none of them. */\nconst ROUTE_FLAGS = [\"platform\", \"account\", \"form\", ...ALL_DESTINATION_FLAGS] as const;\n\nfunction amendArgs(flags: SetFlags, fieldValues: readonly string[], addFieldValues: readonly string[]): LeadRouteAmend {\n const named = ROUTE_FLAGS.filter((flag) => flags[flag as keyof SetFlags]);\n if (named.length > 0) {\n throw new LeadRouteArgsError(\n `set --id without --to keeps the route's form and destination, so it takes no ${named.map((flag) => `--${flag}`).join(\", \")}. Change the mapping with --add-field or --field; to move the route, pass --to with its destination flags too.`,\n );\n }\n const fields = parseFields(fieldValues);\n const addFields = parseFields(addFieldValues);\n const parsed = leadRouteAmendSchema.safeParse({\n id: flags.id,\n ...(flags.name ? { name: flags.name } : {}),\n ...(fields.length > 0 ? { fields } : {}),\n ...(addFields.length > 0 ? { addFields } : {}),\n ...(flags.since ? { since: flags.since } : {}),\n });\n if (!parsed.success) {\n const issue = parsed.error.issues[0];\n throw new LeadRouteArgsError(`${issue?.path.join(\".\") || \"route\"}: ${issue?.message ?? \"invalid\"}`);\n }\n return parsed.data;\n}\n\n/**\n * What one `baker lead-routes set` stages: a whole route when `--to` names\n * where it sends, else — with `--id` — a change to that route's mapping,\n * start or name that keeps its form and destination.\n */\nexport function parseStageArgs(\n flags: SetFlags,\n values: { fields: readonly string[]; addFields: readonly string[] },\n): { set: LeadRouteSet } | { amend: LeadRouteAmend } {\n if (flags.id && !flags.to) return { amend: amendArgs(flags, values.fields, values.addFields) };\n if (values.addFields.length > 0) {\n throw new LeadRouteArgsError(\n \"--add-field changes an existing route: use it with --id <route> and without --to. A new route names its fields with --field.\",\n );\n }\n return { set: parseSetArgs(flags, values.fields) };\n}\n\n/**\n * Why a `preview` naming this destination cannot show what it would send, if\n * it cannot: an existing sheet's and a HubSpot form's default mapping is read\n * from the destination when the route is staged. Every other destination flag\n * leaves the mapping as it is, so a preview takes it and goes on.\n */\nexport function previewDestinationRefusal(flags: SetFlags, hasFields: boolean): string | undefined {\n if (hasFields || !(flags.sheet || flags[\"hubspot-form\"])) return undefined;\n return \"An existing sheet's or HubSpot form's columns are read from it when the route is staged. Stage it with `baker lead-routes set`, then `baker lead-routes preview --id <route>` shows exactly what it sends — or pass --field to preview a mapping of your own.\";\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAS,SAAS;AAiBX,IAAM,uBAAuB,CAAC,QAAQ,YAAY,QAAQ;AAC1D,IAAM,0BAA0B,EAAE,KAAK,oBAAoB;AAoD3D,IAAM,+BAA+B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,IAAM,iCAAiC,EAAE,KAAK,4BAA4B;AAoB1E,IAAM,sBAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EAC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aACE;AAAA,EACJ;AAAA,EACA,MAAM;AAAA,IACJ,IAAI,EAAE,MAAM,cAAc,aAAa,oBAAoB,UAAU,MAAM;AAAA,IAC3E,KAAK,EAAE,MAAM,WAAW,aAAa,uBAAuB,UAAU,MAAM;AAAA,EAC9E;AAAA,EACA,KAAK,OAAO,EAAE,KAAK,MAAM;AACvB,QAAI;AACF,YAAM,KAAK,OAAO,KAAK,OAAO,YAAY,KAAK,GAAG,SAAS,IAAI,KAAK,KAAK;AACzE,UAAK,OAAO,YAAgB,KAAK,QAAQ,OAAO;AAC9C,cAAM,IAAI,mBAAmB,0EAAqE;AAAA,MACpG;AACA,YAAM,OAAO,EAAE,QAAQ,cAAc,GAAG,GAAI,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC,EAAG;AACvE,gBAAU,MAAM,QAAkC,4BAA4B,IAAI,CAAC;AAAA,IACrF,SAAS,KAAK;AACZ,WAAK,GAAG;AAAA,IACV;AAAA,EACF;AACF,CAAC;AAEM,IAAM,oBAAoB,cAAc;AAAA,EAC7C,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQf;AAAA,EACA,aAAa;AAAA,IACX,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AACF,CAAC;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
failApi
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-UXZZ5AEO.js";
|
|
4
|
+
import "./chunk-BTVK3CU7.js";
|
|
5
5
|
import {
|
|
6
6
|
CHAT_READ_ARG
|
|
7
7
|
} from "./chunk-PFBQERWX.js";
|
|
@@ -64,4 +64,4 @@ var listCommand = defineCommand({
|
|
|
64
64
|
export {
|
|
65
65
|
listCommand
|
|
66
66
|
};
|
|
67
|
-
//# sourceMappingURL=list-
|
|
67
|
+
//# sourceMappingURL=list-6PIJGN4M.js.map
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
lookupReport,
|
|
4
4
|
peopleArgs,
|
|
5
5
|
peopleLimitError
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-7HH4F2KX.js";
|
|
7
|
+
import "./chunk-TE4ASZSC.js";
|
|
8
|
+
import "./chunk-PILLZPNC.js";
|
|
9
9
|
import "./chunk-NKQWDEB7.js";
|
|
10
10
|
import "./chunk-HPDGVK6R.js";
|
|
11
11
|
import "./chunk-G4FG5EQO.js";
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
peopleArgs,
|
|
21
21
|
peopleLimitError
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=lookup-
|
|
23
|
+
//# sourceMappingURL=lookup-K57ITJWF.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ANALYTICS_BUSY_FIX,
|
|
3
3
|
isAnalyticsBusy,
|
|
4
4
|
retryOnceIfBusy
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PILLZPNC.js";
|
|
6
6
|
import "./chunk-NKQWDEB7.js";
|
|
7
7
|
import {
|
|
8
8
|
failApi
|
|
@@ -5562,4 +5562,4 @@ Full guide: __tooling__/docs/tools/baker/ads-performance.md`
|
|
|
5562
5562
|
export {
|
|
5563
5563
|
performanceCommand
|
|
5564
5564
|
};
|
|
5565
|
-
//# sourceMappingURL=performance-
|
|
5565
|
+
//# sourceMappingURL=performance-MHJDRLEK.js.map
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from "./chunk-TTKDFRON.js";
|
|
7
7
|
import {
|
|
8
8
|
trackingPlanErrorEnvelope
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TE4ASZSC.js";
|
|
10
10
|
import {
|
|
11
11
|
ANALYTICS_EVENT_DOORS,
|
|
12
12
|
parseEventKey
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PILLZPNC.js";
|
|
14
14
|
import "./chunk-NKQWDEB7.js";
|
|
15
15
|
import "./chunk-D5FY4FAK.js";
|
|
16
16
|
import {
|
|
@@ -205,4 +205,4 @@ var planCommand = defineCommand({
|
|
|
205
205
|
export {
|
|
206
206
|
planCommand
|
|
207
207
|
};
|
|
208
|
-
//# sourceMappingURL=plan-
|
|
208
|
+
//# sourceMappingURL=plan-JYSHKPZQ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
questionnaireErrorEnvelope
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-TE4ASZSC.js";
|
|
4
|
+
import "./chunk-PILLZPNC.js";
|
|
5
5
|
import "./chunk-NKQWDEB7.js";
|
|
6
6
|
import {
|
|
7
7
|
writeJsonEnvelope
|
|
@@ -91,4 +91,4 @@ var questionnaireCommand = defineCommand({
|
|
|
91
91
|
export {
|
|
92
92
|
questionnaireCommand
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=questionnaire-
|
|
94
|
+
//# sourceMappingURL=questionnaire-Y37I64FO.js.map
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
failApi,
|
|
3
3
|
failValidation,
|
|
4
4
|
isTempScheduledAgentId
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-UXZZ5AEO.js";
|
|
6
|
+
import "./chunk-BTVK3CU7.js";
|
|
7
7
|
import "./chunk-HVJJEQDQ.js";
|
|
8
8
|
import "./chunk-QV6AST5T.js";
|
|
9
9
|
import "./chunk-WCU362Z6.js";
|
|
@@ -66,4 +66,4 @@ var runCommand = defineCommand({
|
|
|
66
66
|
export {
|
|
67
67
|
runCommand
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=run-
|
|
69
|
+
//# sourceMappingURL=run-CIXOJA3K.js.map
|
|
@@ -37,19 +37,19 @@ Examples:
|
|
|
37
37
|
Full guide: __tooling__/docs/tools/baker/scheduled-agents.md`
|
|
38
38
|
},
|
|
39
39
|
subCommands: {
|
|
40
|
-
list: () => import("./list-
|
|
41
|
-
get: () => import("./get-
|
|
42
|
-
history: () => import("./history-
|
|
43
|
-
triggers: () => import("./triggers-
|
|
44
|
-
targets: () => import("./targets-
|
|
45
|
-
create: () => import("./create-
|
|
46
|
-
update: () => import("./update-
|
|
47
|
-
delete: () => import("./delete-
|
|
48
|
-
unstage: () => import("./unstage-
|
|
49
|
-
run: () => import("./run-
|
|
40
|
+
list: () => import("./list-6PIJGN4M.js").then((m) => m.listCommand),
|
|
41
|
+
get: () => import("./get-25KJJTO6.js").then((m) => m.getCommand),
|
|
42
|
+
history: () => import("./history-DTQVPVFA.js").then((m) => m.historyCommand),
|
|
43
|
+
triggers: () => import("./triggers-35UVEDXF.js").then((m) => m.triggersCommand),
|
|
44
|
+
targets: () => import("./targets-KZBMOZUE.js").then((m) => m.targetsCommand),
|
|
45
|
+
create: () => import("./create-LPD3JAIW.js").then((m) => m.createCommand),
|
|
46
|
+
update: () => import("./update-GTXZRINC.js").then((m) => m.updateCommand),
|
|
47
|
+
delete: () => import("./delete-FK3A36WP.js").then((m) => m.deleteCommand),
|
|
48
|
+
unstage: () => import("./unstage-E2257FEP.js").then((m) => m.unstageCommand),
|
|
49
|
+
run: () => import("./run-CIXOJA3K.js").then((m) => m.runCommand)
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
export {
|
|
53
53
|
scheduledAgentsCommand
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=scheduled-agents-
|
|
55
|
+
//# sourceMappingURL=scheduled-agents-BGMWNCAU.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
agentProfile,
|
|
3
3
|
offers
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BTVK3CU7.js";
|
|
5
5
|
import "./chunk-52IYZCRS.js";
|
|
6
6
|
import {
|
|
7
7
|
commandTree,
|
|
@@ -118,4 +118,4 @@ export {
|
|
|
118
118
|
narrowToFamily,
|
|
119
119
|
schemaCommand
|
|
120
120
|
};
|
|
121
|
-
//# sourceMappingURL=schema-
|
|
121
|
+
//# sourceMappingURL=schema-NCJTDRRV.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConversionArgsError,
|
|
3
3
|
onlyOnce
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IHZUSAUX.js";
|
|
5
5
|
import {
|
|
6
6
|
SEND_PLATFORMS,
|
|
7
7
|
isSendPlatform,
|
|
8
8
|
sendEventProblem,
|
|
9
9
|
sendsRequestSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PILLZPNC.js";
|
|
11
11
|
import "./chunk-NKQWDEB7.js";
|
|
12
12
|
import {
|
|
13
13
|
writeJsonEnvelope
|
|
@@ -346,4 +346,4 @@ export {
|
|
|
346
346
|
sendsView,
|
|
347
347
|
sendsWrite
|
|
348
348
|
};
|
|
349
|
-
//# sourceMappingURL=sends-
|
|
349
|
+
//# sourceMappingURL=sends-MZKHZZGJ.js.map
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
hubspotRefusal
|
|
7
7
|
} from "./chunk-DW3OPKXI.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-OYNBUT5X.js";
|
|
9
9
|
import "./chunk-GRQ2AXDX.js";
|
|
10
10
|
import {
|
|
11
11
|
ConversionArgsError,
|
|
12
12
|
onlyOnce
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-IHZUSAUX.js";
|
|
14
|
+
import "./chunk-PILLZPNC.js";
|
|
15
15
|
import {
|
|
16
16
|
SOURCE_FIELD_NAMES,
|
|
17
17
|
mappingRowProblem,
|
|
@@ -454,4 +454,4 @@ export {
|
|
|
454
454
|
sourcesCommand,
|
|
455
455
|
sourcesRequest
|
|
456
456
|
};
|
|
457
|
-
//# sourceMappingURL=sources-
|
|
457
|
+
//# sourceMappingURL=sources-ZM7LEIMM.js.map
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
chatBody,
|
|
3
3
|
failApi,
|
|
4
4
|
failValidation
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-UXZZ5AEO.js";
|
|
6
|
+
import "./chunk-BTVK3CU7.js";
|
|
7
7
|
import {
|
|
8
8
|
TRIGGER_KIND_IDS,
|
|
9
9
|
TRIGGER_TARGET_FIELD_IDS
|
|
@@ -103,4 +103,4 @@ Full guide: __tooling__/docs/tools/baker/scheduled-agents.md`
|
|
|
103
103
|
export {
|
|
104
104
|
targetsCommand
|
|
105
105
|
};
|
|
106
|
-
//# sourceMappingURL=targets-
|
|
106
|
+
//# sourceMappingURL=targets-KZBMOZUE.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
failApi
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-UXZZ5AEO.js";
|
|
4
|
+
import "./chunk-BTVK3CU7.js";
|
|
5
5
|
import {
|
|
6
6
|
triggerCatalogSchema
|
|
7
7
|
} from "./chunk-HVJJEQDQ.js";
|
|
@@ -141,4 +141,4 @@ export {
|
|
|
141
141
|
shapeTriggerCatalog,
|
|
142
142
|
triggersCommand
|
|
143
143
|
};
|
|
144
|
-
//# sourceMappingURL=triggers-
|
|
144
|
+
//# sourceMappingURL=triggers-35UVEDXF.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyticsErrorEnvelope
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TE4ASZSC.js";
|
|
4
4
|
import {
|
|
5
5
|
ANALYTICS_UNSTAGE_KINDS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PILLZPNC.js";
|
|
7
7
|
import "./chunk-NKQWDEB7.js";
|
|
8
8
|
import {
|
|
9
9
|
writeJsonEnvelope
|
|
@@ -93,4 +93,4 @@ export {
|
|
|
93
93
|
unstageBody,
|
|
94
94
|
unstageCommand
|
|
95
95
|
};
|
|
96
|
-
//# sourceMappingURL=unstage-
|
|
96
|
+
//# sourceMappingURL=unstage-AVLORZLW.js.map
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
failApi,
|
|
3
3
|
failValidation,
|
|
4
4
|
validateScheduledAgentRef
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-UXZZ5AEO.js";
|
|
6
|
+
import "./chunk-BTVK3CU7.js";
|
|
7
7
|
import "./chunk-HVJJEQDQ.js";
|
|
8
8
|
import "./chunk-QV6AST5T.js";
|
|
9
9
|
import "./chunk-WCU362Z6.js";
|
|
@@ -85,4 +85,4 @@ export {
|
|
|
85
85
|
unstageBody,
|
|
86
86
|
unstageCommand
|
|
87
87
|
};
|
|
88
|
-
//# sourceMappingURL=unstage-
|
|
88
|
+
//# sourceMappingURL=unstage-E2257FEP.js.map
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
slackBody,
|
|
17
17
|
validateScheduledAgentRef,
|
|
18
18
|
writeOk
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-UXZZ5AEO.js";
|
|
20
|
+
import "./chunk-BTVK3CU7.js";
|
|
21
21
|
import "./chunk-HVJJEQDQ.js";
|
|
22
22
|
import "./chunk-QV6AST5T.js";
|
|
23
23
|
import "./chunk-WCU362Z6.js";
|
|
@@ -152,4 +152,4 @@ var updateCommand = defineCommand({
|
|
|
152
152
|
export {
|
|
153
153
|
updateCommand
|
|
154
154
|
};
|
|
155
|
-
//# sourceMappingURL=update-
|
|
155
|
+
//# sourceMappingURL=update-GTXZRINC.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mappingCommandFor,
|
|
3
3
|
proposeMappingFromTemplate
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PILLZPNC.js";
|
|
5
5
|
import "./chunk-NKQWDEB7.js";
|
|
6
6
|
import {
|
|
7
7
|
parseApiError
|
|
@@ -128,4 +128,4 @@ Examples:
|
|
|
128
128
|
export {
|
|
129
129
|
urlOptionsCommand
|
|
130
130
|
};
|
|
131
|
-
//# sourceMappingURL=url-options-
|
|
131
|
+
//# sourceMappingURL=url-options-DJZV3ADK.js.map
|