@dudousxd/nestjs-durable-core 0.89.0 → 0.90.1
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/index.cjs +565 -106
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +285 -12
- package/dist/index.d.ts +285 -12
- package/dist/index.js +556 -106
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1399,6 +1399,15 @@ interface WorkflowRun {
|
|
|
1399
1399
|
* in-memory promise that only the dispatching instance held. Absent on non-remote / not-awaiting runs.
|
|
1400
1400
|
*/
|
|
1401
1401
|
awaitingDecisionTaskId?: string | undefined;
|
|
1402
|
+
/**
|
|
1403
|
+
* The CUSTOMER this run belongs to (an organization, a clinic…), stamped at `start` from an
|
|
1404
|
+
* explicit `StartOptions.tenantId`, else from the context tenant when tenancy is on, else none.
|
|
1405
|
+
* Children, `continueAsNew` and schedule fires inherit it, and every turn runs with it restored as
|
|
1406
|
+
* the context tenant. Not the worker-pool {@link namespace}. `null`/absent = no tenant.
|
|
1407
|
+
*/
|
|
1408
|
+
tenantId?: string | null | undefined;
|
|
1409
|
+
/** The kind of {@link tenantId} (`organization`, `user`, …), when the source said. */
|
|
1410
|
+
tenantKind?: string | null | undefined;
|
|
1402
1411
|
createdAt: Date;
|
|
1403
1412
|
updatedAt: Date;
|
|
1404
1413
|
}
|
|
@@ -2191,6 +2200,10 @@ interface ScheduleRecord {
|
|
|
2191
2200
|
spec: Record<string, unknown>;
|
|
2192
2201
|
/** The schedule's bookkeeping (last fire, last run id, last error…) — opaque to the store. */
|
|
2193
2202
|
state: Record<string, unknown>;
|
|
2203
|
+
/** The customer the schedule (and every run it starts) belongs to; `null`/absent = none. */
|
|
2204
|
+
tenantId?: string | null | undefined;
|
|
2205
|
+
/** The kind of {@link tenantId}. */
|
|
2206
|
+
tenantKind?: string | null | undefined;
|
|
2194
2207
|
createdAt: Date;
|
|
2195
2208
|
updatedAt: Date;
|
|
2196
2209
|
}
|
|
@@ -2203,6 +2216,10 @@ interface ScheduleQuery {
|
|
|
2203
2216
|
paused?: boolean | undefined;
|
|
2204
2217
|
/** Only DUE schedules: unpaused, `nextFireAt <= dueBy`. */
|
|
2205
2218
|
dueBy?: number | undefined;
|
|
2219
|
+
/** Only schedules of this tenant (`null` = schedules with no tenant). */
|
|
2220
|
+
tenantId?: string | null | undefined;
|
|
2221
|
+
/** Only schedules of ANY of these tenants (`null` = no tenant). Empty = matches nothing. */
|
|
2222
|
+
tenantIds?: Array<string | null> | undefined;
|
|
2206
2223
|
limit?: number | undefined;
|
|
2207
2224
|
offset?: number | undefined;
|
|
2208
2225
|
}
|
|
@@ -2251,7 +2268,7 @@ interface RetentionPolicy {
|
|
|
2251
2268
|
* run (`workflow`/`tags`), which business entity (`attributes`). Status, origin and paging are left
|
|
2252
2269
|
* out on purpose: each bulk operation owns its own status rule.
|
|
2253
2270
|
*/
|
|
2254
|
-
type RunScope = Pick<RunQuery, 'workflow' | 'workflows' | 'tag' | 'tags' | 'namespace' | 'namespaces' | 'attributes'>;
|
|
2271
|
+
type RunScope = Pick<RunQuery, 'workflow' | 'workflows' | 'tag' | 'tags' | 'namespace' | 'namespaces' | 'attributes' | 'tenantId' | 'tenantIds'>;
|
|
2255
2272
|
/** True when `scope` sets at least one predicate — a bulk delete refuses an empty (match-all) scope. */
|
|
2256
2273
|
declare function isNonEmptyRunScope(scope: RunScope | undefined): boolean;
|
|
2257
2274
|
/** Typed, queryable per-run data — exact values for `eq`/`ne`, numbers/strings for range ops. */
|
|
@@ -2380,6 +2397,17 @@ interface RunQuery {
|
|
|
2380
2397
|
* single `origin`; empty = matches nothing.
|
|
2381
2398
|
*/
|
|
2382
2399
|
origins?: Array<string | null> | undefined;
|
|
2400
|
+
/**
|
|
2401
|
+
* Restrict to runs of this tenant (exact match against {@link WorkflowRun.tenantId}); `null`
|
|
2402
|
+
* selects runs with no tenant (`tenant_id IS NULL`). ANDed with the other predicates.
|
|
2403
|
+
*/
|
|
2404
|
+
tenantId?: string | null | undefined;
|
|
2405
|
+
/**
|
|
2406
|
+
* Restrict to runs of ANY of these tenants; `null` is a member like any other (no tenant). ANDed
|
|
2407
|
+
* with a concurrent single `tenantId`; empty = matches nothing. The tenancy matching rule narrows
|
|
2408
|
+
* app-facing queries through this field.
|
|
2409
|
+
*/
|
|
2410
|
+
tenantIds?: Array<string | null> | undefined;
|
|
2383
2411
|
limit?: number | undefined;
|
|
2384
2412
|
offset?: number | undefined;
|
|
2385
2413
|
}
|
|
@@ -4196,6 +4224,89 @@ declare class Entities {
|
|
|
4196
4224
|
private run;
|
|
4197
4225
|
}
|
|
4198
4226
|
|
|
4227
|
+
/**
|
|
4228
|
+
* Tenancy: the CUSTOMER (organization, clinic, account…) a run belongs to. Not the worker-pool
|
|
4229
|
+
* `namespace`, and not the `topology: 'tenant'` process role — those are operator axes; this one is
|
|
4230
|
+
* the data owner, read from the request's context (`@dudousxd/nestjs-context`'s tenant).
|
|
4231
|
+
*
|
|
4232
|
+
* Core never reads a context itself. The host (the NestJS module) hands the engine an
|
|
4233
|
+
* {@link EngineTenancy} built from the context accessor; without one, tenancy is off and nothing here
|
|
4234
|
+
* changes behaviour.
|
|
4235
|
+
*/
|
|
4236
|
+
/** The tenant stamped on a run or schedule row (`tenant_id`, `tenant_kind`). */
|
|
4237
|
+
interface RunTenant {
|
|
4238
|
+
id: string;
|
|
4239
|
+
/** e.g. `organization`, `user`, `clinic`. Absent when the source did not say. */
|
|
4240
|
+
kind?: string | undefined;
|
|
4241
|
+
}
|
|
4242
|
+
/**
|
|
4243
|
+
* Who is asking, for the matching rule:
|
|
4244
|
+
* - `system`: no request (pollers, recovery, boot) — sees every row.
|
|
4245
|
+
* - `all`: an explicit cross-tenant scope (`Context.allTenants`) — sees every row.
|
|
4246
|
+
* - `tenantless`: a request with no tenant — sees only rows with no tenant.
|
|
4247
|
+
* - `tenant`: a request for `tenantId` — sees its own rows, plus rows with no tenant when
|
|
4248
|
+
* `nullRows: 'shared'`.
|
|
4249
|
+
*/
|
|
4250
|
+
type TenantFilter = {
|
|
4251
|
+
mode: 'system';
|
|
4252
|
+
} | {
|
|
4253
|
+
mode: 'all';
|
|
4254
|
+
} | {
|
|
4255
|
+
mode: 'tenantless';
|
|
4256
|
+
} | {
|
|
4257
|
+
mode: 'tenant';
|
|
4258
|
+
tenantId: string;
|
|
4259
|
+
nullRows?: 'tenantless' | 'shared' | undefined;
|
|
4260
|
+
};
|
|
4261
|
+
/**
|
|
4262
|
+
* The seam the host gives the engine to stamp, filter and restore the tenant. Every method is read
|
|
4263
|
+
* at call time, so it always reflects the CURRENT async context.
|
|
4264
|
+
*/
|
|
4265
|
+
interface EngineTenancy {
|
|
4266
|
+
/** The tenant to stamp on a run/schedule created now (no explicit `tenantId`), or undefined. */
|
|
4267
|
+
current(): RunTenant | undefined;
|
|
4268
|
+
/** The matching filter for an app-facing read or control call made now. */
|
|
4269
|
+
filter(): TenantFilter;
|
|
4270
|
+
/** Run `fn` with `tenant` restored as the ambient context tenant. */
|
|
4271
|
+
run<T>(tenant: RunTenant, fn: () => T): T;
|
|
4272
|
+
}
|
|
4273
|
+
/** A row that may carry a tenant (a run, a schedule). */
|
|
4274
|
+
interface TenantRow {
|
|
4275
|
+
tenantId?: string | null | undefined;
|
|
4276
|
+
}
|
|
4277
|
+
/** True when `filter` may see `row` (Agora tenancy spec §4). */
|
|
4278
|
+
declare function tenantVisible(row: TenantRow, filter: TenantFilter): boolean;
|
|
4279
|
+
/**
|
|
4280
|
+
* The `tenant_id` values `filter` may see, as a `tenantIds` predicate (`null` = no tenant), or
|
|
4281
|
+
* `undefined` when it sees everything.
|
|
4282
|
+
*/
|
|
4283
|
+
declare function tenantIdsFor(filter: TenantFilter): Array<string | null> | undefined;
|
|
4284
|
+
/**
|
|
4285
|
+
* Narrow a query carrying `tenantIds` to what `filter` may see. An existing `tenantIds` is
|
|
4286
|
+
* intersected (never widened); a concurrent single `tenantId` is left in place (stores AND it).
|
|
4287
|
+
*/
|
|
4288
|
+
declare function scopeTenantQuery<Q extends {
|
|
4289
|
+
tenantIds?: Array<string | null> | undefined;
|
|
4290
|
+
}>(query: Q, filter: TenantFilter): Q;
|
|
4291
|
+
/** The tenant columns of a row, as a {@link RunTenant}, or undefined when it has none. */
|
|
4292
|
+
declare function rowTenant(row: {
|
|
4293
|
+
tenantId?: string | null | undefined;
|
|
4294
|
+
tenantKind?: string | null | undefined;
|
|
4295
|
+
}): RunTenant | undefined;
|
|
4296
|
+
/** `StartOptions` that make a new run inherit `row`'s tenant (or none, explicitly). */
|
|
4297
|
+
declare function inheritTenant(row: {
|
|
4298
|
+
tenantId?: string | null | undefined;
|
|
4299
|
+
tenantKind?: string | null | undefined;
|
|
4300
|
+
}): {
|
|
4301
|
+
tenantId: string | null;
|
|
4302
|
+
tenantKind?: string | undefined;
|
|
4303
|
+
};
|
|
4304
|
+
/** Does a row match the `tenantId` / `tenantIds` predicates of a query (in-memory stores)? */
|
|
4305
|
+
declare function matchesTenantPredicates(row: TenantRow, query: {
|
|
4306
|
+
tenantId?: string | null | undefined;
|
|
4307
|
+
tenantIds?: Array<string | null> | undefined;
|
|
4308
|
+
}): boolean;
|
|
4309
|
+
|
|
4199
4310
|
/**
|
|
4200
4311
|
* How `onEvent` triggers are coalesced into fewer runs (see `@Workflow({ debounce | batch })`).
|
|
4201
4312
|
* `key` splits the coalescing per key: it receives each trigger's input (after the subscription's
|
|
@@ -4212,6 +4323,11 @@ type EventBatchConfig = {
|
|
|
4212
4323
|
windowMs: number;
|
|
4213
4324
|
key?: ((input: unknown) => string) | undefined;
|
|
4214
4325
|
};
|
|
4326
|
+
/** The tenant an accumulator run is started with (tenancy on): `null` = no tenant. */
|
|
4327
|
+
interface AccumulatorStartOptions {
|
|
4328
|
+
tenantId: string | null;
|
|
4329
|
+
tenantKind?: string | undefined;
|
|
4330
|
+
}
|
|
4215
4331
|
/** The slice of the engine the accumulators need (so they stay a standalone module). */
|
|
4216
4332
|
interface AccumulatorHost {
|
|
4217
4333
|
register(name: string, version: string, fn: (ctx: WorkflowCtx, input: unknown) => Promise<unknown>, opts?: {
|
|
@@ -4220,16 +4336,18 @@ interface AccumulatorHost {
|
|
|
4220
4336
|
signalWithStart(workflow: string, input: unknown, runId: string, signal: {
|
|
4221
4337
|
token: string;
|
|
4222
4338
|
payload?: unknown;
|
|
4223
|
-
}): Promise<{
|
|
4339
|
+
}, opts?: AccumulatorStartOptions): Promise<{
|
|
4224
4340
|
runId: string;
|
|
4225
4341
|
}>;
|
|
4226
4342
|
}
|
|
4227
4343
|
/**
|
|
4228
4344
|
* The accumulator run id, which is also its signal token. Without a key it is the target's alone;
|
|
4229
4345
|
* with one, the key is percent-encoded (`~` and the other characters `encodeURIComponent` keeps
|
|
4230
|
-
* included), so any string makes a safe id that cannot read as a continue-as-new suffix.
|
|
4346
|
+
* included), so any string makes a safe id that cannot read as a continue-as-new suffix. With a
|
|
4347
|
+
* `tenant` (tenancy: a tenant's events), the id is that tenant's own, under a separate prefix with
|
|
4348
|
+
* the tenant id encoded the same way, so no key or target can name another tenant's accumulator.
|
|
4231
4349
|
*/
|
|
4232
|
-
declare function accumulatorRunId(target: string, key?: string): string;
|
|
4350
|
+
declare function accumulatorRunId(target: string, key?: string, tenant?: string): string;
|
|
4233
4351
|
/**
|
|
4234
4352
|
* How many routed event ids an accumulator remembers across bursts, so an event routed twice (a
|
|
4235
4353
|
* lifecycle event published by two instances, or again by the sweep) counts once. The newest ids
|
|
@@ -4249,8 +4367,12 @@ declare class EventAccumulators {
|
|
|
4249
4367
|
* Route an `onEvent` payload into its target's debounce/batch accumulator: the target's one, or
|
|
4250
4368
|
* with a `key`, the one for `String(config.key(payload))`. A `key` that throws rejects the route.
|
|
4251
4369
|
* With `id`, the accumulator counts the event once however many times it is routed.
|
|
4370
|
+
*
|
|
4371
|
+
* `tenant` is the tenant the event belongs to when tenancy is on: a tenant gets its own
|
|
4372
|
+
* accumulator, stamped with it (so its target runs are too); `null` routes into the shared one,
|
|
4373
|
+
* stamped with no tenant. Undefined (tenancy off) starts the accumulator as before.
|
|
4252
4374
|
*/
|
|
4253
|
-
route(target: string, config: EventBatchConfig, payload: unknown, id?: string): Promise<{
|
|
4375
|
+
route(target: string, config: EventBatchConfig, payload: unknown, id?: string, tenant?: RunTenant | null): Promise<{
|
|
4254
4376
|
runId: string;
|
|
4255
4377
|
}>;
|
|
4256
4378
|
/** Fire the target with the LAST payload once events have been quiet for `windowMs`. */
|
|
@@ -4310,6 +4432,19 @@ declare function acceptingSubscription(subscriptions: readonly EventSubscription
|
|
|
4310
4432
|
accepted?: EventSubscription;
|
|
4311
4433
|
errors: unknown[];
|
|
4312
4434
|
};
|
|
4435
|
+
/**
|
|
4436
|
+
* The payload to buffer for an event published under a tenant filter: `payload` plus the `tenant_id`
|
|
4437
|
+
* values (`null` = no tenant) of the runs that may consume it. `undefined` buffers it as is, for
|
|
4438
|
+
* every run (a publish with tenancy off, or from `system`/`all`).
|
|
4439
|
+
*/
|
|
4440
|
+
declare function scopeBufferedEvent(payload: unknown, tenantIds: ReadonlyArray<string | null> | undefined): unknown;
|
|
4441
|
+
/** A buffered event's payload, and the tenants that may consume it (undefined: every run). */
|
|
4442
|
+
declare function readBufferedEvent(stored: unknown): {
|
|
4443
|
+
payload: unknown;
|
|
4444
|
+
tenantIds?: Array<string | null>;
|
|
4445
|
+
};
|
|
4446
|
+
/** May a run with `tenantId` consume a buffered event scoped to `tenantIds`? */
|
|
4447
|
+
declare function bufferedEventReaches(tenantIds: ReadonlyArray<string | null> | undefined, tenantId: string | null | undefined): boolean;
|
|
4313
4448
|
|
|
4314
4449
|
/**
|
|
4315
4450
|
* The announced workflow registry (design §7.9) — the aggregate answer to "what workflows exist in
|
|
@@ -4873,6 +5008,14 @@ interface ScheduleOptions {
|
|
|
4873
5008
|
* the schedule moves on to its next window.
|
|
4874
5009
|
*/
|
|
4875
5010
|
concurrency?: ConcurrencyQuota | undefined;
|
|
5011
|
+
/**
|
|
5012
|
+
* The customer the schedule belongs to; every run it starts inherits it. An explicit value wins
|
|
5013
|
+
* (`null` = none); omit it and the schedule takes the context tenant when tenancy is on. On
|
|
5014
|
+
* `upsert`, omit to keep the schedule's current tenant.
|
|
5015
|
+
*/
|
|
5016
|
+
tenantId?: string | null | undefined;
|
|
5017
|
+
/** The kind of {@link tenantId}. Only read with an explicit `tenantId`. */
|
|
5018
|
+
tenantKind?: string | undefined;
|
|
4876
5019
|
}
|
|
4877
5020
|
/** A schedule as `engine.schedules.get/list` describe it. */
|
|
4878
5021
|
interface ScheduleDescription {
|
|
@@ -4902,6 +5045,9 @@ interface ScheduleDescription {
|
|
|
4902
5045
|
fires: number;
|
|
4903
5046
|
/** The last start failure (e.g. a concurrency limit), cleared by the next successful start. */
|
|
4904
5047
|
lastError?: string | undefined;
|
|
5048
|
+
/** The customer the schedule and its runs belong to, when it has one. */
|
|
5049
|
+
tenantId?: string | undefined;
|
|
5050
|
+
tenantKind?: string | undefined;
|
|
4905
5051
|
createdAt: Date;
|
|
4906
5052
|
updatedAt: Date;
|
|
4907
5053
|
}
|
|
@@ -4923,6 +5069,10 @@ interface ScheduleHost {
|
|
|
4923
5069
|
getRun(runId: string): Promise<WorkflowRun | null>;
|
|
4924
5070
|
/** True once the engine has begun shutting down; `tick` fires nothing more after that. */
|
|
4925
5071
|
isDraining?(): boolean;
|
|
5072
|
+
/** The context tenant to stamp on a schedule created now (tenancy on), else undefined. */
|
|
5073
|
+
tenant?(): RunTenant | undefined;
|
|
5074
|
+
/** The tenancy matching filter for an app-facing call made now. Absent = sees everything. */
|
|
5075
|
+
tenantFilter?(): TenantFilter;
|
|
4926
5076
|
}
|
|
4927
5077
|
/** Engine-level knobs for the client. */
|
|
4928
5078
|
interface ScheduleClientOptions {
|
|
@@ -4950,6 +5100,9 @@ declare class ScheduleClient {
|
|
|
4950
5100
|
/** Whether the store persists schedules (implements the schedule methods). */
|
|
4951
5101
|
get supported(): boolean;
|
|
4952
5102
|
private requireStore;
|
|
5103
|
+
private filter;
|
|
5104
|
+
/** The schedule `id` if it exists and the caller may see it (tenancy), else null. */
|
|
5105
|
+
private visible;
|
|
4953
5106
|
/** Create a schedule. Throws {@link ScheduleAlreadyExistsError} if the id is taken. */
|
|
4954
5107
|
create(opts: ScheduleOptions): Promise<ScheduleDescription>;
|
|
4955
5108
|
/**
|
|
@@ -4958,9 +5111,9 @@ declare class ScheduleClient {
|
|
|
4958
5111
|
* window that already fired is never fired again by an upsert.
|
|
4959
5112
|
*/
|
|
4960
5113
|
upsert(opts: ScheduleOptions): Promise<ScheduleDescription>;
|
|
4961
|
-
/** The schedule `id`, or null. */
|
|
5114
|
+
/** The schedule `id`, or null (also null for another tenant's schedule). */
|
|
4962
5115
|
get(id: string): Promise<ScheduleDescription | null>;
|
|
4963
|
-
/** Schedules matching `query
|
|
5116
|
+
/** Schedules matching `query` (and visible to the caller's tenant), soonest-due first. */
|
|
4964
5117
|
list(query?: ScheduleListQuery): Promise<ScheduleDescription[]>;
|
|
4965
5118
|
/** Delete the schedule. Runs it already started are left alone. Returns whether it existed. */
|
|
4966
5119
|
delete(id: string): Promise<boolean>;
|
|
@@ -4987,6 +5140,8 @@ declare class ScheduleClient {
|
|
|
4987
5140
|
/** `overlap: 'skip'` and the previous run of this schedule is still in flight. */
|
|
4988
5141
|
private overlapping;
|
|
4989
5142
|
private mustGet;
|
|
5143
|
+
/** Explicit `opts.tenantId` → the existing schedule's tenant (upsert) → the context tenant → none. */
|
|
5144
|
+
private scheduleTenant;
|
|
4990
5145
|
private write;
|
|
4991
5146
|
}
|
|
4992
5147
|
|
|
@@ -5191,6 +5346,14 @@ interface StartOptions {
|
|
|
5191
5346
|
* counts as in flight for singleton back-pressure and concurrency quotas while it waits.
|
|
5192
5347
|
*/
|
|
5193
5348
|
startAt?: number | Date | undefined;
|
|
5349
|
+
/**
|
|
5350
|
+
* The customer this run belongs to (see {@link WorkflowRun.tenantId}). An explicit value always
|
|
5351
|
+
* wins; `null` starts it with no tenant. Omit it and the run takes the context tenant when tenancy
|
|
5352
|
+
* is on, else none.
|
|
5353
|
+
*/
|
|
5354
|
+
tenantId?: string | null | undefined;
|
|
5355
|
+
/** The kind of {@link tenantId} (`organization`, `user`, …). Only read with an explicit `tenantId`. */
|
|
5356
|
+
tenantKind?: string | undefined;
|
|
5194
5357
|
}
|
|
5195
5358
|
/**
|
|
5196
5359
|
* Serialize runs of a workflow that share a key — a durable, FIFO mutex (e.g. one pipeline per base).
|
|
@@ -5430,6 +5593,13 @@ interface WorkflowEngineDeps {
|
|
|
5430
5593
|
* ambient. Default: passthrough (`(_, fn) => fn()`), so behavior is byte-identical when unset.
|
|
5431
5594
|
*/
|
|
5432
5595
|
rehydrate?: (<T>(carrier: Record<string, unknown> | undefined, fn: () => T) => T) | undefined;
|
|
5596
|
+
/**
|
|
5597
|
+
* Tenancy (the customer a run belongs to): how to read the context tenant at `start`, the matching
|
|
5598
|
+
* filter for app-facing reads and control calls, and how to restore a run's tenant around each of
|
|
5599
|
+
* its turns. Supplied by the NestJS module from `@dudousxd/nestjs-context`. Unset = tenancy off:
|
|
5600
|
+
* runs carry only an explicit `StartOptions.tenantId` and no read is filtered.
|
|
5601
|
+
*/
|
|
5602
|
+
tenancy?: EngineTenancy | undefined;
|
|
5433
5603
|
/**
|
|
5434
5604
|
* Attempts for each saga compensation when the run fails (a transient undo — e.g. a refund API
|
|
5435
5605
|
* hiccup — gets another try). Default 1 (no retry). Compensations must be idempotent.
|
|
@@ -5545,6 +5715,8 @@ declare class WorkflowEngine {
|
|
|
5545
5715
|
private readonly context?;
|
|
5546
5716
|
/** Establish the originating context ambiently around a local step body (see {@link WorkflowEngineDeps.rehydrate}). Default passthrough. */
|
|
5547
5717
|
private readonly rehydrate;
|
|
5718
|
+
/** Tenancy seam (see {@link WorkflowEngineDeps.tenancy}); undefined = off. */
|
|
5719
|
+
private readonly tenancy;
|
|
5548
5720
|
private readonly compensationRetries;
|
|
5549
5721
|
/** Persist a `running` checkpoint at the start of a local step body (see {@link WorkflowEngineDeps.trackStepStart}). */
|
|
5550
5722
|
private readonly trackStepStart;
|
|
@@ -5942,6 +6114,10 @@ declare class WorkflowEngine {
|
|
|
5942
6114
|
* time from {@link context} — the SAME reader stamped on dispatched remote tasks — so a local step
|
|
5943
6115
|
* sees the live tenant / user / trace ids ambiently (via the {@link rehydrate} bridge). Default
|
|
5944
6116
|
* `rehydrate` is a passthrough, so this is byte-identical to a bare body call when unwired.
|
|
6117
|
+
*
|
|
6118
|
+
* The run row's tenant is re-applied INSIDE the rehydrated context: an app carrier (a custom
|
|
6119
|
+
* `serialize`/`deserialize`) may not carry the tenant, and its deserializer would otherwise replace
|
|
6120
|
+
* the tenant the turn was started with. Local steps always see the row's tenant.
|
|
5945
6121
|
*/
|
|
5946
6122
|
private interceptStep;
|
|
5947
6123
|
/**
|
|
@@ -6028,7 +6204,10 @@ declare class WorkflowEngine {
|
|
|
6028
6204
|
* an announcement carries no `where` or `input`. `routeIdOf` names the event for a subscriber's
|
|
6029
6205
|
* debounce/batch accumulator, which counts an id once. Returns the subscribers reached, with the
|
|
6030
6206
|
* run each started (none when the payload went into its debounce/batch accumulator), and the ones
|
|
6031
|
-
* that could not be started, with why.
|
|
6207
|
+
* that could not be started, with why. `batchTenant` is the tenant whose debounce/batch accumulator
|
|
6208
|
+
* the payload goes into (see {@link EventAccumulators.route}). `runTenant`, when set, is the tenant
|
|
6209
|
+
* every directly started subscriber run gets (a lifecycle event: the settled run's), instead of the
|
|
6210
|
+
* context's at publish time (which may be none, e.g. the background retry pass).
|
|
6032
6211
|
*/
|
|
6033
6212
|
private startSubscribers;
|
|
6034
6213
|
/**
|
|
@@ -6331,10 +6510,66 @@ declare class WorkflowEngine {
|
|
|
6331
6510
|
private deliver;
|
|
6332
6511
|
start<C extends WorkflowClass>(workflow: C, input: WorkflowInputOf<C>, runId: string, opts?: StartOptions): Promise<RunResult>;
|
|
6333
6512
|
start<TInput>(workflow: string, input: TInput, runId: string, opts?: StartOptions): Promise<RunResult>;
|
|
6334
|
-
/**
|
|
6513
|
+
/**
|
|
6514
|
+
* The tenant columns a new run gets: an explicit `opts.tenantId` (`null` = none) wins, else the
|
|
6515
|
+
* context tenant when tenancy is on, else none (no keys at all, so a run row is unchanged when
|
|
6516
|
+
* tenancy is off).
|
|
6517
|
+
*/
|
|
6518
|
+
private startTenant;
|
|
6519
|
+
/**
|
|
6520
|
+
* The context tenant a run started NOW would be stamped with (tenancy on), else undefined. For code
|
|
6521
|
+
* that records a start to replay it later outside the request, e.g. a transactional outbox.
|
|
6522
|
+
*/
|
|
6523
|
+
contextTenant(): RunTenant | undefined;
|
|
6524
|
+
/**
|
|
6525
|
+
* The tenant whose debounce/batch accumulator a named event published now goes into: the
|
|
6526
|
+
* publisher's tenant, or `null` (the shared accumulator, no tenant) for a tenantless, `system` or
|
|
6527
|
+
* `all` publisher. Undefined when tenancy is off (the accumulator starts as it always did).
|
|
6528
|
+
*/
|
|
6529
|
+
private publishBatchTenant;
|
|
6530
|
+
/**
|
|
6531
|
+
* The tenant whose debounce/batch accumulator `run`'s lifecycle event goes into: the run's own
|
|
6532
|
+
* (its publisher), or `null` for a run with no tenant. Undefined when tenancy is off.
|
|
6533
|
+
*/
|
|
6534
|
+
private lifecycleBatchTenant;
|
|
6535
|
+
/** The matching filter for an app-facing call made now: `system` (sees all) when tenancy is off. */
|
|
6536
|
+
private tenantFilter;
|
|
6537
|
+
/**
|
|
6538
|
+
* The run `runId` if the caller may see it under the tenancy matching rule, else null — an
|
|
6539
|
+
* invisible run reads exactly like a missing one (not found, never forbidden).
|
|
6540
|
+
*/
|
|
6541
|
+
private visibleRun;
|
|
6542
|
+
/**
|
|
6543
|
+
* What `start` returns for an id that already has a run. A run the caller may not see (tenancy)
|
|
6544
|
+
* returns its id and status only: never its output or error.
|
|
6545
|
+
*/
|
|
6546
|
+
private existingStartResult;
|
|
6547
|
+
/** The caller's filter when it can hide rows (`tenant` / `tenantless`), else undefined. */
|
|
6548
|
+
private restrictiveFilter;
|
|
6549
|
+
/**
|
|
6550
|
+
* True when the caller may NOT act on `runId` (it is missing or invisible to it). Callers guard
|
|
6551
|
+
* with `this.restrictiveFilter() && (await this.hidden(runId))`, so nothing is awaited when the
|
|
6552
|
+
* caller sees everything.
|
|
6553
|
+
*/
|
|
6554
|
+
private hidden;
|
|
6555
|
+
/**
|
|
6556
|
+
* Narrow `query` to the runs the caller may see (the tenancy matching rule). Use it before an
|
|
6557
|
+
* app-facing `store.listRuns`; a no-op when tenancy is off or the caller is `system`/`all`.
|
|
6558
|
+
*/
|
|
6559
|
+
scopeRunQuery<Q extends RunQuery>(query: Q): Q;
|
|
6560
|
+
/**
|
|
6561
|
+
* Run `fn` with `run`'s tenant restored as the context tenant (so a step body, a downstream lib and
|
|
6562
|
+
* every dispatched task's context carrier see it), whatever path drove the turn: a request, a
|
|
6563
|
+
* timer, a signal, recovery or a worker. A run with no tenant, or tenancy off, runs `fn` as is.
|
|
6564
|
+
*/
|
|
6565
|
+
private inRunTenant;
|
|
6566
|
+
/**
|
|
6567
|
+
* Read a run's current persisted state (or null if unknown). With tenancy on, a run of another
|
|
6568
|
+
* tenant reads as null (see {@link WorkflowEngineDeps.tenancy}).
|
|
6569
|
+
*/
|
|
6335
6570
|
getRun(runId: string): Promise<WorkflowRun | null>;
|
|
6336
|
-
/** A run's full checkpoint timeline, ordered by seq
|
|
6337
|
-
*
|
|
6571
|
+
/** A run's full checkpoint timeline, ordered by seq (what the testing kit's `captureHistory`
|
|
6572
|
+
* reads, next to {@link getRun}). Empty for a run the caller may not see. */
|
|
6338
6573
|
listCheckpoints(runId: string): Promise<StepCheckpoint[]>;
|
|
6339
6574
|
/**
|
|
6340
6575
|
* Re-execute a run's body (replaying its checkpoints). This is the EXPLICIT entry point: besides
|
|
@@ -6889,6 +7124,13 @@ declare class WorkflowEngine {
|
|
|
6889
7124
|
* side actually removes the row is the one that delivers, so a signal is never delivered twice.
|
|
6890
7125
|
*/
|
|
6891
7126
|
signal(token: string, payload: unknown, opts?: SignalOptions): Promise<RunResult | null>;
|
|
7127
|
+
/**
|
|
7128
|
+
* False when a run waits on `token` and `filter` may not see it (the tenancy matching rule). A
|
|
7129
|
+
* token nobody waits on yet is buffered as before (there is no run to check).
|
|
7130
|
+
*/
|
|
7131
|
+
private signalTargetVisible;
|
|
7132
|
+
/** {@link signal} without the tenancy check — the engine's own deliveries. */
|
|
7133
|
+
private signalUnchecked;
|
|
6892
7134
|
/** One deduplicated {@link signal}: claim `id`, then deliver or buffer; a failure forgets the id. */
|
|
6893
7135
|
private signalOnce;
|
|
6894
7136
|
/**
|
|
@@ -6963,6 +7205,8 @@ declare class WorkflowEngine {
|
|
|
6963
7205
|
cancel(runId: string, opts?: {
|
|
6964
7206
|
compensate?: boolean;
|
|
6965
7207
|
}): Promise<RunResult | null>;
|
|
7208
|
+
/** {@link cancel} without the tenancy check — the engine's own cascades and bulk paths. */
|
|
7209
|
+
private cancelUnchecked;
|
|
6966
7210
|
/**
|
|
6967
7211
|
* Bulk-cancel every run matching a filter — e.g. cancel all `order` runs tagged `vip`, or every run
|
|
6968
7212
|
* whose `tier` search attribute is `free`. The filter is a {@link RunQuery} (workflow / status / tag
|
|
@@ -6986,6 +7230,8 @@ declare class WorkflowEngine {
|
|
|
6986
7230
|
* its worker (its next checkpoint write fails). Returns the number of runs deleted (0 if absent).
|
|
6987
7231
|
*/
|
|
6988
7232
|
deleteRun(runId: string): Promise<number>;
|
|
7233
|
+
/** {@link deleteRun} without the tenancy check (its own subtree recursion). */
|
|
7234
|
+
private deleteRunUnchecked;
|
|
6989
7235
|
/**
|
|
6990
7236
|
* Hard-delete EVERY run matching `scope` — plus, by default, each one's whole child subtree — in
|
|
6991
7237
|
* bounded batches. The "forget this tenant" / "drop this feature's history" operation: where
|
|
@@ -7055,7 +7301,10 @@ declare class WorkflowEngine {
|
|
|
7055
7301
|
*/
|
|
7056
7302
|
/** The children `parentRunId` is awaiting right now, read off its own live `child:` waiters. */
|
|
7057
7303
|
private awaitedChildIds;
|
|
7304
|
+
/** The child runs of `parentRunId`; empty for a parent the caller may not see. */
|
|
7058
7305
|
getRunChildren(parentRunId: string): Promise<string[]>;
|
|
7306
|
+
/** {@link getRunChildren} without the tenancy check (the engine's own subtree walks). */
|
|
7307
|
+
private runChildrenUnchecked;
|
|
7059
7308
|
/** The worker groups this engine dispatches to: every registered remote workflow's group, plus any
|
|
7060
7309
|
* `extra` the caller declares. Local-step groups (a group consumed by in-process `@DurableStep`
|
|
7061
7310
|
* workers, e.g. `pipeline`) aren't derivable from registrations — pass them via `extra` so a group
|
|
@@ -7146,6 +7395,25 @@ declare class WorkflowEngine {
|
|
|
7146
7395
|
private markStarted;
|
|
7147
7396
|
private singletonWaitResult;
|
|
7148
7397
|
private execute;
|
|
7398
|
+
/**
|
|
7399
|
+
* A wake that found `run`'s lease held by another execution: keep it for that execution to honor
|
|
7400
|
+
* once it releases the lease, and answer with the run's status as read.
|
|
7401
|
+
*/
|
|
7402
|
+
private keepWakeForHeldLease;
|
|
7403
|
+
/**
|
|
7404
|
+
* Take `runId`'s lease for an explicit retry of a `failed` run that found it held: the turn that
|
|
7405
|
+
* failed the run has not released it yet, or another instance holds it for a moment. Polls the
|
|
7406
|
+
* lease with the usual fenced take ({@link StateStore.tryLockRun}, which also takes over a lease
|
|
7407
|
+
* that expired; the old holder's renewal then fences it) until it is free. Returns the run, read
|
|
7408
|
+
* under the lease, while it is still `failed`; or the run's state when something else moved it on
|
|
7409
|
+
* meanwhile (nothing to retry). Throws when the lease stays held by a live execution for longer
|
|
7410
|
+
* than one lease period, or the engine starts draining: the retry is refused, never dropped.
|
|
7411
|
+
*/
|
|
7412
|
+
private takeLeaseForRetry;
|
|
7413
|
+
/** `run` as a {@link RunResult}. */
|
|
7414
|
+
private resultOf;
|
|
7415
|
+
/** The body of {@link execute} once this instance holds `run`'s lease. */
|
|
7416
|
+
private executeLeased;
|
|
7149
7417
|
/**
|
|
7150
7418
|
* Keep a wake that found `runId`'s lease held by a turn executing elsewhere, durably, so that turn
|
|
7151
7419
|
* runs again once it ends instead of suspending on a snapshot that predates what the wake brought
|
|
@@ -8084,6 +8352,11 @@ interface DurableExecution {
|
|
|
8084
8352
|
readonly seq: number | undefined;
|
|
8085
8353
|
/** 1-based dispatch attempt, when the task carries one. */
|
|
8086
8354
|
readonly attempt: number | undefined;
|
|
8355
|
+
/**
|
|
8356
|
+
* The opaque context carrier the dispatched task carries (`RemoteTask.context`: tenant, user,
|
|
8357
|
+
* trace ids), for `unit: 'step'`. Lets a host wrapper restore it around the handler body.
|
|
8358
|
+
*/
|
|
8359
|
+
readonly context?: Record<string, unknown> | undefined;
|
|
8087
8360
|
}
|
|
8088
8361
|
/**
|
|
8089
8362
|
* Wraps one unit of durable work. Call `next()` to run the body (or the next wrapper). Whatever the
|
|
@@ -9337,4 +9610,4 @@ declare function prevRRuleFireMs(rule: ParsedRRule, atMs: number): number | null
|
|
|
9337
9610
|
*/
|
|
9338
9611
|
declare function settleResultsWithPlainCalls(store: Pick<StateStore, 'getRun' | 'getCheckpoint'> & Partial<Pick<StateStore, 'getRuns' | 'getCheckpointsForSettle' | 'getCheckpoints' | 'settleCheckpointsIfPending'>>, results: StepResultSettlement[]): Promise<(StepCheckpoint | null)[]>;
|
|
9339
9612
|
|
|
9340
|
-
export { ACCUMULATOR_SEEN_MAX, ANY_WAIT_GROUP, type AccumulatorHost, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AllSettledOptions, type AllStepsOptions, type AllStepsSettledOptions, type AnnouncedWorkflow, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, type BackoffStrategy, type BlockedDispatch, type BlockedResolution, type BufferedSignalRow, CHILD_EDGE_PREFIXES, CONTROL_FLOW_SIGNAL, CORE_ORIGIN, CURRENT_PROTOCOL_VERSION, type CapabilityRequirement, type CheckpointAggregatingStore, type CheckpointNameKind, type CheckpointQuery, type CheckpointStat, type ChildCallOptions, type ChildWait, CodecStateStore, type CodecStateStoreOptions, type ConcurrencyConfig, ConcurrencyLimitError, type ConcurrencyQuota, type ConsoleCapabilities, ContinueAsNew, type ControlMessage, type ControlPlane, DEFAULT_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DEFAULT_STALLED_AFTER_MS, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, ENTITY_WORKFLOW, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, type EventSubscription, FAN_SUMMARY_FAILURES, type FanJoin, type FanPage, type FanPageQuery, type FanSummary, type FanWait, FatalError, type FindStalledRunsOptions, GatherError, type GatherItemFailure, type GroupHealth, HANDOFF_SEQ_BASE, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryRunQueue, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, LIFECYCLE_COALESCED_TAG_PREFIX, LIFECYCLE_HEAL_WINDOW_MS, LIFECYCLE_ORPHAN_MS, LIFECYCLE_OWED_TAG_PREFIX, LIFECYCLE_PENDING_TAG, LIFECYCLE_REGISTRY_HEARTBEAT_MS, LIFECYCLE_REGISTRY_STALE_MS, LIFECYCLE_REGISTRY_TAG, LIFECYCLE_REGISTRY_TTL_MS, LIFECYCLE_REGISTRY_WORKFLOW, LIFECYCLE_TRACE_TAG_PREFIX, LIFECYCLE_TRIGGERED_TAG_PREFIX, LIFECYCLE_TRIGGER_FAILED_TAG_PREFIX, type LifecycleDelivery, type LifecycleDeliveryState, type LifecycleEventOf, type LifecycleKind, type LifecycleRegistryEntry, type LifecycleSource, type LifecycleSubscriptionLink, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OnEventEntry, type OwnedLeaseReclaim, PARENT_CLOSE_TAG_PREFIX, type ParentClosePolicy, type ParsedRRule, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, REMOTE_EVENT, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, RUN_WAIT_TOKEN_PREFIX, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RepublishLifecycleResult, type RepublishLifecycleTarget, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAttributeRow, type RunConsumerOptions, type RunDetail, type RunDetailOptions, type RunDispatch, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunQueueOptions, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaitLink, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_LOCK_CHUNK, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, ScheduleAlreadyExistsError, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, type SignalOptions, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StateStore, type StepCheckpoint, type StepConfig, type StepDef, type StepDispatchOpts, type StepError, type StepEvent, type StepHandler, type StepInterceptor, type StepInvocation, type StepKind, type StepLogger, type StepOptions, type StepRef, type StepResult, type StepResultSettlement, type StepScope, type StepSettlement, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WaitAnyCondition, type WaitAnyOutcome, type WaitAnyResult, type WaitCondition, type WaitConditionSpec, type WaitForRunOptions, type WireDates, type WorkerAdjust, type WorkerConcurrencyStatus, type WorkerDescriptor, type WorkerHeartbeat, type WorkerLifecycle, type WorkerStatus, type WorkflowAnnouncement, WorkflowBlocked, type WorkflowClass, type WorkflowCommand, type WorkflowCtx, type WorkflowDecision, type WorkflowDirectory, WorkflowEngine, type WorkflowEngineDeps, type WorkflowExecutor, type WorkflowHandler, type WorkflowInputOf, type WorkflowLifecycleEvent, type WorkflowLifecycleLinks, WorkflowNotRegistered, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, acceptingSubscription, accumulatorRunId, aggregateAnnouncements, aggregatesCheckpoints, announcementsOf, anyCheckpointName, applyAttributeQuery, assertConcurrency, assertRoutes, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, buildWorkflowDirectory, canRoute, capableWorkers, carriesLifecyclePending, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, coalescedSubscribersOf, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, extendEtag, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, isAnyCheckpoint, isAnyMember, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isLifecycleTag, isNonEmptyRunScope, isRemoteEvent, isWorkflowControlFlowSignal, legacySingletonHolders, lifecycleDeliveriesOf, lifecycleEventName, lifecycleEventOf, lifecycleKindOf, lifecycleRegistryNamespace, lifecycleRegistryRunId, lifecycleRegistrySubscriptions, lifecycleRunId, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, liveHandoff, log, markRemoteEvent, matchesAttributes, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, nextRRuleFireMs, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, owedSubscribersOf, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseLifecycleEvent, parseRRule, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, prevRRuleFireMs, queryCheckpointsOf, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retentionKeeps, retiredHandoffName, routeFor, runCompletedEvent, runDetailEtag, runDurableExecution, runFailedEvent, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runValueFacetsFromRuns, runWaitPrefix, runWaitTargetOf, runWaitToken, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, settleResultsWithPlainCalls, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, singletonClaimantIds, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantGroup, toEventSubscription, traceIdOfTraceparent, triggerFailedSubscribersOf, triggeredRunsOf, triggeredSubscribersOf, useDurableExecution, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
|
|
9613
|
+
export { ACCUMULATOR_SEEN_MAX, ANY_WAIT_GROUP, type AccumulatorHost, type AccumulatorStartOptions, type Admission, type AdmissionBackend, type AdmissionItem, type AllOptions, type AllSettledOptions, type AllStepsOptions, type AllStepsSettledOptions, type AnnouncedWorkflow, type AnnouncementEvidence, type AttributeFilter, type AttributeOp, type AttributePredicateOperand, type AttributeValue, type BackoffStrategy, type BlockedDispatch, type BlockedResolution, type BufferedSignalRow, CHILD_EDGE_PREFIXES, CONTROL_FLOW_SIGNAL, CORE_ORIGIN, CURRENT_PROTOCOL_VERSION, type CapabilityRequirement, type CheckpointAggregatingStore, type CheckpointNameKind, type CheckpointQuery, type CheckpointStat, type ChildCallOptions, type ChildWait, CodecStateStore, type CodecStateStoreOptions, type ConcurrencyConfig, ConcurrencyLimitError, type ConcurrencyQuota, type ConsoleCapabilities, ContinueAsNew, type ControlMessage, type ControlPlane, DEFAULT_CONCURRENCY_STATUSES, DEFAULT_PARTITION, DEFAULT_STALLED_AFTER_MS, DURABLE_OPTIONS, DURABLE_OPTIONS_CANONICAL, DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type Disagreement, type DispatchDiagnostics, type DispatchPlan, type DurableExecution, type DurableExecutionWrapper, type DurableTopology, type DurableWebhook, DurableWorkflow, type DynamicWorkflowCtx, ENGINE_MINTED_TAG_PREFIXES, ENTITY_WORKFLOW, EVENT_BUFFER_SCAN_LIMIT, EVENT_TOKEN_PREFIX, type EngineEvent, type EngineEventType, type EngineListener, type EngineTenancy, Entities, type EntityConfig, type EntityHandler, type EntityHost, type EntityWorkflowHost, EventAccumulators, type EventBatchConfig, type EventSubscription, FAN_SUMMARY_FAILURES, type FanJoin, type FanPage, type FanPageQuery, type FanSummary, type FanWait, FatalError, type FindStalledRunsOptions, GatherError, type GatherItemFailure, type GroupHealth, HANDOFF_SEQ_BASE, type Heartbeat, type HeartbeatSighting, type HeartbeatStatus, type HistoryEvent, InMemoryAdmissionBackend, InMemoryRunQueue, InMemoryStateStore, InMemoryTransport, type InferSearchAttributes, LEGACY_V1_CAPABILITIES, LEGACY_V1_PROTOCOL, LIFECYCLE_COALESCED_TAG_PREFIX, LIFECYCLE_HEAL_WINDOW_MS, LIFECYCLE_ORPHAN_MS, LIFECYCLE_OWED_TAG_PREFIX, LIFECYCLE_PENDING_TAG, LIFECYCLE_REGISTRY_HEARTBEAT_MS, LIFECYCLE_REGISTRY_STALE_MS, LIFECYCLE_REGISTRY_TAG, LIFECYCLE_REGISTRY_TTL_MS, LIFECYCLE_REGISTRY_WORKFLOW, LIFECYCLE_TRACE_TAG_PREFIX, LIFECYCLE_TRIGGERED_TAG_PREFIX, LIFECYCLE_TRIGGER_FAILED_TAG_PREFIX, type LifecycleDelivery, type LifecycleDeliveryState, type LifecycleEventOf, type LifecycleKind, type LifecycleRegistryEntry, type LifecycleSource, type LifecycleSubscriptionLink, type ListStalledRunsOptions, type MetricsCollector, type MetricsSnapshot, type NamedTransport, type NegotiateOptions, type NegotiationOutcome, type NegotiationReason, type NegotiationResult, NestedWorkflowCallError, NonDeterminismError, type OnErrorInput, type OnErrorRoute, type OnEventEntry, type OwnedLeaseReclaim, PARENT_CLOSE_TAG_PREFIX, type ParentClosePolicy, type ParsedRRule, type PartitionSighting, type PayloadCodec, type QueueConfig, QueueController, REMOTE_EVENT, RUN_HISTORY_FIXTURE_VERSION, RUN_VALUE_FACET_LIMIT, RUN_VALUE_FACET_SCAN, RUN_WAIT_TOKEN_PREFIX, type RawWorkerDescriptor, RemoteStepError, RemoteStepTimeout, type RemoteTask, RemoteWorkflowExecutor, RemoteWorkflowTimeout, type RepublishLifecycleResult, type RepublishLifecycleTarget, type RetentionPolicy, type RoutableDispatch, type RoutableResolution, type RoutingResolution, type RunAttributeRow, type RunConsumerOptions, type RunDetail, type RunDetailOptions, type RunDispatch, type RunDispatcher, type RunFacetQuery, type RunFacetRow, RunGateway, type RunListItem, type RunQuery, type RunQueueOptions, type RunReply, type RunReplyResult, type RunRequest, type RunRequestKind, type RunResult, type RunSchedulesOptions, type RunScope, type RunStatus, type RunTenant, type RunValueAxis, type RunValueFacetOptions, type RunValueFacetOrder, type RunValueFacetRow, type RunWaitLink, type RunWaiting, SINGLETON_ACTIVE_STATUSES, SINGLETON_ADMITTED_TAG, SINGLETON_LOCK_CHUNK, SINGLETON_RESERVED_TAGS, SINGLETON_TRACKED_TAG, STATE_STORE, STATE_STORE_CANONICAL, SUMMARY_CHILD_LIMIT, type ScalarAttributeFilter, ScheduleAlreadyExistsError, ScheduleClient, type ScheduleClientOptions, type ScheduleDescription, type ScheduleHost, type ScheduleListQuery, ScheduleNotFoundError, type ScheduleOptions, type ScheduleQuery, type ScheduleRecord, type ScheduledWorkflow, type SchemaIssue, type SchemaValidationCode, SchemaValidationError, type SearchAttributes, type SearchAttributesSchema, type Settled, type SignalOptions, SignalTimeoutError, type SignalWaiter, type SingletonConfig, SingletonQueueFullError, type StalePendingStep, type StalledRunInfo, StandardSchemaV1, type StartOptions, type StartRunMessage, type StateStore, type StepCheckpoint, type StepConfig, type StepDef, type StepDispatchOpts, type StepError, type StepEvent, type StepHandler, type StepInterceptor, type StepInvocation, type StepKind, type StepLogger, type StepOptions, type StepRef, type StepResult, type StepResultSettlement, type StepScope, type StepSettlement, type StepUndo, type StoreTransaction, type SubProcessHandle, TERMINAL_RUN_STATUSES, TRANSPORT, TRANSPORT_CANONICAL, type TenantEvent, type TenantFilter, type TenantRow, type TenantTokenSource, type TenantVerifier, type Transport, type UndoOf, type UpdateResult, type UpdateValidator, VERSION_UNDECLARED_TAG, type VerifiedTenant, WORKFLOW_NAME_KEY, type WaitAnyCondition, type WaitAnyOutcome, type WaitAnyResult, type WaitCondition, type WaitConditionSpec, type WaitForRunOptions, type WireDates, type WorkerAdjust, type WorkerConcurrencyStatus, type WorkerDescriptor, type WorkerHeartbeat, type WorkerLifecycle, type WorkerStatus, type WorkflowAnnouncement, WorkflowBlocked, type WorkflowClass, type WorkflowCommand, type WorkflowCtx, type WorkflowDecision, type WorkflowDirectory, WorkflowEngine, type WorkflowEngineDeps, type WorkflowExecutor, type WorkflowHandler, type WorkflowInputOf, type WorkflowLifecycleEvent, type WorkflowLifecycleLinks, WorkflowNotRegistered, type WorkflowOutputOf, type WorkflowRef, type WorkflowRegistration, type WorkflowRun, type WorkflowStartClient, type WorkflowStepEvent, WorkflowSuspended, type WorkflowTask, acceptingSubscription, accumulatorRunId, aggregateAnnouncements, aggregatesCheckpoints, announcementsOf, anyCheckpointName, applyAttributeQuery, assertConcurrency, assertRoutes, attributeColumnFor, attributeOperand, attributePredicateOperands, axisIsRunColumn, bindWorkflowClass, breakpointToken, bufferedEventReaches, buildWorkflowDirectory, canRoute, capableWorkers, carriesLifecyclePending, checkpointNameKind, checkpointStatsOf, childIdsOf, classifyWaiterToken, clearDurableExecutionWrappers, clearTerminalSingletonAdmission, coalescedSubscribersOf, codeAndDetails, codeOf, collectMetrics, concurrencyTag, controlPlaneDescriptor, countRuns, coveredTokens, createStepLogger, currentStep, currentStepScope, currentWorkflowCtx, debug, describeWorker, descriptorHash, detailsOf, error, etagMatches, eventMatchOf, eventMatches, eventNameOf, eventPrefix, eventToken, extendEtag, facetOrigin, fanPageBounds, fanPageEtag, findStalledRuns, foldedCount, getRunsByIds, handoffHandlerId, handoffName, hasDurableExecutionWrappers, heartbeatStatus, hmacTenantVerifier, indexWaitersByRun, info, inheritTenant, isAnyCheckpoint, isAnyMember, isEngineMintedTag, isEventToken, isFailedMember, isLegacyDescriptor, isLifecycleTag, isNonEmptyRunScope, isRemoteEvent, isWorkflowControlFlowSignal, legacySingletonHolders, lifecycleDeliveriesOf, lifecycleEventName, lifecycleEventOf, lifecycleKindOf, lifecycleRegistryNamespace, lifecycleRegistryRunId, lifecycleRegistrySubscriptions, lifecycleRunId, lifecycleSourceOf, lifecycleTraceparentOf, listSignalWaitersOfRuns, liveHandoff, log, markRemoteEvent, matchesAttributes, matchesTenantPredicates, mergeRunFacetRows, mergeRunValueFacetRows, missingCapabilities, negotiate, nextCronFireMs, nextRRuleFireMs, normalizeAttributeRows, normalizeDescriptor, observedAnnouncements, onErrorRunId, owedSubscribersOf, pageFan, pageFanFromStore, parentRunIdOf, parseDuration, parseLifecycleEvent, parseRRule, parseWebhookToken, partitionOfToken, planDispatch, poolNamespace, prevCronFireMs, prevRRuleFireMs, queryCheckpointsOf, readBufferedEvent, readRunsByIds, readSearchAttributes, requiredCapabilities, resolveConcurrency, resolveRouting, resolveRunWaiting, resolveTenantToken, resolveWireTenant, retentionKeeps, retiredHandoffName, routeFor, rowTenant, runCompletedEvent, runDetailEtag, runDurableExecution, runFailedEvent, runInStepLogger, runInStepScope, runInWorkflowCtx, runOutsideWorkflowCtx, runSchedules, runStepHandler, runValueFacetsFromRuns, runWaitPrefix, runWaitTargetOf, runWaitToken, sanitizeQueueToken, scheduleRunIdAt, scheduledRunId, scopeBufferedEvent, scopeTenantQuery, settleResultsWithPlainCalls, signTenantToken, singletonAdmissionDenialPatch, singletonAdmissionTags, singletonClaimantIds, sqlComparator, stepConfigOf, stepId, stepNameOf, sub, subEvent, subProcess, summarizeFan, summarizeRunFromStore, summarizeTimeline, tenantGroup, tenantIdsFor, tenantVisible, toEventSubscription, traceIdOfTraceparent, triggerFailedSubscribersOf, triggeredRunsOf, triggeredSubscribersOf, useDurableExecution, warn, withSingletonTracked, withoutSingletonMarkers, workflowName };
|