@koda-sl/baker-cli 0.153.0 → 0.154.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 +47 -0
- package/dist/{chunk-OO5BDH3J.js → chunk-7Z6C5OVO.js} +99 -17
- package/dist/chunk-7Z6C5OVO.js.map +1 -0
- package/dist/cli.js +1658 -1206
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-OO5BDH3J.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
toModelSafeImage,
|
|
37
37
|
ulid,
|
|
38
38
|
validateCanvasDeep
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-7Z6C5OVO.js";
|
|
40
40
|
import {
|
|
41
41
|
csvOrJson,
|
|
42
42
|
daysAgoIso,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
} from "./chunk-RK67WL4O.js";
|
|
76
76
|
|
|
77
77
|
// src/cli.ts
|
|
78
|
-
import { defineCommand as
|
|
78
|
+
import { defineCommand as defineCommand181, runMain } from "citty";
|
|
79
79
|
|
|
80
80
|
// src/commands/actions/index.ts
|
|
81
81
|
import { defineCommand as defineCommand18 } from "citty";
|
|
@@ -2550,9 +2550,166 @@ var historyListResponseSchema = z7.object({
|
|
|
2550
2550
|
data: z7.object({ entries: z7.array(historyEntrySchema) })
|
|
2551
2551
|
});
|
|
2552
2552
|
|
|
2553
|
-
// ../api/src/
|
|
2553
|
+
// ../api/src/hubspot.ts
|
|
2554
2554
|
import { z as z8 } from "zod";
|
|
2555
|
-
var
|
|
2555
|
+
var hubspotEmbedTypeSchema = z8.enum(["legacy", "v4", "unknown"]);
|
|
2556
|
+
var hubspotPostSubmitActionSchema = z8.object({
|
|
2557
|
+
type: z8.enum(["redirect_url", "thank_you"]),
|
|
2558
|
+
value: z8.string()
|
|
2559
|
+
});
|
|
2560
|
+
var hubspotFormFieldSchema = z8.object({
|
|
2561
|
+
name: z8.string(),
|
|
2562
|
+
label: z8.string(),
|
|
2563
|
+
fieldType: z8.string(),
|
|
2564
|
+
objectTypeId: z8.string().optional(),
|
|
2565
|
+
required: z8.boolean().optional(),
|
|
2566
|
+
hidden: z8.boolean().optional(),
|
|
2567
|
+
placeholder: z8.string().optional(),
|
|
2568
|
+
description: z8.string().optional(),
|
|
2569
|
+
options: z8.array(z8.object({ label: z8.string(), value: z8.string() })).optional()
|
|
2570
|
+
});
|
|
2571
|
+
var hubspotFormSummarySchema = z8.object({
|
|
2572
|
+
id: z8.string(),
|
|
2573
|
+
name: z8.string(),
|
|
2574
|
+
embedType: hubspotEmbedTypeSchema,
|
|
2575
|
+
/** Total visible + hidden fields across every field group. */
|
|
2576
|
+
fieldCount: z8.number().int(),
|
|
2577
|
+
postSubmitAction: hubspotPostSubmitActionSchema.nullable()
|
|
2578
|
+
});
|
|
2579
|
+
var hubspotFormsListRequestSchema = z8.object({
|
|
2580
|
+
/** Case-insensitive substring match on the form name. */
|
|
2581
|
+
search: z8.string().min(1).max(200).optional(),
|
|
2582
|
+
/** Only forms whose post-submit action redirects away. */
|
|
2583
|
+
redirectingOnly: z8.boolean().optional(),
|
|
2584
|
+
embedType: hubspotEmbedTypeSchema.optional()
|
|
2585
|
+
});
|
|
2586
|
+
var hubspotFormsListResponseSchema = z8.object({
|
|
2587
|
+
ok: z8.literal(true),
|
|
2588
|
+
data: z8.object({
|
|
2589
|
+
/** Same for every form on the account — sent once, not per row. */
|
|
2590
|
+
portalId: z8.number().nullable(),
|
|
2591
|
+
forms: z8.array(hubspotFormSummarySchema)
|
|
2592
|
+
})
|
|
2593
|
+
});
|
|
2594
|
+
var hubspotFormsViewRequestSchema = z8.object({
|
|
2595
|
+
formId: z8.string().min(1),
|
|
2596
|
+
/** Include the untouched HubSpot payload alongside the summarized view. */
|
|
2597
|
+
full: z8.boolean().optional(),
|
|
2598
|
+
/**
|
|
2599
|
+
* Return the resource blob to write into a flow node's `form.external`
|
|
2600
|
+
* instead of the human-readable view.
|
|
2601
|
+
*/
|
|
2602
|
+
asNode: z8.boolean().optional()
|
|
2603
|
+
});
|
|
2604
|
+
var hubspotFormDetailSchema = hubspotFormSummarySchema.extend({
|
|
2605
|
+
portalId: z8.number().nullable(),
|
|
2606
|
+
captchaEnabled: z8.boolean(),
|
|
2607
|
+
language: z8.string().nullable(),
|
|
2608
|
+
fields: z8.array(hubspotFormFieldSchema),
|
|
2609
|
+
/** HubSpot's "Data privacy and consent options"; `null` when not configured. */
|
|
2610
|
+
legalConsentType: z8.string().nullable(),
|
|
2611
|
+
raw: z8.record(z8.string(), z8.unknown()).optional()
|
|
2612
|
+
});
|
|
2613
|
+
var hubspotFormNodeExternalSchema = z8.object({
|
|
2614
|
+
id: z8.string(),
|
|
2615
|
+
name: z8.string(),
|
|
2616
|
+
providerId: z8.string(),
|
|
2617
|
+
portalId: z8.number(),
|
|
2618
|
+
embedType: z8.enum(["legacy", "v4"]).optional(),
|
|
2619
|
+
region: z8.string().optional(),
|
|
2620
|
+
captchaEnabled: z8.boolean(),
|
|
2621
|
+
fieldGroups: z8.array(z8.object({ fields: z8.array(hubspotFormFieldSchema) })),
|
|
2622
|
+
configuration: z8.object({ postSubmitAction: hubspotPostSubmitActionSchema }).optional(),
|
|
2623
|
+
legalConsentOptions: z8.record(z8.string(), z8.unknown()).optional()
|
|
2624
|
+
});
|
|
2625
|
+
var hubspotFormsViewResponseSchema = z8.object({
|
|
2626
|
+
ok: z8.literal(true),
|
|
2627
|
+
data: z8.object({
|
|
2628
|
+
form: hubspotFormDetailSchema.optional(),
|
|
2629
|
+
/** Present instead of `form` when `asNode` was requested. */
|
|
2630
|
+
external: hubspotFormNodeExternalSchema.optional()
|
|
2631
|
+
})
|
|
2632
|
+
});
|
|
2633
|
+
var hubspotMeetingFieldSchema = z8.object({
|
|
2634
|
+
name: z8.string(),
|
|
2635
|
+
label: z8.string(),
|
|
2636
|
+
fieldType: z8.string(),
|
|
2637
|
+
isRequired: z8.boolean(),
|
|
2638
|
+
isCustom: z8.boolean(),
|
|
2639
|
+
options: z8.array(z8.object({ label: z8.string(), value: z8.string() })).optional()
|
|
2640
|
+
});
|
|
2641
|
+
var hubspotMeetingSummarySchema = z8.object({
|
|
2642
|
+
id: z8.string(),
|
|
2643
|
+
name: z8.string(),
|
|
2644
|
+
slug: z8.string(),
|
|
2645
|
+
linkType: z8.string(),
|
|
2646
|
+
/**
|
|
2647
|
+
* Where HubSpot sends the visitor after booking. `null` means either "no
|
|
2648
|
+
* redirect" or "not known" — read `redirectKnown` before concluding.
|
|
2649
|
+
*/
|
|
2650
|
+
redirectUrl: z8.string().nullable(),
|
|
2651
|
+
/**
|
|
2652
|
+
* False when the list endpoint omitted `customParams` entirely, in which case
|
|
2653
|
+
* `redirectUrl: null` is an absence of information, not a confirmed absence
|
|
2654
|
+
* of a redirect. `meetings view <slug>` resolves it.
|
|
2655
|
+
*/
|
|
2656
|
+
redirectKnown: z8.boolean(),
|
|
2657
|
+
/**
|
|
2658
|
+
* Booking-form field count, or `null` when the list endpoint did not carry
|
|
2659
|
+
* `customParams` — HubSpot only populates those reliably on the per-slug
|
|
2660
|
+
* booking endpoint, so `meetings view <slug>` is the source of truth.
|
|
2661
|
+
*/
|
|
2662
|
+
fieldCount: z8.number().int().nullable()
|
|
2663
|
+
});
|
|
2664
|
+
var hubspotMeetingsListRequestSchema = z8.object({
|
|
2665
|
+
search: z8.string().min(1).max(200).optional(),
|
|
2666
|
+
/** Only meeting links that redirect after booking. */
|
|
2667
|
+
redirectingOnly: z8.boolean().optional()
|
|
2668
|
+
});
|
|
2669
|
+
var hubspotMeetingsListResponseSchema = z8.object({
|
|
2670
|
+
ok: z8.literal(true),
|
|
2671
|
+
data: z8.object({ meetings: z8.array(hubspotMeetingSummarySchema) })
|
|
2672
|
+
});
|
|
2673
|
+
var hubspotMeetingsViewRequestSchema = z8.object({
|
|
2674
|
+
slug: z8.string().min(1),
|
|
2675
|
+
/**
|
|
2676
|
+
* Return the resource blob to write into a flow node's `form.external`
|
|
2677
|
+
* instead of the human-readable view.
|
|
2678
|
+
*/
|
|
2679
|
+
asNode: z8.boolean().optional()
|
|
2680
|
+
});
|
|
2681
|
+
var hubspotMeetingDetailSchema = z8.object({
|
|
2682
|
+
name: z8.string(),
|
|
2683
|
+
slug: z8.string(),
|
|
2684
|
+
link: z8.string(),
|
|
2685
|
+
linkType: z8.string(),
|
|
2686
|
+
redirectUrl: z8.string().nullable(),
|
|
2687
|
+
fields: z8.array(hubspotMeetingFieldSchema)
|
|
2688
|
+
});
|
|
2689
|
+
var hubspotMeetingNodeExternalSchema = z8.object({
|
|
2690
|
+
name: z8.string(),
|
|
2691
|
+
slug: z8.string(),
|
|
2692
|
+
/** Non-empty: an empty booking link renders an iframe pointed at nothing. */
|
|
2693
|
+
link: z8.string().min(1),
|
|
2694
|
+
linkType: z8.enum(["PERSONAL_LINK", "GROUP_CALENDAR", "ROUND_ROBIN_CALENDAR"]),
|
|
2695
|
+
providerId: z8.string(),
|
|
2696
|
+
customParams: z8.object({
|
|
2697
|
+
formFields: z8.array(hubspotMeetingFieldSchema),
|
|
2698
|
+
redirectUrl: z8.string().nullable()
|
|
2699
|
+
})
|
|
2700
|
+
});
|
|
2701
|
+
var hubspotMeetingsViewResponseSchema = z8.object({
|
|
2702
|
+
ok: z8.literal(true),
|
|
2703
|
+
data: z8.object({
|
|
2704
|
+
meeting: hubspotMeetingDetailSchema.optional(),
|
|
2705
|
+
/** Present instead of `meeting` when `asNode` was requested. */
|
|
2706
|
+
external: hubspotMeetingNodeExternalSchema.optional()
|
|
2707
|
+
})
|
|
2708
|
+
});
|
|
2709
|
+
|
|
2710
|
+
// ../api/src/images.ts
|
|
2711
|
+
import { z as z9 } from "zod";
|
|
2712
|
+
var imageSourceSchema = z9.enum([
|
|
2556
2713
|
"uploaded",
|
|
2557
2714
|
"website",
|
|
2558
2715
|
"google_testimonial",
|
|
@@ -2568,49 +2725,49 @@ var imageSourceSchema = z8.enum([
|
|
|
2568
2725
|
"pinterest",
|
|
2569
2726
|
"ai_generated"
|
|
2570
2727
|
]);
|
|
2571
|
-
var imageStatusSchema =
|
|
2572
|
-
var upscaleConfigSchema =
|
|
2573
|
-
model:
|
|
2574
|
-
input:
|
|
2575
|
-
scale_factor:
|
|
2576
|
-
creativity:
|
|
2577
|
-
output_format:
|
|
2728
|
+
var imageStatusSchema = z9.enum(["uploading", "processing", "ready", "error"]);
|
|
2729
|
+
var upscaleConfigSchema = z9.object({
|
|
2730
|
+
model: z9.literal("philz1337x/crystal-upscaler"),
|
|
2731
|
+
input: z9.object({
|
|
2732
|
+
scale_factor: z9.number(),
|
|
2733
|
+
creativity: z9.number(),
|
|
2734
|
+
output_format: z9.string()
|
|
2578
2735
|
}),
|
|
2579
|
-
status:
|
|
2736
|
+
status: z9.enum(["pending", "completed"])
|
|
2580
2737
|
});
|
|
2581
|
-
var imageDocSchema =
|
|
2582
|
-
_id:
|
|
2583
|
-
_creationTime:
|
|
2584
|
-
companyId:
|
|
2585
|
-
storageKey:
|
|
2738
|
+
var imageDocSchema = z9.object({
|
|
2739
|
+
_id: z9.string(),
|
|
2740
|
+
_creationTime: z9.number(),
|
|
2741
|
+
companyId: z9.string(),
|
|
2742
|
+
storageKey: z9.string(),
|
|
2586
2743
|
upscaleConfig: upscaleConfigSchema.optional(),
|
|
2587
|
-
upscaledStorageKey:
|
|
2588
|
-
name:
|
|
2589
|
-
description:
|
|
2590
|
-
tags:
|
|
2591
|
-
source:
|
|
2592
|
-
externalId:
|
|
2593
|
-
externalUrl:
|
|
2594
|
-
contentHash:
|
|
2595
|
-
sourceId:
|
|
2596
|
-
descriptionContext:
|
|
2597
|
-
width:
|
|
2598
|
-
height:
|
|
2599
|
-
aspectRatio:
|
|
2600
|
-
dominantColor:
|
|
2601
|
-
imagePalette:
|
|
2602
|
-
thumbhashDataUri:
|
|
2603
|
-
isLightImage:
|
|
2604
|
-
descriptionEmbedding:
|
|
2605
|
-
imageEmbedding:
|
|
2606
|
-
searchText:
|
|
2744
|
+
upscaledStorageKey: z9.string().optional(),
|
|
2745
|
+
name: z9.string(),
|
|
2746
|
+
description: z9.string(),
|
|
2747
|
+
tags: z9.array(z9.string()),
|
|
2748
|
+
source: z9.string(),
|
|
2749
|
+
externalId: z9.string().optional(),
|
|
2750
|
+
externalUrl: z9.string().optional(),
|
|
2751
|
+
contentHash: z9.string().optional(),
|
|
2752
|
+
sourceId: z9.string().optional(),
|
|
2753
|
+
descriptionContext: z9.string().optional(),
|
|
2754
|
+
width: z9.number().optional(),
|
|
2755
|
+
height: z9.number().optional(),
|
|
2756
|
+
aspectRatio: z9.number().optional(),
|
|
2757
|
+
dominantColor: z9.string().optional(),
|
|
2758
|
+
imagePalette: z9.array(z9.string()).optional(),
|
|
2759
|
+
thumbhashDataUri: z9.string().optional(),
|
|
2760
|
+
isLightImage: z9.boolean().optional(),
|
|
2761
|
+
descriptionEmbedding: z9.array(z9.number()).optional(),
|
|
2762
|
+
imageEmbedding: z9.array(z9.number()).optional(),
|
|
2763
|
+
searchText: z9.string().optional(),
|
|
2607
2764
|
status: imageStatusSchema,
|
|
2608
|
-
errorMessage:
|
|
2609
|
-
createdAt:
|
|
2610
|
-
updatedAt:
|
|
2611
|
-
imageUrl:
|
|
2765
|
+
errorMessage: z9.string().optional(),
|
|
2766
|
+
createdAt: z9.number(),
|
|
2767
|
+
updatedAt: z9.number(),
|
|
2768
|
+
imageUrl: z9.string()
|
|
2612
2769
|
});
|
|
2613
|
-
var imageHitSourceSchema =
|
|
2770
|
+
var imageHitSourceSchema = z9.enum([
|
|
2614
2771
|
"library",
|
|
2615
2772
|
"magnific",
|
|
2616
2773
|
"google_images",
|
|
@@ -2621,145 +2778,145 @@ var imageHitSourceSchema = z8.enum([
|
|
|
2621
2778
|
"giphy",
|
|
2622
2779
|
"pinterest"
|
|
2623
2780
|
]);
|
|
2624
|
-
var imageHitSchema =
|
|
2781
|
+
var imageHitSchema = z9.object({
|
|
2625
2782
|
source: imageHitSourceSchema,
|
|
2626
|
-
url:
|
|
2627
|
-
thumbnailUrl:
|
|
2628
|
-
width:
|
|
2629
|
-
height:
|
|
2630
|
-
aspectRatio:
|
|
2631
|
-
dominantColor:
|
|
2632
|
-
externalId:
|
|
2633
|
-
externalUrl:
|
|
2634
|
-
providerMeta:
|
|
2635
|
-
descriptionContext:
|
|
2636
|
-
_id:
|
|
2637
|
-
name:
|
|
2638
|
-
description:
|
|
2639
|
-
tags:
|
|
2640
|
-
score:
|
|
2641
|
-
alsoInLibrary:
|
|
2642
|
-
prefetchedBytes:
|
|
2643
|
-
prefetchedContentType:
|
|
2783
|
+
url: z9.string(),
|
|
2784
|
+
thumbnailUrl: z9.string().optional(),
|
|
2785
|
+
width: z9.number().optional(),
|
|
2786
|
+
height: z9.number().optional(),
|
|
2787
|
+
aspectRatio: z9.number().optional(),
|
|
2788
|
+
dominantColor: z9.string().optional(),
|
|
2789
|
+
externalId: z9.string().optional(),
|
|
2790
|
+
externalUrl: z9.string().optional(),
|
|
2791
|
+
providerMeta: z9.record(z9.string(), z9.unknown()).optional(),
|
|
2792
|
+
descriptionContext: z9.string().optional(),
|
|
2793
|
+
_id: z9.string().optional(),
|
|
2794
|
+
name: z9.string().optional(),
|
|
2795
|
+
description: z9.string().optional(),
|
|
2796
|
+
tags: z9.array(z9.string()).optional(),
|
|
2797
|
+
score: z9.number().optional(),
|
|
2798
|
+
alsoInLibrary: z9.string().optional(),
|
|
2799
|
+
prefetchedBytes: z9.string().optional(),
|
|
2800
|
+
prefetchedContentType: z9.string().optional()
|
|
2644
2801
|
});
|
|
2645
2802
|
var ingestedImageHitSchema = imageHitSchema.extend({
|
|
2646
|
-
imageId:
|
|
2647
|
-
imageUrl:
|
|
2648
|
-
deduped:
|
|
2649
|
-
sourceUrl:
|
|
2650
|
-
});
|
|
2651
|
-
var autoIngestItemSchema =
|
|
2652
|
-
imageId:
|
|
2653
|
-
deduped:
|
|
2654
|
-
imageUrl:
|
|
2655
|
-
sourceUrl:
|
|
2656
|
-
externalUrl:
|
|
2803
|
+
imageId: z9.string().optional(),
|
|
2804
|
+
imageUrl: z9.string().optional(),
|
|
2805
|
+
deduped: z9.boolean().optional(),
|
|
2806
|
+
sourceUrl: z9.string().optional()
|
|
2807
|
+
});
|
|
2808
|
+
var autoIngestItemSchema = z9.object({
|
|
2809
|
+
imageId: z9.string(),
|
|
2810
|
+
deduped: z9.boolean(),
|
|
2811
|
+
imageUrl: z9.string(),
|
|
2812
|
+
sourceUrl: z9.string(),
|
|
2813
|
+
externalUrl: z9.string().optional()
|
|
2657
2814
|
});
|
|
2658
2815
|
function providerHitsResponseSchema() {
|
|
2659
|
-
return
|
|
2660
|
-
hits:
|
|
2661
|
-
ingested:
|
|
2816
|
+
return z9.object({
|
|
2817
|
+
hits: z9.array(ingestedImageHitSchema),
|
|
2818
|
+
ingested: z9.array(autoIngestItemSchema)
|
|
2662
2819
|
});
|
|
2663
2820
|
}
|
|
2664
|
-
var imagesGetRequestSchema =
|
|
2665
|
-
var imagesSearchRequestSchema =
|
|
2666
|
-
query:
|
|
2667
|
-
limit:
|
|
2668
|
-
aspectRatio:
|
|
2669
|
-
tags:
|
|
2670
|
-
source:
|
|
2671
|
-
externalUrlHost:
|
|
2672
|
-
});
|
|
2673
|
-
var imageSearchResultSchema =
|
|
2674
|
-
_id:
|
|
2675
|
-
imageUrl:
|
|
2676
|
-
name:
|
|
2677
|
-
description:
|
|
2678
|
-
tags:
|
|
2679
|
-
width:
|
|
2680
|
-
height:
|
|
2681
|
-
aspectRatio:
|
|
2682
|
-
dominantColor:
|
|
2683
|
-
imagePalette:
|
|
2684
|
-
source:
|
|
2685
|
-
externalUrl:
|
|
2686
|
-
score:
|
|
2687
|
-
});
|
|
2688
|
-
var imagesSearchResponseSchema =
|
|
2689
|
-
var imagesUploadRequestSchema =
|
|
2690
|
-
base64:
|
|
2691
|
-
contentType:
|
|
2692
|
-
source:
|
|
2693
|
-
descriptionContext:
|
|
2694
|
-
});
|
|
2695
|
-
var imagesUploadResponseSchema =
|
|
2696
|
-
var imagesDeleteRequestSchema =
|
|
2697
|
-
var imagesDeleteResponseSchema =
|
|
2698
|
-
var imagesUpscaleRequestSchema =
|
|
2699
|
-
var imagesUpscaleResponseSchema =
|
|
2700
|
-
imageId:
|
|
2701
|
-
status:
|
|
2821
|
+
var imagesGetRequestSchema = z9.object({ id: z9.string().min(1, "Missing id parameter") });
|
|
2822
|
+
var imagesSearchRequestSchema = z9.object({
|
|
2823
|
+
query: z9.string().min(1),
|
|
2824
|
+
limit: z9.coerce.number().int().positive().max(100).optional(),
|
|
2825
|
+
aspectRatio: z9.string().optional(),
|
|
2826
|
+
tags: z9.array(z9.string()).optional(),
|
|
2827
|
+
source: z9.string().optional(),
|
|
2828
|
+
externalUrlHost: z9.string().optional()
|
|
2829
|
+
});
|
|
2830
|
+
var imageSearchResultSchema = z9.object({
|
|
2831
|
+
_id: z9.string(),
|
|
2832
|
+
imageUrl: z9.string(),
|
|
2833
|
+
name: z9.string(),
|
|
2834
|
+
description: z9.string(),
|
|
2835
|
+
tags: z9.array(z9.string()),
|
|
2836
|
+
width: z9.number().optional(),
|
|
2837
|
+
height: z9.number().optional(),
|
|
2838
|
+
aspectRatio: z9.number().optional(),
|
|
2839
|
+
dominantColor: z9.string().optional(),
|
|
2840
|
+
imagePalette: z9.array(z9.string()).optional(),
|
|
2841
|
+
source: z9.string(),
|
|
2842
|
+
externalUrl: z9.string().optional(),
|
|
2843
|
+
score: z9.number()
|
|
2844
|
+
});
|
|
2845
|
+
var imagesSearchResponseSchema = z9.array(imageSearchResultSchema);
|
|
2846
|
+
var imagesUploadRequestSchema = z9.object({
|
|
2847
|
+
base64: z9.string().min(1),
|
|
2848
|
+
contentType: z9.string().min(1),
|
|
2849
|
+
source: z9.string().optional(),
|
|
2850
|
+
descriptionContext: z9.string().optional()
|
|
2851
|
+
});
|
|
2852
|
+
var imagesUploadResponseSchema = z9.object({ imageId: z9.string() });
|
|
2853
|
+
var imagesDeleteRequestSchema = z9.object({ id: z9.string().min(1, "Missing image ID") });
|
|
2854
|
+
var imagesDeleteResponseSchema = z9.object({ ok: z9.literal(true) });
|
|
2855
|
+
var imagesUpscaleRequestSchema = z9.object({ imageId: z9.string().min(1, "Missing image ID") });
|
|
2856
|
+
var imagesUpscaleResponseSchema = z9.object({
|
|
2857
|
+
imageId: z9.string(),
|
|
2858
|
+
status: z9.literal("processing")
|
|
2702
2859
|
});
|
|
2703
2860
|
var IMAGES_FIND_SOURCES = ["library", "magnific", "google", "iconify", "giphy", "pinterest"];
|
|
2704
|
-
var imagesFindRequestSchema =
|
|
2705
|
-
query:
|
|
2706
|
-
sources:
|
|
2707
|
-
limit:
|
|
2708
|
-
fallback:
|
|
2709
|
-
threshold:
|
|
2710
|
-
autoIngest:
|
|
2711
|
-
descriptionContext:
|
|
2712
|
-
});
|
|
2713
|
-
var imagesFindResponseSchema =
|
|
2714
|
-
groups:
|
|
2715
|
-
library:
|
|
2716
|
-
external:
|
|
2861
|
+
var imagesFindRequestSchema = z9.object({
|
|
2862
|
+
query: z9.string().min(1),
|
|
2863
|
+
sources: z9.array(z9.enum(IMAGES_FIND_SOURCES)).optional(),
|
|
2864
|
+
limit: z9.coerce.number().int().positive().max(50).optional(),
|
|
2865
|
+
fallback: z9.boolean().optional(),
|
|
2866
|
+
threshold: z9.number().min(0).max(1).optional(),
|
|
2867
|
+
autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
|
|
2868
|
+
descriptionContext: z9.string().optional()
|
|
2869
|
+
});
|
|
2870
|
+
var imagesFindResponseSchema = z9.object({
|
|
2871
|
+
groups: z9.object({
|
|
2872
|
+
library: z9.array(imageHitSchema),
|
|
2873
|
+
external: z9.array(ingestedImageHitSchema)
|
|
2717
2874
|
}),
|
|
2718
|
-
meta:
|
|
2719
|
-
counts:
|
|
2720
|
-
errors:
|
|
2875
|
+
meta: z9.object({
|
|
2876
|
+
counts: z9.record(z9.string(), z9.number()),
|
|
2877
|
+
errors: z9.array(z9.object({ source: imageHitSourceSchema, message: z9.string() }))
|
|
2721
2878
|
}),
|
|
2722
|
-
ingested:
|
|
2723
|
-
});
|
|
2724
|
-
var imagesStockRequestSchema =
|
|
2725
|
-
query:
|
|
2726
|
-
orientation:
|
|
2727
|
-
contentType:
|
|
2728
|
-
license:
|
|
2729
|
-
color:
|
|
2730
|
-
aiGenerated:
|
|
2731
|
-
people:
|
|
2732
|
-
order:
|
|
2733
|
-
limit:
|
|
2734
|
-
page:
|
|
2735
|
-
autoIngest:
|
|
2736
|
-
descriptionContext:
|
|
2879
|
+
ingested: z9.array(autoIngestItemSchema)
|
|
2880
|
+
});
|
|
2881
|
+
var imagesStockRequestSchema = z9.object({
|
|
2882
|
+
query: z9.string().min(1),
|
|
2883
|
+
orientation: z9.enum(["landscape", "portrait", "square", "panoramic"]).optional(),
|
|
2884
|
+
contentType: z9.enum(["photo", "vector", "psd"]).optional(),
|
|
2885
|
+
license: z9.enum(["freemium", "premium"]).optional(),
|
|
2886
|
+
color: z9.string().optional(),
|
|
2887
|
+
aiGenerated: z9.enum(["exclude", "only"]).optional(),
|
|
2888
|
+
people: z9.enum(["include", "exclude", "only"]).optional(),
|
|
2889
|
+
order: z9.enum(["relevance", "recent"]).optional(),
|
|
2890
|
+
limit: z9.coerce.number().int().positive().max(50).optional(),
|
|
2891
|
+
page: z9.coerce.number().int().positive().optional(),
|
|
2892
|
+
autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
|
|
2893
|
+
descriptionContext: z9.string().optional()
|
|
2737
2894
|
});
|
|
2738
2895
|
var imagesStockResponseSchema = providerHitsResponseSchema();
|
|
2739
|
-
var imagesGoogleRequestSchema =
|
|
2740
|
-
query:
|
|
2741
|
-
type:
|
|
2742
|
-
size:
|
|
2743
|
-
color:
|
|
2744
|
-
safe:
|
|
2745
|
-
limit:
|
|
2746
|
-
autoIngest:
|
|
2747
|
-
descriptionContext:
|
|
2896
|
+
var imagesGoogleRequestSchema = z9.object({
|
|
2897
|
+
query: z9.string().min(1),
|
|
2898
|
+
type: z9.string().optional(),
|
|
2899
|
+
size: z9.string().optional(),
|
|
2900
|
+
color: z9.string().optional(),
|
|
2901
|
+
safe: z9.enum(["off", "active"]).optional(),
|
|
2902
|
+
limit: z9.coerce.number().int().positive().max(50).optional(),
|
|
2903
|
+
autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
|
|
2904
|
+
descriptionContext: z9.string().optional()
|
|
2748
2905
|
});
|
|
2749
2906
|
var imagesGoogleResponseSchema = providerHitsResponseSchema();
|
|
2750
|
-
var imagesPinterestRequestSchema =
|
|
2751
|
-
query:
|
|
2752
|
-
limit:
|
|
2753
|
-
autoIngest:
|
|
2754
|
-
descriptionContext:
|
|
2907
|
+
var imagesPinterestRequestSchema = z9.object({
|
|
2908
|
+
query: z9.string().min(1),
|
|
2909
|
+
limit: z9.coerce.number().int().positive().max(20).optional(),
|
|
2910
|
+
autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
|
|
2911
|
+
descriptionContext: z9.string().optional()
|
|
2755
2912
|
});
|
|
2756
2913
|
var imagesPinterestResponseSchema = providerHitsResponseSchema();
|
|
2757
|
-
var rgbTriple =
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2914
|
+
var rgbTriple = z9.tuple([
|
|
2915
|
+
z9.number().int().min(0).max(255),
|
|
2916
|
+
z9.number().int().min(0).max(255),
|
|
2917
|
+
z9.number().int().min(0).max(255)
|
|
2761
2918
|
]);
|
|
2762
|
-
var imageGenerateModelSchema =
|
|
2919
|
+
var imageGenerateModelSchema = z9.enum([
|
|
2763
2920
|
"openai/gpt-image-2",
|
|
2764
2921
|
// Legacy — see the registry entry; kept so pre-switch canvases still run.
|
|
2765
2922
|
"openai/gpt-5.4-image-2",
|
|
@@ -2767,97 +2924,97 @@ var imageGenerateModelSchema = z8.enum([
|
|
|
2767
2924
|
"google/gemini-3-pro-image-preview",
|
|
2768
2925
|
"recraft/recraft-v4.1-pro-vector"
|
|
2769
2926
|
]);
|
|
2770
|
-
var imagesGenerateRequestSchema =
|
|
2771
|
-
prompt:
|
|
2927
|
+
var imagesGenerateRequestSchema = z9.object({
|
|
2928
|
+
prompt: z9.string().min(1),
|
|
2772
2929
|
model: imageGenerateModelSchema.optional(),
|
|
2773
2930
|
// Aspect ratio + size are validated loosely as strings; the per-model enum
|
|
2774
2931
|
// lives in canvas-contract and OpenRouter rejects unsupported combinations.
|
|
2775
|
-
aspectRatio:
|
|
2776
|
-
imageSize:
|
|
2932
|
+
aspectRatio: z9.string().optional(),
|
|
2933
|
+
imageSize: z9.string().optional(),
|
|
2777
2934
|
// Rendering quality (auto|low|medium|high) — honored by gpt-image / Gemini, ignored elsewhere.
|
|
2778
|
-
quality:
|
|
2935
|
+
quality: z9.enum(["auto", "low", "medium", "high"]).optional(),
|
|
2779
2936
|
// Recraft v4.1 Pro Vector levers (ignored by other models).
|
|
2780
|
-
strength:
|
|
2781
|
-
rgbColors:
|
|
2937
|
+
strength: z9.coerce.number().min(0).max(1).optional(),
|
|
2938
|
+
rgbColors: z9.array(rgbTriple).optional(),
|
|
2782
2939
|
backgroundRgbColor: rgbTriple.optional(),
|
|
2783
2940
|
// Public image URLs used as visual references (multi-reference, in order).
|
|
2784
|
-
referenceUrls:
|
|
2785
|
-
descriptionContext:
|
|
2786
|
-
});
|
|
2787
|
-
var generatedImageSchema =
|
|
2788
|
-
imageId:
|
|
2789
|
-
deduped:
|
|
2790
|
-
imageUrl:
|
|
2791
|
-
width:
|
|
2792
|
-
height:
|
|
2793
|
-
});
|
|
2794
|
-
var imagesGenerateResponseSchema =
|
|
2795
|
-
model:
|
|
2796
|
-
costUsd:
|
|
2797
|
-
images:
|
|
2798
|
-
});
|
|
2799
|
-
var imagesLogoRequestSchema =
|
|
2800
|
-
domain:
|
|
2801
|
-
variant:
|
|
2802
|
-
autoIngest:
|
|
2803
|
-
descriptionContext:
|
|
2941
|
+
referenceUrls: z9.array(z9.string().url()).optional(),
|
|
2942
|
+
descriptionContext: z9.string().optional()
|
|
2943
|
+
});
|
|
2944
|
+
var generatedImageSchema = z9.object({
|
|
2945
|
+
imageId: z9.string(),
|
|
2946
|
+
deduped: z9.boolean(),
|
|
2947
|
+
imageUrl: z9.string(),
|
|
2948
|
+
width: z9.number().optional(),
|
|
2949
|
+
height: z9.number().optional()
|
|
2950
|
+
});
|
|
2951
|
+
var imagesGenerateResponseSchema = z9.object({
|
|
2952
|
+
model: z9.string(),
|
|
2953
|
+
costUsd: z9.number(),
|
|
2954
|
+
images: z9.array(generatedImageSchema)
|
|
2955
|
+
});
|
|
2956
|
+
var imagesLogoRequestSchema = z9.object({
|
|
2957
|
+
domain: z9.string().min(1),
|
|
2958
|
+
variant: z9.enum(["icon", "logo", "symbol"]).optional(),
|
|
2959
|
+
autoIngest: z9.coerce.number().int().min(0).max(5).optional(),
|
|
2960
|
+
descriptionContext: z9.string().optional()
|
|
2804
2961
|
});
|
|
2805
2962
|
var imagesLogoResponseSchema = providerHitsResponseSchema();
|
|
2806
|
-
var imagesIconRequestSchema =
|
|
2807
|
-
name:
|
|
2808
|
-
set:
|
|
2809
|
-
color:
|
|
2810
|
-
width:
|
|
2811
|
-
autoIngest:
|
|
2812
|
-
descriptionContext:
|
|
2963
|
+
var imagesIconRequestSchema = z9.object({
|
|
2964
|
+
name: z9.string().min(1),
|
|
2965
|
+
set: z9.string().optional(),
|
|
2966
|
+
color: z9.string().optional(),
|
|
2967
|
+
width: z9.coerce.number().int().positive().optional(),
|
|
2968
|
+
autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
|
|
2969
|
+
descriptionContext: z9.string().optional()
|
|
2813
2970
|
});
|
|
2814
2971
|
var imagesIconResponseSchema = providerHitsResponseSchema();
|
|
2815
|
-
var imagesExtractRequestSchema =
|
|
2816
|
-
url:
|
|
2817
|
-
waitFor:
|
|
2818
|
-
limit:
|
|
2819
|
-
autoIngest:
|
|
2820
|
-
descriptionContext:
|
|
2972
|
+
var imagesExtractRequestSchema = z9.object({
|
|
2973
|
+
url: z9.string().url(),
|
|
2974
|
+
waitFor: z9.coerce.number().int().min(0).max(3e4).optional(),
|
|
2975
|
+
limit: z9.coerce.number().int().positive().max(50).optional(),
|
|
2976
|
+
autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
|
|
2977
|
+
descriptionContext: z9.string().optional()
|
|
2821
2978
|
});
|
|
2822
2979
|
var imagesExtractResponseSchema = providerHitsResponseSchema();
|
|
2823
|
-
var imagesScreenshotRequestSchema =
|
|
2824
|
-
url:
|
|
2825
|
-
fullPage:
|
|
2826
|
-
viewportWidth:
|
|
2827
|
-
viewportHeight:
|
|
2828
|
-
format:
|
|
2829
|
-
descriptionContext:
|
|
2980
|
+
var imagesScreenshotRequestSchema = z9.object({
|
|
2981
|
+
url: z9.string().url(),
|
|
2982
|
+
fullPage: z9.boolean().optional(),
|
|
2983
|
+
viewportWidth: z9.coerce.number().int().positive().max(3840).optional(),
|
|
2984
|
+
viewportHeight: z9.coerce.number().int().positive().max(2160).optional(),
|
|
2985
|
+
format: z9.enum(["webp", "png", "jpg"]).optional(),
|
|
2986
|
+
descriptionContext: z9.string().optional()
|
|
2830
2987
|
});
|
|
2831
2988
|
var imagesScreenshotResponseSchema = providerHitsResponseSchema();
|
|
2832
|
-
var imagesGiphyRequestSchema =
|
|
2833
|
-
query:
|
|
2834
|
-
trending:
|
|
2835
|
-
limit:
|
|
2836
|
-
rating:
|
|
2837
|
-
lang:
|
|
2838
|
-
autoIngest:
|
|
2839
|
-
descriptionContext:
|
|
2989
|
+
var imagesGiphyRequestSchema = z9.object({
|
|
2990
|
+
query: z9.string().min(1).optional(),
|
|
2991
|
+
trending: z9.coerce.boolean().optional(),
|
|
2992
|
+
limit: z9.coerce.number().int().positive().max(50).optional(),
|
|
2993
|
+
rating: z9.enum(["g", "pg", "pg-13", "r"]).optional(),
|
|
2994
|
+
lang: z9.string().optional(),
|
|
2995
|
+
autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
|
|
2996
|
+
descriptionContext: z9.string().optional()
|
|
2840
2997
|
});
|
|
2841
2998
|
var imagesGifResponseSchema = providerHitsResponseSchema();
|
|
2842
2999
|
var imagesStickerResponseSchema = providerHitsResponseSchema();
|
|
2843
|
-
var imagesIngestRequestSchema =
|
|
2844
|
-
url:
|
|
3000
|
+
var imagesIngestRequestSchema = z9.object({
|
|
3001
|
+
url: z9.string().url(),
|
|
2845
3002
|
// Validate source at the HTTP boundary so unknown values produce the standard
|
|
2846
3003
|
// `{ code: "BAD_REQUEST", message }` shape instead of a plain Error from
|
|
2847
3004
|
// `assertImageSource` inside the action.
|
|
2848
3005
|
source: imageSourceSchema,
|
|
2849
|
-
externalId:
|
|
2850
|
-
externalUrl:
|
|
2851
|
-
descriptionContext:
|
|
3006
|
+
externalId: z9.string().optional(),
|
|
3007
|
+
externalUrl: z9.string().optional(),
|
|
3008
|
+
descriptionContext: z9.string().optional()
|
|
2852
3009
|
});
|
|
2853
|
-
var imagesIngestResponseSchema =
|
|
2854
|
-
imageId:
|
|
2855
|
-
deduped:
|
|
2856
|
-
contentHash:
|
|
3010
|
+
var imagesIngestResponseSchema = z9.object({
|
|
3011
|
+
imageId: z9.string(),
|
|
3012
|
+
deduped: z9.boolean(),
|
|
3013
|
+
contentHash: z9.string()
|
|
2857
3014
|
});
|
|
2858
3015
|
|
|
2859
3016
|
// ../api/src/tags.ts
|
|
2860
|
-
import { z as
|
|
3017
|
+
import { z as z10 } from "zod";
|
|
2861
3018
|
var TAG_TYPES = [
|
|
2862
3019
|
"meta",
|
|
2863
3020
|
"amplitude",
|
|
@@ -2878,7 +3035,7 @@ var TAG_TYPES = [
|
|
|
2878
3035
|
"recaptcha",
|
|
2879
3036
|
"twitterAds"
|
|
2880
3037
|
];
|
|
2881
|
-
var tagTypeSchema =
|
|
3038
|
+
var tagTypeSchema = z10.enum(TAG_TYPES);
|
|
2882
3039
|
var TAG_IDENTIFYING_FIELD = {
|
|
2883
3040
|
meta: "pixelId",
|
|
2884
3041
|
googleAds: "conversionID",
|
|
@@ -2899,218 +3056,218 @@ var TAG_IDENTIFYING_FIELD = {
|
|
|
2899
3056
|
recaptcha: "siteKey",
|
|
2900
3057
|
twitterAds: "pixelId"
|
|
2901
3058
|
};
|
|
2902
|
-
var tagDraftOpKindSchema =
|
|
2903
|
-
var tagDraftOpViewSchema =
|
|
3059
|
+
var tagDraftOpKindSchema = z10.enum(["create", "update", "delete"]);
|
|
3060
|
+
var tagDraftOpViewSchema = z10.object({
|
|
2904
3061
|
/** `tag_temp_*` for staged creates; the real tag id for update/delete ops. */
|
|
2905
|
-
ref:
|
|
3062
|
+
ref: z10.string(),
|
|
2906
3063
|
kind: tagDraftOpKindSchema,
|
|
2907
3064
|
type: tagTypeSchema,
|
|
2908
3065
|
/** Present on update/delete ops — the real tag this op targets. */
|
|
2909
|
-
tagId:
|
|
3066
|
+
tagId: z10.string().optional(),
|
|
2910
3067
|
/** Non-secret config (create: full; update: the staged patch). Secrets are structurally absent. */
|
|
2911
|
-
config:
|
|
3068
|
+
config: z10.record(z10.string(), z10.string()),
|
|
2912
3069
|
/** Update only — fields the op explicitly clears. */
|
|
2913
|
-
clearFields:
|
|
3070
|
+
clearFields: z10.array(z10.string()).optional(),
|
|
2914
3071
|
/** Names of secret fields already provided via the dashboard secure form. Never values. */
|
|
2915
|
-
secretsSet:
|
|
3072
|
+
secretsSet: z10.array(z10.string()),
|
|
2916
3073
|
/** Names of secret fields still awaiting user input. */
|
|
2917
|
-
secretsPending:
|
|
2918
|
-
summary:
|
|
2919
|
-
stagedAt:
|
|
3074
|
+
secretsPending: z10.array(z10.string()),
|
|
3075
|
+
summary: z10.string(),
|
|
3076
|
+
stagedAt: z10.number()
|
|
2920
3077
|
});
|
|
2921
|
-
var tagsEffectiveEntrySchema =
|
|
3078
|
+
var tagsEffectiveEntrySchema = z10.object({
|
|
2922
3079
|
/** Real tag id, or `tag_temp_*` for staged creates. Use as flow side-effect `tagIds` value. */
|
|
2923
|
-
ref:
|
|
2924
|
-
tagId:
|
|
3080
|
+
ref: z10.string(),
|
|
3081
|
+
tagId: z10.string().optional(),
|
|
2925
3082
|
type: tagTypeSchema,
|
|
2926
3083
|
/** Value of the type's identifying field, when set. */
|
|
2927
|
-
identifier:
|
|
3084
|
+
identifier: z10.string().optional(),
|
|
2928
3085
|
/** Redacted config; for staged updates, production config with the patch merged. */
|
|
2929
|
-
config:
|
|
3086
|
+
config: z10.record(z10.string(), z10.string()),
|
|
2930
3087
|
/** Absent = live production tag with no staged changes in this chat. */
|
|
2931
3088
|
staged: tagDraftOpKindSchema.optional(),
|
|
2932
|
-
secretsSet:
|
|
2933
|
-
secretsPending:
|
|
3089
|
+
secretsSet: z10.array(z10.string()),
|
|
3090
|
+
secretsPending: z10.array(z10.string())
|
|
2934
3091
|
});
|
|
2935
|
-
var tagsListRequestSchema =
|
|
2936
|
-
var tagsListResponseSchema =
|
|
2937
|
-
var tagsDraftListRequestSchema =
|
|
2938
|
-
var tagsDraftListResponseSchema =
|
|
2939
|
-
status:
|
|
2940
|
-
ops:
|
|
3092
|
+
var tagsListRequestSchema = z10.object({ chatId: z10.string() });
|
|
3093
|
+
var tagsListResponseSchema = z10.object({ tags: z10.array(tagsEffectiveEntrySchema) });
|
|
3094
|
+
var tagsDraftListRequestSchema = z10.object({ chatId: z10.string() });
|
|
3095
|
+
var tagsDraftListResponseSchema = z10.object({
|
|
3096
|
+
status: z10.enum(["active", "publishing", "applied", "discarded", "none"]),
|
|
3097
|
+
ops: z10.array(tagDraftOpViewSchema)
|
|
2941
3098
|
});
|
|
2942
|
-
var tagInputRequestSchema =
|
|
3099
|
+
var tagInputRequestSchema = z10.object({
|
|
2943
3100
|
// Every tag change is a tab in the approval form: create/edit show the full
|
|
2944
3101
|
// body; delete shows a confirm. No tag change bypasses this approval.
|
|
2945
|
-
mode:
|
|
3102
|
+
mode: z10.enum(["create", "edit", "delete"]),
|
|
2946
3103
|
tagType: tagTypeSchema,
|
|
2947
3104
|
/** Edit/delete mode — the real tag id or `tag_temp_*` ref being changed. */
|
|
2948
|
-
ref:
|
|
3105
|
+
ref: z10.string().optional(),
|
|
2949
3106
|
/** Non-secret values the agent proposes to prefill. Secret keys are stripped at every boundary. */
|
|
2950
|
-
prefilledConfig:
|
|
3107
|
+
prefilledConfig: z10.record(z10.string(), z10.string()).optional(),
|
|
2951
3108
|
/** Secret field names the agent asks the user to provide. */
|
|
2952
|
-
requestedSecretFields:
|
|
3109
|
+
requestedSecretFields: z10.array(z10.string()).optional(),
|
|
2953
3110
|
/** Short message shown above the form explaining why the input is needed. */
|
|
2954
|
-
message:
|
|
3111
|
+
message: z10.string().optional()
|
|
2955
3112
|
});
|
|
2956
|
-
var tagChangeToolInputSchema =
|
|
2957
|
-
changes:
|
|
3113
|
+
var tagChangeToolInputSchema = z10.object({
|
|
3114
|
+
changes: z10.array(tagInputRequestSchema).min(1).max(8)
|
|
2958
3115
|
});
|
|
2959
|
-
var tagInputResultSchema =
|
|
2960
|
-
|
|
2961
|
-
status:
|
|
2962
|
-
ref:
|
|
3116
|
+
var tagInputResultSchema = z10.discriminatedUnion("status", [
|
|
3117
|
+
z10.object({
|
|
3118
|
+
status: z10.literal("submitted"),
|
|
3119
|
+
ref: z10.string(),
|
|
2963
3120
|
type: tagTypeSchema,
|
|
2964
3121
|
/** Identifying field name → value (non-secret), when the type has one. */
|
|
2965
|
-
identifier:
|
|
2966
|
-
secretFieldsSet:
|
|
2967
|
-
note:
|
|
3122
|
+
identifier: z10.record(z10.string(), z10.string()).optional(),
|
|
3123
|
+
secretFieldsSet: z10.array(z10.string()),
|
|
3124
|
+
note: z10.string().optional()
|
|
2968
3125
|
}),
|
|
2969
|
-
|
|
2970
|
-
status:
|
|
2971
|
-
reason:
|
|
3126
|
+
z10.object({
|
|
3127
|
+
status: z10.literal("declined"),
|
|
3128
|
+
reason: z10.string().optional()
|
|
2972
3129
|
})
|
|
2973
3130
|
]);
|
|
2974
|
-
var tagChangeToolResultSchema =
|
|
2975
|
-
results:
|
|
3131
|
+
var tagChangeToolResultSchema = z10.object({
|
|
3132
|
+
results: z10.array(tagInputResultSchema)
|
|
2976
3133
|
});
|
|
2977
3134
|
|
|
2978
3135
|
// ../api/src/testimonials.ts
|
|
2979
|
-
import { z as
|
|
2980
|
-
var testimonialSourceTypeSchema =
|
|
2981
|
-
var testimonialStatusSchema =
|
|
2982
|
-
var testimonialSentimentSchema =
|
|
2983
|
-
var testimonialDocSchema =
|
|
2984
|
-
_id:
|
|
2985
|
-
_creationTime:
|
|
2986
|
-
companyId:
|
|
2987
|
-
sourceId:
|
|
3136
|
+
import { z as z11 } from "zod";
|
|
3137
|
+
var testimonialSourceTypeSchema = z11.enum(["google", "trustpilot"]);
|
|
3138
|
+
var testimonialStatusSchema = z11.enum(["pending", "processing", "ready", "error"]);
|
|
3139
|
+
var testimonialSentimentSchema = z11.enum(["positive", "neutral", "negative"]);
|
|
3140
|
+
var testimonialDocSchema = z11.object({
|
|
3141
|
+
_id: z11.string(),
|
|
3142
|
+
_creationTime: z11.number(),
|
|
3143
|
+
companyId: z11.string(),
|
|
3144
|
+
sourceId: z11.string(),
|
|
2988
3145
|
sourceType: testimonialSourceTypeSchema,
|
|
2989
|
-
reviewText:
|
|
2990
|
-
reviewTitle:
|
|
2991
|
-
searchText:
|
|
2992
|
-
reviewerName:
|
|
2993
|
-
reviewerImageUrl:
|
|
2994
|
-
reviewerImageId:
|
|
2995
|
-
reviewerLocation:
|
|
2996
|
-
rating:
|
|
2997
|
-
reviewDate:
|
|
2998
|
-
ownerAnswer:
|
|
2999
|
-
mediaUrls:
|
|
3000
|
-
imageIds:
|
|
3001
|
-
videoIds:
|
|
3002
|
-
sourceUrl:
|
|
3003
|
-
rawData:
|
|
3004
|
-
tags:
|
|
3005
|
-
highlight:
|
|
3006
|
-
language:
|
|
3007
|
-
summary:
|
|
3146
|
+
reviewText: z11.string(),
|
|
3147
|
+
reviewTitle: z11.string().optional(),
|
|
3148
|
+
searchText: z11.string().optional(),
|
|
3149
|
+
reviewerName: z11.string().optional(),
|
|
3150
|
+
reviewerImageUrl: z11.string().optional(),
|
|
3151
|
+
reviewerImageId: z11.string().optional(),
|
|
3152
|
+
reviewerLocation: z11.string().optional(),
|
|
3153
|
+
rating: z11.number().optional(),
|
|
3154
|
+
reviewDate: z11.number().optional(),
|
|
3155
|
+
ownerAnswer: z11.string().optional(),
|
|
3156
|
+
mediaUrls: z11.array(z11.string()).optional(),
|
|
3157
|
+
imageIds: z11.array(z11.string()).optional(),
|
|
3158
|
+
videoIds: z11.array(z11.string()).optional(),
|
|
3159
|
+
sourceUrl: z11.string().optional(),
|
|
3160
|
+
rawData: z11.unknown().optional(),
|
|
3161
|
+
tags: z11.array(z11.string()),
|
|
3162
|
+
highlight: z11.string().optional(),
|
|
3163
|
+
language: z11.string().optional(),
|
|
3164
|
+
summary: z11.string().optional(),
|
|
3008
3165
|
sentiment: testimonialSentimentSchema.optional(),
|
|
3009
|
-
textEmbedding:
|
|
3010
|
-
externalId:
|
|
3011
|
-
contentHash:
|
|
3166
|
+
textEmbedding: z11.array(z11.number()).optional(),
|
|
3167
|
+
externalId: z11.string().optional(),
|
|
3168
|
+
contentHash: z11.string().optional(),
|
|
3012
3169
|
status: testimonialStatusSchema,
|
|
3013
|
-
errorMessage:
|
|
3014
|
-
createdAt:
|
|
3015
|
-
updatedAt:
|
|
3170
|
+
errorMessage: z11.string().optional(),
|
|
3171
|
+
createdAt: z11.number(),
|
|
3172
|
+
updatedAt: z11.number()
|
|
3016
3173
|
});
|
|
3017
|
-
var testimonialsListRequestSchema =
|
|
3174
|
+
var testimonialsListRequestSchema = z11.object({
|
|
3018
3175
|
source: testimonialSourceTypeSchema.optional(),
|
|
3019
|
-
rating_min:
|
|
3020
|
-
rating_max:
|
|
3021
|
-
tags:
|
|
3176
|
+
rating_min: z11.coerce.number().int().min(1).max(5).optional(),
|
|
3177
|
+
rating_max: z11.coerce.number().int().min(1).max(5).optional(),
|
|
3178
|
+
tags: z11.string().transform((s) => s.split(",").filter(Boolean)).optional(),
|
|
3022
3179
|
status: testimonialStatusSchema.optional(),
|
|
3023
3180
|
sentiment: testimonialSentimentSchema.optional(),
|
|
3024
|
-
language:
|
|
3025
|
-
limit:
|
|
3026
|
-
});
|
|
3027
|
-
var testimonialsListResponseSchema =
|
|
3028
|
-
var testimonialsGetRequestSchema =
|
|
3029
|
-
var testimonialsSearchRequestSchema =
|
|
3030
|
-
query:
|
|
3031
|
-
limit:
|
|
3181
|
+
language: z11.string().min(2).max(5).optional(),
|
|
3182
|
+
limit: z11.coerce.number().int().positive().max(200).optional()
|
|
3183
|
+
});
|
|
3184
|
+
var testimonialsListResponseSchema = z11.array(testimonialDocSchema);
|
|
3185
|
+
var testimonialsGetRequestSchema = z11.object({ id: z11.string().min(1, "Missing id parameter") });
|
|
3186
|
+
var testimonialsSearchRequestSchema = z11.object({
|
|
3187
|
+
query: z11.string().min(1),
|
|
3188
|
+
limit: z11.coerce.number().int().positive().max(100).optional(),
|
|
3032
3189
|
source: testimonialSourceTypeSchema.optional(),
|
|
3033
|
-
rating_min:
|
|
3034
|
-
rating_max:
|
|
3035
|
-
tags:
|
|
3190
|
+
rating_min: z11.coerce.number().int().min(1).max(5).optional(),
|
|
3191
|
+
rating_max: z11.coerce.number().int().min(1).max(5).optional(),
|
|
3192
|
+
tags: z11.array(z11.string()).optional(),
|
|
3036
3193
|
status: testimonialStatusSchema.optional(),
|
|
3037
3194
|
sentiment: testimonialSentimentSchema.optional(),
|
|
3038
|
-
language:
|
|
3195
|
+
language: z11.string().min(2).max(5).optional()
|
|
3039
3196
|
}).refine(
|
|
3040
3197
|
(data) => data.rating_min === void 0 || data.rating_max === void 0 || data.rating_min <= data.rating_max,
|
|
3041
3198
|
{ message: "rating_min must be less than or equal to rating_max" }
|
|
3042
3199
|
);
|
|
3043
|
-
var testimonialsSearchResponseSchema =
|
|
3044
|
-
var testimonialsOutscraperWebhookResponseSchema =
|
|
3045
|
-
ok:
|
|
3046
|
-
note:
|
|
3200
|
+
var testimonialsSearchResponseSchema = z11.array(testimonialDocSchema);
|
|
3201
|
+
var testimonialsOutscraperWebhookResponseSchema = z11.object({
|
|
3202
|
+
ok: z11.literal(true),
|
|
3203
|
+
note: z11.string().optional()
|
|
3047
3204
|
});
|
|
3048
3205
|
|
|
3049
3206
|
// ../api/src/videos.ts
|
|
3050
|
-
import { z as
|
|
3051
|
-
var videoStatusSchema =
|
|
3052
|
-
var videoTranscriptSegmentSchema =
|
|
3053
|
-
text:
|
|
3054
|
-
startSecond:
|
|
3055
|
-
endSecond:
|
|
3056
|
-
});
|
|
3057
|
-
var videoSceneSchema =
|
|
3058
|
-
title:
|
|
3059
|
-
description:
|
|
3060
|
-
startSecond:
|
|
3061
|
-
endSecond:
|
|
3062
|
-
thumbnailTime:
|
|
3063
|
-
});
|
|
3064
|
-
var videoDocSchema =
|
|
3065
|
-
_id:
|
|
3066
|
-
_creationTime:
|
|
3067
|
-
companyId:
|
|
3068
|
-
muxAssetId:
|
|
3069
|
-
muxPlaybackId:
|
|
3070
|
-
muxUploadId:
|
|
3071
|
-
name:
|
|
3072
|
-
description:
|
|
3073
|
-
tags:
|
|
3074
|
-
source:
|
|
3075
|
-
externalId:
|
|
3076
|
-
sourceId:
|
|
3077
|
-
width:
|
|
3078
|
-
height:
|
|
3079
|
-
aspectRatio:
|
|
3080
|
-
duration:
|
|
3081
|
-
transcript:
|
|
3082
|
-
transcriptSegments:
|
|
3083
|
-
scenes:
|
|
3084
|
-
descriptionEmbedding:
|
|
3085
|
-
searchText:
|
|
3207
|
+
import { z as z12 } from "zod";
|
|
3208
|
+
var videoStatusSchema = z12.enum(["uploading", "uploaded", "processing", "ready", "error"]);
|
|
3209
|
+
var videoTranscriptSegmentSchema = z12.object({
|
|
3210
|
+
text: z12.string(),
|
|
3211
|
+
startSecond: z12.number(),
|
|
3212
|
+
endSecond: z12.number()
|
|
3213
|
+
});
|
|
3214
|
+
var videoSceneSchema = z12.object({
|
|
3215
|
+
title: z12.string(),
|
|
3216
|
+
description: z12.string(),
|
|
3217
|
+
startSecond: z12.number(),
|
|
3218
|
+
endSecond: z12.number(),
|
|
3219
|
+
thumbnailTime: z12.number()
|
|
3220
|
+
});
|
|
3221
|
+
var videoDocSchema = z12.object({
|
|
3222
|
+
_id: z12.string(),
|
|
3223
|
+
_creationTime: z12.number(),
|
|
3224
|
+
companyId: z12.string(),
|
|
3225
|
+
muxAssetId: z12.string(),
|
|
3226
|
+
muxPlaybackId: z12.string(),
|
|
3227
|
+
muxUploadId: z12.string(),
|
|
3228
|
+
name: z12.string(),
|
|
3229
|
+
description: z12.string(),
|
|
3230
|
+
tags: z12.array(z12.string()),
|
|
3231
|
+
source: z12.string(),
|
|
3232
|
+
externalId: z12.string().optional(),
|
|
3233
|
+
sourceId: z12.string().optional(),
|
|
3234
|
+
width: z12.number().optional(),
|
|
3235
|
+
height: z12.number().optional(),
|
|
3236
|
+
aspectRatio: z12.number().optional(),
|
|
3237
|
+
duration: z12.number().optional(),
|
|
3238
|
+
transcript: z12.string().optional(),
|
|
3239
|
+
transcriptSegments: z12.array(videoTranscriptSegmentSchema).optional(),
|
|
3240
|
+
scenes: z12.array(videoSceneSchema).optional(),
|
|
3241
|
+
descriptionEmbedding: z12.array(z12.number()).optional(),
|
|
3242
|
+
searchText: z12.string().optional(),
|
|
3086
3243
|
status: videoStatusSchema,
|
|
3087
|
-
errorMessage:
|
|
3088
|
-
createdAt:
|
|
3089
|
-
updatedAt:
|
|
3090
|
-
thumbnailUrl:
|
|
3091
|
-
});
|
|
3092
|
-
var videosWebhookResponseSchema =
|
|
3093
|
-
var videosGetRequestSchema =
|
|
3094
|
-
var videosSearchRequestSchema =
|
|
3095
|
-
query:
|
|
3096
|
-
limit:
|
|
3097
|
-
tags:
|
|
3098
|
-
});
|
|
3099
|
-
var videoSearchResultSchema =
|
|
3100
|
-
_id:
|
|
3101
|
-
thumbnailUrl:
|
|
3102
|
-
name:
|
|
3103
|
-
description:
|
|
3104
|
-
tags:
|
|
3105
|
-
status:
|
|
3106
|
-
duration:
|
|
3107
|
-
muxPlaybackId:
|
|
3108
|
-
createdAt:
|
|
3109
|
-
});
|
|
3110
|
-
var videosSearchResponseSchema =
|
|
3111
|
-
var videosUploadResponseSchema =
|
|
3112
|
-
var videosDeleteRequestSchema =
|
|
3113
|
-
var videosDeleteResponseSchema =
|
|
3244
|
+
errorMessage: z12.string().optional(),
|
|
3245
|
+
createdAt: z12.number(),
|
|
3246
|
+
updatedAt: z12.number(),
|
|
3247
|
+
thumbnailUrl: z12.string()
|
|
3248
|
+
});
|
|
3249
|
+
var videosWebhookResponseSchema = z12.object({ ok: z12.literal(true) });
|
|
3250
|
+
var videosGetRequestSchema = z12.object({ id: z12.string().min(1, "Missing id parameter") });
|
|
3251
|
+
var videosSearchRequestSchema = z12.object({
|
|
3252
|
+
query: z12.string().min(1),
|
|
3253
|
+
limit: z12.coerce.number().int().positive().max(100).optional(),
|
|
3254
|
+
tags: z12.array(z12.string()).optional()
|
|
3255
|
+
});
|
|
3256
|
+
var videoSearchResultSchema = z12.object({
|
|
3257
|
+
_id: z12.string(),
|
|
3258
|
+
thumbnailUrl: z12.string(),
|
|
3259
|
+
name: z12.string(),
|
|
3260
|
+
description: z12.string(),
|
|
3261
|
+
tags: z12.array(z12.string()),
|
|
3262
|
+
status: z12.string(),
|
|
3263
|
+
duration: z12.number().optional(),
|
|
3264
|
+
muxPlaybackId: z12.string(),
|
|
3265
|
+
createdAt: z12.number()
|
|
3266
|
+
});
|
|
3267
|
+
var videosSearchResponseSchema = z12.array(videoSearchResultSchema);
|
|
3268
|
+
var videosUploadResponseSchema = z12.object({ uploadUrl: z12.string(), videoId: z12.string() });
|
|
3269
|
+
var videosDeleteRequestSchema = z12.object({ id: z12.string().min(1, "Missing video ID") });
|
|
3270
|
+
var videosDeleteResponseSchema = z12.object({ ok: z12.literal(true) });
|
|
3114
3271
|
|
|
3115
3272
|
// src/commands/actions/complete.ts
|
|
3116
3273
|
import { defineCommand as defineCommand2 } from "citty";
|
|
@@ -4335,37 +4492,37 @@ var GEO_TARGET_CONSTANT_REGEX = /^geoTargetConstants\/\d+$/;
|
|
|
4335
4492
|
var LANGUAGE_CONSTANT_REGEX = /^languageConstants\/\d+$/;
|
|
4336
4493
|
|
|
4337
4494
|
// ../api/src/ads-google/ops.ts
|
|
4338
|
-
import { z as
|
|
4339
|
-
var tempRefSchema2 =
|
|
4340
|
-
var refSchema =
|
|
4341
|
-
|
|
4342
|
-
|
|
4495
|
+
import { z as z13 } from "zod";
|
|
4496
|
+
var tempRefSchema2 = z13.string().regex(TEMP_REF_REGEX2, "expected a g_temp_* reference");
|
|
4497
|
+
var refSchema = z13.union([
|
|
4498
|
+
z13.string().regex(RESOURCE_NAME_REGEX, "expected a customers/\u2026/\u2026/\u2026 resource name"),
|
|
4499
|
+
z13.string().regex(NUMERIC_ID_REGEX2, "expected a numeric id"),
|
|
4343
4500
|
tempRefSchema2
|
|
4344
4501
|
]);
|
|
4345
4502
|
var targetRefSchema = refSchema;
|
|
4346
|
-
var microsSchema =
|
|
4347
|
-
var httpsUrlSchema2 =
|
|
4348
|
-
var customerIdSchema =
|
|
4349
|
-
var stageableStatusSchema2 =
|
|
4350
|
-
var matchTypeSchema =
|
|
4351
|
-
var keywordTextSchema =
|
|
4352
|
-
var budgetCreateSchema =
|
|
4353
|
-
name:
|
|
4503
|
+
var microsSchema = z13.number().int().positive("expected a positive micros amount");
|
|
4504
|
+
var httpsUrlSchema2 = z13.string().url().refine((u) => u.startsWith("https://"), "final URLs must be https");
|
|
4505
|
+
var customerIdSchema = z13.string().regex(NUMERIC_ID_REGEX2, "customerId must be the bare numeric customer id");
|
|
4506
|
+
var stageableStatusSchema2 = z13.enum(STAGEABLE_CREATE_STATUSES2);
|
|
4507
|
+
var matchTypeSchema = z13.enum(KEYWORD_MATCH_TYPES);
|
|
4508
|
+
var keywordTextSchema = z13.string().min(1).max(GOOGLE_ADS_LIMITS.keyword.textMax).refine((t) => t.trim().split(/\s+/).length <= GOOGLE_ADS_LIMITS.keyword.wordsMax, "keyword exceeds 10 words");
|
|
4509
|
+
var budgetCreateSchema = z13.object({
|
|
4510
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax),
|
|
4354
4511
|
amountMicros: microsSchema,
|
|
4355
|
-
deliveryMethod:
|
|
4356
|
-
explicitlyShared:
|
|
4512
|
+
deliveryMethod: z13.enum(BUDGET_DELIVERY_METHODS).default("STANDARD"),
|
|
4513
|
+
explicitlyShared: z13.boolean().default(false)
|
|
4357
4514
|
});
|
|
4358
|
-
var budgetUpdateSchema =
|
|
4359
|
-
name:
|
|
4515
|
+
var budgetUpdateSchema = z13.object({
|
|
4516
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax).optional(),
|
|
4360
4517
|
amountMicros: microsSchema.optional(),
|
|
4361
|
-
deliveryMethod:
|
|
4518
|
+
deliveryMethod: z13.enum(BUDGET_DELIVERY_METHODS).optional()
|
|
4362
4519
|
}).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
|
|
4363
|
-
var biddingConfigSchema =
|
|
4364
|
-
type:
|
|
4520
|
+
var biddingConfigSchema = z13.object({
|
|
4521
|
+
type: z13.enum(BIDDING_STRATEGY_TYPES),
|
|
4365
4522
|
targetCpaMicros: microsSchema.optional(),
|
|
4366
|
-
targetRoas:
|
|
4523
|
+
targetRoas: z13.number().positive().optional(),
|
|
4367
4524
|
cpcBidCeilingMicros: microsSchema.optional(),
|
|
4368
|
-
enhancedCpcEnabled:
|
|
4525
|
+
enhancedCpcEnabled: z13.boolean().optional()
|
|
4369
4526
|
}).superRefine((p, ctx) => {
|
|
4370
4527
|
if (p.type === "TARGET_CPA" && p.targetCpaMicros === void 0) {
|
|
4371
4528
|
ctx.addIssue({ code: "custom", path: ["targetCpaMicros"], message: "TARGET_CPA needs targetCpaMicros" });
|
|
@@ -4374,17 +4531,17 @@ var biddingConfigSchema = z12.object({
|
|
|
4374
4531
|
ctx.addIssue({ code: "custom", path: ["targetRoas"], message: "TARGET_ROAS needs targetRoas" });
|
|
4375
4532
|
}
|
|
4376
4533
|
});
|
|
4377
|
-
var networkSettingsSchema =
|
|
4378
|
-
targetGoogleSearch:
|
|
4379
|
-
targetSearchNetwork:
|
|
4380
|
-
targetContentNetwork:
|
|
4381
|
-
targetPartnerSearchNetwork:
|
|
4534
|
+
var networkSettingsSchema = z13.object({
|
|
4535
|
+
targetGoogleSearch: z13.boolean().optional(),
|
|
4536
|
+
targetSearchNetwork: z13.boolean().optional(),
|
|
4537
|
+
targetContentNetwork: z13.boolean().optional(),
|
|
4538
|
+
targetPartnerSearchNetwork: z13.boolean().optional()
|
|
4382
4539
|
});
|
|
4383
|
-
var dateSchema =
|
|
4384
|
-
var campaignCreateSchema2 =
|
|
4385
|
-
name:
|
|
4386
|
-
channelType:
|
|
4387
|
-
channelSubType:
|
|
4540
|
+
var dateSchema = z13.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected a YYYY-MM-DD date");
|
|
4541
|
+
var campaignCreateSchema2 = z13.object({
|
|
4542
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax),
|
|
4543
|
+
channelType: z13.enum(ADVERTISING_CHANNEL_TYPES),
|
|
4544
|
+
channelSubType: z13.enum(ADVERTISING_CHANNEL_SUB_TYPES).optional(),
|
|
4388
4545
|
budget: refSchema,
|
|
4389
4546
|
/** Inline standard bidding, or a portfolio strategy ref via biddingStrategy. */
|
|
4390
4547
|
bidding: biddingConfigSchema.optional(),
|
|
@@ -4393,7 +4550,7 @@ var campaignCreateSchema2 = z12.object({
|
|
|
4393
4550
|
startDate: dateSchema.optional(),
|
|
4394
4551
|
endDate: dateSchema.optional(),
|
|
4395
4552
|
/** Advisory Google Ads UI objective — drives warnings, not sent to the API. */
|
|
4396
|
-
objective:
|
|
4553
|
+
objective: z13.enum(CAMPAIGN_OBJECTIVES).optional(),
|
|
4397
4554
|
status: stageableStatusSchema2.default("PAUSED")
|
|
4398
4555
|
}).superRefine((p, ctx) => {
|
|
4399
4556
|
if (!p.bidding && !p.biddingStrategy) {
|
|
@@ -4417,129 +4574,129 @@ var campaignCreateSchema2 = z12.object({
|
|
|
4417
4574
|
ctx.addIssue({ code: "custom", path: ["endDate"], message: "endDate must be after startDate" });
|
|
4418
4575
|
}
|
|
4419
4576
|
});
|
|
4420
|
-
var campaignUpdateSchema2 =
|
|
4421
|
-
name:
|
|
4577
|
+
var campaignUpdateSchema2 = z13.object({
|
|
4578
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax).optional(),
|
|
4422
4579
|
budget: refSchema.optional(),
|
|
4423
4580
|
bidding: biddingConfigSchema.optional(),
|
|
4424
4581
|
networkSettings: networkSettingsSchema.optional(),
|
|
4425
4582
|
startDate: dateSchema.optional(),
|
|
4426
4583
|
endDate: dateSchema.optional(),
|
|
4427
|
-
status:
|
|
4584
|
+
status: z13.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
|
|
4428
4585
|
}).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
|
|
4429
|
-
var adGroupCreateSchema =
|
|
4430
|
-
name:
|
|
4586
|
+
var adGroupCreateSchema = z13.object({
|
|
4587
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax),
|
|
4431
4588
|
campaign: refSchema,
|
|
4432
|
-
type:
|
|
4589
|
+
type: z13.enum(AD_GROUP_TYPES).default("SEARCH_STANDARD"),
|
|
4433
4590
|
cpcBidMicros: microsSchema.optional(),
|
|
4434
4591
|
status: stageableStatusSchema2.default("PAUSED")
|
|
4435
4592
|
});
|
|
4436
|
-
var adGroupUpdateSchema =
|
|
4437
|
-
name:
|
|
4593
|
+
var adGroupUpdateSchema = z13.object({
|
|
4594
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax).optional(),
|
|
4438
4595
|
cpcBidMicros: microsSchema.optional(),
|
|
4439
|
-
status:
|
|
4596
|
+
status: z13.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
|
|
4440
4597
|
}).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
|
|
4441
|
-
var keywordAddSchema =
|
|
4598
|
+
var keywordAddSchema = z13.object({
|
|
4442
4599
|
adGroup: refSchema,
|
|
4443
4600
|
text: keywordTextSchema,
|
|
4444
4601
|
matchType: matchTypeSchema,
|
|
4445
4602
|
cpcBidMicros: microsSchema.optional(),
|
|
4446
|
-
finalUrls:
|
|
4603
|
+
finalUrls: z13.array(httpsUrlSchema2).optional(),
|
|
4447
4604
|
status: stageableStatusSchema2.default("ENABLED")
|
|
4448
4605
|
});
|
|
4449
|
-
var keywordUpdateSchema =
|
|
4606
|
+
var keywordUpdateSchema = z13.object({
|
|
4450
4607
|
cpcBidMicros: microsSchema.optional(),
|
|
4451
|
-
finalUrls:
|
|
4452
|
-
status:
|
|
4608
|
+
finalUrls: z13.array(httpsUrlSchema2).optional(),
|
|
4609
|
+
status: z13.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
|
|
4453
4610
|
}).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
|
|
4454
|
-
var negativeKeywordAddSchema =
|
|
4455
|
-
level:
|
|
4611
|
+
var negativeKeywordAddSchema = z13.object({
|
|
4612
|
+
level: z13.enum(["adGroup", "campaign"]),
|
|
4456
4613
|
parent: refSchema,
|
|
4457
4614
|
text: keywordTextSchema,
|
|
4458
4615
|
matchType: matchTypeSchema
|
|
4459
4616
|
});
|
|
4460
|
-
var sharedSetCreateSchema =
|
|
4461
|
-
name:
|
|
4462
|
-
type:
|
|
4617
|
+
var sharedSetCreateSchema = z13.object({
|
|
4618
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.sharedSet.nameMax),
|
|
4619
|
+
type: z13.enum(SHARED_SET_TYPES).default("NEGATIVE_KEYWORDS")
|
|
4463
4620
|
});
|
|
4464
|
-
var sharedSetMemberAddSchema =
|
|
4621
|
+
var sharedSetMemberAddSchema = z13.object({
|
|
4465
4622
|
sharedSet: refSchema,
|
|
4466
4623
|
text: keywordTextSchema,
|
|
4467
4624
|
matchType: matchTypeSchema
|
|
4468
4625
|
});
|
|
4469
|
-
var campaignSharedSetAttachSchema =
|
|
4626
|
+
var campaignSharedSetAttachSchema = z13.object({
|
|
4470
4627
|
campaign: refSchema,
|
|
4471
4628
|
sharedSet: refSchema
|
|
4472
4629
|
});
|
|
4473
|
-
var adTextAssetSchema =
|
|
4474
|
-
text:
|
|
4475
|
-
pinnedField:
|
|
4630
|
+
var adTextAssetSchema = z13.object({
|
|
4631
|
+
text: z13.string().min(1),
|
|
4632
|
+
pinnedField: z13.enum(PINNED_FIELDS).optional()
|
|
4476
4633
|
});
|
|
4477
|
-
var responsiveSearchAdSchema =
|
|
4478
|
-
format:
|
|
4479
|
-
headlines:
|
|
4634
|
+
var responsiveSearchAdSchema = z13.object({
|
|
4635
|
+
format: z13.literal("responsiveSearch"),
|
|
4636
|
+
headlines: z13.array(
|
|
4480
4637
|
adTextAssetSchema.refine(
|
|
4481
4638
|
(a) => a.text.length <= GOOGLE_ADS_LIMITS.responsiveSearchAd.headlineTextMax,
|
|
4482
4639
|
"headline exceeds 30 chars"
|
|
4483
4640
|
)
|
|
4484
4641
|
).min(GOOGLE_ADS_LIMITS.responsiveSearchAd.headlinesMin).max(GOOGLE_ADS_LIMITS.responsiveSearchAd.headlinesMax),
|
|
4485
|
-
descriptions:
|
|
4642
|
+
descriptions: z13.array(
|
|
4486
4643
|
adTextAssetSchema.refine(
|
|
4487
4644
|
(a) => a.text.length <= GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionTextMax,
|
|
4488
4645
|
"description exceeds 90 chars"
|
|
4489
4646
|
)
|
|
4490
4647
|
).min(GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionsMin).max(GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionsMax),
|
|
4491
|
-
path1:
|
|
4492
|
-
path2:
|
|
4493
|
-
finalUrls:
|
|
4494
|
-
});
|
|
4495
|
-
var responsiveDisplayAdSchema =
|
|
4496
|
-
format:
|
|
4497
|
-
headlines:
|
|
4498
|
-
longHeadline:
|
|
4499
|
-
descriptions:
|
|
4500
|
-
businessName:
|
|
4648
|
+
path1: z13.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
|
|
4649
|
+
path2: z13.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
|
|
4650
|
+
finalUrls: z13.array(httpsUrlSchema2).min(1)
|
|
4651
|
+
});
|
|
4652
|
+
var responsiveDisplayAdSchema = z13.object({
|
|
4653
|
+
format: z13.literal("responsiveDisplay"),
|
|
4654
|
+
headlines: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.headlineTextMax) })).min(1).max(5),
|
|
4655
|
+
longHeadline: z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.longHeadlineTextMax) }),
|
|
4656
|
+
descriptions: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.descriptionTextMax) })).min(1).max(5),
|
|
4657
|
+
businessName: z13.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.businessNameMax),
|
|
4501
4658
|
// A Responsive Display Ad's images are fields on the ad's own content (never campaign-level
|
|
4502
4659
|
// asset links). Google requires ≥1 landscape marketing image (1.91:1) AND ≥1 square marketing
|
|
4503
4660
|
// image (1:1) to serve; the logo images are optional.
|
|
4504
|
-
marketingImageAssets:
|
|
4505
|
-
squareMarketingImageAssets:
|
|
4506
|
-
logoImageAssets:
|
|
4507
|
-
finalUrls:
|
|
4508
|
-
});
|
|
4509
|
-
var callAdSchema =
|
|
4510
|
-
format:
|
|
4511
|
-
countryCode:
|
|
4512
|
-
phoneNumber:
|
|
4513
|
-
headline1:
|
|
4514
|
-
headline2:
|
|
4515
|
-
description1:
|
|
4516
|
-
description2:
|
|
4517
|
-
businessName:
|
|
4518
|
-
finalUrls:
|
|
4519
|
-
});
|
|
4520
|
-
var appAdSchema =
|
|
4521
|
-
format:
|
|
4522
|
-
headlines:
|
|
4523
|
-
descriptions:
|
|
4524
|
-
});
|
|
4525
|
-
var videoAdSchema =
|
|
4526
|
-
format:
|
|
4661
|
+
marketingImageAssets: z13.array(refSchema).optional(),
|
|
4662
|
+
squareMarketingImageAssets: z13.array(refSchema).optional(),
|
|
4663
|
+
logoImageAssets: z13.array(refSchema).optional(),
|
|
4664
|
+
finalUrls: z13.array(httpsUrlSchema2).min(1)
|
|
4665
|
+
});
|
|
4666
|
+
var callAdSchema = z13.object({
|
|
4667
|
+
format: z13.literal("call"),
|
|
4668
|
+
countryCode: z13.string().length(2),
|
|
4669
|
+
phoneNumber: z13.string().min(3),
|
|
4670
|
+
headline1: z13.string().min(1).max(30),
|
|
4671
|
+
headline2: z13.string().min(1).max(30),
|
|
4672
|
+
description1: z13.string().min(1).max(90),
|
|
4673
|
+
description2: z13.string().min(1).max(90),
|
|
4674
|
+
businessName: z13.string().min(1).max(25),
|
|
4675
|
+
finalUrls: z13.array(httpsUrlSchema2).min(1)
|
|
4676
|
+
});
|
|
4677
|
+
var appAdSchema = z13.object({
|
|
4678
|
+
format: z13.literal("app"),
|
|
4679
|
+
headlines: z13.array(z13.object({ text: z13.string().min(1).max(30) })).min(1),
|
|
4680
|
+
descriptions: z13.array(z13.object({ text: z13.string().min(1).max(90) })).min(1)
|
|
4681
|
+
});
|
|
4682
|
+
var videoAdSchema = z13.object({
|
|
4683
|
+
format: z13.literal("video"),
|
|
4527
4684
|
// A raw YouTube id is not a publishable Google Ads reference — the video must be staged as
|
|
4528
4685
|
// its own `google.asset.create` (type: youtubeVideo) first, then referenced here by asset ref.
|
|
4529
|
-
videoAssets:
|
|
4530
|
-
finalUrls:
|
|
4531
|
-
});
|
|
4532
|
-
var demandGenAdSchema =
|
|
4533
|
-
format:
|
|
4534
|
-
headlines:
|
|
4535
|
-
descriptions:
|
|
4536
|
-
businessName:
|
|
4537
|
-
finalUrls:
|
|
4538
|
-
imageAssets:
|
|
4539
|
-
squareImageAssets:
|
|
4540
|
-
logoImageAssets:
|
|
4541
|
-
});
|
|
4542
|
-
var adContentSchema2 =
|
|
4686
|
+
videoAssets: z13.array(refSchema).min(1),
|
|
4687
|
+
finalUrls: z13.array(httpsUrlSchema2).min(1)
|
|
4688
|
+
});
|
|
4689
|
+
var demandGenAdSchema = z13.object({
|
|
4690
|
+
format: z13.literal("demandGen"),
|
|
4691
|
+
headlines: z13.array(z13.object({ text: z13.string().min(1).max(40) })).min(1).max(5),
|
|
4692
|
+
descriptions: z13.array(z13.object({ text: z13.string().min(1).max(90) })).min(1).max(5),
|
|
4693
|
+
businessName: z13.string().min(1).max(25),
|
|
4694
|
+
finalUrls: z13.array(httpsUrlSchema2).min(1),
|
|
4695
|
+
imageAssets: z13.array(refSchema).optional(),
|
|
4696
|
+
squareImageAssets: z13.array(refSchema).optional(),
|
|
4697
|
+
logoImageAssets: z13.array(refSchema).optional()
|
|
4698
|
+
});
|
|
4699
|
+
var adContentSchema2 = z13.discriminatedUnion("format", [
|
|
4543
4700
|
responsiveSearchAdSchema,
|
|
4544
4701
|
responsiveDisplayAdSchema,
|
|
4545
4702
|
callAdSchema,
|
|
@@ -4547,45 +4704,45 @@ var adContentSchema2 = z12.discriminatedUnion("format", [
|
|
|
4547
4704
|
videoAdSchema,
|
|
4548
4705
|
demandGenAdSchema
|
|
4549
4706
|
]);
|
|
4550
|
-
var adCreateSchema =
|
|
4707
|
+
var adCreateSchema = z13.object({
|
|
4551
4708
|
adGroup: refSchema,
|
|
4552
4709
|
status: stageableStatusSchema2.default("PAUSED"),
|
|
4553
4710
|
content: adContentSchema2
|
|
4554
4711
|
});
|
|
4555
|
-
var adUpdateSchema =
|
|
4556
|
-
status:
|
|
4712
|
+
var adUpdateSchema = z13.object({
|
|
4713
|
+
status: z13.enum(["ENABLED", "PAUSED", "REMOVED"]).optional(),
|
|
4557
4714
|
/** Whole-content replacement for RSA-like formats; re-validated against adContentSchema. */
|
|
4558
|
-
content:
|
|
4715
|
+
content: z13.record(z13.string(), z13.unknown()).optional()
|
|
4559
4716
|
}).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
|
|
4560
|
-
var textAssetSchema =
|
|
4561
|
-
var imageAssetSchema =
|
|
4562
|
-
type:
|
|
4563
|
-
imageId:
|
|
4564
|
-
name:
|
|
4565
|
-
});
|
|
4566
|
-
var youtubeVideoAssetSchema =
|
|
4567
|
-
type:
|
|
4568
|
-
youtubeVideoId:
|
|
4569
|
-
name:
|
|
4570
|
-
});
|
|
4571
|
-
var sitelinkAssetSchema =
|
|
4572
|
-
type:
|
|
4573
|
-
linkText:
|
|
4574
|
-
description1:
|
|
4575
|
-
description2:
|
|
4576
|
-
finalUrls:
|
|
4577
|
-
});
|
|
4578
|
-
var calloutAssetSchema =
|
|
4579
|
-
type:
|
|
4580
|
-
calloutText:
|
|
4581
|
-
});
|
|
4582
|
-
var structuredSnippetAssetSchema =
|
|
4583
|
-
type:
|
|
4584
|
-
header:
|
|
4585
|
-
values:
|
|
4586
|
-
});
|
|
4587
|
-
var callToActionAssetSchema =
|
|
4588
|
-
var assetCreateSchema =
|
|
4717
|
+
var textAssetSchema = z13.object({ type: z13.literal("text"), text: z13.string().min(1) });
|
|
4718
|
+
var imageAssetSchema = z13.object({
|
|
4719
|
+
type: z13.literal("image"),
|
|
4720
|
+
imageId: z13.string().min(1),
|
|
4721
|
+
name: z13.string().optional()
|
|
4722
|
+
});
|
|
4723
|
+
var youtubeVideoAssetSchema = z13.object({
|
|
4724
|
+
type: z13.literal("youtubeVideo"),
|
|
4725
|
+
youtubeVideoId: z13.string().min(1),
|
|
4726
|
+
name: z13.string().optional()
|
|
4727
|
+
});
|
|
4728
|
+
var sitelinkAssetSchema = z13.object({
|
|
4729
|
+
type: z13.literal("sitelink"),
|
|
4730
|
+
linkText: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax),
|
|
4731
|
+
description1: z13.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
|
|
4732
|
+
description2: z13.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
|
|
4733
|
+
finalUrls: z13.array(httpsUrlSchema2).min(1)
|
|
4734
|
+
});
|
|
4735
|
+
var calloutAssetSchema = z13.object({
|
|
4736
|
+
type: z13.literal("callout"),
|
|
4737
|
+
calloutText: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax)
|
|
4738
|
+
});
|
|
4739
|
+
var structuredSnippetAssetSchema = z13.object({
|
|
4740
|
+
type: z13.literal("structuredSnippet"),
|
|
4741
|
+
header: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax),
|
|
4742
|
+
values: z13.array(z13.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax)
|
|
4743
|
+
});
|
|
4744
|
+
var callToActionAssetSchema = z13.object({ type: z13.literal("callToAction"), callToAction: z13.string().min(1) });
|
|
4745
|
+
var assetCreateSchema = z13.discriminatedUnion("type", [
|
|
4589
4746
|
textAssetSchema,
|
|
4590
4747
|
imageAssetSchema,
|
|
4591
4748
|
youtubeVideoAssetSchema,
|
|
@@ -4594,136 +4751,136 @@ var assetCreateSchema = z12.discriminatedUnion("type", [
|
|
|
4594
4751
|
structuredSnippetAssetSchema,
|
|
4595
4752
|
callToActionAssetSchema
|
|
4596
4753
|
]);
|
|
4597
|
-
var assetUpdateSchema =
|
|
4598
|
-
name:
|
|
4599
|
-
linkText:
|
|
4600
|
-
description1:
|
|
4601
|
-
description2:
|
|
4602
|
-
finalUrls:
|
|
4603
|
-
calloutText:
|
|
4604
|
-
header:
|
|
4605
|
-
values:
|
|
4606
|
-
callToAction:
|
|
4607
|
-
text:
|
|
4754
|
+
var assetUpdateSchema = z13.object({
|
|
4755
|
+
name: z13.string().min(1).optional(),
|
|
4756
|
+
linkText: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax).optional(),
|
|
4757
|
+
description1: z13.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
|
|
4758
|
+
description2: z13.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
|
|
4759
|
+
finalUrls: z13.array(httpsUrlSchema2).min(1).optional(),
|
|
4760
|
+
calloutText: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax).optional(),
|
|
4761
|
+
header: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax).optional(),
|
|
4762
|
+
values: z13.array(z13.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax).optional(),
|
|
4763
|
+
callToAction: z13.string().min(1).optional(),
|
|
4764
|
+
text: z13.string().min(1).optional()
|
|
4608
4765
|
}).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
|
|
4609
|
-
var assetLinkAttachSchema =
|
|
4610
|
-
level:
|
|
4766
|
+
var assetLinkAttachSchema = z13.object({
|
|
4767
|
+
level: z13.enum(["campaign", "adGroup", "customer"]),
|
|
4611
4768
|
parent: refSchema.optional(),
|
|
4612
4769
|
asset: refSchema,
|
|
4613
|
-
fieldType:
|
|
4770
|
+
fieldType: z13.enum(ASSET_FIELD_TYPES)
|
|
4614
4771
|
}).superRefine((value, ctx) => {
|
|
4615
4772
|
if (value.level !== "customer" && !value.parent) {
|
|
4616
4773
|
ctx.addIssue({
|
|
4617
|
-
code:
|
|
4774
|
+
code: z13.ZodIssueCode.custom,
|
|
4618
4775
|
path: ["parent"],
|
|
4619
4776
|
message: `parent is required for a ${value.level}-level asset link (--parent-ref)`
|
|
4620
4777
|
});
|
|
4621
4778
|
}
|
|
4622
4779
|
});
|
|
4623
|
-
var assetGroupCreateSchema =
|
|
4780
|
+
var assetGroupCreateSchema = z13.object({
|
|
4624
4781
|
campaign: refSchema,
|
|
4625
|
-
name:
|
|
4626
|
-
finalUrls:
|
|
4627
|
-
headlines:
|
|
4628
|
-
longHeadlines:
|
|
4629
|
-
descriptions:
|
|
4630
|
-
businessName:
|
|
4631
|
-
imageAssets:
|
|
4632
|
-
squareImageAssets:
|
|
4633
|
-
logoAssets:
|
|
4634
|
-
status:
|
|
4635
|
-
});
|
|
4636
|
-
var assetGroupUpdateSchema =
|
|
4637
|
-
name:
|
|
4638
|
-
finalUrls:
|
|
4639
|
-
status:
|
|
4782
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax),
|
|
4783
|
+
finalUrls: z13.array(httpsUrlSchema2).min(1),
|
|
4784
|
+
headlines: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.headlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.headlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.headlinesMax),
|
|
4785
|
+
longHeadlines: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMax),
|
|
4786
|
+
descriptions: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMin).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMax),
|
|
4787
|
+
businessName: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.businessNameMax),
|
|
4788
|
+
imageAssets: z13.array(refSchema).optional(),
|
|
4789
|
+
squareImageAssets: z13.array(refSchema).optional(),
|
|
4790
|
+
logoAssets: z13.array(refSchema).optional(),
|
|
4791
|
+
status: z13.enum(["ENABLED", "PAUSED"]).default("PAUSED")
|
|
4792
|
+
});
|
|
4793
|
+
var assetGroupUpdateSchema = z13.object({
|
|
4794
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax).optional(),
|
|
4795
|
+
finalUrls: z13.array(httpsUrlSchema2).min(1).optional(),
|
|
4796
|
+
status: z13.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
|
|
4640
4797
|
}).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
|
|
4641
|
-
var audienceCreateSchema2 =
|
|
4642
|
-
name:
|
|
4643
|
-
type:
|
|
4644
|
-
description:
|
|
4798
|
+
var audienceCreateSchema2 = z13.object({
|
|
4799
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.audience.nameMax),
|
|
4800
|
+
type: z13.enum(USER_LIST_TYPES).default("BASIC"),
|
|
4801
|
+
description: z13.string().optional(),
|
|
4645
4802
|
/** Customer-match members (crm-based) — file-first for large lists. */
|
|
4646
|
-
members:
|
|
4647
|
-
sourceFileRef:
|
|
4803
|
+
members: z13.array(z13.record(z13.string(), z13.string())).optional(),
|
|
4804
|
+
sourceFileRef: z13.string().optional()
|
|
4648
4805
|
});
|
|
4649
|
-
var audienceCriterionAttachSchema =
|
|
4650
|
-
level:
|
|
4806
|
+
var audienceCriterionAttachSchema = z13.object({
|
|
4807
|
+
level: z13.enum(["campaign", "adGroup"]),
|
|
4651
4808
|
parent: refSchema,
|
|
4652
4809
|
userList: refSchema,
|
|
4653
|
-
negative:
|
|
4810
|
+
negative: z13.boolean().default(false)
|
|
4654
4811
|
});
|
|
4655
|
-
var conversionActionCreateSchema =
|
|
4656
|
-
name:
|
|
4657
|
-
type:
|
|
4658
|
-
category:
|
|
4659
|
-
countingType:
|
|
4812
|
+
var conversionActionCreateSchema = z13.object({
|
|
4813
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax),
|
|
4814
|
+
type: z13.enum(CONVERSION_ACTION_TYPES).default("WEBPAGE"),
|
|
4815
|
+
category: z13.enum(CONVERSION_ACTION_CATEGORIES).default("DEFAULT"),
|
|
4816
|
+
countingType: z13.enum(CONVERSION_COUNTING_TYPES).default("ONE_PER_CLICK"),
|
|
4660
4817
|
defaultValueMicros: microsSchema.optional(),
|
|
4661
|
-
defaultCurrencyCode:
|
|
4662
|
-
clickThroughLookbackWindowDays:
|
|
4663
|
-
viewThroughLookbackWindowDays:
|
|
4664
|
-
status:
|
|
4665
|
-
});
|
|
4666
|
-
var conversionActionUpdateSchema =
|
|
4667
|
-
name:
|
|
4668
|
-
category:
|
|
4669
|
-
countingType:
|
|
4818
|
+
defaultCurrencyCode: z13.string().length(3).optional(),
|
|
4819
|
+
clickThroughLookbackWindowDays: z13.number().int().positive().optional(),
|
|
4820
|
+
viewThroughLookbackWindowDays: z13.number().int().positive().optional(),
|
|
4821
|
+
status: z13.enum(["ENABLED", "PAUSED"]).default("ENABLED")
|
|
4822
|
+
});
|
|
4823
|
+
var conversionActionUpdateSchema = z13.object({
|
|
4824
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax).optional(),
|
|
4825
|
+
category: z13.enum(CONVERSION_ACTION_CATEGORIES).optional(),
|
|
4826
|
+
countingType: z13.enum(CONVERSION_COUNTING_TYPES).optional(),
|
|
4670
4827
|
defaultValueMicros: microsSchema.optional(),
|
|
4671
|
-
defaultCurrencyCode:
|
|
4672
|
-
clickThroughLookbackWindowDays:
|
|
4673
|
-
viewThroughLookbackWindowDays:
|
|
4674
|
-
status:
|
|
4828
|
+
defaultCurrencyCode: z13.string().length(3).optional(),
|
|
4829
|
+
clickThroughLookbackWindowDays: z13.number().int().positive().optional(),
|
|
4830
|
+
viewThroughLookbackWindowDays: z13.number().int().positive().optional(),
|
|
4831
|
+
status: z13.enum(["ENABLED", "REMOVED", "HIDDEN"]).optional()
|
|
4675
4832
|
}).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
|
|
4676
|
-
var biddingStrategyCreateSchema =
|
|
4677
|
-
name:
|
|
4833
|
+
var biddingStrategyCreateSchema = z13.object({
|
|
4834
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax),
|
|
4678
4835
|
config: biddingConfigSchema
|
|
4679
4836
|
}).superRefine((p, ctx) => {
|
|
4680
4837
|
if (p.config.type === "MANUAL_CPC") {
|
|
4681
4838
|
ctx.addIssue({ code: "custom", path: ["config", "type"], message: "portfolio strategies cannot be Manual CPC" });
|
|
4682
4839
|
}
|
|
4683
4840
|
});
|
|
4684
|
-
var biddingStrategyUpdateSchema =
|
|
4685
|
-
name:
|
|
4841
|
+
var biddingStrategyUpdateSchema = z13.object({
|
|
4842
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax).optional(),
|
|
4686
4843
|
config: biddingConfigSchema.optional()
|
|
4687
4844
|
}).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
|
|
4688
|
-
var labelCreateSchema =
|
|
4689
|
-
name:
|
|
4690
|
-
backgroundColor:
|
|
4691
|
-
description:
|
|
4845
|
+
var labelCreateSchema = z13.object({
|
|
4846
|
+
name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.label.nameMax),
|
|
4847
|
+
backgroundColor: z13.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
|
|
4848
|
+
description: z13.string().optional()
|
|
4692
4849
|
});
|
|
4693
|
-
var labelAttachSchema =
|
|
4694
|
-
level:
|
|
4850
|
+
var labelAttachSchema = z13.object({
|
|
4851
|
+
level: z13.enum(["campaign", "adGroup", "ad"]),
|
|
4695
4852
|
parent: refSchema,
|
|
4696
4853
|
label: refSchema
|
|
4697
4854
|
});
|
|
4698
|
-
var locationCriterionSchema =
|
|
4699
|
-
criterionType:
|
|
4700
|
-
geoTargetConstant:
|
|
4701
|
-
});
|
|
4702
|
-
var languageCriterionSchema =
|
|
4703
|
-
criterionType:
|
|
4704
|
-
languageConstant:
|
|
4705
|
-
});
|
|
4706
|
-
var adScheduleCriterionSchema =
|
|
4707
|
-
criterionType:
|
|
4708
|
-
dayOfWeek:
|
|
4709
|
-
startHour:
|
|
4710
|
-
startMinute:
|
|
4711
|
-
endHour:
|
|
4712
|
-
endMinute:
|
|
4713
|
-
});
|
|
4714
|
-
var deviceCriterionSchema =
|
|
4715
|
-
criterionType:
|
|
4716
|
-
device:
|
|
4855
|
+
var locationCriterionSchema = z13.object({
|
|
4856
|
+
criterionType: z13.literal("location"),
|
|
4857
|
+
geoTargetConstant: z13.union([z13.string().regex(GEO_TARGET_CONSTANT_REGEX), z13.string().regex(NUMERIC_ID_REGEX2)])
|
|
4858
|
+
});
|
|
4859
|
+
var languageCriterionSchema = z13.object({
|
|
4860
|
+
criterionType: z13.literal("language"),
|
|
4861
|
+
languageConstant: z13.union([z13.string().regex(LANGUAGE_CONSTANT_REGEX), z13.string().regex(NUMERIC_ID_REGEX2)])
|
|
4862
|
+
});
|
|
4863
|
+
var adScheduleCriterionSchema = z13.object({
|
|
4864
|
+
criterionType: z13.literal("adSchedule"),
|
|
4865
|
+
dayOfWeek: z13.enum(DAYS_OF_WEEK),
|
|
4866
|
+
startHour: z13.number().int().min(0).max(23),
|
|
4867
|
+
startMinute: z13.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO"),
|
|
4868
|
+
endHour: z13.number().int().min(0).max(24),
|
|
4869
|
+
endMinute: z13.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO")
|
|
4870
|
+
});
|
|
4871
|
+
var deviceCriterionSchema = z13.object({
|
|
4872
|
+
criterionType: z13.literal("device"),
|
|
4873
|
+
device: z13.enum(DEVICE_TYPES),
|
|
4717
4874
|
// Google's `CampaignCriterion.bid_modifier`: "The modifier must be in the range 0.1 - 10.0. Use 0
|
|
4718
4875
|
// to opt out of a Device type." So 0 (exclude the device) and 0.1–10.0 are valid; the (0, 0.1) gap is not.
|
|
4719
|
-
bidModifier:
|
|
4876
|
+
bidModifier: z13.number().min(0).max(10).optional().refine((v) => v === void 0 || v === 0 || v >= 0.1, {
|
|
4720
4877
|
message: "bid modifier must be 0 (exclude the device) or between 0.1 and 10.0"
|
|
4721
4878
|
})
|
|
4722
4879
|
});
|
|
4723
|
-
var campaignCriterionAddSchema =
|
|
4880
|
+
var campaignCriterionAddSchema = z13.object({
|
|
4724
4881
|
campaign: refSchema,
|
|
4725
|
-
negative:
|
|
4726
|
-
criterion:
|
|
4882
|
+
negative: z13.boolean().default(false),
|
|
4883
|
+
criterion: z13.discriminatedUnion("criterionType", [
|
|
4727
4884
|
locationCriterionSchema,
|
|
4728
4885
|
languageCriterionSchema,
|
|
4729
4886
|
adScheduleCriterionSchema,
|
|
@@ -4733,7 +4890,7 @@ var campaignCriterionAddSchema = z12.object({
|
|
|
4733
4890
|
const c = val.criterion;
|
|
4734
4891
|
if (c.criterionType === "adSchedule" && c.endHour === 24 && c.endMinute !== "ZERO") {
|
|
4735
4892
|
ctx.addIssue({
|
|
4736
|
-
code:
|
|
4893
|
+
code: z13.ZodIssueCode.custom,
|
|
4737
4894
|
message: "endHour 24 (midnight) cannot have a non-zero endMinute",
|
|
4738
4895
|
path: ["criterion", "endMinute"]
|
|
4739
4896
|
});
|
|
@@ -4785,17 +4942,17 @@ var GOOGLE_DRAFT_OP_KINDS = [
|
|
|
4785
4942
|
"google.campaignCriterion.add",
|
|
4786
4943
|
"google.campaignCriterion.remove"
|
|
4787
4944
|
];
|
|
4788
|
-
var googleDraftOpKindSchema =
|
|
4945
|
+
var googleDraftOpKindSchema = z13.enum(GOOGLE_DRAFT_OP_KINDS);
|
|
4789
4946
|
function createOp2(kind, payload) {
|
|
4790
|
-
return
|
|
4947
|
+
return z13.object({ kind: z13.literal(kind), customerId: customerIdSchema, payload });
|
|
4791
4948
|
}
|
|
4792
4949
|
function updateOp2(kind, payload) {
|
|
4793
|
-
return
|
|
4950
|
+
return z13.object({ kind: z13.literal(kind), customerId: customerIdSchema, target: targetRefSchema, payload });
|
|
4794
4951
|
}
|
|
4795
4952
|
function targetOp(kind) {
|
|
4796
|
-
return
|
|
4953
|
+
return z13.object({ kind: z13.literal(kind), customerId: customerIdSchema, target: targetRefSchema });
|
|
4797
4954
|
}
|
|
4798
|
-
var googleDraftOpInputSchema =
|
|
4955
|
+
var googleDraftOpInputSchema = z13.discriminatedUnion("kind", [
|
|
4799
4956
|
createOp2("google.budget.create", budgetCreateSchema),
|
|
4800
4957
|
updateOp2("google.budget.update", budgetUpdateSchema),
|
|
4801
4958
|
createOp2("google.campaign.create", campaignCreateSchema2),
|
|
@@ -4843,143 +5000,143 @@ var googleDraftOpInputSchema = z12.discriminatedUnion("kind", [
|
|
|
4843
5000
|
]);
|
|
4844
5001
|
|
|
4845
5002
|
// ../api/src/ads-google/wire.ts
|
|
4846
|
-
import { z as
|
|
4847
|
-
var googleWriteModeSchema =
|
|
4848
|
-
var googleDraftOpResultSchema =
|
|
4849
|
-
status:
|
|
4850
|
-
resourceName:
|
|
4851
|
-
error:
|
|
4852
|
-
skippedBecause:
|
|
4853
|
-
executedAt:
|
|
4854
|
-
});
|
|
4855
|
-
var googleDraftStageRequestSchema =
|
|
4856
|
-
chatId:
|
|
5003
|
+
import { z as z14 } from "zod";
|
|
5004
|
+
var googleWriteModeSchema = z14.enum(["live", "simulated"]);
|
|
5005
|
+
var googleDraftOpResultSchema = z14.object({
|
|
5006
|
+
status: z14.enum(["applied", "simulated", "failed", "skipped"]),
|
|
5007
|
+
resourceName: z14.string().optional(),
|
|
5008
|
+
error: z14.string().optional(),
|
|
5009
|
+
skippedBecause: z14.string().optional(),
|
|
5010
|
+
executedAt: z14.number().optional()
|
|
5011
|
+
});
|
|
5012
|
+
var googleDraftStageRequestSchema = z14.object({
|
|
5013
|
+
chatId: z14.string(),
|
|
4857
5014
|
op: googleDraftOpInputSchema
|
|
4858
5015
|
});
|
|
4859
|
-
var googleDraftStageResponseSchema =
|
|
4860
|
-
|
|
4861
|
-
staged:
|
|
4862
|
-
ref:
|
|
5016
|
+
var googleDraftStageResponseSchema = z14.discriminatedUnion("staged", [
|
|
5017
|
+
z14.object({
|
|
5018
|
+
staged: z14.literal(true),
|
|
5019
|
+
ref: z14.string(),
|
|
4863
5020
|
kind: googleDraftOpKindSchema,
|
|
4864
5021
|
mode: googleWriteModeSchema,
|
|
4865
|
-
dependsOn:
|
|
4866
|
-
summary:
|
|
4867
|
-
warnings:
|
|
5022
|
+
dependsOn: z14.array(z14.string()),
|
|
5023
|
+
summary: z14.string(),
|
|
5024
|
+
warnings: z14.array(z14.string()),
|
|
4868
5025
|
/** True when the op amended an already-staged op in place instead of appending a new one. */
|
|
4869
|
-
amended:
|
|
5026
|
+
amended: z14.boolean().optional()
|
|
4870
5027
|
}),
|
|
4871
|
-
|
|
4872
|
-
staged:
|
|
4873
|
-
noop:
|
|
5028
|
+
z14.object({
|
|
5029
|
+
staged: z14.literal(false),
|
|
5030
|
+
noop: z14.literal(true),
|
|
4874
5031
|
kind: googleDraftOpKindSchema,
|
|
4875
5032
|
mode: googleWriteModeSchema,
|
|
4876
|
-
summary:
|
|
4877
|
-
reason:
|
|
5033
|
+
summary: z14.string(),
|
|
5034
|
+
reason: z14.string()
|
|
4878
5035
|
})
|
|
4879
5036
|
]);
|
|
4880
|
-
var googleDraftAmendRequestSchema =
|
|
4881
|
-
chatId:
|
|
4882
|
-
ref:
|
|
4883
|
-
patch:
|
|
5037
|
+
var googleDraftAmendRequestSchema = z14.object({
|
|
5038
|
+
chatId: z14.string(),
|
|
5039
|
+
ref: z14.string(),
|
|
5040
|
+
patch: z14.record(z14.string(), z14.unknown())
|
|
4884
5041
|
});
|
|
4885
|
-
var googleDraftShowRequestSchema =
|
|
4886
|
-
chatId:
|
|
4887
|
-
ref:
|
|
5042
|
+
var googleDraftShowRequestSchema = z14.object({
|
|
5043
|
+
chatId: z14.string(),
|
|
5044
|
+
ref: z14.string()
|
|
4888
5045
|
});
|
|
4889
5046
|
var GOOGLE_DRAFT_BATCH_MAX = 500;
|
|
4890
|
-
var googleDraftStageBatchRequestSchema =
|
|
4891
|
-
chatId:
|
|
4892
|
-
ops:
|
|
5047
|
+
var googleDraftStageBatchRequestSchema = z14.object({
|
|
5048
|
+
chatId: z14.string(),
|
|
5049
|
+
ops: z14.array(googleDraftOpInputSchema).min(1).max(GOOGLE_DRAFT_BATCH_MAX)
|
|
4893
5050
|
});
|
|
4894
|
-
var googleDraftStageBatchResponseSchema =
|
|
4895
|
-
staged:
|
|
5051
|
+
var googleDraftStageBatchResponseSchema = z14.object({
|
|
5052
|
+
staged: z14.literal(true),
|
|
4896
5053
|
mode: googleWriteModeSchema,
|
|
4897
|
-
count:
|
|
4898
|
-
ops:
|
|
4899
|
-
|
|
4900
|
-
ref:
|
|
5054
|
+
count: z14.number(),
|
|
5055
|
+
ops: z14.array(
|
|
5056
|
+
z14.object({
|
|
5057
|
+
ref: z14.string(),
|
|
4901
5058
|
kind: googleDraftOpKindSchema,
|
|
4902
|
-
dependsOn:
|
|
4903
|
-
summary:
|
|
4904
|
-
warnings:
|
|
5059
|
+
dependsOn: z14.array(z14.string()),
|
|
5060
|
+
summary: z14.string(),
|
|
5061
|
+
warnings: z14.array(z14.string())
|
|
4905
5062
|
})
|
|
4906
5063
|
),
|
|
4907
|
-
skipped:
|
|
5064
|
+
skipped: z14.array(z14.object({ kind: googleDraftOpKindSchema, summary: z14.string(), reason: z14.string() })).optional()
|
|
4908
5065
|
});
|
|
4909
|
-
var googleDraftOpViewSchema =
|
|
4910
|
-
ref:
|
|
5066
|
+
var googleDraftOpViewSchema = z14.object({
|
|
5067
|
+
ref: z14.string(),
|
|
4911
5068
|
kind: googleDraftOpKindSchema,
|
|
4912
|
-
customerId:
|
|
4913
|
-
target:
|
|
4914
|
-
dependsOn:
|
|
4915
|
-
summary:
|
|
4916
|
-
stagedAt:
|
|
5069
|
+
customerId: z14.string(),
|
|
5070
|
+
target: z14.string().optional(),
|
|
5071
|
+
dependsOn: z14.array(z14.string()),
|
|
5072
|
+
summary: z14.string(),
|
|
5073
|
+
stagedAt: z14.number(),
|
|
4917
5074
|
result: googleDraftOpResultSchema.optional()
|
|
4918
5075
|
});
|
|
4919
|
-
var googleDraftShowResponseSchema =
|
|
5076
|
+
var googleDraftShowResponseSchema = z14.object({
|
|
4920
5077
|
op: googleDraftOpViewSchema.extend({
|
|
4921
|
-
payload:
|
|
4922
|
-
warnings:
|
|
4923
|
-
annotations:
|
|
5078
|
+
payload: z14.unknown().optional(),
|
|
5079
|
+
warnings: z14.array(z14.string()).optional(),
|
|
5080
|
+
annotations: z14.unknown().optional()
|
|
4924
5081
|
})
|
|
4925
5082
|
});
|
|
4926
|
-
var googleDraftListRequestSchema =
|
|
4927
|
-
chatId:
|
|
5083
|
+
var googleDraftListRequestSchema = z14.object({
|
|
5084
|
+
chatId: z14.string()
|
|
4928
5085
|
});
|
|
4929
|
-
var googleDraftAdvisorySchema =
|
|
4930
|
-
scope:
|
|
4931
|
-
message:
|
|
5086
|
+
var googleDraftAdvisorySchema = z14.object({
|
|
5087
|
+
scope: z14.enum(["campaign", "adGroup"]),
|
|
5088
|
+
message: z14.string()
|
|
4932
5089
|
});
|
|
4933
|
-
var googleDraftStatusCollectionSchema =
|
|
4934
|
-
label:
|
|
4935
|
-
added:
|
|
4936
|
-
removed:
|
|
4937
|
-
existing:
|
|
5090
|
+
var googleDraftStatusCollectionSchema = z14.object({
|
|
5091
|
+
label: z14.string(),
|
|
5092
|
+
added: z14.number(),
|
|
5093
|
+
removed: z14.number(),
|
|
5094
|
+
existing: z14.number()
|
|
4938
5095
|
});
|
|
4939
|
-
var googleDraftChangeOperationSchema =
|
|
4940
|
-
var googleDraftStatusNodeSchema =
|
|
4941
|
-
() =>
|
|
4942
|
-
entity:
|
|
4943
|
-
name:
|
|
5096
|
+
var googleDraftChangeOperationSchema = z14.enum(["create", "update", "pause", "resume", "remove"]);
|
|
5097
|
+
var googleDraftStatusNodeSchema = z14.lazy(
|
|
5098
|
+
() => z14.object({
|
|
5099
|
+
entity: z14.string(),
|
|
5100
|
+
name: z14.string(),
|
|
4944
5101
|
operation: googleDraftChangeOperationSchema.optional(),
|
|
4945
|
-
existing:
|
|
4946
|
-
collections:
|
|
4947
|
-
children:
|
|
4948
|
-
warnings:
|
|
5102
|
+
existing: z14.boolean(),
|
|
5103
|
+
collections: z14.array(googleDraftStatusCollectionSchema),
|
|
5104
|
+
children: z14.array(googleDraftStatusNodeSchema),
|
|
5105
|
+
warnings: z14.array(z14.string()).optional()
|
|
4949
5106
|
})
|
|
4950
5107
|
);
|
|
4951
|
-
var googleDraftListResponseSchema =
|
|
4952
|
-
status:
|
|
5108
|
+
var googleDraftListResponseSchema = z14.object({
|
|
5109
|
+
status: z14.enum(["active", "publishing", "applied", "discarded", "none"]),
|
|
4953
5110
|
mode: googleWriteModeSchema,
|
|
4954
|
-
count:
|
|
4955
|
-
ops:
|
|
5111
|
+
count: z14.number(),
|
|
5112
|
+
ops: z14.array(googleDraftOpViewSchema),
|
|
4956
5113
|
/** Grouped campaign ▸ ad group ▸ ad tree for the readable CLI status view. */
|
|
4957
|
-
tree:
|
|
5114
|
+
tree: z14.array(googleDraftStatusNodeSchema).optional(),
|
|
4958
5115
|
/** Non-blocking completeness advisories for the whole draft. */
|
|
4959
|
-
advisories:
|
|
5116
|
+
advisories: z14.array(googleDraftAdvisorySchema).optional()
|
|
4960
5117
|
});
|
|
4961
|
-
var googleDraftRemoveRequestSchema =
|
|
4962
|
-
chatId:
|
|
4963
|
-
ref:
|
|
5118
|
+
var googleDraftRemoveRequestSchema = z14.object({
|
|
5119
|
+
chatId: z14.string(),
|
|
5120
|
+
ref: z14.string()
|
|
4964
5121
|
});
|
|
4965
|
-
var googleDraftRemoveResponseSchema =
|
|
5122
|
+
var googleDraftRemoveResponseSchema = z14.object({
|
|
4966
5123
|
/** The requested ref plus any dependents removed by cascade. */
|
|
4967
|
-
removed:
|
|
5124
|
+
removed: z14.array(z14.string())
|
|
4968
5125
|
});
|
|
4969
|
-
var googleDraftClearRequestSchema =
|
|
4970
|
-
chatId:
|
|
5126
|
+
var googleDraftClearRequestSchema = z14.object({
|
|
5127
|
+
chatId: z14.string()
|
|
4971
5128
|
});
|
|
4972
|
-
var googleDraftClearResponseSchema =
|
|
4973
|
-
cleared:
|
|
5129
|
+
var googleDraftClearResponseSchema = z14.object({
|
|
5130
|
+
cleared: z14.number()
|
|
4974
5131
|
});
|
|
4975
|
-
var googleFieldErrorSchema =
|
|
4976
|
-
path:
|
|
4977
|
-
message:
|
|
5132
|
+
var googleFieldErrorSchema = z14.object({
|
|
5133
|
+
path: z14.string(),
|
|
5134
|
+
message: z14.string()
|
|
4978
5135
|
});
|
|
4979
|
-
var googleDraftErrorResponseSchema =
|
|
4980
|
-
code:
|
|
4981
|
-
error:
|
|
4982
|
-
fields:
|
|
5136
|
+
var googleDraftErrorResponseSchema = z14.object({
|
|
5137
|
+
code: z14.string(),
|
|
5138
|
+
error: z14.string(),
|
|
5139
|
+
fields: z14.array(googleFieldErrorSchema).optional()
|
|
4983
5140
|
});
|
|
4984
5141
|
|
|
4985
5142
|
// src/commands/ads/google/changes-window.ts
|
|
@@ -12025,17 +12182,17 @@ var NUMERIC_ID_REGEX3 = /^\d+$/;
|
|
|
12025
12182
|
var IMAGE_HASH_REGEX = /^[A-Fa-f0-9]{16,}$/;
|
|
12026
12183
|
|
|
12027
12184
|
// ../api/src/ads-meta/ops.ts
|
|
12028
|
-
import { z as
|
|
12029
|
-
var tempRefSchema3 =
|
|
12030
|
-
var parentRefSchema2 =
|
|
12031
|
-
var moneySchema2 =
|
|
12032
|
-
amount:
|
|
12033
|
-
currencyCode:
|
|
12034
|
-
});
|
|
12035
|
-
var httpsUrlSchema3 =
|
|
12036
|
-
var bakerMediaIdSchema2 =
|
|
12037
|
-
var stageableStatusSchema3 =
|
|
12038
|
-
var updateStatusSchema =
|
|
12185
|
+
import { z as z15 } from "zod";
|
|
12186
|
+
var tempRefSchema3 = z15.string().regex(TEMP_REF_REGEX3, "expected a meta_temp_* reference");
|
|
12187
|
+
var parentRefSchema2 = z15.union([z15.string().regex(NUMERIC_ID_REGEX3, "expected a numeric id"), tempRefSchema3]);
|
|
12188
|
+
var moneySchema2 = z15.object({
|
|
12189
|
+
amount: z15.string().regex(/^\d+(\.\d{1,2})?$/, "expected a decimal amount like 50 or 50.00").refine((val) => Number(val) > 0, "amount must be greater than zero"),
|
|
12190
|
+
currencyCode: z15.string().length(3).optional()
|
|
12191
|
+
});
|
|
12192
|
+
var httpsUrlSchema3 = z15.string().url().refine((u) => u.startsWith("https://"), "destination URLs must be https");
|
|
12193
|
+
var bakerMediaIdSchema2 = z15.string().min(1);
|
|
12194
|
+
var stageableStatusSchema3 = z15.enum(STAGEABLE_CREATE_STATUSES3);
|
|
12195
|
+
var updateStatusSchema = z15.enum(UPDATE_STATUSES);
|
|
12039
12196
|
function currencyMinimums2(currencyCode) {
|
|
12040
12197
|
return CURRENCY_MINIMUMS2[currencyCode] ?? DEFAULT_CURRENCY_MINIMUM2;
|
|
12041
12198
|
}
|
|
@@ -12047,35 +12204,35 @@ function validateDailyBudgetFloor(money, ctx, path28) {
|
|
|
12047
12204
|
}
|
|
12048
12205
|
}
|
|
12049
12206
|
}
|
|
12050
|
-
var geoLocationsSchema =
|
|
12051
|
-
countries:
|
|
12052
|
-
regions:
|
|
12053
|
-
cities:
|
|
12054
|
-
zips:
|
|
12055
|
-
location_types:
|
|
12056
|
-
}).catchall(
|
|
12057
|
-
var idNameSchema =
|
|
12058
|
-
var metaTargetingSchema =
|
|
12207
|
+
var geoLocationsSchema = z15.object({
|
|
12208
|
+
countries: z15.array(z15.string().length(2)).optional(),
|
|
12209
|
+
regions: z15.array(z15.object({ key: z15.string() })).optional(),
|
|
12210
|
+
cities: z15.array(z15.object({ key: z15.string(), radius: z15.number().optional(), distance_unit: z15.string().optional() })).optional(),
|
|
12211
|
+
zips: z15.array(z15.object({ key: z15.string() })).optional(),
|
|
12212
|
+
location_types: z15.array(z15.string()).optional()
|
|
12213
|
+
}).catchall(z15.unknown());
|
|
12214
|
+
var idNameSchema = z15.object({ id: z15.string(), name: z15.string().optional() });
|
|
12215
|
+
var metaTargetingSchema = z15.object({
|
|
12059
12216
|
geo_locations: geoLocationsSchema.optional(),
|
|
12060
12217
|
excluded_geo_locations: geoLocationsSchema.optional(),
|
|
12061
|
-
age_min:
|
|
12062
|
-
age_max:
|
|
12063
|
-
genders:
|
|
12064
|
-
locales:
|
|
12065
|
-
interests:
|
|
12066
|
-
behaviors:
|
|
12067
|
-
custom_audiences:
|
|
12068
|
-
excluded_custom_audiences:
|
|
12069
|
-
flexible_spec:
|
|
12070
|
-
exclusions:
|
|
12071
|
-
publisher_platforms:
|
|
12072
|
-
facebook_positions:
|
|
12073
|
-
instagram_positions:
|
|
12074
|
-
audience_network_positions:
|
|
12075
|
-
messenger_positions:
|
|
12076
|
-
device_platforms:
|
|
12077
|
-
targeting_automation:
|
|
12078
|
-
}).catchall(
|
|
12218
|
+
age_min: z15.number().int().min(13).max(65).optional(),
|
|
12219
|
+
age_max: z15.number().int().min(13).max(65).optional(),
|
|
12220
|
+
genders: z15.array(z15.union([z15.literal(1), z15.literal(2)])).optional(),
|
|
12221
|
+
locales: z15.array(z15.number().int()).optional(),
|
|
12222
|
+
interests: z15.array(idNameSchema).optional(),
|
|
12223
|
+
behaviors: z15.array(idNameSchema).optional(),
|
|
12224
|
+
custom_audiences: z15.array(z15.object({ id: parentRefSchema2 })).optional(),
|
|
12225
|
+
excluded_custom_audiences: z15.array(z15.object({ id: parentRefSchema2 })).optional(),
|
|
12226
|
+
flexible_spec: z15.array(z15.record(z15.string(), z15.unknown())).optional(),
|
|
12227
|
+
exclusions: z15.record(z15.string(), z15.unknown()).optional(),
|
|
12228
|
+
publisher_platforms: z15.array(z15.string()).optional(),
|
|
12229
|
+
facebook_positions: z15.array(z15.string()).optional(),
|
|
12230
|
+
instagram_positions: z15.array(z15.string()).optional(),
|
|
12231
|
+
audience_network_positions: z15.array(z15.string()).optional(),
|
|
12232
|
+
messenger_positions: z15.array(z15.string()).optional(),
|
|
12233
|
+
device_platforms: z15.array(z15.string()).optional(),
|
|
12234
|
+
targeting_automation: z15.object({ advantage_audience: z15.union([z15.literal(0), z15.literal(1)]) }).partial().optional()
|
|
12235
|
+
}).catchall(z15.unknown());
|
|
12079
12236
|
var GEO_INCLUSION_KEYS = [
|
|
12080
12237
|
"countries",
|
|
12081
12238
|
"country_groups",
|
|
@@ -12114,21 +12271,21 @@ function targetingHardLimitsDemographics(t) {
|
|
|
12114
12271
|
const narrowsGender = Array.isArray(t.genders) && t.genders.length === 1;
|
|
12115
12272
|
return narrowsAgeMax || narrowsAgeMin || narrowsGender;
|
|
12116
12273
|
}
|
|
12117
|
-
var specialAdCategoriesSchema =
|
|
12118
|
-
var campaignCreateSchema3 =
|
|
12119
|
-
name:
|
|
12120
|
-
objective:
|
|
12274
|
+
var specialAdCategoriesSchema = z15.array(z15.enum(SPECIAL_AD_CATEGORIES)).default(["NONE"]);
|
|
12275
|
+
var campaignCreateSchema3 = z15.object({
|
|
12276
|
+
name: z15.string().min(1).max(META_LIMITS.campaign.nameMax),
|
|
12277
|
+
objective: z15.enum(OBJECTIVES),
|
|
12121
12278
|
status: stageableStatusSchema3.default("PAUSED"),
|
|
12122
12279
|
special_ad_categories: specialAdCategoriesSchema,
|
|
12123
|
-
special_ad_category_country:
|
|
12124
|
-
buying_type:
|
|
12125
|
-
bid_strategy:
|
|
12280
|
+
special_ad_category_country: z15.array(z15.string().length(2)).optional(),
|
|
12281
|
+
buying_type: z15.enum(BUYING_TYPES).default("AUCTION"),
|
|
12282
|
+
bid_strategy: z15.enum(BID_STRATEGIES).optional(),
|
|
12126
12283
|
/** Campaign Budget Optimization (Advantage campaign budget) — mutually exclusive with ad-set budgets. */
|
|
12127
12284
|
dailyBudget: moneySchema2.optional(),
|
|
12128
12285
|
lifetimeBudget: moneySchema2.optional(),
|
|
12129
12286
|
spendCap: moneySchema2.optional(),
|
|
12130
|
-
start_time:
|
|
12131
|
-
stop_time:
|
|
12287
|
+
start_time: z15.number().int().positive().optional(),
|
|
12288
|
+
stop_time: z15.number().int().positive().optional()
|
|
12132
12289
|
}).superRefine((p, ctx) => {
|
|
12133
12290
|
if (p.dailyBudget && p.lifetimeBudget) {
|
|
12134
12291
|
ctx.addIssue({ code: "custom", path: ["dailyBudget"], message: "set only one of dailyBudget or lifetimeBudget" });
|
|
@@ -12146,15 +12303,15 @@ var campaignCreateSchema3 = z14.object({
|
|
|
12146
12303
|
});
|
|
12147
12304
|
}
|
|
12148
12305
|
});
|
|
12149
|
-
var campaignUpdateSchema3 =
|
|
12150
|
-
name:
|
|
12306
|
+
var campaignUpdateSchema3 = z15.object({
|
|
12307
|
+
name: z15.string().min(1).max(META_LIMITS.campaign.nameMax).optional(),
|
|
12151
12308
|
status: updateStatusSchema.optional(),
|
|
12152
|
-
bid_strategy:
|
|
12309
|
+
bid_strategy: z15.enum(BID_STRATEGIES).optional(),
|
|
12153
12310
|
dailyBudget: moneySchema2.optional(),
|
|
12154
12311
|
lifetimeBudget: moneySchema2.optional(),
|
|
12155
12312
|
spendCap: moneySchema2.optional(),
|
|
12156
|
-
start_time:
|
|
12157
|
-
stop_time:
|
|
12313
|
+
start_time: z15.number().int().positive().optional(),
|
|
12314
|
+
stop_time: z15.number().int().positive().optional()
|
|
12158
12315
|
}).superRefine((p, ctx) => {
|
|
12159
12316
|
if (!Object.values(p).some((val) => val !== void 0)) {
|
|
12160
12317
|
ctx.addIssue({ code: "custom", message: "update needs at least one field" });
|
|
@@ -12164,42 +12321,42 @@ var campaignUpdateSchema3 = z14.object({
|
|
|
12164
12321
|
}
|
|
12165
12322
|
validateDailyBudgetFloor(p.dailyBudget, ctx, ["dailyBudget", "amount"]);
|
|
12166
12323
|
});
|
|
12167
|
-
var promotedObjectSchema =
|
|
12324
|
+
var promotedObjectSchema = z15.object({
|
|
12168
12325
|
page_id: parentRefSchema2.optional(),
|
|
12169
|
-
pixel_id:
|
|
12170
|
-
custom_event_type:
|
|
12171
|
-
application_id:
|
|
12172
|
-
object_store_url:
|
|
12173
|
-
product_catalog_id:
|
|
12174
|
-
product_set_id:
|
|
12175
|
-
whatsapp_phone_number:
|
|
12176
|
-
offline_conversion_data_set_id:
|
|
12326
|
+
pixel_id: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
|
|
12327
|
+
custom_event_type: z15.enum(CUSTOM_EVENT_TYPES).optional(),
|
|
12328
|
+
application_id: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
|
|
12329
|
+
object_store_url: z15.string().url().optional(),
|
|
12330
|
+
product_catalog_id: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
|
|
12331
|
+
product_set_id: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
|
|
12332
|
+
whatsapp_phone_number: z15.string().optional(),
|
|
12333
|
+
offline_conversion_data_set_id: z15.string().regex(NUMERIC_ID_REGEX3).optional()
|
|
12177
12334
|
}).partial();
|
|
12178
|
-
var attributionSpecSchema =
|
|
12179
|
-
|
|
12180
|
-
event_type:
|
|
12181
|
-
window_days:
|
|
12335
|
+
var attributionSpecSchema = z15.array(
|
|
12336
|
+
z15.object({
|
|
12337
|
+
event_type: z15.enum(ATTRIBUTION_EVENT_TYPES),
|
|
12338
|
+
window_days: z15.union([z15.literal(1), z15.literal(7), z15.literal(28)])
|
|
12182
12339
|
})
|
|
12183
12340
|
);
|
|
12184
12341
|
var adSetFields = {
|
|
12185
|
-
name:
|
|
12342
|
+
name: z15.string().min(1).max(META_LIMITS.adSet.nameMax),
|
|
12186
12343
|
campaign_id: parentRefSchema2,
|
|
12187
12344
|
status: stageableStatusSchema3.default("PAUSED"),
|
|
12188
12345
|
dailyBudget: moneySchema2.optional(),
|
|
12189
12346
|
lifetimeBudget: moneySchema2.optional(),
|
|
12190
12347
|
bidAmount: moneySchema2.optional(),
|
|
12191
|
-
bid_strategy:
|
|
12192
|
-
billing_event:
|
|
12193
|
-
optimization_goal:
|
|
12194
|
-
destination_type:
|
|
12348
|
+
bid_strategy: z15.enum(BID_STRATEGIES).optional(),
|
|
12349
|
+
billing_event: z15.enum(BILLING_EVENTS),
|
|
12350
|
+
optimization_goal: z15.enum(OPTIMIZATION_GOALS),
|
|
12351
|
+
destination_type: z15.enum(DESTINATION_TYPES).optional(),
|
|
12195
12352
|
promoted_object: promotedObjectSchema.optional(),
|
|
12196
12353
|
attribution_spec: attributionSpecSchema.optional(),
|
|
12197
|
-
start_time:
|
|
12198
|
-
end_time:
|
|
12354
|
+
start_time: z15.number().int().positive().optional(),
|
|
12355
|
+
end_time: z15.number().int().positive().optional(),
|
|
12199
12356
|
targeting: metaTargetingSchema,
|
|
12200
12357
|
/** EU Digital Services Act: who benefits from / pays for the ad. Auto-filled from the account for EU geo when omitted. */
|
|
12201
|
-
dsa_beneficiary:
|
|
12202
|
-
dsa_payor:
|
|
12358
|
+
dsa_beneficiary: z15.string().min(1).max(100).optional(),
|
|
12359
|
+
dsa_payor: z15.string().min(1).max(100).optional()
|
|
12203
12360
|
};
|
|
12204
12361
|
function validateBidStrategy(p, ctx) {
|
|
12205
12362
|
const strategy = p.bid_strategy;
|
|
@@ -12296,7 +12453,7 @@ function validateAdvantageAudience(p, ctx) {
|
|
|
12296
12453
|
});
|
|
12297
12454
|
}
|
|
12298
12455
|
}
|
|
12299
|
-
var adSetCreateSchema =
|
|
12456
|
+
var adSetCreateSchema = z15.object(adSetFields).superRefine((p, ctx) => {
|
|
12300
12457
|
validateAdSetBudgetAndBid(p, ctx);
|
|
12301
12458
|
validateAdSetPromotedObject(p, ctx);
|
|
12302
12459
|
validateAdvantageAudience(p, ctx);
|
|
@@ -12308,22 +12465,22 @@ var adSetCreateSchema = z14.object(adSetFields).superRefine((p, ctx) => {
|
|
|
12308
12465
|
});
|
|
12309
12466
|
}
|
|
12310
12467
|
});
|
|
12311
|
-
var adSetUpdateSchema =
|
|
12468
|
+
var adSetUpdateSchema = z15.object({
|
|
12312
12469
|
name: adSetFields.name.optional(),
|
|
12313
12470
|
status: updateStatusSchema.optional(),
|
|
12314
12471
|
dailyBudget: moneySchema2.optional(),
|
|
12315
12472
|
lifetimeBudget: moneySchema2.optional(),
|
|
12316
12473
|
bidAmount: moneySchema2.optional(),
|
|
12317
|
-
bid_strategy:
|
|
12318
|
-
optimization_goal:
|
|
12319
|
-
destination_type:
|
|
12474
|
+
bid_strategy: z15.enum(BID_STRATEGIES).optional(),
|
|
12475
|
+
optimization_goal: z15.enum(OPTIMIZATION_GOALS).optional(),
|
|
12476
|
+
destination_type: z15.enum(DESTINATION_TYPES).optional(),
|
|
12320
12477
|
promoted_object: promotedObjectSchema.optional(),
|
|
12321
12478
|
attribution_spec: attributionSpecSchema.optional(),
|
|
12322
|
-
start_time:
|
|
12323
|
-
end_time:
|
|
12479
|
+
start_time: z15.number().int().positive().optional(),
|
|
12480
|
+
end_time: z15.number().int().positive().optional(),
|
|
12324
12481
|
targeting: metaTargetingSchema.optional(),
|
|
12325
|
-
dsa_beneficiary:
|
|
12326
|
-
dsa_payor:
|
|
12482
|
+
dsa_beneficiary: z15.string().min(1).max(100).optional(),
|
|
12483
|
+
dsa_payor: z15.string().min(1).max(100).optional()
|
|
12327
12484
|
}).superRefine((p, ctx) => {
|
|
12328
12485
|
if (!Object.values(p).some((val) => val !== void 0)) {
|
|
12329
12486
|
ctx.addIssue({ code: "custom", message: "update needs at least one field" });
|
|
@@ -12334,38 +12491,38 @@ var adSetUpdateSchema = z14.object({
|
|
|
12334
12491
|
}
|
|
12335
12492
|
validateAdvantageAudience(p, ctx);
|
|
12336
12493
|
});
|
|
12337
|
-
var messageSchema =
|
|
12338
|
-
var headlineSchema2 =
|
|
12339
|
-
var descriptionSchema =
|
|
12340
|
-
var callToActionSchema =
|
|
12341
|
-
type:
|
|
12494
|
+
var messageSchema = z15.string().min(1).max(META_LIMITS.creative.messageHardMax);
|
|
12495
|
+
var headlineSchema2 = z15.string().min(1).max(META_LIMITS.creative.headlineMax);
|
|
12496
|
+
var descriptionSchema = z15.string().min(1).max(META_LIMITS.creative.descriptionMax);
|
|
12497
|
+
var callToActionSchema = z15.object({
|
|
12498
|
+
type: z15.enum(CTA_TYPES2),
|
|
12342
12499
|
/** Overrides the base link for the CTA button; defaults to the ad's link. */
|
|
12343
12500
|
link: httpsUrlSchema3.optional()
|
|
12344
12501
|
});
|
|
12345
|
-
var creativeEnhancementsSchema =
|
|
12346
|
-
standardEnhancements:
|
|
12347
|
-
features:
|
|
12502
|
+
var creativeEnhancementsSchema = z15.object({
|
|
12503
|
+
standardEnhancements: z15.enum(ENROLL_STATUSES).optional(),
|
|
12504
|
+
features: z15.record(z15.string(), z15.enum(ENROLL_STATUSES)).optional()
|
|
12348
12505
|
});
|
|
12349
12506
|
var creativeSharedFields = {
|
|
12350
|
-
name:
|
|
12507
|
+
name: z15.string().max(META_LIMITS.creative.nameMax).optional(),
|
|
12351
12508
|
/** Facebook Page id backing the ad's identity. */
|
|
12352
12509
|
page_id: parentRefSchema2,
|
|
12353
12510
|
/** Instagram account id for IG placements (aka instagram_actor_id on read). */
|
|
12354
|
-
instagram_user_id:
|
|
12511
|
+
instagram_user_id: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
|
|
12355
12512
|
/** URL tracking parameters appended to the destination, e.g. "utm_source=fb&utm_campaign=x". */
|
|
12356
|
-
url_tags:
|
|
12513
|
+
url_tags: z15.string().max(1e3).optional(),
|
|
12357
12514
|
enhancements: creativeEnhancementsSchema.optional()
|
|
12358
12515
|
};
|
|
12359
12516
|
var imageMediaFields = {
|
|
12360
|
-
imageHash:
|
|
12517
|
+
imageHash: z15.string().regex(IMAGE_HASH_REGEX).optional(),
|
|
12361
12518
|
imageRef: tempRefSchema3.optional()
|
|
12362
12519
|
};
|
|
12363
12520
|
var videoMediaFields = {
|
|
12364
|
-
videoId:
|
|
12521
|
+
videoId: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
|
|
12365
12522
|
videoRef: tempRefSchema3.optional(),
|
|
12366
12523
|
/** Thumbnail for a video creative — image hash, ref, or public url. */
|
|
12367
|
-
thumbnailHash:
|
|
12368
|
-
imageUrl:
|
|
12524
|
+
thumbnailHash: z15.string().regex(IMAGE_HASH_REGEX).optional(),
|
|
12525
|
+
imageUrl: z15.string().url().optional()
|
|
12369
12526
|
};
|
|
12370
12527
|
function countImageRefs(p) {
|
|
12371
12528
|
return [p.imageHash, p.imageRef].filter(Boolean).length;
|
|
@@ -12373,8 +12530,8 @@ function countImageRefs(p) {
|
|
|
12373
12530
|
function countVideoRefs(p) {
|
|
12374
12531
|
return [p.videoId, p.videoRef].filter(Boolean).length;
|
|
12375
12532
|
}
|
|
12376
|
-
var singleCreativeSchema =
|
|
12377
|
-
creativeType:
|
|
12533
|
+
var singleCreativeSchema = z15.object({
|
|
12534
|
+
creativeType: z15.literal("single"),
|
|
12378
12535
|
...creativeSharedFields,
|
|
12379
12536
|
/** Primary text. */
|
|
12380
12537
|
message: messageSchema,
|
|
@@ -12383,7 +12540,7 @@ var singleCreativeSchema = z14.object({
|
|
|
12383
12540
|
headline: headlineSchema2.optional(),
|
|
12384
12541
|
description: descriptionSchema.optional(),
|
|
12385
12542
|
/** Display URL / caption shown under the headline. */
|
|
12386
|
-
caption:
|
|
12543
|
+
caption: z15.string().max(255).optional(),
|
|
12387
12544
|
call_to_action: callToActionSchema.optional(),
|
|
12388
12545
|
...imageMediaFields,
|
|
12389
12546
|
...videoMediaFields
|
|
@@ -12407,10 +12564,10 @@ var singleCreativeSchema = z14.object({
|
|
|
12407
12564
|
});
|
|
12408
12565
|
}
|
|
12409
12566
|
});
|
|
12410
|
-
var carouselCardSchema =
|
|
12567
|
+
var carouselCardSchema = z15.object({
|
|
12411
12568
|
link: httpsUrlSchema3,
|
|
12412
|
-
headline:
|
|
12413
|
-
description:
|
|
12569
|
+
headline: z15.string().max(META_LIMITS.creative.headlineMax).optional(),
|
|
12570
|
+
description: z15.string().max(META_LIMITS.creative.descriptionMax).optional(),
|
|
12414
12571
|
call_to_action: callToActionSchema.optional(),
|
|
12415
12572
|
...imageMediaFields,
|
|
12416
12573
|
...videoMediaFields
|
|
@@ -12430,35 +12587,35 @@ var carouselCardSchema = z14.object({
|
|
|
12430
12587
|
ctx.addIssue({ code: "custom", path: ["videoId"], message: "each card is an image OR a video, not both" });
|
|
12431
12588
|
}
|
|
12432
12589
|
});
|
|
12433
|
-
var carouselCreativeSchema2 =
|
|
12434
|
-
creativeType:
|
|
12590
|
+
var carouselCreativeSchema2 = z15.object({
|
|
12591
|
+
creativeType: z15.literal("carousel"),
|
|
12435
12592
|
...creativeSharedFields,
|
|
12436
12593
|
message: messageSchema,
|
|
12437
12594
|
/** Optional "see more" card destination applied when a card has no own link. */
|
|
12438
12595
|
link: httpsUrlSchema3.optional(),
|
|
12439
12596
|
call_to_action: callToActionSchema.optional(),
|
|
12440
|
-
cards:
|
|
12597
|
+
cards: z15.array(carouselCardSchema).min(META_LIMITS.creative.carouselCardsMin).max(META_LIMITS.creative.carouselCardsMax)
|
|
12441
12598
|
});
|
|
12442
|
-
var dynamicImageSchema =
|
|
12443
|
-
var dynamicVideoSchema =
|
|
12599
|
+
var dynamicImageSchema = z15.object({ ...imageMediaFields }).refine((p) => countImageRefs(p) === 1, "each dynamic image needs exactly one reference");
|
|
12600
|
+
var dynamicVideoSchema = z15.object({
|
|
12444
12601
|
videoId: videoMediaFields.videoId,
|
|
12445
12602
|
videoRef: videoMediaFields.videoRef,
|
|
12446
12603
|
thumbnailHash: videoMediaFields.thumbnailHash
|
|
12447
12604
|
}).refine((p) => countVideoRefs(p) === 1, "each dynamic video needs exactly one reference");
|
|
12448
12605
|
var DYN = META_LIMITS.creative;
|
|
12449
|
-
var dynamicCreativeSchema =
|
|
12450
|
-
creativeType:
|
|
12606
|
+
var dynamicCreativeSchema = z15.object({
|
|
12607
|
+
creativeType: z15.literal("dynamic"),
|
|
12451
12608
|
...creativeSharedFields,
|
|
12452
|
-
bodies:
|
|
12453
|
-
titles:
|
|
12454
|
-
descriptions:
|
|
12455
|
-
images:
|
|
12456
|
-
videos:
|
|
12457
|
-
ad_formats:
|
|
12458
|
-
call_to_action_types:
|
|
12459
|
-
link_urls:
|
|
12609
|
+
bodies: z15.array(z15.object({ text: messageSchema })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
|
|
12610
|
+
titles: z15.array(z15.object({ text: headlineSchema2 })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
|
|
12611
|
+
descriptions: z15.array(z15.object({ text: descriptionSchema })).max(DYN.dynamicTextsMax).optional(),
|
|
12612
|
+
images: z15.array(dynamicImageSchema).optional(),
|
|
12613
|
+
videos: z15.array(dynamicVideoSchema).optional(),
|
|
12614
|
+
ad_formats: z15.array(z15.enum(AD_FORMATS2)).min(1),
|
|
12615
|
+
call_to_action_types: z15.array(z15.enum(CTA_TYPES2)).optional(),
|
|
12616
|
+
link_urls: z15.array(z15.object({ website_url: httpsUrlSchema3, display_url: z15.string().optional() })).min(1),
|
|
12460
12617
|
/** Multi-language / placement customization — structural passthrough for v1. */
|
|
12461
|
-
asset_customization_rules:
|
|
12618
|
+
asset_customization_rules: z15.array(z15.record(z15.string(), z15.unknown())).optional()
|
|
12462
12619
|
}).superRefine((p, ctx) => {
|
|
12463
12620
|
if (!(p.images?.length || p.videos?.length)) {
|
|
12464
12621
|
ctx.addIssue({
|
|
@@ -12468,57 +12625,57 @@ var dynamicCreativeSchema = z14.object({
|
|
|
12468
12625
|
});
|
|
12469
12626
|
}
|
|
12470
12627
|
});
|
|
12471
|
-
var existingPostCreativeSchema =
|
|
12472
|
-
creativeType:
|
|
12628
|
+
var existingPostCreativeSchema = z15.object({
|
|
12629
|
+
creativeType: z15.literal("existing_post"),
|
|
12473
12630
|
name: creativeSharedFields.name,
|
|
12474
12631
|
/** "<page_id>_<post_id>" object story id of the post to promote. */
|
|
12475
|
-
object_story_id:
|
|
12632
|
+
object_story_id: z15.string().regex(/^\d+_\d+$/, 'expected "<page_id>_<post_id>"'),
|
|
12476
12633
|
instagram_user_id: creativeSharedFields.instagram_user_id,
|
|
12477
12634
|
url_tags: creativeSharedFields.url_tags,
|
|
12478
12635
|
enhancements: creativeSharedFields.enhancements
|
|
12479
12636
|
});
|
|
12480
|
-
var creativeContentSchema2 =
|
|
12637
|
+
var creativeContentSchema2 = z15.discriminatedUnion("creativeType", [
|
|
12481
12638
|
singleCreativeSchema,
|
|
12482
12639
|
carouselCreativeSchema2,
|
|
12483
12640
|
dynamicCreativeSchema,
|
|
12484
12641
|
existingPostCreativeSchema
|
|
12485
12642
|
]);
|
|
12486
12643
|
var adCreativeCreateSchema = creativeContentSchema2;
|
|
12487
|
-
var adCreativeUpdateSchema =
|
|
12488
|
-
name:
|
|
12644
|
+
var adCreativeUpdateSchema = z15.object({
|
|
12645
|
+
name: z15.string().max(META_LIMITS.creative.nameMax).optional(),
|
|
12489
12646
|
status: updateStatusSchema.optional(),
|
|
12490
12647
|
/** Content patch — only honored when the target is a staged meta_temp_* creative. */
|
|
12491
|
-
content:
|
|
12648
|
+
content: z15.record(z15.string(), z15.unknown()).optional()
|
|
12492
12649
|
}).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
|
|
12493
|
-
var adCreateSchema2 =
|
|
12494
|
-
name:
|
|
12650
|
+
var adCreateSchema2 = z15.object({
|
|
12651
|
+
name: z15.string().min(1).max(META_LIMITS.ad.nameMax),
|
|
12495
12652
|
adset_id: parentRefSchema2,
|
|
12496
12653
|
status: stageableStatusSchema3.default("PAUSED"),
|
|
12497
|
-
creative:
|
|
12654
|
+
creative: z15.object({ creative_id: parentRefSchema2 }),
|
|
12498
12655
|
/** Conversion pixel / offline event set / view tags — structural passthrough. */
|
|
12499
|
-
tracking_specs:
|
|
12656
|
+
tracking_specs: z15.array(z15.record(z15.string(), z15.unknown())).optional()
|
|
12500
12657
|
});
|
|
12501
|
-
var adUpdateSchema2 =
|
|
12502
|
-
name:
|
|
12658
|
+
var adUpdateSchema2 = z15.object({
|
|
12659
|
+
name: z15.string().min(1).max(META_LIMITS.ad.nameMax).optional(),
|
|
12503
12660
|
status: updateStatusSchema.optional(),
|
|
12504
12661
|
/** Swapping the creative is the Meta way to "edit" an ad's creative. */
|
|
12505
|
-
creative:
|
|
12506
|
-
tracking_specs:
|
|
12662
|
+
creative: z15.object({ creative_id: parentRefSchema2 }).optional(),
|
|
12663
|
+
tracking_specs: z15.array(z15.record(z15.string(), z15.unknown())).optional()
|
|
12507
12664
|
}).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
|
|
12508
|
-
var lookalikeSpecSchema =
|
|
12509
|
-
origin:
|
|
12510
|
-
ratio:
|
|
12511
|
-
country:
|
|
12512
|
-
});
|
|
12513
|
-
var customAudienceCreateSchema =
|
|
12514
|
-
name:
|
|
12515
|
-
subtype:
|
|
12516
|
-
description:
|
|
12517
|
-
customer_file_source:
|
|
12518
|
-
retention_days:
|
|
12665
|
+
var lookalikeSpecSchema = z15.object({
|
|
12666
|
+
origin: z15.array(z15.object({ id: parentRefSchema2 })).min(1),
|
|
12667
|
+
ratio: z15.number().min(0.01).max(0.2).optional(),
|
|
12668
|
+
country: z15.string().length(2).optional()
|
|
12669
|
+
});
|
|
12670
|
+
var customAudienceCreateSchema = z15.object({
|
|
12671
|
+
name: z15.string().min(1).max(META_LIMITS.audience.nameMax),
|
|
12672
|
+
subtype: z15.enum(CUSTOM_AUDIENCE_SUBTYPES),
|
|
12673
|
+
description: z15.string().max(500).optional(),
|
|
12674
|
+
customer_file_source: z15.string().optional(),
|
|
12675
|
+
retention_days: z15.number().int().min(1).max(META_LIMITS.audience.retentionDaysMax).optional(),
|
|
12519
12676
|
lookalike_spec: lookalikeSpecSchema.optional(),
|
|
12520
12677
|
/** Website/engagement rule — structural passthrough validated by Meta. */
|
|
12521
|
-
rule:
|
|
12678
|
+
rule: z15.record(z15.string(), z15.unknown()).optional()
|
|
12522
12679
|
}).superRefine((p, ctx) => {
|
|
12523
12680
|
if (p.subtype === "LOOKALIKE" && !p.lookalike_spec) {
|
|
12524
12681
|
ctx.addIssue({ code: "custom", path: ["lookalike_spec"], message: "LOOKALIKE audiences need a lookalike_spec" });
|
|
@@ -12527,16 +12684,16 @@ var customAudienceCreateSchema = z14.object({
|
|
|
12527
12684
|
ctx.addIssue({ code: "custom", path: ["rule"], message: `${p.subtype} audiences need a rule (use --file)` });
|
|
12528
12685
|
}
|
|
12529
12686
|
});
|
|
12530
|
-
var customAudienceUpdateSchema =
|
|
12531
|
-
name:
|
|
12532
|
-
description:
|
|
12687
|
+
var customAudienceUpdateSchema = z15.object({
|
|
12688
|
+
name: z15.string().min(1).max(META_LIMITS.audience.nameMax).optional(),
|
|
12689
|
+
description: z15.string().max(500).optional()
|
|
12533
12690
|
}).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
|
|
12534
|
-
var mediaUploadSchema =
|
|
12535
|
-
kind:
|
|
12691
|
+
var mediaUploadSchema = z15.object({
|
|
12692
|
+
kind: z15.enum(MEDIA_KINDS),
|
|
12536
12693
|
bakerImageId: bakerMediaIdSchema2.optional(),
|
|
12537
12694
|
bakerVideoId: bakerMediaIdSchema2.optional(),
|
|
12538
12695
|
/** Optional display name / filename hint. */
|
|
12539
|
-
name:
|
|
12696
|
+
name: z15.string().max(255).optional()
|
|
12540
12697
|
}).superRefine((p, ctx) => {
|
|
12541
12698
|
if (p.kind === "image" && !p.bakerImageId) {
|
|
12542
12699
|
ctx.addIssue({ code: "custom", path: ["bakerImageId"], message: "image uploads need a bakerImageId" });
|
|
@@ -12558,16 +12715,16 @@ var META_DRAFT_OP_KINDS = [
|
|
|
12558
12715
|
"customAudience.update",
|
|
12559
12716
|
"media.upload"
|
|
12560
12717
|
];
|
|
12561
|
-
var metaDraftOpKindSchema =
|
|
12562
|
-
var accountIdSchema2 =
|
|
12563
|
-
var updateTargetSchema2 =
|
|
12718
|
+
var metaDraftOpKindSchema = z15.enum(META_DRAFT_OP_KINDS);
|
|
12719
|
+
var accountIdSchema2 = z15.string().regex(NUMERIC_ID_REGEX3, "accountId must be the bare numeric ad account id");
|
|
12720
|
+
var updateTargetSchema2 = z15.union([z15.string().regex(NUMERIC_ID_REGEX3), tempRefSchema3]);
|
|
12564
12721
|
function createOp3(kind, payload) {
|
|
12565
|
-
return
|
|
12722
|
+
return z15.object({ kind: z15.literal(kind), accountId: accountIdSchema2, payload });
|
|
12566
12723
|
}
|
|
12567
12724
|
function updateOp3(kind, payload) {
|
|
12568
|
-
return
|
|
12725
|
+
return z15.object({ kind: z15.literal(kind), accountId: accountIdSchema2, target: updateTargetSchema2, payload });
|
|
12569
12726
|
}
|
|
12570
|
-
var metaDraftOpInputSchema =
|
|
12727
|
+
var metaDraftOpInputSchema = z15.discriminatedUnion("kind", [
|
|
12571
12728
|
createOp3("campaign.create", campaignCreateSchema3),
|
|
12572
12729
|
updateOp3("campaign.update", campaignUpdateSchema3),
|
|
12573
12730
|
createOp3("adSet.create", adSetCreateSchema),
|
|
@@ -12582,89 +12739,89 @@ var metaDraftOpInputSchema = z14.discriminatedUnion("kind", [
|
|
|
12582
12739
|
]);
|
|
12583
12740
|
|
|
12584
12741
|
// ../api/src/ads-meta/wire.ts
|
|
12585
|
-
import { z as
|
|
12586
|
-
var metaWriteModeSchema =
|
|
12587
|
-
var metaDraftOpResultSchema =
|
|
12588
|
-
status:
|
|
12742
|
+
import { z as z16 } from "zod";
|
|
12743
|
+
var metaWriteModeSchema = z16.enum(["live", "simulated"]);
|
|
12744
|
+
var metaDraftOpResultSchema = z16.object({
|
|
12745
|
+
status: z16.enum(["applied", "simulated", "failed", "skipped"]),
|
|
12589
12746
|
/** The resulting Meta node id (campaign/adset/creative/ad/audience) or simulated id. */
|
|
12590
|
-
id:
|
|
12747
|
+
id: z16.string().optional(),
|
|
12591
12748
|
/** For media.upload ops: the resulting image hash. */
|
|
12592
|
-
hash:
|
|
12593
|
-
error:
|
|
12594
|
-
skippedBecause:
|
|
12595
|
-
executedAt:
|
|
12749
|
+
hash: z16.string().optional(),
|
|
12750
|
+
error: z16.string().optional(),
|
|
12751
|
+
skippedBecause: z16.string().optional(),
|
|
12752
|
+
executedAt: z16.number().optional()
|
|
12596
12753
|
});
|
|
12597
|
-
var metaDraftStageRequestSchema =
|
|
12598
|
-
chatId:
|
|
12754
|
+
var metaDraftStageRequestSchema = z16.object({
|
|
12755
|
+
chatId: z16.string(),
|
|
12599
12756
|
op: metaDraftOpInputSchema
|
|
12600
12757
|
});
|
|
12601
|
-
var metaDraftStageResponseSchema =
|
|
12602
|
-
staged:
|
|
12603
|
-
ref:
|
|
12758
|
+
var metaDraftStageResponseSchema = z16.object({
|
|
12759
|
+
staged: z16.literal(true),
|
|
12760
|
+
ref: z16.string(),
|
|
12604
12761
|
kind: metaDraftOpKindSchema,
|
|
12605
12762
|
mode: metaWriteModeSchema,
|
|
12606
|
-
dependsOn:
|
|
12607
|
-
summary:
|
|
12608
|
-
warnings:
|
|
12763
|
+
dependsOn: z16.array(z16.string()),
|
|
12764
|
+
summary: z16.string(),
|
|
12765
|
+
warnings: z16.array(z16.string()),
|
|
12609
12766
|
/** True when the op amended an already-staged op in place instead of appending a new one. */
|
|
12610
|
-
amended:
|
|
12611
|
-
});
|
|
12612
|
-
var metaDraftDuplicateRequestSchema =
|
|
12613
|
-
chatId:
|
|
12614
|
-
accountId:
|
|
12615
|
-
entity:
|
|
12616
|
-
sourceId:
|
|
12617
|
-
overrides:
|
|
12767
|
+
amended: z16.boolean().optional()
|
|
12768
|
+
});
|
|
12769
|
+
var metaDraftDuplicateRequestSchema = z16.object({
|
|
12770
|
+
chatId: z16.string(),
|
|
12771
|
+
accountId: z16.string(),
|
|
12772
|
+
entity: z16.enum(["campaign", "adSet", "ad"]),
|
|
12773
|
+
sourceId: z16.string(),
|
|
12774
|
+
overrides: z16.record(z16.string(), z16.unknown()).optional(),
|
|
12618
12775
|
/** Pause the original after the copy publishes. */
|
|
12619
|
-
replace:
|
|
12776
|
+
replace: z16.boolean().optional()
|
|
12620
12777
|
});
|
|
12621
|
-
var metaDraftOpViewSchema =
|
|
12622
|
-
ref:
|
|
12778
|
+
var metaDraftOpViewSchema = z16.object({
|
|
12779
|
+
ref: z16.string(),
|
|
12623
12780
|
kind: metaDraftOpKindSchema,
|
|
12624
|
-
accountId:
|
|
12625
|
-
target:
|
|
12626
|
-
dependsOn:
|
|
12627
|
-
summary:
|
|
12628
|
-
stagedAt:
|
|
12781
|
+
accountId: z16.string(),
|
|
12782
|
+
target: z16.string().optional(),
|
|
12783
|
+
dependsOn: z16.array(z16.string()),
|
|
12784
|
+
summary: z16.string(),
|
|
12785
|
+
stagedAt: z16.number(),
|
|
12629
12786
|
result: metaDraftOpResultSchema.optional()
|
|
12630
12787
|
});
|
|
12631
|
-
var metaDraftListRequestSchema =
|
|
12632
|
-
chatId:
|
|
12788
|
+
var metaDraftListRequestSchema = z16.object({
|
|
12789
|
+
chatId: z16.string()
|
|
12633
12790
|
});
|
|
12634
|
-
var metaDraftAdvisorySchema =
|
|
12635
|
-
ref:
|
|
12636
|
-
message:
|
|
12791
|
+
var metaDraftAdvisorySchema = z16.object({
|
|
12792
|
+
ref: z16.string(),
|
|
12793
|
+
message: z16.string()
|
|
12637
12794
|
});
|
|
12638
|
-
var metaDraftListResponseSchema =
|
|
12639
|
-
status:
|
|
12795
|
+
var metaDraftListResponseSchema = z16.object({
|
|
12796
|
+
status: z16.enum(["active", "publishing", "applied", "discarded", "none"]),
|
|
12640
12797
|
mode: metaWriteModeSchema,
|
|
12641
|
-
count:
|
|
12642
|
-
ops:
|
|
12798
|
+
count: z16.number(),
|
|
12799
|
+
ops: z16.array(metaDraftOpViewSchema),
|
|
12643
12800
|
/** Non-blocking cross-op quality advisories — "good campaign, not just valid". */
|
|
12644
|
-
advisories:
|
|
12801
|
+
advisories: z16.array(metaDraftAdvisorySchema)
|
|
12645
12802
|
});
|
|
12646
|
-
var metaDraftRemoveRequestSchema =
|
|
12647
|
-
chatId:
|
|
12648
|
-
ref:
|
|
12803
|
+
var metaDraftRemoveRequestSchema = z16.object({
|
|
12804
|
+
chatId: z16.string(),
|
|
12805
|
+
ref: z16.string()
|
|
12649
12806
|
});
|
|
12650
|
-
var metaDraftRemoveResponseSchema =
|
|
12807
|
+
var metaDraftRemoveResponseSchema = z16.object({
|
|
12651
12808
|
/** The requested ref plus any dependents removed by cascade. */
|
|
12652
|
-
removed:
|
|
12809
|
+
removed: z16.array(z16.string())
|
|
12653
12810
|
});
|
|
12654
|
-
var metaDraftClearRequestSchema =
|
|
12655
|
-
chatId:
|
|
12811
|
+
var metaDraftClearRequestSchema = z16.object({
|
|
12812
|
+
chatId: z16.string()
|
|
12656
12813
|
});
|
|
12657
|
-
var metaDraftClearResponseSchema =
|
|
12658
|
-
cleared:
|
|
12814
|
+
var metaDraftClearResponseSchema = z16.object({
|
|
12815
|
+
cleared: z16.number()
|
|
12659
12816
|
});
|
|
12660
|
-
var metaFieldErrorSchema =
|
|
12661
|
-
path:
|
|
12662
|
-
message:
|
|
12817
|
+
var metaFieldErrorSchema = z16.object({
|
|
12818
|
+
path: z16.string(),
|
|
12819
|
+
message: z16.string()
|
|
12663
12820
|
});
|
|
12664
|
-
var metaDraftErrorResponseSchema =
|
|
12665
|
-
code:
|
|
12666
|
-
error:
|
|
12667
|
-
fields:
|
|
12821
|
+
var metaDraftErrorResponseSchema = z16.object({
|
|
12822
|
+
code: z16.string(),
|
|
12823
|
+
error: z16.string(),
|
|
12824
|
+
fields: z16.array(metaFieldErrorSchema).optional()
|
|
12668
12825
|
});
|
|
12669
12826
|
|
|
12670
12827
|
// src/commands/ads/meta/write-shared.ts
|
|
@@ -16419,7 +16576,7 @@ import { toCardinal as nwKo } from "n2words/ko-KR";
|
|
|
16419
16576
|
import { toCardinal as nwNl } from "n2words/nl-NL";
|
|
16420
16577
|
import { toCardinal as nwPl } from "n2words/pl-PL";
|
|
16421
16578
|
import { toCardinal as nwPt } from "n2words/pt-PT";
|
|
16422
|
-
import { z as
|
|
16579
|
+
import { z as z17 } from "zod";
|
|
16423
16580
|
|
|
16424
16581
|
// src/engine/scaffold/lib/shoot-modes.ts
|
|
16425
16582
|
var SHOOT_MODES = [
|
|
@@ -16755,71 +16912,71 @@ function trimArgs(durationS, offsetS = 0, dims) {
|
|
|
16755
16912
|
"{{out.video}}"
|
|
16756
16913
|
];
|
|
16757
16914
|
}
|
|
16758
|
-
var FrameAsset =
|
|
16759
|
-
var DialogueLine =
|
|
16760
|
-
speaker:
|
|
16761
|
-
line:
|
|
16915
|
+
var FrameAsset = z17.object({ url: z17.string().optional() }).loose().optional();
|
|
16916
|
+
var DialogueLine = z17.object({
|
|
16917
|
+
speaker: z17.string().optional(),
|
|
16918
|
+
line: z17.string().optional(),
|
|
16762
16919
|
// Absolute seconds on the source timeline (the deconstruct emits both).
|
|
16763
|
-
start_s:
|
|
16764
|
-
end_s:
|
|
16765
|
-
delivery:
|
|
16766
|
-
voice_description:
|
|
16920
|
+
start_s: z17.number().optional(),
|
|
16921
|
+
end_s: z17.number().optional(),
|
|
16922
|
+
delivery: z17.string().optional(),
|
|
16923
|
+
voice_description: z17.string().optional(),
|
|
16767
16924
|
// DECON-supplied: is this speaker's FACE visibly speaking in THIS scene? Element
|
|
16768
16925
|
// presence alone can't answer that — a founder pictured in a polaroid close-up is
|
|
16769
16926
|
// "present" yet the line is voiceover, and treating it as on-camera produced a
|
|
16770
16927
|
// native Seedance lip-sync clip of a still photograph. `false` pins the line to
|
|
16771
16928
|
// the VO path; absent keeps the presence-based decision (old blueprints).
|
|
16772
|
-
on_camera:
|
|
16929
|
+
on_camera: z17.boolean().optional()
|
|
16773
16930
|
}).loose();
|
|
16774
|
-
var Sfx =
|
|
16775
|
-
at_s:
|
|
16776
|
-
duration_s:
|
|
16777
|
-
sound_effect_prompt:
|
|
16778
|
-
description:
|
|
16931
|
+
var Sfx = z17.object({
|
|
16932
|
+
at_s: z17.number().optional(),
|
|
16933
|
+
duration_s: z17.number().optional(),
|
|
16934
|
+
sound_effect_prompt: z17.string().optional(),
|
|
16935
|
+
description: z17.string().optional()
|
|
16779
16936
|
}).loose();
|
|
16780
|
-
var CompositionRegion =
|
|
16937
|
+
var CompositionRegion = z17.object({
|
|
16781
16938
|
// full | top | bottom | left | right | inset
|
|
16782
|
-
panel:
|
|
16939
|
+
panel: z17.string().optional(),
|
|
16783
16940
|
// 9-grid anchor for an `inset` presenter box.
|
|
16784
|
-
position:
|
|
16785
|
-
is_presenter:
|
|
16941
|
+
position: z17.string().optional(),
|
|
16942
|
+
is_presenter: z17.boolean().optional(),
|
|
16786
16943
|
// The cast id shown/speaking in this region (routes lip-sync + element refs).
|
|
16787
|
-
cast_ref:
|
|
16944
|
+
cast_ref: z17.string().optional(),
|
|
16788
16945
|
// What the region's content IS: camera | screen_capture | static_graphic |
|
|
16789
16946
|
// generated. Authoritative for routing when present (regex-over-prose fallback
|
|
16790
16947
|
// otherwise): screen_capture/static_graphic are rebuilt from REAL surfaces on the
|
|
16791
16948
|
// overlay layer, never AI-generated.
|
|
16792
|
-
kind:
|
|
16949
|
+
kind: z17.string().optional(),
|
|
16793
16950
|
// Opaque id naming the SPECIFIC on-screen document/note/app-state this
|
|
16794
16951
|
// screen_capture region shows. Two scenes share it only when they show the SAME
|
|
16795
16952
|
// recording continuing (scrolling/typing/waiting within it) — a genuinely
|
|
16796
16953
|
// DIFFERENT document/note/recording (a source video splicing two screen captures)
|
|
16797
16954
|
// gets a different id. Breaks a persistent-layout run into separate surface stubs
|
|
16798
16955
|
// instead of asking the operator for one screenshot that can't cover both.
|
|
16799
|
-
surface_id:
|
|
16956
|
+
surface_id: z17.string().optional(),
|
|
16800
16957
|
// Camera bubble(s)/inset(s) embedded INSIDE this region's surface (a Loom-style
|
|
16801
16958
|
// presenter bubble inside a screen recording) — video-in-video the reproduction
|
|
16802
16959
|
// must re-composite, not paint into the surface.
|
|
16803
|
-
nested:
|
|
16804
|
-
summary:
|
|
16805
|
-
frame_prompt:
|
|
16806
|
-
motion_prompt:
|
|
16960
|
+
nested: z17.array(z17.object({}).loose()).optional(),
|
|
16961
|
+
summary: z17.string().optional(),
|
|
16962
|
+
frame_prompt: z17.string().optional(),
|
|
16963
|
+
motion_prompt: z17.string().optional()
|
|
16807
16964
|
}).loose();
|
|
16808
|
-
var SceneComposition =
|
|
16965
|
+
var SceneComposition = z17.object({
|
|
16809
16966
|
// full_frame (default) | split_screen | pip | keyed_overlay
|
|
16810
|
-
layout:
|
|
16967
|
+
layout: z17.string().optional(),
|
|
16811
16968
|
// split_screen only: vertical (top/bottom) | horizontal (left/right).
|
|
16812
|
-
split_axis:
|
|
16813
|
-
regions:
|
|
16969
|
+
split_axis: z17.string().optional(),
|
|
16970
|
+
regions: z17.array(CompositionRegion).optional()
|
|
16814
16971
|
}).loose();
|
|
16815
|
-
var CameraMotion =
|
|
16816
|
-
var TranscriptWord =
|
|
16817
|
-
var Scene =
|
|
16818
|
-
start_s:
|
|
16819
|
-
end_s:
|
|
16820
|
-
duration_s:
|
|
16821
|
-
summary:
|
|
16822
|
-
action_detail:
|
|
16972
|
+
var CameraMotion = z17.object({ movement: z17.string().optional(), detail: z17.string().optional() }).loose();
|
|
16973
|
+
var TranscriptWord = z17.object({ text: z17.string().optional() }).loose();
|
|
16974
|
+
var Scene = z17.object({
|
|
16975
|
+
start_s: z17.number().optional(),
|
|
16976
|
+
end_s: z17.number().optional(),
|
|
16977
|
+
duration_s: z17.number().optional(),
|
|
16978
|
+
summary: z17.string().optional(),
|
|
16979
|
+
action_detail: z17.string().optional(),
|
|
16823
16980
|
// The scene's spatial layout. Absent/full_frame ⇒ one uncut shot (default path).
|
|
16824
16981
|
// A layered layout (split_screen/pip/keyed_overlay) with regions ⇒ the scaffold
|
|
16825
16982
|
// builds one clip per region and stacks/overlays them into the scene picture.
|
|
@@ -16827,82 +16984,82 @@ var Scene = z16.object({
|
|
|
16827
16984
|
// The capture "look" for this scene — selected from the ad-native shoot-mode
|
|
16828
16985
|
// grammar (see lib/shoot-modes.ts). When absent the scaffold auto-derives a
|
|
16829
16986
|
// UGC/product mode; a human can override per scene by setting this.
|
|
16830
|
-
shoot_mode:
|
|
16987
|
+
shoot_mode: z17.string().optional(),
|
|
16831
16988
|
// Diegetic ambient the clip's native audio should carry (no music). When
|
|
16832
16989
|
// absent the scene falls back to its shoot mode's default ambience.
|
|
16833
|
-
ambient:
|
|
16990
|
+
ambient: z17.string().optional(),
|
|
16834
16991
|
camera_motion: CameraMotion.optional(),
|
|
16835
|
-
start_frame_prompt:
|
|
16836
|
-
end_frame_prompt:
|
|
16837
|
-
motion_prompt:
|
|
16992
|
+
start_frame_prompt: z17.string().optional(),
|
|
16993
|
+
end_frame_prompt: z17.string().optional(),
|
|
16994
|
+
motion_prompt: z17.string().optional(),
|
|
16838
16995
|
// The scene's role in the ad's persuasion arc (DECON-supplied); drives the
|
|
16839
16996
|
// script re-craft checklist. Inferred from position when absent.
|
|
16840
|
-
narrative_role:
|
|
16997
|
+
narrative_role: z17.string().optional(),
|
|
16841
16998
|
// DECON-supplied on the HOOK scene: the engineered physical/emotional state that
|
|
16842
16999
|
// makes the first frame stop the scroll (sweaty/breathless/urgent …). Injected
|
|
16843
17000
|
// into the hook's start-frame description so the generator renders that state,
|
|
16844
17001
|
// not a calm influencer (CCA-11).
|
|
16845
|
-
hook_mechanic:
|
|
17002
|
+
hook_mechanic: z17.object({ mechanic: z17.string().optional(), why_it_stops_scroll: z17.string().optional() }).loose().optional(),
|
|
16846
17003
|
// DECON-supplied per-scene location (so a gym hook isn't flattened to "home").
|
|
16847
|
-
scene_setting:
|
|
17004
|
+
scene_setting: z17.string().optional(),
|
|
16848
17005
|
// How this scene cuts to the next (DECON-supplied). A recognized non-cut type
|
|
16849
17006
|
// (fade/whip/zoom/dissolve/swipe) is reproduced as an ffmpeg xfade at the
|
|
16850
17007
|
// boundary; cut/match_cut/none/other stay hard cuts. The last scene's value is
|
|
16851
17008
|
// ignored (nothing follows it).
|
|
16852
|
-
transition_out:
|
|
16853
|
-
dialogue:
|
|
16854
|
-
sfx:
|
|
16855
|
-
overlays:
|
|
16856
|
-
floating_elements:
|
|
17009
|
+
transition_out: z17.object({ type: z17.string().optional(), description: z17.string().optional() }).loose().optional(),
|
|
17010
|
+
dialogue: z17.array(DialogueLine).optional(),
|
|
17011
|
+
sfx: z17.array(Sfx).optional(),
|
|
17012
|
+
overlays: z17.array(z17.unknown()).optional(),
|
|
17013
|
+
floating_elements: z17.array(z17.unknown()).optional(),
|
|
16857
17014
|
// DECON-supplied: how much the picture itself moves within the shot. Gates the
|
|
16858
17015
|
// flash-hold optimization — a sub-2s b-roll flash with REAL subject motion
|
|
16859
17016
|
// (pouring, spreading, hands working) must stay a real clip; freezing it turns
|
|
16860
17017
|
// a montage into a slideshow. Absent (old blueprints) keeps the cheap still.
|
|
16861
|
-
motion_level:
|
|
16862
|
-
transcript_slice:
|
|
17018
|
+
motion_level: z17.enum(["static", "subtle", "dynamic"]).optional(),
|
|
17019
|
+
transcript_slice: z17.array(TranscriptWord).optional(),
|
|
16863
17020
|
start_frame_asset: FrameAsset,
|
|
16864
17021
|
end_frame_asset: FrameAsset,
|
|
16865
17022
|
// DECON-supplied: true when this scene is a length-split CONTINUATION of the
|
|
16866
17023
|
// previous one (the SAME physical shot, broken up only because it exceeded the
|
|
16867
17024
|
// clip ceiling). The scaffold then shares the splice keyframe — this scene's
|
|
16868
17025
|
// start frame IS the previous scene's end frame — so the join is seamless.
|
|
16869
|
-
continues_previous:
|
|
17026
|
+
continues_previous: z17.boolean().optional()
|
|
16870
17027
|
}).loose();
|
|
16871
|
-
var VideoBlueprint =
|
|
16872
|
-
source:
|
|
16873
|
-
global:
|
|
16874
|
-
music:
|
|
16875
|
-
present:
|
|
16876
|
-
music_prompt:
|
|
17028
|
+
var VideoBlueprint = z17.object({
|
|
17029
|
+
source: z17.object({ aspect_ratio: z17.string().optional(), duration_s: z17.number().optional() }).loose().optional(),
|
|
17030
|
+
global: z17.object({
|
|
17031
|
+
music: z17.object({
|
|
17032
|
+
present: z17.boolean().optional(),
|
|
17033
|
+
music_prompt: z17.string().optional(),
|
|
16877
17034
|
// Absolute second the music enters in the reference (the bed often
|
|
16878
17035
|
// kicks in mid-ad, after the hook). We start the regenerated track here
|
|
16879
17036
|
// instead of at 0 so the timing matches.
|
|
16880
|
-
starts_at_s:
|
|
17037
|
+
starts_at_s: z17.number().optional(),
|
|
16881
17038
|
// Populated by the deconstruct when AudD (Shazam-style) recognizes the
|
|
16882
17039
|
// reference track. We never reuse it — only style the regenerated bed.
|
|
16883
|
-
identified_track:
|
|
17040
|
+
identified_track: z17.object({ title: z17.string().optional(), artist: z17.string().optional() }).loose().nullish()
|
|
16884
17041
|
}).loose().optional(),
|
|
16885
|
-
cast:
|
|
16886
|
-
|
|
16887
|
-
id:
|
|
16888
|
-
description:
|
|
17042
|
+
cast: z17.array(
|
|
17043
|
+
z17.object({
|
|
17044
|
+
id: z17.string().optional(),
|
|
17045
|
+
description: z17.string().optional(),
|
|
16889
17046
|
// The deconstruct's note on the target-market localization (e.g. "native
|
|
16890
17047
|
// French speaker") — read to derive the spoken-track language code.
|
|
16891
|
-
market_localization_note:
|
|
17048
|
+
market_localization_note: z17.string().optional()
|
|
16892
17049
|
}).loose()
|
|
16893
17050
|
).optional(),
|
|
16894
|
-
voiceover:
|
|
17051
|
+
voiceover: z17.object({
|
|
16895
17052
|
// on_camera | mixed → mouths are on screen (lip-sync candidates);
|
|
16896
17053
|
// voiceover | none → narration over the picture (no lip-sync).
|
|
16897
|
-
mode:
|
|
16898
|
-
voice_description:
|
|
16899
|
-
persona:
|
|
17054
|
+
mode: z17.string().optional(),
|
|
17055
|
+
voice_description: z17.string().optional(),
|
|
17056
|
+
persona: z17.string().optional()
|
|
16900
17057
|
}).loose().optional(),
|
|
16901
17058
|
// Visual palette — read only to colour a clean brand-card/CTA plate (the
|
|
16902
17059
|
// first hex is the dominant brand colour); never to drive frame generation.
|
|
16903
|
-
style:
|
|
17060
|
+
style: z17.object({ palette: z17.array(z17.object({ hex: z17.string().optional() }).loose()).optional() }).loose().optional()
|
|
16904
17061
|
}).loose().optional(),
|
|
16905
|
-
scenes:
|
|
17062
|
+
scenes: z17.array(Scene).min(1)
|
|
16906
17063
|
}).loose();
|
|
16907
17064
|
function injectHookPhysicality(blueprint) {
|
|
16908
17065
|
for (const scene of blueprint.scenes) {
|
|
@@ -16919,26 +17076,26 @@ function clipIntentOf(scene, sceneIndex) {
|
|
|
16919
17076
|
if (/hero|reveal|product|payoff|transformation|result/.test(role) || scene.motion_level === "dynamic") return "hero";
|
|
16920
17077
|
return "body";
|
|
16921
17078
|
}
|
|
16922
|
-
var AppearsItem =
|
|
16923
|
-
var RecurringElement =
|
|
17079
|
+
var AppearsItem = z17.union([z17.number(), z17.object({ scene: z17.number(), edge: z17.string().optional() }).loose()]);
|
|
17080
|
+
var RecurringElement = z17.object({
|
|
16924
17081
|
// person | animal | product | logo | badge | other
|
|
16925
|
-
type:
|
|
16926
|
-
label:
|
|
16927
|
-
description:
|
|
16928
|
-
expression:
|
|
17082
|
+
type: z17.string(),
|
|
17083
|
+
label: z17.string().optional(),
|
|
17084
|
+
description: z17.string().optional(),
|
|
17085
|
+
expression: z17.string().nullable().optional(),
|
|
16929
17086
|
// When the element maps to a global cast entry, its stable id (for annotation).
|
|
16930
|
-
cast_id:
|
|
17087
|
+
cast_id: z17.string().nullable().optional(),
|
|
16931
17088
|
// The label of another element that is the SAME individual as this one, shown
|
|
16932
17089
|
// in a DIFFERENT wardrobe/persona/state (e.g. one creator playing skeptic in a
|
|
16933
17090
|
// pink shirt and believer in a white shirt). Each look gets its own reference
|
|
16934
17091
|
// slot, but the face/identity must stay identical across them.
|
|
16935
|
-
same_as:
|
|
17092
|
+
same_as: z17.string().nullable().optional(),
|
|
16936
17093
|
// Scenes the element appears in. Either a bare list of scene indices (both
|
|
16937
17094
|
// edges) or per-{scene,edge} entries. Both forms are accepted and merged.
|
|
16938
|
-
scenes:
|
|
16939
|
-
appears_in:
|
|
17095
|
+
scenes: z17.array(z17.number()).optional(),
|
|
17096
|
+
appears_in: z17.array(AppearsItem).optional()
|
|
16940
17097
|
}).loose();
|
|
16941
|
-
var RecurringElements =
|
|
17098
|
+
var RecurringElements = z17.array(RecurringElement);
|
|
16942
17099
|
function sanitizeId(raw, fallback) {
|
|
16943
17100
|
const id = raw.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
16944
17101
|
return /^[a-z]/.test(id) ? id : `${fallback}_${id}`.replace(/_+$/g, "") || fallback;
|
|
@@ -17413,7 +17570,7 @@ function scrubFloatSentences(text, floatDescs) {
|
|
|
17413
17570
|
return kept;
|
|
17414
17571
|
}
|
|
17415
17572
|
function sceneFloatDescs(scene) {
|
|
17416
|
-
const floats =
|
|
17573
|
+
const floats = z17.array(FloatingElement).safeParse(scene.floating_elements ?? []);
|
|
17417
17574
|
if (!floats.success) return [];
|
|
17418
17575
|
return floats.data.map((f) => f.description?.trim() ?? "").filter(Boolean);
|
|
17419
17576
|
}
|
|
@@ -18837,25 +18994,25 @@ function buildSfxMusic(blueprint, clock, nodes) {
|
|
|
18837
18994
|
}
|
|
18838
18995
|
return tracks;
|
|
18839
18996
|
}
|
|
18840
|
-
var OverlayStyle =
|
|
18841
|
-
var Overlay =
|
|
18842
|
-
text:
|
|
18843
|
-
appears_at_s:
|
|
18844
|
-
duration_s:
|
|
18845
|
-
position:
|
|
18846
|
-
role:
|
|
18847
|
-
animation:
|
|
18848
|
-
animation_detail:
|
|
18997
|
+
var OverlayStyle = z17.object({ color_hex: z17.string().optional(), background: z17.string().optional(), size: z17.string().optional() }).loose();
|
|
18998
|
+
var Overlay = z17.object({
|
|
18999
|
+
text: z17.string().optional(),
|
|
19000
|
+
appears_at_s: z17.number().optional(),
|
|
19001
|
+
duration_s: z17.number().optional(),
|
|
19002
|
+
position: z17.string().optional(),
|
|
19003
|
+
role: z17.string().optional(),
|
|
19004
|
+
animation: z17.string().optional(),
|
|
19005
|
+
animation_detail: z17.string().optional(),
|
|
18849
19006
|
style: OverlayStyle.optional()
|
|
18850
19007
|
}).loose();
|
|
18851
|
-
var FloatingElement =
|
|
18852
|
-
kind:
|
|
18853
|
-
description:
|
|
18854
|
-
brand_name:
|
|
18855
|
-
what_it_represents:
|
|
18856
|
-
appears_at_s:
|
|
18857
|
-
duration_s:
|
|
18858
|
-
position:
|
|
19008
|
+
var FloatingElement = z17.object({
|
|
19009
|
+
kind: z17.string().optional(),
|
|
19010
|
+
description: z17.string().optional(),
|
|
19011
|
+
brand_name: z17.string().nullish(),
|
|
19012
|
+
what_it_represents: z17.string().optional(),
|
|
19013
|
+
appears_at_s: z17.number().optional(),
|
|
19014
|
+
duration_s: z17.number().optional(),
|
|
19015
|
+
position: z17.string().optional()
|
|
18859
19016
|
}).loose();
|
|
18860
19017
|
function escapeHtml(s) {
|
|
18861
19018
|
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
@@ -18887,7 +19044,7 @@ function positionClass(position) {
|
|
|
18887
19044
|
function collectCaptions(blueprint, clock) {
|
|
18888
19045
|
return blueprint.scenes.flatMap((scene, i) => {
|
|
18889
19046
|
const sceneStart = scene.start_s ?? 0;
|
|
18890
|
-
const overlays =
|
|
19047
|
+
const overlays = z17.array(Overlay).safeParse(scene.overlays ?? []);
|
|
18891
19048
|
return overlays.success ? overlays.data.filter((ov) => Boolean(ov.text?.trim())).map((ov) => {
|
|
18892
19049
|
const at = clock.map(i, ov.appears_at_s ?? sceneStart);
|
|
18893
19050
|
return { text: ov.text.trim(), at, end: at + (ov.duration_s ?? 2.5), ov };
|
|
@@ -18967,7 +19124,7 @@ function collectFloatWindows(blueprint, uiRouted, clock) {
|
|
|
18967
19124
|
const windows = /* @__PURE__ */ new Map();
|
|
18968
19125
|
blueprint.scenes.forEach((scene, i) => {
|
|
18969
19126
|
const sceneStart = scene.start_s ?? 0;
|
|
18970
|
-
const floats =
|
|
19127
|
+
const floats = z17.array(FloatingElement).safeParse(scene.floating_elements ?? []);
|
|
18971
19128
|
if (!floats.success) return;
|
|
18972
19129
|
for (const fe of floats.data) {
|
|
18973
19130
|
const at = clock.map(i, fe.appears_at_s ?? sceneStart);
|
|
@@ -19415,8 +19572,8 @@ function buildMotionBoard(blueprint) {
|
|
|
19415
19572
|
const end_s = scene.end_s ?? start_s + sceneDurationS(scene);
|
|
19416
19573
|
cursor = end_s;
|
|
19417
19574
|
const spoken = sceneSpokenText(scene);
|
|
19418
|
-
const overlays =
|
|
19419
|
-
const floats =
|
|
19575
|
+
const overlays = z17.array(Overlay).safeParse(scene.overlays ?? []);
|
|
19576
|
+
const floats = z17.array(FloatingElement).safeParse(scene.floating_elements ?? []);
|
|
19420
19577
|
const graphics = [
|
|
19421
19578
|
...(overlays.success ? overlays.data : []).filter((ov) => ov.text?.trim()).map((ov) => ({
|
|
19422
19579
|
kind: "text",
|
|
@@ -20855,7 +21012,7 @@ import path18 from "path";
|
|
|
20855
21012
|
import { defineCommand as defineCommand93 } from "citty";
|
|
20856
21013
|
|
|
20857
21014
|
// src/engine/scaffold/staticAd.ts
|
|
20858
|
-
import { z as
|
|
21015
|
+
import { z as z18 } from "zod";
|
|
20859
21016
|
var GEN_ASPECT_RATIOS = /* @__PURE__ */ new Set(["1:1", "4:5", "9:16", "16:9", "4:3", "3:4", "2:3", "3:2", "21:9"]);
|
|
20860
21017
|
var DEFAULT_ASPECT_RATIO = "9:16";
|
|
20861
21018
|
var SHEET_SUBJECT_TYPE2 = {
|
|
@@ -20867,24 +21024,24 @@ var ACTOR_SHEET_IMAGE_SIZE = "4K";
|
|
|
20867
21024
|
var ADAPT_MODEL = "google/gemini-3-pro-image-preview";
|
|
20868
21025
|
var ADAPT_IMAGE_SIZE = "2K";
|
|
20869
21026
|
var ADAPT_GUIDANCE = "Keep the headline, logo, CTA, and hero subject fully visible in every ratio. Reproduce every text string verbatim \u2014 no dropped, added, or altered characters \u2014 and preserve the exact brand-color treatment (e.g. a black\u2192red word pivot), never flattening it.";
|
|
20870
|
-
var Blueprint =
|
|
20871
|
-
meta:
|
|
20872
|
-
text_content:
|
|
21027
|
+
var Blueprint = z18.object({
|
|
21028
|
+
meta: z18.object({ estimated_aspect_ratio: z18.string().optional() }).loose().optional(),
|
|
21029
|
+
text_content: z18.array(z18.object({ text: z18.string().optional() }).loose()).optional()
|
|
20873
21030
|
}).loose();
|
|
20874
|
-
var ElementLocator =
|
|
20875
|
-
collection:
|
|
20876
|
-
index:
|
|
21031
|
+
var ElementLocator = z18.object({
|
|
21032
|
+
collection: z18.enum(["subjects", "people", "brands_logos"]),
|
|
21033
|
+
index: z18.number().int().nonnegative()
|
|
20877
21034
|
}).loose();
|
|
20878
|
-
var MainElement =
|
|
21035
|
+
var MainElement = z18.object({
|
|
20879
21036
|
// logo | product | person | animal | badge | other
|
|
20880
|
-
type:
|
|
20881
|
-
label:
|
|
20882
|
-
description:
|
|
20883
|
-
expression:
|
|
20884
|
-
reason:
|
|
21037
|
+
type: z18.string(),
|
|
21038
|
+
label: z18.string().optional(),
|
|
21039
|
+
description: z18.string().optional(),
|
|
21040
|
+
expression: z18.string().nullable().optional(),
|
|
21041
|
+
reason: z18.string().optional(),
|
|
20885
21042
|
locator: ElementLocator.optional()
|
|
20886
21043
|
}).loose();
|
|
20887
|
-
var MainElements =
|
|
21044
|
+
var MainElements = z18.array(MainElement);
|
|
20888
21045
|
function sanitizeId2(raw, fallback) {
|
|
20889
21046
|
const id = raw.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
20890
21047
|
return /^[a-z]/.test(id) ? id : `${fallback}_${id}`.replace(/_+$/g, "") || fallback;
|
|
@@ -24271,11 +24428,305 @@ Full guide: __tooling__/docs/tools/baker/history.md`
|
|
|
24271
24428
|
subCommands: { list: listCommand7 }
|
|
24272
24429
|
});
|
|
24273
24430
|
|
|
24431
|
+
// src/commands/hubspot/index.ts
|
|
24432
|
+
import { defineCommand as defineCommand111 } from "citty";
|
|
24433
|
+
var EMBED_TYPES = ["legacy", "v4", "unknown"];
|
|
24434
|
+
function failNotConnected(err) {
|
|
24435
|
+
if (err instanceof ApiError && err.code === "NOT_FOUND" && err.message.includes("No HubSpot account is connected")) {
|
|
24436
|
+
writeJson({
|
|
24437
|
+
ok: false,
|
|
24438
|
+
error: {
|
|
24439
|
+
code: "NO_HUBSPOT_CONNECTION",
|
|
24440
|
+
message: err.message,
|
|
24441
|
+
fix: {
|
|
24442
|
+
action: "connect",
|
|
24443
|
+
explanation: "AGENT INSTRUCTION: You cannot resolve this yourself \u2014 only the user can connect the account. Tell them to open the dashboard, go to Brain -> Integrations -> Tools, pick HubSpot from the catalog and choose the scope; it is available from their next message. Do not abort the wider task: note that HubSpot data was unavailable, skip this check, and carry on."
|
|
24444
|
+
}
|
|
24445
|
+
}
|
|
24446
|
+
});
|
|
24447
|
+
process.exit(1);
|
|
24448
|
+
}
|
|
24449
|
+
failApi(err);
|
|
24450
|
+
}
|
|
24451
|
+
function assertEmbedType(value) {
|
|
24452
|
+
if (value === void 0) {
|
|
24453
|
+
return void 0;
|
|
24454
|
+
}
|
|
24455
|
+
if (!EMBED_TYPES.includes(value)) {
|
|
24456
|
+
throw new Error(`--embed-type must be one of: ${EMBED_TYPES.join("|")}`);
|
|
24457
|
+
}
|
|
24458
|
+
return value;
|
|
24459
|
+
}
|
|
24460
|
+
registerSchema({
|
|
24461
|
+
command: "hubspot.forms.list",
|
|
24462
|
+
description: "Start here for HubSpot forms: every form on the connected account, with just enough to choose one \u2014 embed type (legacy vs v4), field count, and its post-submit action (inline thank-you vs redirect to a URL). Answers 'which of my forms redirect after submit?' and 'is this form legacy or v4?'. portalId is returned once on data, not per row. Next step is usually `hubspot forms view <id> --as-node`, which gives you the blob to write straight into a Form step \u2014 you do not need request_flow_input for HubSpot.",
|
|
24463
|
+
args: {
|
|
24464
|
+
search: { type: "string", description: "Case-insensitive substring match on the form name", required: false },
|
|
24465
|
+
"redirecting-only": {
|
|
24466
|
+
type: "boolean",
|
|
24467
|
+
description: "Only forms whose post-submit action redirects away",
|
|
24468
|
+
required: false,
|
|
24469
|
+
default: false
|
|
24470
|
+
},
|
|
24471
|
+
"embed-type": { type: "string", description: "Filter: legacy|v4|unknown", required: false, enum: [...EMBED_TYPES] }
|
|
24472
|
+
}
|
|
24473
|
+
});
|
|
24474
|
+
registerSchema({
|
|
24475
|
+
command: "hubspot.forms.view",
|
|
24476
|
+
description: "One HubSpot form in detail: every field (name, label, type, required, hidden, options), the legal-consent mode, the post-submit action, captcha, and language. Read it before wiring a form into a Form (flow) so you know what fields exist to autofill. Add --full for the untouched HubSpot payload, or --as-node to get the object to write into the step's form.external instead.",
|
|
24477
|
+
args: {
|
|
24478
|
+
formId: { type: "positional", description: "HubSpot form id (from `baker hubspot forms list`)", required: true },
|
|
24479
|
+
full: { type: "boolean", description: "Include the raw HubSpot payload", required: false, default: false },
|
|
24480
|
+
"as-node": {
|
|
24481
|
+
type: "boolean",
|
|
24482
|
+
description: "Emit the resource blob to write into a flow node's form.external, instead of the readable view. Write it into the node yourself; no need for request_flow_input when the account is connected and the form is unambiguous.",
|
|
24483
|
+
required: false,
|
|
24484
|
+
default: false
|
|
24485
|
+
}
|
|
24486
|
+
}
|
|
24487
|
+
});
|
|
24488
|
+
registerSchema({
|
|
24489
|
+
command: "hubspot.meetings.list",
|
|
24490
|
+
description: "Every HubSpot meeting link (calendar) on the connected account, with just enough to choose one: name, slug, link type (personal / group / round-robin), whether booking redirects somewhere, and how many booking fields it asks for (null = unknown, read it with `meetings view`). Next step is usually `hubspot meetings view <slug> --as-node`, which gives you the blob to write straight into a hubspotMeeting step.",
|
|
24491
|
+
args: {
|
|
24492
|
+
search: { type: "string", description: "Case-insensitive substring match on the meeting name", required: false },
|
|
24493
|
+
"redirecting-only": {
|
|
24494
|
+
type: "boolean",
|
|
24495
|
+
description: "Only meeting links that redirect after booking",
|
|
24496
|
+
required: false,
|
|
24497
|
+
default: false
|
|
24498
|
+
}
|
|
24499
|
+
}
|
|
24500
|
+
});
|
|
24501
|
+
registerSchema({
|
|
24502
|
+
command: "hubspot.meetings.view",
|
|
24503
|
+
description: "One HubSpot meeting link in detail: its booking-form fields (name, label, type, required, custom), link, and redirect URL. This is the source of truth for a calendar's fields \u2014 the list command cannot see them reliably. Add --as-node to get the object to write into the step's form.external instead.",
|
|
24504
|
+
args: {
|
|
24505
|
+
slug: { type: "positional", description: "Meeting slug (from `baker hubspot meetings list`)", required: true },
|
|
24506
|
+
"as-node": {
|
|
24507
|
+
type: "boolean",
|
|
24508
|
+
description: "Emit the resource blob to write into a flow node's form.external, instead of the readable view.",
|
|
24509
|
+
required: false,
|
|
24510
|
+
default: false
|
|
24511
|
+
}
|
|
24512
|
+
}
|
|
24513
|
+
});
|
|
24514
|
+
var formsListCommand = defineCommand111({
|
|
24515
|
+
meta: {
|
|
24516
|
+
name: "list",
|
|
24517
|
+
description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
|
|
24518
|
+
},
|
|
24519
|
+
args: {
|
|
24520
|
+
search: { type: "string", description: "Match on form name", required: false },
|
|
24521
|
+
"redirecting-only": { type: "boolean", description: "Only forms that redirect on submit", required: false },
|
|
24522
|
+
"embed-type": { type: "string", description: "Filter: legacy|v4|unknown", required: false }
|
|
24523
|
+
},
|
|
24524
|
+
run: async ({ args }) => {
|
|
24525
|
+
try {
|
|
24526
|
+
const body = {};
|
|
24527
|
+
if (args.search) {
|
|
24528
|
+
body.search = args.search;
|
|
24529
|
+
}
|
|
24530
|
+
if (args["redirecting-only"]) {
|
|
24531
|
+
body.redirectingOnly = true;
|
|
24532
|
+
}
|
|
24533
|
+
const embedType = assertEmbedType(args["embed-type"]);
|
|
24534
|
+
if (embedType) {
|
|
24535
|
+
body.embedType = embedType;
|
|
24536
|
+
}
|
|
24537
|
+
const response = await apiPost("/api/hubspot/forms/list", body);
|
|
24538
|
+
const { forms } = response.data;
|
|
24539
|
+
const redirecting = forms.filter((form) => form.postSubmitAction?.type === "redirect_url");
|
|
24540
|
+
const hints = [];
|
|
24541
|
+
if (forms.length === 0) {
|
|
24542
|
+
hints.push("No forms matched. Drop --search/--embed-type, or check the connected HubSpot account.");
|
|
24543
|
+
} else {
|
|
24544
|
+
hints.push(
|
|
24545
|
+
"To put one on a page: `baker hubspot forms view <id> --as-node` returns the object to write into the step's form.external. No request_flow_input needed for HubSpot."
|
|
24546
|
+
);
|
|
24547
|
+
}
|
|
24548
|
+
if (redirecting.length > 0) {
|
|
24549
|
+
hints.push(
|
|
24550
|
+
`${redirecting.length} form(s) redirect after submit. That is fine mid-Form: the renderer suppresses the redirect whenever a step follows the form, and honors it when the form is the last step.`
|
|
24551
|
+
);
|
|
24552
|
+
}
|
|
24553
|
+
writeJson({ ...response, meta: { count: forms.length }, ...hints.length > 0 ? { hints } : {} });
|
|
24554
|
+
} catch (err) {
|
|
24555
|
+
failNotConnected(err);
|
|
24556
|
+
}
|
|
24557
|
+
}
|
|
24558
|
+
});
|
|
24559
|
+
var formsViewCommand = defineCommand111({
|
|
24560
|
+
meta: {
|
|
24561
|
+
name: "view",
|
|
24562
|
+
description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
|
|
24563
|
+
},
|
|
24564
|
+
args: {
|
|
24565
|
+
formId: { type: "positional", description: "HubSpot form id", required: true },
|
|
24566
|
+
full: { type: "boolean", description: "Include the raw HubSpot payload", required: false },
|
|
24567
|
+
"as-node": { type: "boolean", description: "Emit the node-ready form.external blob", required: false }
|
|
24568
|
+
},
|
|
24569
|
+
run: async ({ args }) => {
|
|
24570
|
+
try {
|
|
24571
|
+
const response = await apiPost("/api/hubspot/forms/view", {
|
|
24572
|
+
formId: args.formId,
|
|
24573
|
+
...args.full ? { full: true } : {},
|
|
24574
|
+
...args["as-node"] ? { asNode: true } : {}
|
|
24575
|
+
});
|
|
24576
|
+
if (args["as-node"]) {
|
|
24577
|
+
const { external } = response.data;
|
|
24578
|
+
writeJson({
|
|
24579
|
+
...response,
|
|
24580
|
+
hints: [
|
|
24581
|
+
"Write this object into the node's `form.external` in the flow's _data.json, keeping the rest of the node as-is. No request_flow_input needed \u2014 the account is already connected.",
|
|
24582
|
+
...external?.configuration?.postSubmitAction.type === "redirect_url" ? [
|
|
24583
|
+
"This form redirects on submit. Safe unless it is the last step: the renderer suppresses the redirect whenever a step follows it."
|
|
24584
|
+
] : [],
|
|
24585
|
+
...external?.embedType === "v4" && !external.region ? [
|
|
24586
|
+
"WARNING: this is a v4 form and the connected account has no region recorded, so the step will load HubSpot's na1 script host. That is correct for US portals and breaks the form on eu1/ap1 ones. If it renders blank, have the user reconnect HubSpot from Brain -> Integrations -> Tools, then re-run this command."
|
|
24587
|
+
] : []
|
|
24588
|
+
]
|
|
24589
|
+
});
|
|
24590
|
+
return;
|
|
24591
|
+
}
|
|
24592
|
+
const form = response.data.form;
|
|
24593
|
+
if (!form) {
|
|
24594
|
+
throw new Error("Response did not include the form view");
|
|
24595
|
+
}
|
|
24596
|
+
const hints = [];
|
|
24597
|
+
if (form.postSubmitAction?.type === "redirect_url") {
|
|
24598
|
+
hints.push(
|
|
24599
|
+
`This form redirects to ${form.postSubmitAction.value} on submit. Placed anywhere but the last step of a Form, that redirect is suppressed so the next step can render.`
|
|
24600
|
+
);
|
|
24601
|
+
}
|
|
24602
|
+
if (form.embedType === "unknown") {
|
|
24603
|
+
hints.push("Embed type could not be determined from HubSpot's response; the renderer treats it as legacy.");
|
|
24604
|
+
}
|
|
24605
|
+
writeJson({ ...response, meta: { count: form.fields.length }, ...hints.length > 0 ? { hints } : {} });
|
|
24606
|
+
} catch (err) {
|
|
24607
|
+
failNotConnected(err);
|
|
24608
|
+
}
|
|
24609
|
+
}
|
|
24610
|
+
});
|
|
24611
|
+
var meetingsListCommand = defineCommand111({
|
|
24612
|
+
meta: {
|
|
24613
|
+
name: "list",
|
|
24614
|
+
description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
|
|
24615
|
+
},
|
|
24616
|
+
args: {
|
|
24617
|
+
search: { type: "string", description: "Match on meeting name", required: false },
|
|
24618
|
+
"redirecting-only": { type: "boolean", description: "Only links that redirect after booking", required: false }
|
|
24619
|
+
},
|
|
24620
|
+
run: async ({ args }) => {
|
|
24621
|
+
try {
|
|
24622
|
+
const body = {};
|
|
24623
|
+
if (args.search) {
|
|
24624
|
+
body.search = args.search;
|
|
24625
|
+
}
|
|
24626
|
+
if (args["redirecting-only"]) {
|
|
24627
|
+
body.redirectingOnly = true;
|
|
24628
|
+
}
|
|
24629
|
+
const response = await apiPost("/api/hubspot/meetings/list", body);
|
|
24630
|
+
const { meetings } = response.data;
|
|
24631
|
+
const hints = [];
|
|
24632
|
+
if (meetings.length === 0) {
|
|
24633
|
+
hints.push("No meeting links matched. Drop --search, or check the connected HubSpot account.");
|
|
24634
|
+
} else {
|
|
24635
|
+
hints.push(
|
|
24636
|
+
"To put one on a page: `baker hubspot meetings view <slug> --as-node` returns the object to write into the step's form.external."
|
|
24637
|
+
);
|
|
24638
|
+
}
|
|
24639
|
+
const unknown = meetings.filter((meeting) => !meeting.redirectKnown);
|
|
24640
|
+
if (unknown.length > 0) {
|
|
24641
|
+
hints.push(
|
|
24642
|
+
`HubSpot did not report booking settings for ${unknown.length} of these (${unknown.map((meeting) => meeting.slug).join(
|
|
24643
|
+
", "
|
|
24644
|
+
)}), so their redirect and field count are UNKNOWN, not absent. Run \`baker hubspot meetings view <slug>\` before concluding one does not redirect.`
|
|
24645
|
+
);
|
|
24646
|
+
}
|
|
24647
|
+
writeJson({ ...response, meta: { count: meetings.length }, ...hints.length > 0 ? { hints } : {} });
|
|
24648
|
+
} catch (err) {
|
|
24649
|
+
failNotConnected(err);
|
|
24650
|
+
}
|
|
24651
|
+
}
|
|
24652
|
+
});
|
|
24653
|
+
var meetingsViewCommand = defineCommand111({
|
|
24654
|
+
meta: {
|
|
24655
|
+
name: "view",
|
|
24656
|
+
description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
|
|
24657
|
+
},
|
|
24658
|
+
args: {
|
|
24659
|
+
slug: { type: "positional", description: "Meeting slug", required: true },
|
|
24660
|
+
"as-node": { type: "boolean", description: "Emit the node-ready form.external blob", required: false }
|
|
24661
|
+
},
|
|
24662
|
+
run: async ({ args }) => {
|
|
24663
|
+
try {
|
|
24664
|
+
const response = await apiPost("/api/hubspot/meetings/view", {
|
|
24665
|
+
slug: args.slug,
|
|
24666
|
+
...args["as-node"] ? { asNode: true } : {}
|
|
24667
|
+
});
|
|
24668
|
+
if (args["as-node"]) {
|
|
24669
|
+
const { external } = response.data;
|
|
24670
|
+
writeJson({
|
|
24671
|
+
...response,
|
|
24672
|
+
hints: [
|
|
24673
|
+
"Write this object into the node's `form.external` in the flow's _data.json, keeping the rest of the node as-is. No request_flow_input needed \u2014 the account is already connected.",
|
|
24674
|
+
...external?.customParams.redirectUrl ? [
|
|
24675
|
+
`This calendar redirects to ${external.customParams.redirectUrl} after booking, and that redirect is NOT suppressed \u2014 any step placed after it is unreachable. Keep it as the last step, or ask the user to clear the redirect in HubSpot.`
|
|
24676
|
+
] : []
|
|
24677
|
+
]
|
|
24678
|
+
});
|
|
24679
|
+
return;
|
|
24680
|
+
}
|
|
24681
|
+
const meeting = response.data.meeting;
|
|
24682
|
+
if (!meeting) {
|
|
24683
|
+
throw new Error("Response did not include the meeting view");
|
|
24684
|
+
}
|
|
24685
|
+
const hints = [];
|
|
24686
|
+
if (meeting.redirectUrl) {
|
|
24687
|
+
hints.push(
|
|
24688
|
+
`This calendar redirects to ${meeting.redirectUrl} after booking. A step placed after it will not be reached \u2014 keep it as the last step, or clear the redirect in HubSpot.`
|
|
24689
|
+
);
|
|
24690
|
+
}
|
|
24691
|
+
writeJson({ ...response, meta: { count: meeting.fields.length }, ...hints.length > 0 ? { hints } : {} });
|
|
24692
|
+
} catch (err) {
|
|
24693
|
+
failNotConnected(err);
|
|
24694
|
+
}
|
|
24695
|
+
}
|
|
24696
|
+
});
|
|
24697
|
+
var formsCommand = defineCommand111({
|
|
24698
|
+
meta: { name: "forms", description: "HubSpot forms on the connected account." },
|
|
24699
|
+
subCommands: { list: formsListCommand, view: formsViewCommand }
|
|
24700
|
+
});
|
|
24701
|
+
var meetingsCommand = defineCommand111({
|
|
24702
|
+
meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
|
|
24703
|
+
subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
|
|
24704
|
+
});
|
|
24705
|
+
var hubspotCommand = defineCommand111({
|
|
24706
|
+
meta: {
|
|
24707
|
+
name: "hubspot",
|
|
24708
|
+
description: `Read the connected HubSpot account \u2014 forms and meeting links (calendars) \u2014 and get the blob to wire one into a Form step yourself.
|
|
24709
|
+
|
|
24710
|
+
Examples:
|
|
24711
|
+
baker hubspot forms list # every form: embed type + post-submit action
|
|
24712
|
+
baker hubspot forms list --redirecting-only # which forms redirect away on submit
|
|
24713
|
+
baker hubspot forms view <formId> # fields, consent mode, full configuration
|
|
24714
|
+
baker hubspot forms view <formId> --as-node # the form.external blob -> write into the step
|
|
24715
|
+
baker hubspot meetings list # every calendar + whether booking redirects
|
|
24716
|
+
baker hubspot meetings view <slug> --as-node # same, for a hubspotMeeting step
|
|
24717
|
+
|
|
24718
|
+
Nothing here is secret, so HubSpot steps do not need request_flow_input: take --as-node and edit the
|
|
24719
|
+
flow's _data.json. Use the approval form only when no account is connected or the right form is unclear.
|
|
24720
|
+
Full guide: __tooling__/docs/tools/baker/hubspot.md`
|
|
24721
|
+
},
|
|
24722
|
+
subCommands: { forms: formsCommand, meetings: meetingsCommand }
|
|
24723
|
+
});
|
|
24724
|
+
|
|
24274
24725
|
// src/commands/images/index.ts
|
|
24275
|
-
import { defineCommand as
|
|
24726
|
+
import { defineCommand as defineCommand135 } from "citty";
|
|
24276
24727
|
|
|
24277
24728
|
// src/commands/images/crop.ts
|
|
24278
|
-
import { defineCommand as
|
|
24729
|
+
import { defineCommand as defineCommand112 } from "citty";
|
|
24279
24730
|
|
|
24280
24731
|
// src/lib/image/crop-sprite.ts
|
|
24281
24732
|
import sharp from "sharp";
|
|
@@ -24400,7 +24851,7 @@ function emitError2(err) {
|
|
|
24400
24851
|
}
|
|
24401
24852
|
process.exit(1);
|
|
24402
24853
|
}
|
|
24403
|
-
var cropCommand =
|
|
24854
|
+
var cropCommand = defineCommand112({
|
|
24404
24855
|
meta: {
|
|
24405
24856
|
name: "crop",
|
|
24406
24857
|
description: "Crop a rectangular region from an image.\n\nExample: baker images crop sprite.png --x 0 --y 0 --width 64 --height 64 --output icon.png"
|
|
@@ -24436,7 +24887,7 @@ var cropCommand = defineCommand111({
|
|
|
24436
24887
|
});
|
|
24437
24888
|
|
|
24438
24889
|
// src/commands/images/delete.ts
|
|
24439
|
-
import { defineCommand as
|
|
24890
|
+
import { defineCommand as defineCommand113 } from "citty";
|
|
24440
24891
|
registerSchema({
|
|
24441
24892
|
command: "images.delete",
|
|
24442
24893
|
description: "Delete an image by ID",
|
|
@@ -24450,7 +24901,7 @@ registerSchema({
|
|
|
24450
24901
|
}
|
|
24451
24902
|
}
|
|
24452
24903
|
});
|
|
24453
|
-
var deleteCommand =
|
|
24904
|
+
var deleteCommand = defineCommand113({
|
|
24454
24905
|
meta: {
|
|
24455
24906
|
name: "delete",
|
|
24456
24907
|
description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
|
|
@@ -24491,7 +24942,7 @@ var deleteCommand = defineCommand112({
|
|
|
24491
24942
|
});
|
|
24492
24943
|
|
|
24493
24944
|
// src/commands/images/dimensions.ts
|
|
24494
|
-
import { defineCommand as
|
|
24945
|
+
import { defineCommand as defineCommand114 } from "citty";
|
|
24495
24946
|
|
|
24496
24947
|
// src/lib/image/dimensions.ts
|
|
24497
24948
|
import { imageSize } from "image-size";
|
|
@@ -24514,7 +24965,7 @@ registerSchema({
|
|
|
24514
24965
|
target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
|
|
24515
24966
|
}
|
|
24516
24967
|
});
|
|
24517
|
-
var dimensionsCommand =
|
|
24968
|
+
var dimensionsCommand = defineCommand114({
|
|
24518
24969
|
meta: {
|
|
24519
24970
|
name: "dimensions",
|
|
24520
24971
|
description: "Read image dimensions without decoding the full file.\n\nExample: baker images dimensions ./logo.png\nExample: baker images dimensions https://acme.com/hero.png"
|
|
@@ -24558,7 +25009,7 @@ var dimensionsCommand = defineCommand113({
|
|
|
24558
25009
|
});
|
|
24559
25010
|
|
|
24560
25011
|
// src/commands/images/extract.ts
|
|
24561
|
-
import { defineCommand as
|
|
25012
|
+
import { defineCommand as defineCommand115 } from "citty";
|
|
24562
25013
|
registerSchema({
|
|
24563
25014
|
command: "images.extract",
|
|
24564
25015
|
description: "Extract images from a URL via Firecrawl (formats: images).",
|
|
@@ -24574,7 +25025,7 @@ registerSchema({
|
|
|
24574
25025
|
}
|
|
24575
25026
|
}
|
|
24576
25027
|
});
|
|
24577
|
-
var extractCommand =
|
|
25028
|
+
var extractCommand = defineCommand115({
|
|
24578
25029
|
meta: {
|
|
24579
25030
|
name: "extract",
|
|
24580
25031
|
description: "Pull every image from a single URL via Firecrawl. ~$0.001/scrape. Cap auto-ingest at 20.\n\nExample: baker images extract https://stripe.com --auto-ingest 5"
|
|
@@ -24612,7 +25063,7 @@ var extractCommand = defineCommand114({
|
|
|
24612
25063
|
});
|
|
24613
25064
|
|
|
24614
25065
|
// src/commands/images/find.ts
|
|
24615
|
-
import { defineCommand as
|
|
25066
|
+
import { defineCommand as defineCommand116 } from "citty";
|
|
24616
25067
|
registerSchema({
|
|
24617
25068
|
command: "images.find",
|
|
24618
25069
|
description: "Fanout image search: library first, then opted-in external providers.",
|
|
@@ -24644,7 +25095,7 @@ registerSchema({
|
|
|
24644
25095
|
}
|
|
24645
25096
|
}
|
|
24646
25097
|
});
|
|
24647
|
-
var findCommand =
|
|
25098
|
+
var findCommand = defineCommand116({
|
|
24648
25099
|
meta: {
|
|
24649
25100
|
name: "find",
|
|
24650
25101
|
description: "Library-first fanout image search. Opt in to providers with --sources. `--fallback` short-circuits to externals only when library is thin. With --auto-ingest, ingested external hits return Baker-owned URLs.\n\nExample: baker images find 'office' --sources library,magnific --limit 20"
|
|
@@ -24693,7 +25144,7 @@ var findCommand = defineCommand115({
|
|
|
24693
25144
|
|
|
24694
25145
|
// src/commands/images/generate.ts
|
|
24695
25146
|
import { readFile as readFile20 } from "fs/promises";
|
|
24696
|
-
import { defineCommand as
|
|
25147
|
+
import { defineCommand as defineCommand117 } from "citty";
|
|
24697
25148
|
import sharp2 from "sharp";
|
|
24698
25149
|
var GENERATE_TIMEOUT_MS = 18e4;
|
|
24699
25150
|
var REFERENCE_MAX_EDGE = 1536;
|
|
@@ -24796,7 +25247,7 @@ async function resolveReferences(spec) {
|
|
|
24796
25247
|
}
|
|
24797
25248
|
return out;
|
|
24798
25249
|
}
|
|
24799
|
-
var generateCommand =
|
|
25250
|
+
var generateCommand = defineCommand117({
|
|
24800
25251
|
meta: {
|
|
24801
25252
|
name: "generate",
|
|
24802
25253
|
description: "Generate an image with AI and store it in the library (cost-tracked per request via OpenRouter usage). Models mirror the canvas: google/gemini-3.1-flash-image-preview (Nano Banana flash \u2014 default, fast, extreme aspect ratios), google/gemini-3-pro-image-preview (Nano Banana Pro \u2014 highest fidelity), openai/gpt-image-2 (photoreal, cleanest in-image text, best for ad/landing reproduction \u2014 no --image-size, and no 4:5 / 5:4), recraft/recraft-v4.1-pro-vector (vector/SVG-style with palette control). The result is auto-ingested (describe + embed), so the next `baker images library` query finds it. Pass --reference with image URLs and/or local file paths (Pinterest, stock, brand assets, sandbox files) to ground generation in reality.\n\nExamples:\n baker images generate 'a friendly golden retriever sitting in a bright modern living room' --aspect-ratio 16:9\n baker images generate 'hero shot of a matte black water bottle on marble' --model openai/gpt-image-2 --aspect-ratio 3:2\n baker images generate 'lifestyle photo matching this mood' --reference 'https://\u2026/ref1.jpg,https://\u2026/ref2.jpg'\n baker images generate 'put this product on a marble countertop, soft daylight' --reference './src/brand/logos/product.png,./refs/kitchen-mood.jpg'\n baker images generate 'flat geometric mascot, brand palette' --model recraft/recraft-v4.1-pro-vector --rgb-colors '[[10,10,10],[255,80,0]]'"
|
|
@@ -24848,7 +25299,7 @@ var generateCommand = defineCommand116({
|
|
|
24848
25299
|
});
|
|
24849
25300
|
|
|
24850
25301
|
// src/commands/images/get.ts
|
|
24851
|
-
import { defineCommand as
|
|
25302
|
+
import { defineCommand as defineCommand118 } from "citty";
|
|
24852
25303
|
registerSchema({
|
|
24853
25304
|
command: "images.get",
|
|
24854
25305
|
description: "Get a single image by ID",
|
|
@@ -24856,7 +25307,7 @@ registerSchema({
|
|
|
24856
25307
|
id: { type: "string", description: "Image ID", required: true }
|
|
24857
25308
|
}
|
|
24858
25309
|
});
|
|
24859
|
-
var getCommand2 =
|
|
25310
|
+
var getCommand2 = defineCommand118({
|
|
24860
25311
|
meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
|
|
24861
25312
|
args: {
|
|
24862
25313
|
id: { type: "positional", description: "Image ID", required: false },
|
|
@@ -24892,7 +25343,7 @@ var getCommand2 = defineCommand117({
|
|
|
24892
25343
|
});
|
|
24893
25344
|
|
|
24894
25345
|
// src/commands/images/gif.ts
|
|
24895
|
-
import { defineCommand as
|
|
25346
|
+
import { defineCommand as defineCommand119 } from "citty";
|
|
24896
25347
|
registerSchema({
|
|
24897
25348
|
command: "images.gif",
|
|
24898
25349
|
description: "Search Giphy for GIFs / reaction memes (paid social creative).",
|
|
@@ -24924,7 +25375,7 @@ registerSchema({
|
|
|
24924
25375
|
}
|
|
24925
25376
|
}
|
|
24926
25377
|
});
|
|
24927
|
-
var gifCommand =
|
|
25378
|
+
var gifCommand = defineCommand119({
|
|
24928
25379
|
meta: {
|
|
24929
25380
|
name: "gif",
|
|
24930
25381
|
description: "Search Giphy for GIFs / reaction memes \u2014 built for paid-social creative (Meta, TikTok, LinkedIn, X). Free API. Each hit carries WebP + GIF + MP4 URLs in providerMeta so you can pick the right format per platform.\n\nExample: baker images gif 'this is fine' --limit 10\nExample: baker images gif 'office reaction' --rating pg --auto-ingest 2\nExample: baker images gif --trending --limit 25"
|
|
@@ -24971,7 +25422,7 @@ var gifCommand = defineCommand118({
|
|
|
24971
25422
|
});
|
|
24972
25423
|
|
|
24973
25424
|
// src/commands/images/google.ts
|
|
24974
|
-
import { defineCommand as
|
|
25425
|
+
import { defineCommand as defineCommand120 } from "citty";
|
|
24975
25426
|
|
|
24976
25427
|
// src/commands/images/searchHints.ts
|
|
24977
25428
|
var FALLBACK = {
|
|
@@ -25035,7 +25486,7 @@ registerSchema({
|
|
|
25035
25486
|
}
|
|
25036
25487
|
}
|
|
25037
25488
|
});
|
|
25038
|
-
var googleCommand2 =
|
|
25489
|
+
var googleCommand2 = defineCommand120({
|
|
25039
25490
|
meta: {
|
|
25040
25491
|
name: "google",
|
|
25041
25492
|
description: "Google Images via the official Custom Search JSON API ($0.005/query, free 100/day). \u26A0 Source unverified \u2014 watermarks, low-res, mislabeled results are common. Use as last resort. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExample: baker images google 'industrial workshop' --type photo --size large --limit 20"
|
|
@@ -25091,7 +25542,7 @@ var googleCommand2 = defineCommand119({
|
|
|
25091
25542
|
});
|
|
25092
25543
|
|
|
25093
25544
|
// src/commands/images/icon.ts
|
|
25094
|
-
import { defineCommand as
|
|
25545
|
+
import { defineCommand as defineCommand121 } from "citty";
|
|
25095
25546
|
registerSchema({
|
|
25096
25547
|
command: "images.icon",
|
|
25097
25548
|
description: "Icon lookup via Iconify (200+ icon sets, free CDN).",
|
|
@@ -25117,7 +25568,7 @@ registerSchema({
|
|
|
25117
25568
|
}
|
|
25118
25569
|
}
|
|
25119
25570
|
});
|
|
25120
|
-
var iconCommand =
|
|
25571
|
+
var iconCommand = defineCommand121({
|
|
25121
25572
|
meta: {
|
|
25122
25573
|
name: "icon",
|
|
25123
25574
|
description: "Icon via Iconify (simple-icons, logos, lucide, devicon, heroicons, tabler, phosphor, material-symbols, \u2026). Free CDN, no API key.\n\nExample: baker images icon react --set devicon\nExample: baker images icon lucide:check --color '#0a0a0a'"
|
|
@@ -25157,7 +25608,7 @@ var iconCommand = defineCommand120({
|
|
|
25157
25608
|
});
|
|
25158
25609
|
|
|
25159
25610
|
// src/commands/images/ingest.ts
|
|
25160
|
-
import { defineCommand as
|
|
25611
|
+
import { defineCommand as defineCommand122 } from "citty";
|
|
25161
25612
|
registerSchema({
|
|
25162
25613
|
command: "images.ingest",
|
|
25163
25614
|
description: "Ingest a remote image URL into the library (full describe + embed).",
|
|
@@ -25169,7 +25620,7 @@ registerSchema({
|
|
|
25169
25620
|
context: { type: "string", description: "Description context hint", required: false }
|
|
25170
25621
|
}
|
|
25171
25622
|
});
|
|
25172
|
-
var ingestCommand =
|
|
25623
|
+
var ingestCommand = defineCommand122({
|
|
25173
25624
|
meta: {
|
|
25174
25625
|
name: "ingest",
|
|
25175
25626
|
description: "Download a remote URL and store it in the library. Hash-deduped on bytes + externalId.\n\nExample: baker images ingest https://img.freepik.com/free-photo/xyz.jpg --source magnific --external-id 12345"
|
|
@@ -25211,7 +25662,7 @@ var ingestCommand = defineCommand121({
|
|
|
25211
25662
|
});
|
|
25212
25663
|
|
|
25213
25664
|
// src/commands/images/library.ts
|
|
25214
|
-
import { defineCommand as
|
|
25665
|
+
import { defineCommand as defineCommand123 } from "citty";
|
|
25215
25666
|
registerSchema({
|
|
25216
25667
|
command: "images.library",
|
|
25217
25668
|
description: "Search the company image library. Returns only ready images.",
|
|
@@ -25237,7 +25688,7 @@ registerSchema({
|
|
|
25237
25688
|
}
|
|
25238
25689
|
}
|
|
25239
25690
|
});
|
|
25240
|
-
var libraryCommand =
|
|
25691
|
+
var libraryCommand = defineCommand123({
|
|
25241
25692
|
meta: {
|
|
25242
25693
|
name: "library",
|
|
25243
25694
|
description: "Search the company image library (hybrid BM25 + vector + Cohere rerank). Use this BEFORE any external provider.\n\nExample: baker images library 'hero banner' --aspect-ratio 16:9 --source magnific"
|
|
@@ -25294,7 +25745,7 @@ var libraryCommand = defineCommand122({
|
|
|
25294
25745
|
});
|
|
25295
25746
|
|
|
25296
25747
|
// src/commands/images/logo.ts
|
|
25297
|
-
import { defineCommand as
|
|
25748
|
+
import { defineCommand as defineCommand124 } from "citty";
|
|
25298
25749
|
registerSchema({
|
|
25299
25750
|
command: "images.logo",
|
|
25300
25751
|
description: "Brand logo lookup via Brandfetch CDN (fallback/404). Auto-ingests by default.",
|
|
@@ -25319,7 +25770,7 @@ registerSchema({
|
|
|
25319
25770
|
}
|
|
25320
25771
|
}
|
|
25321
25772
|
});
|
|
25322
|
-
var logoCommand =
|
|
25773
|
+
var logoCommand = defineCommand124({
|
|
25323
25774
|
meta: {
|
|
25324
25775
|
name: "logo",
|
|
25325
25776
|
description: "Brand logo via Brandfetch CDN. Returns up to 5 variants (icon, light/dark logo, light/dark symbol). Auto-ingests the first variant.\n\nExample: baker images logo stripe.com --variant logo"
|
|
@@ -25357,7 +25808,7 @@ var logoCommand = defineCommand123({
|
|
|
25357
25808
|
});
|
|
25358
25809
|
|
|
25359
25810
|
// src/commands/images/normalize.ts
|
|
25360
|
-
import { defineCommand as
|
|
25811
|
+
import { defineCommand as defineCommand125 } from "citty";
|
|
25361
25812
|
|
|
25362
25813
|
// src/lib/image/color-changer.ts
|
|
25363
25814
|
import quantize from "quantize";
|
|
@@ -26089,7 +26540,7 @@ function coerceRawArgs(args) {
|
|
|
26089
26540
|
"dry-run": bool(args["dry-run"])
|
|
26090
26541
|
};
|
|
26091
26542
|
}
|
|
26092
|
-
var normalizeCommand =
|
|
26543
|
+
var normalizeCommand = defineCommand125({
|
|
26093
26544
|
meta: {
|
|
26094
26545
|
name: "normalize",
|
|
26095
26546
|
description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
|
|
@@ -26144,7 +26595,7 @@ Examples:
|
|
|
26144
26595
|
});
|
|
26145
26596
|
|
|
26146
26597
|
// src/commands/images/pinterest.ts
|
|
26147
|
-
import { defineCommand as
|
|
26598
|
+
import { defineCommand as defineCommand126 } from "citty";
|
|
26148
26599
|
registerSchema({
|
|
26149
26600
|
command: "images.pinterest",
|
|
26150
26601
|
description: "Pinterest image search via ScrapeCreators. Reference-grade real-world photography, product styling, interiors, fashion, food, and aesthetic mood boards. Inspect before placing \u2014 Pinterest is unverified, trademark-bearing web content.",
|
|
@@ -26164,7 +26615,7 @@ registerSchema({
|
|
|
26164
26615
|
}
|
|
26165
26616
|
}
|
|
26166
26617
|
});
|
|
26167
|
-
var pinterestCommand =
|
|
26618
|
+
var pinterestCommand = defineCommand126({
|
|
26168
26619
|
meta: {
|
|
26169
26620
|
name: "pinterest",
|
|
26170
26621
|
description: "Pinterest image search via ScrapeCreators ($0.00188/request). Best for photo-realistic reference imagery \u2014 lifestyle, interiors, fashion, food, product styling, and mood boards to brief AI generation against. \u26A0 Unverified, trademark-bearing web content \u2014 inspect and respect rights before placing on a customer page. Browse first; auto-ingest only the pins you commit to.\n\nExamples:\n baker images pinterest 'scandinavian living room'\n baker images pinterest 'minimalist skincare product photography' --limit 20\n baker images pinterest 'cozy coffee shop interior' --auto-ingest 2 --context 'Mood reference for hero photography'"
|
|
@@ -26204,7 +26655,7 @@ var pinterestCommand = defineCommand125({
|
|
|
26204
26655
|
});
|
|
26205
26656
|
|
|
26206
26657
|
// src/commands/images/screenshot.ts
|
|
26207
|
-
import { defineCommand as
|
|
26658
|
+
import { defineCommand as defineCommand127 } from "citty";
|
|
26208
26659
|
registerSchema({
|
|
26209
26660
|
command: "images.screenshot",
|
|
26210
26661
|
description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
|
|
@@ -26220,7 +26671,7 @@ registerSchema({
|
|
|
26220
26671
|
}
|
|
26221
26672
|
}
|
|
26222
26673
|
});
|
|
26223
|
-
var screenshotCommand =
|
|
26674
|
+
var screenshotCommand = defineCommand127({
|
|
26224
26675
|
meta: {
|
|
26225
26676
|
name: "screenshot",
|
|
26226
26677
|
description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
|
|
@@ -26283,7 +26734,7 @@ var screenshotCommand = defineCommand126({
|
|
|
26283
26734
|
});
|
|
26284
26735
|
|
|
26285
26736
|
// src/commands/images/search.ts
|
|
26286
|
-
import { defineCommand as
|
|
26737
|
+
import { defineCommand as defineCommand128 } from "citty";
|
|
26287
26738
|
registerSchema({
|
|
26288
26739
|
command: "images.search",
|
|
26289
26740
|
description: "Search images by text query. Only returns ready images.",
|
|
@@ -26299,7 +26750,7 @@ registerSchema({
|
|
|
26299
26750
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
26300
26751
|
}
|
|
26301
26752
|
});
|
|
26302
|
-
var searchCommand =
|
|
26753
|
+
var searchCommand = defineCommand128({
|
|
26303
26754
|
meta: {
|
|
26304
26755
|
name: "search",
|
|
26305
26756
|
description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
|
|
@@ -26359,7 +26810,7 @@ var searchCommand = defineCommand127({
|
|
|
26359
26810
|
});
|
|
26360
26811
|
|
|
26361
26812
|
// src/commands/images/sticker.ts
|
|
26362
|
-
import { defineCommand as
|
|
26813
|
+
import { defineCommand as defineCommand129 } from "citty";
|
|
26363
26814
|
registerSchema({
|
|
26364
26815
|
command: "images.sticker",
|
|
26365
26816
|
description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
|
|
@@ -26391,7 +26842,7 @@ registerSchema({
|
|
|
26391
26842
|
}
|
|
26392
26843
|
}
|
|
26393
26844
|
});
|
|
26394
|
-
var stickerCommand =
|
|
26845
|
+
var stickerCommand = defineCommand129({
|
|
26395
26846
|
meta: {
|
|
26396
26847
|
name: "sticker",
|
|
26397
26848
|
description: "Search Giphy's sticker corpus \u2014 transparent-background WebPs / GIFs ideal for overlaying on ad creative (Meta, TikTok, Stories). Same Giphy free API as `baker images gif`; results carry WebP + GIF + MP4 URLs in providerMeta.\n\nExample: baker images sticker 'thumbs up' --limit 10\nExample: baker images sticker celebration --rating g --auto-ingest 3\nExample: baker images sticker --trending --limit 25"
|
|
@@ -26438,7 +26889,7 @@ var stickerCommand = defineCommand128({
|
|
|
26438
26889
|
});
|
|
26439
26890
|
|
|
26440
26891
|
// src/commands/images/stock.ts
|
|
26441
|
-
import { defineCommand as
|
|
26892
|
+
import { defineCommand as defineCommand130 } from "citty";
|
|
26442
26893
|
var STOCK_ERROR_FIX = {
|
|
26443
26894
|
action: "use_different_resource",
|
|
26444
26895
|
explanation: "Switch provider instead of retrying stock search. Stock search is one of several image sources. Run `baker images find <query> --sources library,pinterest,google` (`--sources` is required \u2014 `find` alone searches the library only) or `baker images generate` to make the asset. Never sleep-and-retry this command \u2014 the CLI already backs off on rate limits. If no image can be sourced, continue the rest of the task with a placeholder rather than aborting it."
|
|
@@ -26515,7 +26966,7 @@ function buildStockRequest(query, args) {
|
|
|
26515
26966
|
if (args.context) body.descriptionContext = args.context;
|
|
26516
26967
|
return body;
|
|
26517
26968
|
}
|
|
26518
|
-
var stockCommand =
|
|
26969
|
+
var stockCommand = defineCommand130({
|
|
26519
26970
|
meta: {
|
|
26520
26971
|
name: "stock",
|
|
26521
26972
|
description: "Stock search via Magnific \u2014 Freepik's developer API (~250M assets: photos, vectors, illustrations, icons, PSDs). $0.002/req. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExamples:\n baker images stock 'minimalist office'\n baker images stock 'flat office workers' --type vector\n baker images stock 'hero photo of a kitchen' --type photo --orientation landscape --ai exclude\n baker images stock 'brand pattern' --color '#0a0a0a' --license freemium --auto-ingest 2"
|
|
@@ -26571,7 +27022,7 @@ var stockCommand = defineCommand129({
|
|
|
26571
27022
|
});
|
|
26572
27023
|
|
|
26573
27024
|
// src/lib/tags-command.ts
|
|
26574
|
-
import { defineCommand as
|
|
27025
|
+
import { defineCommand as defineCommand131 } from "citty";
|
|
26575
27026
|
function makeTagsCommand(command, label, endpoint) {
|
|
26576
27027
|
registerSchema({
|
|
26577
27028
|
command: `${command}.tags`,
|
|
@@ -26580,7 +27031,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
26580
27031
|
output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
|
|
26581
27032
|
}
|
|
26582
27033
|
});
|
|
26583
|
-
return
|
|
27034
|
+
return defineCommand131({
|
|
26584
27035
|
meta: {
|
|
26585
27036
|
name: "tags",
|
|
26586
27037
|
description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
|
|
@@ -26616,7 +27067,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
26616
27067
|
var tagsCommand2 = makeTagsCommand("images", "image", "/api/images/tags");
|
|
26617
27068
|
|
|
26618
27069
|
// src/commands/images/upload.ts
|
|
26619
|
-
import { defineCommand as
|
|
27070
|
+
import { defineCommand as defineCommand132 } from "citty";
|
|
26620
27071
|
registerSchema({
|
|
26621
27072
|
command: "images.upload",
|
|
26622
27073
|
description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
|
|
@@ -26654,7 +27105,7 @@ registerSchema({
|
|
|
26654
27105
|
function isRemoteUrl2(value) {
|
|
26655
27106
|
return /^https?:\/\//i.test(value);
|
|
26656
27107
|
}
|
|
26657
|
-
var uploadCommand =
|
|
27108
|
+
var uploadCommand = defineCommand132({
|
|
26658
27109
|
meta: {
|
|
26659
27110
|
name: "upload",
|
|
26660
27111
|
description: "Upload an image to the library \u2014 accepts a local file path OR a remote http(s) URL.\n\nLocal: reads bytes, sends to /api/images/upload, content-type auto-detected from extension.\nRemote: dispatches to /api/images/ingest with hash-dedup on bytes + externalId.\n\nExamples:\n baker images upload ./logo.png --source uploaded\n baker images upload ./cert.png --context 'ISO 27001 badge \u2014 enterprise tier'\n baker images upload https://acme.com/hero.png --source firecrawl --context 'Acme competitor pricing hero'"
|
|
@@ -26747,7 +27198,7 @@ async function uploadLocal(target, args) {
|
|
|
26747
27198
|
}
|
|
26748
27199
|
|
|
26749
27200
|
// src/commands/images/upscale.ts
|
|
26750
|
-
import { defineCommand as
|
|
27201
|
+
import { defineCommand as defineCommand133 } from "citty";
|
|
26751
27202
|
registerSchema({
|
|
26752
27203
|
command: "images.upscale",
|
|
26753
27204
|
description: "Upscale a library image via the backend (Replicate, cost-tracked). Waits for completion by default. The image must be status 'ready' and raster (not SVG/AVIF).",
|
|
@@ -26762,7 +27213,7 @@ registerSchema({
|
|
|
26762
27213
|
}
|
|
26763
27214
|
});
|
|
26764
27215
|
var POLL_INTERVAL_MS3 = 1500;
|
|
26765
|
-
var upscaleCommand =
|
|
27216
|
+
var upscaleCommand = defineCommand133({
|
|
26766
27217
|
meta: {
|
|
26767
27218
|
name: "upscale",
|
|
26768
27219
|
description: "Upscale a library image via the Convex backend (Replicate, cost-tracked at $0.05/image). Waits for completion by default.\n\nExample: baker images upscale j571abc123def\nExample: baker images upscale j571abc123def --max-wait 0 # fire-and-forget"
|
|
@@ -26817,7 +27268,7 @@ var upscaleCommand = defineCommand132({
|
|
|
26817
27268
|
});
|
|
26818
27269
|
|
|
26819
27270
|
// src/commands/images/use.ts
|
|
26820
|
-
import { defineCommand as
|
|
27271
|
+
import { defineCommand as defineCommand134 } from "citty";
|
|
26821
27272
|
registerSchema({
|
|
26822
27273
|
command: "images.use",
|
|
26823
27274
|
description: "Ingest a URL and wait for the library record to be ready.",
|
|
@@ -26833,7 +27284,7 @@ registerSchema({
|
|
|
26833
27284
|
}
|
|
26834
27285
|
});
|
|
26835
27286
|
var POLL_INTERVAL_MS4 = 1500;
|
|
26836
|
-
var useCommand =
|
|
27287
|
+
var useCommand = defineCommand134({
|
|
26837
27288
|
meta: {
|
|
26838
27289
|
name: "use",
|
|
26839
27290
|
description: "Sugar over `ingest`: download \u2192 store \u2192 wait until describe + embed complete \u2192 return ready library record.\n\nExample: baker images use https://cdn.example.com/hero.png --source uploaded"
|
|
@@ -26879,7 +27330,7 @@ var useCommand = defineCommand133({
|
|
|
26879
27330
|
});
|
|
26880
27331
|
|
|
26881
27332
|
// src/commands/images/index.ts
|
|
26882
|
-
var imagesCommand =
|
|
27333
|
+
var imagesCommand = defineCommand135({
|
|
26883
27334
|
meta: {
|
|
26884
27335
|
name: "images",
|
|
26885
27336
|
description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
|
|
@@ -26950,12 +27401,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
|
|
|
26950
27401
|
});
|
|
26951
27402
|
|
|
26952
27403
|
// src/commands/landing/index.ts
|
|
26953
|
-
import { defineCommand as
|
|
27404
|
+
import { defineCommand as defineCommand137 } from "citty";
|
|
26954
27405
|
|
|
26955
27406
|
// src/commands/landing/critique.ts
|
|
26956
27407
|
import { readdir as readdir8, stat as stat6 } from "fs/promises";
|
|
26957
27408
|
import path27 from "path";
|
|
26958
|
-
import { defineCommand as
|
|
27409
|
+
import { defineCommand as defineCommand136 } from "citty";
|
|
26959
27410
|
|
|
26960
27411
|
// src/engine/landing/lib/brand-tokens.ts
|
|
26961
27412
|
import { readFile as readFile21 } from "fs/promises";
|
|
@@ -28090,7 +28541,7 @@ function fail5(code, message, fix) {
|
|
|
28090
28541
|
);
|
|
28091
28542
|
process.exit(2);
|
|
28092
28543
|
}
|
|
28093
|
-
var critiqueCommand2 =
|
|
28544
|
+
var critiqueCommand2 = defineCommand136({
|
|
28094
28545
|
meta: {
|
|
28095
28546
|
name: "critique",
|
|
28096
28547
|
description: "Start here: `baker landing critique <slug>` after building or editing a landing. Deterministic design-quality critic (ADVISORY \u2014 findings never fail it). Flags the known AI design tells (gradient text, overused fonts, side-tab borders, cream palettes, buzzword copy, broken images) tiered block/warn/advisory, respecting the client's BRAND.md as the allowlist. Also records the critique that publishing requires \u2014 run it before finishing a landing."
|
|
@@ -28199,7 +28650,7 @@ async function isDir(p) {
|
|
|
28199
28650
|
}
|
|
28200
28651
|
|
|
28201
28652
|
// src/commands/landing/index.ts
|
|
28202
|
-
var landingCommand =
|
|
28653
|
+
var landingCommand = defineCommand137({
|
|
28203
28654
|
meta: {
|
|
28204
28655
|
name: "landing",
|
|
28205
28656
|
description: `Design-quality tools for landing pages (src/pages/<slug>/).
|
|
@@ -28215,7 +28666,7 @@ Subcommands:
|
|
|
28215
28666
|
});
|
|
28216
28667
|
|
|
28217
28668
|
// src/commands/mcp/index.ts
|
|
28218
|
-
import { defineCommand as
|
|
28669
|
+
import { defineCommand as defineCommand138 } from "citty";
|
|
28219
28670
|
var SCOPES = ["user", "user_org", "company", "org"];
|
|
28220
28671
|
function parseScope(raw) {
|
|
28221
28672
|
const scope = raw === void 0 ? "company" : String(raw);
|
|
@@ -28254,7 +28705,7 @@ registerSchema({
|
|
|
28254
28705
|
description: "List every third-party tool this chat can reach: managed integrations (Attio, Slack, Gmail, Google Sheets, \u2026) plus custom MCP servers. Start here when the user mentions an external tool.",
|
|
28255
28706
|
args: {}
|
|
28256
28707
|
});
|
|
28257
|
-
var connectedCommand =
|
|
28708
|
+
var connectedCommand = defineCommand138({
|
|
28258
28709
|
meta: {
|
|
28259
28710
|
name: "connected",
|
|
28260
28711
|
description: `List all connected third-party tools \u2014 managed integrations plus custom MCP servers.
|
|
@@ -28301,7 +28752,7 @@ registerSchema({
|
|
|
28301
28752
|
description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
|
|
28302
28753
|
args: {}
|
|
28303
28754
|
});
|
|
28304
|
-
var listCommand8 =
|
|
28755
|
+
var listCommand8 = defineCommand138({
|
|
28305
28756
|
meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
|
|
28306
28757
|
run: async () => {
|
|
28307
28758
|
try {
|
|
@@ -28326,7 +28777,7 @@ registerSchema({
|
|
|
28326
28777
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
28327
28778
|
}
|
|
28328
28779
|
});
|
|
28329
|
-
var addCommand =
|
|
28780
|
+
var addCommand = defineCommand138({
|
|
28330
28781
|
meta: {
|
|
28331
28782
|
name: "add",
|
|
28332
28783
|
description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
|
|
@@ -28367,7 +28818,7 @@ registerSchema({
|
|
|
28367
28818
|
description: "Remove a company custom MCP server by name.",
|
|
28368
28819
|
args: { name: { type: "string", description: "Server name to remove", required: true } }
|
|
28369
28820
|
});
|
|
28370
|
-
var removeCommand4 =
|
|
28821
|
+
var removeCommand4 = defineCommand138({
|
|
28371
28822
|
meta: {
|
|
28372
28823
|
name: "remove",
|
|
28373
28824
|
description: `Remove a company custom MCP server by name.
|
|
@@ -28389,7 +28840,7 @@ Example:
|
|
|
28389
28840
|
}
|
|
28390
28841
|
}
|
|
28391
28842
|
});
|
|
28392
|
-
var mcpCommand =
|
|
28843
|
+
var mcpCommand = defineCommand138({
|
|
28393
28844
|
meta: {
|
|
28394
28845
|
name: "mcp",
|
|
28395
28846
|
description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
|
|
@@ -28415,10 +28866,10 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
|
|
|
28415
28866
|
});
|
|
28416
28867
|
|
|
28417
28868
|
// src/commands/research/index.ts
|
|
28418
|
-
import { defineCommand as
|
|
28869
|
+
import { defineCommand as defineCommand149 } from "citty";
|
|
28419
28870
|
|
|
28420
28871
|
// src/commands/research/advertisers.ts
|
|
28421
|
-
import { defineCommand as
|
|
28872
|
+
import { defineCommand as defineCommand139 } from "citty";
|
|
28422
28873
|
|
|
28423
28874
|
// src/commands/research/output.ts
|
|
28424
28875
|
var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
|
|
@@ -28531,7 +28982,7 @@ var FIELDS3 = {
|
|
|
28531
28982
|
etv: "Estimated traffic value (USD)",
|
|
28532
28983
|
visibility: "SERP visibility score (0-1)"
|
|
28533
28984
|
};
|
|
28534
|
-
var advertisersCommand =
|
|
28985
|
+
var advertisersCommand = defineCommand139({
|
|
28535
28986
|
meta: {
|
|
28536
28987
|
name: "advertisers",
|
|
28537
28988
|
description: `Find domains competing for a keyword in Google SERPs.
|
|
@@ -28578,7 +29029,7 @@ Examples:
|
|
|
28578
29029
|
});
|
|
28579
29030
|
|
|
28580
29031
|
// src/commands/research/autocomplete.ts
|
|
28581
|
-
import { defineCommand as
|
|
29032
|
+
import { defineCommand as defineCommand140 } from "citty";
|
|
28582
29033
|
registerSchema({
|
|
28583
29034
|
command: "research.autocomplete",
|
|
28584
29035
|
description: "Get Google Autocomplete suggestions for a seed keyword. Useful for keyword expansion and discovering what people actually search for. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
|
|
@@ -28601,7 +29052,7 @@ registerSchema({
|
|
|
28601
29052
|
var FIELDS4 = {
|
|
28602
29053
|
suggestion: "Autocomplete suggestion from Google"
|
|
28603
29054
|
};
|
|
28604
|
-
var autocompleteCommand =
|
|
29055
|
+
var autocompleteCommand = defineCommand140({
|
|
28605
29056
|
meta: {
|
|
28606
29057
|
name: "autocomplete",
|
|
28607
29058
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -28647,7 +29098,7 @@ Examples:
|
|
|
28647
29098
|
});
|
|
28648
29099
|
|
|
28649
29100
|
// src/commands/research/countries.ts
|
|
28650
|
-
import { defineCommand as
|
|
29101
|
+
import { defineCommand as defineCommand141 } from "citty";
|
|
28651
29102
|
registerSchema({
|
|
28652
29103
|
command: "research.countries",
|
|
28653
29104
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -28704,7 +29155,7 @@ var FIELDS5 = {
|
|
|
28704
29155
|
code: "Country code to pass as --location",
|
|
28705
29156
|
name: "Country name"
|
|
28706
29157
|
};
|
|
28707
|
-
var countriesCommand =
|
|
29158
|
+
var countriesCommand = defineCommand141({
|
|
28708
29159
|
meta: {
|
|
28709
29160
|
name: "countries",
|
|
28710
29161
|
description: "List all supported country codes for --location flag."
|
|
@@ -28715,7 +29166,7 @@ var countriesCommand = defineCommand140({
|
|
|
28715
29166
|
});
|
|
28716
29167
|
|
|
28717
29168
|
// src/commands/research/intent.ts
|
|
28718
|
-
import { defineCommand as
|
|
29169
|
+
import { defineCommand as defineCommand142 } from "citty";
|
|
28719
29170
|
registerSchema({
|
|
28720
29171
|
command: "research.intent",
|
|
28721
29172
|
description: "Classify Google Search intent for keywords. Determines if someone searching is looking to buy, research, or navigate. IMPORTANT: If --language is omitted, defaults to English (en). The response includes a query_context object showing which language was used.",
|
|
@@ -28738,7 +29189,7 @@ var FIELDS6 = {
|
|
|
28738
29189
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
28739
29190
|
probability: "Confidence score 0.0-1.0"
|
|
28740
29191
|
};
|
|
28741
|
-
var intentCommand =
|
|
29192
|
+
var intentCommand = defineCommand142({
|
|
28742
29193
|
meta: {
|
|
28743
29194
|
name: "intent",
|
|
28744
29195
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -28786,7 +29237,7 @@ Examples:
|
|
|
28786
29237
|
});
|
|
28787
29238
|
|
|
28788
29239
|
// src/commands/research/keyword-gap.ts
|
|
28789
|
-
import { defineCommand as
|
|
29240
|
+
import { defineCommand as defineCommand143 } from "citty";
|
|
28790
29241
|
registerSchema({
|
|
28791
29242
|
command: "research.keyword-gap",
|
|
28792
29243
|
description: "Find keywords a competitor ranks for (organic or paid) that you don't. Discovers expansion opportunities. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
|
|
@@ -28815,7 +29266,7 @@ var FIELDS7 = {
|
|
|
28815
29266
|
cpc: "Cost per click USD",
|
|
28816
29267
|
their_position: "Competitor's ranking position"
|
|
28817
29268
|
};
|
|
28818
|
-
var keywordGapCommand =
|
|
29269
|
+
var keywordGapCommand = defineCommand143({
|
|
28819
29270
|
meta: {
|
|
28820
29271
|
name: "keyword-gap",
|
|
28821
29272
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -28889,7 +29340,7 @@ Examples:
|
|
|
28889
29340
|
});
|
|
28890
29341
|
|
|
28891
29342
|
// src/commands/research/keywords-for-site.ts
|
|
28892
|
-
import { defineCommand as
|
|
29343
|
+
import { defineCommand as defineCommand144 } from "citty";
|
|
28893
29344
|
registerSchema({
|
|
28894
29345
|
command: "research.keywords-for-site",
|
|
28895
29346
|
description: "Get keywords a competitor targets in Google. Use --type paid to see only paid keywords, --type organic for organic only. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
|
|
@@ -28922,7 +29373,7 @@ var FIELDS8 = {
|
|
|
28922
29373
|
competition: "LOW, MEDIUM, or HIGH",
|
|
28923
29374
|
competition_index: "Competition score 0-100"
|
|
28924
29375
|
};
|
|
28925
|
-
var keywordsForSiteCommand =
|
|
29376
|
+
var keywordsForSiteCommand = defineCommand144({
|
|
28926
29377
|
meta: {
|
|
28927
29378
|
name: "keywords-for-site",
|
|
28928
29379
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -28975,7 +29426,7 @@ Examples:
|
|
|
28975
29426
|
});
|
|
28976
29427
|
|
|
28977
29428
|
// src/commands/research/languages.ts
|
|
28978
|
-
import { defineCommand as
|
|
29429
|
+
import { defineCommand as defineCommand145 } from "citty";
|
|
28979
29430
|
registerSchema({
|
|
28980
29431
|
command: "research.languages",
|
|
28981
29432
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -29005,7 +29456,7 @@ var FIELDS9 = {
|
|
|
29005
29456
|
code: "Language code to pass as --language",
|
|
29006
29457
|
name: "Language name (also accepted by --language)"
|
|
29007
29458
|
};
|
|
29008
|
-
var languagesCommand2 =
|
|
29459
|
+
var languagesCommand2 = defineCommand145({
|
|
29009
29460
|
meta: {
|
|
29010
29461
|
name: "languages",
|
|
29011
29462
|
description: "List all supported language codes for --language flag."
|
|
@@ -29016,7 +29467,7 @@ var languagesCommand2 = defineCommand144({
|
|
|
29016
29467
|
});
|
|
29017
29468
|
|
|
29018
29469
|
// src/commands/research/lighthouse.ts
|
|
29019
|
-
import { defineCommand as
|
|
29470
|
+
import { defineCommand as defineCommand146 } from "citty";
|
|
29020
29471
|
registerSchema({
|
|
29021
29472
|
command: "research.lighthouse",
|
|
29022
29473
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -29035,7 +29486,7 @@ var FIELDS10 = {
|
|
|
29035
29486
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
29036
29487
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
29037
29488
|
};
|
|
29038
|
-
var lighthouseCommand =
|
|
29489
|
+
var lighthouseCommand = defineCommand146({
|
|
29039
29490
|
meta: {
|
|
29040
29491
|
name: "lighthouse",
|
|
29041
29492
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -29073,7 +29524,7 @@ Examples:
|
|
|
29073
29524
|
});
|
|
29074
29525
|
|
|
29075
29526
|
// src/commands/research/relevant-pages.ts
|
|
29076
|
-
import { defineCommand as
|
|
29527
|
+
import { defineCommand as defineCommand147 } from "citty";
|
|
29077
29528
|
registerSchema({
|
|
29078
29529
|
command: "research.relevant-pages",
|
|
29079
29530
|
description: "Get the top pages of a competitor domain with organic traffic and ranking data. Shows which pages drive the most traffic. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
|
|
@@ -29099,7 +29550,7 @@ var FIELDS11 = {
|
|
|
29099
29550
|
keywords: "Total organic keywords the page ranks for",
|
|
29100
29551
|
top_10: "Keywords in positions 1-10"
|
|
29101
29552
|
};
|
|
29102
|
-
var relevantPagesCommand =
|
|
29553
|
+
var relevantPagesCommand = defineCommand147({
|
|
29103
29554
|
meta: {
|
|
29104
29555
|
name: "relevant-pages",
|
|
29105
29556
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -29145,7 +29596,7 @@ Examples:
|
|
|
29145
29596
|
});
|
|
29146
29597
|
|
|
29147
29598
|
// src/commands/research/web.ts
|
|
29148
|
-
import { defineCommand as
|
|
29599
|
+
import { defineCommand as defineCommand148 } from "citty";
|
|
29149
29600
|
registerSchema({
|
|
29150
29601
|
command: "research.web",
|
|
29151
29602
|
description: "Search the web with AI to answer marketing questions \u2014 competitors, ICP, pricing, pain points, market trends. Three depth levels: medium (quick, default), high (thorough), xhigh (exhaustive deep research).",
|
|
@@ -29196,7 +29647,7 @@ async function runDeepResearch(question) {
|
|
|
29196
29647
|
}
|
|
29197
29648
|
throw new Error("Deep research timed out");
|
|
29198
29649
|
}
|
|
29199
|
-
var webCommand =
|
|
29650
|
+
var webCommand = defineCommand148({
|
|
29200
29651
|
meta: {
|
|
29201
29652
|
name: "web",
|
|
29202
29653
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -29256,7 +29707,7 @@ Examples:
|
|
|
29256
29707
|
});
|
|
29257
29708
|
|
|
29258
29709
|
// src/commands/research/index.ts
|
|
29259
|
-
var researchCommand =
|
|
29710
|
+
var researchCommand = defineCommand149({
|
|
29260
29711
|
meta: {
|
|
29261
29712
|
name: "research",
|
|
29262
29713
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -29297,10 +29748,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
|
|
|
29297
29748
|
});
|
|
29298
29749
|
|
|
29299
29750
|
// src/commands/scheduled-actions/index.ts
|
|
29300
|
-
import { defineCommand as
|
|
29751
|
+
import { defineCommand as defineCommand156 } from "citty";
|
|
29301
29752
|
|
|
29302
29753
|
// src/commands/scheduled-actions/create.ts
|
|
29303
|
-
import { defineCommand as
|
|
29754
|
+
import { defineCommand as defineCommand150 } from "citty";
|
|
29304
29755
|
|
|
29305
29756
|
// src/commands/scheduled-actions/shared.ts
|
|
29306
29757
|
var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
|
|
@@ -29415,7 +29866,7 @@ registerSchema({
|
|
|
29415
29866
|
prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
|
|
29416
29867
|
}
|
|
29417
29868
|
});
|
|
29418
|
-
var createCommand2 =
|
|
29869
|
+
var createCommand2 = defineCommand150({
|
|
29419
29870
|
meta: {
|
|
29420
29871
|
name: "create",
|
|
29421
29872
|
description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
|
|
@@ -29464,7 +29915,7 @@ var createCommand2 = defineCommand149({
|
|
|
29464
29915
|
});
|
|
29465
29916
|
|
|
29466
29917
|
// src/commands/scheduled-actions/delete.ts
|
|
29467
|
-
import { defineCommand as
|
|
29918
|
+
import { defineCommand as defineCommand151 } from "citty";
|
|
29468
29919
|
registerSchema({
|
|
29469
29920
|
command: "scheduled-actions.delete",
|
|
29470
29921
|
description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
|
|
@@ -29472,7 +29923,7 @@ registerSchema({
|
|
|
29472
29923
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
29473
29924
|
}
|
|
29474
29925
|
});
|
|
29475
|
-
var deleteCommand2 =
|
|
29926
|
+
var deleteCommand2 = defineCommand151({
|
|
29476
29927
|
meta: {
|
|
29477
29928
|
name: "delete",
|
|
29478
29929
|
description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
|
|
@@ -29501,7 +29952,7 @@ var deleteCommand2 = defineCommand150({
|
|
|
29501
29952
|
});
|
|
29502
29953
|
|
|
29503
29954
|
// src/commands/scheduled-actions/get.ts
|
|
29504
|
-
import { defineCommand as
|
|
29955
|
+
import { defineCommand as defineCommand152 } from "citty";
|
|
29505
29956
|
registerSchema({
|
|
29506
29957
|
command: "scheduled-actions.get",
|
|
29507
29958
|
description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
|
|
@@ -29509,7 +29960,7 @@ registerSchema({
|
|
|
29509
29960
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
29510
29961
|
}
|
|
29511
29962
|
});
|
|
29512
|
-
var getCommand3 =
|
|
29963
|
+
var getCommand3 = defineCommand152({
|
|
29513
29964
|
meta: {
|
|
29514
29965
|
name: "get",
|
|
29515
29966
|
description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
|
|
@@ -29546,13 +29997,13 @@ var getCommand3 = defineCommand151({
|
|
|
29546
29997
|
});
|
|
29547
29998
|
|
|
29548
29999
|
// src/commands/scheduled-actions/list.ts
|
|
29549
|
-
import { defineCommand as
|
|
30000
|
+
import { defineCommand as defineCommand153 } from "citty";
|
|
29550
30001
|
registerSchema({
|
|
29551
30002
|
command: "scheduled-actions.list",
|
|
29552
30003
|
description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set.",
|
|
29553
30004
|
args: {}
|
|
29554
30005
|
});
|
|
29555
|
-
var listCommand9 =
|
|
30006
|
+
var listCommand9 = defineCommand153({
|
|
29556
30007
|
meta: {
|
|
29557
30008
|
name: "list",
|
|
29558
30009
|
description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set."
|
|
@@ -29573,7 +30024,7 @@ var listCommand9 = defineCommand152({
|
|
|
29573
30024
|
});
|
|
29574
30025
|
|
|
29575
30026
|
// src/commands/scheduled-actions/trigger.ts
|
|
29576
|
-
import { defineCommand as
|
|
30027
|
+
import { defineCommand as defineCommand154 } from "citty";
|
|
29577
30028
|
registerSchema({
|
|
29578
30029
|
command: "scheduled-actions.trigger",
|
|
29579
30030
|
description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
|
|
@@ -29581,7 +30032,7 @@ registerSchema({
|
|
|
29581
30032
|
id: { type: "string", description: "Published scheduled action ID", required: true }
|
|
29582
30033
|
}
|
|
29583
30034
|
});
|
|
29584
|
-
var triggerCommand =
|
|
30035
|
+
var triggerCommand = defineCommand154({
|
|
29585
30036
|
meta: {
|
|
29586
30037
|
name: "trigger",
|
|
29587
30038
|
description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
|
|
@@ -29618,7 +30069,7 @@ var triggerCommand = defineCommand153({
|
|
|
29618
30069
|
});
|
|
29619
30070
|
|
|
29620
30071
|
// src/commands/scheduled-actions/update.ts
|
|
29621
|
-
import { defineCommand as
|
|
30072
|
+
import { defineCommand as defineCommand155 } from "citty";
|
|
29622
30073
|
registerSchema({
|
|
29623
30074
|
command: "scheduled-actions.update",
|
|
29624
30075
|
description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
|
|
@@ -29643,7 +30094,7 @@ registerSchema({
|
|
|
29643
30094
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
29644
30095
|
}
|
|
29645
30096
|
});
|
|
29646
|
-
var updateCommand2 =
|
|
30097
|
+
var updateCommand2 = defineCommand155({
|
|
29647
30098
|
meta: {
|
|
29648
30099
|
name: "update",
|
|
29649
30100
|
description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
|
|
@@ -29714,7 +30165,7 @@ var updateCommand2 = defineCommand154({
|
|
|
29714
30165
|
});
|
|
29715
30166
|
|
|
29716
30167
|
// src/commands/scheduled-actions/index.ts
|
|
29717
|
-
var scheduledActionsCommand =
|
|
30168
|
+
var scheduledActionsCommand = defineCommand156({
|
|
29718
30169
|
meta: {
|
|
29719
30170
|
name: "scheduled-actions",
|
|
29720
30171
|
description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
|
|
@@ -29741,8 +30192,8 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
29741
30192
|
});
|
|
29742
30193
|
|
|
29743
30194
|
// src/commands/schema.ts
|
|
29744
|
-
import { defineCommand as
|
|
29745
|
-
var schemaCommand =
|
|
30195
|
+
import { defineCommand as defineCommand157 } from "citty";
|
|
30196
|
+
var schemaCommand = defineCommand157({
|
|
29746
30197
|
meta: {
|
|
29747
30198
|
name: "schema",
|
|
29748
30199
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
|
|
@@ -29784,7 +30235,7 @@ var schemaCommand = defineCommand156({
|
|
|
29784
30235
|
});
|
|
29785
30236
|
|
|
29786
30237
|
// src/commands/tags/index.ts
|
|
29787
|
-
import { defineCommand as
|
|
30238
|
+
import { defineCommand as defineCommand158 } from "citty";
|
|
29788
30239
|
|
|
29789
30240
|
// src/commands/tags/shared.ts
|
|
29790
30241
|
function failApi3(err) {
|
|
@@ -29850,7 +30301,7 @@ async function listTags(json) {
|
|
|
29850
30301
|
failApi3(err);
|
|
29851
30302
|
}
|
|
29852
30303
|
}
|
|
29853
|
-
var listCommand10 =
|
|
30304
|
+
var listCommand10 = defineCommand158({
|
|
29854
30305
|
meta: {
|
|
29855
30306
|
name: "list",
|
|
29856
30307
|
description: "Effective tags for this chat (production + staged), with each tag's full readable config (secrets excluded) \u2014 reuse a stored value to pre-fill a change rather than asking the user. Refs printed here are what flow side-effect tagIds should use. Example: baker tags list"
|
|
@@ -29869,7 +30320,7 @@ async function listDraft3() {
|
|
|
29869
30320
|
failApi3(err);
|
|
29870
30321
|
}
|
|
29871
30322
|
}
|
|
29872
|
-
var draftCommand3 =
|
|
30323
|
+
var draftCommand3 = defineCommand158({
|
|
29873
30324
|
meta: {
|
|
29874
30325
|
name: "draft",
|
|
29875
30326
|
description: "Review the tag changes staged in this chat (read-only). Staged changes were approved via request_tag_input and apply when the chat is published; to amend or drop one, propose a follow-up change through the same tool (a delete on a tag_temp_* ref drops the staged create)."
|
|
@@ -29878,7 +30329,7 @@ var draftCommand3 = defineCommand157({
|
|
|
29878
30329
|
await listDraft3();
|
|
29879
30330
|
}
|
|
29880
30331
|
});
|
|
29881
|
-
var tagsCommand3 =
|
|
30332
|
+
var tagsCommand3 = defineCommand158({
|
|
29882
30333
|
meta: {
|
|
29883
30334
|
name: "tags",
|
|
29884
30335
|
description: `Read the client's marketing/analytics tags (Meta pixel, GA4, Google Ads, GTM, Clarity, Hotjar, \u2026) \u2014 production tags plus the changes staged in this chat.
|
|
@@ -29904,10 +30355,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
|
29904
30355
|
});
|
|
29905
30356
|
|
|
29906
30357
|
// src/commands/testimonials/index.ts
|
|
29907
|
-
import { defineCommand as
|
|
30358
|
+
import { defineCommand as defineCommand162 } from "citty";
|
|
29908
30359
|
|
|
29909
30360
|
// src/commands/testimonials/get.ts
|
|
29910
|
-
import { defineCommand as
|
|
30361
|
+
import { defineCommand as defineCommand159 } from "citty";
|
|
29911
30362
|
registerSchema({
|
|
29912
30363
|
command: "testimonials.get",
|
|
29913
30364
|
description: "Get a single testimonial by ID",
|
|
@@ -29915,7 +30366,7 @@ registerSchema({
|
|
|
29915
30366
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
29916
30367
|
}
|
|
29917
30368
|
});
|
|
29918
|
-
var getCommand4 =
|
|
30369
|
+
var getCommand4 = defineCommand159({
|
|
29919
30370
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
29920
30371
|
args: {
|
|
29921
30372
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -29952,7 +30403,7 @@ var getCommand4 = defineCommand158({
|
|
|
29952
30403
|
});
|
|
29953
30404
|
|
|
29954
30405
|
// src/commands/testimonials/list.ts
|
|
29955
|
-
import { defineCommand as
|
|
30406
|
+
import { defineCommand as defineCommand160 } from "citty";
|
|
29956
30407
|
registerSchema({
|
|
29957
30408
|
command: "testimonials.list",
|
|
29958
30409
|
description: "List testimonials with optional filters.",
|
|
@@ -29982,7 +30433,7 @@ registerSchema({
|
|
|
29982
30433
|
limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
|
|
29983
30434
|
}
|
|
29984
30435
|
});
|
|
29985
|
-
var listCommand11 =
|
|
30436
|
+
var listCommand11 = defineCommand160({
|
|
29986
30437
|
meta: {
|
|
29987
30438
|
name: "list",
|
|
29988
30439
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -30031,7 +30482,7 @@ var listCommand11 = defineCommand159({
|
|
|
30031
30482
|
});
|
|
30032
30483
|
|
|
30033
30484
|
// src/commands/testimonials/search.ts
|
|
30034
|
-
import { defineCommand as
|
|
30485
|
+
import { defineCommand as defineCommand161 } from "citty";
|
|
30035
30486
|
function languageBiasHint(results, requestedLanguage) {
|
|
30036
30487
|
if (requestedLanguage) {
|
|
30037
30488
|
return null;
|
|
@@ -30109,7 +30560,7 @@ function buildSearchRequest(query, args) {
|
|
|
30109
30560
|
}
|
|
30110
30561
|
return body;
|
|
30111
30562
|
}
|
|
30112
|
-
var searchCommand2 =
|
|
30563
|
+
var searchCommand2 = defineCommand161({
|
|
30113
30564
|
meta: {
|
|
30114
30565
|
name: "search",
|
|
30115
30566
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -30165,7 +30616,7 @@ var searchCommand2 = defineCommand160({
|
|
|
30165
30616
|
var tagsCommand4 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
|
|
30166
30617
|
|
|
30167
30618
|
// src/commands/testimonials/index.ts
|
|
30168
|
-
var testimonialsCommand =
|
|
30619
|
+
var testimonialsCommand = defineCommand162({
|
|
30169
30620
|
meta: {
|
|
30170
30621
|
name: "testimonials",
|
|
30171
30622
|
description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
|
|
@@ -30187,10 +30638,10 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
|
|
|
30187
30638
|
});
|
|
30188
30639
|
|
|
30189
30640
|
// src/commands/videos/index.ts
|
|
30190
|
-
import { defineCommand as
|
|
30641
|
+
import { defineCommand as defineCommand167 } from "citty";
|
|
30191
30642
|
|
|
30192
30643
|
// src/commands/videos/delete.ts
|
|
30193
|
-
import { defineCommand as
|
|
30644
|
+
import { defineCommand as defineCommand163 } from "citty";
|
|
30194
30645
|
registerSchema({
|
|
30195
30646
|
command: "videos.delete",
|
|
30196
30647
|
description: "Delete a video by ID",
|
|
@@ -30204,7 +30655,7 @@ registerSchema({
|
|
|
30204
30655
|
}
|
|
30205
30656
|
}
|
|
30206
30657
|
});
|
|
30207
|
-
var deleteCommand3 =
|
|
30658
|
+
var deleteCommand3 = defineCommand163({
|
|
30208
30659
|
meta: {
|
|
30209
30660
|
name: "delete",
|
|
30210
30661
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -30245,7 +30696,7 @@ var deleteCommand3 = defineCommand162({
|
|
|
30245
30696
|
});
|
|
30246
30697
|
|
|
30247
30698
|
// src/commands/videos/get.ts
|
|
30248
|
-
import { defineCommand as
|
|
30699
|
+
import { defineCommand as defineCommand164 } from "citty";
|
|
30249
30700
|
registerSchema({
|
|
30250
30701
|
command: "videos.get",
|
|
30251
30702
|
description: "Get a single video by ID",
|
|
@@ -30253,7 +30704,7 @@ registerSchema({
|
|
|
30253
30704
|
id: { type: "string", description: "Video ID", required: true }
|
|
30254
30705
|
}
|
|
30255
30706
|
});
|
|
30256
|
-
var getCommand5 =
|
|
30707
|
+
var getCommand5 = defineCommand164({
|
|
30257
30708
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
30258
30709
|
args: {
|
|
30259
30710
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -30290,7 +30741,7 @@ var getCommand5 = defineCommand163({
|
|
|
30290
30741
|
});
|
|
30291
30742
|
|
|
30292
30743
|
// src/commands/videos/search.ts
|
|
30293
|
-
import { defineCommand as
|
|
30744
|
+
import { defineCommand as defineCommand165 } from "citty";
|
|
30294
30745
|
registerSchema({
|
|
30295
30746
|
command: "videos.search",
|
|
30296
30747
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -30300,7 +30751,7 @@ registerSchema({
|
|
|
30300
30751
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
30301
30752
|
}
|
|
30302
30753
|
});
|
|
30303
|
-
var searchCommand3 =
|
|
30754
|
+
var searchCommand3 = defineCommand165({
|
|
30304
30755
|
meta: {
|
|
30305
30756
|
name: "search",
|
|
30306
30757
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -30352,7 +30803,7 @@ var tagsCommand5 = makeTagsCommand("videos", "video", "/api/videos/tags");
|
|
|
30352
30803
|
// src/commands/videos/upload.ts
|
|
30353
30804
|
import { readFile as readFile23, stat as stat7 } from "fs/promises";
|
|
30354
30805
|
import { extname as extname3 } from "path";
|
|
30355
|
-
import { defineCommand as
|
|
30806
|
+
import { defineCommand as defineCommand166 } from "citty";
|
|
30356
30807
|
var MIME_MAP = {
|
|
30357
30808
|
".mp4": "video/mp4",
|
|
30358
30809
|
".mov": "video/quicktime",
|
|
@@ -30386,7 +30837,7 @@ function detectContentType(filePath) {
|
|
|
30386
30837
|
}
|
|
30387
30838
|
return mime;
|
|
30388
30839
|
}
|
|
30389
|
-
var uploadCommand2 =
|
|
30840
|
+
var uploadCommand2 = defineCommand166({
|
|
30390
30841
|
meta: {
|
|
30391
30842
|
name: "upload",
|
|
30392
30843
|
description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
|
|
@@ -30440,7 +30891,7 @@ var uploadCommand2 = defineCommand165({
|
|
|
30440
30891
|
});
|
|
30441
30892
|
|
|
30442
30893
|
// src/commands/videos/index.ts
|
|
30443
|
-
var videosCommand =
|
|
30894
|
+
var videosCommand = defineCommand167({
|
|
30444
30895
|
meta: {
|
|
30445
30896
|
name: "videos",
|
|
30446
30897
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete, tags.
|
|
@@ -30464,10 +30915,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
|
|
|
30464
30915
|
});
|
|
30465
30916
|
|
|
30466
30917
|
// src/commands/winning-ads/index.ts
|
|
30467
|
-
import { defineCommand as
|
|
30918
|
+
import { defineCommand as defineCommand180 } from "citty";
|
|
30468
30919
|
|
|
30469
30920
|
// src/commands/winning-ads/advertisers.ts
|
|
30470
|
-
import { defineCommand as
|
|
30921
|
+
import { defineCommand as defineCommand168 } from "citty";
|
|
30471
30922
|
|
|
30472
30923
|
// src/commands/winning-ads/shared.ts
|
|
30473
30924
|
function splitList(value) {
|
|
@@ -30520,7 +30971,7 @@ function advertiserNormalizer(record, full) {
|
|
|
30520
30971
|
last_synced_at: record.last_synced_at ?? null
|
|
30521
30972
|
};
|
|
30522
30973
|
}
|
|
30523
|
-
var advertisersCommand2 =
|
|
30974
|
+
var advertisersCommand2 = defineCommand168({
|
|
30524
30975
|
meta: {
|
|
30525
30976
|
name: "advertisers",
|
|
30526
30977
|
description: 'List corpus advertisers by name or domain. Find your own advertiser for --exclude-advertiser, or a competitor for --advertiser-id / winners. Example: baker winning-ads advertisers "Deel" --output md'
|
|
@@ -30578,7 +31029,7 @@ var advertisersCommand2 = defineCommand167({
|
|
|
30578
31029
|
});
|
|
30579
31030
|
|
|
30580
31031
|
// src/commands/winning-ads/brief.ts
|
|
30581
|
-
import { defineCommand as
|
|
31032
|
+
import { defineCommand as defineCommand169 } from "citty";
|
|
30582
31033
|
registerSchema({
|
|
30583
31034
|
command: "winning-ads.brief",
|
|
30584
31035
|
description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
|
|
@@ -30624,7 +31075,7 @@ function parseDna(raw) {
|
|
|
30624
31075
|
}
|
|
30625
31076
|
return parsed;
|
|
30626
31077
|
}
|
|
30627
|
-
var briefCommand =
|
|
31078
|
+
var briefCommand = defineCommand169({
|
|
30628
31079
|
meta: {
|
|
30629
31080
|
name: "brief",
|
|
30630
31081
|
description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
|
|
@@ -30660,7 +31111,7 @@ var briefCommand = defineCommand168({
|
|
|
30660
31111
|
});
|
|
30661
31112
|
|
|
30662
31113
|
// src/commands/winning-ads/content.ts
|
|
30663
|
-
import { defineCommand as
|
|
31114
|
+
import { defineCommand as defineCommand170 } from "citty";
|
|
30664
31115
|
registerSchema({
|
|
30665
31116
|
command: "winning-ads.content",
|
|
30666
31117
|
description: "Read what's INSIDE one winning ad: the spoken transcript, the on-screen text, and the ad copy. Use this after `search`/`winners`/`feed` return a shortlist \u2014 pass an ad_id to understand a reference before reproducing it. Add --full for speech, pacing, and soundtrack detail. Video ads carry the transcript/on-screen text; static ads carry only the copy.",
|
|
@@ -30673,7 +31124,7 @@ registerSchema({
|
|
|
30673
31124
|
}
|
|
30674
31125
|
}
|
|
30675
31126
|
});
|
|
30676
|
-
var contentCommand =
|
|
31127
|
+
var contentCommand = defineCommand170({
|
|
30677
31128
|
meta: {
|
|
30678
31129
|
name: "content",
|
|
30679
31130
|
description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
|
|
@@ -30722,7 +31173,7 @@ var contentCommand = defineCommand169({
|
|
|
30722
31173
|
});
|
|
30723
31174
|
|
|
30724
31175
|
// src/commands/winning-ads/feed.ts
|
|
30725
|
-
import { defineCommand as
|
|
31176
|
+
import { defineCommand as defineCommand171 } from "citty";
|
|
30726
31177
|
function buildFeedParams(input) {
|
|
30727
31178
|
const params = {};
|
|
30728
31179
|
const advertiser = splitList(input.advertiser);
|
|
@@ -30774,7 +31225,7 @@ registerSchema({
|
|
|
30774
31225
|
format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
|
|
30775
31226
|
}
|
|
30776
31227
|
});
|
|
30777
|
-
var feedCommand =
|
|
31228
|
+
var feedCommand = defineCommand171({
|
|
30778
31229
|
meta: {
|
|
30779
31230
|
name: "feed",
|
|
30780
31231
|
description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
|
|
@@ -30859,7 +31310,7 @@ var feedCommand = defineCommand170({
|
|
|
30859
31310
|
});
|
|
30860
31311
|
|
|
30861
31312
|
// src/commands/winning-ads/follow.ts
|
|
30862
|
-
import { defineCommand as
|
|
31313
|
+
import { defineCommand as defineCommand172 } from "citty";
|
|
30863
31314
|
var PLATFORMS = ["meta", "linkedin"];
|
|
30864
31315
|
registerSchema({
|
|
30865
31316
|
command: "winning-ads.follow",
|
|
@@ -30874,7 +31325,7 @@ registerSchema({
|
|
|
30874
31325
|
label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
|
|
30875
31326
|
}
|
|
30876
31327
|
});
|
|
30877
|
-
var followCommand =
|
|
31328
|
+
var followCommand = defineCommand172({
|
|
30878
31329
|
meta: {
|
|
30879
31330
|
name: "follow",
|
|
30880
31331
|
description: 'Follow a brand to track ALL its ads \u2014 every platform and country. --platform is how we read your input, not a limit. A domain tracks both Meta + LinkedIn. Example: baker winning-ads follow "deel.com" --platform meta'
|
|
@@ -30921,7 +31372,7 @@ var followCommand = defineCommand171({
|
|
|
30921
31372
|
});
|
|
30922
31373
|
|
|
30923
31374
|
// src/commands/winning-ads/follow-competitors.ts
|
|
30924
|
-
import { defineCommand as
|
|
31375
|
+
import { defineCommand as defineCommand173 } from "citty";
|
|
30925
31376
|
var PLATFORMS2 = ["meta", "linkedin"];
|
|
30926
31377
|
var BATCH_TIMEOUT_MS = 3e5;
|
|
30927
31378
|
function buildFollowBatchBody(input) {
|
|
@@ -30954,7 +31405,7 @@ registerSchema({
|
|
|
30954
31405
|
}
|
|
30955
31406
|
}
|
|
30956
31407
|
});
|
|
30957
|
-
var followCompetitorsCommand =
|
|
31408
|
+
var followCompetitorsCommand = defineCommand173({
|
|
30958
31409
|
meta: {
|
|
30959
31410
|
name: "follow-competitors",
|
|
30960
31411
|
description: 'Follow many brands at once by domain \u2014 add every competitor in one call. Example: baker winning-ads follow-competitors "deel.com,notion.so,hubspot.com"'
|
|
@@ -31029,7 +31480,7 @@ var followCompetitorsCommand = defineCommand172({
|
|
|
31029
31480
|
});
|
|
31030
31481
|
|
|
31031
31482
|
// src/commands/winning-ads/following.ts
|
|
31032
|
-
import { defineCommand as
|
|
31483
|
+
import { defineCommand as defineCommand174 } from "citty";
|
|
31033
31484
|
registerSchema({
|
|
31034
31485
|
command: "winning-ads.following",
|
|
31035
31486
|
description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts.",
|
|
@@ -31062,7 +31513,7 @@ function followingNormalizer(record, full) {
|
|
|
31062
31513
|
platforms: Array.isArray(record.platforms) ? record.platforms : []
|
|
31063
31514
|
};
|
|
31064
31515
|
}
|
|
31065
|
-
var followingCommand =
|
|
31516
|
+
var followingCommand = defineCommand174({
|
|
31066
31517
|
meta: {
|
|
31067
31518
|
name: "following",
|
|
31068
31519
|
description: "List brands you follow, with status (ready / adding\u2026) and cached counts. Example: baker winning-ads following --output md"
|
|
@@ -31097,7 +31548,7 @@ var followingCommand = defineCommand173({
|
|
|
31097
31548
|
});
|
|
31098
31549
|
|
|
31099
31550
|
// src/commands/winning-ads/patterns.ts
|
|
31100
|
-
import { defineCommand as
|
|
31551
|
+
import { defineCommand as defineCommand175 } from "citty";
|
|
31101
31552
|
registerSchema({
|
|
31102
31553
|
command: "winning-ads.patterns",
|
|
31103
31554
|
description: "Mine what separates two cohorts of ads: pass a comma-list of winning ad ids (--winners) and a comma-list of weaker ad ids (--duds). Returns the discriminating DNA fields.",
|
|
@@ -31136,7 +31587,7 @@ function discriminatorRow(record) {
|
|
|
31136
31587
|
top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
|
|
31137
31588
|
};
|
|
31138
31589
|
}
|
|
31139
|
-
var patternsCommand =
|
|
31590
|
+
var patternsCommand = defineCommand175({
|
|
31140
31591
|
meta: {
|
|
31141
31592
|
name: "patterns",
|
|
31142
31593
|
description: "Discover what separates winning ads from weak ones. Example: baker winning-ads patterns --winners a_1,a_2,a_3 --duds a_9,a_8 --output md"
|
|
@@ -31192,7 +31643,7 @@ var patternsCommand = defineCommand174({
|
|
|
31192
31643
|
});
|
|
31193
31644
|
|
|
31194
31645
|
// src/commands/winning-ads/search.ts
|
|
31195
|
-
import { defineCommand as
|
|
31646
|
+
import { defineCommand as defineCommand176 } from "citty";
|
|
31196
31647
|
registerSchema({
|
|
31197
31648
|
command: "winning-ads.search",
|
|
31198
31649
|
description: "Search the ad-dna corpus of scored winning ads. Returns a lean shortlist (advertiser, summary, scores, media_url) to pick a reference to reproduce.",
|
|
@@ -31300,7 +31751,7 @@ function buildSearchBody(args) {
|
|
|
31300
31751
|
}
|
|
31301
31752
|
return body;
|
|
31302
31753
|
}
|
|
31303
|
-
var searchCommand4 =
|
|
31754
|
+
var searchCommand4 = defineCommand176({
|
|
31304
31755
|
meta: {
|
|
31305
31756
|
name: "search",
|
|
31306
31757
|
description: "Search winning reference ads. Example: baker winning-ads search 'B2B SaaS before/after AI automation' --platform meta --format static --winner-category winner --exclude-advertiser adv_123 --output md"
|
|
@@ -31415,7 +31866,7 @@ var searchCommand4 = defineCommand175({
|
|
|
31415
31866
|
});
|
|
31416
31867
|
|
|
31417
31868
|
// src/commands/winning-ads/seeds.ts
|
|
31418
|
-
import { defineCommand as
|
|
31869
|
+
import { defineCommand as defineCommand177 } from "citty";
|
|
31419
31870
|
function leanRow(r) {
|
|
31420
31871
|
return {
|
|
31421
31872
|
key: r.key,
|
|
@@ -31443,7 +31894,7 @@ function makeSeedCommand(opts) {
|
|
|
31443
31894
|
limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
|
|
31444
31895
|
}
|
|
31445
31896
|
});
|
|
31446
|
-
return
|
|
31897
|
+
return defineCommand177({
|
|
31447
31898
|
meta: { name: opts.name, description: opts.description },
|
|
31448
31899
|
args: {
|
|
31449
31900
|
platform: { type: "string", description: "Single platform to segment on", required: false },
|
|
@@ -31492,7 +31943,7 @@ var formatsCommand = makeSeedCommand({
|
|
|
31492
31943
|
});
|
|
31493
31944
|
|
|
31494
31945
|
// src/commands/winning-ads/unfollow.ts
|
|
31495
|
-
import { defineCommand as
|
|
31946
|
+
import { defineCommand as defineCommand178 } from "citty";
|
|
31496
31947
|
registerSchema({
|
|
31497
31948
|
command: "winning-ads.unfollow",
|
|
31498
31949
|
description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
|
|
@@ -31500,7 +31951,7 @@ registerSchema({
|
|
|
31500
31951
|
advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
|
|
31501
31952
|
}
|
|
31502
31953
|
});
|
|
31503
|
-
var unfollowCommand =
|
|
31954
|
+
var unfollowCommand = defineCommand178({
|
|
31504
31955
|
meta: {
|
|
31505
31956
|
name: "unfollow",
|
|
31506
31957
|
description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
|
|
@@ -31521,7 +31972,7 @@ var unfollowCommand = defineCommand177({
|
|
|
31521
31972
|
});
|
|
31522
31973
|
|
|
31523
31974
|
// src/commands/winning-ads/winners.ts
|
|
31524
|
-
import { defineCommand as
|
|
31975
|
+
import { defineCommand as defineCommand179 } from "citty";
|
|
31525
31976
|
registerSchema({
|
|
31526
31977
|
command: "winning-ads.winners",
|
|
31527
31978
|
description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
|
|
@@ -31531,7 +31982,7 @@ registerSchema({
|
|
|
31531
31982
|
platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
|
|
31532
31983
|
}
|
|
31533
31984
|
});
|
|
31534
|
-
var winnersCommand =
|
|
31985
|
+
var winnersCommand = defineCommand179({
|
|
31535
31986
|
meta: {
|
|
31536
31987
|
name: "winners",
|
|
31537
31988
|
description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
|
|
@@ -31581,7 +32032,7 @@ var winnersCommand = defineCommand178({
|
|
|
31581
32032
|
});
|
|
31582
32033
|
|
|
31583
32034
|
// src/commands/winning-ads/index.ts
|
|
31584
|
-
var winningAdsCommand =
|
|
32035
|
+
var winningAdsCommand = defineCommand180({
|
|
31585
32036
|
meta: {
|
|
31586
32037
|
name: "winning-ads",
|
|
31587
32038
|
description: `Search the ad-dna corpus of scored "winning" ads for reference creatives to reproduce, and manage the brands your library tracks. Proxied through the Baker backend (BAKER_API_KEY) \u2014 no separate token needed.
|
|
@@ -31653,7 +32104,7 @@ function getCliVersion() {
|
|
|
31653
32104
|
}
|
|
31654
32105
|
|
|
31655
32106
|
// src/cli.ts
|
|
31656
|
-
var main =
|
|
32107
|
+
var main = defineCommand181({
|
|
31657
32108
|
meta: {
|
|
31658
32109
|
name: "baker",
|
|
31659
32110
|
version: getCliVersion(),
|
|
@@ -31683,6 +32134,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
31683
32134
|
tags: tagsCommand3,
|
|
31684
32135
|
chats: chatsCommand,
|
|
31685
32136
|
history: historyCommand,
|
|
32137
|
+
hubspot: hubspotCommand,
|
|
31686
32138
|
"winning-ads": winningAdsCommand,
|
|
31687
32139
|
mcp: mcpCommand,
|
|
31688
32140
|
schema: schemaCommand
|