@runtypelabs/sdk 11.17.0 → 11.18.2
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.cjs +25 -22
- package/dist/index.d.cts +1114 -215
- package/dist/index.d.ts +1114 -215
- package/dist/index.mjs +25 -22
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -596,14 +596,6 @@ async function processStream(response, callbacks = {}, _options = {}) {
|
|
|
596
596
|
callbacks.onError?.(error);
|
|
597
597
|
throw error;
|
|
598
598
|
}
|
|
599
|
-
const reader = response.body?.getReader();
|
|
600
|
-
if (!reader) {
|
|
601
|
-
const error = /* @__PURE__ */ new Error("Response body is not readable");
|
|
602
|
-
callbacks.onError?.(error);
|
|
603
|
-
throw error;
|
|
604
|
-
}
|
|
605
|
-
const decoder = new TextDecoder();
|
|
606
|
-
let buffer = "";
|
|
607
599
|
const results = /* @__PURE__ */ new Map();
|
|
608
600
|
let flowSummary = {
|
|
609
601
|
flowId: "",
|
|
@@ -621,18 +613,17 @@ async function processStream(response, callbacks = {}, _options = {}) {
|
|
|
621
613
|
if (response.headers.get("content-type")?.includes("application/json")) try {
|
|
622
614
|
const data = await response.json();
|
|
623
615
|
if (data.events && Array.isArray(data.events)) {
|
|
624
|
-
for (const event of data.events)
|
|
625
|
-
if (data.flowId) flowSummary.flowId = data.flowId;
|
|
626
|
-
if (data.recordId) flowSummary.flowName = data.recordId;
|
|
616
|
+
for (const event of data.events) dispatch(event);
|
|
627
617
|
if (data.executionSummary) {
|
|
628
618
|
const s = data.executionSummary;
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
619
|
+
flowSummary.flowId || (flowSummary.flowId = s.flowId);
|
|
620
|
+
flowSummary.flowName || (flowSummary.flowName = s.flowName);
|
|
621
|
+
flowSummary.totalSteps || (flowSummary.totalSteps = s.totalSteps);
|
|
622
|
+
flowSummary.successfulSteps || (flowSummary.successfulSteps = s.successfulSteps);
|
|
623
|
+
flowSummary.failedSteps || (flowSummary.failedSteps = s.failedSteps);
|
|
624
|
+
flowSummary.executionTime || (flowSummary.executionTime = s.executionTime);
|
|
635
625
|
}
|
|
626
|
+
flowSummary.flowId || (flowSummary.flowId = data.flowId);
|
|
636
627
|
return {
|
|
637
628
|
flowId: flowSummary.flowId || "",
|
|
638
629
|
flowName: flowSummary.flowName || "",
|
|
@@ -657,6 +648,14 @@ async function processStream(response, callbacks = {}, _options = {}) {
|
|
|
657
648
|
throw e;
|
|
658
649
|
}
|
|
659
650
|
}
|
|
651
|
+
const reader = response.bodyUsed ? void 0 : response.body?.getReader();
|
|
652
|
+
if (!reader) {
|
|
653
|
+
const error = /* @__PURE__ */ new Error("Response body is not readable");
|
|
654
|
+
callbacks.onError?.(error);
|
|
655
|
+
throw error;
|
|
656
|
+
}
|
|
657
|
+
const decoder = new TextDecoder();
|
|
658
|
+
let buffer = "";
|
|
660
659
|
try {
|
|
661
660
|
while (true) {
|
|
662
661
|
const { done, value } = await reader.read();
|
|
@@ -4840,7 +4839,8 @@ var RecordsEndpoint = class {
|
|
|
4840
4839
|
return this.client.post("/records/bulk-delete", { ids });
|
|
4841
4840
|
}
|
|
4842
4841
|
/**
|
|
4843
|
-
* Bulk edit multiple records
|
|
4842
|
+
* Bulk edit multiple records. At most 5,000 targets per call, dry runs included; a larger set
|
|
4843
|
+
* returns 400 `bulk_edit_too_many_records`, so narrow the filter and edit in batches.
|
|
4844
4844
|
*/
|
|
4845
4845
|
async bulkEdit(data) {
|
|
4846
4846
|
return this.client.post("/records/bulk-edit", data);
|
|
@@ -8670,10 +8670,12 @@ var SchedulesEndpoint = class {
|
|
|
8670
8670
|
return this.client.post(`/schedules/${id}/resume`);
|
|
8671
8671
|
}
|
|
8672
8672
|
/**
|
|
8673
|
-
* List the run history for a specific schedule.
|
|
8673
|
+
* List the run history for a specific schedule, newest first. Without `params` it returns every run.
|
|
8674
|
+
* Pass `limit` (at most 500) to page, then pass `nextCursor` as `cursor` while `hasMore` is true.
|
|
8674
8675
|
*/
|
|
8675
|
-
async listRuns(id) {
|
|
8676
|
-
|
|
8676
|
+
async listRuns(id, params) {
|
|
8677
|
+
const path = `/schedules/${id}/runs`;
|
|
8678
|
+
return params ? this.client.get(path, params) : this.client.get(path);
|
|
8677
8679
|
}
|
|
8678
8680
|
/**
|
|
8679
8681
|
* Get statistics (success rate, average duration/cost, 7-day history) for a schedule.
|
|
@@ -13282,6 +13284,7 @@ const SURFACE_DEFINITION_TYPES = /* @__PURE__ */ new Set([
|
|
|
13282
13284
|
"chat",
|
|
13283
13285
|
"mcp",
|
|
13284
13286
|
"mcp_code",
|
|
13287
|
+
"cli",
|
|
13285
13288
|
"api",
|
|
13286
13289
|
"webhook",
|
|
13287
13290
|
"schedule",
|
|
@@ -14745,7 +14748,7 @@ function transformQueryParams(params) {
|
|
|
14745
14748
|
return result;
|
|
14746
14749
|
}
|
|
14747
14750
|
// src/version.ts
|
|
14748
|
-
const SDK_VERSION = "11.
|
|
14751
|
+
const SDK_VERSION = "11.18.2";
|
|
14749
14752
|
/**
|
|
14750
14753
|
* Canonical client identity the API uses for attribution
|
|
14751
14754
|
* (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/sdk",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.18.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TypeScript SDK for the Runtype API with fluent methods. Use it to quickly realize AI products, agents, and workflows.",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@runtypelabs/shared": "3.
|
|
27
|
+
"@runtypelabs/shared": "3.113.0",
|
|
28
28
|
"openapi-typescript": "^7.13.0",
|
|
29
29
|
"tsdown": "^0.23.2",
|
|
30
30
|
"typescript": "^6.0.3",
|