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