evo360-types 1.3.236 → 1.3.237

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.
@@ -10681,19 +10681,19 @@ export declare const zProviderPayloadSnapshotSchema: z.ZodObject<{
10681
10681
  direction: "webhook" | "request" | "response";
10682
10682
  raw?: string | undefined;
10683
10683
  method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
10684
+ body?: unknown;
10684
10685
  http_status?: number | undefined;
10685
10686
  endpoint?: string | undefined;
10686
10687
  headers?: Record<string, string> | undefined;
10687
- body?: unknown;
10688
10688
  }, {
10689
10689
  direction: "webhook" | "request" | "response";
10690
10690
  raw?: string | undefined;
10691
10691
  method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
10692
10692
  at?: unknown;
10693
+ body?: unknown;
10693
10694
  http_status?: number | undefined;
10694
10695
  endpoint?: string | undefined;
10695
10696
  headers?: Record<string, string> | undefined;
10696
- body?: unknown;
10697
10697
  }>;
10698
10698
  export declare const zServiceInvoiceSchema: z.ZodObject<{
10699
10699
  id: z.ZodString;
@@ -11099,19 +11099,19 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11099
11099
  direction: "webhook" | "request" | "response";
11100
11100
  raw?: string | undefined;
11101
11101
  method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
11102
+ body?: unknown;
11102
11103
  http_status?: number | undefined;
11103
11104
  endpoint?: string | undefined;
11104
11105
  headers?: Record<string, string> | undefined;
11105
- body?: unknown;
11106
11106
  }, {
11107
11107
  direction: "webhook" | "request" | "response";
11108
11108
  raw?: string | undefined;
11109
11109
  method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
11110
11110
  at?: unknown;
11111
+ body?: unknown;
11111
11112
  http_status?: number | undefined;
11112
11113
  endpoint?: string | undefined;
11113
11114
  headers?: Record<string, string> | undefined;
11114
- body?: unknown;
11115
11115
  }>, "many">>;
11116
11116
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
11117
11117
  id: z.ZodString;
@@ -11517,19 +11517,19 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11517
11517
  direction: "webhook" | "request" | "response";
11518
11518
  raw?: string | undefined;
11519
11519
  method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
11520
+ body?: unknown;
11520
11521
  http_status?: number | undefined;
11521
11522
  endpoint?: string | undefined;
11522
11523
  headers?: Record<string, string> | undefined;
11523
- body?: unknown;
11524
11524
  }, {
11525
11525
  direction: "webhook" | "request" | "response";
11526
11526
  raw?: string | undefined;
11527
11527
  method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
11528
11528
  at?: unknown;
11529
+ body?: unknown;
11529
11530
  http_status?: number | undefined;
11530
11531
  endpoint?: string | undefined;
11531
11532
  headers?: Record<string, string> | undefined;
11532
- body?: unknown;
11533
11533
  }>, "many">>;
11534
11534
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
11535
11535
  id: z.ZodString;
@@ -11935,18 +11935,18 @@ export declare const zServiceInvoiceSchema: z.ZodObject<{
11935
11935
  direction: "webhook" | "request" | "response";
11936
11936
  raw?: string | undefined;
11937
11937
  method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
11938
+ body?: unknown;
11938
11939
  http_status?: number | undefined;
11939
11940
  endpoint?: string | undefined;
11940
11941
  headers?: Record<string, string> | undefined;
11941
- body?: unknown;
11942
11942
  }, {
11943
11943
  direction: "webhook" | "request" | "response";
11944
11944
  raw?: string | undefined;
11945
11945
  method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
11946
11946
  at?: unknown;
11947
+ body?: unknown;
11947
11948
  http_status?: number | undefined;
11948
11949
  endpoint?: string | undefined;
11949
11950
  headers?: Record<string, string> | undefined;
11950
- body?: unknown;
11951
11951
  }>, "many">>;
11952
11952
  }, z.ZodTypeAny, "passthrough">>;
@@ -0,0 +1,440 @@
1
+ import { z } from "zod";
2
+ export declare const zNotifUserStatusSchema: z.ZodEnum<["received", "viewed"]>;
3
+ export declare const zNotifUserLevelSchema: z.ZodEnum<["info", "success", "warning", "error"]>;
4
+ export declare const zNotifUserTenantRefSchema: z.ZodObject<{
5
+ id: z.ZodString;
6
+ display_name: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ id: string;
9
+ display_name: string;
10
+ }, {
11
+ id: string;
12
+ display_name: string;
13
+ }>;
14
+ export declare const zNotifUserSourceSchema: z.ZodObject<{
15
+ module: z.ZodString;
16
+ event: z.ZodString;
17
+ actorType: z.ZodOptional<z.ZodEnum<["user", "system", "automation", "ai"]>>;
18
+ actorId: z.ZodOptional<z.ZodString>;
19
+ actorName: z.ZodOptional<z.ZodString>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ module: string;
22
+ event: string;
23
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
24
+ actorId?: string | undefined;
25
+ actorName?: string | undefined;
26
+ }, {
27
+ module: string;
28
+ event: string;
29
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
30
+ actorId?: string | undefined;
31
+ actorName?: string | undefined;
32
+ }>;
33
+ export declare const zNotifUserTargetSchema: z.ZodObject<{
34
+ entityType: z.ZodOptional<z.ZodString>;
35
+ entityId: z.ZodOptional<z.ZodString>;
36
+ subEntityId: z.ZodOptional<z.ZodString>;
37
+ route: z.ZodOptional<z.ZodString>;
38
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ params?: Record<string, unknown> | undefined;
41
+ entityType?: string | undefined;
42
+ entityId?: string | undefined;
43
+ subEntityId?: string | undefined;
44
+ route?: string | undefined;
45
+ }, {
46
+ params?: Record<string, unknown> | undefined;
47
+ entityType?: string | undefined;
48
+ entityId?: string | undefined;
49
+ subEntityId?: string | undefined;
50
+ route?: string | undefined;
51
+ }>;
52
+ export declare const zNotifUserCreatedBySchema: z.ZodObject<{
53
+ type: z.ZodEnum<["user", "system", "automation", "ai"]>;
54
+ id: z.ZodOptional<z.ZodString>;
55
+ name: z.ZodOptional<z.ZodString>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ type: "user" | "system" | "automation" | "ai";
58
+ name?: string | undefined;
59
+ id?: string | undefined;
60
+ }, {
61
+ type: "user" | "system" | "automation" | "ai";
62
+ name?: string | undefined;
63
+ id?: string | undefined;
64
+ }>;
65
+ export declare const zNotifUserSchema: z.ZodObject<{
66
+ id: z.ZodString;
67
+ userId: z.ZodString;
68
+ tenant: z.ZodObject<{
69
+ id: z.ZodString;
70
+ display_name: z.ZodString;
71
+ }, "strip", z.ZodTypeAny, {
72
+ id: string;
73
+ display_name: string;
74
+ }, {
75
+ id: string;
76
+ display_name: string;
77
+ }>;
78
+ status: z.ZodEnum<["received", "viewed"]>;
79
+ level: z.ZodEnum<["info", "success", "warning", "error"]>;
80
+ category: z.ZodString;
81
+ title: z.ZodString;
82
+ body: z.ZodString;
83
+ source: z.ZodOptional<z.ZodObject<{
84
+ module: z.ZodString;
85
+ event: z.ZodString;
86
+ actorType: z.ZodOptional<z.ZodEnum<["user", "system", "automation", "ai"]>>;
87
+ actorId: z.ZodOptional<z.ZodString>;
88
+ actorName: z.ZodOptional<z.ZodString>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ module: string;
91
+ event: string;
92
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
93
+ actorId?: string | undefined;
94
+ actorName?: string | undefined;
95
+ }, {
96
+ module: string;
97
+ event: string;
98
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
99
+ actorId?: string | undefined;
100
+ actorName?: string | undefined;
101
+ }>>;
102
+ target: z.ZodOptional<z.ZodObject<{
103
+ entityType: z.ZodOptional<z.ZodString>;
104
+ entityId: z.ZodOptional<z.ZodString>;
105
+ subEntityId: z.ZodOptional<z.ZodString>;
106
+ route: z.ZodOptional<z.ZodString>;
107
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ params?: Record<string, unknown> | undefined;
110
+ entityType?: string | undefined;
111
+ entityId?: string | undefined;
112
+ subEntityId?: string | undefined;
113
+ route?: string | undefined;
114
+ }, {
115
+ params?: Record<string, unknown> | undefined;
116
+ entityType?: string | undefined;
117
+ entityId?: string | undefined;
118
+ subEntityId?: string | undefined;
119
+ route?: string | undefined;
120
+ }>>;
121
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
122
+ receivedAt: z.ZodString;
123
+ viewedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
+ dedupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
+ autoDeleteAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
128
+ createdBy: z.ZodOptional<z.ZodObject<{
129
+ type: z.ZodEnum<["user", "system", "automation", "ai"]>;
130
+ id: z.ZodOptional<z.ZodString>;
131
+ name: z.ZodOptional<z.ZodString>;
132
+ }, "strip", z.ZodTypeAny, {
133
+ type: "user" | "system" | "automation" | "ai";
134
+ name?: string | undefined;
135
+ id?: string | undefined;
136
+ }, {
137
+ type: "user" | "system" | "automation" | "ai";
138
+ name?: string | undefined;
139
+ id?: string | undefined;
140
+ }>>;
141
+ version: z.ZodOptional<z.ZodNumber>;
142
+ createdAt: z.ZodString;
143
+ updatedAt: z.ZodString;
144
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
145
+ id: z.ZodString;
146
+ userId: z.ZodString;
147
+ tenant: z.ZodObject<{
148
+ id: z.ZodString;
149
+ display_name: z.ZodString;
150
+ }, "strip", z.ZodTypeAny, {
151
+ id: string;
152
+ display_name: string;
153
+ }, {
154
+ id: string;
155
+ display_name: string;
156
+ }>;
157
+ status: z.ZodEnum<["received", "viewed"]>;
158
+ level: z.ZodEnum<["info", "success", "warning", "error"]>;
159
+ category: z.ZodString;
160
+ title: z.ZodString;
161
+ body: z.ZodString;
162
+ source: z.ZodOptional<z.ZodObject<{
163
+ module: z.ZodString;
164
+ event: z.ZodString;
165
+ actorType: z.ZodOptional<z.ZodEnum<["user", "system", "automation", "ai"]>>;
166
+ actorId: z.ZodOptional<z.ZodString>;
167
+ actorName: z.ZodOptional<z.ZodString>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ module: string;
170
+ event: string;
171
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
172
+ actorId?: string | undefined;
173
+ actorName?: string | undefined;
174
+ }, {
175
+ module: string;
176
+ event: string;
177
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
178
+ actorId?: string | undefined;
179
+ actorName?: string | undefined;
180
+ }>>;
181
+ target: z.ZodOptional<z.ZodObject<{
182
+ entityType: z.ZodOptional<z.ZodString>;
183
+ entityId: z.ZodOptional<z.ZodString>;
184
+ subEntityId: z.ZodOptional<z.ZodString>;
185
+ route: z.ZodOptional<z.ZodString>;
186
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
187
+ }, "strip", z.ZodTypeAny, {
188
+ params?: Record<string, unknown> | undefined;
189
+ entityType?: string | undefined;
190
+ entityId?: string | undefined;
191
+ subEntityId?: string | undefined;
192
+ route?: string | undefined;
193
+ }, {
194
+ params?: Record<string, unknown> | undefined;
195
+ entityType?: string | undefined;
196
+ entityId?: string | undefined;
197
+ subEntityId?: string | undefined;
198
+ route?: string | undefined;
199
+ }>>;
200
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
201
+ receivedAt: z.ZodString;
202
+ viewedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
203
+ dedupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
204
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
205
+ autoDeleteAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
207
+ createdBy: z.ZodOptional<z.ZodObject<{
208
+ type: z.ZodEnum<["user", "system", "automation", "ai"]>;
209
+ id: z.ZodOptional<z.ZodString>;
210
+ name: z.ZodOptional<z.ZodString>;
211
+ }, "strip", z.ZodTypeAny, {
212
+ type: "user" | "system" | "automation" | "ai";
213
+ name?: string | undefined;
214
+ id?: string | undefined;
215
+ }, {
216
+ type: "user" | "system" | "automation" | "ai";
217
+ name?: string | undefined;
218
+ id?: string | undefined;
219
+ }>>;
220
+ version: z.ZodOptional<z.ZodNumber>;
221
+ createdAt: z.ZodString;
222
+ updatedAt: z.ZodString;
223
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
224
+ id: z.ZodString;
225
+ userId: z.ZodString;
226
+ tenant: z.ZodObject<{
227
+ id: z.ZodString;
228
+ display_name: z.ZodString;
229
+ }, "strip", z.ZodTypeAny, {
230
+ id: string;
231
+ display_name: string;
232
+ }, {
233
+ id: string;
234
+ display_name: string;
235
+ }>;
236
+ status: z.ZodEnum<["received", "viewed"]>;
237
+ level: z.ZodEnum<["info", "success", "warning", "error"]>;
238
+ category: z.ZodString;
239
+ title: z.ZodString;
240
+ body: z.ZodString;
241
+ source: z.ZodOptional<z.ZodObject<{
242
+ module: z.ZodString;
243
+ event: z.ZodString;
244
+ actorType: z.ZodOptional<z.ZodEnum<["user", "system", "automation", "ai"]>>;
245
+ actorId: z.ZodOptional<z.ZodString>;
246
+ actorName: z.ZodOptional<z.ZodString>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ module: string;
249
+ event: string;
250
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
251
+ actorId?: string | undefined;
252
+ actorName?: string | undefined;
253
+ }, {
254
+ module: string;
255
+ event: string;
256
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
257
+ actorId?: string | undefined;
258
+ actorName?: string | undefined;
259
+ }>>;
260
+ target: z.ZodOptional<z.ZodObject<{
261
+ entityType: z.ZodOptional<z.ZodString>;
262
+ entityId: z.ZodOptional<z.ZodString>;
263
+ subEntityId: z.ZodOptional<z.ZodString>;
264
+ route: z.ZodOptional<z.ZodString>;
265
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
266
+ }, "strip", z.ZodTypeAny, {
267
+ params?: Record<string, unknown> | undefined;
268
+ entityType?: string | undefined;
269
+ entityId?: string | undefined;
270
+ subEntityId?: string | undefined;
271
+ route?: string | undefined;
272
+ }, {
273
+ params?: Record<string, unknown> | undefined;
274
+ entityType?: string | undefined;
275
+ entityId?: string | undefined;
276
+ subEntityId?: string | undefined;
277
+ route?: string | undefined;
278
+ }>>;
279
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
280
+ receivedAt: z.ZodString;
281
+ viewedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
282
+ dedupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
283
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
284
+ autoDeleteAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
285
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
286
+ createdBy: z.ZodOptional<z.ZodObject<{
287
+ type: z.ZodEnum<["user", "system", "automation", "ai"]>;
288
+ id: z.ZodOptional<z.ZodString>;
289
+ name: z.ZodOptional<z.ZodString>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ type: "user" | "system" | "automation" | "ai";
292
+ name?: string | undefined;
293
+ id?: string | undefined;
294
+ }, {
295
+ type: "user" | "system" | "automation" | "ai";
296
+ name?: string | undefined;
297
+ id?: string | undefined;
298
+ }>>;
299
+ version: z.ZodOptional<z.ZodNumber>;
300
+ createdAt: z.ZodString;
301
+ updatedAt: z.ZodString;
302
+ }, z.ZodTypeAny, "passthrough">>;
303
+ export declare const zCreateNotifUserInputSchema: z.ZodObject<{
304
+ userId: z.ZodString;
305
+ tenant: z.ZodObject<{
306
+ id: z.ZodString;
307
+ display_name: z.ZodString;
308
+ }, "strip", z.ZodTypeAny, {
309
+ id: string;
310
+ display_name: string;
311
+ }, {
312
+ id: string;
313
+ display_name: string;
314
+ }>;
315
+ level: z.ZodOptional<z.ZodEnum<["info", "success", "warning", "error"]>>;
316
+ category: z.ZodString;
317
+ title: z.ZodString;
318
+ body: z.ZodString;
319
+ source: z.ZodOptional<z.ZodObject<{
320
+ module: z.ZodString;
321
+ event: z.ZodString;
322
+ actorType: z.ZodOptional<z.ZodEnum<["user", "system", "automation", "ai"]>>;
323
+ actorId: z.ZodOptional<z.ZodString>;
324
+ actorName: z.ZodOptional<z.ZodString>;
325
+ }, "strip", z.ZodTypeAny, {
326
+ module: string;
327
+ event: string;
328
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
329
+ actorId?: string | undefined;
330
+ actorName?: string | undefined;
331
+ }, {
332
+ module: string;
333
+ event: string;
334
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
335
+ actorId?: string | undefined;
336
+ actorName?: string | undefined;
337
+ }>>;
338
+ target: z.ZodOptional<z.ZodObject<{
339
+ entityType: z.ZodOptional<z.ZodString>;
340
+ entityId: z.ZodOptional<z.ZodString>;
341
+ subEntityId: z.ZodOptional<z.ZodString>;
342
+ route: z.ZodOptional<z.ZodString>;
343
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
344
+ }, "strip", z.ZodTypeAny, {
345
+ params?: Record<string, unknown> | undefined;
346
+ entityType?: string | undefined;
347
+ entityId?: string | undefined;
348
+ subEntityId?: string | undefined;
349
+ route?: string | undefined;
350
+ }, {
351
+ params?: Record<string, unknown> | undefined;
352
+ entityType?: string | undefined;
353
+ entityId?: string | undefined;
354
+ subEntityId?: string | undefined;
355
+ route?: string | undefined;
356
+ }>>;
357
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
358
+ dedupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
359
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
360
+ autoDeleteAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
361
+ createdBy: z.ZodOptional<z.ZodObject<{
362
+ type: z.ZodEnum<["user", "system", "automation", "ai"]>;
363
+ id: z.ZodOptional<z.ZodString>;
364
+ name: z.ZodOptional<z.ZodString>;
365
+ }, "strip", z.ZodTypeAny, {
366
+ type: "user" | "system" | "automation" | "ai";
367
+ name?: string | undefined;
368
+ id?: string | undefined;
369
+ }, {
370
+ type: "user" | "system" | "automation" | "ai";
371
+ name?: string | undefined;
372
+ id?: string | undefined;
373
+ }>>;
374
+ }, "strip", z.ZodTypeAny, {
375
+ tenant: {
376
+ id: string;
377
+ display_name: string;
378
+ };
379
+ title: string;
380
+ category: string;
381
+ userId: string;
382
+ body: string;
383
+ source?: {
384
+ module: string;
385
+ event: string;
386
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
387
+ actorId?: string | undefined;
388
+ actorName?: string | undefined;
389
+ } | undefined;
390
+ metadata?: Record<string, unknown> | undefined;
391
+ level?: "success" | "error" | "info" | "warning" | undefined;
392
+ target?: {
393
+ params?: Record<string, unknown> | undefined;
394
+ entityType?: string | undefined;
395
+ entityId?: string | undefined;
396
+ subEntityId?: string | undefined;
397
+ route?: string | undefined;
398
+ } | undefined;
399
+ dedupKey?: string | null | undefined;
400
+ expiresAt?: string | null | undefined;
401
+ autoDeleteAt?: string | null | undefined;
402
+ createdBy?: {
403
+ type: "user" | "system" | "automation" | "ai";
404
+ name?: string | undefined;
405
+ id?: string | undefined;
406
+ } | undefined;
407
+ }, {
408
+ tenant: {
409
+ id: string;
410
+ display_name: string;
411
+ };
412
+ title: string;
413
+ category: string;
414
+ userId: string;
415
+ body: string;
416
+ source?: {
417
+ module: string;
418
+ event: string;
419
+ actorType?: "user" | "system" | "automation" | "ai" | undefined;
420
+ actorId?: string | undefined;
421
+ actorName?: string | undefined;
422
+ } | undefined;
423
+ metadata?: Record<string, unknown> | undefined;
424
+ level?: "success" | "error" | "info" | "warning" | undefined;
425
+ target?: {
426
+ params?: Record<string, unknown> | undefined;
427
+ entityType?: string | undefined;
428
+ entityId?: string | undefined;
429
+ subEntityId?: string | undefined;
430
+ route?: string | undefined;
431
+ } | undefined;
432
+ dedupKey?: string | null | undefined;
433
+ expiresAt?: string | null | undefined;
434
+ autoDeleteAt?: string | null | undefined;
435
+ createdBy?: {
436
+ type: "user" | "system" | "automation" | "ai";
437
+ name?: string | undefined;
438
+ id?: string | undefined;
439
+ } | undefined;
440
+ }>;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zCreateNotifUserInputSchema = exports.zNotifUserSchema = exports.zNotifUserCreatedBySchema = exports.zNotifUserTargetSchema = exports.zNotifUserSourceSchema = exports.zNotifUserTenantRefSchema = exports.zNotifUserLevelSchema = exports.zNotifUserStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ // ---- Primitives ----
6
+ exports.zNotifUserStatusSchema = zod_1.z.enum(["received", "viewed"]);
7
+ exports.zNotifUserLevelSchema = zod_1.z.enum([
8
+ "info",
9
+ "success",
10
+ "warning",
11
+ "error",
12
+ ]);
13
+ // ---- Sub-schemas ----
14
+ exports.zNotifUserTenantRefSchema = zod_1.z.object({
15
+ id: zod_1.z.string().min(1),
16
+ display_name: zod_1.z.string().min(1),
17
+ });
18
+ exports.zNotifUserSourceSchema = zod_1.z.object({
19
+ module: zod_1.z.string().min(1),
20
+ event: zod_1.z.string().min(1),
21
+ actorType: zod_1.z
22
+ .enum(["user", "system", "automation", "ai"])
23
+ .optional(),
24
+ actorId: zod_1.z.string().optional(),
25
+ actorName: zod_1.z.string().optional(),
26
+ });
27
+ exports.zNotifUserTargetSchema = zod_1.z.object({
28
+ entityType: zod_1.z.string().optional(),
29
+ entityId: zod_1.z.string().optional(),
30
+ subEntityId: zod_1.z.string().optional(),
31
+ route: zod_1.z.string().optional(),
32
+ params: zod_1.z.record(zod_1.z.unknown()).optional(),
33
+ });
34
+ exports.zNotifUserCreatedBySchema = zod_1.z.object({
35
+ type: zod_1.z.enum(["user", "system", "automation", "ai"]),
36
+ id: zod_1.z.string().optional(),
37
+ name: zod_1.z.string().optional(),
38
+ });
39
+ // ---- Main document schema ----
40
+ exports.zNotifUserSchema = zod_1.z
41
+ .object({
42
+ id: zod_1.z.string().min(1),
43
+ userId: zod_1.z.string().min(1),
44
+ tenant: exports.zNotifUserTenantRefSchema,
45
+ status: exports.zNotifUserStatusSchema,
46
+ level: exports.zNotifUserLevelSchema,
47
+ category: zod_1.z.string().min(1),
48
+ title: zod_1.z.string().min(1),
49
+ body: zod_1.z.string().min(1),
50
+ source: exports.zNotifUserSourceSchema.optional(),
51
+ target: exports.zNotifUserTargetSchema.optional(),
52
+ metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
53
+ receivedAt: zod_1.z.string(),
54
+ viewedAt: zod_1.z.string().nullable().optional(),
55
+ dedupKey: zod_1.z.string().nullable().optional(),
56
+ expiresAt: zod_1.z.string().nullable().optional(),
57
+ autoDeleteAt: zod_1.z.string().nullable().optional(),
58
+ deletedAt: zod_1.z.string().nullable().optional(),
59
+ createdBy: exports.zNotifUserCreatedBySchema.optional(),
60
+ version: zod_1.z.number().optional(),
61
+ createdAt: zod_1.z.string(),
62
+ updatedAt: zod_1.z.string(),
63
+ })
64
+ .passthrough();
65
+ // ---- Creation input schema ----
66
+ exports.zCreateNotifUserInputSchema = zod_1.z.object({
67
+ userId: zod_1.z.string().min(1),
68
+ tenant: exports.zNotifUserTenantRefSchema,
69
+ level: exports.zNotifUserLevelSchema.optional(),
70
+ category: zod_1.z.string().min(1),
71
+ title: zod_1.z.string().min(1),
72
+ body: zod_1.z.string().min(1),
73
+ source: exports.zNotifUserSourceSchema.optional(),
74
+ target: exports.zNotifUserTargetSchema.optional(),
75
+ metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
76
+ dedupKey: zod_1.z.string().nullable().optional(),
77
+ expiresAt: zod_1.z.string().nullable().optional(),
78
+ autoDeleteAt: zod_1.z.string().nullable().optional(),
79
+ createdBy: exports.zNotifUserCreatedBySchema.optional(),
80
+ });
@@ -0,0 +1,89 @@
1
+ import { z } from "zod";
2
+
3
+ // ---- Primitives ----
4
+
5
+ export const zNotifUserStatusSchema = z.enum(["received", "viewed"]);
6
+
7
+ export const zNotifUserLevelSchema = z.enum([
8
+ "info",
9
+ "success",
10
+ "warning",
11
+ "error",
12
+ ]);
13
+
14
+ // ---- Sub-schemas ----
15
+
16
+ export const zNotifUserTenantRefSchema = z.object({
17
+ id: z.string().min(1),
18
+ display_name: z.string().min(1),
19
+ });
20
+
21
+ export const zNotifUserSourceSchema = z.object({
22
+ module: z.string().min(1),
23
+ event: z.string().min(1),
24
+ actorType: z
25
+ .enum(["user", "system", "automation", "ai"])
26
+ .optional(),
27
+ actorId: z.string().optional(),
28
+ actorName: z.string().optional(),
29
+ });
30
+
31
+ export const zNotifUserTargetSchema = z.object({
32
+ entityType: z.string().optional(),
33
+ entityId: z.string().optional(),
34
+ subEntityId: z.string().optional(),
35
+ route: z.string().optional(),
36
+ params: z.record(z.unknown()).optional(),
37
+ });
38
+
39
+ export const zNotifUserCreatedBySchema = z.object({
40
+ type: z.enum(["user", "system", "automation", "ai"]),
41
+ id: z.string().optional(),
42
+ name: z.string().optional(),
43
+ });
44
+
45
+ // ---- Main document schema ----
46
+
47
+ export const zNotifUserSchema = z
48
+ .object({
49
+ id: z.string().min(1),
50
+ userId: z.string().min(1),
51
+ tenant: zNotifUserTenantRefSchema,
52
+ status: zNotifUserStatusSchema,
53
+ level: zNotifUserLevelSchema,
54
+ category: z.string().min(1),
55
+ title: z.string().min(1),
56
+ body: z.string().min(1),
57
+ source: zNotifUserSourceSchema.optional(),
58
+ target: zNotifUserTargetSchema.optional(),
59
+ metadata: z.record(z.unknown()).optional(),
60
+ receivedAt: z.string(),
61
+ viewedAt: z.string().nullable().optional(),
62
+ dedupKey: z.string().nullable().optional(),
63
+ expiresAt: z.string().nullable().optional(),
64
+ autoDeleteAt: z.string().nullable().optional(),
65
+ deletedAt: z.string().nullable().optional(),
66
+ createdBy: zNotifUserCreatedBySchema.optional(),
67
+ version: z.number().optional(),
68
+ createdAt: z.string(),
69
+ updatedAt: z.string(),
70
+ })
71
+ .passthrough();
72
+
73
+ // ---- Creation input schema ----
74
+
75
+ export const zCreateNotifUserInputSchema = z.object({
76
+ userId: z.string().min(1),
77
+ tenant: zNotifUserTenantRefSchema,
78
+ level: zNotifUserLevelSchema.optional(),
79
+ category: z.string().min(1),
80
+ title: z.string().min(1),
81
+ body: z.string().min(1),
82
+ source: zNotifUserSourceSchema.optional(),
83
+ target: zNotifUserTargetSchema.optional(),
84
+ metadata: z.record(z.unknown()).optional(),
85
+ dedupKey: z.string().nullable().optional(),
86
+ expiresAt: z.string().nullable().optional(),
87
+ autoDeleteAt: z.string().nullable().optional(),
88
+ createdBy: zNotifUserCreatedBySchema.optional(),
89
+ });
package/dist/index.js CHANGED
@@ -34,6 +34,7 @@ __exportStar(require("./types/evo-tags"), exports);
34
34
  __exportStar(require("./types/evo-task"), exports);
35
35
  __exportStar(require("./types/evo-survey"), exports);
36
36
  __exportStar(require("./types/evo-finops"), exports);
37
+ __exportStar(require("./types/evo-notif-user"), exports);
37
38
  // zod schemas
38
39
  __exportStar(require("./apps/shared/zod-schemas"), exports);
39
40
  __exportStar(require("./apps/evo-core/zod-schemas"), exports);
@@ -56,3 +57,4 @@ __exportStar(require("./apps/evo-tags/zod-schemas"), exports);
56
57
  __exportStar(require("./apps/evo-task/zod-schemas"), exports);
57
58
  __exportStar(require("./apps/evo-survey/zod-schemas"), exports);
58
59
  __exportStar(require("./apps/evo-finops/zod-schemas"), exports);
60
+ __exportStar(require("./apps/evo-notif-user/zod-schemas"), exports);
package/dist/index.ts CHANGED
@@ -18,6 +18,7 @@ export * from "./types/evo-tags";
18
18
  export * from "./types/evo-task";
19
19
  export * from "./types/evo-survey";
20
20
  export * from "./types/evo-finops";
21
+ export * from "./types/evo-notif-user";
21
22
 
22
23
  // zod schemas
23
24
  export * from "./apps/shared/zod-schemas";
@@ -41,3 +42,4 @@ export * from "./apps/evo-tags/zod-schemas";
41
42
  export * from "./apps/evo-task/zod-schemas";
42
43
  export * from "./apps/evo-survey/zod-schemas";
43
44
  export * from "./apps/evo-finops/zod-schemas";
45
+ export * from "./apps/evo-notif-user/zod-schemas";
@@ -0,0 +1,3 @@
1
+ export declare const EVO_NOTIF_USER_APP = "evo-notif-user";
2
+ export declare const NOTIFICATIONS_COLLECTION = "notifications";
3
+ export declare const NOTIF_USER_PUBSUB_TOPIC = "app_evo-notif-user_notifications_created";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // evo-notif-user — Firestore collection constants
3
+ // Path: /users/{userId}/apps/evo-notif-user/notifications/{notificationId}
4
+ //
5
+ // Note: USERS_COLLECTION and APPS_COLLECTION are shared constants
6
+ // already exported from the 'shared' module. Import them from there when needed.
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.NOTIF_USER_PUBSUB_TOPIC = exports.NOTIFICATIONS_COLLECTION = exports.EVO_NOTIF_USER_APP = void 0;
9
+ exports.EVO_NOTIF_USER_APP = "evo-notif-user";
10
+ exports.NOTIFICATIONS_COLLECTION = "notifications";
11
+ // PubSub topic published on every new notification document
12
+ exports.NOTIF_USER_PUBSUB_TOPIC = "app_evo-notif-user_notifications_created";
@@ -0,0 +1,11 @@
1
+ // evo-notif-user — Firestore collection constants
2
+ // Path: /users/{userId}/apps/evo-notif-user/notifications/{notificationId}
3
+ //
4
+ // Note: USERS_COLLECTION and APPS_COLLECTION are shared constants
5
+ // already exported from the 'shared' module. Import them from there when needed.
6
+
7
+ export const EVO_NOTIF_USER_APP = "evo-notif-user";
8
+ export const NOTIFICATIONS_COLLECTION = "notifications";
9
+
10
+ // PubSub topic published on every new notification document
11
+ export const NOTIF_USER_PUBSUB_TOPIC = "app_evo-notif-user_notifications_created";
@@ -0,0 +1,82 @@
1
+ export * from "./fb_collections";
2
+ export declare const EvoNotifUserPermissions: {
3
+ readonly List: "evo_notif_user_read";
4
+ readonly Get: "evo_notif_user_read";
5
+ readonly Create: "evo_notif_user_write";
6
+ readonly Update: "evo_notif_user_write";
7
+ readonly Delete: "evo_notif_user_write";
8
+ };
9
+ export type EvoNotifUserPermissions = (typeof EvoNotifUserPermissions)[keyof typeof EvoNotifUserPermissions];
10
+ export type NotifUserStatus = "received" | "viewed";
11
+ export type NotifUserLevel = "info" | "success" | "warning" | "error";
12
+ export interface INotifUserTenantRef {
13
+ id: string;
14
+ display_name: string;
15
+ }
16
+ export interface INotifUserSource {
17
+ module: string;
18
+ event: string;
19
+ actorType?: "user" | "system" | "automation" | "ai";
20
+ actorId?: string;
21
+ actorName?: string;
22
+ }
23
+ export interface INotifUserTarget {
24
+ entityType?: string;
25
+ entityId?: string;
26
+ subEntityId?: string;
27
+ route?: string;
28
+ params?: Record<string, unknown>;
29
+ }
30
+ export interface INotifUserCreatedBy {
31
+ type: "user" | "system" | "automation" | "ai";
32
+ id?: string;
33
+ name?: string;
34
+ }
35
+ export interface INotifUser extends Record<string, unknown> {
36
+ readonly id: string;
37
+ userId: string;
38
+ tenant: INotifUserTenantRef;
39
+ status: NotifUserStatus;
40
+ level: NotifUserLevel;
41
+ category: string;
42
+ title: string;
43
+ body: string;
44
+ source?: INotifUserSource;
45
+ target?: INotifUserTarget;
46
+ metadata?: Record<string, unknown>;
47
+ receivedAt: string;
48
+ viewedAt?: string | null;
49
+ dedupKey?: string | null;
50
+ expiresAt?: string | null;
51
+ autoDeleteAt?: string | null;
52
+ deletedAt?: string | null;
53
+ createdBy?: INotifUserCreatedBy;
54
+ version?: number;
55
+ createdAt: string;
56
+ updatedAt: string;
57
+ }
58
+ export interface ICreateNotifUserInput {
59
+ userId: string;
60
+ tenant: {
61
+ id: string;
62
+ display_name: string;
63
+ };
64
+ level?: NotifUserLevel;
65
+ category: string;
66
+ title: string;
67
+ body: string;
68
+ source?: INotifUserSource;
69
+ target?: INotifUserTarget;
70
+ metadata?: Record<string, unknown>;
71
+ dedupKey?: string | null;
72
+ expiresAt?: string | null;
73
+ autoDeleteAt?: string | null;
74
+ createdBy?: INotifUserCreatedBy;
75
+ }
76
+ export interface INotifUserPubSubMessage {
77
+ userId: string;
78
+ docId: string;
79
+ docPath: string;
80
+ data: Partial<INotifUser>;
81
+ version: number;
82
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.EvoNotifUserPermissions = void 0;
18
+ __exportStar(require("./fb_collections"), exports);
19
+ // ======================================================
20
+ // evo-notif-user — User Notification Module
21
+ //
22
+ // Notifications are user-centric (not tenant-centric).
23
+ // A single user may operate across multiple tenants,
24
+ // so all notifications live inside the user scope.
25
+ //
26
+ // Firestore path:
27
+ // /users/{userId}/apps/evo-notif-user/notifications/{notificationId}
28
+ // ======================================================
29
+ // ---- Permissions ----
30
+ exports.EvoNotifUserPermissions = {
31
+ List: "evo_notif_user_read",
32
+ Get: "evo_notif_user_read",
33
+ Create: "evo_notif_user_write",
34
+ Update: "evo_notif_user_write",
35
+ Delete: "evo_notif_user_write",
36
+ };
@@ -0,0 +1,146 @@
1
+ export * from "./fb_collections";
2
+
3
+ // ======================================================
4
+ // evo-notif-user — User Notification Module
5
+ //
6
+ // Notifications are user-centric (not tenant-centric).
7
+ // A single user may operate across multiple tenants,
8
+ // so all notifications live inside the user scope.
9
+ //
10
+ // Firestore path:
11
+ // /users/{userId}/apps/evo-notif-user/notifications/{notificationId}
12
+ // ======================================================
13
+
14
+ // ---- Permissions ----
15
+
16
+ export const EvoNotifUserPermissions = {
17
+ List: "evo_notif_user_read",
18
+ Get: "evo_notif_user_read",
19
+ Create: "evo_notif_user_write",
20
+ Update: "evo_notif_user_write",
21
+ Delete: "evo_notif_user_write",
22
+ } as const;
23
+
24
+ export type EvoNotifUserPermissions =
25
+ (typeof EvoNotifUserPermissions)[keyof typeof EvoNotifUserPermissions];
26
+
27
+ // ---- Status & Level ----
28
+
29
+ export type NotifUserStatus = "received" | "viewed";
30
+
31
+ export type NotifUserLevel = "info" | "success" | "warning" | "error";
32
+
33
+ // ---- Sub-interfaces ----
34
+
35
+ export interface INotifUserTenantRef {
36
+ id: string;
37
+ display_name: string;
38
+ }
39
+
40
+ export interface INotifUserSource {
41
+ module: string;
42
+ event: string;
43
+ actorType?: "user" | "system" | "automation" | "ai";
44
+ actorId?: string;
45
+ actorName?: string;
46
+ }
47
+
48
+ export interface INotifUserTarget {
49
+ entityType?: string;
50
+ entityId?: string;
51
+ subEntityId?: string;
52
+ route?: string;
53
+ params?: Record<string, unknown>;
54
+ }
55
+
56
+ export interface INotifUserCreatedBy {
57
+ type: "user" | "system" | "automation" | "ai";
58
+ id?: string;
59
+ name?: string;
60
+ }
61
+
62
+ // ---- Main document interface ----
63
+ //
64
+ // Not extending IFireDoc (tenant-scoped) or IFireGlobalDoc (uses snake_case Date timestamps).
65
+ // Defined independently to follow the user-centric, camelCase ISO string convention.
66
+
67
+ export interface INotifUser extends Record<string, unknown> {
68
+ readonly id: string;
69
+
70
+ userId: string;
71
+
72
+ tenant: INotifUserTenantRef;
73
+
74
+ status: NotifUserStatus;
75
+ level: NotifUserLevel;
76
+
77
+ category: string;
78
+
79
+ title: string;
80
+ body: string;
81
+
82
+ source?: INotifUserSource;
83
+ target?: INotifUserTarget;
84
+
85
+ metadata?: Record<string, unknown>;
86
+
87
+ receivedAt: string; // ISO 8601 — when the notification was created
88
+ viewedAt?: string | null; // ISO 8601 — when the user viewed the notification
89
+
90
+ dedupKey?: string | null; // Prevents duplicate notifications from automations
91
+
92
+ expiresAt?: string | null; // Logical expiration — UI may hide after this
93
+ autoDeleteAt?: string | null; // Physical deletion by cleanup job
94
+
95
+ deletedAt?: string | null; // Soft-delete marker
96
+
97
+ createdBy?: INotifUserCreatedBy;
98
+
99
+ version?: number;
100
+
101
+ createdAt: string; // ISO 8601
102
+ updatedAt: string; // ISO 8601
103
+ }
104
+
105
+ // ---- Creation input ----
106
+
107
+ export interface ICreateNotifUserInput {
108
+ userId: string;
109
+
110
+ tenant: {
111
+ id: string;
112
+ display_name: string;
113
+ };
114
+
115
+ level?: NotifUserLevel;
116
+ category: string;
117
+
118
+ title: string;
119
+ body: string;
120
+
121
+ source?: INotifUserSource;
122
+ target?: INotifUserTarget;
123
+
124
+ metadata?: Record<string, unknown>;
125
+
126
+ dedupKey?: string | null;
127
+
128
+ expiresAt?: string | null;
129
+ autoDeleteAt?: string | null;
130
+
131
+ createdBy?: INotifUserCreatedBy;
132
+ }
133
+
134
+ // ---- PubSub message ----
135
+ //
136
+ // Published by the Firestore trigger on every new notification document.
137
+ // Analogous to IReplicationMessage but user-scoped (userId instead of tenant).
138
+ // Enables decoupled subscribers (push, FCM, websocket, analytics, etc.).
139
+
140
+ export interface INotifUserPubSubMessage {
141
+ userId: string; // notification owner
142
+ docId: string; // notificationId
143
+ docPath: string; // full Firestore path
144
+ data: Partial<INotifUser>; // full document snapshot
145
+ version: number;
146
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.236",
3
+ "version": "1.3.237",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",