@zeeshan60/event-processor 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,41 @@
1
+ import { Event } from './common/Event';
2
+ import { Model } from './common/Model';
3
+ export declare enum SourceType {
4
+ Transaction = "Transaction",
5
+ User = "User",
6
+ Friend = "Friend"
7
+ }
8
+ export interface ActivityLogModel extends Model {
9
+ activityByUid: string;
10
+ sourceStreamId: string;
11
+ sourceType: SourceType;
12
+ logMessage: string;
13
+ date: Date;
14
+ }
15
+ export interface ActivityLogCreatedProps {
16
+ userId: string;
17
+ activityByUid: string;
18
+ sourceStreamId: string;
19
+ sourceType: SourceType;
20
+ logMessage: string;
21
+ date: Date;
22
+ createdAt: Date;
23
+ createdBy: string;
24
+ streamId: string;
25
+ version: number;
26
+ }
27
+ export declare class ActivityLogCreated implements Event {
28
+ userId: string;
29
+ activityByUid: string;
30
+ sourceStreamId: string;
31
+ sourceType: SourceType;
32
+ logMessage: string;
33
+ date: Date;
34
+ createdAt: Date;
35
+ createdBy: string;
36
+ streamId: string;
37
+ version: number;
38
+ constructor(props: ActivityLogCreatedProps);
39
+ apply(_existing?: Model): ActivityLogModel;
40
+ }
41
+ //# sourceMappingURL=ActivityLogEvents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityLogEvents.d.ts","sourceRoot":"","sources":["../src/ActivityLogEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,oBAAY,UAAU;IACpB,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,gBAAiB,SAAQ,KAAK;IAC7C,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,kBAAmB,YAAW,KAAK;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;gBAEX,KAAK,EAAE,uBAAuB;IAa1C,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,GAAG,gBAAgB;CAa3C"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActivityLogCreated = exports.SourceType = void 0;
4
+ var SourceType;
5
+ (function (SourceType) {
6
+ SourceType["Transaction"] = "Transaction";
7
+ SourceType["User"] = "User";
8
+ SourceType["Friend"] = "Friend";
9
+ })(SourceType || (exports.SourceType = SourceType = {}));
10
+ class ActivityLogCreated {
11
+ constructor(props) {
12
+ this.userId = props.userId;
13
+ this.activityByUid = props.activityByUid;
14
+ this.sourceStreamId = props.sourceStreamId;
15
+ this.sourceType = props.sourceType;
16
+ this.logMessage = props.logMessage;
17
+ this.date = props.date;
18
+ this.createdAt = props.createdAt;
19
+ this.createdBy = props.createdBy;
20
+ this.streamId = props.streamId;
21
+ this.version = props.version;
22
+ }
23
+ apply(_existing) {
24
+ return {
25
+ streamId: this.streamId,
26
+ userId: this.userId,
27
+ activityByUid: this.activityByUid,
28
+ sourceStreamId: this.sourceStreamId,
29
+ sourceType: this.sourceType,
30
+ logMessage: this.logMessage,
31
+ date: this.date,
32
+ deleted: false,
33
+ version: this.version,
34
+ };
35
+ }
36
+ }
37
+ exports.ActivityLogCreated = ActivityLogCreated;
@@ -0,0 +1,122 @@
1
+ import { Event } from './common/Event';
2
+ import { Model } from './common/Model';
3
+ import { ActivityLogCreatedProps } from './ActivityLogEvents';
4
+ export declare enum FriendEventType {
5
+ FRIEND_CREATED = "FRIEND_CREATED",
6
+ FRIEND_UPDATED = "FRIEND_UPDATED",
7
+ FRIEND_DELETED = "FRIEND_DELETED",
8
+ FRIEND_ID_ADDED = "FRIEND_ID_ADDED",
9
+ FRIEND_ID_REMOVED = "FRIEND_ID_REMOVED"
10
+ }
11
+ export interface FriendModel extends Model {
12
+ friendId?: string;
13
+ friendEmail?: string;
14
+ friendPhoneNumber?: string;
15
+ groupId?: string;
16
+ friendDisplayName: string;
17
+ createdAt: Date;
18
+ updatedAt: Date;
19
+ }
20
+ export interface FriendCreatedProps {
21
+ userId: string;
22
+ friendEmail?: string;
23
+ friendPhoneNumber?: string;
24
+ friendDisplayName: string;
25
+ friendId?: string;
26
+ groupId?: string;
27
+ createdAt: Date;
28
+ createdBy: string;
29
+ streamId: string;
30
+ version: number;
31
+ }
32
+ export declare class FriendCreated implements Event {
33
+ userId: string;
34
+ friendEmail?: string;
35
+ friendPhoneNumber?: string;
36
+ friendDisplayName: string;
37
+ friendId?: string;
38
+ groupId?: string;
39
+ createdAt: Date;
40
+ createdBy: string;
41
+ streamId: string;
42
+ version: number;
43
+ constructor(props: FriendCreatedProps);
44
+ apply(_existing?: Model): FriendModel;
45
+ activityLog(_existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
46
+ }
47
+ export interface FriendUpdatedProps {
48
+ userId?: string;
49
+ friendEmail?: string;
50
+ friendPhoneNumber?: string;
51
+ friendDisplayName?: string;
52
+ createdAt: Date;
53
+ createdBy: string;
54
+ streamId: string;
55
+ version: number;
56
+ }
57
+ export declare class FriendUpdated implements Event {
58
+ userId?: string;
59
+ friendEmail?: string;
60
+ friendPhoneNumber?: string;
61
+ friendDisplayName?: string;
62
+ createdAt: Date;
63
+ createdBy: string;
64
+ streamId: string;
65
+ version: number;
66
+ constructor(props: FriendUpdatedProps);
67
+ apply(existing?: Model): FriendModel;
68
+ activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
69
+ }
70
+ export interface FriendDeletedProps {
71
+ userId?: string;
72
+ createdAt: Date;
73
+ createdBy: string;
74
+ streamId: string;
75
+ version: number;
76
+ }
77
+ export declare class FriendDeleted implements Event {
78
+ userId?: string;
79
+ createdAt: Date;
80
+ createdBy: string;
81
+ streamId: string;
82
+ version: number;
83
+ constructor(props: FriendDeletedProps);
84
+ apply(existing?: Model): FriendModel;
85
+ activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
86
+ }
87
+ export interface FriendIdAddedProps {
88
+ userId?: string;
89
+ friendId: string;
90
+ createdAt: Date;
91
+ createdBy: string;
92
+ streamId: string;
93
+ version: number;
94
+ }
95
+ export declare class FriendIdAdded implements Event {
96
+ userId?: string;
97
+ friendId: string;
98
+ createdAt: Date;
99
+ createdBy: string;
100
+ streamId: string;
101
+ version: number;
102
+ constructor(props: FriendIdAddedProps);
103
+ apply(existing?: Model): FriendModel;
104
+ activityLog(existing?: Model, _actorName?: string): ActivityLogCreatedProps | undefined;
105
+ }
106
+ export interface FriendIdRemovedProps {
107
+ userId?: string;
108
+ createdAt: Date;
109
+ createdBy: string;
110
+ streamId: string;
111
+ version: number;
112
+ }
113
+ export declare class FriendIdRemoved implements Event {
114
+ userId?: string;
115
+ createdAt: Date;
116
+ createdBy: string;
117
+ streamId: string;
118
+ version: number;
119
+ constructor(props: FriendIdRemovedProps);
120
+ apply(existing?: Model): FriendModel;
121
+ }
122
+ //# sourceMappingURL=FriendEvents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FriendEvents.d.ts","sourceRoot":"","sources":["../src/FriendEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAc,MAAM,qBAAqB,CAAC;AAG1E,oBAAY,eAAe;IACzB,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;CACxC;AAED,MAAM,WAAW,WAAY,SAAQ,KAAK;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,aAAc,YAAW,KAAK;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MA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BxF;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,eAAgB,YAAW,KAAK;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;gBAEX,KAAK,EAAE,oBAAoB;IAQvC,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,WAAW;CAYrC"}
@@ -0,0 +1,213 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FriendIdRemoved = exports.FriendIdAdded = exports.FriendDeleted = exports.FriendUpdated = exports.FriendCreated = exports.FriendEventType = void 0;
4
+ const ActivityLogEvents_1 = require("./ActivityLogEvents");
5
+ const uuid_1 = require("uuid");
6
+ var FriendEventType;
7
+ (function (FriendEventType) {
8
+ FriendEventType["FRIEND_CREATED"] = "FRIEND_CREATED";
9
+ FriendEventType["FRIEND_UPDATED"] = "FRIEND_UPDATED";
10
+ FriendEventType["FRIEND_DELETED"] = "FRIEND_DELETED";
11
+ FriendEventType["FRIEND_ID_ADDED"] = "FRIEND_ID_ADDED";
12
+ FriendEventType["FRIEND_ID_REMOVED"] = "FRIEND_ID_REMOVED";
13
+ })(FriendEventType || (exports.FriendEventType = FriendEventType = {}));
14
+ class FriendCreated {
15
+ constructor(props) {
16
+ this.userId = props.userId;
17
+ this.friendEmail = props.friendEmail;
18
+ this.friendPhoneNumber = props.friendPhoneNumber;
19
+ this.friendDisplayName = props.friendDisplayName;
20
+ this.friendId = props.friendId;
21
+ this.groupId = props.groupId;
22
+ this.createdAt = props.createdAt;
23
+ this.createdBy = props.createdBy;
24
+ this.streamId = props.streamId;
25
+ this.version = props.version;
26
+ }
27
+ apply(_existing) {
28
+ return {
29
+ streamId: this.streamId,
30
+ userId: this.userId,
31
+ friendId: this.friendId,
32
+ friendEmail: this.friendEmail,
33
+ friendPhoneNumber: this.friendPhoneNumber,
34
+ groupId: this.groupId,
35
+ friendDisplayName: this.friendDisplayName,
36
+ createdAt: this.createdAt,
37
+ updatedAt: this.createdAt,
38
+ version: this.version,
39
+ deleted: false,
40
+ };
41
+ }
42
+ activityLog(_existing, actorName) {
43
+ const actor = actorName ?? 'You';
44
+ const logMessage = `${actor} added friend "${this.friendDisplayName}"`;
45
+ return {
46
+ userId: this.userId,
47
+ activityByUid: this.createdBy,
48
+ sourceStreamId: this.streamId,
49
+ sourceType: ActivityLogEvents_1.SourceType.Friend,
50
+ logMessage,
51
+ date: this.createdAt,
52
+ createdAt: this.createdAt,
53
+ createdBy: this.createdBy,
54
+ streamId: (0, uuid_1.v4)(),
55
+ version: 1,
56
+ };
57
+ }
58
+ }
59
+ exports.FriendCreated = FriendCreated;
60
+ class FriendUpdated {
61
+ constructor(props) {
62
+ this.userId = props.userId;
63
+ this.friendEmail = props.friendEmail;
64
+ this.friendPhoneNumber = props.friendPhoneNumber;
65
+ this.friendDisplayName = props.friendDisplayName;
66
+ this.createdAt = props.createdAt;
67
+ this.createdBy = props.createdBy;
68
+ this.streamId = props.streamId;
69
+ this.version = props.version;
70
+ }
71
+ apply(existing) {
72
+ if (!existing) {
73
+ throw new Error('Friend must exist to update');
74
+ }
75
+ const existingFriend = existing;
76
+ return {
77
+ ...existingFriend,
78
+ friendEmail: this.friendEmail ?? existingFriend.friendEmail,
79
+ friendPhoneNumber: this.friendPhoneNumber ?? existingFriend.friendPhoneNumber,
80
+ friendDisplayName: this.friendDisplayName ?? existingFriend.friendDisplayName,
81
+ updatedAt: this.createdAt,
82
+ version: this.version,
83
+ };
84
+ }
85
+ activityLog(existing, actorName) {
86
+ if (!existing) {
87
+ return undefined;
88
+ }
89
+ const existingFriend = existing;
90
+ const actor = actorName ?? 'You';
91
+ const friendName = this.friendDisplayName ?? existingFriend.friendDisplayName;
92
+ const logMessage = `${actor} updated friend "${friendName}"`;
93
+ return {
94
+ userId: existingFriend.userId,
95
+ activityByUid: this.createdBy,
96
+ sourceStreamId: this.streamId,
97
+ sourceType: ActivityLogEvents_1.SourceType.Friend,
98
+ logMessage,
99
+ date: this.createdAt,
100
+ createdAt: this.createdAt,
101
+ createdBy: this.createdBy,
102
+ streamId: (0, uuid_1.v4)(),
103
+ version: 1,
104
+ };
105
+ }
106
+ }
107
+ exports.FriendUpdated = FriendUpdated;
108
+ class FriendDeleted {
109
+ constructor(props) {
110
+ this.userId = props.userId;
111
+ this.createdAt = props.createdAt;
112
+ this.createdBy = props.createdBy;
113
+ this.streamId = props.streamId;
114
+ this.version = props.version;
115
+ }
116
+ apply(existing) {
117
+ if (!existing) {
118
+ throw new Error('Friend must exist to delete');
119
+ }
120
+ const existingFriend = existing;
121
+ return {
122
+ ...existingFriend,
123
+ updatedAt: this.createdAt,
124
+ version: this.version,
125
+ deleted: true,
126
+ };
127
+ }
128
+ activityLog(existing, actorName) {
129
+ if (!existing) {
130
+ return undefined;
131
+ }
132
+ const existingFriend = existing;
133
+ const actor = actorName ?? 'You';
134
+ const logMessage = `${actor} removed friend "${existingFriend.friendDisplayName}"`;
135
+ return {
136
+ userId: existingFriend.userId,
137
+ activityByUid: this.createdBy,
138
+ sourceStreamId: this.streamId,
139
+ sourceType: ActivityLogEvents_1.SourceType.Friend,
140
+ logMessage,
141
+ date: this.createdAt,
142
+ createdAt: this.createdAt,
143
+ createdBy: this.createdBy,
144
+ streamId: (0, uuid_1.v4)(),
145
+ version: 1,
146
+ };
147
+ }
148
+ }
149
+ exports.FriendDeleted = FriendDeleted;
150
+ class FriendIdAdded {
151
+ constructor(props) {
152
+ this.userId = props.userId;
153
+ this.friendId = props.friendId;
154
+ this.createdAt = props.createdAt;
155
+ this.createdBy = props.createdBy;
156
+ this.streamId = props.streamId;
157
+ this.version = props.version;
158
+ }
159
+ apply(existing) {
160
+ if (!existing) {
161
+ throw new Error('Friend must exist to add friend ID');
162
+ }
163
+ const existingFriend = existing;
164
+ return {
165
+ ...existingFriend,
166
+ friendId: this.friendId,
167
+ updatedAt: this.createdAt,
168
+ version: this.version,
169
+ };
170
+ }
171
+ activityLog(existing, _actorName) {
172
+ if (!existing) {
173
+ return undefined;
174
+ }
175
+ const existingFriend = existing;
176
+ const logMessage = `Friend "${existingFriend.friendDisplayName}" was linked to their account`;
177
+ return {
178
+ userId: existingFriend.userId,
179
+ activityByUid: this.createdBy,
180
+ sourceStreamId: this.streamId,
181
+ sourceType: ActivityLogEvents_1.SourceType.Friend,
182
+ logMessage,
183
+ date: this.createdAt,
184
+ createdAt: this.createdAt,
185
+ createdBy: this.createdBy,
186
+ streamId: (0, uuid_1.v4)(),
187
+ version: 1,
188
+ };
189
+ }
190
+ }
191
+ exports.FriendIdAdded = FriendIdAdded;
192
+ class FriendIdRemoved {
193
+ constructor(props) {
194
+ this.userId = props.userId;
195
+ this.createdAt = props.createdAt;
196
+ this.createdBy = props.createdBy;
197
+ this.streamId = props.streamId;
198
+ this.version = props.version;
199
+ }
200
+ apply(existing) {
201
+ if (!existing) {
202
+ throw new Error('Friend must exist to remove friend ID');
203
+ }
204
+ const existingFriend = existing;
205
+ return {
206
+ ...existingFriend,
207
+ friendId: undefined,
208
+ updatedAt: this.createdAt,
209
+ version: this.version,
210
+ };
211
+ }
212
+ }
213
+ exports.FriendIdRemoved = FriendIdRemoved;
@@ -1,10 +1,14 @@
1
1
  import { Event } from './common/Event';
2
2
  import { Model } from './common/Model';
3
+ import { ActivityLogCreatedProps } from './ActivityLogEvents';
3
4
  export declare enum SplitType {
4
- EQUAL = "EQUAL",
5
- EXACT = "EXACT",
6
- PERCENTAGE = "PERCENTAGE",
7
- SHARES = "SHARES"
5
+ YouPaidSplitEqually = "YouPaidSplitEqually",
6
+ TheyPaidSplitEqually = "TheyPaidSplitEqually",
7
+ TheyOweYouAll = "TheyOweYouAll",
8
+ YouOweThemAll = "YouOweThemAll",
9
+ TheyPaidToSettle = "TheyPaidToSettle",
10
+ YouPaidToSettle = "YouPaidToSettle",
11
+ SpecificAmounts = "SpecificAmounts"
8
12
  }
9
13
  export declare enum TransactionEventType {
10
14
  TRANSACTION_CREATED = "TRANSACTION_CREATED",
@@ -12,8 +16,9 @@ export declare enum TransactionEventType {
12
16
  TRANSACTION_DELETED = "TRANSACTION_DELETED"
13
17
  }
14
18
  export interface AmountDto {
15
- value: number;
19
+ amount: number;
16
20
  currency: string;
21
+ isOwed: boolean;
17
22
  }
18
23
  export interface ChangeHistoryBase {
19
24
  type: string;
@@ -59,33 +64,160 @@ export interface TransactionModel extends Model {
59
64
  currency: string;
60
65
  splitType: SplitType;
61
66
  totalAmount: number;
62
- amount: AmountDto | null;
67
+ amount: number;
68
+ isOwed: boolean;
63
69
  transactionDate: Date;
64
70
  createdAt: Date;
65
- updatedAt: Date | null;
71
+ updatedAt: Date;
66
72
  createdBy: string;
67
- updatedBy: string | null;
68
- groupId: string | null;
69
- groupTransactionId: string | null;
73
+ updatedBy: string;
74
+ groupId?: string;
75
+ groupTransactionId?: string;
70
76
  history: ChangeHistory;
71
77
  }
78
+ export interface TransactionCreatedProps {
79
+ userId?: string;
80
+ recipientUserId: string;
81
+ logicalTransactionId: string;
82
+ description: string;
83
+ currency: string;
84
+ splitType: SplitType;
85
+ totalAmount: number;
86
+ amount: number;
87
+ isOwed: boolean;
88
+ transactionDate: Date;
89
+ groupId?: string;
90
+ groupTransactionId?: string;
91
+ createdAt: Date;
92
+ createdBy: string;
93
+ streamId: string;
94
+ version: number;
95
+ }
72
96
  export declare class TransactionCreated implements Event {
73
- userId: string;
97
+ userId?: string;
74
98
  recipientUserId: string;
75
99
  logicalTransactionId: string;
76
100
  description: string;
77
101
  currency: string;
78
102
  splitType: SplitType;
79
103
  totalAmount: number;
80
- amount: AmountDto | null;
104
+ amount: number;
105
+ isOwed: boolean;
106
+ transactionDate: Date;
107
+ groupId?: string;
108
+ groupTransactionId?: string;
109
+ createdAt: Date;
110
+ createdBy: string;
111
+ streamId: string;
112
+ version: number;
113
+ constructor(props: TransactionCreatedProps);
114
+ apply(_existing?: Model): TransactionModel;
115
+ activityLog(_existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
116
+ }
117
+ export interface TransactionDeletedProps {
118
+ streamId: string;
119
+ version: number;
120
+ createdAt: Date;
121
+ createdBy: string;
122
+ }
123
+ export declare class TransactionDeleted implements Event {
124
+ streamId: string;
125
+ version: number;
126
+ createdAt: Date;
127
+ createdBy: string;
128
+ constructor(props: TransactionDeletedProps);
129
+ apply(existing?: Model): TransactionModel;
130
+ activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
131
+ }
132
+ export interface DescriptionChangedProps {
133
+ description: string;
134
+ streamId: string;
135
+ version: number;
136
+ createdAt: Date;
137
+ createdBy: string;
138
+ }
139
+ export declare class DescriptionChanged implements Event {
140
+ description: string;
141
+ streamId: string;
142
+ version: number;
143
+ createdAt: Date;
144
+ createdBy: string;
145
+ constructor(props: DescriptionChangedProps);
146
+ apply(existing?: Model): TransactionModel;
147
+ activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
148
+ }
149
+ export interface TotalAmountChangedProps {
150
+ totalAmount: number;
151
+ streamId: string;
152
+ version: number;
153
+ createdAt: Date;
154
+ createdBy: string;
155
+ }
156
+ export declare class TotalAmountChanged implements Event {
157
+ totalAmount: number;
158
+ streamId: string;
159
+ version: number;
160
+ createdAt: Date;
161
+ createdBy: string;
162
+ constructor(props: TotalAmountChangedProps);
163
+ apply(existing?: Model): TransactionModel;
164
+ activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
165
+ }
166
+ export interface SplitTypeChangedProps {
167
+ splitType: SplitType;
168
+ totalAmount: number;
169
+ amount: number;
170
+ isOwed: boolean;
171
+ streamId: string;
172
+ version: number;
173
+ createdAt: Date;
174
+ createdBy: string;
175
+ }
176
+ export declare class SplitTypeChanged implements Event {
177
+ splitType: SplitType;
178
+ totalAmount: number;
179
+ amount: number;
180
+ isOwed: boolean;
181
+ streamId: string;
182
+ version: number;
183
+ createdAt: Date;
184
+ createdBy: string;
185
+ constructor(props: SplitTypeChangedProps);
186
+ apply(existing?: Model): TransactionModel;
187
+ activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
188
+ }
189
+ export interface CurrencyChangedProps {
190
+ currency: string;
191
+ streamId: string;
192
+ version: number;
193
+ createdAt: Date;
194
+ createdBy: string;
195
+ }
196
+ export declare class CurrencyChanged implements Event {
197
+ currency: string;
198
+ streamId: string;
199
+ version: number;
200
+ createdAt: Date;
201
+ createdBy: string;
202
+ constructor(props: CurrencyChangedProps);
203
+ apply(existing?: Model): TransactionModel;
204
+ activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
205
+ }
206
+ export interface TransactionDateChangedProps {
81
207
  transactionDate: Date;
82
- groupId: string | null;
83
- groupTransactionId: string | null;
208
+ streamId: string;
209
+ version: number;
84
210
  createdAt: Date;
85
211
  createdBy: string;
212
+ }
213
+ export declare class TransactionDateChanged implements Event {
214
+ transactionDate: Date;
86
215
  streamId: string;
87
216
  version: number;
88
- constructor(userId: string, recipientUserId: string, logicalTransactionId: string, description: string, currency: string, splitType: SplitType, totalAmount: number, amount: AmountDto | null, transactionDate: Date, groupId: string | null, groupTransactionId: string | null, createdAt: Date, createdBy: string, streamId: string, version: number);
89
- apply(_existing: Model | null): TransactionModel;
217
+ createdAt: Date;
218
+ createdBy: string;
219
+ constructor(props: TransactionDateChangedProps);
220
+ apply(existing?: Model): TransactionModel;
221
+ activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
90
222
  }
91
223
  //# sourceMappingURL=TransactionEvents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionEvents.d.ts","sourceRoot":"","sources":["../src/TransactionEvents.ts"],"names":[],"mapp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