@spectrum-ts/core 6.1.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -447,31 +447,6 @@ interface Message<TPlatform extends string = string, TSender extends User = User
447
447
  declare const editSchema: z.ZodObject<{
448
448
  type: z.ZodLiteral<"edit">;
449
449
  content: z.ZodCustom<{
450
- type: "reaction";
451
- emoji: string;
452
- target: Message<string, User, Space<unknown>>;
453
- } | {
454
- type: "text";
455
- text: string;
456
- } | {
457
- type: "markdown";
458
- markdown: string;
459
- } | {
460
- type: "attachment";
461
- id: string;
462
- name: string;
463
- mimeType: string;
464
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
465
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
466
- size?: number | undefined;
467
- } | {
468
- type: "streamText";
469
- stream: () => AsyncIterable<string>;
470
- format?: "markdown" | "plain" | undefined;
471
- } | {
472
- type: "custom";
473
- raw: unknown;
474
- } | {
475
450
  type: "contact";
476
451
  user?: {
477
452
  __platform: string;
@@ -515,39 +490,29 @@ declare const editSchema: z.ZodObject<{
515
490
  } | undefined;
516
491
  raw?: unknown;
517
492
  } | {
518
- type: "voice";
493
+ type: "attachment";
494
+ id: string;
495
+ name: string;
519
496
  mimeType: string;
520
497
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
521
498
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
522
- name?: string | undefined;
523
- duration?: number | undefined;
524
499
  size?: number | undefined;
525
- } | {
526
- type: "richlink";
527
- url: string;
528
- title: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
529
- summary: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
530
- cover: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodObject<{
531
- mimeType: z.ZodOptional<z.ZodString>;
532
- read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
533
- stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
534
- }, z.core.$strip>>>>;
535
- } | {
536
- type: "app";
537
- url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
538
- layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
539
- caption: z.ZodOptional<z.ZodString>;
540
- subcaption: z.ZodOptional<z.ZodString>;
541
- trailingCaption: z.ZodOptional<z.ZodString>;
542
- trailingSubcaption: z.ZodOptional<z.ZodString>;
543
- image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
544
- imageTitle: z.ZodOptional<z.ZodString>;
545
- imageSubtitle: z.ZodOptional<z.ZodString>;
546
- summary: z.ZodOptional<z.ZodString>;
547
- }, z.core.$strip>>>;
548
500
  } | {
549
501
  type: "group";
550
502
  items: Message<string, User, Space<unknown>>[];
503
+ } | {
504
+ type: "custom";
505
+ raw: unknown;
506
+ } | {
507
+ type: "text";
508
+ text: string;
509
+ } | {
510
+ type: "markdown";
511
+ markdown: string;
512
+ } | {
513
+ type: "reaction";
514
+ emoji: string;
515
+ target: Message<string, User, Space<unknown>>;
551
516
  } | {
552
517
  type: "poll";
553
518
  title: string;
@@ -568,15 +533,37 @@ declare const editSchema: z.ZodObject<{
568
533
  };
569
534
  selected: boolean;
570
535
  title: string;
536
+ } | {
537
+ type: "richlink";
538
+ url: string;
539
+ } | {
540
+ type: "voice";
541
+ mimeType: string;
542
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
543
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
544
+ name?: string | undefined;
545
+ duration?: number | undefined;
546
+ size?: number | undefined;
547
+ } | {
548
+ type: "streamText";
549
+ stream: () => AsyncIterable<string>;
550
+ format?: "markdown" | "plain" | undefined;
551
+ } | {
552
+ type: "app";
553
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
554
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
555
+ caption: z.ZodOptional<z.ZodString>;
556
+ subcaption: z.ZodOptional<z.ZodString>;
557
+ trailingCaption: z.ZodOptional<z.ZodString>;
558
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
559
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
560
+ imageTitle: z.ZodOptional<z.ZodString>;
561
+ imageSubtitle: z.ZodOptional<z.ZodString>;
562
+ summary: z.ZodOptional<z.ZodString>;
563
+ }, z.core.$strip>>>;
571
564
  } | {
572
565
  type: "effect";
573
566
  content: {
574
- type: "text";
575
- text: string;
576
- } | {
577
- type: "markdown";
578
- markdown: string;
579
- } | {
580
567
  type: "attachment";
581
568
  id: string;
582
569
  name: string;
@@ -584,6 +571,12 @@ declare const editSchema: z.ZodObject<{
584
571
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
585
572
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
586
573
  size?: number | undefined;
574
+ } | {
575
+ type: "text";
576
+ text: string;
577
+ } | {
578
+ type: "markdown";
579
+ markdown: string;
587
580
  };
588
581
  effect: string;
589
582
  } | {
@@ -602,31 +595,6 @@ declare const editSchema: z.ZodObject<{
602
595
  kind: "clear";
603
596
  };
604
597
  }, {
605
- type: "reaction";
606
- emoji: string;
607
- target: Message<string, User, Space<unknown>>;
608
- } | {
609
- type: "text";
610
- text: string;
611
- } | {
612
- type: "markdown";
613
- markdown: string;
614
- } | {
615
- type: "attachment";
616
- id: string;
617
- name: string;
618
- mimeType: string;
619
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
620
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
621
- size?: number | undefined;
622
- } | {
623
- type: "streamText";
624
- stream: () => AsyncIterable<string>;
625
- format?: "markdown" | "plain" | undefined;
626
- } | {
627
- type: "custom";
628
- raw: unknown;
629
- } | {
630
598
  type: "contact";
631
599
  user?: {
632
600
  __platform: string;
@@ -670,39 +638,29 @@ declare const editSchema: z.ZodObject<{
670
638
  } | undefined;
671
639
  raw?: unknown;
672
640
  } | {
673
- type: "voice";
641
+ type: "attachment";
642
+ id: string;
643
+ name: string;
674
644
  mimeType: string;
675
645
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
676
646
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
677
- name?: string | undefined;
678
- duration?: number | undefined;
679
647
  size?: number | undefined;
680
- } | {
681
- type: "richlink";
682
- url: string;
683
- title: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
684
- summary: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
685
- cover: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodObject<{
686
- mimeType: z.ZodOptional<z.ZodString>;
687
- read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
688
- stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
689
- }, z.core.$strip>>>>;
690
- } | {
691
- type: "app";
692
- url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
693
- layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
694
- caption: z.ZodOptional<z.ZodString>;
695
- subcaption: z.ZodOptional<z.ZodString>;
696
- trailingCaption: z.ZodOptional<z.ZodString>;
697
- trailingSubcaption: z.ZodOptional<z.ZodString>;
698
- image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
699
- imageTitle: z.ZodOptional<z.ZodString>;
700
- imageSubtitle: z.ZodOptional<z.ZodString>;
701
- summary: z.ZodOptional<z.ZodString>;
702
- }, z.core.$strip>>>;
703
648
  } | {
704
649
  type: "group";
705
650
  items: Message<string, User, Space<unknown>>[];
651
+ } | {
652
+ type: "custom";
653
+ raw: unknown;
654
+ } | {
655
+ type: "text";
656
+ text: string;
657
+ } | {
658
+ type: "markdown";
659
+ markdown: string;
660
+ } | {
661
+ type: "reaction";
662
+ emoji: string;
663
+ target: Message<string, User, Space<unknown>>;
706
664
  } | {
707
665
  type: "poll";
708
666
  title: string;
@@ -723,15 +681,37 @@ declare const editSchema: z.ZodObject<{
723
681
  };
724
682
  selected: boolean;
725
683
  title: string;
684
+ } | {
685
+ type: "richlink";
686
+ url: string;
687
+ } | {
688
+ type: "voice";
689
+ mimeType: string;
690
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
691
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
692
+ name?: string | undefined;
693
+ duration?: number | undefined;
694
+ size?: number | undefined;
695
+ } | {
696
+ type: "streamText";
697
+ stream: () => AsyncIterable<string>;
698
+ format?: "markdown" | "plain" | undefined;
699
+ } | {
700
+ type: "app";
701
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
702
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
703
+ caption: z.ZodOptional<z.ZodString>;
704
+ subcaption: z.ZodOptional<z.ZodString>;
705
+ trailingCaption: z.ZodOptional<z.ZodString>;
706
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
707
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
708
+ imageTitle: z.ZodOptional<z.ZodString>;
709
+ imageSubtitle: z.ZodOptional<z.ZodString>;
710
+ summary: z.ZodOptional<z.ZodString>;
711
+ }, z.core.$strip>>>;
726
712
  } | {
727
713
  type: "effect";
728
714
  content: {
729
- type: "text";
730
- text: string;
731
- } | {
732
- type: "markdown";
733
- markdown: string;
734
- } | {
735
715
  type: "attachment";
736
716
  id: string;
737
717
  name: string;
@@ -739,6 +719,12 @@ declare const editSchema: z.ZodObject<{
739
719
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
740
720
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
741
721
  size?: number | undefined;
722
+ } | {
723
+ type: "text";
724
+ text: string;
725
+ } | {
726
+ type: "markdown";
727
+ markdown: string;
742
728
  };
743
729
  effect: string;
744
730
  } | {
@@ -982,31 +968,6 @@ declare function rename(displayName: string): ContentBuilder;
982
968
  declare const replySchema: z.ZodObject<{
983
969
  type: z.ZodLiteral<"reply">;
984
970
  content: z.ZodCustom<{
985
- type: "reaction";
986
- emoji: string;
987
- target: Message<string, User, Space<unknown>>;
988
- } | {
989
- type: "text";
990
- text: string;
991
- } | {
992
- type: "markdown";
993
- markdown: string;
994
- } | {
995
- type: "attachment";
996
- id: string;
997
- name: string;
998
- mimeType: string;
999
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1000
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1001
- size?: number | undefined;
1002
- } | {
1003
- type: "streamText";
1004
- stream: () => AsyncIterable<string>;
1005
- format?: "markdown" | "plain" | undefined;
1006
- } | {
1007
- type: "custom";
1008
- raw: unknown;
1009
- } | {
1010
971
  type: "contact";
1011
972
  user?: {
1012
973
  __platform: string;
@@ -1050,48 +1011,38 @@ declare const replySchema: z.ZodObject<{
1050
1011
  } | undefined;
1051
1012
  raw?: unknown;
1052
1013
  } | {
1053
- type: "voice";
1014
+ type: "attachment";
1015
+ id: string;
1016
+ name: string;
1054
1017
  mimeType: string;
1055
1018
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1056
1019
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1057
- name?: string | undefined;
1058
- duration?: number | undefined;
1059
1020
  size?: number | undefined;
1060
- } | {
1061
- type: "richlink";
1062
- url: string;
1063
- title: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
1064
- summary: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
1065
- cover: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodObject<{
1066
- mimeType: z.ZodOptional<z.ZodString>;
1067
- read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1068
- stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1069
- }, z.core.$strip>>>>;
1070
- } | {
1071
- type: "app";
1072
- url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
1073
- layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
1074
- caption: z.ZodOptional<z.ZodString>;
1075
- subcaption: z.ZodOptional<z.ZodString>;
1076
- trailingCaption: z.ZodOptional<z.ZodString>;
1077
- trailingSubcaption: z.ZodOptional<z.ZodString>;
1078
- image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
1079
- imageTitle: z.ZodOptional<z.ZodString>;
1080
- imageSubtitle: z.ZodOptional<z.ZodString>;
1081
- summary: z.ZodOptional<z.ZodString>;
1082
- }, z.core.$strip>>>;
1083
1021
  } | {
1084
1022
  type: "group";
1085
1023
  items: Message<string, User, Space<unknown>>[];
1086
1024
  } | {
1087
- type: "poll";
1088
- title: string;
1089
- options: {
1090
- title: string;
1091
- }[];
1025
+ type: "custom";
1026
+ raw: unknown;
1092
1027
  } | {
1093
- type: "poll_option";
1094
- option: {
1028
+ type: "text";
1029
+ text: string;
1030
+ } | {
1031
+ type: "markdown";
1032
+ markdown: string;
1033
+ } | {
1034
+ type: "reaction";
1035
+ emoji: string;
1036
+ target: Message<string, User, Space<unknown>>;
1037
+ } | {
1038
+ type: "poll";
1039
+ title: string;
1040
+ options: {
1041
+ title: string;
1042
+ }[];
1043
+ } | {
1044
+ type: "poll_option";
1045
+ option: {
1095
1046
  title: string;
1096
1047
  };
1097
1048
  poll: {
@@ -1103,15 +1054,37 @@ declare const replySchema: z.ZodObject<{
1103
1054
  };
1104
1055
  selected: boolean;
1105
1056
  title: string;
1057
+ } | {
1058
+ type: "richlink";
1059
+ url: string;
1060
+ } | {
1061
+ type: "voice";
1062
+ mimeType: string;
1063
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1064
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1065
+ name?: string | undefined;
1066
+ duration?: number | undefined;
1067
+ size?: number | undefined;
1068
+ } | {
1069
+ type: "streamText";
1070
+ stream: () => AsyncIterable<string>;
1071
+ format?: "markdown" | "plain" | undefined;
1072
+ } | {
1073
+ type: "app";
1074
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
1075
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
1076
+ caption: z.ZodOptional<z.ZodString>;
1077
+ subcaption: z.ZodOptional<z.ZodString>;
1078
+ trailingCaption: z.ZodOptional<z.ZodString>;
1079
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
1080
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
1081
+ imageTitle: z.ZodOptional<z.ZodString>;
1082
+ imageSubtitle: z.ZodOptional<z.ZodString>;
1083
+ summary: z.ZodOptional<z.ZodString>;
1084
+ }, z.core.$strip>>>;
1106
1085
  } | {
1107
1086
  type: "effect";
1108
1087
  content: {
1109
- type: "text";
1110
- text: string;
1111
- } | {
1112
- type: "markdown";
1113
- markdown: string;
1114
- } | {
1115
1088
  type: "attachment";
1116
1089
  id: string;
1117
1090
  name: string;
@@ -1119,6 +1092,12 @@ declare const replySchema: z.ZodObject<{
1119
1092
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1120
1093
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1121
1094
  size?: number | undefined;
1095
+ } | {
1096
+ type: "text";
1097
+ text: string;
1098
+ } | {
1099
+ type: "markdown";
1100
+ markdown: string;
1122
1101
  };
1123
1102
  effect: string;
1124
1103
  } | {
@@ -1137,31 +1116,6 @@ declare const replySchema: z.ZodObject<{
1137
1116
  kind: "clear";
1138
1117
  };
1139
1118
  }, {
1140
- type: "reaction";
1141
- emoji: string;
1142
- target: Message<string, User, Space<unknown>>;
1143
- } | {
1144
- type: "text";
1145
- text: string;
1146
- } | {
1147
- type: "markdown";
1148
- markdown: string;
1149
- } | {
1150
- type: "attachment";
1151
- id: string;
1152
- name: string;
1153
- mimeType: string;
1154
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1155
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1156
- size?: number | undefined;
1157
- } | {
1158
- type: "streamText";
1159
- stream: () => AsyncIterable<string>;
1160
- format?: "markdown" | "plain" | undefined;
1161
- } | {
1162
- type: "custom";
1163
- raw: unknown;
1164
- } | {
1165
1119
  type: "contact";
1166
1120
  user?: {
1167
1121
  __platform: string;
@@ -1205,39 +1159,29 @@ declare const replySchema: z.ZodObject<{
1205
1159
  } | undefined;
1206
1160
  raw?: unknown;
1207
1161
  } | {
1208
- type: "voice";
1162
+ type: "attachment";
1163
+ id: string;
1164
+ name: string;
1209
1165
  mimeType: string;
1210
1166
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1211
1167
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1212
- name?: string | undefined;
1213
- duration?: number | undefined;
1214
1168
  size?: number | undefined;
1215
- } | {
1216
- type: "richlink";
1217
- url: string;
1218
- title: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
1219
- summary: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
1220
- cover: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodObject<{
1221
- mimeType: z.ZodOptional<z.ZodString>;
1222
- read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1223
- stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1224
- }, z.core.$strip>>>>;
1225
- } | {
1226
- type: "app";
1227
- url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
1228
- layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
1229
- caption: z.ZodOptional<z.ZodString>;
1230
- subcaption: z.ZodOptional<z.ZodString>;
1231
- trailingCaption: z.ZodOptional<z.ZodString>;
1232
- trailingSubcaption: z.ZodOptional<z.ZodString>;
1233
- image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
1234
- imageTitle: z.ZodOptional<z.ZodString>;
1235
- imageSubtitle: z.ZodOptional<z.ZodString>;
1236
- summary: z.ZodOptional<z.ZodString>;
1237
- }, z.core.$strip>>>;
1238
1169
  } | {
1239
1170
  type: "group";
1240
1171
  items: Message<string, User, Space<unknown>>[];
1172
+ } | {
1173
+ type: "custom";
1174
+ raw: unknown;
1175
+ } | {
1176
+ type: "text";
1177
+ text: string;
1178
+ } | {
1179
+ type: "markdown";
1180
+ markdown: string;
1181
+ } | {
1182
+ type: "reaction";
1183
+ emoji: string;
1184
+ target: Message<string, User, Space<unknown>>;
1241
1185
  } | {
1242
1186
  type: "poll";
1243
1187
  title: string;
@@ -1258,15 +1202,37 @@ declare const replySchema: z.ZodObject<{
1258
1202
  };
1259
1203
  selected: boolean;
1260
1204
  title: string;
1205
+ } | {
1206
+ type: "richlink";
1207
+ url: string;
1208
+ } | {
1209
+ type: "voice";
1210
+ mimeType: string;
1211
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1212
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1213
+ name?: string | undefined;
1214
+ duration?: number | undefined;
1215
+ size?: number | undefined;
1216
+ } | {
1217
+ type: "streamText";
1218
+ stream: () => AsyncIterable<string>;
1219
+ format?: "markdown" | "plain" | undefined;
1220
+ } | {
1221
+ type: "app";
1222
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
1223
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
1224
+ caption: z.ZodOptional<z.ZodString>;
1225
+ subcaption: z.ZodOptional<z.ZodString>;
1226
+ trailingCaption: z.ZodOptional<z.ZodString>;
1227
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
1228
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
1229
+ imageTitle: z.ZodOptional<z.ZodString>;
1230
+ imageSubtitle: z.ZodOptional<z.ZodString>;
1231
+ summary: z.ZodOptional<z.ZodString>;
1232
+ }, z.core.$strip>>>;
1261
1233
  } | {
1262
1234
  type: "effect";
1263
1235
  content: {
1264
- type: "text";
1265
- text: string;
1266
- } | {
1267
- type: "markdown";
1268
- markdown: string;
1269
- } | {
1270
1236
  type: "attachment";
1271
1237
  id: string;
1272
1238
  name: string;
@@ -1274,6 +1240,12 @@ declare const replySchema: z.ZodObject<{
1274
1240
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1275
1241
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1276
1242
  size?: number | undefined;
1243
+ } | {
1244
+ type: "text";
1245
+ text: string;
1246
+ } | {
1247
+ type: "markdown";
1248
+ markdown: string;
1277
1249
  };
1278
1250
  effect: string;
1279
1251
  } | {
@@ -1301,28 +1273,21 @@ declare function reply(content: ContentInput, target: Message | undefined): Cont
1301
1273
  declare const resolveContents: (items: readonly ContentInput[]) => Promise<Content[]>;
1302
1274
  //#endregion
1303
1275
  //#region src/content/richlink.d.ts
1276
+ /**
1277
+ * A URL the platform should render as a rich link preview.
1278
+ *
1279
+ * Outbound-only by design: inbound messages always surface as `text` content —
1280
+ * a URL received from a platform arrives as plain text, never as `richlink`, so
1281
+ * no metadata is fetched on the inbound path. On outbound, each platform asks
1282
+ * its native client to render the preview (remote iMessage: `enableLinkPreview`;
1283
+ * Telegram: auto-unfurls the bare URL), so the framework carries only the URL
1284
+ * and fetches nothing itself.
1285
+ */
1304
1286
  declare const richlinkSchema: z.ZodObject<{
1305
1287
  type: z.ZodLiteral<"richlink">;
1306
1288
  url: z.ZodURL;
1307
- title: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
1308
- summary: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
1309
- cover: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodObject<{
1310
- mimeType: z.ZodOptional<z.ZodString>;
1311
- read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1312
- stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1313
- }, z.core.$strip>>>>;
1314
1289
  }, z.core.$strip>;
1315
1290
  type Richlink = z.infer<typeof richlinkSchema>;
1316
- /**
1317
- * Construct a `richlink` content value.
1318
- *
1319
- * Accessors (`title`, `summary`, `cover`) are async and lazy: the first call
1320
- * issues a single network request to the URL; subsequent calls share the
1321
- * cached result. Network / parse failures resolve to `undefined` and are
1322
- * cached — no retries. Callers who only need `title` / `summary` never
1323
- * trigger an image download; calling `cover.read()` triggers one additional
1324
- * request to fetch the image bytes.
1325
- */
1326
1291
  declare const asRichlink: (input: {
1327
1292
  url: string;
1328
1293
  }) => Richlink;
@@ -6807,13 +6772,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6807
6772
  }, z.core.$strip>, z.ZodObject<{
6808
6773
  type: z.ZodLiteral<"richlink">;
6809
6774
  url: z.ZodURL;
6810
- title: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
6811
- summary: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
6812
- cover: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodObject<{
6813
- mimeType: z.ZodOptional<z.ZodString>;
6814
- read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6815
- stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6816
- }, z.core.$strip>>>>;
6817
6775
  }, z.core.$strip>, z.ZodObject<{
6818
6776
  type: z.ZodLiteral<"app">;
6819
6777
  url: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -6893,31 +6851,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6893
6851
  }, z.core.$strip>, z.ZodObject<{
6894
6852
  type: z.ZodLiteral<"reply">;
6895
6853
  content: z.ZodCustom<{
6896
- type: "reaction";
6897
- emoji: string;
6898
- target: Message<string, User, Space<unknown>>;
6899
- } | {
6900
- type: "text";
6901
- text: string;
6902
- } | {
6903
- type: "markdown";
6904
- markdown: string;
6905
- } | {
6906
- type: "attachment";
6907
- id: string;
6908
- name: string;
6909
- mimeType: string;
6910
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6911
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6912
- size?: number | undefined;
6913
- } | {
6914
- type: "streamText";
6915
- stream: () => AsyncIterable<string>;
6916
- format?: "markdown" | "plain" | undefined;
6917
- } | {
6918
- type: "custom";
6919
- raw: unknown;
6920
- } | {
6921
6854
  type: "contact";
6922
6855
  user?: {
6923
6856
  __platform: string;
@@ -6961,39 +6894,29 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6961
6894
  } | undefined;
6962
6895
  raw?: unknown;
6963
6896
  } | {
6964
- type: "voice";
6897
+ type: "attachment";
6898
+ id: string;
6899
+ name: string;
6965
6900
  mimeType: string;
6966
6901
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6967
6902
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6968
- name?: string | undefined;
6969
- duration?: number | undefined;
6970
6903
  size?: number | undefined;
6971
- } | {
6972
- type: "richlink";
6973
- url: string;
6974
- title: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
6975
- summary: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
6976
- cover: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodObject<{
6977
- mimeType: z.ZodOptional<z.ZodString>;
6978
- read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6979
- stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6980
- }, z.core.$strip>>>>;
6981
- } | {
6982
- type: "app";
6983
- url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
6984
- layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
6985
- caption: z.ZodOptional<z.ZodString>;
6986
- subcaption: z.ZodOptional<z.ZodString>;
6987
- trailingCaption: z.ZodOptional<z.ZodString>;
6988
- trailingSubcaption: z.ZodOptional<z.ZodString>;
6989
- image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
6990
- imageTitle: z.ZodOptional<z.ZodString>;
6991
- imageSubtitle: z.ZodOptional<z.ZodString>;
6992
- summary: z.ZodOptional<z.ZodString>;
6993
- }, z.core.$strip>>>;
6994
6904
  } | {
6995
6905
  type: "group";
6996
6906
  items: Message<string, User, Space<unknown>>[];
6907
+ } | {
6908
+ type: "custom";
6909
+ raw: unknown;
6910
+ } | {
6911
+ type: "text";
6912
+ text: string;
6913
+ } | {
6914
+ type: "markdown";
6915
+ markdown: string;
6916
+ } | {
6917
+ type: "reaction";
6918
+ emoji: string;
6919
+ target: Message<string, User, Space<unknown>>;
6997
6920
  } | {
6998
6921
  type: "poll";
6999
6922
  title: string;
@@ -7015,26 +6938,54 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7015
6938
  selected: boolean;
7016
6939
  title: string;
7017
6940
  } | {
7018
- type: "effect";
7019
- content: {
7020
- type: "text";
7021
- text: string;
7022
- } | {
7023
- type: "markdown";
7024
- markdown: string;
7025
- } | {
7026
- type: "attachment";
7027
- id: string;
7028
- name: string;
7029
- mimeType: string;
7030
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7031
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7032
- size?: number | undefined;
7033
- };
7034
- effect: string;
6941
+ type: "richlink";
6942
+ url: string;
7035
6943
  } | {
7036
- type: "typing";
7037
- state: "start" | "stop";
6944
+ type: "voice";
6945
+ mimeType: string;
6946
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6947
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6948
+ name?: string | undefined;
6949
+ duration?: number | undefined;
6950
+ size?: number | undefined;
6951
+ } | {
6952
+ type: "streamText";
6953
+ stream: () => AsyncIterable<string>;
6954
+ format?: "markdown" | "plain" | undefined;
6955
+ } | {
6956
+ type: "app";
6957
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
6958
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
6959
+ caption: z.ZodOptional<z.ZodString>;
6960
+ subcaption: z.ZodOptional<z.ZodString>;
6961
+ trailingCaption: z.ZodOptional<z.ZodString>;
6962
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
6963
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
6964
+ imageTitle: z.ZodOptional<z.ZodString>;
6965
+ imageSubtitle: z.ZodOptional<z.ZodString>;
6966
+ summary: z.ZodOptional<z.ZodString>;
6967
+ }, z.core.$strip>>>;
6968
+ } | {
6969
+ type: "effect";
6970
+ content: {
6971
+ type: "attachment";
6972
+ id: string;
6973
+ name: string;
6974
+ mimeType: string;
6975
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6976
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6977
+ size?: number | undefined;
6978
+ } | {
6979
+ type: "text";
6980
+ text: string;
6981
+ } | {
6982
+ type: "markdown";
6983
+ markdown: string;
6984
+ };
6985
+ effect: string;
6986
+ } | {
6987
+ type: "typing";
6988
+ state: "start" | "stop";
7038
6989
  } | {
7039
6990
  type: "rename";
7040
6991
  displayName: string;
@@ -7048,31 +6999,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7048
6999
  kind: "clear";
7049
7000
  };
7050
7001
  }, {
7051
- type: "reaction";
7052
- emoji: string;
7053
- target: Message<string, User, Space<unknown>>;
7054
- } | {
7055
- type: "text";
7056
- text: string;
7057
- } | {
7058
- type: "markdown";
7059
- markdown: string;
7060
- } | {
7061
- type: "attachment";
7062
- id: string;
7063
- name: string;
7064
- mimeType: string;
7065
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7066
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7067
- size?: number | undefined;
7068
- } | {
7069
- type: "streamText";
7070
- stream: () => AsyncIterable<string>;
7071
- format?: "markdown" | "plain" | undefined;
7072
- } | {
7073
- type: "custom";
7074
- raw: unknown;
7075
- } | {
7076
7002
  type: "contact";
7077
7003
  user?: {
7078
7004
  __platform: string;
@@ -7116,39 +7042,29 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7116
7042
  } | undefined;
7117
7043
  raw?: unknown;
7118
7044
  } | {
7119
- type: "voice";
7045
+ type: "attachment";
7046
+ id: string;
7047
+ name: string;
7120
7048
  mimeType: string;
7121
7049
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7122
7050
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7123
- name?: string | undefined;
7124
- duration?: number | undefined;
7125
7051
  size?: number | undefined;
7126
- } | {
7127
- type: "richlink";
7128
- url: string;
7129
- title: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
7130
- summary: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
7131
- cover: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodObject<{
7132
- mimeType: z.ZodOptional<z.ZodString>;
7133
- read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7134
- stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7135
- }, z.core.$strip>>>>;
7136
- } | {
7137
- type: "app";
7138
- url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
7139
- layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
7140
- caption: z.ZodOptional<z.ZodString>;
7141
- subcaption: z.ZodOptional<z.ZodString>;
7142
- trailingCaption: z.ZodOptional<z.ZodString>;
7143
- trailingSubcaption: z.ZodOptional<z.ZodString>;
7144
- image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7145
- imageTitle: z.ZodOptional<z.ZodString>;
7146
- imageSubtitle: z.ZodOptional<z.ZodString>;
7147
- summary: z.ZodOptional<z.ZodString>;
7148
- }, z.core.$strip>>>;
7149
7052
  } | {
7150
7053
  type: "group";
7151
7054
  items: Message<string, User, Space<unknown>>[];
7055
+ } | {
7056
+ type: "custom";
7057
+ raw: unknown;
7058
+ } | {
7059
+ type: "text";
7060
+ text: string;
7061
+ } | {
7062
+ type: "markdown";
7063
+ markdown: string;
7064
+ } | {
7065
+ type: "reaction";
7066
+ emoji: string;
7067
+ target: Message<string, User, Space<unknown>>;
7152
7068
  } | {
7153
7069
  type: "poll";
7154
7070
  title: string;
@@ -7169,15 +7085,37 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7169
7085
  };
7170
7086
  selected: boolean;
7171
7087
  title: string;
7088
+ } | {
7089
+ type: "richlink";
7090
+ url: string;
7091
+ } | {
7092
+ type: "voice";
7093
+ mimeType: string;
7094
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7095
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7096
+ name?: string | undefined;
7097
+ duration?: number | undefined;
7098
+ size?: number | undefined;
7099
+ } | {
7100
+ type: "streamText";
7101
+ stream: () => AsyncIterable<string>;
7102
+ format?: "markdown" | "plain" | undefined;
7103
+ } | {
7104
+ type: "app";
7105
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
7106
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
7107
+ caption: z.ZodOptional<z.ZodString>;
7108
+ subcaption: z.ZodOptional<z.ZodString>;
7109
+ trailingCaption: z.ZodOptional<z.ZodString>;
7110
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
7111
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7112
+ imageTitle: z.ZodOptional<z.ZodString>;
7113
+ imageSubtitle: z.ZodOptional<z.ZodString>;
7114
+ summary: z.ZodOptional<z.ZodString>;
7115
+ }, z.core.$strip>>>;
7172
7116
  } | {
7173
7117
  type: "effect";
7174
7118
  content: {
7175
- type: "text";
7176
- text: string;
7177
- } | {
7178
- type: "markdown";
7179
- markdown: string;
7180
- } | {
7181
7119
  type: "attachment";
7182
7120
  id: string;
7183
7121
  name: string;
@@ -7185,6 +7123,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7185
7123
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7186
7124
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7187
7125
  size?: number | undefined;
7126
+ } | {
7127
+ type: "text";
7128
+ text: string;
7129
+ } | {
7130
+ type: "markdown";
7131
+ markdown: string;
7188
7132
  };
7189
7133
  effect: string;
7190
7134
  } | {
@@ -7207,31 +7151,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7207
7151
  }, z.core.$strip>, z.ZodObject<{
7208
7152
  type: z.ZodLiteral<"edit">;
7209
7153
  content: z.ZodCustom<{
7210
- type: "reaction";
7211
- emoji: string;
7212
- target: Message<string, User, Space<unknown>>;
7213
- } | {
7214
- type: "text";
7215
- text: string;
7216
- } | {
7217
- type: "markdown";
7218
- markdown: string;
7219
- } | {
7220
- type: "attachment";
7221
- id: string;
7222
- name: string;
7223
- mimeType: string;
7224
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7225
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7226
- size?: number | undefined;
7227
- } | {
7228
- type: "streamText";
7229
- stream: () => AsyncIterable<string>;
7230
- format?: "markdown" | "plain" | undefined;
7231
- } | {
7232
- type: "custom";
7233
- raw: unknown;
7234
- } | {
7235
7154
  type: "contact";
7236
7155
  user?: {
7237
7156
  __platform: string;
@@ -7275,39 +7194,29 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7275
7194
  } | undefined;
7276
7195
  raw?: unknown;
7277
7196
  } | {
7278
- type: "voice";
7197
+ type: "attachment";
7198
+ id: string;
7199
+ name: string;
7279
7200
  mimeType: string;
7280
7201
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7281
7202
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7282
- name?: string | undefined;
7283
- duration?: number | undefined;
7284
7203
  size?: number | undefined;
7285
- } | {
7286
- type: "richlink";
7287
- url: string;
7288
- title: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
7289
- summary: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
7290
- cover: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodObject<{
7291
- mimeType: z.ZodOptional<z.ZodString>;
7292
- read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7293
- stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7294
- }, z.core.$strip>>>>;
7295
- } | {
7296
- type: "app";
7297
- url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
7298
- layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
7299
- caption: z.ZodOptional<z.ZodString>;
7300
- subcaption: z.ZodOptional<z.ZodString>;
7301
- trailingCaption: z.ZodOptional<z.ZodString>;
7302
- trailingSubcaption: z.ZodOptional<z.ZodString>;
7303
- image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7304
- imageTitle: z.ZodOptional<z.ZodString>;
7305
- imageSubtitle: z.ZodOptional<z.ZodString>;
7306
- summary: z.ZodOptional<z.ZodString>;
7307
- }, z.core.$strip>>>;
7308
7204
  } | {
7309
7205
  type: "group";
7310
7206
  items: Message<string, User, Space<unknown>>[];
7207
+ } | {
7208
+ type: "custom";
7209
+ raw: unknown;
7210
+ } | {
7211
+ type: "text";
7212
+ text: string;
7213
+ } | {
7214
+ type: "markdown";
7215
+ markdown: string;
7216
+ } | {
7217
+ type: "reaction";
7218
+ emoji: string;
7219
+ target: Message<string, User, Space<unknown>>;
7311
7220
  } | {
7312
7221
  type: "poll";
7313
7222
  title: string;
@@ -7328,15 +7237,37 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7328
7237
  };
7329
7238
  selected: boolean;
7330
7239
  title: string;
7240
+ } | {
7241
+ type: "richlink";
7242
+ url: string;
7243
+ } | {
7244
+ type: "voice";
7245
+ mimeType: string;
7246
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7247
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7248
+ name?: string | undefined;
7249
+ duration?: number | undefined;
7250
+ size?: number | undefined;
7251
+ } | {
7252
+ type: "streamText";
7253
+ stream: () => AsyncIterable<string>;
7254
+ format?: "markdown" | "plain" | undefined;
7255
+ } | {
7256
+ type: "app";
7257
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
7258
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
7259
+ caption: z.ZodOptional<z.ZodString>;
7260
+ subcaption: z.ZodOptional<z.ZodString>;
7261
+ trailingCaption: z.ZodOptional<z.ZodString>;
7262
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
7263
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7264
+ imageTitle: z.ZodOptional<z.ZodString>;
7265
+ imageSubtitle: z.ZodOptional<z.ZodString>;
7266
+ summary: z.ZodOptional<z.ZodString>;
7267
+ }, z.core.$strip>>>;
7331
7268
  } | {
7332
7269
  type: "effect";
7333
7270
  content: {
7334
- type: "text";
7335
- text: string;
7336
- } | {
7337
- type: "markdown";
7338
- markdown: string;
7339
- } | {
7340
7271
  type: "attachment";
7341
7272
  id: string;
7342
7273
  name: string;
@@ -7344,6 +7275,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7344
7275
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7345
7276
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7346
7277
  size?: number | undefined;
7278
+ } | {
7279
+ type: "text";
7280
+ text: string;
7281
+ } | {
7282
+ type: "markdown";
7283
+ markdown: string;
7347
7284
  };
7348
7285
  effect: string;
7349
7286
  } | {
@@ -7362,31 +7299,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7362
7299
  kind: "clear";
7363
7300
  };
7364
7301
  }, {
7365
- type: "reaction";
7366
- emoji: string;
7367
- target: Message<string, User, Space<unknown>>;
7368
- } | {
7369
- type: "text";
7370
- text: string;
7371
- } | {
7372
- type: "markdown";
7373
- markdown: string;
7374
- } | {
7375
- type: "attachment";
7376
- id: string;
7377
- name: string;
7378
- mimeType: string;
7379
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7380
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7381
- size?: number | undefined;
7382
- } | {
7383
- type: "streamText";
7384
- stream: () => AsyncIterable<string>;
7385
- format?: "markdown" | "plain" | undefined;
7386
- } | {
7387
- type: "custom";
7388
- raw: unknown;
7389
- } | {
7390
7302
  type: "contact";
7391
7303
  user?: {
7392
7304
  __platform: string;
@@ -7430,39 +7342,29 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7430
7342
  } | undefined;
7431
7343
  raw?: unknown;
7432
7344
  } | {
7433
- type: "voice";
7345
+ type: "attachment";
7346
+ id: string;
7347
+ name: string;
7434
7348
  mimeType: string;
7435
7349
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7436
7350
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7437
- name?: string | undefined;
7438
- duration?: number | undefined;
7439
7351
  size?: number | undefined;
7440
- } | {
7441
- type: "richlink";
7442
- url: string;
7443
- title: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
7444
- summary: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodString>>>;
7445
- cover: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodOptional<z.ZodObject<{
7446
- mimeType: z.ZodOptional<z.ZodString>;
7447
- read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7448
- stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7449
- }, z.core.$strip>>>>;
7450
- } | {
7451
- type: "app";
7452
- url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
7453
- layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
7454
- caption: z.ZodOptional<z.ZodString>;
7455
- subcaption: z.ZodOptional<z.ZodString>;
7456
- trailingCaption: z.ZodOptional<z.ZodString>;
7457
- trailingSubcaption: z.ZodOptional<z.ZodString>;
7458
- image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7459
- imageTitle: z.ZodOptional<z.ZodString>;
7460
- imageSubtitle: z.ZodOptional<z.ZodString>;
7461
- summary: z.ZodOptional<z.ZodString>;
7462
- }, z.core.$strip>>>;
7463
7352
  } | {
7464
7353
  type: "group";
7465
7354
  items: Message<string, User, Space<unknown>>[];
7355
+ } | {
7356
+ type: "custom";
7357
+ raw: unknown;
7358
+ } | {
7359
+ type: "text";
7360
+ text: string;
7361
+ } | {
7362
+ type: "markdown";
7363
+ markdown: string;
7364
+ } | {
7365
+ type: "reaction";
7366
+ emoji: string;
7367
+ target: Message<string, User, Space<unknown>>;
7466
7368
  } | {
7467
7369
  type: "poll";
7468
7370
  title: string;
@@ -7483,15 +7385,37 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7483
7385
  };
7484
7386
  selected: boolean;
7485
7387
  title: string;
7388
+ } | {
7389
+ type: "richlink";
7390
+ url: string;
7391
+ } | {
7392
+ type: "voice";
7393
+ mimeType: string;
7394
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7395
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7396
+ name?: string | undefined;
7397
+ duration?: number | undefined;
7398
+ size?: number | undefined;
7399
+ } | {
7400
+ type: "streamText";
7401
+ stream: () => AsyncIterable<string>;
7402
+ format?: "markdown" | "plain" | undefined;
7403
+ } | {
7404
+ type: "app";
7405
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
7406
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
7407
+ caption: z.ZodOptional<z.ZodString>;
7408
+ subcaption: z.ZodOptional<z.ZodString>;
7409
+ trailingCaption: z.ZodOptional<z.ZodString>;
7410
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
7411
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7412
+ imageTitle: z.ZodOptional<z.ZodString>;
7413
+ imageSubtitle: z.ZodOptional<z.ZodString>;
7414
+ summary: z.ZodOptional<z.ZodString>;
7415
+ }, z.core.$strip>>>;
7486
7416
  } | {
7487
7417
  type: "effect";
7488
7418
  content: {
7489
- type: "text";
7490
- text: string;
7491
- } | {
7492
- type: "markdown";
7493
- markdown: string;
7494
- } | {
7495
7419
  type: "attachment";
7496
7420
  id: string;
7497
7421
  name: string;
@@ -7499,6 +7423,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7499
7423
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7500
7424
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7501
7425
  size?: number | undefined;
7426
+ } | {
7427
+ type: "text";
7428
+ text: string;
7429
+ } | {
7430
+ type: "markdown";
7431
+ markdown: string;
7502
7432
  };
7503
7433
  effect: string;
7504
7434
  } | {