@spectrum-ts/core 12.1.0 → 12.3.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.
@@ -592,6 +592,23 @@ interface Message<TPlatform extends string = string, TSender extends User = User
592
592
  declare const editSchema: z.ZodObject<{
593
593
  type: z.ZodLiteral<"edit">;
594
594
  content: z.ZodCustom<{
595
+ type: "attachment";
596
+ id: string;
597
+ name: string;
598
+ mimeType: string;
599
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
600
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
601
+ size?: number | undefined;
602
+ } | {
603
+ type: "text";
604
+ text: string;
605
+ } | {
606
+ type: "markdown";
607
+ markdown: string;
608
+ } | {
609
+ type: "group";
610
+ items: Message<string, User, Space<unknown>>[];
611
+ } | {
595
612
  type: "contact";
596
613
  user?: {
597
614
  __platform: string;
@@ -634,17 +651,13 @@ declare const editSchema: z.ZodObject<{
634
651
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
635
652
  } | undefined;
636
653
  raw?: unknown;
637
- } | {
638
- type: "attachment";
639
- id: string;
640
- name: string;
641
- mimeType: string;
642
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
643
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
644
- size?: number | undefined;
645
654
  } | {
646
655
  type: "custom";
647
656
  raw: unknown;
657
+ } | {
658
+ type: "streamText";
659
+ stream: () => AsyncIterable<string>;
660
+ format?: "markdown" | "plain" | undefined;
648
661
  } | {
649
662
  type: "voice";
650
663
  mimeType: string;
@@ -654,16 +667,6 @@ declare const editSchema: z.ZodObject<{
654
667
  name?: string | undefined;
655
668
  duration?: number | undefined;
656
669
  size?: number | undefined;
657
- } | {
658
- type: "text";
659
- text: string;
660
- } | {
661
- type: "markdown";
662
- markdown: string;
663
- } | {
664
- type: "streamText";
665
- stream: () => AsyncIterable<string>;
666
- format?: "markdown" | "plain" | undefined;
667
670
  } | {
668
671
  type: "richlink";
669
672
  url: string;
@@ -685,9 +688,6 @@ declare const editSchema: z.ZodObject<{
685
688
  type: "reaction";
686
689
  emoji: string;
687
690
  target: Message<string, User, Space<unknown>>;
688
- } | {
689
- type: "group";
690
- items: Message<string, User, Space<unknown>>[];
691
691
  } | {
692
692
  type: "poll";
693
693
  title: string;
@@ -750,6 +750,23 @@ declare const editSchema: z.ZodObject<{
750
750
  } | {
751
751
  type: "leaveSpace";
752
752
  }, {
753
+ type: "attachment";
754
+ id: string;
755
+ name: string;
756
+ mimeType: string;
757
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
758
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
759
+ size?: number | undefined;
760
+ } | {
761
+ type: "text";
762
+ text: string;
763
+ } | {
764
+ type: "markdown";
765
+ markdown: string;
766
+ } | {
767
+ type: "group";
768
+ items: Message<string, User, Space<unknown>>[];
769
+ } | {
753
770
  type: "contact";
754
771
  user?: {
755
772
  __platform: string;
@@ -792,17 +809,13 @@ declare const editSchema: z.ZodObject<{
792
809
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
793
810
  } | undefined;
794
811
  raw?: unknown;
795
- } | {
796
- type: "attachment";
797
- id: string;
798
- name: string;
799
- mimeType: string;
800
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
801
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
802
- size?: number | undefined;
803
812
  } | {
804
813
  type: "custom";
805
814
  raw: unknown;
815
+ } | {
816
+ type: "streamText";
817
+ stream: () => AsyncIterable<string>;
818
+ format?: "markdown" | "plain" | undefined;
806
819
  } | {
807
820
  type: "voice";
808
821
  mimeType: string;
@@ -812,16 +825,6 @@ declare const editSchema: z.ZodObject<{
812
825
  name?: string | undefined;
813
826
  duration?: number | undefined;
814
827
  size?: number | undefined;
815
- } | {
816
- type: "text";
817
- text: string;
818
- } | {
819
- type: "markdown";
820
- markdown: string;
821
- } | {
822
- type: "streamText";
823
- stream: () => AsyncIterable<string>;
824
- format?: "markdown" | "plain" | undefined;
825
828
  } | {
826
829
  type: "richlink";
827
830
  url: string;
@@ -843,9 +846,6 @@ declare const editSchema: z.ZodObject<{
843
846
  type: "reaction";
844
847
  emoji: string;
845
848
  target: Message<string, User, Space<unknown>>;
846
- } | {
847
- type: "group";
848
- items: Message<string, User, Space<unknown>>[];
849
849
  } | {
850
850
  type: "poll";
851
851
  title: string;
@@ -1138,6 +1138,23 @@ declare function rename(displayName: string): ContentBuilder;
1138
1138
  declare const replySchema: z.ZodObject<{
1139
1139
  type: z.ZodLiteral<"reply">;
1140
1140
  content: z.ZodCustom<{
1141
+ type: "attachment";
1142
+ id: string;
1143
+ name: string;
1144
+ mimeType: string;
1145
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1146
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1147
+ size?: number | undefined;
1148
+ } | {
1149
+ type: "text";
1150
+ text: string;
1151
+ } | {
1152
+ type: "markdown";
1153
+ markdown: string;
1154
+ } | {
1155
+ type: "group";
1156
+ items: Message<string, User, Space<unknown>>[];
1157
+ } | {
1141
1158
  type: "contact";
1142
1159
  user?: {
1143
1160
  __platform: string;
@@ -1180,17 +1197,13 @@ declare const replySchema: z.ZodObject<{
1180
1197
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1181
1198
  } | undefined;
1182
1199
  raw?: unknown;
1183
- } | {
1184
- type: "attachment";
1185
- id: string;
1186
- name: string;
1187
- mimeType: string;
1188
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1189
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1190
- size?: number | undefined;
1191
1200
  } | {
1192
1201
  type: "custom";
1193
1202
  raw: unknown;
1203
+ } | {
1204
+ type: "streamText";
1205
+ stream: () => AsyncIterable<string>;
1206
+ format?: "markdown" | "plain" | undefined;
1194
1207
  } | {
1195
1208
  type: "voice";
1196
1209
  mimeType: string;
@@ -1200,16 +1213,6 @@ declare const replySchema: z.ZodObject<{
1200
1213
  name?: string | undefined;
1201
1214
  duration?: number | undefined;
1202
1215
  size?: number | undefined;
1203
- } | {
1204
- type: "text";
1205
- text: string;
1206
- } | {
1207
- type: "markdown";
1208
- markdown: string;
1209
- } | {
1210
- type: "streamText";
1211
- stream: () => AsyncIterable<string>;
1212
- format?: "markdown" | "plain" | undefined;
1213
1216
  } | {
1214
1217
  type: "richlink";
1215
1218
  url: string;
@@ -1231,9 +1234,6 @@ declare const replySchema: z.ZodObject<{
1231
1234
  type: "reaction";
1232
1235
  emoji: string;
1233
1236
  target: Message<string, User, Space<unknown>>;
1234
- } | {
1235
- type: "group";
1236
- items: Message<string, User, Space<unknown>>[];
1237
1237
  } | {
1238
1238
  type: "poll";
1239
1239
  title: string;
@@ -1296,6 +1296,23 @@ declare const replySchema: z.ZodObject<{
1296
1296
  } | {
1297
1297
  type: "leaveSpace";
1298
1298
  }, {
1299
+ type: "attachment";
1300
+ id: string;
1301
+ name: string;
1302
+ mimeType: string;
1303
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1304
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
1305
+ size?: number | undefined;
1306
+ } | {
1307
+ type: "text";
1308
+ text: string;
1309
+ } | {
1310
+ type: "markdown";
1311
+ markdown: string;
1312
+ } | {
1313
+ type: "group";
1314
+ items: Message<string, User, Space<unknown>>[];
1315
+ } | {
1299
1316
  type: "contact";
1300
1317
  user?: {
1301
1318
  __platform: string;
@@ -1338,17 +1355,13 @@ declare const replySchema: z.ZodObject<{
1338
1355
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
1339
1356
  } | undefined;
1340
1357
  raw?: unknown;
1341
- } | {
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;
1349
1358
  } | {
1350
1359
  type: "custom";
1351
1360
  raw: unknown;
1361
+ } | {
1362
+ type: "streamText";
1363
+ stream: () => AsyncIterable<string>;
1364
+ format?: "markdown" | "plain" | undefined;
1352
1365
  } | {
1353
1366
  type: "voice";
1354
1367
  mimeType: string;
@@ -1358,16 +1371,6 @@ declare const replySchema: z.ZodObject<{
1358
1371
  name?: string | undefined;
1359
1372
  duration?: number | undefined;
1360
1373
  size?: number | undefined;
1361
- } | {
1362
- type: "text";
1363
- text: string;
1364
- } | {
1365
- type: "markdown";
1366
- markdown: string;
1367
- } | {
1368
- type: "streamText";
1369
- stream: () => AsyncIterable<string>;
1370
- format?: "markdown" | "plain" | undefined;
1371
1374
  } | {
1372
1375
  type: "richlink";
1373
1376
  url: string;
@@ -1389,9 +1392,6 @@ declare const replySchema: z.ZodObject<{
1389
1392
  type: "reaction";
1390
1393
  emoji: string;
1391
1394
  target: Message<string, User, Space<unknown>>;
1392
- } | {
1393
- type: "group";
1394
- items: Message<string, User, Space<unknown>>[];
1395
1395
  } | {
1396
1396
  type: "poll";
1397
1397
  title: string;
@@ -6874,10 +6874,10 @@ interface SpectrumOptions {
6874
6874
  flattenGroups?: boolean;
6875
6875
  /**
6876
6876
  * Minimum severity emitted by the SDK's structured logger (to both the
6877
- * console and, when telemetry is on, OTLP). Applies process-wide. The
6878
- * `LOG_LEVEL` environment variable still takes precedence.
6877
+ * console and, when telemetry is on, OTLP). Applies process-wide and takes
6878
+ * precedence over the `LOG_LEVEL` environment variable when provided.
6879
6879
  *
6880
- * @default "debug" in development, "info" otherwise (via `DEPLOYMENT_ENV`)
6880
+ * @default "info"
6881
6881
  */
6882
6882
  logLevel?: LogLevel;
6883
6883
  }
@@ -7283,6 +7283,23 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7283
7283
  }, z.core.$strip>, z.ZodObject<{
7284
7284
  type: z.ZodLiteral<"reply">;
7285
7285
  content: z.ZodCustom<{
7286
+ type: "attachment";
7287
+ id: string;
7288
+ name: string;
7289
+ mimeType: string;
7290
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7291
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7292
+ size?: number | undefined;
7293
+ } | {
7294
+ type: "text";
7295
+ text: string;
7296
+ } | {
7297
+ type: "markdown";
7298
+ markdown: string;
7299
+ } | {
7300
+ type: "group";
7301
+ items: Message<string, User, Space<unknown>>[];
7302
+ } | {
7286
7303
  type: "contact";
7287
7304
  user?: {
7288
7305
  __platform: string;
@@ -7325,17 +7342,13 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7325
7342
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7326
7343
  } | undefined;
7327
7344
  raw?: unknown;
7328
- } | {
7329
- type: "attachment";
7330
- id: string;
7331
- name: string;
7332
- mimeType: string;
7333
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7334
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7335
- size?: number | undefined;
7336
7345
  } | {
7337
7346
  type: "custom";
7338
7347
  raw: unknown;
7348
+ } | {
7349
+ type: "streamText";
7350
+ stream: () => AsyncIterable<string>;
7351
+ format?: "markdown" | "plain" | undefined;
7339
7352
  } | {
7340
7353
  type: "voice";
7341
7354
  mimeType: string;
@@ -7345,16 +7358,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7345
7358
  name?: string | undefined;
7346
7359
  duration?: number | undefined;
7347
7360
  size?: number | undefined;
7348
- } | {
7349
- type: "text";
7350
- text: string;
7351
- } | {
7352
- type: "markdown";
7353
- markdown: string;
7354
- } | {
7355
- type: "streamText";
7356
- stream: () => AsyncIterable<string>;
7357
- format?: "markdown" | "plain" | undefined;
7358
7361
  } | {
7359
7362
  type: "richlink";
7360
7363
  url: string;
@@ -7376,9 +7379,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7376
7379
  type: "reaction";
7377
7380
  emoji: string;
7378
7381
  target: Message<string, User, Space<unknown>>;
7379
- } | {
7380
- type: "group";
7381
- items: Message<string, User, Space<unknown>>[];
7382
7382
  } | {
7383
7383
  type: "poll";
7384
7384
  title: string;
@@ -7441,6 +7441,23 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7441
7441
  } | {
7442
7442
  type: "leaveSpace";
7443
7443
  }, {
7444
+ type: "attachment";
7445
+ id: string;
7446
+ name: string;
7447
+ mimeType: string;
7448
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7449
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7450
+ size?: number | undefined;
7451
+ } | {
7452
+ type: "text";
7453
+ text: string;
7454
+ } | {
7455
+ type: "markdown";
7456
+ markdown: string;
7457
+ } | {
7458
+ type: "group";
7459
+ items: Message<string, User, Space<unknown>>[];
7460
+ } | {
7444
7461
  type: "contact";
7445
7462
  user?: {
7446
7463
  __platform: string;
@@ -7483,17 +7500,13 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7483
7500
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7484
7501
  } | undefined;
7485
7502
  raw?: unknown;
7486
- } | {
7487
- type: "attachment";
7488
- id: string;
7489
- name: string;
7490
- mimeType: string;
7491
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7492
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7493
- size?: number | undefined;
7494
7503
  } | {
7495
7504
  type: "custom";
7496
7505
  raw: unknown;
7506
+ } | {
7507
+ type: "streamText";
7508
+ stream: () => AsyncIterable<string>;
7509
+ format?: "markdown" | "plain" | undefined;
7497
7510
  } | {
7498
7511
  type: "voice";
7499
7512
  mimeType: string;
@@ -7503,16 +7516,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7503
7516
  name?: string | undefined;
7504
7517
  duration?: number | undefined;
7505
7518
  size?: number | undefined;
7506
- } | {
7507
- type: "text";
7508
- text: string;
7509
- } | {
7510
- type: "markdown";
7511
- markdown: string;
7512
- } | {
7513
- type: "streamText";
7514
- stream: () => AsyncIterable<string>;
7515
- format?: "markdown" | "plain" | undefined;
7516
7519
  } | {
7517
7520
  type: "richlink";
7518
7521
  url: string;
@@ -7534,9 +7537,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7534
7537
  type: "reaction";
7535
7538
  emoji: string;
7536
7539
  target: Message<string, User, Space<unknown>>;
7537
- } | {
7538
- type: "group";
7539
- items: Message<string, User, Space<unknown>>[];
7540
7540
  } | {
7541
7541
  type: "poll";
7542
7542
  title: string;
@@ -7603,6 +7603,23 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7603
7603
  }, z.core.$strip>, z.ZodObject<{
7604
7604
  type: z.ZodLiteral<"edit">;
7605
7605
  content: z.ZodCustom<{
7606
+ type: "attachment";
7607
+ id: string;
7608
+ name: string;
7609
+ mimeType: string;
7610
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7611
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7612
+ size?: number | undefined;
7613
+ } | {
7614
+ type: "text";
7615
+ text: string;
7616
+ } | {
7617
+ type: "markdown";
7618
+ markdown: string;
7619
+ } | {
7620
+ type: "group";
7621
+ items: Message<string, User, Space<unknown>>[];
7622
+ } | {
7606
7623
  type: "contact";
7607
7624
  user?: {
7608
7625
  __platform: string;
@@ -7645,17 +7662,13 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7645
7662
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7646
7663
  } | undefined;
7647
7664
  raw?: unknown;
7648
- } | {
7649
- type: "attachment";
7650
- id: string;
7651
- name: string;
7652
- mimeType: string;
7653
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7654
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7655
- size?: number | undefined;
7656
7665
  } | {
7657
7666
  type: "custom";
7658
7667
  raw: unknown;
7668
+ } | {
7669
+ type: "streamText";
7670
+ stream: () => AsyncIterable<string>;
7671
+ format?: "markdown" | "plain" | undefined;
7659
7672
  } | {
7660
7673
  type: "voice";
7661
7674
  mimeType: string;
@@ -7665,16 +7678,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7665
7678
  name?: string | undefined;
7666
7679
  duration?: number | undefined;
7667
7680
  size?: number | undefined;
7668
- } | {
7669
- type: "text";
7670
- text: string;
7671
- } | {
7672
- type: "markdown";
7673
- markdown: string;
7674
- } | {
7675
- type: "streamText";
7676
- stream: () => AsyncIterable<string>;
7677
- format?: "markdown" | "plain" | undefined;
7678
7681
  } | {
7679
7682
  type: "richlink";
7680
7683
  url: string;
@@ -7696,9 +7699,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7696
7699
  type: "reaction";
7697
7700
  emoji: string;
7698
7701
  target: Message<string, User, Space<unknown>>;
7699
- } | {
7700
- type: "group";
7701
- items: Message<string, User, Space<unknown>>[];
7702
7702
  } | {
7703
7703
  type: "poll";
7704
7704
  title: string;
@@ -7761,6 +7761,23 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7761
7761
  } | {
7762
7762
  type: "leaveSpace";
7763
7763
  }, {
7764
+ type: "attachment";
7765
+ id: string;
7766
+ name: string;
7767
+ mimeType: string;
7768
+ read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7769
+ stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7770
+ size?: number | undefined;
7771
+ } | {
7772
+ type: "text";
7773
+ text: string;
7774
+ } | {
7775
+ type: "markdown";
7776
+ markdown: string;
7777
+ } | {
7778
+ type: "group";
7779
+ items: Message<string, User, Space<unknown>>[];
7780
+ } | {
7764
7781
  type: "contact";
7765
7782
  user?: {
7766
7783
  __platform: string;
@@ -7803,17 +7820,13 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7803
7820
  read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7804
7821
  } | undefined;
7805
7822
  raw?: unknown;
7806
- } | {
7807
- type: "attachment";
7808
- id: string;
7809
- name: string;
7810
- mimeType: string;
7811
- read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
7812
- stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
7813
- size?: number | undefined;
7814
7823
  } | {
7815
7824
  type: "custom";
7816
7825
  raw: unknown;
7826
+ } | {
7827
+ type: "streamText";
7828
+ stream: () => AsyncIterable<string>;
7829
+ format?: "markdown" | "plain" | undefined;
7817
7830
  } | {
7818
7831
  type: "voice";
7819
7832
  mimeType: string;
@@ -7823,16 +7836,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7823
7836
  name?: string | undefined;
7824
7837
  duration?: number | undefined;
7825
7838
  size?: number | undefined;
7826
- } | {
7827
- type: "text";
7828
- text: string;
7829
- } | {
7830
- type: "markdown";
7831
- markdown: string;
7832
- } | {
7833
- type: "streamText";
7834
- stream: () => AsyncIterable<string>;
7835
- format?: "markdown" | "plain" | undefined;
7836
7839
  } | {
7837
7840
  type: "richlink";
7838
7841
  url: string;
@@ -7854,9 +7857,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7854
7857
  type: "reaction";
7855
7858
  emoji: string;
7856
7859
  target: Message<string, User, Space<unknown>>;
7857
- } | {
7858
- type: "group";
7859
- items: Message<string, User, Space<unknown>>[];
7860
7860
  } | {
7861
7861
  type: "poll";
7862
7862
  title: string;
@@ -1,4 +1,4 @@
1
- import { Cn as reactionSchema, Dt as asRichlink, Gn as photoActionSchema, Gt as asPollOption, H as ProviderMessageRecord, Hn as avatarSchema, It as renameSchema, Nt as replySchema, Pn as asContact, Rt as asRead, U as ProviderUserRecord, Un as PhotoInput, Wn as buildPhotoAction, Wt as asPoll, Yt as asMarkdown, _t as asVoice, bt as asUnsend, gn as leaveSpaceSchema, in as groupSchema, jt as asReply, mn as addMemberSchema, nn as asGroup, q as ManagedStream, r as asAttachment, vn as removeMemberSchema, wn as asCustom, wt as asText, xn as asReaction } from "./attachment-CbNQEDfL.js";
1
+ import { Cn as reactionSchema, Dt as asRichlink, Gn as photoActionSchema, Gt as asPollOption, H as ProviderMessageRecord, Hn as avatarSchema, It as renameSchema, Nt as replySchema, Pn as asContact, Rt as asRead, U as ProviderUserRecord, Un as PhotoInput, Wn as buildPhotoAction, Wt as asPoll, Yt as asMarkdown, _t as asVoice, bt as asUnsend, gn as leaveSpaceSchema, in as groupSchema, jt as asReply, mn as addMemberSchema, nn as asGroup, q as ManagedStream, r as asAttachment, vn as removeMemberSchema, wn as asCustom, wt as asText, xn as asReaction } from "./attachment-X4ELx4B2.js";
2
2
  import z from "zod";
3
3
  import { FetchSpanOptions, LogAttrs, LogAttrs as LogAttrs$1, LogLevel, PhotonLogger, SanitizeUrlOptions, createLogger, sanitizeEmail, sanitizeErrorMessage, sanitizePhone, sanitizeUrl, setLogLevel } from "@photon-ai/otel";
4
4
  import { Token } from "marked";
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as DedicatedTokenData, $t as StreamTextSource, A as isFusorEvent, An as ContactInput, At as Reply, B as PlatformUser, Bn as AvatarInput, Bt as Poll, C as FusorVerify, Ct as typing, D as WebhookRawResult, Dn as ContactAddress, E as WebhookRawRequest, En as Contact, Et as Richlink, F as PlatformInstance, Fn as contact, Ft as rename, G as SpaceNamespace, Ht as PollChoiceInput, I as PlatformMessage, In as AgentSender, J as broadcast, Jn as AppOptions, Jt as Markdown, K as Broadcaster, Kn as App, Kt as option, L as PlatformProviderConfig, Ln as User, Lt as Read, M as EventProducer, Mn as ContactOrg, Mt as reply, N as Platform, Nn as ContactPhone, O as FusorEvent, On as ContactDetails, Ot as richlink, P as PlatformDef, Pt as Rename, Q as CloudPlatform, Qt as StreamText, R as PlatformRuntime, Rn as Avatar, S as FusorRespond, Sn as reaction, St as Typing, T as WebhookHandler, Tn as custom, Tt as text, Ut as PollOption, V as ProviderMessage, Vn as avatar, Vt as PollChoice, W as SchemaMessage, X as stream, Xn as app, Xt as markdown, Y as mergeStreams, Yn as AppUrl, Z as Store, Zn as appLayoutSchema, Zt as DeltaExtractor, _ as FusorClient, _n as removeMember, a as Content, an as Edit, at as ProjectProfile, b as FusorMessagesReturn, bn as ReactionBuilder, c as fromVCard, cn as Space, ct as SlackTokenData, d as UnsupportedKind, dn as MemberInput, dt as SubscriptionStatus, en as TextStreamOptions, et as FusorTokenData, f as Spectrum, fn as RemoveMember, ft as TokenData, g as isFusorClient, gt as Voice, h as fusor, hn as leaveSpace, ht as EmojiKey, i as attachment, it as ProjectData, j as AnyPlatformDef, jn as ContactName, k as fusorEvent, kn as ContactEmail, kt as resolveContents, l as toVCard, ln as AddMember, lt as SpectrumCloudError, m as definePlatform, mt as Emoji, n as AttachmentInput, nt as PlatformStatus, o as ContentBuilder, on as edit, ot as SharedTokenData, p as SpectrumInstance, pn as addMember, pt as cloud, q as ManagedStream, qn as AppLayout, qt as poll, rn as group, rt as PlatformsData, s as ContentInput, sn as Message, st as SlackTeamMeta, t as Attachment, tn as Group, tt as ImessageInfoData, u as UnsupportedError, un as LeaveSpace, ut as SubscriptionData, v as FusorMessages, vt as voice, w as FusorVerifyRequest, x as FusorReply, xt as unsend, y as FusorMessagesCtx, yn as Reaction, yt as Unsend, z as PlatformSpace, zn as AvatarData, zt as read } from "./attachment-CbNQEDfL.js";
1
+ import { $ as DedicatedTokenData, $t as StreamTextSource, A as isFusorEvent, An as ContactInput, At as Reply, B as PlatformUser, Bn as AvatarInput, Bt as Poll, C as FusorVerify, Ct as typing, D as WebhookRawResult, Dn as ContactAddress, E as WebhookRawRequest, En as Contact, Et as Richlink, F as PlatformInstance, Fn as contact, Ft as rename, G as SpaceNamespace, Ht as PollChoiceInput, I as PlatformMessage, In as AgentSender, J as broadcast, Jn as AppOptions, Jt as Markdown, K as Broadcaster, Kn as App, Kt as option, L as PlatformProviderConfig, Ln as User, Lt as Read, M as EventProducer, Mn as ContactOrg, Mt as reply, N as Platform, Nn as ContactPhone, O as FusorEvent, On as ContactDetails, Ot as richlink, P as PlatformDef, Pt as Rename, Q as CloudPlatform, Qt as StreamText, R as PlatformRuntime, Rn as Avatar, S as FusorRespond, Sn as reaction, St as Typing, T as WebhookHandler, Tn as custom, Tt as text, Ut as PollOption, V as ProviderMessage, Vn as avatar, Vt as PollChoice, W as SchemaMessage, X as stream, Xn as app, Xt as markdown, Y as mergeStreams, Yn as AppUrl, Z as Store, Zn as appLayoutSchema, Zt as DeltaExtractor, _ as FusorClient, _n as removeMember, a as Content, an as Edit, at as ProjectProfile, b as FusorMessagesReturn, bn as ReactionBuilder, c as fromVCard, cn as Space, ct as SlackTokenData, d as UnsupportedKind, dn as MemberInput, dt as SubscriptionStatus, en as TextStreamOptions, et as FusorTokenData, f as Spectrum, fn as RemoveMember, ft as TokenData, g as isFusorClient, gt as Voice, h as fusor, hn as leaveSpace, ht as EmojiKey, i as attachment, it as ProjectData, j as AnyPlatformDef, jn as ContactName, k as fusorEvent, kn as ContactEmail, kt as resolveContents, l as toVCard, ln as AddMember, lt as SpectrumCloudError, m as definePlatform, mt as Emoji, n as AttachmentInput, nt as PlatformStatus, o as ContentBuilder, on as edit, ot as SharedTokenData, p as SpectrumInstance, pn as addMember, pt as cloud, q as ManagedStream, qn as AppLayout, qt as poll, rn as group, rt as PlatformsData, s as ContentInput, sn as Message, st as SlackTeamMeta, t as Attachment, tn as Group, tt as ImessageInfoData, u as UnsupportedError, un as LeaveSpace, ut as SubscriptionData, v as FusorMessages, vt as voice, w as FusorVerifyRequest, x as FusorReply, xt as unsend, y as FusorMessagesCtx, yn as Reaction, yt as Unsend, z as PlatformSpace, zn as AvatarData, zt as read } from "./attachment-X4ELx4B2.js";
2
2
  export { type AddMember, type AgentSender, type AnyPlatformDef, type App, type AppLayout, type AppOptions, type AppUrl, type Attachment, type AttachmentInput, type Avatar, type AvatarData, 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 LeaveSpace, type ManagedStream, type Markdown, type MemberInput, 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 RemoveMember, 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, addMember, app, appLayoutSchema, attachment, avatar, broadcast, cloud, contact, custom, definePlatform, edit, fromVCard, fusor, fusorEvent, group, isFusorClient, isFusorEvent, leaveSpace, markdown, mergeStreams, option, poll, reaction, read, removeMember, rename, reply, resolveContents, richlink, stream, text, toVCard, typing, unsend, voice };
package/dist/index.js CHANGED
@@ -3011,7 +3011,7 @@ function definePlatform(platformId, rawDef) {
3011
3011
  }
3012
3012
  //#endregion
3013
3013
  //#region src/build-env.ts
3014
- const SPECTRUM_SDK_VERSION = "12.1.0";
3014
+ const SPECTRUM_SDK_VERSION = "12.3.0";
3015
3015
  //#endregion
3016
3016
  //#region src/utils/provider-packages.ts
3017
3017
  const OFFICIAL_PROVIDER_PACKAGES = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-ts/core",
3
- "version": "12.1.0",
3
+ "version": "12.3.0",
4
4
  "description": "The spectrum-ts runtime — Spectrum, content builders, fusor, and the provider authoring API.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,7 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "@photon-ai/otel": "^3.1.0",
35
+ "@photon-ai/otel": "^3.3.0",
36
36
  "@photon-ai/proto": "^0.2.4",
37
37
  "@repeaterjs/repeater": "^3.0.6",
38
38
  "marked": "^18.0.5",