@erdoai/cli 0.42.0 → 0.43.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.
Files changed (2) hide show
  1. package/dist/index.js +10 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -772,8 +772,11 @@ var ErdoClient = class {
772
772
  );
773
773
  }
774
774
  // --- knowledge ---
775
- listKnowledge() {
776
- return this.request("GET", "/v1/knowledge");
775
+ listKnowledge(visibility) {
776
+ const params = new URLSearchParams();
777
+ if (visibility) params.set("visibility", visibility);
778
+ const qs = params.toString();
779
+ return this.request("GET", `/v1/knowledge${qs ? `?${qs}` : ""}`);
777
780
  }
778
781
  searchKnowledge(query, limit) {
779
782
  const params = new URLSearchParams({ query });
@@ -3132,9 +3135,12 @@ pipelinesCmd.command("executions <slug>").description("Show an event pipeline's
3132
3135
  }
3133
3136
  });
3134
3137
  var knowledgeCmd = program.command("knowledge").description("Knowledge objects");
3135
- knowledgeCmd.command("list").description("List knowledge objects").action(async () => {
3138
+ knowledgeCmd.command("list").description("List knowledge objects").option(
3139
+ "--public",
3140
+ "only entries opted into anonymous external surfaces (website widgets)"
3141
+ ).action(async (opts) => {
3136
3142
  try {
3137
- print(await new ErdoClient().listKnowledge());
3143
+ print(await new ErdoClient().listKnowledge(opts.public ? "public" : void 0));
3138
3144
  } catch (e) {
3139
3145
  fail(e);
3140
3146
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.42.0",
4
- "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
3
+ "version": "0.43.0",
4
+ "description": "Erdo CLI drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "erdo": "dist/index.js"