File tree Expand file tree Collapse file tree
examples_new/microservices/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- export declare enum Events {
1+ export declare enum EventTypes {
22 USER_CREATED = "USER_CREATED" ,
33 ITEM_CREATED = "ITEM_CREATED" ,
4- ORDER_CREATED = "ORDER_CREATED"
4+ ITEM_UPDATED = "ITEM_UPDATED" ,
5+ ITEM_DELETED = "ITEM_DELETED" ,
6+ INVENTORY_CREATED = "INVENTORY_CREATED" ,
7+ INVENTORY_UPDATED = "INVENTORY_UPDATED" ,
8+ INVENTORY_DELETED = "INVENTORY_DELETED" ,
9+ ORDER_CREATED = "ORDER_CREATED" ,
10+ ORDER_DELETED = "ORDER_DELETED"
511}
12+ export type Events = {
13+ type : EventTypes . USER_CREATED ;
14+ payload : {
15+ id : string ;
16+ username : string ;
17+ } ;
18+ } | {
19+ type : EventTypes . ITEM_CREATED ;
20+ payload : {
21+ id : string ;
22+ itemName : string ;
23+ sellerId : string ;
24+ unitPrice : number ;
25+ } ;
26+ } | {
27+ type : EventTypes . ITEM_UPDATED ;
28+ payload : {
29+ id : string ;
30+ itemName : string ;
31+ sellerId : string ;
32+ unitPrice : number ;
33+ } ;
34+ } | {
35+ type : EventTypes . ITEM_DELETED ;
36+ payload : {
37+ id : string ;
38+ } ;
39+ } | {
40+ type : EventTypes . INVENTORY_CREATED ;
41+ payload : {
42+ id : string ;
43+ itemId : string ;
44+ itemName : string ;
45+ sellerId : string ;
46+ unitPrice : number ;
47+ units : number ;
48+ } ;
49+ } | {
50+ type : EventTypes . INVENTORY_UPDATED ;
51+ payload : {
52+ id : string ;
53+ itemId : string ;
54+ itemName : string ;
55+ sellerId : string ;
56+ unitPrice : number ;
57+ units : number ;
58+ } ;
59+ } | {
60+ type : EventTypes . INVENTORY_DELETED ;
61+ payload : {
62+ itemId : string ;
63+ } ;
64+ } | {
65+ type : EventTypes . ORDER_CREATED ;
66+ payload : {
67+ itemId : string ;
68+ amount : number ;
69+ } ;
70+ } | {
71+ type : EventTypes . ORDER_DELETED ;
72+ payload : {
73+ itemId : string ;
74+ amount : number ;
75+ } ;
76+ } ;
Original file line number Diff line number Diff line change 11"use strict" ;
22Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
3- exports . Events = void 0 ;
4- var Events ;
5- ( function ( Events ) {
6- Events [ "USER_CREATED" ] = "USER_CREATED" ;
7- Events [ "ITEM_CREATED" ] = "ITEM_CREATED" ;
8- Events [ "ORDER_CREATED" ] = "ORDER_CREATED" ;
9- } ) ( Events = exports . Events || ( exports . Events = { } ) ) ;
3+ exports . EventTypes = void 0 ;
4+ var EventTypes ;
5+ ( function ( EventTypes ) {
6+ EventTypes [ "USER_CREATED" ] = "USER_CREATED" ;
7+ EventTypes [ "ITEM_CREATED" ] = "ITEM_CREATED" ;
8+ EventTypes [ "ITEM_UPDATED" ] = "ITEM_UPDATED" ;
9+ EventTypes [ "ITEM_DELETED" ] = "ITEM_DELETED" ;
10+ EventTypes [ "INVENTORY_CREATED" ] = "INVENTORY_CREATED" ;
11+ EventTypes [ "INVENTORY_UPDATED" ] = "INVENTORY_UPDATED" ;
12+ EventTypes [ "INVENTORY_DELETED" ] = "INVENTORY_DELETED" ;
13+ EventTypes [ "ORDER_CREATED" ] = "ORDER_CREATED" ;
14+ EventTypes [ "ORDER_DELETED" ] = "ORDER_DELETED" ;
15+ } ) ( EventTypes = exports . EventTypes || ( exports . EventTypes = { } ) ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @chronosrx/common" ,
3- "version" : " 1.0.2 " ,
3+ "version" : " 1.0.3 " ,
44 "description" : " Common modules for Chronos Microservice" ,
55 "main" : " ./build/index.js" ,
66 "types" : " ./build/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments