@spectrum-ts/core 6.1.0 → 7.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,10 +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
450
  type: "text";
455
451
  text: string;
456
452
  } | {
@@ -464,13 +460,6 @@ declare const editSchema: z.ZodObject<{
464
460
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
465
461
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
466
462
  size?: number | undefined;
467
- } | {
468
- type: "streamText";
469
- stream: () => AsyncIterable<string>;
470
- format?: "markdown" | "plain" | undefined;
471
- } | {
472
- type: "custom";
473
- raw: unknown;
474
463
  } | {
475
464
  type: "contact";
476
465
  user?: {
@@ -515,13 +504,12 @@ declare const editSchema: z.ZodObject<{
515
504
  } | undefined;
516
505
  raw?: unknown;
517
506
  } | {
518
- type: "voice";
519
- mimeType: string;
520
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
521
- 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
- size?: number | undefined;
507
+ type: "custom";
508
+ raw: unknown;
509
+ } | {
510
+ type: "reaction";
511
+ emoji: string;
512
+ target: Message<string, User, Space<unknown>>;
525
513
  } | {
526
514
  type: "richlink";
527
515
  url: string;
@@ -532,19 +520,6 @@ declare const editSchema: z.ZodObject<{
532
520
  read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
533
521
  stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
534
522
  }, 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
523
  } | {
549
524
  type: "group";
550
525
  items: Message<string, User, Space<unknown>>[];
@@ -568,6 +543,31 @@ declare const editSchema: z.ZodObject<{
568
543
  };
569
544
  selected: boolean;
570
545
  title: string;
546
+ } | {
547
+ type: "voice";
548
+ mimeType: string;
549
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
550
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
551
+ name?: string | undefined;
552
+ duration?: number | undefined;
553
+ size?: number | undefined;
554
+ } | {
555
+ type: "streamText";
556
+ stream: () => AsyncIterable<string>;
557
+ format?: "markdown" | "plain" | undefined;
558
+ } | {
559
+ type: "app";
560
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
561
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
562
+ caption: z.ZodOptional<z.ZodString>;
563
+ subcaption: z.ZodOptional<z.ZodString>;
564
+ trailingCaption: z.ZodOptional<z.ZodString>;
565
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
566
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
567
+ imageTitle: z.ZodOptional<z.ZodString>;
568
+ imageSubtitle: z.ZodOptional<z.ZodString>;
569
+ summary: z.ZodOptional<z.ZodString>;
570
+ }, z.core.$strip>>>;
571
571
  } | {
572
572
  type: "effect";
573
573
  content: {
@@ -602,10 +602,6 @@ declare const editSchema: z.ZodObject<{
602
602
  kind: "clear";
603
603
  };
604
604
  }, {
605
- type: "reaction";
606
- emoji: string;
607
- target: Message<string, User, Space<unknown>>;
608
- } | {
609
605
  type: "text";
610
606
  text: string;
611
607
  } | {
@@ -619,13 +615,6 @@ declare const editSchema: z.ZodObject<{
619
615
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
620
616
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
621
617
  size?: number | undefined;
622
- } | {
623
- type: "streamText";
624
- stream: () => AsyncIterable<string>;
625
- format?: "markdown" | "plain" | undefined;
626
- } | {
627
- type: "custom";
628
- raw: unknown;
629
618
  } | {
630
619
  type: "contact";
631
620
  user?: {
@@ -670,13 +659,12 @@ declare const editSchema: z.ZodObject<{
670
659
  } | undefined;
671
660
  raw?: unknown;
672
661
  } | {
673
- type: "voice";
674
- mimeType: string;
675
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
676
- 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
- size?: number | undefined;
662
+ type: "custom";
663
+ raw: unknown;
664
+ } | {
665
+ type: "reaction";
666
+ emoji: string;
667
+ target: Message<string, User, Space<unknown>>;
680
668
  } | {
681
669
  type: "richlink";
682
670
  url: string;
@@ -687,19 +675,6 @@ declare const editSchema: z.ZodObject<{
687
675
  read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
688
676
  stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
689
677
  }, 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
678
  } | {
704
679
  type: "group";
705
680
  items: Message<string, User, Space<unknown>>[];
@@ -723,6 +698,31 @@ declare const editSchema: z.ZodObject<{
723
698
  };
724
699
  selected: boolean;
725
700
  title: string;
701
+ } | {
702
+ type: "voice";
703
+ mimeType: string;
704
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
705
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
706
+ name?: string | undefined;
707
+ duration?: number | undefined;
708
+ size?: number | undefined;
709
+ } | {
710
+ type: "streamText";
711
+ stream: () => AsyncIterable<string>;
712
+ format?: "markdown" | "plain" | undefined;
713
+ } | {
714
+ type: "app";
715
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
716
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
717
+ caption: z.ZodOptional<z.ZodString>;
718
+ subcaption: z.ZodOptional<z.ZodString>;
719
+ trailingCaption: z.ZodOptional<z.ZodString>;
720
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
721
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
722
+ imageTitle: z.ZodOptional<z.ZodString>;
723
+ imageSubtitle: z.ZodOptional<z.ZodString>;
724
+ summary: z.ZodOptional<z.ZodString>;
725
+ }, z.core.$strip>>>;
726
726
  } | {
727
727
  type: "effect";
728
728
  content: {
@@ -982,10 +982,6 @@ declare function rename(displayName: string): ContentBuilder;
982
982
  declare const replySchema: z.ZodObject<{
983
983
  type: z.ZodLiteral<"reply">;
984
984
  content: z.ZodCustom<{
985
- type: "reaction";
986
- emoji: string;
987
- target: Message<string, User, Space<unknown>>;
988
- } | {
989
985
  type: "text";
990
986
  text: string;
991
987
  } | {
@@ -999,13 +995,6 @@ declare const replySchema: z.ZodObject<{
999
995
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1000
996
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1001
997
  size?: number | undefined;
1002
- } | {
1003
- type: "streamText";
1004
- stream: () => AsyncIterable<string>;
1005
- format?: "markdown" | "plain" | undefined;
1006
- } | {
1007
- type: "custom";
1008
- raw: unknown;
1009
998
  } | {
1010
999
  type: "contact";
1011
1000
  user?: {
@@ -1050,13 +1039,12 @@ declare const replySchema: z.ZodObject<{
1050
1039
  } | undefined;
1051
1040
  raw?: unknown;
1052
1041
  } | {
1053
- type: "voice";
1054
- mimeType: string;
1055
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1056
- 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
- size?: number | undefined;
1042
+ type: "custom";
1043
+ raw: unknown;
1044
+ } | {
1045
+ type: "reaction";
1046
+ emoji: string;
1047
+ target: Message<string, User, Space<unknown>>;
1060
1048
  } | {
1061
1049
  type: "richlink";
1062
1050
  url: string;
@@ -1067,19 +1055,6 @@ declare const replySchema: z.ZodObject<{
1067
1055
  read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1068
1056
  stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1069
1057
  }, 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
1058
  } | {
1084
1059
  type: "group";
1085
1060
  items: Message<string, User, Space<unknown>>[];
@@ -1103,6 +1078,31 @@ declare const replySchema: z.ZodObject<{
1103
1078
  };
1104
1079
  selected: boolean;
1105
1080
  title: string;
1081
+ } | {
1082
+ type: "voice";
1083
+ mimeType: string;
1084
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1085
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1086
+ name?: string | undefined;
1087
+ duration?: number | undefined;
1088
+ size?: number | undefined;
1089
+ } | {
1090
+ type: "streamText";
1091
+ stream: () => AsyncIterable<string>;
1092
+ format?: "markdown" | "plain" | undefined;
1093
+ } | {
1094
+ type: "app";
1095
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
1096
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
1097
+ caption: z.ZodOptional<z.ZodString>;
1098
+ subcaption: z.ZodOptional<z.ZodString>;
1099
+ trailingCaption: z.ZodOptional<z.ZodString>;
1100
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
1101
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
1102
+ imageTitle: z.ZodOptional<z.ZodString>;
1103
+ imageSubtitle: z.ZodOptional<z.ZodString>;
1104
+ summary: z.ZodOptional<z.ZodString>;
1105
+ }, z.core.$strip>>>;
1106
1106
  } | {
1107
1107
  type: "effect";
1108
1108
  content: {
@@ -1137,10 +1137,6 @@ declare const replySchema: z.ZodObject<{
1137
1137
  kind: "clear";
1138
1138
  };
1139
1139
  }, {
1140
- type: "reaction";
1141
- emoji: string;
1142
- target: Message<string, User, Space<unknown>>;
1143
- } | {
1144
1140
  type: "text";
1145
1141
  text: string;
1146
1142
  } | {
@@ -1154,13 +1150,6 @@ declare const replySchema: z.ZodObject<{
1154
1150
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1155
1151
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1156
1152
  size?: number | undefined;
1157
- } | {
1158
- type: "streamText";
1159
- stream: () => AsyncIterable<string>;
1160
- format?: "markdown" | "plain" | undefined;
1161
- } | {
1162
- type: "custom";
1163
- raw: unknown;
1164
1153
  } | {
1165
1154
  type: "contact";
1166
1155
  user?: {
@@ -1205,13 +1194,12 @@ declare const replySchema: z.ZodObject<{
1205
1194
  } | undefined;
1206
1195
  raw?: unknown;
1207
1196
  } | {
1208
- type: "voice";
1209
- mimeType: string;
1210
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1211
- 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
- size?: number | undefined;
1197
+ type: "custom";
1198
+ raw: unknown;
1199
+ } | {
1200
+ type: "reaction";
1201
+ emoji: string;
1202
+ target: Message<string, User, Space<unknown>>;
1215
1203
  } | {
1216
1204
  type: "richlink";
1217
1205
  url: string;
@@ -1222,19 +1210,6 @@ declare const replySchema: z.ZodObject<{
1222
1210
  read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1223
1211
  stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1224
1212
  }, 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
1213
  } | {
1239
1214
  type: "group";
1240
1215
  items: Message<string, User, Space<unknown>>[];
@@ -1258,6 +1233,31 @@ declare const replySchema: z.ZodObject<{
1258
1233
  };
1259
1234
  selected: boolean;
1260
1235
  title: string;
1236
+ } | {
1237
+ type: "voice";
1238
+ mimeType: string;
1239
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1240
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1241
+ name?: string | undefined;
1242
+ duration?: number | undefined;
1243
+ size?: number | undefined;
1244
+ } | {
1245
+ type: "streamText";
1246
+ stream: () => AsyncIterable<string>;
1247
+ format?: "markdown" | "plain" | undefined;
1248
+ } | {
1249
+ type: "app";
1250
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
1251
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
1252
+ caption: z.ZodOptional<z.ZodString>;
1253
+ subcaption: z.ZodOptional<z.ZodString>;
1254
+ trailingCaption: z.ZodOptional<z.ZodString>;
1255
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
1256
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
1257
+ imageTitle: z.ZodOptional<z.ZodString>;
1258
+ imageSubtitle: z.ZodOptional<z.ZodString>;
1259
+ summary: z.ZodOptional<z.ZodString>;
1260
+ }, z.core.$strip>>>;
1261
1261
  } | {
1262
1262
  type: "effect";
1263
1263
  content: {
@@ -6893,10 +6893,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6893
6893
  }, z.core.$strip>, z.ZodObject<{
6894
6894
  type: z.ZodLiteral<"reply">;
6895
6895
  content: z.ZodCustom<{
6896
- type: "reaction";
6897
- emoji: string;
6898
- target: Message<string, User, Space<unknown>>;
6899
- } | {
6900
6896
  type: "text";
6901
6897
  text: string;
6902
6898
  } | {
@@ -6910,13 +6906,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6910
6906
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6911
6907
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6912
6908
  size?: number | undefined;
6913
- } | {
6914
- type: "streamText";
6915
- stream: () => AsyncIterable<string>;
6916
- format?: "markdown" | "plain" | undefined;
6917
- } | {
6918
- type: "custom";
6919
- raw: unknown;
6920
6909
  } | {
6921
6910
  type: "contact";
6922
6911
  user?: {
@@ -6961,13 +6950,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6961
6950
  } | undefined;
6962
6951
  raw?: unknown;
6963
6952
  } | {
6964
- type: "voice";
6965
- mimeType: string;
6966
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6967
- 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
- size?: number | undefined;
6953
+ type: "custom";
6954
+ raw: unknown;
6955
+ } | {
6956
+ type: "reaction";
6957
+ emoji: string;
6958
+ target: Message<string, User, Space<unknown>>;
6971
6959
  } | {
6972
6960
  type: "richlink";
6973
6961
  url: string;
@@ -6978,19 +6966,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6978
6966
  read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6979
6967
  stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6980
6968
  }, 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
6969
  } | {
6995
6970
  type: "group";
6996
6971
  items: Message<string, User, Space<unknown>>[];
@@ -7014,6 +6989,31 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7014
6989
  };
7015
6990
  selected: boolean;
7016
6991
  title: string;
6992
+ } | {
6993
+ type: "voice";
6994
+ mimeType: string;
6995
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
6996
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
6997
+ name?: string | undefined;
6998
+ duration?: number | undefined;
6999
+ size?: number | undefined;
7000
+ } | {
7001
+ type: "streamText";
7002
+ stream: () => AsyncIterable<string>;
7003
+ format?: "markdown" | "plain" | undefined;
7004
+ } | {
7005
+ type: "app";
7006
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
7007
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
7008
+ caption: z.ZodOptional<z.ZodString>;
7009
+ subcaption: z.ZodOptional<z.ZodString>;
7010
+ trailingCaption: z.ZodOptional<z.ZodString>;
7011
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
7012
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7013
+ imageTitle: z.ZodOptional<z.ZodString>;
7014
+ imageSubtitle: z.ZodOptional<z.ZodString>;
7015
+ summary: z.ZodOptional<z.ZodString>;
7016
+ }, z.core.$strip>>>;
7017
7017
  } | {
7018
7018
  type: "effect";
7019
7019
  content: {
@@ -7048,10 +7048,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7048
7048
  kind: "clear";
7049
7049
  };
7050
7050
  }, {
7051
- type: "reaction";
7052
- emoji: string;
7053
- target: Message<string, User, Space<unknown>>;
7054
- } | {
7055
7051
  type: "text";
7056
7052
  text: string;
7057
7053
  } | {
@@ -7065,13 +7061,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7065
7061
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7066
7062
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7067
7063
  size?: number | undefined;
7068
- } | {
7069
- type: "streamText";
7070
- stream: () => AsyncIterable<string>;
7071
- format?: "markdown" | "plain" | undefined;
7072
- } | {
7073
- type: "custom";
7074
- raw: unknown;
7075
7064
  } | {
7076
7065
  type: "contact";
7077
7066
  user?: {
@@ -7116,13 +7105,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7116
7105
  } | undefined;
7117
7106
  raw?: unknown;
7118
7107
  } | {
7119
- type: "voice";
7120
- mimeType: string;
7121
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7122
- 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
- size?: number | undefined;
7108
+ type: "custom";
7109
+ raw: unknown;
7110
+ } | {
7111
+ type: "reaction";
7112
+ emoji: string;
7113
+ target: Message<string, User, Space<unknown>>;
7126
7114
  } | {
7127
7115
  type: "richlink";
7128
7116
  url: string;
@@ -7133,19 +7121,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7133
7121
  read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7134
7122
  stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7135
7123
  }, 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
7124
  } | {
7150
7125
  type: "group";
7151
7126
  items: Message<string, User, Space<unknown>>[];
@@ -7169,6 +7144,31 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7169
7144
  };
7170
7145
  selected: boolean;
7171
7146
  title: string;
7147
+ } | {
7148
+ type: "voice";
7149
+ mimeType: string;
7150
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7151
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7152
+ name?: string | undefined;
7153
+ duration?: number | undefined;
7154
+ size?: number | undefined;
7155
+ } | {
7156
+ type: "streamText";
7157
+ stream: () => AsyncIterable<string>;
7158
+ format?: "markdown" | "plain" | undefined;
7159
+ } | {
7160
+ type: "app";
7161
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
7162
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
7163
+ caption: z.ZodOptional<z.ZodString>;
7164
+ subcaption: z.ZodOptional<z.ZodString>;
7165
+ trailingCaption: z.ZodOptional<z.ZodString>;
7166
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
7167
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7168
+ imageTitle: z.ZodOptional<z.ZodString>;
7169
+ imageSubtitle: z.ZodOptional<z.ZodString>;
7170
+ summary: z.ZodOptional<z.ZodString>;
7171
+ }, z.core.$strip>>>;
7172
7172
  } | {
7173
7173
  type: "effect";
7174
7174
  content: {
@@ -7207,10 +7207,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7207
7207
  }, z.core.$strip>, z.ZodObject<{
7208
7208
  type: z.ZodLiteral<"edit">;
7209
7209
  content: z.ZodCustom<{
7210
- type: "reaction";
7211
- emoji: string;
7212
- target: Message<string, User, Space<unknown>>;
7213
- } | {
7214
7210
  type: "text";
7215
7211
  text: string;
7216
7212
  } | {
@@ -7224,13 +7220,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7224
7220
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7225
7221
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7226
7222
  size?: number | undefined;
7227
- } | {
7228
- type: "streamText";
7229
- stream: () => AsyncIterable<string>;
7230
- format?: "markdown" | "plain" | undefined;
7231
- } | {
7232
- type: "custom";
7233
- raw: unknown;
7234
7223
  } | {
7235
7224
  type: "contact";
7236
7225
  user?: {
@@ -7275,13 +7264,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7275
7264
  } | undefined;
7276
7265
  raw?: unknown;
7277
7266
  } | {
7278
- type: "voice";
7279
- mimeType: string;
7280
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7281
- 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
- size?: number | undefined;
7267
+ type: "custom";
7268
+ raw: unknown;
7269
+ } | {
7270
+ type: "reaction";
7271
+ emoji: string;
7272
+ target: Message<string, User, Space<unknown>>;
7285
7273
  } | {
7286
7274
  type: "richlink";
7287
7275
  url: string;
@@ -7292,19 +7280,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7292
7280
  read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7293
7281
  stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7294
7282
  }, 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
7283
  } | {
7309
7284
  type: "group";
7310
7285
  items: Message<string, User, Space<unknown>>[];
@@ -7328,6 +7303,31 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7328
7303
  };
7329
7304
  selected: boolean;
7330
7305
  title: string;
7306
+ } | {
7307
+ type: "voice";
7308
+ mimeType: string;
7309
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7310
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7311
+ name?: string | undefined;
7312
+ duration?: number | undefined;
7313
+ size?: number | undefined;
7314
+ } | {
7315
+ type: "streamText";
7316
+ stream: () => AsyncIterable<string>;
7317
+ format?: "markdown" | "plain" | undefined;
7318
+ } | {
7319
+ type: "app";
7320
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
7321
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
7322
+ caption: z.ZodOptional<z.ZodString>;
7323
+ subcaption: z.ZodOptional<z.ZodString>;
7324
+ trailingCaption: z.ZodOptional<z.ZodString>;
7325
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
7326
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7327
+ imageTitle: z.ZodOptional<z.ZodString>;
7328
+ imageSubtitle: z.ZodOptional<z.ZodString>;
7329
+ summary: z.ZodOptional<z.ZodString>;
7330
+ }, z.core.$strip>>>;
7331
7331
  } | {
7332
7332
  type: "effect";
7333
7333
  content: {
@@ -7362,10 +7362,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7362
7362
  kind: "clear";
7363
7363
  };
7364
7364
  }, {
7365
- type: "reaction";
7366
- emoji: string;
7367
- target: Message<string, User, Space<unknown>>;
7368
- } | {
7369
7365
  type: "text";
7370
7366
  text: string;
7371
7367
  } | {
@@ -7379,13 +7375,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7379
7375
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7380
7376
  stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7381
7377
  size?: number | undefined;
7382
- } | {
7383
- type: "streamText";
7384
- stream: () => AsyncIterable<string>;
7385
- format?: "markdown" | "plain" | undefined;
7386
- } | {
7387
- type: "custom";
7388
- raw: unknown;
7389
7378
  } | {
7390
7379
  type: "contact";
7391
7380
  user?: {
@@ -7430,13 +7419,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7430
7419
  } | undefined;
7431
7420
  raw?: unknown;
7432
7421
  } | {
7433
- type: "voice";
7434
- mimeType: string;
7435
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7436
- 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
- size?: number | undefined;
7422
+ type: "custom";
7423
+ raw: unknown;
7424
+ } | {
7425
+ type: "reaction";
7426
+ emoji: string;
7427
+ target: Message<string, User, Space<unknown>>;
7440
7428
  } | {
7441
7429
  type: "richlink";
7442
7430
  url: string;
@@ -7447,19 +7435,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7447
7435
  read: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7448
7436
  stream: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7449
7437
  }, 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
7438
  } | {
7464
7439
  type: "group";
7465
7440
  items: Message<string, User, Space<unknown>>[];
@@ -7483,6 +7458,31 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7483
7458
  };
7484
7459
  selected: boolean;
7485
7460
  title: string;
7461
+ } | {
7462
+ type: "voice";
7463
+ mimeType: string;
7464
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7465
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7466
+ name?: string | undefined;
7467
+ duration?: number | undefined;
7468
+ size?: number | undefined;
7469
+ } | {
7470
+ type: "streamText";
7471
+ stream: () => AsyncIterable<string>;
7472
+ format?: "markdown" | "plain" | undefined;
7473
+ } | {
7474
+ type: "app";
7475
+ url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
7476
+ layout: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
7477
+ caption: z.ZodOptional<z.ZodString>;
7478
+ subcaption: z.ZodOptional<z.ZodString>;
7479
+ trailingCaption: z.ZodOptional<z.ZodString>;
7480
+ trailingSubcaption: z.ZodOptional<z.ZodString>;
7481
+ image: z.ZodOptional<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7482
+ imageTitle: z.ZodOptional<z.ZodString>;
7483
+ imageSubtitle: z.ZodOptional<z.ZodString>;
7484
+ summary: z.ZodOptional<z.ZodString>;
7485
+ }, z.core.$strip>>>;
7486
7486
  } | {
7487
7487
  type: "effect";
7488
7488
  content: {
@@ -1,4 +1,4 @@
1
- import { $t as groupSchema, Bt as asPollOption, Dn as buildPhotoAction, En as PhotoInput, H as ProviderMessageRecord, K as ManagedStream, Nt as asRead, On as photoActionSchema, St as asText, Tt as asRichlink, Wt as asMarkdown, Zt as asGroup, cn as reactionSchema, gt as asVoice, ln as asCustom, on as asReaction, r as asAttachment, yn as asContact, zt as asPoll } from "./attachment-CQh4PQGl.js";
1
+ import { $t as groupSchema, Bt as asPollOption, Dn as buildPhotoAction, En as PhotoInput, H as ProviderMessageRecord, K as ManagedStream, Nt as asRead, On as photoActionSchema, St as asText, Tt as asRichlink, Wt as asMarkdown, Zt as asGroup, cn as reactionSchema, gt as asVoice, ln as asCustom, on as asReaction, r as asAttachment, yn as asContact, zt as asPoll } from "./attachment-BGIJLBk4.js";
2
2
  import z from "zod";
3
3
  import { LogAttrs, LogAttrs as LogAttrs$1, LogLevel, PhotonLogger, createLogger, sanitizeEmail, sanitizeErrorMessage, sanitizePhone, setLogLevel } from "@photon-ai/otel";
4
4
  import { Token } from "marked";
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as FusorTokenData, A as isFusorEvent, An as AppLayout, At as Rename, B as PlatformUser, C as FusorVerify, Cn as Avatar, Ct as text, D as WebhookRawResult, Dt as resolveContents, E as WebhookRawRequest, Et as richlink, F as PlatformInstance, Ft as Poll, G as Broadcaster, Gt as markdown, Ht as poll, I as PlatformMessage, It as PollChoice, J as mergeStreams, Jt as StreamTextSource, K as ManagedStream, Kt as DeltaExtractor, L as PlatformProviderConfig, Lt as PollChoiceInput, M as EventProducer, Mn as app, Mt as Read, N as Platform, Nn as appLayoutSchema, O as FusorEvent, Ot as Reply, P as PlatformDef, Pt as read, Q as DedicatedTokenData, Qt as group, R as PlatformRuntime, Rt as PollOption, S as FusorRespond, Sn as User, T as WebhookHandler, Tn as avatar, U as SchemaMessage, Ut as Markdown, V as ProviderMessage, Vt as option, W as SpaceNamespace, X as Store, Xt as Group, Y as stream, Yt as TextStreamOptions, Z as CloudPlatform, _ as FusorClient, _n as ContactOrg, _t as voice, a as Content, an as ReactionBuilder, at as SharedTokenData, b as FusorMessagesReturn, bn as contact, bt as Typing, c as fromVCard, ct as SpectrumCloudError, d as UnsupportedKind, dn as Contact, dt as TokenData, en as Edit, et as ImessageInfoData, f as Spectrum, fn as ContactAddress, ft as cloud, g as isFusorClient, gn as ContactName, h as fusor, hn as ContactInput, ht as Voice, i as attachment, in as Reaction, it as ProjectProfile, j as AnyPlatformDef, jn as AppUrl, jt as rename, k as fusorEvent, kn as App, kt as reply, l as toVCard, lt as SubscriptionData, m as definePlatform, mn as ContactEmail, mt as EmojiKey, n as AttachmentInput, nn as Message, nt as PlatformsData, o as ContentBuilder, ot as SlackTeamMeta, p as SpectrumInstance, pn as ContactDetails, pt as Emoji, q as broadcast, qt as StreamText, rn as Space, rt as ProjectData, s as ContentInput, sn as reaction, st as SlackTokenData, t as Attachment, tn as edit, tt as PlatformStatus, u as UnsupportedError, un as custom, ut as SubscriptionStatus, v as FusorMessages, vn as ContactPhone, vt as Unsend, w as FusorVerifyRequest, wn as AvatarInput, wt as Richlink, x as FusorReply, xn as AgentSender, xt as typing, y as FusorMessagesCtx, yt as unsend, z as PlatformSpace } from "./attachment-CQh4PQGl.js";
1
+ import { $ as FusorTokenData, A as isFusorEvent, An as AppLayout, At as Rename, B as PlatformUser, C as FusorVerify, Cn as Avatar, Ct as text, D as WebhookRawResult, Dt as resolveContents, E as WebhookRawRequest, Et as richlink, F as PlatformInstance, Ft as Poll, G as Broadcaster, Gt as markdown, Ht as poll, I as PlatformMessage, It as PollChoice, J as mergeStreams, Jt as StreamTextSource, K as ManagedStream, Kt as DeltaExtractor, L as PlatformProviderConfig, Lt as PollChoiceInput, M as EventProducer, Mn as app, Mt as Read, N as Platform, Nn as appLayoutSchema, O as FusorEvent, Ot as Reply, P as PlatformDef, Pt as read, Q as DedicatedTokenData, Qt as group, R as PlatformRuntime, Rt as PollOption, S as FusorRespond, Sn as User, T as WebhookHandler, Tn as avatar, U as SchemaMessage, Ut as Markdown, V as ProviderMessage, Vt as option, W as SpaceNamespace, X as Store, Xt as Group, Y as stream, Yt as TextStreamOptions, Z as CloudPlatform, _ as FusorClient, _n as ContactOrg, _t as voice, a as Content, an as ReactionBuilder, at as SharedTokenData, b as FusorMessagesReturn, bn as contact, bt as Typing, c as fromVCard, ct as SpectrumCloudError, d as UnsupportedKind, dn as Contact, dt as TokenData, en as Edit, et as ImessageInfoData, f as Spectrum, fn as ContactAddress, ft as cloud, g as isFusorClient, gn as ContactName, h as fusor, hn as ContactInput, ht as Voice, i as attachment, in as Reaction, it as ProjectProfile, j as AnyPlatformDef, jn as AppUrl, jt as rename, k as fusorEvent, kn as App, kt as reply, l as toVCard, lt as SubscriptionData, m as definePlatform, mn as ContactEmail, mt as EmojiKey, n as AttachmentInput, nn as Message, nt as PlatformsData, o as ContentBuilder, ot as SlackTeamMeta, p as SpectrumInstance, pn as ContactDetails, pt as Emoji, q as broadcast, qt as StreamText, rn as Space, rt as ProjectData, s as ContentInput, sn as reaction, st as SlackTokenData, t as Attachment, tn as edit, tt as PlatformStatus, u as UnsupportedError, un as custom, ut as SubscriptionStatus, v as FusorMessages, vn as ContactPhone, vt as Unsend, w as FusorVerifyRequest, wn as AvatarInput, wt as Richlink, x as FusorReply, xn as AgentSender, xt as typing, y as FusorMessagesCtx, yt as unsend, z as PlatformSpace } from "./attachment-BGIJLBk4.js";
2
2
  export { type AgentSender, type AnyPlatformDef, type App, type AppLayout, type AppUrl, type Attachment, type AttachmentInput, type Avatar, type AvatarInput, type Broadcaster, type CloudPlatform, type Contact, type ContactAddress, type ContactDetails, type ContactEmail, type ContactInput, type ContactName, type ContactOrg, type ContactPhone, type Content, type ContentBuilder, type ContentInput, type DedicatedTokenData, type DeltaExtractor, type Edit, Emoji, type EmojiKey, type EventProducer, type FusorClient, type FusorEvent, type FusorMessages, type FusorMessagesCtx, type FusorMessagesReturn, type FusorReply, type FusorRespond, type FusorTokenData, type FusorVerify, type FusorVerifyRequest, type Group, type ImessageInfoData, type ManagedStream, type Markdown, type Message, type Platform, type PlatformDef, type PlatformInstance, type PlatformMessage, type PlatformProviderConfig, type PlatformRuntime, type PlatformSpace, type PlatformStatus, type PlatformUser, type PlatformsData, type Poll, type PollChoice, type PollChoiceInput, type PollOption, type ProjectData, type ProjectProfile, type ProviderMessage, type Reaction, type ReactionBuilder, type Read, type Rename, type Reply, type Richlink, type SchemaMessage, type SharedTokenData, type SlackTeamMeta, type SlackTokenData, type Space, type SpaceNamespace, Spectrum, SpectrumCloudError, type SpectrumInstance, type Store, type StreamText, type StreamTextSource, type SubscriptionData, type SubscriptionStatus, type TextStreamOptions, type TokenData, type Typing, type Unsend, UnsupportedError, type UnsupportedKind, type User, type Voice, type WebhookHandler, type WebhookRawRequest, type WebhookRawResult, app, appLayoutSchema, attachment, avatar, broadcast, cloud, contact, custom, definePlatform, edit, fromVCard, fusor, fusorEvent, group, isFusorClient, isFusorEvent, markdown, mergeStreams, option, poll, reaction, read, rename, reply, resolveContents, richlink, stream, text, toVCard, typing, unsend, voice };
package/dist/index.js CHANGED
@@ -2994,7 +2994,7 @@ function definePlatform(name, rawDef) {
2994
2994
  }
2995
2995
  //#endregion
2996
2996
  //#region src/build-env.ts
2997
- const SPECTRUM_SDK_VERSION = "6.1.0";
2997
+ const SPECTRUM_SDK_VERSION = "7.0.0";
2998
2998
  //#endregion
2999
2999
  //#region src/utils/provider-packages.ts
3000
3000
  const OFFICIAL_PROVIDER_PACKAGES = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-ts/core",
3
- "version": "6.1.0",
3
+ "version": "7.0.0",
4
4
  "description": "The spectrum-ts runtime — Spectrum, content builders, fusor, and the provider authoring API.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,18 +26,6 @@
26
26
  "./authoring": {
27
27
  "types": "./dist/authoring.d.ts",
28
28
  "default": "./dist/authoring.js"
29
- },
30
- "./elysia": {
31
- "types": "./dist/elysia.d.ts",
32
- "default": "./dist/elysia.js"
33
- },
34
- "./express": {
35
- "types": "./dist/express.d.ts",
36
- "default": "./dist/express.js"
37
- },
38
- "./hono": {
39
- "types": "./dist/hono.d.ts",
40
- "default": "./dist/hono.js"
41
29
  }
42
30
  },
43
31
  "publishConfig": {
@@ -54,24 +42,12 @@
54
42
  "zod": "^4.2.1"
55
43
  },
56
44
  "peerDependencies": {
57
- "elysia": "^1",
58
- "express": "^4 || ^5",
59
45
  "ffmpeg-static": "^5",
60
- "hono": "^4",
61
46
  "typescript": "^5 || ^6.0.0"
62
47
  },
63
48
  "peerDependenciesMeta": {
64
- "elysia": {
65
- "optional": true
66
- },
67
- "express": {
68
- "optional": true
69
- },
70
49
  "ffmpeg-static": {
71
50
  "optional": true
72
- },
73
- "hono": {
74
- "optional": true
75
51
  }
76
52
  },
77
53
  "license": "MIT"
package/dist/elysia.d.ts DELETED
@@ -1,92 +0,0 @@
1
- import { T as WebhookHandler, nn as Message, rn as Space } from "./attachment-CQh4PQGl.js";
2
- import { Elysia } from "elysia";
3
-
4
- //#region src/elysia.d.ts
5
- /**
6
- * The minimal structural surface of a Spectrum instance the plugin needs. Kept
7
- * structural (rather than importing the generic `SpectrumInstance<Providers>`)
8
- * so the plugin stays decoupled from provider typing; a real instance is
9
- * assignable via its Web `Request` webhook overload.
10
- */
11
- interface WebhookReceiver {
12
- webhook(request: Request, handler: WebhookHandler): Promise<Response>;
13
- }
14
- interface SpectrumPluginOptions {
15
- /** The Spectrum instance returned by `await Spectrum({...})`. */
16
- app: WebhookReceiver;
17
- /**
18
- * Invoked once per inbound message, fire-and-forget after the response — the
19
- * same `(space, message)` contract as `app.webhook(request, handler)`. Covers
20
- * both native Spectrum webhooks and fusor webhooks identically.
21
- */
22
- onMessage: WebhookHandler;
23
- /**
24
- * Route the webhook is mounted on.
25
- *
26
- * @default "/spectrum/webhook"
27
- */
28
- path?: string;
29
- }
30
- /**
31
- * Mount a Spectrum webhook endpoint on an Elysia app.
32
- *
33
- * @example
34
- * ```ts
35
- * import { Elysia } from "elysia";
36
- * import { Spectrum } from "spectrum-ts";
37
- * import { spectrum } from "spectrum-ts/elysia";
38
- *
39
- * const app = await Spectrum({ ..., webhookSecret: process.env.SPECTRUM_WEBHOOK_SECRET });
40
- *
41
- * new Elysia()
42
- * .use(spectrum({
43
- * app,
44
- * onMessage: async (space, message) => {
45
- * if (message.content.type === "text") await space.send(`echo: ${message.content.text}`);
46
- * },
47
- * }))
48
- * .listen(3000);
49
- * ```
50
- */
51
- declare function spectrum(options: SpectrumPluginOptions): Elysia<"", {
52
- decorator: {};
53
- store: {};
54
- derive: {};
55
- resolve: {};
56
- }, {
57
- typebox: {};
58
- error: {};
59
- }, {
60
- schema: {};
61
- standaloneSchema: {};
62
- macro: {};
63
- macroFn: {};
64
- parser: {};
65
- response: {};
66
- }, {
67
- [x: string]: {
68
- post: {
69
- body: unknown;
70
- params: {};
71
- query: unknown;
72
- headers: unknown;
73
- response: {
74
- 200: Response;
75
- };
76
- };
77
- };
78
- }, {
79
- derive: {};
80
- resolve: {};
81
- schema: {};
82
- standaloneSchema: {};
83
- response: {};
84
- }, {
85
- derive: {};
86
- resolve: {};
87
- schema: {};
88
- standaloneSchema: {};
89
- response: {};
90
- }>;
91
- //#endregion
92
- export { type Message, type Space, SpectrumPluginOptions, type WebhookHandler, spectrum };
package/dist/elysia.js DELETED
@@ -1,32 +0,0 @@
1
- import { Elysia } from "elysia";
2
- //#region src/elysia.ts
3
- /**
4
- * Mount a Spectrum webhook endpoint on an Elysia app.
5
- *
6
- * @example
7
- * ```ts
8
- * import { Elysia } from "elysia";
9
- * import { Spectrum } from "spectrum-ts";
10
- * import { spectrum } from "spectrum-ts/elysia";
11
- *
12
- * const app = await Spectrum({ ..., webhookSecret: process.env.SPECTRUM_WEBHOOK_SECRET });
13
- *
14
- * new Elysia()
15
- * .use(spectrum({
16
- * app,
17
- * onMessage: async (space, message) => {
18
- * if (message.content.type === "text") await space.send(`echo: ${message.content.text}`);
19
- * },
20
- * }))
21
- * .listen(3000);
22
- * ```
23
- */
24
- function spectrum(options) {
25
- const { app, onMessage, path = "/spectrum/webhook" } = options;
26
- return new Elysia({
27
- name: "spectrum-webhook",
28
- seed: path
29
- }).post(path, ({ request }) => app.webhook(request, onMessage), { parse: "none" });
30
- }
31
- //#endregion
32
- export { spectrum };
package/dist/express.d.ts DELETED
@@ -1,60 +0,0 @@
1
- import { T as WebhookHandler, nn as Message, rn as Space } from "./attachment-CQh4PQGl.js";
2
- import { Router } from "express";
3
-
4
- //#region src/express.d.ts
5
- /**
6
- * The minimal structural surface of a Spectrum instance the plugin needs. Kept
7
- * structural (rather than importing the generic `SpectrumInstance<Providers>`)
8
- * so the plugin stays decoupled from provider typing; a real instance is
9
- * assignable via its raw (`{ body, headers }`) webhook overload.
10
- */
11
- interface WebhookReceiver {
12
- webhook(request: {
13
- body: Uint8Array | ArrayBuffer;
14
- headers?: Record<string, string>;
15
- }, handler: WebhookHandler): Promise<{
16
- body: Uint8Array;
17
- headers: Record<string, string>;
18
- status: number;
19
- }>;
20
- }
21
- interface SpectrumPluginOptions {
22
- /** The Spectrum instance returned by `await Spectrum({...})`. */
23
- app: WebhookReceiver;
24
- /**
25
- * Invoked once per inbound message, fire-and-forget after the response — the
26
- * same `(space, message)` contract as `app.webhook(request, handler)`. Covers
27
- * both native Spectrum webhooks and fusor webhooks identically.
28
- */
29
- onMessage: WebhookHandler;
30
- /**
31
- * Route the webhook is mounted on.
32
- *
33
- * @default "/spectrum/webhook"
34
- */
35
- path?: string;
36
- }
37
- /**
38
- * Mount a Spectrum webhook endpoint on an Express app.
39
- *
40
- * @example
41
- * ```ts
42
- * import express from "express";
43
- * import { Spectrum } from "spectrum-ts";
44
- * import { spectrum } from "spectrum-ts/express";
45
- *
46
- * const app = await Spectrum({ ..., webhookSecret: process.env.SPECTRUM_WEBHOOK_SECRET });
47
- *
48
- * const server = express();
49
- * server.use(spectrum({ // mount before any global express.json()
50
- * app,
51
- * onMessage: async (space, message) => {
52
- * if (message.content.type === "text") await space.send(`echo: ${message.content.text}`);
53
- * },
54
- * }));
55
- * server.listen(3000);
56
- * ```
57
- */
58
- declare function spectrum(options: SpectrumPluginOptions): Router;
59
- //#endregion
60
- export { type Message, type Space, SpectrumPluginOptions, type WebhookHandler, spectrum };
package/dist/express.js DELETED
@@ -1,37 +0,0 @@
1
- import express from "express";
2
- //#region src/express.ts
3
- /**
4
- * Mount a Spectrum webhook endpoint on an Express app.
5
- *
6
- * @example
7
- * ```ts
8
- * import express from "express";
9
- * import { Spectrum } from "spectrum-ts";
10
- * import { spectrum } from "spectrum-ts/express";
11
- *
12
- * const app = await Spectrum({ ..., webhookSecret: process.env.SPECTRUM_WEBHOOK_SECRET });
13
- *
14
- * const server = express();
15
- * server.use(spectrum({ // mount before any global express.json()
16
- * app,
17
- * onMessage: async (space, message) => {
18
- * if (message.content.type === "text") await space.send(`echo: ${message.content.text}`);
19
- * },
20
- * }));
21
- * server.listen(3000);
22
- * ```
23
- */
24
- function spectrum(options) {
25
- const { app, onMessage, path = "/spectrum/webhook" } = options;
26
- const router = express.Router();
27
- router.post(path, express.raw({ type: "*/*" }), async (req, res) => {
28
- const result = await app.webhook({
29
- body: req.body,
30
- headers: req.headers
31
- }, onMessage);
32
- res.status(result.status).set(result.headers).send(Buffer.from(result.body));
33
- });
34
- return router;
35
- }
36
- //#endregion
37
- export { spectrum };
package/dist/hono.d.ts DELETED
@@ -1,59 +0,0 @@
1
- import { T as WebhookHandler, nn as Message, rn as Space } from "./attachment-CQh4PQGl.js";
2
-
3
- //#region src/hono.d.ts
4
- /**
5
- * The minimal structural surface of a Spectrum instance the plugin needs. Kept
6
- * structural (rather than importing the generic `SpectrumInstance<Providers>`)
7
- * so the plugin stays decoupled from provider typing; a real instance is
8
- * assignable via its Web `Request` webhook overload.
9
- */
10
- interface WebhookReceiver {
11
- webhook(request: Request, handler: WebhookHandler): Promise<Response>;
12
- }
13
- interface SpectrumPluginOptions {
14
- /** The Spectrum instance returned by `await Spectrum({...})`. */
15
- app: WebhookReceiver;
16
- /**
17
- * Invoked once per inbound message, fire-and-forget after the response — the
18
- * same `(space, message)` contract as `app.webhook(request, handler)`. Covers
19
- * both native Spectrum webhooks and fusor webhooks identically.
20
- */
21
- onMessage: WebhookHandler;
22
- /**
23
- * Route the webhook is mounted on.
24
- *
25
- * @default "/spectrum/webhook"
26
- */
27
- path?: string;
28
- }
29
- /**
30
- * Mount a Spectrum webhook endpoint on a Hono app.
31
- *
32
- * @example
33
- * ```ts
34
- * import { Hono } from "hono";
35
- * import { Spectrum } from "spectrum-ts";
36
- * import { spectrum } from "spectrum-ts/hono";
37
- *
38
- * const app = await Spectrum({ ..., webhookSecret: process.env.SPECTRUM_WEBHOOK_SECRET });
39
- *
40
- * const server = new Hono().route("/", spectrum({
41
- * app,
42
- * onMessage: async (space, message) => {
43
- * if (message.content.type === "text") await space.send(`echo: ${message.content.text}`);
44
- * },
45
- * }));
46
- * ```
47
- */
48
- declare function spectrum(options: SpectrumPluginOptions): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, {
49
- [x: string]: {
50
- $post: {
51
- input: {};
52
- output: {};
53
- outputFormat: string;
54
- status: import("hono/utils/http-status").StatusCode;
55
- };
56
- };
57
- }, "/", string>;
58
- //#endregion
59
- export { type Message, type Space, SpectrumPluginOptions, type WebhookHandler, spectrum };
package/dist/hono.js DELETED
@@ -1,27 +0,0 @@
1
- import { Hono } from "hono";
2
- //#region src/hono.ts
3
- /**
4
- * Mount a Spectrum webhook endpoint on a Hono app.
5
- *
6
- * @example
7
- * ```ts
8
- * import { Hono } from "hono";
9
- * import { Spectrum } from "spectrum-ts";
10
- * import { spectrum } from "spectrum-ts/hono";
11
- *
12
- * const app = await Spectrum({ ..., webhookSecret: process.env.SPECTRUM_WEBHOOK_SECRET });
13
- *
14
- * const server = new Hono().route("/", spectrum({
15
- * app,
16
- * onMessage: async (space, message) => {
17
- * if (message.content.type === "text") await space.send(`echo: ${message.content.text}`);
18
- * },
19
- * }));
20
- * ```
21
- */
22
- function spectrum(options) {
23
- const { app, onMessage, path = "/spectrum/webhook" } = options;
24
- return new Hono().post(path, (c) => app.webhook(c.req.raw, onMessage));
25
- }
26
- //#endregion
27
- export { spectrum };