@erdoai/cli 0.166.1 → 0.170.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 +23 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -522,6 +522,13 @@ var ErdoClient = class {
522
522
  { manager_default: managerDefault }
523
523
  );
524
524
  }
525
+ setCustomDomainHome(domain, homeArtifactId) {
526
+ return this.request(
527
+ "PATCH",
528
+ `/v1/custom-domains/${encodeURIComponent(domain)}/home`,
529
+ { home_artifact_id: homeArtifactId }
530
+ );
531
+ }
525
532
  deleteCustomDomain(domain) {
526
533
  return this.request(
527
534
  "DELETE",
@@ -6281,8 +6288,9 @@ domainsCmd.command("list").description("List the org's custom domains with live
6281
6288
  for (const d of domains) {
6282
6289
  const checked = d.last_checked_at ? `checked ${d.last_checked_at}` : "never checked";
6283
6290
  const managerDefault = d.manager_default ? " manager default" : "";
6291
+ const home = d.home_artifact_id ? ` home ${d.home_artifact_id}` : "";
6284
6292
  const reason = d.error_reason ? ` ${d.error_reason}` : "";
6285
- console.log(`${d.domain} ${d.status} ${checked}${managerDefault}${reason}`);
6293
+ console.log(`${d.domain} ${d.status} ${checked}${managerDefault}${home}${reason}`);
6286
6294
  }
6287
6295
  } catch (e) {
6288
6296
  fail(e);
@@ -6319,6 +6327,17 @@ domainsCmd.command("manager-default <domain>").description(
6319
6327
  fail(e);
6320
6328
  }
6321
6329
  });
6330
+ domainsCmd.command("home <domain> [artifactId]").description("Set the domain root's public home page, or clear it with --unset").option("--unset", "clear the home page (the domain root will return 404)").action(async (domain, artifactId, opts) => {
6331
+ try {
6332
+ if (opts.unset ? artifactId !== void 0 : !artifactId) {
6333
+ throw new Error("Provide a page artifact ID, or use --unset without an ID");
6334
+ }
6335
+ const d = await new ErdoClient().setCustomDomainHome(domain, opts.unset ? null : artifactId);
6336
+ console.log(d.home_artifact_id ? `${d.domain} home page: /p/${d.home_artifact_id}` : `${d.domain} home page cleared (the domain root returns 404)`);
6337
+ } catch (e) {
6338
+ fail(e);
6339
+ }
6340
+ });
6322
6341
  domainsCmd.command("remove <domain>").description("Remove a custom domain registration (stops it serving pages)").action(async (domain) => {
6323
6342
  try {
6324
6343
  const res = await new ErdoClient().deleteCustomDomain(domain);
@@ -7567,7 +7586,7 @@ voiceWidgetsCmd.command("realtime-model <widget> <model>").description("Choose t
7567
7586
  }
7568
7587
  });
7569
7588
  var datasetsCmd = program.command("datasets").description("Datasets");
7570
- var providerLeadSourcesCmd = program.command("provider-lead-sources").description("Ingest ad-platform lead form responses into a lead dataset");
7589
+ var providerLeadSourcesCmd = program.command("provider-lead-sources").description("Manage LinkedIn lead form responses synced into a lead dataset");
7571
7590
  providerLeadSourcesCmd.command("list").description("List LinkedIn lead form source declarations").option("--provider <provider>", "filter by ad platform provider").option("--account-id <id>", "filter by provider ad account id").action(async (opts) => {
7572
7591
  try {
7573
7592
  print(await new ErdoClient().listProviderLeadSources({ provider: opts.provider, account_id: opts.accountId }));
@@ -7575,14 +7594,14 @@ providerLeadSourcesCmd.command("list").description("List LinkedIn lead form sour
7575
7594
  fail(e);
7576
7595
  }
7577
7596
  });
7578
- providerLeadSourcesCmd.command("forms").description("List LinkedIn lead forms available on a connected ad account").requiredOption("--connection-id <id>", "connector_account_id from erdo integrations status linkedin_ads or GET /v1/integrations").requiredOption("--account-id <id>", "numeric LinkedIn ad account id").action(async (opts) => {
7597
+ providerLeadSourcesCmd.command("forms").description("List LinkedIn lead forms available on a connected ad account").requiredOption("--connection-id <id>", "native integration id from erdo integrations status linkedin_ads_sync or GET /v1/integrations").requiredOption("--account-id <id>", "numeric LinkedIn ad account id").action(async (opts) => {
7579
7598
  try {
7580
7599
  print(await new ErdoClient().listProviderLeadSourceForms(opts.connectionId, opts.accountId));
7581
7600
  } catch (e) {
7582
7601
  fail(e);
7583
7602
  }
7584
7603
  });
7585
- providerLeadSourcesCmd.command("set").description("Replace a provider lead form source declaration from JSON or flags").option("-f, --file <path>", "one JSON declaration object; use - to read from stdin").option("--dataset <slug>", "lead dataset slug").option("--provider <provider>", "ad platform provider", "linkedin_ads").option("--connection-id <id>", "connector_account_id from erdo integrations status linkedin_ads or GET /v1/integrations").option("--account-id <id>", "numeric LinkedIn ad account id").option("--form <id>", "LinkedIn lead gen form id (repeatable)", collect, []).option("--disabled", "save the declaration disabled").action(async (opts) => {
7604
+ providerLeadSourcesCmd.command("set").description("Replace a provider lead form source declaration from JSON or flags").option("-f, --file <path>", "one JSON declaration object; use - to read from stdin").option("--dataset <slug>", "lead dataset slug").option("--provider <provider>", "ad platform provider", "linkedin_ads").option("--connection-id <id>", "native integration id from erdo integrations status linkedin_ads_sync or GET /v1/integrations").option("--account-id <id>", "numeric LinkedIn ad account id").option("--form <id>", "LinkedIn lead gen form id (repeatable)", collect, []).option("--disabled", "save the declaration disabled").action(async (opts) => {
7586
7605
  try {
7587
7606
  let input;
7588
7607
  if (opts.file) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.166.1",
3
+ "version": "0.170.0",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {