@closerepo/notification-contracts 1.11.0 → 1.13.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.
@@ -0,0 +1,1315 @@
1
+ import { z } from "zod";
2
+ //#region src/index.d.ts
3
+ declare const notificationMessageVariantKeys: readonly ["source", "zh-CN"];
4
+ declare const notificationDeliveryChannelKeys: readonly ["qq", "tg", "wechat", "lark"];
5
+ type NotificationDeliveryChannelKey = (typeof notificationDeliveryChannelKeys)[number];
6
+ declare const structuredMessageSectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
+ key: z.ZodString;
8
+ type: z.ZodLiteral<"text">;
9
+ label: z.ZodOptional<z.ZodString>;
10
+ value: z.ZodString;
11
+ }, z.core.$strict>, z.ZodObject<{
12
+ key: z.ZodString;
13
+ type: z.ZodLiteral<"fields">;
14
+ items: z.ZodArray<z.ZodObject<{
15
+ label: z.ZodString;
16
+ value: z.ZodString;
17
+ }, z.core.$strict>>;
18
+ }, z.core.$strict>], "type">;
19
+ declare const notificationMessageBodySchema: z.ZodObject<{
20
+ label: z.ZodOptional<z.ZodString>;
21
+ value: z.ZodString;
22
+ }, z.core.$strict>;
23
+ declare const notificationDeliveryRequestV6Schema: z.ZodObject<{
24
+ contractVersion: z.ZodLiteral<6>;
25
+ message: z.ZodObject<{
26
+ type: z.ZodLiteral<"structured_notification">;
27
+ links: z.ZodArray<z.ZodObject<{
28
+ key: z.ZodString;
29
+ url: z.ZodString;
30
+ }, z.core.$strict>>;
31
+ bodies: z.ZodArray<z.ZodObject<{
32
+ key: z.ZodString;
33
+ value: z.ZodString;
34
+ }, z.core.$strict>>;
35
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
36
+ key: z.ZodLiteral<"source">;
37
+ locale: z.ZodLiteral<"und">;
38
+ title: z.ZodString;
39
+ linkLabels: z.ZodArray<z.ZodObject<{
40
+ key: z.ZodString;
41
+ label: z.ZodString;
42
+ }, z.core.$strict>>;
43
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
44
+ key: z.ZodString;
45
+ type: z.ZodLiteral<"text">;
46
+ label: z.ZodOptional<z.ZodString>;
47
+ value: z.ZodString;
48
+ }, z.core.$strict>, z.ZodObject<{
49
+ key: z.ZodString;
50
+ type: z.ZodLiteral<"fields">;
51
+ items: z.ZodArray<z.ZodObject<{
52
+ label: z.ZodString;
53
+ value: z.ZodString;
54
+ }, z.core.$strict>>;
55
+ }, z.core.$strict>], "type">>;
56
+ bodyRefs: z.ZodArray<z.ZodObject<{
57
+ key: z.ZodString;
58
+ label: z.ZodOptional<z.ZodString>;
59
+ }, z.core.$strict>>;
60
+ footer: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strict>, z.ZodObject<{
62
+ key: z.ZodLiteral<"zh-CN">;
63
+ locale: z.ZodLiteral<"zh-CN">;
64
+ title: z.ZodString;
65
+ linkLabels: z.ZodArray<z.ZodObject<{
66
+ key: z.ZodString;
67
+ label: z.ZodString;
68
+ }, z.core.$strict>>;
69
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
70
+ key: z.ZodString;
71
+ type: z.ZodLiteral<"text">;
72
+ label: z.ZodOptional<z.ZodString>;
73
+ value: z.ZodString;
74
+ }, z.core.$strict>, z.ZodObject<{
75
+ key: z.ZodString;
76
+ type: z.ZodLiteral<"fields">;
77
+ items: z.ZodArray<z.ZodObject<{
78
+ label: z.ZodString;
79
+ value: z.ZodString;
80
+ }, z.core.$strict>>;
81
+ }, z.core.$strict>], "type">>;
82
+ bodyRefs: z.ZodArray<z.ZodObject<{
83
+ key: z.ZodString;
84
+ label: z.ZodOptional<z.ZodString>;
85
+ }, z.core.$strict>>;
86
+ footer: z.ZodOptional<z.ZodString>;
87
+ }, z.core.$strict>], "key">>;
88
+ }, z.core.$strict>;
89
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
90
+ eventId: z.ZodString;
91
+ producer: z.ZodObject<{
92
+ key: z.ZodString;
93
+ environment: z.ZodString;
94
+ }, z.core.$strict>;
95
+ routeKey: z.ZodString;
96
+ occurredAt: z.ZodString;
97
+ requestedAt: z.ZodString;
98
+ deliverBy: z.ZodString;
99
+ subject: z.ZodObject<{
100
+ type: z.ZodString;
101
+ id: z.ZodString;
102
+ revision: z.ZodNumber;
103
+ }, z.core.$strict>;
104
+ }, z.core.$strict>;
105
+ /** One event matches multiple subscriptions; destinations are unioned before admission. */
106
+ declare const notificationDeliveryRequestV7Schema: z.ZodObject<{
107
+ contractVersion: z.ZodLiteral<7>;
108
+ routeKeys: z.ZodArray<z.ZodString>;
109
+ message: z.ZodObject<{
110
+ type: z.ZodLiteral<"structured_notification">;
111
+ links: z.ZodArray<z.ZodObject<{
112
+ key: z.ZodString;
113
+ url: z.ZodString;
114
+ }, z.core.$strict>>;
115
+ bodies: z.ZodArray<z.ZodObject<{
116
+ key: z.ZodString;
117
+ value: z.ZodString;
118
+ }, z.core.$strict>>;
119
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
120
+ key: z.ZodLiteral<"source">;
121
+ locale: z.ZodLiteral<"und">;
122
+ title: z.ZodString;
123
+ linkLabels: z.ZodArray<z.ZodObject<{
124
+ key: z.ZodString;
125
+ label: z.ZodString;
126
+ }, z.core.$strict>>;
127
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
128
+ key: z.ZodString;
129
+ type: z.ZodLiteral<"text">;
130
+ label: z.ZodOptional<z.ZodString>;
131
+ value: z.ZodString;
132
+ }, z.core.$strict>, z.ZodObject<{
133
+ key: z.ZodString;
134
+ type: z.ZodLiteral<"fields">;
135
+ items: z.ZodArray<z.ZodObject<{
136
+ label: z.ZodString;
137
+ value: z.ZodString;
138
+ }, z.core.$strict>>;
139
+ }, z.core.$strict>], "type">>;
140
+ bodyRefs: z.ZodArray<z.ZodObject<{
141
+ key: z.ZodString;
142
+ label: z.ZodOptional<z.ZodString>;
143
+ }, z.core.$strict>>;
144
+ footer: z.ZodOptional<z.ZodString>;
145
+ }, z.core.$strict>, z.ZodObject<{
146
+ key: z.ZodLiteral<"zh-CN">;
147
+ locale: z.ZodLiteral<"zh-CN">;
148
+ title: z.ZodString;
149
+ linkLabels: z.ZodArray<z.ZodObject<{
150
+ key: z.ZodString;
151
+ label: z.ZodString;
152
+ }, z.core.$strict>>;
153
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
154
+ key: z.ZodString;
155
+ type: z.ZodLiteral<"text">;
156
+ label: z.ZodOptional<z.ZodString>;
157
+ value: z.ZodString;
158
+ }, z.core.$strict>, z.ZodObject<{
159
+ key: z.ZodString;
160
+ type: z.ZodLiteral<"fields">;
161
+ items: z.ZodArray<z.ZodObject<{
162
+ label: z.ZodString;
163
+ value: z.ZodString;
164
+ }, z.core.$strict>>;
165
+ }, z.core.$strict>], "type">>;
166
+ bodyRefs: z.ZodArray<z.ZodObject<{
167
+ key: z.ZodString;
168
+ label: z.ZodOptional<z.ZodString>;
169
+ }, z.core.$strict>>;
170
+ footer: z.ZodOptional<z.ZodString>;
171
+ }, z.core.$strict>], "key">>;
172
+ }, z.core.$strict>;
173
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
174
+ eventId: z.ZodString;
175
+ producer: z.ZodObject<{
176
+ key: z.ZodString;
177
+ environment: z.ZodString;
178
+ }, z.core.$strict>;
179
+ occurredAt: z.ZodString;
180
+ requestedAt: z.ZodString;
181
+ deliverBy: z.ZodString;
182
+ subject: z.ZodObject<{
183
+ type: z.ZodString;
184
+ id: z.ZodString;
185
+ revision: z.ZodNumber;
186
+ }, z.core.$strict>;
187
+ }, z.core.$strict>;
188
+ type NotificationDeliveryRequestV7 = z.infer<typeof notificationDeliveryRequestV7Schema>;
189
+ /** Frozen channel copy shares message bodies and links; omitted channels use default variants. */
190
+ declare const notificationDeliveryRequestV8Schema: z.ZodObject<{
191
+ contractVersion: z.ZodLiteral<8>;
192
+ message: z.ZodObject<{
193
+ type: z.ZodLiteral<"structured_notification">;
194
+ links: z.ZodArray<z.ZodObject<{
195
+ key: z.ZodString;
196
+ url: z.ZodString;
197
+ }, z.core.$strict>>;
198
+ bodies: z.ZodArray<z.ZodObject<{
199
+ key: z.ZodString;
200
+ value: z.ZodString;
201
+ }, z.core.$strict>>;
202
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
203
+ key: z.ZodLiteral<"source">;
204
+ locale: z.ZodLiteral<"und">;
205
+ title: z.ZodString;
206
+ linkLabels: z.ZodArray<z.ZodObject<{
207
+ key: z.ZodString;
208
+ label: z.ZodString;
209
+ }, z.core.$strict>>;
210
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
211
+ key: z.ZodString;
212
+ type: z.ZodLiteral<"text">;
213
+ label: z.ZodOptional<z.ZodString>;
214
+ value: z.ZodString;
215
+ }, z.core.$strict>, z.ZodObject<{
216
+ key: z.ZodString;
217
+ type: z.ZodLiteral<"fields">;
218
+ items: z.ZodArray<z.ZodObject<{
219
+ label: z.ZodString;
220
+ value: z.ZodString;
221
+ }, z.core.$strict>>;
222
+ }, z.core.$strict>], "type">>;
223
+ bodyRefs: z.ZodArray<z.ZodObject<{
224
+ key: z.ZodString;
225
+ label: z.ZodOptional<z.ZodString>;
226
+ }, z.core.$strict>>;
227
+ footer: z.ZodOptional<z.ZodString>;
228
+ }, z.core.$strict>, z.ZodObject<{
229
+ key: z.ZodLiteral<"zh-CN">;
230
+ locale: z.ZodLiteral<"zh-CN">;
231
+ title: z.ZodString;
232
+ linkLabels: z.ZodArray<z.ZodObject<{
233
+ key: z.ZodString;
234
+ label: z.ZodString;
235
+ }, z.core.$strict>>;
236
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
237
+ key: z.ZodString;
238
+ type: z.ZodLiteral<"text">;
239
+ label: z.ZodOptional<z.ZodString>;
240
+ value: z.ZodString;
241
+ }, z.core.$strict>, z.ZodObject<{
242
+ key: z.ZodString;
243
+ type: z.ZodLiteral<"fields">;
244
+ items: z.ZodArray<z.ZodObject<{
245
+ label: z.ZodString;
246
+ value: z.ZodString;
247
+ }, z.core.$strict>>;
248
+ }, z.core.$strict>], "type">>;
249
+ bodyRefs: z.ZodArray<z.ZodObject<{
250
+ key: z.ZodString;
251
+ label: z.ZodOptional<z.ZodString>;
252
+ }, z.core.$strict>>;
253
+ footer: z.ZodOptional<z.ZodString>;
254
+ }, z.core.$strict>], "key">>;
255
+ channelVariants: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
256
+ qq: "qq";
257
+ tg: "tg";
258
+ wechat: "wechat";
259
+ lark: "lark";
260
+ }> & z.core.$partial, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
261
+ key: z.ZodLiteral<"source">;
262
+ locale: z.ZodLiteral<"und">;
263
+ title: z.ZodString;
264
+ linkLabels: z.ZodArray<z.ZodObject<{
265
+ key: z.ZodString;
266
+ label: z.ZodString;
267
+ }, z.core.$strict>>;
268
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
269
+ key: z.ZodString;
270
+ type: z.ZodLiteral<"text">;
271
+ label: z.ZodOptional<z.ZodString>;
272
+ value: z.ZodString;
273
+ }, z.core.$strict>, z.ZodObject<{
274
+ key: z.ZodString;
275
+ type: z.ZodLiteral<"fields">;
276
+ items: z.ZodArray<z.ZodObject<{
277
+ label: z.ZodString;
278
+ value: z.ZodString;
279
+ }, z.core.$strict>>;
280
+ }, z.core.$strict>], "type">>;
281
+ bodyRefs: z.ZodArray<z.ZodObject<{
282
+ key: z.ZodString;
283
+ label: z.ZodOptional<z.ZodString>;
284
+ }, z.core.$strict>>;
285
+ footer: z.ZodOptional<z.ZodString>;
286
+ }, z.core.$strict>, z.ZodObject<{
287
+ key: z.ZodLiteral<"zh-CN">;
288
+ locale: z.ZodLiteral<"zh-CN">;
289
+ title: z.ZodString;
290
+ linkLabels: z.ZodArray<z.ZodObject<{
291
+ key: z.ZodString;
292
+ label: z.ZodString;
293
+ }, z.core.$strict>>;
294
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
295
+ key: z.ZodString;
296
+ type: z.ZodLiteral<"text">;
297
+ label: z.ZodOptional<z.ZodString>;
298
+ value: z.ZodString;
299
+ }, z.core.$strict>, z.ZodObject<{
300
+ key: z.ZodString;
301
+ type: z.ZodLiteral<"fields">;
302
+ items: z.ZodArray<z.ZodObject<{
303
+ label: z.ZodString;
304
+ value: z.ZodString;
305
+ }, z.core.$strict>>;
306
+ }, z.core.$strict>], "type">>;
307
+ bodyRefs: z.ZodArray<z.ZodObject<{
308
+ key: z.ZodString;
309
+ label: z.ZodOptional<z.ZodString>;
310
+ }, z.core.$strict>>;
311
+ footer: z.ZodOptional<z.ZodString>;
312
+ }, z.core.$strict>], "key">>>>;
313
+ }, z.core.$strict>;
314
+ routeKeys: z.ZodArray<z.ZodString>;
315
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
316
+ eventId: z.ZodString;
317
+ producer: z.ZodObject<{
318
+ key: z.ZodString;
319
+ environment: z.ZodString;
320
+ }, z.core.$strict>;
321
+ occurredAt: z.ZodString;
322
+ requestedAt: z.ZodString;
323
+ deliverBy: z.ZodString;
324
+ subject: z.ZodObject<{
325
+ type: z.ZodString;
326
+ id: z.ZodString;
327
+ revision: z.ZodNumber;
328
+ }, z.core.$strict>;
329
+ }, z.core.$strict>;
330
+ type NotificationDeliveryRequestV8 = z.infer<typeof notificationDeliveryRequestV8Schema>;
331
+ /** Audience and browser copy are additive; historical channel contracts keep their exact validation. */
332
+ declare const notificationDeliveryRequestV9Schema: z.ZodObject<{
333
+ contractVersion: z.ZodLiteral<9>;
334
+ audience: z.ZodOptional<z.ZodObject<{
335
+ topics: z.ZodArray<z.ZodString>;
336
+ }, z.core.$strict>>;
337
+ browserMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
338
+ locale: z.ZodString;
339
+ contentLocale: z.ZodString;
340
+ title: z.ZodString;
341
+ body: z.ZodString;
342
+ url: z.ZodString;
343
+ }, z.core.$strict>>>;
344
+ message: z.ZodObject<{
345
+ type: z.ZodLiteral<"structured_notification">;
346
+ links: z.ZodArray<z.ZodObject<{
347
+ key: z.ZodString;
348
+ url: z.ZodString;
349
+ }, z.core.$strict>>;
350
+ bodies: z.ZodArray<z.ZodObject<{
351
+ key: z.ZodString;
352
+ value: z.ZodString;
353
+ }, z.core.$strict>>;
354
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
355
+ key: z.ZodLiteral<"source">;
356
+ locale: z.ZodLiteral<"und">;
357
+ title: z.ZodString;
358
+ linkLabels: z.ZodArray<z.ZodObject<{
359
+ key: z.ZodString;
360
+ label: z.ZodString;
361
+ }, z.core.$strict>>;
362
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
363
+ key: z.ZodString;
364
+ type: z.ZodLiteral<"text">;
365
+ label: z.ZodOptional<z.ZodString>;
366
+ value: z.ZodString;
367
+ }, z.core.$strict>, z.ZodObject<{
368
+ key: z.ZodString;
369
+ type: z.ZodLiteral<"fields">;
370
+ items: z.ZodArray<z.ZodObject<{
371
+ label: z.ZodString;
372
+ value: z.ZodString;
373
+ }, z.core.$strict>>;
374
+ }, z.core.$strict>], "type">>;
375
+ bodyRefs: z.ZodArray<z.ZodObject<{
376
+ key: z.ZodString;
377
+ label: z.ZodOptional<z.ZodString>;
378
+ }, z.core.$strict>>;
379
+ footer: z.ZodOptional<z.ZodString>;
380
+ }, z.core.$strict>, z.ZodObject<{
381
+ key: z.ZodLiteral<"zh-CN">;
382
+ locale: z.ZodLiteral<"zh-CN">;
383
+ title: z.ZodString;
384
+ linkLabels: z.ZodArray<z.ZodObject<{
385
+ key: z.ZodString;
386
+ label: z.ZodString;
387
+ }, z.core.$strict>>;
388
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
389
+ key: z.ZodString;
390
+ type: z.ZodLiteral<"text">;
391
+ label: z.ZodOptional<z.ZodString>;
392
+ value: z.ZodString;
393
+ }, z.core.$strict>, z.ZodObject<{
394
+ key: z.ZodString;
395
+ type: z.ZodLiteral<"fields">;
396
+ items: z.ZodArray<z.ZodObject<{
397
+ label: z.ZodString;
398
+ value: z.ZodString;
399
+ }, z.core.$strict>>;
400
+ }, z.core.$strict>], "type">>;
401
+ bodyRefs: z.ZodArray<z.ZodObject<{
402
+ key: z.ZodString;
403
+ label: z.ZodOptional<z.ZodString>;
404
+ }, z.core.$strict>>;
405
+ footer: z.ZodOptional<z.ZodString>;
406
+ }, z.core.$strict>], "key">>;
407
+ channelVariants: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
408
+ qq: "qq";
409
+ tg: "tg";
410
+ wechat: "wechat";
411
+ lark: "lark";
412
+ }> & z.core.$partial, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
413
+ key: z.ZodLiteral<"source">;
414
+ locale: z.ZodLiteral<"und">;
415
+ title: z.ZodString;
416
+ linkLabels: z.ZodArray<z.ZodObject<{
417
+ key: z.ZodString;
418
+ label: z.ZodString;
419
+ }, z.core.$strict>>;
420
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
421
+ key: z.ZodString;
422
+ type: z.ZodLiteral<"text">;
423
+ label: z.ZodOptional<z.ZodString>;
424
+ value: z.ZodString;
425
+ }, z.core.$strict>, z.ZodObject<{
426
+ key: z.ZodString;
427
+ type: z.ZodLiteral<"fields">;
428
+ items: z.ZodArray<z.ZodObject<{
429
+ label: z.ZodString;
430
+ value: z.ZodString;
431
+ }, z.core.$strict>>;
432
+ }, z.core.$strict>], "type">>;
433
+ bodyRefs: z.ZodArray<z.ZodObject<{
434
+ key: z.ZodString;
435
+ label: z.ZodOptional<z.ZodString>;
436
+ }, z.core.$strict>>;
437
+ footer: z.ZodOptional<z.ZodString>;
438
+ }, z.core.$strict>, z.ZodObject<{
439
+ key: z.ZodLiteral<"zh-CN">;
440
+ locale: z.ZodLiteral<"zh-CN">;
441
+ title: z.ZodString;
442
+ linkLabels: z.ZodArray<z.ZodObject<{
443
+ key: z.ZodString;
444
+ label: z.ZodString;
445
+ }, z.core.$strict>>;
446
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
447
+ key: z.ZodString;
448
+ type: z.ZodLiteral<"text">;
449
+ label: z.ZodOptional<z.ZodString>;
450
+ value: z.ZodString;
451
+ }, z.core.$strict>, z.ZodObject<{
452
+ key: z.ZodString;
453
+ type: z.ZodLiteral<"fields">;
454
+ items: z.ZodArray<z.ZodObject<{
455
+ label: z.ZodString;
456
+ value: z.ZodString;
457
+ }, z.core.$strict>>;
458
+ }, z.core.$strict>], "type">>;
459
+ bodyRefs: z.ZodArray<z.ZodObject<{
460
+ key: z.ZodString;
461
+ label: z.ZodOptional<z.ZodString>;
462
+ }, z.core.$strict>>;
463
+ footer: z.ZodOptional<z.ZodString>;
464
+ }, z.core.$strict>], "key">>>>;
465
+ }, z.core.$strict>;
466
+ routeKeys: z.ZodArray<z.ZodString>;
467
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
468
+ eventId: z.ZodString;
469
+ producer: z.ZodObject<{
470
+ key: z.ZodString;
471
+ environment: z.ZodString;
472
+ }, z.core.$strict>;
473
+ occurredAt: z.ZodString;
474
+ requestedAt: z.ZodString;
475
+ deliverBy: z.ZodString;
476
+ subject: z.ZodObject<{
477
+ type: z.ZodString;
478
+ id: z.ZodString;
479
+ revision: z.ZodNumber;
480
+ }, z.core.$strict>;
481
+ }, z.core.$strict>;
482
+ type NotificationDeliveryRequestV9 = z.infer<typeof notificationDeliveryRequestV9Schema>;
483
+ type NotificationDeliveryRequestV6 = z.infer<typeof notificationDeliveryRequestV6Schema>;
484
+ declare const notificationDeliveryRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
485
+ message: z.ZodObject<{
486
+ type: z.ZodLiteral<"link_summary">;
487
+ title: z.ZodString;
488
+ summary: z.ZodString;
489
+ facts: z.ZodArray<z.ZodObject<{
490
+ label: z.ZodString;
491
+ value: z.ZodString;
492
+ }, z.core.$strict>>;
493
+ primaryLink: z.ZodObject<{
494
+ label: z.ZodString;
495
+ url: z.ZodString;
496
+ }, z.core.$strict>;
497
+ sourceLink: z.ZodOptional<z.ZodObject<{
498
+ label: z.ZodString;
499
+ url: z.ZodString;
500
+ }, z.core.$strict>>;
501
+ }, z.core.$strict>;
502
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
503
+ eventId: z.ZodString;
504
+ producer: z.ZodObject<{
505
+ key: z.ZodString;
506
+ environment: z.ZodString;
507
+ }, z.core.$strict>;
508
+ routeKey: z.ZodString;
509
+ occurredAt: z.ZodString;
510
+ requestedAt: z.ZodString;
511
+ deliverBy: z.ZodString;
512
+ subject: z.ZodObject<{
513
+ type: z.ZodString;
514
+ id: z.ZodString;
515
+ revision: z.ZodNumber;
516
+ }, z.core.$strict>;
517
+ contractVersion: z.ZodLiteral<1>;
518
+ }, z.core.$strict>, z.ZodObject<{
519
+ message: z.ZodObject<{
520
+ type: z.ZodLiteral<"localized_link_summary">;
521
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
522
+ title: z.ZodString;
523
+ summary: z.ZodString;
524
+ facts: z.ZodArray<z.ZodObject<{
525
+ label: z.ZodString;
526
+ value: z.ZodString;
527
+ }, z.core.$strict>>;
528
+ key: z.ZodLiteral<"source">;
529
+ locale: z.ZodLiteral<"und">;
530
+ }, z.core.$strict>, z.ZodObject<{
531
+ title: z.ZodString;
532
+ summary: z.ZodString;
533
+ facts: z.ZodArray<z.ZodObject<{
534
+ label: z.ZodString;
535
+ value: z.ZodString;
536
+ }, z.core.$strict>>;
537
+ key: z.ZodLiteral<"zh-CN">;
538
+ locale: z.ZodLiteral<"zh-CN">;
539
+ }, z.core.$strict>], "key">>;
540
+ primaryLink: z.ZodObject<{
541
+ label: z.ZodString;
542
+ url: z.ZodString;
543
+ }, z.core.$strict>;
544
+ sourceLink: z.ZodOptional<z.ZodObject<{
545
+ label: z.ZodString;
546
+ url: z.ZodString;
547
+ }, z.core.$strict>>;
548
+ }, z.core.$strict>;
549
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
550
+ eventId: z.ZodString;
551
+ producer: z.ZodObject<{
552
+ key: z.ZodString;
553
+ environment: z.ZodString;
554
+ }, z.core.$strict>;
555
+ routeKey: z.ZodString;
556
+ occurredAt: z.ZodString;
557
+ requestedAt: z.ZodString;
558
+ deliverBy: z.ZodString;
559
+ subject: z.ZodObject<{
560
+ type: z.ZodString;
561
+ id: z.ZodString;
562
+ revision: z.ZodNumber;
563
+ }, z.core.$strict>;
564
+ contractVersion: z.ZodLiteral<2>;
565
+ }, z.core.$strict>, z.ZodObject<{
566
+ message: z.ZodObject<{
567
+ type: z.ZodLiteral<"structured_notification">;
568
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
569
+ key: z.ZodLiteral<"source">;
570
+ locale: z.ZodLiteral<"und">;
571
+ title: z.ZodString;
572
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
573
+ key: z.ZodString;
574
+ type: z.ZodLiteral<"text">;
575
+ label: z.ZodOptional<z.ZodString>;
576
+ value: z.ZodString;
577
+ }, z.core.$strict>, z.ZodObject<{
578
+ key: z.ZodString;
579
+ type: z.ZodLiteral<"fields">;
580
+ items: z.ZodArray<z.ZodObject<{
581
+ label: z.ZodString;
582
+ value: z.ZodString;
583
+ }, z.core.$strict>>;
584
+ }, z.core.$strict>], "type">>;
585
+ }, z.core.$strict>, z.ZodObject<{
586
+ key: z.ZodLiteral<"zh-CN">;
587
+ locale: z.ZodLiteral<"zh-CN">;
588
+ title: z.ZodString;
589
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
590
+ key: z.ZodString;
591
+ type: z.ZodLiteral<"text">;
592
+ label: z.ZodOptional<z.ZodString>;
593
+ value: z.ZodString;
594
+ }, z.core.$strict>, z.ZodObject<{
595
+ key: z.ZodString;
596
+ type: z.ZodLiteral<"fields">;
597
+ items: z.ZodArray<z.ZodObject<{
598
+ label: z.ZodString;
599
+ value: z.ZodString;
600
+ }, z.core.$strict>>;
601
+ }, z.core.$strict>], "type">>;
602
+ }, z.core.$strict>], "key">>;
603
+ links: z.ZodArray<z.ZodObject<{
604
+ label: z.ZodString;
605
+ url: z.ZodString;
606
+ key: z.ZodString;
607
+ }, z.core.$strict>>;
608
+ }, z.core.$strict>;
609
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
610
+ eventId: z.ZodString;
611
+ producer: z.ZodObject<{
612
+ key: z.ZodString;
613
+ environment: z.ZodString;
614
+ }, z.core.$strict>;
615
+ routeKey: z.ZodString;
616
+ occurredAt: z.ZodString;
617
+ requestedAt: z.ZodString;
618
+ deliverBy: z.ZodString;
619
+ subject: z.ZodObject<{
620
+ type: z.ZodString;
621
+ id: z.ZodString;
622
+ revision: z.ZodNumber;
623
+ }, z.core.$strict>;
624
+ contractVersion: z.ZodLiteral<3>;
625
+ }, z.core.$strict>, z.ZodObject<{
626
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
627
+ eventId: z.ZodString;
628
+ producer: z.ZodObject<{
629
+ key: z.ZodString;
630
+ environment: z.ZodString;
631
+ }, z.core.$strict>;
632
+ routeKey: z.ZodString;
633
+ occurredAt: z.ZodString;
634
+ requestedAt: z.ZodString;
635
+ deliverBy: z.ZodString;
636
+ subject: z.ZodObject<{
637
+ type: z.ZodString;
638
+ id: z.ZodString;
639
+ revision: z.ZodNumber;
640
+ }, z.core.$strict>;
641
+ contractVersion: z.ZodLiteral<4>;
642
+ message: z.ZodObject<{
643
+ type: z.ZodLiteral<"structured_notification">;
644
+ links: z.ZodArray<z.ZodObject<{
645
+ label: z.ZodString;
646
+ url: z.ZodString;
647
+ key: z.ZodString;
648
+ }, z.core.$strict>>;
649
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
650
+ key: z.ZodLiteral<"source">;
651
+ locale: z.ZodLiteral<"und">;
652
+ title: z.ZodString;
653
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
654
+ key: z.ZodString;
655
+ type: z.ZodLiteral<"text">;
656
+ label: z.ZodOptional<z.ZodString>;
657
+ value: z.ZodString;
658
+ }, z.core.$strict>, z.ZodObject<{
659
+ key: z.ZodString;
660
+ type: z.ZodLiteral<"fields">;
661
+ items: z.ZodArray<z.ZodObject<{
662
+ label: z.ZodString;
663
+ value: z.ZodString;
664
+ }, z.core.$strict>>;
665
+ }, z.core.$strict>], "type">>;
666
+ body: z.ZodObject<{
667
+ label: z.ZodOptional<z.ZodString>;
668
+ value: z.ZodString;
669
+ }, z.core.$strict>;
670
+ }, z.core.$strict>, z.ZodObject<{
671
+ key: z.ZodLiteral<"zh-CN">;
672
+ locale: z.ZodLiteral<"zh-CN">;
673
+ title: z.ZodString;
674
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
675
+ key: z.ZodString;
676
+ type: z.ZodLiteral<"text">;
677
+ label: z.ZodOptional<z.ZodString>;
678
+ value: z.ZodString;
679
+ }, z.core.$strict>, z.ZodObject<{
680
+ key: z.ZodString;
681
+ type: z.ZodLiteral<"fields">;
682
+ items: z.ZodArray<z.ZodObject<{
683
+ label: z.ZodString;
684
+ value: z.ZodString;
685
+ }, z.core.$strict>>;
686
+ }, z.core.$strict>], "type">>;
687
+ body: z.ZodObject<{
688
+ label: z.ZodOptional<z.ZodString>;
689
+ value: z.ZodString;
690
+ }, z.core.$strict>;
691
+ }, z.core.$strict>], "key">>;
692
+ }, z.core.$strict>;
693
+ }, z.core.$strict>, z.ZodObject<{
694
+ message: z.ZodObject<{
695
+ type: z.ZodLiteral<"structured_notification">;
696
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
697
+ key: z.ZodLiteral<"source">;
698
+ locale: z.ZodLiteral<"und">;
699
+ title: z.ZodString;
700
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
701
+ key: z.ZodString;
702
+ type: z.ZodLiteral<"text">;
703
+ label: z.ZodOptional<z.ZodString>;
704
+ value: z.ZodString;
705
+ }, z.core.$strict>, z.ZodObject<{
706
+ key: z.ZodString;
707
+ type: z.ZodLiteral<"fields">;
708
+ items: z.ZodArray<z.ZodObject<{
709
+ label: z.ZodString;
710
+ value: z.ZodString;
711
+ }, z.core.$strict>>;
712
+ }, z.core.$strict>], "type">>;
713
+ bodyLabel: z.ZodOptional<z.ZodString>;
714
+ linkLabels: z.ZodArray<z.ZodObject<{
715
+ key: z.ZodString;
716
+ label: z.ZodString;
717
+ }, z.core.$strict>>;
718
+ }, z.core.$strict>, z.ZodObject<{
719
+ key: z.ZodLiteral<"zh-CN">;
720
+ locale: z.ZodLiteral<"zh-CN">;
721
+ title: z.ZodString;
722
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
723
+ key: z.ZodString;
724
+ type: z.ZodLiteral<"text">;
725
+ label: z.ZodOptional<z.ZodString>;
726
+ value: z.ZodString;
727
+ }, z.core.$strict>, z.ZodObject<{
728
+ key: z.ZodString;
729
+ type: z.ZodLiteral<"fields">;
730
+ items: z.ZodArray<z.ZodObject<{
731
+ label: z.ZodString;
732
+ value: z.ZodString;
733
+ }, z.core.$strict>>;
734
+ }, z.core.$strict>], "type">>;
735
+ bodyLabel: z.ZodOptional<z.ZodString>;
736
+ linkLabels: z.ZodArray<z.ZodObject<{
737
+ key: z.ZodString;
738
+ label: z.ZodString;
739
+ }, z.core.$strict>>;
740
+ }, z.core.$strict>], "key">>;
741
+ links: z.ZodArray<z.ZodObject<{
742
+ key: z.ZodString;
743
+ url: z.ZodString;
744
+ }, z.core.$strict>>;
745
+ body: z.ZodObject<{
746
+ value: z.ZodString;
747
+ }, z.core.$strict>;
748
+ }, z.core.$strict>;
749
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
750
+ eventId: z.ZodString;
751
+ producer: z.ZodObject<{
752
+ key: z.ZodString;
753
+ environment: z.ZodString;
754
+ }, z.core.$strict>;
755
+ routeKey: z.ZodString;
756
+ occurredAt: z.ZodString;
757
+ requestedAt: z.ZodString;
758
+ deliverBy: z.ZodString;
759
+ subject: z.ZodObject<{
760
+ type: z.ZodString;
761
+ id: z.ZodString;
762
+ revision: z.ZodNumber;
763
+ }, z.core.$strict>;
764
+ contractVersion: z.ZodLiteral<5>;
765
+ }, z.core.$strict>, z.ZodObject<{
766
+ contractVersion: z.ZodLiteral<6>;
767
+ message: z.ZodObject<{
768
+ type: z.ZodLiteral<"structured_notification">;
769
+ links: z.ZodArray<z.ZodObject<{
770
+ key: z.ZodString;
771
+ url: z.ZodString;
772
+ }, z.core.$strict>>;
773
+ bodies: z.ZodArray<z.ZodObject<{
774
+ key: z.ZodString;
775
+ value: z.ZodString;
776
+ }, z.core.$strict>>;
777
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
778
+ key: z.ZodLiteral<"source">;
779
+ locale: z.ZodLiteral<"und">;
780
+ title: z.ZodString;
781
+ linkLabels: z.ZodArray<z.ZodObject<{
782
+ key: z.ZodString;
783
+ label: z.ZodString;
784
+ }, z.core.$strict>>;
785
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
786
+ key: z.ZodString;
787
+ type: z.ZodLiteral<"text">;
788
+ label: z.ZodOptional<z.ZodString>;
789
+ value: z.ZodString;
790
+ }, z.core.$strict>, z.ZodObject<{
791
+ key: z.ZodString;
792
+ type: z.ZodLiteral<"fields">;
793
+ items: z.ZodArray<z.ZodObject<{
794
+ label: z.ZodString;
795
+ value: z.ZodString;
796
+ }, z.core.$strict>>;
797
+ }, z.core.$strict>], "type">>;
798
+ bodyRefs: z.ZodArray<z.ZodObject<{
799
+ key: z.ZodString;
800
+ label: z.ZodOptional<z.ZodString>;
801
+ }, z.core.$strict>>;
802
+ footer: z.ZodOptional<z.ZodString>;
803
+ }, z.core.$strict>, z.ZodObject<{
804
+ key: z.ZodLiteral<"zh-CN">;
805
+ locale: z.ZodLiteral<"zh-CN">;
806
+ title: z.ZodString;
807
+ linkLabels: z.ZodArray<z.ZodObject<{
808
+ key: z.ZodString;
809
+ label: z.ZodString;
810
+ }, z.core.$strict>>;
811
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
812
+ key: z.ZodString;
813
+ type: z.ZodLiteral<"text">;
814
+ label: z.ZodOptional<z.ZodString>;
815
+ value: z.ZodString;
816
+ }, z.core.$strict>, z.ZodObject<{
817
+ key: z.ZodString;
818
+ type: z.ZodLiteral<"fields">;
819
+ items: z.ZodArray<z.ZodObject<{
820
+ label: z.ZodString;
821
+ value: z.ZodString;
822
+ }, z.core.$strict>>;
823
+ }, z.core.$strict>], "type">>;
824
+ bodyRefs: z.ZodArray<z.ZodObject<{
825
+ key: z.ZodString;
826
+ label: z.ZodOptional<z.ZodString>;
827
+ }, z.core.$strict>>;
828
+ footer: z.ZodOptional<z.ZodString>;
829
+ }, z.core.$strict>], "key">>;
830
+ }, z.core.$strict>;
831
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
832
+ eventId: z.ZodString;
833
+ producer: z.ZodObject<{
834
+ key: z.ZodString;
835
+ environment: z.ZodString;
836
+ }, z.core.$strict>;
837
+ routeKey: z.ZodString;
838
+ occurredAt: z.ZodString;
839
+ requestedAt: z.ZodString;
840
+ deliverBy: z.ZodString;
841
+ subject: z.ZodObject<{
842
+ type: z.ZodString;
843
+ id: z.ZodString;
844
+ revision: z.ZodNumber;
845
+ }, z.core.$strict>;
846
+ }, z.core.$strict>, z.ZodObject<{
847
+ contractVersion: z.ZodLiteral<7>;
848
+ routeKeys: z.ZodArray<z.ZodString>;
849
+ message: z.ZodObject<{
850
+ type: z.ZodLiteral<"structured_notification">;
851
+ links: z.ZodArray<z.ZodObject<{
852
+ key: z.ZodString;
853
+ url: z.ZodString;
854
+ }, z.core.$strict>>;
855
+ bodies: z.ZodArray<z.ZodObject<{
856
+ key: z.ZodString;
857
+ value: z.ZodString;
858
+ }, z.core.$strict>>;
859
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
860
+ key: z.ZodLiteral<"source">;
861
+ locale: z.ZodLiteral<"und">;
862
+ title: z.ZodString;
863
+ linkLabels: z.ZodArray<z.ZodObject<{
864
+ key: z.ZodString;
865
+ label: z.ZodString;
866
+ }, z.core.$strict>>;
867
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
868
+ key: z.ZodString;
869
+ type: z.ZodLiteral<"text">;
870
+ label: z.ZodOptional<z.ZodString>;
871
+ value: z.ZodString;
872
+ }, z.core.$strict>, z.ZodObject<{
873
+ key: z.ZodString;
874
+ type: z.ZodLiteral<"fields">;
875
+ items: z.ZodArray<z.ZodObject<{
876
+ label: z.ZodString;
877
+ value: z.ZodString;
878
+ }, z.core.$strict>>;
879
+ }, z.core.$strict>], "type">>;
880
+ bodyRefs: z.ZodArray<z.ZodObject<{
881
+ key: z.ZodString;
882
+ label: z.ZodOptional<z.ZodString>;
883
+ }, z.core.$strict>>;
884
+ footer: z.ZodOptional<z.ZodString>;
885
+ }, z.core.$strict>, z.ZodObject<{
886
+ key: z.ZodLiteral<"zh-CN">;
887
+ locale: z.ZodLiteral<"zh-CN">;
888
+ title: z.ZodString;
889
+ linkLabels: z.ZodArray<z.ZodObject<{
890
+ key: z.ZodString;
891
+ label: z.ZodString;
892
+ }, z.core.$strict>>;
893
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
894
+ key: z.ZodString;
895
+ type: z.ZodLiteral<"text">;
896
+ label: z.ZodOptional<z.ZodString>;
897
+ value: z.ZodString;
898
+ }, z.core.$strict>, z.ZodObject<{
899
+ key: z.ZodString;
900
+ type: z.ZodLiteral<"fields">;
901
+ items: z.ZodArray<z.ZodObject<{
902
+ label: z.ZodString;
903
+ value: z.ZodString;
904
+ }, z.core.$strict>>;
905
+ }, z.core.$strict>], "type">>;
906
+ bodyRefs: z.ZodArray<z.ZodObject<{
907
+ key: z.ZodString;
908
+ label: z.ZodOptional<z.ZodString>;
909
+ }, z.core.$strict>>;
910
+ footer: z.ZodOptional<z.ZodString>;
911
+ }, z.core.$strict>], "key">>;
912
+ }, z.core.$strict>;
913
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
914
+ eventId: z.ZodString;
915
+ producer: z.ZodObject<{
916
+ key: z.ZodString;
917
+ environment: z.ZodString;
918
+ }, z.core.$strict>;
919
+ occurredAt: z.ZodString;
920
+ requestedAt: z.ZodString;
921
+ deliverBy: z.ZodString;
922
+ subject: z.ZodObject<{
923
+ type: z.ZodString;
924
+ id: z.ZodString;
925
+ revision: z.ZodNumber;
926
+ }, z.core.$strict>;
927
+ }, z.core.$strict>, z.ZodObject<{
928
+ contractVersion: z.ZodLiteral<8>;
929
+ message: z.ZodObject<{
930
+ type: z.ZodLiteral<"structured_notification">;
931
+ links: z.ZodArray<z.ZodObject<{
932
+ key: z.ZodString;
933
+ url: z.ZodString;
934
+ }, z.core.$strict>>;
935
+ bodies: z.ZodArray<z.ZodObject<{
936
+ key: z.ZodString;
937
+ value: z.ZodString;
938
+ }, z.core.$strict>>;
939
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
940
+ key: z.ZodLiteral<"source">;
941
+ locale: z.ZodLiteral<"und">;
942
+ title: z.ZodString;
943
+ linkLabels: z.ZodArray<z.ZodObject<{
944
+ key: z.ZodString;
945
+ label: z.ZodString;
946
+ }, z.core.$strict>>;
947
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
948
+ key: z.ZodString;
949
+ type: z.ZodLiteral<"text">;
950
+ label: z.ZodOptional<z.ZodString>;
951
+ value: z.ZodString;
952
+ }, z.core.$strict>, z.ZodObject<{
953
+ key: z.ZodString;
954
+ type: z.ZodLiteral<"fields">;
955
+ items: z.ZodArray<z.ZodObject<{
956
+ label: z.ZodString;
957
+ value: z.ZodString;
958
+ }, z.core.$strict>>;
959
+ }, z.core.$strict>], "type">>;
960
+ bodyRefs: z.ZodArray<z.ZodObject<{
961
+ key: z.ZodString;
962
+ label: z.ZodOptional<z.ZodString>;
963
+ }, z.core.$strict>>;
964
+ footer: z.ZodOptional<z.ZodString>;
965
+ }, z.core.$strict>, z.ZodObject<{
966
+ key: z.ZodLiteral<"zh-CN">;
967
+ locale: z.ZodLiteral<"zh-CN">;
968
+ title: z.ZodString;
969
+ linkLabels: z.ZodArray<z.ZodObject<{
970
+ key: z.ZodString;
971
+ label: z.ZodString;
972
+ }, z.core.$strict>>;
973
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
974
+ key: z.ZodString;
975
+ type: z.ZodLiteral<"text">;
976
+ label: z.ZodOptional<z.ZodString>;
977
+ value: z.ZodString;
978
+ }, z.core.$strict>, z.ZodObject<{
979
+ key: z.ZodString;
980
+ type: z.ZodLiteral<"fields">;
981
+ items: z.ZodArray<z.ZodObject<{
982
+ label: z.ZodString;
983
+ value: z.ZodString;
984
+ }, z.core.$strict>>;
985
+ }, z.core.$strict>], "type">>;
986
+ bodyRefs: z.ZodArray<z.ZodObject<{
987
+ key: z.ZodString;
988
+ label: z.ZodOptional<z.ZodString>;
989
+ }, z.core.$strict>>;
990
+ footer: z.ZodOptional<z.ZodString>;
991
+ }, z.core.$strict>], "key">>;
992
+ channelVariants: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
993
+ qq: "qq";
994
+ tg: "tg";
995
+ wechat: "wechat";
996
+ lark: "lark";
997
+ }> & z.core.$partial, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
998
+ key: z.ZodLiteral<"source">;
999
+ locale: z.ZodLiteral<"und">;
1000
+ title: z.ZodString;
1001
+ linkLabels: z.ZodArray<z.ZodObject<{
1002
+ key: z.ZodString;
1003
+ label: z.ZodString;
1004
+ }, z.core.$strict>>;
1005
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1006
+ key: z.ZodString;
1007
+ type: z.ZodLiteral<"text">;
1008
+ label: z.ZodOptional<z.ZodString>;
1009
+ value: z.ZodString;
1010
+ }, z.core.$strict>, z.ZodObject<{
1011
+ key: z.ZodString;
1012
+ type: z.ZodLiteral<"fields">;
1013
+ items: z.ZodArray<z.ZodObject<{
1014
+ label: z.ZodString;
1015
+ value: z.ZodString;
1016
+ }, z.core.$strict>>;
1017
+ }, z.core.$strict>], "type">>;
1018
+ bodyRefs: z.ZodArray<z.ZodObject<{
1019
+ key: z.ZodString;
1020
+ label: z.ZodOptional<z.ZodString>;
1021
+ }, z.core.$strict>>;
1022
+ footer: z.ZodOptional<z.ZodString>;
1023
+ }, z.core.$strict>, z.ZodObject<{
1024
+ key: z.ZodLiteral<"zh-CN">;
1025
+ locale: z.ZodLiteral<"zh-CN">;
1026
+ title: z.ZodString;
1027
+ linkLabels: z.ZodArray<z.ZodObject<{
1028
+ key: z.ZodString;
1029
+ label: z.ZodString;
1030
+ }, z.core.$strict>>;
1031
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1032
+ key: z.ZodString;
1033
+ type: z.ZodLiteral<"text">;
1034
+ label: z.ZodOptional<z.ZodString>;
1035
+ value: z.ZodString;
1036
+ }, z.core.$strict>, z.ZodObject<{
1037
+ key: z.ZodString;
1038
+ type: z.ZodLiteral<"fields">;
1039
+ items: z.ZodArray<z.ZodObject<{
1040
+ label: z.ZodString;
1041
+ value: z.ZodString;
1042
+ }, z.core.$strict>>;
1043
+ }, z.core.$strict>], "type">>;
1044
+ bodyRefs: z.ZodArray<z.ZodObject<{
1045
+ key: z.ZodString;
1046
+ label: z.ZodOptional<z.ZodString>;
1047
+ }, z.core.$strict>>;
1048
+ footer: z.ZodOptional<z.ZodString>;
1049
+ }, z.core.$strict>], "key">>>>;
1050
+ }, z.core.$strict>;
1051
+ routeKeys: z.ZodArray<z.ZodString>;
1052
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
1053
+ eventId: z.ZodString;
1054
+ producer: z.ZodObject<{
1055
+ key: z.ZodString;
1056
+ environment: z.ZodString;
1057
+ }, z.core.$strict>;
1058
+ occurredAt: z.ZodString;
1059
+ requestedAt: z.ZodString;
1060
+ deliverBy: z.ZodString;
1061
+ subject: z.ZodObject<{
1062
+ type: z.ZodString;
1063
+ id: z.ZodString;
1064
+ revision: z.ZodNumber;
1065
+ }, z.core.$strict>;
1066
+ }, z.core.$strict>, z.ZodObject<{
1067
+ contractVersion: z.ZodLiteral<9>;
1068
+ audience: z.ZodOptional<z.ZodObject<{
1069
+ topics: z.ZodArray<z.ZodString>;
1070
+ }, z.core.$strict>>;
1071
+ browserMessages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1072
+ locale: z.ZodString;
1073
+ contentLocale: z.ZodString;
1074
+ title: z.ZodString;
1075
+ body: z.ZodString;
1076
+ url: z.ZodString;
1077
+ }, z.core.$strict>>>;
1078
+ message: z.ZodObject<{
1079
+ type: z.ZodLiteral<"structured_notification">;
1080
+ links: z.ZodArray<z.ZodObject<{
1081
+ key: z.ZodString;
1082
+ url: z.ZodString;
1083
+ }, z.core.$strict>>;
1084
+ bodies: z.ZodArray<z.ZodObject<{
1085
+ key: z.ZodString;
1086
+ value: z.ZodString;
1087
+ }, z.core.$strict>>;
1088
+ variants: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1089
+ key: z.ZodLiteral<"source">;
1090
+ locale: z.ZodLiteral<"und">;
1091
+ title: z.ZodString;
1092
+ linkLabels: z.ZodArray<z.ZodObject<{
1093
+ key: z.ZodString;
1094
+ label: z.ZodString;
1095
+ }, z.core.$strict>>;
1096
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1097
+ key: z.ZodString;
1098
+ type: z.ZodLiteral<"text">;
1099
+ label: z.ZodOptional<z.ZodString>;
1100
+ value: z.ZodString;
1101
+ }, z.core.$strict>, z.ZodObject<{
1102
+ key: z.ZodString;
1103
+ type: z.ZodLiteral<"fields">;
1104
+ items: z.ZodArray<z.ZodObject<{
1105
+ label: z.ZodString;
1106
+ value: z.ZodString;
1107
+ }, z.core.$strict>>;
1108
+ }, z.core.$strict>], "type">>;
1109
+ bodyRefs: z.ZodArray<z.ZodObject<{
1110
+ key: z.ZodString;
1111
+ label: z.ZodOptional<z.ZodString>;
1112
+ }, z.core.$strict>>;
1113
+ footer: z.ZodOptional<z.ZodString>;
1114
+ }, z.core.$strict>, z.ZodObject<{
1115
+ key: z.ZodLiteral<"zh-CN">;
1116
+ locale: z.ZodLiteral<"zh-CN">;
1117
+ title: z.ZodString;
1118
+ linkLabels: z.ZodArray<z.ZodObject<{
1119
+ key: z.ZodString;
1120
+ label: z.ZodString;
1121
+ }, z.core.$strict>>;
1122
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1123
+ key: z.ZodString;
1124
+ type: z.ZodLiteral<"text">;
1125
+ label: z.ZodOptional<z.ZodString>;
1126
+ value: z.ZodString;
1127
+ }, z.core.$strict>, z.ZodObject<{
1128
+ key: z.ZodString;
1129
+ type: z.ZodLiteral<"fields">;
1130
+ items: z.ZodArray<z.ZodObject<{
1131
+ label: z.ZodString;
1132
+ value: z.ZodString;
1133
+ }, z.core.$strict>>;
1134
+ }, z.core.$strict>], "type">>;
1135
+ bodyRefs: z.ZodArray<z.ZodObject<{
1136
+ key: z.ZodString;
1137
+ label: z.ZodOptional<z.ZodString>;
1138
+ }, z.core.$strict>>;
1139
+ footer: z.ZodOptional<z.ZodString>;
1140
+ }, z.core.$strict>], "key">>;
1141
+ channelVariants: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
1142
+ qq: "qq";
1143
+ tg: "tg";
1144
+ wechat: "wechat";
1145
+ lark: "lark";
1146
+ }> & z.core.$partial, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1147
+ key: z.ZodLiteral<"source">;
1148
+ locale: z.ZodLiteral<"und">;
1149
+ title: z.ZodString;
1150
+ linkLabels: z.ZodArray<z.ZodObject<{
1151
+ key: z.ZodString;
1152
+ label: z.ZodString;
1153
+ }, z.core.$strict>>;
1154
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1155
+ key: z.ZodString;
1156
+ type: z.ZodLiteral<"text">;
1157
+ label: z.ZodOptional<z.ZodString>;
1158
+ value: z.ZodString;
1159
+ }, z.core.$strict>, z.ZodObject<{
1160
+ key: z.ZodString;
1161
+ type: z.ZodLiteral<"fields">;
1162
+ items: z.ZodArray<z.ZodObject<{
1163
+ label: z.ZodString;
1164
+ value: z.ZodString;
1165
+ }, z.core.$strict>>;
1166
+ }, z.core.$strict>], "type">>;
1167
+ bodyRefs: z.ZodArray<z.ZodObject<{
1168
+ key: z.ZodString;
1169
+ label: z.ZodOptional<z.ZodString>;
1170
+ }, z.core.$strict>>;
1171
+ footer: z.ZodOptional<z.ZodString>;
1172
+ }, z.core.$strict>, z.ZodObject<{
1173
+ key: z.ZodLiteral<"zh-CN">;
1174
+ locale: z.ZodLiteral<"zh-CN">;
1175
+ title: z.ZodString;
1176
+ linkLabels: z.ZodArray<z.ZodObject<{
1177
+ key: z.ZodString;
1178
+ label: z.ZodString;
1179
+ }, z.core.$strict>>;
1180
+ sections: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1181
+ key: z.ZodString;
1182
+ type: z.ZodLiteral<"text">;
1183
+ label: z.ZodOptional<z.ZodString>;
1184
+ value: z.ZodString;
1185
+ }, z.core.$strict>, z.ZodObject<{
1186
+ key: z.ZodString;
1187
+ type: z.ZodLiteral<"fields">;
1188
+ items: z.ZodArray<z.ZodObject<{
1189
+ label: z.ZodString;
1190
+ value: z.ZodString;
1191
+ }, z.core.$strict>>;
1192
+ }, z.core.$strict>], "type">>;
1193
+ bodyRefs: z.ZodArray<z.ZodObject<{
1194
+ key: z.ZodString;
1195
+ label: z.ZodOptional<z.ZodString>;
1196
+ }, z.core.$strict>>;
1197
+ footer: z.ZodOptional<z.ZodString>;
1198
+ }, z.core.$strict>], "key">>>>;
1199
+ }, z.core.$strict>;
1200
+ routeKeys: z.ZodArray<z.ZodString>;
1201
+ eventType: z.ZodLiteral<"notification.delivery.requested">;
1202
+ eventId: z.ZodString;
1203
+ producer: z.ZodObject<{
1204
+ key: z.ZodString;
1205
+ environment: z.ZodString;
1206
+ }, z.core.$strict>;
1207
+ occurredAt: z.ZodString;
1208
+ requestedAt: z.ZodString;
1209
+ deliverBy: z.ZodString;
1210
+ subject: z.ZodObject<{
1211
+ type: z.ZodString;
1212
+ id: z.ZodString;
1213
+ revision: z.ZodNumber;
1214
+ }, z.core.$strict>;
1215
+ }, z.core.$strict>]>;
1216
+ type NotificationDeliveryRequest = z.infer<typeof notificationDeliveryRequestSchema>;
1217
+ type NotificationMessageVariantKey = (typeof notificationMessageVariantKeys)[number];
1218
+ type NotificationStructuredMessageSection = z.infer<typeof structuredMessageSectionSchema>;
1219
+ type NotificationMessageBody = z.infer<typeof notificationMessageBodySchema>;
1220
+ //#endregion
1221
+ //#region src/generic-plain-text.d.ts
1222
+ declare class GenericNotificationRenderError extends Error {
1223
+ readonly code = "mandatory_content_too_large";
1224
+ constructor();
1225
+ }
1226
+ interface PlainTextOptions {
1227
+ channel?: NotificationDeliveryChannelKey;
1228
+ omitFirstTitle?: boolean;
1229
+ /** Destination-owned immutable copy appended to its corresponding language block. */
1230
+ variantSuffixes?: Partial<Record<NotificationMessageVariantKey, string>>;
1231
+ }
1232
+ /** Renders one validated provider-neutral delivery snapshot as bounded plain text. */
1233
+ declare function renderGenericNotificationPlainText(input: NotificationDeliveryRequest, maximumCodePoints: number, requestedVariantKeys?: readonly NotificationMessageVariantKey[], options?: PlainTextOptions): string;
1234
+ //#endregion
1235
+ //#region src/generic-message.d.ts
1236
+ interface GenericNotificationMessageContent {
1237
+ key: NotificationMessageVariantKey;
1238
+ locale: 'und' | 'zh-CN';
1239
+ sections: GenericNotificationMessageSection[];
1240
+ title: string;
1241
+ body?: NotificationMessageBody;
1242
+ bodies?: NotificationMessageBody[];
1243
+ footer?: string | undefined;
1244
+ links?: GenericNotificationMessageLink[];
1245
+ }
1246
+ type GenericNotificationMessageSection = NotificationStructuredMessageSection;
1247
+ interface GenericNotificationMessageLink {
1248
+ key: string;
1249
+ label: string;
1250
+ url: string;
1251
+ }
1252
+ /** Selects frozen channel copy; an absent override keeps the request's frozen default copy. */
1253
+ declare function resolveGenericNotificationChannelVariants(input: NotificationDeliveryRequestV6 | NotificationDeliveryRequestV7 | NotificationDeliveryRequestV8 | NotificationDeliveryRequestV9, channel?: NotificationDeliveryChannelKey): ({
1254
+ key: "source";
1255
+ locale: "und";
1256
+ title: string;
1257
+ linkLabels: {
1258
+ key: string;
1259
+ label: string;
1260
+ }[];
1261
+ sections: ({
1262
+ key: string;
1263
+ type: "text";
1264
+ value: string;
1265
+ label?: string | undefined;
1266
+ } | {
1267
+ key: string;
1268
+ type: "fields";
1269
+ items: {
1270
+ label: string;
1271
+ value: string;
1272
+ }[];
1273
+ })[];
1274
+ bodyRefs: {
1275
+ key: string;
1276
+ label?: string | undefined;
1277
+ }[];
1278
+ footer?: string | undefined;
1279
+ } | {
1280
+ key: "zh-CN";
1281
+ locale: "zh-CN";
1282
+ title: string;
1283
+ linkLabels: {
1284
+ key: string;
1285
+ label: string;
1286
+ }[];
1287
+ sections: ({
1288
+ key: string;
1289
+ type: "text";
1290
+ value: string;
1291
+ label?: string | undefined;
1292
+ } | {
1293
+ key: string;
1294
+ type: "fields";
1295
+ items: {
1296
+ label: string;
1297
+ value: string;
1298
+ }[];
1299
+ })[];
1300
+ bodyRefs: {
1301
+ key: string;
1302
+ label?: string | undefined;
1303
+ }[];
1304
+ footer?: string | undefined;
1305
+ })[];
1306
+ /** Resolves a validated request into the ordered message variants selected by one destination. */
1307
+ declare function resolveGenericNotificationMessage(input: NotificationDeliveryRequest, requestedVariantKeys?: readonly NotificationMessageVariantKey[], channel?: NotificationDeliveryChannelKey): {
1308
+ links: GenericNotificationMessageLink[];
1309
+ linksPerVariant: boolean;
1310
+ variants: GenericNotificationMessageContent[];
1311
+ };
1312
+ /** Returns the ordered variant identity used by renderer caches. */
1313
+ declare function resolveGenericNotificationMessageVariantKeys(input: NotificationDeliveryRequest, requestedVariantKeys?: readonly NotificationMessageVariantKey[], channel?: NotificationDeliveryChannelKey): ("source" | "zh-CN")[];
1314
+ //#endregion
1315
+ export { type GenericNotificationMessageContent, type GenericNotificationMessageLink, type GenericNotificationMessageSection, GenericNotificationRenderError, type PlainTextOptions, renderGenericNotificationPlainText, resolveGenericNotificationChannelVariants, resolveGenericNotificationMessage, resolveGenericNotificationMessageVariantKeys };