@becomposable/common
Advanced tools
Comparing version 0.35.0 to 0.36.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExecutionRunRefSelect = exports.RunSourceTypes = exports.ExecutionRunStatus = exports.InteractionStatus = exports.InteractionRefPopulate = void 0; | ||
exports.ExecutionRunRefSelect = exports.RunSourceTypes = exports.MEMORY_INPUT_PREFIX = exports.ExecutionRunStatus = exports.InteractionStatus = exports.InteractionRefPopulate = void 0; | ||
exports.InteractionRefPopulate = "id name description status version latest tags updated_at prompts"; | ||
@@ -18,2 +18,3 @@ var InteractionStatus; | ||
})(ExecutionRunStatus || (exports.ExecutionRunStatus = ExecutionRunStatus = {})); | ||
exports.MEMORY_INPUT_PREFIX = "memory:"; | ||
var RunSourceTypes; | ||
@@ -20,0 +21,0 @@ (function (RunSourceTypes) { |
@@ -15,2 +15,3 @@ export const InteractionRefPopulate = "id name description status version latest tags updated_at prompts"; | ||
})(ExecutionRunStatus || (ExecutionRunStatus = {})); | ||
export const MEMORY_INPUT_PREFIX = "memory:"; | ||
export var RunSourceTypes; | ||
@@ -17,0 +18,0 @@ (function (RunSourceTypes) { |
@@ -68,2 +68,7 @@ import type { JSONObject } from "@llumiverse/core"; | ||
result_schema?: JSONSchema4; | ||
/** | ||
* A default mapping which maps a memory pack to the interaction params. | ||
* If not defined the memory pack metadata will be used as the interaction params | ||
*/ | ||
memory_mapping?: Record<string, string>; | ||
cache_policy?: CachePolicy; | ||
@@ -100,5 +105,15 @@ model: string; | ||
} | ||
export interface InteractionExecutionPayload<Input = any> { | ||
data?: Input; | ||
export declare const MEMORY_INPUT_PREFIX = "memory:"; | ||
export interface InteractionExecutionPayload { | ||
/** | ||
* If a `memory:uri` reference is given then the data (i.e. interaction params) | ||
* will be constructed from the resolved memory pack and the specified memory_mapping. | ||
*/ | ||
data?: Record<string, any> | `memory:${string}`; | ||
config?: InteractionExecutionConfiguration; | ||
/** | ||
* A memory pack to itnercation params mapping to overwrite the default mapping. | ||
* Only used in conjunction with a `data` field which points to a `memory:uri` reference. | ||
*/ | ||
memory_mapping?: Record<string, string>; | ||
result_schema?: JSONSchema4; | ||
@@ -109,3 +124,3 @@ stream?: boolean; | ||
} | ||
export interface NamedInteractionExecutionPayload<Input = any> extends InteractionExecutionPayload<Input> { | ||
export interface NamedInteractionExecutionPayload extends InteractionExecutionPayload { | ||
/** | ||
@@ -146,2 +161,3 @@ * The interaction name and suffixed by an optional tag or version separated from the name using a @ character | ||
parameters: P; | ||
memory_mapping?: Record<string, string>; | ||
tags?: string[]; | ||
@@ -148,0 +164,0 @@ interaction: Interaction; |
@@ -33,2 +33,12 @@ import { FacetSpec } from "./facets.js"; | ||
} | ||
export interface ExportPropertiesPayload { | ||
objectIds: string[]; | ||
type: string; | ||
layout?: string; | ||
} | ||
export interface ExportPropertiesResponse { | ||
type: string; | ||
name: string; | ||
data: Blob; | ||
} | ||
//# sourceMappingURL=payload.d.ts.map |
@@ -0,3 +1,4 @@ | ||
import { StringValue } from "ms"; | ||
import { BaseObject } from "./common.js"; | ||
import { WorkflowExecutionPayload } from "./index.js"; | ||
import { BaseObject } from "./common.js"; | ||
/** | ||
@@ -20,2 +21,25 @@ * The interface of a function that can be used as a DSL workflow activity. | ||
/** | ||
* The payload for a DSL acitivty options. | ||
* | ||
* @see ActivityOptions in @temporalio/common | ||
*/ | ||
export interface DSLActivityOptions { | ||
startToCloseTimeout?: StringValue | number; | ||
scheduleToStartTimeout?: StringValue | number; | ||
scheduleToCloseTimeout?: StringValue | number; | ||
retry?: DSLRetryPolicy; | ||
} | ||
/** | ||
* The payload for a DSL retry policy. | ||
* | ||
* @see RetryPolicy in @temporalio/common | ||
*/ | ||
export interface DSLRetryPolicy { | ||
backoffCoefficient?: number; | ||
initialInterval?: StringValue | number; | ||
maximumAttempts?: number; | ||
maximumInterval?: StringValue | number; | ||
nonRetryableErrorTypes?: string[]; | ||
} | ||
/** | ||
* The payload for a DSL activity execution. | ||
@@ -119,2 +143,7 @@ */ | ||
await?: string; | ||
/** | ||
* Activity options for configuring the activity execution, which overrides the activity options | ||
* defined at workflow level. | ||
*/ | ||
options?: DSLActivityOptions; | ||
} | ||
@@ -127,3 +156,3 @@ export interface DSLWorkflowSpec { | ||
vars: Record<string, any>; | ||
options?: Record<string, any>; | ||
options?: DSLActivityOptions; | ||
result?: string; | ||
@@ -130,0 +159,0 @@ debug_mode?: boolean; |
@@ -11,4 +11,4 @@ export declare enum ContentEventName { | ||
/** | ||
* The event which started the workflow who created the activity. | ||
*/ | ||
* The event which started the workflow who created the activity. | ||
*/ | ||
event: ContentEventName; | ||
@@ -15,0 +15,0 @@ /** |
{ | ||
"name": "@becomposable/common", | ||
"version": "0.35.0", | ||
"version": "0.36.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "types": "./lib/types/index.d.ts", |
@@ -89,2 +89,7 @@ import type { JSONObject } from "@llumiverse/core"; | ||
result_schema?: JSONSchema4; | ||
/** | ||
* A default mapping which maps a memory pack to the interaction params. | ||
* If not defined the memory pack metadata will be used as the interaction params | ||
*/ | ||
memory_mapping?: Record<string, string>; | ||
cache_policy?: CachePolicy; | ||
@@ -139,5 +144,15 @@ model: string; | ||
export interface InteractionExecutionPayload<Input = any> { | ||
data?: Input; | ||
export const MEMORY_INPUT_PREFIX = "memory:"; | ||
export interface InteractionExecutionPayload { | ||
/** | ||
* If a `memory:uri` reference is given then the data (i.e. interaction params) | ||
* will be constructed from the resolved memory pack and the specified memory_mapping. | ||
*/ | ||
data?: Record<string, any> | `memory:${string}`; | ||
config?: InteractionExecutionConfiguration; | ||
/** | ||
* A memory pack to itnercation params mapping to overwrite the default mapping. | ||
* Only used in conjunction with a `data` field which points to a `memory:uri` reference. | ||
*/ | ||
memory_mapping?: Record<string, string>; | ||
result_schema?: JSONSchema4; | ||
@@ -149,3 +164,3 @@ stream?: boolean; | ||
export interface NamedInteractionExecutionPayload<Input = any> extends InteractionExecutionPayload<Input> { | ||
export interface NamedInteractionExecutionPayload extends InteractionExecutionPayload { | ||
/** | ||
@@ -189,2 +204,4 @@ * The interaction name and suffixed by an optional tag or version separated from the name using a @ character | ||
parameters: P; //params used to create the interaction, only in varies on? | ||
// optional memory mapping when using memory packs as input | ||
memory_mapping?: Record<string, string>; | ||
tags?: string[]; | ||
@@ -191,0 +208,0 @@ //TODO a string is returned when executing not the interaction object |
@@ -41,2 +41,14 @@ import { FacetSpec } from "./facets.js"; | ||
query?: PromptSearchQuery; | ||
} | ||
export interface ExportPropertiesPayload { | ||
objectIds: string[]; | ||
type: string; | ||
layout?: string; | ||
} | ||
export interface ExportPropertiesResponse { | ||
type: string; | ||
name: string; | ||
data: Blob; | ||
} |
@@ -0,3 +1,4 @@ | ||
import { StringValue } from "ms"; | ||
import { BaseObject } from "./common.js"; | ||
import { WorkflowExecutionPayload } from "./index.js"; | ||
import { BaseObject } from "./common.js"; | ||
@@ -24,2 +25,27 @@ /** | ||
/** | ||
* The payload for a DSL acitivty options. | ||
* | ||
* @see ActivityOptions in @temporalio/common | ||
*/ | ||
export interface DSLActivityOptions { | ||
startToCloseTimeout?: StringValue | number; | ||
scheduleToStartTimeout?: StringValue | number; | ||
scheduleToCloseTimeout?: StringValue | number; | ||
retry?: DSLRetryPolicy; | ||
} | ||
/** | ||
* The payload for a DSL retry policy. | ||
* | ||
* @see RetryPolicy in @temporalio/common | ||
*/ | ||
export interface DSLRetryPolicy { | ||
backoffCoefficient?: number; | ||
initialInterval?: StringValue | number; | ||
maximumAttempts?: number; | ||
maximumInterval?: StringValue | number; | ||
nonRetryableErrorTypes?: string[]; | ||
} | ||
/** | ||
* The payload for a DSL activity execution. | ||
@@ -136,2 +162,7 @@ */ | ||
/** | ||
* Activity options for configuring the activity execution, which overrides the activity options | ||
* defined at workflow level. | ||
*/ | ||
options?: DSLActivityOptions; | ||
} | ||
@@ -148,4 +179,4 @@ | ||
vars: Record<string, any>; | ||
// this must be an ActivityOptions from @temporalio/common //TODO: why not type it this way? | ||
options?: Record<string, any>; | ||
// activity options that apply to all activities within the workflow | ||
options?: DSLActivityOptions; | ||
// the name of the variable that will hold the workflow result | ||
@@ -152,0 +183,0 @@ // if not specified "result" will be assumed |
@@ -14,4 +14,4 @@ | ||
/** | ||
* The event which started the workflow who created the activity. | ||
*/ | ||
* The event which started the workflow who created the activity. | ||
*/ | ||
event: ContentEventName; | ||
@@ -18,0 +18,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
236653
180
4365