@hotmeshio/hotmesh 0.28.1 → 0.29.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/build/package.json +2 -1
- package/build/services/activities/hook.d.ts +7 -4
- package/build/services/activities/hook.js +59 -17
- package/build/services/durable/schemas/factory.d.ts +1 -1
- package/build/services/durable/schemas/factory.js +7 -7
- package/build/services/durable/workflow/condition.js +19 -10
- package/build/services/escalations/accumulate.d.ts +30 -0
- package/build/services/escalations/accumulate.js +86 -0
- package/build/services/escalations/batch.d.ts +9 -4
- package/build/services/escalations/batch.js +21 -5
- package/build/services/escalations/client.d.ts +63 -1
- package/build/services/escalations/client.js +227 -22
- package/build/services/escalations/fold.d.ts +16 -0
- package/build/services/escalations/fold.js +28 -0
- package/build/services/escalations/index.d.ts +3 -1
- package/build/services/escalations/index.js +14 -1
- package/build/services/store/providers/postgres/escalation-accumulate.d.ts +96 -0
- package/build/services/store/providers/postgres/escalation-accumulate.js +313 -0
- package/build/services/store/providers/postgres/postgres.d.ts +64 -7
- package/build/services/store/providers/postgres/postgres.js +231 -24
- package/build/types/hmsh_escalations.d.ts +225 -0
- package/build/types/hmsh_escalations.js +27 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.js +9 -1
- package/build/types/system_events.d.ts +1 -1
- package/package.json +2 -1
package/build/types/index.d.ts
CHANGED
|
@@ -25,5 +25,5 @@ export { ReclaimedMessageType, RetryPolicy, RouterConfig, StreamCode, StreamConf
|
|
|
25
25
|
export { context, Context, Counter, Meter, metrics, propagation, SpanContext, Span, SpanStatus, SpanStatusCode, SpanKind, trace, Tracer, ValueType, } from './telemetry';
|
|
26
26
|
export { WorkListTaskType } from './task';
|
|
27
27
|
export { TransitionMatch, TransitionRule, Transitions } from './transition';
|
|
28
|
-
export { ConditionQueueConfig, EscalationEntry, ClaimEscalationResult, ClaimByMetadataResult, ReleaseEscalationResult, ResolveEscalationResult, CancelEscalationResult, ListEscalationsParams, CreateEscalationParams, UpdateEscalationParams, AppendMilestonesParams, ClaimEscalationParams, ClaimByMetadataParams, ReleaseEscalationParams, ResolveEscalationParams, ResolveByMetadataParams, ResolveAllOrNoneItem, ResolveAllOrNoneParams, ResolveAllOrNoneBlockReason, ResolveAllOrNoneResult, EscalateToRoleParams, MigrateEscalationParams, EscalationResolution, ResolvedByIdentity, ClaimManyQuerySelector, ClaimManyByQueryParams, BatchItemOutcome, ResolveBatchItemParams, ResolveBatchItemByMetadataParams, ResolveBatchItemResult, ESCALATION_BATCH_PENDING_KEY, ESCALATION_BATCH_COUNT_KEY, ESCALATION_BATCH_KEYS_KEY, ESCALATION_BATCH_ITEMS_KEY, ESCALATION_BATCH_FILLED_AT_KEY, ESCALATION_BATCH_ITEM_KEY_MAX_LENGTH, } from './hmsh_escalations';
|
|
28
|
+
export { ConditionQueueConfig, EscalationEntry, ClaimEscalationResult, ClaimByMetadataResult, ReleaseEscalationResult, ResolveEscalationResult, CancelEscalationResult, ListEscalationsParams, CreateEscalationParams, UpdateEscalationParams, AppendMilestonesParams, ClaimEscalationParams, ClaimByMetadataParams, ReleaseEscalationParams, ResolveEscalationParams, ResolveByMetadataParams, ResolveAllOrNoneItem, ResolveAllOrNoneParams, ResolveAllOrNoneBlockReason, ResolveAllOrNoneResult, EscalateToRoleParams, MigrateEscalationParams, EscalationResolution, ResolvedByIdentity, ClaimManyQuerySelector, ClaimManyByQueryParams, BatchItemOutcome, ResolveBatchItemParams, ResolveBatchItemByMetadataParams, ResolveBatchItemResult, ESCALATION_BATCH_PENDING_KEY, ESCALATION_BATCH_COUNT_KEY, ESCALATION_BATCH_KEYS_KEY, ESCALATION_BATCH_ITEMS_KEY, ESCALATION_BATCH_FILLED_AT_KEY, ESCALATION_BATCH_PARTIAL_ON_TIMEOUT_KEY, ESCALATION_BATCH_ITEM_KEY_MAX_LENGTH, AccumulateConfig, AccumulatedEntry, AccumulatedItem, AccumulatorTrigger, AccumulatorResult, AccumulateReciprocalSelector, AccumulateItemOutcome, AccumulateItemParams, AccumulateItemByMetadataParams, AccumulateReciprocalResult, AccumulateItemResult, RemoveAccumulatedItemOutcome, RemoveAccumulatedItemParams, RemoveAccumulatedItemByMetadataParams, RemoveAccumulatedItemResult, ExpireEscalationResult, ESCALATION_ACCUMULATE_COUNT_KEY, ESCALATION_ACCUMULATE_MAX_KEY, ESCALATION_ACCUMULATE_KEYS_KEY, ESCALATION_ACCUMULATE_ITEMS_KEY, ESCALATION_ACCUMULATE_CONFIG_KEY, ESCALATION_ACCUMULATED_KEY, ESCALATION_TRIGGER_KEY, } from './hmsh_escalations';
|
|
29
29
|
export { EscalationVerb, EngineVerb, WorkerVerb, SystemEvent, EventsConfig } from './system_events';
|
package/build/types/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ESCALATION_BATCH_ITEM_KEY_MAX_LENGTH = exports.ESCALATION_BATCH_FILLED_AT_KEY = exports.ESCALATION_BATCH_ITEMS_KEY = exports.ESCALATION_BATCH_KEYS_KEY = exports.ESCALATION_BATCH_COUNT_KEY = exports.ESCALATION_BATCH_PENDING_KEY = exports.ValueType = exports.trace = exports.SpanKind = exports.SpanStatusCode = exports.propagation = exports.metrics = exports.context = exports.StreamStatus = exports.StreamRole = exports.StreamDataType = exports.KeyType = exports.HookGate = exports.CollationFaultType = void 0;
|
|
3
|
+
exports.ESCALATION_TRIGGER_KEY = exports.ESCALATION_ACCUMULATED_KEY = exports.ESCALATION_ACCUMULATE_CONFIG_KEY = exports.ESCALATION_ACCUMULATE_ITEMS_KEY = exports.ESCALATION_ACCUMULATE_KEYS_KEY = exports.ESCALATION_ACCUMULATE_MAX_KEY = exports.ESCALATION_ACCUMULATE_COUNT_KEY = exports.ESCALATION_BATCH_ITEM_KEY_MAX_LENGTH = exports.ESCALATION_BATCH_PARTIAL_ON_TIMEOUT_KEY = exports.ESCALATION_BATCH_FILLED_AT_KEY = exports.ESCALATION_BATCH_ITEMS_KEY = exports.ESCALATION_BATCH_KEYS_KEY = exports.ESCALATION_BATCH_COUNT_KEY = exports.ESCALATION_BATCH_PENDING_KEY = exports.ValueType = exports.trace = exports.SpanKind = exports.SpanStatusCode = exports.propagation = exports.metrics = exports.context = exports.StreamStatus = exports.StreamRole = exports.StreamDataType = exports.KeyType = exports.HookGate = exports.CollationFaultType = void 0;
|
|
4
4
|
var collator_1 = require("./collator");
|
|
5
5
|
Object.defineProperty(exports, "CollationFaultType", { enumerable: true, get: function () { return collator_1.CollationFaultType; } });
|
|
6
6
|
var hook_1 = require("./hook");
|
|
@@ -25,4 +25,12 @@ Object.defineProperty(exports, "ESCALATION_BATCH_COUNT_KEY", { enumerable: true,
|
|
|
25
25
|
Object.defineProperty(exports, "ESCALATION_BATCH_KEYS_KEY", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_BATCH_KEYS_KEY; } });
|
|
26
26
|
Object.defineProperty(exports, "ESCALATION_BATCH_ITEMS_KEY", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_BATCH_ITEMS_KEY; } });
|
|
27
27
|
Object.defineProperty(exports, "ESCALATION_BATCH_FILLED_AT_KEY", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_BATCH_FILLED_AT_KEY; } });
|
|
28
|
+
Object.defineProperty(exports, "ESCALATION_BATCH_PARTIAL_ON_TIMEOUT_KEY", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_BATCH_PARTIAL_ON_TIMEOUT_KEY; } });
|
|
28
29
|
Object.defineProperty(exports, "ESCALATION_BATCH_ITEM_KEY_MAX_LENGTH", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_BATCH_ITEM_KEY_MAX_LENGTH; } });
|
|
30
|
+
Object.defineProperty(exports, "ESCALATION_ACCUMULATE_COUNT_KEY", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_ACCUMULATE_COUNT_KEY; } });
|
|
31
|
+
Object.defineProperty(exports, "ESCALATION_ACCUMULATE_MAX_KEY", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_ACCUMULATE_MAX_KEY; } });
|
|
32
|
+
Object.defineProperty(exports, "ESCALATION_ACCUMULATE_KEYS_KEY", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_ACCUMULATE_KEYS_KEY; } });
|
|
33
|
+
Object.defineProperty(exports, "ESCALATION_ACCUMULATE_ITEMS_KEY", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_ACCUMULATE_ITEMS_KEY; } });
|
|
34
|
+
Object.defineProperty(exports, "ESCALATION_ACCUMULATE_CONFIG_KEY", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_ACCUMULATE_CONFIG_KEY; } });
|
|
35
|
+
Object.defineProperty(exports, "ESCALATION_ACCUMULATED_KEY", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_ACCUMULATED_KEY; } });
|
|
36
|
+
Object.defineProperty(exports, "ESCALATION_TRIGGER_KEY", { enumerable: true, get: function () { return hmsh_escalations_1.ESCALATION_TRIGGER_KEY; } });
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
* ```
|
|
116
116
|
*/
|
|
117
117
|
/** Verbs for escalation lifecycle transitions. */
|
|
118
|
-
export type EscalationVerb = 'created' | 'claimed' | 'released' | 'reassigned' | 'resolved' | 'cancelled' | 'batch-item';
|
|
118
|
+
export type EscalationVerb = 'created' | 'claimed' | 'released' | 'reassigned' | 'resolved' | 'cancelled' | 'expired' | 'batch-item' | 'accumulated' | 'removed';
|
|
119
119
|
/** Verbs for engine lifecycle transitions. */
|
|
120
120
|
export type EngineVerb = 'started' | 'stopped' | 'deployed';
|
|
121
121
|
/** Verbs for worker lifecycle transitions. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotmeshio/hotmesh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"description": "Durable Workflow",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"test:durable:unknown": "vitest run tests/durable/unknown/postgres.test.ts",
|
|
53
53
|
"test:durable:escalations": "HMSH_LOGLEVEL=info vitest run tests/durable/escalations",
|
|
54
54
|
"test:durable:escalations-batch": "HMSH_LOGLEVEL=info vitest run tests/durable/escalations-batch",
|
|
55
|
+
"test:durable:escalations-accumulate": "HMSH_LOGLEVEL=info vitest run tests/durable/escalations-accumulate",
|
|
55
56
|
"test:durable:exporter": "HMSH_LOGLEVEL=info vitest run tests/durable/exporter",
|
|
56
57
|
"test:durable:exporter:debug": "EXPORT_DEBUG=1 HMSH_LOGLEVEL=error vitest run tests/durable/basic/postgres.test.ts",
|
|
57
58
|
"test:durable:codec": "vitest run tests/durable/codec/postgres.test.ts",
|