@dudousxd/nestjs-durable 0.42.0 → 0.43.0
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 +36 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WorkflowCtx, SearchAttributes, WorkflowClass, StepError, WorkflowRef, SingletonConfig, SearchAttributesSchema, StateStore, Transport, NamedTransport, ControlPlane, ScheduledWorkflow, RetentionPolicy, QueueConfig, AdmissionBackend, WorkflowInputOf, StartOptions, RunResult, RunGateway, WorkflowEngine, EntityHandler, DurableTopology, RunDetail, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, GroupHealth, RunWaiting, EngineEvent, RunRequest, RunReply, StepInvocation, TenantEvent } from '@dudousxd/nestjs-durable-core';
|
|
1
|
+
import { WorkflowCtx, SearchAttributes, WorkflowClass, StepError, WorkflowRef, SingletonConfig, SearchAttributesSchema, StateStore, Transport, NamedTransport, ControlPlane, ScheduledWorkflow, RetentionPolicy, QueueConfig, AdmissionBackend, WorkflowInputOf, StartOptions, RunResult, RunGateway, WorkflowEngine, EntityHandler, DurableTopology, RunDetail, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, RunValueAxis, RunValueFacetOptions, RunValueFacetRow, GroupHealth, RunWaiting, EngineEvent, RunRequest, RunReply, StepInvocation, TenantEvent } from '@dudousxd/nestjs-durable-core';
|
|
2
2
|
export { AttributeFilter, EngineEvent, InferSearchAttributes, RunDetail, RunGateway, RunListItem, RunQuery, RunStatus, RunWaiting, SearchAttributes, SearchAttributesSchema, StepCheckpoint, StepEvent, StepLogger, WorkflowCtx, WorkflowEngine, WorkflowHandler, WorkflowRun, readSearchAttributes } from '@dudousxd/nestjs-durable-core';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { ConcurrencyOption, StartRunDeps, RunRedisWorkerOptions, RunningWorker, DurableWorkerRuntime } from '@dudousxd/durable-worker';
|
|
@@ -900,6 +900,9 @@ declare class ProxyRunGateway implements RunGateway {
|
|
|
900
900
|
listRuns(query: RunQuery): Promise<RunListItem[]>;
|
|
901
901
|
/** Counted on the operator, over the same tenant-scoped predicates its `listRuns` reply obeys. */
|
|
902
902
|
runFacets(query: RunFacetQuery): Promise<RunFacetRow[]>;
|
|
903
|
+
/** Enumerated on the operator, over the same tenant-scoped predicates its `listRuns` reply obeys —
|
|
904
|
+
* so a tenant's pickers offer its own tenants/tags/attributes and never another's. */
|
|
905
|
+
runValueFacets(axis: RunValueAxis, query: RunFacetQuery, opts?: RunValueFacetOptions): Promise<RunValueFacetRow[]>;
|
|
903
906
|
/** Round-trips to the operator, which scopes the result to this tenant's own `@<tenant>` groups. */
|
|
904
907
|
workerHealth(): Promise<GroupHealth[]>;
|
|
905
908
|
/** Bulk, one request for the whole id list (like `listRuns`, not one request per id). The operator
|
|
@@ -1000,6 +1003,14 @@ declare class StoreRunGateway implements RunGateway {
|
|
|
1000
1003
|
* listing — correct, but the unbounded read this exists to avoid, so it is the last resort.
|
|
1001
1004
|
*/
|
|
1002
1005
|
runFacets(query: RunFacetQuery): Promise<RunFacetRow[]>;
|
|
1006
|
+
/**
|
|
1007
|
+
* The distinct values behind a console's pickers, straight off the store's enumeration. A store
|
|
1008
|
+
* without one answers `[]` rather than falling back to a listing: unlike the facet counts above —
|
|
1009
|
+
* where a full listing is at least the RIGHT answer expensively — a picker built from an unbounded
|
|
1010
|
+
* scan would be the same unbounded read on every keystroke, for a control whose free-text entry
|
|
1011
|
+
* still works without it.
|
|
1012
|
+
*/
|
|
1013
|
+
runValueFacets(axis: RunValueAxis, query: RunFacetQuery, opts?: RunValueFacetOptions): Promise<RunValueFacetRow[]>;
|
|
1003
1014
|
/**
|
|
1004
1015
|
* Bulk-resolve what each of `runIds` is currently parked on — for a consumer with its own filtered/
|
|
1005
1016
|
* paginated run listing (e.g. "which of MY suspended runs are stuck at a breakpoint") without
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WorkflowCtx, SearchAttributes, WorkflowClass, StepError, WorkflowRef, SingletonConfig, SearchAttributesSchema, StateStore, Transport, NamedTransport, ControlPlane, ScheduledWorkflow, RetentionPolicy, QueueConfig, AdmissionBackend, WorkflowInputOf, StartOptions, RunResult, RunGateway, WorkflowEngine, EntityHandler, DurableTopology, RunDetail, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, GroupHealth, RunWaiting, EngineEvent, RunRequest, RunReply, StepInvocation, TenantEvent } from '@dudousxd/nestjs-durable-core';
|
|
1
|
+
import { WorkflowCtx, SearchAttributes, WorkflowClass, StepError, WorkflowRef, SingletonConfig, SearchAttributesSchema, StateStore, Transport, NamedTransport, ControlPlane, ScheduledWorkflow, RetentionPolicy, QueueConfig, AdmissionBackend, WorkflowInputOf, StartOptions, RunResult, RunGateway, WorkflowEngine, EntityHandler, DurableTopology, RunDetail, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, RunValueAxis, RunValueFacetOptions, RunValueFacetRow, GroupHealth, RunWaiting, EngineEvent, RunRequest, RunReply, StepInvocation, TenantEvent } from '@dudousxd/nestjs-durable-core';
|
|
2
2
|
export { AttributeFilter, EngineEvent, InferSearchAttributes, RunDetail, RunGateway, RunListItem, RunQuery, RunStatus, RunWaiting, SearchAttributes, SearchAttributesSchema, StepCheckpoint, StepEvent, StepLogger, WorkflowCtx, WorkflowEngine, WorkflowHandler, WorkflowRun, readSearchAttributes } from '@dudousxd/nestjs-durable-core';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { ConcurrencyOption, StartRunDeps, RunRedisWorkerOptions, RunningWorker, DurableWorkerRuntime } from '@dudousxd/durable-worker';
|
|
@@ -900,6 +900,9 @@ declare class ProxyRunGateway implements RunGateway {
|
|
|
900
900
|
listRuns(query: RunQuery): Promise<RunListItem[]>;
|
|
901
901
|
/** Counted on the operator, over the same tenant-scoped predicates its `listRuns` reply obeys. */
|
|
902
902
|
runFacets(query: RunFacetQuery): Promise<RunFacetRow[]>;
|
|
903
|
+
/** Enumerated on the operator, over the same tenant-scoped predicates its `listRuns` reply obeys —
|
|
904
|
+
* so a tenant's pickers offer its own tenants/tags/attributes and never another's. */
|
|
905
|
+
runValueFacets(axis: RunValueAxis, query: RunFacetQuery, opts?: RunValueFacetOptions): Promise<RunValueFacetRow[]>;
|
|
903
906
|
/** Round-trips to the operator, which scopes the result to this tenant's own `@<tenant>` groups. */
|
|
904
907
|
workerHealth(): Promise<GroupHealth[]>;
|
|
905
908
|
/** Bulk, one request for the whole id list (like `listRuns`, not one request per id). The operator
|
|
@@ -1000,6 +1003,14 @@ declare class StoreRunGateway implements RunGateway {
|
|
|
1000
1003
|
* listing — correct, but the unbounded read this exists to avoid, so it is the last resort.
|
|
1001
1004
|
*/
|
|
1002
1005
|
runFacets(query: RunFacetQuery): Promise<RunFacetRow[]>;
|
|
1006
|
+
/**
|
|
1007
|
+
* The distinct values behind a console's pickers, straight off the store's enumeration. A store
|
|
1008
|
+
* without one answers `[]` rather than falling back to a listing: unlike the facet counts above —
|
|
1009
|
+
* where a full listing is at least the RIGHT answer expensively — a picker built from an unbounded
|
|
1010
|
+
* scan would be the same unbounded read on every keystroke, for a control whose free-text entry
|
|
1011
|
+
* still works without it.
|
|
1012
|
+
*/
|
|
1013
|
+
runValueFacets(axis: RunValueAxis, query: RunFacetQuery, opts?: RunValueFacetOptions): Promise<RunValueFacetRow[]>;
|
|
1003
1014
|
/**
|
|
1004
1015
|
* Bulk-resolve what each of `runIds` is currently parked on — for a consumer with its own filtered/
|
|
1005
1016
|
* paginated run listing (e.g. "which of MY suspended runs are stuck at a breakpoint") without
|
package/dist/index.js
CHANGED
|
@@ -577,6 +577,9 @@ function unavailableRunGateway() {
|
|
|
577
577
|
runFacets(_query) {
|
|
578
578
|
return tenantGatewayUnavailable("runFacets");
|
|
579
579
|
},
|
|
580
|
+
runValueFacets(_axis, _query, _opts) {
|
|
581
|
+
return tenantGatewayUnavailable("runValueFacets");
|
|
582
|
+
},
|
|
580
583
|
waitingFor(_runIds) {
|
|
581
584
|
return tenantGatewayUnavailable("waitingFor");
|
|
582
585
|
},
|
|
@@ -1006,6 +1009,16 @@ var ProxyRunGateway = class {
|
|
|
1006
1009
|
query
|
|
1007
1010
|
});
|
|
1008
1011
|
}
|
|
1012
|
+
/** Enumerated on the operator, over the same tenant-scoped predicates its `listRuns` reply obeys —
|
|
1013
|
+
* so a tenant's pickers offer its own tenants/tags/attributes and never another's. */
|
|
1014
|
+
runValueFacets(axis, query, opts) {
|
|
1015
|
+
return this.request({
|
|
1016
|
+
kind: "runValueFacets",
|
|
1017
|
+
axis,
|
|
1018
|
+
query,
|
|
1019
|
+
opts
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1009
1022
|
/** Round-trips to the operator, which scopes the result to this tenant's own `@<tenant>` groups. */
|
|
1010
1023
|
workerHealth() {
|
|
1011
1024
|
return this.request({
|
|
@@ -1235,6 +1248,19 @@ var RunRequestResponder = class {
|
|
|
1235
1248
|
}
|
|
1236
1249
|
};
|
|
1237
1250
|
}
|
|
1251
|
+
if (body.kind === "runValueFacets") {
|
|
1252
|
+
const data = await this.gateway.runValueFacets(body.axis, {
|
|
1253
|
+
...body.query,
|
|
1254
|
+
namespace: msg.tenant
|
|
1255
|
+
}, body.opts);
|
|
1256
|
+
return {
|
|
1257
|
+
requestId: msg.requestId,
|
|
1258
|
+
result: {
|
|
1259
|
+
ok: true,
|
|
1260
|
+
data
|
|
1261
|
+
}
|
|
1262
|
+
};
|
|
1263
|
+
}
|
|
1238
1264
|
if (body.kind === "workerHealth") {
|
|
1239
1265
|
const all = await this.gateway.workerHealth();
|
|
1240
1266
|
const data = all.filter((h) => h.group.endsWith(`@${msg.tenant}`));
|
|
@@ -1401,6 +1427,16 @@ var StoreRunGateway = class {
|
|
|
1401
1427
|
})));
|
|
1402
1428
|
}
|
|
1403
1429
|
/**
|
|
1430
|
+
* The distinct values behind a console's pickers, straight off the store's enumeration. A store
|
|
1431
|
+
* without one answers `[]` rather than falling back to a listing: unlike the facet counts above —
|
|
1432
|
+
* where a full listing is at least the RIGHT answer expensively — a picker built from an unbounded
|
|
1433
|
+
* scan would be the same unbounded read on every keystroke, for a control whose free-text entry
|
|
1434
|
+
* still works without it.
|
|
1435
|
+
*/
|
|
1436
|
+
async runValueFacets(axis, query, opts) {
|
|
1437
|
+
return this.store.runValueFacets?.(axis, query, opts) ?? [];
|
|
1438
|
+
}
|
|
1439
|
+
/**
|
|
1404
1440
|
* Bulk-resolve what each of `runIds` is currently parked on — for a consumer with its own filtered/
|
|
1405
1441
|
* paginated run listing (e.g. "which of MY suspended runs are stuck at a breakpoint") without
|
|
1406
1442
|
* re-deriving `listRuns`' waiter scan or querying `durable_step_checkpoints` directly. Mirrors
|