@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
package/dist/UserEvents.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Event } from './common/Event';
|
|
2
2
|
import { Model } from './common/Model';
|
|
3
|
+
import { ActivityLogCreatedProps } from './ActivityLogEvents';
|
|
3
4
|
export declare enum UserEventType {
|
|
4
5
|
USER_CREATED = "USER_CREATED",
|
|
5
6
|
PLACEHOLDER_USER_CREATED = "PLACEHOLDER_USER_CREATED",
|
|
@@ -11,12 +12,12 @@ export declare enum UserEventType {
|
|
|
11
12
|
USER_CONVERTED_TO_PLACEHOLDER = "USER_CONVERTED_TO_PLACEHOLDER"
|
|
12
13
|
}
|
|
13
14
|
export interface UserModel extends Model {
|
|
14
|
-
uid
|
|
15
|
+
uid?: string;
|
|
15
16
|
displayName: string;
|
|
16
|
-
phoneNumber
|
|
17
|
-
currency
|
|
18
|
-
email
|
|
19
|
-
photoUrl
|
|
17
|
+
phoneNumber?: string;
|
|
18
|
+
currency?: string;
|
|
19
|
+
email?: string;
|
|
20
|
+
photoUrl?: string;
|
|
20
21
|
emailVerified: boolean;
|
|
21
22
|
isPlaceholder: boolean;
|
|
22
23
|
createdAt: Date;
|
|
@@ -25,12 +26,12 @@ export interface UserModel extends Model {
|
|
|
25
26
|
updatedBy: string;
|
|
26
27
|
}
|
|
27
28
|
export interface UserCreatedProps {
|
|
28
|
-
userId
|
|
29
|
+
userId?: string;
|
|
29
30
|
firebaseUid: string;
|
|
30
31
|
displayName: string;
|
|
31
|
-
phoneNumber
|
|
32
|
-
email
|
|
33
|
-
photoUrl
|
|
32
|
+
phoneNumber?: string;
|
|
33
|
+
email?: string;
|
|
34
|
+
photoUrl?: string;
|
|
34
35
|
emailVerified: boolean;
|
|
35
36
|
createdAt: Date;
|
|
36
37
|
createdBy: string;
|
|
@@ -38,80 +39,83 @@ export interface UserCreatedProps {
|
|
|
38
39
|
version: number;
|
|
39
40
|
}
|
|
40
41
|
export declare class UserCreated implements Event {
|
|
41
|
-
userId
|
|
42
|
+
userId?: string;
|
|
42
43
|
firebaseUid: string;
|
|
43
44
|
displayName: string;
|
|
44
|
-
phoneNumber
|
|
45
|
-
email
|
|
46
|
-
photoUrl
|
|
45
|
+
phoneNumber?: string;
|
|
46
|
+
email?: string;
|
|
47
|
+
photoUrl?: string;
|
|
47
48
|
emailVerified: boolean;
|
|
48
49
|
createdAt: Date;
|
|
49
50
|
createdBy: string;
|
|
50
51
|
streamId: string;
|
|
51
52
|
version: number;
|
|
52
53
|
constructor(props: UserCreatedProps);
|
|
53
|
-
apply(_existing
|
|
54
|
+
apply(_existing?: Model): UserModel;
|
|
55
|
+
activityLog(_existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
54
56
|
}
|
|
55
57
|
export interface PlaceholderUserCreatedProps {
|
|
56
|
-
userId
|
|
58
|
+
userId?: string;
|
|
57
59
|
displayName: string;
|
|
58
|
-
phoneNumber
|
|
59
|
-
email
|
|
60
|
+
phoneNumber?: string;
|
|
61
|
+
email?: string;
|
|
60
62
|
createdAt: Date;
|
|
61
63
|
createdBy: string;
|
|
62
64
|
streamId: string;
|
|
63
65
|
version: number;
|
|
64
66
|
}
|
|
65
67
|
export declare class PlaceholderUserCreated implements Event {
|
|
66
|
-
userId
|
|
68
|
+
userId?: string;
|
|
67
69
|
displayName: string;
|
|
68
|
-
phoneNumber
|
|
69
|
-
email
|
|
70
|
+
phoneNumber?: string;
|
|
71
|
+
email?: string;
|
|
70
72
|
createdAt: Date;
|
|
71
73
|
createdBy: string;
|
|
72
74
|
streamId: string;
|
|
73
75
|
version: number;
|
|
74
76
|
constructor(props: PlaceholderUserCreatedProps);
|
|
75
|
-
apply(_existing
|
|
77
|
+
apply(_existing?: Model): UserModel;
|
|
76
78
|
}
|
|
77
79
|
export interface UserCurrencyChangedProps {
|
|
78
|
-
userId
|
|
79
|
-
currency
|
|
80
|
+
userId?: string;
|
|
81
|
+
currency?: string;
|
|
80
82
|
createdAt: Date;
|
|
81
83
|
createdBy: string;
|
|
82
84
|
streamId: string;
|
|
83
85
|
version: number;
|
|
84
86
|
}
|
|
85
87
|
export declare class UserCurrencyChanged implements Event {
|
|
86
|
-
userId
|
|
87
|
-
currency
|
|
88
|
+
userId?: string;
|
|
89
|
+
currency?: string;
|
|
88
90
|
createdAt: Date;
|
|
89
91
|
createdBy: string;
|
|
90
92
|
streamId: string;
|
|
91
93
|
version: number;
|
|
92
94
|
constructor(props: UserCurrencyChangedProps);
|
|
93
|
-
apply(existing
|
|
95
|
+
apply(existing?: Model): UserModel;
|
|
96
|
+
activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
94
97
|
}
|
|
95
98
|
export interface UserPhoneNumberChangedProps {
|
|
96
|
-
userId
|
|
97
|
-
phoneNumber
|
|
99
|
+
userId?: string;
|
|
100
|
+
phoneNumber?: string;
|
|
98
101
|
createdAt: Date;
|
|
99
102
|
createdBy: string;
|
|
100
103
|
streamId: string;
|
|
101
104
|
version: number;
|
|
102
105
|
}
|
|
103
106
|
export declare class UserPhoneNumberChanged implements Event {
|
|
104
|
-
userId
|
|
105
|
-
phoneNumber
|
|
107
|
+
userId?: string;
|
|
108
|
+
phoneNumber?: string;
|
|
106
109
|
createdAt: Date;
|
|
107
110
|
createdBy: string;
|
|
108
111
|
streamId: string;
|
|
109
112
|
version: number;
|
|
110
113
|
constructor(props: UserPhoneNumberChangedProps);
|
|
111
|
-
apply(existing
|
|
114
|
+
apply(existing?: Model): UserModel;
|
|
115
|
+
activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
112
116
|
}
|
|
113
117
|
export interface UserDisplayNameChangedProps {
|
|
114
|
-
userId
|
|
118
|
+
userId?: string;
|
|
115
119
|
displayName: string;
|
|
116
120
|
createdAt: Date;
|
|
117
121
|
createdBy: string;
|
|
@@ -119,38 +123,39 @@ export interface UserDisplayNameChangedProps {
|
|
|
119
123
|
version: number;
|
|
120
124
|
}
|
|
121
125
|
export declare class UserDisplayNameChanged implements Event {
|
|
122
|
-
userId
|
|
126
|
+
userId?: string;
|
|
123
127
|
displayName: string;
|
|
124
128
|
createdAt: Date;
|
|
125
129
|
createdBy: string;
|
|
126
130
|
streamId: string;
|
|
127
131
|
version: number;
|
|
128
132
|
constructor(props: UserDisplayNameChangedProps);
|
|
129
|
-
apply(existing
|
|
133
|
+
apply(existing?: Model): UserModel;
|
|
134
|
+
activityLog(existing?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
130
135
|
}
|
|
131
136
|
export interface UserDeletedProps {
|
|
132
|
-
userId
|
|
137
|
+
userId?: string;
|
|
133
138
|
createdAt: Date;
|
|
134
139
|
createdBy: string;
|
|
135
140
|
streamId: string;
|
|
136
141
|
version: number;
|
|
137
142
|
}
|
|
138
143
|
export declare class UserDeleted implements Event {
|
|
139
|
-
userId
|
|
144
|
+
userId?: string;
|
|
140
145
|
createdAt: Date;
|
|
141
146
|
createdBy: string;
|
|
142
147
|
streamId: string;
|
|
143
148
|
version: number;
|
|
144
149
|
constructor(props: UserDeletedProps);
|
|
145
|
-
apply(existing
|
|
150
|
+
apply(existing?: Model): UserModel;
|
|
146
151
|
}
|
|
147
152
|
export interface PlaceholderUserMergedProps {
|
|
148
|
-
userId
|
|
153
|
+
userId?: string;
|
|
149
154
|
firebaseUid: string;
|
|
150
155
|
displayName: string;
|
|
151
|
-
email
|
|
152
|
-
phoneNumber
|
|
153
|
-
photoUrl
|
|
156
|
+
email?: string;
|
|
157
|
+
phoneNumber?: string;
|
|
158
|
+
photoUrl?: string;
|
|
154
159
|
emailVerified: boolean;
|
|
155
160
|
createdAt: Date;
|
|
156
161
|
createdBy: string;
|
|
@@ -158,34 +163,34 @@ export interface PlaceholderUserMergedProps {
|
|
|
158
163
|
version: number;
|
|
159
164
|
}
|
|
160
165
|
export declare class PlaceholderUserMerged implements Event {
|
|
161
|
-
userId
|
|
166
|
+
userId?: string;
|
|
162
167
|
firebaseUid: string;
|
|
163
168
|
displayName: string;
|
|
164
|
-
email
|
|
165
|
-
phoneNumber
|
|
166
|
-
photoUrl
|
|
169
|
+
email?: string;
|
|
170
|
+
phoneNumber?: string;
|
|
171
|
+
photoUrl?: string;
|
|
167
172
|
emailVerified: boolean;
|
|
168
173
|
createdAt: Date;
|
|
169
174
|
createdBy: string;
|
|
170
175
|
streamId: string;
|
|
171
176
|
version: number;
|
|
172
177
|
constructor(props: PlaceholderUserMergedProps);
|
|
173
|
-
apply(existing
|
|
178
|
+
apply(existing?: Model): UserModel;
|
|
174
179
|
}
|
|
175
180
|
export interface UserConvertedToPlaceholderProps {
|
|
176
|
-
userId
|
|
181
|
+
userId?: string;
|
|
177
182
|
createdAt: Date;
|
|
178
183
|
createdBy: string;
|
|
179
184
|
streamId: string;
|
|
180
185
|
version: number;
|
|
181
186
|
}
|
|
182
187
|
export declare class UserConvertedToPlaceholder implements Event {
|
|
183
|
-
userId
|
|
188
|
+
userId?: string;
|
|
184
189
|
createdAt: Date;
|
|
185
190
|
createdBy: string;
|
|
186
191
|
streamId: string;
|
|
187
192
|
version: number;
|
|
188
193
|
constructor(props: UserConvertedToPlaceholderProps);
|
|
189
|
-
apply(existing
|
|
194
|
+
apply(existing?: Model): UserModel;
|
|
190
195
|
}
|
|
191
196
|
//# sourceMappingURL=UserEvents.d.ts.map
|
package/dist/UserEvents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserEvents.d.ts","sourceRoot":"","sources":["../src/UserEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"UserEvents.d.ts","sourceRoot":"","sources":["../src/UserEvents.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;AAI1E,oBAAY,aAAa;IACvB,YAAY,iBAAiB;IAC7B,wBAAwB,6BAA6B;IACrD,YAAY,iBAAiB;IAC7B,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,oBAAoB,yBAAyB;IAC7C,uBAAuB,4BAA4B;IACnD,6BAA6B,kCAAkC;CAChE;AAGD,MAAM,WAAW,SAAU,SAAQ,KAAK;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,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,CAAC;IACvB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;gBAEX,KAAK,EAAE,0BAA0B;IAc7C,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,SAAS;CAsBnC;AAGD,MAAM,WAAW,+BAA+B;IAC9C,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,0BAA2B,YAAW,KAAK;IAC/C,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,+BAA+B;IAQlD,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,SAAS;CAmBnC"}
|
package/dist/UserEvents.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UserConvertedToPlaceholder = exports.PlaceholderUserMerged = exports.UserDeleted = exports.UserDisplayNameChanged = exports.UserPhoneNumberChanged = exports.UserCurrencyChanged = exports.PlaceholderUserCreated = exports.UserCreated = exports.UserEventType = void 0;
|
|
4
|
+
const ActivityLogEvents_1 = require("./ActivityLogEvents");
|
|
5
|
+
const uuid_1 = require("uuid");
|
|
4
6
|
// User Event Types
|
|
5
7
|
var UserEventType;
|
|
6
8
|
(function (UserEventType) {
|
|
@@ -28,8 +30,10 @@ class UserCreated {
|
|
|
28
30
|
this.version = props.version;
|
|
29
31
|
}
|
|
30
32
|
apply(_existing) {
|
|
33
|
+
if (!this.userId) {
|
|
34
|
+
throw new Error('userId is required for UserModel');
|
|
35
|
+
}
|
|
31
36
|
return {
|
|
32
|
-
id: null,
|
|
33
37
|
streamId: this.streamId,
|
|
34
38
|
userId: this.userId,
|
|
35
39
|
uid: this.firebaseUid,
|
|
@@ -37,7 +41,7 @@ class UserCreated {
|
|
|
37
41
|
phoneNumber: this.phoneNumber,
|
|
38
42
|
email: this.email,
|
|
39
43
|
photoUrl: this.photoUrl,
|
|
40
|
-
currency:
|
|
44
|
+
currency: undefined,
|
|
41
45
|
emailVerified: this.emailVerified,
|
|
42
46
|
isPlaceholder: false,
|
|
43
47
|
createdAt: this.createdAt,
|
|
@@ -48,6 +52,26 @@ class UserCreated {
|
|
|
48
52
|
deleted: false,
|
|
49
53
|
};
|
|
50
54
|
}
|
|
55
|
+
activityLog(_existing, actorName) {
|
|
56
|
+
if (!this.userId) {
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
const actor = actorName ?? 'You';
|
|
60
|
+
const possessive = actor === 'You' ? 'your' : `${actor}'s`;
|
|
61
|
+
const logMessage = `${actor} created ${possessive} profile as "${this.displayName}"`;
|
|
62
|
+
return {
|
|
63
|
+
userId: this.userId,
|
|
64
|
+
activityByUid: this.createdBy,
|
|
65
|
+
sourceStreamId: this.streamId,
|
|
66
|
+
sourceType: ActivityLogEvents_1.SourceType.User,
|
|
67
|
+
logMessage,
|
|
68
|
+
date: this.createdAt,
|
|
69
|
+
createdAt: this.createdAt,
|
|
70
|
+
createdBy: this.createdBy,
|
|
71
|
+
streamId: (0, uuid_1.v4)(),
|
|
72
|
+
version: 1,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
51
75
|
}
|
|
52
76
|
exports.UserCreated = UserCreated;
|
|
53
77
|
class PlaceholderUserCreated {
|
|
@@ -62,16 +86,18 @@ class PlaceholderUserCreated {
|
|
|
62
86
|
this.version = props.version;
|
|
63
87
|
}
|
|
64
88
|
apply(_existing) {
|
|
89
|
+
if (!this.userId) {
|
|
90
|
+
throw new Error('userId is required for UserModel');
|
|
91
|
+
}
|
|
65
92
|
return {
|
|
66
|
-
id: null,
|
|
67
93
|
streamId: this.streamId,
|
|
68
94
|
userId: this.userId,
|
|
69
|
-
uid:
|
|
95
|
+
uid: undefined,
|
|
70
96
|
displayName: this.displayName,
|
|
71
97
|
phoneNumber: this.phoneNumber,
|
|
72
98
|
email: this.email,
|
|
73
|
-
photoUrl:
|
|
74
|
-
currency:
|
|
99
|
+
photoUrl: undefined,
|
|
100
|
+
currency: undefined,
|
|
75
101
|
emailVerified: false,
|
|
76
102
|
isPlaceholder: true,
|
|
77
103
|
createdAt: this.createdAt,
|
|
@@ -106,6 +132,29 @@ class UserCurrencyChanged {
|
|
|
106
132
|
version: this.version,
|
|
107
133
|
};
|
|
108
134
|
}
|
|
135
|
+
activityLog(existing, actorName) {
|
|
136
|
+
if (!existing) {
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
const existingUser = existing;
|
|
140
|
+
const actor = actorName ?? 'You';
|
|
141
|
+
const possessive = actor === 'You' ? 'your' : `${actor}'s`;
|
|
142
|
+
const oldValue = existingUser.currency ?? '';
|
|
143
|
+
const newValue = this.currency ?? '';
|
|
144
|
+
const logMessage = `${actor} changed ${possessive} currency from ${oldValue} to ${newValue}`;
|
|
145
|
+
return {
|
|
146
|
+
userId: existingUser.userId,
|
|
147
|
+
activityByUid: this.createdBy,
|
|
148
|
+
sourceStreamId: this.streamId,
|
|
149
|
+
sourceType: ActivityLogEvents_1.SourceType.User,
|
|
150
|
+
logMessage,
|
|
151
|
+
date: this.createdAt,
|
|
152
|
+
createdAt: this.createdAt,
|
|
153
|
+
createdBy: this.createdBy,
|
|
154
|
+
streamId: (0, uuid_1.v4)(),
|
|
155
|
+
version: 1,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
109
158
|
}
|
|
110
159
|
exports.UserCurrencyChanged = UserCurrencyChanged;
|
|
111
160
|
class UserPhoneNumberChanged {
|
|
@@ -130,6 +179,36 @@ class UserPhoneNumberChanged {
|
|
|
130
179
|
version: this.version,
|
|
131
180
|
};
|
|
132
181
|
}
|
|
182
|
+
activityLog(existing, actorName) {
|
|
183
|
+
if (!existing) {
|
|
184
|
+
return undefined;
|
|
185
|
+
}
|
|
186
|
+
const existingUser = existing;
|
|
187
|
+
const actor = actorName ?? 'You';
|
|
188
|
+
const possessive = actor === 'You' ? 'your' : `${actor}'s`;
|
|
189
|
+
let logMessage;
|
|
190
|
+
if (existingUser.phoneNumber && this.phoneNumber) {
|
|
191
|
+
logMessage = `${actor} changed ${possessive} phone number from ${existingUser.phoneNumber} to ${this.phoneNumber}`;
|
|
192
|
+
}
|
|
193
|
+
else if (this.phoneNumber) {
|
|
194
|
+
logMessage = `${actor} added ${possessive} phone number ${this.phoneNumber}`;
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
logMessage = `${actor} removed ${possessive} phone number`;
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
userId: existingUser.userId,
|
|
201
|
+
activityByUid: this.createdBy,
|
|
202
|
+
sourceStreamId: this.streamId,
|
|
203
|
+
sourceType: ActivityLogEvents_1.SourceType.User,
|
|
204
|
+
logMessage,
|
|
205
|
+
date: this.createdAt,
|
|
206
|
+
createdAt: this.createdAt,
|
|
207
|
+
createdBy: this.createdBy,
|
|
208
|
+
streamId: (0, uuid_1.v4)(),
|
|
209
|
+
version: 1,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
133
212
|
}
|
|
134
213
|
exports.UserPhoneNumberChanged = UserPhoneNumberChanged;
|
|
135
214
|
class UserDisplayNameChanged {
|
|
@@ -154,6 +233,27 @@ class UserDisplayNameChanged {
|
|
|
154
233
|
version: this.version,
|
|
155
234
|
};
|
|
156
235
|
}
|
|
236
|
+
activityLog(existing, actorName) {
|
|
237
|
+
if (!existing) {
|
|
238
|
+
return undefined;
|
|
239
|
+
}
|
|
240
|
+
const existingUser = existing;
|
|
241
|
+
const actor = actorName ?? 'You';
|
|
242
|
+
const possessive = actor === 'You' ? 'your' : `${actor}'s`;
|
|
243
|
+
const logMessage = `${actor} changed ${possessive} name from "${existingUser.displayName}" to "${this.displayName}"`;
|
|
244
|
+
return {
|
|
245
|
+
userId: existingUser.userId,
|
|
246
|
+
activityByUid: this.createdBy,
|
|
247
|
+
sourceStreamId: this.streamId,
|
|
248
|
+
sourceType: ActivityLogEvents_1.SourceType.User,
|
|
249
|
+
logMessage,
|
|
250
|
+
date: this.createdAt,
|
|
251
|
+
createdAt: this.createdAt,
|
|
252
|
+
createdBy: this.createdBy,
|
|
253
|
+
streamId: (0, uuid_1.v4)(),
|
|
254
|
+
version: 1,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
157
257
|
}
|
|
158
258
|
exports.UserDisplayNameChanged = UserDisplayNameChanged;
|
|
159
259
|
class UserDeleted {
|
|
@@ -235,9 +335,9 @@ class UserConvertedToPlaceholder {
|
|
|
235
335
|
}
|
|
236
336
|
return {
|
|
237
337
|
...existingUser,
|
|
238
|
-
uid:
|
|
338
|
+
uid: undefined,
|
|
239
339
|
isPlaceholder: true,
|
|
240
|
-
photoUrl:
|
|
340
|
+
photoUrl: undefined,
|
|
241
341
|
emailVerified: false,
|
|
242
342
|
updatedAt: this.createdAt,
|
|
243
343
|
updatedBy: this.createdBy,
|
package/dist/common/Event.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Model } from './Model';
|
|
2
|
+
import { ActivityLogCreatedProps } from '../ActivityLogEvents';
|
|
2
3
|
export interface Event {
|
|
3
|
-
userId: string;
|
|
4
4
|
streamId: string;
|
|
5
5
|
version: number;
|
|
6
6
|
createdAt: Date;
|
|
7
7
|
createdBy: string;
|
|
8
|
-
apply(existing
|
|
8
|
+
apply(existing?: Model): Model;
|
|
9
|
+
activityLog?(existingModel?: Model, actorName?: string): ActivityLogCreatedProps | undefined;
|
|
9
10
|
}
|
|
10
11
|
//# sourceMappingURL=Event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Event.d.ts","sourceRoot":"","sources":["../../src/common/Event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Event.d.ts","sourceRoot":"","sources":["../../src/common/Event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC/B,WAAW,CAAC,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS,CAAC;CAC9F"}
|
package/dist/common/Model.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../src/common/Model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,
|
|
1
|
+
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../src/common/Model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { Event } from './common/Event';
|
|
2
2
|
export { Model } from './common/Model';
|
|
3
|
-
export { TransactionCreated, TransactionCreatedProps, TransactionDeleted, TransactionDeletedProps, DescriptionChanged, DescriptionChangedProps, TotalAmountChanged, TotalAmountChangedProps,
|
|
3
|
+
export { TransactionCreated, TransactionCreatedProps, TransactionDeleted, TransactionDeletedProps, DescriptionChanged, DescriptionChangedProps, TotalAmountChanged, TotalAmountChangedProps, SplitTypeChanged, SplitTypeChangedProps, CurrencyChanged, CurrencyChangedProps, TransactionDateChanged, TransactionDateChangedProps, TransactionDetailsChanged, TransactionDetailsChangedProps, TransactionModel, SplitType, TransactionEventType, AmountDto, ChangeHistory, ChangeHistoryItem, DescriptionUpdated, AmountUpdated, CurrencyUpdated, SplitTypeUpdated, TransactionDateUpdated, } from './TransactionEvents';
|
|
4
4
|
export { UserCreated, UserCreatedProps, PlaceholderUserCreated, PlaceholderUserCreatedProps, UserCurrencyChanged, UserCurrencyChangedProps, UserPhoneNumberChanged, UserPhoneNumberChangedProps, UserDisplayNameChanged, UserDisplayNameChangedProps, UserDeleted, UserDeletedProps, PlaceholderUserMerged, PlaceholderUserMergedProps, UserConvertedToPlaceholder, UserConvertedToPlaceholderProps, UserModel, UserEventType, } from './UserEvents';
|
|
5
|
+
export { FriendCreated, FriendCreatedProps, FriendUpdated, FriendUpdatedProps, FriendDeleted, FriendDeletedProps, FriendIdAdded, FriendIdAddedProps, FriendIdRemoved, FriendIdRemovedProps, FriendModel, FriendEventType, } from './FriendEvents';
|
|
6
|
+
export { GroupCreated, GroupCreatedProps, GroupNameChanged, GroupNameChangedProps, GroupDescriptionChanged, GroupDescriptionChangedProps, GroupMembersAdded, GroupMembersAddedProps, GroupMembersRemoved, GroupMembersRemovedProps, GroupDeleted, GroupDeletedProps, GroupModel, GroupEventType, } from './GroupEvents';
|
|
7
|
+
export { GroupTransactionCreated, GroupTransactionCreatedProps, GroupTransactionDescriptionChanged, GroupTransactionDescriptionChangedProps, GroupTransactionNotesChanged, GroupTransactionNotesChangedProps, GroupTransactionTotalAmountChanged, GroupTransactionTotalAmountChangedProps, GroupTransactionCurrencyChanged, GroupTransactionCurrencyChangedProps, GroupTransactionSplitTypeChanged, GroupTransactionSplitTypeChangedProps, GroupTransactionDateChanged, GroupTransactionDateChangedProps, GroupTransactionSplitDetailsChanged, GroupTransactionSplitDetailsChangedProps, GroupTransactionDeleted, GroupTransactionDeletedProps, GroupTransactionModel, GroupTransactionEventType, MemberPayment, GroupOriginalTransaction, } from './GroupTransactionEvents';
|
|
8
|
+
export { ActivityLogCreated, ActivityLogCreatedProps, ActivityLogModel, SourceType, } from './ActivityLogEvents';
|
|
5
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,8BAA8B,EAC9B,gBAAgB,EAChB,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC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|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserEventType = exports.UserConvertedToPlaceholder = exports.PlaceholderUserMerged = exports.UserDeleted = exports.UserDisplayNameChanged = exports.UserPhoneNumberChanged = exports.UserCurrencyChanged = exports.PlaceholderUserCreated = exports.UserCreated = exports.ChangeHistory = exports.
|
|
3
|
+
exports.SourceType = exports.ActivityLogCreated = exports.GroupTransactionEventType = exports.GroupTransactionDeleted = exports.GroupTransactionSplitDetailsChanged = exports.GroupTransactionDateChanged = exports.GroupTransactionSplitTypeChanged = exports.GroupTransactionCurrencyChanged = exports.GroupTransactionTotalAmountChanged = exports.GroupTransactionNotesChanged = exports.GroupTransactionDescriptionChanged = exports.GroupTransactionCreated = exports.GroupEventType = exports.GroupDeleted = exports.GroupMembersRemoved = exports.GroupMembersAdded = exports.GroupDescriptionChanged = exports.GroupNameChanged = exports.GroupCreated = exports.FriendEventType = exports.FriendIdRemoved = exports.FriendIdAdded = exports.FriendDeleted = exports.FriendUpdated = exports.FriendCreated = exports.UserEventType = exports.UserConvertedToPlaceholder = exports.PlaceholderUserMerged = exports.UserDeleted = exports.UserDisplayNameChanged = exports.UserPhoneNumberChanged = exports.UserCurrencyChanged = exports.PlaceholderUserCreated = exports.UserCreated = exports.ChangeHistory = exports.TransactionEventType = exports.SplitType = exports.TransactionDetailsChanged = exports.TransactionDateChanged = exports.CurrencyChanged = exports.SplitTypeChanged = exports.TotalAmountChanged = exports.DescriptionChanged = exports.TransactionDeleted = exports.TransactionCreated = void 0;
|
|
4
4
|
// Transaction event types
|
|
5
5
|
var TransactionEvents_1 = require("./TransactionEvents");
|
|
6
6
|
Object.defineProperty(exports, "TransactionCreated", { enumerable: true, get: function () { return TransactionEvents_1.TransactionCreated; } });
|
|
7
7
|
Object.defineProperty(exports, "TransactionDeleted", { enumerable: true, get: function () { return TransactionEvents_1.TransactionDeleted; } });
|
|
8
8
|
Object.defineProperty(exports, "DescriptionChanged", { enumerable: true, get: function () { return TransactionEvents_1.DescriptionChanged; } });
|
|
9
9
|
Object.defineProperty(exports, "TotalAmountChanged", { enumerable: true, get: function () { return TransactionEvents_1.TotalAmountChanged; } });
|
|
10
|
+
Object.defineProperty(exports, "SplitTypeChanged", { enumerable: true, get: function () { return TransactionEvents_1.SplitTypeChanged; } });
|
|
11
|
+
Object.defineProperty(exports, "CurrencyChanged", { enumerable: true, get: function () { return TransactionEvents_1.CurrencyChanged; } });
|
|
12
|
+
Object.defineProperty(exports, "TransactionDateChanged", { enumerable: true, get: function () { return TransactionEvents_1.TransactionDateChanged; } });
|
|
13
|
+
Object.defineProperty(exports, "TransactionDetailsChanged", { enumerable: true, get: function () { return TransactionEvents_1.TransactionDetailsChanged; } });
|
|
10
14
|
Object.defineProperty(exports, "SplitType", { enumerable: true, get: function () { return TransactionEvents_1.SplitType; } });
|
|
11
15
|
Object.defineProperty(exports, "TransactionEventType", { enumerable: true, get: function () { return TransactionEvents_1.TransactionEventType; } });
|
|
12
|
-
Object.defineProperty(exports, "TransactionChangeType", { enumerable: true, get: function () { return TransactionEvents_1.TransactionChangeType; } });
|
|
13
|
-
Object.defineProperty(exports, "ActivityType", { enumerable: true, get: function () { return TransactionEvents_1.ActivityType; } });
|
|
14
16
|
Object.defineProperty(exports, "ChangeHistory", { enumerable: true, get: function () { return TransactionEvents_1.ChangeHistory; } });
|
|
15
17
|
// User event types
|
|
16
18
|
var UserEvents_1 = require("./UserEvents");
|
|
@@ -23,3 +25,36 @@ Object.defineProperty(exports, "UserDeleted", { enumerable: true, get: function
|
|
|
23
25
|
Object.defineProperty(exports, "PlaceholderUserMerged", { enumerable: true, get: function () { return UserEvents_1.PlaceholderUserMerged; } });
|
|
24
26
|
Object.defineProperty(exports, "UserConvertedToPlaceholder", { enumerable: true, get: function () { return UserEvents_1.UserConvertedToPlaceholder; } });
|
|
25
27
|
Object.defineProperty(exports, "UserEventType", { enumerable: true, get: function () { return UserEvents_1.UserEventType; } });
|
|
28
|
+
// Friend event types
|
|
29
|
+
var FriendEvents_1 = require("./FriendEvents");
|
|
30
|
+
Object.defineProperty(exports, "FriendCreated", { enumerable: true, get: function () { return FriendEvents_1.FriendCreated; } });
|
|
31
|
+
Object.defineProperty(exports, "FriendUpdated", { enumerable: true, get: function () { return FriendEvents_1.FriendUpdated; } });
|
|
32
|
+
Object.defineProperty(exports, "FriendDeleted", { enumerable: true, get: function () { return FriendEvents_1.FriendDeleted; } });
|
|
33
|
+
Object.defineProperty(exports, "FriendIdAdded", { enumerable: true, get: function () { return FriendEvents_1.FriendIdAdded; } });
|
|
34
|
+
Object.defineProperty(exports, "FriendIdRemoved", { enumerable: true, get: function () { return FriendEvents_1.FriendIdRemoved; } });
|
|
35
|
+
Object.defineProperty(exports, "FriendEventType", { enumerable: true, get: function () { return FriendEvents_1.FriendEventType; } });
|
|
36
|
+
// Group event types
|
|
37
|
+
var GroupEvents_1 = require("./GroupEvents");
|
|
38
|
+
Object.defineProperty(exports, "GroupCreated", { enumerable: true, get: function () { return GroupEvents_1.GroupCreated; } });
|
|
39
|
+
Object.defineProperty(exports, "GroupNameChanged", { enumerable: true, get: function () { return GroupEvents_1.GroupNameChanged; } });
|
|
40
|
+
Object.defineProperty(exports, "GroupDescriptionChanged", { enumerable: true, get: function () { return GroupEvents_1.GroupDescriptionChanged; } });
|
|
41
|
+
Object.defineProperty(exports, "GroupMembersAdded", { enumerable: true, get: function () { return GroupEvents_1.GroupMembersAdded; } });
|
|
42
|
+
Object.defineProperty(exports, "GroupMembersRemoved", { enumerable: true, get: function () { return GroupEvents_1.GroupMembersRemoved; } });
|
|
43
|
+
Object.defineProperty(exports, "GroupDeleted", { enumerable: true, get: function () { return GroupEvents_1.GroupDeleted; } });
|
|
44
|
+
Object.defineProperty(exports, "GroupEventType", { enumerable: true, get: function () { return GroupEvents_1.GroupEventType; } });
|
|
45
|
+
// Group Transaction event types
|
|
46
|
+
var GroupTransactionEvents_1 = require("./GroupTransactionEvents");
|
|
47
|
+
Object.defineProperty(exports, "GroupTransactionCreated", { enumerable: true, get: function () { return GroupTransactionEvents_1.GroupTransactionCreated; } });
|
|
48
|
+
Object.defineProperty(exports, "GroupTransactionDescriptionChanged", { enumerable: true, get: function () { return GroupTransactionEvents_1.GroupTransactionDescriptionChanged; } });
|
|
49
|
+
Object.defineProperty(exports, "GroupTransactionNotesChanged", { enumerable: true, get: function () { return GroupTransactionEvents_1.GroupTransactionNotesChanged; } });
|
|
50
|
+
Object.defineProperty(exports, "GroupTransactionTotalAmountChanged", { enumerable: true, get: function () { return GroupTransactionEvents_1.GroupTransactionTotalAmountChanged; } });
|
|
51
|
+
Object.defineProperty(exports, "GroupTransactionCurrencyChanged", { enumerable: true, get: function () { return GroupTransactionEvents_1.GroupTransactionCurrencyChanged; } });
|
|
52
|
+
Object.defineProperty(exports, "GroupTransactionSplitTypeChanged", { enumerable: true, get: function () { return GroupTransactionEvents_1.GroupTransactionSplitTypeChanged; } });
|
|
53
|
+
Object.defineProperty(exports, "GroupTransactionDateChanged", { enumerable: true, get: function () { return GroupTransactionEvents_1.GroupTransactionDateChanged; } });
|
|
54
|
+
Object.defineProperty(exports, "GroupTransactionSplitDetailsChanged", { enumerable: true, get: function () { return GroupTransactionEvents_1.GroupTransactionSplitDetailsChanged; } });
|
|
55
|
+
Object.defineProperty(exports, "GroupTransactionDeleted", { enumerable: true, get: function () { return GroupTransactionEvents_1.GroupTransactionDeleted; } });
|
|
56
|
+
Object.defineProperty(exports, "GroupTransactionEventType", { enumerable: true, get: function () { return GroupTransactionEvents_1.GroupTransactionEventType; } });
|
|
57
|
+
// Activity Log types
|
|
58
|
+
var ActivityLogEvents_1 = require("./ActivityLogEvents");
|
|
59
|
+
Object.defineProperty(exports, "ActivityLogCreated", { enumerable: true, get: function () { return ActivityLogEvents_1.ActivityLogCreated; } });
|
|
60
|
+
Object.defineProperty(exports, "SourceType", { enumerable: true, get: function () { return ActivityLogEvents_1.SourceType; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeeshan60/event-processor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Shared event sourcing infrastructure for Loan Tracker projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,8 +26,12 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/jest": "^30.0.0",
|
|
28
28
|
"@types/node": "^20.10.0",
|
|
29
|
+
"@types/uuid": "^10.0.0",
|
|
29
30
|
"jest": "^30.2.0",
|
|
30
31
|
"ts-jest": "^29.4.5",
|
|
31
32
|
"typescript": "^5.3.3"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"uuid": "^13.0.0"
|
|
32
36
|
}
|
|
33
37
|
}
|