@velony/contracts 1.0.0 → 2.0.0
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/README.md +16 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,18 +16,25 @@ This package provides TypeScript interfaces for integration events used across V
|
|
|
16
16
|
|
|
17
17
|
```typescript
|
|
18
18
|
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
UserRegisteredLocalIntegrationEvent,
|
|
20
|
+
UserEmailAddedIntegrationEvent,
|
|
21
|
+
UserPhoneNumberAddedIntegrationEvent
|
|
22
22
|
} from '@velony/contracts';
|
|
23
23
|
|
|
24
|
-
// Example: Handle a user
|
|
25
|
-
const event:
|
|
26
|
-
|
|
24
|
+
// Example: Handle a user registered event
|
|
25
|
+
const event: UserRegisteredLocalIntegrationEvent = {
|
|
26
|
+
id: 'evt-123',
|
|
27
|
+
type: 'user.registered-local',
|
|
28
|
+
version: '1.0.0',
|
|
29
|
+
occurredAt: new Date(),
|
|
27
30
|
payload: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
userId: 'user-123',
|
|
32
|
+
name: 'John Doe',
|
|
33
|
+
username: 'johndoe'
|
|
34
|
+
},
|
|
35
|
+
partitionKey: 'user-123',
|
|
36
|
+
createdAt: new Date(),
|
|
37
|
+
publishedAt: null
|
|
31
38
|
};
|
|
32
39
|
```
|
|
33
40
|
|