@koda-sl/baker-cli 0.364.0-dev.addc883a2 → 0.364.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/dist/{chunk-K2IKLMCM.js → chunk-AI4HWQVN.js} +4 -4
- package/dist/chunk-AI4HWQVN.js.map +1 -0
- package/dist/{chunk-UWCUB3DJ.js → chunk-BLMXG42J.js} +1 -6
- package/dist/{chunk-UWCUB3DJ.js.map → chunk-BLMXG42J.js.map} +1 -1
- package/dist/cli.js +4 -14
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/dist/{shared-HOMSTQMP.js → shared-BROA3UXS.js} +2 -4
- package/package.json +1 -1
- package/dist/chunk-K2IKLMCM.js.map +0 -1
- /package/dist/{shared-HOMSTQMP.js.map → shared-BROA3UXS.js.map} +0 -0
|
@@ -87,10 +87,6 @@ function daysAgoIso(days) {
|
|
|
87
87
|
function csvOrJson(args) {
|
|
88
88
|
return args.output ?? "json";
|
|
89
89
|
}
|
|
90
|
-
var NAME_CONTAINS_ARG = {
|
|
91
|
-
type: "string",
|
|
92
|
-
description: "Only rows whose name contains this text, matched by Meta before anything is returned. Start here to find one entity by name: --name-contains octubre --all-statuses"
|
|
93
|
-
};
|
|
94
90
|
function resolveEffectiveStatus(args) {
|
|
95
91
|
if (args["all-statuses"]) {
|
|
96
92
|
return void 0;
|
|
@@ -110,7 +106,6 @@ export {
|
|
|
110
106
|
todayIso,
|
|
111
107
|
daysAgoIso,
|
|
112
108
|
csvOrJson,
|
|
113
|
-
NAME_CONTAINS_ARG,
|
|
114
109
|
resolveEffectiveStatus
|
|
115
110
|
};
|
|
116
|
-
//# sourceMappingURL=chunk-
|
|
111
|
+
//# sourceMappingURL=chunk-BLMXG42J.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/ads/meta/shared.ts"],"sourcesContent":["import { ApiError } from \"../../../client.ts\";\nimport { getEnv } from \"../../../env.ts\";\nimport { handleConnectionError, needsConnectionFix } from \"../../../error-handler.ts\";\nimport { writeAdsJson } from \"../output.ts\";\nimport type { AdsErrorEnvelope, QueryFix } from \"../types.ts\";\n\nconst DAY_MS = 86_400_000;\n\n/**\n * Meta answers a permission refusal (Graph codes 200/10/294) with a bare\n * \"Permissions error\" that covers two causes needing opposite remedies: a\n * consent grant the connection never got — nothing validates Meta's granted\n * scopes after connect, unlike HubSpot's `requireCapability` — or a role the\n * user lacks on one asset, since a Pixel/Dataset, Page or catalog lives in a\n * Business and is assigned separately from the ad account. Only the blast radius\n * separates them, so hand the agent that test rather than a verdict: guessing\n * \"reconnect\" wastes the user's time on an unassigned asset, and ruling it out\n * strands a connection that really is short a scope.\n */\nexport function metaForbiddenFix(message: string): QueryFix {\n return {\n action: \"reject\",\n explanation: [\n message,\n \"This is a permission refusal, not a dead connection, and Meta returns the same code for two causes with opposite remedies. Tell them apart by how much else works before you answer.\",\n \"If other reads on this account are ALSO refused (campaigns, ad sets, insights), the connection is short a permission it was never granted. Only the user can widen it, by reconnecting Meta from the dashboard.\",\n \"If those reads work and only this object is refused, the asset (pixel/dataset, Page, or catalog) belongs to a Business the connected user holds no role in. Ad-account access does not carry asset access and reconnecting cannot grant it — the client assigns that asset to the connected user or partner in Meta Business settings, under the asset's own section (Data sources → Datasets for a pixel).\",\n \"Either way do not retry the same call, and do not abort the wider job. Continue with what you can read, and state in your answer that this specific check could not run and why — never present the task as verified when this step was skipped.\",\n ].join(\"\\n\\n\"),\n };\n}\n\nexport function handleMetaError(err: unknown): never {\n if (err instanceof ApiError) {\n if (needsConnectionFix(err.code, err.message)) {\n handleConnectionError(\"meta_ads\", err.message);\n }\n const envelope: AdsErrorEnvelope = {\n ok: false,\n error: {\n code: err.code,\n message: err.message,\n fix: err.code === \"FORBIDDEN\" ? metaForbiddenFix(err.message) : { action: \"reject\", explanation: err.message },\n retryable: err.code === \"RATE_LIMITED\" || err.code === \"UNAVAILABLE\" || err.code === \"INTERNAL_ERROR\",\n },\n };\n writeAdsJson(envelope);\n process.exit(1);\n }\n const message = err instanceof Error ? err.message : \"Unexpected error\";\n writeAdsJson({ ok: false, error: { code: \"NETWORK_ERROR\", message } });\n process.exit(1);\n}\n\nconst ACCOUNT_ID_RE = /^(act_)?[0-9]+$/;\n\n/** Pull the default Meta ad account ID from `--account-id` arg or `BAKER_META_AD_ACCOUNT_ID` env. */\nexport function resolveAccountIdArg(args: Record<string, unknown>): string {\n const fromArgs = args[\"account-id\"] as string | undefined;\n const id = fromArgs || getEnv().BAKER_META_AD_ACCOUNT_ID;\n if (!id) {\n writeAdsJson({\n ok: false,\n error: {\n code: \"MISSING_ACCOUNT_ID\",\n message: \"Pass --account-id or set BAKER_META_AD_ACCOUNT_ID. Run `baker ads meta accounts` to find IDs.\",\n },\n });\n process.exit(1);\n }\n if (!ACCOUNT_ID_RE.test(id)) {\n writeAdsJson({\n ok: false,\n error: {\n code: \"INVALID_ACCOUNT_ID\",\n message: `Invalid account ID \"${id}\". Expected numeric ID, optionally prefixed with \"act_\".`,\n },\n });\n process.exit(1);\n }\n return id.startsWith(\"act_\") ? id : `act_${id}`;\n}\n\nexport function getDateRange(args: Record<string, unknown>): { datePreset?: string; since?: string; until?: string } {\n const datePreset = args[\"date-preset\"] as string | undefined;\n const since = args.since as string | undefined;\n const until = args.until as string | undefined;\n if (since && until) return { since, until };\n return { datePreset: datePreset ?? \"last_7d\" };\n}\n\nexport function todayIso(): string {\n return new Date().toISOString().slice(0, 10);\n}\n\nexport function daysAgoIso(days: number): string {\n return new Date(Date.now() - days * DAY_MS).toISOString().slice(0, 10);\n}\n\nexport function csvOrJson(args: Record<string, unknown>): string {\n return (args.output as string | undefined) ?? \"json\";\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"sources":["../src/commands/ads/meta/shared.ts"],"sourcesContent":["import { ApiError } from \"../../../client.ts\";\nimport { getEnv } from \"../../../env.ts\";\nimport { handleConnectionError, needsConnectionFix } from \"../../../error-handler.ts\";\nimport { writeAdsJson } from \"../output.ts\";\nimport type { AdsErrorEnvelope, QueryFix } from \"../types.ts\";\n\nconst DAY_MS = 86_400_000;\n\n/**\n * Meta answers a permission refusal (Graph codes 200/10/294) with a bare\n * \"Permissions error\" that covers two causes needing opposite remedies: a\n * consent grant the connection never got — nothing validates Meta's granted\n * scopes after connect, unlike HubSpot's `requireCapability` — or a role the\n * user lacks on one asset, since a Pixel/Dataset, Page or catalog lives in a\n * Business and is assigned separately from the ad account. Only the blast radius\n * separates them, so hand the agent that test rather than a verdict: guessing\n * \"reconnect\" wastes the user's time on an unassigned asset, and ruling it out\n * strands a connection that really is short a scope.\n */\nexport function metaForbiddenFix(message: string): QueryFix {\n return {\n action: \"reject\",\n explanation: [\n message,\n \"This is a permission refusal, not a dead connection, and Meta returns the same code for two causes with opposite remedies. Tell them apart by how much else works before you answer.\",\n \"If other reads on this account are ALSO refused (campaigns, ad sets, insights), the connection is short a permission it was never granted. Only the user can widen it, by reconnecting Meta from the dashboard.\",\n \"If those reads work and only this object is refused, the asset (pixel/dataset, Page, or catalog) belongs to a Business the connected user holds no role in. Ad-account access does not carry asset access and reconnecting cannot grant it — the client assigns that asset to the connected user or partner in Meta Business settings, under the asset's own section (Data sources → Datasets for a pixel).\",\n \"Either way do not retry the same call, and do not abort the wider job. Continue with what you can read, and state in your answer that this specific check could not run and why — never present the task as verified when this step was skipped.\",\n ].join(\"\\n\\n\"),\n };\n}\n\nexport function handleMetaError(err: unknown): never {\n if (err instanceof ApiError) {\n if (needsConnectionFix(err.code, err.message)) {\n handleConnectionError(\"meta_ads\", err.message);\n }\n const envelope: AdsErrorEnvelope = {\n ok: false,\n error: {\n code: err.code,\n message: err.message,\n fix: err.code === \"FORBIDDEN\" ? metaForbiddenFix(err.message) : { action: \"reject\", explanation: err.message },\n retryable: err.code === \"RATE_LIMITED\" || err.code === \"UNAVAILABLE\" || err.code === \"INTERNAL_ERROR\",\n },\n };\n writeAdsJson(envelope);\n process.exit(1);\n }\n const message = err instanceof Error ? err.message : \"Unexpected error\";\n writeAdsJson({ ok: false, error: { code: \"NETWORK_ERROR\", message } });\n process.exit(1);\n}\n\nconst ACCOUNT_ID_RE = /^(act_)?[0-9]+$/;\n\n/** Pull the default Meta ad account ID from `--account-id` arg or `BAKER_META_AD_ACCOUNT_ID` env. */\nexport function resolveAccountIdArg(args: Record<string, unknown>): string {\n const fromArgs = args[\"account-id\"] as string | undefined;\n const id = fromArgs || getEnv().BAKER_META_AD_ACCOUNT_ID;\n if (!id) {\n writeAdsJson({\n ok: false,\n error: {\n code: \"MISSING_ACCOUNT_ID\",\n message: \"Pass --account-id or set BAKER_META_AD_ACCOUNT_ID. Run `baker ads meta accounts` to find IDs.\",\n },\n });\n process.exit(1);\n }\n if (!ACCOUNT_ID_RE.test(id)) {\n writeAdsJson({\n ok: false,\n error: {\n code: \"INVALID_ACCOUNT_ID\",\n message: `Invalid account ID \"${id}\". Expected numeric ID, optionally prefixed with \"act_\".`,\n },\n });\n process.exit(1);\n }\n return id.startsWith(\"act_\") ? id : `act_${id}`;\n}\n\nexport function getDateRange(args: Record<string, unknown>): { datePreset?: string; since?: string; until?: string } {\n const datePreset = args[\"date-preset\"] as string | undefined;\n const since = args.since as string | undefined;\n const until = args.until as string | undefined;\n if (since && until) return { since, until };\n return { datePreset: datePreset ?? \"last_7d\" };\n}\n\nexport function todayIso(): string {\n return new Date().toISOString().slice(0, 10);\n}\n\nexport function daysAgoIso(days: number): string {\n return new Date(Date.now() - days * DAY_MS).toISOString().slice(0, 10);\n}\n\nexport function csvOrJson(args: Record<string, unknown>): string {\n return (args.output as string | undefined) ?? \"json\";\n}\n\n/**\n * Default to ACTIVE-only on listings — that's almost always what an AI agent or\n * a human glance wants. Pass `--effective-status ACTIVE,PAUSED` to override, or\n * `--all-statuses` to drop the filter entirely.\n */\nexport function resolveEffectiveStatus(args: Record<string, unknown>): string | undefined {\n if (args[\"all-statuses\"]) {\n return undefined;\n }\n const explicit = args[\"effective-status\"] as string | undefined;\n if (explicit) {\n return explicit;\n }\n return \"ACTIVE\";\n}\n"],"mappings":";;;;;;;;;;;;;AAMA,IAAM,SAAS;AAaR,SAAS,iBAAiB,SAA2B;AAC1D,SAAO;AAAA,IACL,QAAQ;AAAA,IACR,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,MAAM;AAAA,EACf;AACF;AAEO,SAAS,gBAAgB,KAAqB;AACnD,MAAI,eAAe,UAAU;AAC3B,QAAI,mBAAmB,IAAI,MAAM,IAAI,OAAO,GAAG;AAC7C,4BAAsB,YAAY,IAAI,OAAO;AAAA,IAC/C;AACA,UAAM,WAA6B;AAAA,MACjC,IAAI;AAAA,MACJ,OAAO;AAAA,QACL,MAAM,IAAI;AAAA,QACV,SAAS,IAAI;AAAA,QACb,KAAK,IAAI,SAAS,cAAc,iBAAiB,IAAI,OAAO,IAAI,EAAE,QAAQ,UAAU,aAAa,IAAI,QAAQ;AAAA,QAC7G,WAAW,IAAI,SAAS,kBAAkB,IAAI,SAAS,iBAAiB,IAAI,SAAS;AAAA,MACvF;AAAA,IACF;AACA,iBAAa,QAAQ;AACrB,YAAQ,KAAK,CAAC;AAAA,EAChB;AACA,QAAM,UAAU,eAAe,QAAQ,IAAI,UAAU;AACrD,eAAa,EAAE,IAAI,OAAO,OAAO,EAAE,MAAM,iBAAiB,QAAQ,EAAE,CAAC;AACrE,UAAQ,KAAK,CAAC;AAChB;AAEA,IAAM,gBAAgB;AAGf,SAAS,oBAAoB,MAAuC;AACzE,QAAM,WAAW,KAAK,YAAY;AAClC,QAAM,KAAK,YAAY,OAAO,EAAE;AAChC,MAAI,CAAC,IAAI;AACP,iBAAa;AAAA,MACX,IAAI;AAAA,MACJ,OAAO;AAAA,QACL,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF,CAAC;AACD,YAAQ,KAAK,CAAC;AAAA,EAChB;AACA,MAAI,CAAC,cAAc,KAAK,EAAE,GAAG;AAC3B,iBAAa;AAAA,MACX,IAAI;AAAA,MACJ,OAAO;AAAA,QACL,MAAM;AAAA,QACN,SAAS,uBAAuB,EAAE;AAAA,MACpC;AAAA,IACF,CAAC;AACD,YAAQ,KAAK,CAAC;AAAA,EAChB;AACA,SAAO,GAAG,WAAW,MAAM,IAAI,KAAK,OAAO,EAAE;AAC/C;AAEO,SAAS,aAAa,MAAwF;AACnH,QAAM,aAAa,KAAK,aAAa;AACrC,QAAM,QAAQ,KAAK;AACnB,QAAM,QAAQ,KAAK;AACnB,MAAI,SAAS,MAAO,QAAO,EAAE,OAAO,MAAM;AAC1C,SAAO,EAAE,YAAY,cAAc,UAAU;AAC/C;AAEO,SAAS,WAAmB;AACjC,UAAO,oBAAI,KAAK,GAAE,YAAY,EAAE,MAAM,GAAG,EAAE;AAC7C;AAEO,SAAS,WAAW,MAAsB;AAC/C,SAAO,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,EAAE;AACvE;AAEO,SAAS,UAAU,MAAuC;AAC/D,SAAQ,KAAK,UAAiC;AAChD;AAOO,SAAS,uBAAuB,MAAmD;AACxF,MAAI,KAAK,cAAc,GAAG;AACxB,WAAO;AAAA,EACT;AACA,QAAM,WAAW,KAAK,kBAAkB;AACxC,MAAI,UAAU;AACZ,WAAO;AAAA,EACT;AACA,SAAO;AACT;","names":[]}
|
package/dist/cli.js
CHANGED
|
@@ -69,9 +69,8 @@ import {
|
|
|
69
69
|
validateCanvasDeep,
|
|
70
70
|
withoutCastName,
|
|
71
71
|
ytDlpBlockSignal
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-AI4HWQVN.js";
|
|
73
73
|
import {
|
|
74
|
-
NAME_CONTAINS_ARG,
|
|
75
74
|
csvOrJson,
|
|
76
75
|
daysAgoIso,
|
|
77
76
|
getDateRange,
|
|
@@ -79,7 +78,7 @@ import {
|
|
|
79
78
|
resolveAccountIdArg,
|
|
80
79
|
resolveEffectiveStatus,
|
|
81
80
|
todayIso
|
|
82
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-BLMXG42J.js";
|
|
83
82
|
import {
|
|
84
83
|
buildQueryCacheKey,
|
|
85
84
|
cacheGet,
|
|
@@ -26383,7 +26382,7 @@ Example: baker ads meta ads retag 120252158038400247 --url-tags "utm_source={{si
|
|
|
26383
26382
|
const { apiPost: apiPost2 } = await import("./client-3DGBQ2H3.js");
|
|
26384
26383
|
const { requireChatId: requireChatId2 } = await import("./env-BSG7TY5Y.js");
|
|
26385
26384
|
const { writeJsonEnvelope: writeJsonEnvelope2 } = await import("./output-M2DBCZFG.js");
|
|
26386
|
-
const { handleMetaError: handleMetaError2 } = await import("./shared-
|
|
26385
|
+
const { handleMetaError: handleMetaError2 } = await import("./shared-BROA3UXS.js");
|
|
26387
26386
|
try {
|
|
26388
26387
|
const accountId = bareAccountId2(args5);
|
|
26389
26388
|
const urlTags = typeof args5["url-tags"] === "string" ? args5["url-tags"] : void 0;
|
|
@@ -26531,7 +26530,7 @@ function duplicateCommand2(entity, label) {
|
|
|
26531
26530
|
const { apiPost: apiPost2 } = await import("./client-3DGBQ2H3.js");
|
|
26532
26531
|
const { requireChatId: requireChatId2 } = await import("./env-BSG7TY5Y.js");
|
|
26533
26532
|
const { writeJsonEnvelope: writeJsonEnvelope2 } = await import("./output-M2DBCZFG.js");
|
|
26534
|
-
const { handleMetaError: handleMetaError2 } = await import("./shared-
|
|
26533
|
+
const { handleMetaError: handleMetaError2 } = await import("./shared-BROA3UXS.js");
|
|
26535
26534
|
try {
|
|
26536
26535
|
const accountId = bareAccountId2(args5);
|
|
26537
26536
|
const chatId = requireChatId2();
|
|
@@ -26570,7 +26569,6 @@ var listArgs4 = {
|
|
|
26570
26569
|
"campaign-id": { type: "string", description: "Filter to one campaign" },
|
|
26571
26570
|
"effective-status": { type: "string", description: "Comma-separated effective_status filter (overrides default)" },
|
|
26572
26571
|
"all-statuses": { type: "boolean", description: "Drop the default ACTIVE filter" },
|
|
26573
|
-
"name-contains": NAME_CONTAINS_ARG,
|
|
26574
26572
|
limit: { type: "string", description: "Max rows (default 1000)" },
|
|
26575
26573
|
"no-cache": NO_CACHE_ARG,
|
|
26576
26574
|
output: { type: "string", description: "Output format", default: "json" }
|
|
@@ -26589,7 +26587,6 @@ var listCommand4 = defineCommand58({
|
|
|
26589
26587
|
if (args5["adset-id"]) params["adset-id"] = args5["adset-id"];
|
|
26590
26588
|
if (args5["campaign-id"]) params["campaign-id"] = args5["campaign-id"];
|
|
26591
26589
|
if (effectiveStatus) params["effective-status"] = effectiveStatus;
|
|
26592
|
-
if (args5["name-contains"]) params["name-contains"] = args5["name-contains"];
|
|
26593
26590
|
if (args5.limit) params.limit = args5.limit;
|
|
26594
26591
|
if (args5["no-cache"]) params["skip-cache"] = "true";
|
|
26595
26592
|
const data = await apiGet("/api/ads/meta/ads", params);
|
|
@@ -26615,7 +26612,6 @@ The dashboard shows effective_status (e.g. WITH_ISSUES, PENDING_REVIEW, DISAPPRO
|
|
|
26615
26612
|
Examples:
|
|
26616
26613
|
baker ads meta ads --account-id act_123
|
|
26617
26614
|
baker ads meta ads --adset-id 6123
|
|
26618
|
-
baker ads meta ads --account-id act_123 --all-statuses --name-contains octubre \u2014 find one ad by name
|
|
26619
26615
|
baker ads meta ads create --name "Ad 1" --adset meta_temp_as01 --creative meta_temp_cr01
|
|
26620
26616
|
baker ads meta ads pause 6123 --account-id act_123
|
|
26621
26617
|
baker ads meta ads retag 6123 --set "utm_medium=paid-social" \u2014 fix tracking on a LIVE ad, keeping everything else`
|
|
@@ -26645,7 +26641,6 @@ var listArgs5 = {
|
|
|
26645
26641
|
"campaign-id": { type: "string", description: "Filter to one campaign" },
|
|
26646
26642
|
"effective-status": { type: "string", description: "Comma-separated effective_status filter (overrides default)" },
|
|
26647
26643
|
"all-statuses": { type: "boolean", description: "Drop the default ACTIVE filter" },
|
|
26648
|
-
"name-contains": NAME_CONTAINS_ARG,
|
|
26649
26644
|
limit: { type: "string", description: "Max rows (default 1000)" },
|
|
26650
26645
|
"no-cache": NO_CACHE_ARG,
|
|
26651
26646
|
output: { type: "string", description: "Output format", default: "json" }
|
|
@@ -26663,7 +26658,6 @@ var listCommand5 = defineCommand59({
|
|
|
26663
26658
|
const params = { "account-id": accountId };
|
|
26664
26659
|
if (args5["campaign-id"]) params["campaign-id"] = args5["campaign-id"];
|
|
26665
26660
|
if (effectiveStatus) params["effective-status"] = effectiveStatus;
|
|
26666
|
-
if (args5["name-contains"]) params["name-contains"] = args5["name-contains"];
|
|
26667
26661
|
if (args5.limit) params.limit = args5.limit;
|
|
26668
26662
|
if (args5["no-cache"]) params["skip-cache"] = "true";
|
|
26669
26663
|
const data = await apiGet("/api/ads/meta/adsets", params);
|
|
@@ -26687,7 +26681,6 @@ Defaults to ACTIVE only. Write subcommands stage ops on this chat's draft.
|
|
|
26687
26681
|
Examples:
|
|
26688
26682
|
baker ads meta adsets --account-id act_123
|
|
26689
26683
|
baker ads meta adsets --campaign-id 6123456789
|
|
26690
|
-
baker ads meta adsets --account-id act_123 --all-statuses --name-contains retargeting \u2014 find one ad set by name
|
|
26691
26684
|
baker ads meta adsets create --campaign meta_temp_ab12 --name "US 25-54" --optimization-goal LINK_CLICKS --billing-event IMPRESSIONS --daily-budget 50 --targeting-file t.json`
|
|
26692
26685
|
},
|
|
26693
26686
|
subCommands: {
|
|
@@ -26799,7 +26792,6 @@ var listArgs7 = {
|
|
|
26799
26792
|
"account-id": { type: "string", description: "Meta ad account ID" },
|
|
26800
26793
|
"effective-status": { type: "string", description: "Comma-separated effective_status filter (overrides default)" },
|
|
26801
26794
|
"all-statuses": { type: "boolean", description: "Drop the default ACTIVE filter and return everything" },
|
|
26802
|
-
"name-contains": NAME_CONTAINS_ARG,
|
|
26803
26795
|
limit: { type: "string", description: "Max rows (default 1000)" },
|
|
26804
26796
|
"no-cache": NO_CACHE_ARG,
|
|
26805
26797
|
output: { type: "string", description: "Output format", default: "json" }
|
|
@@ -26816,7 +26808,6 @@ var listCommand7 = defineCommand62({
|
|
|
26816
26808
|
try {
|
|
26817
26809
|
const params = { "account-id": accountId };
|
|
26818
26810
|
if (effectiveStatus) params["effective-status"] = effectiveStatus;
|
|
26819
|
-
if (args5["name-contains"]) params["name-contains"] = args5["name-contains"];
|
|
26820
26811
|
if (args5.limit) params.limit = args5.limit;
|
|
26821
26812
|
if (args5["no-cache"]) params["skip-cache"] = "true";
|
|
26822
26813
|
const data = await apiGet("/api/ads/meta/campaigns", params);
|
|
@@ -26844,7 +26835,6 @@ The dashboard shows effective_status: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROC
|
|
|
26844
26835
|
Examples:
|
|
26845
26836
|
baker ads meta campaigns --account-id act_123 # ACTIVE only
|
|
26846
26837
|
baker ads meta campaigns --account-id act_123 --all-statuses # everything
|
|
26847
|
-
baker ads meta campaigns --account-id act_123 --all-statuses --name-contains Q3 # find one by name
|
|
26848
26838
|
baker ads meta campaigns create --account-id act_123 --name "Q3" --objective OUTCOME_LEADS --daily-budget 50
|
|
26849
26839
|
baker ads meta campaigns pause 6123 --account-id act_123`
|
|
26850
26840
|
},
|