skedyul 1.7.11 → 1.7.12

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/.build-stamp CHANGED
@@ -1 +1 @@
1
- 1786058725534
1
+ 1786072268866
package/dist/cli/index.js CHANGED
@@ -10113,6 +10113,7 @@ var ThreadEventTypeSchema = import_v44.z.enum([
10113
10113
  // Message events
10114
10114
  "thread.message.received",
10115
10115
  "thread.message.sent",
10116
+ "thread.attachment.received",
10116
10117
  // Participant events
10117
10118
  "thread.participant.joined",
10118
10119
  "thread.participant.left",
@@ -192,6 +192,42 @@ export declare const communicationChannel: {
192
192
  receiveMessage(input: ReceiveMessageInput): Promise<{
193
193
  messageId: string;
194
194
  }>;
195
+ /**
196
+ * Attach uploaded files to a message created via {@link receiveMessage}.
197
+ *
198
+ * Safe to call before or after the inbox processor creates the ThreadMessage:
199
+ * - Before: attachments are stashed on MessageInbox and linked when the message is created
200
+ * - After: rows are created immediately and `thread.attachment.received` is emitted
201
+ *
202
+ * Typical flow for email/MMS: `receiveMessage` → `file.upload` → `attachFilesToMessage`.
203
+ *
204
+ * @example
205
+ * ```ts
206
+ * const { messageId } = await communicationChannel.receiveMessage({ ... })
207
+ * const uploaded = await file.upload({ content, name, mimeType })
208
+ * await communicationChannel.attachFilesToMessage({
209
+ * messageId,
210
+ * attachments: [{
211
+ * fileId: uploaded.id,
212
+ * name: uploaded.name,
213
+ * mimeType: 'audio/mpeg',
214
+ * size: content.length,
215
+ * }],
216
+ * })
217
+ * ```
218
+ */
219
+ attachFilesToMessage(input: {
220
+ messageId: string;
221
+ attachments: Array<{
222
+ fileId: string;
223
+ name?: string;
224
+ mimeType?: string;
225
+ size?: number;
226
+ }>;
227
+ }): Promise<{
228
+ success: boolean;
229
+ attachmentCount: number;
230
+ }>;
195
231
  /**
196
232
  * Update a communication channel's properties.
197
233
  *
@@ -490,6 +490,7 @@ var ThreadEventTypeSchema = z4.enum([
490
490
  // Message events
491
491
  "thread.message.received",
492
492
  "thread.message.sent",
493
+ "thread.attachment.received",
493
494
  // Participant events
494
495
  "thread.participant.joined",
495
496
  "thread.participant.left",
@@ -2593,6 +2594,40 @@ var communicationChannel = {
2593
2594
  });
2594
2595
  return data;
2595
2596
  },
2597
+ /**
2598
+ * Attach uploaded files to a message created via {@link receiveMessage}.
2599
+ *
2600
+ * Safe to call before or after the inbox processor creates the ThreadMessage:
2601
+ * - Before: attachments are stashed on MessageInbox and linked when the message is created
2602
+ * - After: rows are created immediately and `thread.attachment.received` is emitted
2603
+ *
2604
+ * Typical flow for email/MMS: `receiveMessage` → `file.upload` → `attachFilesToMessage`.
2605
+ *
2606
+ * @example
2607
+ * ```ts
2608
+ * const { messageId } = await communicationChannel.receiveMessage({ ... })
2609
+ * const uploaded = await file.upload({ content, name, mimeType })
2610
+ * await communicationChannel.attachFilesToMessage({
2611
+ * messageId,
2612
+ * attachments: [{
2613
+ * fileId: uploaded.id,
2614
+ * name: uploaded.name,
2615
+ * mimeType: 'audio/mpeg',
2616
+ * size: content.length,
2617
+ * }],
2618
+ * })
2619
+ * ```
2620
+ */
2621
+ async attachFilesToMessage(input) {
2622
+ const { data } = await callCore(
2623
+ "communicationChannel.attachFilesToMessage",
2624
+ {
2625
+ messageId: input.messageId,
2626
+ attachments: input.attachments
2627
+ }
2628
+ );
2629
+ return data;
2630
+ },
2596
2631
  /**
2597
2632
  * Update a communication channel's properties.
2598
2633
  *
@@ -6,6 +6,7 @@ import { z } from 'zod/v4';
6
6
  export declare const ThreadEventTypeSchema: z.ZodEnum<{
7
7
  "thread.message.received": "thread.message.received";
8
8
  "thread.message.sent": "thread.message.sent";
9
+ "thread.attachment.received": "thread.attachment.received";
9
10
  "thread.participant.joined": "thread.participant.joined";
10
11
  "thread.participant.left": "thread.participant.left";
11
12
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -32,6 +33,7 @@ export type CustomEventType = z.infer<typeof CustomEventTypeSchema>;
32
33
  export declare const EventTypeSchema: z.ZodUnion<readonly [z.ZodEnum<{
33
34
  "thread.message.received": "thread.message.received";
34
35
  "thread.message.sent": "thread.message.sent";
36
+ "thread.attachment.received": "thread.attachment.received";
35
37
  "thread.participant.joined": "thread.participant.joined";
36
38
  "thread.participant.left": "thread.participant.left";
37
39
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -274,6 +276,7 @@ export declare const ThreadEventSchema: z.ZodObject<{
274
276
  type: z.ZodUnion<readonly [z.ZodEnum<{
275
277
  "thread.message.received": "thread.message.received";
276
278
  "thread.message.sent": "thread.message.sent";
279
+ "thread.attachment.received": "thread.attachment.received";
277
280
  "thread.participant.joined": "thread.participant.joined";
278
281
  "thread.participant.left": "thread.participant.left";
279
282
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -380,6 +383,7 @@ export declare const CreateThreadEventInputSchema: z.ZodObject<{
380
383
  type: z.ZodUnion<readonly [z.ZodEnum<{
381
384
  "thread.message.received": "thread.message.received";
382
385
  "thread.message.sent": "thread.message.sent";
386
+ "thread.attachment.received": "thread.attachment.received";
383
387
  "thread.participant.joined": "thread.participant.joined";
384
388
  "thread.participant.left": "thread.participant.left";
385
389
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -404,6 +408,7 @@ export declare const EventSubscriptionSchema: z.ZodObject<{
404
408
  subscribes: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
405
409
  "thread.message.received": "thread.message.received";
406
410
  "thread.message.sent": "thread.message.sent";
411
+ "thread.attachment.received": "thread.attachment.received";
407
412
  "thread.participant.joined": "thread.participant.joined";
408
413
  "thread.participant.left": "thread.participant.left";
409
414
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -421,6 +426,7 @@ export declare const EventSubscriptionSchema: z.ZodObject<{
421
426
  cancels: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
422
427
  "thread.message.received": "thread.message.received";
423
428
  "thread.message.sent": "thread.message.sent";
429
+ "thread.attachment.received": "thread.attachment.received";
424
430
  "thread.participant.joined": "thread.participant.joined";
425
431
  "thread.participant.left": "thread.participant.left";
426
432
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -444,6 +450,7 @@ export declare const EventWaitSchema: z.ZodObject<{
444
450
  event: z.ZodUnion<readonly [z.ZodEnum<{
445
451
  "thread.message.received": "thread.message.received";
446
452
  "thread.message.sent": "thread.message.sent";
453
+ "thread.attachment.received": "thread.attachment.received";
447
454
  "thread.participant.joined": "thread.participant.joined";
448
455
  "thread.participant.left": "thread.participant.left";
449
456
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -468,6 +475,7 @@ export declare const EventsConfigSchema: z.ZodObject<{
468
475
  subscribes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
469
476
  "thread.message.received": "thread.message.received";
470
477
  "thread.message.sent": "thread.message.sent";
478
+ "thread.attachment.received": "thread.attachment.received";
471
479
  "thread.participant.joined": "thread.participant.joined";
472
480
  "thread.participant.left": "thread.participant.left";
473
481
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -485,6 +493,7 @@ export declare const EventsConfigSchema: z.ZodObject<{
485
493
  emits: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
486
494
  "thread.message.received": "thread.message.received";
487
495
  "thread.message.sent": "thread.message.sent";
496
+ "thread.attachment.received": "thread.attachment.received";
488
497
  "thread.participant.joined": "thread.participant.joined";
489
498
  "thread.participant.left": "thread.participant.left";
490
499
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -502,6 +511,7 @@ export declare const EventsConfigSchema: z.ZodObject<{
502
511
  event: z.ZodUnion<readonly [z.ZodEnum<{
503
512
  "thread.message.received": "thread.message.received";
504
513
  "thread.message.sent": "thread.message.sent";
514
+ "thread.attachment.received": "thread.attachment.received";
505
515
  "thread.participant.joined": "thread.participant.joined";
506
516
  "thread.participant.left": "thread.participant.left";
507
517
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -521,6 +531,7 @@ export declare const EventsConfigSchema: z.ZodObject<{
521
531
  cancels: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
522
532
  "thread.message.received": "thread.message.received";
523
533
  "thread.message.sent": "thread.message.sent";
534
+ "thread.attachment.received": "thread.attachment.received";
524
535
  "thread.participant.joined": "thread.participant.joined";
525
536
  "thread.participant.left": "thread.participant.left";
526
537
  "thread.participant.mentioned": "thread.participant.mentioned";
package/dist/index.js CHANGED
@@ -871,6 +871,7 @@ var ThreadEventTypeSchema = import_v44.z.enum([
871
871
  // Message events
872
872
  "thread.message.received",
873
873
  "thread.message.sent",
874
+ "thread.attachment.received",
874
875
  // Participant events
875
876
  "thread.participant.joined",
876
877
  "thread.participant.left",
@@ -2974,6 +2975,40 @@ var communicationChannel = {
2974
2975
  });
2975
2976
  return data;
2976
2977
  },
2978
+ /**
2979
+ * Attach uploaded files to a message created via {@link receiveMessage}.
2980
+ *
2981
+ * Safe to call before or after the inbox processor creates the ThreadMessage:
2982
+ * - Before: attachments are stashed on MessageInbox and linked when the message is created
2983
+ * - After: rows are created immediately and `thread.attachment.received` is emitted
2984
+ *
2985
+ * Typical flow for email/MMS: `receiveMessage` → `file.upload` → `attachFilesToMessage`.
2986
+ *
2987
+ * @example
2988
+ * ```ts
2989
+ * const { messageId } = await communicationChannel.receiveMessage({ ... })
2990
+ * const uploaded = await file.upload({ content, name, mimeType })
2991
+ * await communicationChannel.attachFilesToMessage({
2992
+ * messageId,
2993
+ * attachments: [{
2994
+ * fileId: uploaded.id,
2995
+ * name: uploaded.name,
2996
+ * mimeType: 'audio/mpeg',
2997
+ * size: content.length,
2998
+ * }],
2999
+ * })
3000
+ * ```
3001
+ */
3002
+ async attachFilesToMessage(input) {
3003
+ const { data } = await callCore(
3004
+ "communicationChannel.attachFilesToMessage",
3005
+ {
3006
+ messageId: input.messageId,
3007
+ attachments: input.attachments
3008
+ }
3009
+ );
3010
+ return data;
3011
+ },
2977
3012
  /**
2978
3013
  * Update a communication channel's properties.
2979
3014
  *
@@ -528,6 +528,7 @@ export declare const AgentYAMLV3Schema: z.ZodObject<{
528
528
  subscribes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
529
529
  "thread.message.received": "thread.message.received";
530
530
  "thread.message.sent": "thread.message.sent";
531
+ "thread.attachment.received": "thread.attachment.received";
531
532
  "thread.participant.joined": "thread.participant.joined";
532
533
  "thread.participant.left": "thread.participant.left";
533
534
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -545,6 +546,7 @@ export declare const AgentYAMLV3Schema: z.ZodObject<{
545
546
  emits: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
546
547
  "thread.message.received": "thread.message.received";
547
548
  "thread.message.sent": "thread.message.sent";
549
+ "thread.attachment.received": "thread.attachment.received";
548
550
  "thread.participant.joined": "thread.participant.joined";
549
551
  "thread.participant.left": "thread.participant.left";
550
552
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -562,6 +564,7 @@ export declare const AgentYAMLV3Schema: z.ZodObject<{
562
564
  event: z.ZodUnion<readonly [z.ZodEnum<{
563
565
  "thread.message.received": "thread.message.received";
564
566
  "thread.message.sent": "thread.message.sent";
567
+ "thread.attachment.received": "thread.attachment.received";
565
568
  "thread.participant.joined": "thread.participant.joined";
566
569
  "thread.participant.left": "thread.participant.left";
567
570
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -581,6 +584,7 @@ export declare const AgentYAMLV3Schema: z.ZodObject<{
581
584
  cancels: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
582
585
  "thread.message.received": "thread.message.received";
583
586
  "thread.message.sent": "thread.message.sent";
587
+ "thread.attachment.received": "thread.attachment.received";
584
588
  "thread.participant.joined": "thread.participant.joined";
585
589
  "thread.participant.left": "thread.participant.left";
586
590
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -62,6 +62,7 @@ var ThreadEventTypeSchema = import_v4.z.enum([
62
62
  // Message events
63
63
  "thread.message.received",
64
64
  "thread.message.sent",
65
+ "thread.attachment.received",
65
66
  // Participant events
66
67
  "thread.participant.joined",
67
68
  "thread.participant.left",
@@ -9,6 +9,7 @@ var ThreadEventTypeSchema = z.enum([
9
9
  // Message events
10
10
  "thread.message.received",
11
11
  "thread.message.sent",
12
+ "thread.attachment.received",
12
13
  // Participant events
13
14
  "thread.participant.joined",
14
15
  "thread.participant.left",
@@ -62,6 +62,7 @@ export declare const TriggerContextSchema: z.ZodObject<{
62
62
  type: z.ZodUnion<readonly [z.ZodEnum<{
63
63
  "thread.message.received": "thread.message.received";
64
64
  "thread.message.sent": "thread.message.sent";
65
+ "thread.attachment.received": "thread.attachment.received";
65
66
  "thread.participant.joined": "thread.participant.joined";
66
67
  "thread.participant.left": "thread.participant.left";
67
68
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -189,6 +190,7 @@ export declare const ResolvedTriggerSchema: z.ZodObject<{
189
190
  subscribes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
190
191
  "thread.message.received": "thread.message.received";
191
192
  "thread.message.sent": "thread.message.sent";
193
+ "thread.attachment.received": "thread.attachment.received";
192
194
  "thread.participant.joined": "thread.participant.joined";
193
195
  "thread.participant.left": "thread.participant.left";
194
196
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -211,6 +213,7 @@ export declare const ResolvedTriggerSchema: z.ZodObject<{
211
213
  type: z.ZodUnion<readonly [z.ZodEnum<{
212
214
  "thread.message.received": "thread.message.received";
213
215
  "thread.message.sent": "thread.message.sent";
216
+ "thread.attachment.received": "thread.attachment.received";
214
217
  "thread.participant.joined": "thread.participant.joined";
215
218
  "thread.participant.left": "thread.participant.left";
216
219
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -71,6 +71,7 @@ export declare const WorkflowYAMLSchema: z.ZodObject<{
71
71
  subscribes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
72
72
  "thread.message.received": "thread.message.received";
73
73
  "thread.message.sent": "thread.message.sent";
74
+ "thread.attachment.received": "thread.attachment.received";
74
75
  "thread.participant.joined": "thread.participant.joined";
75
76
  "thread.participant.left": "thread.participant.left";
76
77
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -88,6 +89,7 @@ export declare const WorkflowYAMLSchema: z.ZodObject<{
88
89
  emits: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
89
90
  "thread.message.received": "thread.message.received";
90
91
  "thread.message.sent": "thread.message.sent";
92
+ "thread.attachment.received": "thread.attachment.received";
91
93
  "thread.participant.joined": "thread.participant.joined";
92
94
  "thread.participant.left": "thread.participant.left";
93
95
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -105,6 +107,7 @@ export declare const WorkflowYAMLSchema: z.ZodObject<{
105
107
  event: z.ZodUnion<readonly [z.ZodEnum<{
106
108
  "thread.message.received": "thread.message.received";
107
109
  "thread.message.sent": "thread.message.sent";
110
+ "thread.attachment.received": "thread.attachment.received";
108
111
  "thread.participant.joined": "thread.participant.joined";
109
112
  "thread.participant.left": "thread.participant.left";
110
113
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -124,6 +127,7 @@ export declare const WorkflowYAMLSchema: z.ZodObject<{
124
127
  cancels: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
125
128
  "thread.message.received": "thread.message.received";
126
129
  "thread.message.sent": "thread.message.sent";
130
+ "thread.attachment.received": "thread.attachment.received";
127
131
  "thread.participant.joined": "thread.participant.joined";
128
132
  "thread.participant.left": "thread.participant.left";
129
133
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -185,6 +189,7 @@ export declare const WorkflowMetadataSchema: z.ZodObject<{
185
189
  subscribes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
186
190
  "thread.message.received": "thread.message.received";
187
191
  "thread.message.sent": "thread.message.sent";
192
+ "thread.attachment.received": "thread.attachment.received";
188
193
  "thread.participant.joined": "thread.participant.joined";
189
194
  "thread.participant.left": "thread.participant.left";
190
195
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -202,6 +207,7 @@ export declare const WorkflowMetadataSchema: z.ZodObject<{
202
207
  emits: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
203
208
  "thread.message.received": "thread.message.received";
204
209
  "thread.message.sent": "thread.message.sent";
210
+ "thread.attachment.received": "thread.attachment.received";
205
211
  "thread.participant.joined": "thread.participant.joined";
206
212
  "thread.participant.left": "thread.participant.left";
207
213
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -219,6 +225,7 @@ export declare const WorkflowMetadataSchema: z.ZodObject<{
219
225
  event: z.ZodUnion<readonly [z.ZodEnum<{
220
226
  "thread.message.received": "thread.message.received";
221
227
  "thread.message.sent": "thread.message.sent";
228
+ "thread.attachment.received": "thread.attachment.received";
222
229
  "thread.participant.joined": "thread.participant.joined";
223
230
  "thread.participant.left": "thread.participant.left";
224
231
  "thread.participant.mentioned": "thread.participant.mentioned";
@@ -238,6 +245,7 @@ export declare const WorkflowMetadataSchema: z.ZodObject<{
238
245
  cancels: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
239
246
  "thread.message.received": "thread.message.received";
240
247
  "thread.message.sent": "thread.message.sent";
248
+ "thread.attachment.received": "thread.attachment.received";
241
249
  "thread.participant.joined": "thread.participant.joined";
242
250
  "thread.participant.left": "thread.participant.left";
243
251
  "thread.participant.mentioned": "thread.participant.mentioned";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "1.7.11",
3
+ "version": "1.7.12",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",