@keemakr/event-sdk 0.2.0-dev-20261012160211 → 0.2.0-dev-20261124171750
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/apps/channels.d.ts +170 -0
- package/dist/apps/channels.js +155 -0
- package/dist/apps/contentos.d.ts +59 -0
- package/dist/apps/contentos.js +47 -0
- package/dist/apps/core.d.ts +94 -0
- package/dist/apps/core.js +64 -0
- package/dist/apps/index.d.ts +6 -2
- package/dist/apps/index.js +15 -3
- package/dist/apps/member-mail.d.ts +18 -0
- package/dist/apps/member-mail.js +19 -0
- package/dist/apps/smartlead.d.ts +8 -2
- package/dist/apps/smartlead.js +7 -2
- package/dist/index.d.ts +21 -1
- package/dist/index.js +22 -1
- package/package.json +11 -1
package/dist/apps/channels.d.ts
CHANGED
|
@@ -397,4 +397,174 @@ export declare const conversationEvents: {
|
|
|
397
397
|
contact_id: string | null;
|
|
398
398
|
}>;
|
|
399
399
|
};
|
|
400
|
+
/**
|
|
401
|
+
* The person opened a patient link a Pack asked Core for, and pressed Start: the
|
|
402
|
+
* link's purpose (intake) now has its conversation, on the widget account bound
|
|
403
|
+
* to the Pack's handler of that name. The Contact is the one the link was made
|
|
404
|
+
* for; `subject` is the Pack's own reference, such as an appointment.
|
|
405
|
+
*/
|
|
406
|
+
declare const patientLinkOpened: z.ZodObject<{
|
|
407
|
+
conversation_id: z.ZodUUID;
|
|
408
|
+
owner_epoch: z.ZodNumber;
|
|
409
|
+
contact_id: z.ZodString;
|
|
410
|
+
purpose: z.ZodLiteral<"intake">;
|
|
411
|
+
subject: z.ZodObject<{
|
|
412
|
+
appointment_ref: z.ZodString;
|
|
413
|
+
}, z.core.$strict>;
|
|
414
|
+
opened_at: z.ZodISODateTime;
|
|
415
|
+
}, z.core.$strict>;
|
|
416
|
+
export type PatientLinkOpened = z.infer<typeof patientLinkOpened>;
|
|
417
|
+
/**
|
|
418
|
+
* A conversation changed hands between the agent and a staff member, or closed
|
|
419
|
+
* while a staff member held it. It goes to the Pack whose binding answers the
|
|
420
|
+
* conversation, which the inbound handler alone cannot learn: a handler hears
|
|
421
|
+
* nothing while a person owns the conversation.
|
|
422
|
+
*/
|
|
423
|
+
declare const handedOver: z.ZodObject<{
|
|
424
|
+
conversation_id: z.ZodUUID;
|
|
425
|
+
owner_epoch: z.ZodNumber;
|
|
426
|
+
contact_id: z.ZodNullable<z.ZodString>;
|
|
427
|
+
owner: z.ZodEnum<{
|
|
428
|
+
agent: "agent";
|
|
429
|
+
staff: "staff";
|
|
430
|
+
}>;
|
|
431
|
+
owner_user_id: z.ZodNullable<z.ZodUUID>;
|
|
432
|
+
owner_name: z.ZodNullable<z.ZodString>;
|
|
433
|
+
reason: z.ZodEnum<{
|
|
434
|
+
given_back: "given_back";
|
|
435
|
+
expired: "expired";
|
|
436
|
+
handoff_requested: "handoff_requested";
|
|
437
|
+
takeover: "takeover";
|
|
438
|
+
reassigned: "reassigned";
|
|
439
|
+
closed: "closed";
|
|
440
|
+
}>;
|
|
441
|
+
changed_at: z.ZodISODateTime;
|
|
442
|
+
}, z.core.$strict>;
|
|
443
|
+
export type ConversationHandedOver = z.infer<typeof handedOver>;
|
|
444
|
+
/**
|
|
445
|
+
* The person wrote while a staff member holds the conversation. No agent turn starts: the staff
|
|
446
|
+
* member answers. It goes to the Pack whose binding answers the conversation so the Pack can still
|
|
447
|
+
* screen what the person said (an emergency must not wait for staff to read it).
|
|
448
|
+
*/
|
|
449
|
+
declare const messageWhileStaffOwned: z.ZodObject<{
|
|
450
|
+
conversation_id: z.ZodUUID;
|
|
451
|
+
owner_epoch: z.ZodNumber;
|
|
452
|
+
channel: z.ZodEnum<{
|
|
453
|
+
email: "email";
|
|
454
|
+
whatsapp: "whatsapp";
|
|
455
|
+
widget: "widget";
|
|
456
|
+
sms: "sms";
|
|
457
|
+
}>;
|
|
458
|
+
message: z.ZodObject<{
|
|
459
|
+
id: z.ZodUUID;
|
|
460
|
+
text: z.ZodString;
|
|
461
|
+
received_at: z.ZodISODateTime;
|
|
462
|
+
}, z.core.$strict>;
|
|
463
|
+
contact_id: z.ZodNullable<z.ZodString>;
|
|
464
|
+
owner_user_id: z.ZodNullable<z.ZodUUID>;
|
|
465
|
+
}, z.core.$strict>;
|
|
466
|
+
export type ConversationMessageWhileStaffOwned = z.infer<typeof messageWhileStaffOwned>;
|
|
467
|
+
/**
|
|
468
|
+
* The agent asked the team to look at the conversation (the ask_team action). It goes to the Pack
|
|
469
|
+
* whose binding answers the conversation, even before the person proved who they are: a turn
|
|
470
|
+
* before identity may not publish events or write the Pack's Tables, so this delivery is where the
|
|
471
|
+
* Pack can raise its own task for staff (an urgent review for someone who gave no proof).
|
|
472
|
+
*/
|
|
473
|
+
declare const teamAsked: z.ZodObject<{
|
|
474
|
+
conversation_id: z.ZodUUID;
|
|
475
|
+
owner_epoch: z.ZodNumber;
|
|
476
|
+
channel: z.ZodEnum<{
|
|
477
|
+
email: "email";
|
|
478
|
+
whatsapp: "whatsapp";
|
|
479
|
+
widget: "widget";
|
|
480
|
+
sms: "sms";
|
|
481
|
+
}>;
|
|
482
|
+
note: z.ZodString;
|
|
483
|
+
message: z.ZodNullable<z.ZodObject<{
|
|
484
|
+
id: z.ZodUUID;
|
|
485
|
+
text: z.ZodString;
|
|
486
|
+
received_at: z.ZodISODateTime;
|
|
487
|
+
}, z.core.$strict>>;
|
|
488
|
+
identity: z.ZodEnum<{
|
|
489
|
+
anonymous: "anonymous";
|
|
490
|
+
identified: "identified";
|
|
491
|
+
verified: "verified";
|
|
492
|
+
conflict: "conflict";
|
|
493
|
+
}>;
|
|
494
|
+
contact_id: z.ZodNullable<z.ZodString>;
|
|
495
|
+
asked_at: z.ZodISODateTime;
|
|
496
|
+
}, z.core.$strict>;
|
|
497
|
+
export type ConversationTeamAsked = z.infer<typeof teamAsked>;
|
|
498
|
+
declare const contactMerged: z.ZodObject<{
|
|
499
|
+
from_contact_id: z.ZodString;
|
|
500
|
+
into_contact_id: z.ZodString;
|
|
501
|
+
merged_at: z.ZodISODateTime;
|
|
502
|
+
handle_was_already_verified: z.ZodBoolean;
|
|
503
|
+
}, z.core.$strict>;
|
|
504
|
+
export type ContactMerged = z.infer<typeof contactMerged>;
|
|
505
|
+
export declare const coreEvents: {
|
|
506
|
+
readonly 'patient_link.opened': import("../index.js").EventContract<{
|
|
507
|
+
conversation_id: string;
|
|
508
|
+
owner_epoch: number;
|
|
509
|
+
contact_id: string;
|
|
510
|
+
purpose: "intake";
|
|
511
|
+
subject: {
|
|
512
|
+
appointment_ref: string;
|
|
513
|
+
};
|
|
514
|
+
opened_at: string;
|
|
515
|
+
}>;
|
|
516
|
+
readonly 'conversation.handed_over': import("../index.js").EventContract<{
|
|
517
|
+
conversation_id: string;
|
|
518
|
+
owner_epoch: number;
|
|
519
|
+
contact_id: string | null;
|
|
520
|
+
owner: "agent" | "staff";
|
|
521
|
+
owner_user_id: string | null;
|
|
522
|
+
owner_name: string | null;
|
|
523
|
+
reason: "given_back" | "expired" | "handoff_requested" | "takeover" | "reassigned" | "closed";
|
|
524
|
+
changed_at: string;
|
|
525
|
+
}>;
|
|
526
|
+
readonly 'conversation.message_while_staff_owned': import("../index.js").EventContract<{
|
|
527
|
+
conversation_id: string;
|
|
528
|
+
owner_epoch: number;
|
|
529
|
+
channel: "email" | "whatsapp" | "widget" | "sms";
|
|
530
|
+
message: {
|
|
531
|
+
id: string;
|
|
532
|
+
text: string;
|
|
533
|
+
received_at: string;
|
|
534
|
+
};
|
|
535
|
+
contact_id: string | null;
|
|
536
|
+
owner_user_id: string | null;
|
|
537
|
+
}>;
|
|
538
|
+
readonly 'conversation.team_asked': import("../index.js").EventContract<{
|
|
539
|
+
conversation_id: string;
|
|
540
|
+
owner_epoch: number;
|
|
541
|
+
channel: "email" | "whatsapp" | "widget" | "sms";
|
|
542
|
+
note: string;
|
|
543
|
+
message: {
|
|
544
|
+
id: string;
|
|
545
|
+
text: string;
|
|
546
|
+
received_at: string;
|
|
547
|
+
} | null;
|
|
548
|
+
identity: "anonymous" | "identified" | "verified" | "conflict";
|
|
549
|
+
contact_id: string | null;
|
|
550
|
+
asked_at: string;
|
|
551
|
+
}>;
|
|
552
|
+
readonly 'contact.merged': import("../index.js").EventContract<{
|
|
553
|
+
from_contact_id: string;
|
|
554
|
+
into_contact_id: string;
|
|
555
|
+
merged_at: string;
|
|
556
|
+
handle_was_already_verified: boolean;
|
|
557
|
+
}>;
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* Versions Core no longer emits. They stay declared because stored events and Pack handlers pin
|
|
561
|
+
* them (scripts/contracts-lock.mjs).
|
|
562
|
+
*/
|
|
563
|
+
export declare const retiredCoreEvents: {
|
|
564
|
+
readonly 'contact.merged': import("../index.js").EventContract<{
|
|
565
|
+
from_contact_id: string;
|
|
566
|
+
into_contact_id: string;
|
|
567
|
+
merged_at: string;
|
|
568
|
+
}>;
|
|
569
|
+
};
|
|
400
570
|
export {};
|
package/dist/apps/channels.js
CHANGED
|
@@ -178,3 +178,158 @@ export const conversationEvents = defineAppEvents('conversation', {
|
|
|
178
178
|
subject: ['conversation_id'],
|
|
179
179
|
},
|
|
180
180
|
});
|
|
181
|
+
/**
|
|
182
|
+
* The person opened a patient link a Pack asked Core for, and pressed Start: the
|
|
183
|
+
* link's purpose (intake) now has its conversation, on the widget account bound
|
|
184
|
+
* to the Pack's handler of that name. The Contact is the one the link was made
|
|
185
|
+
* for; `subject` is the Pack's own reference, such as an appointment.
|
|
186
|
+
*/
|
|
187
|
+
const patientLinkOpened = z.strictObject({
|
|
188
|
+
conversation_id: z.uuid(),
|
|
189
|
+
owner_epoch: z.number().int().positive(),
|
|
190
|
+
contact_id: z.string().min(1).max(200),
|
|
191
|
+
purpose: z.literal('intake'),
|
|
192
|
+
subject: z.strictObject({ appointment_ref: z.string().min(1).max(200) }),
|
|
193
|
+
opened_at: z.iso.datetime(),
|
|
194
|
+
});
|
|
195
|
+
/**
|
|
196
|
+
* A conversation changed hands between the agent and a staff member, or closed
|
|
197
|
+
* while a staff member held it. It goes to the Pack whose binding answers the
|
|
198
|
+
* conversation, which the inbound handler alone cannot learn: a handler hears
|
|
199
|
+
* nothing while a person owns the conversation.
|
|
200
|
+
*/
|
|
201
|
+
const handedOver = z.strictObject({
|
|
202
|
+
conversation_id: z.uuid(),
|
|
203
|
+
owner_epoch: z.number().int().positive(),
|
|
204
|
+
/** Null while the binding's identity rule hides who is writing. */
|
|
205
|
+
contact_id: z.string().min(1).max(200).nullable(),
|
|
206
|
+
/** Who holds it now; on `closed`, the staff member who held it when it closed. */
|
|
207
|
+
owner: z.enum(['agent', 'staff']),
|
|
208
|
+
owner_user_id: z.uuid().nullable(),
|
|
209
|
+
owner_name: z.string().max(200).nullable(),
|
|
210
|
+
reason: z.enum([
|
|
211
|
+
'handoff_requested',
|
|
212
|
+
'takeover',
|
|
213
|
+
'reassigned',
|
|
214
|
+
'given_back',
|
|
215
|
+
'expired',
|
|
216
|
+
'closed',
|
|
217
|
+
]),
|
|
218
|
+
changed_at: z.iso.datetime(),
|
|
219
|
+
});
|
|
220
|
+
/**
|
|
221
|
+
* The person wrote while a staff member holds the conversation. No agent turn starts: the staff
|
|
222
|
+
* member answers. It goes to the Pack whose binding answers the conversation so the Pack can still
|
|
223
|
+
* screen what the person said (an emergency must not wait for staff to read it).
|
|
224
|
+
*/
|
|
225
|
+
const messageWhileStaffOwned = z.strictObject({
|
|
226
|
+
conversation_id: z.uuid(),
|
|
227
|
+
owner_epoch: z.number().int().positive(),
|
|
228
|
+
channel: z.enum(['widget', 'whatsapp', 'email', 'sms']),
|
|
229
|
+
message: z.strictObject({
|
|
230
|
+
/** Core's timeline entry id for the message. */
|
|
231
|
+
id: z.uuid(),
|
|
232
|
+
text: z.string().max(20000),
|
|
233
|
+
received_at: z.iso.datetime(),
|
|
234
|
+
}),
|
|
235
|
+
/** Null while the binding's identity rule hides who is writing. */
|
|
236
|
+
contact_id: z.string().min(1).max(200).nullable(),
|
|
237
|
+
/** The staff member who holds the conversation. */
|
|
238
|
+
owner_user_id: z.uuid().nullable(),
|
|
239
|
+
});
|
|
240
|
+
/**
|
|
241
|
+
* The agent asked the team to look at the conversation (the ask_team action). It goes to the Pack
|
|
242
|
+
* whose binding answers the conversation, even before the person proved who they are: a turn
|
|
243
|
+
* before identity may not publish events or write the Pack's Tables, so this delivery is where the
|
|
244
|
+
* Pack can raise its own task for staff (an urgent review for someone who gave no proof).
|
|
245
|
+
*/
|
|
246
|
+
const teamAsked = z.strictObject({
|
|
247
|
+
conversation_id: z.uuid(),
|
|
248
|
+
owner_epoch: z.number().int().positive(),
|
|
249
|
+
channel: z.enum(['widget', 'whatsapp', 'email', 'sms']),
|
|
250
|
+
/** What the agent told the team, in its own words. */
|
|
251
|
+
note: z.string().min(1).max(2000),
|
|
252
|
+
/** The person's latest message when the agent asked, as Core stored it; null when none. */
|
|
253
|
+
message: z
|
|
254
|
+
.strictObject({
|
|
255
|
+
/** Core's timeline entry id for the message. */
|
|
256
|
+
id: z.uuid(),
|
|
257
|
+
text: z.string().max(20000),
|
|
258
|
+
received_at: z.iso.datetime(),
|
|
259
|
+
})
|
|
260
|
+
.nullable(),
|
|
261
|
+
/** What Core knows about who is writing. */
|
|
262
|
+
identity: z.enum(['anonymous', 'identified', 'verified', 'conflict']),
|
|
263
|
+
/** Null while the binding's identity rule hides who is writing. */
|
|
264
|
+
contact_id: z.string().min(1).max(200).nullable(),
|
|
265
|
+
asked_at: z.iso.datetime(),
|
|
266
|
+
});
|
|
267
|
+
/**
|
|
268
|
+
* The person proved they are another Contact (a code to that Contact's address), so Core merged
|
|
269
|
+
* the Contact they were known by into it. Every Pack that listens gets it, since any Pack's Tables
|
|
270
|
+
* may name either Contact: each moves its own rows from `from_contact_id` to `into_contact_id`.
|
|
271
|
+
* Core already moved its own, and still answers for the old id with the one it became.
|
|
272
|
+
*/
|
|
273
|
+
const contactMergedV1 = z.strictObject({
|
|
274
|
+
from_contact_id: z.string().min(1).max(200),
|
|
275
|
+
into_contact_id: z.string().min(1).max(200),
|
|
276
|
+
merged_at: z.iso.datetime(),
|
|
277
|
+
});
|
|
278
|
+
const contactMerged = contactMergedV1.extend({
|
|
279
|
+
/**
|
|
280
|
+
* True when the address the person proved was already proven on `into_contact_id` before this
|
|
281
|
+
* proof (a code, a link, or a reply to Core's email). False when Core held it unproven: written
|
|
282
|
+
* from, typed, or given by staff or a Pack.
|
|
283
|
+
*/
|
|
284
|
+
handle_was_already_verified: z.boolean(),
|
|
285
|
+
});
|
|
286
|
+
export const coreEvents = defineAppEvents('core', {
|
|
287
|
+
'patient_link.opened': {
|
|
288
|
+
version: 1,
|
|
289
|
+
description: 'The person opened a patient link and started its conversation.',
|
|
290
|
+
schema: patientLinkOpened,
|
|
291
|
+
sensitivity: 'personal',
|
|
292
|
+
subject: ['conversation_id'],
|
|
293
|
+
},
|
|
294
|
+
'conversation.handed_over': {
|
|
295
|
+
version: 1,
|
|
296
|
+
description: 'A conversation changed hands, or closed while a staff member held it.',
|
|
297
|
+
schema: handedOver,
|
|
298
|
+
sensitivity: 'personal',
|
|
299
|
+
subject: ['conversation_id'],
|
|
300
|
+
},
|
|
301
|
+
'conversation.message_while_staff_owned': {
|
|
302
|
+
version: 1,
|
|
303
|
+
description: 'The person wrote while a staff member holds the conversation.',
|
|
304
|
+
schema: messageWhileStaffOwned,
|
|
305
|
+
sensitivity: 'personal',
|
|
306
|
+
subject: ['conversation_id'],
|
|
307
|
+
},
|
|
308
|
+
'conversation.team_asked': {
|
|
309
|
+
version: 1,
|
|
310
|
+
description: 'The agent asked the team to look at the conversation.',
|
|
311
|
+
schema: teamAsked,
|
|
312
|
+
sensitivity: 'personal',
|
|
313
|
+
subject: ['conversation_id'],
|
|
314
|
+
},
|
|
315
|
+
'contact.merged': {
|
|
316
|
+
version: 2,
|
|
317
|
+
description: 'A Contact was merged into the Contact the person proved they are.',
|
|
318
|
+
schema: contactMerged,
|
|
319
|
+
sensitivity: 'personal',
|
|
320
|
+
subject: ['into_contact_id'],
|
|
321
|
+
},
|
|
322
|
+
});
|
|
323
|
+
/**
|
|
324
|
+
* Versions Core no longer emits. They stay declared because stored events and Pack handlers pin
|
|
325
|
+
* them (scripts/contracts-lock.mjs).
|
|
326
|
+
*/
|
|
327
|
+
export const retiredCoreEvents = defineAppEvents('core', {
|
|
328
|
+
'contact.merged': {
|
|
329
|
+
version: 1,
|
|
330
|
+
description: 'A Contact was merged into the Contact the person proved they are.',
|
|
331
|
+
schema: contactMergedV1,
|
|
332
|
+
sensitivity: 'personal',
|
|
333
|
+
subject: ['into_contact_id'],
|
|
334
|
+
},
|
|
335
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const waiting: z.ZodObject<{
|
|
3
|
+
event_id: z.ZodString;
|
|
4
|
+
project_id: z.ZodString;
|
|
5
|
+
format: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
state: z.ZodString;
|
|
8
|
+
occurred_at: z.ZodISODateTime;
|
|
9
|
+
waiting_on: z.ZodObject<{
|
|
10
|
+
task: z.ZodString;
|
|
11
|
+
kind: z.ZodEnum<{
|
|
12
|
+
review: "review";
|
|
13
|
+
spend: "spend";
|
|
14
|
+
}>;
|
|
15
|
+
question: z.ZodString;
|
|
16
|
+
options: z.ZodArray<z.ZodString>;
|
|
17
|
+
checks: z.ZodArray<z.ZodString>;
|
|
18
|
+
price_usd_cents: z.ZodNullable<z.ZodNumber>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
declare const delivered: z.ZodObject<{
|
|
22
|
+
event_id: z.ZodString;
|
|
23
|
+
project_id: z.ZodString;
|
|
24
|
+
format: z.ZodString;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
state: z.ZodString;
|
|
27
|
+
occurred_at: z.ZodISODateTime;
|
|
28
|
+
output_ids: z.ZodArray<z.ZodString>;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
export type ContentosPieceWaiting = z.infer<typeof waiting>;
|
|
31
|
+
export type ContentosPieceDelivered = z.infer<typeof delivered>;
|
|
32
|
+
export declare const contentosEvents: {
|
|
33
|
+
readonly 'piece.waiting': import("../index.js").EventContract<{
|
|
34
|
+
event_id: string;
|
|
35
|
+
project_id: string;
|
|
36
|
+
format: string;
|
|
37
|
+
name: string;
|
|
38
|
+
state: string;
|
|
39
|
+
occurred_at: string;
|
|
40
|
+
waiting_on: {
|
|
41
|
+
task: string;
|
|
42
|
+
kind: "review" | "spend";
|
|
43
|
+
question: string;
|
|
44
|
+
options: string[];
|
|
45
|
+
checks: string[];
|
|
46
|
+
price_usd_cents: number | null;
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
49
|
+
readonly 'piece.delivered': import("../index.js").EventContract<{
|
|
50
|
+
event_id: string;
|
|
51
|
+
project_id: string;
|
|
52
|
+
format: string;
|
|
53
|
+
name: string;
|
|
54
|
+
state: string;
|
|
55
|
+
occurred_at: string;
|
|
56
|
+
output_ids: string[];
|
|
57
|
+
}>;
|
|
58
|
+
};
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineAppEvents } from './define.js';
|
|
3
|
+
/**
|
|
4
|
+
* What ContentOS reports about one piece (a design, a video, a deck) in the
|
|
5
|
+
* workspace's ContentOS account. `event_id` is ContentOS's own id for the
|
|
6
|
+
* fact, the same on every resend. No file links: a handler reads fresh ones
|
|
7
|
+
* with ContentOS's `run.get`.
|
|
8
|
+
*/
|
|
9
|
+
const piece = z.strictObject({
|
|
10
|
+
event_id: z.string().min(1).max(100),
|
|
11
|
+
project_id: z.string().min(1).max(200),
|
|
12
|
+
format: z.string().min(1).max(40),
|
|
13
|
+
name: z.string().max(1000),
|
|
14
|
+
/** ContentOS's run status as `run.get` reports it, such as `awaiting_review` or `completed`. */
|
|
15
|
+
state: z.string().min(1).max(40),
|
|
16
|
+
occurred_at: z.iso.datetime(),
|
|
17
|
+
});
|
|
18
|
+
const waiting = piece.extend({
|
|
19
|
+
waiting_on: z.strictObject({
|
|
20
|
+
/** The step that waits, which `task.approve` or `task.revise` answers. */
|
|
21
|
+
task: z.string().min(1).max(100),
|
|
22
|
+
/** `spend`: the yes approves what the piece costs, `price_usd_cents`. */
|
|
23
|
+
kind: z.enum(['review', 'spend']),
|
|
24
|
+
question: z.string().min(1).max(4000),
|
|
25
|
+
options: z.array(z.string().min(1).max(200)).max(10),
|
|
26
|
+
/** Checks the work did not pass, in plain words. */
|
|
27
|
+
checks: z.array(z.string().max(2000)).max(20),
|
|
28
|
+
price_usd_cents: z.number().int().nonnegative().nullable(),
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
31
|
+
const delivered = piece.extend({
|
|
32
|
+
/** The delivered files' ContentOS asset ids. */
|
|
33
|
+
output_ids: z.array(z.string().min(1).max(200)).max(100),
|
|
34
|
+
});
|
|
35
|
+
const common = { version: 1, sensitivity: 'none', subject: ['project_id'] };
|
|
36
|
+
export const contentosEvents = defineAppEvents('contentos', {
|
|
37
|
+
'piece.waiting': {
|
|
38
|
+
...common,
|
|
39
|
+
description: 'A ContentOS piece waits on a person: a review, or a yes to what it costs.',
|
|
40
|
+
schema: waiting,
|
|
41
|
+
},
|
|
42
|
+
'piece.delivered': {
|
|
43
|
+
...common,
|
|
44
|
+
description: 'A ContentOS piece was delivered; its files are ready.',
|
|
45
|
+
schema: delivered,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Facts about one video call Core hosts for an appointment. The appointment is
|
|
4
|
+
* the Pack's own reference (Core never reads it); the Contact is the patient's
|
|
5
|
+
* entry in the Contact Directory. A consultation is clinical, so every event
|
|
6
|
+
* here is PHI.
|
|
7
|
+
*/
|
|
8
|
+
declare const call: z.ZodObject<{
|
|
9
|
+
call_id: z.ZodUUID;
|
|
10
|
+
appointment_ref: z.ZodString;
|
|
11
|
+
contact_id: z.ZodString;
|
|
12
|
+
started_at: z.ZodISODateTime;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
declare const ended: z.ZodObject<{
|
|
15
|
+
call_id: z.ZodUUID;
|
|
16
|
+
appointment_ref: z.ZodString;
|
|
17
|
+
contact_id: z.ZodString;
|
|
18
|
+
started_at: z.ZodISODateTime;
|
|
19
|
+
ended_at: z.ZodISODateTime;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
/** What one participant said, from their own audio track: the speaker is never inferred. */
|
|
22
|
+
declare const segment: z.ZodObject<{
|
|
23
|
+
segment_id: z.ZodUUID;
|
|
24
|
+
speaker: z.ZodEnum<{
|
|
25
|
+
clinician: "clinician";
|
|
26
|
+
patient: "patient";
|
|
27
|
+
}>;
|
|
28
|
+
text: z.ZodString;
|
|
29
|
+
started_at: z.ZodISODateTime;
|
|
30
|
+
ended_at: z.ZodISODateTime;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
declare const segments: z.ZodObject<{
|
|
33
|
+
contact_id: z.ZodString;
|
|
34
|
+
appointment_ref: z.ZodString;
|
|
35
|
+
call_id: z.ZodUUID;
|
|
36
|
+
segments: z.ZodArray<z.ZodObject<{
|
|
37
|
+
segment_id: z.ZodUUID;
|
|
38
|
+
speaker: z.ZodEnum<{
|
|
39
|
+
clinician: "clinician";
|
|
40
|
+
patient: "patient";
|
|
41
|
+
}>;
|
|
42
|
+
text: z.ZodString;
|
|
43
|
+
started_at: z.ZodISODateTime;
|
|
44
|
+
ended_at: z.ZodISODateTime;
|
|
45
|
+
}, z.core.$strict>>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
declare const transcriptReady: z.ZodObject<{
|
|
48
|
+
contact_id: z.ZodString;
|
|
49
|
+
appointment_ref: z.ZodString;
|
|
50
|
+
call_id: z.ZodUUID;
|
|
51
|
+
segment_count: z.ZodNumber;
|
|
52
|
+
complete: z.ZodBoolean;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
export type CallStarted = z.infer<typeof call>;
|
|
55
|
+
export type CallEnded = z.infer<typeof ended>;
|
|
56
|
+
export type CallSegment = z.infer<typeof segment>;
|
|
57
|
+
export type CallSegments = z.infer<typeof segments>;
|
|
58
|
+
export type CallTranscriptReady = z.infer<typeof transcriptReady>;
|
|
59
|
+
/** The `core` family; the patient link and conversation events (channels.ts) share it. */
|
|
60
|
+
export declare const callEvents: {
|
|
61
|
+
readonly 'call.started': import("../index.js").EventContract<{
|
|
62
|
+
call_id: string;
|
|
63
|
+
appointment_ref: string;
|
|
64
|
+
contact_id: string;
|
|
65
|
+
started_at: string;
|
|
66
|
+
}>;
|
|
67
|
+
readonly 'call.ended': import("../index.js").EventContract<{
|
|
68
|
+
call_id: string;
|
|
69
|
+
appointment_ref: string;
|
|
70
|
+
contact_id: string;
|
|
71
|
+
started_at: string;
|
|
72
|
+
ended_at: string;
|
|
73
|
+
}>;
|
|
74
|
+
readonly 'call.segments': import("../index.js").EventContract<{
|
|
75
|
+
contact_id: string;
|
|
76
|
+
appointment_ref: string;
|
|
77
|
+
call_id: string;
|
|
78
|
+
segments: {
|
|
79
|
+
segment_id: string;
|
|
80
|
+
speaker: "clinician" | "patient";
|
|
81
|
+
text: string;
|
|
82
|
+
started_at: string;
|
|
83
|
+
ended_at: string;
|
|
84
|
+
}[];
|
|
85
|
+
}>;
|
|
86
|
+
readonly 'call.transcript_ready': import("../index.js").EventContract<{
|
|
87
|
+
contact_id: string;
|
|
88
|
+
appointment_ref: string;
|
|
89
|
+
call_id: string;
|
|
90
|
+
segment_count: number;
|
|
91
|
+
complete: boolean;
|
|
92
|
+
}>;
|
|
93
|
+
};
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineAppEvents } from './define.js';
|
|
3
|
+
/**
|
|
4
|
+
* Facts about one video call Core hosts for an appointment. The appointment is
|
|
5
|
+
* the Pack's own reference (Core never reads it); the Contact is the patient's
|
|
6
|
+
* entry in the Contact Directory. A consultation is clinical, so every event
|
|
7
|
+
* here is PHI.
|
|
8
|
+
*/
|
|
9
|
+
const call = z.strictObject({
|
|
10
|
+
call_id: z.uuid(),
|
|
11
|
+
appointment_ref: z.string().min(1).max(200),
|
|
12
|
+
contact_id: z.string().min(1).max(200),
|
|
13
|
+
/** The first moment the clinician and the patient were both in the room. */
|
|
14
|
+
started_at: z.iso.datetime(),
|
|
15
|
+
});
|
|
16
|
+
const ended = call.extend({
|
|
17
|
+
/** When the room closed: everyone left, or the room was ended. */
|
|
18
|
+
ended_at: z.iso.datetime(),
|
|
19
|
+
});
|
|
20
|
+
const identity = call.omit({ started_at: true });
|
|
21
|
+
/** What one participant said, from their own audio track: the speaker is never inferred. */
|
|
22
|
+
const segment = z.strictObject({
|
|
23
|
+
segment_id: z.uuid(),
|
|
24
|
+
speaker: z.enum(['clinician', 'patient']),
|
|
25
|
+
text: z.string().min(1).max(4000),
|
|
26
|
+
started_at: z.iso.datetime(),
|
|
27
|
+
ended_at: z.iso.datetime(),
|
|
28
|
+
});
|
|
29
|
+
const segments = identity.extend({
|
|
30
|
+
/** Ordered by start. Usually one: Core sends each as soon as it is final. */
|
|
31
|
+
segments: z.array(segment).min(1).max(50),
|
|
32
|
+
});
|
|
33
|
+
const transcriptReady = identity.extend({
|
|
34
|
+
segment_count: z.number().int().nonnegative(),
|
|
35
|
+
/**
|
|
36
|
+
* False when a segment was lost on the way or the transcriber never closed:
|
|
37
|
+
* the stored transcript is what there is, with gaps.
|
|
38
|
+
*/
|
|
39
|
+
complete: z.boolean(),
|
|
40
|
+
});
|
|
41
|
+
const common = { version: 1, sensitivity: 'phi', subject: ['appointment_ref'] };
|
|
42
|
+
/** The `core` family; the patient link and conversation events (channels.ts) share it. */
|
|
43
|
+
export const callEvents = defineAppEvents('core', {
|
|
44
|
+
'call.started': {
|
|
45
|
+
...common,
|
|
46
|
+
description: 'The clinician and the patient are both in the video call.',
|
|
47
|
+
schema: call,
|
|
48
|
+
},
|
|
49
|
+
'call.ended': {
|
|
50
|
+
...common,
|
|
51
|
+
description: 'The video call ended. Sent once per call, and only for a call that started.',
|
|
52
|
+
schema: ended,
|
|
53
|
+
},
|
|
54
|
+
'call.segments': {
|
|
55
|
+
...common,
|
|
56
|
+
description: 'Speech in the video call became final text, per speaker.',
|
|
57
|
+
schema: segments,
|
|
58
|
+
},
|
|
59
|
+
'call.transcript_ready': {
|
|
60
|
+
...common,
|
|
61
|
+
description: 'The call ended and its transcript is settled; read it from Core.',
|
|
62
|
+
schema: transcriptReady,
|
|
63
|
+
},
|
|
64
|
+
});
|
package/dist/apps/index.d.ts
CHANGED
|
@@ -10,7 +10,11 @@ import type { EventContract } from '../index.js';
|
|
|
10
10
|
*
|
|
11
11
|
* The four channel families (widget, whatsapp, email, sms) and the contact and
|
|
12
12
|
* conversation families are Core's own conversation contracts: a Channel
|
|
13
|
-
* Binding delivers them to the inbound handler that subscribes to them.
|
|
13
|
+
* Binding delivers them to the inbound handler that subscribes to them. The
|
|
14
|
+
* core family is what Core itself observes, such as a video call it hosts or a
|
|
15
|
+
* contact's reply in a member's mailbox.
|
|
14
16
|
*/
|
|
15
17
|
export declare const APP_EVENT_CONTRACTS: ReadonlyMap<string, EventContract>;
|
|
16
|
-
export { CHANNEL_MESSAGE_RECEIVED, CHANNEL_MESSAGE_SENT, contactEvents, conversationEvents, type ChannelMessageReceived, type ChannelMessageSent, type ContactVerified, type ConversationOwnerChanged, type ConversationActionRequested, } from './channels.js';
|
|
18
|
+
export { CHANNEL_MESSAGE_RECEIVED, CHANNEL_MESSAGE_SENT, contactEvents, conversationEvents, coreEvents, type ChannelMessageReceived, type ChannelMessageSent, type ContactVerified, type ContactMerged, type ConversationHandedOver, type ConversationMessageWhileStaffOwned, type ConversationTeamAsked, type ConversationOwnerChanged, type ConversationActionRequested, type PatientLinkOpened, } from './channels.js';
|
|
19
|
+
export { callEvents, type CallEnded, type CallSegment, type CallSegments, type CallStarted, type CallTranscriptReady, } from './core.js';
|
|
20
|
+
export { memberMailEvents, type MemberMailReplyReceived } from './member-mail.js';
|
package/dist/apps/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { contactEvents, conversationEvents, emailEvents, smsEvents, whatsappEvents, widgetEvents, } from './channels.js';
|
|
1
|
+
import { contactEvents, conversationEvents, coreEvents, emailEvents, retiredCoreEvents, smsEvents, whatsappEvents, widgetEvents, } from './channels.js';
|
|
2
|
+
import { contentosEvents } from './contentos.js';
|
|
3
|
+
import { callEvents } from './core.js';
|
|
4
|
+
import { memberMailEvents } from './member-mail.js';
|
|
2
5
|
import { smartleadEvents } from './smartlead.js';
|
|
3
6
|
/**
|
|
4
7
|
* The event contracts of the Apps Core maintains, by `key@version`. An App event
|
|
@@ -11,17 +14,26 @@ import { smartleadEvents } from './smartlead.js';
|
|
|
11
14
|
*
|
|
12
15
|
* The four channel families (widget, whatsapp, email, sms) and the contact and
|
|
13
16
|
* conversation families are Core's own conversation contracts: a Channel
|
|
14
|
-
* Binding delivers them to the inbound handler that subscribes to them.
|
|
17
|
+
* Binding delivers them to the inbound handler that subscribes to them. The
|
|
18
|
+
* core family is what Core itself observes, such as a video call it hosts or a
|
|
19
|
+
* contact's reply in a member's mailbox.
|
|
15
20
|
*/
|
|
16
21
|
export const APP_EVENT_CONTRACTS = new Map([
|
|
17
22
|
smartleadEvents,
|
|
23
|
+
contentosEvents,
|
|
18
24
|
widgetEvents,
|
|
19
25
|
whatsappEvents,
|
|
20
26
|
emailEvents,
|
|
21
27
|
smsEvents,
|
|
22
28
|
contactEvents,
|
|
23
29
|
conversationEvents,
|
|
30
|
+
coreEvents,
|
|
31
|
+
retiredCoreEvents,
|
|
32
|
+
callEvents,
|
|
33
|
+
memberMailEvents,
|
|
24
34
|
]
|
|
25
35
|
.flatMap((events) => Object.values(events))
|
|
26
36
|
.map((contract) => [`${contract.key}@${contract.version}`, contract]));
|
|
27
|
-
export { CHANNEL_MESSAGE_RECEIVED, CHANNEL_MESSAGE_SENT, contactEvents, conversationEvents, } from './channels.js';
|
|
37
|
+
export { CHANNEL_MESSAGE_RECEIVED, CHANNEL_MESSAGE_SENT, contactEvents, conversationEvents, coreEvents, } from './channels.js';
|
|
38
|
+
export { callEvents, } from './core.js';
|
|
39
|
+
export { memberMailEvents } from './member-mail.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const replyReceived: z.ZodObject<{
|
|
3
|
+
member_id: z.ZodUUID;
|
|
4
|
+
contact_id: z.ZodString;
|
|
5
|
+
thread_ref: z.ZodString;
|
|
6
|
+
received_at: z.ZodISODateTime;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export type MemberMailReplyReceived = z.infer<typeof replyReceived>;
|
|
9
|
+
/** What Core sees in a member's own mailbox once the member consented to the watch. */
|
|
10
|
+
export declare const memberMailEvents: {
|
|
11
|
+
readonly 'member_mail.reply_received': import("../index.js").EventContract<{
|
|
12
|
+
member_id: string;
|
|
13
|
+
contact_id: string;
|
|
14
|
+
thread_ref: string;
|
|
15
|
+
received_at: string;
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineAppEvents } from './define.js';
|
|
3
|
+
const replyReceived = z.strictObject({
|
|
4
|
+
member_id: z.uuid(),
|
|
5
|
+
contact_id: z.string().min(1).max(200),
|
|
6
|
+
/** A per-workspace keyed hash of the provider's thread id: equal for every reply in a thread. */
|
|
7
|
+
thread_ref: z.string().regex(/^[0-9a-f]{64}$/),
|
|
8
|
+
received_at: z.iso.datetime(),
|
|
9
|
+
});
|
|
10
|
+
/** What Core sees in a member's own mailbox once the member consented to the watch. */
|
|
11
|
+
export const memberMailEvents = defineAppEvents('core', {
|
|
12
|
+
'member_mail.reply_received': {
|
|
13
|
+
version: 1,
|
|
14
|
+
sensitivity: 'personal',
|
|
15
|
+
subject: ['contact_id'],
|
|
16
|
+
description: "A known contact replied in a member's own mailbox, which the member consented to watch. It names the member, the contact and a keyed reference to the thread; never the address, the subject or the body.",
|
|
17
|
+
schema: replyReceived,
|
|
18
|
+
},
|
|
19
|
+
});
|
package/dist/apps/smartlead.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
|
-
* What Smartlead reports about one email to one lead. A reply is not here: it
|
|
4
|
-
* a conversation message and belongs to `email.message.received`.
|
|
3
|
+
* What Smartlead reports about one email to one lead. A reply's text is not here: it
|
|
4
|
+
* is a conversation message and belongs to `email.message.received`.
|
|
5
5
|
*
|
|
6
6
|
* Smartlead reports an open or a click once per email, and a mail security
|
|
7
7
|
* scanner usually takes that first click within seconds of the send. An event
|
|
@@ -36,6 +36,12 @@ export declare const smartleadEvents: {
|
|
|
36
36
|
occurred_at: string;
|
|
37
37
|
link_url?: string | undefined;
|
|
38
38
|
}>;
|
|
39
|
+
readonly 'email.replied': import("../index.js").EventContract<{
|
|
40
|
+
campaign_id: string;
|
|
41
|
+
lead_id: string;
|
|
42
|
+
email: string;
|
|
43
|
+
occurred_at: string;
|
|
44
|
+
}>;
|
|
39
45
|
readonly 'email.bounced': import("../index.js").EventContract<{
|
|
40
46
|
campaign_id: string;
|
|
41
47
|
lead_id: string;
|
package/dist/apps/smartlead.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { defineAppEvents } from './define.js';
|
|
3
3
|
/**
|
|
4
|
-
* What Smartlead reports about one email to one lead. A reply is not here: it
|
|
5
|
-
* a conversation message and belongs to `email.message.received`.
|
|
4
|
+
* What Smartlead reports about one email to one lead. A reply's text is not here: it
|
|
5
|
+
* is a conversation message and belongs to `email.message.received`.
|
|
6
6
|
*
|
|
7
7
|
* Smartlead reports an open or a click once per email, and a mail security
|
|
8
8
|
* scanner usually takes that first click within seconds of the send. An event
|
|
@@ -32,6 +32,11 @@ export const smartleadEvents = defineAppEvents('smartlead', {
|
|
|
32
32
|
description: 'Smartlead reported that a tracked link in an email was clicked.',
|
|
33
33
|
schema: linkClicked,
|
|
34
34
|
},
|
|
35
|
+
'email.replied': {
|
|
36
|
+
...common,
|
|
37
|
+
description: 'Smartlead reported that a lead replied to an email.',
|
|
38
|
+
schema: email,
|
|
39
|
+
},
|
|
35
40
|
'email.bounced': {
|
|
36
41
|
...common,
|
|
37
42
|
description: 'Smartlead reported that an email bounced.',
|
package/dist/index.d.ts
CHANGED
|
@@ -231,6 +231,17 @@ export interface EventHandler<P = any, R = unknown> {
|
|
|
231
231
|
}>;
|
|
232
232
|
readonly run: (event: EventEnvelope<P>, context: EventHandlerContext) => Promise<R>;
|
|
233
233
|
readonly authority: Readonly<EventHandlerAuthority>;
|
|
234
|
+
/** Core starts this Work ability for each delivery; the event runtime never receives one. */
|
|
235
|
+
readonly work?: Readonly<EventHandlerWork>;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* A Pack Work ability Core starts once per delivery, as a machine run under the install's consent.
|
|
239
|
+
* Its input is `{ event: { id, key, version, payload } }`; `connections` are the requirement ids
|
|
240
|
+
* the run may reach, as a schedule's are.
|
|
241
|
+
*/
|
|
242
|
+
export interface EventHandlerWork {
|
|
243
|
+
ability: string;
|
|
244
|
+
connections?: readonly string[];
|
|
234
245
|
}
|
|
235
246
|
export interface EventHandlerAuthority {
|
|
236
247
|
agents?: readonly string[];
|
|
@@ -242,8 +253,13 @@ export declare function handleEvent<P = unknown, R = unknown>(input: {
|
|
|
242
253
|
id: string;
|
|
243
254
|
event: EventContract<P>;
|
|
244
255
|
authority?: EventHandlerAuthority;
|
|
256
|
+
} & ({
|
|
245
257
|
run: EventHandler<P, R>['run'];
|
|
246
|
-
|
|
258
|
+
work?: never;
|
|
259
|
+
} | {
|
|
260
|
+
work: EventHandlerWork;
|
|
261
|
+
run?: never;
|
|
262
|
+
})): EventHandler<P, R>;
|
|
247
263
|
/** Build the Event-only manifest fragment. Pack build tooling writes this output to entry.json. */
|
|
248
264
|
export declare function eventManifest(input: {
|
|
249
265
|
events?: readonly EventContract[];
|
|
@@ -260,6 +276,10 @@ export declare function eventManifest(input: {
|
|
|
260
276
|
fingerprint: string;
|
|
261
277
|
}[];
|
|
262
278
|
eventHandlers: {
|
|
279
|
+
work?: {
|
|
280
|
+
ability: string;
|
|
281
|
+
connections: string[];
|
|
282
|
+
} | undefined;
|
|
263
283
|
id: string;
|
|
264
284
|
consumes: {
|
|
265
285
|
owner: string;
|
package/dist/index.js
CHANGED
|
@@ -267,6 +267,8 @@ export function handleEvent(input) {
|
|
|
267
267
|
if (!/^[a-z][a-z0-9-]*$/.test(input.id)) {
|
|
268
268
|
throw new Error('event handler id must be a lowercase slug');
|
|
269
269
|
}
|
|
270
|
+
if (input.work && !input.work.ability)
|
|
271
|
+
throw new Error('event handler work needs an ability');
|
|
270
272
|
return Object.freeze({
|
|
271
273
|
id: input.id,
|
|
272
274
|
event: input.event,
|
|
@@ -277,7 +279,18 @@ export function handleEvent(input) {
|
|
|
277
279
|
fingerprint: input.event.fingerprint,
|
|
278
280
|
}),
|
|
279
281
|
authority: deepFreeze({ ...(input.authority ?? {}) }),
|
|
280
|
-
|
|
282
|
+
...(input.work
|
|
283
|
+
? {
|
|
284
|
+
work: deepFreeze({
|
|
285
|
+
ability: input.work.ability,
|
|
286
|
+
connections: [...(input.work.connections ?? [])],
|
|
287
|
+
}),
|
|
288
|
+
}
|
|
289
|
+
: {}),
|
|
290
|
+
run: input.run ??
|
|
291
|
+
(async () => {
|
|
292
|
+
throw terminalEventError('handler_starts_work', `Core starts ${input.work.ability} for this event; it is never delivered here`);
|
|
293
|
+
}),
|
|
281
294
|
});
|
|
282
295
|
}
|
|
283
296
|
/** Build the Event-only manifest fragment. Pack build tooling writes this output to entry.json. */
|
|
@@ -314,6 +327,14 @@ export function eventManifest(input) {
|
|
|
314
327
|
}
|
|
315
328
|
: {}),
|
|
316
329
|
},
|
|
330
|
+
...(handler.work
|
|
331
|
+
? {
|
|
332
|
+
work: {
|
|
333
|
+
ability: handler.work.ability,
|
|
334
|
+
connections: [...(handler.work.connections ?? [])],
|
|
335
|
+
},
|
|
336
|
+
}
|
|
337
|
+
: {}),
|
|
317
338
|
})),
|
|
318
339
|
});
|
|
319
340
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keemakr/event-sdk",
|
|
3
|
-
"version": "0.2.0-dev-
|
|
3
|
+
"version": "0.2.0-dev-20261124171750",
|
|
4
4
|
"description": "Typed Event declarations, publication, and delivery dispatch for Keemakr Packs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -17,6 +17,16 @@
|
|
|
17
17
|
"import": "./dist/apps/smartlead.js",
|
|
18
18
|
"default": "./dist/apps/smartlead.js"
|
|
19
19
|
},
|
|
20
|
+
"./apps/contentos": {
|
|
21
|
+
"types": "./dist/apps/contentos.d.ts",
|
|
22
|
+
"import": "./dist/apps/contentos.js",
|
|
23
|
+
"default": "./dist/apps/contentos.js"
|
|
24
|
+
},
|
|
25
|
+
"./apps/core": {
|
|
26
|
+
"types": "./dist/apps/core.d.ts",
|
|
27
|
+
"import": "./dist/apps/core.js",
|
|
28
|
+
"default": "./dist/apps/core.js"
|
|
29
|
+
},
|
|
20
30
|
"./apps": {
|
|
21
31
|
"types": "./dist/apps/index.d.ts",
|
|
22
32
|
"import": "./dist/apps/index.js",
|