vellum-ai 0.0.28 → 0.0.30
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/api/client/requests/ExecuteWorkflowStreamRequest.d.ts +2 -0
- package/api/resources/documents/client/Client.d.ts +8 -0
- package/api/resources/documents/client/Client.js +46 -0
- package/api/resources/documents/client/requests/PatchedDocumentUpdateRequest.d.ts +16 -0
- package/api/resources/documents/client/requests/index.d.ts +1 -0
- package/api/types/DeploymentRead.d.ts +1 -1
- package/api/types/{DeploymentReadStatusEnum.d.ts → DeploymentStatus.d.ts} +2 -2
- package/{dist/api/types/DeploymentReadStatusEnum.js → api/types/DeploymentStatus.js} +2 -2
- package/api/types/DocumentRead.d.ts +32 -0
- package/{dist/api/types/SlimDocumentStatusEnum.d.ts → api/types/DocumentStatus.d.ts} +1 -1
- package/api/types/DocumentStatus.js +5 -0
- package/api/types/SlimDocument.d.ts +1 -1
- package/api/types/WorkflowExecutionEventType.d.ts +12 -0
- package/api/types/WorkflowExecutionEventType.js +10 -0
- package/api/types/index.d.ts +4 -2
- package/api/types/index.js +4 -2
- package/dist/api/client/requests/ExecuteWorkflowStreamRequest.d.ts +2 -0
- package/dist/api/resources/documents/client/Client.d.ts +8 -0
- package/dist/api/resources/documents/client/Client.js +46 -0
- package/dist/api/resources/documents/client/requests/PatchedDocumentUpdateRequest.d.ts +16 -0
- package/dist/api/resources/documents/client/requests/PatchedDocumentUpdateRequest.js +5 -0
- package/dist/api/resources/documents/client/requests/index.d.ts +1 -0
- package/dist/api/types/DeploymentRead.d.ts +1 -1
- package/dist/api/types/{DeploymentReadStatusEnum.d.ts → DeploymentStatus.d.ts} +2 -2
- package/{api/types/DeploymentReadStatusEnum.js → dist/api/types/DeploymentStatus.js} +2 -2
- package/dist/api/types/DocumentRead.d.ts +32 -0
- package/dist/api/types/DocumentRead.js +5 -0
- package/{api/types/SlimDocumentStatusEnum.d.ts → dist/api/types/DocumentStatus.d.ts} +1 -1
- package/dist/api/types/DocumentStatus.js +5 -0
- package/dist/api/types/SlimDocument.d.ts +1 -1
- package/dist/api/types/WorkflowExecutionEventType.d.ts +12 -0
- package/dist/api/types/WorkflowExecutionEventType.js +10 -0
- package/dist/api/types/index.d.ts +4 -2
- package/dist/api/types/index.js +4 -2
- package/dist/serialization/client/requests/ExecuteWorkflowStreamRequest.d.ts +1 -0
- package/dist/serialization/client/requests/ExecuteWorkflowStreamRequest.js +3 -0
- package/dist/serialization/resources/documents/client/index.d.ts +1 -0
- package/dist/serialization/resources/documents/client/index.js +17 -0
- package/dist/serialization/resources/documents/client/requests/PatchedDocumentUpdateRequest.d.ts +14 -0
- package/dist/serialization/resources/documents/client/requests/PatchedDocumentUpdateRequest.js +35 -0
- package/dist/serialization/resources/documents/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/documents/client/requests/index.js +5 -0
- package/dist/serialization/resources/documents/index.d.ts +1 -0
- package/dist/serialization/resources/documents/index.js +17 -0
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +3 -1
- package/dist/serialization/types/DeploymentRead.d.ts +1 -1
- package/dist/serialization/types/DeploymentRead.js +1 -1
- package/dist/serialization/types/{DeploymentReadStatusEnum.d.ts → DeploymentStatus.d.ts} +2 -2
- package/dist/serialization/types/{DeploymentReadStatusEnum.js → DeploymentStatus.js} +2 -2
- package/dist/serialization/types/DocumentRead.d.ts +21 -0
- package/dist/serialization/types/DocumentRead.js +42 -0
- package/dist/serialization/types/{SlimDocumentStatusEnum.d.ts → DocumentStatus.d.ts} +2 -2
- package/dist/serialization/types/{SlimDocumentStatusEnum.js → DocumentStatus.js} +2 -2
- package/dist/serialization/types/SlimDocument.d.ts +1 -1
- package/dist/serialization/types/SlimDocument.js +1 -1
- package/dist/serialization/types/WorkflowExecutionEventType.d.ts +10 -0
- package/{serialization/types/DeploymentReadStatusEnum.js → dist/serialization/types/WorkflowExecutionEventType.js} +2 -2
- package/dist/serialization/types/index.d.ts +4 -2
- package/dist/serialization/types/index.js +4 -2
- package/package.json +1 -1
- package/serialization/client/requests/ExecuteWorkflowStreamRequest.d.ts +1 -0
- package/serialization/client/requests/ExecuteWorkflowStreamRequest.js +3 -0
- package/serialization/resources/documents/client/index.d.ts +1 -0
- package/serialization/resources/documents/client/index.js +17 -0
- package/serialization/resources/documents/client/requests/PatchedDocumentUpdateRequest.d.ts +14 -0
- package/serialization/resources/documents/client/requests/PatchedDocumentUpdateRequest.js +35 -0
- package/serialization/resources/documents/client/requests/index.d.ts +1 -0
- package/serialization/resources/documents/client/requests/index.js +5 -0
- package/serialization/resources/documents/index.d.ts +1 -0
- package/serialization/resources/documents/index.js +17 -0
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +3 -1
- package/serialization/types/DeploymentRead.d.ts +1 -1
- package/serialization/types/DeploymentRead.js +1 -1
- package/serialization/types/{DeploymentReadStatusEnum.d.ts → DeploymentStatus.d.ts} +2 -2
- package/serialization/types/DeploymentStatus.js +31 -0
- package/serialization/types/DocumentRead.d.ts +21 -0
- package/serialization/types/DocumentRead.js +42 -0
- package/serialization/types/{SlimDocumentStatusEnum.d.ts → DocumentStatus.d.ts} +2 -2
- package/serialization/types/{SlimDocumentStatusEnum.js → DocumentStatus.js} +2 -2
- package/serialization/types/SlimDocument.d.ts +1 -1
- package/serialization/types/SlimDocument.js +1 -1
- package/serialization/types/WorkflowExecutionEventType.d.ts +10 -0
- package/serialization/types/WorkflowExecutionEventType.js +31 -0
- package/serialization/types/index.d.ts +4 -2
- package/serialization/types/index.js +4 -2
- /package/api/{types/SlimDocumentStatusEnum.js → resources/documents/client/requests/PatchedDocumentUpdateRequest.js} +0 -0
- /package/{dist/api/types/SlimDocumentStatusEnum.js → api/types/DocumentRead.js} +0 -0
|
@@ -12,4 +12,6 @@ export interface ExecuteWorkflowStreamRequest {
|
|
|
12
12
|
inputs: Vellum.WorkflowRequestInputRequest[];
|
|
13
13
|
/** Optionally include a unique identifier for tracking purposes. */
|
|
14
14
|
externalId?: string;
|
|
15
|
+
/** Optionally specify which events you want to receive. Defaults to only WORKFLOW events. Note that the schema of non-WORKFLOW events is unstable and should be used with caution. */
|
|
16
|
+
eventTypes?: Vellum.WorkflowExecutionEventType[];
|
|
15
17
|
}
|
|
@@ -23,6 +23,14 @@ export declare class Documents {
|
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
25
|
list(request?: Vellum.DocumentsListRequest): Promise<Vellum.PaginatedSlimDocumentList>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
|
|
29
|
+
*
|
|
30
|
+
* Update a Document, keying off of its Vellum-generated ID. Particularly useful for updating its metadata.
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
partialUpdate(id: string, request?: Vellum.PatchedDocumentUpdateRequest): Promise<Vellum.DocumentRead>;
|
|
26
34
|
/**
|
|
27
35
|
* <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
28
36
|
*
|
|
@@ -101,6 +101,52 @@ class Documents {
|
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
|
|
107
|
+
*
|
|
108
|
+
* Update a Document, keying off of its Vellum-generated ID. Particularly useful for updating its metadata.
|
|
109
|
+
*
|
|
110
|
+
*/
|
|
111
|
+
async partialUpdate(id, request = {}) {
|
|
112
|
+
const _response = await core.fetcher({
|
|
113
|
+
url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/documents/${id}`),
|
|
114
|
+
method: "PATCH",
|
|
115
|
+
headers: {
|
|
116
|
+
X_API_KEY: await core.Supplier.get(this.options.apiKey),
|
|
117
|
+
},
|
|
118
|
+
contentType: "application/json",
|
|
119
|
+
body: await serializers.PatchedDocumentUpdateRequest.jsonOrThrow(request, {
|
|
120
|
+
unrecognizedObjectKeys: "strip",
|
|
121
|
+
}),
|
|
122
|
+
});
|
|
123
|
+
if (_response.ok) {
|
|
124
|
+
return await serializers.DocumentRead.parseOrThrow(_response.body, {
|
|
125
|
+
unrecognizedObjectKeys: "passthrough",
|
|
126
|
+
allowUnrecognizedUnionMembers: true,
|
|
127
|
+
allowUnrecognizedEnumValues: true,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
if (_response.error.reason === "status-code") {
|
|
131
|
+
throw new errors.VellumError({
|
|
132
|
+
statusCode: _response.error.statusCode,
|
|
133
|
+
body: _response.error.body,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
switch (_response.error.reason) {
|
|
137
|
+
case "non-json":
|
|
138
|
+
throw new errors.VellumError({
|
|
139
|
+
statusCode: _response.error.statusCode,
|
|
140
|
+
body: _response.error.rawBody,
|
|
141
|
+
});
|
|
142
|
+
case "timeout":
|
|
143
|
+
throw new errors.VellumTimeoutError();
|
|
144
|
+
case "unknown":
|
|
145
|
+
throw new errors.VellumError({
|
|
146
|
+
message: _response.error.errorMessage,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
104
150
|
/**
|
|
105
151
|
* <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
106
152
|
*
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "../../../..";
|
|
5
|
+
export interface PatchedDocumentUpdateRequest {
|
|
6
|
+
/** A human-readable label for the document. Defaults to the originally uploaded file's file name. <span style="white-space: nowrap">`non-empty`</span> <span style="white-space: nowrap">`<= 1000 characters`</span> */
|
|
7
|
+
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The current status of the document
|
|
10
|
+
*
|
|
11
|
+
* * `ACTIVE` - Active
|
|
12
|
+
*/
|
|
13
|
+
status?: Vellum.DocumentStatus;
|
|
14
|
+
/** A JSON object containing any metadata associated with the document that you'd like to filter upon later. */
|
|
15
|
+
metadata?: Record<string, unknown>;
|
|
16
|
+
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* * `INACTIVE` - Inactive
|
|
7
7
|
* * `ARCHIVED` - Archived
|
|
8
8
|
*/
|
|
9
|
-
export declare type
|
|
10
|
-
export declare const
|
|
9
|
+
export declare type DeploymentStatus = "ACTIVE" | "INACTIVE" | "ARCHIVED";
|
|
10
|
+
export declare const DeploymentStatus: {
|
|
11
11
|
readonly Active: "ACTIVE";
|
|
12
12
|
readonly Inactive: "INACTIVE";
|
|
13
13
|
readonly Archived: "ARCHIVED";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
6
|
+
exports.DeploymentStatus = void 0;
|
|
7
|
+
exports.DeploymentStatus = {
|
|
8
8
|
Active: "ACTIVE",
|
|
9
9
|
Inactive: "INACTIVE",
|
|
10
10
|
Archived: "ARCHIVED",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export interface DocumentRead {
|
|
6
|
+
id: string;
|
|
7
|
+
/** The unique id of this document as it exists in the user's system. */
|
|
8
|
+
externalId?: string;
|
|
9
|
+
lastUploadedAt: string;
|
|
10
|
+
/** A human-readable label for the document. Defaults to the originally uploaded file's file name. <span style="white-space: nowrap">`<= 1000 characters`</span> */
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* The current processing state of the document
|
|
14
|
+
*
|
|
15
|
+
* * `QUEUED` - Queued
|
|
16
|
+
* * `PROCESSING` - Processing
|
|
17
|
+
* * `PROCESSED` - Processed
|
|
18
|
+
* * `FAILED` - Failed
|
|
19
|
+
*/
|
|
20
|
+
processingState?: Vellum.ProcessingStateEnum;
|
|
21
|
+
/**
|
|
22
|
+
* The current status of the document
|
|
23
|
+
*
|
|
24
|
+
* * `ACTIVE` - Active
|
|
25
|
+
*/
|
|
26
|
+
status?: Vellum.DocumentStatus;
|
|
27
|
+
originalFileUrl?: string;
|
|
28
|
+
processedFileUrl?: string;
|
|
29
|
+
documentToDocumentIndexes: Vellum.DocumentDocumentToDocumentIndex[];
|
|
30
|
+
/** A previously supplied JSON object containing metadata that can filtered on when searching. */
|
|
31
|
+
metadata?: Record<string, unknown>;
|
|
32
|
+
}
|
|
@@ -32,7 +32,7 @@ export interface SlimDocument {
|
|
|
32
32
|
*
|
|
33
33
|
* * `ACTIVE` - Active
|
|
34
34
|
*/
|
|
35
|
-
status?: Vellum.
|
|
35
|
+
status?: Vellum.DocumentStatus;
|
|
36
36
|
/** A list of keywords associated with this document. Originally provided when uploading the document. */
|
|
37
37
|
keywords?: string[];
|
|
38
38
|
documentToDocumentIndexes: Vellum.DocumentDocumentToDocumentIndex[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `NODE` - Node
|
|
6
|
+
* * `WORKFLOW` - Workflow
|
|
7
|
+
*/
|
|
8
|
+
export declare type WorkflowExecutionEventType = "NODE" | "WORKFLOW";
|
|
9
|
+
export declare const WorkflowExecutionEventType: {
|
|
10
|
+
readonly Node: "NODE";
|
|
11
|
+
readonly Workflow: "WORKFLOW";
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WorkflowExecutionEventType = void 0;
|
|
7
|
+
exports.WorkflowExecutionEventType = {
|
|
8
|
+
Node: "NODE",
|
|
9
|
+
Workflow: "WORKFLOW",
|
|
10
|
+
};
|
package/api/types/index.d.ts
CHANGED
|
@@ -8,11 +8,13 @@ export * from "./ContentType";
|
|
|
8
8
|
export * from "./DeploymentNodeResult";
|
|
9
9
|
export * from "./DeploymentNodeResultData";
|
|
10
10
|
export * from "./DeploymentRead";
|
|
11
|
-
export * from "./
|
|
11
|
+
export * from "./DeploymentStatus";
|
|
12
12
|
export * from "./Document";
|
|
13
13
|
export * from "./DocumentDocumentToDocumentIndex";
|
|
14
14
|
export * from "./DocumentIndexRead";
|
|
15
15
|
export * from "./DocumentIndexStatus";
|
|
16
|
+
export * from "./DocumentRead";
|
|
17
|
+
export * from "./DocumentStatus";
|
|
16
18
|
export * from "./EnrichedNormalizedCompletion";
|
|
17
19
|
export * from "./EnvironmentEnum";
|
|
18
20
|
export * from "./EvaluationParams";
|
|
@@ -87,7 +89,6 @@ export * from "./SearchResult";
|
|
|
87
89
|
export * from "./SearchResultMergingRequest";
|
|
88
90
|
export * from "./SearchWeightsRequest";
|
|
89
91
|
export * from "./SlimDocument";
|
|
90
|
-
export * from "./SlimDocumentStatusEnum";
|
|
91
92
|
export * from "./SubmitCompletionActualRequest";
|
|
92
93
|
export * from "./SubmitCompletionActualsErrorResponse";
|
|
93
94
|
export * from "./TerminalNodeChatHistoryResult";
|
|
@@ -101,6 +102,7 @@ export * from "./UploadDocumentErrorResponse";
|
|
|
101
102
|
export * from "./UploadDocumentResponse";
|
|
102
103
|
export * from "./WorkflowEventError";
|
|
103
104
|
export * from "./WorkflowExecutionEventErrorCode";
|
|
105
|
+
export * from "./WorkflowExecutionEventType";
|
|
104
106
|
export * from "./WorkflowExecutionNodeResultEvent";
|
|
105
107
|
export * from "./WorkflowExecutionWorkflowResultEvent";
|
|
106
108
|
export * from "./WorkflowNodeResultData";
|
package/api/types/index.js
CHANGED
|
@@ -24,11 +24,13 @@ __exportStar(require("./ContentType"), exports);
|
|
|
24
24
|
__exportStar(require("./DeploymentNodeResult"), exports);
|
|
25
25
|
__exportStar(require("./DeploymentNodeResultData"), exports);
|
|
26
26
|
__exportStar(require("./DeploymentRead"), exports);
|
|
27
|
-
__exportStar(require("./
|
|
27
|
+
__exportStar(require("./DeploymentStatus"), exports);
|
|
28
28
|
__exportStar(require("./Document"), exports);
|
|
29
29
|
__exportStar(require("./DocumentDocumentToDocumentIndex"), exports);
|
|
30
30
|
__exportStar(require("./DocumentIndexRead"), exports);
|
|
31
31
|
__exportStar(require("./DocumentIndexStatus"), exports);
|
|
32
|
+
__exportStar(require("./DocumentRead"), exports);
|
|
33
|
+
__exportStar(require("./DocumentStatus"), exports);
|
|
32
34
|
__exportStar(require("./EnrichedNormalizedCompletion"), exports);
|
|
33
35
|
__exportStar(require("./EnvironmentEnum"), exports);
|
|
34
36
|
__exportStar(require("./EvaluationParams"), exports);
|
|
@@ -103,7 +105,6 @@ __exportStar(require("./SearchResult"), exports);
|
|
|
103
105
|
__exportStar(require("./SearchResultMergingRequest"), exports);
|
|
104
106
|
__exportStar(require("./SearchWeightsRequest"), exports);
|
|
105
107
|
__exportStar(require("./SlimDocument"), exports);
|
|
106
|
-
__exportStar(require("./SlimDocumentStatusEnum"), exports);
|
|
107
108
|
__exportStar(require("./SubmitCompletionActualRequest"), exports);
|
|
108
109
|
__exportStar(require("./SubmitCompletionActualsErrorResponse"), exports);
|
|
109
110
|
__exportStar(require("./TerminalNodeChatHistoryResult"), exports);
|
|
@@ -117,6 +118,7 @@ __exportStar(require("./UploadDocumentErrorResponse"), exports);
|
|
|
117
118
|
__exportStar(require("./UploadDocumentResponse"), exports);
|
|
118
119
|
__exportStar(require("./WorkflowEventError"), exports);
|
|
119
120
|
__exportStar(require("./WorkflowExecutionEventErrorCode"), exports);
|
|
121
|
+
__exportStar(require("./WorkflowExecutionEventType"), exports);
|
|
120
122
|
__exportStar(require("./WorkflowExecutionNodeResultEvent"), exports);
|
|
121
123
|
__exportStar(require("./WorkflowExecutionWorkflowResultEvent"), exports);
|
|
122
124
|
__exportStar(require("./WorkflowNodeResultData"), exports);
|
|
@@ -12,4 +12,6 @@ export interface ExecuteWorkflowStreamRequest {
|
|
|
12
12
|
inputs: Vellum.WorkflowRequestInputRequest[];
|
|
13
13
|
/** Optionally include a unique identifier for tracking purposes. */
|
|
14
14
|
externalId?: string;
|
|
15
|
+
/** Optionally specify which events you want to receive. Defaults to only WORKFLOW events. Note that the schema of non-WORKFLOW events is unstable and should be used with caution. */
|
|
16
|
+
eventTypes?: Vellum.WorkflowExecutionEventType[];
|
|
15
17
|
}
|
|
@@ -23,6 +23,14 @@ export declare class Documents {
|
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
25
|
list(request?: Vellum.DocumentsListRequest): Promise<Vellum.PaginatedSlimDocumentList>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
|
|
29
|
+
*
|
|
30
|
+
* Update a Document, keying off of its Vellum-generated ID. Particularly useful for updating its metadata.
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
partialUpdate(id: string, request?: Vellum.PatchedDocumentUpdateRequest): Promise<Vellum.DocumentRead>;
|
|
26
34
|
/**
|
|
27
35
|
* <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
28
36
|
*
|
|
@@ -101,6 +101,52 @@ class Documents {
|
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
|
|
107
|
+
*
|
|
108
|
+
* Update a Document, keying off of its Vellum-generated ID. Particularly useful for updating its metadata.
|
|
109
|
+
*
|
|
110
|
+
*/
|
|
111
|
+
async partialUpdate(id, request = {}) {
|
|
112
|
+
const _response = await core.fetcher({
|
|
113
|
+
url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).default, `v1/documents/${id}`),
|
|
114
|
+
method: "PATCH",
|
|
115
|
+
headers: {
|
|
116
|
+
X_API_KEY: await core.Supplier.get(this.options.apiKey),
|
|
117
|
+
},
|
|
118
|
+
contentType: "application/json",
|
|
119
|
+
body: await serializers.PatchedDocumentUpdateRequest.jsonOrThrow(request, {
|
|
120
|
+
unrecognizedObjectKeys: "strip",
|
|
121
|
+
}),
|
|
122
|
+
});
|
|
123
|
+
if (_response.ok) {
|
|
124
|
+
return await serializers.DocumentRead.parseOrThrow(_response.body, {
|
|
125
|
+
unrecognizedObjectKeys: "passthrough",
|
|
126
|
+
allowUnrecognizedUnionMembers: true,
|
|
127
|
+
allowUnrecognizedEnumValues: true,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
if (_response.error.reason === "status-code") {
|
|
131
|
+
throw new errors.VellumError({
|
|
132
|
+
statusCode: _response.error.statusCode,
|
|
133
|
+
body: _response.error.body,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
switch (_response.error.reason) {
|
|
137
|
+
case "non-json":
|
|
138
|
+
throw new errors.VellumError({
|
|
139
|
+
statusCode: _response.error.statusCode,
|
|
140
|
+
body: _response.error.rawBody,
|
|
141
|
+
});
|
|
142
|
+
case "timeout":
|
|
143
|
+
throw new errors.VellumTimeoutError();
|
|
144
|
+
case "unknown":
|
|
145
|
+
throw new errors.VellumError({
|
|
146
|
+
message: _response.error.errorMessage,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
104
150
|
/**
|
|
105
151
|
* <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
|
|
106
152
|
*
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "../../../..";
|
|
5
|
+
export interface PatchedDocumentUpdateRequest {
|
|
6
|
+
/** A human-readable label for the document. Defaults to the originally uploaded file's file name. <span style="white-space: nowrap">`non-empty`</span> <span style="white-space: nowrap">`<= 1000 characters`</span> */
|
|
7
|
+
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The current status of the document
|
|
10
|
+
*
|
|
11
|
+
* * `ACTIVE` - Active
|
|
12
|
+
*/
|
|
13
|
+
status?: Vellum.DocumentStatus;
|
|
14
|
+
/** A JSON object containing any metadata associated with the document that you'd like to filter upon later. */
|
|
15
|
+
metadata?: Record<string, unknown>;
|
|
16
|
+
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* * `INACTIVE` - Inactive
|
|
7
7
|
* * `ARCHIVED` - Archived
|
|
8
8
|
*/
|
|
9
|
-
export declare type
|
|
10
|
-
export declare const
|
|
9
|
+
export declare type DeploymentStatus = "ACTIVE" | "INACTIVE" | "ARCHIVED";
|
|
10
|
+
export declare const DeploymentStatus: {
|
|
11
11
|
readonly Active: "ACTIVE";
|
|
12
12
|
readonly Inactive: "INACTIVE";
|
|
13
13
|
readonly Archived: "ARCHIVED";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
6
|
+
exports.DeploymentStatus = void 0;
|
|
7
|
+
exports.DeploymentStatus = {
|
|
8
8
|
Active: "ACTIVE",
|
|
9
9
|
Inactive: "INACTIVE",
|
|
10
10
|
Archived: "ARCHIVED",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "..";
|
|
5
|
+
export interface DocumentRead {
|
|
6
|
+
id: string;
|
|
7
|
+
/** The unique id of this document as it exists in the user's system. */
|
|
8
|
+
externalId?: string;
|
|
9
|
+
lastUploadedAt: string;
|
|
10
|
+
/** A human-readable label for the document. Defaults to the originally uploaded file's file name. <span style="white-space: nowrap">`<= 1000 characters`</span> */
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* The current processing state of the document
|
|
14
|
+
*
|
|
15
|
+
* * `QUEUED` - Queued
|
|
16
|
+
* * `PROCESSING` - Processing
|
|
17
|
+
* * `PROCESSED` - Processed
|
|
18
|
+
* * `FAILED` - Failed
|
|
19
|
+
*/
|
|
20
|
+
processingState?: Vellum.ProcessingStateEnum;
|
|
21
|
+
/**
|
|
22
|
+
* The current status of the document
|
|
23
|
+
*
|
|
24
|
+
* * `ACTIVE` - Active
|
|
25
|
+
*/
|
|
26
|
+
status?: Vellum.DocumentStatus;
|
|
27
|
+
originalFileUrl?: string;
|
|
28
|
+
processedFileUrl?: string;
|
|
29
|
+
documentToDocumentIndexes: Vellum.DocumentDocumentToDocumentIndex[];
|
|
30
|
+
/** A previously supplied JSON object containing metadata that can filtered on when searching. */
|
|
31
|
+
metadata?: Record<string, unknown>;
|
|
32
|
+
}
|
|
@@ -32,7 +32,7 @@ export interface SlimDocument {
|
|
|
32
32
|
*
|
|
33
33
|
* * `ACTIVE` - Active
|
|
34
34
|
*/
|
|
35
|
-
status?: Vellum.
|
|
35
|
+
status?: Vellum.DocumentStatus;
|
|
36
36
|
/** A list of keywords associated with this document. Originally provided when uploading the document. */
|
|
37
37
|
keywords?: string[];
|
|
38
38
|
documentToDocumentIndexes: Vellum.DocumentDocumentToDocumentIndex[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* * `NODE` - Node
|
|
6
|
+
* * `WORKFLOW` - Workflow
|
|
7
|
+
*/
|
|
8
|
+
export declare type WorkflowExecutionEventType = "NODE" | "WORKFLOW";
|
|
9
|
+
export declare const WorkflowExecutionEventType: {
|
|
10
|
+
readonly Node: "NODE";
|
|
11
|
+
readonly Workflow: "WORKFLOW";
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WorkflowExecutionEventType = void 0;
|
|
7
|
+
exports.WorkflowExecutionEventType = {
|
|
8
|
+
Node: "NODE",
|
|
9
|
+
Workflow: "WORKFLOW",
|
|
10
|
+
};
|
|
@@ -8,11 +8,13 @@ export * from "./ContentType";
|
|
|
8
8
|
export * from "./DeploymentNodeResult";
|
|
9
9
|
export * from "./DeploymentNodeResultData";
|
|
10
10
|
export * from "./DeploymentRead";
|
|
11
|
-
export * from "./
|
|
11
|
+
export * from "./DeploymentStatus";
|
|
12
12
|
export * from "./Document";
|
|
13
13
|
export * from "./DocumentDocumentToDocumentIndex";
|
|
14
14
|
export * from "./DocumentIndexRead";
|
|
15
15
|
export * from "./DocumentIndexStatus";
|
|
16
|
+
export * from "./DocumentRead";
|
|
17
|
+
export * from "./DocumentStatus";
|
|
16
18
|
export * from "./EnrichedNormalizedCompletion";
|
|
17
19
|
export * from "./EnvironmentEnum";
|
|
18
20
|
export * from "./EvaluationParams";
|
|
@@ -87,7 +89,6 @@ export * from "./SearchResult";
|
|
|
87
89
|
export * from "./SearchResultMergingRequest";
|
|
88
90
|
export * from "./SearchWeightsRequest";
|
|
89
91
|
export * from "./SlimDocument";
|
|
90
|
-
export * from "./SlimDocumentStatusEnum";
|
|
91
92
|
export * from "./SubmitCompletionActualRequest";
|
|
92
93
|
export * from "./SubmitCompletionActualsErrorResponse";
|
|
93
94
|
export * from "./TerminalNodeChatHistoryResult";
|
|
@@ -101,6 +102,7 @@ export * from "./UploadDocumentErrorResponse";
|
|
|
101
102
|
export * from "./UploadDocumentResponse";
|
|
102
103
|
export * from "./WorkflowEventError";
|
|
103
104
|
export * from "./WorkflowExecutionEventErrorCode";
|
|
105
|
+
export * from "./WorkflowExecutionEventType";
|
|
104
106
|
export * from "./WorkflowExecutionNodeResultEvent";
|
|
105
107
|
export * from "./WorkflowExecutionWorkflowResultEvent";
|
|
106
108
|
export * from "./WorkflowNodeResultData";
|
package/dist/api/types/index.js
CHANGED
|
@@ -24,11 +24,13 @@ __exportStar(require("./ContentType"), exports);
|
|
|
24
24
|
__exportStar(require("./DeploymentNodeResult"), exports);
|
|
25
25
|
__exportStar(require("./DeploymentNodeResultData"), exports);
|
|
26
26
|
__exportStar(require("./DeploymentRead"), exports);
|
|
27
|
-
__exportStar(require("./
|
|
27
|
+
__exportStar(require("./DeploymentStatus"), exports);
|
|
28
28
|
__exportStar(require("./Document"), exports);
|
|
29
29
|
__exportStar(require("./DocumentDocumentToDocumentIndex"), exports);
|
|
30
30
|
__exportStar(require("./DocumentIndexRead"), exports);
|
|
31
31
|
__exportStar(require("./DocumentIndexStatus"), exports);
|
|
32
|
+
__exportStar(require("./DocumentRead"), exports);
|
|
33
|
+
__exportStar(require("./DocumentStatus"), exports);
|
|
32
34
|
__exportStar(require("./EnrichedNormalizedCompletion"), exports);
|
|
33
35
|
__exportStar(require("./EnvironmentEnum"), exports);
|
|
34
36
|
__exportStar(require("./EvaluationParams"), exports);
|
|
@@ -103,7 +105,6 @@ __exportStar(require("./SearchResult"), exports);
|
|
|
103
105
|
__exportStar(require("./SearchResultMergingRequest"), exports);
|
|
104
106
|
__exportStar(require("./SearchWeightsRequest"), exports);
|
|
105
107
|
__exportStar(require("./SlimDocument"), exports);
|
|
106
|
-
__exportStar(require("./SlimDocumentStatusEnum"), exports);
|
|
107
108
|
__exportStar(require("./SubmitCompletionActualRequest"), exports);
|
|
108
109
|
__exportStar(require("./SubmitCompletionActualsErrorResponse"), exports);
|
|
109
110
|
__exportStar(require("./TerminalNodeChatHistoryResult"), exports);
|
|
@@ -117,6 +118,7 @@ __exportStar(require("./UploadDocumentErrorResponse"), exports);
|
|
|
117
118
|
__exportStar(require("./UploadDocumentResponse"), exports);
|
|
118
119
|
__exportStar(require("./WorkflowEventError"), exports);
|
|
119
120
|
__exportStar(require("./WorkflowExecutionEventErrorCode"), exports);
|
|
121
|
+
__exportStar(require("./WorkflowExecutionEventType"), exports);
|
|
120
122
|
__exportStar(require("./WorkflowExecutionNodeResultEvent"), exports);
|
|
121
123
|
__exportStar(require("./WorkflowExecutionWorkflowResultEvent"), exports);
|
|
122
124
|
__exportStar(require("./WorkflowNodeResultData"), exports);
|
|
@@ -34,4 +34,7 @@ exports.ExecuteWorkflowStreamRequest = core.serialization.object({
|
|
|
34
34
|
releaseTag: core.serialization.property("release_tag", core.serialization.string().optional()),
|
|
35
35
|
inputs: core.serialization.list(core.serialization.lazy(async () => (await Promise.resolve().then(() => __importStar(require("../..")))).WorkflowRequestInputRequest)),
|
|
36
36
|
externalId: core.serialization.property("external_id", core.serialization.string().optional()),
|
|
37
|
+
eventTypes: core.serialization.property("event_types", core.serialization
|
|
38
|
+
.list(core.serialization.lazy(async () => (await Promise.resolve().then(() => __importStar(require("../..")))).WorkflowExecutionEventType))
|
|
39
|
+
.optional()),
|
|
37
40
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
package/dist/serialization/resources/documents/client/requests/PatchedDocumentUpdateRequest.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../..";
|
|
5
|
+
import * as Vellum from "../../../../../api";
|
|
6
|
+
import * as core from "../../../../../core";
|
|
7
|
+
export declare const PatchedDocumentUpdateRequest: core.serialization.Schema<serializers.PatchedDocumentUpdateRequest.Raw, Vellum.PatchedDocumentUpdateRequest>;
|
|
8
|
+
export declare namespace PatchedDocumentUpdateRequest {
|
|
9
|
+
interface Raw {
|
|
10
|
+
label?: string | null;
|
|
11
|
+
status?: serializers.DocumentStatus.Raw | null;
|
|
12
|
+
metadata?: Record<string, unknown> | null;
|
|
13
|
+
}
|
|
14
|
+
}
|