@erdoai/cli 0.108.1 → 0.109.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +22 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -386,6 +386,7 @@ var ErdoClient = class {
386
386
  if (input.currencyCode) body.currency_code = input.currencyCode;
387
387
  if (input.timeZone) body.time_zone = input.timeZone;
388
388
  if (input.replaceCurrentAccount) body.replace_current_account = true;
389
+ if (input.startAdvertiserVerification) body.start_advertiser_verification = true;
389
390
  return this.request(
390
391
  "POST",
391
392
  `/v1/managed-organizations/${encodeURIComponent(slug)}/ads-container`,
@@ -2718,6 +2719,18 @@ function printAdsContainer(c) {
2718
2719
  `
2719
2720
  );
2720
2721
  }
2722
+ const v = c.advertiser_verification;
2723
+ if (v) {
2724
+ console.log(`advertiser verification: ${v.status}`);
2725
+ if (v.action_url) console.log(`verification link: ${v.action_url}`);
2726
+ if (v.completion_deadline) console.log(`verification deadline: ${v.completion_deadline}`);
2727
+ if ((v.status === "PENDING_USER_ACTION" || v.status === "FAILURE") && !v.action_url) {
2728
+ process.stderr.write(
2729
+ `Google shows no business name or logo on ${c.customer_id}'s ads until the advertiser is verified. Get a link with: erdo org managed ads-container ${c.org_slug} --provision --start-verification
2730
+ `
2731
+ );
2732
+ }
2733
+ }
2721
2734
  }
2722
2735
  managed.command("ads-container <orgSlug>").description(
2723
2736
  "Read the Google Ads account a managed org runs its campaigns in, or --provision one under your manager account"
@@ -2727,12 +2740,18 @@ managed.command("ads-container <orgSlug>").description(
2727
2740
  ).option(
2728
2741
  "--replace-current-account",
2729
2742
  "with --provision: go ahead even though the org already runs campaigns in another account. Google Ads cannot move a campaign, so those campaigns stay behind and have to be rebuilt"
2730
- ).option("--name <descriptiveName>", "display name for the new account (default: the org's name and slug)").option("--currency <code>", "ISO currency code for the new account, e.g. USD").option("--time-zone <tz>", "IANA time zone for the new account, e.g. America/New_York").action(
2743
+ ).option("--name <descriptiveName>", "display name for the new account (default: the org's name and slug)").option("--currency <code>", "ISO currency code for the new account, e.g. USD").option("--time-zone <tz>", "IANA time zone for the new account, e.g. America/New_York").option(
2744
+ "--start-verification",
2745
+ "with --provision: open a Google advertiser-verification session when the account still needs one, so the output carries the link a person finishes it on"
2746
+ ).action(
2731
2747
  async (orgSlug, opts) => {
2732
2748
  try {
2733
2749
  if (opts.replaceCurrentAccount && !opts.provision) {
2734
2750
  fail(new Error("--replace-current-account only applies with --provision"));
2735
2751
  }
2752
+ if (opts.startVerification && !opts.provision) {
2753
+ fail(new Error("--start-verification only applies with --provision"));
2754
+ }
2736
2755
  if (opts.adopt && !opts.provision) {
2737
2756
  fail(new Error("--adopt only applies with --provision"));
2738
2757
  }
@@ -2764,7 +2783,8 @@ managed.command("ads-container <orgSlug>").description(
2764
2783
  descriptiveName: opts.name,
2765
2784
  currencyCode: opts.currency,
2766
2785
  timeZone: opts.timeZone,
2767
- replaceCurrentAccount: opts.replaceCurrentAccount
2786
+ replaceCurrentAccount: opts.replaceCurrentAccount,
2787
+ startAdvertiserVerification: opts.startVerification
2768
2788
  });
2769
2789
  let outcome;
2770
2790
  if (c.already_provisioned) outcome = `Google Ads container already existed for ${c.org_slug}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.108.1",
3
+ "version": "0.109.0",
4
4
  "description": "Erdo CLI — drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {