@econ-v1/domain 7.6.122 → 7.6.123
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/events/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @typedef {(typeof KERNEL_EVENT_TYPES)[number]} CoreKernelEventType */
|
|
2
2
|
/** @typedef {AppEventType | CoreKernelEventType} KernelEventType */
|
|
3
|
-
/** @typedef {{ readonly "client-presence.changed": { readonly deviceId: string }, readonly "client-storage.state-changed": { readonly code?: string, readonly message?: string, readonly status: "ready" | "recovery-required" | "starting" }, readonly "offline.stage-readiness-changed": { readonly readiness: OfflineStageReadiness }, readonly "offline.identity-invalidated": { readonly scope: OfflineIdentityScope }, readonly "app.data.changed": { readonly appName: string, readonly cursor: string, readonly revision: string, readonly stream: string }, readonly "app.data.committed": { readonly appName: string, readonly cursor: string, readonly revision: string, readonly stream: string }, readonly "device-cleanup.changed": { readonly state?: string }, readonly "domain.entity-changed": { readonly entity?: "push" | string, readonly action: "created" | "deleted" | "updated", readonly entityId: string, readonly entityType: string }, readonly "onboarding.flow-changed": { readonly stepId: string }, readonly "outbox.state-changed": { readonly intent: OutboxIntent }, readonly "room.job-stream": RoomJobStreamPayload, readonly "room.turn-stream": RoomTurnStreamPayload, readonly "stage.catalog-invalidated": { readonly reason: string }, readonly "query.invalidated": { readonly name: QueryName }, readonly "stage.registry-changed": { readonly appNames: readonly string[] }, readonly "sync.delta-applied": { readonly domain: string, readonly cursor: string }, readonly "transport.state-changed": { readonly state: TransportState }, readonly "connectivity.changed": { readonly reachability: "online" | "unreachable" | "session-required" | "unknown" }, readonly "ip-pool.health-changed": { readonly connectionState: "closed" | "filtered" | "open" | "unknown", readonly consecutiveFailures: number, readonly ipEntryId: string, readonly isHealthy: boolean, readonly latencyMs?: number } }} KernelEventPayloads */
|
|
3
|
+
/** @typedef {{ readonly "client-presence.changed": { readonly deviceId: string }, readonly "client-storage.state-changed": { readonly code?: string, readonly message?: string, readonly status: "ready" | "recovery-required" | "starting" }, readonly "offline.stage-progress-changed": {}, readonly "offline.stage-readiness-changed": { readonly readiness: OfflineStageReadiness }, readonly "offline.identity-invalidated": { readonly scope: OfflineIdentityScope }, readonly "app.data.changed": { readonly appName: string, readonly cursor: string, readonly revision: string, readonly stream: string }, readonly "app.data.committed": { readonly appName: string, readonly cursor: string, readonly revision: string, readonly stream: string }, readonly "device-cleanup.changed": { readonly state?: string }, readonly "domain.entity-changed": { readonly entity?: "push" | string, readonly action: "created" | "deleted" | "updated", readonly entityId: string, readonly entityType: string }, readonly "onboarding.flow-changed": { readonly stepId: string }, readonly "outbox.state-changed": { readonly intent: OutboxIntent }, readonly "room.job-stream": RoomJobStreamPayload, readonly "room.turn-stream": RoomTurnStreamPayload, readonly "stage.catalog-invalidated": { readonly reason: string }, readonly "query.invalidated": { readonly name: QueryName }, readonly "stage.registry-changed": { readonly appNames: readonly string[] }, readonly "sync.delta-applied": { readonly domain: string, readonly cursor: string }, readonly "transport.state-changed": { readonly state: TransportState }, readonly "connectivity.changed": { readonly reachability: "online" | "unreachable" | "session-required" | "unknown" }, readonly "ip-pool.health-changed": { readonly connectionState: "closed" | "filtered" | "open" | "unknown", readonly consecutiveFailures: number, readonly ipEntryId: string, readonly isHealthy: boolean, readonly latencyMs?: number } }} KernelEventPayloads */
|
|
4
4
|
/** @template {KernelEventType} T @typedef {T extends CoreKernelEventType ? KernelEventPayloads[T] : AppEventPayload} KernelEventPayload */
|
|
5
5
|
/** @template {KernelEventType} T @typedef {{ readonly occurredAt: string, readonly payload: KernelEventPayload<T>, readonly type: T }} KernelEventByType */
|
|
6
6
|
/** @typedef {{ readonly occurredAt: string, readonly payload: AppEventPayload, readonly type: AppEventType }} AppDomainEvent */
|
|
@@ -25,8 +25,8 @@ export function appEventScope(value: string): AppEventType | undefined;
|
|
|
25
25
|
export function appEventType(resource: string, instance?: string): AppEventType;
|
|
26
26
|
/** @param {string} value @returns {value is QueryName} */
|
|
27
27
|
export function isQueryName(value: string): value is QueryName;
|
|
28
|
-
/** @type {readonly ["transport.state-changed", "stage.catalog-invalidated", "stage.registry-changed", "query.invalidated", "outbox.state-changed", "domain.entity-changed", "sync.delta-applied", "client-storage.state-changed", "offline.stage-readiness-changed", "offline.identity-invalidated", "app.data.changed", "app.data.committed", "onboarding.flow-changed", "device-cleanup.changed", "room.turn-stream", "room.job-stream", "connectivity.changed", "ip-pool.health-changed", "client-presence.changed"]} */
|
|
29
|
-
export const KERNEL_EVENT_TYPES: readonly ["transport.state-changed", "stage.catalog-invalidated", "stage.registry-changed", "query.invalidated", "outbox.state-changed", "domain.entity-changed", "sync.delta-applied", "client-storage.state-changed", "offline.stage-readiness-changed", "offline.identity-invalidated", "app.data.changed", "app.data.committed", "onboarding.flow-changed", "device-cleanup.changed", "room.turn-stream", "room.job-stream", "connectivity.changed", "ip-pool.health-changed", "client-presence.changed"];
|
|
28
|
+
/** @type {readonly ["transport.state-changed", "stage.catalog-invalidated", "stage.registry-changed", "query.invalidated", "outbox.state-changed", "domain.entity-changed", "sync.delta-applied", "client-storage.state-changed", "offline.stage-progress-changed", "offline.stage-readiness-changed", "offline.identity-invalidated", "app.data.changed", "app.data.committed", "onboarding.flow-changed", "device-cleanup.changed", "room.turn-stream", "room.job-stream", "connectivity.changed", "ip-pool.health-changed", "client-presence.changed"]} */
|
|
29
|
+
export const KERNEL_EVENT_TYPES: readonly ["transport.state-changed", "stage.catalog-invalidated", "stage.registry-changed", "query.invalidated", "outbox.state-changed", "domain.entity-changed", "sync.delta-applied", "client-storage.state-changed", "offline.stage-progress-changed", "offline.stage-readiness-changed", "offline.identity-invalidated", "app.data.changed", "app.data.committed", "onboarding.flow-changed", "device-cleanup.changed", "room.turn-stream", "room.job-stream", "connectivity.changed", "ip-pool.health-changed", "client-presence.changed"];
|
|
30
30
|
export type CoreKernelEventType = (typeof KERNEL_EVENT_TYPES)[number];
|
|
31
31
|
export type KernelEventType = AppEventType | CoreKernelEventType;
|
|
32
32
|
export type KernelEventPayloads = {
|
|
@@ -38,6 +38,7 @@ export type KernelEventPayloads = {
|
|
|
38
38
|
readonly message?: string;
|
|
39
39
|
readonly status: "ready" | "recovery-required" | "starting";
|
|
40
40
|
};
|
|
41
|
+
readonly "offline.stage-progress-changed": {};
|
|
41
42
|
readonly "offline.stage-readiness-changed": {
|
|
42
43
|
readonly readiness: OfflineStageReadiness;
|
|
43
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.js"],"names":[],"mappings":"AAkEA,yEAAyE;AACzE,oEAAoE;AAUpE,g6DAAg6D;AACh6D,2IAA2I;AAC3I,4JAA4J;AAC5J,gIAAgI;AAChI,wHAAwH;AAExH,kJAAkJ;AAClJ,kCADoC,CAAC,SAAtB,mBAAoB,SAAW,WAAW,QAAgB,CAAC,GAAiB,KAAK,IAAI,OAAO,CAAC,WAAW,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,CAG7I;AAED,oEAAoE;AACpE,6CADY,MAAM,GAAkB,KAAK,IAAI,mBAAmB,CAK/D;AAED,6DAA6D;AAC7D,sCADY,MAAM,GAAkB,KAAK,IAAI,YAAY,CAGxD;AAED,gEAAgE;AAChE,yCADY,MAAM,GAAkB,KAAK,IAAI,eAAe,CAG3D;AAED,0DAA0D;AAC1D,wCADY,MAAM,GAAkB,MAAM,GAAG,SAAS,CAGrD;AAED,0DAA0D;AAC1D,wCADY,MAAM,GAAkB,MAAM,GAAG,SAAS,CAGrD;AAED,gEAAgE;AAChE,qCADY,MAAM,GAAkB,YAAY,GAAG,SAAS,CAI3D;AAED,kFAAkF;AAClF,uCADY,MAAM,aAAmB,MAAM,GAAuB,YAAY,CAU7E;AAED,0DAA0D;AAC1D,mCADY,MAAM,GAAkB,KAAK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license": "MIT OR Apache-2.0",
|
|
6
6
|
"author": "Node contributors",
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@econ-v1/ports": "7.6.
|
|
60
|
+
"@econ-v1/ports": "7.6.123"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/src/events/index.js
CHANGED
|
@@ -40,7 +40,7 @@ function parseAppEventType(value) {
|
|
|
40
40
|
return { instance, resource };
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
/** @type {readonly ["transport.state-changed", "stage.catalog-invalidated", "stage.registry-changed", "query.invalidated", "outbox.state-changed", "domain.entity-changed", "sync.delta-applied", "client-storage.state-changed", "offline.stage-readiness-changed", "offline.identity-invalidated", "app.data.changed", "app.data.committed", "onboarding.flow-changed", "device-cleanup.changed", "room.turn-stream", "room.job-stream", "connectivity.changed", "ip-pool.health-changed", "client-presence.changed"]} */
|
|
43
|
+
/** @type {readonly ["transport.state-changed", "stage.catalog-invalidated", "stage.registry-changed", "query.invalidated", "outbox.state-changed", "domain.entity-changed", "sync.delta-applied", "client-storage.state-changed", "offline.stage-progress-changed", "offline.stage-readiness-changed", "offline.identity-invalidated", "app.data.changed", "app.data.committed", "onboarding.flow-changed", "device-cleanup.changed", "room.turn-stream", "room.job-stream", "connectivity.changed", "ip-pool.health-changed", "client-presence.changed"]} */
|
|
44
44
|
export const KERNEL_EVENT_TYPES = [
|
|
45
45
|
"transport.state-changed",
|
|
46
46
|
"stage.catalog-invalidated",
|
|
@@ -50,6 +50,7 @@ export const KERNEL_EVENT_TYPES = [
|
|
|
50
50
|
"domain.entity-changed",
|
|
51
51
|
"sync.delta-applied",
|
|
52
52
|
"client-storage.state-changed",
|
|
53
|
+
"offline.stage-progress-changed",
|
|
53
54
|
"offline.stage-readiness-changed",
|
|
54
55
|
"offline.identity-invalidated",
|
|
55
56
|
"app.data.changed",
|
|
@@ -74,7 +75,7 @@ export const KERNEL_EVENT_TYPES = [
|
|
|
74
75
|
* shape a de-duplication would take — declared in `@econ-v1/ports` and re-exported outward — and
|
|
75
76
|
* is the follow-up if this union ever grows a fifth state.
|
|
76
77
|
*/
|
|
77
|
-
/** @typedef {{ readonly "client-presence.changed": { readonly deviceId: string }, readonly "client-storage.state-changed": { readonly code?: string, readonly message?: string, readonly status: "ready" | "recovery-required" | "starting" }, readonly "offline.stage-readiness-changed": { readonly readiness: OfflineStageReadiness }, readonly "offline.identity-invalidated": { readonly scope: OfflineIdentityScope }, readonly "app.data.changed": { readonly appName: string, readonly cursor: string, readonly revision: string, readonly stream: string }, readonly "app.data.committed": { readonly appName: string, readonly cursor: string, readonly revision: string, readonly stream: string }, readonly "device-cleanup.changed": { readonly state?: string }, readonly "domain.entity-changed": { readonly entity?: "push" | string, readonly action: "created" | "deleted" | "updated", readonly entityId: string, readonly entityType: string }, readonly "onboarding.flow-changed": { readonly stepId: string }, readonly "outbox.state-changed": { readonly intent: OutboxIntent }, readonly "room.job-stream": RoomJobStreamPayload, readonly "room.turn-stream": RoomTurnStreamPayload, readonly "stage.catalog-invalidated": { readonly reason: string }, readonly "query.invalidated": { readonly name: QueryName }, readonly "stage.registry-changed": { readonly appNames: readonly string[] }, readonly "sync.delta-applied": { readonly domain: string, readonly cursor: string }, readonly "transport.state-changed": { readonly state: TransportState }, readonly "connectivity.changed": { readonly reachability: "online" | "unreachable" | "session-required" | "unknown" }, readonly "ip-pool.health-changed": { readonly connectionState: "closed" | "filtered" | "open" | "unknown", readonly consecutiveFailures: number, readonly ipEntryId: string, readonly isHealthy: boolean, readonly latencyMs?: number } }} KernelEventPayloads */
|
|
78
|
+
/** @typedef {{ readonly "client-presence.changed": { readonly deviceId: string }, readonly "client-storage.state-changed": { readonly code?: string, readonly message?: string, readonly status: "ready" | "recovery-required" | "starting" }, readonly "offline.stage-progress-changed": {}, readonly "offline.stage-readiness-changed": { readonly readiness: OfflineStageReadiness }, readonly "offline.identity-invalidated": { readonly scope: OfflineIdentityScope }, readonly "app.data.changed": { readonly appName: string, readonly cursor: string, readonly revision: string, readonly stream: string }, readonly "app.data.committed": { readonly appName: string, readonly cursor: string, readonly revision: string, readonly stream: string }, readonly "device-cleanup.changed": { readonly state?: string }, readonly "domain.entity-changed": { readonly entity?: "push" | string, readonly action: "created" | "deleted" | "updated", readonly entityId: string, readonly entityType: string }, readonly "onboarding.flow-changed": { readonly stepId: string }, readonly "outbox.state-changed": { readonly intent: OutboxIntent }, readonly "room.job-stream": RoomJobStreamPayload, readonly "room.turn-stream": RoomTurnStreamPayload, readonly "stage.catalog-invalidated": { readonly reason: string }, readonly "query.invalidated": { readonly name: QueryName }, readonly "stage.registry-changed": { readonly appNames: readonly string[] }, readonly "sync.delta-applied": { readonly domain: string, readonly cursor: string }, readonly "transport.state-changed": { readonly state: TransportState }, readonly "connectivity.changed": { readonly reachability: "online" | "unreachable" | "session-required" | "unknown" }, readonly "ip-pool.health-changed": { readonly connectionState: "closed" | "filtered" | "open" | "unknown", readonly consecutiveFailures: number, readonly ipEntryId: string, readonly isHealthy: boolean, readonly latencyMs?: number } }} KernelEventPayloads */
|
|
78
79
|
/** @template {KernelEventType} T @typedef {T extends CoreKernelEventType ? KernelEventPayloads[T] : AppEventPayload} KernelEventPayload */
|
|
79
80
|
/** @template {KernelEventType} T @typedef {{ readonly occurredAt: string, readonly payload: KernelEventPayload<T>, readonly type: T }} KernelEventByType */
|
|
80
81
|
/** @typedef {{ readonly occurredAt: string, readonly payload: AppEventPayload, readonly type: AppEventType }} AppDomainEvent */
|