@lunnoa/client 1.5.0 → 2.0.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/react.cjs CHANGED
@@ -702,12 +702,12 @@ var AgentsResource = class {
702
702
  });
703
703
  }
704
704
  /**
705
- * Upsert an agent by project-scoped slug.
705
+ * Upsert an agent by slug inside the workspace on the API key.
706
706
  * Prefer the CLI (`npx @lunnoa/client agents deploy`) for happy-path deploy.
707
707
  */
708
- upsertBySlug(projectId, body, options) {
708
+ upsertBySlug(body, options) {
709
709
  const payload = "kind" in body && body.kind === "agent" ? agentDefinitionToUpsert(body, options) : body;
710
- return this.http.post(`/api/projects/${projectId}/agents/upsert`, {
710
+ return this.http.post("/api/agents/upsert", {
711
711
  body: payload
712
712
  });
713
713
  }
@@ -1131,10 +1131,8 @@ var TablesResource = class {
1131
1131
  }
1132
1132
  http;
1133
1133
  /** Lists tables in the API key's workspace (without columns and rows). */
1134
- list(options = {}) {
1135
- return this.http.get("/api/tables", {
1136
- query: { projectId: options.projectId }
1137
- });
1134
+ list() {
1135
+ return this.http.get("/api/tables");
1138
1136
  }
1139
1137
  /** Returns a single table by ID, including columns and rows. */
1140
1138
  get(id) {
@@ -1554,30 +1552,6 @@ var KnowledgeResource = class {
1554
1552
  }
1555
1553
  };
1556
1554
 
1557
- // src/resources/projects.ts
1558
- var ProjectsResource = class {
1559
- constructor(http) {
1560
- this.http = http;
1561
- }
1562
- http;
1563
- /** Lists projects in the workspace, most recently updated first. */
1564
- list(options) {
1565
- return this.http.get("/api/projects", {
1566
- query: serializeListQuery(options)
1567
- });
1568
- }
1569
- /** Returns a single project. */
1570
- get(projectId, options) {
1571
- return this.http.get(`/api/projects/${projectId}`, {
1572
- query: serializeListQuery(options)
1573
- });
1574
- }
1575
- /** Creates a project. */
1576
- create(data) {
1577
- return this.http.post("/api/projects", { body: data });
1578
- }
1579
- };
1580
-
1581
1555
  // src/resources/queue-items.ts
1582
1556
  var QueueItemsResource = class {
1583
1557
  constructor(http) {
@@ -1857,7 +1831,7 @@ var RunsResource = class {
1857
1831
  * Start a linear multi-step ad-hoc Execution.
1858
1832
  *
1859
1833
  * Accepts a `defineWorkflow` result, a step array, or an explicit
1860
- * `{ steps, projectId?, name? }` payload.
1834
+ * `{ steps, name? }` payload.
1861
1835
  */
1862
1836
  start(input) {
1863
1837
  const options = normalizeStartRunInput(input);
@@ -2075,15 +2049,14 @@ var WorkflowsResource = class {
2075
2049
  });
2076
2050
  }
2077
2051
  /**
2078
- * Upsert a workflow by project-scoped slug from a linear step list.
2052
+ * Upsert a workflow by slug inside the workspace on the API key.
2079
2053
  * Prefer the CLI (`npx @lunnoa/client workflows deploy`) for happy-path deploy.
2080
2054
  */
2081
- upsertBySlug(projectId, body) {
2055
+ upsertBySlug(body) {
2082
2056
  const payload = "kind" in body && body.kind === "workflow" ? workflowDefinitionToUpsert(body) : body;
2083
- return this.http.post(
2084
- `/api/projects/${projectId}/workflows/upsert`,
2085
- { body: payload }
2086
- );
2057
+ return this.http.post("/api/workflows/upsert", {
2058
+ body: payload
2059
+ });
2087
2060
  }
2088
2061
  /**
2089
2062
  * Starts a new execution of the workflow with the given trigger inputs.
@@ -2145,7 +2118,6 @@ var LunnoaClient = class {
2145
2118
  variables;
2146
2119
  scorecards;
2147
2120
  connections;
2148
- projects;
2149
2121
  workflowApps;
2150
2122
  discovery;
2151
2123
  constructor(options) {
@@ -2169,7 +2141,6 @@ var LunnoaClient = class {
2169
2141
  this.variables = new VariablesResource(this.http);
2170
2142
  this.scorecards = new ScorecardsResource(this.http);
2171
2143
  this.connections = new ConnectionsResource(this.http);
2172
- this.projects = new ProjectsResource(this.http);
2173
2144
  this.discovery = new DiscoveryResource(this.http);
2174
2145
  }
2175
2146
  };