@openora/core 0.4.1-canary.33 → 0.4.1-canary.34
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/.tsbuildinfo +1 -1
- package/dist/admin-console/__tests__/backoffice.router.test.js +4 -4
- package/dist/admin-console/__tests__/backoffice.router.test.js.map +1 -1
- package/dist/admin-console/router/index.d.ts.map +1 -1
- package/dist/admin-console/router/index.js +3 -1
- package/dist/admin-console/router/index.js.map +1 -1
- package/dist/admin-console/service/backoffice.service.d.ts +2 -2
- package/dist/admin-console/service/backoffice.service.d.ts.map +1 -1
- package/dist/admin-console/service/backoffice.service.js +2 -2
- package/dist/admin-console/service/backoffice.service.js.map +1 -1
- package/dist/audit/router/index.d.ts.map +1 -1
- package/dist/audit/router/index.js +1 -5
- package/dist/audit/router/index.js.map +1 -1
- package/dist/audit/service/audit.service.d.ts +4 -4
- package/dist/cms/__tests__/cms.router.test.js +2 -2
- package/dist/cms/__tests__/cms.router.test.js.map +1 -1
- package/dist/cms/router/index.js +12 -12
- package/dist/cms/router/index.js.map +1 -1
- package/dist/cms/service/cms.service.d.ts +7 -7
- package/dist/cms/service/cms.service.d.ts.map +1 -1
- package/dist/cms/service/cms.service.js +54 -14
- package/dist/cms/service/cms.service.js.map +1 -1
- package/dist/compliance/__tests__/rg.router.test.js +7 -4
- package/dist/compliance/__tests__/rg.router.test.js.map +1 -1
- package/dist/compliance/router/index.d.ts.map +1 -1
- package/dist/compliance/router/index.js +21 -16
- package/dist/compliance/router/index.js.map +1 -1
- package/dist/compliance/service/compliance.service.d.ts +4 -4
- package/dist/compliance/service/compliance.service.d.ts.map +1 -1
- package/dist/compliance/service/compliance.service.js +17 -5
- package/dist/compliance/service/compliance.service.js.map +1 -1
- package/dist/compliance/service/kyc.service.d.ts +2 -2
- package/dist/compliance/service/kyc.service.d.ts.map +1 -1
- package/dist/compliance/service/kyc.service.js +3 -1
- package/dist/compliance/service/kyc.service.js.map +1 -1
- package/dist/compliance/service/rg.service.d.ts +5 -5
- package/dist/compliance/service/rg.service.d.ts.map +1 -1
- package/dist/compliance/service/rg.service.js +12 -4
- package/dist/compliance/service/rg.service.js.map +1 -1
- package/dist/contracts/adapters/admin-user-directory.d.ts +2 -1
- package/dist/contracts/adapters/admin-user-directory.d.ts.map +1 -1
- package/dist/contracts/adapters/admin-user-directory.js.map +1 -1
- package/dist/contracts/adapters/audit.d.ts +2 -3
- package/dist/contracts/adapters/audit.d.ts.map +1 -1
- package/dist/contracts/adapters/audit.js.map +1 -1
- package/dist/contracts/schemas/common.d.ts +5 -0
- package/dist/contracts/schemas/common.d.ts.map +1 -1
- package/dist/contracts/schemas/common.js +4 -0
- package/dist/contracts/schemas/common.js.map +1 -1
- package/dist/contracts/schemas/events.d.ts +105 -1
- package/dist/contracts/schemas/events.d.ts.map +1 -1
- package/dist/contracts/schemas/events.js +68 -65
- package/dist/contracts/schemas/events.js.map +1 -1
- package/dist/engagement/chat/__tests__/chat.service.test.js +61 -12
- package/dist/engagement/chat/__tests__/chat.service.test.js.map +1 -1
- package/dist/engagement/chat/router/index.d.ts.map +1 -1
- package/dist/engagement/chat/router/index.js +25 -13
- package/dist/engagement/chat/router/index.js.map +1 -1
- package/dist/engagement/chat/service/chat.service.d.ts +18 -18
- package/dist/engagement/chat/service/chat.service.d.ts.map +1 -1
- package/dist/engagement/chat/service/chat.service.js +67 -18
- package/dist/engagement/chat/service/chat.service.js.map +1 -1
- package/dist/iam/__tests__/iam.service.test.js +9 -5
- package/dist/iam/__tests__/iam.service.test.js.map +1 -1
- package/dist/iam/router/index.d.ts.map +1 -1
- package/dist/iam/router/index.js +3 -1
- package/dist/iam/router/index.js.map +1 -1
- package/dist/iam/service/iam.service.d.ts +3 -3
- package/dist/iam/service/iam.service.d.ts.map +1 -1
- package/dist/iam/service/iam.service.js +17 -1
- package/dist/iam/service/iam.service.js.map +1 -1
- package/dist/pam/identity/__tests__/admin-user-directory.test.js +4 -0
- package/dist/pam/identity/__tests__/admin-user-directory.test.js.map +1 -1
- package/dist/pam/identity/__tests__/phone-login.service.test.js +31 -23
- package/dist/pam/identity/__tests__/phone-login.service.test.js.map +1 -1
- package/dist/pam/identity/admin-user-directory.d.ts +2 -2
- package/dist/pam/identity/admin-user-directory.d.ts.map +1 -1
- package/dist/pam/identity/admin-user-directory.js +5 -3
- package/dist/pam/identity/admin-user-directory.js.map +1 -1
- package/dist/pam/identity/router/index.d.ts.map +1 -1
- package/dist/pam/identity/router/index.js +14 -25
- package/dist/pam/identity/router/index.js.map +1 -1
- package/dist/pam/identity/service/identity.service.d.ts +2 -2
- package/dist/pam/identity/service/identity.service.d.ts.map +1 -1
- package/dist/pam/identity/service/identity.service.js +21 -14
- package/dist/pam/identity/service/identity.service.js.map +1 -1
- package/dist/pam/identity/service/phone-login.service.d.ts +3 -9
- package/dist/pam/identity/service/phone-login.service.d.ts.map +1 -1
- package/dist/pam/identity/service/phone-login.service.js +7 -1
- package/dist/pam/identity/service/phone-login.service.js.map +1 -1
- package/dist/pam/identity/service/session.service.d.ts +3 -3
- package/dist/pam/identity/service/session.service.d.ts.map +1 -1
- package/dist/pam/identity/service/session.service.js +11 -4
- package/dist/pam/identity/service/session.service.js.map +1 -1
- package/dist/pam/player-management/__tests__/player.router.test.js +3 -3
- package/dist/pam/player-management/__tests__/player.router.test.js.map +1 -1
- package/dist/pam/tag/__tests__/tag-evaluation.service.test.js +2 -1
- package/dist/pam/tag/__tests__/tag-evaluation.service.test.js.map +1 -1
- package/dist/pam/tag/__tests__/tag.router.test.js +2 -2
- package/dist/pam/tag/__tests__/tag.router.test.js.map +1 -1
- package/dist/pam/tag/router/index.d.ts.map +1 -1
- package/dist/pam/tag/router/index.js +8 -4
- package/dist/pam/tag/router/index.js.map +1 -1
- package/dist/pam/tag/service/tag-evaluation.service.d.ts +0 -1
- package/dist/pam/tag/service/tag-evaluation.service.d.ts.map +1 -1
- package/dist/pam/tag/service/tag-evaluation.service.js +1 -1
- package/dist/pam/tag/service/tag-evaluation.service.js.map +1 -1
- package/dist/pam/tag/service/tag-mappers.d.ts +1 -0
- package/dist/pam/tag/service/tag-mappers.d.ts.map +1 -1
- package/dist/pam/tag/service/tag-mappers.js +1 -0
- package/dist/pam/tag/service/tag-mappers.js.map +1 -1
- package/dist/pam/tag/service/tag-rule.service.d.ts +2 -2
- package/dist/pam/tag/service/tag-rule.service.d.ts.map +1 -1
- package/dist/pam/tag/service/tag-rule.service.js +8 -2
- package/dist/pam/tag/service/tag-rule.service.js.map +1 -1
- package/dist/pam/tag/service/tag.service.d.ts +3 -3
- package/dist/pam/tag/service/tag.service.d.ts.map +1 -1
- package/dist/pam/tag/service/tag.service.js +9 -5
- package/dist/pam/tag/service/tag.service.js.map +1 -1
- package/dist/server/auth/admin-guard.d.ts +7 -9
- package/dist/server/auth/admin-guard.d.ts.map +1 -1
- package/dist/server/auth/admin-guard.js +10 -10
- package/dist/server/auth/admin-guard.js.map +1 -1
- package/dist/server/auth/index.d.ts +1 -0
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/kernel/event-bus.d.ts +1 -2
- package/dist/server/kernel/event-bus.d.ts.map +1 -1
- package/dist/server/kernel/event-bus.js +9 -3
- package/dist/server/kernel/event-bus.js.map +1 -1
- package/dist/server/kernel/index.d.ts +2 -2
- package/dist/server/kernel/index.d.ts.map +1 -1
- package/dist/server/kernel/index.js +2 -2
- package/dist/server/kernel/index.js.map +1 -1
- package/dist/server/kernel/request-context.d.ts +4 -0
- package/dist/server/kernel/request-context.d.ts.map +1 -1
- package/dist/server/kernel/request-context.js +4 -0
- package/dist/server/kernel/request-context.js.map +1 -1
- package/dist/server/kernel/router-utils.d.ts +3 -0
- package/dist/server/kernel/router-utils.d.ts.map +1 -1
- package/dist/server/kernel/router-utils.js +8 -0
- package/dist/server/kernel/router-utils.js.map +1 -1
- package/dist/server/runtime/create-app.d.ts.map +1 -1
- package/dist/server/runtime/create-app.js +4 -3
- package/dist/server/runtime/create-app.js.map +1 -1
- package/dist/testing/mock.d.ts +5 -1
- package/dist/testing/mock.d.ts.map +1 -1
- package/dist/testing/mock.js +12 -0
- package/dist/testing/mock.js.map +1 -1
- package/dist/wallet/__tests__/wallet-auto-rule.router.test.js +4 -4
- package/dist/wallet/__tests__/wallet-auto-rule.router.test.js.map +1 -1
- package/dist/wallet/__tests__/wallet-auto-withdrawal.test.js +78 -14
- package/dist/wallet/__tests__/wallet-auto-withdrawal.test.js.map +1 -1
- package/dist/wallet/__tests__/wallet-kyc-gate.test.js +21 -6
- package/dist/wallet/__tests__/wallet-kyc-gate.test.js.map +1 -1
- package/dist/wallet/__tests__/wallet-webhook.router.test.js +3 -3
- package/dist/wallet/__tests__/wallet-webhook.router.test.js.map +1 -1
- package/dist/wallet/__tests__/wallet.rate-limit.test.js +2 -2
- package/dist/wallet/__tests__/wallet.rate-limit.test.js.map +1 -1
- package/dist/wallet/__tests__/wallet.router.test.js +4 -4
- package/dist/wallet/__tests__/wallet.router.test.js.map +1 -1
- package/dist/wallet/__tests__/wallet.service.test.js +42 -8
- package/dist/wallet/__tests__/wallet.service.test.js.map +1 -1
- package/dist/wallet/router/index.d.ts.map +1 -1
- package/dist/wallet/router/index.js +24 -17
- package/dist/wallet/router/index.js.map +1 -1
- package/dist/wallet/service/wallet.service.d.ts +5 -5
- package/dist/wallet/service/wallet.service.d.ts.map +1 -1
- package/dist/wallet/service/wallet.service.js +11 -5
- package/dist/wallet/service/wallet.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
export declare const domainEventSchemas: {
|
|
3
3
|
readonly 'identity.user.registered': z.ZodObject<{
|
|
4
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4
6
|
userId: z.ZodUUID;
|
|
5
7
|
}, z.core.$strip>;
|
|
6
8
|
readonly 'identity.user.login': z.ZodObject<{
|
|
@@ -16,6 +18,8 @@ export declare const domainEventSchemas: {
|
|
|
16
18
|
attemptsRemaining: z.ZodOptional<z.ZodNumber>;
|
|
17
19
|
}, z.core.$strip>;
|
|
18
20
|
readonly 'identity.user.logout': z.ZodObject<{
|
|
21
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
23
|
userId: z.ZodUUID;
|
|
20
24
|
}, z.core.$strip>;
|
|
21
25
|
readonly 'identity.user.phone_login': z.ZodObject<{
|
|
@@ -25,9 +29,13 @@ export declare const domainEventSchemas: {
|
|
|
25
29
|
method: z.ZodLiteral<"phone">;
|
|
26
30
|
}, z.core.$strip>;
|
|
27
31
|
readonly 'identity.phone_otp.requested': z.ZodObject<{
|
|
32
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
34
|
userId: z.ZodUUID;
|
|
29
35
|
}, z.core.$strip>;
|
|
30
36
|
readonly 'identity.phone_otp.cancelled': z.ZodObject<{
|
|
37
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
39
|
userId: z.ZodUUID;
|
|
32
40
|
reason: z.ZodEnum<{
|
|
33
41
|
max_attempts: "max_attempts";
|
|
@@ -42,6 +50,8 @@ export declare const domainEventSchemas: {
|
|
|
42
50
|
lockoutUntil: z.ZodISODateTime;
|
|
43
51
|
}, z.core.$strip>;
|
|
44
52
|
readonly 'identity.user.unlocked': z.ZodObject<{
|
|
53
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
55
|
userId: z.ZodUUID;
|
|
46
56
|
email: z.ZodEmail;
|
|
47
57
|
actorId: z.ZodUUID;
|
|
@@ -49,34 +59,52 @@ export declare const domainEventSchemas: {
|
|
|
49
59
|
previousLockoutUntil: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
50
60
|
}, z.core.$strip>;
|
|
51
61
|
readonly 'identity.2fa.enabled': z.ZodObject<{
|
|
62
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
64
|
userId: z.ZodUUID;
|
|
53
65
|
}, z.core.$strip>;
|
|
54
66
|
readonly 'identity.2fa.disabled': z.ZodObject<{
|
|
67
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
69
|
userId: z.ZodUUID;
|
|
56
70
|
}, z.core.$strip>;
|
|
57
71
|
readonly 'identity.password.reset': z.ZodObject<{
|
|
72
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
74
|
userId: z.ZodUUID;
|
|
59
75
|
}, z.core.$strip>;
|
|
60
76
|
readonly 'identity.email.verified': z.ZodObject<{
|
|
77
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
79
|
userId: z.ZodUUID;
|
|
62
80
|
}, z.core.$strip>;
|
|
63
81
|
readonly 'identity.profile.updated': z.ZodObject<{
|
|
82
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
83
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
64
84
|
userId: z.ZodUUID;
|
|
65
85
|
}, z.core.$strip>;
|
|
66
86
|
readonly 'identity.user.deactivated': z.ZodObject<{
|
|
87
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
88
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
89
|
userId: z.ZodUUID;
|
|
68
90
|
actorId: z.ZodUUID;
|
|
69
91
|
}, z.core.$strip>;
|
|
70
92
|
readonly 'identity.user.reactivated': z.ZodObject<{
|
|
93
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
95
|
userId: z.ZodUUID;
|
|
72
96
|
actorId: z.ZodUUID;
|
|
73
97
|
}, z.core.$strip>;
|
|
74
98
|
readonly 'identity.session.revoked': z.ZodObject<{
|
|
99
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
100
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
101
|
userId: z.ZodUUID;
|
|
76
102
|
sessionId: z.ZodUUID;
|
|
77
103
|
actorId: z.ZodOptional<z.ZodUUID>;
|
|
78
104
|
}, z.core.$strip>;
|
|
79
105
|
readonly 'identity.sessions.revoked_all': z.ZodObject<{
|
|
106
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
107
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
108
|
userId: z.ZodUUID;
|
|
81
109
|
actorId: z.ZodOptional<z.ZodUUID>;
|
|
82
110
|
}, z.core.$strip>;
|
|
@@ -105,6 +133,8 @@ export declare const domainEventSchemas: {
|
|
|
105
133
|
amount: z.ZodString;
|
|
106
134
|
currency: z.ZodString;
|
|
107
135
|
transactionId: z.ZodUUID;
|
|
136
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
137
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
108
138
|
}, z.core.$strip>;
|
|
109
139
|
readonly 'wallet.withdrawal.approved': z.ZodObject<{
|
|
110
140
|
userId: z.ZodUUID;
|
|
@@ -112,6 +142,8 @@ export declare const domainEventSchemas: {
|
|
|
112
142
|
currency: z.ZodString;
|
|
113
143
|
transactionId: z.ZodUUID;
|
|
114
144
|
adminId: z.ZodUUID;
|
|
145
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
146
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
147
|
}, z.core.$strip>;
|
|
116
148
|
readonly 'wallet.withdrawal.rejected': z.ZodObject<{
|
|
117
149
|
userId: z.ZodUUID;
|
|
@@ -120,6 +152,8 @@ export declare const domainEventSchemas: {
|
|
|
120
152
|
transactionId: z.ZodUUID;
|
|
121
153
|
adminId: z.ZodUUID;
|
|
122
154
|
reason: z.ZodString;
|
|
155
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
156
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
157
|
}, z.core.$strip>;
|
|
124
158
|
readonly 'wallet.withdrawal.failed': z.ZodObject<{
|
|
125
159
|
userId: z.ZodUUID;
|
|
@@ -144,14 +178,20 @@ export declare const domainEventSchemas: {
|
|
|
144
178
|
userId: z.ZodUUID;
|
|
145
179
|
}, z.core.$strip>;
|
|
146
180
|
readonly 'chat.user.blocked': z.ZodObject<{
|
|
181
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
182
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
147
183
|
blockerId: z.ZodUUID;
|
|
148
184
|
blockedId: z.ZodUUID;
|
|
149
185
|
}, z.core.$strip>;
|
|
150
186
|
readonly 'chat.user.unblocked': z.ZodObject<{
|
|
187
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
188
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
151
189
|
blockerId: z.ZodUUID;
|
|
152
190
|
blockedId: z.ZodUUID;
|
|
153
191
|
}, z.core.$strip>;
|
|
154
192
|
readonly 'chat.room.created': z.ZodObject<{
|
|
193
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
194
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
155
195
|
roomId: z.ZodUUID;
|
|
156
196
|
name: z.ZodString;
|
|
157
197
|
slug: z.ZodString;
|
|
@@ -159,6 +199,8 @@ export declare const domainEventSchemas: {
|
|
|
159
199
|
actorId: z.ZodOptional<z.ZodUUID>;
|
|
160
200
|
}, z.core.$strip>;
|
|
161
201
|
readonly 'chat.room.deleted': z.ZodObject<{
|
|
202
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
203
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
162
204
|
roomId: z.ZodUUID;
|
|
163
205
|
actorId: z.ZodOptional<z.ZodUUID>;
|
|
164
206
|
before: z.ZodObject<{
|
|
@@ -168,6 +210,8 @@ export declare const domainEventSchemas: {
|
|
|
168
210
|
}, z.core.$strip>;
|
|
169
211
|
}, z.core.$strip>;
|
|
170
212
|
readonly 'chat.room.updated': z.ZodObject<{
|
|
213
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
214
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
171
215
|
roomId: z.ZodUUID;
|
|
172
216
|
actorId: z.ZodOptional<z.ZodUUID>;
|
|
173
217
|
before: z.ZodObject<{
|
|
@@ -182,28 +226,40 @@ export declare const domainEventSchemas: {
|
|
|
182
226
|
}, z.core.$strip>;
|
|
183
227
|
}, z.core.$strip>;
|
|
184
228
|
readonly 'chat.private_room.created': z.ZodObject<{
|
|
229
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
185
231
|
roomId: z.ZodUUID;
|
|
186
232
|
creatorId: z.ZodUUID;
|
|
187
233
|
}, z.core.$strip>;
|
|
188
234
|
readonly 'chat.room.member.joined': z.ZodObject<{
|
|
235
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
236
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
237
|
roomId: z.ZodUUID;
|
|
190
238
|
userId: z.ZodUUID;
|
|
191
239
|
}, z.core.$strip>;
|
|
192
240
|
readonly 'chat.room.member.left': z.ZodObject<{
|
|
241
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
242
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
193
243
|
roomId: z.ZodUUID;
|
|
194
244
|
userId: z.ZodUUID;
|
|
195
245
|
}, z.core.$strip>;
|
|
196
246
|
readonly 'chat.room.member.kicked': z.ZodObject<{
|
|
247
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
248
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
249
|
roomId: z.ZodUUID;
|
|
198
250
|
userId: z.ZodUUID;
|
|
199
251
|
kickedBy: z.ZodUUID;
|
|
200
252
|
}, z.core.$strip>;
|
|
201
253
|
readonly 'chat.room.member.banned': z.ZodObject<{
|
|
254
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
255
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
202
256
|
roomId: z.ZodUUID;
|
|
203
257
|
userId: z.ZodUUID;
|
|
204
258
|
bannedBy: z.ZodUUID;
|
|
205
259
|
}, z.core.$strip>;
|
|
206
260
|
readonly 'compliance.geo-rule.added': z.ZodObject<{
|
|
261
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
262
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
207
263
|
countryCode: z.ZodString;
|
|
208
264
|
action: z.ZodEnum<{
|
|
209
265
|
allow: "allow";
|
|
@@ -212,14 +268,20 @@ export declare const domainEventSchemas: {
|
|
|
212
268
|
actorId: z.ZodOptional<z.ZodUUID>;
|
|
213
269
|
}, z.core.$strip>;
|
|
214
270
|
readonly 'compliance.limit.upserted': z.ZodObject<{
|
|
271
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
272
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
215
273
|
userId: z.ZodUUID;
|
|
216
274
|
limitId: z.ZodUUID;
|
|
217
275
|
}, z.core.$strip>;
|
|
218
276
|
readonly 'compliance.limit.removed': z.ZodObject<{
|
|
277
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
278
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
219
279
|
userId: z.ZodUUID;
|
|
220
280
|
limitId: z.ZodUUID;
|
|
221
281
|
}, z.core.$strip>;
|
|
222
282
|
readonly 'rg.limit.set': z.ZodObject<{
|
|
283
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
284
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
223
285
|
userId: z.ZodUUID;
|
|
224
286
|
actorId: z.ZodUUID;
|
|
225
287
|
limitId: z.ZodUUID;
|
|
@@ -246,6 +308,8 @@ export declare const domainEventSchemas: {
|
|
|
246
308
|
userId: z.ZodUUID;
|
|
247
309
|
exclusionId: z.ZodUUID;
|
|
248
310
|
expiresAt: z.ZodISODateTime;
|
|
311
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
312
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
249
313
|
}, z.core.$strip>;
|
|
250
314
|
readonly 'rg.self_exclusion.activated': z.ZodObject<{
|
|
251
315
|
actorId: z.ZodUUID;
|
|
@@ -254,6 +318,8 @@ export declare const domainEventSchemas: {
|
|
|
254
318
|
exclusionId: z.ZodUUID;
|
|
255
319
|
isPermanent: z.ZodBoolean;
|
|
256
320
|
expiresAt: z.ZodNullable<z.ZodISODateTime>;
|
|
321
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
322
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
257
323
|
}, z.core.$strip>;
|
|
258
324
|
readonly 'rg.self_exclusion.lifted': z.ZodObject<{
|
|
259
325
|
actorId: z.ZodUUID;
|
|
@@ -264,11 +330,13 @@ export declare const domainEventSchemas: {
|
|
|
264
330
|
cooling_off: "cooling_off";
|
|
265
331
|
self_exclusion: "self_exclusion";
|
|
266
332
|
}>;
|
|
333
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
334
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
267
335
|
}, z.core.$strip>;
|
|
268
336
|
readonly 'rg.exclusion.login_blocked': z.ZodObject<{
|
|
269
|
-
userId: z.ZodUUID;
|
|
270
337
|
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
271
338
|
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
339
|
+
userId: z.ZodUUID;
|
|
272
340
|
}, z.core.$strip>;
|
|
273
341
|
readonly 'compliance.kyc.updated': z.ZodObject<{
|
|
274
342
|
userId: z.ZodUUID;
|
|
@@ -291,6 +359,8 @@ export declare const domainEventSchemas: {
|
|
|
291
359
|
}>;
|
|
292
360
|
}, z.core.$strip>;
|
|
293
361
|
readonly 'compliance.kyc.submitted': z.ZodObject<{
|
|
362
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
363
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
294
364
|
userId: z.ZodUUID;
|
|
295
365
|
referenceId: z.ZodString;
|
|
296
366
|
provider: z.ZodString;
|
|
@@ -304,34 +374,50 @@ export declare const domainEventSchemas: {
|
|
|
304
374
|
userId: z.ZodUUID;
|
|
305
375
|
}, z.core.$strip>;
|
|
306
376
|
readonly 'cms.page.published': z.ZodObject<{
|
|
377
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
378
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
307
379
|
pageId: z.ZodUUID;
|
|
308
380
|
slug: z.ZodString;
|
|
309
381
|
}, z.core.$strip>;
|
|
310
382
|
readonly 'cms.page.created': z.ZodObject<{
|
|
311
383
|
pageId: z.ZodUUID;
|
|
312
384
|
actorId: z.ZodUUID;
|
|
385
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
386
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
313
387
|
}, z.core.$strip>;
|
|
314
388
|
readonly 'cms.page.updated': z.ZodObject<{
|
|
315
389
|
pageId: z.ZodUUID;
|
|
316
390
|
actorId: z.ZodUUID;
|
|
391
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
392
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
317
393
|
}, z.core.$strip>;
|
|
318
394
|
readonly 'cms.page.deleted': z.ZodObject<{
|
|
319
395
|
pageId: z.ZodUUID;
|
|
320
396
|
actorId: z.ZodUUID;
|
|
397
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
398
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
321
399
|
}, z.core.$strip>;
|
|
322
400
|
readonly 'cms.banner.created': z.ZodObject<{
|
|
323
401
|
bannerId: z.ZodUUID;
|
|
324
402
|
actorId: z.ZodUUID;
|
|
403
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
404
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
325
405
|
}, z.core.$strip>;
|
|
326
406
|
readonly 'cms.banner.updated': z.ZodObject<{
|
|
327
407
|
bannerId: z.ZodUUID;
|
|
328
408
|
actorId: z.ZodUUID;
|
|
409
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
410
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
329
411
|
}, z.core.$strip>;
|
|
330
412
|
readonly 'cms.banner.deleted': z.ZodObject<{
|
|
331
413
|
bannerId: z.ZodUUID;
|
|
332
414
|
actorId: z.ZodUUID;
|
|
415
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
416
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
333
417
|
}, z.core.$strip>;
|
|
334
418
|
readonly 'iam.invitation.accepted': z.ZodObject<{
|
|
419
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
420
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
335
421
|
email: z.ZodEmail;
|
|
336
422
|
roleId: z.ZodUUID;
|
|
337
423
|
invitationId: z.ZodUUID;
|
|
@@ -339,20 +425,28 @@ export declare const domainEventSchemas: {
|
|
|
339
425
|
readonly 'iam.role.created': z.ZodObject<{
|
|
340
426
|
roleId: z.ZodUUID;
|
|
341
427
|
actorId: z.ZodUUID;
|
|
428
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
429
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
342
430
|
name: z.ZodString;
|
|
343
431
|
}, z.core.$strip>;
|
|
344
432
|
readonly 'iam.role.updated': z.ZodObject<{
|
|
345
433
|
roleId: z.ZodUUID;
|
|
346
434
|
actorId: z.ZodUUID;
|
|
435
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
436
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
347
437
|
name: z.ZodOptional<z.ZodString>;
|
|
348
438
|
}, z.core.$strip>;
|
|
349
439
|
readonly 'iam.role.deleted': z.ZodObject<{
|
|
350
440
|
roleId: z.ZodUUID;
|
|
351
441
|
actorId: z.ZodUUID;
|
|
442
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
443
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
352
444
|
}, z.core.$strip>;
|
|
353
445
|
readonly 'iam.role.permissions.changed': z.ZodObject<{
|
|
354
446
|
roleId: z.ZodUUID;
|
|
355
447
|
actorId: z.ZodUUID;
|
|
448
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
449
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
356
450
|
before: z.ZodArray<z.ZodObject<{
|
|
357
451
|
resource: z.ZodString;
|
|
358
452
|
level: z.ZodEnum<{
|
|
@@ -373,11 +467,15 @@ export declare const domainEventSchemas: {
|
|
|
373
467
|
readonly 'iam.role.assigned': z.ZodObject<{
|
|
374
468
|
roleId: z.ZodUUID;
|
|
375
469
|
actorId: z.ZodUUID;
|
|
470
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
471
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
376
472
|
userId: z.ZodUUID;
|
|
377
473
|
}, z.core.$strip>;
|
|
378
474
|
readonly 'iam.role.revoked': z.ZodObject<{
|
|
379
475
|
roleId: z.ZodUUID;
|
|
380
476
|
actorId: z.ZodUUID;
|
|
477
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
478
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
381
479
|
userId: z.ZodUUID;
|
|
382
480
|
}, z.core.$strip>;
|
|
383
481
|
readonly 'tag.player.assigned': z.ZodObject<{
|
|
@@ -396,6 +494,8 @@ export declare const domainEventSchemas: {
|
|
|
396
494
|
kyc_rejected: "kyc_rejected";
|
|
397
495
|
test_account: "test_account";
|
|
398
496
|
}>;
|
|
497
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
498
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
399
499
|
}, z.core.$strip>;
|
|
400
500
|
readonly 'tag.player.removed': z.ZodObject<{
|
|
401
501
|
actorId: z.ZodUUID;
|
|
@@ -413,8 +513,12 @@ export declare const domainEventSchemas: {
|
|
|
413
513
|
kyc_rejected: "kyc_rejected";
|
|
414
514
|
test_account: "test_account";
|
|
415
515
|
}>;
|
|
516
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
517
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
416
518
|
}, z.core.$strip>;
|
|
417
519
|
readonly 'tag.rule.upserted': z.ZodObject<{
|
|
520
|
+
ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
521
|
+
userAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
418
522
|
tagKey: z.ZodEnum<{
|
|
419
523
|
high_roller: "high_roller";
|
|
420
524
|
vip: "vip";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/contracts/schemas/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/contracts/schemas/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAyCzB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyPrB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAC9D,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,eAAe,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAIpG,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAmBxE,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,eAAO,MAAM,oBAAoB,EAAsC,eAAe,EAAE,CAAC;AAEzF,sIAAsI;AACtI,wBAAgB,YAAY,IAAI,aAAa,CAAC;IAAE,KAAK,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAKzF"}
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { MoneyAmountSchema, TimestampSchema, UuidSchema } from './common.js';
|
|
2
|
+
import { ClientMetaSchema, MoneyAmountSchema, TimestampSchema, UuidSchema } from './common.js';
|
|
3
3
|
import { GeoRuleActionSchema, LimitTypeSchema, LimitPeriodSchema, ExclusionKindSchema, } from './compliance.js';
|
|
4
4
|
import { TagKeySchema } from './tag.js';
|
|
5
5
|
import { CurrencyCodeSchema, CountryCodeSchema } from './igaming-config.js';
|
|
6
6
|
import { PermissionLevelSchema } from './iam.js';
|
|
7
7
|
import { KycStatusSchema } from './player.js';
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
// Optional request-origin metadata shared by HTTP-triggered events; both fields may be absent.
|
|
9
|
+
const authContextBase = ClientMetaSchema.partial();
|
|
10
|
+
const iamRoleEventBase = z
|
|
11
|
+
.object({ roleId: UuidSchema, actorId: UuidSchema })
|
|
12
|
+
.merge(authContextBase);
|
|
13
|
+
const cmsPageEventBase = z
|
|
14
|
+
.object({ pageId: UuidSchema, actorId: UuidSchema })
|
|
15
|
+
.merge(authContextBase);
|
|
16
|
+
const cmsBannerEventBase = z
|
|
17
|
+
.object({ bannerId: UuidSchema, actorId: UuidSchema })
|
|
18
|
+
.merge(authContextBase);
|
|
11
19
|
const actorReasonBase = z.object({ actorId: UuidSchema, reason: z.string() });
|
|
12
|
-
const tagPlayerEventBase = actorReasonBase
|
|
20
|
+
const tagPlayerEventBase = actorReasonBase
|
|
21
|
+
.extend({ playerId: UuidSchema, tagKey: TagKeySchema })
|
|
22
|
+
.merge(authContextBase);
|
|
13
23
|
const permissionLevelEntries = z.array(z.object({ resource: z.string(), level: PermissionLevelSchema }));
|
|
14
|
-
// Optional request-origin metadata shared by auth events; both fields may be absent.
|
|
15
|
-
const authContextBase = z.object({
|
|
16
|
-
ip: z.string().nullable().optional(),
|
|
17
|
-
userAgent: z.string().nullable().optional(),
|
|
18
|
-
});
|
|
19
24
|
// Shared shape for every wallet money-movement event. Exact decimal string + currency.
|
|
20
25
|
const walletTxnBase = z.object({
|
|
21
26
|
userId: UuidSchema,
|
|
@@ -24,20 +29,20 @@ const walletTxnBase = z.object({
|
|
|
24
29
|
transactionId: UuidSchema,
|
|
25
30
|
});
|
|
26
31
|
export const domainEventSchemas = {
|
|
27
|
-
'identity.user.registered':
|
|
32
|
+
'identity.user.registered': authContextBase.extend({ userId: UuidSchema }),
|
|
28
33
|
'identity.user.login': authContextBase.extend({ userId: UuidSchema }),
|
|
29
34
|
'identity.user.login.failed': authContextBase.extend({
|
|
30
35
|
email: z.email(),
|
|
31
36
|
reason: z.string().nullable().optional(),
|
|
32
37
|
attemptsRemaining: z.number().int().optional(),
|
|
33
38
|
}),
|
|
34
|
-
'identity.user.logout':
|
|
39
|
+
'identity.user.logout': authContextBase.extend({ userId: UuidSchema }),
|
|
35
40
|
'identity.user.phone_login': authContextBase.extend({
|
|
36
41
|
userId: UuidSchema,
|
|
37
42
|
method: z.literal('phone'),
|
|
38
43
|
}),
|
|
39
|
-
'identity.phone_otp.requested':
|
|
40
|
-
'identity.phone_otp.cancelled':
|
|
44
|
+
'identity.phone_otp.requested': authContextBase.extend({ userId: UuidSchema }),
|
|
45
|
+
'identity.phone_otp.cancelled': authContextBase.extend({
|
|
41
46
|
userId: UuidSchema,
|
|
42
47
|
reason: z.enum(['max_attempts', 'new_otp_requested']),
|
|
43
48
|
}),
|
|
@@ -46,29 +51,29 @@ export const domainEventSchemas = {
|
|
|
46
51
|
email: z.email(),
|
|
47
52
|
lockoutUntil: TimestampSchema,
|
|
48
53
|
}),
|
|
49
|
-
'identity.user.unlocked':
|
|
54
|
+
'identity.user.unlocked': authContextBase.extend({
|
|
50
55
|
userId: UuidSchema,
|
|
51
56
|
email: z.email(),
|
|
52
57
|
actorId: UuidSchema,
|
|
53
58
|
previousFailedAttempts: z.number().int().optional(),
|
|
54
59
|
previousLockoutUntil: TimestampSchema.nullable().optional(),
|
|
55
60
|
}),
|
|
56
|
-
'identity.2fa.enabled':
|
|
57
|
-
'identity.2fa.disabled':
|
|
58
|
-
'identity.password.reset':
|
|
59
|
-
'identity.email.verified':
|
|
60
|
-
'identity.profile.updated':
|
|
61
|
+
'identity.2fa.enabled': authContextBase.extend({ userId: UuidSchema }),
|
|
62
|
+
'identity.2fa.disabled': authContextBase.extend({ userId: UuidSchema }),
|
|
63
|
+
'identity.password.reset': authContextBase.extend({ userId: UuidSchema }),
|
|
64
|
+
'identity.email.verified': authContextBase.extend({ userId: UuidSchema }),
|
|
65
|
+
'identity.profile.updated': authContextBase.extend({ userId: UuidSchema }),
|
|
61
66
|
// An admin toggled a user's active status (the only user-lifecycle flow today;
|
|
62
67
|
// users are deactivated, never hard-deleted). userId = subject, actorId = the
|
|
63
68
|
// admin who acted (for a complete audit trail).
|
|
64
|
-
'identity.user.deactivated':
|
|
65
|
-
'identity.user.reactivated':
|
|
66
|
-
'identity.session.revoked':
|
|
69
|
+
'identity.user.deactivated': authContextBase.extend({ userId: UuidSchema, actorId: UuidSchema }),
|
|
70
|
+
'identity.user.reactivated': authContextBase.extend({ userId: UuidSchema, actorId: UuidSchema }),
|
|
71
|
+
'identity.session.revoked': authContextBase.extend({
|
|
67
72
|
userId: UuidSchema,
|
|
68
73
|
sessionId: UuidSchema,
|
|
69
74
|
actorId: UuidSchema.optional(),
|
|
70
75
|
}),
|
|
71
|
-
'identity.sessions.revoked_all':
|
|
76
|
+
'identity.sessions.revoked_all': authContextBase.extend({
|
|
72
77
|
userId: UuidSchema,
|
|
73
78
|
actorId: UuidSchema.optional(),
|
|
74
79
|
}),
|
|
@@ -82,16 +87,17 @@ export const domainEventSchemas = {
|
|
|
82
87
|
'wallet.withdrawal.completed': walletTxnBase,
|
|
83
88
|
// A player requested a withdrawal; funds are held (balance debited) and the
|
|
84
89
|
// request enters the back-office approval queue as `pending`.
|
|
85
|
-
'wallet.withdrawal.requested': walletTxnBase,
|
|
90
|
+
'wallet.withdrawal.requested': walletTxnBase.merge(authContextBase),
|
|
86
91
|
// A payments admin approved a pending withdrawal; it moves to `processing` and
|
|
87
92
|
// is sent to the PSP/Fireblocks rail. `adminId` is the acting reviewer.
|
|
88
|
-
'wallet.withdrawal.approved': walletTxnBase
|
|
93
|
+
'wallet.withdrawal.approved': walletTxnBase
|
|
94
|
+
.extend({ adminId: UuidSchema })
|
|
95
|
+
.merge(authContextBase),
|
|
89
96
|
// A payments admin rejected a pending withdrawal; held funds are returned to the
|
|
90
97
|
// player balance. `adminId` is the acting reviewer; `reason` is mandatory.
|
|
91
|
-
'wallet.withdrawal.rejected': walletTxnBase
|
|
92
|
-
adminId: UuidSchema,
|
|
93
|
-
|
|
94
|
-
}),
|
|
98
|
+
'wallet.withdrawal.rejected': walletTxnBase
|
|
99
|
+
.extend({ adminId: UuidSchema, reason: z.string() })
|
|
100
|
+
.merge(authContextBase),
|
|
95
101
|
// An approved withdrawal failed at the PSP/Fireblocks rail; the held funds were
|
|
96
102
|
// returned to the player balance and the transaction moved to `failed`.
|
|
97
103
|
'wallet.withdrawal.failed': walletTxnBase.extend({ adminId: UuidSchema }),
|
|
@@ -109,50 +115,53 @@ export const domainEventSchemas = {
|
|
|
109
115
|
userId: UuidSchema,
|
|
110
116
|
}),
|
|
111
117
|
// A player muted/unmuted another player's messages for themselves (ABC-45 AC11).
|
|
112
|
-
'chat.user.blocked':
|
|
113
|
-
'chat.user.unblocked':
|
|
118
|
+
'chat.user.blocked': authContextBase.extend({ blockerId: UuidSchema, blockedId: UuidSchema }),
|
|
119
|
+
'chat.user.unblocked': authContextBase.extend({ blockerId: UuidSchema, blockedId: UuidSchema }),
|
|
114
120
|
// Admin room CRUD (actorId = acting admin UUID).
|
|
115
|
-
'chat.room.created':
|
|
121
|
+
'chat.room.created': authContextBase.extend({
|
|
116
122
|
roomId: UuidSchema,
|
|
117
123
|
name: z.string(),
|
|
118
124
|
slug: z.string(),
|
|
119
125
|
category: z.string(),
|
|
120
126
|
actorId: UuidSchema.optional(),
|
|
121
127
|
}),
|
|
122
|
-
'chat.room.deleted':
|
|
128
|
+
'chat.room.deleted': authContextBase.extend({
|
|
123
129
|
roomId: UuidSchema,
|
|
124
130
|
actorId: UuidSchema.optional(),
|
|
125
131
|
before: z.object({ name: z.string(), slug: z.string(), category: z.string() }),
|
|
126
132
|
}),
|
|
127
|
-
'chat.room.updated':
|
|
133
|
+
'chat.room.updated': authContextBase.extend({
|
|
128
134
|
roomId: UuidSchema,
|
|
129
135
|
actorId: UuidSchema.optional(),
|
|
130
136
|
before: z.object({ name: z.string(), slug: z.string(), category: z.string() }),
|
|
131
137
|
after: z.object({ name: z.string(), slug: z.string(), category: z.string() }),
|
|
132
138
|
}),
|
|
133
139
|
// Private room lifecycle: creation and member membership changes.
|
|
134
|
-
'chat.private_room.created':
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
'chat.private_room.created': authContextBase.extend({
|
|
141
|
+
roomId: UuidSchema,
|
|
142
|
+
creatorId: UuidSchema,
|
|
143
|
+
}),
|
|
144
|
+
'chat.room.member.joined': authContextBase.extend({ roomId: UuidSchema, userId: UuidSchema }),
|
|
145
|
+
'chat.room.member.left': authContextBase.extend({ roomId: UuidSchema, userId: UuidSchema }),
|
|
146
|
+
'chat.room.member.kicked': authContextBase.extend({
|
|
138
147
|
roomId: UuidSchema,
|
|
139
148
|
userId: UuidSchema,
|
|
140
149
|
kickedBy: UuidSchema,
|
|
141
150
|
}),
|
|
142
|
-
'chat.room.member.banned':
|
|
151
|
+
'chat.room.member.banned': authContextBase.extend({
|
|
143
152
|
roomId: UuidSchema,
|
|
144
153
|
userId: UuidSchema,
|
|
145
154
|
bannedBy: UuidSchema,
|
|
146
155
|
}),
|
|
147
156
|
// An admin added or changed a geo (country) rule (regulatory). `actorId` is the
|
|
148
157
|
// acting admin so the audit log can attribute the mutation.
|
|
149
|
-
'compliance.geo-rule.added':
|
|
158
|
+
'compliance.geo-rule.added': authContextBase.extend({
|
|
150
159
|
countryCode: CountryCodeSchema,
|
|
151
160
|
action: GeoRuleActionSchema,
|
|
152
161
|
actorId: UuidSchema.optional(),
|
|
153
162
|
}),
|
|
154
|
-
'compliance.limit.upserted':
|
|
155
|
-
'compliance.limit.removed':
|
|
163
|
+
'compliance.limit.upserted': authContextBase.extend({ userId: UuidSchema, limitId: UuidSchema }),
|
|
164
|
+
'compliance.limit.removed': authContextBase.extend({ userId: UuidSchema, limitId: UuidSchema }),
|
|
156
165
|
// Responsible-Gambling admin actions. `userId` = the subject player, `actorId` =
|
|
157
166
|
// the acting admin (the envelope carries no caller, so it is explicit for the audit
|
|
158
167
|
// trail). login_blocked is system-driven (no actor) and a failure outcome.
|
|
@@ -160,7 +169,7 @@ export const domainEventSchemas = {
|
|
|
160
169
|
// money-type limits carry amount (minutes null), the session-type limit
|
|
161
170
|
// carries minutes (amount null). previous* mirrors the prior row's value, null
|
|
162
171
|
// when this is the first limit of that (type, period).
|
|
163
|
-
'rg.limit.set':
|
|
172
|
+
'rg.limit.set': authContextBase.extend({
|
|
164
173
|
userId: UuidSchema,
|
|
165
174
|
actorId: UuidSchema,
|
|
166
175
|
limitId: UuidSchema,
|
|
@@ -171,27 +180,21 @@ export const domainEventSchemas = {
|
|
|
171
180
|
previousAmount: MoneyAmountSchema.nullable(),
|
|
172
181
|
previousMinutes: z.number().int().nullable(),
|
|
173
182
|
}),
|
|
174
|
-
'rg.cooling_off.activated': actorReasonBase
|
|
175
|
-
userId: UuidSchema,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
'rg.self_exclusion.activated': actorReasonBase.extend({
|
|
183
|
+
'rg.cooling_off.activated': actorReasonBase
|
|
184
|
+
.extend({ userId: UuidSchema, exclusionId: UuidSchema, expiresAt: TimestampSchema })
|
|
185
|
+
.merge(authContextBase),
|
|
186
|
+
'rg.self_exclusion.activated': actorReasonBase
|
|
187
|
+
.extend({
|
|
180
188
|
userId: UuidSchema,
|
|
181
189
|
exclusionId: UuidSchema,
|
|
182
190
|
isPermanent: z.boolean(),
|
|
183
191
|
expiresAt: TimestampSchema.nullable(),
|
|
184
|
-
})
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
exclusionId: UuidSchema,
|
|
188
|
-
|
|
189
|
-
}),
|
|
190
|
-
'rg.exclusion.login_blocked': z.object({
|
|
191
|
-
userId: UuidSchema,
|
|
192
|
-
ip: z.string().nullable().optional(),
|
|
193
|
-
userAgent: z.string().nullable().optional(),
|
|
194
|
-
}),
|
|
192
|
+
})
|
|
193
|
+
.merge(authContextBase),
|
|
194
|
+
'rg.self_exclusion.lifted': actorReasonBase
|
|
195
|
+
.extend({ userId: UuidSchema, exclusionId: UuidSchema, kind: ExclusionKindSchema })
|
|
196
|
+
.merge(authContextBase),
|
|
197
|
+
'rg.exclusion.login_blocked': authContextBase.extend({ userId: UuidSchema }),
|
|
195
198
|
// A player's KYC status changed. userId = subject player; actorId = the admin who
|
|
196
199
|
// acted, or null for system-driven changes (vendor decision, webhook, threshold
|
|
197
200
|
// re-KYC). before/after status records the transition for the audit log.
|
|
@@ -203,7 +206,7 @@ export const domainEventSchemas = {
|
|
|
203
206
|
}),
|
|
204
207
|
// A player submitted KYC documents; a verification record was created and sent to
|
|
205
208
|
// the provider. userId = the submitting player; referenceId = the provider reference.
|
|
206
|
-
'compliance.kyc.submitted':
|
|
209
|
+
'compliance.kyc.submitted': authContextBase.extend({
|
|
207
210
|
userId: UuidSchema,
|
|
208
211
|
referenceId: z.string(),
|
|
209
212
|
provider: z.string(),
|
|
@@ -215,7 +218,7 @@ export const domainEventSchemas = {
|
|
|
215
218
|
reason: z.string(),
|
|
216
219
|
}),
|
|
217
220
|
'notifications.created': z.object({ notificationId: UuidSchema, userId: UuidSchema }),
|
|
218
|
-
'cms.page.published':
|
|
221
|
+
'cms.page.published': authContextBase.extend({ pageId: UuidSchema, slug: z.string() }),
|
|
219
222
|
'cms.page.created': cmsPageEventBase,
|
|
220
223
|
'cms.page.updated': cmsPageEventBase,
|
|
221
224
|
'cms.page.deleted': cmsPageEventBase,
|
|
@@ -225,7 +228,7 @@ export const domainEventSchemas = {
|
|
|
225
228
|
// Emitted when an admin invitation token is accepted. The consumer (identity
|
|
226
229
|
// module or an overlay) provisions the user account and completes the role
|
|
227
230
|
// assignment by resolving the userId from the email.
|
|
228
|
-
'iam.invitation.accepted':
|
|
231
|
+
'iam.invitation.accepted': authContextBase.extend({
|
|
229
232
|
email: z.email(),
|
|
230
233
|
roleId: UuidSchema,
|
|
231
234
|
invitationId: UuidSchema,
|
|
@@ -252,7 +255,7 @@ export const domainEventSchemas = {
|
|
|
252
255
|
'tag.player.assigned': tagPlayerEventBase,
|
|
253
256
|
'tag.player.removed': tagPlayerEventBase,
|
|
254
257
|
// Emitted after an admin creates or updates a tag rule configuration.
|
|
255
|
-
'tag.rule.upserted':
|
|
258
|
+
'tag.rule.upserted': authContextBase.extend({
|
|
256
259
|
tagKey: TagKeySchema,
|
|
257
260
|
actorId: UuidSchema,
|
|
258
261
|
after: z.record(z.string(), z.unknown()),
|