@erdoai/cli 0.275.0 → 0.276.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 +8 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11311,11 +11311,17 @@ ${notes.join("\n")}`);
11311
11311
  fail(e);
11312
11312
  }
11313
11313
  });
11314
- integrationsCmd.command("managed-access <integration-id> <owner_only|managed_organizations>").option("--managed-organization <id>", "Limit this operation to one managed organization").option("--ad-account <id>", "Assign one LinkedIn ad account to the managed organization").option("--client-integration <id>", "Use the managed organization's existing integration").option("--preserve-client-grant", "Assert the existing client's OAuth grant is independent of the manager and retain it on revoke").description(
11315
- "Lend an API key to managed organizations, or assign a LinkedIn OAuth connection to one client with --managed-organization and --ad-account"
11314
+ integrationsCmd.command("managed-access <integration-id> <owner_only|managed_organizations>").option("--managed-organization <id>", "Limit this operation to one managed organization").option("--managed-organization-slug <slug>", "Delegate to this actively managed organization").option("--account <id>", "Existing provider account to delegate; requires --account-type").option("--account-type <type>", "Provider segment type, e.g. account for Google Ads or ad_account for LinkedIn").option("--replace-current-account", "Consent to leaving a different current account and its campaigns behind").option("--ad-account <id>", "Legacy LinkedIn account assignment; use --account and --account-type for new calls").option("--client-integration <id>", "Use the managed organization's existing integration").option("--preserve-client-grant", "Assert the existing client's OAuth grant is independent of the manager and retain it on revoke").description(
11315
+ "Lend an API key to managed organizations, or delegate one OAuth account with --managed-organization-slug, --account and --account-type"
11316
11316
  ).action(async (integrationId, managedAccess, opts) => {
11317
11317
  try {
11318
+ if (Boolean(opts.account) !== Boolean(opts.accountType)) throw new Error("--account and --account-type are required together");
11319
+ if (opts.account && opts.adAccount) throw new Error("Use --account or --ad-account, not both");
11320
+ if (opts.managedOrganization && opts.managedOrganizationSlug) throw new Error("Use --managed-organization-slug or --managed-organization, not both");
11318
11321
  const res = await new ErdoClient().setIntegrationManagedAccess(integrationId, managedAccess, {
11322
+ managed_organization_slug: opts.managedOrganizationSlug,
11323
+ selected_segments: opts.account ? [{ type: opts.accountType, id: opts.account }] : void 0,
11324
+ replace_current_account: opts.replaceCurrentAccount,
11319
11325
  managed_organization_id: opts.managedOrganization,
11320
11326
  ad_account_id: opts.adAccount,
11321
11327
  client_integration_id: opts.clientIntegration,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.275.0",
3
+ "version": "0.276.0",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {