@engini/sdk 0.32.0 → 0.34.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/README.md CHANGED
@@ -213,6 +213,11 @@ const run = await client.executions.get(4567);
213
213
  const steps = await client.executions.log(4567); // throws EnginiAPIError on 410 (retention passed)
214
214
  const failedSteps = steps.filter((s) => s.status === "ranWithError").map((s) => [s.stepNo, s.errorMessage]);
215
215
  const payloads = await client.executions.data(4567, 3, { type: "response" }); // drains, 10 per page
216
+ // Per-iteration timing: `duration` (active seconds) is on `status` entries only, once that
217
+ // iteration's / retry attempt's status is final; absent on other entries and while running.
218
+ const slowest = (await client.executions.data(4567, 3, { type: "status" }))
219
+ .filter((e) => e.duration != null)
220
+ .sort((a, b) => b.duration! - a.duration!)[0];
216
221
  ```
217
222
 
218
223
  Sorting by `closedAt` (or several keys) has no cursor on the server, so `list` drains those
@@ -236,7 +241,12 @@ const leads = await client.workflows.list({ name: "lead alert", folderId: Number
236
241
  const firstPage = await client.workflows.listPage({ top: 20 }); // { items, totalCount, offset, top }
237
242
 
238
243
  const hits = await client.workflows.searchCatalog({ q: "post message", app: "slack" });
239
- const schema = await client.workflows.getSchema(hits[0].slug);
244
+ const schema = await client.workflows.getSchema(hits[0].slug, { connectionId: 5 });
245
+ // schema.objectPickers names the pickers (a board, an object); pick one and read again:
246
+ const picked = await client.workflows.getSchema(hits[0].slug, {
247
+ connectionId: 5,
248
+ selected: { BOARD_ID: "123" }, // needs connectionId; unresolved picks are in picked.unresolvedPicks
249
+ });
240
250
  const connections = await client.workflows.listConnections({ app: "slack" });
241
251
 
242
252
  const compiled = await client.workflows.compile({ plan }); // a plan with errors is returned, not thrown
@@ -46,11 +46,19 @@ export declare class WorkflowsResource {
46
46
  top?: number;
47
47
  table?: string;
48
48
  }): Promise<CatalogHit[]>;
49
- /** The input/output schema of one catalog entry (`slug` from `searchCatalog`). */
49
+ /**
50
+ * The input/output schema of one catalog entry (`slug` from `searchCatalog`).
51
+ *
52
+ * `selected` maps an object-picker field (named in the result's `objectPickers`) to the
53
+ * picked value; the schema then lists that object's fields. It needs `connectionId` (the
54
+ * server answers 400 without one). A pick that cannot be resolved still answers 200 and is
55
+ * listed in `unresolvedPicks`.
56
+ */
50
57
  getSchema(slug: string, params?: {
51
58
  connectionId?: number;
52
59
  kind?: string;
53
60
  table?: string;
61
+ selected?: Record<string, string>;
54
62
  }): Promise<BuilderToolSchema>;
55
63
  /** Dropdown values for one field of a catalog entry; `dependsOn` carries parent field values. */
56
64
  getOptions(slug: string, params?: {
@@ -50,7 +50,14 @@ export class WorkflowsResource {
50
50
  async searchCatalog(params = {}) {
51
51
  return call(workflowsSearchCatalog, { client: this.client._transport, query: params });
52
52
  }
53
- /** The input/output schema of one catalog entry (`slug` from `searchCatalog`). */
53
+ /**
54
+ * The input/output schema of one catalog entry (`slug` from `searchCatalog`).
55
+ *
56
+ * `selected` maps an object-picker field (named in the result's `objectPickers`) to the
57
+ * picked value; the schema then lists that object's fields. It needs `connectionId` (the
58
+ * server answers 400 without one). A pick that cannot be resolved still answers 200 and is
59
+ * listed in `unresolvedPicks`.
60
+ */
54
61
  async getSchema(slug, params = {}) {
55
62
  return call(workflowsGetSchema, {
56
63
  client: this.client._transport,
package/dist/version.d.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  * Regenerated on every build/typecheck/test (see the "pre*" scripts in
4
4
  * package.json). Un-stamped local builds yield "0.0.0".
5
5
  */
6
- export declare const VERSION = "0.32.0";
6
+ export declare const VERSION = "0.34.0";
package/dist/version.js CHANGED
@@ -3,4 +3,4 @@
3
3
  * Regenerated on every build/typecheck/test (see the "pre*" scripts in
4
4
  * package.json). Un-stamped local builds yield "0.0.0".
5
5
  */
6
- export const VERSION = "0.32.0";
6
+ export const VERSION = "0.34.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engini/sdk",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "Engini SDK — agent-first ergonomic layer over the Engini Public API",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "test": "vitest run"
28
28
  },
29
29
  "dependencies": {
30
- "@engini/client": "0.19.0",
30
+ "@engini/client": "0.21.0",
31
31
  "undici": "^6.0.0"
32
32
  },
33
33
  "devDependencies": {