spectrum-ts 3.0.0 → 4.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.
Files changed (32) hide show
  1. package/dist/{attachment-WePAHfcH.d.ts → attachment-CEpGtZLm.d.ts} +1 -1
  2. package/dist/{authoring-DDh3muGT.d.ts → authoring-CP3vRza8.d.ts} +2 -2
  3. package/dist/authoring.d.ts +3 -3
  4. package/dist/authoring.js +5 -5
  5. package/dist/{chunk-TXRWKSNH.js → chunk-57NECZQZ.js} +4 -4
  6. package/dist/{chunk-UXJ5OO6P.js → chunk-5VCWWPFW.js} +3 -3
  7. package/dist/{chunk-NZ5WCMTY.js → chunk-A37PM5N2.js} +1 -1
  8. package/dist/{chunk-77U6SH5A.js → chunk-FAIFTUV2.js} +1 -1
  9. package/dist/{chunk-MHGCPC2V.js → chunk-LZXPLXZF.js} +1 -1
  10. package/dist/{chunk-LX437ZTY.js → chunk-OGTHPDG7.js} +10 -3
  11. package/dist/{chunk-EZ5SNNFS.js → chunk-PV4AVMNN.js} +4 -4
  12. package/dist/{chunk-LQMDV75O.js → chunk-UXAKIXVM.js} +0 -45
  13. package/dist/{chunk-FULEQIRQ.js → chunk-VEF6FUE7.js} +2 -2
  14. package/dist/{chunk-AYCMTRVC.js → chunk-W5HNZ7YT.js} +133 -89
  15. package/dist/{chunk-CHY5YLLV.js → chunk-ZR3TKZMT.js} +1 -1
  16. package/dist/index.d.ts +7 -7
  17. package/dist/index.js +368 -25272
  18. package/dist/providers/imessage/index.d.ts +3 -2
  19. package/dist/providers/imessage/index.js +6 -6
  20. package/dist/providers/index.d.ts +3 -3
  21. package/dist/providers/index.js +11 -11
  22. package/dist/providers/slack/index.d.ts +1 -1
  23. package/dist/providers/slack/index.js +3 -3
  24. package/dist/providers/telegram/index.d.ts +2 -2
  25. package/dist/providers/telegram/index.js +5 -5
  26. package/dist/providers/terminal/index.d.ts +1 -1
  27. package/dist/providers/terminal/index.js +5 -5
  28. package/dist/providers/whatsapp-business/index.d.ts +1 -1
  29. package/dist/providers/whatsapp-business/index.js +4 -4
  30. package/dist/{types-YqCNUDIt.d.ts → types-Be0T6E0e.d.ts} +1 -0
  31. package/dist/{types-BujGKBin.d.ts → types-CDYXH2R7.d.ts} +1 -1
  32. package/package.json +1 -4
@@ -1,8 +1,8 @@
1
- import { C as ContentBuilder, h as ContentInput, M as Message, S as SchemaMessage, P as Platform, a as PlatformDef, e as Space, c as Store } from '../../types-YqCNUDIt.js';
1
+ import { C as ContentBuilder, h as ContentInput, M as Message, S as SchemaMessage, P as Platform, a as PlatformDef, e as Space, c as Store } from '../../types-Be0T6E0e.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-WePAHfcH.js';
5
+ import { A as Attachment } from '../../attachment-CEpGtZLm.js';
6
6
  import { P as PhotoInput } from '../../photo-content-BJKnqgN-.js';
7
7
  import { MessageEffect, AdvancedIMessage } from '@photon-ai/advanced-imessage';
8
8
  import { IMessageSDK } from '@photon-ai/imessage-kit';
@@ -149,6 +149,7 @@ declare const spaceSchema: z__default.ZodObject<{
149
149
  phone: z__default.ZodString;
150
150
  }, z__default.core.$strip>;
151
151
  type IMessageMessage = SchemaMessage<typeof userSchema, typeof spaceSchema> & {
152
+ direction?: "inbound" | "outbound";
152
153
  partIndex?: number;
153
154
  parentId?: string;
154
155
  };
@@ -5,16 +5,16 @@ import {
5
5
  effect,
6
6
  imessage,
7
7
  read
8
- } from "../../chunk-AYCMTRVC.js";
9
- import "../../chunk-CHY5YLLV.js";
10
- import "../../chunk-MHGCPC2V.js";
8
+ } from "../../chunk-W5HNZ7YT.js";
9
+ import "../../chunk-ZR3TKZMT.js";
10
+ import "../../chunk-LZXPLXZF.js";
11
11
  import "../../chunk-2D27WW5B.js";
12
12
  import "../../chunk-3GEJYGZK.js";
13
- import "../../chunk-NZ5WCMTY.js";
13
+ import "../../chunk-A37PM5N2.js";
14
14
  import "../../chunk-5XEFJBN2.js";
15
15
  import "../../chunk-6UZFVXQF.js";
16
- import "../../chunk-LX437ZTY.js";
17
- import "../../chunk-LQMDV75O.js";
16
+ import "../../chunk-OGTHPDG7.js";
17
+ import "../../chunk-UXAKIXVM.js";
18
18
  export {
19
19
  background,
20
20
  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-YqCNUDIt.js';
6
+ import '../types-Be0T6E0e.js';
7
7
  import 'hotscript';
8
8
  import 'zod';
9
9
  import 'zod/v4/core';
10
- import '../attachment-WePAHfcH.js';
10
+ import '../attachment-CEpGtZLm.js';
11
11
  import '../photo-content-BJKnqgN-.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-BujGKBin.js';
16
+ import '../types-CDYXH2R7.js';
17
17
  import 'node:child_process';
18
18
  import 'node:net';
19
19
  import '@photon-ai/whatsapp-business';
@@ -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-AYCMTRVC.js";
5
- import "../chunk-CHY5YLLV.js";
4
+ } from "../chunk-W5HNZ7YT.js";
5
+ import "../chunk-ZR3TKZMT.js";
6
6
  import {
7
7
  slack
8
- } from "../chunk-FULEQIRQ.js";
8
+ } from "../chunk-VEF6FUE7.js";
9
9
  import {
10
10
  telegram
11
- } from "../chunk-TXRWKSNH.js";
11
+ } from "../chunk-57NECZQZ.js";
12
12
  import "../chunk-34FQGGD7.js";
13
- import "../chunk-MHGCPC2V.js";
13
+ import "../chunk-LZXPLXZF.js";
14
14
  import {
15
15
  terminal
16
- } from "../chunk-EZ5SNNFS.js";
17
- import "../chunk-77U6SH5A.js";
16
+ } from "../chunk-PV4AVMNN.js";
17
+ import "../chunk-FAIFTUV2.js";
18
18
  import {
19
19
  whatsappBusiness
20
- } from "../chunk-UXJ5OO6P.js";
20
+ } from "../chunk-5VCWWPFW.js";
21
21
  import "../chunk-2D27WW5B.js";
22
22
  import "../chunk-3GEJYGZK.js";
23
- import "../chunk-NZ5WCMTY.js";
23
+ import "../chunk-A37PM5N2.js";
24
24
  import "../chunk-5XEFJBN2.js";
25
25
  import "../chunk-6UZFVXQF.js";
26
- import "../chunk-LX437ZTY.js";
27
- import "../chunk-LQMDV75O.js";
26
+ import "../chunk-OGTHPDG7.js";
27
+ import "../chunk-UXAKIXVM.js";
28
28
  export {
29
29
  imessage,
30
30
  slack,
@@ -1,4 +1,4 @@
1
- import { S as SchemaMessage, P as Platform, a as PlatformDef } from '../../types-YqCNUDIt.js';
1
+ import { S as SchemaMessage, P as Platform, a as PlatformDef } from '../../types-Be0T6E0e.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-FULEQIRQ.js";
4
+ } from "../../chunk-VEF6FUE7.js";
5
5
  import "../../chunk-3GEJYGZK.js";
6
6
  import "../../chunk-5XEFJBN2.js";
7
- import "../../chunk-LX437ZTY.js";
8
- import "../../chunk-LQMDV75O.js";
7
+ import "../../chunk-OGTHPDG7.js";
8
+ import "../../chunk-UXAKIXVM.js";
9
9
  export {
10
10
  slack
11
11
  };
@@ -1,9 +1,9 @@
1
- import { P as Platform, a as PlatformDef, g as ProviderMessage } from '../../types-YqCNUDIt.js';
1
+ import { P as Platform, a as PlatformDef, g as ProviderMessage } from '../../types-Be0T6E0e.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-BujGKBin.js';
6
+ import { F as FusorClient } from '../../types-CDYXH2R7.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-TXRWKSNH.js";
4
+ } from "../../chunk-57NECZQZ.js";
5
5
  import "../../chunk-34FQGGD7.js";
6
- import "../../chunk-MHGCPC2V.js";
7
- import "../../chunk-77U6SH5A.js";
6
+ import "../../chunk-LZXPLXZF.js";
7
+ import "../../chunk-FAIFTUV2.js";
8
8
  import "../../chunk-6UZFVXQF.js";
9
- import "../../chunk-LX437ZTY.js";
10
- import "../../chunk-LQMDV75O.js";
9
+ import "../../chunk-OGTHPDG7.js";
10
+ import "../../chunk-UXAKIXVM.js";
11
11
  export {
12
12
  telegram
13
13
  };
@@ -1,4 +1,4 @@
1
- import { P as Platform, a as PlatformDef, f as contentSchema } from '../../types-YqCNUDIt.js';
1
+ import { P as Platform, a as PlatformDef, f as contentSchema } from '../../types-Be0T6E0e.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-EZ5SNNFS.js";
5
- import "../../chunk-77U6SH5A.js";
6
- import "../../chunk-NZ5WCMTY.js";
4
+ } from "../../chunk-PV4AVMNN.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-LX437ZTY.js";
10
- import "../../chunk-LQMDV75O.js";
9
+ import "../../chunk-OGTHPDG7.js";
10
+ import "../../chunk-UXAKIXVM.js";
11
11
  export {
12
12
  terminal
13
13
  };
@@ -1,4 +1,4 @@
1
- import { S as SchemaMessage, P as Platform, a as PlatformDef } from '../../types-YqCNUDIt.js';
1
+ import { S as SchemaMessage, P as Platform, a as PlatformDef } from '../../types-Be0T6E0e.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-UXJ5OO6P.js";
4
+ } from "../../chunk-5VCWWPFW.js";
5
5
  import "../../chunk-2D27WW5B.js";
6
6
  import "../../chunk-3GEJYGZK.js";
7
- import "../../chunk-NZ5WCMTY.js";
7
+ import "../../chunk-A37PM5N2.js";
8
8
  import "../../chunk-5XEFJBN2.js";
9
9
  import "../../chunk-6UZFVXQF.js";
10
- import "../../chunk-LX437ZTY.js";
11
- import "../../chunk-LQMDV75O.js";
10
+ import "../../chunk-OGTHPDG7.js";
11
+ import "../../chunk-UXAKIXVM.js";
12
12
  export {
13
13
  whatsappBusiness
14
14
  };
@@ -1141,6 +1141,7 @@ type ProviderMessage<TSender extends ResolvedUser = ResolvedUser, TSpace extends
1141
1141
  type ProviderMessageRecord = {
1142
1142
  id: string;
1143
1143
  content: Content;
1144
+ direction?: "inbound" | "outbound";
1144
1145
  sender?: {
1145
1146
  id: string;
1146
1147
  } & Record<string, unknown>;
@@ -1,4 +1,4 @@
1
- import { b as ProjectData, c as Store, d as ProviderMessageRecord, e as Space, M as Message } from './types-YqCNUDIt.js';
1
+ import { b as ProjectData, c as Store, d as ProviderMessageRecord, e as Space, M as Message } from './types-Be0T6E0e.js';
2
2
 
3
3
  declare const FUSOR_EVENT_BRAND: unique symbol;
4
4
  interface FusorEvent<TName extends string = string, TData = unknown> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spectrum-ts",
3
- "version": "3.0.0",
3
+ "version": "4.0.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",