@ahoo-wang/fetcher-wow 0.11.0 → 0.11.2

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,15 +1,58 @@
1
1
  import { NullableAggregateVersionCapable } from './types';
2
2
  import { HttpMethod, RequestHeaders } from '@ahoo-wang/fetcher';
3
+ /**
4
+ * Command request interface
5
+ *
6
+ * Represents a command request with all necessary metadata for execution.
7
+ * This interface extends NullableAggregateVersionCapable to include optional aggregate version information.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const commandRequest: CommandRequest = {
12
+ * path: '/commands/user/CreateUser',
13
+ * method: HttpMethod.POST,
14
+ * headers: {
15
+ * [CommandHeaders.TENANT_ID]: 'tenant-123',
16
+ * [CommandHeaders.REQUEST_ID]: 'req-' + Date.now()
17
+ * },
18
+ * body: {
19
+ * name: 'John Doe',
20
+ * email: 'john@example.com'
21
+ * },
22
+ * timeout: 10000,
23
+ * localFirst: true,
24
+ * stream: false
25
+ * };
26
+ * ```
27
+ */
3
28
  export interface CommandRequest extends NullableAggregateVersionCapable {
29
+ /**
30
+ * The path for the command request
31
+ */
4
32
  path: string;
33
+ /**
34
+ * Path parameters for the command request
35
+ */
5
36
  pathParams?: Record<string, any>;
37
+ /**
38
+ * HTTP method for the command request
39
+ */
6
40
  method: HttpMethod;
41
+ /**
42
+ * HTTP headers for the command request
43
+ */
7
44
  headers: RequestHeaders;
45
+ /**
46
+ * Request body containing the command data
47
+ */
8
48
  body: Record<string, any>;
9
49
  /**
10
- * Command timeout period. Milliseconds
50
+ * Command timeout period in milliseconds
11
51
  */
12
52
  timeout?: number;
53
+ /**
54
+ * Aggregate ID for the command
55
+ */
13
56
  aggregateId?: string;
14
57
  /**
15
58
  * The version of the target aggregate, which is used to control version conflicts
@@ -1 +1 @@
1
- {"version":3,"file":"commandRequest.d.ts","sourceRoot":"","sources":["../../src/command/commandRequest.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,+BAA+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CAAC;IAEjB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB"}
@@ -1,14 +1,39 @@
1
1
  import { AggregateId, 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
+ * Command execution result interface
6
+ *
7
+ * Represents the result of a command execution, containing information about:
8
+ * - Command identification (commandId, requestId)
9
+ * - Execution context (bounded context, aggregate information)
10
+ * - Execution status and errors
11
+ * - Timing information (signalTime)
12
+ * - Version tracking (aggregateVersion)
13
+ */
4
14
  export interface CommandResult extends Identifier, WaitCommandIdCapable, CommandStageCapable, NamedBoundedContext, AggregateNameCapable, AggregateId, ErrorInfo, CommandId, RequestId, ErrorInfo, FunctionInfoCapable, CommandResultCapable, SignalTimeCapable, NullableAggregateVersionCapable {
5
15
  /**
6
- * 聚合根版本号
7
- * - 命令处理成功时,为聚合根完成命令处理后的版本号
8
- * - 当命令在命令网关验证失败时,为 null
9
- * - 当命令在命令处理器中执行失败时,为聚合根的当前版本号
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
10
20
  */
11
21
  aggregateVersion?: number;
12
22
  }
23
+ /**
24
+ * Command result event stream type
25
+ *
26
+ * A readable stream of JSON Server-Sent Events containing command execution results.
27
+ * This stream allows real-time consumption of command results as they are processed.
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const eventStream: CommandResultEventStream = getCommandResultStream();
32
+ * for await (const event of eventStream) {
33
+ * const commandResult: CommandResult = event.data;
34
+ * console.log('Command result received:', commandResult);
35
+ * }
36
+ * ```
37
+ */
13
38
  export type CommandResultEventStream = ReadableStream<JsonServerSentEvent<CommandResult>>;
14
39
  //# sourceMappingURL=commandResult.d.ts.map
@@ -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,EACL,SAAS,EACT,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,MAAM,WAAW,aACf,SAAQ,UAAU,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,mBAAmB,EAChF,oBAAoB,EACpB,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,+BAA+B;IACrH;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAE3B;AAED,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC,CAAC"}
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,EACL,SAAS,EACT,oBAAoB,EACpB,mBAAmB,EACnB,+BAA+B,EAC/B,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE;;;;;;;;;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,47 +1,87 @@
1
+ /**
2
+ * Command identifier interface
3
+ *
4
+ * Represents the unique identifier for a command.
5
+ */
1
6
  export interface CommandId {
2
7
  commandId: string;
3
8
  }
9
+ /**
10
+ * Wait command identifier capable interface
11
+ *
12
+ * Represents the identifier of the command being waited for.
13
+ */
4
14
  export interface WaitCommandIdCapable {
5
15
  waitCommandId: string;
6
16
  }
17
+ /**
18
+ * Request identifier interface
19
+ *
20
+ * Represents the unique identifier for a request, used for idempotency control.
21
+ */
7
22
  export interface RequestId {
8
23
  requestId: string;
9
24
  }
25
+ /**
26
+ * Command execution stage enum
27
+ *
28
+ * Represents the different stages of command execution lifecycle.
29
+ */
10
30
  export declare enum CommandStage {
11
31
  /**
12
- * 当命令发布到命令总线/队列后,生成完成信号.
32
+ * When the command is published to the command bus/queue, a completion signal is generated.
13
33
  */
14
34
  SENT = "SENT",
15
35
  /**
16
- * 当命令被聚合根处理完成后,生成完成信号.
36
+ * When the command is processed by the aggregate root, a completion signal is generated.
17
37
  */
18
38
  PROCESSED = "PROCESSED",
19
39
  /**
20
- * 当快照被生成后,生成完成信号.
40
+ * When the snapshot is generated, a completion signal is generated.
21
41
  */
22
42
  SNAPSHOT = "SNAPSHOT",
23
43
  /**
24
- * 当命令产生的事件*投影*完成后,生成完成信号.
44
+ * When the events generated by the command are *projected*, a completion signal is generated.
25
45
  */
26
46
  PROJECTED = "PROJECTED",
27
47
  /**
28
- * 当命令产生的事件被*事件处理器*处理完成后,生成完成信号.
48
+ * When the events generated by the command are processed by *event handlers*, a completion signal is generated.
29
49
  */
30
50
  EVENT_HANDLED = "EVENT_HANDLED",
31
51
  /**
32
- * 当命令产生的事件被*Saga*处理完成后,生成完成信号.
52
+ * When the events generated by the command are processed by *Saga*, a completion signal is generated.
33
53
  */
34
54
  SAGA_HANDLED = "SAGA_HANDLED"
35
55
  }
56
+ /**
57
+ * Command stage capable interface
58
+ *
59
+ * Represents an object that has a command execution stage.
60
+ */
36
61
  export interface CommandStageCapable {
37
62
  stage: CommandStage;
38
63
  }
64
+ /**
65
+ * Command result capable interface
66
+ *
67
+ * Represents an object that contains command execution results.
68
+ */
39
69
  export interface CommandResultCapable {
40
70
  result: Record<string, any>;
41
71
  }
72
+ /**
73
+ * Signal time capable interface
74
+ *
75
+ * Represents an object that has a signal time (timestamp).
76
+ */
42
77
  export interface SignalTimeCapable {
43
78
  signalTime: number;
44
79
  }
80
+ /**
81
+ * Nullable aggregate version capable interface
82
+ *
83
+ * Represents an object that may have an aggregate version for optimistic concurrency control.
84
+ */
45
85
  export interface NullableAggregateVersionCapable {
46
86
  /**
47
87
  * The aggregate version of the aggregate.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/command/types.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,YAAY;IACtB;;OAEG;IACH,IAAI,SAAS;IACb;;OAEG;IACH,SAAS,cAAc;IACvB;;OAEG;IACH,QAAQ,aAAa;IACrB;;OAEG;IACH,SAAS,cAAc;IACvB;;OAEG;IACH,aAAa,kBAAkB;IAE/B;;OAEG;IACH,YAAY,iBAAiB;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,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;;;;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"}
package/dist/index.es.js CHANGED
@@ -247,3 +247,4 @@ export {
247
247
  Z as today,
248
248
  j as tomorrow
249
249
  };
250
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../src/command/commandHeaders.ts","../src/command/types.ts","../src/query/operator.ts","../src/query/condition.ts","../src/query/queryable.ts","../src/types/error.ts","../src/types/function.ts","../src/types/modeling.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Command Header Constants\n *\n * Defines standard HTTP header constants used in command processing within the Wow framework.\n * These headers are used to pass metadata and control information between services.\n *\n * @example\n * ```typescript\n * // Using header constants in a request\n * const request = {\n * method: 'POST',\n * headers: {\n * [CommandHeaders.TENANT_ID]: 'tenant-123',\n * [CommandHeaders.AGGREGATE_ID]: 'aggregate-456',\n * [CommandHeaders.REQUEST_ID]: 'request-789'\n * },\n * body: JSON.stringify(command)\n * };\n * ```\n */\nexport class CommandHeaders {\n /**\n * Prefix for all command-related headers\n */\n static readonly COMMAND_HEADERS_PREFIX = 'Command-';\n\n /**\n * Tenant identifier header\n * Used to identify the tenant context for the command\n */\n static readonly TENANT_ID = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Tenant-Id`;\n\n /**\n * Owner identifier header\n * Used to identify the owner context for the command\n */\n static readonly OWNER_ID = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Owner-Id`;\n\n /**\n * Aggregate identifier header\n * Used to identify the aggregate root for the command\n */\n static readonly AGGREGATE_ID = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Aggregate-Id`;\n\n /**\n * Aggregate version header\n * Used to specify the expected version of the aggregate root\n */\n static readonly AGGREGATE_VERSION = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Aggregate-Version`;\n\n /**\n * Wait prefix for wait-related headers\n */\n static readonly WAIT_PREFIX = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Wait-`;\n\n /**\n * Wait timeout header\n * Specifies the maximum time to wait for command processing\n */\n static readonly WAIT_TIME_OUT = `${CommandHeaders.WAIT_PREFIX}Timeout`;\n\n // region Wait Stage\n /**\n * Wait stage header\n * Specifies the processing stage to wait for\n */\n static readonly WAIT_STAGE = `${CommandHeaders.WAIT_PREFIX}Stage`;\n\n /**\n * Wait context header\n * Specifies the bounded context to wait for\n */\n static readonly WAIT_CONTEXT = `${CommandHeaders.WAIT_PREFIX}Context`;\n\n /**\n * Wait processor header\n * Specifies the processor to wait for\n */\n static readonly WAIT_PROCESSOR = `${CommandHeaders.WAIT_PREFIX}Processor`;\n\n /**\n * Wait function header\n * Specifies the function to wait for\n */\n static readonly WAIT_FUNCTION = `${CommandHeaders.WAIT_PREFIX}Function`;\n // endregion\n\n // region Wait Chain Tail\n /**\n * Wait tail prefix for wait chain tail-related headers\n */\n static readonly WAIT_TAIL_PREFIX = `${CommandHeaders.WAIT_PREFIX}Tail-`;\n\n /**\n * Wait tail stage header\n * Specifies the tail processing stage to wait for\n */\n static readonly WAIT_TAIL_STAGE = `${CommandHeaders.WAIT_TAIL_PREFIX}Stage`;\n\n /**\n * Wait tail context header\n * Specifies the tail bounded context to wait for\n */\n static readonly WAIT_TAIL_CONTEXT = `${CommandHeaders.WAIT_TAIL_PREFIX}Context`;\n\n /**\n * Wait tail processor header\n * Specifies the tail processor to wait for\n */\n static readonly WAIT_TAIL_PROCESSOR = `${CommandHeaders.WAIT_TAIL_PREFIX}Processor`;\n\n /**\n * Wait tail function header\n * Specifies the tail function to wait for\n */\n static readonly WAIT_TAIL_FUNCTION = `${CommandHeaders.WAIT_TAIL_PREFIX}Function`;\n // endregion\n\n /**\n * Request identifier header\n * Used to track the request ID for correlation\n */\n static readonly REQUEST_ID = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Request-Id`;\n\n /**\n * Local first header\n * Indicates whether to prefer local processing\n */\n static readonly LOCAL_FIRST = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Local-First`;\n\n /**\n * Command aggregate context header\n * Specifies the bounded context of the aggregate\n */\n static readonly COMMAND_AGGREGATE_CONTEXT = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Aggregate-Context`;\n\n /**\n * Command aggregate name header\n * Specifies the name of the aggregate\n */\n static readonly COMMAND_AGGREGATE_NAME = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Aggregate-Name`;\n\n /**\n * Command type header\n * Specifies the type of the command\n */\n static readonly COMMAND_TYPE = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Type`;\n\n /**\n * Command header prefix for custom headers\n * Used to prefix custom command headers\n */\n static readonly COMMAND_HEADER_X_PREFIX = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Header-`;\n}","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Command identifier interface\n *\n * Represents the unique identifier for a command.\n */\nexport interface CommandId {\n commandId: string;\n}\n\n/**\n * Wait command identifier capable interface\n *\n * Represents the identifier of the command being waited for.\n */\nexport interface WaitCommandIdCapable {\n waitCommandId: string;\n}\n\n/**\n * Request identifier interface\n *\n * Represents the unique identifier for a request, used for idempotency control.\n */\nexport interface RequestId {\n requestId: string;\n}\n\n/**\n * Command execution stage enum\n *\n * Represents the different stages of command execution lifecycle.\n */\nexport enum CommandStage {\n /**\n * When the command is published to the command bus/queue, a completion signal is generated.\n */\n SENT = 'SENT',\n\n /**\n * When the command is processed by the aggregate root, a completion signal is generated.\n */\n PROCESSED = 'PROCESSED',\n\n /**\n * When the snapshot is generated, a completion signal is generated.\n */\n SNAPSHOT = 'SNAPSHOT',\n\n /**\n * When the events generated by the command are *projected*, a completion signal is generated.\n */\n PROJECTED = 'PROJECTED',\n\n /**\n * When the events generated by the command are processed by *event handlers*, a completion signal is generated.\n */\n EVENT_HANDLED = 'EVENT_HANDLED',\n\n /**\n * When the events generated by the command are processed by *Saga*, a completion signal is generated.\n */\n SAGA_HANDLED = 'SAGA_HANDLED',\n}\n\n/**\n * Command stage capable interface\n *\n * Represents an object that has a command execution stage.\n */\nexport interface CommandStageCapable {\n stage: CommandStage;\n}\n\n/**\n * Command result capable interface\n *\n * Represents an object that contains command execution results.\n */\nexport interface CommandResultCapable {\n result: Record<string, any>;\n}\n\n/**\n * Signal time capable interface\n *\n * Represents an object that has a signal time (timestamp).\n */\nexport interface SignalTimeCapable {\n signalTime: number;\n}\n\n/**\n * Nullable aggregate version capable interface\n *\n * Represents an object that may have an aggregate version for optimistic concurrency control.\n */\nexport interface NullableAggregateVersionCapable {\n /**\n * The aggregate version of the aggregate.\n */\n aggregateVersion?: number;\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum Operator {\n /**\n * Performs logical AND on the provided condition list\n */\n AND = 'AND',\n\n /**\n * Performs logical OR on the provided condition list\n */\n OR = 'OR',\n\n /**\n * Performs logical NOR on the provided condition list\n */\n NOR = 'NOR',\n\n /**\n * Matches all documents where the `id` field value equals the specified value\n */\n ID = 'ID',\n\n /**\n * Matches all documents where the `id` field value equals any value in the specified list\n */\n IDS = 'IDS',\n\n /**\n * Matches documents where the aggregate root ID equals the specified value\n */\n AGGREGATE_ID = 'AGGREGATE_ID',\n\n /**\n * Matches all documents where the aggregate root ID equals any value in the specified list\n */\n AGGREGATE_IDS = 'AGGREGATE_IDS',\n\n /**\n * Matches all documents where the `tenantId` field value equals the specified value\n */\n TENANT_ID = 'TENANT_ID',\n\n /**\n * Matches all documents where the `ownerId` field value equals the specified value\n */\n OWNER_ID = 'OWNER_ID',\n\n /**\n * Matches all documents where the `deleted` field value equals the specified value\n */\n DELETED = 'DELETED',\n\n /**\n * Matches all documents\n */\n ALL = 'ALL',\n\n /**\n * Matches all documents where the field name value equals the specified value\n */\n EQ = 'EQ',\n\n /**\n * Matches all documents where the field name value does not equal the specified value\n */\n NE = 'NE',\n\n /**\n * Matches all documents where the given field's value is greater than the specified value\n */\n GT = 'GT',\n\n /**\n * Matches all documents where the given field's value is less than the specified value\n */\n LT = 'LT',\n\n /**\n * Matches all documents where the given field's value is greater than or equal to the specified value\n */\n GTE = 'GTE',\n\n /**\n * Matches all documents where the given field's value is less than or equal to the specified value\n */\n LTE = 'LTE',\n\n /**\n * Matches all documents where the given field's value contains the specified value\n */\n CONTAINS = 'CONTAINS',\n\n /**\n * Matches all documents where the field value equals any value in the specified list\n */\n IN = 'IN',\n\n /**\n * Matches all documents where the field value does not equal any specified value or does not exist\n */\n NOT_IN = 'NOT_IN',\n\n /**\n * Matches all documents where the field value is within the specified range\n */\n BETWEEN = 'BETWEEN',\n\n /**\n * Matches all documents where the field value is an array containing all specified values\n */\n ALL_IN = 'ALL_IN',\n\n /**\n * Matches documents where the field value starts with the specified string\n */\n STARTS_WITH = 'STARTS_WITH',\n\n /**\n * Matches documents where the field value ends with the specified string\n */\n ENDS_WITH = 'ENDS_WITH',\n\n /**\n * Matches all documents where the condition includes an array field,\n * and at least one member of the array matches the given condition.\n */\n ELEM_MATCH = 'ELEM_MATCH',\n\n /**\n * Matches all documents where the field value is `null`\n */\n NULL = 'NULL',\n\n /**\n * Matches all documents where the field value is not `null`\n */\n NOT_NULL = 'NOT_NULL',\n\n /**\n * Matches all documents where the field value is `true`\n */\n TRUE = 'TRUE',\n\n /**\n * Matches all documents where the field value is `false`\n */\n FALSE = 'FALSE',\n\n /**\n * Matches documents based on whether the field exists\n */\n EXISTS = 'EXISTS',\n\n // #region Date filtering conditions, field requirement: `long` type timestamp in milliseconds\n /**\n * Matches all documents where the field is within today's range\n * > For example: if `today` is `2024-06-06`, matches documents in the range\n * `2024-06-06 00:00:00.000` ~ `2024-06-06 23:59:59.999`\n */\n TODAY = 'TODAY',\n\n /**\n * Matches all documents where the field is before today\n */\n BEFORE_TODAY = 'BEFORE_TODAY',\n\n /**\n * Matches all documents where the field is within yesterday's range\n * > For example: if `today` is `2024-06-06`, matches documents in the range\n * `2024-06-05 00:00:00.000` ~ `2024-06-05 23:59:59.999`\n */\n TOMORROW = 'TOMORROW',\n\n /**\n * Matches all documents where the field is within this week's range\n */\n THIS_WEEK = 'THIS_WEEK',\n\n /**\n * Matches all documents where the field is within next week's range\n */\n NEXT_WEEK = 'NEXT_WEEK',\n\n /**\n * Matches all documents where the field is within last week's range\n */\n LAST_WEEK = 'LAST_WEEK',\n\n /**\n * Matches all documents where the field is within this month's range\n * > For example:\n * - `today`: `2024-06-06`\n * - Matching range: `2024-06-01 00:00:00.000` ~ `2024-06-30 23:59:59.999`\n */\n THIS_MONTH = 'THIS_MONTH',\n\n /**\n * Matches all documents where the field is within last month's range\n * > For example:\n * - `today`: `2024-06-06`\n * - Matching range: `2024-05-01 00:00:00.000` ~ `2024-05-31 23:59:59.999`\n */\n LAST_MONTH = 'LAST_MONTH',\n\n /**\n * Matches all documents where the field is within the specified number of recent days\n * > For example: last 3 days\n * - `today`: `2024-06-06`\n * - Matching range: `2024-06-04 00:00:00.000` ~ `2024-06-06 23:59:59.999`\n * - That is: today, yesterday, the day before yesterday\n */\n RECENT_DAYS = 'RECENT_DAYS',\n\n /**\n * Matches all documents where the field is before the specified number of days\n *\n * > For example: before 3 days\n * - `today`: `2024-06-06`\n * - Matching range: all documents less than `2024-06-04 00:00:00.000`\n */\n EARLIER_DAYS = 'EARLIER_DAYS',\n // #endregion\n\n /**\n * Raw operator, uses the condition value directly as the raw database query condition\n */\n RAW = 'RAW',\n}","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Operator } from './operator';\n\n/**\n * Condition option keys enumeration\n *\n * Defines standard option keys used in query conditions for special handling.\n */\nexport enum ConditionOptionKey {\n /**\n * Ignore case option key for string comparisons\n */\n IGNORE_CASE_OPTION_KEY = 'ignoreCase',\n\n /**\n * Time zone ID option key for date operations\n */\n ZONE_ID_OPTION_KEY = 'zoneId',\n\n /**\n * Date pattern option key for date formatting\n */\n DATE_PATTERN_OPTION_KEY = 'datePattern',\n}\n\n/**\n * Condition options interface\n *\n * Represents additional options that can be applied to query conditions,\n * such as case sensitivity, date patterns, and time zones.\n */\nexport interface ConditionOptions {\n /**\n * Whether to ignore case in string comparisons\n */\n ignoreCase?: boolean;\n\n /**\n * Date pattern for date formatting\n */\n datePattern?: string;\n\n /**\n * Time zone ID for date operations\n */\n zoneId?: string;\n\n /**\n * Additional custom options\n */\n [key: string]: any;\n}\n\n/**\n * Helper function to create condition options with ignoreCase flag.\n *\n * @param ignoreCase - Whether to ignore case\n * @returns Condition options or undefined if ignoreCase is undefined\n */\nexport function ignoreCaseOptions(\n ignoreCase?: boolean,\n): ConditionOptions | undefined {\n if (typeof ignoreCase === 'undefined') {\n return undefined;\n }\n return { ignoreCase };\n}\n\n/**\n * Helper function to create condition options with date pattern and zone ID.\n *\n * @param datePattern - Date pattern\n * @param zoneId - Time zone ID\n * @returns Condition options or undefined if both parameters are undefined\n */\nexport function dateOptions(\n datePattern?: string,\n zoneId?: string,\n): ConditionOptions | undefined {\n if (typeof datePattern === 'undefined' && typeof zoneId === 'undefined') {\n return undefined;\n }\n const options: ConditionOptions = {};\n if (typeof datePattern !== 'undefined') {\n options.datePattern = datePattern;\n }\n if (typeof zoneId !== 'undefined') {\n options.zoneId = zoneId;\n }\n return options;\n}\n\n/**\n * Interface for query conditions.\n *\n * When `operator` is `AND` or `OR` or `NOR`, `children` cannot be empty.\n */\nexport interface Condition {\n /**\n * Field name for the condition\n */\n field?: string;\n\n /**\n * Operator for the condition\n */\n operator?: Operator;\n\n /**\n * Value for the condition\n */\n value?: any;\n\n /**\n * Child conditions for logical operators (AND, OR, NOR)\n */\n children?: Condition[];\n\n /**\n * Additional options for the condition\n */\n options?: ConditionOptions;\n}\n\n/**\n * Interface for objects that have a condition.\n */\nexport interface ConditionCapable {\n condition: Condition;\n}\n\n/**\n * Deletion state enumeration\n *\n * Represents the different states of deletion for entities.\n */\nexport enum DeletionState {\n /**\n * Active state - entity is not deleted\n */\n ACTIVE = 'ACTIVE',\n\n /**\n * Deleted state - entity is deleted\n */\n DELETED = 'DELETED',\n\n /**\n * All state - includes both active and deleted entities\n */\n ALL = 'ALL',\n}\n\n/**\n * Creates an AND condition with the specified conditions.\n *\n * @param conditions - Conditions to combine with AND\n * @returns A condition with AND operator\n */\nexport function and(...conditions: Condition[]): Condition {\n return { operator: Operator.AND, children: conditions };\n}\n\n/**\n * Creates an OR condition with the specified conditions.\n *\n * @param conditions - Conditions to combine with OR\n * @returns A condition with OR operator\n */\nexport function or(...conditions: Condition[]): Condition {\n return { operator: Operator.OR, children: conditions };\n}\n\n/**\n * Creates a NOR condition with the specified conditions.\n *\n * @param conditions - Conditions to combine with NOR\n * @returns A condition with NOR operator\n */\nexport function nor(...conditions: Condition[]): Condition {\n return { operator: Operator.NOR, children: conditions };\n}\n\n/**\n * Creates an ID condition with the specified value.\n *\n * @param value - The ID value to match\n * @returns A condition with ID operator\n */\nexport function id(value: string): Condition {\n return { operator: Operator.ID, value: value };\n}\n\n/**\n * Creates an IDS condition with the specified values.\n *\n * @param value - The ID values to match\n * @returns A condition with IDS operator\n */\nexport function ids(value: string[]): Condition {\n return { operator: Operator.IDS, value: value };\n}\n\n/**\n * Creates an AGGREGATE_ID condition with the specified value.\n *\n * @param value - The aggregate ID value to match\n * @returns A condition with AGGREGATE_ID operator\n */\nexport function aggregateId(value: string): Condition {\n return { operator: Operator.AGGREGATE_ID, value: value };\n}\n\n/**\n * Creates an AGGREGATE_IDS condition with the specified values.\n *\n * @param value - The aggregate ID values to match\n * @returns A condition with AGGREGATE_IDS operator\n */\nexport function aggregateIds(...value: string[]): Condition {\n return { operator: Operator.AGGREGATE_IDS, value: value };\n}\n\n/**\n * Creates a TENANT_ID condition with the specified value.\n *\n * @param value - The tenant ID value to match\n * @returns A condition with TENANT_ID operator\n */\nexport function tenantId(value: string): Condition {\n return { operator: Operator.TENANT_ID, value: value };\n}\n\n/**\n * Creates an OWNER_ID condition with the specified value.\n *\n * @param value - The owner ID value to match\n * @returns A condition with OWNER_ID operator\n */\nexport function ownerId(value: string): Condition {\n return { operator: Operator.OWNER_ID, value: value };\n}\n\n/**\n * Creates a DELETED condition with the specified value.\n *\n * @param value - The deletion state value to match\n * @returns A condition with DELETED operator\n */\nexport function deleted(value: DeletionState): Condition {\n return { operator: Operator.DELETED, value: value };\n}\n\n/**\n * Creates an ACTIVE deletion state condition.\n *\n * @returns A condition with DELETED operator set to ACTIVE\n */\nexport function active(): Condition {\n return deleted(DeletionState.ACTIVE);\n}\n\n/**\n * Creates an ALL condition.\n *\n * @returns A condition with ALL operator\n */\nexport function all(): Condition {\n return {\n operator: Operator.ALL,\n };\n}\n\n/**\n * Creates an EQ (equals) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with EQ operator\n */\nexport function eq(field: string, value: any): Condition {\n return { field, operator: Operator.EQ, value };\n}\n\n/**\n * Creates a NE (not equals) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with NE operator\n */\nexport function ne(field: string, value: any): Condition {\n return { field, operator: Operator.NE, value };\n}\n\n/**\n * Creates a GT (greater than) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with GT operator\n */\nexport function gt(field: string, value: any): Condition {\n return { field, operator: Operator.GT, value };\n}\n\n/**\n * Creates a LT (less than) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with LT operator\n */\nexport function lt(field: string, value: any): Condition {\n return { field, operator: Operator.LT, value };\n}\n\n/**\n * Creates a GTE (greater than or equal) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with GTE operator\n */\nexport function gte(field: string, value: any): Condition {\n return { field, operator: Operator.GTE, value };\n}\n\n/**\n * Creates a LTE (less than or equal) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with LTE operator\n */\nexport function lte(field: string, value: any): Condition {\n return { field, operator: Operator.LTE, value };\n}\n\n/**\n * Creates a CONTAINS condition with the specified field and value.\n *\n * @param field - The field name to search in\n * @param value - The value to search for\n * @param ignoreCase - Whether to ignore case in the search\n * @returns A condition with CONTAINS operator\n */\nexport function contains(\n field: string,\n value: any,\n ignoreCase?: boolean,\n): Condition {\n const options: Record<string, any> | undefined =\n ignoreCaseOptions(ignoreCase);\n return { field, operator: Operator.CONTAINS, value, options };\n}\n\n/**\n * Creates an IN condition with the specified field and values.\n *\n * @param field - The field name to compare\n * @param value - The values to compare against\n * @returns A condition with IN operator\n */\nexport function isIn(field: string, ...value: any[]): Condition {\n return { field, operator: Operator.IN, value };\n}\n\n/**\n * Creates a NOT_IN condition with the specified field and values.\n *\n * @param field - The field name to compare\n * @param value - The values to compare against\n * @returns A condition with NOT_IN operator\n */\nexport function notIn(field: string, ...value: any[]): Condition {\n return { field, operator: Operator.NOT_IN, value };\n}\n\n/**\n * Creates a BETWEEN condition with the specified field and range.\n *\n * @param field - The field name to compare\n * @param start - The start value of the range\n * @param end - The end value of the range\n * @returns A condition with BETWEEN operator\n */\nexport function between(field: string, start: any, end: any): Condition {\n return { field, operator: Operator.BETWEEN, value: [start, end] };\n}\n\n/**\n * Creates an ALL_IN condition with the specified field and values.\n *\n * @param field - The field name to compare\n * @param value - The values to compare against\n * @returns A condition with ALL_IN operator\n */\nexport function allIn(field: string, ...value: any[]): Condition {\n return { field, operator: Operator.ALL_IN, value };\n}\n\n/**\n * Creates a STARTS_WITH condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @param ignoreCase - Whether to ignore case in the comparison\n * @returns A condition with STARTS_WITH operator\n */\nexport function startsWith(\n field: string,\n value: any,\n ignoreCase?: boolean,\n): Condition {\n const options: Record<string, any> | undefined =\n ignoreCaseOptions(ignoreCase);\n return { field, operator: Operator.STARTS_WITH, value, options };\n}\n\n/**\n * Creates an ENDS_WITH condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @param ignoreCase - Whether to ignore case in the comparison\n * @returns A condition with ENDS_WITH operator\n */\nexport function endsWith(\n field: string,\n value: any,\n ignoreCase?: boolean,\n): Condition {\n const options: Record<string, any> | undefined =\n ignoreCaseOptions(ignoreCase);\n return { field, operator: Operator.ENDS_WITH, value, options };\n}\n\n/**\n * Creates an ELEM_MATCH condition with the specified field and child condition.\n *\n * @param field - The field name to match elements in\n * @param value - The condition to match elements against\n * @returns A condition with ELEM_MATCH operator\n */\nexport function elemMatch(field: string, value: Condition): Condition {\n return { field, operator: Operator.ELEM_MATCH, children: [value] };\n}\n\n/**\n * Creates a NULL condition with the specified field.\n *\n * @param field - The field name to check\n * @returns A condition with NULL operator\n */\nexport function isNull(field: string): Condition {\n return { field, operator: Operator.NULL };\n}\n\n/**\n * Creates a NOT_NULL condition with the specified field.\n *\n * @param field - The field name to check\n * @returns A condition with NOT_NULL operator\n */\nexport function notNull(field: string): Condition {\n return { field, operator: Operator.NOT_NULL };\n}\n\n/**\n * Creates a TRUE condition with the specified field.\n *\n * @param field - The field name to check\n * @returns A condition with TRUE operator\n */\nexport function isTrue(field: string): Condition {\n return { field, operator: Operator.TRUE };\n}\n\n/**\n * Creates a FALSE condition with the specified field.\n *\n * @param field - The field name to check\n * @returns A condition with FALSE operator\n */\nexport function isFalse(field: string): Condition {\n return { field, operator: Operator.FALSE };\n}\n\n/**\n * Creates an EXISTS condition with the specified field and existence flag.\n *\n * @param field - The field name to check\n * @param exists - Whether the field should exist (default: true)\n * @returns A condition with EXISTS operator\n */\nexport function exists(field: string, exists: boolean = true): Condition {\n return { field, operator: Operator.EXISTS, value: exists };\n}\n\n/**\n * Creates a TODAY condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with TODAY operator\n */\nexport function today(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.TODAY, options };\n}\n\n/**\n * Creates a BEFORE_TODAY condition with the specified field and time.\n *\n * @param field - The field name to check\n * @param time - The time to compare against\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with BEFORE_TODAY operator\n */\nexport function beforeToday(\n field: string,\n time: any,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.BEFORE_TODAY, value: time, options };\n}\n\n/**\n * Creates a TOMORROW condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with TOMORROW operator\n */\nexport function tomorrow(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.TOMORROW, options };\n}\n\n/**\n * Creates a THIS_WEEK condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with THIS_WEEK operator\n */\nexport function thisWeek(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.THIS_WEEK, options };\n}\n\n/**\n * Creates a NEXT_WEEK condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with NEXT_WEEK operator\n */\nexport function nextWeek(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.NEXT_WEEK, options };\n}\n\n/**\n * Creates a LAST_WEEK condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with LAST_WEEK operator\n */\nexport function lastWeek(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.LAST_WEEK, options };\n}\n\n/**\n * Creates a THIS_MONTH condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with THIS_MONTH operator\n */\nexport function thisMonth(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.THIS_MONTH, options };\n}\n\n/**\n * Creates a LAST_MONTH condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with LAST_MONTH operator\n */\nexport function lastMonth(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.LAST_MONTH, options };\n}\n\n/**\n * Creates a RECENT_DAYS condition with the specified field and number of days.\n *\n * @param field - The field name to check\n * @param days - The number of recent days to include\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with RECENT_DAYS operator\n */\nexport function recentDays(\n field: string,\n days: number,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.RECENT_DAYS, value: days, options };\n}\n\n/**\n * Creates an EARLIER_DAYS condition with the specified field and number of days.\n *\n * @param field - The field name to check\n * @param days - The number of days to look back\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with EARLIER_DAYS operator\n */\nexport function earlierDays(\n field: string,\n days: number,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.EARLIER_DAYS, value: days, options };\n}\n\n/**\n * Creates a RAW condition with the specified raw value.\n *\n * @param raw - The raw condition value\n * @returns A condition with RAW operator\n */\nexport function raw(raw: any): Condition {\n return { operator: Operator.RAW, value: raw };\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ConditionCapable } from './condition';\n\nexport enum SortDirection {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/**\n * Interface for sort criteria.\n */\nexport interface Sort {\n field: string;\n direction: SortDirection;\n}\n\n/**\n * Interface for objects that support sorting.\n */\nexport interface SortCapable {\n sort?: Sort[];\n}\n\n/**\n * Interface for pagination information.\n *\n * Page number, starting from 1\n * Page size\n */\nexport interface Pagination {\n index: number;\n size: number;\n}\n\nexport const DEFAULT_PAGINATION: Pagination = {\n index: 1,\n size: 10,\n};\n\n/**\n * Interface for field projection.\n */\nexport interface Projection {\n include?: string[];\n exclude?: string[];\n}\n\nexport const DEFAULT_PROJECTION: Projection = {};\n\n/**\n * Interface for objects that support field projection.\n */\nexport interface ProjectionCapable {\n projection?: Projection;\n}\n\n/**\n * Interface for queryable objects that support conditions, projection, and sorting.\n */\nexport interface Queryable\n extends ConditionCapable,\n ProjectionCapable,\n SortCapable {}\n\n/**\n * Interface for single query objects.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface SingleQuery extends Queryable {}\n\n/**\n * Interface for list query objects.\n *\n * Limit the number of results. Default: DEFAULT_PAGINATION.size\n */\nexport interface ListQuery extends Queryable {\n limit?: number;\n}\n\n/**\n * Interface for paged query objects.\n */\nexport interface PagedQuery extends Queryable {\n pagination?: Pagination;\n}\n\n/**\n * Interface for paged list results.\n */\nexport interface PagedList<T> {\n total: number;\n list: T[];\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Enumerates the types of recoverability for errors or operations, allowing for classification and handling based on whether an error is transient and can be resolved by retrying.\n *\n * The [RecoverableType] enum provides a way to categorize errors into three distinct categories: [RECOVERABLE], [UNRECOVERABLE], and [UNKNOWN].\n * This categorization is essential for implementing robust error handling and retry mechanisms in applications,\n * ensuring that temporary issues are retried while permanent or unknown issues are handled appropriately.\n *\n */\nexport enum RecoverableType {\n /**\n * Represents an error type that indicates the operation or error can be retried.\n *\n * This enum value is used to classify errors in a way that allows for the implementation of retry logic. When an error\n * is marked as [RECOVERABLE], it signifies that the error condition is temporary and might be resolved upon retrying the\n * operation. This is particularly useful in scenarios where network issues, transient server errors, or other temporary\n * conditions may cause an operation to fail, but with a high likelihood of success on subsequent attempts.\n */\n RECOVERABLE = 'RECOVERABLE',\n /**\n * Represents an error type that indicates the operation or error cannot be retried.\n *\n * This enum value is used to classify errors in a way that signifies the error condition is permanent and retrying the operation will not resolve the issue. It is particularly\n * useful for handling errors where the underlying problem is fundamental and cannot be resolved by simply retrying, such as invalid input, resource exhaustion, or other non-transient\n * issues.\n */\n UNKNOWN = 'UNKNOWN',\n\n /**\n * Represents an unknown type of recoverability for an error or operation.\n * This is used when the recoverability of an error cannot be determined or is not specified.\n */\n UNRECOVERABLE = 'UNRECOVERABLE',\n}\n\n/**\n * Represents an error that occurs during the binding process, typically when data is being mapped to or from an object.\n * This class extends the [Named] interface, inheriting the `name` property which can be used to identify the source or context of the error.\n *\n * @param name The name or identifier for the context in which the error occurred.\n * @param msg A message describing the error.\n */\nexport interface BindingError {\n name: string;\n msg: string;\n}\n\n/**\n * Represents the information about an error, including whether the operation succeeded, the error code, and any associated messages or binding errors.\n *\n * This interface is designed to provide a standardized way of handling and representing errors across different parts of an application. It includes methods to check if the operation was successful, retrieve the error code\n * , and access any additional error details such as messages or binding errors.\n */\nexport interface ErrorInfo {\n /**\n * Represents the error code associated with an error. This value is used to identify the type of error that has occurred,\n * which can be useful for debugging, logging, and handling errors in a standardized way.\n */\n errorCode: string;\n /**\n * Represents the message associated with an error. This message provides a human-readable description of the error, which can be used for logging, debugging, or displaying to the user\n * .\n */\n errorMsg: string;\n /**\n * Provides a list of [BindingError] instances that occurred during the binding process.\n * Each [BindingError] contains information about the error, including its name and a message describing the issue.\n * This property returns an empty list if no binding errors are present.\n */\n bindingErrors?: BindingError[];\n}\n\nexport class ErrorCodes {\n /**\n * A constant representing a successful operation or status.\n * This value is typically used in the context of error handling and response descriptions to indicate that an operation has been completed successfully.\n */\n static readonly SUCCEEDED = 'Ok';\n static readonly SUCCEEDED_MESSAGE = '';\n\n /**\n * Error code for when a requested resource is not found.\n */\n static readonly NOT_FOUND = 'NotFound';\n\n /**\n * Default message for NOT_FOUND error code.\n */\n static readonly NOT_FOUND_MESSAGE = 'Not found resource!';\n\n /**\n * Error code for bad request errors.\n */\n static readonly BAD_REQUEST = 'BadRequest';\n\n /**\n * Error code for illegal argument errors.\n */\n static readonly ILLEGAL_ARGUMENT = 'IllegalArgument';\n\n /**\n * Error code for illegal state errors.\n */\n static readonly ILLEGAL_STATE = 'IllegalState';\n\n /**\n * Error code for request timeout errors.\n */\n static readonly REQUEST_TIMEOUT = 'RequestTimeout';\n\n /**\n * Error code for too many requests errors (rate limiting).\n */\n static readonly TOO_MANY_REQUESTS = 'TooManyRequests';\n\n /**\n * Error code for duplicate request ID errors.\n */\n static readonly DUPLICATE_REQUEST_ID = 'DuplicateRequestId';\n\n /**\n * Error code for command validation errors.\n */\n static readonly COMMAND_VALIDATION = 'CommandValidation';\n\n /**\n * Error code for when no command is found to rewrite.\n */\n static readonly REWRITE_NO_COMMAND = 'RewriteNoCommand';\n\n /**\n * Error code for event version conflicts.\n */\n static readonly EVENT_VERSION_CONFLICT = 'EventVersionConflict';\n\n /**\n * Error code for duplicate aggregate ID errors.\n */\n static readonly DUPLICATE_AGGREGATE_ID = 'DuplicateAggregateId';\n\n /**\n * Error code for command expected version conflicts.\n */\n static readonly COMMAND_EXPECT_VERSION_CONFLICT =\n 'CommandExpectVersionConflict';\n\n /**\n * Error code for sourcing version conflicts.\n */\n static readonly SOURCING_VERSION_CONFLICT = 'SourcingVersionConflict';\n\n /**\n * Error code for illegal access to deleted aggregate errors.\n */\n static readonly ILLEGAL_ACCESS_DELETED_AGGREGATE =\n 'IllegalAccessDeletedAggregate';\n\n /**\n * Error code for illegal access to owner aggregate errors.\n */\n static readonly ILLEGAL_ACCESS_OWNER_AGGREGATE =\n 'IllegalAccessOwnerAggregate';\n\n /**\n * Error code for internal server errors.\n */\n static readonly INTERNAL_SERVER_ERROR = 'InternalServerError';\n\n /**\n * Checks if the provided error code represents a successful operation.\n *\n * @param errorCode The error code to check\n * @returns true if the error code is 'Ok', false otherwise\n */\n static isSucceeded(errorCode: string): boolean {\n return errorCode === ErrorCodes.SUCCEEDED;\n }\n\n /**\n * Checks if the provided error code represents an error condition.\n *\n * @param errorCode The error code to check\n * @returns true if the error code is not 'Ok', false otherwise\n */\n static isError(errorCode: string): boolean {\n return !ErrorCodes.isSucceeded(errorCode);\n }\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Function kind enum\n *\n * Represents the different types of functions in the system.\n */\nexport enum FunctionKind {\n /**\n * Command function kind\n */\n COMMAND = 'COMMAND',\n\n /**\n * Error function kind\n */\n ERROR = 'ERROR',\n\n /**\n * Event function kind\n */\n EVENT = 'EVENT',\n\n /**\n * Sourcing function kind\n */\n SOURCING = 'SOURCING',\n\n /**\n * State event function kind\n */\n STATE_EVENT = 'STATE_EVENT',\n}\n\n/**\n * Interface for function information.\n */\nexport interface FunctionInfo {\n functionKind: FunctionKind;\n contextName: string;\n processorName: string;\n name: string;\n}\n\n/**\n * Interface for objects that have function information.\n */\nexport interface FunctionInfoCapable {\n function: FunctionInfo;\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { NamedBoundedContext } from './naming.ts';\n\n/**\n * Interface for classes that have a creation time.\n */\nexport interface CreateTimeCapable {\n /**\n * Gets the creation time in milliseconds since the Unix epoch.\n */\n createTime: number;\n}\n\n/**\n * Interface for objects that track deletion status.\n */\nexport interface DeletedCapable {\n /**\n * Whether the aggregate is deleted.\n */\n deleted: boolean;\n}\n\n/**\n * Interface for objects that track event IDs.\n */\nexport interface EventIdCapable {\n /**\n * The event id of the aggregate.\n */\n eventId: string;\n}\n\n/**\n * Interface for objects that track event times.\n */\nexport interface EventTimeCapable {\n /**\n * The last event time of the aggregate, represented as a Unix timestamp in milliseconds.\n */\n eventTime: number;\n}\n\n/**\n * Interface for objects that track the first event time.\n */\nexport interface FirstEventTimeCapable {\n /**\n * The first event time of the aggregate, represented as a Unix timestamp in milliseconds.\n */\n firstEventTime: number;\n}\n\n/**\n * Interface for objects that track the first operator.\n */\nexport interface FirstOperatorCapable {\n /**\n * The first operator of the aggregate.\n */\n firstOperator: string;\n}\n\n/**\n * Interface for objects that have an aggregate name.\n */\nexport interface AggregateNameCapable {\n /**\n * The name of the aggregate.\n */\n aggregateName: string;\n}\n\n/**\n * Interface for named aggregates that belong to a bounded context.\n */\nexport interface NamedAggregate\n extends NamedBoundedContext,\n AggregateNameCapable {}\n\n/**\n * Interface for aggregate IDs that combine tenant and named aggregate information.\n */\nexport interface AggregateId extends TenantId, NamedAggregate {\n aggregateId: string;\n}\n\n/**\n * Interface for objects that track the last operator.\n */\nexport interface OperatorCapable {\n /**\n * The last operator of the aggregate.\n */\n operator: string;\n}\n\nexport const DEFAULT_OWNER_ID = '';\n\n/**\n * Interface for identifying resource owners.\n */\nexport interface OwnerId {\n /**\n * Unique identifier of the resource owner.\n */\n ownerId: string;\n}\n\n/**\n * Interface for objects that track snapshot times.\n */\nexport interface SnapshotTimeCapable {\n /**\n * The snapshot time of the aggregate, represented as a Unix timestamp in milliseconds.\n */\n snapshotTime: number;\n}\n\nexport const DEFAULT_TENANT_ID = '(0)';\n\n/**\n * Interface for objects that have a tenant ID.\n */\nexport interface TenantId {\n tenantId: string;\n}\n\n/**\n * Interface for objects that hold state.\n */\nexport interface StateCapable<S> {\n state: S;\n}\n"],"names":["_CommandHeaders","CommandHeaders","CommandStage","Operator","ConditionOptionKey","ignoreCaseOptions","ignoreCase","dateOptions","datePattern","zoneId","options","DeletionState","and","conditions","or","nor","id","value","ids","aggregateId","aggregateIds","tenantId","ownerId","deleted","active","all","eq","field","ne","gt","lt","gte","lte","contains","isIn","notIn","between","start","end","allIn","startsWith","endsWith","elemMatch","isNull","notNull","isTrue","isFalse","exists","today","beforeToday","time","tomorrow","thisWeek","nextWeek","lastWeek","thisMonth","lastMonth","recentDays","days","earlierDays","raw","SortDirection","DEFAULT_PAGINATION","DEFAULT_PROJECTION","RecoverableType","_ErrorCodes","errorCode","ErrorCodes","FunctionKind","DEFAULT_OWNER_ID","DEFAULT_TENANT_ID"],"mappings":"AAiCO,MAAMA,IAAN,MAAMA,EAAe;AAqI5B;AAjIEA,EAAgB,yBAAyB,YAMzCA,EAAgB,YAAY,GAAGA,EAAe,sBAAsB,aAMpEA,EAAgB,WAAW,GAAGA,EAAe,sBAAsB,YAMnEA,EAAgB,eAAe,GAAGA,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AAAA,OASVA,EAAA,cAAc,eAQdA,EAAA,UAAU,WAMVA,EAAA,gBAAgB,iBAvBNA,IAAAA,KAAA,CAAA,CAAA;AA+DL,MAAMC,IAAN,MAAMA,EAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAsGtB,OAAO,YAAYC,GAA4B;AAC7C,WAAOA,MAAcD,EAAW;AAAA,EAClC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,OAAO,QAAQC,GAA4B;AACzC,WAAO,CAACD,EAAW,YAAYC,CAAS;AAAA,EAC1C;AACF;AA9GED,EAAgB,YAAY,MAC5BA,EAAgB,oBAAoB,IAKpCA,EAAgB,YAAY,YAK5BA,EAAgB,oBAAoB,uBAKpCA,EAAgB,cAAc,cAK9BA,EAAgB,mBAAmB,mBAKnCA,EAAgB,gBAAgB,gBAKhCA,EAAgB,kBAAkB,kBAKlCA,EAAgB,oBAAoB,mBAKpCA,EAAgB,uBAAuB,sBAKvCA,EAAgB,qBAAqB,qBAKrCA,EAAgB,qBAAqB,oBAKrCA,EAAgB,yBAAyB,wBAKzCA,EAAgB,yBAAyB,wBAKzCA,EAAgB,kCACd,gCAKFA,EAAgB,4BAA4B,2BAK5CA,EAAgB,mCACd,iCAKFA,EAAgB,iCACd,+BAKFA,EAAgB,wBAAwB;AA9FnC,IAAME,IAANF;AClEA,IAAKG,sBAAAA,OAIVA,EAAA,UAAU,WAKVA,EAAA,QAAQ,SAKRA,EAAA,QAAQ,SAKRA,EAAA,WAAW,YAKXA,EAAA,cAAc,eAxBJA,IAAAA,KAAA,CAAA,CAAA;AC2FL,MAAMC,KAAmB,IAsBnBC,KAAoB;"}
package/dist/index.umd.js CHANGED
@@ -1 +1,2 @@
1
1
  (function(E,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(E=typeof globalThis<"u"?globalThis:E||self,c(E.FetcherWow={}))})(this,(function(E){"use strict";const T=class T{};T.COMMAND_HEADERS_PREFIX="Command-",T.TENANT_ID=`${T.COMMAND_HEADERS_PREFIX}Tenant-Id`,T.OWNER_ID=`${T.COMMAND_HEADERS_PREFIX}Owner-Id`,T.AGGREGATE_ID=`${T.COMMAND_HEADERS_PREFIX}Aggregate-Id`,T.AGGREGATE_VERSION=`${T.COMMAND_HEADERS_PREFIX}Aggregate-Version`,T.WAIT_PREFIX=`${T.COMMAND_HEADERS_PREFIX}Wait-`,T.WAIT_TIME_OUT=`${T.WAIT_PREFIX}Timeout`,T.WAIT_STAGE=`${T.WAIT_PREFIX}Stage`,T.WAIT_CONTEXT=`${T.WAIT_PREFIX}Context`,T.WAIT_PROCESSOR=`${T.WAIT_PREFIX}Processor`,T.WAIT_FUNCTION=`${T.WAIT_PREFIX}Function`,T.WAIT_TAIL_PREFIX=`${T.WAIT_PREFIX}Tail-`,T.WAIT_TAIL_STAGE=`${T.WAIT_TAIL_PREFIX}Stage`,T.WAIT_TAIL_CONTEXT=`${T.WAIT_TAIL_PREFIX}Context`,T.WAIT_TAIL_PROCESSOR=`${T.WAIT_TAIL_PREFIX}Processor`,T.WAIT_TAIL_FUNCTION=`${T.WAIT_TAIL_PREFIX}Function`,T.REQUEST_ID=`${T.COMMAND_HEADERS_PREFIX}Request-Id`,T.LOCAL_FIRST=`${T.COMMAND_HEADERS_PREFIX}Local-First`,T.COMMAND_AGGREGATE_CONTEXT=`${T.COMMAND_HEADERS_PREFIX}Aggregate-Context`,T.COMMAND_AGGREGATE_NAME=`${T.COMMAND_HEADERS_PREFIX}Aggregate-Name`,T.COMMAND_TYPE=`${T.COMMAND_HEADERS_PREFIX}Type`,T.COMMAND_HEADER_X_PREFIX=`${T.COMMAND_HEADERS_PREFIX}Header-`;let c=T;var _=(t=>(t.SENT="SENT",t.PROCESSED="PROCESSED",t.SNAPSHOT="SNAPSHOT",t.PROJECTED="PROJECTED",t.EVENT_HANDLED="EVENT_HANDLED",t.SAGA_HANDLED="SAGA_HANDLED",t))(_||{}),i=(t=>(t.AND="AND",t.OR="OR",t.NOR="NOR",t.ID="ID",t.IDS="IDS",t.AGGREGATE_ID="AGGREGATE_ID",t.AGGREGATE_IDS="AGGREGATE_IDS",t.TENANT_ID="TENANT_ID",t.OWNER_ID="OWNER_ID",t.DELETED="DELETED",t.ALL="ALL",t.EQ="EQ",t.NE="NE",t.GT="GT",t.LT="LT",t.GTE="GTE",t.LTE="LTE",t.CONTAINS="CONTAINS",t.IN="IN",t.NOT_IN="NOT_IN",t.BETWEEN="BETWEEN",t.ALL_IN="ALL_IN",t.STARTS_WITH="STARTS_WITH",t.ENDS_WITH="ENDS_WITH",t.ELEM_MATCH="ELEM_MATCH",t.NULL="NULL",t.NOT_NULL="NOT_NULL",t.TRUE="TRUE",t.FALSE="FALSE",t.EXISTS="EXISTS",t.TODAY="TODAY",t.BEFORE_TODAY="BEFORE_TODAY",t.TOMORROW="TOMORROW",t.THIS_WEEK="THIS_WEEK",t.NEXT_WEEK="NEXT_WEEK",t.LAST_WEEK="LAST_WEEK",t.THIS_MONTH="THIS_MONTH",t.LAST_MONTH="LAST_MONTH",t.RECENT_DAYS="RECENT_DAYS",t.EARLIER_DAYS="EARLIER_DAYS",t.RAW="RAW",t))(i||{}),S=(t=>(t.IGNORE_CASE_OPTION_KEY="ignoreCase",t.ZONE_ID_OPTION_KEY="zoneId",t.DATE_PATTERN_OPTION_KEY="datePattern",t))(S||{});function D(t){if(!(typeof t>"u"))return{ignoreCase:t}}function R(t,n){if(typeof t>"u"&&typeof n>"u")return;const A={};return typeof t<"u"&&(A.datePattern=t),typeof n<"u"&&(A.zoneId=n),A}var L=(t=>(t.ACTIVE="ACTIVE",t.DELETED="DELETED",t.ALL="ALL",t))(L||{});function f(...t){return{operator:i.AND,children:t}}function M(...t){return{operator:i.OR,children:t}}function l(...t){return{operator:i.NOR,children:t}}function W(t){return{operator:i.ID,value:t}}function h(t){return{operator:i.IDS,value:t}}function G(t){return{operator:i.AGGREGATE_ID,value:t}}function r(...t){return{operator:i.AGGREGATE_IDS,value:t}}function F(t){return{operator:i.TENANT_ID,value:t}}function P(t){return{operator:i.OWNER_ID,value:t}}function s(t){return{operator:i.DELETED,value:t}}function g(){return s("ACTIVE")}function C(){return{operator:i.ALL}}function U(t,n){return{field:t,operator:i.EQ,value:n}}function X(t,n){return{field:t,operator:i.NE,value:n}}function V(t,n){return{field:t,operator:i.GT,value:n}}function $(t,n){return{field:t,operator:i.LT,value:n}}function v(t,n){return{field:t,operator:i.GTE,value:n}}function H(t,n){return{field:t,operator:i.LTE,value:n}}function y(t,n,A){const I=D(A);return{field:t,operator:i.CONTAINS,value:n,options:I}}function Y(t,...n){return{field:t,operator:i.IN,value:n}}function w(t,...n){return{field:t,operator:i.NOT_IN,value:n}}function B(t,n,A){return{field:t,operator:i.BETWEEN,value:[n,A]}}function K(t,...n){return{field:t,operator:i.ALL_IN,value:n}}function Q(t,n,A){const I=D(A);return{field:t,operator:i.STARTS_WITH,value:n,options:I}}function k(t,n,A){const I=D(A);return{field:t,operator:i.ENDS_WITH,value:n,options:I}}function q(t,n){return{field:t,operator:i.ELEM_MATCH,children:[n]}}function b(t){return{field:t,operator:i.NULL}}function J(t){return{field:t,operator:i.NOT_NULL}}function d(t){return{field:t,operator:i.TRUE}}function j(t){return{field:t,operator:i.FALSE}}function z(t,n=!0){return{field:t,operator:i.EXISTS,value:n}}function Z(t,n,A){const I=R(n,A);return{field:t,operator:i.TODAY,options:I}}function p(t,n,A,I){const u=R(A,I);return{field:t,operator:i.BEFORE_TODAY,value:n,options:u}}function m(t,n,A){const I=R(n,A);return{field:t,operator:i.TOMORROW,options:I}}function x(t,n,A){const I=R(n,A);return{field:t,operator:i.THIS_WEEK,options:I}}function tt(t,n,A){const I=R(n,A);return{field:t,operator:i.NEXT_WEEK,options:I}}function Et(t,n,A){const I=R(n,A);return{field:t,operator:i.LAST_WEEK,options:I}}function nt(t,n,A){const I=R(n,A);return{field:t,operator:i.THIS_MONTH,options:I}}function Tt(t,n,A){const I=R(n,A);return{field:t,operator:i.LAST_MONTH,options:I}}function it(t,n,A,I){const u=R(A,I);return{field:t,operator:i.RECENT_DAYS,value:n,options:u}}function At(t,n,A,I){const u=R(A,I);return{field:t,operator:i.EARLIER_DAYS,value:n,options:u}}function It(t){return{operator:i.RAW,value:t}}var o=(t=>(t.ASC="ASC",t.DESC="DESC",t))(o||{});const Nt={index:1,size:10},Rt={};var O=(t=>(t.RECOVERABLE="RECOVERABLE",t.UNKNOWN="UNKNOWN",t.UNRECOVERABLE="UNRECOVERABLE",t))(O||{});const N=class N{static isSucceeded(n){return n===N.SUCCEEDED}static isError(n){return!N.isSucceeded(n)}};N.SUCCEEDED="Ok",N.SUCCEEDED_MESSAGE="",N.NOT_FOUND="NotFound",N.NOT_FOUND_MESSAGE="Not found resource!",N.BAD_REQUEST="BadRequest",N.ILLEGAL_ARGUMENT="IllegalArgument",N.ILLEGAL_STATE="IllegalState",N.REQUEST_TIMEOUT="RequestTimeout",N.TOO_MANY_REQUESTS="TooManyRequests",N.DUPLICATE_REQUEST_ID="DuplicateRequestId",N.COMMAND_VALIDATION="CommandValidation",N.REWRITE_NO_COMMAND="RewriteNoCommand",N.EVENT_VERSION_CONFLICT="EventVersionConflict",N.DUPLICATE_AGGREGATE_ID="DuplicateAggregateId",N.COMMAND_EXPECT_VERSION_CONFLICT="CommandExpectVersionConflict",N.SOURCING_VERSION_CONFLICT="SourcingVersionConflict",N.ILLEGAL_ACCESS_DELETED_AGGREGATE="IllegalAccessDeletedAggregate",N.ILLEGAL_ACCESS_OWNER_AGGREGATE="IllegalAccessOwnerAggregate",N.INTERNAL_SERVER_ERROR="InternalServerError";let e=N;var a=(t=>(t.COMMAND="COMMAND",t.ERROR="ERROR",t.EVENT="EVENT",t.SOURCING="SOURCING",t.STATE_EVENT="STATE_EVENT",t))(a||{});const ct="",ut="(0)";E.CommandHeaders=c,E.CommandStage=_,E.ConditionOptionKey=S,E.DEFAULT_OWNER_ID=ct,E.DEFAULT_PAGINATION=Nt,E.DEFAULT_PROJECTION=Rt,E.DEFAULT_TENANT_ID=ut,E.DeletionState=L,E.ErrorCodes=e,E.FunctionKind=a,E.Operator=i,E.RecoverableType=O,E.SortDirection=o,E.active=g,E.aggregateId=G,E.aggregateIds=r,E.all=C,E.allIn=K,E.and=f,E.beforeToday=p,E.between=B,E.contains=y,E.dateOptions=R,E.deleted=s,E.earlierDays=At,E.elemMatch=q,E.endsWith=k,E.eq=U,E.exists=z,E.gt=V,E.gte=v,E.id=W,E.ids=h,E.ignoreCaseOptions=D,E.isFalse=j,E.isIn=Y,E.isNull=b,E.isTrue=d,E.lastMonth=Tt,E.lastWeek=Et,E.lt=$,E.lte=H,E.ne=X,E.nextWeek=tt,E.nor=l,E.notIn=w,E.notNull=J,E.or=M,E.ownerId=P,E.raw=It,E.recentDays=it,E.startsWith=Q,E.tenantId=F,E.thisMonth=nt,E.thisWeek=x,E.today=Z,E.tomorrow=m,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
2
+ //# sourceMappingURL=index.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.umd.js","sources":["../src/command/commandHeaders.ts","../src/command/types.ts","../src/query/operator.ts","../src/query/condition.ts","../src/query/queryable.ts","../src/types/error.ts","../src/types/function.ts","../src/types/modeling.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Command Header Constants\n *\n * Defines standard HTTP header constants used in command processing within the Wow framework.\n * These headers are used to pass metadata and control information between services.\n *\n * @example\n * ```typescript\n * // Using header constants in a request\n * const request = {\n * method: 'POST',\n * headers: {\n * [CommandHeaders.TENANT_ID]: 'tenant-123',\n * [CommandHeaders.AGGREGATE_ID]: 'aggregate-456',\n * [CommandHeaders.REQUEST_ID]: 'request-789'\n * },\n * body: JSON.stringify(command)\n * };\n * ```\n */\nexport class CommandHeaders {\n /**\n * Prefix for all command-related headers\n */\n static readonly COMMAND_HEADERS_PREFIX = 'Command-';\n\n /**\n * Tenant identifier header\n * Used to identify the tenant context for the command\n */\n static readonly TENANT_ID = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Tenant-Id`;\n\n /**\n * Owner identifier header\n * Used to identify the owner context for the command\n */\n static readonly OWNER_ID = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Owner-Id`;\n\n /**\n * Aggregate identifier header\n * Used to identify the aggregate root for the command\n */\n static readonly AGGREGATE_ID = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Aggregate-Id`;\n\n /**\n * Aggregate version header\n * Used to specify the expected version of the aggregate root\n */\n static readonly AGGREGATE_VERSION = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Aggregate-Version`;\n\n /**\n * Wait prefix for wait-related headers\n */\n static readonly WAIT_PREFIX = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Wait-`;\n\n /**\n * Wait timeout header\n * Specifies the maximum time to wait for command processing\n */\n static readonly WAIT_TIME_OUT = `${CommandHeaders.WAIT_PREFIX}Timeout`;\n\n // region Wait Stage\n /**\n * Wait stage header\n * Specifies the processing stage to wait for\n */\n static readonly WAIT_STAGE = `${CommandHeaders.WAIT_PREFIX}Stage`;\n\n /**\n * Wait context header\n * Specifies the bounded context to wait for\n */\n static readonly WAIT_CONTEXT = `${CommandHeaders.WAIT_PREFIX}Context`;\n\n /**\n * Wait processor header\n * Specifies the processor to wait for\n */\n static readonly WAIT_PROCESSOR = `${CommandHeaders.WAIT_PREFIX}Processor`;\n\n /**\n * Wait function header\n * Specifies the function to wait for\n */\n static readonly WAIT_FUNCTION = `${CommandHeaders.WAIT_PREFIX}Function`;\n // endregion\n\n // region Wait Chain Tail\n /**\n * Wait tail prefix for wait chain tail-related headers\n */\n static readonly WAIT_TAIL_PREFIX = `${CommandHeaders.WAIT_PREFIX}Tail-`;\n\n /**\n * Wait tail stage header\n * Specifies the tail processing stage to wait for\n */\n static readonly WAIT_TAIL_STAGE = `${CommandHeaders.WAIT_TAIL_PREFIX}Stage`;\n\n /**\n * Wait tail context header\n * Specifies the tail bounded context to wait for\n */\n static readonly WAIT_TAIL_CONTEXT = `${CommandHeaders.WAIT_TAIL_PREFIX}Context`;\n\n /**\n * Wait tail processor header\n * Specifies the tail processor to wait for\n */\n static readonly WAIT_TAIL_PROCESSOR = `${CommandHeaders.WAIT_TAIL_PREFIX}Processor`;\n\n /**\n * Wait tail function header\n * Specifies the tail function to wait for\n */\n static readonly WAIT_TAIL_FUNCTION = `${CommandHeaders.WAIT_TAIL_PREFIX}Function`;\n // endregion\n\n /**\n * Request identifier header\n * Used to track the request ID for correlation\n */\n static readonly REQUEST_ID = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Request-Id`;\n\n /**\n * Local first header\n * Indicates whether to prefer local processing\n */\n static readonly LOCAL_FIRST = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Local-First`;\n\n /**\n * Command aggregate context header\n * Specifies the bounded context of the aggregate\n */\n static readonly COMMAND_AGGREGATE_CONTEXT = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Aggregate-Context`;\n\n /**\n * Command aggregate name header\n * Specifies the name of the aggregate\n */\n static readonly COMMAND_AGGREGATE_NAME = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Aggregate-Name`;\n\n /**\n * Command type header\n * Specifies the type of the command\n */\n static readonly COMMAND_TYPE = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Type`;\n\n /**\n * Command header prefix for custom headers\n * Used to prefix custom command headers\n */\n static readonly COMMAND_HEADER_X_PREFIX = `${CommandHeaders.COMMAND_HEADERS_PREFIX}Header-`;\n}","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Command identifier interface\n *\n * Represents the unique identifier for a command.\n */\nexport interface CommandId {\n commandId: string;\n}\n\n/**\n * Wait command identifier capable interface\n *\n * Represents the identifier of the command being waited for.\n */\nexport interface WaitCommandIdCapable {\n waitCommandId: string;\n}\n\n/**\n * Request identifier interface\n *\n * Represents the unique identifier for a request, used for idempotency control.\n */\nexport interface RequestId {\n requestId: string;\n}\n\n/**\n * Command execution stage enum\n *\n * Represents the different stages of command execution lifecycle.\n */\nexport enum CommandStage {\n /**\n * When the command is published to the command bus/queue, a completion signal is generated.\n */\n SENT = 'SENT',\n\n /**\n * When the command is processed by the aggregate root, a completion signal is generated.\n */\n PROCESSED = 'PROCESSED',\n\n /**\n * When the snapshot is generated, a completion signal is generated.\n */\n SNAPSHOT = 'SNAPSHOT',\n\n /**\n * When the events generated by the command are *projected*, a completion signal is generated.\n */\n PROJECTED = 'PROJECTED',\n\n /**\n * When the events generated by the command are processed by *event handlers*, a completion signal is generated.\n */\n EVENT_HANDLED = 'EVENT_HANDLED',\n\n /**\n * When the events generated by the command are processed by *Saga*, a completion signal is generated.\n */\n SAGA_HANDLED = 'SAGA_HANDLED',\n}\n\n/**\n * Command stage capable interface\n *\n * Represents an object that has a command execution stage.\n */\nexport interface CommandStageCapable {\n stage: CommandStage;\n}\n\n/**\n * Command result capable interface\n *\n * Represents an object that contains command execution results.\n */\nexport interface CommandResultCapable {\n result: Record<string, any>;\n}\n\n/**\n * Signal time capable interface\n *\n * Represents an object that has a signal time (timestamp).\n */\nexport interface SignalTimeCapable {\n signalTime: number;\n}\n\n/**\n * Nullable aggregate version capable interface\n *\n * Represents an object that may have an aggregate version for optimistic concurrency control.\n */\nexport interface NullableAggregateVersionCapable {\n /**\n * The aggregate version of the aggregate.\n */\n aggregateVersion?: number;\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum Operator {\n /**\n * Performs logical AND on the provided condition list\n */\n AND = 'AND',\n\n /**\n * Performs logical OR on the provided condition list\n */\n OR = 'OR',\n\n /**\n * Performs logical NOR on the provided condition list\n */\n NOR = 'NOR',\n\n /**\n * Matches all documents where the `id` field value equals the specified value\n */\n ID = 'ID',\n\n /**\n * Matches all documents where the `id` field value equals any value in the specified list\n */\n IDS = 'IDS',\n\n /**\n * Matches documents where the aggregate root ID equals the specified value\n */\n AGGREGATE_ID = 'AGGREGATE_ID',\n\n /**\n * Matches all documents where the aggregate root ID equals any value in the specified list\n */\n AGGREGATE_IDS = 'AGGREGATE_IDS',\n\n /**\n * Matches all documents where the `tenantId` field value equals the specified value\n */\n TENANT_ID = 'TENANT_ID',\n\n /**\n * Matches all documents where the `ownerId` field value equals the specified value\n */\n OWNER_ID = 'OWNER_ID',\n\n /**\n * Matches all documents where the `deleted` field value equals the specified value\n */\n DELETED = 'DELETED',\n\n /**\n * Matches all documents\n */\n ALL = 'ALL',\n\n /**\n * Matches all documents where the field name value equals the specified value\n */\n EQ = 'EQ',\n\n /**\n * Matches all documents where the field name value does not equal the specified value\n */\n NE = 'NE',\n\n /**\n * Matches all documents where the given field's value is greater than the specified value\n */\n GT = 'GT',\n\n /**\n * Matches all documents where the given field's value is less than the specified value\n */\n LT = 'LT',\n\n /**\n * Matches all documents where the given field's value is greater than or equal to the specified value\n */\n GTE = 'GTE',\n\n /**\n * Matches all documents where the given field's value is less than or equal to the specified value\n */\n LTE = 'LTE',\n\n /**\n * Matches all documents where the given field's value contains the specified value\n */\n CONTAINS = 'CONTAINS',\n\n /**\n * Matches all documents where the field value equals any value in the specified list\n */\n IN = 'IN',\n\n /**\n * Matches all documents where the field value does not equal any specified value or does not exist\n */\n NOT_IN = 'NOT_IN',\n\n /**\n * Matches all documents where the field value is within the specified range\n */\n BETWEEN = 'BETWEEN',\n\n /**\n * Matches all documents where the field value is an array containing all specified values\n */\n ALL_IN = 'ALL_IN',\n\n /**\n * Matches documents where the field value starts with the specified string\n */\n STARTS_WITH = 'STARTS_WITH',\n\n /**\n * Matches documents where the field value ends with the specified string\n */\n ENDS_WITH = 'ENDS_WITH',\n\n /**\n * Matches all documents where the condition includes an array field,\n * and at least one member of the array matches the given condition.\n */\n ELEM_MATCH = 'ELEM_MATCH',\n\n /**\n * Matches all documents where the field value is `null`\n */\n NULL = 'NULL',\n\n /**\n * Matches all documents where the field value is not `null`\n */\n NOT_NULL = 'NOT_NULL',\n\n /**\n * Matches all documents where the field value is `true`\n */\n TRUE = 'TRUE',\n\n /**\n * Matches all documents where the field value is `false`\n */\n FALSE = 'FALSE',\n\n /**\n * Matches documents based on whether the field exists\n */\n EXISTS = 'EXISTS',\n\n // #region Date filtering conditions, field requirement: `long` type timestamp in milliseconds\n /**\n * Matches all documents where the field is within today's range\n * > For example: if `today` is `2024-06-06`, matches documents in the range\n * `2024-06-06 00:00:00.000` ~ `2024-06-06 23:59:59.999`\n */\n TODAY = 'TODAY',\n\n /**\n * Matches all documents where the field is before today\n */\n BEFORE_TODAY = 'BEFORE_TODAY',\n\n /**\n * Matches all documents where the field is within yesterday's range\n * > For example: if `today` is `2024-06-06`, matches documents in the range\n * `2024-06-05 00:00:00.000` ~ `2024-06-05 23:59:59.999`\n */\n TOMORROW = 'TOMORROW',\n\n /**\n * Matches all documents where the field is within this week's range\n */\n THIS_WEEK = 'THIS_WEEK',\n\n /**\n * Matches all documents where the field is within next week's range\n */\n NEXT_WEEK = 'NEXT_WEEK',\n\n /**\n * Matches all documents where the field is within last week's range\n */\n LAST_WEEK = 'LAST_WEEK',\n\n /**\n * Matches all documents where the field is within this month's range\n * > For example:\n * - `today`: `2024-06-06`\n * - Matching range: `2024-06-01 00:00:00.000` ~ `2024-06-30 23:59:59.999`\n */\n THIS_MONTH = 'THIS_MONTH',\n\n /**\n * Matches all documents where the field is within last month's range\n * > For example:\n * - `today`: `2024-06-06`\n * - Matching range: `2024-05-01 00:00:00.000` ~ `2024-05-31 23:59:59.999`\n */\n LAST_MONTH = 'LAST_MONTH',\n\n /**\n * Matches all documents where the field is within the specified number of recent days\n * > For example: last 3 days\n * - `today`: `2024-06-06`\n * - Matching range: `2024-06-04 00:00:00.000` ~ `2024-06-06 23:59:59.999`\n * - That is: today, yesterday, the day before yesterday\n */\n RECENT_DAYS = 'RECENT_DAYS',\n\n /**\n * Matches all documents where the field is before the specified number of days\n *\n * > For example: before 3 days\n * - `today`: `2024-06-06`\n * - Matching range: all documents less than `2024-06-04 00:00:00.000`\n */\n EARLIER_DAYS = 'EARLIER_DAYS',\n // #endregion\n\n /**\n * Raw operator, uses the condition value directly as the raw database query condition\n */\n RAW = 'RAW',\n}","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Operator } from './operator';\n\n/**\n * Condition option keys enumeration\n *\n * Defines standard option keys used in query conditions for special handling.\n */\nexport enum ConditionOptionKey {\n /**\n * Ignore case option key for string comparisons\n */\n IGNORE_CASE_OPTION_KEY = 'ignoreCase',\n\n /**\n * Time zone ID option key for date operations\n */\n ZONE_ID_OPTION_KEY = 'zoneId',\n\n /**\n * Date pattern option key for date formatting\n */\n DATE_PATTERN_OPTION_KEY = 'datePattern',\n}\n\n/**\n * Condition options interface\n *\n * Represents additional options that can be applied to query conditions,\n * such as case sensitivity, date patterns, and time zones.\n */\nexport interface ConditionOptions {\n /**\n * Whether to ignore case in string comparisons\n */\n ignoreCase?: boolean;\n\n /**\n * Date pattern for date formatting\n */\n datePattern?: string;\n\n /**\n * Time zone ID for date operations\n */\n zoneId?: string;\n\n /**\n * Additional custom options\n */\n [key: string]: any;\n}\n\n/**\n * Helper function to create condition options with ignoreCase flag.\n *\n * @param ignoreCase - Whether to ignore case\n * @returns Condition options or undefined if ignoreCase is undefined\n */\nexport function ignoreCaseOptions(\n ignoreCase?: boolean,\n): ConditionOptions | undefined {\n if (typeof ignoreCase === 'undefined') {\n return undefined;\n }\n return { ignoreCase };\n}\n\n/**\n * Helper function to create condition options with date pattern and zone ID.\n *\n * @param datePattern - Date pattern\n * @param zoneId - Time zone ID\n * @returns Condition options or undefined if both parameters are undefined\n */\nexport function dateOptions(\n datePattern?: string,\n zoneId?: string,\n): ConditionOptions | undefined {\n if (typeof datePattern === 'undefined' && typeof zoneId === 'undefined') {\n return undefined;\n }\n const options: ConditionOptions = {};\n if (typeof datePattern !== 'undefined') {\n options.datePattern = datePattern;\n }\n if (typeof zoneId !== 'undefined') {\n options.zoneId = zoneId;\n }\n return options;\n}\n\n/**\n * Interface for query conditions.\n *\n * When `operator` is `AND` or `OR` or `NOR`, `children` cannot be empty.\n */\nexport interface Condition {\n /**\n * Field name for the condition\n */\n field?: string;\n\n /**\n * Operator for the condition\n */\n operator?: Operator;\n\n /**\n * Value for the condition\n */\n value?: any;\n\n /**\n * Child conditions for logical operators (AND, OR, NOR)\n */\n children?: Condition[];\n\n /**\n * Additional options for the condition\n */\n options?: ConditionOptions;\n}\n\n/**\n * Interface for objects that have a condition.\n */\nexport interface ConditionCapable {\n condition: Condition;\n}\n\n/**\n * Deletion state enumeration\n *\n * Represents the different states of deletion for entities.\n */\nexport enum DeletionState {\n /**\n * Active state - entity is not deleted\n */\n ACTIVE = 'ACTIVE',\n\n /**\n * Deleted state - entity is deleted\n */\n DELETED = 'DELETED',\n\n /**\n * All state - includes both active and deleted entities\n */\n ALL = 'ALL',\n}\n\n/**\n * Creates an AND condition with the specified conditions.\n *\n * @param conditions - Conditions to combine with AND\n * @returns A condition with AND operator\n */\nexport function and(...conditions: Condition[]): Condition {\n return { operator: Operator.AND, children: conditions };\n}\n\n/**\n * Creates an OR condition with the specified conditions.\n *\n * @param conditions - Conditions to combine with OR\n * @returns A condition with OR operator\n */\nexport function or(...conditions: Condition[]): Condition {\n return { operator: Operator.OR, children: conditions };\n}\n\n/**\n * Creates a NOR condition with the specified conditions.\n *\n * @param conditions - Conditions to combine with NOR\n * @returns A condition with NOR operator\n */\nexport function nor(...conditions: Condition[]): Condition {\n return { operator: Operator.NOR, children: conditions };\n}\n\n/**\n * Creates an ID condition with the specified value.\n *\n * @param value - The ID value to match\n * @returns A condition with ID operator\n */\nexport function id(value: string): Condition {\n return { operator: Operator.ID, value: value };\n}\n\n/**\n * Creates an IDS condition with the specified values.\n *\n * @param value - The ID values to match\n * @returns A condition with IDS operator\n */\nexport function ids(value: string[]): Condition {\n return { operator: Operator.IDS, value: value };\n}\n\n/**\n * Creates an AGGREGATE_ID condition with the specified value.\n *\n * @param value - The aggregate ID value to match\n * @returns A condition with AGGREGATE_ID operator\n */\nexport function aggregateId(value: string): Condition {\n return { operator: Operator.AGGREGATE_ID, value: value };\n}\n\n/**\n * Creates an AGGREGATE_IDS condition with the specified values.\n *\n * @param value - The aggregate ID values to match\n * @returns A condition with AGGREGATE_IDS operator\n */\nexport function aggregateIds(...value: string[]): Condition {\n return { operator: Operator.AGGREGATE_IDS, value: value };\n}\n\n/**\n * Creates a TENANT_ID condition with the specified value.\n *\n * @param value - The tenant ID value to match\n * @returns A condition with TENANT_ID operator\n */\nexport function tenantId(value: string): Condition {\n return { operator: Operator.TENANT_ID, value: value };\n}\n\n/**\n * Creates an OWNER_ID condition with the specified value.\n *\n * @param value - The owner ID value to match\n * @returns A condition with OWNER_ID operator\n */\nexport function ownerId(value: string): Condition {\n return { operator: Operator.OWNER_ID, value: value };\n}\n\n/**\n * Creates a DELETED condition with the specified value.\n *\n * @param value - The deletion state value to match\n * @returns A condition with DELETED operator\n */\nexport function deleted(value: DeletionState): Condition {\n return { operator: Operator.DELETED, value: value };\n}\n\n/**\n * Creates an ACTIVE deletion state condition.\n *\n * @returns A condition with DELETED operator set to ACTIVE\n */\nexport function active(): Condition {\n return deleted(DeletionState.ACTIVE);\n}\n\n/**\n * Creates an ALL condition.\n *\n * @returns A condition with ALL operator\n */\nexport function all(): Condition {\n return {\n operator: Operator.ALL,\n };\n}\n\n/**\n * Creates an EQ (equals) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with EQ operator\n */\nexport function eq(field: string, value: any): Condition {\n return { field, operator: Operator.EQ, value };\n}\n\n/**\n * Creates a NE (not equals) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with NE operator\n */\nexport function ne(field: string, value: any): Condition {\n return { field, operator: Operator.NE, value };\n}\n\n/**\n * Creates a GT (greater than) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with GT operator\n */\nexport function gt(field: string, value: any): Condition {\n return { field, operator: Operator.GT, value };\n}\n\n/**\n * Creates a LT (less than) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with LT operator\n */\nexport function lt(field: string, value: any): Condition {\n return { field, operator: Operator.LT, value };\n}\n\n/**\n * Creates a GTE (greater than or equal) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with GTE operator\n */\nexport function gte(field: string, value: any): Condition {\n return { field, operator: Operator.GTE, value };\n}\n\n/**\n * Creates a LTE (less than or equal) condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @returns A condition with LTE operator\n */\nexport function lte(field: string, value: any): Condition {\n return { field, operator: Operator.LTE, value };\n}\n\n/**\n * Creates a CONTAINS condition with the specified field and value.\n *\n * @param field - The field name to search in\n * @param value - The value to search for\n * @param ignoreCase - Whether to ignore case in the search\n * @returns A condition with CONTAINS operator\n */\nexport function contains(\n field: string,\n value: any,\n ignoreCase?: boolean,\n): Condition {\n const options: Record<string, any> | undefined =\n ignoreCaseOptions(ignoreCase);\n return { field, operator: Operator.CONTAINS, value, options };\n}\n\n/**\n * Creates an IN condition with the specified field and values.\n *\n * @param field - The field name to compare\n * @param value - The values to compare against\n * @returns A condition with IN operator\n */\nexport function isIn(field: string, ...value: any[]): Condition {\n return { field, operator: Operator.IN, value };\n}\n\n/**\n * Creates a NOT_IN condition with the specified field and values.\n *\n * @param field - The field name to compare\n * @param value - The values to compare against\n * @returns A condition with NOT_IN operator\n */\nexport function notIn(field: string, ...value: any[]): Condition {\n return { field, operator: Operator.NOT_IN, value };\n}\n\n/**\n * Creates a BETWEEN condition with the specified field and range.\n *\n * @param field - The field name to compare\n * @param start - The start value of the range\n * @param end - The end value of the range\n * @returns A condition with BETWEEN operator\n */\nexport function between(field: string, start: any, end: any): Condition {\n return { field, operator: Operator.BETWEEN, value: [start, end] };\n}\n\n/**\n * Creates an ALL_IN condition with the specified field and values.\n *\n * @param field - The field name to compare\n * @param value - The values to compare against\n * @returns A condition with ALL_IN operator\n */\nexport function allIn(field: string, ...value: any[]): Condition {\n return { field, operator: Operator.ALL_IN, value };\n}\n\n/**\n * Creates a STARTS_WITH condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @param ignoreCase - Whether to ignore case in the comparison\n * @returns A condition with STARTS_WITH operator\n */\nexport function startsWith(\n field: string,\n value: any,\n ignoreCase?: boolean,\n): Condition {\n const options: Record<string, any> | undefined =\n ignoreCaseOptions(ignoreCase);\n return { field, operator: Operator.STARTS_WITH, value, options };\n}\n\n/**\n * Creates an ENDS_WITH condition with the specified field and value.\n *\n * @param field - The field name to compare\n * @param value - The value to compare against\n * @param ignoreCase - Whether to ignore case in the comparison\n * @returns A condition with ENDS_WITH operator\n */\nexport function endsWith(\n field: string,\n value: any,\n ignoreCase?: boolean,\n): Condition {\n const options: Record<string, any> | undefined =\n ignoreCaseOptions(ignoreCase);\n return { field, operator: Operator.ENDS_WITH, value, options };\n}\n\n/**\n * Creates an ELEM_MATCH condition with the specified field and child condition.\n *\n * @param field - The field name to match elements in\n * @param value - The condition to match elements against\n * @returns A condition with ELEM_MATCH operator\n */\nexport function elemMatch(field: string, value: Condition): Condition {\n return { field, operator: Operator.ELEM_MATCH, children: [value] };\n}\n\n/**\n * Creates a NULL condition with the specified field.\n *\n * @param field - The field name to check\n * @returns A condition with NULL operator\n */\nexport function isNull(field: string): Condition {\n return { field, operator: Operator.NULL };\n}\n\n/**\n * Creates a NOT_NULL condition with the specified field.\n *\n * @param field - The field name to check\n * @returns A condition with NOT_NULL operator\n */\nexport function notNull(field: string): Condition {\n return { field, operator: Operator.NOT_NULL };\n}\n\n/**\n * Creates a TRUE condition with the specified field.\n *\n * @param field - The field name to check\n * @returns A condition with TRUE operator\n */\nexport function isTrue(field: string): Condition {\n return { field, operator: Operator.TRUE };\n}\n\n/**\n * Creates a FALSE condition with the specified field.\n *\n * @param field - The field name to check\n * @returns A condition with FALSE operator\n */\nexport function isFalse(field: string): Condition {\n return { field, operator: Operator.FALSE };\n}\n\n/**\n * Creates an EXISTS condition with the specified field and existence flag.\n *\n * @param field - The field name to check\n * @param exists - Whether the field should exist (default: true)\n * @returns A condition with EXISTS operator\n */\nexport function exists(field: string, exists: boolean = true): Condition {\n return { field, operator: Operator.EXISTS, value: exists };\n}\n\n/**\n * Creates a TODAY condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with TODAY operator\n */\nexport function today(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.TODAY, options };\n}\n\n/**\n * Creates a BEFORE_TODAY condition with the specified field and time.\n *\n * @param field - The field name to check\n * @param time - The time to compare against\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with BEFORE_TODAY operator\n */\nexport function beforeToday(\n field: string,\n time: any,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.BEFORE_TODAY, value: time, options };\n}\n\n/**\n * Creates a TOMORROW condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with TOMORROW operator\n */\nexport function tomorrow(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.TOMORROW, options };\n}\n\n/**\n * Creates a THIS_WEEK condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with THIS_WEEK operator\n */\nexport function thisWeek(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.THIS_WEEK, options };\n}\n\n/**\n * Creates a NEXT_WEEK condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with NEXT_WEEK operator\n */\nexport function nextWeek(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.NEXT_WEEK, options };\n}\n\n/**\n * Creates a LAST_WEEK condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with LAST_WEEK operator\n */\nexport function lastWeek(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.LAST_WEEK, options };\n}\n\n/**\n * Creates a THIS_MONTH condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with THIS_MONTH operator\n */\nexport function thisMonth(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.THIS_MONTH, options };\n}\n\n/**\n * Creates a LAST_MONTH condition with the specified field.\n *\n * @param field - The field name to check\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with LAST_MONTH operator\n */\nexport function lastMonth(\n field: string,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.LAST_MONTH, options };\n}\n\n/**\n * Creates a RECENT_DAYS condition with the specified field and number of days.\n *\n * @param field - The field name to check\n * @param days - The number of recent days to include\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with RECENT_DAYS operator\n */\nexport function recentDays(\n field: string,\n days: number,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.RECENT_DAYS, value: days, options };\n}\n\n/**\n * Creates an EARLIER_DAYS condition with the specified field and number of days.\n *\n * @param field - The field name to check\n * @param days - The number of days to look back\n * @param datePattern - The date pattern to use\n * @param zoneId - The time zone ID to use\n * @returns A condition with EARLIER_DAYS operator\n */\nexport function earlierDays(\n field: string,\n days: number,\n datePattern?: string,\n zoneId?: string,\n): Condition {\n const options = dateOptions(datePattern, zoneId);\n return { field, operator: Operator.EARLIER_DAYS, value: days, options };\n}\n\n/**\n * Creates a RAW condition with the specified raw value.\n *\n * @param raw - The raw condition value\n * @returns A condition with RAW operator\n */\nexport function raw(raw: any): Condition {\n return { operator: Operator.RAW, value: raw };\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ConditionCapable } from './condition';\n\nexport enum SortDirection {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/**\n * Interface for sort criteria.\n */\nexport interface Sort {\n field: string;\n direction: SortDirection;\n}\n\n/**\n * Interface for objects that support sorting.\n */\nexport interface SortCapable {\n sort?: Sort[];\n}\n\n/**\n * Interface for pagination information.\n *\n * Page number, starting from 1\n * Page size\n */\nexport interface Pagination {\n index: number;\n size: number;\n}\n\nexport const DEFAULT_PAGINATION: Pagination = {\n index: 1,\n size: 10,\n};\n\n/**\n * Interface for field projection.\n */\nexport interface Projection {\n include?: string[];\n exclude?: string[];\n}\n\nexport const DEFAULT_PROJECTION: Projection = {};\n\n/**\n * Interface for objects that support field projection.\n */\nexport interface ProjectionCapable {\n projection?: Projection;\n}\n\n/**\n * Interface for queryable objects that support conditions, projection, and sorting.\n */\nexport interface Queryable\n extends ConditionCapable,\n ProjectionCapable,\n SortCapable {}\n\n/**\n * Interface for single query objects.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface SingleQuery extends Queryable {}\n\n/**\n * Interface for list query objects.\n *\n * Limit the number of results. Default: DEFAULT_PAGINATION.size\n */\nexport interface ListQuery extends Queryable {\n limit?: number;\n}\n\n/**\n * Interface for paged query objects.\n */\nexport interface PagedQuery extends Queryable {\n pagination?: Pagination;\n}\n\n/**\n * Interface for paged list results.\n */\nexport interface PagedList<T> {\n total: number;\n list: T[];\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Enumerates the types of recoverability for errors or operations, allowing for classification and handling based on whether an error is transient and can be resolved by retrying.\n *\n * The [RecoverableType] enum provides a way to categorize errors into three distinct categories: [RECOVERABLE], [UNRECOVERABLE], and [UNKNOWN].\n * This categorization is essential for implementing robust error handling and retry mechanisms in applications,\n * ensuring that temporary issues are retried while permanent or unknown issues are handled appropriately.\n *\n */\nexport enum RecoverableType {\n /**\n * Represents an error type that indicates the operation or error can be retried.\n *\n * This enum value is used to classify errors in a way that allows for the implementation of retry logic. When an error\n * is marked as [RECOVERABLE], it signifies that the error condition is temporary and might be resolved upon retrying the\n * operation. This is particularly useful in scenarios where network issues, transient server errors, or other temporary\n * conditions may cause an operation to fail, but with a high likelihood of success on subsequent attempts.\n */\n RECOVERABLE = 'RECOVERABLE',\n /**\n * Represents an error type that indicates the operation or error cannot be retried.\n *\n * This enum value is used to classify errors in a way that signifies the error condition is permanent and retrying the operation will not resolve the issue. It is particularly\n * useful for handling errors where the underlying problem is fundamental and cannot be resolved by simply retrying, such as invalid input, resource exhaustion, or other non-transient\n * issues.\n */\n UNKNOWN = 'UNKNOWN',\n\n /**\n * Represents an unknown type of recoverability for an error or operation.\n * This is used when the recoverability of an error cannot be determined or is not specified.\n */\n UNRECOVERABLE = 'UNRECOVERABLE',\n}\n\n/**\n * Represents an error that occurs during the binding process, typically when data is being mapped to or from an object.\n * This class extends the [Named] interface, inheriting the `name` property which can be used to identify the source or context of the error.\n *\n * @param name The name or identifier for the context in which the error occurred.\n * @param msg A message describing the error.\n */\nexport interface BindingError {\n name: string;\n msg: string;\n}\n\n/**\n * Represents the information about an error, including whether the operation succeeded, the error code, and any associated messages or binding errors.\n *\n * This interface is designed to provide a standardized way of handling and representing errors across different parts of an application. It includes methods to check if the operation was successful, retrieve the error code\n * , and access any additional error details such as messages or binding errors.\n */\nexport interface ErrorInfo {\n /**\n * Represents the error code associated with an error. This value is used to identify the type of error that has occurred,\n * which can be useful for debugging, logging, and handling errors in a standardized way.\n */\n errorCode: string;\n /**\n * Represents the message associated with an error. This message provides a human-readable description of the error, which can be used for logging, debugging, or displaying to the user\n * .\n */\n errorMsg: string;\n /**\n * Provides a list of [BindingError] instances that occurred during the binding process.\n * Each [BindingError] contains information about the error, including its name and a message describing the issue.\n * This property returns an empty list if no binding errors are present.\n */\n bindingErrors?: BindingError[];\n}\n\nexport class ErrorCodes {\n /**\n * A constant representing a successful operation or status.\n * This value is typically used in the context of error handling and response descriptions to indicate that an operation has been completed successfully.\n */\n static readonly SUCCEEDED = 'Ok';\n static readonly SUCCEEDED_MESSAGE = '';\n\n /**\n * Error code for when a requested resource is not found.\n */\n static readonly NOT_FOUND = 'NotFound';\n\n /**\n * Default message for NOT_FOUND error code.\n */\n static readonly NOT_FOUND_MESSAGE = 'Not found resource!';\n\n /**\n * Error code for bad request errors.\n */\n static readonly BAD_REQUEST = 'BadRequest';\n\n /**\n * Error code for illegal argument errors.\n */\n static readonly ILLEGAL_ARGUMENT = 'IllegalArgument';\n\n /**\n * Error code for illegal state errors.\n */\n static readonly ILLEGAL_STATE = 'IllegalState';\n\n /**\n * Error code for request timeout errors.\n */\n static readonly REQUEST_TIMEOUT = 'RequestTimeout';\n\n /**\n * Error code for too many requests errors (rate limiting).\n */\n static readonly TOO_MANY_REQUESTS = 'TooManyRequests';\n\n /**\n * Error code for duplicate request ID errors.\n */\n static readonly DUPLICATE_REQUEST_ID = 'DuplicateRequestId';\n\n /**\n * Error code for command validation errors.\n */\n static readonly COMMAND_VALIDATION = 'CommandValidation';\n\n /**\n * Error code for when no command is found to rewrite.\n */\n static readonly REWRITE_NO_COMMAND = 'RewriteNoCommand';\n\n /**\n * Error code for event version conflicts.\n */\n static readonly EVENT_VERSION_CONFLICT = 'EventVersionConflict';\n\n /**\n * Error code for duplicate aggregate ID errors.\n */\n static readonly DUPLICATE_AGGREGATE_ID = 'DuplicateAggregateId';\n\n /**\n * Error code for command expected version conflicts.\n */\n static readonly COMMAND_EXPECT_VERSION_CONFLICT =\n 'CommandExpectVersionConflict';\n\n /**\n * Error code for sourcing version conflicts.\n */\n static readonly SOURCING_VERSION_CONFLICT = 'SourcingVersionConflict';\n\n /**\n * Error code for illegal access to deleted aggregate errors.\n */\n static readonly ILLEGAL_ACCESS_DELETED_AGGREGATE =\n 'IllegalAccessDeletedAggregate';\n\n /**\n * Error code for illegal access to owner aggregate errors.\n */\n static readonly ILLEGAL_ACCESS_OWNER_AGGREGATE =\n 'IllegalAccessOwnerAggregate';\n\n /**\n * Error code for internal server errors.\n */\n static readonly INTERNAL_SERVER_ERROR = 'InternalServerError';\n\n /**\n * Checks if the provided error code represents a successful operation.\n *\n * @param errorCode The error code to check\n * @returns true if the error code is 'Ok', false otherwise\n */\n static isSucceeded(errorCode: string): boolean {\n return errorCode === ErrorCodes.SUCCEEDED;\n }\n\n /**\n * Checks if the provided error code represents an error condition.\n *\n * @param errorCode The error code to check\n * @returns true if the error code is not 'Ok', false otherwise\n */\n static isError(errorCode: string): boolean {\n return !ErrorCodes.isSucceeded(errorCode);\n }\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Function kind enum\n *\n * Represents the different types of functions in the system.\n */\nexport enum FunctionKind {\n /**\n * Command function kind\n */\n COMMAND = 'COMMAND',\n\n /**\n * Error function kind\n */\n ERROR = 'ERROR',\n\n /**\n * Event function kind\n */\n EVENT = 'EVENT',\n\n /**\n * Sourcing function kind\n */\n SOURCING = 'SOURCING',\n\n /**\n * State event function kind\n */\n STATE_EVENT = 'STATE_EVENT',\n}\n\n/**\n * Interface for function information.\n */\nexport interface FunctionInfo {\n functionKind: FunctionKind;\n contextName: string;\n processorName: string;\n name: string;\n}\n\n/**\n * Interface for objects that have function information.\n */\nexport interface FunctionInfoCapable {\n function: FunctionInfo;\n}\n","/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { NamedBoundedContext } from './naming.ts';\n\n/**\n * Interface for classes that have a creation time.\n */\nexport interface CreateTimeCapable {\n /**\n * Gets the creation time in milliseconds since the Unix epoch.\n */\n createTime: number;\n}\n\n/**\n * Interface for objects that track deletion status.\n */\nexport interface DeletedCapable {\n /**\n * Whether the aggregate is deleted.\n */\n deleted: boolean;\n}\n\n/**\n * Interface for objects that track event IDs.\n */\nexport interface EventIdCapable {\n /**\n * The event id of the aggregate.\n */\n eventId: string;\n}\n\n/**\n * Interface for objects that track event times.\n */\nexport interface EventTimeCapable {\n /**\n * The last event time of the aggregate, represented as a Unix timestamp in milliseconds.\n */\n eventTime: number;\n}\n\n/**\n * Interface for objects that track the first event time.\n */\nexport interface FirstEventTimeCapable {\n /**\n * The first event time of the aggregate, represented as a Unix timestamp in milliseconds.\n */\n firstEventTime: number;\n}\n\n/**\n * Interface for objects that track the first operator.\n */\nexport interface FirstOperatorCapable {\n /**\n * The first operator of the aggregate.\n */\n firstOperator: string;\n}\n\n/**\n * Interface for objects that have an aggregate name.\n */\nexport interface AggregateNameCapable {\n /**\n * The name of the aggregate.\n */\n aggregateName: string;\n}\n\n/**\n * Interface for named aggregates that belong to a bounded context.\n */\nexport interface NamedAggregate\n extends NamedBoundedContext,\n AggregateNameCapable {}\n\n/**\n * Interface for aggregate IDs that combine tenant and named aggregate information.\n */\nexport interface AggregateId extends TenantId, NamedAggregate {\n aggregateId: string;\n}\n\n/**\n * Interface for objects that track the last operator.\n */\nexport interface OperatorCapable {\n /**\n * The last operator of the aggregate.\n */\n operator: string;\n}\n\nexport const DEFAULT_OWNER_ID = '';\n\n/**\n * Interface for identifying resource owners.\n */\nexport interface OwnerId {\n /**\n * Unique identifier of the resource owner.\n */\n ownerId: string;\n}\n\n/**\n * Interface for objects that track snapshot times.\n */\nexport interface SnapshotTimeCapable {\n /**\n * The snapshot time of the aggregate, represented as a Unix timestamp in milliseconds.\n */\n snapshotTime: number;\n}\n\nexport const DEFAULT_TENANT_ID = '(0)';\n\n/**\n * Interface for objects that have a tenant ID.\n */\nexport interface TenantId {\n tenantId: string;\n}\n\n/**\n * Interface for objects that hold state.\n */\nexport interface StateCapable<S> {\n state: S;\n}\n"],"names":["_CommandHeaders","CommandHeaders","CommandStage","Operator","ConditionOptionKey","ignoreCaseOptions","ignoreCase","dateOptions","datePattern","zoneId","options","DeletionState","and","conditions","or","nor","id","value","ids","aggregateId","aggregateIds","tenantId","ownerId","deleted","active","all","eq","field","ne","gt","lt","gte","lte","contains","isIn","notIn","between","start","end","allIn","startsWith","endsWith","elemMatch","isNull","notNull","isTrue","isFalse","exists","today","beforeToday","time","tomorrow","thisWeek","nextWeek","lastWeek","thisMonth","lastMonth","recentDays","days","earlierDays","raw","SortDirection","DEFAULT_PAGINATION","DEFAULT_PROJECTION","RecoverableType","_ErrorCodes","errorCode","ErrorCodes","FunctionKind","DEFAULT_OWNER_ID","DEFAULT_TENANT_ID"],"mappings":"mOAiCO,MAAMA,EAAN,MAAMA,CAAe,CAqI5B,EAjIEA,EAAgB,uBAAyB,WAMzCA,EAAgB,UAAY,GAAGA,EAAe,sBAAsB,YAMpEA,EAAgB,SAAW,GAAGA,EAAe,sBAAsB,WAMnEA,EAAgB,aAAe,GAAGA,EAAe,sBAAsB,eAMvEA,EAAgB,kBAAoB,GAAGA,EAAe,sBAAsB,oBAK5EA,EAAgB,YAAc,GAAGA,EAAe,sBAAsB,QAMtEA,EAAgB,cAAgB,GAAGA,EAAe,WAAW,UAO7DA,EAAgB,WAAa,GAAGA,EAAe,WAAW,QAM1DA,EAAgB,aAAe,GAAGA,EAAe,WAAW,UAM5DA,EAAgB,eAAiB,GAAGA,EAAe,WAAW,YAM9DA,EAAgB,cAAgB,GAAGA,EAAe,WAAW,WAO7DA,EAAgB,iBAAmB,GAAGA,EAAe,WAAW,QAMhEA,EAAgB,gBAAkB,GAAGA,EAAe,gBAAgB,QAMpEA,EAAgB,kBAAoB,GAAGA,EAAe,gBAAgB,UAMtEA,EAAgB,oBAAsB,GAAGA,EAAe,gBAAgB,YAMxEA,EAAgB,mBAAqB,GAAGA,EAAe,gBAAgB,WAOvEA,EAAgB,WAAa,GAAGA,EAAe,sBAAsB,aAMrEA,EAAgB,YAAc,GAAGA,EAAe,sBAAsB,cAMtEA,EAAgB,0BAA4B,GAAGA,EAAe,sBAAsB,oBAMpFA,EAAgB,uBAAyB,GAAGA,EAAe,sBAAsB,iBAMjFA,EAAgB,aAAe,GAAGA,EAAe,sBAAsB,OAMvEA,EAAgB,wBAA0B,GAAGA,EAAe,sBAAsB,UApI7E,IAAMC,EAAND,ECYA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A,EC2FL,MAAMC,GAAmB,GAsBnBC,GAAoB"}
@@ -1,13 +1,45 @@
1
1
  import { Operator } from './operator';
2
+ /**
3
+ * Condition option keys enumeration
4
+ *
5
+ * Defines standard option keys used in query conditions for special handling.
6
+ */
2
7
  export declare enum ConditionOptionKey {
8
+ /**
9
+ * Ignore case option key for string comparisons
10
+ */
3
11
  IGNORE_CASE_OPTION_KEY = "ignoreCase",
12
+ /**
13
+ * Time zone ID option key for date operations
14
+ */
4
15
  ZONE_ID_OPTION_KEY = "zoneId",
16
+ /**
17
+ * Date pattern option key for date formatting
18
+ */
5
19
  DATE_PATTERN_OPTION_KEY = "datePattern"
6
20
  }
21
+ /**
22
+ * Condition options interface
23
+ *
24
+ * Represents additional options that can be applied to query conditions,
25
+ * such as case sensitivity, date patterns, and time zones.
26
+ */
7
27
  export interface ConditionOptions {
28
+ /**
29
+ * Whether to ignore case in string comparisons
30
+ */
8
31
  ignoreCase?: boolean;
32
+ /**
33
+ * Date pattern for date formatting
34
+ */
9
35
  datePattern?: string;
36
+ /**
37
+ * Time zone ID for date operations
38
+ */
10
39
  zoneId?: string;
40
+ /**
41
+ * Additional custom options
42
+ */
11
43
  [key: string]: any;
12
44
  }
13
45
  /**
@@ -31,10 +63,25 @@ export declare function dateOptions(datePattern?: string, zoneId?: string): Cond
31
63
  * When `operator` is `AND` or `OR` or `NOR`, `children` cannot be empty.
32
64
  */
33
65
  export interface Condition {
66
+ /**
67
+ * Field name for the condition
68
+ */
34
69
  field?: string;
70
+ /**
71
+ * Operator for the condition
72
+ */
35
73
  operator?: Operator;
74
+ /**
75
+ * Value for the condition
76
+ */
36
77
  value?: any;
78
+ /**
79
+ * Child conditions for logical operators (AND, OR, NOR)
80
+ */
37
81
  children?: Condition[];
82
+ /**
83
+ * Additional options for the condition
84
+ */
38
85
  options?: ConditionOptions;
39
86
  }
40
87
  /**
@@ -43,9 +90,23 @@ export interface Condition {
43
90
  export interface ConditionCapable {
44
91
  condition: Condition;
45
92
  }
93
+ /**
94
+ * Deletion state enumeration
95
+ *
96
+ * Represents the different states of deletion for entities.
97
+ */
46
98
  export declare enum DeletionState {
99
+ /**
100
+ * Active state - entity is not deleted
101
+ */
47
102
  ACTIVE = "ACTIVE",
103
+ /**
104
+ * Deleted state - entity is deleted
105
+ */
48
106
  DELETED = "DELETED",
107
+ /**
108
+ * All state - includes both active and deleted entities
109
+ */
49
110
  ALL = "ALL"
50
111
  }
51
112
  /**
@@ -69,43 +130,317 @@ export declare function or(...conditions: Condition[]): Condition;
69
130
  * @returns A condition with NOR operator
70
131
  */
71
132
  export declare function nor(...conditions: Condition[]): Condition;
133
+ /**
134
+ * Creates an ID condition with the specified value.
135
+ *
136
+ * @param value - The ID value to match
137
+ * @returns A condition with ID operator
138
+ */
72
139
  export declare function id(value: string): Condition;
140
+ /**
141
+ * Creates an IDS condition with the specified values.
142
+ *
143
+ * @param value - The ID values to match
144
+ * @returns A condition with IDS operator
145
+ */
73
146
  export declare function ids(value: string[]): Condition;
147
+ /**
148
+ * Creates an AGGREGATE_ID condition with the specified value.
149
+ *
150
+ * @param value - The aggregate ID value to match
151
+ * @returns A condition with AGGREGATE_ID operator
152
+ */
74
153
  export declare function aggregateId(value: string): Condition;
154
+ /**
155
+ * Creates an AGGREGATE_IDS condition with the specified values.
156
+ *
157
+ * @param value - The aggregate ID values to match
158
+ * @returns A condition with AGGREGATE_IDS operator
159
+ */
75
160
  export declare function aggregateIds(...value: string[]): Condition;
161
+ /**
162
+ * Creates a TENANT_ID condition with the specified value.
163
+ *
164
+ * @param value - The tenant ID value to match
165
+ * @returns A condition with TENANT_ID operator
166
+ */
76
167
  export declare function tenantId(value: string): Condition;
168
+ /**
169
+ * Creates an OWNER_ID condition with the specified value.
170
+ *
171
+ * @param value - The owner ID value to match
172
+ * @returns A condition with OWNER_ID operator
173
+ */
77
174
  export declare function ownerId(value: string): Condition;
175
+ /**
176
+ * Creates a DELETED condition with the specified value.
177
+ *
178
+ * @param value - The deletion state value to match
179
+ * @returns A condition with DELETED operator
180
+ */
78
181
  export declare function deleted(value: DeletionState): Condition;
182
+ /**
183
+ * Creates an ACTIVE deletion state condition.
184
+ *
185
+ * @returns A condition with DELETED operator set to ACTIVE
186
+ */
79
187
  export declare function active(): Condition;
188
+ /**
189
+ * Creates an ALL condition.
190
+ *
191
+ * @returns A condition with ALL operator
192
+ */
80
193
  export declare function all(): Condition;
194
+ /**
195
+ * Creates an EQ (equals) condition with the specified field and value.
196
+ *
197
+ * @param field - The field name to compare
198
+ * @param value - The value to compare against
199
+ * @returns A condition with EQ operator
200
+ */
81
201
  export declare function eq(field: string, value: any): Condition;
202
+ /**
203
+ * Creates a NE (not equals) condition with the specified field and value.
204
+ *
205
+ * @param field - The field name to compare
206
+ * @param value - The value to compare against
207
+ * @returns A condition with NE operator
208
+ */
82
209
  export declare function ne(field: string, value: any): Condition;
210
+ /**
211
+ * Creates a GT (greater than) condition with the specified field and value.
212
+ *
213
+ * @param field - The field name to compare
214
+ * @param value - The value to compare against
215
+ * @returns A condition with GT operator
216
+ */
83
217
  export declare function gt(field: string, value: any): Condition;
218
+ /**
219
+ * Creates a LT (less than) condition with the specified field and value.
220
+ *
221
+ * @param field - The field name to compare
222
+ * @param value - The value to compare against
223
+ * @returns A condition with LT operator
224
+ */
84
225
  export declare function lt(field: string, value: any): Condition;
226
+ /**
227
+ * Creates a GTE (greater than or equal) condition with the specified field and value.
228
+ *
229
+ * @param field - The field name to compare
230
+ * @param value - The value to compare against
231
+ * @returns A condition with GTE operator
232
+ */
85
233
  export declare function gte(field: string, value: any): Condition;
234
+ /**
235
+ * Creates a LTE (less than or equal) condition with the specified field and value.
236
+ *
237
+ * @param field - The field name to compare
238
+ * @param value - The value to compare against
239
+ * @returns A condition with LTE operator
240
+ */
86
241
  export declare function lte(field: string, value: any): Condition;
242
+ /**
243
+ * Creates a CONTAINS condition with the specified field and value.
244
+ *
245
+ * @param field - The field name to search in
246
+ * @param value - The value to search for
247
+ * @param ignoreCase - Whether to ignore case in the search
248
+ * @returns A condition with CONTAINS operator
249
+ */
87
250
  export declare function contains(field: string, value: any, ignoreCase?: boolean): Condition;
251
+ /**
252
+ * Creates an IN condition with the specified field and values.
253
+ *
254
+ * @param field - The field name to compare
255
+ * @param value - The values to compare against
256
+ * @returns A condition with IN operator
257
+ */
88
258
  export declare function isIn(field: string, ...value: any[]): Condition;
259
+ /**
260
+ * Creates a NOT_IN condition with the specified field and values.
261
+ *
262
+ * @param field - The field name to compare
263
+ * @param value - The values to compare against
264
+ * @returns A condition with NOT_IN operator
265
+ */
89
266
  export declare function notIn(field: string, ...value: any[]): Condition;
267
+ /**
268
+ * Creates a BETWEEN condition with the specified field and range.
269
+ *
270
+ * @param field - The field name to compare
271
+ * @param start - The start value of the range
272
+ * @param end - The end value of the range
273
+ * @returns A condition with BETWEEN operator
274
+ */
90
275
  export declare function between(field: string, start: any, end: any): Condition;
276
+ /**
277
+ * Creates an ALL_IN condition with the specified field and values.
278
+ *
279
+ * @param field - The field name to compare
280
+ * @param value - The values to compare against
281
+ * @returns A condition with ALL_IN operator
282
+ */
91
283
  export declare function allIn(field: string, ...value: any[]): Condition;
284
+ /**
285
+ * Creates a STARTS_WITH condition with the specified field and value.
286
+ *
287
+ * @param field - The field name to compare
288
+ * @param value - The value to compare against
289
+ * @param ignoreCase - Whether to ignore case in the comparison
290
+ * @returns A condition with STARTS_WITH operator
291
+ */
92
292
  export declare function startsWith(field: string, value: any, ignoreCase?: boolean): Condition;
293
+ /**
294
+ * Creates an ENDS_WITH condition with the specified field and value.
295
+ *
296
+ * @param field - The field name to compare
297
+ * @param value - The value to compare against
298
+ * @param ignoreCase - Whether to ignore case in the comparison
299
+ * @returns A condition with ENDS_WITH operator
300
+ */
93
301
  export declare function endsWith(field: string, value: any, ignoreCase?: boolean): Condition;
302
+ /**
303
+ * Creates an ELEM_MATCH condition with the specified field and child condition.
304
+ *
305
+ * @param field - The field name to match elements in
306
+ * @param value - The condition to match elements against
307
+ * @returns A condition with ELEM_MATCH operator
308
+ */
94
309
  export declare function elemMatch(field: string, value: Condition): Condition;
310
+ /**
311
+ * Creates a NULL condition with the specified field.
312
+ *
313
+ * @param field - The field name to check
314
+ * @returns A condition with NULL operator
315
+ */
95
316
  export declare function isNull(field: string): Condition;
317
+ /**
318
+ * Creates a NOT_NULL condition with the specified field.
319
+ *
320
+ * @param field - The field name to check
321
+ * @returns A condition with NOT_NULL operator
322
+ */
96
323
  export declare function notNull(field: string): Condition;
324
+ /**
325
+ * Creates a TRUE condition with the specified field.
326
+ *
327
+ * @param field - The field name to check
328
+ * @returns A condition with TRUE operator
329
+ */
97
330
  export declare function isTrue(field: string): Condition;
331
+ /**
332
+ * Creates a FALSE condition with the specified field.
333
+ *
334
+ * @param field - The field name to check
335
+ * @returns A condition with FALSE operator
336
+ */
98
337
  export declare function isFalse(field: string): Condition;
338
+ /**
339
+ * Creates an EXISTS condition with the specified field and existence flag.
340
+ *
341
+ * @param field - The field name to check
342
+ * @param exists - Whether the field should exist (default: true)
343
+ * @returns A condition with EXISTS operator
344
+ */
99
345
  export declare function exists(field: string, exists?: boolean): Condition;
346
+ /**
347
+ * Creates a TODAY condition with the specified field.
348
+ *
349
+ * @param field - The field name to check
350
+ * @param datePattern - The date pattern to use
351
+ * @param zoneId - The time zone ID to use
352
+ * @returns A condition with TODAY operator
353
+ */
100
354
  export declare function today(field: string, datePattern?: string, zoneId?: string): Condition;
355
+ /**
356
+ * Creates a BEFORE_TODAY condition with the specified field and time.
357
+ *
358
+ * @param field - The field name to check
359
+ * @param time - The time to compare against
360
+ * @param datePattern - The date pattern to use
361
+ * @param zoneId - The time zone ID to use
362
+ * @returns A condition with BEFORE_TODAY operator
363
+ */
101
364
  export declare function beforeToday(field: string, time: any, datePattern?: string, zoneId?: string): Condition;
365
+ /**
366
+ * Creates a TOMORROW condition with the specified field.
367
+ *
368
+ * @param field - The field name to check
369
+ * @param datePattern - The date pattern to use
370
+ * @param zoneId - The time zone ID to use
371
+ * @returns A condition with TOMORROW operator
372
+ */
102
373
  export declare function tomorrow(field: string, datePattern?: string, zoneId?: string): Condition;
374
+ /**
375
+ * Creates a THIS_WEEK condition with the specified field.
376
+ *
377
+ * @param field - The field name to check
378
+ * @param datePattern - The date pattern to use
379
+ * @param zoneId - The time zone ID to use
380
+ * @returns A condition with THIS_WEEK operator
381
+ */
103
382
  export declare function thisWeek(field: string, datePattern?: string, zoneId?: string): Condition;
383
+ /**
384
+ * Creates a NEXT_WEEK condition with the specified field.
385
+ *
386
+ * @param field - The field name to check
387
+ * @param datePattern - The date pattern to use
388
+ * @param zoneId - The time zone ID to use
389
+ * @returns A condition with NEXT_WEEK operator
390
+ */
104
391
  export declare function nextWeek(field: string, datePattern?: string, zoneId?: string): Condition;
392
+ /**
393
+ * Creates a LAST_WEEK condition with the specified field.
394
+ *
395
+ * @param field - The field name to check
396
+ * @param datePattern - The date pattern to use
397
+ * @param zoneId - The time zone ID to use
398
+ * @returns A condition with LAST_WEEK operator
399
+ */
105
400
  export declare function lastWeek(field: string, datePattern?: string, zoneId?: string): Condition;
401
+ /**
402
+ * Creates a THIS_MONTH condition with the specified field.
403
+ *
404
+ * @param field - The field name to check
405
+ * @param datePattern - The date pattern to use
406
+ * @param zoneId - The time zone ID to use
407
+ * @returns A condition with THIS_MONTH operator
408
+ */
106
409
  export declare function thisMonth(field: string, datePattern?: string, zoneId?: string): Condition;
410
+ /**
411
+ * Creates a LAST_MONTH condition with the specified field.
412
+ *
413
+ * @param field - The field name to check
414
+ * @param datePattern - The date pattern to use
415
+ * @param zoneId - The time zone ID to use
416
+ * @returns A condition with LAST_MONTH operator
417
+ */
107
418
  export declare function lastMonth(field: string, datePattern?: string, zoneId?: string): Condition;
419
+ /**
420
+ * Creates a RECENT_DAYS condition with the specified field and number of days.
421
+ *
422
+ * @param field - The field name to check
423
+ * @param days - The number of recent days to include
424
+ * @param datePattern - The date pattern to use
425
+ * @param zoneId - The time zone ID to use
426
+ * @returns A condition with RECENT_DAYS operator
427
+ */
108
428
  export declare function recentDays(field: string, days: number, datePattern?: string, zoneId?: string): Condition;
429
+ /**
430
+ * Creates an EARLIER_DAYS condition with the specified field and number of days.
431
+ *
432
+ * @param field - The field name to check
433
+ * @param days - The number of days to look back
434
+ * @param datePattern - The date pattern to use
435
+ * @param zoneId - The time zone ID to use
436
+ * @returns A condition with EARLIER_DAYS operator
437
+ */
109
438
  export declare function earlierDays(field: string, days: number, datePattern?: string, zoneId?: string): Condition;
439
+ /**
440
+ * Creates a RAW condition with the specified raw value.
441
+ *
442
+ * @param raw - The raw condition value
443
+ * @returns A condition with RAW operator
444
+ */
110
445
  export declare function raw(raw: any): Condition;
111
446
  //# sourceMappingURL=condition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../src/query/condition.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,oBAAY,kBAAkB;IAC5B,sBAAsB,eAAe;IACrC,kBAAkB,WAAW;IAC7B,uBAAuB,gBAAgB;CACxC;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,CAAC,EAAE,OAAO,GACnB,gBAAgB,GAAG,SAAS,CAK9B;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,WAAW,CAAC,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,gBAAgB,GAAG,SAAS,CAY9B;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ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types of functions in the system.
5
+ */
1
6
  export declare enum FunctionKind {
7
+ /**
8
+ * Command function kind
9
+ */
2
10
  COMMAND = "COMMAND",
11
+ /**
12
+ * Error function kind
13
+ */
3
14
  ERROR = "ERROR",
15
+ /**
16
+ * Event function kind
17
+ */
4
18
  EVENT = "EVENT",
19
+ /**
20
+ * Sourcing function kind
21
+ */
5
22
  SOURCING = "SOURCING",
23
+ /**
24
+ * State event function kind
25
+ */
6
26
  STATE_EVENT = "STATE_EVENT"
7
27
  }
8
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../src/types/function.ts"],"names":[],"mappings":"AAaA,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,WAAW,gBAAgB;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,YAAY,CAAC;CACxB"}
1
+ {"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../src/types/function.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,oBAAY,YAAY;IACtB;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,KAAK,UAAU;IAEf;;OAEG;IACH,KAAK,UAAU;IAEf;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,WAAW,gBAAgB;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,YAAY,CAAC;CACxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahoo-wang/fetcher-wow",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "description": "Support for Wow(https://github.com/Ahoo-Wang/Wow) in Fetcher",
5
5
  "keywords": [
6
6
  "fetch",
@@ -38,8 +38,8 @@
38
38
  "dist"
39
39
  ],
40
40
  "dependencies": {
41
- "@ahoo-wang/fetcher": "0.11.0",
42
- "@ahoo-wang/fetcher-eventstream": "0.11.0"
41
+ "@ahoo-wang/fetcher": "0.11.2",
42
+ "@ahoo-wang/fetcher-eventstream": "0.11.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@vitest/coverage-v8": "^3.2.4",