vellum-ai 0.14.3 → 0.14.4
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/Client.js +11 -11
- package/api/resources/adHoc/client/Client.js +1 -1
- package/api/resources/containerImages/client/Client.js +4 -4
- package/api/resources/deployments/client/Client.js +7 -7
- package/api/resources/documentIndexes/client/Client.js +8 -8
- package/api/resources/documentIndexes/client/requests/DocumentIndexesListRequest.d.ts +2 -2
- package/api/resources/documents/client/Client.d.ts +0 -1
- package/api/resources/documents/client/Client.js +5 -6
- package/api/resources/folderEntities/client/Client.d.ts +0 -1
- package/api/resources/folderEntities/client/Client.js +2 -3
- package/api/resources/folderEntities/client/requests/FolderEntitiesListRequest.d.ts +2 -3
- package/api/resources/metricDefinitions/client/Client.js +2 -2
- package/api/resources/mlModels/client/Client.js +1 -1
- package/api/resources/organizations/client/Client.js +1 -1
- package/api/resources/sandboxes/client/Client.js +3 -3
- package/api/resources/testSuiteRuns/client/Client.js +3 -3
- package/api/resources/testSuiteRuns/client/requests/TestSuiteRunsListExecutionsRequest.d.ts +0 -1
- package/api/resources/testSuites/client/Client.js +4 -4
- package/api/resources/workflowDeployments/client/Client.js +6 -6
- package/api/resources/workflowSandboxes/client/Client.js +1 -1
- package/api/resources/workflows/client/Client.js +4 -3
- package/api/resources/workspaceSecrets/client/Client.js +2 -2
- package/api/resources/workspaces/client/Client.js +1 -1
- package/api/types/AddOpenaiApiKeyEnum.d.ts +1 -1
- package/api/types/ChatMessageRole.d.ts +4 -4
- package/api/types/CodeExecutionRuntime.d.ts +2 -2
- package/api/types/ConditionCombinator.d.ts +2 -2
- package/api/types/DeploymentRead.d.ts +5 -5
- package/api/types/DeploymentReleaseTagRead.d.ts +2 -2
- package/api/types/DocumentDocumentToDocumentIndex.d.ts +5 -5
- package/api/types/DocumentIndexRead.d.ts +5 -5
- package/api/types/DocumentProcessingState.d.ts +5 -5
- package/api/types/DocumentRead.d.ts +1 -1
- package/api/types/DocumentStatus.d.ts +1 -1
- package/api/types/EnrichedNormalizedCompletion.d.ts +3 -3
- package/api/types/EntityStatus.d.ts +2 -2
- package/api/types/EntityVisibility.d.ts +4 -4
- package/api/types/EnvironmentEnum.d.ts +3 -3
- package/api/types/EphemeralPromptCacheConfigTypeEnum.d.ts +1 -1
- package/api/types/FinishReasonEnum.d.ts +3 -3
- package/api/types/GenerateOptionsRequest.d.ts +2 -2
- package/api/types/IndexingStateEnum.d.ts +5 -5
- package/api/types/IterationStateEnum.d.ts +3 -3
- package/api/types/LogicalOperator.d.ts +24 -24
- package/api/types/LogprobsEnum.d.ts +2 -2
- package/api/types/MetadataFilterRuleCombinator.d.ts +2 -2
- package/api/types/MethodEnum.d.ts +5 -5
- package/api/types/NewMemberJoinBehaviorEnum.d.ts +3 -3
- package/api/types/ProcessingFailureReasonEnum.d.ts +2 -2
- package/api/types/PromptBlockState.d.ts +2 -2
- package/api/types/ReleaseTagSource.d.ts +2 -2
- package/api/types/SecretTypeEnum.d.ts +3 -3
- package/api/types/SlimDeploymentRead.d.ts +5 -5
- package/api/types/SlimDocument.d.ts +3 -3
- package/api/types/SlimDocumentDocumentToDocumentIndex.d.ts +5 -5
- package/api/types/SlimWorkflowDeployment.d.ts +5 -5
- package/api/types/TestSuiteRunRead.d.ts +5 -5
- package/api/types/TestSuiteRunState.d.ts +5 -5
- package/api/types/UnitEnum.d.ts +1 -1
- package/api/types/VellumErrorCodeEnum.d.ts +6 -6
- package/api/types/VellumVariableType.d.ts +11 -11
- package/api/types/WorkflowDeploymentRead.d.ts +5 -5
- package/api/types/WorkflowExecutionEventErrorCode.d.ts +8 -8
- package/api/types/WorkflowExecutionEventType.d.ts +2 -2
- package/api/types/WorkflowNodeResultEventState.d.ts +4 -4
- package/api/types/WorkflowReleaseTagRead.d.ts +2 -2
- package/core/fetcher/Fetcher.js +4 -3
- package/core/fetcher/getRequestBody.js +2 -1
- package/core/fetcher/requestWithRetries.js +1 -1
- package/core/form-data-utils/FormDataWrapper.js +6 -2
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/schemas/Schema.d.ts +1 -0
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +21 -17
- package/core/schemas/builders/object/object.js +1 -0
- package/core/schemas/builders/record/record.js +1 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +38 -0
- package/dist/Client.js +11 -11
- package/dist/api/resources/adHoc/client/Client.js +1 -1
- package/dist/api/resources/containerImages/client/Client.js +4 -4
- package/dist/api/resources/deployments/client/Client.js +7 -7
- package/dist/api/resources/documentIndexes/client/Client.js +8 -8
- package/dist/api/resources/documentIndexes/client/requests/DocumentIndexesListRequest.d.ts +2 -2
- package/dist/api/resources/documents/client/Client.d.ts +0 -1
- package/dist/api/resources/documents/client/Client.js +5 -6
- package/dist/api/resources/folderEntities/client/Client.d.ts +0 -1
- package/dist/api/resources/folderEntities/client/Client.js +2 -3
- package/dist/api/resources/folderEntities/client/requests/FolderEntitiesListRequest.d.ts +2 -3
- package/dist/api/resources/metricDefinitions/client/Client.js +2 -2
- package/dist/api/resources/mlModels/client/Client.js +1 -1
- package/dist/api/resources/organizations/client/Client.js +1 -1
- package/dist/api/resources/sandboxes/client/Client.js +3 -3
- package/dist/api/resources/testSuiteRuns/client/Client.js +3 -3
- package/dist/api/resources/testSuiteRuns/client/requests/TestSuiteRunsListExecutionsRequest.d.ts +0 -1
- package/dist/api/resources/testSuites/client/Client.js +4 -4
- package/dist/api/resources/workflowDeployments/client/Client.js +6 -6
- package/dist/api/resources/workflowSandboxes/client/Client.js +1 -1
- package/dist/api/resources/workflows/client/Client.js +4 -3
- package/dist/api/resources/workspaceSecrets/client/Client.js +2 -2
- package/dist/api/resources/workspaces/client/Client.js +1 -1
- package/dist/api/types/AddOpenaiApiKeyEnum.d.ts +1 -1
- package/dist/api/types/ChatMessageRole.d.ts +4 -4
- package/dist/api/types/CodeExecutionRuntime.d.ts +2 -2
- package/dist/api/types/ConditionCombinator.d.ts +2 -2
- package/dist/api/types/DeploymentRead.d.ts +5 -5
- package/dist/api/types/DeploymentReleaseTagRead.d.ts +2 -2
- package/dist/api/types/DocumentDocumentToDocumentIndex.d.ts +5 -5
- package/dist/api/types/DocumentIndexRead.d.ts +5 -5
- package/dist/api/types/DocumentProcessingState.d.ts +5 -5
- package/dist/api/types/DocumentRead.d.ts +1 -1
- package/dist/api/types/DocumentStatus.d.ts +1 -1
- package/dist/api/types/EnrichedNormalizedCompletion.d.ts +3 -3
- package/dist/api/types/EntityStatus.d.ts +2 -2
- package/dist/api/types/EntityVisibility.d.ts +4 -4
- package/dist/api/types/EnvironmentEnum.d.ts +3 -3
- package/dist/api/types/EphemeralPromptCacheConfigTypeEnum.d.ts +1 -1
- package/dist/api/types/FinishReasonEnum.d.ts +3 -3
- package/dist/api/types/GenerateOptionsRequest.d.ts +2 -2
- package/dist/api/types/IndexingStateEnum.d.ts +5 -5
- package/dist/api/types/IterationStateEnum.d.ts +3 -3
- package/dist/api/types/LogicalOperator.d.ts +24 -24
- package/dist/api/types/LogprobsEnum.d.ts +2 -2
- package/dist/api/types/MetadataFilterRuleCombinator.d.ts +2 -2
- package/dist/api/types/MethodEnum.d.ts +5 -5
- package/dist/api/types/NewMemberJoinBehaviorEnum.d.ts +3 -3
- package/dist/api/types/ProcessingFailureReasonEnum.d.ts +2 -2
- package/dist/api/types/PromptBlockState.d.ts +2 -2
- package/dist/api/types/ReleaseTagSource.d.ts +2 -2
- package/dist/api/types/SecretTypeEnum.d.ts +3 -3
- package/dist/api/types/SlimDeploymentRead.d.ts +5 -5
- package/dist/api/types/SlimDocument.d.ts +3 -3
- package/dist/api/types/SlimDocumentDocumentToDocumentIndex.d.ts +5 -5
- package/dist/api/types/SlimWorkflowDeployment.d.ts +5 -5
- package/dist/api/types/TestSuiteRunRead.d.ts +5 -5
- package/dist/api/types/TestSuiteRunState.d.ts +5 -5
- package/dist/api/types/UnitEnum.d.ts +1 -1
- package/dist/api/types/VellumErrorCodeEnum.d.ts +6 -6
- package/dist/api/types/VellumVariableType.d.ts +11 -11
- package/dist/api/types/WorkflowDeploymentRead.d.ts +5 -5
- package/dist/api/types/WorkflowExecutionEventErrorCode.d.ts +8 -8
- package/dist/api/types/WorkflowExecutionEventType.d.ts +2 -2
- package/dist/api/types/WorkflowNodeResultEventState.d.ts +4 -4
- package/dist/api/types/WorkflowReleaseTagRead.d.ts +2 -2
- package/dist/core/fetcher/Fetcher.js +4 -3
- package/dist/core/fetcher/getRequestBody.js +2 -1
- package/dist/core/fetcher/requestWithRetries.js +1 -1
- package/dist/core/form-data-utils/FormDataWrapper.js +6 -2
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/schemas/Schema.d.ts +1 -0
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +21 -17
- package/dist/core/schemas/builders/object/object.js +1 -0
- package/dist/core/schemas/builders/record/record.js +1 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +38 -0
- package/dist/errors/VellumError.js +2 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/errors/VellumError.js +2 -1
- package/package.json +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* * `SYSTEM` - System
|
|
6
|
+
* * `USER` - User
|
|
7
7
|
*/
|
|
8
8
|
export type ReleaseTagSource = "SYSTEM" | "USER";
|
|
9
9
|
export declare const ReleaseTagSource: {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* * `USER_DEFINED` - User Defined
|
|
6
|
+
* * `HMAC` - Hmac
|
|
7
|
+
* * `INTERNAL_API_KEY` - Internal Api Key
|
|
8
8
|
*/
|
|
9
9
|
export type SecretTypeEnum = "USER_DEFINED" | "HMAC" | "INTERNAL_API_KEY";
|
|
10
10
|
export declare const SecretTypeEnum: {
|
|
@@ -12,16 +12,16 @@ export interface SlimDeploymentRead {
|
|
|
12
12
|
/**
|
|
13
13
|
* The current status of the deployment
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* * `ACTIVE` - Active
|
|
16
|
+
* * `ARCHIVED` - Archived
|
|
17
17
|
*/
|
|
18
18
|
status?: Vellum.EntityStatus;
|
|
19
19
|
/**
|
|
20
20
|
* The environment this deployment is used in
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* * `DEVELOPMENT` - Development
|
|
23
|
+
* * `STAGING` - Staging
|
|
24
|
+
* * `PRODUCTION` - Production
|
|
25
25
|
*/
|
|
26
26
|
environment?: Vellum.EnvironmentEnum;
|
|
27
27
|
lastDeployedOn: Date;
|
|
@@ -15,14 +15,14 @@ export interface SlimDocument {
|
|
|
15
15
|
/**
|
|
16
16
|
* An enum value representing why the document could not be processed. Is null unless processing_state is FAILED.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* * `EXCEEDED_CHARACTER_LIMIT` - Exceeded Character Limit
|
|
19
|
+
* * `INVALID_FILE` - Invalid File
|
|
20
20
|
*/
|
|
21
21
|
processingFailureReason?: Vellum.ProcessingFailureReasonEnum;
|
|
22
22
|
/**
|
|
23
23
|
* The document's current status.
|
|
24
24
|
*
|
|
25
|
-
*
|
|
25
|
+
* * `ACTIVE` - Active
|
|
26
26
|
*/
|
|
27
27
|
status?: Vellum.DocumentStatus;
|
|
28
28
|
/** A list of keywords associated with this document. Originally provided when uploading the document. */
|
|
@@ -13,11 +13,11 @@ export interface SlimDocumentDocumentToDocumentIndex {
|
|
|
13
13
|
/**
|
|
14
14
|
* An enum value representing where this document is along its indexing lifecycle for this index.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
16
|
+
* * `AWAITING_PROCESSING` - Awaiting Processing
|
|
17
|
+
* * `QUEUED` - Queued
|
|
18
|
+
* * `INDEXING` - Indexing
|
|
19
|
+
* * `INDEXED` - Indexed
|
|
20
|
+
* * `FAILED` - Failed
|
|
21
21
|
*/
|
|
22
22
|
indexingState?: Vellum.IndexingStateEnum;
|
|
23
23
|
}
|
|
@@ -11,16 +11,16 @@ export interface SlimWorkflowDeployment {
|
|
|
11
11
|
/**
|
|
12
12
|
* The current status of the workflow deployment
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* * `ACTIVE` - Active
|
|
15
|
+
* * `ARCHIVED` - Archived
|
|
16
16
|
*/
|
|
17
17
|
status?: Vellum.EntityStatus;
|
|
18
18
|
/**
|
|
19
19
|
* The environment this workflow deployment is used in
|
|
20
20
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* * `DEVELOPMENT` - Development
|
|
22
|
+
* * `STAGING` - Staging
|
|
23
|
+
* * `PRODUCTION` - Production
|
|
24
24
|
*/
|
|
25
25
|
environment?: Vellum.EnvironmentEnum;
|
|
26
26
|
created: Date;
|
|
@@ -9,11 +9,11 @@ export interface TestSuiteRunRead {
|
|
|
9
9
|
/**
|
|
10
10
|
* The current state of this run
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
12
|
+
* * `QUEUED` - Queued
|
|
13
|
+
* * `RUNNING` - Running
|
|
14
|
+
* * `COMPLETE` - Complete
|
|
15
|
+
* * `FAILED` - Failed
|
|
16
|
+
* * `CANCELLED` - Cancelled
|
|
17
17
|
*/
|
|
18
18
|
state: Vellum.TestSuiteRunState;
|
|
19
19
|
/** Configuration that defines how the Test Suite should be run */
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* * `QUEUED` - Queued
|
|
6
|
+
* * `RUNNING` - Running
|
|
7
|
+
* * `COMPLETE` - Complete
|
|
8
|
+
* * `FAILED` - Failed
|
|
9
|
+
* * `CANCELLED` - Cancelled
|
|
10
10
|
*/
|
|
11
11
|
export type TestSuiteRunState = "QUEUED" | "RUNNING" | "COMPLETE" | "FAILED" | "CANCELLED";
|
|
12
12
|
export declare const TestSuiteRunState: {
|
package/api/types/UnitEnum.d.ts
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* * `INVALID_REQUEST` - INVALID_REQUEST
|
|
6
|
+
* * `INVALID_INPUTS` - INVALID_INPUTS
|
|
7
|
+
* * `PROVIDER_ERROR` - PROVIDER_ERROR
|
|
8
|
+
* * `REQUEST_TIMEOUT` - REQUEST_TIMEOUT
|
|
9
|
+
* * `INTERNAL_SERVER_ERROR` - INTERNAL_SERVER_ERROR
|
|
10
|
+
* * `USER_DEFINED_ERROR` - USER_DEFINED_ERROR
|
|
11
11
|
*/
|
|
12
12
|
export type VellumErrorCodeEnum = "INVALID_REQUEST" | "INVALID_INPUTS" | "PROVIDER_ERROR" | "REQUEST_TIMEOUT" | "INTERNAL_SERVER_ERROR" | "USER_DEFINED_ERROR";
|
|
13
13
|
export declare const VellumErrorCodeEnum: {
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
5
|
+
* * `STRING` - STRING
|
|
6
|
+
* * `NUMBER` - NUMBER
|
|
7
|
+
* * `JSON` - JSON
|
|
8
|
+
* * `CHAT_HISTORY` - CHAT_HISTORY
|
|
9
|
+
* * `SEARCH_RESULTS` - SEARCH_RESULTS
|
|
10
|
+
* * `ERROR` - ERROR
|
|
11
|
+
* * `ARRAY` - ARRAY
|
|
12
|
+
* * `FUNCTION_CALL` - FUNCTION_CALL
|
|
13
|
+
* * `IMAGE` - IMAGE
|
|
14
|
+
* * `AUDIO` - AUDIO
|
|
15
|
+
* * `NULL` - NULL
|
|
16
16
|
*/
|
|
17
17
|
export type VellumVariableType = "STRING" | "NUMBER" | "JSON" | "CHAT_HISTORY" | "SEARCH_RESULTS" | "ERROR" | "ARRAY" | "FUNCTION_CALL" | "IMAGE" | "AUDIO" | "NULL";
|
|
18
18
|
export declare const VellumVariableType: {
|
|
@@ -11,16 +11,16 @@ export interface WorkflowDeploymentRead {
|
|
|
11
11
|
/**
|
|
12
12
|
* The current status of the workflow deployment
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* * `ACTIVE` - Active
|
|
15
|
+
* * `ARCHIVED` - Archived
|
|
16
16
|
*/
|
|
17
17
|
status?: Vellum.EntityStatus;
|
|
18
18
|
/**
|
|
19
19
|
* The environment this workflow deployment is used in
|
|
20
20
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* * `DEVELOPMENT` - Development
|
|
22
|
+
* * `STAGING` - Staging
|
|
23
|
+
* * `PRODUCTION` - Production
|
|
24
24
|
*/
|
|
25
25
|
environment?: Vellum.EnvironmentEnum;
|
|
26
26
|
created: Date;
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
5
|
+
* * `WORKFLOW_INITIALIZATION` - WORKFLOW_INITIALIZATION
|
|
6
|
+
* * `WORKFLOW_CANCELLED` - WORKFLOW_CANCELLED
|
|
7
|
+
* * `NODE_EXECUTION_COUNT_LIMIT_REACHED` - NODE_EXECUTION_COUNT_LIMIT_REACHED
|
|
8
|
+
* * `INTERNAL_SERVER_ERROR` - INTERNAL_SERVER_ERROR
|
|
9
|
+
* * `NODE_EXECUTION` - NODE_EXECUTION
|
|
10
|
+
* * `LLM_PROVIDER` - LLM_PROVIDER
|
|
11
|
+
* * `INVALID_TEMPLATE` - INVALID_TEMPLATE
|
|
12
|
+
* * `USER_DEFINED_ERROR` - USER_DEFINED_ERROR
|
|
13
13
|
*/
|
|
14
14
|
export type WorkflowExecutionEventErrorCode = "WORKFLOW_INITIALIZATION" | "WORKFLOW_CANCELLED" | "NODE_EXECUTION_COUNT_LIMIT_REACHED" | "INTERNAL_SERVER_ERROR" | "NODE_EXECUTION" | "LLM_PROVIDER" | "INVALID_TEMPLATE" | "USER_DEFINED_ERROR";
|
|
15
15
|
export declare const WorkflowExecutionEventErrorCode: {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* * `NODE` - NODE
|
|
6
|
+
* * `WORKFLOW` - WORKFLOW
|
|
7
7
|
*/
|
|
8
8
|
export type WorkflowExecutionEventType = "NODE" | "WORKFLOW";
|
|
9
9
|
export declare const WorkflowExecutionEventType: {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* * `INITIATED` - INITIATED
|
|
6
|
+
* * `STREAMING` - STREAMING
|
|
7
|
+
* * `FULFILLED` - FULFILLED
|
|
8
|
+
* * `REJECTED` - REJECTED
|
|
9
9
|
*/
|
|
10
10
|
export type WorkflowNodeResultEventState = "INITIATED" | "STREAMING" | "FULFILLED" | "REJECTED";
|
|
11
11
|
export declare const WorkflowNodeResultEventState: {
|
|
@@ -8,8 +8,8 @@ export interface WorkflowReleaseTagRead {
|
|
|
8
8
|
/**
|
|
9
9
|
* The source of how the Release Tag was originally created
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* * `SYSTEM` - System
|
|
12
|
+
* * `USER` - User
|
|
13
13
|
*/
|
|
14
14
|
source: Vellum.ReleaseTagSource;
|
|
15
15
|
/** The Workflow Deployment History Item that this Release Tag is associated with */
|
package/core/fetcher/Fetcher.js
CHANGED
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.fetcher = void 0;
|
|
13
13
|
exports.fetcherImpl = fetcherImpl;
|
|
14
|
+
const json_1 = require("../json");
|
|
14
15
|
const createRequestUrl_1 = require("./createRequestUrl");
|
|
15
16
|
const getFetchFn_1 = require("./getFetchFn");
|
|
16
17
|
const getRequestBody_1 = require("./getRequestBody");
|
|
@@ -31,7 +32,7 @@ function fetcherImpl(args) {
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
const url = (0, createRequestUrl_1.createRequestUrl)(args.url, args.queryParameters);
|
|
34
|
-
|
|
35
|
+
const requestBody = yield (0, getRequestBody_1.getRequestBody)({
|
|
35
36
|
body: args.body,
|
|
36
37
|
type: args.requestType === "json" ? "json" : "other",
|
|
37
38
|
});
|
|
@@ -40,7 +41,7 @@ function fetcherImpl(args) {
|
|
|
40
41
|
const response = yield (0, requestWithRetries_1.requestWithRetries)(() => __awaiter(this, void 0, void 0, function* () {
|
|
41
42
|
return (0, makeRequest_1.makeRequest)(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
|
|
42
43
|
}), args.maxRetries);
|
|
43
|
-
|
|
44
|
+
const responseBody = yield (0, getResponseBody_1.getResponseBody)(response, args.responseType);
|
|
44
45
|
if (response.status >= 200 && response.status < 400) {
|
|
45
46
|
return {
|
|
46
47
|
ok: true,
|
|
@@ -90,7 +91,7 @@ function fetcherImpl(args) {
|
|
|
90
91
|
ok: false,
|
|
91
92
|
error: {
|
|
92
93
|
reason: "unknown",
|
|
93
|
-
errorMessage:
|
|
94
|
+
errorMessage: (0, json_1.toJson)(error),
|
|
94
95
|
},
|
|
95
96
|
};
|
|
96
97
|
}
|
|
@@ -10,10 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.getRequestBody = getRequestBody;
|
|
13
|
+
const json_1 = require("../json");
|
|
13
14
|
function getRequestBody(_a) {
|
|
14
15
|
return __awaiter(this, arguments, void 0, function* ({ body, type }) {
|
|
15
16
|
if (type.includes("json")) {
|
|
16
|
-
return
|
|
17
|
+
return (0, json_1.toJson)(body);
|
|
17
18
|
}
|
|
18
19
|
else {
|
|
19
20
|
return body;
|
|
@@ -23,7 +23,7 @@ function requestWithRetries(requestFn_1) {
|
|
|
23
23
|
return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
24
24
|
let response = yield requestFn();
|
|
25
25
|
for (let i = 0; i < maxRetries; ++i) {
|
|
26
|
-
if ([408,
|
|
26
|
+
if ([408, 429].includes(response.status) || response.status >= 500) {
|
|
27
27
|
// Calculate base delay using exponential backoff (in milliseconds)
|
|
28
28
|
const baseDelay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY);
|
|
29
29
|
// Add jitter to the delay
|
|
@@ -167,11 +167,15 @@ class WebFormData {
|
|
|
167
167
|
}
|
|
168
168
|
appendFile(key, value, fileName) {
|
|
169
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
-
var _a;
|
|
170
|
+
var _a, _b;
|
|
171
171
|
if (fileName == null && isNamedValue(value)) {
|
|
172
172
|
fileName = value.name;
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
if (value instanceof Blob) {
|
|
175
|
+
(_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value, fileName);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
(_b = this.fd) === null || _b === void 0 ? void 0 : _b.append(key, new Blob([value]), fileName);
|
|
175
179
|
});
|
|
176
180
|
}
|
|
177
181
|
getRequest() {
|
package/core/json.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serialize a value to JSON
|
|
3
|
+
* @param value A JavaScript value, usually an object or array, to be converted.
|
|
4
|
+
* @param replacer A function that transforms the results.
|
|
5
|
+
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
|
|
6
|
+
* @returns JSON string
|
|
7
|
+
*/
|
|
8
|
+
export declare const toJson: (value: unknown, replacer?: (this: unknown, key: string, value: unknown) => unknown, space?: string | number) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Parse JSON string to object, array, or other type
|
|
11
|
+
* @param text A valid JSON string.
|
|
12
|
+
* @param reviver A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.
|
|
13
|
+
* @returns Parsed object, array, or other type
|
|
14
|
+
*/
|
|
15
|
+
export declare function fromJson<T = unknown>(text: string, reviver?: (this: unknown, key: string, value: unknown) => unknown): T;
|
package/core/json.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toJson = void 0;
|
|
4
|
+
exports.fromJson = fromJson;
|
|
5
|
+
/**
|
|
6
|
+
* Serialize a value to JSON
|
|
7
|
+
* @param value A JavaScript value, usually an object or array, to be converted.
|
|
8
|
+
* @param replacer A function that transforms the results.
|
|
9
|
+
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
|
|
10
|
+
* @returns JSON string
|
|
11
|
+
*/
|
|
12
|
+
const toJson = (value, replacer, space) => {
|
|
13
|
+
return JSON.stringify(value, replacer, space);
|
|
14
|
+
};
|
|
15
|
+
exports.toJson = toJson;
|
|
16
|
+
/**
|
|
17
|
+
* Parse JSON string to object, array, or other type
|
|
18
|
+
* @param text A valid JSON string.
|
|
19
|
+
* @param reviver A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.
|
|
20
|
+
* @returns Parsed object, array, or other type
|
|
21
|
+
*/
|
|
22
|
+
function fromJson(text, reviver) {
|
|
23
|
+
return JSON.parse(text, reviver);
|
|
24
|
+
}
|
package/core/schemas/Schema.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare const SchemaType: {
|
|
|
26
26
|
readonly UNDISCRIMINATED_UNION: "undiscriminatedUnion";
|
|
27
27
|
readonly NULLABLE: "nullable";
|
|
28
28
|
readonly OPTIONAL: "optional";
|
|
29
|
+
readonly OPTIONAL_NULLABLE: "optionalNullable";
|
|
29
30
|
};
|
|
30
31
|
export type SchemaType = (typeof SchemaType)[keyof typeof SchemaType];
|
|
31
32
|
export type MaybeValid<T> = Valid<T> | Invalid;
|
package/core/schemas/Schema.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Schema } from "../../Schema";
|
|
2
|
-
export declare function bigint(): Schema<
|
|
2
|
+
export declare function bigint(): Schema<bigint | number, bigint>;
|
|
@@ -8,30 +8,30 @@ const schema_utils_1 = require("../schema-utils");
|
|
|
8
8
|
function bigint() {
|
|
9
9
|
const baseSchema = {
|
|
10
10
|
parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
|
|
11
|
-
if (typeof raw
|
|
11
|
+
if (typeof raw === "bigint") {
|
|
12
12
|
return {
|
|
13
|
-
ok:
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
path: breadcrumbsPrefix,
|
|
17
|
-
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "string"),
|
|
18
|
-
},
|
|
19
|
-
],
|
|
13
|
+
ok: true,
|
|
14
|
+
value: raw,
|
|
20
15
|
};
|
|
21
16
|
}
|
|
22
|
-
|
|
23
|
-
ok: true,
|
|
24
|
-
value: BigInt(raw),
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
|
|
28
|
-
if (typeof bigint === "bigint") {
|
|
17
|
+
if (typeof raw === "number") {
|
|
29
18
|
return {
|
|
30
19
|
ok: true,
|
|
31
|
-
value:
|
|
20
|
+
value: BigInt(raw),
|
|
32
21
|
};
|
|
33
22
|
}
|
|
34
|
-
|
|
23
|
+
return {
|
|
24
|
+
ok: false,
|
|
25
|
+
errors: [
|
|
26
|
+
{
|
|
27
|
+
path: breadcrumbsPrefix,
|
|
28
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "bigint | number"),
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
|
|
34
|
+
if (typeof bigint !== "bigint") {
|
|
35
35
|
return {
|
|
36
36
|
ok: false,
|
|
37
37
|
errors: [
|
|
@@ -42,6 +42,10 @@ function bigint() {
|
|
|
42
42
|
],
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
+
return {
|
|
46
|
+
ok: true,
|
|
47
|
+
value: bigint,
|
|
48
|
+
};
|
|
45
49
|
},
|
|
46
50
|
getType: () => Schema_1.SchemaType.BIGINT,
|
|
47
51
|
};
|
|
@@ -56,8 +56,7 @@ function validateAndTransformRecord({ value, isKeyNumeric, transformKey, transfo
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
return (0, entries_1.entries)(value).reduce((accPromise, [stringKey, value]) => {
|
|
59
|
-
|
|
60
|
-
if (value == null) {
|
|
59
|
+
if (value === undefined) {
|
|
61
60
|
return accPromise;
|
|
62
61
|
}
|
|
63
62
|
const acc = accPromise;
|
|
@@ -2,6 +2,7 @@ import { BaseSchema, Schema, SchemaOptions } from "../../Schema";
|
|
|
2
2
|
export interface SchemaUtils<Raw, Parsed> {
|
|
3
3
|
nullable: () => Schema<Raw | null, Parsed | null>;
|
|
4
4
|
optional: () => Schema<Raw | null | undefined, Parsed | undefined>;
|
|
5
|
+
optionalNullable: () => Schema<Raw | null | undefined, Parsed | null | undefined>;
|
|
5
6
|
transform: <Transformed>(transformer: SchemaTransformer<Parsed, Transformed>) => Schema<Raw, Transformed>;
|
|
6
7
|
parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed;
|
|
7
8
|
jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw;
|
|
@@ -16,4 +17,5 @@ export declare function getSchemaUtils<Raw, Parsed>(schema: BaseSchema<Raw, Pars
|
|
|
16
17
|
*/
|
|
17
18
|
export declare function nullable<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null, Parsed | null>;
|
|
18
19
|
export declare function optional<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null | undefined, Parsed | undefined>;
|
|
20
|
+
export declare function optionalNullable<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null | undefined, Parsed | null | undefined>;
|
|
19
21
|
export declare function transform<Raw, Parsed, Transformed>(schema: BaseSchema<Raw, Parsed>, transformer: SchemaTransformer<Parsed, Transformed>): Schema<Raw, Transformed>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getSchemaUtils = getSchemaUtils;
|
|
4
4
|
exports.nullable = nullable;
|
|
5
5
|
exports.optional = optional;
|
|
6
|
+
exports.optionalNullable = optionalNullable;
|
|
6
7
|
exports.transform = transform;
|
|
7
8
|
const Schema_1 = require("../../Schema");
|
|
8
9
|
const JsonError_1 = require("./JsonError");
|
|
@@ -11,6 +12,7 @@ function getSchemaUtils(schema) {
|
|
|
11
12
|
return {
|
|
12
13
|
nullable: () => nullable(schema),
|
|
13
14
|
optional: () => optional(schema),
|
|
15
|
+
optionalNullable: () => optionalNullable(schema),
|
|
14
16
|
transform: (transformer) => transform(schema, transformer),
|
|
15
17
|
parseOrThrow: (raw, opts) => {
|
|
16
18
|
const parsed = schema.parse(raw, opts);
|
|
@@ -85,6 +87,42 @@ function optional(schema) {
|
|
|
85
87
|
};
|
|
86
88
|
return Object.assign(Object.assign({}, baseSchema), getSchemaUtils(baseSchema));
|
|
87
89
|
}
|
|
90
|
+
function optionalNullable(schema) {
|
|
91
|
+
const baseSchema = {
|
|
92
|
+
parse: (raw, opts) => {
|
|
93
|
+
if (raw === undefined) {
|
|
94
|
+
return {
|
|
95
|
+
ok: true,
|
|
96
|
+
value: undefined,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
if (raw === null) {
|
|
100
|
+
return {
|
|
101
|
+
ok: true,
|
|
102
|
+
value: null,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return schema.parse(raw, opts);
|
|
106
|
+
},
|
|
107
|
+
json: (parsed, opts) => {
|
|
108
|
+
if (parsed === undefined) {
|
|
109
|
+
return {
|
|
110
|
+
ok: true,
|
|
111
|
+
value: undefined,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
if (parsed === null) {
|
|
115
|
+
return {
|
|
116
|
+
ok: true,
|
|
117
|
+
value: null,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return schema.json(parsed, opts);
|
|
121
|
+
},
|
|
122
|
+
getType: () => Schema_1.SchemaType.OPTIONAL_NULLABLE,
|
|
123
|
+
};
|
|
124
|
+
return Object.assign(Object.assign({}, baseSchema), getSchemaUtils(baseSchema));
|
|
125
|
+
}
|
|
88
126
|
function transform(schema, transformer) {
|
|
89
127
|
const baseSchema = {
|
|
90
128
|
parse: (raw, opts) => {
|