@spectrum-ts/core 8.2.1 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -99,6 +99,12 @@ declare const buildPhotoAction: (input: PhotoInput, options: {
|
|
|
99
99
|
* universal sugar that delegates here. Per-platform constraints (e.g.
|
|
100
100
|
* group-only, remote-only) surface as `UnsupportedError` from the provider's
|
|
101
101
|
* `send` action so the canonical and sugar forms share one error path.
|
|
102
|
+
*
|
|
103
|
+
* Bidirectional: providers also surface platform icon changes as inbound
|
|
104
|
+
* `Message`s carrying this content — `action.kind === "set"` arrives with
|
|
105
|
+
* the fetched icon behind `read()`, `"clear"` mirrors icon removal.
|
|
106
|
+
* `message.sender` is the user who changed it (may be `undefined` when the
|
|
107
|
+
* platform recorded no actor).
|
|
102
108
|
*/
|
|
103
109
|
declare const avatarSchema: z.ZodObject<{
|
|
104
110
|
type: z.ZodLiteral<"avatar">;
|
|
@@ -112,6 +118,15 @@ declare const avatarSchema: z.ZodObject<{
|
|
|
112
118
|
}, z.core.$strip>;
|
|
113
119
|
type Avatar = z.infer<typeof avatarSchema>;
|
|
114
120
|
type AvatarInput = PhotoInput;
|
|
121
|
+
/**
|
|
122
|
+
* The current chat avatar as returned by `space.getAvatar()`: raw image bytes
|
|
123
|
+
* plus MIME type. `data` is a Buffer so the value round-trips into the
|
|
124
|
+
* setter — `space.avatar(res.data, { mimeType: res.mimeType })`.
|
|
125
|
+
*/
|
|
126
|
+
interface AvatarData {
|
|
127
|
+
data: Buffer;
|
|
128
|
+
mimeType: string;
|
|
129
|
+
}
|
|
115
130
|
/**
|
|
116
131
|
* Build an `Avatar` content value.
|
|
117
132
|
*
|
|
@@ -304,9 +319,75 @@ declare const asReaction: (input: {
|
|
|
304
319
|
*/
|
|
305
320
|
declare function reaction(emoji: string, target: Message | undefined): ReactionBuilder;
|
|
306
321
|
//#endregion
|
|
322
|
+
//#region src/content/membership.d.ts
|
|
323
|
+
/**
|
|
324
|
+
* Group-membership management content. Universal content — providers
|
|
325
|
+
* dispatch by `content.type` in their `send` action and decide their own
|
|
326
|
+
* support story (e.g. iMessage only supports it for remote group chats;
|
|
327
|
+
* on a DM it surfaces an `UnsupportedError` telling the caller to create
|
|
328
|
+
* a group via `space.create` instead).
|
|
329
|
+
*
|
|
330
|
+
* `space.send(addMember(users))` is the canonical form; `space.add(...)`,
|
|
331
|
+
* `space.remove(...)`, and `space.leave()` are universal sugar that
|
|
332
|
+
* delegate here. All three are fire-and-forget — no `Message` is produced.
|
|
333
|
+
*
|
|
334
|
+
* Bidirectional: providers also surface platform membership events as
|
|
335
|
+
* inbound `Message`s carrying this content. `message.sender` is the acting
|
|
336
|
+
* user — who added/removed the members — and may be `undefined` when the
|
|
337
|
+
* platform recorded no actor. For `leaveSpace` the sender is the leaver
|
|
338
|
+
* (the content carries no `members`). The agent's own actions are
|
|
339
|
+
* suppressed: `space.add(...)` does not echo back as an inbound event.
|
|
340
|
+
*
|
|
341
|
+
* Members are id strings (or `User`s, normalized to their `id`) in the same
|
|
342
|
+
* platform handle format `space.create` accepts. No async resolution happens
|
|
343
|
+
* in the builder — ids reach the provider verbatim.
|
|
344
|
+
*/
|
|
345
|
+
declare const addMemberSchema: z.ZodObject<{
|
|
346
|
+
type: z.ZodLiteral<"addMember">;
|
|
347
|
+
members: z.ZodArray<z.ZodString>;
|
|
348
|
+
}, z.core.$strip>;
|
|
349
|
+
type AddMember = z.infer<typeof addMemberSchema>;
|
|
350
|
+
declare const removeMemberSchema: z.ZodObject<{
|
|
351
|
+
type: z.ZodLiteral<"removeMember">;
|
|
352
|
+
members: z.ZodArray<z.ZodString>;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
type RemoveMember = z.infer<typeof removeMemberSchema>;
|
|
355
|
+
declare const leaveSpaceSchema: z.ZodObject<{
|
|
356
|
+
type: z.ZodLiteral<"leaveSpace">;
|
|
357
|
+
}, z.core.$strip>;
|
|
358
|
+
type LeaveSpace = z.infer<typeof leaveSpaceSchema>;
|
|
359
|
+
/** Accepted member input: a `User`, a raw id string, or an array of either. */
|
|
360
|
+
type MemberInput = User | string | (User | string)[];
|
|
361
|
+
/**
|
|
362
|
+
* Build an `AddMember` content value inviting `users` into the current
|
|
363
|
+
* group chat. Accepts a single `User` or id string, or an array of either
|
|
364
|
+
* — batches land in one provider call.
|
|
365
|
+
*/
|
|
366
|
+
declare function addMember(users: MemberInput): ContentBuilder;
|
|
367
|
+
/**
|
|
368
|
+
* Build a `RemoveMember` content value removing `users` from the current
|
|
369
|
+
* group chat. Accepts the same input shapes as `addMember`.
|
|
370
|
+
*/
|
|
371
|
+
declare function removeMember(users: MemberInput): ContentBuilder;
|
|
372
|
+
/**
|
|
373
|
+
* Build a `LeaveSpace` content value making the agent's own account leave
|
|
374
|
+
* the current group chat.
|
|
375
|
+
*/
|
|
376
|
+
declare function leaveSpace(): ContentBuilder;
|
|
377
|
+
//#endregion
|
|
307
378
|
//#region src/types/space.d.ts
|
|
308
379
|
interface Space<_Def = unknown> {
|
|
309
380
|
readonly __platform: string;
|
|
381
|
+
/**
|
|
382
|
+
* Add members to the current chat. Sugar for `send(addMember(users))`.
|
|
383
|
+
* Accepts a single `User` or id string, or an array of either — batches
|
|
384
|
+
* land in one provider call. Fire-and-forget.
|
|
385
|
+
*
|
|
386
|
+
* Universal API; per-platform constraints (e.g. iMessage: remote + group
|
|
387
|
+
* only — a DM cannot be converted, create a group via `space.create`)
|
|
388
|
+
* surface as `UnsupportedError` from the provider's send action.
|
|
389
|
+
*/
|
|
390
|
+
add(users: MemberInput): Promise<void>;
|
|
310
391
|
/**
|
|
311
392
|
* Set or clear the current chat's avatar (group icon). Sugar for
|
|
312
393
|
* `send(avatar(input, options?))`.
|
|
@@ -335,6 +416,30 @@ interface Space<_Def = unknown> {
|
|
|
335
416
|
* `send` results chain without narrowing; an undefined target throws.
|
|
336
417
|
*/
|
|
337
418
|
edit(message: Message | undefined, newContent: ContentInput): Promise<void>;
|
|
419
|
+
/**
|
|
420
|
+
* Download the current chat avatar (group icon). Resolves `undefined` when
|
|
421
|
+
* the chat has none. The result round-trips into the setter:
|
|
422
|
+
* `space.avatar(res.data, { mimeType: res.mimeType })`.
|
|
423
|
+
*
|
|
424
|
+
* Universal API; per-platform constraints (e.g. iMessage: remote + group
|
|
425
|
+
* only — a DM throws) surface as `UnsupportedError`, as do platforms with
|
|
426
|
+
* no implementation.
|
|
427
|
+
*/
|
|
428
|
+
getAvatar(): Promise<AvatarData | undefined>;
|
|
429
|
+
/**
|
|
430
|
+
* List the chat's current participants, excluding the agent's own account
|
|
431
|
+
* where the platform can identify it. Each entry is a `User` tagged with
|
|
432
|
+
* `__platform`; `id` is the user's canonical platform handle (the same
|
|
433
|
+
* format `space.create` accepts), so results feed straight back into
|
|
434
|
+
* `add()` / `remove()` / `space.create()`. Platform extras (e.g.
|
|
435
|
+
* iMessage's `address`/`country`/`service`) ride along untyped — use the
|
|
436
|
+
* platform instance's `getMembers(space)` for typed extras.
|
|
437
|
+
*
|
|
438
|
+
* Universal API; per-platform constraints (e.g. iMessage: remote + group
|
|
439
|
+
* only — a DM throws) surface as `UnsupportedError`, as do platforms with
|
|
440
|
+
* no implementation.
|
|
441
|
+
*/
|
|
442
|
+
getMembers(): Promise<User[]>;
|
|
338
443
|
/**
|
|
339
444
|
* Look up a message in this space by its id. Returns `undefined` if the
|
|
340
445
|
* platform has no way to resolve the id (e.g. cache miss with no by-id
|
|
@@ -343,6 +448,14 @@ interface Space<_Def = unknown> {
|
|
|
343
448
|
*/
|
|
344
449
|
getMessage(id: string): Promise<Message | undefined>;
|
|
345
450
|
readonly id: string;
|
|
451
|
+
/**
|
|
452
|
+
* Leave the current chat with the agent's own account. Sugar for
|
|
453
|
+
* `send(leaveSpace())`. Fire-and-forget.
|
|
454
|
+
*
|
|
455
|
+
* Universal API; per-platform constraints (e.g. iMessage: remote + group
|
|
456
|
+
* only) surface as `UnsupportedError` from the provider's send action.
|
|
457
|
+
*/
|
|
458
|
+
leave(): Promise<void>;
|
|
346
459
|
/**
|
|
347
460
|
* Mark the conversation as read up to `message`, surfacing a read receipt
|
|
348
461
|
* to the sender where the platform supports one. Sugar for
|
|
@@ -356,6 +469,15 @@ interface Space<_Def = unknown> {
|
|
|
356
469
|
* everywhere — same contract as `startTyping()`.
|
|
357
470
|
*/
|
|
358
471
|
read(message: Message): Promise<void>;
|
|
472
|
+
/**
|
|
473
|
+
* Remove members from the current chat. Sugar for
|
|
474
|
+
* `send(removeMember(users))`. Accepts the same input shapes as `add`.
|
|
475
|
+
* Fire-and-forget.
|
|
476
|
+
*
|
|
477
|
+
* Universal API; per-platform constraints (e.g. iMessage: remote + group
|
|
478
|
+
* only) surface as `UnsupportedError` from the provider's send action.
|
|
479
|
+
*/
|
|
480
|
+
remove(users: MemberInput): Promise<void>;
|
|
359
481
|
/**
|
|
360
482
|
* Rename the current chat. Sugar for `send(rename(displayName))`.
|
|
361
483
|
*
|
|
@@ -442,17 +564,12 @@ interface Message<TPlatform extends string = string, TSender extends User = User
|
|
|
442
564
|
* (no new message id is produced; the existing message mutates in place).
|
|
443
565
|
*
|
|
444
566
|
* Edit cannot wrap `edit`, `reply`, `reaction`, `group`, `typing`, `rename`,
|
|
445
|
-
* `avatar`, `unsend`, or `read`
|
|
567
|
+
* `avatar`, `addMember`, `removeMember`, `leaveSpace`, `unsend`, or `read`
|
|
568
|
+
* content.
|
|
446
569
|
*/
|
|
447
570
|
declare const editSchema: z.ZodObject<{
|
|
448
571
|
type: z.ZodLiteral<"edit">;
|
|
449
572
|
content: z.ZodCustom<{
|
|
450
|
-
type: "text";
|
|
451
|
-
text: string;
|
|
452
|
-
} | {
|
|
453
|
-
type: "markdown";
|
|
454
|
-
markdown: string;
|
|
455
|
-
} | {
|
|
456
573
|
type: "attachment";
|
|
457
574
|
id: string;
|
|
458
575
|
name: string;
|
|
@@ -504,15 +621,44 @@ declare const editSchema: z.ZodObject<{
|
|
|
504
621
|
} | undefined;
|
|
505
622
|
raw?: unknown;
|
|
506
623
|
} | {
|
|
507
|
-
type: "
|
|
508
|
-
|
|
624
|
+
type: "text";
|
|
625
|
+
text: string;
|
|
626
|
+
} | {
|
|
627
|
+
type: "markdown";
|
|
628
|
+
markdown: string;
|
|
509
629
|
} | {
|
|
510
630
|
type: "custom";
|
|
511
631
|
raw: unknown;
|
|
632
|
+
} | {
|
|
633
|
+
type: "group";
|
|
634
|
+
items: Message<string, User, Space<unknown>>[];
|
|
635
|
+
} | {
|
|
636
|
+
type: "poll";
|
|
637
|
+
title: string;
|
|
638
|
+
options: {
|
|
639
|
+
title: string;
|
|
640
|
+
}[];
|
|
641
|
+
} | {
|
|
642
|
+
type: "poll_option";
|
|
643
|
+
option: {
|
|
644
|
+
title: string;
|
|
645
|
+
};
|
|
646
|
+
poll: {
|
|
647
|
+
type: "poll";
|
|
648
|
+
title: string;
|
|
649
|
+
options: {
|
|
650
|
+
title: string;
|
|
651
|
+
}[];
|
|
652
|
+
};
|
|
653
|
+
selected: boolean;
|
|
654
|
+
title: string;
|
|
512
655
|
} | {
|
|
513
656
|
type: "reaction";
|
|
514
657
|
emoji: string;
|
|
515
658
|
target: Message<string, User, Space<unknown>>;
|
|
659
|
+
} | {
|
|
660
|
+
type: "richlink";
|
|
661
|
+
url: string;
|
|
516
662
|
} | {
|
|
517
663
|
type: "streamText";
|
|
518
664
|
stream: () => AsyncIterable<string>;
|
|
@@ -525,9 +671,6 @@ declare const editSchema: z.ZodObject<{
|
|
|
525
671
|
name?: string | undefined;
|
|
526
672
|
duration?: number | undefined;
|
|
527
673
|
size?: number | undefined;
|
|
528
|
-
} | {
|
|
529
|
-
type: "richlink";
|
|
530
|
-
url: string;
|
|
531
674
|
} | {
|
|
532
675
|
type: "app";
|
|
533
676
|
url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
|
|
@@ -541,35 +684,9 @@ declare const editSchema: z.ZodObject<{
|
|
|
541
684
|
imageSubtitle: z.ZodOptional<z.ZodString>;
|
|
542
685
|
summary: z.ZodOptional<z.ZodString>;
|
|
543
686
|
}, z.core.$strip>>>;
|
|
544
|
-
} | {
|
|
545
|
-
type: "poll";
|
|
546
|
-
title: string;
|
|
547
|
-
options: {
|
|
548
|
-
title: string;
|
|
549
|
-
}[];
|
|
550
|
-
} | {
|
|
551
|
-
type: "poll_option";
|
|
552
|
-
option: {
|
|
553
|
-
title: string;
|
|
554
|
-
};
|
|
555
|
-
poll: {
|
|
556
|
-
type: "poll";
|
|
557
|
-
title: string;
|
|
558
|
-
options: {
|
|
559
|
-
title: string;
|
|
560
|
-
}[];
|
|
561
|
-
};
|
|
562
|
-
selected: boolean;
|
|
563
|
-
title: string;
|
|
564
687
|
} | {
|
|
565
688
|
type: "effect";
|
|
566
689
|
content: {
|
|
567
|
-
type: "text";
|
|
568
|
-
text: string;
|
|
569
|
-
} | {
|
|
570
|
-
type: "markdown";
|
|
571
|
-
markdown: string;
|
|
572
|
-
} | {
|
|
573
690
|
type: "attachment";
|
|
574
691
|
id: string;
|
|
575
692
|
name: string;
|
|
@@ -577,6 +694,12 @@ declare const editSchema: z.ZodObject<{
|
|
|
577
694
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
578
695
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
579
696
|
size?: number | undefined;
|
|
697
|
+
} | {
|
|
698
|
+
type: "text";
|
|
699
|
+
text: string;
|
|
700
|
+
} | {
|
|
701
|
+
type: "markdown";
|
|
702
|
+
markdown: string;
|
|
580
703
|
};
|
|
581
704
|
effect: string;
|
|
582
705
|
} | {
|
|
@@ -594,13 +717,15 @@ declare const editSchema: z.ZodObject<{
|
|
|
594
717
|
} | {
|
|
595
718
|
kind: "clear";
|
|
596
719
|
};
|
|
597
|
-
}, {
|
|
598
|
-
type: "text";
|
|
599
|
-
text: string;
|
|
600
720
|
} | {
|
|
601
|
-
type: "
|
|
602
|
-
|
|
721
|
+
type: "addMember";
|
|
722
|
+
members: string[];
|
|
723
|
+
} | {
|
|
724
|
+
type: "removeMember";
|
|
725
|
+
members: string[];
|
|
603
726
|
} | {
|
|
727
|
+
type: "leaveSpace";
|
|
728
|
+
}, {
|
|
604
729
|
type: "attachment";
|
|
605
730
|
id: string;
|
|
606
731
|
name: string;
|
|
@@ -652,15 +777,44 @@ declare const editSchema: z.ZodObject<{
|
|
|
652
777
|
} | undefined;
|
|
653
778
|
raw?: unknown;
|
|
654
779
|
} | {
|
|
655
|
-
type: "
|
|
656
|
-
|
|
780
|
+
type: "text";
|
|
781
|
+
text: string;
|
|
782
|
+
} | {
|
|
783
|
+
type: "markdown";
|
|
784
|
+
markdown: string;
|
|
657
785
|
} | {
|
|
658
786
|
type: "custom";
|
|
659
787
|
raw: unknown;
|
|
788
|
+
} | {
|
|
789
|
+
type: "group";
|
|
790
|
+
items: Message<string, User, Space<unknown>>[];
|
|
791
|
+
} | {
|
|
792
|
+
type: "poll";
|
|
793
|
+
title: string;
|
|
794
|
+
options: {
|
|
795
|
+
title: string;
|
|
796
|
+
}[];
|
|
797
|
+
} | {
|
|
798
|
+
type: "poll_option";
|
|
799
|
+
option: {
|
|
800
|
+
title: string;
|
|
801
|
+
};
|
|
802
|
+
poll: {
|
|
803
|
+
type: "poll";
|
|
804
|
+
title: string;
|
|
805
|
+
options: {
|
|
806
|
+
title: string;
|
|
807
|
+
}[];
|
|
808
|
+
};
|
|
809
|
+
selected: boolean;
|
|
810
|
+
title: string;
|
|
660
811
|
} | {
|
|
661
812
|
type: "reaction";
|
|
662
813
|
emoji: string;
|
|
663
814
|
target: Message<string, User, Space<unknown>>;
|
|
815
|
+
} | {
|
|
816
|
+
type: "richlink";
|
|
817
|
+
url: string;
|
|
664
818
|
} | {
|
|
665
819
|
type: "streamText";
|
|
666
820
|
stream: () => AsyncIterable<string>;
|
|
@@ -673,9 +827,6 @@ declare const editSchema: z.ZodObject<{
|
|
|
673
827
|
name?: string | undefined;
|
|
674
828
|
duration?: number | undefined;
|
|
675
829
|
size?: number | undefined;
|
|
676
|
-
} | {
|
|
677
|
-
type: "richlink";
|
|
678
|
-
url: string;
|
|
679
830
|
} | {
|
|
680
831
|
type: "app";
|
|
681
832
|
url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
|
|
@@ -689,35 +840,9 @@ declare const editSchema: z.ZodObject<{
|
|
|
689
840
|
imageSubtitle: z.ZodOptional<z.ZodString>;
|
|
690
841
|
summary: z.ZodOptional<z.ZodString>;
|
|
691
842
|
}, z.core.$strip>>>;
|
|
692
|
-
} | {
|
|
693
|
-
type: "poll";
|
|
694
|
-
title: string;
|
|
695
|
-
options: {
|
|
696
|
-
title: string;
|
|
697
|
-
}[];
|
|
698
|
-
} | {
|
|
699
|
-
type: "poll_option";
|
|
700
|
-
option: {
|
|
701
|
-
title: string;
|
|
702
|
-
};
|
|
703
|
-
poll: {
|
|
704
|
-
type: "poll";
|
|
705
|
-
title: string;
|
|
706
|
-
options: {
|
|
707
|
-
title: string;
|
|
708
|
-
}[];
|
|
709
|
-
};
|
|
710
|
-
selected: boolean;
|
|
711
|
-
title: string;
|
|
712
843
|
} | {
|
|
713
844
|
type: "effect";
|
|
714
845
|
content: {
|
|
715
|
-
type: "text";
|
|
716
|
-
text: string;
|
|
717
|
-
} | {
|
|
718
|
-
type: "markdown";
|
|
719
|
-
markdown: string;
|
|
720
|
-
} | {
|
|
721
846
|
type: "attachment";
|
|
722
847
|
id: string;
|
|
723
848
|
name: string;
|
|
@@ -725,6 +850,12 @@ declare const editSchema: z.ZodObject<{
|
|
|
725
850
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
726
851
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
727
852
|
size?: number | undefined;
|
|
853
|
+
} | {
|
|
854
|
+
type: "text";
|
|
855
|
+
text: string;
|
|
856
|
+
} | {
|
|
857
|
+
type: "markdown";
|
|
858
|
+
markdown: string;
|
|
728
859
|
};
|
|
729
860
|
effect: string;
|
|
730
861
|
} | {
|
|
@@ -742,6 +873,14 @@ declare const editSchema: z.ZodObject<{
|
|
|
742
873
|
} | {
|
|
743
874
|
kind: "clear";
|
|
744
875
|
};
|
|
876
|
+
} | {
|
|
877
|
+
type: "addMember";
|
|
878
|
+
members: string[];
|
|
879
|
+
} | {
|
|
880
|
+
type: "removeMember";
|
|
881
|
+
members: string[];
|
|
882
|
+
} | {
|
|
883
|
+
type: "leaveSpace";
|
|
745
884
|
}>;
|
|
746
885
|
target: z.ZodCustom<Message<string, User, Space<unknown>>, Message<string, User, Space<unknown>>>;
|
|
747
886
|
}, z.core.$strip>;
|
|
@@ -942,6 +1081,10 @@ declare function read(target: Message): ContentBuilder;
|
|
|
942
1081
|
* `space.send(rename("New Name"))` is the canonical form; `space.rename(...)`
|
|
943
1082
|
* is universal sugar that delegates here.
|
|
944
1083
|
*
|
|
1084
|
+
* Bidirectional: providers also surface platform rename events as inbound
|
|
1085
|
+
* `Message`s carrying this content; `message.sender` is the user who renamed
|
|
1086
|
+
* the chat (may be `undefined` when the platform recorded no actor).
|
|
1087
|
+
*
|
|
945
1088
|
* Throws at build time if `displayName` is empty. Per-platform constraints
|
|
946
1089
|
* (e.g. group-only, remote-only) surface as `UnsupportedError` from the
|
|
947
1090
|
* provider's `send` action so the canonical and sugar forms share one
|
|
@@ -963,17 +1106,12 @@ declare function rename(displayName: string): ContentBuilder;
|
|
|
963
1106
|
* `reply` like any other content type and route to a threaded send.
|
|
964
1107
|
*
|
|
965
1108
|
* Reply cannot wrap `reply`, `edit`, `reaction`, `group`, `typing`,
|
|
966
|
-
* `rename`, `avatar`, `
|
|
1109
|
+
* `rename`, `avatar`, `addMember`, `removeMember`, `leaveSpace`, `unsend`,
|
|
1110
|
+
* or `read` content.
|
|
967
1111
|
*/
|
|
968
1112
|
declare const replySchema: z.ZodObject<{
|
|
969
1113
|
type: z.ZodLiteral<"reply">;
|
|
970
1114
|
content: z.ZodCustom<{
|
|
971
|
-
type: "text";
|
|
972
|
-
text: string;
|
|
973
|
-
} | {
|
|
974
|
-
type: "markdown";
|
|
975
|
-
markdown: string;
|
|
976
|
-
} | {
|
|
977
1115
|
type: "attachment";
|
|
978
1116
|
id: string;
|
|
979
1117
|
name: string;
|
|
@@ -1025,15 +1163,44 @@ declare const replySchema: z.ZodObject<{
|
|
|
1025
1163
|
} | undefined;
|
|
1026
1164
|
raw?: unknown;
|
|
1027
1165
|
} | {
|
|
1028
|
-
type: "
|
|
1029
|
-
|
|
1166
|
+
type: "text";
|
|
1167
|
+
text: string;
|
|
1168
|
+
} | {
|
|
1169
|
+
type: "markdown";
|
|
1170
|
+
markdown: string;
|
|
1030
1171
|
} | {
|
|
1031
1172
|
type: "custom";
|
|
1032
1173
|
raw: unknown;
|
|
1174
|
+
} | {
|
|
1175
|
+
type: "group";
|
|
1176
|
+
items: Message<string, User, Space<unknown>>[];
|
|
1177
|
+
} | {
|
|
1178
|
+
type: "poll";
|
|
1179
|
+
title: string;
|
|
1180
|
+
options: {
|
|
1181
|
+
title: string;
|
|
1182
|
+
}[];
|
|
1183
|
+
} | {
|
|
1184
|
+
type: "poll_option";
|
|
1185
|
+
option: {
|
|
1186
|
+
title: string;
|
|
1187
|
+
};
|
|
1188
|
+
poll: {
|
|
1189
|
+
type: "poll";
|
|
1190
|
+
title: string;
|
|
1191
|
+
options: {
|
|
1192
|
+
title: string;
|
|
1193
|
+
}[];
|
|
1194
|
+
};
|
|
1195
|
+
selected: boolean;
|
|
1196
|
+
title: string;
|
|
1033
1197
|
} | {
|
|
1034
1198
|
type: "reaction";
|
|
1035
1199
|
emoji: string;
|
|
1036
1200
|
target: Message<string, User, Space<unknown>>;
|
|
1201
|
+
} | {
|
|
1202
|
+
type: "richlink";
|
|
1203
|
+
url: string;
|
|
1037
1204
|
} | {
|
|
1038
1205
|
type: "streamText";
|
|
1039
1206
|
stream: () => AsyncIterable<string>;
|
|
@@ -1046,9 +1213,6 @@ declare const replySchema: z.ZodObject<{
|
|
|
1046
1213
|
name?: string | undefined;
|
|
1047
1214
|
duration?: number | undefined;
|
|
1048
1215
|
size?: number | undefined;
|
|
1049
|
-
} | {
|
|
1050
|
-
type: "richlink";
|
|
1051
|
-
url: string;
|
|
1052
1216
|
} | {
|
|
1053
1217
|
type: "app";
|
|
1054
1218
|
url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
|
|
@@ -1062,35 +1226,9 @@ declare const replySchema: z.ZodObject<{
|
|
|
1062
1226
|
imageSubtitle: z.ZodOptional<z.ZodString>;
|
|
1063
1227
|
summary: z.ZodOptional<z.ZodString>;
|
|
1064
1228
|
}, z.core.$strip>>>;
|
|
1065
|
-
} | {
|
|
1066
|
-
type: "poll";
|
|
1067
|
-
title: string;
|
|
1068
|
-
options: {
|
|
1069
|
-
title: string;
|
|
1070
|
-
}[];
|
|
1071
|
-
} | {
|
|
1072
|
-
type: "poll_option";
|
|
1073
|
-
option: {
|
|
1074
|
-
title: string;
|
|
1075
|
-
};
|
|
1076
|
-
poll: {
|
|
1077
|
-
type: "poll";
|
|
1078
|
-
title: string;
|
|
1079
|
-
options: {
|
|
1080
|
-
title: string;
|
|
1081
|
-
}[];
|
|
1082
|
-
};
|
|
1083
|
-
selected: boolean;
|
|
1084
|
-
title: string;
|
|
1085
1229
|
} | {
|
|
1086
1230
|
type: "effect";
|
|
1087
1231
|
content: {
|
|
1088
|
-
type: "text";
|
|
1089
|
-
text: string;
|
|
1090
|
-
} | {
|
|
1091
|
-
type: "markdown";
|
|
1092
|
-
markdown: string;
|
|
1093
|
-
} | {
|
|
1094
1232
|
type: "attachment";
|
|
1095
1233
|
id: string;
|
|
1096
1234
|
name: string;
|
|
@@ -1098,6 +1236,12 @@ declare const replySchema: z.ZodObject<{
|
|
|
1098
1236
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
1099
1237
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
1100
1238
|
size?: number | undefined;
|
|
1239
|
+
} | {
|
|
1240
|
+
type: "text";
|
|
1241
|
+
text: string;
|
|
1242
|
+
} | {
|
|
1243
|
+
type: "markdown";
|
|
1244
|
+
markdown: string;
|
|
1101
1245
|
};
|
|
1102
1246
|
effect: string;
|
|
1103
1247
|
} | {
|
|
@@ -1115,13 +1259,15 @@ declare const replySchema: z.ZodObject<{
|
|
|
1115
1259
|
} | {
|
|
1116
1260
|
kind: "clear";
|
|
1117
1261
|
};
|
|
1118
|
-
}, {
|
|
1119
|
-
type: "text";
|
|
1120
|
-
text: string;
|
|
1121
1262
|
} | {
|
|
1122
|
-
type: "
|
|
1123
|
-
|
|
1263
|
+
type: "addMember";
|
|
1264
|
+
members: string[];
|
|
1265
|
+
} | {
|
|
1266
|
+
type: "removeMember";
|
|
1267
|
+
members: string[];
|
|
1124
1268
|
} | {
|
|
1269
|
+
type: "leaveSpace";
|
|
1270
|
+
}, {
|
|
1125
1271
|
type: "attachment";
|
|
1126
1272
|
id: string;
|
|
1127
1273
|
name: string;
|
|
@@ -1173,15 +1319,44 @@ declare const replySchema: z.ZodObject<{
|
|
|
1173
1319
|
} | undefined;
|
|
1174
1320
|
raw?: unknown;
|
|
1175
1321
|
} | {
|
|
1176
|
-
type: "
|
|
1177
|
-
|
|
1322
|
+
type: "text";
|
|
1323
|
+
text: string;
|
|
1324
|
+
} | {
|
|
1325
|
+
type: "markdown";
|
|
1326
|
+
markdown: string;
|
|
1178
1327
|
} | {
|
|
1179
1328
|
type: "custom";
|
|
1180
1329
|
raw: unknown;
|
|
1330
|
+
} | {
|
|
1331
|
+
type: "group";
|
|
1332
|
+
items: Message<string, User, Space<unknown>>[];
|
|
1333
|
+
} | {
|
|
1334
|
+
type: "poll";
|
|
1335
|
+
title: string;
|
|
1336
|
+
options: {
|
|
1337
|
+
title: string;
|
|
1338
|
+
}[];
|
|
1339
|
+
} | {
|
|
1340
|
+
type: "poll_option";
|
|
1341
|
+
option: {
|
|
1342
|
+
title: string;
|
|
1343
|
+
};
|
|
1344
|
+
poll: {
|
|
1345
|
+
type: "poll";
|
|
1346
|
+
title: string;
|
|
1347
|
+
options: {
|
|
1348
|
+
title: string;
|
|
1349
|
+
}[];
|
|
1350
|
+
};
|
|
1351
|
+
selected: boolean;
|
|
1352
|
+
title: string;
|
|
1181
1353
|
} | {
|
|
1182
1354
|
type: "reaction";
|
|
1183
1355
|
emoji: string;
|
|
1184
1356
|
target: Message<string, User, Space<unknown>>;
|
|
1357
|
+
} | {
|
|
1358
|
+
type: "richlink";
|
|
1359
|
+
url: string;
|
|
1185
1360
|
} | {
|
|
1186
1361
|
type: "streamText";
|
|
1187
1362
|
stream: () => AsyncIterable<string>;
|
|
@@ -1194,9 +1369,6 @@ declare const replySchema: z.ZodObject<{
|
|
|
1194
1369
|
name?: string | undefined;
|
|
1195
1370
|
duration?: number | undefined;
|
|
1196
1371
|
size?: number | undefined;
|
|
1197
|
-
} | {
|
|
1198
|
-
type: "richlink";
|
|
1199
|
-
url: string;
|
|
1200
1372
|
} | {
|
|
1201
1373
|
type: "app";
|
|
1202
1374
|
url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
|
|
@@ -1210,35 +1382,9 @@ declare const replySchema: z.ZodObject<{
|
|
|
1210
1382
|
imageSubtitle: z.ZodOptional<z.ZodString>;
|
|
1211
1383
|
summary: z.ZodOptional<z.ZodString>;
|
|
1212
1384
|
}, z.core.$strip>>>;
|
|
1213
|
-
} | {
|
|
1214
|
-
type: "poll";
|
|
1215
|
-
title: string;
|
|
1216
|
-
options: {
|
|
1217
|
-
title: string;
|
|
1218
|
-
}[];
|
|
1219
|
-
} | {
|
|
1220
|
-
type: "poll_option";
|
|
1221
|
-
option: {
|
|
1222
|
-
title: string;
|
|
1223
|
-
};
|
|
1224
|
-
poll: {
|
|
1225
|
-
type: "poll";
|
|
1226
|
-
title: string;
|
|
1227
|
-
options: {
|
|
1228
|
-
title: string;
|
|
1229
|
-
}[];
|
|
1230
|
-
};
|
|
1231
|
-
selected: boolean;
|
|
1232
|
-
title: string;
|
|
1233
1385
|
} | {
|
|
1234
1386
|
type: "effect";
|
|
1235
1387
|
content: {
|
|
1236
|
-
type: "text";
|
|
1237
|
-
text: string;
|
|
1238
|
-
} | {
|
|
1239
|
-
type: "markdown";
|
|
1240
|
-
markdown: string;
|
|
1241
|
-
} | {
|
|
1242
1388
|
type: "attachment";
|
|
1243
1389
|
id: string;
|
|
1244
1390
|
name: string;
|
|
@@ -1246,6 +1392,12 @@ declare const replySchema: z.ZodObject<{
|
|
|
1246
1392
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
1247
1393
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
1248
1394
|
size?: number | undefined;
|
|
1395
|
+
} | {
|
|
1396
|
+
type: "text";
|
|
1397
|
+
text: string;
|
|
1398
|
+
} | {
|
|
1399
|
+
type: "markdown";
|
|
1400
|
+
markdown: string;
|
|
1249
1401
|
};
|
|
1250
1402
|
effect: string;
|
|
1251
1403
|
} | {
|
|
@@ -1263,6 +1415,14 @@ declare const replySchema: z.ZodObject<{
|
|
|
1263
1415
|
} | {
|
|
1264
1416
|
kind: "clear";
|
|
1265
1417
|
};
|
|
1418
|
+
} | {
|
|
1419
|
+
type: "addMember";
|
|
1420
|
+
members: string[];
|
|
1421
|
+
} | {
|
|
1422
|
+
type: "removeMember";
|
|
1423
|
+
members: string[];
|
|
1424
|
+
} | {
|
|
1425
|
+
type: "leaveSpace";
|
|
1266
1426
|
}>;
|
|
1267
1427
|
target: z.ZodCustom<Message<string, User, Space<unknown>>, Message<string, User, Space<unknown>>>;
|
|
1268
1428
|
}, z.core.$strip>;
|
|
@@ -5991,7 +6151,8 @@ declare function broadcast<T>(source: ManagedStream<T>): Broadcaster<T>;
|
|
|
5991
6151
|
* side effect.
|
|
5992
6152
|
*
|
|
5993
6153
|
* Names that collide with reserved `Space` keys (`send`, `edit`, `unsend`,
|
|
5994
|
-
* `getMessage`, `
|
|
6154
|
+
* `read`, `getMessage`, `getMembers`, `getAvatar`, `rename`, `avatar`, `add`,
|
|
6155
|
+
* `remove`, `leave`, `startTyping`, `stopTyping`, `responding`, `id`,
|
|
5995
6156
|
* `__platform`) are skipped at runtime with a warning and excluded at the
|
|
5996
6157
|
* type level via `Exclude<…, keyof Space>`.
|
|
5997
6158
|
*/
|
|
@@ -6022,11 +6183,12 @@ type MessageActionFn = (message: Message, ...args: never[]) => Promise<void>;
|
|
|
6022
6183
|
*
|
|
6023
6184
|
* Two tiers live in the same `actions?` slot:
|
|
6024
6185
|
*
|
|
6025
|
-
* - **Platform-wise actions** — fixed framework-known names (
|
|
6026
|
-
* `
|
|
6027
|
-
* power universal sugar
|
|
6028
|
-
*
|
|
6029
|
-
*
|
|
6186
|
+
* - **Platform-wise actions** — fixed framework-known names (`getMessage`,
|
|
6187
|
+
* `getMembers`, `getAvatar`) whose signatures are defined by
|
|
6188
|
+
* `PlatformWiseActions`. They power universal sugar
|
|
6189
|
+
* (`space.getMessage(id)`, `space.getMembers()`, `space.getAvatar()`) AND
|
|
6190
|
+
* surface on the platform instance. If a provider omits one, the framework
|
|
6191
|
+
* wires a default that throws `UnsupportedError`.
|
|
6030
6192
|
* - **Platform-specific actions** — free-form keys each platform declares
|
|
6031
6193
|
* for its own ergonomics (e.g. iMessage's `getAttachment`). Surface on
|
|
6032
6194
|
* the platform instance only.
|
|
@@ -6044,13 +6206,32 @@ type InstanceActionFn = (ctx: any, ...args: any[]) => Promise<unknown>;
|
|
|
6044
6206
|
* by declaring the key inside their `actions` slot, and platforms that omit
|
|
6045
6207
|
* the key get a default that throws `UnsupportedError`.
|
|
6046
6208
|
*
|
|
6047
|
-
* Add a new platform-wise capability by extending this record
|
|
6048
|
-
*
|
|
6049
|
-
*
|
|
6209
|
+
* Add a new platform-wise capability by extending this record along with:
|
|
6210
|
+
* `PlatformWiseInstanceMethods` (the public instance signature), the runtime
|
|
6211
|
+
* list `PLATFORM_WISE_ACTION_KEYS` in `build.ts`, and — when the capability
|
|
6212
|
+
* surfaces as universal `Space` sugar — the `Space` interface plus a
|
|
6213
|
+
* `buildSpace` impl and `RESERVED_SPACE_KEYS` entry. The instance method is
|
|
6214
|
+
* then surfaced on every `PlatformInstance` automatically.
|
|
6050
6215
|
*/
|
|
6051
6216
|
interface PlatformWiseActions<_ResolvedSpace extends {
|
|
6052
6217
|
id: string;
|
|
6053
6218
|
}, _MessageType, _Client, _Config> {
|
|
6219
|
+
getAvatar: (ctx: {
|
|
6220
|
+
client: _Client;
|
|
6221
|
+
config: _Config;
|
|
6222
|
+
store: Store;
|
|
6223
|
+
}, space: _ResolvedSpace & {
|
|
6224
|
+
id: string;
|
|
6225
|
+
__platform: string;
|
|
6226
|
+
}) => Promise<AvatarData | undefined>;
|
|
6227
|
+
getMembers: (ctx: {
|
|
6228
|
+
client: _Client;
|
|
6229
|
+
config: _Config;
|
|
6230
|
+
store: Store;
|
|
6231
|
+
}, space: _ResolvedSpace & {
|
|
6232
|
+
id: string;
|
|
6233
|
+
__platform: string;
|
|
6234
|
+
}) => Promise<readonly ProviderUserRecord[]>;
|
|
6054
6235
|
getMessage: (ctx: {
|
|
6055
6236
|
client: _Client;
|
|
6056
6237
|
config: _Config;
|
|
@@ -6089,7 +6270,7 @@ type EventProducer<TPayload = unknown, TClient = unknown, TConfig = unknown> = (
|
|
|
6089
6270
|
type ProviderMessage<TSender extends ResolvedUser = ResolvedUser, TSpace extends ResolvedSpace = ResolvedSpace, TExtra extends object = Record<never, never>> = {
|
|
6090
6271
|
id: string;
|
|
6091
6272
|
content: Content;
|
|
6092
|
-
sender
|
|
6273
|
+
sender?: TSender;
|
|
6093
6274
|
space: TSpace;
|
|
6094
6275
|
timestamp?: Date;
|
|
6095
6276
|
} & TExtra;
|
|
@@ -6116,6 +6297,17 @@ type ProviderMessageRecord = {
|
|
|
6116
6297
|
} & Record<string, unknown>;
|
|
6117
6298
|
timestamp?: Date;
|
|
6118
6299
|
} & Record<string, unknown>;
|
|
6300
|
+
/**
|
|
6301
|
+
* A chat participant a provider returned from `actions.getMembers` — the raw
|
|
6302
|
+
* record shape, mirroring `ProviderMessageRecord.sender`. `id` is the user's
|
|
6303
|
+
* canonical platform identifier (the same handle format `space.create`
|
|
6304
|
+
* accepts); platform extras (e.g. iMessage's `address`/`country`/`service`)
|
|
6305
|
+
* ride along untyped. `space.getMembers()` tags each record with
|
|
6306
|
+
* `__platform` before surfacing it as a `User`.
|
|
6307
|
+
*/
|
|
6308
|
+
type ProviderUserRecord = {
|
|
6309
|
+
id: string;
|
|
6310
|
+
} & Record<string, unknown>;
|
|
6119
6311
|
type MergeSchema<TSchema extends z.ZodType | undefined, TBase extends object> = TSchema extends z.ZodType ? string extends keyof z.infer<TSchema> ? TBase : Omit<z.infer<TSchema>, keyof TBase> & TBase : TBase;
|
|
6120
6312
|
type SchemaMessage<TUserSchema extends z.ZodType | undefined = undefined, TSpaceSchema extends z.ZodType | undefined = undefined> = ProviderMessage<MergeSchema<TUserSchema, ResolvedUser>, MergeSchema<TSpaceSchema, ResolvedSpace>>;
|
|
6121
6313
|
type InferEventPayload<T> = T extends z.ZodType ? z.infer<T> : T extends ((ctx: never) => AsyncIterable<infer P>) ? P : never;
|
|
@@ -6157,13 +6349,14 @@ interface PlatformDef<_Name extends string = string, _ConfigSchema extends z.Zod
|
|
|
6157
6349
|
*
|
|
6158
6350
|
* Two tiers share this slot:
|
|
6159
6351
|
*
|
|
6160
|
-
* 1. **Platform-wise actions** (`getMessage`) —
|
|
6161
|
-
* declared in `PlatformWiseActions`. Override
|
|
6162
|
-
* with the matching signature. The framework
|
|
6163
|
-
* config, store }` as the first arg and
|
|
6164
|
-
*
|
|
6165
|
-
*
|
|
6166
|
-
* universal sugar like
|
|
6352
|
+
* 1. **Platform-wise actions** (`getMessage`, `getMembers`, `getAvatar`) —
|
|
6353
|
+
* framework-recognized names declared in `PlatformWiseActions`. Override
|
|
6354
|
+
* by declaring the key here with the matching signature. The framework
|
|
6355
|
+
* injects `ctx = { client, config, store }` as the first arg and
|
|
6356
|
+
* surfaces the method on the platform instance
|
|
6357
|
+
* (`im.getMessage(space, id)`). If omitted, the framework wires a
|
|
6358
|
+
* default that throws `UnsupportedError`. Powers universal sugar like
|
|
6359
|
+
* `space.getMessage(id)`.
|
|
6167
6360
|
*
|
|
6168
6361
|
* 2. **Platform-specific actions** — free-form keys like `getAttachment`.
|
|
6169
6362
|
* Each gets `ctx = { client, config, store }` as the first arg; the
|
|
@@ -6301,9 +6494,10 @@ interface PlatformDef<_Name extends string = string, _ConfigSchema extends z.Zod
|
|
|
6301
6494
|
* lives here for platform-specific surface area.
|
|
6302
6495
|
*
|
|
6303
6496
|
* Names that collide with reserved `Space` keys (`send`, `edit`,
|
|
6304
|
-
* `unsend`, `getMessage`, `
|
|
6305
|
-
* `
|
|
6306
|
-
* at
|
|
6497
|
+
* `unsend`, `read`, `getMessage`, `getMembers`, `getAvatar`, `rename`,
|
|
6498
|
+
* `avatar`, `add`, `remove`, `leave`, `startTyping`, `stopTyping`,
|
|
6499
|
+
* `responding`, `id`, `__platform`) are skipped at runtime with a
|
|
6500
|
+
* warning and excluded at the type level.
|
|
6307
6501
|
*/
|
|
6308
6502
|
actions?: _SpaceActions;
|
|
6309
6503
|
};
|
|
@@ -6410,6 +6604,8 @@ type InstanceActionFns<Def extends AnyPlatformDef> = Def["actions"] extends infe
|
|
|
6410
6604
|
type ReservedInstanceKeys<Def extends AnyPlatformDef> = "user" | "space" | "messages" | PlatformWiseActionKey | Extract<keyof CustomEventInstanceProperties<Def>, string>;
|
|
6411
6605
|
type InstanceActionMethods<Def extends AnyPlatformDef> = { [K in Exclude<keyof InstanceActionFns<Def>, ReservedInstanceKeys<Def> | symbol | number>]: (...args: TailArgs<Parameters<InstanceActionFns<Def>[K]>>) => ReturnType<InstanceActionFns<Def>[K]> };
|
|
6412
6606
|
interface PlatformWiseInstanceMethods<Def extends AnyPlatformDef> {
|
|
6607
|
+
getAvatar: (space: PlatformSpace<Def>) => Promise<AvatarData | undefined>;
|
|
6608
|
+
getMembers: (space: PlatformSpace<Def>) => Promise<PlatformUser<Def>[]>;
|
|
6413
6609
|
getMessage: (space: PlatformSpace<Def>, messageId: string) => Promise<PlatformMessage<Def> | undefined>;
|
|
6414
6610
|
}
|
|
6415
6611
|
type PlatformSpace<Def extends AnyPlatformDef> = Omit<SpaceShapeOf<Def>, keyof Space | keyof SpaceActionMethods<Def>> & Space & SpaceActionMethods<Def>;
|
|
@@ -6852,6 +7048,14 @@ declare const baseContentSchema: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
|
6852
7048
|
}, z.core.$strip>, z.ZodObject<{
|
|
6853
7049
|
kind: z.ZodLiteral<"clear">;
|
|
6854
7050
|
}, z.core.$strip>], "kind">;
|
|
7051
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7052
|
+
type: z.ZodLiteral<"addMember">;
|
|
7053
|
+
members: z.ZodArray<z.ZodString>;
|
|
7054
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7055
|
+
type: z.ZodLiteral<"removeMember">;
|
|
7056
|
+
members: z.ZodArray<z.ZodString>;
|
|
7057
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7058
|
+
type: z.ZodLiteral<"leaveSpace">;
|
|
6855
7059
|
}, z.core.$strip>], "type">;
|
|
6856
7060
|
type BaseContent = z.infer<typeof baseContentSchema>;
|
|
6857
7061
|
declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -7021,15 +7225,17 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7021
7225
|
}, z.core.$strip>, z.ZodObject<{
|
|
7022
7226
|
kind: z.ZodLiteral<"clear">;
|
|
7023
7227
|
}, z.core.$strip>], "kind">;
|
|
7228
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7229
|
+
type: z.ZodLiteral<"addMember">;
|
|
7230
|
+
members: z.ZodArray<z.ZodString>;
|
|
7231
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7232
|
+
type: z.ZodLiteral<"removeMember">;
|
|
7233
|
+
members: z.ZodArray<z.ZodString>;
|
|
7234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7235
|
+
type: z.ZodLiteral<"leaveSpace">;
|
|
7024
7236
|
}, z.core.$strip>, z.ZodObject<{
|
|
7025
7237
|
type: z.ZodLiteral<"reply">;
|
|
7026
7238
|
content: z.ZodCustom<{
|
|
7027
|
-
type: "text";
|
|
7028
|
-
text: string;
|
|
7029
|
-
} | {
|
|
7030
|
-
type: "markdown";
|
|
7031
|
-
markdown: string;
|
|
7032
|
-
} | {
|
|
7033
7239
|
type: "attachment";
|
|
7034
7240
|
id: string;
|
|
7035
7241
|
name: string;
|
|
@@ -7081,15 +7287,44 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7081
7287
|
} | undefined;
|
|
7082
7288
|
raw?: unknown;
|
|
7083
7289
|
} | {
|
|
7084
|
-
type: "
|
|
7085
|
-
|
|
7290
|
+
type: "text";
|
|
7291
|
+
text: string;
|
|
7292
|
+
} | {
|
|
7293
|
+
type: "markdown";
|
|
7294
|
+
markdown: string;
|
|
7086
7295
|
} | {
|
|
7087
7296
|
type: "custom";
|
|
7088
7297
|
raw: unknown;
|
|
7298
|
+
} | {
|
|
7299
|
+
type: "group";
|
|
7300
|
+
items: Message<string, User, Space<unknown>>[];
|
|
7301
|
+
} | {
|
|
7302
|
+
type: "poll";
|
|
7303
|
+
title: string;
|
|
7304
|
+
options: {
|
|
7305
|
+
title: string;
|
|
7306
|
+
}[];
|
|
7307
|
+
} | {
|
|
7308
|
+
type: "poll_option";
|
|
7309
|
+
option: {
|
|
7310
|
+
title: string;
|
|
7311
|
+
};
|
|
7312
|
+
poll: {
|
|
7313
|
+
type: "poll";
|
|
7314
|
+
title: string;
|
|
7315
|
+
options: {
|
|
7316
|
+
title: string;
|
|
7317
|
+
}[];
|
|
7318
|
+
};
|
|
7319
|
+
selected: boolean;
|
|
7320
|
+
title: string;
|
|
7089
7321
|
} | {
|
|
7090
7322
|
type: "reaction";
|
|
7091
7323
|
emoji: string;
|
|
7092
7324
|
target: Message<string, User, Space<unknown>>;
|
|
7325
|
+
} | {
|
|
7326
|
+
type: "richlink";
|
|
7327
|
+
url: string;
|
|
7093
7328
|
} | {
|
|
7094
7329
|
type: "streamText";
|
|
7095
7330
|
stream: () => AsyncIterable<string>;
|
|
@@ -7102,9 +7337,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7102
7337
|
name?: string | undefined;
|
|
7103
7338
|
duration?: number | undefined;
|
|
7104
7339
|
size?: number | undefined;
|
|
7105
|
-
} | {
|
|
7106
|
-
type: "richlink";
|
|
7107
|
-
url: string;
|
|
7108
7340
|
} | {
|
|
7109
7341
|
type: "app";
|
|
7110
7342
|
url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
|
|
@@ -7118,35 +7350,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7118
7350
|
imageSubtitle: z.ZodOptional<z.ZodString>;
|
|
7119
7351
|
summary: z.ZodOptional<z.ZodString>;
|
|
7120
7352
|
}, z.core.$strip>>>;
|
|
7121
|
-
} | {
|
|
7122
|
-
type: "poll";
|
|
7123
|
-
title: string;
|
|
7124
|
-
options: {
|
|
7125
|
-
title: string;
|
|
7126
|
-
}[];
|
|
7127
|
-
} | {
|
|
7128
|
-
type: "poll_option";
|
|
7129
|
-
option: {
|
|
7130
|
-
title: string;
|
|
7131
|
-
};
|
|
7132
|
-
poll: {
|
|
7133
|
-
type: "poll";
|
|
7134
|
-
title: string;
|
|
7135
|
-
options: {
|
|
7136
|
-
title: string;
|
|
7137
|
-
}[];
|
|
7138
|
-
};
|
|
7139
|
-
selected: boolean;
|
|
7140
|
-
title: string;
|
|
7141
7353
|
} | {
|
|
7142
7354
|
type: "effect";
|
|
7143
7355
|
content: {
|
|
7144
|
-
type: "text";
|
|
7145
|
-
text: string;
|
|
7146
|
-
} | {
|
|
7147
|
-
type: "markdown";
|
|
7148
|
-
markdown: string;
|
|
7149
|
-
} | {
|
|
7150
7356
|
type: "attachment";
|
|
7151
7357
|
id: string;
|
|
7152
7358
|
name: string;
|
|
@@ -7154,6 +7360,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7154
7360
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7155
7361
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
7156
7362
|
size?: number | undefined;
|
|
7363
|
+
} | {
|
|
7364
|
+
type: "text";
|
|
7365
|
+
text: string;
|
|
7366
|
+
} | {
|
|
7367
|
+
type: "markdown";
|
|
7368
|
+
markdown: string;
|
|
7157
7369
|
};
|
|
7158
7370
|
effect: string;
|
|
7159
7371
|
} | {
|
|
@@ -7171,13 +7383,15 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7171
7383
|
} | {
|
|
7172
7384
|
kind: "clear";
|
|
7173
7385
|
};
|
|
7174
|
-
}, {
|
|
7175
|
-
type: "text";
|
|
7176
|
-
text: string;
|
|
7177
7386
|
} | {
|
|
7178
|
-
type: "
|
|
7179
|
-
|
|
7387
|
+
type: "addMember";
|
|
7388
|
+
members: string[];
|
|
7389
|
+
} | {
|
|
7390
|
+
type: "removeMember";
|
|
7391
|
+
members: string[];
|
|
7180
7392
|
} | {
|
|
7393
|
+
type: "leaveSpace";
|
|
7394
|
+
}, {
|
|
7181
7395
|
type: "attachment";
|
|
7182
7396
|
id: string;
|
|
7183
7397
|
name: string;
|
|
@@ -7229,15 +7443,44 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7229
7443
|
} | undefined;
|
|
7230
7444
|
raw?: unknown;
|
|
7231
7445
|
} | {
|
|
7232
|
-
type: "
|
|
7233
|
-
|
|
7446
|
+
type: "text";
|
|
7447
|
+
text: string;
|
|
7448
|
+
} | {
|
|
7449
|
+
type: "markdown";
|
|
7450
|
+
markdown: string;
|
|
7234
7451
|
} | {
|
|
7235
7452
|
type: "custom";
|
|
7236
7453
|
raw: unknown;
|
|
7454
|
+
} | {
|
|
7455
|
+
type: "group";
|
|
7456
|
+
items: Message<string, User, Space<unknown>>[];
|
|
7457
|
+
} | {
|
|
7458
|
+
type: "poll";
|
|
7459
|
+
title: string;
|
|
7460
|
+
options: {
|
|
7461
|
+
title: string;
|
|
7462
|
+
}[];
|
|
7463
|
+
} | {
|
|
7464
|
+
type: "poll_option";
|
|
7465
|
+
option: {
|
|
7466
|
+
title: string;
|
|
7467
|
+
};
|
|
7468
|
+
poll: {
|
|
7469
|
+
type: "poll";
|
|
7470
|
+
title: string;
|
|
7471
|
+
options: {
|
|
7472
|
+
title: string;
|
|
7473
|
+
}[];
|
|
7474
|
+
};
|
|
7475
|
+
selected: boolean;
|
|
7476
|
+
title: string;
|
|
7237
7477
|
} | {
|
|
7238
7478
|
type: "reaction";
|
|
7239
7479
|
emoji: string;
|
|
7240
7480
|
target: Message<string, User, Space<unknown>>;
|
|
7481
|
+
} | {
|
|
7482
|
+
type: "richlink";
|
|
7483
|
+
url: string;
|
|
7241
7484
|
} | {
|
|
7242
7485
|
type: "streamText";
|
|
7243
7486
|
stream: () => AsyncIterable<string>;
|
|
@@ -7250,9 +7493,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7250
7493
|
name?: string | undefined;
|
|
7251
7494
|
duration?: number | undefined;
|
|
7252
7495
|
size?: number | undefined;
|
|
7253
|
-
} | {
|
|
7254
|
-
type: "richlink";
|
|
7255
|
-
url: string;
|
|
7256
7496
|
} | {
|
|
7257
7497
|
type: "app";
|
|
7258
7498
|
url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
|
|
@@ -7266,35 +7506,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7266
7506
|
imageSubtitle: z.ZodOptional<z.ZodString>;
|
|
7267
7507
|
summary: z.ZodOptional<z.ZodString>;
|
|
7268
7508
|
}, z.core.$strip>>>;
|
|
7269
|
-
} | {
|
|
7270
|
-
type: "poll";
|
|
7271
|
-
title: string;
|
|
7272
|
-
options: {
|
|
7273
|
-
title: string;
|
|
7274
|
-
}[];
|
|
7275
|
-
} | {
|
|
7276
|
-
type: "poll_option";
|
|
7277
|
-
option: {
|
|
7278
|
-
title: string;
|
|
7279
|
-
};
|
|
7280
|
-
poll: {
|
|
7281
|
-
type: "poll";
|
|
7282
|
-
title: string;
|
|
7283
|
-
options: {
|
|
7284
|
-
title: string;
|
|
7285
|
-
}[];
|
|
7286
|
-
};
|
|
7287
|
-
selected: boolean;
|
|
7288
|
-
title: string;
|
|
7289
7509
|
} | {
|
|
7290
7510
|
type: "effect";
|
|
7291
7511
|
content: {
|
|
7292
|
-
type: "text";
|
|
7293
|
-
text: string;
|
|
7294
|
-
} | {
|
|
7295
|
-
type: "markdown";
|
|
7296
|
-
markdown: string;
|
|
7297
|
-
} | {
|
|
7298
7512
|
type: "attachment";
|
|
7299
7513
|
id: string;
|
|
7300
7514
|
name: string;
|
|
@@ -7302,6 +7516,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7302
7516
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7303
7517
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
7304
7518
|
size?: number | undefined;
|
|
7519
|
+
} | {
|
|
7520
|
+
type: "text";
|
|
7521
|
+
text: string;
|
|
7522
|
+
} | {
|
|
7523
|
+
type: "markdown";
|
|
7524
|
+
markdown: string;
|
|
7305
7525
|
};
|
|
7306
7526
|
effect: string;
|
|
7307
7527
|
} | {
|
|
@@ -7319,17 +7539,19 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7319
7539
|
} | {
|
|
7320
7540
|
kind: "clear";
|
|
7321
7541
|
};
|
|
7542
|
+
} | {
|
|
7543
|
+
type: "addMember";
|
|
7544
|
+
members: string[];
|
|
7545
|
+
} | {
|
|
7546
|
+
type: "removeMember";
|
|
7547
|
+
members: string[];
|
|
7548
|
+
} | {
|
|
7549
|
+
type: "leaveSpace";
|
|
7322
7550
|
}>;
|
|
7323
7551
|
target: z.ZodCustom<Message<string, User, Space<unknown>>, Message<string, User, Space<unknown>>>;
|
|
7324
7552
|
}, z.core.$strip>, z.ZodObject<{
|
|
7325
7553
|
type: z.ZodLiteral<"edit">;
|
|
7326
7554
|
content: z.ZodCustom<{
|
|
7327
|
-
type: "text";
|
|
7328
|
-
text: string;
|
|
7329
|
-
} | {
|
|
7330
|
-
type: "markdown";
|
|
7331
|
-
markdown: string;
|
|
7332
|
-
} | {
|
|
7333
7555
|
type: "attachment";
|
|
7334
7556
|
id: string;
|
|
7335
7557
|
name: string;
|
|
@@ -7381,15 +7603,44 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7381
7603
|
} | undefined;
|
|
7382
7604
|
raw?: unknown;
|
|
7383
7605
|
} | {
|
|
7384
|
-
type: "
|
|
7385
|
-
|
|
7606
|
+
type: "text";
|
|
7607
|
+
text: string;
|
|
7608
|
+
} | {
|
|
7609
|
+
type: "markdown";
|
|
7610
|
+
markdown: string;
|
|
7386
7611
|
} | {
|
|
7387
7612
|
type: "custom";
|
|
7388
7613
|
raw: unknown;
|
|
7614
|
+
} | {
|
|
7615
|
+
type: "group";
|
|
7616
|
+
items: Message<string, User, Space<unknown>>[];
|
|
7617
|
+
} | {
|
|
7618
|
+
type: "poll";
|
|
7619
|
+
title: string;
|
|
7620
|
+
options: {
|
|
7621
|
+
title: string;
|
|
7622
|
+
}[];
|
|
7623
|
+
} | {
|
|
7624
|
+
type: "poll_option";
|
|
7625
|
+
option: {
|
|
7626
|
+
title: string;
|
|
7627
|
+
};
|
|
7628
|
+
poll: {
|
|
7629
|
+
type: "poll";
|
|
7630
|
+
title: string;
|
|
7631
|
+
options: {
|
|
7632
|
+
title: string;
|
|
7633
|
+
}[];
|
|
7634
|
+
};
|
|
7635
|
+
selected: boolean;
|
|
7636
|
+
title: string;
|
|
7389
7637
|
} | {
|
|
7390
7638
|
type: "reaction";
|
|
7391
7639
|
emoji: string;
|
|
7392
7640
|
target: Message<string, User, Space<unknown>>;
|
|
7641
|
+
} | {
|
|
7642
|
+
type: "richlink";
|
|
7643
|
+
url: string;
|
|
7393
7644
|
} | {
|
|
7394
7645
|
type: "streamText";
|
|
7395
7646
|
stream: () => AsyncIterable<string>;
|
|
@@ -7402,9 +7653,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7402
7653
|
name?: string | undefined;
|
|
7403
7654
|
duration?: number | undefined;
|
|
7404
7655
|
size?: number | undefined;
|
|
7405
|
-
} | {
|
|
7406
|
-
type: "richlink";
|
|
7407
|
-
url: string;
|
|
7408
7656
|
} | {
|
|
7409
7657
|
type: "app";
|
|
7410
7658
|
url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
|
|
@@ -7418,35 +7666,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7418
7666
|
imageSubtitle: z.ZodOptional<z.ZodString>;
|
|
7419
7667
|
summary: z.ZodOptional<z.ZodString>;
|
|
7420
7668
|
}, z.core.$strip>>>;
|
|
7421
|
-
} | {
|
|
7422
|
-
type: "poll";
|
|
7423
|
-
title: string;
|
|
7424
|
-
options: {
|
|
7425
|
-
title: string;
|
|
7426
|
-
}[];
|
|
7427
|
-
} | {
|
|
7428
|
-
type: "poll_option";
|
|
7429
|
-
option: {
|
|
7430
|
-
title: string;
|
|
7431
|
-
};
|
|
7432
|
-
poll: {
|
|
7433
|
-
type: "poll";
|
|
7434
|
-
title: string;
|
|
7435
|
-
options: {
|
|
7436
|
-
title: string;
|
|
7437
|
-
}[];
|
|
7438
|
-
};
|
|
7439
|
-
selected: boolean;
|
|
7440
|
-
title: string;
|
|
7441
7669
|
} | {
|
|
7442
7670
|
type: "effect";
|
|
7443
7671
|
content: {
|
|
7444
|
-
type: "text";
|
|
7445
|
-
text: string;
|
|
7446
|
-
} | {
|
|
7447
|
-
type: "markdown";
|
|
7448
|
-
markdown: string;
|
|
7449
|
-
} | {
|
|
7450
7672
|
type: "attachment";
|
|
7451
7673
|
id: string;
|
|
7452
7674
|
name: string;
|
|
@@ -7454,6 +7676,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7454
7676
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7455
7677
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
7456
7678
|
size?: number | undefined;
|
|
7679
|
+
} | {
|
|
7680
|
+
type: "text";
|
|
7681
|
+
text: string;
|
|
7682
|
+
} | {
|
|
7683
|
+
type: "markdown";
|
|
7684
|
+
markdown: string;
|
|
7457
7685
|
};
|
|
7458
7686
|
effect: string;
|
|
7459
7687
|
} | {
|
|
@@ -7471,13 +7699,15 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7471
7699
|
} | {
|
|
7472
7700
|
kind: "clear";
|
|
7473
7701
|
};
|
|
7474
|
-
}, {
|
|
7475
|
-
type: "text";
|
|
7476
|
-
text: string;
|
|
7477
7702
|
} | {
|
|
7478
|
-
type: "
|
|
7479
|
-
|
|
7703
|
+
type: "addMember";
|
|
7704
|
+
members: string[];
|
|
7480
7705
|
} | {
|
|
7706
|
+
type: "removeMember";
|
|
7707
|
+
members: string[];
|
|
7708
|
+
} | {
|
|
7709
|
+
type: "leaveSpace";
|
|
7710
|
+
}, {
|
|
7481
7711
|
type: "attachment";
|
|
7482
7712
|
id: string;
|
|
7483
7713
|
name: string;
|
|
@@ -7529,15 +7759,44 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7529
7759
|
} | undefined;
|
|
7530
7760
|
raw?: unknown;
|
|
7531
7761
|
} | {
|
|
7532
|
-
type: "
|
|
7533
|
-
|
|
7762
|
+
type: "text";
|
|
7763
|
+
text: string;
|
|
7764
|
+
} | {
|
|
7765
|
+
type: "markdown";
|
|
7766
|
+
markdown: string;
|
|
7534
7767
|
} | {
|
|
7535
7768
|
type: "custom";
|
|
7536
7769
|
raw: unknown;
|
|
7770
|
+
} | {
|
|
7771
|
+
type: "group";
|
|
7772
|
+
items: Message<string, User, Space<unknown>>[];
|
|
7773
|
+
} | {
|
|
7774
|
+
type: "poll";
|
|
7775
|
+
title: string;
|
|
7776
|
+
options: {
|
|
7777
|
+
title: string;
|
|
7778
|
+
}[];
|
|
7779
|
+
} | {
|
|
7780
|
+
type: "poll_option";
|
|
7781
|
+
option: {
|
|
7782
|
+
title: string;
|
|
7783
|
+
};
|
|
7784
|
+
poll: {
|
|
7785
|
+
type: "poll";
|
|
7786
|
+
title: string;
|
|
7787
|
+
options: {
|
|
7788
|
+
title: string;
|
|
7789
|
+
}[];
|
|
7790
|
+
};
|
|
7791
|
+
selected: boolean;
|
|
7792
|
+
title: string;
|
|
7537
7793
|
} | {
|
|
7538
7794
|
type: "reaction";
|
|
7539
7795
|
emoji: string;
|
|
7540
7796
|
target: Message<string, User, Space<unknown>>;
|
|
7797
|
+
} | {
|
|
7798
|
+
type: "richlink";
|
|
7799
|
+
url: string;
|
|
7541
7800
|
} | {
|
|
7542
7801
|
type: "streamText";
|
|
7543
7802
|
stream: () => AsyncIterable<string>;
|
|
@@ -7550,9 +7809,6 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7550
7809
|
name?: string | undefined;
|
|
7551
7810
|
duration?: number | undefined;
|
|
7552
7811
|
size?: number | undefined;
|
|
7553
|
-
} | {
|
|
7554
|
-
type: "richlink";
|
|
7555
|
-
url: string;
|
|
7556
7812
|
} | {
|
|
7557
7813
|
type: "app";
|
|
7558
7814
|
url: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodURL>>;
|
|
@@ -7566,35 +7822,9 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7566
7822
|
imageSubtitle: z.ZodOptional<z.ZodString>;
|
|
7567
7823
|
summary: z.ZodOptional<z.ZodString>;
|
|
7568
7824
|
}, z.core.$strip>>>;
|
|
7569
|
-
} | {
|
|
7570
|
-
type: "poll";
|
|
7571
|
-
title: string;
|
|
7572
|
-
options: {
|
|
7573
|
-
title: string;
|
|
7574
|
-
}[];
|
|
7575
|
-
} | {
|
|
7576
|
-
type: "poll_option";
|
|
7577
|
-
option: {
|
|
7578
|
-
title: string;
|
|
7579
|
-
};
|
|
7580
|
-
poll: {
|
|
7581
|
-
type: "poll";
|
|
7582
|
-
title: string;
|
|
7583
|
-
options: {
|
|
7584
|
-
title: string;
|
|
7585
|
-
}[];
|
|
7586
|
-
};
|
|
7587
|
-
selected: boolean;
|
|
7588
|
-
title: string;
|
|
7589
7825
|
} | {
|
|
7590
7826
|
type: "effect";
|
|
7591
7827
|
content: {
|
|
7592
|
-
type: "text";
|
|
7593
|
-
text: string;
|
|
7594
|
-
} | {
|
|
7595
|
-
type: "markdown";
|
|
7596
|
-
markdown: string;
|
|
7597
|
-
} | {
|
|
7598
7828
|
type: "attachment";
|
|
7599
7829
|
id: string;
|
|
7600
7830
|
name: string;
|
|
@@ -7602,6 +7832,12 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7602
7832
|
read: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
|
|
7603
7833
|
stream: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
|
|
7604
7834
|
size?: number | undefined;
|
|
7835
|
+
} | {
|
|
7836
|
+
type: "text";
|
|
7837
|
+
text: string;
|
|
7838
|
+
} | {
|
|
7839
|
+
type: "markdown";
|
|
7840
|
+
markdown: string;
|
|
7605
7841
|
};
|
|
7606
7842
|
effect: string;
|
|
7607
7843
|
} | {
|
|
@@ -7619,6 +7855,14 @@ declare const contentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7619
7855
|
} | {
|
|
7620
7856
|
kind: "clear";
|
|
7621
7857
|
};
|
|
7858
|
+
} | {
|
|
7859
|
+
type: "addMember";
|
|
7860
|
+
members: string[];
|
|
7861
|
+
} | {
|
|
7862
|
+
type: "removeMember";
|
|
7863
|
+
members: string[];
|
|
7864
|
+
} | {
|
|
7865
|
+
type: "leaveSpace";
|
|
7622
7866
|
}>;
|
|
7623
7867
|
target: z.ZodCustom<Message<string, User, Space<unknown>>, Message<string, User, Space<unknown>>>;
|
|
7624
7868
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -7660,4 +7904,4 @@ declare function attachment(input: AttachmentInput, options?: {
|
|
|
7660
7904
|
name?: string;
|
|
7661
7905
|
}): ContentBuilder;
|
|
7662
7906
|
//#endregion
|
|
7663
|
-
export {
|
|
7907
|
+
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 };
|