@erdoai/cli 0.90.0 → 0.91.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 +22 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -495,6 +495,8 @@ var ErdoClient = class {
|
|
|
495
495
|
const q = new URLSearchParams();
|
|
496
496
|
if (params?.agent) q.set("agent", params.agent);
|
|
497
497
|
if (params?.direction) q.set("direction", params.direction);
|
|
498
|
+
if (params?.since) q.set("since", params.since);
|
|
499
|
+
if (params?.until) q.set("until", params.until);
|
|
498
500
|
if (params?.canonical_lead_id) q.set("canonical_lead_id", params.canonical_lead_id);
|
|
499
501
|
if (params?.limit !== void 0) q.set("limit", String(params.limit));
|
|
500
502
|
if (params?.offset !== void 0) q.set("offset", String(params.offset));
|
|
@@ -5225,12 +5227,14 @@ function leadReferenceLabel(reference) {
|
|
|
5225
5227
|
}
|
|
5226
5228
|
var LEAD_FILTER_HELP = "only this lead's conversations \u2014 its canonical lead id (UUID) or its 22-character lead reference";
|
|
5227
5229
|
var voiceCallsCmd = voiceCmd.command("calls").description("Inbound and outbound phone call records");
|
|
5228
|
-
voiceCallsCmd.command("list").description("List the organization's phone calls, newest first").option("--agent <slug>", "only calls held by this voice agent, by slug").option("--direction <direction>", "only 'inbound' (calls to the agent's number) or 'outbound'").option("--lead <lead>", LEAD_FILTER_HELP).option("--limit <n>", "page size (default 25, max 100)").option("--offset <n>", "rows to skip").option("--cursor <cursor>", "next_cursor from the preceding page (stable paging)").option("--json", "print the raw JSON result instead of a table").action(
|
|
5230
|
+
voiceCallsCmd.command("list").description("List the organization's phone calls, newest first").option("--agent <slug>", "only calls held by this voice agent, by slug").option("--direction <direction>", "only 'inbound' (calls to the agent's number) or 'outbound'").option("--since <rfc3339>", "only calls that started at or after this time (inclusive)").option("--until <rfc3339>", "only calls that started before this time (exclusive)").option("--lead <lead>", LEAD_FILTER_HELP).option("--limit <n>", "page size (default 25, max 100)").option("--offset <n>", "rows to skip").option("--cursor <cursor>", "next_cursor from the preceding page (stable paging)").option("--json", "print the raw JSON result instead of a table").action(
|
|
5229
5231
|
async (opts) => {
|
|
5230
5232
|
try {
|
|
5231
5233
|
const res = await new ErdoClient().listVoiceCalls({
|
|
5232
5234
|
agent: opts.agent,
|
|
5233
5235
|
direction: opts.direction,
|
|
5236
|
+
since: opts.since,
|
|
5237
|
+
until: opts.until,
|
|
5234
5238
|
canonical_lead_id: opts.lead,
|
|
5235
5239
|
limit: opts.limit ? Number(opts.limit) : void 0,
|
|
5236
5240
|
offset: opts.offset ? Number(opts.offset) : void 0,
|
|
@@ -5242,7 +5246,14 @@ voiceCallsCmd.command("list").description("List the organization's phone calls,
|
|
|
5242
5246
|
}
|
|
5243
5247
|
const calls = res.conversations ?? [];
|
|
5244
5248
|
if (calls.length === 0) {
|
|
5245
|
-
|
|
5249
|
+
if (res.total > 0) {
|
|
5250
|
+
process.stderr.write(
|
|
5251
|
+
`showing 0 of ${res.total} call(s) \u2014 offset/cursor is past the last one
|
|
5252
|
+
`
|
|
5253
|
+
);
|
|
5254
|
+
} else {
|
|
5255
|
+
console.log("No calls match those filters.");
|
|
5256
|
+
}
|
|
5246
5257
|
return;
|
|
5247
5258
|
}
|
|
5248
5259
|
printAlignedTable(
|
|
@@ -5275,7 +5286,7 @@ voiceCallsCmd.command("list").description("List the organization's phone calls,
|
|
|
5275
5286
|
call.transcript_summary
|
|
5276
5287
|
])
|
|
5277
5288
|
);
|
|
5278
|
-
process.stderr.write(`showing ${calls.length} call(s)
|
|
5289
|
+
process.stderr.write(`showing ${calls.length} of ${res.total} call(s)
|
|
5279
5290
|
`);
|
|
5280
5291
|
if (res.next_cursor) {
|
|
5281
5292
|
process.stderr.write(`more available \u2014 re-run with --cursor ${res.next_cursor}
|
|
@@ -5314,7 +5325,14 @@ widgetConversationsCmd.command("list").description("List the organization's widg
|
|
|
5314
5325
|
}
|
|
5315
5326
|
const conversations = res.conversations ?? [];
|
|
5316
5327
|
if (conversations.length === 0) {
|
|
5317
|
-
|
|
5328
|
+
if (res.total > 0) {
|
|
5329
|
+
process.stderr.write(
|
|
5330
|
+
`showing 0 of ${res.total} conversation(s) \u2014 offset/cursor is past the last one
|
|
5331
|
+
`
|
|
5332
|
+
);
|
|
5333
|
+
} else {
|
|
5334
|
+
console.log("No conversations match those filters.");
|
|
5335
|
+
}
|
|
5318
5336
|
return;
|
|
5319
5337
|
}
|
|
5320
5338
|
printAlignedTable(
|