@retab/node 1.0.96 → 1.0.98
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/api/client.d.ts +0 -2
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +0 -2
- package/dist/api/documents/client.js +9 -9
- package/dist/api/edit/agent/client.js +1 -1
- package/dist/api/edit/templates/client.js +8 -8
- package/dist/api/extractions/client.js +6 -6
- package/dist/api/files/client.js +4 -4
- package/dist/api/jobs/client.d.ts +10 -10
- package/dist/api/jobs/client.d.ts.map +1 -1
- package/dist/api/jobs/client.js +15 -15
- package/dist/api/projects/client.js +6 -6
- package/dist/api/schemas/client.js +1 -1
- package/dist/api/workflows/client.d.ts +18 -2
- package/dist/api/workflows/client.d.ts.map +1 -1
- package/dist/api/workflows/client.js +33 -1
- package/dist/api/workflows/runs/client.js +7 -7
- package/dist/api/workflows/runs/steps/client.js +2 -2
- package/dist/client.js +1 -1
- package/dist/generated_types.d.ts +44 -44
- package/dist/generated_types.js +2 -2
- package/dist/types.d.ts +41 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +14 -0
- package/package.json +1 -1
package/dist/api/client.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AbstractClient, CompositionClient } from "../client.js";
|
|
2
|
-
import APIModels from "./models/client";
|
|
3
2
|
import APIDocuments from "./documents/client";
|
|
4
3
|
import APISchemas from "./schemas/client";
|
|
5
4
|
import APIProjects from "./projects/client";
|
|
@@ -11,7 +10,6 @@ import APIJobs from "./jobs/client";
|
|
|
11
10
|
export default class APIV1 extends CompositionClient {
|
|
12
11
|
constructor(client: AbstractClient);
|
|
13
12
|
files: APIFiles;
|
|
14
|
-
models: APIModels;
|
|
15
13
|
documents: APIDocuments;
|
|
16
14
|
schemas: APISchemas;
|
|
17
15
|
projects: APIProjects;
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAClD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,iBAAiB;gBACpC,MAAM,EAAE,cAAc;IAGlC,KAAK,WAAsB;IAC3B,SAAS,eAA0B;IACnC,OAAO,aAAwB;IAC/B,QAAQ,cAAyB;IACjC,WAAW,iBAA4B;IACvC,SAAS,eAA0B;IACnC,IAAI,UAAqB;IACzB,IAAI,UAAqB;CAC5B"}
|
package/dist/api/client.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CompositionClient } from "../client.js";
|
|
2
|
-
import APIModels from "./models/client";
|
|
3
2
|
import APIDocuments from "./documents/client";
|
|
4
3
|
import APISchemas from "./schemas/client";
|
|
5
4
|
import APIProjects from "./projects/client";
|
|
@@ -12,7 +11,6 @@ export default class APIV1 extends CompositionClient {
|
|
|
12
11
|
constructor(client) {
|
|
13
12
|
super(client);
|
|
14
13
|
this.files = new APIFiles(this);
|
|
15
|
-
this.models = new APIModels(this);
|
|
16
14
|
this.documents = new APIDocuments(this);
|
|
17
15
|
this.schemas = new APISchemas(this);
|
|
18
16
|
this.projects = new APIProjects(this);
|
|
@@ -8,7 +8,7 @@ export default class APIDocuments extends CompositionClient {
|
|
|
8
8
|
async extract(params, options) {
|
|
9
9
|
let request = await ZDocumentExtractRequest.parseAsync(params);
|
|
10
10
|
return this._fetchJson(ZRetabParsedChatCompletion, {
|
|
11
|
-
url: "/
|
|
11
|
+
url: "/documents/extract",
|
|
12
12
|
method: "POST",
|
|
13
13
|
body: { ...request, ...(options?.body || {}) },
|
|
14
14
|
params: options?.params,
|
|
@@ -18,7 +18,7 @@ export default class APIDocuments extends CompositionClient {
|
|
|
18
18
|
async extract_stream(params, options) {
|
|
19
19
|
let request = await ZDocumentExtractRequest.parseAsync(params);
|
|
20
20
|
return this._fetchStream(ZRetabParsedChatCompletionChunk, {
|
|
21
|
-
url: "/
|
|
21
|
+
url: "/documents/extract",
|
|
22
22
|
method: "POST",
|
|
23
23
|
body: { ...request, stream: true, ...(options?.body || {}) },
|
|
24
24
|
params: options?.params,
|
|
@@ -27,7 +27,7 @@ export default class APIDocuments extends CompositionClient {
|
|
|
27
27
|
}
|
|
28
28
|
async parse(params, options) {
|
|
29
29
|
return this._fetchJson(ZParseResult, {
|
|
30
|
-
url: "/
|
|
30
|
+
url: "/documents/parse",
|
|
31
31
|
method: "POST",
|
|
32
32
|
body: { ...(await ZParseRequest.parseAsync(params)), ...(options?.body || {}) },
|
|
33
33
|
params: options?.params,
|
|
@@ -36,7 +36,7 @@ export default class APIDocuments extends CompositionClient {
|
|
|
36
36
|
}
|
|
37
37
|
async create_messages(params, options) {
|
|
38
38
|
return this._fetchJson(ZDocumentMessage, {
|
|
39
|
-
url: "/
|
|
39
|
+
url: "/documents/create_messages",
|
|
40
40
|
method: "POST",
|
|
41
41
|
body: { ...(await ZDocumentCreateMessageRequest.parseAsync(params)), ...(options?.body || {}) },
|
|
42
42
|
params: options?.params,
|
|
@@ -45,7 +45,7 @@ export default class APIDocuments extends CompositionClient {
|
|
|
45
45
|
}
|
|
46
46
|
async create_inputs(params, options) {
|
|
47
47
|
return this._fetchJson(ZDocumentMessage, {
|
|
48
|
-
url: "/
|
|
48
|
+
url: "/documents/create_inputs",
|
|
49
49
|
method: "POST",
|
|
50
50
|
body: { ...(await ZDocumentCreateInputRequest.parseAsync(params)), ...(options?.body || {}) },
|
|
51
51
|
params: options?.params,
|
|
@@ -73,7 +73,7 @@ export default class APIDocuments extends CompositionClient {
|
|
|
73
73
|
*/
|
|
74
74
|
async edit(params, options) {
|
|
75
75
|
return this._fetchJson(ZEditResponse, {
|
|
76
|
-
url: "/
|
|
76
|
+
url: "/documents/edit",
|
|
77
77
|
method: "POST",
|
|
78
78
|
body: { ...(await ZEditRequest.parseAsync(params)), ...(options?.body || {}) },
|
|
79
79
|
params: options?.params,
|
|
@@ -111,7 +111,7 @@ export default class APIDocuments extends CompositionClient {
|
|
|
111
111
|
*/
|
|
112
112
|
async split(params, options) {
|
|
113
113
|
return this._fetchJson(ZSplitResponse, {
|
|
114
|
-
url: "/
|
|
114
|
+
url: "/documents/split",
|
|
115
115
|
method: "POST",
|
|
116
116
|
body: { ...(await ZSplitRequest.parseAsync(params)), ...(options?.body || {}) },
|
|
117
117
|
params: options?.params,
|
|
@@ -151,7 +151,7 @@ export default class APIDocuments extends CompositionClient {
|
|
|
151
151
|
*/
|
|
152
152
|
async classify(params, options) {
|
|
153
153
|
return this._fetchJson(ZClassifyResponse, {
|
|
154
|
-
url: "/
|
|
154
|
+
url: "/documents/classify",
|
|
155
155
|
method: "POST",
|
|
156
156
|
body: { ...(await ZClassifyRequest.parseAsync(params)), ...(options?.body || {}) },
|
|
157
157
|
params: options?.params,
|
|
@@ -160,7 +160,7 @@ export default class APIDocuments extends CompositionClient {
|
|
|
160
160
|
}
|
|
161
161
|
async generate_split_config(params, options) {
|
|
162
162
|
return this._fetchJson(ZGenerateSplitConfigResponse, {
|
|
163
|
-
url: "/
|
|
163
|
+
url: "/documents/split/generate_config",
|
|
164
164
|
method: "POST",
|
|
165
165
|
body: { ...(await ZGenerateSplitConfigRequest.parseAsync(params)), ...(options?.body || {}) },
|
|
166
166
|
params: options?.params,
|
|
@@ -28,7 +28,7 @@ export default class APIEditAgent extends CompositionClient {
|
|
|
28
28
|
*/
|
|
29
29
|
async fill(params, options) {
|
|
30
30
|
return this._fetchJson(ZEditResponse, {
|
|
31
|
-
url: "/
|
|
31
|
+
url: "/edit/agent/fill",
|
|
32
32
|
method: "POST",
|
|
33
33
|
body: { ...(await ZEditRequest.parseAsync(params)), ...(options?.body || {}) },
|
|
34
34
|
params: options?.params,
|
|
@@ -26,7 +26,7 @@ export default class APIEditTemplates extends CompositionClient {
|
|
|
26
26
|
// Remove undefined values
|
|
27
27
|
const cleanParams = Object.fromEntries(Object.entries(params).filter(([_, v]) => v !== undefined));
|
|
28
28
|
return this._fetchJson(ZPaginatedList, {
|
|
29
|
-
url: "/
|
|
29
|
+
url: "/edit/templates",
|
|
30
30
|
method: "GET",
|
|
31
31
|
params: { ...cleanParams, ...(options?.params || {}) },
|
|
32
32
|
headers: options?.headers,
|
|
@@ -41,7 +41,7 @@ export default class APIEditTemplates extends CompositionClient {
|
|
|
41
41
|
*/
|
|
42
42
|
async get(template_id, options) {
|
|
43
43
|
return this._fetchJson(ZEditTemplate, {
|
|
44
|
-
url: `/
|
|
44
|
+
url: `/edit/templates/${template_id}`,
|
|
45
45
|
method: "GET",
|
|
46
46
|
params: options?.params,
|
|
47
47
|
headers: options?.headers,
|
|
@@ -60,7 +60,7 @@ export default class APIEditTemplates extends CompositionClient {
|
|
|
60
60
|
async create({ name, document, form_fields, }, options) {
|
|
61
61
|
const parsedDocument = await ZMIMEData.parseAsync(document);
|
|
62
62
|
return this._fetchJson(ZEditTemplate, {
|
|
63
|
-
url: "/
|
|
63
|
+
url: "/edit/templates",
|
|
64
64
|
method: "POST",
|
|
65
65
|
body: {
|
|
66
66
|
name,
|
|
@@ -89,7 +89,7 @@ export default class APIEditTemplates extends CompositionClient {
|
|
|
89
89
|
if (form_fields !== undefined)
|
|
90
90
|
body.form_fields = form_fields;
|
|
91
91
|
return this._fetchJson(ZEditTemplate, {
|
|
92
|
-
url: `/
|
|
92
|
+
url: `/edit/templates/${template_id}`,
|
|
93
93
|
method: "PATCH",
|
|
94
94
|
body: { ...body, ...(options?.body || {}) },
|
|
95
95
|
params: options?.params,
|
|
@@ -104,7 +104,7 @@ export default class APIEditTemplates extends CompositionClient {
|
|
|
104
104
|
*/
|
|
105
105
|
async delete(template_id, options) {
|
|
106
106
|
return this._fetchJson({
|
|
107
|
-
url: `/
|
|
107
|
+
url: `/edit/templates/${template_id}`,
|
|
108
108
|
method: "DELETE",
|
|
109
109
|
params: options?.params,
|
|
110
110
|
headers: options?.headers,
|
|
@@ -124,7 +124,7 @@ export default class APIEditTemplates extends CompositionClient {
|
|
|
124
124
|
if (name !== undefined)
|
|
125
125
|
body.name = name;
|
|
126
126
|
return this._fetchJson(ZEditTemplate, {
|
|
127
|
-
url: `/
|
|
127
|
+
url: `/edit/templates/${template_id}/duplicate`,
|
|
128
128
|
method: "POST",
|
|
129
129
|
body: { ...body, ...(options?.body || {}) },
|
|
130
130
|
params: options?.params,
|
|
@@ -152,7 +152,7 @@ export default class APIEditTemplates extends CompositionClient {
|
|
|
152
152
|
*/
|
|
153
153
|
async generate(params, options) {
|
|
154
154
|
return this._fetchJson(ZInferFormSchemaResponse, {
|
|
155
|
-
url: "/
|
|
155
|
+
url: "/edit/templates/generate",
|
|
156
156
|
method: "POST",
|
|
157
157
|
body: { ...(await ZInferFormSchemaRequest.parseAsync(params)), ...(options?.body || {}) },
|
|
158
158
|
params: options?.params,
|
|
@@ -190,7 +190,7 @@ export default class APIEditTemplates extends CompositionClient {
|
|
|
190
190
|
body.config = { color };
|
|
191
191
|
}
|
|
192
192
|
return this._fetchJson(ZEditResponse, {
|
|
193
|
-
url: "/
|
|
193
|
+
url: "/edit/templates/fill",
|
|
194
194
|
method: "POST",
|
|
195
195
|
body: {
|
|
196
196
|
...body,
|
|
@@ -31,7 +31,7 @@ export default class APIExtractions extends CompositionClient {
|
|
|
31
31
|
};
|
|
32
32
|
const cleanParams = Object.fromEntries(Object.entries(params).filter(([_, v]) => v !== undefined));
|
|
33
33
|
return this._fetchJson(ZPaginatedList, {
|
|
34
|
-
url: "/
|
|
34
|
+
url: "/extractions",
|
|
35
35
|
method: "GET",
|
|
36
36
|
params: { ...cleanParams, ...(options?.params || {}) },
|
|
37
37
|
headers: options?.headers,
|
|
@@ -53,7 +53,7 @@ export default class APIExtractions extends CompositionClient {
|
|
|
53
53
|
};
|
|
54
54
|
const cleanParams = Object.fromEntries(Object.entries(params).filter(([_, v]) => v !== undefined));
|
|
55
55
|
return this._fetchJson(ZDownloadResponse, {
|
|
56
|
-
url: "/
|
|
56
|
+
url: "/extractions/download",
|
|
57
57
|
method: "GET",
|
|
58
58
|
params: { ...cleanParams, ...(options?.params || {}) },
|
|
59
59
|
headers: options?.headers,
|
|
@@ -75,7 +75,7 @@ export default class APIExtractions extends CompositionClient {
|
|
|
75
75
|
if (metadata !== undefined)
|
|
76
76
|
body.metadata = metadata;
|
|
77
77
|
return this._fetchJson(ZExtraction, {
|
|
78
|
-
url: `/
|
|
78
|
+
url: `/extractions/${extraction_id}`,
|
|
79
79
|
method: "PATCH",
|
|
80
80
|
body: { ...body, ...(options?.body || {}) },
|
|
81
81
|
params: options?.params,
|
|
@@ -87,7 +87,7 @@ export default class APIExtractions extends CompositionClient {
|
|
|
87
87
|
*/
|
|
88
88
|
async get(extraction_id, options) {
|
|
89
89
|
return this._fetchJson(ZExtraction, {
|
|
90
|
-
url: `/
|
|
90
|
+
url: `/extractions/${extraction_id}`,
|
|
91
91
|
method: "GET",
|
|
92
92
|
params: options?.params,
|
|
93
93
|
headers: options?.headers,
|
|
@@ -103,7 +103,7 @@ export default class APIExtractions extends CompositionClient {
|
|
|
103
103
|
*/
|
|
104
104
|
async sources(extraction_id, options) {
|
|
105
105
|
return this._fetchJson(z.record(z.any()), {
|
|
106
|
-
url: `/
|
|
106
|
+
url: `/extractions/${extraction_id}/sources`,
|
|
107
107
|
method: "GET",
|
|
108
108
|
params: options?.params,
|
|
109
109
|
headers: options?.headers,
|
|
@@ -114,7 +114,7 @@ export default class APIExtractions extends CompositionClient {
|
|
|
114
114
|
*/
|
|
115
115
|
async delete(extraction_id, options) {
|
|
116
116
|
return this._fetchJson({
|
|
117
|
-
url: `/
|
|
117
|
+
url: `/extractions/${extraction_id}`,
|
|
118
118
|
method: "DELETE",
|
|
119
119
|
params: options?.params,
|
|
120
120
|
headers: options?.headers,
|
package/dist/api/files/client.js
CHANGED
|
@@ -26,7 +26,7 @@ export default class APIFiles extends CompositionClient {
|
|
|
26
26
|
async upload(mimeData, options) {
|
|
27
27
|
const parsed = await ZMIMEData.parseAsync(mimeData);
|
|
28
28
|
return this._fetchJson(ZUploadFileResponse, {
|
|
29
|
-
url: "/
|
|
29
|
+
url: "/files/upload",
|
|
30
30
|
method: "POST",
|
|
31
31
|
body: { mimeData: parsed, ...(options?.body || {}) },
|
|
32
32
|
params: options?.params,
|
|
@@ -45,7 +45,7 @@ export default class APIFiles extends CompositionClient {
|
|
|
45
45
|
};
|
|
46
46
|
const cleanParams = Object.fromEntries(Object.entries(params).filter(([_, v]) => v !== undefined));
|
|
47
47
|
return this._fetchJson(ZPaginatedList, {
|
|
48
|
-
url: "/
|
|
48
|
+
url: "/files",
|
|
49
49
|
method: "GET",
|
|
50
50
|
params: { ...cleanParams, ...(options?.params || {}) },
|
|
51
51
|
headers: options?.headers,
|
|
@@ -53,7 +53,7 @@ export default class APIFiles extends CompositionClient {
|
|
|
53
53
|
}
|
|
54
54
|
async get(fileId, options) {
|
|
55
55
|
return this._fetchJson(ZFile, {
|
|
56
|
-
url: `/
|
|
56
|
+
url: `/files/${fileId}`,
|
|
57
57
|
method: "GET",
|
|
58
58
|
params: options?.params,
|
|
59
59
|
headers: options?.headers,
|
|
@@ -61,7 +61,7 @@ export default class APIFiles extends CompositionClient {
|
|
|
61
61
|
}
|
|
62
62
|
async getDownloadLink(fileId, options) {
|
|
63
63
|
return this._fetchJson(ZFileLink, {
|
|
64
|
-
url: `/
|
|
64
|
+
url: `/files/${fileId}/download-link`,
|
|
65
65
|
method: "GET",
|
|
66
66
|
params: options?.params,
|
|
67
67
|
headers: options?.headers,
|
|
@@ -3,7 +3,7 @@ import * as z from "zod";
|
|
|
3
3
|
type JobStatus = "validating" | "queued" | "in_progress" | "completed" | "failed" | "cancelled" | "expired";
|
|
4
4
|
type JobListSource = "api" | "project" | "workflow";
|
|
5
5
|
type JobListOrder = "asc" | "desc";
|
|
6
|
-
type SupportedEndpoint = "/
|
|
6
|
+
type SupportedEndpoint = "/documents/extract" | "/documents/parse" | "/documents/split" | "/documents/classify" | "/schemas/generate" | "/edit/agent/fill" | "/edit/templates/fill" | "/edit/templates/generate" | "/projects/extract";
|
|
7
7
|
declare const ZJobResponse: z.ZodObject<{
|
|
8
8
|
status_code: z.ZodNumber;
|
|
9
9
|
body: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
@@ -33,7 +33,7 @@ declare const ZJob: z.ZodObject<{
|
|
|
33
33
|
id: z.ZodString;
|
|
34
34
|
object: z.ZodLiteral<"job">;
|
|
35
35
|
status: z.ZodEnum<["validating", "queued", "in_progress", "completed", "failed", "cancelled", "expired"]>;
|
|
36
|
-
endpoint: z.ZodEnum<["/
|
|
36
|
+
endpoint: z.ZodEnum<["/documents/extract", "/documents/parse", "/documents/split", "/documents/classify", "/schemas/generate", "/edit/agent/fill", "/edit/templates/fill", "/edit/templates/generate", "/projects/extract"]>;
|
|
37
37
|
request: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
38
38
|
response: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
39
39
|
status_code: z.ZodNumber;
|
|
@@ -70,7 +70,7 @@ declare const ZJob: z.ZodObject<{
|
|
|
70
70
|
id: string;
|
|
71
71
|
organization_id: string;
|
|
72
72
|
created_at: number;
|
|
73
|
-
endpoint: "/
|
|
73
|
+
endpoint: "/documents/extract" | "/documents/parse" | "/documents/split" | "/documents/classify" | "/schemas/generate" | "/edit/templates/generate" | "/edit/templates/fill" | "/edit/agent/fill" | "/projects/extract";
|
|
74
74
|
expires_at: number;
|
|
75
75
|
metadata?: Record<string, string> | null | undefined;
|
|
76
76
|
request?: Record<string, any> | null | undefined;
|
|
@@ -91,7 +91,7 @@ declare const ZJob: z.ZodObject<{
|
|
|
91
91
|
id: string;
|
|
92
92
|
organization_id: string;
|
|
93
93
|
created_at: number;
|
|
94
|
-
endpoint: "/
|
|
94
|
+
endpoint: "/documents/extract" | "/documents/parse" | "/documents/split" | "/documents/classify" | "/schemas/generate" | "/edit/templates/generate" | "/edit/templates/fill" | "/edit/agent/fill" | "/projects/extract";
|
|
95
95
|
expires_at: number;
|
|
96
96
|
metadata?: Record<string, string> | null | undefined;
|
|
97
97
|
request?: Record<string, any> | null | undefined;
|
|
@@ -114,7 +114,7 @@ declare const ZJobListResponse: z.ZodObject<{
|
|
|
114
114
|
id: z.ZodString;
|
|
115
115
|
object: z.ZodLiteral<"job">;
|
|
116
116
|
status: z.ZodEnum<["validating", "queued", "in_progress", "completed", "failed", "cancelled", "expired"]>;
|
|
117
|
-
endpoint: z.ZodEnum<["/
|
|
117
|
+
endpoint: z.ZodEnum<["/documents/extract", "/documents/parse", "/documents/split", "/documents/classify", "/schemas/generate", "/edit/agent/fill", "/edit/templates/fill", "/edit/templates/generate", "/projects/extract"]>;
|
|
118
118
|
request: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
119
119
|
response: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
120
120
|
status_code: z.ZodNumber;
|
|
@@ -151,7 +151,7 @@ declare const ZJobListResponse: z.ZodObject<{
|
|
|
151
151
|
id: string;
|
|
152
152
|
organization_id: string;
|
|
153
153
|
created_at: number;
|
|
154
|
-
endpoint: "/
|
|
154
|
+
endpoint: "/documents/extract" | "/documents/parse" | "/documents/split" | "/documents/classify" | "/schemas/generate" | "/edit/templates/generate" | "/edit/templates/fill" | "/edit/agent/fill" | "/projects/extract";
|
|
155
155
|
expires_at: number;
|
|
156
156
|
metadata?: Record<string, string> | null | undefined;
|
|
157
157
|
request?: Record<string, any> | null | undefined;
|
|
@@ -172,7 +172,7 @@ declare const ZJobListResponse: z.ZodObject<{
|
|
|
172
172
|
id: string;
|
|
173
173
|
organization_id: string;
|
|
174
174
|
created_at: number;
|
|
175
|
-
endpoint: "/
|
|
175
|
+
endpoint: "/documents/extract" | "/documents/parse" | "/documents/split" | "/documents/classify" | "/schemas/generate" | "/edit/templates/generate" | "/edit/templates/fill" | "/edit/agent/fill" | "/projects/extract";
|
|
176
176
|
expires_at: number;
|
|
177
177
|
metadata?: Record<string, string> | null | undefined;
|
|
178
178
|
request?: Record<string, any> | null | undefined;
|
|
@@ -199,7 +199,7 @@ declare const ZJobListResponse: z.ZodObject<{
|
|
|
199
199
|
id: string;
|
|
200
200
|
organization_id: string;
|
|
201
201
|
created_at: number;
|
|
202
|
-
endpoint: "/
|
|
202
|
+
endpoint: "/documents/extract" | "/documents/parse" | "/documents/split" | "/documents/classify" | "/schemas/generate" | "/edit/templates/generate" | "/edit/templates/fill" | "/edit/agent/fill" | "/projects/extract";
|
|
203
203
|
expires_at: number;
|
|
204
204
|
metadata?: Record<string, string> | null | undefined;
|
|
205
205
|
request?: Record<string, any> | null | undefined;
|
|
@@ -226,7 +226,7 @@ declare const ZJobListResponse: z.ZodObject<{
|
|
|
226
226
|
id: string;
|
|
227
227
|
organization_id: string;
|
|
228
228
|
created_at: number;
|
|
229
|
-
endpoint: "/
|
|
229
|
+
endpoint: "/documents/extract" | "/documents/parse" | "/documents/split" | "/documents/classify" | "/schemas/generate" | "/edit/templates/generate" | "/edit/templates/fill" | "/edit/agent/fill" | "/projects/extract";
|
|
230
230
|
expires_at: number;
|
|
231
231
|
metadata?: Record<string, string> | null | undefined;
|
|
232
232
|
request?: Record<string, any> | null | undefined;
|
|
@@ -262,7 +262,7 @@ export default class APIJobs extends CompositionClient {
|
|
|
262
262
|
/**
|
|
263
263
|
* Create a new asynchronous job.
|
|
264
264
|
*
|
|
265
|
-
* @param endpoint - The API endpoint to call ("/
|
|
265
|
+
* @param endpoint - The API endpoint to call ("/documents/extract" or "/documents/parse")
|
|
266
266
|
* @param request - The full request body for the target endpoint
|
|
267
267
|
* @param metadata - Optional metadata (max 16 pairs; keys ≤64 chars, values ≤512 chars)
|
|
268
268
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/jobs/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,KAAK,SAAS,GAAG,YAAY,GAAG,QAAQ,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AAC5G,KAAK,aAAa,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;AACpD,KAAK,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;AAGnC,KAAK,iBAAiB,GAChB,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/jobs/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,KAAK,SAAS,GAAG,YAAY,GAAG,QAAQ,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AAC5G,KAAK,aAAa,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;AACpD,KAAK,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;AAGnC,KAAK,iBAAiB,GAChB,oBAAoB,GACpB,kBAAkB,G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E,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,MAAM,CAAC,EAAE,SAAS,CAAC;QACnB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;QAC7B,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QACzB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;KACzB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;CAoC9D;AAED,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,CAAC"}
|
package/dist/api/jobs/client.js
CHANGED
|
@@ -17,15 +17,15 @@ const ZJob = z.object({
|
|
|
17
17
|
object: z.literal("job"),
|
|
18
18
|
status: z.enum(["validating", "queued", "in_progress", "completed", "failed", "cancelled", "expired"]),
|
|
19
19
|
endpoint: z.enum([
|
|
20
|
-
"/
|
|
21
|
-
"/
|
|
22
|
-
"/
|
|
23
|
-
"/
|
|
24
|
-
"/
|
|
25
|
-
"/
|
|
26
|
-
"/
|
|
27
|
-
"/
|
|
28
|
-
"/
|
|
20
|
+
"/documents/extract",
|
|
21
|
+
"/documents/parse",
|
|
22
|
+
"/documents/split",
|
|
23
|
+
"/documents/classify",
|
|
24
|
+
"/schemas/generate",
|
|
25
|
+
"/edit/agent/fill",
|
|
26
|
+
"/edit/templates/fill",
|
|
27
|
+
"/edit/templates/generate",
|
|
28
|
+
"/projects/extract",
|
|
29
29
|
]),
|
|
30
30
|
request: z.record(z.any()).nullable().optional(),
|
|
31
31
|
response: ZJobResponse.nullable().optional(),
|
|
@@ -52,7 +52,7 @@ export default class APIJobs extends CompositionClient {
|
|
|
52
52
|
/**
|
|
53
53
|
* Create a new asynchronous job.
|
|
54
54
|
*
|
|
55
|
-
* @param endpoint - The API endpoint to call ("/
|
|
55
|
+
* @param endpoint - The API endpoint to call ("/documents/extract" or "/documents/parse")
|
|
56
56
|
* @param request - The full request body for the target endpoint
|
|
57
57
|
* @param metadata - Optional metadata (max 16 pairs; keys ≤64 chars, values ≤512 chars)
|
|
58
58
|
*/
|
|
@@ -64,7 +64,7 @@ export default class APIJobs extends CompositionClient {
|
|
|
64
64
|
if (metadata !== undefined)
|
|
65
65
|
body.metadata = metadata;
|
|
66
66
|
return this._fetchJson(ZJob, {
|
|
67
|
-
url: "/
|
|
67
|
+
url: "/jobs",
|
|
68
68
|
method: "POST",
|
|
69
69
|
body: { ...body, ...(options?.body || {}) },
|
|
70
70
|
params: options?.params,
|
|
@@ -83,7 +83,7 @@ export default class APIJobs extends CompositionClient {
|
|
|
83
83
|
include_response,
|
|
84
84
|
};
|
|
85
85
|
return this._fetchJson(ZJob, {
|
|
86
|
-
url: `/
|
|
86
|
+
url: `/jobs/${job_id}`,
|
|
87
87
|
method: "GET",
|
|
88
88
|
params,
|
|
89
89
|
headers: options?.headers,
|
|
@@ -143,7 +143,7 @@ export default class APIJobs extends CompositionClient {
|
|
|
143
143
|
*/
|
|
144
144
|
async cancel(job_id, options) {
|
|
145
145
|
return this._fetchJson(ZJob, {
|
|
146
|
-
url: `/
|
|
146
|
+
url: `/jobs/${job_id}/cancel`,
|
|
147
147
|
method: "POST",
|
|
148
148
|
params: options?.params,
|
|
149
149
|
headers: options?.headers,
|
|
@@ -154,7 +154,7 @@ export default class APIJobs extends CompositionClient {
|
|
|
154
154
|
*/
|
|
155
155
|
async retry(job_id, options) {
|
|
156
156
|
return this._fetchJson(ZJob, {
|
|
157
|
-
url: `/
|
|
157
|
+
url: `/jobs/${job_id}/retry`,
|
|
158
158
|
method: "POST",
|
|
159
159
|
params: options?.params,
|
|
160
160
|
headers: options?.headers,
|
|
@@ -189,7 +189,7 @@ export default class APIJobs extends CompositionClient {
|
|
|
189
189
|
// Remove undefined values
|
|
190
190
|
const cleanParams = Object.fromEntries(Object.entries(params).filter(([_, v]) => v !== undefined));
|
|
191
191
|
return this._fetchJson(ZJobListResponse, {
|
|
192
|
-
url: "/
|
|
192
|
+
url: "/jobs",
|
|
193
193
|
method: "GET",
|
|
194
194
|
params: { ...cleanParams, ...(options?.params || {}) },
|
|
195
195
|
headers: options?.headers,
|
|
@@ -7,7 +7,7 @@ export default class APIProjects extends CompositionClient {
|
|
|
7
7
|
}
|
|
8
8
|
async create(body, options) {
|
|
9
9
|
return this._fetchJson(ZProject, {
|
|
10
|
-
url: "/
|
|
10
|
+
url: "/projects",
|
|
11
11
|
method: "POST",
|
|
12
12
|
body: { ...(await ZCreateProjectRequest.parseAsync(body)), ...(options?.body || {}) },
|
|
13
13
|
params: options?.params,
|
|
@@ -16,7 +16,7 @@ export default class APIProjects extends CompositionClient {
|
|
|
16
16
|
}
|
|
17
17
|
async list(options) {
|
|
18
18
|
return this._fetchJson(dataArray(ZProject), {
|
|
19
|
-
url: "/
|
|
19
|
+
url: "/projects",
|
|
20
20
|
method: "GET",
|
|
21
21
|
params: options?.params,
|
|
22
22
|
headers: options?.headers,
|
|
@@ -24,7 +24,7 @@ export default class APIProjects extends CompositionClient {
|
|
|
24
24
|
}
|
|
25
25
|
async get(projectId, options) {
|
|
26
26
|
return this._fetchJson(ZProject, {
|
|
27
|
-
url: `/
|
|
27
|
+
url: `/projects/${projectId}`,
|
|
28
28
|
method: "GET",
|
|
29
29
|
params: options?.params,
|
|
30
30
|
headers: options?.headers,
|
|
@@ -32,7 +32,7 @@ export default class APIProjects extends CompositionClient {
|
|
|
32
32
|
}
|
|
33
33
|
async delete(projectId, options) {
|
|
34
34
|
return this._fetchJson({
|
|
35
|
-
url: `/
|
|
35
|
+
url: `/projects/${projectId}`,
|
|
36
36
|
method: "DELETE",
|
|
37
37
|
params: options?.params,
|
|
38
38
|
headers: options?.headers,
|
|
@@ -41,14 +41,14 @@ export default class APIProjects extends CompositionClient {
|
|
|
41
41
|
async publish(projectId, origin, options) {
|
|
42
42
|
const params = origin ? { origin, ...(options?.params || {}) } : options?.params;
|
|
43
43
|
return this._fetchJson(ZProject, {
|
|
44
|
-
url: `/
|
|
44
|
+
url: `/projects/${projectId}/publish`,
|
|
45
45
|
method: "POST",
|
|
46
46
|
params,
|
|
47
47
|
headers: options?.headers,
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
async extract({ project_id, iteration_id, document, model, image_resolution_dpi, n_consensus, metadata, extraction_id }, options) {
|
|
51
|
-
const url = iteration_id ? `/
|
|
51
|
+
const url = iteration_id ? `/projects/extract/${project_id}/${iteration_id}` : `/projects/extract/${project_id}`;
|
|
52
52
|
// Parse and convert document to blob for multipart form upload
|
|
53
53
|
const parsedDocument = await ZMIMEData.parseAsync(document);
|
|
54
54
|
// Only include optional parameters if they are provided
|
|
@@ -6,7 +6,7 @@ export default class APISchemas extends CompositionClient {
|
|
|
6
6
|
}
|
|
7
7
|
async generate(params, options) {
|
|
8
8
|
return this._fetchJson(ZSchema, {
|
|
9
|
-
url: "/
|
|
9
|
+
url: "/schemas/generate",
|
|
10
10
|
method: "POST",
|
|
11
11
|
body: { ...(await ZGenerateSchemaRequest.parseAsync(params)), ...(options?.body || {}) },
|
|
12
12
|
params: options?.params,
|
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
import { CompositionClient } from "../../client.js";
|
|
1
|
+
import { CompositionClient, RequestOptions } from "../../client.js";
|
|
2
|
+
import { PaginatedList, Workflow } from "../../types.js";
|
|
2
3
|
import APIWorkflowRuns from "./runs/client.js";
|
|
3
4
|
/**
|
|
4
5
|
* Workflows API client for workflow operations.
|
|
5
6
|
*
|
|
6
7
|
* Sub-clients:
|
|
7
|
-
* - runs: Workflow run operations
|
|
8
|
+
* - runs: Workflow run operations
|
|
8
9
|
*/
|
|
9
10
|
export default class APIWorkflows extends CompositionClient {
|
|
10
11
|
runs: APIWorkflowRuns;
|
|
11
12
|
constructor(client: CompositionClient);
|
|
13
|
+
/**
|
|
14
|
+
* Get a workflow by ID.
|
|
15
|
+
*/
|
|
16
|
+
get(workflowId: string, options?: RequestOptions): Promise<Workflow>;
|
|
17
|
+
/**
|
|
18
|
+
* List workflows with pagination.
|
|
19
|
+
*/
|
|
20
|
+
list({ before, after, limit, order, sortBy, fields, }?: {
|
|
21
|
+
before?: string;
|
|
22
|
+
after?: string;
|
|
23
|
+
limit?: number;
|
|
24
|
+
order?: "asc" | "desc";
|
|
25
|
+
sortBy?: string;
|
|
26
|
+
fields?: string;
|
|
27
|
+
}, options?: RequestOptions): Promise<PaginatedList>;
|
|
12
28
|
}
|
|
13
29
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/workflows/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/workflows/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAA6B,MAAM,gBAAgB,CAAC;AACpF,OAAO,eAAe,MAAM,kBAAkB,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,iBAAiB;IAChD,IAAI,EAAE,eAAe,CAAC;gBAEjB,MAAM,EAAE,iBAAiB;IAKrC;;OAEG;IACG,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;IAS1E;;OAEG;IACG,IAAI,CACN,EACI,MAAM,EACN,KAAK,EACL,KAAU,EACV,KAAc,EACd,MAAM,EACN,MAAM,GACT,GAAE;QACC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;QACvB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACd,EACN,OAAO,CAAC,EAAE,cAAc,GACzB,OAAO,CAAC,aAAa,CAAC;CAoB5B"}
|
|
@@ -1,14 +1,46 @@
|
|
|
1
1
|
import { CompositionClient } from "../../client.js";
|
|
2
|
+
import { ZPaginatedList, ZWorkflow } from "../../types.js";
|
|
2
3
|
import APIWorkflowRuns from "./runs/client.js";
|
|
3
4
|
/**
|
|
4
5
|
* Workflows API client for workflow operations.
|
|
5
6
|
*
|
|
6
7
|
* Sub-clients:
|
|
7
|
-
* - runs: Workflow run operations
|
|
8
|
+
* - runs: Workflow run operations
|
|
8
9
|
*/
|
|
9
10
|
export default class APIWorkflows extends CompositionClient {
|
|
10
11
|
constructor(client) {
|
|
11
12
|
super(client);
|
|
12
13
|
this.runs = new APIWorkflowRuns(this);
|
|
13
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Get a workflow by ID.
|
|
17
|
+
*/
|
|
18
|
+
async get(workflowId, options) {
|
|
19
|
+
return this._fetchJson(ZWorkflow, {
|
|
20
|
+
url: `/workflows/${workflowId}`,
|
|
21
|
+
method: "GET",
|
|
22
|
+
params: options?.params,
|
|
23
|
+
headers: options?.headers,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* List workflows with pagination.
|
|
28
|
+
*/
|
|
29
|
+
async list({ before, after, limit = 10, order = "desc", sortBy, fields, } = {}, options) {
|
|
30
|
+
const params = Object.fromEntries(Object.entries({
|
|
31
|
+
before,
|
|
32
|
+
after,
|
|
33
|
+
limit,
|
|
34
|
+
order,
|
|
35
|
+
sort_by: sortBy,
|
|
36
|
+
fields,
|
|
37
|
+
...(options?.params || {}),
|
|
38
|
+
}).filter(([_, value]) => value !== undefined));
|
|
39
|
+
return this._fetchJson(ZPaginatedList, {
|
|
40
|
+
url: "/workflows",
|
|
41
|
+
method: "GET",
|
|
42
|
+
params,
|
|
43
|
+
headers: options?.headers,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
14
46
|
}
|
|
@@ -64,7 +64,7 @@ export default class APIWorkflowRuns extends CompositionClient {
|
|
|
64
64
|
body.json_inputs = jsonInputs;
|
|
65
65
|
}
|
|
66
66
|
return this._fetchJson(ZWorkflowRun, {
|
|
67
|
-
url: `/
|
|
67
|
+
url: `/workflows/${workflowId}/run`,
|
|
68
68
|
method: "POST",
|
|
69
69
|
body: { ...body, ...(options?.body || {}) },
|
|
70
70
|
params: options?.params,
|
|
@@ -86,7 +86,7 @@ export default class APIWorkflowRuns extends CompositionClient {
|
|
|
86
86
|
*/
|
|
87
87
|
async get(runId, options) {
|
|
88
88
|
return this._fetchJson(ZWorkflowRun, {
|
|
89
|
-
url: `/
|
|
89
|
+
url: `/workflows/runs/${runId}`,
|
|
90
90
|
method: "GET",
|
|
91
91
|
params: options?.params,
|
|
92
92
|
headers: options?.headers,
|
|
@@ -130,7 +130,7 @@ export default class APIWorkflowRuns extends CompositionClient {
|
|
|
130
130
|
};
|
|
131
131
|
const cleanParams = Object.fromEntries(Object.entries(params).filter(([_, v]) => v !== undefined));
|
|
132
132
|
return this._fetchJson(ZPaginatedList, {
|
|
133
|
-
url: "/
|
|
133
|
+
url: "/workflows/runs",
|
|
134
134
|
method: "GET",
|
|
135
135
|
params: { ...cleanParams, ...(options?.params || {}) },
|
|
136
136
|
headers: options?.headers,
|
|
@@ -149,7 +149,7 @@ export default class APIWorkflowRuns extends CompositionClient {
|
|
|
149
149
|
*/
|
|
150
150
|
async delete(runId, options) {
|
|
151
151
|
return this._fetchJson({
|
|
152
|
-
url: `/
|
|
152
|
+
url: `/workflows/runs/${runId}`,
|
|
153
153
|
method: "DELETE",
|
|
154
154
|
params: options?.params,
|
|
155
155
|
headers: options?.headers,
|
|
@@ -175,7 +175,7 @@ export default class APIWorkflowRuns extends CompositionClient {
|
|
|
175
175
|
if (commandId !== undefined)
|
|
176
176
|
body.command_id = commandId;
|
|
177
177
|
return this._fetchJson(ZCancelWorkflowResponse, {
|
|
178
|
-
url: `/
|
|
178
|
+
url: `/workflows/runs/${runId}/cancel`,
|
|
179
179
|
method: "POST",
|
|
180
180
|
body: { ...body, ...(options?.body || {}) },
|
|
181
181
|
params: options?.params,
|
|
@@ -202,7 +202,7 @@ export default class APIWorkflowRuns extends CompositionClient {
|
|
|
202
202
|
if (commandId !== undefined)
|
|
203
203
|
body.command_id = commandId;
|
|
204
204
|
return this._fetchJson(ZWorkflowRun, {
|
|
205
|
-
url: `/
|
|
205
|
+
url: `/workflows/runs/${runId}/restart`,
|
|
206
206
|
method: "POST",
|
|
207
207
|
body: { ...body, ...(options?.body || {}) },
|
|
208
208
|
params: options?.params,
|
|
@@ -241,7 +241,7 @@ export default class APIWorkflowRuns extends CompositionClient {
|
|
|
241
241
|
if (commandId !== undefined)
|
|
242
242
|
body.command_id = commandId;
|
|
243
243
|
return this._fetchJson(ZResumeWorkflowResponse, {
|
|
244
|
-
url: `/
|
|
244
|
+
url: `/workflows/runs/${runId}/resume`,
|
|
245
245
|
method: "POST",
|
|
246
246
|
body: { ...body, ...(options?.body || {}) },
|
|
247
247
|
params: options?.params,
|
|
@@ -26,7 +26,7 @@ export default class APIWorkflowRunSteps extends CompositionClient {
|
|
|
26
26
|
*/
|
|
27
27
|
async get(runId, nodeId, options) {
|
|
28
28
|
return this._fetchJson(ZStepOutputResponse, {
|
|
29
|
-
url: `/
|
|
29
|
+
url: `/workflows/runs/${runId}/steps/${nodeId}`,
|
|
30
30
|
method: "GET",
|
|
31
31
|
params: options?.params,
|
|
32
32
|
headers: options?.headers,
|
|
@@ -49,7 +49,7 @@ export default class APIWorkflowRunSteps extends CompositionClient {
|
|
|
49
49
|
*/
|
|
50
50
|
async list(runId, options) {
|
|
51
51
|
return this._fetchJson(z.array(ZWorkflowRunStep), {
|
|
52
|
-
url: `/
|
|
52
|
+
url: `/workflows/runs/${runId}/steps`,
|
|
53
53
|
method: "GET",
|
|
54
54
|
params: options?.params,
|
|
55
55
|
headers: options?.headers,
|
package/dist/client.js
CHANGED
|
@@ -116,7 +116,7 @@ export class FetcherClient extends AbstractClient {
|
|
|
116
116
|
if (params.params) {
|
|
117
117
|
query = "?" + new URLSearchParams(Object.fromEntries(Object.entries(params.params).filter(([_, v]) => v !== undefined))).toString();
|
|
118
118
|
}
|
|
119
|
-
let url = (this.options.baseUrl || "https://api.retab.com") + params.url + query;
|
|
119
|
+
let url = (this.options.baseUrl || "https://api.retab.com/v1") + params.url + query;
|
|
120
120
|
let headers = params.headers || {};
|
|
121
121
|
let init = {
|
|
122
122
|
method: params.method,
|
|
@@ -3809,9 +3809,9 @@ export declare const ZCancelWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3809
3809
|
duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3810
3810
|
steps: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
3811
3811
|
node_id: z.ZodString;
|
|
3812
|
-
node_type: z.
|
|
3812
|
+
node_type: z.ZodString;
|
|
3813
3813
|
node_label: z.ZodString;
|
|
3814
|
-
status: z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"running">, z.ZodLiteral<"completed">, z.ZodLiteral<"error">, z.ZodLiteral<"waiting_for_human">, z.ZodLiteral<"cancelled">]>;
|
|
3814
|
+
status: z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"queued">, z.ZodLiteral<"running">, z.ZodLiteral<"completed">, z.ZodLiteral<"skipped">, z.ZodLiteral<"error">, z.ZodLiteral<"waiting_for_human">, z.ZodLiteral<"cancelled">]>;
|
|
3815
3815
|
started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3816
3816
|
completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3817
3817
|
duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -3896,9 +3896,9 @@ export declare const ZCancelWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3896
3896
|
human_reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3897
3897
|
human_review_approved: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
3898
3898
|
}, "strip", z.ZodTypeAny, {
|
|
3899
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
3899
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
3900
3900
|
node_id: string;
|
|
3901
|
-
node_type:
|
|
3901
|
+
node_type: string;
|
|
3902
3902
|
node_label: string;
|
|
3903
3903
|
error?: string | null | undefined;
|
|
3904
3904
|
started_at?: string | null | undefined;
|
|
@@ -3934,9 +3934,9 @@ export declare const ZCancelWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
3934
3934
|
human_reviewed_at?: string | null | undefined;
|
|
3935
3935
|
human_review_approved?: boolean | null | undefined;
|
|
3936
3936
|
}, {
|
|
3937
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
3937
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
3938
3938
|
node_id: string;
|
|
3939
|
-
node_type:
|
|
3939
|
+
node_type: string;
|
|
3940
3940
|
node_label: string;
|
|
3941
3941
|
error?: string | null | undefined;
|
|
3942
3942
|
started_at?: string | null | undefined;
|
|
@@ -4001,9 +4001,9 @@ export declare const ZCancelWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4001
4001
|
workflow_id: string;
|
|
4002
4002
|
workflow_name: string;
|
|
4003
4003
|
steps: {
|
|
4004
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4004
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4005
4005
|
node_id: string;
|
|
4006
|
-
node_type:
|
|
4006
|
+
node_type: string;
|
|
4007
4007
|
node_label: string;
|
|
4008
4008
|
error?: string | null | undefined;
|
|
4009
4009
|
started_at?: string | null | undefined;
|
|
@@ -4059,9 +4059,9 @@ export declare const ZCancelWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4059
4059
|
workflow_id: string;
|
|
4060
4060
|
workflow_name: string;
|
|
4061
4061
|
steps: {
|
|
4062
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4062
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4063
4063
|
node_id: string;
|
|
4064
|
-
node_type:
|
|
4064
|
+
node_type: string;
|
|
4065
4065
|
node_label: string;
|
|
4066
4066
|
error?: string | null | undefined;
|
|
4067
4067
|
started_at?: string | null | undefined;
|
|
@@ -4122,9 +4122,9 @@ export declare const ZCancelWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4122
4122
|
workflow_id: string;
|
|
4123
4123
|
workflow_name: string;
|
|
4124
4124
|
steps: {
|
|
4125
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4125
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4126
4126
|
node_id: string;
|
|
4127
|
-
node_type:
|
|
4127
|
+
node_type: string;
|
|
4128
4128
|
node_label: string;
|
|
4129
4129
|
error?: string | null | undefined;
|
|
4130
4130
|
started_at?: string | null | undefined;
|
|
@@ -4183,9 +4183,9 @@ export declare const ZCancelWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4183
4183
|
workflow_id: string;
|
|
4184
4184
|
workflow_name: string;
|
|
4185
4185
|
steps: {
|
|
4186
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4186
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4187
4187
|
node_id: string;
|
|
4188
|
-
node_type:
|
|
4188
|
+
node_type: string;
|
|
4189
4189
|
node_label: string;
|
|
4190
4190
|
error?: string | null | undefined;
|
|
4191
4191
|
started_at?: string | null | undefined;
|
|
@@ -4286,9 +4286,9 @@ export declare const ZResumeWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4286
4286
|
duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4287
4287
|
steps: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
4288
4288
|
node_id: z.ZodString;
|
|
4289
|
-
node_type: z.
|
|
4289
|
+
node_type: z.ZodString;
|
|
4290
4290
|
node_label: z.ZodString;
|
|
4291
|
-
status: z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"running">, z.ZodLiteral<"completed">, z.ZodLiteral<"error">, z.ZodLiteral<"waiting_for_human">, z.ZodLiteral<"cancelled">]>;
|
|
4291
|
+
status: z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"queued">, z.ZodLiteral<"running">, z.ZodLiteral<"completed">, z.ZodLiteral<"skipped">, z.ZodLiteral<"error">, z.ZodLiteral<"waiting_for_human">, z.ZodLiteral<"cancelled">]>;
|
|
4292
4292
|
started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4293
4293
|
completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4294
4294
|
duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -4373,9 +4373,9 @@ export declare const ZResumeWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4373
4373
|
human_reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4374
4374
|
human_review_approved: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4375
4375
|
}, "strip", z.ZodTypeAny, {
|
|
4376
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4376
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4377
4377
|
node_id: string;
|
|
4378
|
-
node_type:
|
|
4378
|
+
node_type: string;
|
|
4379
4379
|
node_label: string;
|
|
4380
4380
|
error?: string | null | undefined;
|
|
4381
4381
|
started_at?: string | null | undefined;
|
|
@@ -4411,9 +4411,9 @@ export declare const ZResumeWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4411
4411
|
human_reviewed_at?: string | null | undefined;
|
|
4412
4412
|
human_review_approved?: boolean | null | undefined;
|
|
4413
4413
|
}, {
|
|
4414
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4414
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4415
4415
|
node_id: string;
|
|
4416
|
-
node_type:
|
|
4416
|
+
node_type: string;
|
|
4417
4417
|
node_label: string;
|
|
4418
4418
|
error?: string | null | undefined;
|
|
4419
4419
|
started_at?: string | null | undefined;
|
|
@@ -4478,9 +4478,9 @@ export declare const ZResumeWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4478
4478
|
workflow_id: string;
|
|
4479
4479
|
workflow_name: string;
|
|
4480
4480
|
steps: {
|
|
4481
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4481
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4482
4482
|
node_id: string;
|
|
4483
|
-
node_type:
|
|
4483
|
+
node_type: string;
|
|
4484
4484
|
node_label: string;
|
|
4485
4485
|
error?: string | null | undefined;
|
|
4486
4486
|
started_at?: string | null | undefined;
|
|
@@ -4536,9 +4536,9 @@ export declare const ZResumeWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4536
4536
|
workflow_id: string;
|
|
4537
4537
|
workflow_name: string;
|
|
4538
4538
|
steps: {
|
|
4539
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4539
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4540
4540
|
node_id: string;
|
|
4541
|
-
node_type:
|
|
4541
|
+
node_type: string;
|
|
4542
4542
|
node_label: string;
|
|
4543
4543
|
error?: string | null | undefined;
|
|
4544
4544
|
started_at?: string | null | undefined;
|
|
@@ -4601,9 +4601,9 @@ export declare const ZResumeWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4601
4601
|
workflow_id: string;
|
|
4602
4602
|
workflow_name: string;
|
|
4603
4603
|
steps: {
|
|
4604
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4604
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4605
4605
|
node_id: string;
|
|
4606
|
-
node_type:
|
|
4606
|
+
node_type: string;
|
|
4607
4607
|
node_label: string;
|
|
4608
4608
|
error?: string | null | undefined;
|
|
4609
4609
|
started_at?: string | null | undefined;
|
|
@@ -4664,9 +4664,9 @@ export declare const ZResumeWorkflowResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4664
4664
|
workflow_id: string;
|
|
4665
4665
|
workflow_name: string;
|
|
4666
4666
|
steps: {
|
|
4667
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4667
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4668
4668
|
node_id: string;
|
|
4669
|
-
node_type:
|
|
4669
|
+
node_type: string;
|
|
4670
4670
|
node_label: string;
|
|
4671
4671
|
error?: string | null | undefined;
|
|
4672
4672
|
started_at?: string | null | undefined;
|
|
@@ -4796,9 +4796,9 @@ export declare const ZStepOutputsBatchResponse: z.ZodLazy<z.ZodObject<{
|
|
|
4796
4796
|
export type StepOutputsBatchResponse = z.infer<typeof ZStepOutputsBatchResponse>;
|
|
4797
4797
|
export declare const ZStepStatus: z.ZodLazy<z.ZodObject<{
|
|
4798
4798
|
node_id: z.ZodString;
|
|
4799
|
-
node_type: z.
|
|
4799
|
+
node_type: z.ZodString;
|
|
4800
4800
|
node_label: z.ZodString;
|
|
4801
|
-
status: z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"running">, z.ZodLiteral<"completed">, z.ZodLiteral<"error">, z.ZodLiteral<"waiting_for_human">, z.ZodLiteral<"cancelled">]>;
|
|
4801
|
+
status: z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"queued">, z.ZodLiteral<"running">, z.ZodLiteral<"completed">, z.ZodLiteral<"skipped">, z.ZodLiteral<"error">, z.ZodLiteral<"waiting_for_human">, z.ZodLiteral<"cancelled">]>;
|
|
4802
4802
|
started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4803
4803
|
completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4804
4804
|
duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -4883,9 +4883,9 @@ export declare const ZStepStatus: z.ZodLazy<z.ZodObject<{
|
|
|
4883
4883
|
human_reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4884
4884
|
human_review_approved: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4885
4885
|
}, "strip", z.ZodTypeAny, {
|
|
4886
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4886
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4887
4887
|
node_id: string;
|
|
4888
|
-
node_type:
|
|
4888
|
+
node_type: string;
|
|
4889
4889
|
node_label: string;
|
|
4890
4890
|
error?: string | null | undefined;
|
|
4891
4891
|
started_at?: string | null | undefined;
|
|
@@ -4921,9 +4921,9 @@ export declare const ZStepStatus: z.ZodLazy<z.ZodObject<{
|
|
|
4921
4921
|
human_reviewed_at?: string | null | undefined;
|
|
4922
4922
|
human_review_approved?: boolean | null | undefined;
|
|
4923
4923
|
}, {
|
|
4924
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
4924
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
4925
4925
|
node_id: string;
|
|
4926
|
-
node_type:
|
|
4926
|
+
node_type: string;
|
|
4927
4927
|
node_label: string;
|
|
4928
4928
|
error?: string | null | undefined;
|
|
4929
4929
|
started_at?: string | null | undefined;
|
|
@@ -4971,9 +4971,9 @@ export declare const ZWorkflowRun: z.ZodLazy<z.ZodObject<{
|
|
|
4971
4971
|
duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4972
4972
|
steps: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
4973
4973
|
node_id: z.ZodString;
|
|
4974
|
-
node_type: z.
|
|
4974
|
+
node_type: z.ZodString;
|
|
4975
4975
|
node_label: z.ZodString;
|
|
4976
|
-
status: z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"running">, z.ZodLiteral<"completed">, z.ZodLiteral<"error">, z.ZodLiteral<"waiting_for_human">, z.ZodLiteral<"cancelled">]>;
|
|
4976
|
+
status: z.ZodUnion<[z.ZodLiteral<"pending">, z.ZodLiteral<"queued">, z.ZodLiteral<"running">, z.ZodLiteral<"completed">, z.ZodLiteral<"skipped">, z.ZodLiteral<"error">, z.ZodLiteral<"waiting_for_human">, z.ZodLiteral<"cancelled">]>;
|
|
4977
4977
|
started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4978
4978
|
completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4979
4979
|
duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -5058,9 +5058,9 @@ export declare const ZWorkflowRun: z.ZodLazy<z.ZodObject<{
|
|
|
5058
5058
|
human_reviewed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5059
5059
|
human_review_approved: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
5060
5060
|
}, "strip", z.ZodTypeAny, {
|
|
5061
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
5061
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
5062
5062
|
node_id: string;
|
|
5063
|
-
node_type:
|
|
5063
|
+
node_type: string;
|
|
5064
5064
|
node_label: string;
|
|
5065
5065
|
error?: string | null | undefined;
|
|
5066
5066
|
started_at?: string | null | undefined;
|
|
@@ -5096,9 +5096,9 @@ export declare const ZWorkflowRun: z.ZodLazy<z.ZodObject<{
|
|
|
5096
5096
|
human_reviewed_at?: string | null | undefined;
|
|
5097
5097
|
human_review_approved?: boolean | null | undefined;
|
|
5098
5098
|
}, {
|
|
5099
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
5099
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
5100
5100
|
node_id: string;
|
|
5101
|
-
node_type:
|
|
5101
|
+
node_type: string;
|
|
5102
5102
|
node_label: string;
|
|
5103
5103
|
error?: string | null | undefined;
|
|
5104
5104
|
started_at?: string | null | undefined;
|
|
@@ -5163,9 +5163,9 @@ export declare const ZWorkflowRun: z.ZodLazy<z.ZodObject<{
|
|
|
5163
5163
|
workflow_id: string;
|
|
5164
5164
|
workflow_name: string;
|
|
5165
5165
|
steps: {
|
|
5166
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
5166
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
5167
5167
|
node_id: string;
|
|
5168
|
-
node_type:
|
|
5168
|
+
node_type: string;
|
|
5169
5169
|
node_label: string;
|
|
5170
5170
|
error?: string | null | undefined;
|
|
5171
5171
|
started_at?: string | null | undefined;
|
|
@@ -5221,9 +5221,9 @@ export declare const ZWorkflowRun: z.ZodLazy<z.ZodObject<{
|
|
|
5221
5221
|
workflow_id: string;
|
|
5222
5222
|
workflow_name: string;
|
|
5223
5223
|
steps: {
|
|
5224
|
-
status: "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human";
|
|
5224
|
+
status: "queued" | "completed" | "cancelled" | "error" | "pending" | "running" | "waiting_for_human" | "skipped";
|
|
5225
5225
|
node_id: string;
|
|
5226
|
-
node_type:
|
|
5226
|
+
node_type: string;
|
|
5227
5227
|
node_label: string;
|
|
5228
5228
|
error?: string | null | undefined;
|
|
5229
5229
|
started_at?: string | null | undefined;
|
package/dist/generated_types.js
CHANGED
|
@@ -310,9 +310,9 @@ export const ZStepOutputsBatchResponse = z.lazy(() => (z.object({
|
|
|
310
310
|
})));
|
|
311
311
|
export const ZStepStatus = z.lazy(() => (z.object({
|
|
312
312
|
node_id: z.string(),
|
|
313
|
-
node_type: z.
|
|
313
|
+
node_type: z.string(),
|
|
314
314
|
node_label: z.string(),
|
|
315
|
-
status: z.union([z.literal("pending"), z.literal("running"), z.literal("completed"), z.literal("error"), z.literal("waiting_for_human"), z.literal("cancelled")]),
|
|
315
|
+
status: z.union([z.literal("pending"), z.literal("queued"), z.literal("running"), z.literal("completed"), z.literal("skipped"), z.literal("error"), z.literal("waiting_for_human"), z.literal("cancelled")]),
|
|
316
316
|
started_at: z.string().nullable().optional(),
|
|
317
317
|
completed_at: z.string().nullable().optional(),
|
|
318
318
|
duration_ms: z.number().nullable().optional(),
|
package/dist/types.d.ts
CHANGED
|
@@ -1103,6 +1103,47 @@ export declare const ZWorkflowRunStep: z.ZodObject<{
|
|
|
1103
1103
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1104
1104
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1105
1105
|
export type WorkflowRunStep = z.infer<typeof ZWorkflowRunStep>;
|
|
1106
|
+
export declare const ZWorkflow: z.ZodObject<{
|
|
1107
|
+
id: z.ZodString;
|
|
1108
|
+
name: z.ZodDefault<z.ZodString>;
|
|
1109
|
+
description: z.ZodDefault<z.ZodString>;
|
|
1110
|
+
is_published: z.ZodDefault<z.ZodBoolean>;
|
|
1111
|
+
published_snapshot_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1112
|
+
published_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1113
|
+
draft_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1114
|
+
organization_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1115
|
+
email_senders_whitelist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1116
|
+
email_domains_whitelist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1117
|
+
created_at: z.ZodString;
|
|
1118
|
+
updated_at: z.ZodString;
|
|
1119
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1120
|
+
id: z.ZodString;
|
|
1121
|
+
name: z.ZodDefault<z.ZodString>;
|
|
1122
|
+
description: z.ZodDefault<z.ZodString>;
|
|
1123
|
+
is_published: z.ZodDefault<z.ZodBoolean>;
|
|
1124
|
+
published_snapshot_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1125
|
+
published_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1126
|
+
draft_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1127
|
+
organization_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1128
|
+
email_senders_whitelist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1129
|
+
email_domains_whitelist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1130
|
+
created_at: z.ZodString;
|
|
1131
|
+
updated_at: z.ZodString;
|
|
1132
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1133
|
+
id: z.ZodString;
|
|
1134
|
+
name: z.ZodDefault<z.ZodString>;
|
|
1135
|
+
description: z.ZodDefault<z.ZodString>;
|
|
1136
|
+
is_published: z.ZodDefault<z.ZodBoolean>;
|
|
1137
|
+
published_snapshot_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1138
|
+
published_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1139
|
+
draft_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1140
|
+
organization_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1141
|
+
email_senders_whitelist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1142
|
+
email_domains_whitelist: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1143
|
+
created_at: z.ZodString;
|
|
1144
|
+
updated_at: z.ZodString;
|
|
1145
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1146
|
+
export type Workflow = z.infer<typeof ZWorkflow>;
|
|
1106
1147
|
export declare const ZModel: z.ZodLazy<z.ZodObject<{
|
|
1107
1148
|
id: z.ZodString;
|
|
1108
1149
|
created: z.ZodNumber;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAqC,CAAC;AAC3E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE/E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA0Bb,CAAC;AACjB,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAaN,CAAC;AACjB,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAEjD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;GAKf,CAAC;AACL,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -146,6 +146,20 @@ export const ZWorkflowRunStep = z.object({
|
|
|
146
146
|
created_at: z.string().nullable().optional(),
|
|
147
147
|
updated_at: z.string().nullable().optional(),
|
|
148
148
|
}).passthrough();
|
|
149
|
+
export const ZWorkflow = z.object({
|
|
150
|
+
id: z.string(),
|
|
151
|
+
name: z.string().default("Untitled Workflow"),
|
|
152
|
+
description: z.string().default(""),
|
|
153
|
+
is_published: z.boolean().default(false),
|
|
154
|
+
published_snapshot_id: z.string().nullable().optional(),
|
|
155
|
+
published_at: z.string().nullable().optional(),
|
|
156
|
+
draft_version: z.string().nullable().optional(),
|
|
157
|
+
organization_id: z.string().nullable().optional(),
|
|
158
|
+
email_senders_whitelist: z.array(z.string()).default([]),
|
|
159
|
+
email_domains_whitelist: z.array(z.string()).default([]),
|
|
160
|
+
created_at: z.string(),
|
|
161
|
+
updated_at: z.string(),
|
|
162
|
+
}).passthrough();
|
|
149
163
|
export const ZModel = z.lazy(() => (z.object({
|
|
150
164
|
id: z.string(),
|
|
151
165
|
created: z.number(),
|