@imolko/ultra-ddd 1.0.35-beta → 1.0.36-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-browser/aggregate-root/use-examples/product-woo/aggregate.d.ts +298 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/aggregate.d.ts.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/aggregate.js +19 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/aggregate.js.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/conditions.d.ts +85 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/conditions.d.ts.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/conditions.js +23 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/conditions.js.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/definition.d.ts +34 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/definition.d.ts.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/definition.js +57 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/definition.js.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/errors.d.ts +4 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/errors.d.ts.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/errors.js +2 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/errors.js.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/payload.d.ts +4 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/payload.d.ts.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/payload.js +2 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/payload.js.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/primitive.d.ts +7 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/primitive.d.ts.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/primitive.js +2 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/primitive.js.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/props.d.ts +8 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/props.d.ts.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/props.js +2 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/props.js.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/security-token.d.ts +2 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/security-token.d.ts.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/security-token.js +2 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/security-token.js.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/snapshot.d.ts +8 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/snapshot.d.ts.map +1 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/snapshot.js +2 -0
- package/dist-browser/aggregate-root/use-examples/product-woo/snapshot.js.map +1 -0
- package/dist-browser/entity/entity-base.d.ts.map +1 -1
- package/dist-browser/entity/entity-base.js +1 -0
- package/dist-browser/entity/entity-base.js.map +1 -1
- package/dist-browser/entity/identity/entity-id.d.ts +3 -3
- package/dist-browser/entity/identity/entity-id.d.ts.map +1 -1
- package/dist-browser/entity/identity/identity-strategy.enum.d.ts +16 -1
- package/dist-browser/entity/identity/identity-strategy.enum.d.ts.map +1 -1
- package/dist-browser/entity/identity/identity-strategy.enum.js +15 -0
- package/dist-browser/entity/identity/identity-strategy.enum.js.map +1 -1
- package/dist-browser/entity/identity/index.d.ts +3 -2
- package/dist-browser/entity/identity/index.d.ts.map +1 -1
- package/dist-browser/entity/identity/index.js +3 -2
- package/dist-browser/entity/identity/index.js.map +1 -1
- package/dist-browser/entity/identity/numericid/conditions.d.ts +5 -0
- package/dist-browser/entity/identity/numericid/conditions.d.ts.map +1 -0
- package/dist-browser/entity/identity/numericid/conditions.js +7 -0
- package/dist-browser/entity/identity/numericid/conditions.js.map +1 -0
- package/dist-browser/entity/identity/numericid/definition.d.ts +30 -0
- package/dist-browser/entity/identity/numericid/definition.d.ts.map +1 -0
- package/dist-browser/entity/identity/numericid/definition.js +53 -0
- package/dist-browser/entity/identity/numericid/definition.js.map +1 -0
- package/dist-browser/entity/identity/numericid/errors.d.ts +3 -0
- package/dist-browser/entity/identity/numericid/errors.d.ts.map +1 -0
- package/dist-browser/entity/identity/numericid/errors.js +2 -0
- package/dist-browser/entity/identity/numericid/errors.js.map +1 -0
- package/dist-browser/entity/identity/numericid/index.d.ts +5 -0
- package/dist-browser/entity/identity/numericid/index.d.ts.map +1 -0
- package/dist-browser/entity/identity/numericid/index.js +2 -0
- package/dist-browser/entity/identity/numericid/index.js.map +1 -0
- package/dist-browser/entity/identity/numericid/payload.d.ts +4 -0
- package/dist-browser/entity/identity/numericid/payload.d.ts.map +1 -0
- package/dist-browser/entity/identity/numericid/payload.js +2 -0
- package/dist-browser/entity/identity/numericid/payload.js.map +1 -0
- package/dist-browser/entity/identity/numericid/primitive.d.ts +2 -0
- package/dist-browser/entity/identity/numericid/primitive.d.ts.map +1 -0
- package/dist-browser/entity/identity/numericid/primitive.js +2 -0
- package/dist-browser/entity/identity/numericid/primitive.js.map +1 -0
- package/dist-browser/entity/identity/numericid/props.d.ts +7 -0
- package/dist-browser/entity/identity/numericid/props.d.ts.map +1 -0
- package/dist-browser/entity/identity/numericid/props.js +3 -0
- package/dist-browser/entity/identity/numericid/props.js.map +1 -0
- package/dist-browser/entity/identity/numericid/value-object.d.ts +102 -0
- package/dist-browser/entity/identity/numericid/value-object.d.ts.map +1 -0
- package/dist-browser/entity/identity/numericid/value-object.js +17 -0
- package/dist-browser/entity/identity/numericid/value-object.js.map +1 -0
- package/dist-browser/entity/identity/props-identity-base.d.ts.map +1 -1
- package/dist-browser/entity/use-examples/product-woo/conditions.d.ts +27 -0
- package/dist-browser/entity/use-examples/product-woo/conditions.d.ts.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/conditions.js +19 -0
- package/dist-browser/entity/use-examples/product-woo/conditions.js.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/definition.d.ts +25 -0
- package/dist-browser/entity/use-examples/product-woo/definition.d.ts.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/definition.js +46 -0
- package/dist-browser/entity/use-examples/product-woo/definition.js.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/entity.d.ts +254 -0
- package/dist-browser/entity/use-examples/product-woo/entity.d.ts.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/entity.js +19 -0
- package/dist-browser/entity/use-examples/product-woo/entity.js.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/errors.d.ts +4 -0
- package/dist-browser/entity/use-examples/product-woo/errors.d.ts.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/errors.js +2 -0
- package/dist-browser/entity/use-examples/product-woo/errors.js.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/payload.d.ts +4 -0
- package/dist-browser/entity/use-examples/product-woo/payload.d.ts.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/payload.js +2 -0
- package/dist-browser/entity/use-examples/product-woo/payload.js.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/primitive.d.ts +7 -0
- package/dist-browser/entity/use-examples/product-woo/primitive.d.ts.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/primitive.js +2 -0
- package/dist-browser/entity/use-examples/product-woo/primitive.js.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/props.d.ts +7 -0
- package/dist-browser/entity/use-examples/product-woo/props.d.ts.map +1 -0
- package/dist-browser/entity/use-examples/product-woo/props.js +2 -0
- package/dist-browser/entity/use-examples/product-woo/props.js.map +1 -0
- package/dist-browser/test/execute-sequentially/artifacts/aggregate.d.ts +390 -0
- package/dist-browser/test/execute-sequentially/artifacts/aggregate.d.ts.map +1 -0
- package/dist-browser/test/execute-sequentially/artifacts/aggregate.js +91 -0
- package/dist-browser/test/execute-sequentially/artifacts/aggregate.js.map +1 -0
- package/dist-browser/test/execute-sequentially/artifacts/entity.d.ts +313 -0
- package/dist-browser/test/execute-sequentially/artifacts/entity.d.ts.map +1 -0
- package/dist-browser/test/execute-sequentially/artifacts/entity.js +90 -0
- package/dist-browser/test/execute-sequentially/artifacts/entity.js.map +1 -0
- package/dist-browser/test/execute-sequentially/artifacts/index.d.ts +4 -0
- package/dist-browser/test/execute-sequentially/artifacts/index.d.ts.map +1 -0
- package/dist-browser/test/execute-sequentially/artifacts/index.js +4 -0
- package/dist-browser/test/execute-sequentially/artifacts/index.js.map +1 -0
- package/dist-browser/test/execute-sequentially/artifacts/value-object.d.ts +141 -0
- package/dist-browser/test/execute-sequentially/artifacts/value-object.d.ts.map +1 -0
- package/dist-browser/test/execute-sequentially/artifacts/value-object.js +76 -0
- package/dist-browser/test/execute-sequentially/artifacts/value-object.js.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/aggregate.d.ts +298 -0
- package/dist-node/aggregate-root/use-examples/product-woo/aggregate.d.ts.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/aggregate.js +22 -0
- package/dist-node/aggregate-root/use-examples/product-woo/aggregate.js.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/conditions.d.ts +85 -0
- package/dist-node/aggregate-root/use-examples/product-woo/conditions.d.ts.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/conditions.js +26 -0
- package/dist-node/aggregate-root/use-examples/product-woo/conditions.js.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/definition.d.ts +34 -0
- package/dist-node/aggregate-root/use-examples/product-woo/definition.d.ts.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/definition.js +60 -0
- package/dist-node/aggregate-root/use-examples/product-woo/definition.js.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/errors.d.ts +4 -0
- package/dist-node/aggregate-root/use-examples/product-woo/errors.d.ts.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/errors.js +3 -0
- package/dist-node/aggregate-root/use-examples/product-woo/errors.js.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/payload.d.ts +4 -0
- package/dist-node/aggregate-root/use-examples/product-woo/payload.d.ts.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/payload.js +3 -0
- package/dist-node/aggregate-root/use-examples/product-woo/payload.js.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/primitive.d.ts +7 -0
- package/dist-node/aggregate-root/use-examples/product-woo/primitive.d.ts.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/primitive.js +3 -0
- package/dist-node/aggregate-root/use-examples/product-woo/primitive.js.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/props.d.ts +8 -0
- package/dist-node/aggregate-root/use-examples/product-woo/props.d.ts.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/props.js +3 -0
- package/dist-node/aggregate-root/use-examples/product-woo/props.js.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/security-token.d.ts +2 -0
- package/dist-node/aggregate-root/use-examples/product-woo/security-token.d.ts.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/security-token.js +5 -0
- package/dist-node/aggregate-root/use-examples/product-woo/security-token.js.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/snapshot.d.ts +8 -0
- package/dist-node/aggregate-root/use-examples/product-woo/snapshot.d.ts.map +1 -0
- package/dist-node/aggregate-root/use-examples/product-woo/snapshot.js +3 -0
- package/dist-node/aggregate-root/use-examples/product-woo/snapshot.js.map +1 -0
- package/dist-node/entity/entity-base.d.ts.map +1 -1
- package/dist-node/entity/entity-base.js +1 -0
- package/dist-node/entity/entity-base.js.map +1 -1
- package/dist-node/entity/identity/entity-id.d.ts +3 -3
- package/dist-node/entity/identity/entity-id.d.ts.map +1 -1
- package/dist-node/entity/identity/identity-strategy.enum.d.ts +16 -1
- package/dist-node/entity/identity/identity-strategy.enum.d.ts.map +1 -1
- package/dist-node/entity/identity/identity-strategy.enum.js +15 -0
- package/dist-node/entity/identity/identity-strategy.enum.js.map +1 -1
- package/dist-node/entity/identity/index.d.ts +3 -2
- package/dist-node/entity/identity/index.d.ts.map +1 -1
- package/dist-node/entity/identity/index.js +3 -2
- package/dist-node/entity/identity/index.js.map +1 -1
- package/dist-node/entity/identity/numericid/conditions.d.ts +5 -0
- package/dist-node/entity/identity/numericid/conditions.d.ts.map +1 -0
- package/dist-node/entity/identity/numericid/conditions.js +10 -0
- package/dist-node/entity/identity/numericid/conditions.js.map +1 -0
- package/dist-node/entity/identity/numericid/definition.d.ts +30 -0
- package/dist-node/entity/identity/numericid/definition.d.ts.map +1 -0
- package/dist-node/entity/identity/numericid/definition.js +56 -0
- package/dist-node/entity/identity/numericid/definition.js.map +1 -0
- package/dist-node/entity/identity/numericid/errors.d.ts +3 -0
- package/dist-node/entity/identity/numericid/errors.d.ts.map +1 -0
- package/dist-node/entity/identity/numericid/errors.js +3 -0
- package/dist-node/entity/identity/numericid/errors.js.map +1 -0
- package/dist-node/entity/identity/numericid/index.d.ts +5 -0
- package/dist-node/entity/identity/numericid/index.d.ts.map +1 -0
- package/dist-node/entity/identity/numericid/index.js +6 -0
- package/dist-node/entity/identity/numericid/index.js.map +1 -0
- package/dist-node/entity/identity/numericid/payload.d.ts +4 -0
- package/dist-node/entity/identity/numericid/payload.d.ts.map +1 -0
- package/dist-node/entity/identity/numericid/payload.js +3 -0
- package/dist-node/entity/identity/numericid/payload.js.map +1 -0
- package/dist-node/entity/identity/numericid/primitive.d.ts +2 -0
- package/dist-node/entity/identity/numericid/primitive.d.ts.map +1 -0
- package/dist-node/entity/identity/numericid/primitive.js +3 -0
- package/dist-node/entity/identity/numericid/primitive.js.map +1 -0
- package/dist-node/entity/identity/numericid/props.d.ts +7 -0
- package/dist-node/entity/identity/numericid/props.d.ts.map +1 -0
- package/dist-node/entity/identity/numericid/props.js +4 -0
- package/dist-node/entity/identity/numericid/props.js.map +1 -0
- package/dist-node/entity/identity/numericid/value-object.d.ts +102 -0
- package/dist-node/entity/identity/numericid/value-object.d.ts.map +1 -0
- package/dist-node/entity/identity/numericid/value-object.js +20 -0
- package/dist-node/entity/identity/numericid/value-object.js.map +1 -0
- package/dist-node/entity/identity/props-identity-base.d.ts.map +1 -1
- package/dist-node/entity/use-examples/product-woo/conditions.d.ts +27 -0
- package/dist-node/entity/use-examples/product-woo/conditions.d.ts.map +1 -0
- package/dist-node/entity/use-examples/product-woo/conditions.js +22 -0
- package/dist-node/entity/use-examples/product-woo/conditions.js.map +1 -0
- package/dist-node/entity/use-examples/product-woo/definition.d.ts +25 -0
- package/dist-node/entity/use-examples/product-woo/definition.d.ts.map +1 -0
- package/dist-node/entity/use-examples/product-woo/definition.js +49 -0
- package/dist-node/entity/use-examples/product-woo/definition.js.map +1 -0
- package/dist-node/entity/use-examples/product-woo/entity.d.ts +254 -0
- package/dist-node/entity/use-examples/product-woo/entity.d.ts.map +1 -0
- package/dist-node/entity/use-examples/product-woo/entity.js +22 -0
- package/dist-node/entity/use-examples/product-woo/entity.js.map +1 -0
- package/dist-node/entity/use-examples/product-woo/errors.d.ts +4 -0
- package/dist-node/entity/use-examples/product-woo/errors.d.ts.map +1 -0
- package/dist-node/entity/use-examples/product-woo/errors.js +3 -0
- package/dist-node/entity/use-examples/product-woo/errors.js.map +1 -0
- package/dist-node/entity/use-examples/product-woo/payload.d.ts +4 -0
- package/dist-node/entity/use-examples/product-woo/payload.d.ts.map +1 -0
- package/dist-node/entity/use-examples/product-woo/payload.js +3 -0
- package/dist-node/entity/use-examples/product-woo/payload.js.map +1 -0
- package/dist-node/entity/use-examples/product-woo/primitive.d.ts +7 -0
- package/dist-node/entity/use-examples/product-woo/primitive.d.ts.map +1 -0
- package/dist-node/entity/use-examples/product-woo/primitive.js +3 -0
- package/dist-node/entity/use-examples/product-woo/primitive.js.map +1 -0
- package/dist-node/entity/use-examples/product-woo/props.d.ts +7 -0
- package/dist-node/entity/use-examples/product-woo/props.d.ts.map +1 -0
- package/dist-node/entity/use-examples/product-woo/props.js +3 -0
- package/dist-node/entity/use-examples/product-woo/props.js.map +1 -0
- package/dist-node/test/execute-sequentially/artifacts/aggregate.d.ts +390 -0
- package/dist-node/test/execute-sequentially/artifacts/aggregate.d.ts.map +1 -0
- package/dist-node/test/execute-sequentially/artifacts/aggregate.js +92 -0
- package/dist-node/test/execute-sequentially/artifacts/aggregate.js.map +1 -0
- package/dist-node/test/execute-sequentially/artifacts/entity.d.ts +313 -0
- package/dist-node/test/execute-sequentially/artifacts/entity.d.ts.map +1 -0
- package/dist-node/test/execute-sequentially/artifacts/entity.js +91 -0
- package/dist-node/test/execute-sequentially/artifacts/entity.js.map +1 -0
- package/dist-node/test/execute-sequentially/artifacts/index.d.ts +4 -0
- package/dist-node/test/execute-sequentially/artifacts/index.d.ts.map +1 -0
- package/dist-node/test/execute-sequentially/artifacts/index.js +20 -0
- package/dist-node/test/execute-sequentially/artifacts/index.js.map +1 -0
- package/dist-node/test/execute-sequentially/artifacts/value-object.d.ts +141 -0
- package/dist-node/test/execute-sequentially/artifacts/value-object.d.ts.map +1 -0
- package/dist-node/test/execute-sequentially/artifacts/value-object.js +77 -0
- package/dist-node/test/execute-sequentially/artifacts/value-object.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import { Validation } from "@imolko/ultra-result";
|
|
2
|
+
import { AggregateRootBase, Memento } from "../../../aggregate-root";
|
|
3
|
+
import { Uuid, UuidPayload, UuidPrimitive } from "../../../entity";
|
|
4
|
+
import { InvalidTypeError, z, ZodSchema, ZodTypeDef } from "@imolko/ultra-v8n";
|
|
5
|
+
import { InvoiceName, InvoiceNameErrors, InvoiceNamePayload, InvoiceNamePrimitive } from "./value-object";
|
|
6
|
+
/**
|
|
7
|
+
* Interfaces
|
|
8
|
+
*/
|
|
9
|
+
interface Props {
|
|
10
|
+
id: Uuid;
|
|
11
|
+
name: InvoiceName;
|
|
12
|
+
age: number;
|
|
13
|
+
version: number;
|
|
14
|
+
}
|
|
15
|
+
interface Primitive {
|
|
16
|
+
name: InvoiceNamePrimitive;
|
|
17
|
+
age: number;
|
|
18
|
+
id: UuidPrimitive;
|
|
19
|
+
}
|
|
20
|
+
interface Snapshot {
|
|
21
|
+
name: InvoiceNamePayload;
|
|
22
|
+
age: number;
|
|
23
|
+
id: UuidPayload;
|
|
24
|
+
version: number;
|
|
25
|
+
}
|
|
26
|
+
declare const conditions: {
|
|
27
|
+
build: z.ZodEffects<z.ZodObject<{
|
|
28
|
+
id: z.ZodType<Uuid, z.ZodTypeDef, string>;
|
|
29
|
+
name: z.ZodType<InvoiceName, z.ZodTypeDef, string>;
|
|
30
|
+
age: z.ZodNumber;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
id: Uuid;
|
|
33
|
+
name: InvoiceName;
|
|
34
|
+
age: number;
|
|
35
|
+
}, {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
age: number;
|
|
39
|
+
}>, any, {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
age: number;
|
|
43
|
+
}>;
|
|
44
|
+
rebuild: z.ZodObject<{
|
|
45
|
+
id: z.ZodType<Uuid, z.ZodTypeDef, string>;
|
|
46
|
+
name: z.ZodType<InvoiceName, z.ZodTypeDef, string>;
|
|
47
|
+
age: z.ZodNumber;
|
|
48
|
+
} & {
|
|
49
|
+
version: z.ZodNumber;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
version: number;
|
|
52
|
+
id: Uuid;
|
|
53
|
+
name: InvoiceName;
|
|
54
|
+
age: number;
|
|
55
|
+
}, {
|
|
56
|
+
version: number;
|
|
57
|
+
id: string;
|
|
58
|
+
name: string;
|
|
59
|
+
age: number;
|
|
60
|
+
}>;
|
|
61
|
+
};
|
|
62
|
+
type Payload = z.input<typeof conditions.build>;
|
|
63
|
+
type Errors = InvalidTypeError | InvoiceNameErrors;
|
|
64
|
+
/**
|
|
65
|
+
* Definicion del agregado
|
|
66
|
+
*/
|
|
67
|
+
declare class Definition extends AggregateRootBase<Uuid, Props, Primitive, Snapshot> {
|
|
68
|
+
/**
|
|
69
|
+
* Propiedades estáticas
|
|
70
|
+
*/
|
|
71
|
+
static readonly PROPS_VERSION = 1;
|
|
72
|
+
static readonly SECURITY_TOKEN = "77a6b182-868f-477a-8ad8-560b9f8de831";
|
|
73
|
+
static readonly NAME = "user";
|
|
74
|
+
static readonly conditions: {
|
|
75
|
+
build: ZodSchema<Props, ZodTypeDef, Payload>;
|
|
76
|
+
rebuild: ZodSchema<Props, ZodTypeDef, Snapshot>;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Constructor
|
|
80
|
+
*/
|
|
81
|
+
constructor(props: Props);
|
|
82
|
+
/**
|
|
83
|
+
* Devuelve las propiedades serializadas para guardar en base de datos
|
|
84
|
+
* @returns {Snapshot}
|
|
85
|
+
*/
|
|
86
|
+
getSnapshot(): Snapshot;
|
|
87
|
+
/**
|
|
88
|
+
* Devuelve las propiedades serializadas para exponer en la aplicacion
|
|
89
|
+
* @returns {Primitive}
|
|
90
|
+
*/
|
|
91
|
+
getPrimitive(): Primitive;
|
|
92
|
+
}
|
|
93
|
+
declare const User_base: ((abstract new (...args: any[]) => {
|
|
94
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
95
|
+
takeMemento(): Validation<import("../../../aggregate-root").MementoErrors, Memento>;
|
|
96
|
+
readonly _id: Uuid;
|
|
97
|
+
props: Readonly<Props>;
|
|
98
|
+
getSnapshot(): Snapshot;
|
|
99
|
+
getPrimitive(): Primitive;
|
|
100
|
+
equals<Implemented extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented, object?: Implemented | undefined): boolean;
|
|
101
|
+
readonly id: Uuid;
|
|
102
|
+
}) & {
|
|
103
|
+
factoryUsed: boolean;
|
|
104
|
+
"__#1@#SECURITY_TOKEN": string;
|
|
105
|
+
rulesBuild<Implemented extends /*elided*/ any & {
|
|
106
|
+
new (...args: any[]): {
|
|
107
|
+
readonly _id: Uuid;
|
|
108
|
+
props: Readonly<Props>;
|
|
109
|
+
getSnapshot(): Snapshot;
|
|
110
|
+
getPrimitive(): Primitive;
|
|
111
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
112
|
+
readonly id: Uuid;
|
|
113
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
114
|
+
} & Props;
|
|
115
|
+
prototype: {
|
|
116
|
+
readonly _id: Uuid;
|
|
117
|
+
props: Readonly<Props>;
|
|
118
|
+
getSnapshot(): Snapshot;
|
|
119
|
+
getPrimitive(): Primitive;
|
|
120
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
121
|
+
readonly id: Uuid;
|
|
122
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
123
|
+
} & Props;
|
|
124
|
+
} & ((abstract new (...args: any[]) => {
|
|
125
|
+
readonly _id: Uuid;
|
|
126
|
+
props: Readonly<Props>;
|
|
127
|
+
getSnapshot(): Snapshot;
|
|
128
|
+
getPrimitive(): Primitive;
|
|
129
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
130
|
+
readonly id: Uuid;
|
|
131
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
132
|
+
}) & {
|
|
133
|
+
conditions: {
|
|
134
|
+
build: z.ZodType<Props, z.ZodTypeDef, {
|
|
135
|
+
id: string;
|
|
136
|
+
name: string;
|
|
137
|
+
age: number;
|
|
138
|
+
}>;
|
|
139
|
+
rebuild: z.ZodType<Props, z.ZodTypeDef, Snapshot>;
|
|
140
|
+
};
|
|
141
|
+
builder?(value: Props): AggregateRootBase<Uuid, Props, Primitive, Snapshot>;
|
|
142
|
+
rebuilder?(value: Props): AggregateRootBase<Uuid, Props, Primitive, Snapshot>;
|
|
143
|
+
migrate?(memento: Memento): Snapshot;
|
|
144
|
+
SECURITY_TOKEN: string;
|
|
145
|
+
PROPS_VERSION: number;
|
|
146
|
+
NAME: string;
|
|
147
|
+
}) & typeof Definition>(this: Implemented): z.ZodType<InstanceType<Implemented>, z.ZodTypeDef, {
|
|
148
|
+
id: string;
|
|
149
|
+
name: string;
|
|
150
|
+
age: number;
|
|
151
|
+
}>;
|
|
152
|
+
rulesRebuild<Implemented extends /*elided*/ any & {
|
|
153
|
+
new (...args: any[]): {
|
|
154
|
+
readonly _id: Uuid;
|
|
155
|
+
props: Readonly<Props>;
|
|
156
|
+
getSnapshot(): Snapshot;
|
|
157
|
+
getPrimitive(): Primitive;
|
|
158
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
159
|
+
readonly id: Uuid;
|
|
160
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
161
|
+
} & Props;
|
|
162
|
+
prototype: {
|
|
163
|
+
readonly _id: Uuid;
|
|
164
|
+
props: Readonly<Props>;
|
|
165
|
+
getSnapshot(): Snapshot;
|
|
166
|
+
getPrimitive(): Primitive;
|
|
167
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
168
|
+
readonly id: Uuid;
|
|
169
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
170
|
+
} & Props;
|
|
171
|
+
} & ((abstract new (...args: any[]) => {
|
|
172
|
+
readonly _id: Uuid;
|
|
173
|
+
props: Readonly<Props>;
|
|
174
|
+
getSnapshot(): Snapshot;
|
|
175
|
+
getPrimitive(): Primitive;
|
|
176
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
177
|
+
readonly id: Uuid;
|
|
178
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
179
|
+
}) & {
|
|
180
|
+
conditions: {
|
|
181
|
+
build: z.ZodType<Props, z.ZodTypeDef, {
|
|
182
|
+
id: string;
|
|
183
|
+
name: string;
|
|
184
|
+
age: number;
|
|
185
|
+
}>;
|
|
186
|
+
rebuild: z.ZodType<Props, z.ZodTypeDef, Snapshot>;
|
|
187
|
+
};
|
|
188
|
+
builder?(value: Props): AggregateRootBase<Uuid, Props, Primitive, Snapshot>;
|
|
189
|
+
rebuilder?(value: Props): AggregateRootBase<Uuid, Props, Primitive, Snapshot>;
|
|
190
|
+
migrate?(memento: Memento): Snapshot;
|
|
191
|
+
SECURITY_TOKEN: string;
|
|
192
|
+
PROPS_VERSION: number;
|
|
193
|
+
NAME: string;
|
|
194
|
+
}) & typeof Definition>(this: Implemented): z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodType<Memento, z.ZodTypeDef, {
|
|
195
|
+
aggregate: string;
|
|
196
|
+
modelVersion: number;
|
|
197
|
+
dataVersion: number;
|
|
198
|
+
state: Record<string, any>;
|
|
199
|
+
date: string;
|
|
200
|
+
hash: string;
|
|
201
|
+
}>, Snapshot, {
|
|
202
|
+
aggregate: string;
|
|
203
|
+
modelVersion: number;
|
|
204
|
+
dataVersion: number;
|
|
205
|
+
state: Record<string, any>;
|
|
206
|
+
date: string;
|
|
207
|
+
hash: string;
|
|
208
|
+
}>, z.ZodType<Props, z.ZodTypeDef, Snapshot>>, InstanceType<Implemented>, {
|
|
209
|
+
aggregate: string;
|
|
210
|
+
modelVersion: number;
|
|
211
|
+
dataVersion: number;
|
|
212
|
+
state: Record<string, any>;
|
|
213
|
+
date: string;
|
|
214
|
+
hash: string;
|
|
215
|
+
}>;
|
|
216
|
+
create<Implemented extends /*elided*/ any & {
|
|
217
|
+
new (...args: any[]): {
|
|
218
|
+
readonly _id: Uuid;
|
|
219
|
+
props: Readonly<Props>;
|
|
220
|
+
getSnapshot(): Snapshot;
|
|
221
|
+
getPrimitive(): Primitive;
|
|
222
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
223
|
+
readonly id: Uuid;
|
|
224
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
225
|
+
} & Props;
|
|
226
|
+
prototype: {
|
|
227
|
+
readonly _id: Uuid;
|
|
228
|
+
props: Readonly<Props>;
|
|
229
|
+
getSnapshot(): Snapshot;
|
|
230
|
+
getPrimitive(): Primitive;
|
|
231
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
232
|
+
readonly id: Uuid;
|
|
233
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
234
|
+
} & Props;
|
|
235
|
+
} & ((abstract new (...args: any[]) => {
|
|
236
|
+
readonly _id: Uuid;
|
|
237
|
+
props: Readonly<Props>;
|
|
238
|
+
getSnapshot(): Snapshot;
|
|
239
|
+
getPrimitive(): Primitive;
|
|
240
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
241
|
+
readonly id: Uuid;
|
|
242
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
243
|
+
}) & {
|
|
244
|
+
conditions: {
|
|
245
|
+
build: z.ZodType<Props, z.ZodTypeDef, {
|
|
246
|
+
id: string;
|
|
247
|
+
name: string;
|
|
248
|
+
age: number;
|
|
249
|
+
}>;
|
|
250
|
+
rebuild: z.ZodType<Props, z.ZodTypeDef, Snapshot>;
|
|
251
|
+
};
|
|
252
|
+
builder?(value: Props): AggregateRootBase<Uuid, Props, Primitive, Snapshot>;
|
|
253
|
+
rebuilder?(value: Props): AggregateRootBase<Uuid, Props, Primitive, Snapshot>;
|
|
254
|
+
migrate?(memento: Memento): Snapshot;
|
|
255
|
+
SECURITY_TOKEN: string;
|
|
256
|
+
PROPS_VERSION: number;
|
|
257
|
+
NAME: string;
|
|
258
|
+
}) & typeof Definition>(this: Implemented, payload: {
|
|
259
|
+
id: string;
|
|
260
|
+
name: string;
|
|
261
|
+
age: number;
|
|
262
|
+
}): Validation<Errors, InstanceType<Implemented>>;
|
|
263
|
+
restore<Implemented extends /*elided*/ any & {
|
|
264
|
+
new (...args: any[]): {
|
|
265
|
+
readonly _id: Uuid;
|
|
266
|
+
props: Readonly<Props>;
|
|
267
|
+
getSnapshot(): Snapshot;
|
|
268
|
+
getPrimitive(): Primitive;
|
|
269
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
270
|
+
readonly id: Uuid;
|
|
271
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
272
|
+
} & Props;
|
|
273
|
+
prototype: {
|
|
274
|
+
readonly _id: Uuid;
|
|
275
|
+
props: Readonly<Props>;
|
|
276
|
+
getSnapshot(): Snapshot;
|
|
277
|
+
getPrimitive(): Primitive;
|
|
278
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
279
|
+
readonly id: Uuid;
|
|
280
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
281
|
+
} & Props;
|
|
282
|
+
} & ((abstract new (...args: any[]) => {
|
|
283
|
+
readonly _id: Uuid;
|
|
284
|
+
props: Readonly<Props>;
|
|
285
|
+
getSnapshot(): Snapshot;
|
|
286
|
+
getPrimitive(): Primitive;
|
|
287
|
+
equals<Implemented_1 extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented_1, object?: Implemented_1 | undefined): boolean;
|
|
288
|
+
readonly id: Uuid;
|
|
289
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
290
|
+
}) & {
|
|
291
|
+
conditions: {
|
|
292
|
+
build: z.ZodType<Props, z.ZodTypeDef, {
|
|
293
|
+
id: string;
|
|
294
|
+
name: string;
|
|
295
|
+
age: number;
|
|
296
|
+
}>;
|
|
297
|
+
rebuild: z.ZodType<Props, z.ZodTypeDef, Snapshot>;
|
|
298
|
+
};
|
|
299
|
+
builder?(value: Props): AggregateRootBase<Uuid, Props, Primitive, Snapshot>;
|
|
300
|
+
rebuilder?(value: Props): AggregateRootBase<Uuid, Props, Primitive, Snapshot>;
|
|
301
|
+
migrate?(memento: Memento): Snapshot;
|
|
302
|
+
SECURITY_TOKEN: string;
|
|
303
|
+
PROPS_VERSION: number;
|
|
304
|
+
NAME: string;
|
|
305
|
+
}) & typeof Definition>(this: Implemented, memento: import("../../../aggregate-root").MementoValidationsPayload): Validation<Errors, InstanceType<Implemented>>;
|
|
306
|
+
migrate(memento: Memento): Snapshot;
|
|
307
|
+
builder(props: Props): {
|
|
308
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
309
|
+
takeMemento(): Validation<import("../../../aggregate-root").MementoErrors, Memento>;
|
|
310
|
+
readonly _id: Uuid;
|
|
311
|
+
props: Readonly<Props>;
|
|
312
|
+
getSnapshot(): Snapshot;
|
|
313
|
+
getPrimitive(): Primitive;
|
|
314
|
+
equals<Implemented extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented, object?: Implemented | undefined): boolean;
|
|
315
|
+
readonly id: Uuid;
|
|
316
|
+
};
|
|
317
|
+
rebuilder(props: Props): {
|
|
318
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
319
|
+
takeMemento(): Validation<import("../../../aggregate-root").MementoErrors, Memento>;
|
|
320
|
+
readonly _id: Uuid;
|
|
321
|
+
props: Readonly<Props>;
|
|
322
|
+
getSnapshot(): Snapshot;
|
|
323
|
+
getPrimitive(): Primitive;
|
|
324
|
+
equals<Implemented extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented, object?: Implemented | undefined): boolean;
|
|
325
|
+
readonly id: Uuid;
|
|
326
|
+
};
|
|
327
|
+
SECURITY_TOKEN: string;
|
|
328
|
+
conditions: {
|
|
329
|
+
build: z.ZodType<Props, z.ZodTypeDef, {
|
|
330
|
+
id: string;
|
|
331
|
+
name: string;
|
|
332
|
+
age: number;
|
|
333
|
+
}>;
|
|
334
|
+
rebuild: z.ZodType<Props, z.ZodTypeDef, Snapshot>;
|
|
335
|
+
};
|
|
336
|
+
PROPS_VERSION: number;
|
|
337
|
+
NAME: string;
|
|
338
|
+
}) & {
|
|
339
|
+
new (...args: any[]): {
|
|
340
|
+
readonly _id: Uuid;
|
|
341
|
+
props: Readonly<Props>;
|
|
342
|
+
getSnapshot(): Snapshot;
|
|
343
|
+
getPrimitive(): Primitive;
|
|
344
|
+
equals<Implemented extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented, object?: Implemented | undefined): boolean;
|
|
345
|
+
readonly id: Uuid;
|
|
346
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
347
|
+
} & Props;
|
|
348
|
+
prototype: {
|
|
349
|
+
readonly _id: Uuid;
|
|
350
|
+
props: Readonly<Props>;
|
|
351
|
+
getSnapshot(): Snapshot;
|
|
352
|
+
getPrimitive(): Primitive;
|
|
353
|
+
equals<Implemented extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented, object?: Implemented | undefined): boolean;
|
|
354
|
+
readonly id: Uuid;
|
|
355
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
356
|
+
} & Props;
|
|
357
|
+
} & ((abstract new (...args: any[]) => {
|
|
358
|
+
readonly _id: Uuid;
|
|
359
|
+
props: Readonly<Props>;
|
|
360
|
+
getSnapshot(): Snapshot;
|
|
361
|
+
getPrimitive(): Primitive;
|
|
362
|
+
equals<Implemented extends AggregateRootBase<Uuid, Props, Primitive, Snapshot>>(this: Implemented, object?: Implemented | undefined): boolean;
|
|
363
|
+
readonly id: Uuid;
|
|
364
|
+
clone(changes: Partial<Props>): /*elided*/ any;
|
|
365
|
+
}) & {
|
|
366
|
+
conditions: {
|
|
367
|
+
build: z.ZodType<Props, z.ZodTypeDef, {
|
|
368
|
+
id: string;
|
|
369
|
+
name: string;
|
|
370
|
+
age: number;
|
|
371
|
+
}>;
|
|
372
|
+
rebuild: z.ZodType<Props, z.ZodTypeDef, Snapshot>;
|
|
373
|
+
};
|
|
374
|
+
builder?(value: Props): AggregateRootBase<Uuid, Props, Primitive, Snapshot>;
|
|
375
|
+
rebuilder?(value: Props): AggregateRootBase<Uuid, Props, Primitive, Snapshot>;
|
|
376
|
+
migrate?(memento: Memento): Snapshot;
|
|
377
|
+
SECURITY_TOKEN: string;
|
|
378
|
+
PROPS_VERSION: number;
|
|
379
|
+
NAME: string;
|
|
380
|
+
}) & typeof Definition;
|
|
381
|
+
/**
|
|
382
|
+
* Agregado
|
|
383
|
+
*/
|
|
384
|
+
declare class User extends User_base {
|
|
385
|
+
}
|
|
386
|
+
export { User };
|
|
387
|
+
export { Errors as UserErrors };
|
|
388
|
+
export { Payload as UserPayload };
|
|
389
|
+
export { Primitive as UserPrimitive };
|
|
390
|
+
//# sourceMappingURL=aggregate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../../../src/test/execute-sequentially/artifacts/aggregate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,iBAAiB,EAGjB,OAAO,EAER,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AAGxB;;GAEG;AAGH,UAAU,KAAK;IACb,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACjB;AAGD,UAAU,SAAS;IACjB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,aAAa,CAAC;CACnB;AAGD,UAAU,QAAQ;IAChB,IAAI,EAAE,kBAAkB,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,WAAW,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAaD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAqB,CAAC;AAGtC,KAAK,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;AAGhD,KAAK,MAAM,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;AAGnD;;GAEG;AACH,cACM,UAAW,SAAQ,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC;IAC1E;;OAEG;IACH,gBAAuB,aAAa,KAAK;IACzC,gBAAuB,cAAc,0CAA0C;IAC/E,gBAAuB,IAAI,UAAU;IACrC,gBAAuB,UAAU,EAAE;QACjC,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAC7C,OAAO,EAAE,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;KACjD,CAAc;IACf;;OAEG;gBACgB,KAAK,EAAE,KAAK;IAG/B;;;OAGG;IACI,WAAW,IAAI,QAAQ;IAQ9B;;;OAGG;IACI,YAAY,IAAI,SAAS;CAOjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGD;;GAEG;AACH,cAKM,IAAK,SAAQ,SAQN;CAAG;AAGhB,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,CAAC;AAClC,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.User = void 0;
|
|
13
|
+
const aggregate_root_1 = require("../../../aggregate-root");
|
|
14
|
+
const entity_1 = require("../../../entity");
|
|
15
|
+
const ultra_v8n_1 = require("@imolko/ultra-v8n");
|
|
16
|
+
const value_object_1 = require("./value-object");
|
|
17
|
+
const helpers_1 = require("../../../helpers");
|
|
18
|
+
// ------------------------------------------------------------------------------
|
|
19
|
+
// conditions.ts
|
|
20
|
+
/**
|
|
21
|
+
* Condiciones o reglas del artefacto
|
|
22
|
+
*/
|
|
23
|
+
const base = ultra_v8n_1.z.object({
|
|
24
|
+
id: entity_1.Uuid.rules(),
|
|
25
|
+
name: value_object_1.InvoiceName.rules(),
|
|
26
|
+
age: ultra_v8n_1.z.number().min(18),
|
|
27
|
+
});
|
|
28
|
+
const build = base.transform(helpers_1.setVersionOne);
|
|
29
|
+
const rebuild = base.extend({ version: ultra_v8n_1.z.number().min(1) });
|
|
30
|
+
const conditions = { build, rebuild };
|
|
31
|
+
// ------------------------------------------------------------------------------
|
|
32
|
+
// definition.ts
|
|
33
|
+
/**
|
|
34
|
+
* Definicion del agregado
|
|
35
|
+
*/
|
|
36
|
+
let Definition = class Definition extends aggregate_root_1.AggregateRootBase {
|
|
37
|
+
/**
|
|
38
|
+
* Constructor
|
|
39
|
+
*/
|
|
40
|
+
constructor(props) {
|
|
41
|
+
super(props);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Devuelve las propiedades serializadas para guardar en base de datos
|
|
45
|
+
* @returns {Snapshot}
|
|
46
|
+
*/
|
|
47
|
+
getSnapshot() {
|
|
48
|
+
return {
|
|
49
|
+
name: this.props.name.getPayload(),
|
|
50
|
+
age: this.props.age,
|
|
51
|
+
id: this.props.id.getPayload(),
|
|
52
|
+
version: this.props.version,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Devuelve las propiedades serializadas para exponer en la aplicacion
|
|
57
|
+
* @returns {Primitive}
|
|
58
|
+
*/
|
|
59
|
+
getPrimitive() {
|
|
60
|
+
return {
|
|
61
|
+
name: this.props.name.getPrimitive(),
|
|
62
|
+
age: this.props.age,
|
|
63
|
+
id: this.props.id.getPrimitive(),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Propiedades estáticas
|
|
69
|
+
*/
|
|
70
|
+
Definition.PROPS_VERSION = 1;
|
|
71
|
+
Definition.SECURITY_TOKEN = "77a6b182-868f-477a-8ad8-560b9f8de831";
|
|
72
|
+
Definition.NAME = "user";
|
|
73
|
+
Definition.conditions = conditions;
|
|
74
|
+
Definition = __decorate([
|
|
75
|
+
(0, aggregate_root_1.isAggregateComplete)(),
|
|
76
|
+
__metadata("design:paramtypes", [Object])
|
|
77
|
+
], Definition);
|
|
78
|
+
// ------------------------------------------------------------------------------
|
|
79
|
+
// aggregate.ts
|
|
80
|
+
/**
|
|
81
|
+
* Agregado
|
|
82
|
+
*/
|
|
83
|
+
let User = class User extends (0, aggregate_root_1.AggregateWithPublicApi)(Definition) {
|
|
84
|
+
};
|
|
85
|
+
exports.User = User;
|
|
86
|
+
exports.User = User = __decorate([
|
|
87
|
+
(0, aggregate_root_1.RegisterAggregate)({
|
|
88
|
+
description: "Agregado Tenant encargado de manejar todas las tareas que ejecuta este contexto",
|
|
89
|
+
domain: "ultra-ddd",
|
|
90
|
+
})
|
|
91
|
+
], User);
|
|
92
|
+
//# sourceMappingURL=aggregate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregate.js","sourceRoot":"","sources":["../../../../src/test/execute-sequentially/artifacts/aggregate.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4DAMiC;AACjC,4CAAmE;AACnE,iDAA+E;AAC/E,iDAKwB;AACxB,8CAAiD;AA4BjD,iFAAiF;AACjF,gBAAgB;AAChB;;GAEG;AACH,MAAM,IAAI,GAAG,aAAC,CAAC,MAAM,CAAC;IACpB,EAAE,EAAE,aAAI,CAAC,KAAK,EAAE;IAChB,IAAI,EAAE,0BAAW,CAAC,KAAK,EAAE;IACzB,GAAG,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;CACxB,CAAC,CAAC;AACH,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,uBAAa,CAAC,CAAC;AAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAC5D,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAOtC,iFAAiF;AACjF,gBAAgB;AAChB;;GAEG;AACH,IACM,UAAU,GADhB,MACM,UAAW,SAAQ,kCAAmD;IAW1E;;OAEG;IACH,YAAmB,KAAY;QAC7B,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IACD;;;OAGG;IACI,WAAW;QAChB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE;YAClC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;YACnB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE;YAC9B,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO;SAC5B,CAAA;IACH,CAAC;IACD;;;OAGG;IACI,YAAY;QACjB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE;YACpC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;YACnB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,EAAE;SACjC,CAAC;IACJ,CAAC;;AAtCD;;GAEG;AACoB,wBAAa,GAAG,CAAC,AAAJ,CAAK;AAClB,yBAAc,GAAG,sCAAsC,AAAzC,CAA0C;AACxD,eAAI,GAAG,MAAM,AAAT,CAAU;AACd,qBAAU,GAG7B,UAAU,AAHmB,CAGlB;AAVX,UAAU;IADf,IAAA,oCAAmB,GAAE;;GAChB,UAAU,CAwCf;AACD,iFAAiF;AACjF,eAAe;AACf;;GAEG;AAMH,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,IAAA,uCAAsB,EAQvC,UAAU,CAAC;CAAG,CAAA;AAGP,oBAAI;eAXP,IAAI;IALT,IAAA,kCAAiB,EAAC;QACjB,WAAW,EACT,iFAAiF;QACnF,MAAM,EAAE,WAAW;KACpB,CAAC;GACI,IAAI,CAQM"}
|