@erdoai/cli 0.245.0 → 0.247.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 +10 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1510,6 +1510,7 @@ var ErdoClient = class {
|
|
|
1510
1510
|
const q = new URLSearchParams();
|
|
1511
1511
|
if (params?.status !== void 0) q.set("status", params.status);
|
|
1512
1512
|
if (params?.type) q.set("type", params.type);
|
|
1513
|
+
if (params?.filter) q.set("filter", params.filter);
|
|
1513
1514
|
if (params?.limit) q.set("limit", String(params.limit));
|
|
1514
1515
|
if (params?.offset) q.set("offset", String(params.offset));
|
|
1515
1516
|
const qs = q.toString();
|
|
@@ -6731,15 +6732,16 @@ webhooksCmd.command("retry <id> <delivery-id>").description("Retry a failed webh
|
|
|
6731
6732
|
}
|
|
6732
6733
|
});
|
|
6733
6734
|
var reviewsCmd = program.command("reviews").description(
|
|
6734
|
-
"
|
|
6735
|
+
"Changes Erdo applied or that need you, plus investigations and failure signals"
|
|
6735
6736
|
);
|
|
6736
|
-
reviewsCmd.command("list").description("List
|
|
6737
|
+
reviewsCmd.command("list").description("List Changes that need you or were applied by Erdo").option("--status <status>", "open (default) | snoozed | applied | undone | resolved | rejected").option("--type <type>", "filter by type, e.g. knowledge_patch, eval_failure, failed_run").option("--filter <view>", "needs_you (open items) | changed_by_erdo (applied or undone Knowledge changes)").option("-n, --limit <n>", "max items", (v) => parseInt(v, 10)).option("--offset <n>", "pagination offset", (v) => parseInt(v, 10)).action(
|
|
6737
6738
|
async (opts) => {
|
|
6738
6739
|
try {
|
|
6739
6740
|
print(
|
|
6740
6741
|
await new ErdoClient().listReviewItems({
|
|
6741
6742
|
status: opts.status,
|
|
6742
6743
|
type: opts.type,
|
|
6744
|
+
filter: opts.filter,
|
|
6743
6745
|
limit: opts.limit,
|
|
6744
6746
|
offset: opts.offset
|
|
6745
6747
|
})
|
|
@@ -6749,7 +6751,7 @@ reviewsCmd.command("list").description("List review items (decision items rank a
|
|
|
6749
6751
|
}
|
|
6750
6752
|
}
|
|
6751
6753
|
);
|
|
6752
|
-
reviewsCmd.command("show <id>").description("Show one
|
|
6754
|
+
reviewsCmd.command("show <id>").description("Show one change with its full payload and Knowledge diff fields when applicable").action(async (id) => {
|
|
6753
6755
|
try {
|
|
6754
6756
|
print(await new ErdoClient().getReviewItem(id));
|
|
6755
6757
|
} catch (e) {
|
|
@@ -6757,18 +6759,19 @@ reviewsCmd.command("show <id>").description("Show one review item with its full
|
|
|
6757
6759
|
}
|
|
6758
6760
|
});
|
|
6759
6761
|
reviewsCmd.command("decide <id>").description(
|
|
6760
|
-
"
|
|
6761
|
-
).option("--apply", "apply a knowledge_patch
|
|
6762
|
+
"Act on a change: --apply a held Knowledge patch against the current version, --undo an applied change, --resolve, --reject, or --snooze [minutes]"
|
|
6763
|
+
).option("--apply", "apply a held knowledge_patch against the current Knowledge version").option("--undo", "restore the previous revision of an applied Knowledge change").option("--resolve", "close as handled").option("--reject", "close as declined").option("--snooze [minutes]", "hide the item for [minutes] (default 7 days)").option("--note <note>", "resolution note recorded on the item").action(
|
|
6762
6764
|
async (id, opts) => {
|
|
6763
6765
|
try {
|
|
6764
6766
|
const chosen = [
|
|
6765
6767
|
opts.apply ? "apply" : null,
|
|
6768
|
+
opts.undo ? "undo" : null,
|
|
6766
6769
|
opts.resolve ? "resolve" : null,
|
|
6767
6770
|
opts.reject ? "reject" : null,
|
|
6768
6771
|
opts.snooze === void 0 ? null : "snooze"
|
|
6769
6772
|
].filter(Boolean);
|
|
6770
6773
|
if (chosen.length !== 1) {
|
|
6771
|
-
fail(new Error("provide exactly one of --apply, --resolve, --reject, or --snooze"));
|
|
6774
|
+
fail(new Error("provide exactly one of --apply, --undo, --resolve, --reject, or --snooze"));
|
|
6772
6775
|
}
|
|
6773
6776
|
const action = chosen[0];
|
|
6774
6777
|
let minutes;
|
|
@@ -8556,7 +8559,7 @@ providerLeadSourcesCmd.command("forms").description("List the lead forms a conne
|
|
|
8556
8559
|
}
|
|
8557
8560
|
});
|
|
8558
8561
|
providerLeadSourcesCmd.command("set").description(
|
|
8559
|
-
"Save a lead source from JSON or flags. A LinkedIn or Meta (meta_ads) source names a connection, ad account and forms; a google_sheets, webhook or import source names itself and carries a column mapping (use --file). --dry-run previews what it would write and saves nothing."
|
|
8562
|
+
"Save a lead source from JSON or flags. A LinkedIn or Meta (meta_ads) source names a connection, ad account and forms; a google_sheets, webhook or import source names itself and carries a column mapping (use --file). A meta_ads source may add a budget ({question, currency, options}) in --file so each lead's choice is recorded as their budget. --dry-run previews what it would write and saves nothing."
|
|
8560
8563
|
).option("-f, --file <path>", "one JSON declaration object; use - to read from stdin").option("--dataset <slug>", "lead dataset slug").option("--provider <provider>", "linkedin_ads, meta_ads, google_sheets, webhook or import", "linkedin_ads").option("--connection-id <id>", "native integration id from erdo integrations status linkedin_ads_sync (or meta_ads) or GET /v1/integrations").option("--account-id <id>", "numeric ad account id (a Meta id with or without act_)").option("--form <id>", "LinkedIn lead gen form or Meta Instant Form id (repeatable)", collect, []).option("--name <name>", "a google_sheets, webhook or import source's name").option("--sheet-url <url>", "a google_sheets source's tab, as its address in the browser (open to anyone with the link)").option("--dry-run", "preview what the source would write; save nothing").option("--rotate-secret", "issue a webhook source a new secret").option("--disabled", "save the declaration disabled").option("--create-only", "refuse the save if a source with this name already exists").action(async (opts) => {
|
|
8561
8564
|
try {
|
|
8562
8565
|
let input;
|