@erdoai/cli 0.177.1 → 0.177.2

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 +12 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1771,9 +1771,10 @@ var ErdoClient = class {
1771
1771
  // Start or stop lending a connection to the organizations this one manages.
1772
1772
  // `managed_organizations` names the orgs it now serves — empty when this org
1773
1773
  // manages nobody yet, which is a truthful answer rather than a failure.
1774
- setIntegrationManagedAccess(integrationId, managedAccess) {
1774
+ setIntegrationManagedAccess(integrationId, managedAccess, scope = {}) {
1775
1775
  return this.request("POST", `/v1/integrations/${encodeURIComponent(integrationId)}/managed-access`, {
1776
- managed_access: managedAccess
1776
+ managed_access: managedAccess,
1777
+ ...scope
1777
1778
  });
1778
1779
  }
1779
1780
  // For a Pipedream-backed integration this is the full disconnect: the
@@ -9485,11 +9486,16 @@ ${notes.join("\n")}`);
9485
9486
  fail(e);
9486
9487
  }
9487
9488
  });
9488
- integrationsCmd.command("managed-access <integration-id> <owner_only|managed_organizations>").description(
9489
- "Start or stop providing a connection to the organizations you manage \u2014 a vendor key your agency pays for, spendable by every client for as long as you manage it. Key-authenticated connections only"
9490
- ).action(async (integrationId, managedAccess) => {
9489
+ 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(
9490
+ "Lend an API key to managed organizations, or assign a LinkedIn OAuth connection to one client with --managed-organization and --ad-account"
9491
+ ).action(async (integrationId, managedAccess, opts) => {
9491
9492
  try {
9492
- const res = await new ErdoClient().setIntegrationManagedAccess(integrationId, managedAccess);
9493
+ const res = await new ErdoClient().setIntegrationManagedAccess(integrationId, managedAccess, {
9494
+ managed_organization_id: opts.managedOrganization,
9495
+ ad_account_id: opts.adAccount,
9496
+ client_integration_id: opts.clientIntegration,
9497
+ preserve_client_grant: opts.preserveClientGrant
9498
+ });
9493
9499
  print(res);
9494
9500
  if (res.managed_access !== "managed_organizations") return;
9495
9501
  const orgs = res.managed_organizations ?? [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.177.1",
3
+ "version": "0.177.2",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {