Interface: Activity<I, O>
Defined in: sdk/ts/sdk/src/core/activity.ts:92
A defined activity: the value activity returns, passed to cmd.task, step and fanOut. I and O are the inferred input and output types.
Type Parameters
I
I = unknown
O
O = unknown
Properties
hash
readonlyhash:string
Defined in: sdk/ts/sdk/src/core/activity.ts:98
Content hash of name, both JSON schemas and the retry policy. It is the version.
input
readonlyinput:ZodType<I>
Defined in: sdk/ts/sdk/src/core/activity.ts:102
Input schema, as given.
jsonSchema
readonlyjsonSchema:object
Defined in: sdk/ts/sdk/src/core/activity.ts:114
JSON Schema of both schemas, as registered with the host and used for the hash.
input
input:
Json
output
output:
Json
kind
readonlykind:"activity"
Defined in: sdk/ts/sdk/src/core/activity.ts:94
Discriminator the config loader uses to find activities among a module's exports.
leaseMs
readonlyleaseMs:number
Defined in: sdk/ts/sdk/src/core/activity.ts:110
Lease per attempt, in milliseconds.
name
readonlyname:string
Defined in: sdk/ts/sdk/src/core/activity.ts:96
The name given to activity; the key a worker registers its handler under.
output
readonlyoutput:ZodType<O>
Defined in: sdk/ts/sdk/src/core/activity.ts:104
Output schema, as given.
queue
readonlyqueue:string
Defined in: sdk/ts/sdk/src/core/activity.ts:108
Queue tasks are dispatched on.
retry
readonlyretry:RetryPolicy
Defined in: sdk/ts/sdk/src/core/activity.ts:106
Resolved retry policy in wire form.
schemaRef
readonlyschemaRef:string
Defined in: sdk/ts/sdk/src/core/activity.ts:100
${name}@${hash} — the schema_ref on the wire.
timeoutMs?
readonlyoptionaltimeoutMs?:number
Defined in: sdk/ts/sdk/src/core/activity.ts:112
Per-attempt wall-clock budget, in milliseconds; absent when none was set.