@erdoai/cli 0.177.0 → 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.
- package/dist/index.js +17 -6
- 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
|
|
@@ -7835,6 +7836,11 @@ datasetsCmd.command("purposes").description(
|
|
|
7835
7836
|
console.log(
|
|
7836
7837
|
scope === "managed" ? `${p.organization_slug ?? "-"} ${p.purpose} ${target} ${count} ${p.description}` : `${p.purpose} ${target} ${count} ${p.description}`
|
|
7837
7838
|
);
|
|
7839
|
+
for (const h of p.datasets) {
|
|
7840
|
+
console.log(
|
|
7841
|
+
` ${h.dataset_slug}${h.integration_config_key ? ` ${h.integration_config_key}` : ""}`
|
|
7842
|
+
);
|
|
7843
|
+
}
|
|
7838
7844
|
}
|
|
7839
7845
|
} catch (e) {
|
|
7840
7846
|
fail(e);
|
|
@@ -9480,11 +9486,16 @@ ${notes.join("\n")}`);
|
|
|
9480
9486
|
fail(e);
|
|
9481
9487
|
}
|
|
9482
9488
|
});
|
|
9483
|
-
integrationsCmd.command("managed-access <integration-id> <owner_only|managed_organizations>").description(
|
|
9484
|
-
"
|
|
9485
|
-
).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) => {
|
|
9486
9492
|
try {
|
|
9487
|
-
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
|
+
});
|
|
9488
9499
|
print(res);
|
|
9489
9500
|
if (res.managed_access !== "managed_organizations") return;
|
|
9490
9501
|
const orgs = res.managed_organizations ?? [];
|