@spectrum-ts/core 8.1.0 → 8.2.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,6 +447,15 @@ 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: "group";
451
+ items: Message<string, User, Space<unknown>>[];
452
+ } | {
453
+ type: "text";
454
+ text: string;
455
+ } | {
456
+ type: "markdown";
457
+ markdown: string;
458
+ } | {
450
459
  type: "attachment";
451
460
  id: string;
452
461
  name: string;
@@ -454,6 +463,26 @@ declare const editSchema: z.ZodObject<{
454
463
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
455
464
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
456
465
  size?: number | undefined;
466
+ } | {
467
+ type: "poll";
468
+ title: string;
469
+ options: {
470
+ title: string;
471
+ }[];
472
+ } | {
473
+ type: "poll_option";
474
+ option: {
475
+ title: string;
476
+ };
477
+ poll: {
478
+ type: "poll";
479
+ title: string;
480
+ options: {
481
+ title: string;
482
+ }[];
483
+ };
484
+ selected: boolean;
485
+ title: string;
457
486
  } | {
458
487
  type: "contact";
459
488
  user?: {
@@ -497,45 +526,20 @@ declare const editSchema: z.ZodObject<{
497
526
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
498
527
  } | undefined;
499
528
  raw?: unknown;
500
- } | {
501
- type: "custom";
502
- raw: unknown;
503
- } | {
504
- type: "text";
505
- text: string;
506
- } | {
507
- type: "markdown";
508
- markdown: string;
509
- } | {
510
- type: "group";
511
- items: Message<string, User, Space<unknown>>[];
512
- } | {
513
- type: "poll";
514
- title: string;
515
- options: {
516
- title: string;
517
- }[];
518
- } | {
519
- type: "poll_option";
520
- option: {
521
- title: string;
522
- };
523
- poll: {
524
- type: "poll";
525
- title: string;
526
- options: {
527
- title: string;
528
- }[];
529
- };
530
- selected: boolean;
531
- title: string;
532
529
  } | {
533
530
  type: "reaction";
534
531
  emoji: string;
535
532
  target: Message<string, User, Space<unknown>>;
533
+ } | {
534
+ type: "custom";
535
+ raw: unknown;
536
536
  } | {
537
537
  type: "richlink";
538
538
  url: string;
539
+ } | {
540
+ type: "streamText";
541
+ stream: () => AsyncIterable<string>;
542
+ format?: "markdown" | "plain" | undefined;
539
543
  } | {
540
544
  type: "voice";
541
545
  mimeType: string;
@@ -544,10 +548,6 @@ declare const editSchema: z.ZodObject<{
544
548
  name?: string | undefined;
545
549
  duration?: number | undefined;
546
550
  size?: number | undefined;
547
- } | {
548
- type: "streamText";
549
- stream: () => AsyncIterable<string>;
550
- format?: "markdown" | "plain" | undefined;
551
551
  } | {
552
552
  type: "app";
553
553
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -564,6 +564,12 @@ declare const editSchema: z.ZodObject<{
564
564
  } | {
565
565
  type: "effect";
566
566
  content: {
567
+ type: "text";
568
+ text: string;
569
+ } | {
570
+ type: "markdown";
571
+ markdown: string;
572
+ } | {
567
573
  type: "attachment";
568
574
  id: string;
569
575
  name: string;
@@ -571,12 +577,6 @@ declare const editSchema: z.ZodObject<{
571
577
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
572
578
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
573
579
  size?: number | undefined;
574
- } | {
575
- type: "text";
576
- text: string;
577
- } | {
578
- type: "markdown";
579
- markdown: string;
580
580
  };
581
581
  effect: string;
582
582
  } | {
@@ -595,6 +595,15 @@ declare const editSchema: z.ZodObject<{
595
595
  kind: "clear";
596
596
  };
597
597
  }, {
598
+ type: "group";
599
+ items: Message<string, User, Space<unknown>>[];
600
+ } | {
601
+ type: "text";
602
+ text: string;
603
+ } | {
604
+ type: "markdown";
605
+ markdown: string;
606
+ } | {
598
607
  type: "attachment";
599
608
  id: string;
600
609
  name: string;
@@ -602,6 +611,26 @@ declare const editSchema: z.ZodObject<{
602
611
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
603
612
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
604
613
  size?: number | undefined;
614
+ } | {
615
+ type: "poll";
616
+ title: string;
617
+ options: {
618
+ title: string;
619
+ }[];
620
+ } | {
621
+ type: "poll_option";
622
+ option: {
623
+ title: string;
624
+ };
625
+ poll: {
626
+ type: "poll";
627
+ title: string;
628
+ options: {
629
+ title: string;
630
+ }[];
631
+ };
632
+ selected: boolean;
633
+ title: string;
605
634
  } | {
606
635
  type: "contact";
607
636
  user?: {
@@ -645,45 +674,20 @@ declare const editSchema: z.ZodObject<{
645
674
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
646
675
  } | undefined;
647
676
  raw?: unknown;
648
- } | {
649
- type: "custom";
650
- raw: unknown;
651
- } | {
652
- type: "text";
653
- text: string;
654
- } | {
655
- type: "markdown";
656
- markdown: string;
657
- } | {
658
- type: "group";
659
- items: Message<string, User, Space<unknown>>[];
660
- } | {
661
- type: "poll";
662
- title: string;
663
- options: {
664
- title: string;
665
- }[];
666
- } | {
667
- type: "poll_option";
668
- option: {
669
- title: string;
670
- };
671
- poll: {
672
- type: "poll";
673
- title: string;
674
- options: {
675
- title: string;
676
- }[];
677
- };
678
- selected: boolean;
679
- title: string;
680
677
  } | {
681
678
  type: "reaction";
682
679
  emoji: string;
683
680
  target: Message<string, User, Space<unknown>>;
681
+ } | {
682
+ type: "custom";
683
+ raw: unknown;
684
684
  } | {
685
685
  type: "richlink";
686
686
  url: string;
687
+ } | {
688
+ type: "streamText";
689
+ stream: () => AsyncIterable<string>;
690
+ format?: "markdown" | "plain" | undefined;
687
691
  } | {
688
692
  type: "voice";
689
693
  mimeType: string;
@@ -692,10 +696,6 @@ declare const editSchema: z.ZodObject<{
692
696
  name?: string | undefined;
693
697
  duration?: number | undefined;
694
698
  size?: number | undefined;
695
- } | {
696
- type: "streamText";
697
- stream: () => AsyncIterable<string>;
698
- format?: "markdown" | "plain" | undefined;
699
699
  } | {
700
700
  type: "app";
701
701
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -712,6 +712,12 @@ declare const editSchema: z.ZodObject<{
712
712
  } | {
713
713
  type: "effect";
714
714
  content: {
715
+ type: "text";
716
+ text: string;
717
+ } | {
718
+ type: "markdown";
719
+ markdown: string;
720
+ } | {
715
721
  type: "attachment";
716
722
  id: string;
717
723
  name: string;
@@ -719,12 +725,6 @@ declare const editSchema: z.ZodObject<{
719
725
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
720
726
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
721
727
  size?: number | undefined;
722
- } | {
723
- type: "text";
724
- text: string;
725
- } | {
726
- type: "markdown";
727
- markdown: string;
728
728
  };
729
729
  effect: string;
730
730
  } | {
@@ -968,6 +968,15 @@ declare function rename(displayName: string): ContentBuilder;
968
968
  declare const replySchema: z.ZodObject<{
969
969
  type: z.ZodLiteral<"reply">;
970
970
  content: z.ZodCustom<{
971
+ type: "group";
972
+ items: Message<string, User, Space<unknown>>[];
973
+ } | {
974
+ type: "text";
975
+ text: string;
976
+ } | {
977
+ type: "markdown";
978
+ markdown: string;
979
+ } | {
971
980
  type: "attachment";
972
981
  id: string;
973
982
  name: string;
@@ -975,6 +984,26 @@ declare const replySchema: z.ZodObject<{
975
984
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
976
985
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
977
986
  size?: number | undefined;
987
+ } | {
988
+ type: "poll";
989
+ title: string;
990
+ options: {
991
+ title: string;
992
+ }[];
993
+ } | {
994
+ type: "poll_option";
995
+ option: {
996
+ title: string;
997
+ };
998
+ poll: {
999
+ type: "poll";
1000
+ title: string;
1001
+ options: {
1002
+ title: string;
1003
+ }[];
1004
+ };
1005
+ selected: boolean;
1006
+ title: string;
978
1007
  } | {
979
1008
  type: "contact";
980
1009
  user?: {
@@ -1018,45 +1047,20 @@ declare const replySchema: z.ZodObject<{
1018
1047
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1019
1048
  } | undefined;
1020
1049
  raw?: unknown;
1021
- } | {
1022
- type: "custom";
1023
- raw: unknown;
1024
- } | {
1025
- type: "text";
1026
- text: string;
1027
- } | {
1028
- type: "markdown";
1029
- markdown: string;
1030
- } | {
1031
- type: "group";
1032
- items: Message<string, User, Space<unknown>>[];
1033
- } | {
1034
- type: "poll";
1035
- title: string;
1036
- options: {
1037
- title: string;
1038
- }[];
1039
- } | {
1040
- type: "poll_option";
1041
- option: {
1042
- title: string;
1043
- };
1044
- poll: {
1045
- type: "poll";
1046
- title: string;
1047
- options: {
1048
- title: string;
1049
- }[];
1050
- };
1051
- selected: boolean;
1052
- title: string;
1053
1050
  } | {
1054
1051
  type: "reaction";
1055
1052
  emoji: string;
1056
1053
  target: Message<string, User, Space<unknown>>;
1054
+ } | {
1055
+ type: "custom";
1056
+ raw: unknown;
1057
1057
  } | {
1058
1058
  type: "richlink";
1059
1059
  url: string;
1060
+ } | {
1061
+ type: "streamText";
1062
+ stream: () => AsyncIterable<string>;
1063
+ format?: "markdown" | "plain" | undefined;
1060
1064
  } | {
1061
1065
  type: "voice";
1062
1066
  mimeType: string;
@@ -1065,10 +1069,6 @@ declare const replySchema: z.ZodObject<{
1065
1069
  name?: string | undefined;
1066
1070
  duration?: number | undefined;
1067
1071
  size?: number | undefined;
1068
- } | {
1069
- type: "streamText";
1070
- stream: () => AsyncIterable<string>;
1071
- format?: "markdown" | "plain" | undefined;
1072
1072
  } | {
1073
1073
  type: "app";
1074
1074
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -1085,6 +1085,12 @@ declare const replySchema: z.ZodObject<{
1085
1085
  } | {
1086
1086
  type: "effect";
1087
1087
  content: {
1088
+ type: "text";
1089
+ text: string;
1090
+ } | {
1091
+ type: "markdown";
1092
+ markdown: string;
1093
+ } | {
1088
1094
  type: "attachment";
1089
1095
  id: string;
1090
1096
  name: string;
@@ -1092,12 +1098,6 @@ declare const replySchema: z.ZodObject<{
1092
1098
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1093
1099
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1094
1100
  size?: number | undefined;
1095
- } | {
1096
- type: "text";
1097
- text: string;
1098
- } | {
1099
- type: "markdown";
1100
- markdown: string;
1101
1101
  };
1102
1102
  effect: string;
1103
1103
  } | {
@@ -1116,13 +1116,42 @@ declare const replySchema: z.ZodObject<{
1116
1116
  kind: "clear";
1117
1117
  };
1118
1118
  }, {
1119
- type: "attachment";
1120
- id: string;
1121
- name: string;
1122
- mimeType: string;
1119
+ type: "group";
1120
+ items: Message<string, User, Space<unknown>>[];
1121
+ } | {
1122
+ type: "text";
1123
+ text: string;
1124
+ } | {
1125
+ type: "markdown";
1126
+ markdown: string;
1127
+ } | {
1128
+ type: "attachment";
1129
+ id: string;
1130
+ name: string;
1131
+ mimeType: string;
1123
1132
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1124
1133
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1125
1134
  size?: number | undefined;
1135
+ } | {
1136
+ type: "poll";
1137
+ title: string;
1138
+ options: {
1139
+ title: string;
1140
+ }[];
1141
+ } | {
1142
+ type: "poll_option";
1143
+ option: {
1144
+ title: string;
1145
+ };
1146
+ poll: {
1147
+ type: "poll";
1148
+ title: string;
1149
+ options: {
1150
+ title: string;
1151
+ }[];
1152
+ };
1153
+ selected: boolean;
1154
+ title: string;
1126
1155
  } | {
1127
1156
  type: "contact";
1128
1157
  user?: {
@@ -1166,45 +1195,20 @@ declare const replySchema: z.ZodObject<{
1166
1195
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1167
1196
  } | undefined;
1168
1197
  raw?: unknown;
1169
- } | {
1170
- type: "custom";
1171
- raw: unknown;
1172
- } | {
1173
- type: "text";
1174
- text: string;
1175
- } | {
1176
- type: "markdown";
1177
- markdown: string;
1178
- } | {
1179
- type: "group";
1180
- items: Message<string, User, Space<unknown>>[];
1181
- } | {
1182
- type: "poll";
1183
- title: string;
1184
- options: {
1185
- title: string;
1186
- }[];
1187
- } | {
1188
- type: "poll_option";
1189
- option: {
1190
- title: string;
1191
- };
1192
- poll: {
1193
- type: "poll";
1194
- title: string;
1195
- options: {
1196
- title: string;
1197
- }[];
1198
- };
1199
- selected: boolean;
1200
- title: string;
1201
1198
  } | {
1202
1199
  type: "reaction";
1203
1200
  emoji: string;
1204
1201
  target: Message<string, User, Space<unknown>>;
1202
+ } | {
1203
+ type: "custom";
1204
+ raw: unknown;
1205
1205
  } | {
1206
1206
  type: "richlink";
1207
1207
  url: string;
1208
+ } | {
1209
+ type: "streamText";
1210
+ stream: () => AsyncIterable<string>;
1211
+ format?: "markdown" | "plain" | undefined;
1208
1212
  } | {
1209
1213
  type: "voice";
1210
1214
  mimeType: string;
@@ -1213,10 +1217,6 @@ declare const replySchema: z.ZodObject<{
1213
1217
  name?: string | undefined;
1214
1218
  duration?: number | undefined;
1215
1219
  size?: number | undefined;
1216
- } | {
1217
- type: "streamText";
1218
- stream: () => AsyncIterable<string>;
1219
- format?: "markdown" | "plain" | undefined;
1220
1220
  } | {
1221
1221
  type: "app";
1222
1222
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -1233,6 +1233,12 @@ declare const replySchema: z.ZodObject<{
1233
1233
  } | {
1234
1234
  type: "effect";
1235
1235
  content: {
1236
+ type: "text";
1237
+ text: string;
1238
+ } | {
1239
+ type: "markdown";
1240
+ markdown: string;
1241
+ } | {
1236
1242
  type: "attachment";
1237
1243
  id: string;
1238
1244
  name: string;
@@ -1240,12 +1246,6 @@ declare const replySchema: z.ZodObject<{
1240
1246
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1241
1247
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1242
1248
  size?: number | undefined;
1243
- } | {
1244
- type: "text";
1245
- text: string;
1246
- } | {
1247
- type: "markdown";
1248
- markdown: string;
1249
1249
  };
1250
1250
  effect: string;
1251
1251
  } | {
@@ -1267,6 +1267,10 @@ declare const replySchema: z.ZodObject<{
1267
1267
  target: z.ZodCustom<Message<string, User, Space<unknown>>, Message<string, User, Space<unknown>>>;
1268
1268
  }, z.core.$strip>;
1269
1269
  type Reply = z.infer<typeof replySchema>;
1270
+ declare const asReply: (input: {
1271
+ content: BaseContent;
1272
+ target: Message;
1273
+ }) => Reply;
1270
1274
  declare function reply(content: ContentInput, target: Message | undefined): ContentBuilder;
1271
1275
  //#endregion
1272
1276
  //#region src/content/resolve.d.ts
@@ -6681,6 +6685,175 @@ declare const fromVCard: (vcf: string) => ContactInput;
6681
6685
  declare const toVCard: (contact: Contact) => Promise<string>;
6682
6686
  //#endregion
6683
6687
  //#region src/content/types.d.ts
6688
+ declare const baseContentSchema: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
6689
+ type: z.ZodLiteral<"text">;
6690
+ text: z.ZodString;
6691
+ }, z.core.$strip>, z.ZodObject<{
6692
+ type: z.ZodLiteral<"markdown">;
6693
+ markdown: z.ZodString;
6694
+ }, z.core.$strip>, z.ZodObject<{
6695
+ type: z.ZodLiteral<"streamText">;
6696
+ stream: z.ZodCustom<() => AsyncIterable<string>, () => AsyncIterable<string>>;
6697
+ format: z.ZodOptional<z.ZodEnum<{
6698
+ markdown: "markdown";
6699
+ plain: "plain";
6700
+ }>>;
6701
+ }, z.core.$strip>, z.ZodObject<{
6702
+ type: z.ZodLiteral<"custom">;
6703
+ raw: z.ZodUnknown;
6704
+ }, z.core.$strip>, z.ZodObject<{
6705
+ type: z.ZodLiteral<"attachment">;
6706
+ id: z.ZodString;
6707
+ name: z.ZodString;
6708
+ mimeType: z.ZodString;
6709
+ size: z.ZodOptional<z.ZodNumber>;
6710
+ read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6711
+ stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6712
+ }, z.core.$strip>, z.ZodObject<{
6713
+ type: z.ZodLiteral<"contact">;
6714
+ user: z.ZodOptional<z.ZodObject<{
6715
+ __platform: z.ZodString;
6716
+ id: z.ZodString;
6717
+ }, z.core.$strip>>;
6718
+ name: z.ZodOptional<z.ZodObject<{
6719
+ formatted: z.ZodOptional<z.ZodString>;
6720
+ first: z.ZodOptional<z.ZodString>;
6721
+ last: z.ZodOptional<z.ZodString>;
6722
+ middle: z.ZodOptional<z.ZodString>;
6723
+ prefix: z.ZodOptional<z.ZodString>;
6724
+ suffix: z.ZodOptional<z.ZodString>;
6725
+ }, z.core.$strip>>;
6726
+ phones: z.ZodOptional<z.ZodArray<z.ZodObject<{
6727
+ value: z.ZodString;
6728
+ type: z.ZodOptional<z.ZodEnum<{
6729
+ mobile: "mobile";
6730
+ home: "home";
6731
+ work: "work";
6732
+ other: "other";
6733
+ }>>;
6734
+ }, z.core.$strip>>>;
6735
+ emails: z.ZodOptional<z.ZodArray<z.ZodObject<{
6736
+ value: z.ZodString;
6737
+ type: z.ZodOptional<z.ZodEnum<{
6738
+ home: "home";
6739
+ work: "work";
6740
+ other: "other";
6741
+ }>>;
6742
+ }, z.core.$strip>>>;
6743
+ addresses: z.ZodOptional<z.ZodArray<z.ZodObject<{
6744
+ street: z.ZodOptional<z.ZodString>;
6745
+ city: z.ZodOptional<z.ZodString>;
6746
+ region: z.ZodOptional<z.ZodString>;
6747
+ postalCode: z.ZodOptional<z.ZodString>;
6748
+ country: z.ZodOptional<z.ZodString>;
6749
+ type: z.ZodOptional<z.ZodEnum<{
6750
+ home: "home";
6751
+ work: "work";
6752
+ other: "other";
6753
+ }>>;
6754
+ }, z.core.$strip>>>;
6755
+ org: z.ZodOptional<z.ZodObject<{
6756
+ name: z.ZodOptional<z.ZodString>;
6757
+ title: z.ZodOptional<z.ZodString>;
6758
+ department: z.ZodOptional<z.ZodString>;
6759
+ }, z.core.$strip>>;
6760
+ urls: z.ZodOptional<z.ZodArray<z.ZodString>>;
6761
+ birthday: z.ZodOptional<z.ZodString>;
6762
+ note: z.ZodOptional<z.ZodString>;
6763
+ photo: z.ZodOptional<z.ZodObject<{
6764
+ mimeType: z.ZodString;
6765
+ read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6766
+ }, z.core.$strip>>;
6767
+ raw: z.ZodOptional<z.ZodUnknown>;
6768
+ }, z.core.$strip>, z.ZodObject<{
6769
+ type: z.ZodLiteral<"voice">;
6770
+ name: z.ZodOptional<z.ZodString>;
6771
+ mimeType: z.ZodString;
6772
+ duration: z.ZodOptional<z.ZodNumber>;
6773
+ size: z.ZodOptional<z.ZodNumber>;
6774
+ read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6775
+ stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6776
+ }, z.core.$strip>, z.ZodObject<{
6777
+ type: z.ZodLiteral<"richlink">;
6778
+ url: z.ZodURL;
6779
+ }, z.core.$strip>, z.ZodObject<{
6780
+ type: z.ZodLiteral<"app">;
6781
+ url: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
6782
+ layout: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
6783
+ caption: z.ZodOptional<z.ZodString>;
6784
+ subcaption: z.ZodOptional<z.ZodString>;
6785
+ trailingCaption: z.ZodOptional<z.ZodString>;
6786
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
6787
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
6788
+ imageTitle: z.ZodOptional<z.ZodString>;
6789
+ imageSubtitle: z.ZodOptional<z.ZodString>;
6790
+ summary: z.ZodOptional<z.ZodString>;
6791
+ }, z.core.$strip>>>;
6792
+ }, z.core.$strip>, z.ZodObject<{
6793
+ type: z.ZodLiteral<"reaction">;
6794
+ emoji: z.ZodString;
6795
+ target: z.ZodCustom<Message<string, User, Space<unknown>>, Message<string, User, Space<unknown>>>;
6796
+ }, z.core.$strip>, z.ZodObject<{
6797
+ type: z.ZodLiteral<"group">;
6798
+ items: z.ZodArray<z.ZodCustom<Message<string, User, Space<unknown>>, Message<string, User, Space<unknown>>>>;
6799
+ }, z.core.$strip>, z.ZodObject<{
6800
+ type: z.ZodLiteral<"poll">;
6801
+ title: z.ZodString;
6802
+ options: z.ZodArray<z.ZodObject<{
6803
+ title: z.ZodString;
6804
+ }, z.core.$strip>>;
6805
+ }, z.core.$strip>, z.ZodObject<{
6806
+ type: z.ZodLiteral<"poll_option">;
6807
+ option: z.ZodObject<{
6808
+ title: z.ZodString;
6809
+ }, z.core.$strip>;
6810
+ poll: z.ZodObject<{
6811
+ type: z.ZodLiteral<"poll">;
6812
+ title: z.ZodString;
6813
+ options: z.ZodArray<z.ZodObject<{
6814
+ title: z.ZodString;
6815
+ }, z.core.$strip>>;
6816
+ }, z.core.$strip>;
6817
+ selected: z.ZodBoolean;
6818
+ title: z.ZodString;
6819
+ }, z.core.$strip>, z.ZodObject<{
6820
+ type: z.ZodLiteral<"effect">;
6821
+ content: z.ZodDiscriminatedUnion<[z.ZodObject<{
6822
+ type: z.ZodLiteral<"text">;
6823
+ text: z.ZodString;
6824
+ }, z.core.$strip>, z.ZodObject<{
6825
+ type: z.ZodLiteral<"markdown">;
6826
+ markdown: z.ZodString;
6827
+ }, z.core.$strip>, z.ZodObject<{
6828
+ type: z.ZodLiteral<"attachment">;
6829
+ id: z.ZodString;
6830
+ name: z.ZodString;
6831
+ mimeType: z.ZodString;
6832
+ size: z.ZodOptional<z.ZodNumber>;
6833
+ read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6834
+ stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6835
+ }, z.core.$strip>], "type">;
6836
+ effect: z.ZodString;
6837
+ }, z.core.$strip>, z.ZodObject<{
6838
+ type: z.ZodLiteral<"typing">;
6839
+ state: z.ZodEnum<{
6840
+ start: "start";
6841
+ stop: "stop";
6842
+ }>;
6843
+ }, z.core.$strip>, z.ZodObject<{
6844
+ type: z.ZodLiteral<"rename">;
6845
+ displayName: z.ZodString;
6846
+ }, z.core.$strip>, z.ZodObject<{
6847
+ type: z.ZodLiteral<"avatar">;
6848
+ action: z.ZodDiscriminatedUnion<[z.ZodObject<{
6849
+ kind: z.ZodLiteral<"set">;
6850
+ read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6851
+ mimeType: z.ZodString;
6852
+ }, z.core.$strip>, z.ZodObject<{
6853
+ kind: z.ZodLiteral<"clear">;
6854
+ }, z.core.$strip>], "kind">;
6855
+ }, z.core.$strip>], "type">;
6856
+ type BaseContent = z.infer<typeof baseContentSchema>;
6684
6857
  declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6685
6858
  type: z.ZodLiteral<"text">;
6686
6859
  text: z.ZodString;
@@ -6851,6 +7024,15 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6851
7024
  }, z.core.$strip>, z.ZodObject<{
6852
7025
  type: z.ZodLiteral<"reply">;
6853
7026
  content: z.ZodCustom<{
7027
+ type: "group";
7028
+ items: Message<string, User, Space<unknown>>[];
7029
+ } | {
7030
+ type: "text";
7031
+ text: string;
7032
+ } | {
7033
+ type: "markdown";
7034
+ markdown: string;
7035
+ } | {
6854
7036
  type: "attachment";
6855
7037
  id: string;
6856
7038
  name: string;
@@ -6858,6 +7040,26 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6858
7040
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6859
7041
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6860
7042
  size?: number | undefined;
7043
+ } | {
7044
+ type: "poll";
7045
+ title: string;
7046
+ options: {
7047
+ title: string;
7048
+ }[];
7049
+ } | {
7050
+ type: "poll_option";
7051
+ option: {
7052
+ title: string;
7053
+ };
7054
+ poll: {
7055
+ type: "poll";
7056
+ title: string;
7057
+ options: {
7058
+ title: string;
7059
+ }[];
7060
+ };
7061
+ selected: boolean;
7062
+ title: string;
6861
7063
  } | {
6862
7064
  type: "contact";
6863
7065
  user?: {
@@ -6901,45 +7103,20 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6901
7103
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6902
7104
  } | undefined;
6903
7105
  raw?: unknown;
6904
- } | {
6905
- type: "custom";
6906
- raw: unknown;
6907
- } | {
6908
- type: "text";
6909
- text: string;
6910
- } | {
6911
- type: "markdown";
6912
- markdown: string;
6913
- } | {
6914
- type: "group";
6915
- items: Message<string, User, Space<unknown>>[];
6916
- } | {
6917
- type: "poll";
6918
- title: string;
6919
- options: {
6920
- title: string;
6921
- }[];
6922
- } | {
6923
- type: "poll_option";
6924
- option: {
6925
- title: string;
6926
- };
6927
- poll: {
6928
- type: "poll";
6929
- title: string;
6930
- options: {
6931
- title: string;
6932
- }[];
6933
- };
6934
- selected: boolean;
6935
- title: string;
6936
7106
  } | {
6937
7107
  type: "reaction";
6938
7108
  emoji: string;
6939
7109
  target: Message<string, User, Space<unknown>>;
7110
+ } | {
7111
+ type: "custom";
7112
+ raw: unknown;
6940
7113
  } | {
6941
7114
  type: "richlink";
6942
7115
  url: string;
7116
+ } | {
7117
+ type: "streamText";
7118
+ stream: () => AsyncIterable<string>;
7119
+ format?: "markdown" | "plain" | undefined;
6943
7120
  } | {
6944
7121
  type: "voice";
6945
7122
  mimeType: string;
@@ -6948,10 +7125,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6948
7125
  name?: string | undefined;
6949
7126
  duration?: number | undefined;
6950
7127
  size?: number | undefined;
6951
- } | {
6952
- type: "streamText";
6953
- stream: () => AsyncIterable<string>;
6954
- format?: "markdown" | "plain" | undefined;
6955
7128
  } | {
6956
7129
  type: "app";
6957
7130
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -6968,6 +7141,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6968
7141
  } | {
6969
7142
  type: "effect";
6970
7143
  content: {
7144
+ type: "text";
7145
+ text: string;
7146
+ } | {
7147
+ type: "markdown";
7148
+ markdown: string;
7149
+ } | {
6971
7150
  type: "attachment";
6972
7151
  id: string;
6973
7152
  name: string;
@@ -6975,12 +7154,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6975
7154
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6976
7155
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6977
7156
  size?: number | undefined;
6978
- } | {
6979
- type: "text";
6980
- text: string;
6981
- } | {
6982
- type: "markdown";
6983
- markdown: string;
6984
7157
  };
6985
7158
  effect: string;
6986
7159
  } | {
@@ -6999,6 +7172,15 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6999
7172
  kind: "clear";
7000
7173
  };
7001
7174
  }, {
7175
+ type: "group";
7176
+ items: Message<string, User, Space<unknown>>[];
7177
+ } | {
7178
+ type: "text";
7179
+ text: string;
7180
+ } | {
7181
+ type: "markdown";
7182
+ markdown: string;
7183
+ } | {
7002
7184
  type: "attachment";
7003
7185
  id: string;
7004
7186
  name: string;
@@ -7006,6 +7188,26 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7006
7188
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7007
7189
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7008
7190
  size?: number | undefined;
7191
+ } | {
7192
+ type: "poll";
7193
+ title: string;
7194
+ options: {
7195
+ title: string;
7196
+ }[];
7197
+ } | {
7198
+ type: "poll_option";
7199
+ option: {
7200
+ title: string;
7201
+ };
7202
+ poll: {
7203
+ type: "poll";
7204
+ title: string;
7205
+ options: {
7206
+ title: string;
7207
+ }[];
7208
+ };
7209
+ selected: boolean;
7210
+ title: string;
7009
7211
  } | {
7010
7212
  type: "contact";
7011
7213
  user?: {
@@ -7049,45 +7251,20 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7049
7251
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7050
7252
  } | undefined;
7051
7253
  raw?: unknown;
7052
- } | {
7053
- type: "custom";
7054
- raw: unknown;
7055
- } | {
7056
- type: "text";
7057
- text: string;
7058
- } | {
7059
- type: "markdown";
7060
- markdown: string;
7061
- } | {
7062
- type: "group";
7063
- items: Message<string, User, Space<unknown>>[];
7064
- } | {
7065
- type: "poll";
7066
- title: string;
7067
- options: {
7068
- title: string;
7069
- }[];
7070
- } | {
7071
- type: "poll_option";
7072
- option: {
7073
- title: string;
7074
- };
7075
- poll: {
7076
- type: "poll";
7077
- title: string;
7078
- options: {
7079
- title: string;
7080
- }[];
7081
- };
7082
- selected: boolean;
7083
- title: string;
7084
7254
  } | {
7085
7255
  type: "reaction";
7086
7256
  emoji: string;
7087
7257
  target: Message<string, User, Space<unknown>>;
7258
+ } | {
7259
+ type: "custom";
7260
+ raw: unknown;
7088
7261
  } | {
7089
7262
  type: "richlink";
7090
7263
  url: string;
7264
+ } | {
7265
+ type: "streamText";
7266
+ stream: () => AsyncIterable<string>;
7267
+ format?: "markdown" | "plain" | undefined;
7091
7268
  } | {
7092
7269
  type: "voice";
7093
7270
  mimeType: string;
@@ -7096,10 +7273,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7096
7273
  name?: string | undefined;
7097
7274
  duration?: number | undefined;
7098
7275
  size?: number | undefined;
7099
- } | {
7100
- type: "streamText";
7101
- stream: () => AsyncIterable<string>;
7102
- format?: "markdown" | "plain" | undefined;
7103
7276
  } | {
7104
7277
  type: "app";
7105
7278
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -7116,6 +7289,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7116
7289
  } | {
7117
7290
  type: "effect";
7118
7291
  content: {
7292
+ type: "text";
7293
+ text: string;
7294
+ } | {
7295
+ type: "markdown";
7296
+ markdown: string;
7297
+ } | {
7119
7298
  type: "attachment";
7120
7299
  id: string;
7121
7300
  name: string;
@@ -7123,12 +7302,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7123
7302
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7124
7303
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7125
7304
  size?: number | undefined;
7126
- } | {
7127
- type: "text";
7128
- text: string;
7129
- } | {
7130
- type: "markdown";
7131
- markdown: string;
7132
7305
  };
7133
7306
  effect: string;
7134
7307
  } | {
@@ -7151,6 +7324,15 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7151
7324
  }, z.core.$strip>, z.ZodObject<{
7152
7325
  type: z.ZodLiteral<"edit">;
7153
7326
  content: z.ZodCustom<{
7327
+ type: "group";
7328
+ items: Message<string, User, Space<unknown>>[];
7329
+ } | {
7330
+ type: "text";
7331
+ text: string;
7332
+ } | {
7333
+ type: "markdown";
7334
+ markdown: string;
7335
+ } | {
7154
7336
  type: "attachment";
7155
7337
  id: string;
7156
7338
  name: string;
@@ -7158,6 +7340,26 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7158
7340
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7159
7341
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7160
7342
  size?: number | undefined;
7343
+ } | {
7344
+ type: "poll";
7345
+ title: string;
7346
+ options: {
7347
+ title: string;
7348
+ }[];
7349
+ } | {
7350
+ type: "poll_option";
7351
+ option: {
7352
+ title: string;
7353
+ };
7354
+ poll: {
7355
+ type: "poll";
7356
+ title: string;
7357
+ options: {
7358
+ title: string;
7359
+ }[];
7360
+ };
7361
+ selected: boolean;
7362
+ title: string;
7161
7363
  } | {
7162
7364
  type: "contact";
7163
7365
  user?: {
@@ -7201,45 +7403,20 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7201
7403
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7202
7404
  } | undefined;
7203
7405
  raw?: unknown;
7204
- } | {
7205
- type: "custom";
7206
- raw: unknown;
7207
- } | {
7208
- type: "text";
7209
- text: string;
7210
- } | {
7211
- type: "markdown";
7212
- markdown: string;
7213
- } | {
7214
- type: "group";
7215
- items: Message<string, User, Space<unknown>>[];
7216
- } | {
7217
- type: "poll";
7218
- title: string;
7219
- options: {
7220
- title: string;
7221
- }[];
7222
- } | {
7223
- type: "poll_option";
7224
- option: {
7225
- title: string;
7226
- };
7227
- poll: {
7228
- type: "poll";
7229
- title: string;
7230
- options: {
7231
- title: string;
7232
- }[];
7233
- };
7234
- selected: boolean;
7235
- title: string;
7236
7406
  } | {
7237
7407
  type: "reaction";
7238
7408
  emoji: string;
7239
7409
  target: Message<string, User, Space<unknown>>;
7410
+ } | {
7411
+ type: "custom";
7412
+ raw: unknown;
7240
7413
  } | {
7241
7414
  type: "richlink";
7242
7415
  url: string;
7416
+ } | {
7417
+ type: "streamText";
7418
+ stream: () => AsyncIterable<string>;
7419
+ format?: "markdown" | "plain" | undefined;
7243
7420
  } | {
7244
7421
  type: "voice";
7245
7422
  mimeType: string;
@@ -7248,10 +7425,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7248
7425
  name?: string | undefined;
7249
7426
  duration?: number | undefined;
7250
7427
  size?: number | undefined;
7251
- } | {
7252
- type: "streamText";
7253
- stream: () => AsyncIterable<string>;
7254
- format?: "markdown" | "plain" | undefined;
7255
7428
  } | {
7256
7429
  type: "app";
7257
7430
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -7268,6 +7441,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7268
7441
  } | {
7269
7442
  type: "effect";
7270
7443
  content: {
7444
+ type: "text";
7445
+ text: string;
7446
+ } | {
7447
+ type: "markdown";
7448
+ markdown: string;
7449
+ } | {
7271
7450
  type: "attachment";
7272
7451
  id: string;
7273
7452
  name: string;
@@ -7275,12 +7454,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7275
7454
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7276
7455
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7277
7456
  size?: number | undefined;
7278
- } | {
7279
- type: "text";
7280
- text: string;
7281
- } | {
7282
- type: "markdown";
7283
- markdown: string;
7284
7457
  };
7285
7458
  effect: string;
7286
7459
  } | {
@@ -7299,6 +7472,15 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7299
7472
  kind: "clear";
7300
7473
  };
7301
7474
  }, {
7475
+ type: "group";
7476
+ items: Message<string, User, Space<unknown>>[];
7477
+ } | {
7478
+ type: "text";
7479
+ text: string;
7480
+ } | {
7481
+ type: "markdown";
7482
+ markdown: string;
7483
+ } | {
7302
7484
  type: "attachment";
7303
7485
  id: string;
7304
7486
  name: string;
@@ -7306,6 +7488,26 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7306
7488
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7307
7489
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7308
7490
  size?: number | undefined;
7491
+ } | {
7492
+ type: "poll";
7493
+ title: string;
7494
+ options: {
7495
+ title: string;
7496
+ }[];
7497
+ } | {
7498
+ type: "poll_option";
7499
+ option: {
7500
+ title: string;
7501
+ };
7502
+ poll: {
7503
+ type: "poll";
7504
+ title: string;
7505
+ options: {
7506
+ title: string;
7507
+ }[];
7508
+ };
7509
+ selected: boolean;
7510
+ title: string;
7309
7511
  } | {
7310
7512
  type: "contact";
7311
7513
  user?: {
@@ -7349,45 +7551,20 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7349
7551
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7350
7552
  } | undefined;
7351
7553
  raw?: unknown;
7352
- } | {
7353
- type: "custom";
7354
- raw: unknown;
7355
- } | {
7356
- type: "text";
7357
- text: string;
7358
- } | {
7359
- type: "markdown";
7360
- markdown: string;
7361
- } | {
7362
- type: "group";
7363
- items: Message<string, User, Space<unknown>>[];
7364
- } | {
7365
- type: "poll";
7366
- title: string;
7367
- options: {
7368
- title: string;
7369
- }[];
7370
- } | {
7371
- type: "poll_option";
7372
- option: {
7373
- title: string;
7374
- };
7375
- poll: {
7376
- type: "poll";
7377
- title: string;
7378
- options: {
7379
- title: string;
7380
- }[];
7381
- };
7382
- selected: boolean;
7383
- title: string;
7384
7554
  } | {
7385
7555
  type: "reaction";
7386
7556
  emoji: string;
7387
7557
  target: Message<string, User, Space<unknown>>;
7558
+ } | {
7559
+ type: "custom";
7560
+ raw: unknown;
7388
7561
  } | {
7389
7562
  type: "richlink";
7390
7563
  url: string;
7564
+ } | {
7565
+ type: "streamText";
7566
+ stream: () => AsyncIterable<string>;
7567
+ format?: "markdown" | "plain" | undefined;
7391
7568
  } | {
7392
7569
  type: "voice";
7393
7570
  mimeType: string;
@@ -7396,10 +7573,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7396
7573
  name?: string | undefined;
7397
7574
  duration?: number | undefined;
7398
7575
  size?: number | undefined;
7399
- } | {
7400
- type: "streamText";
7401
- stream: () => AsyncIterable<string>;
7402
- format?: "markdown" | "plain" | undefined;
7403
7576
  } | {
7404
7577
  type: "app";
7405
7578
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -7416,6 +7589,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7416
7589
  } | {
7417
7590
  type: "effect";
7418
7591
  content: {
7592
+ type: "text";
7593
+ text: string;
7594
+ } | {
7595
+ type: "markdown";
7596
+ markdown: string;
7597
+ } | {
7419
7598
  type: "attachment";
7420
7599
  id: string;
7421
7600
  name: string;
@@ -7423,12 +7602,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7423
7602
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7424
7603
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7425
7604
  size?: number | undefined;
7426
- } | {
7427
- type: "text";
7428
- text: string;
7429
- } | {
7430
- type: "markdown";
7431
- markdown: string;
7432
7605
  };
7433
7606
  effect: string;
7434
7607
  } | {
@@ -7487,4 +7660,4 @@ declare function attachment(input: AttachmentInput, options?: {
7487
7660
  name?: string;
7488
7661
  }): ContentBuilder;
7489
7662
  //#endregion
7490
- export { FusorTokenData as $, groupSchema as $t, isFusorEvent as A, AppLayout as An, Rename as At, PlatformUser as B, asPollOption as Bt, FusorVerify as C, Avatar as Cn, text as Ct, WebhookRawResult as D, buildPhotoAction as Dn, resolveContents as Dt, WebhookRawRequest as E, PhotoInput as En, richlink as Et, PlatformInstance as F, Poll as Ft, Broadcaster as G, markdown as Gt, ProviderMessageRecord as H, poll as Ht, PlatformMessage as I, PollChoice as It, mergeStreams as J, StreamTextSource as Jt, ManagedStream as K, DeltaExtractor as Kt, PlatformProviderConfig as L, PollChoiceInput as Lt, EventProducer as M, app as Mn, Read as Mt, Platform as N, appLayoutSchema as Nn, asRead as Nt, FusorEvent as O, photoActionSchema as On, Reply as Ot, PlatformDef as P, read as Pt, DedicatedTokenData as Q, group as Qt, PlatformRuntime as R, PollOption as Rt, FusorRespond as S, User as Sn, asText as St, WebhookHandler as T, avatar as Tn, asRichlink as Tt, SchemaMessage as U, Markdown as Ut, ProviderMessage as V, option as Vt, SpaceNamespace as W, asMarkdown as Wt, Store as X, Group as Xt, stream as Y, TextStreamOptions as Yt, CloudPlatform as Z, asGroup as Zt, FusorClient as _, ContactOrg as _n, voice as _t, Content as a, ReactionBuilder as an, SharedTokenData as at, FusorMessagesReturn as b, contact as bn, Typing as bt, fromVCard as c, reactionSchema as cn, SpectrumCloudError as ct, UnsupportedKind as d, Contact as dn, TokenData as dt, Edit as en, ImessageInfoData as et, Spectrum as f, ContactAddress as fn, cloud as ft, isFusorClient as g, ContactName as gn, asVoice as gt, fusor as h, ContactInput as hn, Voice as ht, attachment as i, Reaction as in, ProjectProfile as it, AnyPlatformDef as j, AppUrl as jn, rename as jt, fusorEvent as k, App as kn, reply as kt, toVCard as l, asCustom as ln, SubscriptionData as lt, definePlatform as m, ContactEmail as mn, EmojiKey as mt, AttachmentInput as n, Message as nn, PlatformsData as nt, ContentBuilder as o, asReaction as on, SlackTeamMeta as ot, SpectrumInstance as p, ContactDetails as pn, Emoji as pt, broadcast as q, StreamText as qt, asAttachment as r, Space as rn, ProjectData as rt, ContentInput as s, reaction as sn, SlackTokenData as st, Attachment as t, edit as tn, PlatformStatus as tt, UnsupportedError as u, custom as un, SubscriptionStatus as ut, FusorMessages as v, ContactPhone as vn, Unsend as vt, FusorVerifyRequest as w, AvatarInput as wn, Richlink as wt, FusorReply as x, AgentSender as xn, typing as xt, FusorMessagesCtx as y, asContact as yn, unsend as yt, PlatformSpace as z, asPoll as zt };
7663
+ export { FusorTokenData as $, asGroup as $t, isFusorEvent as A, photoActionSchema as An, reply as At, PlatformUser as B, PollOption as Bt, FusorVerify as C, AgentSender as Cn, text as Ct, WebhookRawResult as D, avatar as Dn, resolveContents as Dt, WebhookRawRequest as E, AvatarInput as En, richlink as Et, PlatformInstance as F, appLayoutSchema as Fn, asRead as Ft, Broadcaster as G, Markdown as Gt, ProviderMessageRecord as H, asPollOption as Ht, PlatformMessage as I, read as It, mergeStreams as J, DeltaExtractor as Jt, ManagedStream as K, asMarkdown as Kt, PlatformProviderConfig as L, Poll as Lt, EventProducer as M, AppLayout as Mn, Rename as Mt, Platform as N, AppUrl as Nn, rename as Nt, FusorEvent as O, PhotoInput as On, Reply as Ot, PlatformDef as P, app as Pn, Read as Pt, DedicatedTokenData as Q, Group as Qt, PlatformRuntime as R, PollChoice as Rt, FusorRespond as S, contact as Sn, asText as St, WebhookHandler as T, Avatar as Tn, asRichlink as Tt, SchemaMessage as U, option as Ut, ProviderMessage as V, asPoll as Vt, SpaceNamespace as W, poll as Wt, Store as X, StreamTextSource as Xt, stream as Y, StreamText as Yt, CloudPlatform as Z, TextStreamOptions as Zt, FusorClient as _, ContactInput as _n, voice as _t, Content as a, Space as an, SharedTokenData as at, FusorMessagesReturn as b, ContactPhone as bn, Typing as bt, fromVCard as c, asReaction as cn, SpectrumCloudError as ct, UnsupportedKind as d, asCustom as dn, TokenData as dt, group as en, ImessageInfoData as et, Spectrum as f, custom as fn, cloud as ft, isFusorClient as g, ContactEmail as gn, asVoice as gt, fusor as h, ContactDetails as hn, Voice as ht, attachment as i, Message as in, ProjectProfile as it, AnyPlatformDef as j, App as jn, replySchema as jt, fusorEvent as k, buildPhotoAction as kn, asReply as kt, toVCard as l, reaction as ln, SubscriptionData as lt, definePlatform as m, ContactAddress as mn, EmojiKey as mt, AttachmentInput as n, Edit as nn, PlatformsData as nt, ContentBuilder as o, Reaction as on, SlackTeamMeta as ot, SpectrumInstance as p, Contact as pn, Emoji as pt, broadcast as q, markdown as qt, asAttachment as r, edit as rn, ProjectData as rt, ContentInput as s, ReactionBuilder as sn, SlackTokenData as st, Attachment as t, groupSchema as tn, PlatformStatus as tt, UnsupportedError as u, reactionSchema as un, SubscriptionStatus as ut, FusorMessages as v, ContactName as vn, Unsend as vt, FusorVerifyRequest as w, User as wn, Richlink as wt, FusorReply as x, asContact as xn, typing as xt, FusorMessagesCtx as y, ContactOrg as yn, unsend as yt, PlatformSpace as z, PollChoiceInput as zt };