spectrum-ts 1.4.0 → 1.7.1

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.
@@ -0,0 +1,12 @@
1
+ export { imessage } from './imessage/index.js';
2
+ export { terminal } from './terminal/index.js';
3
+ export { whatsappBusiness } from './whatsapp-business/index.js';
4
+ import '../types-lUyzRurY.js';
5
+ import 'hotscript';
6
+ import 'zod';
7
+ import 'zod/v4/core';
8
+ import '@photon-ai/advanced-imessage';
9
+ import '@photon-ai/imessage-kit';
10
+ import 'node:child_process';
11
+ import 'node:net';
12
+ import '@photon-ai/whatsapp-business';
@@ -0,0 +1,18 @@
1
+ import {
2
+ imessage
3
+ } from "../chunk-H2QKKFQW.js";
4
+ import "../chunk-VO43HJ5B.js";
5
+ import {
6
+ terminal
7
+ } from "../chunk-2SB6VN7J.js";
8
+ import "../chunk-VVXMZYDH.js";
9
+ import {
10
+ whatsappBusiness
11
+ } from "../chunk-4O7DPKLI.js";
12
+ import "../chunk-WFIUWFE4.js";
13
+ import "../chunk-JWWIFSI7.js";
14
+ export {
15
+ imessage,
16
+ terminal,
17
+ whatsappBusiness
18
+ };
@@ -1,4 +1,4 @@
1
- import { e as Platform, d as PlatformDef, P as ProviderMessage, S as Store, M as Message } from '../../types-BcCLW2VO.js';
1
+ import { P as Platform, a as PlatformDef, M as Message } from '../../types-lUyzRurY.js';
2
2
  import { ChildProcess } from 'node:child_process';
3
3
  import z__default from 'zod';
4
4
  import { Socket } from 'node:net';
@@ -101,39 +101,141 @@ declare const terminal: Platform<PlatformDef<"terminal", z__default.ZodObject<{
101
101
  replyTo: z__default.ZodOptional<z__default.ZodObject<{
102
102
  messageId: z__default.ZodString;
103
103
  }, z__default.core.$strip>>;
104
- }, z__default.core.$strip>, ProviderMessage<{
105
- id: string;
106
- }, {
107
- id: string;
108
- }, {
104
+ }, z__default.core.$strip>, {
109
105
  replyTo?: {
110
106
  messageId: string;
111
107
  } | undefined;
112
- }>, {
113
- messages({ client }: {
114
- client: TerminalClient;
115
- config: {
116
- commands?: {
117
- name: string;
118
- description?: string | undefined;
119
- }[] | undefined;
120
- };
121
- store: Store;
122
- }): AsyncGenerator<{
123
- replyTo?: {
124
- messageId: string;
108
+ id: string;
109
+ content: {
110
+ type: "attachment";
111
+ name: string;
112
+ mimeType: string;
113
+ read: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
114
+ stream: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
115
+ size?: number | undefined;
116
+ } | {
117
+ type: "text";
118
+ text: string;
119
+ } | {
120
+ type: "custom";
121
+ raw: unknown;
122
+ } | {
123
+ type: "contact";
124
+ user?: {
125
+ __platform: string;
126
+ id: string;
125
127
  } | undefined;
126
- id: string;
128
+ name?: {
129
+ formatted?: string | undefined;
130
+ first?: string | undefined;
131
+ last?: string | undefined;
132
+ middle?: string | undefined;
133
+ prefix?: string | undefined;
134
+ suffix?: string | undefined;
135
+ } | undefined;
136
+ phones?: {
137
+ value: string;
138
+ type?: "mobile" | "home" | "work" | "other" | undefined;
139
+ }[] | undefined;
140
+ emails?: {
141
+ value: string;
142
+ type?: "home" | "work" | "other" | undefined;
143
+ }[] | undefined;
144
+ addresses?: {
145
+ street?: string | undefined;
146
+ city?: string | undefined;
147
+ region?: string | undefined;
148
+ postalCode?: string | undefined;
149
+ country?: string | undefined;
150
+ type?: "home" | "work" | "other" | undefined;
151
+ }[] | undefined;
152
+ org?: {
153
+ name?: string | undefined;
154
+ title?: string | undefined;
155
+ department?: string | undefined;
156
+ } | undefined;
157
+ urls?: string[] | undefined;
158
+ birthday?: string | undefined;
159
+ note?: string | undefined;
160
+ photo?: {
161
+ mimeType: string;
162
+ read: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
163
+ } | undefined;
164
+ raw?: unknown;
165
+ } | {
166
+ type: "voice";
167
+ mimeType: string;
168
+ read: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
169
+ stream: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
170
+ name?: string | undefined;
171
+ duration?: number | undefined;
172
+ size?: number | undefined;
173
+ } | {
174
+ type: "richlink";
175
+ url: string;
176
+ title: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodOptional<z__default.ZodString>>>;
177
+ summary: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodOptional<z__default.ZodString>>>;
178
+ cover: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodOptional<z__default.ZodObject<{
179
+ mimeType: z__default.ZodOptional<z__default.ZodString>;
180
+ read: z__default.ZodFunction<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
181
+ stream: z__default.ZodFunction<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
182
+ }, z__default.core.$strip>>>>;
183
+ } | {
184
+ type: "reaction";
185
+ emoji: string;
186
+ target: Message;
187
+ } | {
188
+ type: "group";
189
+ items: Message[];
190
+ } | {
191
+ type: "poll";
192
+ title: string;
193
+ options: {
194
+ title: string;
195
+ }[];
196
+ } | {
197
+ type: "poll_option";
198
+ option: {
199
+ title: string;
200
+ };
201
+ poll: {
202
+ type: "poll";
203
+ title: string;
204
+ options: {
205
+ title: string;
206
+ }[];
207
+ };
208
+ selected: boolean;
209
+ title: string;
210
+ } | {
211
+ type: "effect";
127
212
  content: {
213
+ type: "attachment";
214
+ name: string;
215
+ mimeType: string;
216
+ read: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
217
+ stream: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
218
+ size?: number | undefined;
219
+ } | {
128
220
  type: "text";
129
221
  text: string;
130
- } | {
222
+ };
223
+ effect: string;
224
+ } | {
225
+ type: "typing";
226
+ state: "start" | "stop";
227
+ } | {
228
+ type: "reply";
229
+ content: {
131
230
  type: "attachment";
132
231
  name: string;
133
232
  mimeType: string;
134
233
  read: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
135
234
  stream: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
136
235
  size?: number | undefined;
236
+ } | {
237
+ type: "text";
238
+ text: string;
137
239
  } | {
138
240
  type: "custom";
139
241
  raw: unknown;
@@ -228,26 +330,152 @@ declare const terminal: Platform<PlatformDef<"terminal", z__default.ZodObject<{
228
330
  } | {
229
331
  type: "effect";
230
332
  content: {
333
+ type: "attachment";
334
+ name: string;
335
+ mimeType: string;
336
+ read: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
337
+ stream: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
338
+ size?: number | undefined;
339
+ } | {
231
340
  type: "text";
232
341
  text: string;
233
- } | {
342
+ };
343
+ effect: string;
344
+ } | {
345
+ type: "typing";
346
+ state: "start" | "stop";
347
+ };
348
+ target: Message;
349
+ } | {
350
+ type: "edit";
351
+ content: {
352
+ type: "attachment";
353
+ name: string;
354
+ mimeType: string;
355
+ read: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
356
+ stream: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
357
+ size?: number | undefined;
358
+ } | {
359
+ type: "text";
360
+ text: string;
361
+ } | {
362
+ type: "custom";
363
+ raw: unknown;
364
+ } | {
365
+ type: "contact";
366
+ user?: {
367
+ __platform: string;
368
+ id: string;
369
+ } | undefined;
370
+ name?: {
371
+ formatted?: string | undefined;
372
+ first?: string | undefined;
373
+ last?: string | undefined;
374
+ middle?: string | undefined;
375
+ prefix?: string | undefined;
376
+ suffix?: string | undefined;
377
+ } | undefined;
378
+ phones?: {
379
+ value: string;
380
+ type?: "mobile" | "home" | "work" | "other" | undefined;
381
+ }[] | undefined;
382
+ emails?: {
383
+ value: string;
384
+ type?: "home" | "work" | "other" | undefined;
385
+ }[] | undefined;
386
+ addresses?: {
387
+ street?: string | undefined;
388
+ city?: string | undefined;
389
+ region?: string | undefined;
390
+ postalCode?: string | undefined;
391
+ country?: string | undefined;
392
+ type?: "home" | "work" | "other" | undefined;
393
+ }[] | undefined;
394
+ org?: {
395
+ name?: string | undefined;
396
+ title?: string | undefined;
397
+ department?: string | undefined;
398
+ } | undefined;
399
+ urls?: string[] | undefined;
400
+ birthday?: string | undefined;
401
+ note?: string | undefined;
402
+ photo?: {
403
+ mimeType: string;
404
+ read: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
405
+ } | undefined;
406
+ raw?: unknown;
407
+ } | {
408
+ type: "voice";
409
+ mimeType: string;
410
+ read: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
411
+ stream: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
412
+ name?: string | undefined;
413
+ duration?: number | undefined;
414
+ size?: number | undefined;
415
+ } | {
416
+ type: "richlink";
417
+ url: string;
418
+ title: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodOptional<z__default.ZodString>>>;
419
+ summary: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodOptional<z__default.ZodString>>>;
420
+ cover: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodOptional<z__default.ZodObject<{
421
+ mimeType: z__default.ZodOptional<z__default.ZodString>;
422
+ read: z__default.ZodFunction<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
423
+ stream: z__default.ZodFunction<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
424
+ }, z__default.core.$strip>>>>;
425
+ } | {
426
+ type: "reaction";
427
+ emoji: string;
428
+ target: Message;
429
+ } | {
430
+ type: "group";
431
+ items: Message[];
432
+ } | {
433
+ type: "poll";
434
+ title: string;
435
+ options: {
436
+ title: string;
437
+ }[];
438
+ } | {
439
+ type: "poll_option";
440
+ option: {
441
+ title: string;
442
+ };
443
+ poll: {
444
+ type: "poll";
445
+ title: string;
446
+ options: {
447
+ title: string;
448
+ }[];
449
+ };
450
+ selected: boolean;
451
+ title: string;
452
+ } | {
453
+ type: "effect";
454
+ content: {
234
455
  type: "attachment";
235
456
  name: string;
236
457
  mimeType: string;
237
458
  read: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>>;
238
459
  stream: z__default.core.$InferOuterFunctionType<z__default.ZodTuple<readonly [], null>, z__default.ZodPromise<z__default.ZodCustom<ReadableStream<unknown>, ReadableStream<unknown>>>>;
239
460
  size?: number | undefined;
461
+ } | {
462
+ type: "text";
463
+ text: string;
240
464
  };
241
465
  effect: string;
466
+ } | {
467
+ type: "typing";
468
+ state: "start" | "stop";
242
469
  };
243
- sender: {
244
- id: string;
245
- };
246
- space: {
247
- id: string;
248
- };
249
- timestamp: Date;
250
- }, void, any>;
251
- }>> & Readonly<Record<never, never>>;
470
+ target: Message;
471
+ };
472
+ sender: {
473
+ id: string;
474
+ };
475
+ space: {
476
+ id: string;
477
+ };
478
+ timestamp: Date;
479
+ }, undefined>> & Readonly<Record<never, never>>;
252
480
 
253
481
  export { terminal };