@collctiv/l2s-models 1.0.94 → 1.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/events/notifications.d.ts +30 -18
- package/dist/events/notifications.d.ts.map +1 -1
- package/dist/events/notifications.js +59 -28
- package/dist/global/decorators.d.ts +2 -0
- package/dist/global/decorators.d.ts.map +1 -1
- package/dist/global/decorators.js +5 -0
- package/dist/global/interfaces.d.ts +3 -0
- package/dist/global/interfaces.d.ts.map +1 -1
- package/dist/global/types.d.ts +8 -0
- package/dist/global/types.d.ts.map +1 -1
- package/dist/global/types.js +7 -0
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { IEvent } from "../global/interfaces.js";
|
|
2
|
-
import type
|
|
1
|
+
import type { IEvent, IEventUser } from "../global/interfaces.js";
|
|
2
|
+
import { type Country, type Currency } from "../global/types.js";
|
|
3
3
|
import type { UserStatus } from "../entities/user.js";
|
|
4
4
|
import type { PotCategory } from "../entities/pot.js";
|
|
5
5
|
import { CourierType, type OrderItemType, SupplierType } from "../entities/order.js";
|
|
6
|
-
export declare class
|
|
6
|
+
export declare class NotificationUser implements IEventUser {
|
|
7
|
+
id: string;
|
|
7
8
|
event_date: Date;
|
|
8
9
|
first_name: string;
|
|
9
10
|
last_name: string;
|
|
@@ -12,18 +13,7 @@ export declare class UserCreatedEvent implements IEvent {
|
|
|
12
13
|
country: Country;
|
|
13
14
|
currency: Currency;
|
|
14
15
|
status: UserStatus;
|
|
15
|
-
constructor(args?: Partial<
|
|
16
|
-
}
|
|
17
|
-
export declare class UserUpdatedEvent implements IEvent {
|
|
18
|
-
event_date: Date;
|
|
19
|
-
first_name: string;
|
|
20
|
-
last_name: string;
|
|
21
|
-
full_name: string;
|
|
22
|
-
email: string;
|
|
23
|
-
country: Country;
|
|
24
|
-
currency: Currency;
|
|
25
|
-
status: UserStatus;
|
|
26
|
-
constructor(args?: Partial<UserUpdatedEvent>);
|
|
16
|
+
constructor(args?: Partial<NotificationUser>);
|
|
27
17
|
}
|
|
28
18
|
export declare class EmailVerificationRequestEvent implements IEvent {
|
|
29
19
|
event_date: Date;
|
|
@@ -77,12 +67,34 @@ export declare class OrderPlacedEvent implements IEvent {
|
|
|
77
67
|
shipping_type: string;
|
|
78
68
|
shipping_email: string;
|
|
79
69
|
shipping_name: string;
|
|
80
|
-
recipient_type: "self" | "recipient";
|
|
81
70
|
counts: Record<OrderItemType, number>;
|
|
82
|
-
|
|
71
|
+
items: OrderPlacedEventItem[];
|
|
83
72
|
constructor(args?: Partial<OrderPlacedEvent>);
|
|
84
73
|
}
|
|
85
|
-
export type
|
|
74
|
+
export type OrderPlacedEventItem = {
|
|
75
|
+
product_name: string;
|
|
76
|
+
product_description: string;
|
|
77
|
+
product_image: string;
|
|
78
|
+
type: OrderItemType;
|
|
79
|
+
amount: number;
|
|
80
|
+
quantity: number;
|
|
81
|
+
currency: Currency;
|
|
82
|
+
};
|
|
83
|
+
export declare class OrderDeliveredEvent implements IEvent {
|
|
84
|
+
event_date: Date;
|
|
85
|
+
order_no: string;
|
|
86
|
+
sub_total: number;
|
|
87
|
+
tax: number;
|
|
88
|
+
shipping: number;
|
|
89
|
+
grand_total: number;
|
|
90
|
+
shipping_type: string;
|
|
91
|
+
shipping_email: string;
|
|
92
|
+
shipping_name: string;
|
|
93
|
+
counts: Record<OrderItemType, number>;
|
|
94
|
+
delivery: OrderDeliveredEventDelivery[];
|
|
95
|
+
constructor(args?: Partial<OrderDeliveredEvent>);
|
|
96
|
+
}
|
|
97
|
+
export type OrderDeliveredEventDelivery = {
|
|
86
98
|
supplier: SupplierType;
|
|
87
99
|
courier: CourierType;
|
|
88
100
|
product_name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../events/notifications.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
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,CAAA"}
|
|
@@ -7,9 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { Notification } from "../global/decorators.js";
|
|
10
|
+
import { Notification, EventUserAttribute } from "../global/decorators.js";
|
|
11
|
+
import { Type } from "../global/types.js";
|
|
11
12
|
import { CourierType, SupplierType } from "../entities/order.js";
|
|
12
|
-
|
|
13
|
+
export class NotificationUser {
|
|
14
|
+
id;
|
|
13
15
|
event_date;
|
|
14
16
|
first_name;
|
|
15
17
|
last_name;
|
|
@@ -21,30 +23,39 @@ let UserCreatedEvent = class UserCreatedEvent {
|
|
|
21
23
|
constructor(args = {}) {
|
|
22
24
|
Object.assign(this, args);
|
|
23
25
|
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
__metadata("design:
|
|
28
|
-
],
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
26
|
+
}
|
|
27
|
+
__decorate([
|
|
28
|
+
EventUserAttribute(Type.Date),
|
|
29
|
+
__metadata("design:type", Date)
|
|
30
|
+
], NotificationUser.prototype, "event_date", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
EventUserAttribute(Type.String),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], NotificationUser.prototype, "first_name", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
EventUserAttribute(Type.String),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], NotificationUser.prototype, "last_name", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
EventUserAttribute(Type.String),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], NotificationUser.prototype, "full_name", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
EventUserAttribute(Type.String),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], NotificationUser.prototype, "email", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
EventUserAttribute(Type.Enum),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], NotificationUser.prototype, "country", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
EventUserAttribute(Type.Enum),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], NotificationUser.prototype, "currency", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
EventUserAttribute(Type.Enum),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], NotificationUser.prototype, "status", void 0);
|
|
48
59
|
let EmailVerificationRequestEvent = class EmailVerificationRequestEvent {
|
|
49
60
|
event_date;
|
|
50
61
|
verify_url;
|
|
@@ -139,9 +150,8 @@ let OrderPlacedEvent = class OrderPlacedEvent {
|
|
|
139
150
|
shipping_type;
|
|
140
151
|
shipping_email;
|
|
141
152
|
shipping_name;
|
|
142
|
-
recipient_type;
|
|
143
153
|
counts;
|
|
144
|
-
|
|
154
|
+
items = [];
|
|
145
155
|
constructor(args = {}) {
|
|
146
156
|
Object.assign(this, args);
|
|
147
157
|
}
|
|
@@ -151,3 +161,24 @@ OrderPlacedEvent = __decorate([
|
|
|
151
161
|
__metadata("design:paramtypes", [Object])
|
|
152
162
|
], OrderPlacedEvent);
|
|
153
163
|
export { OrderPlacedEvent };
|
|
164
|
+
let OrderDeliveredEvent = class OrderDeliveredEvent {
|
|
165
|
+
event_date;
|
|
166
|
+
order_no;
|
|
167
|
+
sub_total;
|
|
168
|
+
tax;
|
|
169
|
+
shipping;
|
|
170
|
+
grand_total;
|
|
171
|
+
shipping_type;
|
|
172
|
+
shipping_email;
|
|
173
|
+
shipping_name;
|
|
174
|
+
counts;
|
|
175
|
+
delivery = [];
|
|
176
|
+
constructor(args = {}) {
|
|
177
|
+
Object.assign(this, args);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
OrderDeliveredEvent = __decorate([
|
|
181
|
+
Notification("order_delivered"),
|
|
182
|
+
__metadata("design:paramtypes", [Object])
|
|
183
|
+
], OrderDeliveredEvent);
|
|
184
|
+
export { OrderDeliveredEvent };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
|
+
import { type Type } from "./types.js";
|
|
2
3
|
export declare const Collection: (value: string) => (target: any) => void;
|
|
3
4
|
export declare const Topic: (value: string) => (target: any) => void;
|
|
4
5
|
export declare const TransactionId: (property: string) => (target: any) => void;
|
|
5
6
|
export declare const Notification: (property: string) => (target: any) => void;
|
|
7
|
+
export declare const EventUserAttribute: (datatype: Type) => (target: any, propertyKey: string) => void;
|
|
6
8
|
export declare const NotCreatable: () => (target: any, propertyKey: string) => void;
|
|
7
9
|
export declare const Immutable: () => (target: any, propertyKey: string) => void;
|
|
8
10
|
export declare const NotQueryable: () => (target: any, propertyKey: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../global/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../global/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAmB,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAExD,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,MAC5B,QAAQ,GAAG,SAOtB,CAAA;AAED,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,MACvB,QAAQ,GAAG,SAOtB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,MAClC,QAAQ,GAAG,SAOtB,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,MACjC,QAAQ,GAAG,SAOtB,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,UAAU,IAAI,MACrC,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,YAAY,SACb,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,SAAS,SACV,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,YAAY,SACb,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,SAAS,SACV,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,GAAG,EAAE,MAAM,UAAS,CAAC,MAChD,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,GAAG,EAAE,MAAM,UAAS,CAAC,MACrD,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,OAAO,GAAI,UAAU,UAAS,GAAG,EAAE,eAAe,GAAG,MACtD,QAAQ,GAAG,SAGtB,CAAA;AAED,eAAO,MAAM,SAAS,SACV,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA;AAED,eAAO,MAAM,QAAQ,SACT,QAAQ,GAAG,EAAE,aAAa,MAAM,SAQ3C,CAAA"}
|
|
@@ -20,6 +20,11 @@ export const Notification = (property) => {
|
|
|
20
20
|
Reflect.defineMetadata(`Notification`, property, target);
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
+
export const EventUserAttribute = (datatype) => {
|
|
24
|
+
return (target, propertyKey) => {
|
|
25
|
+
Reflect.defineMetadata(`EventUserAttribute`, datatype, target, propertyKey);
|
|
26
|
+
};
|
|
27
|
+
};
|
|
23
28
|
export const NotCreatable = () => {
|
|
24
29
|
return (target, propertyKey) => {
|
|
25
30
|
Reflect.defineMetadata(`NotCreatable`, true, target, propertyKey);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../global/interfaces.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACvB,WAAW,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IACxB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IACxB,WAAW,EAAE,IAAI,CAAC;IAClB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IACxB,QAAQ,EAAE,GAAG,CAAC;CACjB;AAED,MAAM,WAAW,MAAM;IACnB,UAAU,EAAE,IAAI,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../global/interfaces.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACvB,WAAW,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IACxB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IACxB,WAAW,EAAE,IAAI,CAAC;IAClB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IACxB,QAAQ,EAAE,GAAG,CAAC;CACjB;AAED,MAAM,WAAW,MAAM;IACnB,UAAU,EAAE,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;CACd"}
|
package/dist/global/types.d.ts
CHANGED
|
@@ -6,4 +6,12 @@ export type Money = {
|
|
|
6
6
|
};
|
|
7
7
|
export declare const registerSubType: (baseType: new () => any, discriminator: any, subType: new () => any) => void;
|
|
8
8
|
export declare const resolveSubType: (baseType: new () => any, discriminatorValue: any) => new () => any | null;
|
|
9
|
+
export declare const Type: {
|
|
10
|
+
readonly Date: "date";
|
|
11
|
+
readonly String: "string";
|
|
12
|
+
readonly Number: "number";
|
|
13
|
+
readonly Boolean: "boolean";
|
|
14
|
+
readonly Enum: "enum";
|
|
15
|
+
};
|
|
16
|
+
export type Type = (typeof Type)[keyof typeof Type];
|
|
9
17
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../global/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC;AAE7B,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC;AAE3B,MAAM,MAAM,KAAK,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAInD,eAAO,MAAM,eAAe,GAAI,UAAU,UAAS,GAAG,EAAE,eAAe,GAAG,EAAE,SAAS,UAAS,GAAG,SAKhG,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,UAAU,UAAS,GAAG,EAAE,oBAAoB,GAAG,KAAG,UAAS,GAAG,GAAG,IAE/F,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../global/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC;AAE7B,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC;AAE3B,MAAM,MAAM,KAAK,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAInD,eAAO,MAAM,eAAe,GAAI,UAAU,UAAS,GAAG,EAAE,eAAe,GAAG,EAAE,SAAS,UAAS,GAAG,SAKhG,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,UAAU,UAAS,GAAG,EAAE,oBAAoB,GAAG,KAAG,UAAS,GAAG,GAAG,IAE/F,CAAA;AAED,eAAO,MAAM,IAAI;;;;;;CAMP,CAAC;AAEX,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,OAAO,IAAI,CAAC,CAAC"}
|
package/dist/global/types.js
CHANGED
|
@@ -8,3 +8,10 @@ export const registerSubType = (baseType, discriminator, subType) => {
|
|
|
8
8
|
export const resolveSubType = (baseType, discriminatorValue) => {
|
|
9
9
|
return typeRegistry.get(baseType)?.get(discriminatorValue) ?? null;
|
|
10
10
|
};
|
|
11
|
+
export const Type = {
|
|
12
|
+
Date: "date",
|
|
13
|
+
String: "string",
|
|
14
|
+
Number: "number",
|
|
15
|
+
Boolean: "boolean",
|
|
16
|
+
Enum: "enum"
|
|
17
|
+
};
|