@samva/webhooks 0.15.0 → 0.16.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.
@@ -318,6 +318,276 @@ const MessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
318
318
  errorMessage: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
319
319
  parts: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null])),
320
320
  carrier: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
321
+ whatsapp: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
322
+ text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
323
+ template: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
324
+ name: Schema.String,
325
+ language: Schema.String,
326
+ components: Schema.Array(Schema.StructWithRest(Schema.Struct({
327
+ type: Schema.Literals([
328
+ "header",
329
+ "body",
330
+ "footer",
331
+ "button"
332
+ ]),
333
+ sub_type: Schema.optionalKey(Schema.Union([Schema.Literals([
334
+ "url",
335
+ "quick_reply",
336
+ "copy_code"
337
+ ]), Schema.Null])),
338
+ index: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
339
+ parameters: Schema.Array(Schema.StructWithRest(Schema.Struct({
340
+ type: Schema.Literals([
341
+ "text",
342
+ "currency",
343
+ "date_time",
344
+ "image",
345
+ "document",
346
+ "video",
347
+ "coupon_code"
348
+ ]),
349
+ text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
350
+ currency: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
351
+ fallback_value: Schema.String,
352
+ code: Schema.String,
353
+ amount_1000: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
354
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
355
+ date_time: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({ fallback_value: Schema.String }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
356
+ image: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({ link: Schema.String }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
357
+ document: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({
358
+ link: Schema.String,
359
+ filename: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
360
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
361
+ video: Schema.optionalKey(Schema.Union([Schema.StructWithRest(Schema.Struct({ link: Schema.String }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
362
+ coupon_code: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
363
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
364
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))
365
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]), Schema.Null])),
366
+ interactive: Schema.optionalKey(Schema.Union([
367
+ Schema.StructWithRest(Schema.Struct({
368
+ type: Schema.Literal("buttons"),
369
+ header: Schema.optionalKey(Schema.Union([
370
+ Schema.StructWithRest(Schema.Struct({
371
+ type: Schema.Literal("text"),
372
+ text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))
373
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppTextHeader" }),
374
+ Schema.Union([Schema.StructWithRest(Schema.Struct({
375
+ type: Schema.Literal("image"),
376
+ url: Schema.String
377
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppImageHeaderLink" }), Schema.StructWithRest(Schema.Struct({
378
+ type: Schema.Literal("image"),
379
+ mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
380
+ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
381
+ identifier: "MediaId"
382
+ }))
383
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppImageHeaderUpload" })]).annotate({ identifier: "WhatsAppImageHeader" }),
384
+ Schema.Union([Schema.StructWithRest(Schema.Struct({
385
+ type: Schema.Literal("video"),
386
+ url: Schema.String
387
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppVideoHeaderLink" }), Schema.StructWithRest(Schema.Struct({
388
+ type: Schema.Literal("video"),
389
+ mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
390
+ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
391
+ identifier: "MediaId"
392
+ }))
393
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppVideoHeaderUpload" })]).annotate({ identifier: "WhatsAppVideoHeader" }),
394
+ Schema.Union([Schema.StructWithRest(Schema.Struct({
395
+ type: Schema.Literal("document"),
396
+ filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" }))),
397
+ url: Schema.String
398
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppDocumentHeaderLink" }), Schema.StructWithRest(Schema.Struct({
399
+ type: Schema.Literal("document"),
400
+ filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" }))),
401
+ mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
402
+ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
403
+ identifier: "MediaId"
404
+ }))
405
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppDocumentHeaderUpload" })]).annotate({ identifier: "WhatsAppDocumentHeader" })
406
+ ]).annotate({ identifier: "WhatsAppInteractiveHeader" })),
407
+ body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })),
408
+ footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))),
409
+ buttons: Schema.Array(Schema.StructWithRest(Schema.Struct({
410
+ id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })),
411
+ title: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" }))
412
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppReplyButton" })).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(3).annotate({ expected: "a value with a length of at most 3" }))
413
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppButtonsMessage" }),
414
+ Schema.StructWithRest(Schema.Struct({
415
+ type: Schema.Literal("list"),
416
+ header: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
417
+ type: Schema.Literal("text"),
418
+ text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))
419
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppTextHeader" })),
420
+ body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(4096).annotate({ expected: "a string with at most 4096 code points" })),
421
+ footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))),
422
+ button: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" })),
423
+ sections: Schema.Array(Schema.StructWithRest(Schema.Struct({
424
+ title: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(24).annotate({ expected: "a string with at most 24 code points" }))),
425
+ rows: Schema.Array(Schema.StructWithRest(Schema.Struct({
426
+ id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })),
427
+ title: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(24).annotate({ expected: "a string with at most 24 code points" })),
428
+ description: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(72).annotate({ expected: "a string with at most 72 code points" })))
429
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppListRow" })).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
430
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppListSection" })).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" }))
431
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppListMessage" }),
432
+ Schema.StructWithRest(Schema.Struct({
433
+ type: Schema.Literal("cta_url"),
434
+ header: Schema.optionalKey(Schema.Union([
435
+ Schema.StructWithRest(Schema.Struct({
436
+ type: Schema.Literal("text"),
437
+ text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))
438
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppTextHeader" }),
439
+ Schema.Union([Schema.StructWithRest(Schema.Struct({
440
+ type: Schema.Literal("image"),
441
+ url: Schema.String
442
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppImageHeaderLink" }), Schema.StructWithRest(Schema.Struct({
443
+ type: Schema.Literal("image"),
444
+ mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
445
+ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
446
+ identifier: "MediaId"
447
+ }))
448
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppImageHeaderUpload" })]).annotate({ identifier: "WhatsAppImageHeader" }),
449
+ Schema.Union([Schema.StructWithRest(Schema.Struct({
450
+ type: Schema.Literal("video"),
451
+ url: Schema.String
452
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppVideoHeaderLink" }), Schema.StructWithRest(Schema.Struct({
453
+ type: Schema.Literal("video"),
454
+ mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
455
+ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
456
+ identifier: "MediaId"
457
+ }))
458
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppVideoHeaderUpload" })]).annotate({ identifier: "WhatsAppVideoHeader" }),
459
+ Schema.Union([Schema.StructWithRest(Schema.Struct({
460
+ type: Schema.Literal("document"),
461
+ filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" }))),
462
+ url: Schema.String
463
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppDocumentHeaderLink" }), Schema.StructWithRest(Schema.Struct({
464
+ type: Schema.Literal("document"),
465
+ filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" }))),
466
+ mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
467
+ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
468
+ identifier: "MediaId"
469
+ }))
470
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppDocumentHeaderUpload" })]).annotate({ identifier: "WhatsAppDocumentHeader" })
471
+ ]).annotate({ identifier: "WhatsAppInteractiveHeader" })),
472
+ body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })),
473
+ footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" }))),
474
+ displayText: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" })),
475
+ url: Schema.String
476
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppCtaUrlMessage" })
477
+ ]).annotate({ identifier: "WhatsAppInteractive" })),
478
+ media: Schema.optionalKey(Schema.Union([Schema.Union([
479
+ Schema.StructWithRest(Schema.Struct({
480
+ type: Schema.Literals([
481
+ "image",
482
+ "video",
483
+ "audio",
484
+ "document",
485
+ "sticker"
486
+ ]),
487
+ url: Schema.String,
488
+ caption: Schema.optionalKey(Schema.String),
489
+ filename: Schema.optionalKey(Schema.String)
490
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
491
+ Schema.StructWithRest(Schema.Struct({
492
+ type: Schema.Literals([
493
+ "image",
494
+ "video",
495
+ "audio",
496
+ "document",
497
+ "sticker"
498
+ ]),
499
+ mediaId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
500
+ expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
501
+ identifier: "MediaId"
502
+ })),
503
+ caption: Schema.optionalKey(Schema.String),
504
+ filename: Schema.optionalKey(Schema.String)
505
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]),
506
+ Schema.StructWithRest(Schema.Struct({
507
+ type: Schema.Literals([
508
+ "image",
509
+ "video",
510
+ "audio",
511
+ "document",
512
+ "sticker"
513
+ ]),
514
+ providerMediaId: Schema.String,
515
+ mimeType: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
516
+ caption: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
517
+ filename: Schema.optionalKey(Schema.String)
518
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
519
+ ]).annotate({ identifier: "WhatsAppStoredMedia" }), Schema.Null])),
520
+ reaction: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
521
+ messageId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
522
+ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
523
+ identifier: "MessageId"
524
+ })), Schema.Null]),
525
+ providerMessageId: Schema.String,
526
+ emoji: Schema.Union([Schema.String, Schema.Null])
527
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppStoredReaction" })),
528
+ location: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
529
+ latitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
530
+ longitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
531
+ name: Schema.optionalKey(Schema.String),
532
+ address: Schema.optionalKey(Schema.String),
533
+ url: Schema.optionalKey(Schema.String)
534
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppStoredLocation" })),
535
+ contacts: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
536
+ name: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
537
+ formattedName: Schema.optionalKey(Schema.String),
538
+ firstName: Schema.optionalKey(Schema.String),
539
+ lastName: Schema.optionalKey(Schema.String),
540
+ middleName: Schema.optionalKey(Schema.String),
541
+ prefix: Schema.optionalKey(Schema.String),
542
+ suffix: Schema.optionalKey(Schema.String)
543
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
544
+ phones: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
545
+ phone: Schema.optionalKey(Schema.String),
546
+ type: Schema.optionalKey(Schema.String),
547
+ waId: Schema.optionalKey(Schema.String)
548
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
549
+ emails: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
550
+ email: Schema.optionalKey(Schema.String),
551
+ type: Schema.optionalKey(Schema.String)
552
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
553
+ urls: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
554
+ url: Schema.optionalKey(Schema.String),
555
+ type: Schema.optionalKey(Schema.String)
556
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
557
+ org: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
558
+ company: Schema.optionalKey(Schema.String),
559
+ department: Schema.optionalKey(Schema.String),
560
+ title: Schema.optionalKey(Schema.String)
561
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])),
562
+ addresses: Schema.optionalKey(Schema.Array(Schema.StructWithRest(Schema.Struct({
563
+ street: Schema.optionalKey(Schema.String),
564
+ city: Schema.optionalKey(Schema.String),
565
+ state: Schema.optionalKey(Schema.String),
566
+ zip: Schema.optionalKey(Schema.String),
567
+ country: Schema.optionalKey(Schema.String),
568
+ countryCode: Schema.optionalKey(Schema.String),
569
+ type: Schema.optionalKey(Schema.String)
570
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]))),
571
+ birthday: Schema.optionalKey(Schema.String)
572
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppStoredContactCard" }))),
573
+ reply: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
574
+ type: Schema.Literals([
575
+ "button",
576
+ "list",
577
+ "template_button"
578
+ ]),
579
+ id: Schema.String,
580
+ title: Schema.String,
581
+ description: Schema.optionalKey(Schema.String)
582
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppReceivedReply" })),
583
+ context: Schema.optionalKey(Schema.StructWithRest(Schema.Struct({
584
+ messageId: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
585
+ expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
586
+ identifier: "MessageId"
587
+ })), Schema.Null]),
588
+ providerMessageId: Schema.String
589
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppMessageReference" }))
590
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppMessageContent" }), Schema.Null])),
321
591
  messageId: Schema.String,
322
592
  organizationId: Schema.String
323
593
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
@@ -929,6 +1199,78 @@ const DomainWarmingUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
929
1199
  updatedAt: Schema.String
930
1200
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
931
1201
  }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
1202
+ const TemplateRegistrationUpdatedEventSchema = Schema.StructWithRest(Schema.Struct({
1203
+ type: Schema.Literal("template.registration.updated"),
1204
+ timestamp: Schema.String,
1205
+ data: Schema.StructWithRest(Schema.Struct({
1206
+ id: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^treg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
1207
+ expected: "a string matching the RegExp ^treg_[0-9a-hjkmnp-tv-z]{16,24}$",
1208
+ identifier: "TemplateRegistrationId"
1209
+ })),
1210
+ templateId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
1211
+ expected: "a string matching the RegExp ^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$",
1212
+ identifier: "TemplateId"
1213
+ })),
1214
+ publicationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^tpub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
1215
+ expected: "a string matching the RegExp ^tpub_[0-9a-hjkmnp-tv-z]{16,24}$",
1216
+ identifier: "TemplatePublicationId"
1217
+ })),
1218
+ target: Schema.Union([Schema.StructWithRest(Schema.Struct({
1219
+ provider: Schema.Literal("whatsapp"),
1220
+ wabaId: Schema.String
1221
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "WhatsAppRegistrationTarget" }), Schema.StructWithRest(Schema.Struct({
1222
+ provider: Schema.Literal("dlt"),
1223
+ entityId: Schema.String,
1224
+ headerId: Schema.String
1225
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]).annotate({ identifier: "DltRegistrationTarget" })]).annotate({ identifier: "TemplateRegistrationTarget" }),
1226
+ name: Schema.String,
1227
+ language: Schema.String,
1228
+ status: Schema.Literals([
1229
+ "draft",
1230
+ "submitted",
1231
+ "approved",
1232
+ "rejected",
1233
+ "paused",
1234
+ "disabled"
1235
+ ]),
1236
+ category: Schema.Literals([
1237
+ "marketing",
1238
+ "utility",
1239
+ "authentication",
1240
+ "transactional",
1241
+ "service_implicit",
1242
+ "service_explicit",
1243
+ "promotional"
1244
+ ]),
1245
+ providerCategory: Schema.Union([Schema.Literals([
1246
+ "marketing",
1247
+ "utility",
1248
+ "authentication",
1249
+ "transactional",
1250
+ "service_implicit",
1251
+ "service_explicit",
1252
+ "promotional"
1253
+ ]), Schema.Null]),
1254
+ providerTemplateId: Schema.Union([Schema.String, Schema.Null]),
1255
+ reason: Schema.Union([Schema.String, Schema.Null]),
1256
+ submittedAt: Schema.Union([Schema.String, Schema.Null]),
1257
+ statusChangedAt: Schema.String,
1258
+ createdAt: Schema.String,
1259
+ updatedAt: Schema.String,
1260
+ organizationId: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
1261
+ expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
1262
+ identifier: "OrganizationId"
1263
+ })),
1264
+ previousStatus: Schema.Literals([
1265
+ "draft",
1266
+ "submitted",
1267
+ "approved",
1268
+ "rejected",
1269
+ "paused",
1270
+ "disabled"
1271
+ ])
1272
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))])
1273
+ }), [Schema.Record(Schema.String, Schema.Json.annotate({ expected: "JSON value" }))]);
932
1274
  const MailboxMessageReceivedEventSchema = Schema.StructWithRest(Schema.Struct({
933
1275
  type: Schema.Literal("mailbox.message.received"),
934
1276
  timestamp: Schema.String,
@@ -1326,6 +1668,7 @@ const SamvaWebhookEventSchema = Schema.Union([
1326
1668
  WebhookTestEventSchema,
1327
1669
  DomainUpdatedEventSchema,
1328
1670
  DomainWarmingUpdatedEventSchema,
1671
+ TemplateRegistrationUpdatedEventSchema,
1329
1672
  MailboxMessageReceivedEventSchema,
1330
1673
  MailboxMessageSentEventSchema,
1331
1674
  MailboxActionPendingApprovalEventSchema,
@@ -1334,6 +1677,6 @@ const SamvaWebhookEventSchema = Schema.Union([
1334
1677
  MailboxMessageDiscardedEventSchema
1335
1678
  ]);
1336
1679
  //#endregion
1337
- export { ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, MailboxActionPendingApprovalEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageQuarantinedEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageReleasedEventSchema, MailboxMessageSentEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema };
1680
+ export { ContactCreatedEventSchema, ContactDeletedEventSchema, ContactResubscribedEventSchema, ContactSubscribedEventSchema, ContactUnsubscribedEventSchema, ContactUpdatedEventSchema, ConversationArchivedEventSchema, ConversationCreatedEventSchema, ConversationUpdatedEventSchema, DomainUpdatedEventSchema, DomainWarmingUpdatedEventSchema, MailboxActionPendingApprovalEventSchema, MailboxMessageDiscardedEventSchema, MailboxMessageQuarantinedEventSchema, MailboxMessageReceivedEventSchema, MailboxMessageReleasedEventSchema, MailboxMessageSentEventSchema, MessageBouncedEventSchema, MessageClickedEventSchema, MessageComplainedEventSchema, MessageDeliveredEventSchema, MessageFailedEventSchema, MessageOpenedEventSchema, MessageReadEventSchema, MessageReceivedEventSchema, MessageSentEventSchema, SamvaWebhookEventSchema, TemplateRegistrationUpdatedEventSchema, WebhookCreatedEventSchema, WebhookDeletedEventSchema, WebhookTestEventSchema, WebhookUpdatedEventSchema };
1338
1681
 
1339
1682
  //# sourceMappingURL=schemas.gen.js.map