@ahoo-wang/fetcher-wow 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,3 @@
1
+ export declare class CommandGateway {
2
+ }
3
+ //# sourceMappingURL=commandGateway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandGateway.d.ts","sourceRoot":"","sources":["../../src/command/commandGateway.ts"],"names":[],"mappings":"AAaA,qBAAa,cAAc;CAG1B"}
@@ -0,0 +1,3 @@
1
+ export * from './commandGateway';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAaA,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { AggregateId, AggregateNameCapable, ErrorInfo, FunctionInfoCapable, Identifier, NamedBoundedContext } from '../types';
2
+ export interface CommandId {
3
+ commandId: string;
4
+ }
5
+ export interface WaitCommandIdCapable {
6
+ waitCommandId: string;
7
+ }
8
+ export interface RequestId {
9
+ requestId: string;
10
+ }
11
+ export declare enum CommandStage {
12
+ /**
13
+ * 当命令发布到命令总线/队列后,生成完成信号.
14
+ */
15
+ SENT = "SENT",
16
+ /**
17
+ * 当命令被聚合根处理完成后,生成完成信号.
18
+ */
19
+ PROCESSED = "PROCESSED",
20
+ /**
21
+ * 当快照被生成后,生成完成信号.
22
+ */
23
+ SNAPSHOT = "SNAPSHOT",
24
+ /**
25
+ * 当命令产生的事件*投影*完成后,生成完成信号.
26
+ */
27
+ PROJECTED = "PROJECTED",
28
+ /**
29
+ * 当命令产生的事件被*事件处理器*处理完成后,生成完成信号.
30
+ */
31
+ EVENT_HANDLED = "EVENT_HANDLED",
32
+ /**
33
+ * 当命令产生的事件被*Saga*处理完成后,生成完成信号.
34
+ */
35
+ SAGA_HANDLED = "SAGA_HANDLED"
36
+ }
37
+ export interface CommandStageCapable {
38
+ stage: CommandStage;
39
+ }
40
+ export interface CommandResultCapable {
41
+ result: Record<string, any>;
42
+ }
43
+ export interface SignalTimeCapable {
44
+ signalTime: number;
45
+ }
46
+ export interface CommandResult extends Identifier, WaitCommandIdCapable, CommandStageCapable, NamedBoundedContext, AggregateNameCapable, AggregateId, ErrorInfo, CommandId, RequestId, ErrorInfo, FunctionInfoCapable, CommandResultCapable, SignalTimeCapable {
47
+ aggregateVersion?: number;
48
+ }
49
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/command/types.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB,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,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;IACpF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAE3B"}
@@ -0,0 +1,4 @@
1
+ export * from './command';
2
+ export * from './query';
3
+ export * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,186 @@
1
+ class D {
2
+ }
3
+ var o = /* @__PURE__ */ ((E) => (E.SENT = "SENT", E.PROCESSED = "PROCESSED", E.SNAPSHOT = "SNAPSHOT", E.PROJECTED = "PROJECTED", E.EVENT_HANDLED = "EVENT_HANDLED", E.SAGA_HANDLED = "SAGA_HANDLED", E))(o || {}), s = /* @__PURE__ */ ((E) => (E.AND = "AND", E.OR = "OR", E.NOR = "NOR", E.ID = "ID", E.IDS = "IDS", E.AGGREGATE_ID = "AGGREGATE_ID", E.AGGREGATE_IDS = "AGGREGATE_IDS", E.TENANT_ID = "TENANT_ID", E.OWNER_ID = "OWNER_ID", E.DELETED = "DELETED", E.ALL = "ALL", E.EQ = "EQ", E.NE = "NE", E.GT = "GT", E.LT = "LT", E.GTE = "GTE", E.LTE = "LTE", E.CONTAINS = "CONTAINS", E.IN = "IN", E.NOT_IN = "NOT_IN", E.BETWEEN = "BETWEEN", E.ALL_IN = "ALL_IN", E.STARTS_WITH = "STARTS_WITH", E.ENDS_WITH = "ENDS_WITH", E.ELEM_MATCH = "ELEM_MATCH", E.NULL = "NULL", E.NOT_NULL = "NOT_NULL", E.TRUE = "TRUE", E.FALSE = "FALSE", E.EXISTS = "EXISTS", E.TODAY = "TODAY", E.BEFORE_TODAY = "BEFORE_TODAY", E.TOMORROW = "TOMORROW", E.THIS_WEEK = "THIS_WEEK", E.NEXT_WEEK = "NEXT_WEEK", E.LAST_WEEK = "LAST_WEEK", E.THIS_MONTH = "THIS_MONTH", E.LAST_MONTH = "LAST_MONTH", E.RECENT_DAYS = "RECENT_DAYS", E.EARLIER_DAYS = "EARLIER_DAYS", E.RAW = "RAW", E))(s || {}), i = /* @__PURE__ */ ((E) => (E.ACTIVE = "ACTIVE", E.DELETED = "DELETED", E.ALL = "ALL", E))(i || {}), N = /* @__PURE__ */ ((E) => (E.IGNORE_CASE_OPTION_KEY = "ignoreCase", E.ZONE_ID_OPTION_KEY = "zoneId", E.DATE_PATTERN_OPTION_KEY = "datePattern", E))(N || {});
4
+ class I {
5
+ static ignoreCaseOptions(t) {
6
+ if (!(typeof t > "u"))
7
+ return { ignoreCase: t };
8
+ }
9
+ static dateOptions(t, r) {
10
+ if (typeof t > "u" && typeof r > "u")
11
+ return;
12
+ const T = {};
13
+ return typeof t < "u" && (T.datePattern = t), typeof r < "u" && (T.zoneId = r), T;
14
+ }
15
+ static and(...t) {
16
+ return { operator: s.AND, children: t };
17
+ }
18
+ static or(...t) {
19
+ return { operator: s.OR, children: t };
20
+ }
21
+ static nor(...t) {
22
+ return { operator: s.NOR, children: t };
23
+ }
24
+ static id(t) {
25
+ return { operator: s.ID, value: t };
26
+ }
27
+ static ids(t) {
28
+ return { operator: s.IDS, value: t };
29
+ }
30
+ static aggregateId(t) {
31
+ return { operator: s.AGGREGATE_ID, value: t };
32
+ }
33
+ static aggregateIds(...t) {
34
+ return { operator: s.AGGREGATE_IDS, value: t };
35
+ }
36
+ static tenantId(t) {
37
+ return { operator: s.TENANT_ID, value: t };
38
+ }
39
+ static ownerId(t) {
40
+ return { operator: s.OWNER_ID, value: t };
41
+ }
42
+ static deleted(t) {
43
+ return { operator: s.DELETED, value: t };
44
+ }
45
+ static active() {
46
+ return this.deleted(
47
+ "ACTIVE"
48
+ /* ACTIVE */
49
+ );
50
+ }
51
+ static all() {
52
+ return {
53
+ operator: s.ALL
54
+ };
55
+ }
56
+ static eq(t, r) {
57
+ return { field: t, operator: s.EQ, value: r };
58
+ }
59
+ static ne(t, r) {
60
+ return { field: t, operator: s.NE, value: r };
61
+ }
62
+ static gt(t, r) {
63
+ return { field: t, operator: s.GT, value: r };
64
+ }
65
+ static lt(t, r) {
66
+ return { field: t, operator: s.LT, value: r };
67
+ }
68
+ static gte(t, r) {
69
+ return { field: t, operator: s.GTE, value: r };
70
+ }
71
+ static lte(t, r) {
72
+ return { field: t, operator: s.LTE, value: r };
73
+ }
74
+ static contains(t, r, T) {
75
+ const e = this.ignoreCaseOptions(T);
76
+ return { field: t, operator: s.CONTAINS, value: r, options: e };
77
+ }
78
+ static isIn(t, ...r) {
79
+ return { field: t, operator: s.IN, value: r };
80
+ }
81
+ static notIn(t, ...r) {
82
+ return { field: t, operator: s.NOT_IN, value: r };
83
+ }
84
+ static between(t, r, T) {
85
+ return { field: t, operator: s.BETWEEN, value: [r, T] };
86
+ }
87
+ static allIn(t, ...r) {
88
+ return { field: t, operator: s.ALL_IN, value: r };
89
+ }
90
+ static startsWith(t, r, T) {
91
+ const e = this.ignoreCaseOptions(T);
92
+ return { field: t, operator: s.STARTS_WITH, value: r, options: e };
93
+ }
94
+ static endsWith(t, r, T) {
95
+ const e = this.ignoreCaseOptions(T);
96
+ return { field: t, operator: s.ENDS_WITH, value: r, options: e };
97
+ }
98
+ static elemMatch(t, r) {
99
+ return { field: t, operator: s.ELEM_MATCH, children: [r] };
100
+ }
101
+ static isNull(t) {
102
+ return { field: t, operator: s.NULL };
103
+ }
104
+ static notNull(t) {
105
+ return { field: t, operator: s.NOT_NULL };
106
+ }
107
+ static isTrue(t) {
108
+ return { field: t, operator: s.TRUE };
109
+ }
110
+ static isFalse(t) {
111
+ return { field: t, operator: s.FALSE };
112
+ }
113
+ static exists(t, r = !0) {
114
+ return { field: t, operator: s.EXISTS, value: r };
115
+ }
116
+ static today(t, r, T) {
117
+ const e = this.dateOptions(r, T);
118
+ return { field: t, operator: s.TODAY, options: e };
119
+ }
120
+ static beforeToday(t, r, T, e) {
121
+ const n = this.dateOptions(T, e);
122
+ return { field: t, operator: s.BEFORE_TODAY, value: r, options: n };
123
+ }
124
+ static tomorrow(t, r, T) {
125
+ const e = this.dateOptions(r, T);
126
+ return { field: t, operator: s.TOMORROW, options: e };
127
+ }
128
+ static thisWeek(t, r, T) {
129
+ const e = this.dateOptions(r, T);
130
+ return { field: t, operator: s.THIS_WEEK, options: e };
131
+ }
132
+ static nextWeek(t, r, T) {
133
+ const e = this.dateOptions(r, T);
134
+ return { field: t, operator: s.NEXT_WEEK, options: e };
135
+ }
136
+ static lastWeek(t, r, T) {
137
+ const e = this.dateOptions(r, T);
138
+ return { field: t, operator: s.LAST_WEEK, options: e };
139
+ }
140
+ static thisMonth(t, r, T) {
141
+ const e = this.dateOptions(r, T);
142
+ return { field: t, operator: s.THIS_MONTH, options: e };
143
+ }
144
+ static lastMonth(t, r, T) {
145
+ const e = this.dateOptions(r, T);
146
+ return { field: t, operator: s.LAST_MONTH, options: e };
147
+ }
148
+ static recentDays(t, r, T, e) {
149
+ const n = this.dateOptions(T, e);
150
+ return { field: t, operator: s.RECENT_DAYS, value: r, options: n };
151
+ }
152
+ static earlierDays(t, r, T, e) {
153
+ const n = this.dateOptions(T, e);
154
+ return { field: t, operator: s.EARLIER_DAYS, value: r, options: n };
155
+ }
156
+ static raw(t) {
157
+ return { operator: s.RAW, value: t };
158
+ }
159
+ }
160
+ var A = /* @__PURE__ */ ((E) => (E.ASC = "ASC", E.DESC = "DESC", E))(A || {});
161
+ const c = {
162
+ index: 1,
163
+ size: 10
164
+ };
165
+ class R {
166
+ }
167
+ var a = /* @__PURE__ */ ((E) => (E.RECOVERABLE = "RECOVERABLE", E.UNKNOWN = "UNKNOWN", E.UNRECOVERABLE = "UNRECOVERABLE", E))(a || {});
168
+ const u = "Ok";
169
+ var _ = /* @__PURE__ */ ((E) => (E.COMMAND = "COMMAND", E.ERROR = "ERROR", E.EVENT = "EVENT", E.SOURCING = "SOURCING", E.STATE_EVENT = "STATE_EVENT", E))(_ || {});
170
+ const L = "", S = "(0)";
171
+ export {
172
+ D as CommandGateway,
173
+ o as CommandStage,
174
+ N as ConditionOptionKey,
175
+ I as Conditions,
176
+ L as DEFAULT_OWNER_ID,
177
+ c as DEFAULT_PAGINATION,
178
+ S as DEFAULT_TENANT_ID,
179
+ i as DeletionState,
180
+ _ as FunctionKind,
181
+ s as Operator,
182
+ a as RecoverableType,
183
+ u as SUCCEEDED_ERROR_CODE,
184
+ R as SnapshotQueryService,
185
+ A as SortDirection
186
+ };
@@ -0,0 +1 @@
1
+ (function(s,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(s=typeof globalThis<"u"?globalThis:s||self,i(s.FetcherWow={}))})(this,(function(s){"use strict";class i{}var N=(E=>(E.SENT="SENT",E.PROCESSED="PROCESSED",E.SNAPSHOT="SNAPSHOT",E.PROJECTED="PROJECTED",E.EVENT_HANDLED="EVENT_HANDLED",E.SAGA_HANDLED="SAGA_HANDLED",E))(N||{}),n=(E=>(E.AND="AND",E.OR="OR",E.NOR="NOR",E.ID="ID",E.IDS="IDS",E.AGGREGATE_ID="AGGREGATE_ID",E.AGGREGATE_IDS="AGGREGATE_IDS",E.TENANT_ID="TENANT_ID",E.OWNER_ID="OWNER_ID",E.DELETED="DELETED",E.ALL="ALL",E.EQ="EQ",E.NE="NE",E.GT="GT",E.LT="LT",E.GTE="GTE",E.LTE="LTE",E.CONTAINS="CONTAINS",E.IN="IN",E.NOT_IN="NOT_IN",E.BETWEEN="BETWEEN",E.ALL_IN="ALL_IN",E.STARTS_WITH="STARTS_WITH",E.ENDS_WITH="ENDS_WITH",E.ELEM_MATCH="ELEM_MATCH",E.NULL="NULL",E.NOT_NULL="NOT_NULL",E.TRUE="TRUE",E.FALSE="FALSE",E.EXISTS="EXISTS",E.TODAY="TODAY",E.BEFORE_TODAY="BEFORE_TODAY",E.TOMORROW="TOMORROW",E.THIS_WEEK="THIS_WEEK",E.NEXT_WEEK="NEXT_WEEK",E.LAST_WEEK="LAST_WEEK",E.THIS_MONTH="THIS_MONTH",E.LAST_MONTH="LAST_MONTH",E.RECENT_DAYS="RECENT_DAYS",E.EARLIER_DAYS="EARLIER_DAYS",E.RAW="RAW",E))(n||{}),A=(E=>(E.ACTIVE="ACTIVE",E.DELETED="DELETED",E.ALL="ALL",E))(A||{}),a=(E=>(E.IGNORE_CASE_OPTION_KEY="ignoreCase",E.ZONE_ID_OPTION_KEY="zoneId",E.DATE_PATTERN_OPTION_KEY="datePattern",E))(a||{});class u{static ignoreCaseOptions(t){if(!(typeof t>"u"))return{ignoreCase:t}}static dateOptions(t,e){if(typeof t>"u"&&typeof e>"u")return;const T={};return typeof t<"u"&&(T.datePattern=t),typeof e<"u"&&(T.zoneId=e),T}static and(...t){return{operator:n.AND,children:t}}static or(...t){return{operator:n.OR,children:t}}static nor(...t){return{operator:n.NOR,children:t}}static id(t){return{operator:n.ID,value:t}}static ids(t){return{operator:n.IDS,value:t}}static aggregateId(t){return{operator:n.AGGREGATE_ID,value:t}}static aggregateIds(...t){return{operator:n.AGGREGATE_IDS,value:t}}static tenantId(t){return{operator:n.TENANT_ID,value:t}}static ownerId(t){return{operator:n.OWNER_ID,value:t}}static deleted(t){return{operator:n.DELETED,value:t}}static active(){return this.deleted("ACTIVE")}static all(){return{operator:n.ALL}}static eq(t,e){return{field:t,operator:n.EQ,value:e}}static ne(t,e){return{field:t,operator:n.NE,value:e}}static gt(t,e){return{field:t,operator:n.GT,value:e}}static lt(t,e){return{field:t,operator:n.LT,value:e}}static gte(t,e){return{field:t,operator:n.GTE,value:e}}static lte(t,e){return{field:t,operator:n.LTE,value:e}}static contains(t,e,T){const r=this.ignoreCaseOptions(T);return{field:t,operator:n.CONTAINS,value:e,options:r}}static isIn(t,...e){return{field:t,operator:n.IN,value:e}}static notIn(t,...e){return{field:t,operator:n.NOT_IN,value:e}}static between(t,e,T){return{field:t,operator:n.BETWEEN,value:[e,T]}}static allIn(t,...e){return{field:t,operator:n.ALL_IN,value:e}}static startsWith(t,e,T){const r=this.ignoreCaseOptions(T);return{field:t,operator:n.STARTS_WITH,value:e,options:r}}static endsWith(t,e,T){const r=this.ignoreCaseOptions(T);return{field:t,operator:n.ENDS_WITH,value:e,options:r}}static elemMatch(t,e){return{field:t,operator:n.ELEM_MATCH,children:[e]}}static isNull(t){return{field:t,operator:n.NULL}}static notNull(t){return{field:t,operator:n.NOT_NULL}}static isTrue(t){return{field:t,operator:n.TRUE}}static isFalse(t){return{field:t,operator:n.FALSE}}static exists(t,e=!0){return{field:t,operator:n.EXISTS,value:e}}static today(t,e,T){const r=this.dateOptions(e,T);return{field:t,operator:n.TODAY,options:r}}static beforeToday(t,e,T,r){const o=this.dateOptions(T,r);return{field:t,operator:n.BEFORE_TODAY,value:e,options:o}}static tomorrow(t,e,T){const r=this.dateOptions(e,T);return{field:t,operator:n.TOMORROW,options:r}}static thisWeek(t,e,T){const r=this.dateOptions(e,T);return{field:t,operator:n.THIS_WEEK,options:r}}static nextWeek(t,e,T){const r=this.dateOptions(e,T);return{field:t,operator:n.NEXT_WEEK,options:r}}static lastWeek(t,e,T){const r=this.dateOptions(e,T);return{field:t,operator:n.LAST_WEEK,options:r}}static thisMonth(t,e,T){const r=this.dateOptions(e,T);return{field:t,operator:n.THIS_MONTH,options:r}}static lastMonth(t,e,T){const r=this.dateOptions(e,T);return{field:t,operator:n.LAST_MONTH,options:r}}static recentDays(t,e,T,r){const o=this.dateOptions(T,r);return{field:t,operator:n.RECENT_DAYS,value:e,options:o}}static earlierDays(t,e,T,r){const o=this.dateOptions(T,r);return{field:t,operator:n.EARLIER_DAYS,value:e,options:o}}static raw(t){return{operator:n.RAW,value:t}}}var _=(E=>(E.ASC="ASC",E.DESC="DESC",E))(_||{});const I={index:1,size:10};class R{}var D=(E=>(E.RECOVERABLE="RECOVERABLE",E.UNKNOWN="UNKNOWN",E.UNRECOVERABLE="UNRECOVERABLE",E))(D||{});const S="Ok";var c=(E=>(E.COMMAND="COMMAND",E.ERROR="ERROR",E.EVENT="EVENT",E.SOURCING="SOURCING",E.STATE_EVENT="STATE_EVENT",E))(c||{});const L="",O="(0)";s.CommandGateway=i,s.CommandStage=N,s.ConditionOptionKey=a,s.Conditions=u,s.DEFAULT_OWNER_ID=L,s.DEFAULT_PAGINATION=I,s.DEFAULT_TENANT_ID=O,s.DeletionState=A,s.FunctionKind=c,s.Operator=n,s.RecoverableType=D,s.SUCCEEDED_ERROR_CODE=S,s.SnapshotQueryService=R,s.SortDirection=_,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
@@ -0,0 +1,71 @@
1
+ import { Operator } from './operator';
2
+ export interface Condition {
3
+ field?: string;
4
+ operator?: Operator;
5
+ value?: any;
6
+ /**
7
+ * When `operator` is `AND` or `OR` or `NOR`, `children` cannot be empty.
8
+ */
9
+ children?: Condition[];
10
+ options?: Record<string, any>;
11
+ }
12
+ export interface ConditionCapable {
13
+ condition: Condition;
14
+ }
15
+ export declare enum DeletionState {
16
+ ACTIVE = "ACTIVE",
17
+ DELETED = "DELETED",
18
+ ALL = "ALL"
19
+ }
20
+ export declare enum ConditionOptionKey {
21
+ IGNORE_CASE_OPTION_KEY = "ignoreCase",
22
+ ZONE_ID_OPTION_KEY = "zoneId",
23
+ DATE_PATTERN_OPTION_KEY = "datePattern"
24
+ }
25
+ export declare class Conditions {
26
+ static ignoreCaseOptions(ignoreCase?: boolean): Record<string, any> | undefined;
27
+ static dateOptions(datePattern?: string, zoneId?: string): Record<string, any> | undefined;
28
+ static and(...conditions: Condition[]): Condition;
29
+ static or(...conditions: Condition[]): Condition;
30
+ static nor(...conditions: Condition[]): Condition;
31
+ static id(value: string): Condition;
32
+ static ids(value: string[]): Condition;
33
+ static aggregateId(value: string): Condition;
34
+ static aggregateIds(...value: string[]): Condition;
35
+ static tenantId(value: string): Condition;
36
+ static ownerId(value: string): Condition;
37
+ static deleted(value: DeletionState): Condition;
38
+ static active(): Condition;
39
+ static all(): Condition;
40
+ static eq(field: string, value: any): Condition;
41
+ static ne(field: string, value: any): Condition;
42
+ static gt(field: string, value: any): Condition;
43
+ static lt(field: string, value: any): Condition;
44
+ static gte(field: string, value: any): Condition;
45
+ static lte(field: string, value: any): Condition;
46
+ static contains(field: string, value: any, ignoreCase?: boolean): Condition;
47
+ static isIn(field: string, ...value: any[]): Condition;
48
+ static notIn(field: string, ...value: any[]): Condition;
49
+ static between(field: string, start: any, end: any): Condition;
50
+ static allIn(field: string, ...value: any[]): Condition;
51
+ static startsWith(field: string, value: any, ignoreCase?: boolean): Condition;
52
+ static endsWith(field: string, value: any, ignoreCase?: boolean): Condition;
53
+ static elemMatch(field: string, value: Condition): Condition;
54
+ static isNull(field: string): Condition;
55
+ static notNull(field: string): Condition;
56
+ static isTrue(field: string): Condition;
57
+ static isFalse(field: string): Condition;
58
+ static exists(field: string, exists?: boolean): Condition;
59
+ static today(field: string, datePattern?: string, zoneId?: string): Condition;
60
+ static beforeToday(field: string, time: any, datePattern?: string, zoneId?: string): Condition;
61
+ static tomorrow(field: string, datePattern?: string, zoneId?: string): Condition;
62
+ static thisWeek(field: string, datePattern?: string, zoneId?: string): Condition;
63
+ static nextWeek(field: string, datePattern?: string, zoneId?: string): Condition;
64
+ static lastWeek(field: string, datePattern?: string, zoneId?: string): Condition;
65
+ static thisMonth(field: string, datePattern?: string, zoneId?: string): Condition;
66
+ static lastMonth(field: string, datePattern?: string, zoneId?: string): Condition;
67
+ static recentDays(field: string, days: number, datePattern?: string, zoneId?: string): Condition;
68
+ static earlierDays(field: string, days: number, datePattern?: string, zoneId?: string): Condition;
69
+ static raw(raw: any): Condition;
70
+ }
71
+ //# sourceMappingURL=condition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition.d.ts","s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AAM,EACb,WAAW,CAAC,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,SAAS;IAKZ,MAAM,CAAC,QAAQ,CACb,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,SAAS;IAKZ,MAAM,CAAC,QAAQ,CACb,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,SAAS;IAKZ,MAAM,CAAC,SAAS,CACd,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,SAAS;IAKZ,MAAM,CAAC,SAAS,CACd,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,SAAS;IAKZ,MAAM,CAAC,UAAU,CACf,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,SAAS;IAKZ,MAAM,CAAC,WAAW,CAChB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,SAAS;IAKZ,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,SAAS;CAGhC"}
@@ -0,0 +1,6 @@
1
+ export * from './condition';
2
+ export * from './operator';
3
+ export * from './queryable';
4
+ export * from './snapshot';
5
+ export * from './snapshotQueryService';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/query/index.ts"],"names":[],"mappings":"AAaA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,186 @@
1
+ export declare enum Operator {
2
+ /**
3
+ * Performs logical AND on the provided condition list
4
+ */
5
+ AND = "AND",
6
+ /**
7
+ * Performs logical OR on the provided condition list
8
+ */
9
+ OR = "OR",
10
+ /**
11
+ * Performs logical NOR on the provided condition list
12
+ */
13
+ NOR = "NOR",
14
+ /**
15
+ * Matches all documents where the `id` field value equals the specified value
16
+ */
17
+ ID = "ID",
18
+ /**
19
+ * Matches all documents where the `id` field value equals any value in the specified list
20
+ */
21
+ IDS = "IDS",
22
+ /**
23
+ * Matches documents where the aggregate root ID equals the specified value
24
+ */
25
+ AGGREGATE_ID = "AGGREGATE_ID",
26
+ /**
27
+ * Matches all documents where the aggregate root ID equals any value in the specified list
28
+ */
29
+ AGGREGATE_IDS = "AGGREGATE_IDS",
30
+ /**
31
+ * Matches all documents where the `tenantId` field value equals the specified value
32
+ */
33
+ TENANT_ID = "TENANT_ID",
34
+ /**
35
+ * Matches all documents where the `ownerId` field value equals the specified value
36
+ */
37
+ OWNER_ID = "OWNER_ID",
38
+ /**
39
+ * Matches all documents where the `deleted` field value equals the specified value
40
+ */
41
+ DELETED = "DELETED",
42
+ /**
43
+ * Matches all documents
44
+ */
45
+ ALL = "ALL",
46
+ /**
47
+ * Matches all documents where the field name value equals the specified value
48
+ */
49
+ EQ = "EQ",
50
+ /**
51
+ * Matches all documents where the field name value does not equal the specified value
52
+ */
53
+ NE = "NE",
54
+ /**
55
+ * Matches all documents where the given field's value is greater than the specified value
56
+ */
57
+ GT = "GT",
58
+ /**
59
+ * Matches all documents where the given field's value is less than the specified value
60
+ */
61
+ LT = "LT",
62
+ /**
63
+ * Matches all documents where the given field's value is greater than or equal to the specified value
64
+ */
65
+ GTE = "GTE",
66
+ /**
67
+ * Matches all documents where the given field's value is less than or equal to the specified value
68
+ */
69
+ LTE = "LTE",
70
+ /**
71
+ * Matches all documents where the given field's value contains the specified value
72
+ */
73
+ CONTAINS = "CONTAINS",
74
+ /**
75
+ * Matches all documents where the field value equals any value in the specified list
76
+ */
77
+ IN = "IN",
78
+ /**
79
+ * Matches all documents where the field value does not equal any specified value or does not exist
80
+ */
81
+ NOT_IN = "NOT_IN",
82
+ /**
83
+ * Matches all documents where the field value is within the specified range
84
+ */
85
+ BETWEEN = "BETWEEN",
86
+ /**
87
+ * Matches all documents where the field value is an array containing all specified values
88
+ */
89
+ ALL_IN = "ALL_IN",
90
+ /**
91
+ * Matches documents where the field value starts with the specified string
92
+ */
93
+ STARTS_WITH = "STARTS_WITH",
94
+ /**
95
+ * Matches documents where the field value ends with the specified string
96
+ */
97
+ ENDS_WITH = "ENDS_WITH",
98
+ /**
99
+ * Matches all documents where the condition includes an array field,
100
+ * and at least one member of the array matches the given condition.
101
+ */
102
+ ELEM_MATCH = "ELEM_MATCH",
103
+ /**
104
+ * Matches all documents where the field value is `null`
105
+ */
106
+ NULL = "NULL",
107
+ /**
108
+ * Matches all documents where the field value is not `null`
109
+ */
110
+ NOT_NULL = "NOT_NULL",
111
+ /**
112
+ * Matches all documents where the field value is `true`
113
+ */
114
+ TRUE = "TRUE",
115
+ /**
116
+ * Matches all documents where the field value is `false`
117
+ */
118
+ FALSE = "FALSE",
119
+ /**
120
+ * Matches documents based on whether the field exists
121
+ */
122
+ EXISTS = "EXISTS",
123
+ /**
124
+ * Matches all documents where the field is within today's range
125
+ * > For example: if `today` is `2024-06-06`, matches documents in the range
126
+ * `2024-06-06 00:00:00.000` ~ `2024-06-06 23:59:59.999`
127
+ */
128
+ TODAY = "TODAY",
129
+ /**
130
+ * Matches all documents where the field is before today
131
+ */
132
+ BEFORE_TODAY = "BEFORE_TODAY",
133
+ /**
134
+ * Matches all documents where the field is within yesterday's range
135
+ * > For example: if `today` is `2024-06-06`, matches documents in the range
136
+ * `2024-06-05 00:00:00.000` ~ `2024-06-05 23:59:59.999`
137
+ */
138
+ TOMORROW = "TOMORROW",
139
+ /**
140
+ * Matches all documents where the field is within this week's range
141
+ */
142
+ THIS_WEEK = "THIS_WEEK",
143
+ /**
144
+ * Matches all documents where the field is within next week's range
145
+ */
146
+ NEXT_WEEK = "NEXT_WEEK",
147
+ /**
148
+ * Matches all documents where the field is within last week's range
149
+ */
150
+ LAST_WEEK = "LAST_WEEK",
151
+ /**
152
+ * Matches all documents where the field is within this month's range
153
+ * > For example:
154
+ * - `today`: `2024-06-06`
155
+ * - Matching range: `2024-06-01 00:00:00.000` ~ `2024-06-30 23:59:59.999`
156
+ */
157
+ THIS_MONTH = "THIS_MONTH",
158
+ /**
159
+ * Matches all documents where the field is within last month's range
160
+ * > For example:
161
+ * - `today`: `2024-06-06`
162
+ * - Matching range: `2024-05-01 00:00:00.000` ~ `2024-05-31 23:59:59.999`
163
+ */
164
+ LAST_MONTH = "LAST_MONTH",
165
+ /**
166
+ * Matches all documents where the field is within the specified number of recent days
167
+ * > For example: last 3 days
168
+ * - `today`: `2024-06-06`
169
+ * - Matching range: `2024-06-04 00:00:00.000` ~ `2024-06-06 23:59:59.999`
170
+ * - That is: today, yesterday, the day before yesterday
171
+ */
172
+ RECENT_DAYS = "RECENT_DAYS",
173
+ /**
174
+ * Matches all documents where the field is before the specified number of days
175
+ *
176
+ * > For example: before 3 days
177
+ * - `today`: `2024-06-06`
178
+ * - Matching range: all documents less than `2024-06-04 00:00:00.000`
179
+ */
180
+ EARLIER_DAYS = "EARLIER_DAYS",
181
+ /**
182
+ * Raw operator, uses the condition value directly as the raw database query condition
183
+ */
184
+ RAW = "RAW"
185
+ }
186
+ //# sourceMappingURL=operator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../src/query/operator.ts"],"names":[],"mappings":"AAaA,oBAAY,QAAQ;IAClB;;OAEG;IACH,GAAG,QAAQ;IAEX;;OAEG;IACH,EAAE,OAAO;IAET;;OAEG;IACH,GAAG,QAAQ;IAEX;;OAEG;IACH,EAAE,OAAO;IAET;;OAEG;IACH,GAAG,QAAQ;IAEX;;OAEG;IACH,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
5
+ }
6
+ export interface Sort {
7
+ field: string;
8
+ direction: SortDirection;
9
+ }
10
+ export interface SortCapable {
11
+ sort?: Sort[];
12
+ }
13
+ export interface Pagination {
14
+ index: number;
15
+ size: number;
16
+ }
17
+ export declare const DEFAULT_PAGINATION: Pagination;
18
+ export interface Projection {
19
+ include?: string[];
20
+ exclude?: string[];
21
+ }
22
+ export interface ProjectionCapable {
23
+ projection: Projection;
24
+ }
25
+ export interface Queryable extends ConditionCapable, ProjectionCapable, SortCapable {
26
+ }
27
+ export interface SingleQuery extends Queryable {
28
+ }
29
+ export interface ListQuery extends Queryable {
30
+ limit: number;
31
+ }
32
+ export interface PagedQuery extends Queryable {
33
+ pagination: Pagination;
34
+ }
35
+ export interface PagedList<T> {
36
+ total: number;
37
+ list: T[];
38
+ }
39
+ //# sourceMappingURL=queryable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryable.d.ts","sourceRoot":"","sources":["../../src/query/queryable.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,aAAa,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,kBAAkB,EAAE,UAGhC,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAGD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,SAAU,SAAQ,gBAAgB,EAAE,iBAAiB,EAAE,WAAW;CAElF;AAGD,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;AAED,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,CAAC,EAAE,CAAC;CACX"}
@@ -0,0 +1,32 @@
1
+ import { DeletedCapable, EventIdCapable, EventTimeCapable, FirstEventTimeCapable, FirstOperatorCapable, NamedAggregate, OperatorCapable, OwnerId, SnapshotTimeCapable, StateCapable, TenantId, Version } from '../types';
2
+ export interface MaterializedSnapshot<S> extends StateCapable<S>, NamedAggregate, TenantId, OwnerId, Version, EventIdCapable, FirstOperatorCapable, OperatorCapable, FirstEventTimeCapable, EventTimeCapable, SnapshotTimeCapable, DeletedCapable {
3
+ }
4
+ /**
5
+ * Represents a materialized snapshot for medium data, implementing multiple capabilities through inheritance.
6
+ * This class is designed to be generic, capable of holding state data of any type.
7
+ * Each snapshot corresponds to a specific version of the state within a tenant and owner context,
8
+ * and records information such as event IDs and operation times to support tracing and auditing.
9
+ *
10
+ * @param tenantId Identifier for the tenant to which the snapshot belongs, used for multi-tenant differentiation.
11
+ * @param ownerId Identifier for the owner of the snapshot, usually representing the creator or responsible person.
12
+ * @param version The version number of the snapshot, used to track changes over time.
13
+ * @param eventId The ID of the event that triggered the creation of this snapshot.
14
+ * @param firstOperator The first operator who performed an operation on the state.
15
+ * @param operator The operator who last performed an operation on the state.
16
+ * @param firstEventTime The timestamp of the first event, marking the beginning of the state's history.
17
+ * @param eventTime The timestamp of the last event, marking the last update time of the state.
18
+ * @param state The actual state data, its type is generic, allowing for different types of state data.
19
+ */
20
+ export interface MaterializedSnapshot<S> extends StateCapable<S>, NamedAggregate, TenantId, OwnerId, Version, EventIdCapable, FirstOperatorCapable, OperatorCapable, FirstEventTimeCapable, EventTimeCapable {
21
+ }
22
+ /**
23
+ * Represents a simplified materialized snapshot with generic state.
24
+ * This data class implements multiple interfaces to provide version, materialization, first event time, and state information.
25
+ *
26
+ * @param version The version of the snapshot, used to indicate the version of the state.
27
+ * @param firstEventTime The timestamp of the first event, used to record when the state was first changed.
28
+ * @param state The current state, with a generic type.
29
+ */
30
+ export interface SmallMaterializedSnapshot<S> extends StateCapable<S>, NamedAggregate, Version, FirstEventTimeCapable {
31
+ }
32
+ //# sourceMappingURL=snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/query/snapshot.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,OAAO,EACP,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,OAAO,EACR,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,YAAY,CAAC,CAAC,CAAC,EAAE,cAAc,EAC9E,QAAQ,EACR,OAAO,EACP,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc;CAEf;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,YAAY,CAAC,CAAC,CAAC,EAAE,cAAc,EAC9E,QAAQ,EACR,OAAO,EACP,OAAO,EACP,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,gBAAgB;CAEjB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB,CAAC,CAAC,CAAE,SAAQ,YAAY,CAAC,CAAC,CAAC,EAAE,cAAc,EACnF,OAAO,EAAE,qBAAqB;CAE/B"}
@@ -0,0 +1,3 @@
1
+ export declare class SnapshotQueryService {
2
+ }
3
+ //# sourceMappingURL=snapshotQueryService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshotQueryService.d.ts","sourceRoot":"","sources":["../../src/query/snapshotQueryService.ts"],"names":[],"mappings":"AAaA,qBAAa,oBAAoB;CAEhC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Represents an identifiable entity with a unique identifier.
3
+ */
4
+ export interface Identifier {
5
+ /**
6
+ * Represents a unique identifier for the implementing entity.
7
+ *
8
+ * This identifier is crucial for distinguishing between different instances of the same type and
9
+ * is often used in operations that require a unique reference to a specific entity, such as database lookups,
10
+ * state management, and event handling.
11
+ */
12
+ id: string;
13
+ }
14
+ export interface Version {
15
+ version: number;
16
+ }
17
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * 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.
3
+ *
4
+ * The [RecoverableType] enum provides a way to categorize errors into three distinct categories: [RECOVERABLE], [UNRECOVERABLE], and [UNKNOWN].
5
+ * This categorization is essential for implementing robust error handling and retry mechanisms in applications,
6
+ * ensuring that temporary issues are retried while permanent or unknown issues are handled appropriately.
7
+ *
8
+ */
9
+ export declare enum RecoverableType {
10
+ /**
11
+ * Represents an error type that indicates the operation or error can be retried.
12
+ *
13
+ * This enum value is used to classify errors in a way that allows for the implementation of retry logic. When an error
14
+ * is marked as [RECOVERABLE], it signifies that the error condition is temporary and might be resolved upon retrying the
15
+ * operation. This is particularly useful in scenarios where network issues, transient server errors, or other temporary
16
+ * conditions may cause an operation to fail, but with a high likelihood of success on subsequent attempts.
17
+ */
18
+ RECOVERABLE = "RECOVERABLE",
19
+ /**
20
+ * Represents an error type that indicates the operation or error cannot be retried.
21
+ *
22
+ * 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
23
+ * 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
24
+ * issues.
25
+ */
26
+ UNKNOWN = "UNKNOWN",
27
+ /**
28
+ * Represents an unknown type of recoverability for an error or operation.
29
+ * This is used when the recoverability of an error cannot be determined or is not specified.
30
+ */
31
+ UNRECOVERABLE = "UNRECOVERABLE"
32
+ }
33
+ /**
34
+ * Represents an error that occurs during the binding process, typically when data is being mapped to or from an object.
35
+ * This class extends the [Named] interface, inheriting the `name` property which can be used to identify the source or context of the error.
36
+ *
37
+ * @param name The name or identifier for the context in which the error occurred.
38
+ * @param msg A message describing the error.
39
+ */
40
+ export interface BindingError {
41
+ name: string;
42
+ msg: string;
43
+ }
44
+ /**
45
+ * Represents the information about an error, including whether the operation succeeded, the error code, and any associated messages or binding errors.
46
+ *
47
+ * 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
48
+ * , and access any additional error details such as messages or binding errors.
49
+ */
50
+ export interface ErrorInfo {
51
+ /**
52
+ * Represents the error code associated with an error. This value is used to identify the type of error that has occurred,
53
+ * which can be useful for debugging, logging, and handling errors in a standardized way.
54
+ */
55
+ errorCode: string;
56
+ /**
57
+ * 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
58
+ * .
59
+ */
60
+ errorMsg: string;
61
+ /**
62
+ * Provides a list of [BindingError] instances that occurred during the binding process.
63
+ * Each [BindingError] contains information about the error, including its name and a message describing the issue.
64
+ * This property returns an empty list if no binding errors are present.
65
+ */
66
+ bindingErrors?: BindingError[];
67
+ }
68
+ /**
69
+ * A constant representing a successful operation or status.
70
+ * This value is typically used in the context of error handling and response descriptions to indicate that an operation has been completed successfully.
71
+ */
72
+ export declare const SUCCEEDED_ERROR_CODE = "Ok";
73
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/types/error.ts"],"names":[],"mappings":"AAaA;;;;;;;GAOG;AACH,oBAAY,eAAe;IACzB;;;;;;;OAOG;IACH,WAAW,gBAAgB;IAC3B;;;;;;OAMG;IACH,OAAO,YAAY;IAEnB;;;OAGG;IACH,aAAa,kBAAkB;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;CAChC;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAC"}
@@ -0,0 +1,17 @@
1
+ export declare enum FunctionKind {
2
+ COMMAND = "COMMAND",
3
+ ERROR = "ERROR",
4
+ EVENT = "EVENT",
5
+ SOURCING = "SOURCING",
6
+ STATE_EVENT = "STATE_EVENT"
7
+ }
8
+ export interface FunctionInfo {
9
+ functionKind: FunctionKind;
10
+ contextName: string;
11
+ processorName: string;
12
+ name: string;
13
+ }
14
+ export interface FunctionInfoCapable {
15
+ function: FunctionInfo;
16
+ }
17
+ //# sourceMappingURL=function.d.ts.map
@@ -0,0 +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,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,YAAY,CAAC;CACxB"}
@@ -0,0 +1,6 @@
1
+ export * from './common';
2
+ export * from './error';
3
+ export * from './function';
4
+ export * from './modeling';
5
+ export * from './naming';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { NamedBoundedContext } from './naming.ts';
2
+ /**
3
+ * Interface for classes that have a creation time.
4
+ */
5
+ export interface CreateTimeCapable {
6
+ /**
7
+ * Gets the creation time in milliseconds since the Unix epoch.
8
+ */
9
+ createTime: number;
10
+ }
11
+ export interface DeletedCapable {
12
+ /**
13
+ * Whether the aggregate is deleted.
14
+ */
15
+ deleted: boolean;
16
+ }
17
+ export interface EventIdCapable {
18
+ /**
19
+ * The event id of the aggregate.
20
+ */
21
+ eventId: string;
22
+ }
23
+ export interface EventTimeCapable {
24
+ /**
25
+ * The last event time of the aggregate, represented as a Unix timestamp in milliseconds.
26
+ */
27
+ eventTime: number;
28
+ }
29
+ export interface FirstEventTimeCapable {
30
+ /**
31
+ * The first event time of the aggregate, represented as a Unix timestamp in milliseconds.
32
+ */
33
+ firstEventTime: number;
34
+ }
35
+ export interface FirstOperatorCapable {
36
+ /**
37
+ * The first operator of the aggregate.
38
+ */
39
+ firstOperator: string;
40
+ }
41
+ export interface AggregateNameCapable {
42
+ /**
43
+ * The name of the aggregate.
44
+ */
45
+ aggregateName: string;
46
+ }
47
+ export interface NamedAggregate extends NamedBoundedContext, AggregateNameCapable {
48
+ }
49
+ export interface AggregateId extends TenantId, NamedAggregate {
50
+ aggregateId: string;
51
+ }
52
+ export interface OperatorCapable {
53
+ /**
54
+ * The last operator of the aggregate.
55
+ */
56
+ operator: string;
57
+ }
58
+ export declare const DEFAULT_OWNER_ID = "";
59
+ /**
60
+ * 用于标识资源的拥有者
61
+ */
62
+ export interface OwnerId {
63
+ /**
64
+ * 资源拥有者的唯一标识符
65
+ */
66
+ ownerId: string;
67
+ }
68
+ export interface SnapshotTimeCapable {
69
+ /**
70
+ * The snapshot time of the aggregate, represented as a Unix timestamp in milliseconds.
71
+ */
72
+ snapshotTime: number;
73
+ }
74
+ export declare const DEFAULT_TENANT_ID = "(0)";
75
+ export interface TenantId {
76
+ tenantId: string;
77
+ }
78
+ export interface StateCapable<S> {
79
+ state: S;
80
+ }
81
+ //# sourceMappingURL=modeling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modeling.d.ts","sourceRoot":"","sources":["../../src/types/modeling.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAe,SAAQ,mBAAmB,EAAE,oBAAoB;CAChF;AAED,MAAM,WAAW,WAAY,SAAQ,QAAQ,EAAE,cAAc;IAC3D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AAEvC,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,CAAC,CAAC;CACV"}
@@ -0,0 +1,7 @@
1
+ export interface NamedBoundedContext {
2
+ contextName: string;
3
+ }
4
+ export interface Named {
5
+ name: string;
6
+ }
7
+ //# sourceMappingURL=naming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"naming.d.ts","sourceRoot":"","sources":["../../src/types/naming.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;CACd"}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@ahoo-wang/fetcher-wow",
3
+ "version": "0.8.0",
4
+ "description": "Support for Wow(https://github.com/Ahoo-Wang/Wow) in Fetcher",
5
+ "keywords": [
6
+ "fetch",
7
+ "http",
8
+ "client",
9
+ "wow",
10
+ "cqrs",
11
+ "ddd",
12
+ "microservice",
13
+ "event-sourcing"
14
+ ],
15
+ "author": "Ahoo-Wang",
16
+ "license": "Apache-2.0",
17
+ "homepage": "https://github.com/Ahoo-Wang/fetcher/tree/master/packages/wow",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/Ahoo-Wang/fetcher.git",
21
+ "directory": "packages/wow"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/Ahoo-Wang/fetcher/issues"
25
+ },
26
+ "main": "./dist/index.umd.js",
27
+ "module": "./dist/index.es.js",
28
+ "types": "./dist/index.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.es.js",
33
+ "require": "./dist/index.umd.js"
34
+ }
35
+ },
36
+ "files": [
37
+ "dist"
38
+ ],
39
+ "dependencies": {
40
+ "@ahoo-wang/fetcher": "0.8.0",
41
+ "@ahoo-wang/fetcher-eventstream": "0.8.0",
42
+ "@ahoo-wang/fetcher-decorator": "0.8.0"
43
+ },
44
+ "devDependencies": {
45
+ "@vitest/coverage-v8": "^3.2.4",
46
+ "eslint": "^9.33.0",
47
+ "prettier": "^3.6.2",
48
+ "typescript": "^5.9.2",
49
+ "unplugin-dts": "1.0.0-beta.6",
50
+ "vite": "^7.1.3",
51
+ "vitest": "^3.2.4"
52
+ },
53
+ "scripts": {
54
+ "build": "vite build",
55
+ "test": "vitest run --coverage",
56
+ "lint": "eslint . --fix",
57
+ "clean": "rm -rf dist"
58
+ }
59
+ }