spectrum-ts 3.1.0 → 4.1.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.
- package/dist/{attachment-CEpGtZLm.d.ts → attachment-CnivEhr6.d.ts} +1 -1
- package/dist/{authoring-CP3vRza8.d.ts → authoring-b9AhXgPI.d.ts} +2 -2
- package/dist/authoring.d.ts +3 -3
- package/dist/authoring.js +5 -5
- package/dist/{chunk-FA7VA4XN.js → chunk-3KWFP4L2.js} +7 -3
- package/dist/{chunk-NZ5WCMTY.js → chunk-A37PM5N2.js} +1 -1
- package/dist/{chunk-L3NUESOW.js → chunk-B52VPQO3.js} +70 -30
- package/dist/{chunk-WMG36LHW.js → chunk-DMT6BFJV.js} +30 -73
- package/dist/{chunk-77U6SH5A.js → chunk-FAIFTUV2.js} +1 -1
- package/dist/{chunk-Q44CIGG6.js → chunk-IM5ADDZS.js} +4 -4
- package/dist/{chunk-MHGCPC2V.js → chunk-LZXPLXZF.js} +1 -1
- package/dist/{chunk-PSSWQBOH.js → chunk-U3QQ56YZ.js} +6 -4
- package/dist/{chunk-LQMDV75O.js → chunk-UXAKIXVM.js} +0 -45
- package/dist/{chunk-7ON5XHC2.js → chunk-WXLQNANA.js} +5 -2
- package/dist/{chunk-CHY5YLLV.js → chunk-ZR3TKZMT.js} +1 -1
- package/dist/index.d.ts +11 -10
- package/dist/index.js +370 -25272
- package/dist/providers/imessage/index.d.ts +6 -28
- package/dist/providers/imessage/index.js +9 -8
- package/dist/providers/index.d.ts +4 -4
- package/dist/providers/index.js +11 -11
- package/dist/providers/slack/index.d.ts +1 -1
- package/dist/providers/slack/index.js +3 -3
- package/dist/providers/telegram/index.d.ts +2 -2
- package/dist/providers/telegram/index.js +5 -5
- package/dist/providers/terminal/index.d.ts +1 -1
- package/dist/providers/terminal/index.js +5 -5
- package/dist/providers/whatsapp-business/index.d.ts +1 -1
- package/dist/providers/whatsapp-business/index.js +4 -4
- package/dist/read-C4uvozGX.d.ts +53 -0
- package/dist/{types-CDYXH2R7.d.ts → types-BIta6Kxi.d.ts} +1 -1
- package/dist/{types-Be0T6E0e.d.ts → types-CyfLJXgu.d.ts} +26 -1
- package/package.json +1 -4
- package/dist/photo-content-BJKnqgN-.d.ts +0 -13
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { C as ContentBuilder, h as ContentInput,
|
|
1
|
+
import { C as ContentBuilder, h as ContentInput, a as SchemaMessage, P as Platform, b as PlatformDef, S as Space, d as Store } from '../../types-CyfLJXgu.js';
|
|
2
2
|
import * as zod_v4_core from 'zod/v4/core';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
import z__default from 'zod';
|
|
5
|
-
import { A as Attachment } from '../../attachment-
|
|
6
|
-
import { P as PhotoInput } from '../../
|
|
5
|
+
import { A as Attachment } from '../../attachment-CnivEhr6.js';
|
|
6
|
+
import { P as PhotoInput } from '../../read-C4uvozGX.js';
|
|
7
|
+
export { r as read } from '../../read-C4uvozGX.js';
|
|
7
8
|
import { MessageEffect, AdvancedIMessage } from '@photon-ai/advanced-imessage';
|
|
8
9
|
import { IMessageSDK } from '@photon-ai/imessage-kit';
|
|
9
10
|
import 'hotscript';
|
|
@@ -114,26 +115,6 @@ declare function customizedMiniApp(input: CustomizedMiniAppInput): ContentBuilde
|
|
|
114
115
|
type IMessageMessageEffect = MessageEffect;
|
|
115
116
|
declare function effect(input: ContentInput, messageEffect: IMessageMessageEffect): ContentBuilder;
|
|
116
117
|
|
|
117
|
-
/**
|
|
118
|
-
* Mark the chat containing `target` as read. iMessage-only, remote-only.
|
|
119
|
-
*
|
|
120
|
-
* Implemented via `chats.markRead(chatGuid)`, which marks **every unread
|
|
121
|
-
* message in the chat** as read — there is no per-message read receipt in
|
|
122
|
-
* the SDK. `target` is used only to identify the chat (and to give
|
|
123
|
-
* `message.read()` something to pass), so passing any message from a chat
|
|
124
|
-
* marks the whole chat as read.
|
|
125
|
-
*
|
|
126
|
-
* `space.send(read(message))` is the canonical form; `space.read(message)`
|
|
127
|
-
* and `message.read()` are sugar attached via the iMessage platform's
|
|
128
|
-
* `space.actions` / `message.actions` slots.
|
|
129
|
-
*
|
|
130
|
-
* `Read` is intentionally not a member of the universal `Content` union —
|
|
131
|
-
* the `as unknown as Content` cast keeps the builder shape compatible with
|
|
132
|
-
* the framework's `ContentBuilder.build(): Promise<Content>` signature. The
|
|
133
|
-
* framework treats it as a fire-and-forget control signal at runtime.
|
|
134
|
-
*/
|
|
135
|
-
declare function read(target: Message): ContentBuilder;
|
|
136
|
-
|
|
137
118
|
interface RemoteClient {
|
|
138
119
|
client: AdvancedIMessage;
|
|
139
120
|
phone: string;
|
|
@@ -189,10 +170,7 @@ declare const imessage: Platform<PlatformDef<"iMessage", z.ZodUnion<readonly [z.
|
|
|
189
170
|
background: (space: Space, input: BackgroundInput, opts?: {
|
|
190
171
|
mimeType?: string;
|
|
191
172
|
}) => Promise<void>;
|
|
192
|
-
|
|
193
|
-
}, {
|
|
194
|
-
read: (message: Message) => Promise<void>;
|
|
195
|
-
}, {
|
|
173
|
+
}, Record<never, never>, {
|
|
196
174
|
getMessage: ({ client }: {
|
|
197
175
|
client: IMessageClient;
|
|
198
176
|
config: {
|
|
@@ -241,4 +219,4 @@ declare const imessage: Platform<PlatformDef<"iMessage", z.ZodUnion<readonly [z.
|
|
|
241
219
|
};
|
|
242
220
|
}>;
|
|
243
221
|
|
|
244
|
-
export { type BackgroundInput, type CustomizedMiniApp, type CustomizedMiniAppInput, type CustomizedMiniAppLayout, type IMessageMessageEffect, background, customizedMiniApp, effect, imessage
|
|
222
|
+
export { type BackgroundInput, type CustomizedMiniApp, type CustomizedMiniAppInput, type CustomizedMiniAppLayout, type IMessageMessageEffect, background, customizedMiniApp, effect, imessage };
|
|
@@ -3,18 +3,19 @@ import {
|
|
|
3
3
|
background,
|
|
4
4
|
customizedMiniApp,
|
|
5
5
|
effect,
|
|
6
|
-
imessage
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-MHGCPC2V.js";
|
|
6
|
+
imessage
|
|
7
|
+
} from "../../chunk-DMT6BFJV.js";
|
|
8
|
+
import "../../chunk-ZR3TKZMT.js";
|
|
9
|
+
import "../../chunk-LZXPLXZF.js";
|
|
11
10
|
import "../../chunk-2D27WW5B.js";
|
|
12
11
|
import "../../chunk-3GEJYGZK.js";
|
|
13
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-A37PM5N2.js";
|
|
14
13
|
import "../../chunk-5XEFJBN2.js";
|
|
15
14
|
import "../../chunk-6UZFVXQF.js";
|
|
16
|
-
import
|
|
17
|
-
|
|
15
|
+
import {
|
|
16
|
+
read
|
|
17
|
+
} from "../../chunk-B52VPQO3.js";
|
|
18
|
+
import "../../chunk-UXAKIXVM.js";
|
|
18
19
|
export {
|
|
19
20
|
background,
|
|
20
21
|
customizedMiniApp,
|
|
@@ -3,17 +3,17 @@ export { slack } from './slack/index.js';
|
|
|
3
3
|
export { telegram } from './telegram/index.js';
|
|
4
4
|
export { terminal } from './terminal/index.js';
|
|
5
5
|
export { whatsappBusiness } from './whatsapp-business/index.js';
|
|
6
|
-
import '../types-
|
|
6
|
+
import '../types-CyfLJXgu.js';
|
|
7
7
|
import 'hotscript';
|
|
8
8
|
import 'zod';
|
|
9
9
|
import 'zod/v4/core';
|
|
10
|
-
import '../attachment-
|
|
11
|
-
import '../
|
|
10
|
+
import '../attachment-CnivEhr6.js';
|
|
11
|
+
import '../read-C4uvozGX.js';
|
|
12
12
|
import '@photon-ai/advanced-imessage';
|
|
13
13
|
import '@photon-ai/imessage-kit';
|
|
14
14
|
import '@photon-ai/slack';
|
|
15
15
|
import '@photon-ai/telegram-ts';
|
|
16
|
-
import '../types-
|
|
16
|
+
import '../types-BIta6Kxi.js';
|
|
17
17
|
import 'node:child_process';
|
|
18
18
|
import 'node:net';
|
|
19
19
|
import '@photon-ai/whatsapp-business';
|
package/dist/providers/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { createRequire as __spectrumCreateRequire } from "node:module"; const require = __spectrumCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
imessage
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-DMT6BFJV.js";
|
|
5
|
+
import "../chunk-ZR3TKZMT.js";
|
|
6
6
|
import {
|
|
7
7
|
slack
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-WXLQNANA.js";
|
|
9
9
|
import {
|
|
10
10
|
telegram
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-U3QQ56YZ.js";
|
|
12
12
|
import "../chunk-34FQGGD7.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-LZXPLXZF.js";
|
|
14
14
|
import {
|
|
15
15
|
terminal
|
|
16
|
-
} from "../chunk-
|
|
17
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-IM5ADDZS.js";
|
|
17
|
+
import "../chunk-FAIFTUV2.js";
|
|
18
18
|
import {
|
|
19
19
|
whatsappBusiness
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-3KWFP4L2.js";
|
|
21
21
|
import "../chunk-2D27WW5B.js";
|
|
22
22
|
import "../chunk-3GEJYGZK.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-A37PM5N2.js";
|
|
24
24
|
import "../chunk-5XEFJBN2.js";
|
|
25
25
|
import "../chunk-6UZFVXQF.js";
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-B52VPQO3.js";
|
|
27
|
+
import "../chunk-UXAKIXVM.js";
|
|
28
28
|
export {
|
|
29
29
|
imessage,
|
|
30
30
|
slack,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as SchemaMessage, P as Platform, b as PlatformDef } from '../../types-CyfLJXgu.js';
|
|
2
2
|
import * as z from 'zod';
|
|
3
3
|
import z__default from 'zod';
|
|
4
4
|
import * as _photon_ai_slack from '@photon-ai/slack';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire as __spectrumCreateRequire } from "node:module"; const require = __spectrumCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
slack
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-WXLQNANA.js";
|
|
5
5
|
import "../../chunk-3GEJYGZK.js";
|
|
6
6
|
import "../../chunk-5XEFJBN2.js";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-B52VPQO3.js";
|
|
8
|
+
import "../../chunk-UXAKIXVM.js";
|
|
9
9
|
export {
|
|
10
10
|
slack
|
|
11
11
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { P as Platform,
|
|
1
|
+
import { P as Platform, b as PlatformDef, g as ProviderMessage } from '../../types-CyfLJXgu.js';
|
|
2
2
|
import * as _photon_ai_telegram_ts from '@photon-ai/telegram-ts';
|
|
3
3
|
import * as zod_v4_core from 'zod/v4/core';
|
|
4
4
|
import * as z from 'zod';
|
|
5
5
|
import z__default from 'zod';
|
|
6
|
-
import { F as FusorClient } from '../../types-
|
|
6
|
+
import { F as FusorClient } from '../../types-BIta6Kxi.js';
|
|
7
7
|
import 'hotscript';
|
|
8
8
|
|
|
9
9
|
interface TelegramSpace {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as __spectrumCreateRequire } from "node:module"; const require = __spectrumCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
telegram
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-U3QQ56YZ.js";
|
|
5
5
|
import "../../chunk-34FQGGD7.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-LZXPLXZF.js";
|
|
7
|
+
import "../../chunk-FAIFTUV2.js";
|
|
8
8
|
import "../../chunk-6UZFVXQF.js";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-B52VPQO3.js";
|
|
10
|
+
import "../../chunk-UXAKIXVM.js";
|
|
11
11
|
export {
|
|
12
12
|
telegram
|
|
13
13
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Platform,
|
|
1
|
+
import { P as Platform, b as PlatformDef, f as contentSchema } from '../../types-CyfLJXgu.js';
|
|
2
2
|
import { ChildProcess } from 'node:child_process';
|
|
3
3
|
import z__default from 'zod';
|
|
4
4
|
import { Socket } from 'node:net';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as __spectrumCreateRequire } from "node:module"; const require = __spectrumCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
terminal
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-IM5ADDZS.js";
|
|
5
|
+
import "../../chunk-FAIFTUV2.js";
|
|
6
|
+
import "../../chunk-A37PM5N2.js";
|
|
7
7
|
import "../../chunk-5XEFJBN2.js";
|
|
8
8
|
import "../../chunk-6UZFVXQF.js";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-B52VPQO3.js";
|
|
10
|
+
import "../../chunk-UXAKIXVM.js";
|
|
11
11
|
export {
|
|
12
12
|
terminal
|
|
13
13
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as SchemaMessage, P as Platform, b as PlatformDef } from '../../types-CyfLJXgu.js';
|
|
2
2
|
import { WhatsAppClient } from '@photon-ai/whatsapp-business';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
import z__default from 'zod';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { createRequire as __spectrumCreateRequire } from "node:module"; const require = __spectrumCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
whatsappBusiness
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-3KWFP4L2.js";
|
|
5
5
|
import "../../chunk-2D27WW5B.js";
|
|
6
6
|
import "../../chunk-3GEJYGZK.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-A37PM5N2.js";
|
|
8
8
|
import "../../chunk-5XEFJBN2.js";
|
|
9
9
|
import "../../chunk-6UZFVXQF.js";
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-B52VPQO3.js";
|
|
11
|
+
import "../../chunk-UXAKIXVM.js";
|
|
12
12
|
export {
|
|
13
13
|
whatsappBusiness
|
|
14
14
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import z__default from 'zod';
|
|
2
|
+
import { M as Message, U as User, S as Space, C as ContentBuilder } from './types-CyfLJXgu.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Shared building blocks for photo-style content (chat background, group
|
|
6
|
+
* avatar/icon, …) whose builders all share the same `set | clear` shape and
|
|
7
|
+
* the same `"clear"` reserved-string sentinel.
|
|
8
|
+
*
|
|
9
|
+
* Keeping the action schema and `buildPhotoAction` factory here means both
|
|
10
|
+
* `background()` and `avatar()` parse against the same structural definition
|
|
11
|
+
* and any DX fix (mime inference, read caching, sentinel docs) lands once.
|
|
12
|
+
*/
|
|
13
|
+
declare const CLEAR_SENTINEL: "clear";
|
|
14
|
+
type PhotoInput = typeof CLEAR_SENTINEL | string | Buffer | URL;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A `read` marks the conversation as read **up to** `target`, surfacing a
|
|
18
|
+
* read receipt to the sender where the platform supports one.
|
|
19
|
+
*
|
|
20
|
+
* `space.send(read(message))` is the canonical outbound API;
|
|
21
|
+
* `message.read()` and `space.read(message)` are sugar that delegate here.
|
|
22
|
+
* Reads are fire-and-forget — providers handle them inside their `send`
|
|
23
|
+
* action and the resolved value is `undefined`.
|
|
24
|
+
*
|
|
25
|
+
* Granularity is per-platform:
|
|
26
|
+
*
|
|
27
|
+
* - WhatsApp Business: per-message receipt via `markRead(target.id)`, which
|
|
28
|
+
* also marks every earlier message in the conversation as read.
|
|
29
|
+
* - iMessage (remote): chat-level `chats.markRead(chatGuid)` — `target` only
|
|
30
|
+
* identifies the chat, and **every** unread message in it is marked read.
|
|
31
|
+
* Local mode rejects with `UnsupportedError` (warned and skipped).
|
|
32
|
+
* - Telegram / Slack: silently no-op. Neither surfaces read state for bot
|
|
33
|
+
* conversations (Telegram bot chats are effectively auto-read), so the
|
|
34
|
+
* signal is vacuously satisfied — same best-effort contract as `typing`.
|
|
35
|
+
*/
|
|
36
|
+
declare const readSchema: z__default.ZodObject<{
|
|
37
|
+
type: z__default.ZodLiteral<"read">;
|
|
38
|
+
target: z__default.ZodCustom<Message<string, User, Space<unknown>>, Message<string, User, Space<unknown>>>;
|
|
39
|
+
}, z__default.core.$strip>;
|
|
40
|
+
type Read = z__default.infer<typeof readSchema>;
|
|
41
|
+
/**
|
|
42
|
+
* Construct a `read` content value marking the conversation read up to
|
|
43
|
+
* `target`.
|
|
44
|
+
*
|
|
45
|
+
* Only inbound messages (those received from a user) can be marked read;
|
|
46
|
+
* calling this with an outbound target throws at build time so the misuse
|
|
47
|
+
* surfaces before the send pipeline runs. The target is required (not
|
|
48
|
+
* `Message | undefined` like `unsend`): read targets come from the inbound
|
|
49
|
+
* stream, never from a chainable `send()` result.
|
|
50
|
+
*/
|
|
51
|
+
declare function read(target: Message): ContentBuilder;
|
|
52
|
+
|
|
53
|
+
export { type PhotoInput as P, type Read as R, read as r };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as ProjectData, d as Store, e as ProviderMessageRecord, S as Space, M as Message } from './types-CyfLJXgu.js';
|
|
2
2
|
|
|
3
3
|
declare const FUSOR_EVENT_BRAND: unique symbol;
|
|
4
4
|
interface FusorEvent<TName extends string = string, TData = unknown> {
|
|
@@ -741,6 +741,9 @@ declare const contentSchema: z__default.ZodDiscriminatedUnion<[z__default.ZodObj
|
|
|
741
741
|
}, z__default.core.$strip>, z__default.ZodObject<{
|
|
742
742
|
type: z__default.ZodLiteral<"unsend">;
|
|
743
743
|
target: z__default.ZodCustom<Message<string, User, Space<unknown>>, Message<string, User, Space<unknown>>>;
|
|
744
|
+
}, z__default.core.$strip>, z__default.ZodObject<{
|
|
745
|
+
type: z__default.ZodLiteral<"read">;
|
|
746
|
+
target: z__default.ZodCustom<Message<string, User, Space<unknown>>, Message<string, User, Space<unknown>>>;
|
|
744
747
|
}, z__default.core.$strip>], "type">;
|
|
745
748
|
type Content = z__default.infer<typeof contentSchema>;
|
|
746
749
|
interface ContentBuilder {
|
|
@@ -832,6 +835,19 @@ interface Space<_Def = unknown> {
|
|
|
832
835
|
*/
|
|
833
836
|
getMessage(id: string): Promise<Message | undefined>;
|
|
834
837
|
readonly id: string;
|
|
838
|
+
/**
|
|
839
|
+
* Mark the conversation as read up to `message`, surfacing a read receipt
|
|
840
|
+
* to the sender where the platform supports one. Sugar for
|
|
841
|
+
* `send(read(message))`. Fire-and-forget; only inbound messages can be
|
|
842
|
+
* marked read.
|
|
843
|
+
*
|
|
844
|
+
* Granularity is per-platform: WhatsApp Business issues a receipt for
|
|
845
|
+
* `message` and everything before it; iMessage (remote) marks the whole
|
|
846
|
+
* chat read. Platforms with no read-receipt concept for bot conversations
|
|
847
|
+
* (Telegram, Slack) silently no-op, so the signal is best-effort
|
|
848
|
+
* everywhere — same contract as `startTyping()`.
|
|
849
|
+
*/
|
|
850
|
+
read(message: Message): Promise<void>;
|
|
835
851
|
/**
|
|
836
852
|
* Rename the current chat. Sugar for `send(rename(displayName))`.
|
|
837
853
|
*
|
|
@@ -882,6 +898,15 @@ interface Message<TPlatform extends string = string, TSender extends User = User
|
|
|
882
898
|
react(reaction: string): Promise<(Message<TPlatform, AgentSender, TSpace> & {
|
|
883
899
|
content: Reaction;
|
|
884
900
|
}) | undefined>;
|
|
901
|
+
/**
|
|
902
|
+
* Mark this message (and everything before it in the conversation) as
|
|
903
|
+
* read. Sugar for `space.send(read(this))`. Reads are fire-and-forget;
|
|
904
|
+
* per-platform granularity and support (e.g. iMessage marks the whole
|
|
905
|
+
* chat; Telegram/Slack silently no-op) surface from the provider's send
|
|
906
|
+
* action. Only inbound messages can be marked read; calling this on an
|
|
907
|
+
* outbound message throws.
|
|
908
|
+
*/
|
|
909
|
+
read(): Promise<void>;
|
|
885
910
|
reply(content: ContentInput): Promise<Message<TPlatform, AgentSender, TSpace> | undefined>;
|
|
886
911
|
reply(...content: [ContentInput, ContentInput, ...ContentInput[]]): Promise<Message<TPlatform, AgentSender, TSpace>[]>;
|
|
887
912
|
sender: TSender | undefined;
|
|
@@ -1502,4 +1527,4 @@ interface Platform<Def extends AnyPlatformDef> {
|
|
|
1502
1527
|
(message: Message): PlatformMessage<Def>;
|
|
1503
1528
|
}
|
|
1504
1529
|
|
|
1505
|
-
export { asReaction as $, type AgentSender as A, type Broadcaster as B, type ContentBuilder as C, type DedicatedTokenData as D, type EventProducer as E, type FusorTokenData as F, type ProjectProfile as G, type ReactionBuilder as H, type InstanceActionFn as I, type SharedTokenData as J, type SlackTeamMeta as K, type SlackTokenData as L, type Message as M, type SpaceNamespace as N, SpectrumCloudError as O, type Platform as P, type SubscriptionData as Q, type Reaction as R, type
|
|
1530
|
+
export { asReaction as $, type AgentSender as A, type Broadcaster as B, type ContentBuilder as C, type DedicatedTokenData as D, type EventProducer as E, type FusorTokenData as F, type ProjectProfile as G, type ReactionBuilder as H, type InstanceActionFn as I, type SharedTokenData as J, type SlackTeamMeta as K, type SlackTokenData as L, type Message as M, type SpaceNamespace as N, SpectrumCloudError as O, type Platform as P, type SubscriptionData as Q, type Reaction as R, type Space as S, type SubscriptionStatus as T, type User as U, type TokenData as V, broadcast as W, cloud as X, mergeStreams as Y, reaction as Z, stream as _, type SchemaMessage as a, type PlatformDef as b, type ProjectData as c, type Store as d, type ProviderMessageRecord as e, contentSchema as f, type ProviderMessage as g, type ContentInput as h, type Content as i, type SpaceActionFn as j, type MessageActionFn as k, type CreateClientContext as l, type PlatformProviderConfig as m, type SpectrumLike as n, type CustomEventStreams as o, type AnyPlatformDef as p, type CloudPlatform as q, type ImessageInfoData as r, type ManagedStream as s, type PlatformInstance as t, type PlatformMessage as u, type PlatformRuntime as v, type PlatformSpace as w, type PlatformStatus as x, type PlatformUser as y, type PlatformsData as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spectrum-ts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Bring agents to any interface — unified messaging SDK for TypeScript.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,12 +46,9 @@
|
|
|
46
46
|
"@photon-ai/whatsapp-business": "^0.1.1",
|
|
47
47
|
"@photon-ai/proto": "^0.2.4",
|
|
48
48
|
"@repeaterjs/repeater": "^3.0.6",
|
|
49
|
-
"better-grpc": "^0.3.2",
|
|
50
49
|
"lru-cache": "^11.0.0",
|
|
51
50
|
"marked": "^18.0.5",
|
|
52
51
|
"mime-types": "^3.0.1",
|
|
53
|
-
"nice-grpc": "^2.1.16",
|
|
54
|
-
"nice-grpc-common": "^2.0.2",
|
|
55
52
|
"open-graph-scraper": "^6.11.0",
|
|
56
53
|
"type-fest": "^5.4.1",
|
|
57
54
|
"vcf": "^2.1.2",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared building blocks for photo-style content (chat background, group
|
|
3
|
-
* avatar/icon, …) whose builders all share the same `set | clear` shape and
|
|
4
|
-
* the same `"clear"` reserved-string sentinel.
|
|
5
|
-
*
|
|
6
|
-
* Keeping the action schema and `buildPhotoAction` factory here means both
|
|
7
|
-
* `background()` and `avatar()` parse against the same structural definition
|
|
8
|
-
* and any DX fix (mime inference, read caching, sentinel docs) lands once.
|
|
9
|
-
*/
|
|
10
|
-
declare const CLEAR_SENTINEL: "clear";
|
|
11
|
-
type PhotoInput = typeof CLEAR_SENTINEL | string | Buffer | URL;
|
|
12
|
-
|
|
13
|
-
export type { PhotoInput as P };
|