@zeeshan60/event-processor 1.0.1 → 1.0.3
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/ActivityLogEvents.d.ts +43 -0
- package/dist/ActivityLogEvents.d.ts.map +1 -0
- package/dist/ActivityLogEvents.js +39 -0
- package/dist/FriendEvents.d.ts +122 -0
- package/dist/FriendEvents.d.ts.map +1 -0
- package/dist/FriendEvents.js +213 -0
- package/dist/GroupEvents.d.ts +140 -0
- package/dist/GroupEvents.d.ts.map +1 -0
- package/dist/GroupEvents.js +289 -0
- package/dist/GroupTransactionEvents.d.ts +228 -0
- package/dist/GroupTransactionEvents.d.ts.map +1 -0
- package/dist/GroupTransactionEvents.js +438 -0
- package/dist/TransactionEvents.d.ts +98 -56
- package/dist/TransactionEvents.d.ts.map +1 -1
- package/dist/TransactionEvents.js +345 -26
- package/dist/UserEvents.d.ts +54 -49
- package/dist/UserEvents.d.ts.map +1 -1
- package/dist/UserEvents.js +108 -8
- package/dist/common/Event.d.ts +3 -2
- package/dist/common/Event.d.ts.map +1 -1
- package/dist/common/Model.d.ts +0 -1
- package/dist/common/Model.d.ts.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -3
- package/package.json +5 -1
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupDeleted = exports.GroupMembersRemoved = exports.GroupMembersAdded = exports.GroupDescriptionChanged = exports.GroupNameChanged = exports.GroupCreated = exports.GroupEventType = void 0;
|
|
4
|
+
const ActivityLogEvents_1 = require("./ActivityLogEvents");
|
|
5
|
+
const uuid_1 = require("uuid");
|
|
6
|
+
var GroupEventType;
|
|
7
|
+
(function (GroupEventType) {
|
|
8
|
+
GroupEventType["GROUP_CREATED"] = "GROUP_CREATED";
|
|
9
|
+
GroupEventType["GROUP_NAME_CHANGED"] = "GROUP_NAME_CHANGED";
|
|
10
|
+
GroupEventType["GROUP_DESCRIPTION_CHANGED"] = "GROUP_DESCRIPTION_CHANGED";
|
|
11
|
+
GroupEventType["GROUP_MEMBERS_ADDED"] = "GROUP_MEMBERS_ADDED";
|
|
12
|
+
GroupEventType["GROUP_MEMBERS_REMOVED"] = "GROUP_MEMBERS_REMOVED";
|
|
13
|
+
GroupEventType["GROUP_DELETED"] = "GROUP_DELETED";
|
|
14
|
+
})(GroupEventType || (exports.GroupEventType = GroupEventType = {}));
|
|
15
|
+
class GroupCreated {
|
|
16
|
+
constructor(props) {
|
|
17
|
+
this.userId = props.userId;
|
|
18
|
+
this.groupId = props.groupId;
|
|
19
|
+
this.name = props.name;
|
|
20
|
+
this.description = props.description;
|
|
21
|
+
this.members = props.members;
|
|
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
|
+
groupId: this.groupId,
|
|
32
|
+
name: this.name,
|
|
33
|
+
description: this.description,
|
|
34
|
+
members: this.members ?? [],
|
|
35
|
+
createdAt: this.createdAt,
|
|
36
|
+
updatedAt: this.createdAt,
|
|
37
|
+
createdBy: this.createdBy,
|
|
38
|
+
updatedBy: this.createdBy,
|
|
39
|
+
version: this.version,
|
|
40
|
+
deleted: false,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
activityLog(_existing, actorName) {
|
|
44
|
+
const actor = actorName ?? 'You';
|
|
45
|
+
const logMessage = `${actor} created group "${this.name}"`;
|
|
46
|
+
return {
|
|
47
|
+
userId: this.userId,
|
|
48
|
+
activityByUid: this.createdBy,
|
|
49
|
+
sourceStreamId: this.streamId,
|
|
50
|
+
sourceType: ActivityLogEvents_1.SourceType.Group,
|
|
51
|
+
logMessage,
|
|
52
|
+
date: this.createdAt,
|
|
53
|
+
createdAt: this.createdAt,
|
|
54
|
+
createdBy: this.createdBy,
|
|
55
|
+
streamId: (0, uuid_1.v4)(),
|
|
56
|
+
version: 1,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.GroupCreated = GroupCreated;
|
|
61
|
+
class GroupNameChanged {
|
|
62
|
+
constructor(props) {
|
|
63
|
+
this.userId = props.userId;
|
|
64
|
+
this.name = props.name;
|
|
65
|
+
this.createdAt = props.createdAt;
|
|
66
|
+
this.createdBy = props.createdBy;
|
|
67
|
+
this.streamId = props.streamId;
|
|
68
|
+
this.version = props.version;
|
|
69
|
+
}
|
|
70
|
+
apply(existing) {
|
|
71
|
+
if (!existing) {
|
|
72
|
+
throw new Error('Group must exist to change name');
|
|
73
|
+
}
|
|
74
|
+
const existingGroup = existing;
|
|
75
|
+
return {
|
|
76
|
+
...existingGroup,
|
|
77
|
+
name: this.name,
|
|
78
|
+
updatedAt: this.createdAt,
|
|
79
|
+
updatedBy: this.createdBy,
|
|
80
|
+
version: this.version,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
activityLog(existing, actorName) {
|
|
84
|
+
if (!existing) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
const existingGroup = existing;
|
|
88
|
+
const actor = actorName ?? 'You';
|
|
89
|
+
const logMessage = `${actor} changed group name from "${existingGroup.name}" to "${this.name}"`;
|
|
90
|
+
return {
|
|
91
|
+
userId: existingGroup.userId,
|
|
92
|
+
activityByUid: this.createdBy,
|
|
93
|
+
sourceStreamId: this.streamId,
|
|
94
|
+
sourceType: ActivityLogEvents_1.SourceType.Group,
|
|
95
|
+
logMessage,
|
|
96
|
+
date: this.createdAt,
|
|
97
|
+
createdAt: this.createdAt,
|
|
98
|
+
createdBy: this.createdBy,
|
|
99
|
+
streamId: (0, uuid_1.v4)(),
|
|
100
|
+
version: 1,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.GroupNameChanged = GroupNameChanged;
|
|
105
|
+
class GroupDescriptionChanged {
|
|
106
|
+
constructor(props) {
|
|
107
|
+
this.userId = props.userId;
|
|
108
|
+
this.description = props.description;
|
|
109
|
+
this.createdAt = props.createdAt;
|
|
110
|
+
this.createdBy = props.createdBy;
|
|
111
|
+
this.streamId = props.streamId;
|
|
112
|
+
this.version = props.version;
|
|
113
|
+
}
|
|
114
|
+
apply(existing) {
|
|
115
|
+
if (!existing) {
|
|
116
|
+
throw new Error('Group must exist to change description');
|
|
117
|
+
}
|
|
118
|
+
const existingGroup = existing;
|
|
119
|
+
return {
|
|
120
|
+
...existingGroup,
|
|
121
|
+
description: this.description,
|
|
122
|
+
updatedAt: this.createdAt,
|
|
123
|
+
updatedBy: this.createdBy,
|
|
124
|
+
version: this.version,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
activityLog(existing, actorName) {
|
|
128
|
+
if (!existing) {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
const existingGroup = existing;
|
|
132
|
+
const actor = actorName ?? 'You';
|
|
133
|
+
const logMessage = `${actor} updated group "${existingGroup.name}" description`;
|
|
134
|
+
return {
|
|
135
|
+
userId: existingGroup.userId,
|
|
136
|
+
activityByUid: this.createdBy,
|
|
137
|
+
sourceStreamId: this.streamId,
|
|
138
|
+
sourceType: ActivityLogEvents_1.SourceType.Group,
|
|
139
|
+
logMessage,
|
|
140
|
+
date: this.createdAt,
|
|
141
|
+
createdAt: this.createdAt,
|
|
142
|
+
createdBy: this.createdBy,
|
|
143
|
+
streamId: (0, uuid_1.v4)(),
|
|
144
|
+
version: 1,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
exports.GroupDescriptionChanged = GroupDescriptionChanged;
|
|
149
|
+
class GroupMembersAdded {
|
|
150
|
+
constructor(props) {
|
|
151
|
+
this.userId = props.userId;
|
|
152
|
+
this.members = props.members;
|
|
153
|
+
this.createdAt = props.createdAt;
|
|
154
|
+
this.createdBy = props.createdBy;
|
|
155
|
+
this.streamId = props.streamId;
|
|
156
|
+
this.version = props.version;
|
|
157
|
+
}
|
|
158
|
+
apply(existing) {
|
|
159
|
+
if (!existing) {
|
|
160
|
+
throw new Error('Group must exist to add members');
|
|
161
|
+
}
|
|
162
|
+
const existingGroup = existing;
|
|
163
|
+
const existingMembers = existingGroup.members ?? [];
|
|
164
|
+
const allMembers = [...existingMembers, ...this.members];
|
|
165
|
+
const uniqueMembers = Array.from(new Set(allMembers));
|
|
166
|
+
return {
|
|
167
|
+
...existingGroup,
|
|
168
|
+
members: uniqueMembers,
|
|
169
|
+
updatedAt: this.createdAt,
|
|
170
|
+
updatedBy: this.createdBy,
|
|
171
|
+
version: this.version,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
activityLog(existing, actorName) {
|
|
175
|
+
if (!existing) {
|
|
176
|
+
return undefined;
|
|
177
|
+
}
|
|
178
|
+
const existingGroup = existing;
|
|
179
|
+
const actor = actorName ?? 'You';
|
|
180
|
+
const count = this.members.length;
|
|
181
|
+
const memberWord = count === 1 ? 'member' : 'members';
|
|
182
|
+
const logMessage = `${actor} added ${count} ${memberWord} to group "${existingGroup.name}"`;
|
|
183
|
+
return {
|
|
184
|
+
userId: existingGroup.userId,
|
|
185
|
+
activityByUid: this.createdBy,
|
|
186
|
+
sourceStreamId: this.streamId,
|
|
187
|
+
sourceType: ActivityLogEvents_1.SourceType.Group,
|
|
188
|
+
logMessage,
|
|
189
|
+
date: this.createdAt,
|
|
190
|
+
createdAt: this.createdAt,
|
|
191
|
+
createdBy: this.createdBy,
|
|
192
|
+
streamId: (0, uuid_1.v4)(),
|
|
193
|
+
version: 1,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
exports.GroupMembersAdded = GroupMembersAdded;
|
|
198
|
+
class GroupMembersRemoved {
|
|
199
|
+
constructor(props) {
|
|
200
|
+
this.userId = props.userId;
|
|
201
|
+
this.members = props.members;
|
|
202
|
+
this.createdAt = props.createdAt;
|
|
203
|
+
this.createdBy = props.createdBy;
|
|
204
|
+
this.streamId = props.streamId;
|
|
205
|
+
this.version = props.version;
|
|
206
|
+
}
|
|
207
|
+
apply(existing) {
|
|
208
|
+
if (!existing) {
|
|
209
|
+
throw new Error('Group must exist to remove members');
|
|
210
|
+
}
|
|
211
|
+
const existingGroup = existing;
|
|
212
|
+
const existingMembers = existingGroup.members ?? [];
|
|
213
|
+
const membersToRemoveSet = new Set(this.members);
|
|
214
|
+
const remainingMembers = existingMembers.filter((memberId) => !membersToRemoveSet.has(memberId));
|
|
215
|
+
return {
|
|
216
|
+
...existingGroup,
|
|
217
|
+
members: remainingMembers,
|
|
218
|
+
updatedAt: this.createdAt,
|
|
219
|
+
updatedBy: this.createdBy,
|
|
220
|
+
version: this.version,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
activityLog(existing, actorName) {
|
|
224
|
+
if (!existing) {
|
|
225
|
+
return undefined;
|
|
226
|
+
}
|
|
227
|
+
const existingGroup = existing;
|
|
228
|
+
const actor = actorName ?? 'You';
|
|
229
|
+
const count = this.members.length;
|
|
230
|
+
const memberWord = count === 1 ? 'member' : 'members';
|
|
231
|
+
const logMessage = `${actor} removed ${count} ${memberWord} from group "${existingGroup.name}"`;
|
|
232
|
+
return {
|
|
233
|
+
userId: existingGroup.userId,
|
|
234
|
+
activityByUid: this.createdBy,
|
|
235
|
+
sourceStreamId: this.streamId,
|
|
236
|
+
sourceType: ActivityLogEvents_1.SourceType.Group,
|
|
237
|
+
logMessage,
|
|
238
|
+
date: this.createdAt,
|
|
239
|
+
createdAt: this.createdAt,
|
|
240
|
+
createdBy: this.createdBy,
|
|
241
|
+
streamId: (0, uuid_1.v4)(),
|
|
242
|
+
version: 1,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
exports.GroupMembersRemoved = GroupMembersRemoved;
|
|
247
|
+
class GroupDeleted {
|
|
248
|
+
constructor(props) {
|
|
249
|
+
this.userId = props.userId;
|
|
250
|
+
this.createdAt = props.createdAt;
|
|
251
|
+
this.createdBy = props.createdBy;
|
|
252
|
+
this.streamId = props.streamId;
|
|
253
|
+
this.version = props.version;
|
|
254
|
+
}
|
|
255
|
+
apply(existing) {
|
|
256
|
+
if (!existing) {
|
|
257
|
+
throw new Error('Group must exist to delete');
|
|
258
|
+
}
|
|
259
|
+
const existingGroup = existing;
|
|
260
|
+
return {
|
|
261
|
+
...existingGroup,
|
|
262
|
+
updatedAt: this.createdAt,
|
|
263
|
+
updatedBy: this.createdBy,
|
|
264
|
+
version: this.version,
|
|
265
|
+
deleted: true,
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
activityLog(existing, actorName) {
|
|
269
|
+
if (!existing) {
|
|
270
|
+
return undefined;
|
|
271
|
+
}
|
|
272
|
+
const existingGroup = existing;
|
|
273
|
+
const actor = actorName ?? 'You';
|
|
274
|
+
const logMessage = `${actor} deleted group "${existingGroup.name}"`;
|
|
275
|
+
return {
|
|
276
|
+
userId: existingGroup.userId,
|
|
277
|
+
activityByUid: this.createdBy,
|
|
278
|
+
sourceStreamId: this.streamId,
|
|
279
|
+
sourceType: ActivityLogEvents_1.SourceType.Group,
|
|
280
|
+
logMessage,
|
|
281
|
+
date: this.createdAt,
|
|
282
|
+
createdAt: this.createdAt,
|
|
283
|
+
createdBy: this.createdBy,
|
|
284
|
+
streamId: (0, uuid_1.v4)(),
|
|
285
|
+
version: 1,
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
exports.GroupDeleted = GroupDeleted;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { Event } from './common/Event';
|
|
2
|
+
import { Model } from './common/Model';
|
|
3
|
+
import { ActivityLogCreatedProps } from './ActivityLogEvents';
|
|
4
|
+
import { SplitType } from './TransactionEvents';
|
|
5
|
+
export declare enum GroupTransactionEventType {
|
|
6
|
+
GROUP_TRANSACTION_CREATED = "GROUP_TRANSACTION_CREATED",
|
|
7
|
+
GROUP_TRANSACTION_DESCRIPTION_CHANGED = "GROUP_TRANSACTION_DESCRIPTION_CHANGED",
|
|
8
|
+
GROUP_TRANSACTION_NOTES_CHANGED = "GROUP_TRANSACTION_NOTES_CHANGED",
|
|
9
|
+
GROUP_TRANSACTION_TOTAL_AMOUNT_CHANGED = "GROUP_TRANSACTION_TOTAL_AMOUNT_CHANGED",
|
|
10
|
+
GROUP_TRANSACTION_CURRENCY_CHANGED = "GROUP_TRANSACTION_CURRENCY_CHANGED",
|
|
11
|
+
GROUP_TRANSACTION_SPLIT_TYPE_CHANGED = "GROUP_TRANSACTION_SPLIT_TYPE_CHANGED",
|
|
12
|
+
GROUP_TRANSACTION_DATE_CHANGED = "GROUP_TRANSACTION_DATE_CHANGED",
|
|
13
|
+
GROUP_TRANSACTION_SPLIT_DETAILS_CHANGED = "GROUP_TRANSACTION_SPLIT_DETAILS_CHANGED",
|
|
14
|
+
GROUP_TRANSACTION_DELETED = "GROUP_TRANSACTION_DELETED"
|
|
15
|
+
}
|
|
16
|
+
export interface MemberPayment {
|
|
17
|
+
memberId: string;
|
|
18
|
+
paid: number;
|
|
19
|
+
owed: number;
|
|
20
|
+
}
|
|
21
|
+
export interface GroupOriginalTransaction {
|
|
22
|
+
members: MemberPayment[];
|
|
23
|
+
}
|
|
24
|
+
export interface GroupTransactionModel extends Model {
|
|
25
|
+
groupId: string;
|
|
26
|
+
transactionId: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
notes?: string;
|
|
29
|
+
totalAmount: number;
|
|
30
|
+
currency: string;
|
|
31
|
+
splitType: SplitType;
|
|
32
|
+
transactionDate: Date;
|
|
33
|
+
originalTransaction: GroupOriginalTransaction;
|
|
34
|
+
createdAt: Date;
|
|
35
|
+
updatedAt: Date;
|
|
36
|
+
createdBy: string;
|
|
37
|
+
updatedBy: string;
|
|
38
|
+
}
|
|
39
|
+
export interface GroupTransactionCreatedProps {
|
|
40
|
+
userId?: string;
|
|
41
|
+
groupId: string;
|
|
42
|
+
transactionId: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
notes?: string;
|
|
45
|
+
totalAmount: number;
|
|
46
|
+
currency: string;
|
|
47
|
+
splitType: SplitType;
|
|
48
|
+
transactionDate: Date;
|
|
49
|
+
originalTransaction: GroupOriginalTransaction;
|
|
50
|
+
createdAt: Date;
|
|
51
|
+
createdBy: string;
|
|
52
|
+
streamId: string;
|
|
53
|
+
version: number;
|
|
54
|
+
}
|
|
55
|
+
export declare class GroupTransactionCreated implements Event {
|
|
56
|
+
userId?: string;
|
|
57
|
+
groupId: string;
|
|
58
|
+
transactionId: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
notes?: string;
|
|
61
|
+
totalAmount: number;
|
|
62
|
+
currency: string;
|
|
63
|
+
splitType: SplitType;
|
|
64
|
+
transactionDate: Date;
|
|
65
|
+
originalTransaction: GroupOriginalTransaction;
|
|
66
|
+
createdAt: Date;
|
|
67
|
+
createdBy: string;
|
|
68
|
+
streamId: string;
|
|
69
|
+
version: number;
|
|
70
|
+
constructor(props: GroupTransactionCreatedProps);
|
|
71
|
+
apply(_existing?: Model): GroupTransactionModel;
|
|
72
|
+
activityLog(_existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
73
|
+
}
|
|
74
|
+
export interface GroupTransactionDescriptionChangedProps {
|
|
75
|
+
userId?: string;
|
|
76
|
+
description?: string;
|
|
77
|
+
createdAt: Date;
|
|
78
|
+
createdBy: string;
|
|
79
|
+
streamId: string;
|
|
80
|
+
version: number;
|
|
81
|
+
}
|
|
82
|
+
export declare class GroupTransactionDescriptionChanged implements Event {
|
|
83
|
+
userId?: string;
|
|
84
|
+
description?: string;
|
|
85
|
+
createdAt: Date;
|
|
86
|
+
createdBy: string;
|
|
87
|
+
streamId: string;
|
|
88
|
+
version: number;
|
|
89
|
+
constructor(props: GroupTransactionDescriptionChangedProps);
|
|
90
|
+
apply(existing?: Model): GroupTransactionModel;
|
|
91
|
+
activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
92
|
+
}
|
|
93
|
+
export interface GroupTransactionNotesChangedProps {
|
|
94
|
+
userId?: string;
|
|
95
|
+
notes?: string;
|
|
96
|
+
createdAt: Date;
|
|
97
|
+
createdBy: string;
|
|
98
|
+
streamId: string;
|
|
99
|
+
version: number;
|
|
100
|
+
}
|
|
101
|
+
export declare class GroupTransactionNotesChanged implements Event {
|
|
102
|
+
userId?: string;
|
|
103
|
+
notes?: string;
|
|
104
|
+
createdAt: Date;
|
|
105
|
+
createdBy: string;
|
|
106
|
+
streamId: string;
|
|
107
|
+
version: number;
|
|
108
|
+
constructor(props: GroupTransactionNotesChangedProps);
|
|
109
|
+
apply(existing?: Model): GroupTransactionModel;
|
|
110
|
+
activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
111
|
+
}
|
|
112
|
+
export interface GroupTransactionTotalAmountChangedProps {
|
|
113
|
+
userId?: string;
|
|
114
|
+
totalAmount: number;
|
|
115
|
+
createdAt: Date;
|
|
116
|
+
createdBy: string;
|
|
117
|
+
streamId: string;
|
|
118
|
+
version: number;
|
|
119
|
+
}
|
|
120
|
+
export declare class GroupTransactionTotalAmountChanged implements Event {
|
|
121
|
+
userId?: string;
|
|
122
|
+
totalAmount: number;
|
|
123
|
+
createdAt: Date;
|
|
124
|
+
createdBy: string;
|
|
125
|
+
streamId: string;
|
|
126
|
+
version: number;
|
|
127
|
+
constructor(props: GroupTransactionTotalAmountChangedProps);
|
|
128
|
+
apply(existing?: Model): GroupTransactionModel;
|
|
129
|
+
activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
130
|
+
}
|
|
131
|
+
export interface GroupTransactionCurrencyChangedProps {
|
|
132
|
+
userId?: string;
|
|
133
|
+
currency: string;
|
|
134
|
+
createdAt: Date;
|
|
135
|
+
createdBy: string;
|
|
136
|
+
streamId: string;
|
|
137
|
+
version: number;
|
|
138
|
+
}
|
|
139
|
+
export declare class GroupTransactionCurrencyChanged implements Event {
|
|
140
|
+
userId?: string;
|
|
141
|
+
currency: string;
|
|
142
|
+
createdAt: Date;
|
|
143
|
+
createdBy: string;
|
|
144
|
+
streamId: string;
|
|
145
|
+
version: number;
|
|
146
|
+
constructor(props: GroupTransactionCurrencyChangedProps);
|
|
147
|
+
apply(existing?: Model): GroupTransactionModel;
|
|
148
|
+
activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
149
|
+
}
|
|
150
|
+
export interface GroupTransactionSplitTypeChangedProps {
|
|
151
|
+
userId?: string;
|
|
152
|
+
splitType: SplitType;
|
|
153
|
+
createdAt: Date;
|
|
154
|
+
createdBy: string;
|
|
155
|
+
streamId: string;
|
|
156
|
+
version: number;
|
|
157
|
+
}
|
|
158
|
+
export declare class GroupTransactionSplitTypeChanged implements Event {
|
|
159
|
+
userId?: string;
|
|
160
|
+
splitType: SplitType;
|
|
161
|
+
createdAt: Date;
|
|
162
|
+
createdBy: string;
|
|
163
|
+
streamId: string;
|
|
164
|
+
version: number;
|
|
165
|
+
constructor(props: GroupTransactionSplitTypeChangedProps);
|
|
166
|
+
apply(existing?: Model): GroupTransactionModel;
|
|
167
|
+
activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
168
|
+
}
|
|
169
|
+
export interface GroupTransactionDateChangedProps {
|
|
170
|
+
userId?: string;
|
|
171
|
+
transactionDate: Date;
|
|
172
|
+
createdAt: Date;
|
|
173
|
+
createdBy: string;
|
|
174
|
+
streamId: string;
|
|
175
|
+
version: number;
|
|
176
|
+
}
|
|
177
|
+
export declare class GroupTransactionDateChanged implements Event {
|
|
178
|
+
userId?: string;
|
|
179
|
+
transactionDate: Date;
|
|
180
|
+
createdAt: Date;
|
|
181
|
+
createdBy: string;
|
|
182
|
+
streamId: string;
|
|
183
|
+
version: number;
|
|
184
|
+
constructor(props: GroupTransactionDateChangedProps);
|
|
185
|
+
apply(existing?: Model): GroupTransactionModel;
|
|
186
|
+
activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
187
|
+
}
|
|
188
|
+
export interface GroupTransactionSplitDetailsChangedProps {
|
|
189
|
+
userId?: string;
|
|
190
|
+
totalAmount: number;
|
|
191
|
+
splitType: SplitType;
|
|
192
|
+
originalTransaction: GroupOriginalTransaction;
|
|
193
|
+
createdAt: Date;
|
|
194
|
+
createdBy: string;
|
|
195
|
+
streamId: string;
|
|
196
|
+
version: number;
|
|
197
|
+
}
|
|
198
|
+
export declare class GroupTransactionSplitDetailsChanged implements Event {
|
|
199
|
+
userId?: string;
|
|
200
|
+
totalAmount: number;
|
|
201
|
+
splitType: SplitType;
|
|
202
|
+
originalTransaction: GroupOriginalTransaction;
|
|
203
|
+
createdAt: Date;
|
|
204
|
+
createdBy: string;
|
|
205
|
+
streamId: string;
|
|
206
|
+
version: number;
|
|
207
|
+
constructor(props: GroupTransactionSplitDetailsChangedProps);
|
|
208
|
+
apply(existing?: Model): GroupTransactionModel;
|
|
209
|
+
activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
210
|
+
}
|
|
211
|
+
export interface GroupTransactionDeletedProps {
|
|
212
|
+
userId?: string;
|
|
213
|
+
createdAt: Date;
|
|
214
|
+
createdBy: string;
|
|
215
|
+
streamId: string;
|
|
216
|
+
version: number;
|
|
217
|
+
}
|
|
218
|
+
export declare class GroupTransactionDeleted implements Event {
|
|
219
|
+
userId?: string;
|
|
220
|
+
createdAt: Date;
|
|
221
|
+
createdBy: string;
|
|
222
|
+
streamId: string;
|
|
223
|
+
version: number;
|
|
224
|
+
constructor(props: GroupTransactionDeletedProps);
|
|
225
|
+
apply(existing?: Model): GroupTransactionModel;
|
|
226
|
+
activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=GroupTransactionEvents.d.ts.map
|
|
@@ -0,0 +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