@spectrum-ts/core 11.1.0 → 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -642,22 +642,18 @@ declare const editSchema: z.ZodObject<{
|
|
|
642
642
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
643
643
|
} | undefined;
|
|
644
644
|
raw?: unknown;
|
|
645
|
+
} | {
|
|
646
|
+
type: "custom";
|
|
647
|
+
raw: unknown;
|
|
645
648
|
} | {
|
|
646
649
|
type: "text";
|
|
647
650
|
text: string;
|
|
648
651
|
} | {
|
|
649
652
|
type: "markdown";
|
|
650
653
|
markdown: string;
|
|
651
|
-
} | {
|
|
652
|
-
type: "custom";
|
|
653
|
-
raw: unknown;
|
|
654
654
|
} | {
|
|
655
655
|
type: "group";
|
|
656
656
|
items: Message<string, User, Space<unknown>>[];
|
|
657
|
-
} | {
|
|
658
|
-
type: "reaction";
|
|
659
|
-
emoji: string;
|
|
660
|
-
target: Message<string, User, Space<unknown>>;
|
|
661
657
|
} | {
|
|
662
658
|
type: "poll";
|
|
663
659
|
title: string;
|
|
@@ -678,6 +674,10 @@ declare const editSchema: z.ZodObject<{
|
|
|
678
674
|
};
|
|
679
675
|
selected: boolean;
|
|
680
676
|
title: string;
|
|
677
|
+
} | {
|
|
678
|
+
type: "reaction";
|
|
679
|
+
emoji: string;
|
|
680
|
+
target: Message<string, User, Space<unknown>>;
|
|
681
681
|
} | {
|
|
682
682
|
type: "streamText";
|
|
683
683
|
stream: () => AsyncIterable<string>;
|
|
@@ -687,6 +687,7 @@ declare const editSchema: z.ZodObject<{
|
|
|
687
687
|
mimeType: string;
|
|
688
688
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
689
689
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
690
|
+
id?: string | undefined;
|
|
690
691
|
name?: string | undefined;
|
|
691
692
|
duration?: number | undefined;
|
|
692
693
|
size?: number | undefined;
|
|
@@ -799,22 +800,18 @@ declare const editSchema: z.ZodObject<{
|
|
|
799
800
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
800
801
|
} | undefined;
|
|
801
802
|
raw?: unknown;
|
|
803
|
+
} | {
|
|
804
|
+
type: "custom";
|
|
805
|
+
raw: unknown;
|
|
802
806
|
} | {
|
|
803
807
|
type: "text";
|
|
804
808
|
text: string;
|
|
805
809
|
} | {
|
|
806
810
|
type: "markdown";
|
|
807
811
|
markdown: string;
|
|
808
|
-
} | {
|
|
809
|
-
type: "custom";
|
|
810
|
-
raw: unknown;
|
|
811
812
|
} | {
|
|
812
813
|
type: "group";
|
|
813
814
|
items: Message<string, User, Space<unknown>>[];
|
|
814
|
-
} | {
|
|
815
|
-
type: "reaction";
|
|
816
|
-
emoji: string;
|
|
817
|
-
target: Message<string, User, Space<unknown>>;
|
|
818
815
|
} | {
|
|
819
816
|
type: "poll";
|
|
820
817
|
title: string;
|
|
@@ -835,6 +832,10 @@ declare const editSchema: z.ZodObject<{
|
|
|
835
832
|
};
|
|
836
833
|
selected: boolean;
|
|
837
834
|
title: string;
|
|
835
|
+
} | {
|
|
836
|
+
type: "reaction";
|
|
837
|
+
emoji: string;
|
|
838
|
+
target: Message<string, User, Space<unknown>>;
|
|
838
839
|
} | {
|
|
839
840
|
type: "streamText";
|
|
840
841
|
stream: () => AsyncIterable<string>;
|
|
@@ -844,6 +845,7 @@ declare const editSchema: z.ZodObject<{
|
|
|
844
845
|
mimeType: string;
|
|
845
846
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
846
847
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
848
|
+
id?: string | undefined;
|
|
847
849
|
name?: string | undefined;
|
|
848
850
|
duration?: number | undefined;
|
|
849
851
|
size?: number | undefined;
|
|
@@ -1186,22 +1188,18 @@ declare const replySchema: z.ZodObject<{
|
|
|
1186
1188
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
1187
1189
|
} | undefined;
|
|
1188
1190
|
raw?: unknown;
|
|
1191
|
+
} | {
|
|
1192
|
+
type: "custom";
|
|
1193
|
+
raw: unknown;
|
|
1189
1194
|
} | {
|
|
1190
1195
|
type: "text";
|
|
1191
1196
|
text: string;
|
|
1192
1197
|
} | {
|
|
1193
1198
|
type: "markdown";
|
|
1194
1199
|
markdown: string;
|
|
1195
|
-
} | {
|
|
1196
|
-
type: "custom";
|
|
1197
|
-
raw: unknown;
|
|
1198
1200
|
} | {
|
|
1199
1201
|
type: "group";
|
|
1200
1202
|
items: Message<string, User, Space<unknown>>[];
|
|
1201
|
-
} | {
|
|
1202
|
-
type: "reaction";
|
|
1203
|
-
emoji: string;
|
|
1204
|
-
target: Message<string, User, Space<unknown>>;
|
|
1205
1203
|
} | {
|
|
1206
1204
|
type: "poll";
|
|
1207
1205
|
title: string;
|
|
@@ -1222,6 +1220,10 @@ declare const replySchema: z.ZodObject<{
|
|
|
1222
1220
|
};
|
|
1223
1221
|
selected: boolean;
|
|
1224
1222
|
title: string;
|
|
1223
|
+
} | {
|
|
1224
|
+
type: "reaction";
|
|
1225
|
+
emoji: string;
|
|
1226
|
+
target: Message<string, User, Space<unknown>>;
|
|
1225
1227
|
} | {
|
|
1226
1228
|
type: "streamText";
|
|
1227
1229
|
stream: () => AsyncIterable<string>;
|
|
@@ -1231,6 +1233,7 @@ declare const replySchema: z.ZodObject<{
|
|
|
1231
1233
|
mimeType: string;
|
|
1232
1234
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
1233
1235
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
1236
|
+
id?: string | undefined;
|
|
1234
1237
|
name?: string | undefined;
|
|
1235
1238
|
duration?: number | undefined;
|
|
1236
1239
|
size?: number | undefined;
|
|
@@ -1343,22 +1346,18 @@ declare const replySchema: z.ZodObject<{
|
|
|
1343
1346
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
1344
1347
|
} | undefined;
|
|
1345
1348
|
raw?: unknown;
|
|
1349
|
+
} | {
|
|
1350
|
+
type: "custom";
|
|
1351
|
+
raw: unknown;
|
|
1346
1352
|
} | {
|
|
1347
1353
|
type: "text";
|
|
1348
1354
|
text: string;
|
|
1349
1355
|
} | {
|
|
1350
1356
|
type: "markdown";
|
|
1351
1357
|
markdown: string;
|
|
1352
|
-
} | {
|
|
1353
|
-
type: "custom";
|
|
1354
|
-
raw: unknown;
|
|
1355
1358
|
} | {
|
|
1356
1359
|
type: "group";
|
|
1357
1360
|
items: Message<string, User, Space<unknown>>[];
|
|
1358
|
-
} | {
|
|
1359
|
-
type: "reaction";
|
|
1360
|
-
emoji: string;
|
|
1361
|
-
target: Message<string, User, Space<unknown>>;
|
|
1362
1361
|
} | {
|
|
1363
1362
|
type: "poll";
|
|
1364
1363
|
title: string;
|
|
@@ -1379,6 +1378,10 @@ declare const replySchema: z.ZodObject<{
|
|
|
1379
1378
|
};
|
|
1380
1379
|
selected: boolean;
|
|
1381
1380
|
title: string;
|
|
1381
|
+
} | {
|
|
1382
|
+
type: "reaction";
|
|
1383
|
+
emoji: string;
|
|
1384
|
+
target: Message<string, User, Space<unknown>>;
|
|
1382
1385
|
} | {
|
|
1383
1386
|
type: "streamText";
|
|
1384
1387
|
stream: () => AsyncIterable<string>;
|
|
@@ -1388,6 +1391,7 @@ declare const replySchema: z.ZodObject<{
|
|
|
1388
1391
|
mimeType: string;
|
|
1389
1392
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
1390
1393
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
1394
|
+
id?: string | undefined;
|
|
1391
1395
|
name?: string | undefined;
|
|
1392
1396
|
duration?: number | undefined;
|
|
1393
1397
|
size?: number | undefined;
|
|
@@ -1581,6 +1585,7 @@ declare function unsend(target: Message | undefined): ContentBuilder;
|
|
|
1581
1585
|
//#region src/content/voice.d.ts
|
|
1582
1586
|
declare const voiceSchema: z.ZodObject<{
|
|
1583
1587
|
type: z.ZodLiteral<"voice">;
|
|
1588
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1584
1589
|
name: z.ZodOptional<z.ZodString>;
|
|
1585
1590
|
mimeType: z.ZodString;
|
|
1586
1591
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1591,6 +1596,7 @@ declare const voiceSchema: z.ZodObject<{
|
|
|
1591
1596
|
type Voice = z.infer<typeof voiceSchema>;
|
|
1592
1597
|
type VoiceInput = string | Buffer | URL;
|
|
1593
1598
|
declare const asVoice: (input: {
|
|
1599
|
+
id?: string;
|
|
1594
1600
|
name?: string;
|
|
1595
1601
|
mimeType: string;
|
|
1596
1602
|
duration?: number;
|
|
@@ -7006,6 +7012,7 @@ declare const baseContentSchema: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
|
7006
7012
|
raw: z.ZodOptional<z.ZodUnknown>;
|
|
7007
7013
|
}, z.core.$strip>, z.ZodObject<{
|
|
7008
7014
|
type: z.ZodLiteral<"voice">;
|
|
7015
|
+
id: z.ZodOptional<z.ZodString>;
|
|
7009
7016
|
name: z.ZodOptional<z.ZodString>;
|
|
7010
7017
|
mimeType: z.ZodString;
|
|
7011
7018
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
@@ -7184,6 +7191,7 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7184
7191
|
raw: z.ZodOptional<z.ZodUnknown>;
|
|
7185
7192
|
}, z.core.$strip>, z.ZodObject<{
|
|
7186
7193
|
type: z.ZodLiteral<"voice">;
|
|
7194
|
+
id: z.ZodOptional<z.ZodString>;
|
|
7187
7195
|
name: z.ZodOptional<z.ZodString>;
|
|
7188
7196
|
mimeType: z.ZodString;
|
|
7189
7197
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
@@ -7331,22 +7339,18 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7331
7339
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7332
7340
|
} | undefined;
|
|
7333
7341
|
raw?: unknown;
|
|
7342
|
+
} | {
|
|
7343
|
+
type: "custom";
|
|
7344
|
+
raw: unknown;
|
|
7334
7345
|
} | {
|
|
7335
7346
|
type: "text";
|
|
7336
7347
|
text: string;
|
|
7337
7348
|
} | {
|
|
7338
7349
|
type: "markdown";
|
|
7339
7350
|
markdown: string;
|
|
7340
|
-
} | {
|
|
7341
|
-
type: "custom";
|
|
7342
|
-
raw: unknown;
|
|
7343
7351
|
} | {
|
|
7344
7352
|
type: "group";
|
|
7345
7353
|
items: Message<string, User, Space<unknown>>[];
|
|
7346
|
-
} | {
|
|
7347
|
-
type: "reaction";
|
|
7348
|
-
emoji: string;
|
|
7349
|
-
target: Message<string, User, Space<unknown>>;
|
|
7350
7354
|
} | {
|
|
7351
7355
|
type: "poll";
|
|
7352
7356
|
title: string;
|
|
@@ -7367,6 +7371,10 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7367
7371
|
};
|
|
7368
7372
|
selected: boolean;
|
|
7369
7373
|
title: string;
|
|
7374
|
+
} | {
|
|
7375
|
+
type: "reaction";
|
|
7376
|
+
emoji: string;
|
|
7377
|
+
target: Message<string, User, Space<unknown>>;
|
|
7370
7378
|
} | {
|
|
7371
7379
|
type: "streamText";
|
|
7372
7380
|
stream: () => AsyncIterable<string>;
|
|
@@ -7376,6 +7384,7 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7376
7384
|
mimeType: string;
|
|
7377
7385
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7378
7386
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
7387
|
+
id?: string | undefined;
|
|
7379
7388
|
name?: string | undefined;
|
|
7380
7389
|
duration?: number | undefined;
|
|
7381
7390
|
size?: number | undefined;
|
|
@@ -7488,22 +7497,18 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7488
7497
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7489
7498
|
} | undefined;
|
|
7490
7499
|
raw?: unknown;
|
|
7500
|
+
} | {
|
|
7501
|
+
type: "custom";
|
|
7502
|
+
raw: unknown;
|
|
7491
7503
|
} | {
|
|
7492
7504
|
type: "text";
|
|
7493
7505
|
text: string;
|
|
7494
7506
|
} | {
|
|
7495
7507
|
type: "markdown";
|
|
7496
7508
|
markdown: string;
|
|
7497
|
-
} | {
|
|
7498
|
-
type: "custom";
|
|
7499
|
-
raw: unknown;
|
|
7500
7509
|
} | {
|
|
7501
7510
|
type: "group";
|
|
7502
7511
|
items: Message<string, User, Space<unknown>>[];
|
|
7503
|
-
} | {
|
|
7504
|
-
type: "reaction";
|
|
7505
|
-
emoji: string;
|
|
7506
|
-
target: Message<string, User, Space<unknown>>;
|
|
7507
7512
|
} | {
|
|
7508
7513
|
type: "poll";
|
|
7509
7514
|
title: string;
|
|
@@ -7524,6 +7529,10 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7524
7529
|
};
|
|
7525
7530
|
selected: boolean;
|
|
7526
7531
|
title: string;
|
|
7532
|
+
} | {
|
|
7533
|
+
type: "reaction";
|
|
7534
|
+
emoji: string;
|
|
7535
|
+
target: Message<string, User, Space<unknown>>;
|
|
7527
7536
|
} | {
|
|
7528
7537
|
type: "streamText";
|
|
7529
7538
|
stream: () => AsyncIterable<string>;
|
|
@@ -7533,6 +7542,7 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7533
7542
|
mimeType: string;
|
|
7534
7543
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7535
7544
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
7545
|
+
id?: string | undefined;
|
|
7536
7546
|
name?: string | undefined;
|
|
7537
7547
|
duration?: number | undefined;
|
|
7538
7548
|
size?: number | undefined;
|
|
@@ -7649,22 +7659,18 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7649
7659
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7650
7660
|
} | undefined;
|
|
7651
7661
|
raw?: unknown;
|
|
7662
|
+
} | {
|
|
7663
|
+
type: "custom";
|
|
7664
|
+
raw: unknown;
|
|
7652
7665
|
} | {
|
|
7653
7666
|
type: "text";
|
|
7654
7667
|
text: string;
|
|
7655
7668
|
} | {
|
|
7656
7669
|
type: "markdown";
|
|
7657
7670
|
markdown: string;
|
|
7658
|
-
} | {
|
|
7659
|
-
type: "custom";
|
|
7660
|
-
raw: unknown;
|
|
7661
7671
|
} | {
|
|
7662
7672
|
type: "group";
|
|
7663
7673
|
items: Message<string, User, Space<unknown>>[];
|
|
7664
|
-
} | {
|
|
7665
|
-
type: "reaction";
|
|
7666
|
-
emoji: string;
|
|
7667
|
-
target: Message<string, User, Space<unknown>>;
|
|
7668
7674
|
} | {
|
|
7669
7675
|
type: "poll";
|
|
7670
7676
|
title: string;
|
|
@@ -7685,6 +7691,10 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7685
7691
|
};
|
|
7686
7692
|
selected: boolean;
|
|
7687
7693
|
title: string;
|
|
7694
|
+
} | {
|
|
7695
|
+
type: "reaction";
|
|
7696
|
+
emoji: string;
|
|
7697
|
+
target: Message<string, User, Space<unknown>>;
|
|
7688
7698
|
} | {
|
|
7689
7699
|
type: "streamText";
|
|
7690
7700
|
stream: () => AsyncIterable<string>;
|
|
@@ -7694,6 +7704,7 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7694
7704
|
mimeType: string;
|
|
7695
7705
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7696
7706
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
7707
|
+
id?: string | undefined;
|
|
7697
7708
|
name?: string | undefined;
|
|
7698
7709
|
duration?: number | undefined;
|
|
7699
7710
|
size?: number | undefined;
|
|
@@ -7806,22 +7817,18 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7806
7817
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7807
7818
|
} | undefined;
|
|
7808
7819
|
raw?: unknown;
|
|
7820
|
+
} | {
|
|
7821
|
+
type: "custom";
|
|
7822
|
+
raw: unknown;
|
|
7809
7823
|
} | {
|
|
7810
7824
|
type: "text";
|
|
7811
7825
|
text: string;
|
|
7812
7826
|
} | {
|
|
7813
7827
|
type: "markdown";
|
|
7814
7828
|
markdown: string;
|
|
7815
|
-
} | {
|
|
7816
|
-
type: "custom";
|
|
7817
|
-
raw: unknown;
|
|
7818
7829
|
} | {
|
|
7819
7830
|
type: "group";
|
|
7820
7831
|
items: Message<string, User, Space<unknown>>[];
|
|
7821
|
-
} | {
|
|
7822
|
-
type: "reaction";
|
|
7823
|
-
emoji: string;
|
|
7824
|
-
target: Message<string, User, Space<unknown>>;
|
|
7825
7832
|
} | {
|
|
7826
7833
|
type: "poll";
|
|
7827
7834
|
title: string;
|
|
@@ -7842,6 +7849,10 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7842
7849
|
};
|
|
7843
7850
|
selected: boolean;
|
|
7844
7851
|
title: string;
|
|
7852
|
+
} | {
|
|
7853
|
+
type: "reaction";
|
|
7854
|
+
emoji: string;
|
|
7855
|
+
target: Message<string, User, Space<unknown>>;
|
|
7845
7856
|
} | {
|
|
7846
7857
|
type: "streamText";
|
|
7847
7858
|
stream: () => AsyncIterable<string>;
|
|
@@ -7851,6 +7862,7 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7851
7862
|
mimeType: string;
|
|
7852
7863
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7853
7864
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
7865
|
+
id?: string | undefined;
|
|
7854
7866
|
name?: string | undefined;
|
|
7855
7867
|
duration?: number | undefined;
|
|
7856
7868
|
size?: number | undefined;
|
package/dist/authoring.d.ts
CHANGED
|
@@ -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-
|
|
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-CtoKMCG2.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/authoring.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as asPoll, B as asMarkdown, D as asReaction, F as addMemberSchema, G as groupSchema, H as markdownSchema, L as leaveSpaceSchema, Q as asCustom, S as replySchema, T as asRead, U as asGroup, Y as textSchema, at as avatarSchema, b as asReply, ct as asAttachment, d as envAwareConfig, et as asContact, f as envFor, ft as tracedFetch, g as asUnsend, i as stream, j as asPollOption, k as reactionSchema, l as renderInlineTokens, m as asVoice, o as errorAttrs, ot as buildPhotoAction, p as fromEnv, q as asText, st as photoActionSchema, ut as attachmentSchema, v as asRichlink, w as renameSchema, z as removeMemberSchema } from "./stream-
|
|
1
|
+
import { A as asPoll, B as asMarkdown, D as asReaction, F as addMemberSchema, G as groupSchema, H as markdownSchema, L as leaveSpaceSchema, Q as asCustom, S as replySchema, T as asRead, U as asGroup, Y as textSchema, at as avatarSchema, b as asReply, ct as asAttachment, d as envAwareConfig, et as asContact, f as envFor, ft as tracedFetch, g as asUnsend, i as stream, j as asPollOption, k as reactionSchema, l as renderInlineTokens, m as asVoice, o as errorAttrs, ot as buildPhotoAction, p as fromEnv, q as asText, st as photoActionSchema, ut as attachmentSchema, v as asRichlink, w as renameSchema, z as removeMemberSchema } from "./stream-B6kth7y9.js";
|
|
2
2
|
import z from "zod";
|
|
3
3
|
import { createLogger, createLogger as createLogger$1, sanitizeEmail, sanitizeErrorMessage, sanitizePhone, sanitizeUrl, setLogLevel } from "@photon-ai/otel";
|
|
4
4
|
import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
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-
|
|
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-CtoKMCG2.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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as custom, B as asMarkdown, C as rename, E as read, F as addMemberSchema, I as leaveSpace, J as text, K as resolveContents, L as leaveSpaceSchema, M as option, N as poll, O as reaction, P as addMember, Q as asCustom, R as removeMember, V as markdown, W as group, X as StreamConsumedError, Z as drainStreamText, _ as unsend, a as contentAttrs, at as avatarSchema, c as markdownToPlainText, ct as asAttachment, d as envAwareConfig, dt as fetchUrlBytes, et as asContact, f as envFor, ft as tracedFetch, h as voice, i as stream, it as avatar, lt as attachment, n as createAsyncQueue, nt as fromVCard, o as errorAttrs, q as asText, r as mergeStreams, rt as toVCard, s as senderAttrs, t as broadcast, tt as contact, u as classifyIdentifier, w as renameSchema, x as reply, y as richlink, z as removeMemberSchema } from "./stream-
|
|
1
|
+
import { $ as custom, B as asMarkdown, C as rename, E as read, F as addMemberSchema, I as leaveSpace, J as text, K as resolveContents, L as leaveSpaceSchema, M as option, N as poll, O as reaction, P as addMember, Q as asCustom, R as removeMember, V as markdown, W as group, X as StreamConsumedError, Z as drainStreamText, _ as unsend, a as contentAttrs, at as avatarSchema, c as markdownToPlainText, ct as asAttachment, d as envAwareConfig, dt as fetchUrlBytes, et as asContact, f as envFor, ft as tracedFetch, h as voice, i as stream, it as avatar, lt as attachment, m as asVoice, n as createAsyncQueue, nt as fromVCard, o as errorAttrs, q as asText, r as mergeStreams, rt as toVCard, s as senderAttrs, t as broadcast, tt as contact, u as classifyIdentifier, w as renameSchema, x as reply, y as richlink, z as removeMemberSchema } from "./stream-B6kth7y9.js";
|
|
2
2
|
import z from "zod";
|
|
3
3
|
import ogs from "open-graph-scraper";
|
|
4
4
|
import { createLogger, setLogLevel, setupOtel, withSpan } from "@photon-ai/otel";
|
|
@@ -3005,7 +3005,7 @@ function definePlatform(name, rawDef) {
|
|
|
3005
3005
|
}
|
|
3006
3006
|
//#endregion
|
|
3007
3007
|
//#region src/build-env.ts
|
|
3008
|
-
const SPECTRUM_SDK_VERSION = "11.
|
|
3008
|
+
const SPECTRUM_SDK_VERSION = "11.2.0";
|
|
3009
3009
|
//#endregion
|
|
3010
3010
|
//#region src/utils/provider-packages.ts
|
|
3011
3011
|
const OFFICIAL_PROVIDER_PACKAGES = {
|
|
@@ -3765,6 +3765,7 @@ const mapContent = (content, platform, spaceRef, ctx) => {
|
|
|
3765
3765
|
case "reply": return deserializeReply(raw, platform, spaceRef, ctx);
|
|
3766
3766
|
case "group": return deserializeGroup(raw, platform, spaceRef, ctx);
|
|
3767
3767
|
case "attachment": return deserializeAttachment(raw, platform, spaceRef, ctx);
|
|
3768
|
+
case "voice": return deserializeVoice(raw, platform, spaceRef, ctx);
|
|
3768
3769
|
case "addMember": return addMemberSchema.parse({
|
|
3769
3770
|
type: "addMember",
|
|
3770
3771
|
members: memberStrings(raw.members)
|
|
@@ -3813,6 +3814,20 @@ const deserializeAttachment = (raw, platform, spaceRef, ctx) => {
|
|
|
3813
3814
|
stream: bytes?.stream
|
|
3814
3815
|
});
|
|
3815
3816
|
};
|
|
3817
|
+
const deserializeVoice = (raw, platform, spaceRef, ctx) => {
|
|
3818
|
+
const id = asString(raw.id);
|
|
3819
|
+
const bytes = id ? ctx.resolveAttachment?.(platform, spaceRef, id) : void 0;
|
|
3820
|
+
const unavailable = () => Promise.reject(UnsupportedError.action("getAttachment", platform, `voice attachment "${id}" arrived without bytes over the Spectrum webhook and "${platform}" exposes no getAttachment`));
|
|
3821
|
+
return asVoice({
|
|
3822
|
+
...id ? { id } : {},
|
|
3823
|
+
name: asString(raw.name) || void 0,
|
|
3824
|
+
mimeType: asString(raw.mimeType),
|
|
3825
|
+
duration: typeof raw.duration === "number" ? raw.duration : void 0,
|
|
3826
|
+
size: typeof raw.size === "number" ? raw.size : void 0,
|
|
3827
|
+
read: bytes ? bytes.read : unavailable,
|
|
3828
|
+
stream: bytes?.stream
|
|
3829
|
+
});
|
|
3830
|
+
};
|
|
3816
3831
|
const deserializeReaction = (raw, spaceRef) => ({
|
|
3817
3832
|
type: "reaction",
|
|
3818
3833
|
emoji: asString(raw.emoji),
|
|
@@ -1122,6 +1122,7 @@ const AUDIO_MIME_PATTERN = /^audio\//i;
|
|
|
1122
1122
|
const audioMimeSchema = z.string().nonempty().regex(AUDIO_MIME_PATTERN, "voice content requires an audio/* MIME type");
|
|
1123
1123
|
const voiceSchema = z.object({
|
|
1124
1124
|
type: z.literal("voice"),
|
|
1125
|
+
id: z.string().nonempty().optional(),
|
|
1125
1126
|
name: z.string().nonempty().optional(),
|
|
1126
1127
|
mimeType: audioMimeSchema,
|
|
1127
1128
|
duration: z.number().nonnegative().optional(),
|
|
@@ -1163,6 +1164,7 @@ const asVoice = (input) => {
|
|
|
1163
1164
|
const stream = input.stream ?? (async () => bufferToStream(await read()));
|
|
1164
1165
|
return voiceSchema.parse({
|
|
1165
1166
|
type: "voice",
|
|
1167
|
+
...input.id ? { id: input.id } : {},
|
|
1166
1168
|
name: input.name,
|
|
1167
1169
|
mimeType: input.mimeType,
|
|
1168
1170
|
duration: input.duration,
|