@erdoai/cli 0.155.0 → 0.157.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.
- package/dist/index.js +40 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -747,6 +747,20 @@ var ErdoClient = class {
|
|
|
747
747
|
{ enabled }
|
|
748
748
|
);
|
|
749
749
|
}
|
|
750
|
+
setVoiceAgentRealtimeModel(slug, model) {
|
|
751
|
+
return this.request(
|
|
752
|
+
"POST",
|
|
753
|
+
`/v1/voice/agents/${encodeURIComponent(slug)}/realtime-model`,
|
|
754
|
+
{ realtime_model: model }
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
setVoiceWidgetRealtimeModel(widget, model) {
|
|
758
|
+
return this.request(
|
|
759
|
+
"POST",
|
|
760
|
+
`/v1/voice/widgets/${encodeURIComponent(widget)}/realtime-model`,
|
|
761
|
+
{ realtime_model: model }
|
|
762
|
+
);
|
|
763
|
+
}
|
|
750
764
|
// A separate switch from the text one, on the same number: the two are
|
|
751
765
|
// separate permissions, so one endpoint per channel rather than a channel
|
|
752
766
|
// argument that could move the wrong one.
|
|
@@ -2300,7 +2314,8 @@ function formatIntegrationListRow(i) {
|
|
|
2300
2314
|
const provided = i.provided_by_organization_slug ? ` provided by ${i.provided_by_organization_slug}` : "";
|
|
2301
2315
|
const unreadable = i.identity_unreadable ? " identity unreadable" : "";
|
|
2302
2316
|
const unchecked = i.identity_unchecked ? " identity not checked" : "";
|
|
2303
|
-
|
|
2317
|
+
const connectorAccount = i.connector_account_id ? ` connector_account_id=${i.connector_account_id}` : "";
|
|
2318
|
+
return `${i.app} ${i.status} ${i.auth_type} ${i.name} ${i.id}${connectorAccount}${provided}${unreadable}${unchecked}`;
|
|
2304
2319
|
}
|
|
2305
2320
|
function identityNotes(rows) {
|
|
2306
2321
|
const notes = [];
|
|
@@ -7368,6 +7383,27 @@ voiceAgentsCmd.command("whatsapp-replies <slug>").description("Turn a voice agen
|
|
|
7368
7383
|
fail(e);
|
|
7369
7384
|
}
|
|
7370
7385
|
});
|
|
7386
|
+
function parseVoiceRealtimeModel(value) {
|
|
7387
|
+
if (value === "off" || value === "mini" || value === "max") return value;
|
|
7388
|
+
throw new Error("realtime model must be one of: off, mini, max");
|
|
7389
|
+
}
|
|
7390
|
+
voiceAgentsCmd.command("realtime-model <slug> <model>").description("Choose the voice model used by a voice agent").action(async (slug, model) => {
|
|
7391
|
+
try {
|
|
7392
|
+
const res = await new ErdoClient().setVoiceAgentRealtimeModel(slug, parseVoiceRealtimeModel(model));
|
|
7393
|
+
console.log(`${res.agent ?? slug} ${res.realtime_model} ${res.name}`);
|
|
7394
|
+
} catch (e) {
|
|
7395
|
+
fail(e);
|
|
7396
|
+
}
|
|
7397
|
+
});
|
|
7398
|
+
var voiceWidgetsCmd = voiceCmd.command("widgets").description("Change settings on a website voice widget");
|
|
7399
|
+
voiceWidgetsCmd.command("realtime-model <widget> <model>").description("Choose the voice model used by a website widget").action(async (widget, model) => {
|
|
7400
|
+
try {
|
|
7401
|
+
const res = await new ErdoClient().setVoiceWidgetRealtimeModel(widget, parseVoiceRealtimeModel(model));
|
|
7402
|
+
console.log(`${res.widget ?? widget} ${res.realtime_model} ${res.name}`);
|
|
7403
|
+
} catch (e) {
|
|
7404
|
+
fail(e);
|
|
7405
|
+
}
|
|
7406
|
+
});
|
|
7371
7407
|
var datasetsCmd = program.command("datasets").description("Datasets");
|
|
7372
7408
|
var providerLeadSourcesCmd = program.command("provider-lead-sources").description("Ingest ad-platform lead form responses into a lead dataset");
|
|
7373
7409
|
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) => {
|
|
@@ -7377,14 +7413,14 @@ providerLeadSourcesCmd.command("list").description("List LinkedIn lead form sour
|
|
|
7377
7413
|
fail(e);
|
|
7378
7414
|
}
|
|
7379
7415
|
});
|
|
7380
|
-
providerLeadSourcesCmd.command("forms").description("List LinkedIn lead forms available on a connected ad account").requiredOption("--connection-id <id>", "
|
|
7416
|
+
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) => {
|
|
7381
7417
|
try {
|
|
7382
7418
|
print(await new ErdoClient().listProviderLeadSourceForms(opts.connectionId, opts.accountId));
|
|
7383
7419
|
} catch (e) {
|
|
7384
7420
|
fail(e);
|
|
7385
7421
|
}
|
|
7386
7422
|
});
|
|
7387
|
-
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>", "
|
|
7423
|
+
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) => {
|
|
7388
7424
|
try {
|
|
7389
7425
|
let input;
|
|
7390
7426
|
if (opts.file) {
|
|
@@ -9017,7 +9053,7 @@ function printLead(lead) {
|
|
|
9017
9053
|
}
|
|
9018
9054
|
}
|
|
9019
9055
|
var integrationsCmd = program.command("integrations").description("Connect and inspect integrations");
|
|
9020
|
-
integrationsCmd.command("list").description("List connected integrations \u2014 app, status, auth type, name, then the connection's id (what --from-connection takes)").action(async () => {
|
|
9056
|
+
integrationsCmd.command("list").description("List connected integrations \u2014 app, status, auth type, name, then the connection's id (what --from-connection takes) and connector_account_id when available").action(async () => {
|
|
9021
9057
|
try {
|
|
9022
9058
|
const { integrations } = await new ErdoClient().listIntegrations();
|
|
9023
9059
|
for (const i of integrations) console.log(formatIntegrationListRow(i));
|