@spectrum-ts/core 9.1.0 → 9.3.1

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.
@@ -37,6 +37,7 @@ declare const appSchema: z.ZodObject<{
37
37
  imageSubtitle: z.ZodOptional<z.ZodString>;
38
38
  summary: z.ZodOptional<z.ZodString>;
39
39
  }, z.core.$strip>>>;
40
+ live: z.ZodOptional<z.ZodBoolean>;
40
41
  }, z.core.$strip>;
41
42
  type App = z.infer<typeof appSchema>;
42
43
  /**
@@ -45,7 +46,18 @@ type App = z.infer<typeof appSchema>;
45
46
  * computed at send time (e.g. minting a signed link).
46
47
  */
47
48
  type AppUrl = string | Promise<string> | (() => string | Promise<string>);
48
- declare function app(url: AppUrl): ContentBuilder;
49
+ /** Optional rendering behavior for an app card. */
50
+ interface AppOptions {
51
+ /** Render the installed app extension's live UI when the platform supports it. */
52
+ live?: boolean;
53
+ }
54
+ /**
55
+ * Construct an app card from a URL.
56
+ *
57
+ * Pass `{ live: true }` to ask supported platforms to render the installed
58
+ * app extension's live UI. Other platforms retain their normal URL fallback.
59
+ */
60
+ declare function app(url: AppUrl, options?: AppOptions): ContentBuilder;
49
61
  //#endregion
50
62
  //#region src/utils/photo-content.d.ts
51
63
  /**
@@ -580,19 +592,8 @@ interface Message<TPlatform extends string = string, TSender extends User = User
580
592
  declare const editSchema: z.ZodObject<{
581
593
  type: z.ZodLiteral<"edit">;
582
594
  content: z.ZodCustom<{
583
- type: "attachment";
584
- id: string;
585
- name: string;
586
- mimeType: string;
587
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
588
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
589
- size?: number | undefined;
590
- } | {
591
- type: "text";
592
- text: string;
593
- } | {
594
- type: "markdown";
595
- markdown: string;
595
+ type: "custom";
596
+ raw: unknown;
596
597
  } | {
597
598
  type: "contact";
598
599
  user?: {
@@ -637,38 +638,19 @@ declare const editSchema: z.ZodObject<{
637
638
  } | undefined;
638
639
  raw?: unknown;
639
640
  } | {
640
- type: "custom";
641
- raw: unknown;
642
- } | {
643
- type: "poll";
644
- title: string;
645
- options: {
646
- title: string;
647
- }[];
648
- } | {
649
- type: "poll_option";
650
- option: {
651
- title: string;
652
- };
653
- poll: {
654
- type: "poll";
655
- title: string;
656
- options: {
657
- title: string;
658
- }[];
659
- };
660
- selected: boolean;
661
- title: string;
662
- } | {
663
- type: "reaction";
664
- emoji: string;
665
- target: Message<string, User, Space<unknown>>;
641
+ type: "attachment";
642
+ id: string;
643
+ name: string;
644
+ mimeType: string;
645
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
646
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
647
+ size?: number | undefined;
666
648
  } | {
667
- type: "group";
668
- items: Message<string, User, Space<unknown>>[];
649
+ type: "text";
650
+ text: string;
669
651
  } | {
670
- type: "richlink";
671
- url: string;
652
+ type: "markdown";
653
+ markdown: string;
672
654
  } | {
673
655
  type: "streamText";
674
656
  stream: () => AsyncIterable<string>;
@@ -681,6 +663,9 @@ declare const editSchema: z.ZodObject<{
681
663
  name?: string | undefined;
682
664
  duration?: number | undefined;
683
665
  size?: number | undefined;
666
+ } | {
667
+ type: "richlink";
668
+ url: string;
684
669
  } | {
685
670
  type: "app";
686
671
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -694,6 +679,34 @@ declare const editSchema: z.ZodObject<{
694
679
  imageSubtitle: z.ZodOptional<z.ZodString>;
695
680
  summary: z.ZodOptional<z.ZodString>;
696
681
  }, z.core.$strip>>>;
682
+ live?: boolean | undefined;
683
+ } | {
684
+ type: "reaction";
685
+ emoji: string;
686
+ target: Message<string, User, Space<unknown>>;
687
+ } | {
688
+ type: "group";
689
+ items: Message<string, User, Space<unknown>>[];
690
+ } | {
691
+ type: "poll";
692
+ title: string;
693
+ options: {
694
+ title: string;
695
+ }[];
696
+ } | {
697
+ type: "poll_option";
698
+ option: {
699
+ title: string;
700
+ };
701
+ poll: {
702
+ type: "poll";
703
+ title: string;
704
+ options: {
705
+ title: string;
706
+ }[];
707
+ };
708
+ selected: boolean;
709
+ title: string;
697
710
  } | {
698
711
  type: "effect";
699
712
  content: {
@@ -736,19 +749,8 @@ declare const editSchema: z.ZodObject<{
736
749
  } | {
737
750
  type: "leaveSpace";
738
751
  }, {
739
- type: "attachment";
740
- id: string;
741
- name: string;
742
- mimeType: string;
743
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
744
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
745
- size?: number | undefined;
746
- } | {
747
- type: "text";
748
- text: string;
749
- } | {
750
- type: "markdown";
751
- markdown: string;
752
+ type: "custom";
753
+ raw: unknown;
752
754
  } | {
753
755
  type: "contact";
754
756
  user?: {
@@ -793,38 +795,19 @@ declare const editSchema: z.ZodObject<{
793
795
  } | undefined;
794
796
  raw?: unknown;
795
797
  } | {
796
- type: "custom";
797
- raw: unknown;
798
- } | {
799
- type: "poll";
800
- title: string;
801
- options: {
802
- title: string;
803
- }[];
804
- } | {
805
- type: "poll_option";
806
- option: {
807
- title: string;
808
- };
809
- poll: {
810
- type: "poll";
811
- title: string;
812
- options: {
813
- title: string;
814
- }[];
815
- };
816
- selected: boolean;
817
- title: string;
818
- } | {
819
- type: "reaction";
820
- emoji: string;
821
- target: Message<string, User, Space<unknown>>;
798
+ type: "attachment";
799
+ id: string;
800
+ name: string;
801
+ mimeType: string;
802
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
803
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
804
+ size?: number | undefined;
822
805
  } | {
823
- type: "group";
824
- items: Message<string, User, Space<unknown>>[];
806
+ type: "text";
807
+ text: string;
825
808
  } | {
826
- type: "richlink";
827
- url: string;
809
+ type: "markdown";
810
+ markdown: string;
828
811
  } | {
829
812
  type: "streamText";
830
813
  stream: () => AsyncIterable<string>;
@@ -837,6 +820,9 @@ declare const editSchema: z.ZodObject<{
837
820
  name?: string | undefined;
838
821
  duration?: number | undefined;
839
822
  size?: number | undefined;
823
+ } | {
824
+ type: "richlink";
825
+ url: string;
840
826
  } | {
841
827
  type: "app";
842
828
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -850,6 +836,34 @@ declare const editSchema: z.ZodObject<{
850
836
  imageSubtitle: z.ZodOptional<z.ZodString>;
851
837
  summary: z.ZodOptional<z.ZodString>;
852
838
  }, z.core.$strip>>>;
839
+ live?: boolean | undefined;
840
+ } | {
841
+ type: "reaction";
842
+ emoji: string;
843
+ target: Message<string, User, Space<unknown>>;
844
+ } | {
845
+ type: "group";
846
+ items: Message<string, User, Space<unknown>>[];
847
+ } | {
848
+ type: "poll";
849
+ title: string;
850
+ options: {
851
+ title: string;
852
+ }[];
853
+ } | {
854
+ type: "poll_option";
855
+ option: {
856
+ title: string;
857
+ };
858
+ poll: {
859
+ type: "poll";
860
+ title: string;
861
+ options: {
862
+ title: string;
863
+ }[];
864
+ };
865
+ selected: boolean;
866
+ title: string;
853
867
  } | {
854
868
  type: "effect";
855
869
  content: {
@@ -1122,19 +1136,8 @@ declare function rename(displayName: string): ContentBuilder;
1122
1136
  declare const replySchema: z.ZodObject<{
1123
1137
  type: z.ZodLiteral<"reply">;
1124
1138
  content: z.ZodCustom<{
1125
- type: "attachment";
1126
- id: string;
1127
- name: string;
1128
- mimeType: string;
1129
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1130
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1131
- size?: number | undefined;
1132
- } | {
1133
- type: "text";
1134
- text: string;
1135
- } | {
1136
- type: "markdown";
1137
- markdown: string;
1139
+ type: "custom";
1140
+ raw: unknown;
1138
1141
  } | {
1139
1142
  type: "contact";
1140
1143
  user?: {
@@ -1179,38 +1182,19 @@ declare const replySchema: z.ZodObject<{
1179
1182
  } | undefined;
1180
1183
  raw?: unknown;
1181
1184
  } | {
1182
- type: "custom";
1183
- raw: unknown;
1184
- } | {
1185
- type: "poll";
1186
- title: string;
1187
- options: {
1188
- title: string;
1189
- }[];
1190
- } | {
1191
- type: "poll_option";
1192
- option: {
1193
- title: string;
1194
- };
1195
- poll: {
1196
- type: "poll";
1197
- title: string;
1198
- options: {
1199
- title: string;
1200
- }[];
1201
- };
1202
- selected: boolean;
1203
- title: string;
1204
- } | {
1205
- type: "reaction";
1206
- emoji: string;
1207
- target: Message<string, User, Space<unknown>>;
1185
+ type: "attachment";
1186
+ id: string;
1187
+ name: string;
1188
+ mimeType: string;
1189
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1190
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1191
+ size?: number | undefined;
1208
1192
  } | {
1209
- type: "group";
1210
- items: Message<string, User, Space<unknown>>[];
1193
+ type: "text";
1194
+ text: string;
1211
1195
  } | {
1212
- type: "richlink";
1213
- url: string;
1196
+ type: "markdown";
1197
+ markdown: string;
1214
1198
  } | {
1215
1199
  type: "streamText";
1216
1200
  stream: () => AsyncIterable<string>;
@@ -1223,6 +1207,9 @@ declare const replySchema: z.ZodObject<{
1223
1207
  name?: string | undefined;
1224
1208
  duration?: number | undefined;
1225
1209
  size?: number | undefined;
1210
+ } | {
1211
+ type: "richlink";
1212
+ url: string;
1226
1213
  } | {
1227
1214
  type: "app";
1228
1215
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -1236,26 +1223,54 @@ declare const replySchema: z.ZodObject<{
1236
1223
  imageSubtitle: z.ZodOptional<z.ZodString>;
1237
1224
  summary: z.ZodOptional<z.ZodString>;
1238
1225
  }, z.core.$strip>>>;
1226
+ live?: boolean | undefined;
1239
1227
  } | {
1240
- type: "effect";
1241
- content: {
1242
- type: "attachment";
1243
- id: string;
1244
- name: string;
1245
- mimeType: string;
1246
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1247
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1248
- size?: number | undefined;
1249
- } | {
1250
- type: "text";
1251
- text: string;
1252
- } | {
1253
- type: "markdown";
1254
- markdown: string;
1255
- };
1256
- effect: string;
1228
+ type: "reaction";
1229
+ emoji: string;
1230
+ target: Message<string, User, Space<unknown>>;
1257
1231
  } | {
1258
- type: "typing";
1232
+ type: "group";
1233
+ items: Message<string, User, Space<unknown>>[];
1234
+ } | {
1235
+ type: "poll";
1236
+ title: string;
1237
+ options: {
1238
+ title: string;
1239
+ }[];
1240
+ } | {
1241
+ type: "poll_option";
1242
+ option: {
1243
+ title: string;
1244
+ };
1245
+ poll: {
1246
+ type: "poll";
1247
+ title: string;
1248
+ options: {
1249
+ title: string;
1250
+ }[];
1251
+ };
1252
+ selected: boolean;
1253
+ title: string;
1254
+ } | {
1255
+ type: "effect";
1256
+ content: {
1257
+ type: "attachment";
1258
+ id: string;
1259
+ name: string;
1260
+ mimeType: string;
1261
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1262
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1263
+ size?: number | undefined;
1264
+ } | {
1265
+ type: "text";
1266
+ text: string;
1267
+ } | {
1268
+ type: "markdown";
1269
+ markdown: string;
1270
+ };
1271
+ effect: string;
1272
+ } | {
1273
+ type: "typing";
1259
1274
  state: "start" | "stop";
1260
1275
  } | {
1261
1276
  type: "rename";
@@ -1278,19 +1293,8 @@ declare const replySchema: z.ZodObject<{
1278
1293
  } | {
1279
1294
  type: "leaveSpace";
1280
1295
  }, {
1281
- type: "attachment";
1282
- id: string;
1283
- name: string;
1284
- mimeType: string;
1285
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1286
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1287
- size?: number | undefined;
1288
- } | {
1289
- type: "text";
1290
- text: string;
1291
- } | {
1292
- type: "markdown";
1293
- markdown: string;
1296
+ type: "custom";
1297
+ raw: unknown;
1294
1298
  } | {
1295
1299
  type: "contact";
1296
1300
  user?: {
@@ -1335,38 +1339,19 @@ declare const replySchema: z.ZodObject<{
1335
1339
  } | undefined;
1336
1340
  raw?: unknown;
1337
1341
  } | {
1338
- type: "custom";
1339
- raw: unknown;
1340
- } | {
1341
- type: "poll";
1342
- title: string;
1343
- options: {
1344
- title: string;
1345
- }[];
1346
- } | {
1347
- type: "poll_option";
1348
- option: {
1349
- title: string;
1350
- };
1351
- poll: {
1352
- type: "poll";
1353
- title: string;
1354
- options: {
1355
- title: string;
1356
- }[];
1357
- };
1358
- selected: boolean;
1359
- title: string;
1360
- } | {
1361
- type: "reaction";
1362
- emoji: string;
1363
- target: Message<string, User, Space<unknown>>;
1342
+ type: "attachment";
1343
+ id: string;
1344
+ name: string;
1345
+ mimeType: string;
1346
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1347
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1348
+ size?: number | undefined;
1364
1349
  } | {
1365
- type: "group";
1366
- items: Message<string, User, Space<unknown>>[];
1350
+ type: "text";
1351
+ text: string;
1367
1352
  } | {
1368
- type: "richlink";
1369
- url: string;
1353
+ type: "markdown";
1354
+ markdown: string;
1370
1355
  } | {
1371
1356
  type: "streamText";
1372
1357
  stream: () => AsyncIterable<string>;
@@ -1379,6 +1364,9 @@ declare const replySchema: z.ZodObject<{
1379
1364
  name?: string | undefined;
1380
1365
  duration?: number | undefined;
1381
1366
  size?: number | undefined;
1367
+ } | {
1368
+ type: "richlink";
1369
+ url: string;
1382
1370
  } | {
1383
1371
  type: "app";
1384
1372
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -1392,6 +1380,34 @@ declare const replySchema: z.ZodObject<{
1392
1380
  imageSubtitle: z.ZodOptional<z.ZodString>;
1393
1381
  summary: z.ZodOptional<z.ZodString>;
1394
1382
  }, z.core.$strip>>>;
1383
+ live?: boolean | undefined;
1384
+ } | {
1385
+ type: "reaction";
1386
+ emoji: string;
1387
+ target: Message<string, User, Space<unknown>>;
1388
+ } | {
1389
+ type: "group";
1390
+ items: Message<string, User, Space<unknown>>[];
1391
+ } | {
1392
+ type: "poll";
1393
+ title: string;
1394
+ options: {
1395
+ title: string;
1396
+ }[];
1397
+ } | {
1398
+ type: "poll_option";
1399
+ option: {
1400
+ title: string;
1401
+ };
1402
+ poll: {
1403
+ type: "poll";
1404
+ title: string;
1405
+ options: {
1406
+ title: string;
1407
+ }[];
1408
+ };
1409
+ selected: boolean;
1410
+ title: string;
1395
1411
  } | {
1396
1412
  type: "effect";
1397
1413
  content: {
@@ -6651,8 +6667,9 @@ interface SpectrumLike<Providers extends PlatformProviderConfig[] = PlatformProv
6651
6667
  };
6652
6668
  readonly __providers: Providers;
6653
6669
  }
6670
+ type ConfigInput<Def extends AnyPlatformDef> = z.input<Def["config"]> extends infer Input ? Input extends unknown ? { [K in keyof Input]?: Input[K] } : never : never;
6654
6671
  interface Platform<Def extends AnyPlatformDef> {
6655
- config(...args: Record<string, never> extends z.input<Def["config"]> ? [config?: z.input<Def["config"]>] : [config: z.input<Def["config"]>]): PlatformProviderConfig<Def>;
6672
+ config(...args: Record<string, never> extends ConfigInput<Def> ? [config?: ConfigInput<Def>] : [config: ConfigInput<Def>]): PlatformProviderConfig<Def>;
6656
6673
  is(input: Message): input is PlatformMessage<Def>;
6657
6674
  is(input: Space): input is PlatformSpace<Def>;
6658
6675
  is(input: unknown): input is PlatformMessage<Def> | PlatformSpace<Def>;
@@ -7004,6 +7021,7 @@ declare const baseContentSchema: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
7004
7021
  imageSubtitle: z.ZodOptional<z.ZodString>;
7005
7022
  summary: z.ZodOptional<z.ZodString>;
7006
7023
  }, z.core.$strip>>>;
7024
+ live: z.ZodOptional<z.ZodBoolean>;
7007
7025
  }, z.core.$strip>, z.ZodObject<{
7008
7026
  type: z.ZodLiteral<"reaction">;
7009
7027
  emoji: z.ZodString;
@@ -7181,6 +7199,7 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7181
7199
  imageSubtitle: z.ZodOptional<z.ZodString>;
7182
7200
  summary: z.ZodOptional<z.ZodString>;
7183
7201
  }, z.core.$strip>>>;
7202
+ live: z.ZodOptional<z.ZodBoolean>;
7184
7203
  }, z.core.$strip>, z.ZodObject<{
7185
7204
  type: z.ZodLiteral<"reaction">;
7186
7205
  emoji: z.ZodString;
@@ -7255,19 +7274,8 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7255
7274
  }, z.core.$strip>, z.ZodObject<{
7256
7275
  type: z.ZodLiteral<"reply">;
7257
7276
  content: z.ZodCustom<{
7258
- type: "attachment";
7259
- id: string;
7260
- name: string;
7261
- mimeType: string;
7262
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7263
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7264
- size?: number | undefined;
7265
- } | {
7266
- type: "text";
7267
- text: string;
7268
- } | {
7269
- type: "markdown";
7270
- markdown: string;
7277
+ type: "custom";
7278
+ raw: unknown;
7271
7279
  } | {
7272
7280
  type: "contact";
7273
7281
  user?: {
@@ -7312,38 +7320,19 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7312
7320
  } | undefined;
7313
7321
  raw?: unknown;
7314
7322
  } | {
7315
- type: "custom";
7316
- raw: unknown;
7317
- } | {
7318
- type: "poll";
7319
- title: string;
7320
- options: {
7321
- title: string;
7322
- }[];
7323
- } | {
7324
- type: "poll_option";
7325
- option: {
7326
- title: string;
7327
- };
7328
- poll: {
7329
- type: "poll";
7330
- title: string;
7331
- options: {
7332
- title: string;
7333
- }[];
7334
- };
7335
- selected: boolean;
7336
- title: string;
7337
- } | {
7338
- type: "reaction";
7339
- emoji: string;
7340
- target: Message<string, User, Space<unknown>>;
7323
+ type: "attachment";
7324
+ id: string;
7325
+ name: string;
7326
+ mimeType: string;
7327
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7328
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7329
+ size?: number | undefined;
7341
7330
  } | {
7342
- type: "group";
7343
- items: Message<string, User, Space<unknown>>[];
7331
+ type: "text";
7332
+ text: string;
7344
7333
  } | {
7345
- type: "richlink";
7346
- url: string;
7334
+ type: "markdown";
7335
+ markdown: string;
7347
7336
  } | {
7348
7337
  type: "streamText";
7349
7338
  stream: () => AsyncIterable<string>;
@@ -7356,6 +7345,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7356
7345
  name?: string | undefined;
7357
7346
  duration?: number | undefined;
7358
7347
  size?: number | undefined;
7348
+ } | {
7349
+ type: "richlink";
7350
+ url: string;
7359
7351
  } | {
7360
7352
  type: "app";
7361
7353
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -7369,6 +7361,34 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7369
7361
  imageSubtitle: z.ZodOptional<z.ZodString>;
7370
7362
  summary: z.ZodOptional<z.ZodString>;
7371
7363
  }, z.core.$strip>>>;
7364
+ live?: boolean | undefined;
7365
+ } | {
7366
+ type: "reaction";
7367
+ emoji: string;
7368
+ target: Message<string, User, Space<unknown>>;
7369
+ } | {
7370
+ type: "group";
7371
+ items: Message<string, User, Space<unknown>>[];
7372
+ } | {
7373
+ type: "poll";
7374
+ title: string;
7375
+ options: {
7376
+ title: string;
7377
+ }[];
7378
+ } | {
7379
+ type: "poll_option";
7380
+ option: {
7381
+ title: string;
7382
+ };
7383
+ poll: {
7384
+ type: "poll";
7385
+ title: string;
7386
+ options: {
7387
+ title: string;
7388
+ }[];
7389
+ };
7390
+ selected: boolean;
7391
+ title: string;
7372
7392
  } | {
7373
7393
  type: "effect";
7374
7394
  content: {
@@ -7411,19 +7431,8 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7411
7431
  } | {
7412
7432
  type: "leaveSpace";
7413
7433
  }, {
7414
- type: "attachment";
7415
- id: string;
7416
- name: string;
7417
- mimeType: string;
7418
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7419
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7420
- size?: number | undefined;
7421
- } | {
7422
- type: "text";
7423
- text: string;
7424
- } | {
7425
- type: "markdown";
7426
- markdown: string;
7434
+ type: "custom";
7435
+ raw: unknown;
7427
7436
  } | {
7428
7437
  type: "contact";
7429
7438
  user?: {
@@ -7468,38 +7477,19 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7468
7477
  } | undefined;
7469
7478
  raw?: unknown;
7470
7479
  } | {
7471
- type: "custom";
7472
- raw: unknown;
7473
- } | {
7474
- type: "poll";
7475
- title: string;
7476
- options: {
7477
- title: string;
7478
- }[];
7479
- } | {
7480
- type: "poll_option";
7481
- option: {
7482
- title: string;
7483
- };
7484
- poll: {
7485
- type: "poll";
7486
- title: string;
7487
- options: {
7488
- title: string;
7489
- }[];
7490
- };
7491
- selected: boolean;
7492
- title: string;
7493
- } | {
7494
- type: "reaction";
7495
- emoji: string;
7496
- target: Message<string, User, Space<unknown>>;
7480
+ type: "attachment";
7481
+ id: string;
7482
+ name: string;
7483
+ mimeType: string;
7484
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7485
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7486
+ size?: number | undefined;
7497
7487
  } | {
7498
- type: "group";
7499
- items: Message<string, User, Space<unknown>>[];
7488
+ type: "text";
7489
+ text: string;
7500
7490
  } | {
7501
- type: "richlink";
7502
- url: string;
7491
+ type: "markdown";
7492
+ markdown: string;
7503
7493
  } | {
7504
7494
  type: "streamText";
7505
7495
  stream: () => AsyncIterable<string>;
@@ -7512,6 +7502,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7512
7502
  name?: string | undefined;
7513
7503
  duration?: number | undefined;
7514
7504
  size?: number | undefined;
7505
+ } | {
7506
+ type: "richlink";
7507
+ url: string;
7515
7508
  } | {
7516
7509
  type: "app";
7517
7510
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -7525,6 +7518,34 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7525
7518
  imageSubtitle: z.ZodOptional<z.ZodString>;
7526
7519
  summary: z.ZodOptional<z.ZodString>;
7527
7520
  }, z.core.$strip>>>;
7521
+ live?: boolean | undefined;
7522
+ } | {
7523
+ type: "reaction";
7524
+ emoji: string;
7525
+ target: Message<string, User, Space<unknown>>;
7526
+ } | {
7527
+ type: "group";
7528
+ items: Message<string, User, Space<unknown>>[];
7529
+ } | {
7530
+ type: "poll";
7531
+ title: string;
7532
+ options: {
7533
+ title: string;
7534
+ }[];
7535
+ } | {
7536
+ type: "poll_option";
7537
+ option: {
7538
+ title: string;
7539
+ };
7540
+ poll: {
7541
+ type: "poll";
7542
+ title: string;
7543
+ options: {
7544
+ title: string;
7545
+ }[];
7546
+ };
7547
+ selected: boolean;
7548
+ title: string;
7528
7549
  } | {
7529
7550
  type: "effect";
7530
7551
  content: {
@@ -7571,19 +7592,8 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7571
7592
  }, z.core.$strip>, z.ZodObject<{
7572
7593
  type: z.ZodLiteral<"edit">;
7573
7594
  content: z.ZodCustom<{
7574
- type: "attachment";
7575
- id: string;
7576
- name: string;
7577
- mimeType: string;
7578
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7579
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7580
- size?: number | undefined;
7581
- } | {
7582
- type: "text";
7583
- text: string;
7584
- } | {
7585
- type: "markdown";
7586
- markdown: string;
7595
+ type: "custom";
7596
+ raw: unknown;
7587
7597
  } | {
7588
7598
  type: "contact";
7589
7599
  user?: {
@@ -7628,38 +7638,19 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7628
7638
  } | undefined;
7629
7639
  raw?: unknown;
7630
7640
  } | {
7631
- type: "custom";
7632
- raw: unknown;
7633
- } | {
7634
- type: "poll";
7635
- title: string;
7636
- options: {
7637
- title: string;
7638
- }[];
7639
- } | {
7640
- type: "poll_option";
7641
- option: {
7642
- title: string;
7643
- };
7644
- poll: {
7645
- type: "poll";
7646
- title: string;
7647
- options: {
7648
- title: string;
7649
- }[];
7650
- };
7651
- selected: boolean;
7652
- title: string;
7653
- } | {
7654
- type: "reaction";
7655
- emoji: string;
7656
- target: Message<string, User, Space<unknown>>;
7641
+ type: "attachment";
7642
+ id: string;
7643
+ name: string;
7644
+ mimeType: string;
7645
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7646
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7647
+ size?: number | undefined;
7657
7648
  } | {
7658
- type: "group";
7659
- items: Message<string, User, Space<unknown>>[];
7649
+ type: "text";
7650
+ text: string;
7660
7651
  } | {
7661
- type: "richlink";
7662
- url: string;
7652
+ type: "markdown";
7653
+ markdown: string;
7663
7654
  } | {
7664
7655
  type: "streamText";
7665
7656
  stream: () => AsyncIterable<string>;
@@ -7672,6 +7663,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7672
7663
  name?: string | undefined;
7673
7664
  duration?: number | undefined;
7674
7665
  size?: number | undefined;
7666
+ } | {
7667
+ type: "richlink";
7668
+ url: string;
7675
7669
  } | {
7676
7670
  type: "app";
7677
7671
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -7685,6 +7679,34 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7685
7679
  imageSubtitle: z.ZodOptional<z.ZodString>;
7686
7680
  summary: z.ZodOptional<z.ZodString>;
7687
7681
  }, z.core.$strip>>>;
7682
+ live?: boolean | undefined;
7683
+ } | {
7684
+ type: "reaction";
7685
+ emoji: string;
7686
+ target: Message<string, User, Space<unknown>>;
7687
+ } | {
7688
+ type: "group";
7689
+ items: Message<string, User, Space<unknown>>[];
7690
+ } | {
7691
+ type: "poll";
7692
+ title: string;
7693
+ options: {
7694
+ title: string;
7695
+ }[];
7696
+ } | {
7697
+ type: "poll_option";
7698
+ option: {
7699
+ title: string;
7700
+ };
7701
+ poll: {
7702
+ type: "poll";
7703
+ title: string;
7704
+ options: {
7705
+ title: string;
7706
+ }[];
7707
+ };
7708
+ selected: boolean;
7709
+ title: string;
7688
7710
  } | {
7689
7711
  type: "effect";
7690
7712
  content: {
@@ -7727,19 +7749,8 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7727
7749
  } | {
7728
7750
  type: "leaveSpace";
7729
7751
  }, {
7730
- type: "attachment";
7731
- id: string;
7732
- name: string;
7733
- mimeType: string;
7734
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7735
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7736
- size?: number | undefined;
7737
- } | {
7738
- type: "text";
7739
- text: string;
7740
- } | {
7741
- type: "markdown";
7742
- markdown: string;
7752
+ type: "custom";
7753
+ raw: unknown;
7743
7754
  } | {
7744
7755
  type: "contact";
7745
7756
  user?: {
@@ -7784,38 +7795,19 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7784
7795
  } | undefined;
7785
7796
  raw?: unknown;
7786
7797
  } | {
7787
- type: "custom";
7788
- raw: unknown;
7789
- } | {
7790
- type: "poll";
7791
- title: string;
7792
- options: {
7793
- title: string;
7794
- }[];
7795
- } | {
7796
- type: "poll_option";
7797
- option: {
7798
- title: string;
7799
- };
7800
- poll: {
7801
- type: "poll";
7802
- title: string;
7803
- options: {
7804
- title: string;
7805
- }[];
7806
- };
7807
- selected: boolean;
7808
- title: string;
7809
- } | {
7810
- type: "reaction";
7811
- emoji: string;
7812
- target: Message<string, User, Space<unknown>>;
7798
+ type: "attachment";
7799
+ id: string;
7800
+ name: string;
7801
+ mimeType: string;
7802
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7803
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7804
+ size?: number | undefined;
7813
7805
  } | {
7814
- type: "group";
7815
- items: Message<string, User, Space<unknown>>[];
7806
+ type: "text";
7807
+ text: string;
7816
7808
  } | {
7817
- type: "richlink";
7818
- url: string;
7809
+ type: "markdown";
7810
+ markdown: string;
7819
7811
  } | {
7820
7812
  type: "streamText";
7821
7813
  stream: () => AsyncIterable<string>;
@@ -7828,6 +7820,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7828
7820
  name?: string | undefined;
7829
7821
  duration?: number | undefined;
7830
7822
  size?: number | undefined;
7823
+ } | {
7824
+ type: "richlink";
7825
+ url: string;
7831
7826
  } | {
7832
7827
  type: "app";
7833
7828
  url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
@@ -7841,6 +7836,34 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7841
7836
  imageSubtitle: z.ZodOptional<z.ZodString>;
7842
7837
  summary: z.ZodOptional<z.ZodString>;
7843
7838
  }, z.core.$strip>>>;
7839
+ live?: boolean | undefined;
7840
+ } | {
7841
+ type: "reaction";
7842
+ emoji: string;
7843
+ target: Message<string, User, Space<unknown>>;
7844
+ } | {
7845
+ type: "group";
7846
+ items: Message<string, User, Space<unknown>>[];
7847
+ } | {
7848
+ type: "poll";
7849
+ title: string;
7850
+ options: {
7851
+ title: string;
7852
+ }[];
7853
+ } | {
7854
+ type: "poll_option";
7855
+ option: {
7856
+ title: string;
7857
+ };
7858
+ poll: {
7859
+ type: "poll";
7860
+ title: string;
7861
+ options: {
7862
+ title: string;
7863
+ }[];
7864
+ };
7865
+ selected: boolean;
7866
+ title: string;
7844
7867
  } | {
7845
7868
  type: "effect";
7846
7869
  content: {
@@ -7923,4 +7946,4 @@ declare function attachment(input: AttachmentInput, options?: {
7923
7946
  name?: string;
7924
7947
  }): ContentBuilder;
7925
7948
  //#endregion
7926
- export { DedicatedTokenData as $, TextStreamOptions as $t, isFusorEvent as A, ContactName as An, asReply as At, PlatformUser as B, avatar as Bn, PollChoice as Bt, FusorVerify as C, asCustom as Cn, asText as Ct, WebhookRawResult as D, ContactDetails as Dn, richlink as Dt, WebhookRawRequest as E, ContactAddress as En, asRichlink as Et, PlatformInstance as F, AgentSender as Fn, renameSchema as Ft, SpaceNamespace as G, App as Gn, option as Gt, ProviderMessageRecord as H, PhotoInput as Hn, PollOption as Ht, PlatformMessage as I, User as In, Read as It, broadcast as J, app as Jn, asMarkdown as Jt, Broadcaster as K, AppLayout as Kn, poll as Kt, PlatformProviderConfig as L, Avatar as Ln, asRead as Lt, EventProducer as M, ContactPhone as Mn, replySchema as Mt, Platform as N, asContact as Nn, Rename as Nt, FusorEvent as O, ContactEmail as On, resolveContents as Ot, PlatformDef as P, contact as Pn, rename as Pt, CloudPlatform as Q, StreamTextSource as Qt, PlatformRuntime as R, AvatarData as Rn, read as Rt, FusorRespond as S, reactionSchema as Sn, typing as St, WebhookHandler as T, Contact as Tn, Richlink as Tt, ProviderUserRecord as U, buildPhotoAction as Un, asPoll as Ut, ProviderMessage as V, avatarSchema as Vn, PollChoiceInput as Vt, SchemaMessage as W, photoActionSchema as Wn, asPollOption as Wt, stream as X, DeltaExtractor as Xt, mergeStreams as Y, appLayoutSchema as Yn, markdown as Yt, Store as Z, StreamText as Zt, FusorClient as _, removeMemberSchema as _n, asVoice as _t, Content as a, edit as an, ProjectProfile as at, FusorMessagesReturn as b, asReaction as bn, unsend as bt, fromVCard as c, AddMember as cn, SlackTokenData as ct, UnsupportedKind as d, RemoveMember as dn, SubscriptionStatus as dt, Group as en, FusorTokenData as et, Spectrum as f, addMember as fn, TokenData as ft, isFusorClient as g, removeMember as gn, Voice as gt, fusor as h, leaveSpaceSchema as hn, EmojiKey as ht, attachment as i, Edit as in, ProjectData as it, AnyPlatformDef as j, ContactOrg as jn, reply as jt, fusorEvent as k, ContactInput as kn, Reply as kt, toVCard as l, LeaveSpace as ln, SpectrumCloudError as lt, definePlatform as m, leaveSpace as mn, Emoji as mt, AttachmentInput as n, group as nn, PlatformStatus as nt, ContentBuilder as o, Message as on, SharedTokenData as ot, SpectrumInstance as p, addMemberSchema as pn, cloud as pt, ManagedStream as q, AppUrl as qn, Markdown as qt, asAttachment as r, groupSchema as rn, PlatformsData as rt, ContentInput as s, Space as sn, SlackTeamMeta as st, Attachment as t, asGroup as tn, ImessageInfoData as tt, UnsupportedError as u, MemberInput as un, SubscriptionData as ut, FusorMessages as v, Reaction as vn, voice as vt, FusorVerifyRequest as w, custom as wn, text as wt, FusorReply as x, reaction as xn, Typing as xt, FusorMessagesCtx as y, ReactionBuilder as yn, Unsend as yt, PlatformSpace as z, AvatarInput as zn, Poll as zt };
7949
+ export { DedicatedTokenData as $, TextStreamOptions as $t, isFusorEvent as A, ContactName as An, asReply as At, PlatformUser as B, avatar as Bn, PollChoice as Bt, FusorVerify as C, asCustom as Cn, asText as Ct, WebhookRawResult as D, ContactDetails as Dn, richlink as Dt, WebhookRawRequest as E, ContactAddress as En, asRichlink as Et, PlatformInstance as F, AgentSender as Fn, renameSchema as Ft, SpaceNamespace as G, App as Gn, option as Gt, ProviderMessageRecord as H, PhotoInput as Hn, PollOption as Ht, PlatformMessage as I, User as In, Read as It, broadcast as J, AppUrl as Jn, asMarkdown as Jt, Broadcaster as K, AppLayout as Kn, poll as Kt, PlatformProviderConfig as L, Avatar as Ln, asRead as Lt, EventProducer as M, ContactPhone as Mn, replySchema as Mt, Platform as N, asContact as Nn, Rename as Nt, FusorEvent as O, ContactEmail as On, resolveContents as Ot, PlatformDef as P, contact as Pn, rename as Pt, CloudPlatform as Q, StreamTextSource as Qt, PlatformRuntime as R, AvatarData as Rn, read as Rt, FusorRespond as S, reactionSchema as Sn, typing as St, WebhookHandler as T, Contact as Tn, Richlink as Tt, ProviderUserRecord as U, buildPhotoAction as Un, asPoll as Ut, ProviderMessage as V, avatarSchema as Vn, PollChoiceInput as Vt, SchemaMessage as W, photoActionSchema as Wn, asPollOption as Wt, stream as X, appLayoutSchema as Xn, DeltaExtractor as Xt, mergeStreams as Y, app as Yn, markdown as Yt, Store as Z, StreamText as Zt, FusorClient as _, removeMemberSchema as _n, asVoice as _t, Content as a, edit as an, ProjectProfile as at, FusorMessagesReturn as b, asReaction as bn, unsend as bt, fromVCard as c, AddMember as cn, SlackTokenData as ct, UnsupportedKind as d, RemoveMember as dn, SubscriptionStatus as dt, Group as en, FusorTokenData as et, Spectrum as f, addMember as fn, TokenData as ft, isFusorClient as g, removeMember as gn, Voice as gt, fusor as h, leaveSpaceSchema as hn, EmojiKey as ht, attachment as i, Edit as in, ProjectData as it, AnyPlatformDef as j, ContactOrg as jn, reply as jt, fusorEvent as k, ContactInput as kn, Reply as kt, toVCard as l, LeaveSpace as ln, SpectrumCloudError as lt, definePlatform as m, leaveSpace as mn, Emoji as mt, AttachmentInput as n, group as nn, PlatformStatus as nt, ContentBuilder as o, Message as on, SharedTokenData as ot, SpectrumInstance as p, addMemberSchema as pn, cloud as pt, ManagedStream as q, AppOptions as qn, Markdown as qt, asAttachment as r, groupSchema as rn, PlatformsData as rt, ContentInput as s, Space as sn, SlackTeamMeta as st, Attachment as t, asGroup as tn, ImessageInfoData as tt, UnsupportedError as u, MemberInput as un, SubscriptionData as ut, FusorMessages as v, Reaction as vn, voice as vt, FusorVerifyRequest as w, custom as wn, text as wt, FusorReply as x, reaction as xn, Typing as xt, FusorMessagesCtx as y, ReactionBuilder as yn, Unsend as yt, PlatformSpace as z, AvatarInput as zn, Poll as zt };