@ahoo-wang/fetcher-wow 1.9.2 → 1.9.3

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.
@@ -1,6 +1,26 @@
1
- import { AggregateId, AggregateNameCapable, ErrorInfo, FunctionInfoCapable, Identifier, NamedBoundedContext } from '../types';
1
+ import { AggregateId, AggregateIdCapable, AggregateNameCapable, ErrorInfo, FunctionInfoCapable, Identifier, NamedBoundedContext } from '../types';
2
2
  import { CommandId, CommandResultCapable, CommandStageCapable, NullableAggregateVersionCapable, RequestId, SignalTimeCapable, WaitCommandIdCapable } from './types';
3
3
  import { JsonServerSentEvent } from '@ahoo-wang/fetcher-eventstream';
4
+ /**
5
+ * Represents a signal that waits for command execution completion.
6
+ *
7
+ * This interface combines multiple capabilities to provide comprehensive information
8
+ * about a command that is being waited upon, including identification, timing,
9
+ * execution results, and error information.
10
+ *
11
+ * It extends several interfaces to aggregate different aspects of command execution:
12
+ * - Identifier: Provides unique identification
13
+ * - WaitCommandIdCapable: Contains the ID of the command being waited for
14
+ * - CommandId: Contains the command ID
15
+ * - AggregateIdCapable: Provides the aggregate ID associated with the command
16
+ * - NullableAggregateVersionCapable: Contains optional aggregate version for concurrency control
17
+ * - ErrorInfo: Contains error information if command execution failed
18
+ * - SignalTimeCapable: Provides timestamp information
19
+ * - CommandResultCapable: Contains the actual command execution result
20
+ * - FunctionInfoCapable: Provides information about the function that processed the command
21
+ */
22
+ export interface WaitSignal extends Identifier, WaitCommandIdCapable, CommandId, AggregateIdCapable, NullableAggregateVersionCapable, ErrorInfo, SignalTimeCapable, CommandResultCapable, FunctionInfoCapable {
23
+ }
4
24
  /**
5
25
  * Command execution result interface
6
26
  *
@@ -12,13 +32,6 @@ import { JsonServerSentEvent } from '@ahoo-wang/fetcher-eventstream';
12
32
  * - Version tracking (aggregateVersion)
13
33
  */
14
34
  export interface CommandResult extends Identifier, WaitCommandIdCapable, CommandStageCapable, NamedBoundedContext, AggregateNameCapable, AggregateId, ErrorInfo, CommandId, RequestId, ErrorInfo, FunctionInfoCapable, CommandResultCapable, SignalTimeCapable, NullableAggregateVersionCapable {
15
- /**
16
- * Aggregate root version number
17
- * - When command processing succeeds, this is the version number after the aggregate root has completed command processing
18
- * - When command validation fails at the command gateway, this is null
19
- * - When command execution fails in the command handler, this is the current version number of the aggregate root
20
- */
21
- aggregateVersion?: number;
22
35
  }
23
36
  /**
24
37
  * Command result event stream type
@@ -1 +1 @@
1
- {"version":3,"file":"commandResult.d.ts","sourceRoot":"","sources":["../../src/command/commandResult.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EACV,SAAS,EACT,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E;;;;;;;;;GASG;AACH,MAAM,WAAW,aACf,SAAQ,UAAU,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,+BAA+B;IACjC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,wBAAwB,GAAG,cAAc,CACnD,mBAAmB,CAAC,aAAa,CAAC,CACnC,CAAC"}
1
+ {"version":3,"file":"commandResult.d.ts","sourceRoot":"","sources":["../../src/command/commandResult.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,WAAW,EAAE,kBAAkB,EAC/B,oBAAoB,EACpB,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EACV,SAAS,EACT,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,UAAW,SAAQ,UAAU,EAC5C,oBAAoB,EACpB,SAAS,EACT,kBAAkB,EAClB,+BAA+B,EAC/B,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB;CACpB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,aACf,SAAQ,UAAU,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,+BAA+B;CAClC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,wBAAwB,GAAG,cAAc,CACnD,mBAAmB,CAAC,aAAa,CAAC,CACnC,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { ErrorInfo, FunctionInfoCapable, Identifier } from '../types';
2
+ import { PartialBy } from '@ahoo-wang/fetcher';
1
3
  /**
2
4
  * Command identifier interface
3
5
  *
@@ -84,8 +86,55 @@ export interface SignalTimeCapable {
84
86
  */
85
87
  export interface NullableAggregateVersionCapable {
86
88
  /**
87
- * The aggregate version of the aggregate.
89
+ * Aggregate root version number
90
+ * - When command processing succeeds, this is the version number after the aggregate root has completed command processing
91
+ * - When command validation fails at the command gateway, this is null
92
+ * - When command execution fails in the command handler, this is the current version number of the aggregate root
88
93
  */
89
94
  aggregateVersion?: number;
90
95
  }
96
+ /**
97
+ * Represents a target for compensation operations.
98
+ *
99
+ * This interface extends Identifier (with optional id) and FunctionInfoCapable to define
100
+ * the structure for objects that can be targeted for compensation operations. Compensation
101
+ * targets typically represent entities that can have operations reversed or corrected.
102
+ */
103
+ export interface CompensationTarget extends PartialBy<Identifier, 'id'>, FunctionInfoCapable {
104
+ }
105
+ /**
106
+ * Represents a command to delete an aggregate.
107
+ *
108
+ * This interface defines the structure for commands that request the deletion of an aggregate.
109
+ * It is typically used in conjunction with other command interfaces to provide a complete
110
+ * command processing workflow.
111
+ */
112
+ export interface DeleteAggregate {
113
+ }
114
+ /**
115
+ * Represents a command to recover an aggregate.
116
+ *
117
+ * This interface defines the structure for commands that request the recovery of an aggregate,
118
+ * typically used in scenarios where an aggregate needs to be restored to a previous state
119
+ * or recovered from an error condition.
120
+ */
121
+ export interface RecoverAggregate {
122
+ }
123
+ /**
124
+ * Represents the result of a batch operation, containing information about
125
+ * the pagination and error status of the operation.
126
+ *
127
+ * Extends ErrorInfo to include error details if the batch operation failed.
128
+ */
129
+ export interface BatchResult extends ErrorInfo {
130
+ /**
131
+ * The cursor or identifier for the next item after the current batch.
132
+ * Used for pagination to continue fetching the next batch of items.
133
+ */
134
+ after: string;
135
+ /**
136
+ * The number of items in the current batch.
137
+ */
138
+ size: number;
139
+ }
91
140
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/command/types.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,oBAAY,YAAY;IACtB;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,aAAa,kBAAkB;IAE/B;;OAEG;IACH,YAAY,iBAAiB;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,YAAY,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/command/types.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,oBAAY,YAAY;IACtB;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,aAAa,kBAAkB;IAE/B;;OAEG;IACH,YAAY,iBAAiB;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,YAAY,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAGD;;;;;;GAMG;AACH,MAAM,WAAW,kBAAmB,SAAQ,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,mBAAmB;CAE3F;AAED;;;;;;GAMG;AAEH,MAAM,WAAW,eAAe;CAC/B;AAED;;;;;;GAMG;AAEH,MAAM,WAAW,gBAAgB;CAChC;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,34 @@
1
+ import { DescriptionCapable } from '../types';
2
+ export interface ScopesCapable {
3
+ scopes: string[];
4
+ }
5
+ export interface Aggregate extends ScopesCapable {
6
+ /**
7
+ * Aggregate type fully qualified name
8
+ */
9
+ type: string | null;
10
+ /**
11
+ * Static tenant ID
12
+ */
13
+ tenantId: string | null;
14
+ /**
15
+ * Custom ID generator name
16
+ */
17
+ id: string | null;
18
+ /**
19
+ * Command type fully qualified name
20
+ */
21
+ commands: string[];
22
+ /**
23
+ * Domain Event type fully qualified name
24
+ */
25
+ events: string[];
26
+ }
27
+ export interface BoundedContext extends ScopesCapable, DescriptionCapable {
28
+ alias: string | null;
29
+ aggregates: Record<string, Aggregate>;
30
+ }
31
+ export interface WowMetadata extends DescriptionCapable {
32
+ contexts: Record<string, BoundedContext>;
33
+ }
34
+ //# sourceMappingURL=wowMetadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wowMetadata.d.ts","sourceRoot":"","sources":["../../src/configuration/wowMetadata.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,cAAe,SAAQ,aAAa,EAAE,kBAAkB;IACvE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC1C"}