@team-plain/webhooks 0.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.
@@ -0,0 +1,854 @@
1
+ /**
2
+ * This file was automatically generated by json-schema-to-typescript.
3
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
+ * and run json-schema-to-typescript to regenerate this file.
5
+ */
6
+ export type Datetime = string;
7
+ export type Id = string;
8
+ export type EmailAddress = string;
9
+ export type InternalActor = {
10
+ actorType: "UNKNOWN";
11
+ [k: string]: unknown;
12
+ } | UserActor | MachineUserActor | SystemActor;
13
+ export type Actor = {
14
+ actorType: "UNKNOWN";
15
+ [k: string]: unknown;
16
+ } | UserActor | MachineUserActor | SystemActor | CustomerActor;
17
+ export type NullableString = string | null;
18
+ export type EmailActor = {
19
+ actorType: "UNKNOWN";
20
+ [k: string]: unknown;
21
+ } | UserActor | CustomerActor | {
22
+ actorType: "supportEmailAddress";
23
+ supportEmailAddress: string;
24
+ [k: string]: unknown;
25
+ } | {
26
+ actorType: "deletedCustomer";
27
+ customerId: Id;
28
+ [k: string]: unknown;
29
+ };
30
+ export type EmailAuthenticity = "PASS" | "FAIL" | "UNKNOWN" | "UNKNOWN_EMAIL_AUTHENTICITY";
31
+ export type Component = {
32
+ type: "UNKNOWN";
33
+ [k: string]: unknown;
34
+ } | ComponentText | ComponentPlainText | ComponentSpacer | ComponentDivider | ComponentLinkButton | ComponentBadge | ComponentCopyButton | ComponentRow | ComponentContainer | ComponentWorkflowButton;
35
+ export type ComponentTextSize = "S" | "M" | "L" | "UNKNOWN_COMPONENT_TEXT_SIZE";
36
+ export type ComponentTextColor = "NORMAL" | "MUTED" | "SUCCESS" | "WARNING" | "ERROR" | "UNKNOWN_COMPONENT_TEXT_COLOR";
37
+ export type ComponentPlainTextSize = "S" | "M" | "L" | "UNKNOWN_COMPONENT_PLAIN_TEXT_SIZE";
38
+ export type ComponentPlainTextColor = "NORMAL" | "MUTED" | "SUCCESS" | "WARNING" | "ERROR" | "UNKNOWN_COMPONENT_PLAIN_TEXT_COLOR";
39
+ export type ComponentSpacerSize = "XS" | "S" | "M" | "L" | "XL" | "UNKNOWN_COMPONENT_SPACER_SIZE";
40
+ export type ComponentDividerSpacingSize = "XS" | "S" | "M" | "L" | "XL" | "UNKNOWN_COMPONENT_DIVIDER_SPACING_SIZE";
41
+ export type ComponentBadgeColor = "GREY" | "GREEN" | "YELLOW" | "RED" | "BLUE" | "UNKNOWN_COMPONENT_BADGE_COLOR";
42
+ export type ComponentRowContent = {
43
+ type: "UNKNOWN";
44
+ [k: string]: unknown;
45
+ } | ComponentText | ComponentPlainText | ComponentSpacer | ComponentDivider | ComponentLinkButton | ComponentBadge | ComponentCopyButton | ComponentWorkflowButton;
46
+ export type ComponentContainerContent = {
47
+ type: "UNKNOWN";
48
+ [k: string]: unknown;
49
+ } | ComponentText | ComponentPlainText | ComponentSpacer | ComponentDivider | ComponentLinkButton | ComponentBadge | ComponentCopyButton | ComponentRow | ComponentWorkflowButton;
50
+ export type CustomerGroupChangedPayload = {
51
+ changeType: "ADDED";
52
+ eventType: "customer.customer_group_changed";
53
+ customerGroup: CustomerGroup;
54
+ [k: string]: unknown;
55
+ } | {
56
+ changeType: "UPDATED";
57
+ eventType: "customer.customer_group_changed";
58
+ customerGroup: CustomerGroup;
59
+ previousCustomerGroup: CustomerGroup;
60
+ [k: string]: unknown;
61
+ } | {
62
+ changeType: "REMOVED";
63
+ eventType: "customer.customer_group_changed";
64
+ previousCustomerGroup: CustomerGroup;
65
+ [k: string]: unknown;
66
+ };
67
+ export type ThreadPriority = number;
68
+ export type ThreadStatus = "TODO" | "DONE" | "SNOOZED" | "UNKNOWN_THREAD_STATUS";
69
+ export type ThreadStatusDetail = {
70
+ type: "UNKNOWN";
71
+ [k: string]: unknown;
72
+ } | {
73
+ type: "CREATED";
74
+ createdAt: Datetime;
75
+ [k: string]: unknown;
76
+ } | {
77
+ type: "NEW_REPLY";
78
+ [k: string]: unknown;
79
+ } | {
80
+ type: "IN_PROGRESS";
81
+ [k: string]: unknown;
82
+ } | {
83
+ type: "WAITING_FOR_CUSTOMER";
84
+ [k: string]: unknown;
85
+ } | {
86
+ type: "WAITING_FOR_DURATION";
87
+ waitingUntil: Datetime;
88
+ durationSeconds: number;
89
+ [k: string]: unknown;
90
+ } | {
91
+ type: "THREAD_LINK_UPDATED";
92
+ linear?: {
93
+ issueId: string;
94
+ [k: string]: unknown;
95
+ };
96
+ [k: string]: unknown;
97
+ } | {
98
+ type: "DONE_MANUALLY_SET";
99
+ [k: string]: unknown;
100
+ } | {
101
+ type: "IGNORED";
102
+ [k: string]: unknown;
103
+ } | {
104
+ type: "DONE_AUTOMATICALLY_SET";
105
+ afterSeconds?: number;
106
+ [k: string]: unknown;
107
+ } | {
108
+ type: "THREAD_DISCUSSION_RESOLVED";
109
+ threadDiscussionId?: Id;
110
+ [k: string]: unknown;
111
+ };
112
+ export type ThreadAssignee = {
113
+ type: "UNKNOWN";
114
+ [k: string]: unknown;
115
+ } | User | MachineUser | {
116
+ id: string;
117
+ [k: string]: unknown;
118
+ };
119
+ export type NullableDatetime = Datetime | null;
120
+ export type NullableInternalActor = InternalActor | null;
121
+ export type ServiceLevelAgreement = {
122
+ type: "UNKNOWN";
123
+ [k: string]: unknown;
124
+ } | {
125
+ id: Id;
126
+ tier: Tier;
127
+ useBusinessHoursOnly: boolean;
128
+ threadPriorityFilter: ThreadPriorityFilter;
129
+ createdAt: Datetime;
130
+ createdBy: InternalActor;
131
+ updatedAt: Datetime;
132
+ updatedBy: InternalActor;
133
+ type: "FIRST_RESPONSE_TIME";
134
+ firstResponseTimeMinutes: number;
135
+ [k: string]: unknown;
136
+ } | {
137
+ id: Id;
138
+ tier: Tier;
139
+ useBusinessHoursOnly: boolean;
140
+ threadPriorityFilter: ThreadPriorityFilter;
141
+ createdAt: Datetime;
142
+ createdBy: InternalActor;
143
+ updatedAt: Datetime;
144
+ updatedBy: InternalActor;
145
+ type: "NEXT_RESPONSE_TIME";
146
+ nextResponseTimeMinutes: number;
147
+ [k: string]: unknown;
148
+ };
149
+ /**
150
+ * @minItems 1
151
+ */
152
+ export type ThreadPriorityFilter = [ThreadPriority, ...ThreadPriority[]];
153
+ export type ServiceLevelAgreementStatusDetail = {
154
+ status: "UNKNOWN";
155
+ [k: string]: unknown;
156
+ } | {
157
+ breachTime: Datetime;
158
+ status: "PENDING";
159
+ [k: string]: unknown;
160
+ } | {
161
+ achievedAt: Datetime;
162
+ status: "ACHIEVED";
163
+ [k: string]: unknown;
164
+ } | {
165
+ breachTime: Datetime;
166
+ status: "IMMINENT_BREACH";
167
+ [k: string]: unknown;
168
+ } | {
169
+ breachedAt: Datetime;
170
+ status: "BREACHING";
171
+ [k: string]: unknown;
172
+ } | {
173
+ breachedAt: Datetime;
174
+ completedAt: Datetime;
175
+ status: "BREACHED";
176
+ [k: string]: unknown;
177
+ } | {
178
+ cancelledAt: Datetime;
179
+ status: "CANCELLED";
180
+ [k: string]: unknown;
181
+ };
182
+ /**
183
+ * Webhook request
184
+ */
185
+ export interface WebhooksSchemaDefinition {
186
+ timestamp: Datetime;
187
+ workspaceId: Id;
188
+ payload: CustomerChangedPayload | CustomerGroupMembershipsChangedPayload | TimelineEntryChangedPayload | CustomerGroupChangedPayload | ThreadCreatedPublicEventPayload | ThreadStatusTransitionedPublicEventPayload | ThreadAssignmentTransitionedPublicEventPayload | ThreadEmailReceivedPublicEventPayload | ThreadEmailSentPublicEventPayload | ThreadSlackMessageReceivedEventPayload | ThreadSlackMessageSentEventPayload | ThreadMSTeamsMessageReceivedEventPayload | ThreadMSTeamsMessageSentEventPayload | ThreadLabelsChangedPublicEventPayload | ThreadPriorityChangedPublicEventPayload | ThreadFieldCreatedPublicEventPayload | ThreadFieldUpdatedPublicEventPayload | ThreadFieldDeletedPublicEventPayload | ThreadChatSentPublicEventPayload | ThreadServiceLevelAgreementStatusTransitionedPayload | CustomerCreatedPublicEventPayload | CustomerUpdatedPublicEventPayload | CustomerDeletedPublicEventPayload | ThreadNoteCreatedEventPayload | ThreadChatReceivedPublicEventPayload | ThreadSlackMessageUpdatedEventPayload | ThreadDiscordMessageReceivedEventPayload | ThreadDiscordMessageSentEventPayload | ThreadDiscordMessageUpdatedEventPayload;
189
+ id: Id;
190
+ type: "thread.thread_created" | "thread.thread_status_transitioned" | "thread.thread_assignment_transitioned" | "thread.email_received" | "thread.email_sent" | "thread.slack_message_received" | "thread.slack_message_sent" | "thread.slack_message_updated" | "thread.discord_message_received" | "thread.discord_message_sent" | "thread.discord_message_updated" | "thread.ms_teams_message_sent" | "thread.ms_teams_message_received" | "thread.chat_sent" | "thread.chat_received" | "thread.note_created" | "thread.thread_labels_changed" | "thread.thread_priority_changed" | "thread.thread_field_created" | "thread.thread_field_updated" | "thread.thread_field_deleted" | "thread.service_level_agreement_status_transitioned" | "thread.thread_tenant_updated" | "customer.customer_created" | "customer.customer_updated" | "customer.customer_deleted" | "customer.customer_changed" | "customer.customer_group_changed" | "customer.customer_group_memberships_changed" | "timeline.timeline_entry_changed";
191
+ webhookMetadata: WebhookMetadata;
192
+ [k: string]: unknown;
193
+ }
194
+ /**
195
+ * A customer has been created or updated
196
+ */
197
+ export interface CustomerChangedPayload {
198
+ changeType: "ADDED" | "UPDATED";
199
+ eventType: "customer.customer_changed";
200
+ customer: Customer;
201
+ previousCustomer: Customer | null;
202
+ [k: string]: unknown;
203
+ }
204
+ export interface Customer {
205
+ id: Id;
206
+ email: {
207
+ email: EmailAddress;
208
+ isVerified: boolean;
209
+ verifiedAt: Datetime | null;
210
+ [k: string]: unknown;
211
+ };
212
+ externalId: string | null;
213
+ fullName: string;
214
+ shortName: string | null;
215
+ markedAsSpamAt?: Datetime | null;
216
+ markedAsSpamBy?: InternalActor | null;
217
+ customerGroupMemberships: CustomerGroupMembership[];
218
+ createdAt: Datetime;
219
+ createdBy: Actor;
220
+ updatedAt: Datetime;
221
+ updatedBy: Actor;
222
+ [k: string]: unknown;
223
+ }
224
+ export interface UserActor {
225
+ actorType: "user";
226
+ userId: Id;
227
+ [k: string]: unknown;
228
+ }
229
+ export interface MachineUserActor {
230
+ actorType: "machineUser";
231
+ machineUserId: Id;
232
+ [k: string]: unknown;
233
+ }
234
+ export interface SystemActor {
235
+ actorType: "system";
236
+ system: string;
237
+ [k: string]: unknown;
238
+ }
239
+ export interface CustomerGroupMembership {
240
+ customerId: Id;
241
+ customerGroupId: Id;
242
+ workspaceId: Id;
243
+ createdAt: Datetime;
244
+ createdBy: InternalActor;
245
+ updatedAt: Datetime;
246
+ updatedBy: InternalActor;
247
+ customerGroup: CustomerGroup;
248
+ [k: string]: unknown;
249
+ }
250
+ export interface CustomerGroup {
251
+ id: Id;
252
+ workspaceId: Id;
253
+ name: string;
254
+ key: string;
255
+ color: string;
256
+ createdAt: Datetime;
257
+ createdBy: InternalActor;
258
+ updatedAt: Datetime;
259
+ updatedBy: InternalActor;
260
+ [k: string]: unknown;
261
+ }
262
+ export interface CustomerActor {
263
+ actorType: "customer";
264
+ customerId: Id;
265
+ [k: string]: unknown;
266
+ }
267
+ export interface CustomerGroupMembershipsChangedPayload {
268
+ eventType: "customer.customer_group_memberships_changed";
269
+ changeType: "ADDED" | "REMOVED";
270
+ customer: Customer;
271
+ previousCustomer: Customer;
272
+ [k: string]: unknown;
273
+ }
274
+ /**
275
+ * A timeline entry has been added, updated or removed
276
+ */
277
+ export interface TimelineEntryChangedPayload {
278
+ eventType: "timeline.timeline_entry_changed";
279
+ /**
280
+ * null if changeType=ADDED
281
+ */
282
+ previousTimelineEntry: TimelineEntry | null;
283
+ /**
284
+ * null if changeType=REMOVED
285
+ */
286
+ timelineEntry: TimelineEntry | null;
287
+ changeType: "ADDED" | "UPDATED" | "REMOVED";
288
+ [k: string]: unknown;
289
+ }
290
+ export interface TimelineEntry {
291
+ id: Id;
292
+ customerId: Id;
293
+ threadId?: Id | null;
294
+ timestamp: Datetime;
295
+ actor: Actor;
296
+ entry: {
297
+ entryType: "UNKNOWN";
298
+ [k: string]: unknown;
299
+ } | NoteEntry | ChatEntry | EmailEntry | CustomEntry;
300
+ [k: string]: unknown;
301
+ }
302
+ export interface NoteEntry {
303
+ entryType: "note";
304
+ noteId: Id;
305
+ text: string;
306
+ markdown: string | null;
307
+ [k: string]: unknown;
308
+ }
309
+ export interface ChatEntry {
310
+ entryType: "chat";
311
+ chatId: Id;
312
+ text: string | null;
313
+ attachments: ChatEntryAttachment[];
314
+ customerReadAt: Datetime | null;
315
+ [k: string]: unknown;
316
+ }
317
+ export interface ChatEntryAttachment {
318
+ id: Id;
319
+ fileName: string;
320
+ fileSizeBytes: number;
321
+ fileMimeType: string;
322
+ fileExtension: NullableString;
323
+ createdAt: Datetime;
324
+ createdBy: Actor;
325
+ updatedAt: Datetime;
326
+ updatedBy: Actor;
327
+ type: "CHAT";
328
+ [k: string]: unknown;
329
+ }
330
+ export interface EmailEntry {
331
+ entryType: "email";
332
+ emailId: Id;
333
+ to: EmailParticipant;
334
+ from: EmailParticipant;
335
+ additionalRecipients: EmailParticipant[];
336
+ hiddenRecipients: EmailParticipant[];
337
+ subject: string | null;
338
+ textContent: string | null;
339
+ hasMoreTextContent: boolean;
340
+ markdownContent: string | null;
341
+ hasMoreMarkdownContent: boolean;
342
+ authenticity: EmailAuthenticity;
343
+ sentAt: Datetime | null;
344
+ receivedAt: Datetime | null;
345
+ attachments: EmailEntryAttachment[];
346
+ inReplyToEmailId: string | null;
347
+ isStartOfThread: boolean;
348
+ [k: string]: unknown;
349
+ }
350
+ export interface EmailParticipant {
351
+ email: string;
352
+ name: string | null;
353
+ emailActor: EmailActor | null;
354
+ [k: string]: unknown;
355
+ }
356
+ export interface EmailEntryAttachment {
357
+ id: Id;
358
+ fileName: string;
359
+ fileSizeBytes: number;
360
+ fileMimeType: string;
361
+ fileExtension: NullableString;
362
+ createdAt: Datetime;
363
+ createdBy: Actor;
364
+ updatedAt: Datetime;
365
+ updatedBy: Actor;
366
+ type: "EMAIL";
367
+ emailContentId: string;
368
+ [k: string]: unknown;
369
+ }
370
+ export interface CustomEntry {
371
+ entryType: "custom";
372
+ externalId: string | null;
373
+ title: string;
374
+ type: string | null;
375
+ components: Component[];
376
+ attachments: CustomEntryAttachment[];
377
+ [k: string]: unknown;
378
+ }
379
+ export interface ComponentText {
380
+ type: "text";
381
+ textSize: ComponentTextSize | null;
382
+ textColor: ComponentTextColor | null;
383
+ text: string;
384
+ [k: string]: unknown;
385
+ }
386
+ export interface ComponentPlainText {
387
+ plainTextSize: ComponentPlainTextSize | null;
388
+ plainTextColor: ComponentPlainTextColor | null;
389
+ plainText: string;
390
+ type: "plainText";
391
+ [k: string]: unknown;
392
+ }
393
+ export interface ComponentSpacer {
394
+ spacerSize: ComponentSpacerSize;
395
+ type: "spacer";
396
+ [k: string]: unknown;
397
+ }
398
+ export interface ComponentDivider {
399
+ dividerSpacingSize: ComponentDividerSpacingSize | null;
400
+ type: "divider";
401
+ [k: string]: unknown;
402
+ }
403
+ export interface ComponentLinkButton {
404
+ linkButtonUrl: string;
405
+ linkButtonLabel: string;
406
+ type: "linkButton";
407
+ [k: string]: unknown;
408
+ }
409
+ export interface ComponentWorkflowButton {
410
+ workflowButtonLabel: string;
411
+ workflowButtonWorkflowIdentifier: {
412
+ workflowId: string;
413
+ [k: string]: unknown;
414
+ };
415
+ type: "workflowButton";
416
+ [k: string]: unknown;
417
+ }
418
+ export interface ComponentBadge {
419
+ badgeLabel: string;
420
+ badgeColor: ComponentBadgeColor | null;
421
+ type: "badge";
422
+ [k: string]: unknown;
423
+ }
424
+ export interface ComponentCopyButton {
425
+ copyButtonValue: string;
426
+ copyButtonTooltipLabel: string | null;
427
+ type: "copyButton";
428
+ [k: string]: unknown;
429
+ }
430
+ export interface ComponentRow {
431
+ type: "row";
432
+ rowMainContent: ComponentRowContent[];
433
+ rowAsideContent: ComponentRowContent[];
434
+ [k: string]: unknown;
435
+ }
436
+ export interface ComponentContainer {
437
+ type: "container";
438
+ containerContent: ComponentContainerContent[];
439
+ [k: string]: unknown;
440
+ }
441
+ export interface CustomEntryAttachment {
442
+ id: Id;
443
+ fileName: string;
444
+ fileSizeBytes: number;
445
+ fileMimeType: string;
446
+ fileExtension: NullableString;
447
+ createdAt: Datetime;
448
+ createdBy: Actor;
449
+ updatedAt: Datetime;
450
+ updatedBy: Actor;
451
+ type: "CUSTOM_TIMELINE_ENTRY";
452
+ [k: string]: unknown;
453
+ }
454
+ export interface ThreadCreatedPublicEventPayload {
455
+ eventType: "thread.thread_created";
456
+ thread: Thread;
457
+ [k: string]: unknown;
458
+ }
459
+ export interface Thread {
460
+ id: Id;
461
+ customer: Customer;
462
+ title: string;
463
+ previewText?: string | null;
464
+ priority: ThreadPriority;
465
+ externalId: string | null;
466
+ status: ThreadStatus;
467
+ statusChangedAt: Datetime;
468
+ statusChangedBy?: Actor | null;
469
+ statusDetail: ThreadStatusDetail | null;
470
+ assignee: ThreadAssignee | null;
471
+ assignedAt: Datetime | null;
472
+ additionalAssignees?: ThreadAssignee[];
473
+ labels: Label[];
474
+ firstInboundMessageInfo: ThreadMessageInfo | null;
475
+ firstOutboundMessageInfo: ThreadMessageInfo | null;
476
+ lastInboundMessageInfo: ThreadMessageInfo | null;
477
+ lastOutboundMessageInfo: ThreadMessageInfo | null;
478
+ supportEmailAddresses: string[];
479
+ createdAt: Datetime;
480
+ createdBy: Actor;
481
+ updatedAt: Datetime;
482
+ updatedBy: Actor;
483
+ [k: string]: unknown;
484
+ }
485
+ export interface User {
486
+ id: Id;
487
+ email: EmailAddress;
488
+ fullName: string;
489
+ publicName: string;
490
+ status: "ONLINE" | "OFFLINE" | "BREAK" | "AWAY" | "UNKNOWN_USER_STATUS";
491
+ statusChangedAt: Datetime;
492
+ createdAt: Datetime;
493
+ createdBy: InternalActor;
494
+ updatedAt: Datetime;
495
+ updatedBy: InternalActor;
496
+ deletedAt: NullableDatetime;
497
+ deletedBy: NullableInternalActor;
498
+ [k: string]: unknown;
499
+ }
500
+ export interface MachineUser {
501
+ id: Id;
502
+ fullName: string;
503
+ publicName: string;
504
+ description: string | null;
505
+ createdAt: Datetime;
506
+ createdBy: InternalActor;
507
+ updatedAt: Datetime;
508
+ updatedBy: InternalActor;
509
+ deletedAt: NullableDatetime;
510
+ deletedBy: NullableInternalActor;
511
+ [k: string]: unknown;
512
+ }
513
+ export interface Label {
514
+ id: Id;
515
+ labelType: LabelType;
516
+ createdAt: Datetime;
517
+ createdBy: Actor;
518
+ updatedAt: Datetime;
519
+ updatedBy: Actor;
520
+ [k: string]: unknown;
521
+ }
522
+ export interface LabelType {
523
+ id: Id;
524
+ name: string;
525
+ icon?: string | null;
526
+ isArchived?: boolean;
527
+ archivedAt: Datetime | null;
528
+ archivedBy: InternalActor | null;
529
+ externalId?: string | null;
530
+ isExcludedFromAi?: boolean;
531
+ createdAt: Datetime;
532
+ createdBy: InternalActor;
533
+ updatedAt: Datetime;
534
+ updatedBy: InternalActor;
535
+ [k: string]: unknown;
536
+ }
537
+ export interface ThreadMessageInfo {
538
+ timestamp: Datetime;
539
+ messageSource: "CHAT" | "EMAIL" | "API" | "SLACK" | "MS_TEAMS" | "UNKNOWN_THREAD_MESSAGE_INFO_MESSAGE_SOURCE";
540
+ actorId?: string | null;
541
+ actorType?: ("user" | "machineUser" | "customer" | "system") | null;
542
+ [k: string]: unknown;
543
+ }
544
+ export interface ThreadStatusTransitionedPublicEventPayload {
545
+ eventType: "thread.thread_status_transitioned";
546
+ previousThread: Thread;
547
+ thread: Thread;
548
+ [k: string]: unknown;
549
+ }
550
+ export interface ThreadAssignmentTransitionedPublicEventPayload {
551
+ eventType: "thread.thread_assignment_transitioned";
552
+ previousThread: Thread;
553
+ thread: Thread;
554
+ [k: string]: unknown;
555
+ }
556
+ export interface ThreadEmailReceivedPublicEventPayload {
557
+ eventType: "thread.email_received";
558
+ thread: Thread;
559
+ email: Email;
560
+ [k: string]: unknown;
561
+ }
562
+ export interface Email {
563
+ timelineEntryId: Id;
564
+ id: Id;
565
+ to: EmailParticipant;
566
+ from: EmailParticipant;
567
+ replyTo: string | null;
568
+ additionalRecipients: EmailParticipant[];
569
+ hiddenRecipients: EmailParticipant[];
570
+ subject: string | null;
571
+ textContent: string | null;
572
+ markdownContent: string | null;
573
+ authenticity: EmailAuthenticity;
574
+ sentAt: Datetime | null;
575
+ receivedAt: Datetime | null;
576
+ attachments: Attachment[];
577
+ inReplyToEmailId: string | null;
578
+ isStartOfThread: boolean;
579
+ createdAt: Datetime;
580
+ createdBy: Actor;
581
+ updatedAt: Datetime;
582
+ updatedBy: Actor;
583
+ [k: string]: unknown;
584
+ }
585
+ export interface Attachment {
586
+ id: Id;
587
+ fileName: string;
588
+ fileSizeBytes: number;
589
+ fileMimeType: string;
590
+ fileExtension: NullableString;
591
+ createdAt: Datetime;
592
+ createdBy: Actor;
593
+ updatedAt: Datetime;
594
+ updatedBy: Actor;
595
+ [k: string]: unknown;
596
+ }
597
+ export interface ThreadEmailSentPublicEventPayload {
598
+ eventType: "thread.email_sent";
599
+ thread: Thread;
600
+ email: Email;
601
+ [k: string]: unknown;
602
+ }
603
+ export interface ThreadSlackMessageReceivedEventPayload {
604
+ eventType: "thread.slack_message_received";
605
+ thread: Thread;
606
+ slackMessage: SlackMessage;
607
+ [k: string]: unknown;
608
+ }
609
+ export interface SlackMessage {
610
+ timelineEntryId: Id;
611
+ id: Id;
612
+ text: string;
613
+ resolvedText?: string;
614
+ attachments: Attachment[];
615
+ slackChannelId: string;
616
+ slackChannelName: string;
617
+ slackMessageLink: string;
618
+ slackReactions?: {
619
+ name: string;
620
+ actors: {
621
+ actorId: Id;
622
+ actorType: "user" | "machineUser" | "customer" | "system";
623
+ slackUserId: string;
624
+ [k: string]: unknown;
625
+ }[];
626
+ imageUrl?: string | null;
627
+ [k: string]: unknown;
628
+ }[];
629
+ createdAt: Datetime;
630
+ createdBy: Actor;
631
+ updatedAt: Datetime;
632
+ updatedBy: Actor;
633
+ [k: string]: unknown;
634
+ }
635
+ export interface ThreadSlackMessageSentEventPayload {
636
+ eventType: "thread.slack_message_sent";
637
+ thread: Thread;
638
+ slackMessage: SlackMessage;
639
+ [k: string]: unknown;
640
+ }
641
+ export interface ThreadMSTeamsMessageReceivedEventPayload {
642
+ eventType: "thread.ms_teams_message_received";
643
+ thread: Thread;
644
+ msTeamsMessage: MsTeamsMessage;
645
+ [k: string]: unknown;
646
+ }
647
+ export interface MsTeamsMessage {
648
+ timelineEntryId: Id;
649
+ threadId: Id;
650
+ msTeamsMessageId: string;
651
+ type: ("INBOUND" | "OUTBOUND" | "UNKNOWN_MS_TEAMS_MESSAGE_TYPE") | null;
652
+ text: string;
653
+ attachments: Attachment[];
654
+ lastEditedOnMsTeamsAt: Datetime | null;
655
+ deletedOnMsTeamsAt: Datetime | null;
656
+ createdAt: Datetime;
657
+ createdBy: Actor;
658
+ updatedAt: Datetime;
659
+ updatedBy: Actor;
660
+ [k: string]: unknown;
661
+ }
662
+ export interface ThreadMSTeamsMessageSentEventPayload {
663
+ eventType: "thread.ms_teams_message_sent";
664
+ thread: Thread;
665
+ msTeamsMessage: MsTeamsMessage;
666
+ [k: string]: unknown;
667
+ }
668
+ export interface ThreadLabelsChangedPublicEventPayload {
669
+ eventType: "thread.thread_labels_changed";
670
+ changeType: "ADDED" | "REMOVED";
671
+ thread: Thread;
672
+ previousThread: Thread;
673
+ [k: string]: unknown;
674
+ }
675
+ export interface ThreadPriorityChangedPublicEventPayload {
676
+ eventType: "thread.thread_priority_changed";
677
+ previousThread: Thread;
678
+ thread: Thread;
679
+ [k: string]: unknown;
680
+ }
681
+ export interface ThreadFieldCreatedPublicEventPayload {
682
+ eventType: "thread.thread_field_created";
683
+ thread: Thread;
684
+ threadField: ThreadField;
685
+ [k: string]: unknown;
686
+ }
687
+ export interface ThreadField {
688
+ id: Id;
689
+ threadId: Id;
690
+ key: string;
691
+ type: "STRING" | "BOOL" | "ENUM" | "NUMBER" | "CURRENCY" | "DATE" | "UNKNOWN_THREAD_FIELD_SCHEMA_TYPE";
692
+ stringValue: string | null;
693
+ booleanValue: boolean | null;
694
+ numberValue?: number | null;
695
+ dateValue?: string | null;
696
+ createdAt: Datetime;
697
+ createdBy: Actor;
698
+ updatedAt: Datetime;
699
+ updatedBy: Actor;
700
+ [k: string]: unknown;
701
+ }
702
+ export interface ThreadFieldUpdatedPublicEventPayload {
703
+ eventType: "thread.thread_field_updated";
704
+ thread: Thread;
705
+ previousThreadField: ThreadField;
706
+ threadField: ThreadField;
707
+ [k: string]: unknown;
708
+ }
709
+ export interface ThreadFieldDeletedPublicEventPayload {
710
+ eventType: "thread.thread_field_deleted";
711
+ thread: Thread;
712
+ previousThreadField: ThreadField;
713
+ [k: string]: unknown;
714
+ }
715
+ export interface ThreadChatSentPublicEventPayload {
716
+ eventType: "thread.chat_sent";
717
+ chat: Chat;
718
+ thread: Thread;
719
+ [k: string]: unknown;
720
+ }
721
+ export interface Chat {
722
+ timelineEntryId: Id;
723
+ id: Id;
724
+ customerReadAt: Datetime | null;
725
+ text?: string | null;
726
+ attachments: Attachment[];
727
+ createdAt: Datetime;
728
+ createdBy: Actor;
729
+ updatedAt: Datetime;
730
+ updatedBy: Actor;
731
+ [k: string]: unknown;
732
+ }
733
+ export interface ThreadServiceLevelAgreementStatusTransitionedPayload {
734
+ eventType: "thread.service_level_agreement_status_transitioned";
735
+ thread: Thread;
736
+ serviceLevelAgreement: ServiceLevelAgreement;
737
+ previousServiceLevelAgreementStatusDetail: ServiceLevelAgreementStatusDetail;
738
+ serviceLevelAgreementStatusDetail: ServiceLevelAgreementStatusDetail;
739
+ [k: string]: unknown;
740
+ }
741
+ export interface Tier {
742
+ id: Id;
743
+ name: string;
744
+ externalId: string | null;
745
+ color: string;
746
+ defaultThreadPriority?: number;
747
+ isDefault: boolean;
748
+ createdAt: Datetime;
749
+ createdBy: InternalActor;
750
+ updatedAt: Datetime;
751
+ updatedBy: InternalActor;
752
+ [k: string]: unknown;
753
+ }
754
+ /**
755
+ * A customer has been created
756
+ */
757
+ export interface CustomerCreatedPublicEventPayload {
758
+ eventType: "customer.customer_created";
759
+ customer: Customer;
760
+ [k: string]: unknown;
761
+ }
762
+ /**
763
+ * A customer has been updated
764
+ */
765
+ export interface CustomerUpdatedPublicEventPayload {
766
+ eventType: "customer.customer_updated";
767
+ customer: Customer;
768
+ previousCustomer: Customer;
769
+ [k: string]: unknown;
770
+ }
771
+ /**
772
+ * A customer has been deleted
773
+ */
774
+ export interface CustomerDeletedPublicEventPayload {
775
+ eventType: "customer.customer_deleted";
776
+ previousCustomer: Customer;
777
+ [k: string]: unknown;
778
+ }
779
+ export interface ThreadNoteCreatedEventPayload {
780
+ eventType: "thread.note_created";
781
+ thread: Thread;
782
+ note: {
783
+ timelineEntryId: Id;
784
+ id: Id;
785
+ text: string;
786
+ markdown: string | null;
787
+ createdAt: Datetime;
788
+ createdBy: InternalActor;
789
+ updatedAt: Datetime;
790
+ updatedBy: InternalActor;
791
+ deletedAt: NullableDatetime;
792
+ deletedBy: NullableInternalActor;
793
+ [k: string]: unknown;
794
+ };
795
+ [k: string]: unknown;
796
+ }
797
+ export interface ThreadChatReceivedPublicEventPayload {
798
+ eventType: "thread.chat_received";
799
+ chat: Chat;
800
+ thread: Thread;
801
+ [k: string]: unknown;
802
+ }
803
+ export interface ThreadSlackMessageUpdatedEventPayload {
804
+ eventType: "thread.slack_message_updated";
805
+ changeType: "MESSAGE_EDITED" | "MESSAGE_DELETED" | "REACTIONS_CHANGED" | "UNKNOWN_SLACK_MESSAGE_CHANGE_TYPE";
806
+ thread: Thread;
807
+ slackMessage: SlackMessage;
808
+ [k: string]: unknown;
809
+ }
810
+ export interface ThreadDiscordMessageReceivedEventPayload {
811
+ eventType: "thread.discord_message_received";
812
+ thread: Thread;
813
+ discordMessage: DiscordMessage;
814
+ [k: string]: unknown;
815
+ }
816
+ export interface DiscordMessage {
817
+ timelineEntryId: Id;
818
+ id: Id;
819
+ discordGuildId: string;
820
+ discordChannelId: string;
821
+ discordThreadId: string;
822
+ discordId: string;
823
+ discordTimestamp: Datetime;
824
+ textContent: string;
825
+ attachments?: Attachment[];
826
+ lastEditedOnDiscordAt?: Datetime | null;
827
+ deletedOnDiscordAt?: Datetime | null;
828
+ createdAt: Datetime;
829
+ createdBy: Actor;
830
+ updatedAt: Datetime;
831
+ updatedBy: Actor;
832
+ [k: string]: unknown;
833
+ }
834
+ export interface ThreadDiscordMessageSentEventPayload {
835
+ eventType: "thread.discord_message_sent";
836
+ thread: Thread;
837
+ discordMessage: DiscordMessage;
838
+ [k: string]: unknown;
839
+ }
840
+ export interface ThreadDiscordMessageUpdatedEventPayload {
841
+ eventType: "thread.discord_message_updated";
842
+ thread: Thread;
843
+ discordMessage: DiscordMessage;
844
+ [k: string]: unknown;
845
+ }
846
+ export interface WebhookMetadata {
847
+ webhookTargetId: Id;
848
+ webhookTargetVersion: "2026-02-27";
849
+ webhookDeliveryAttemptId: Id;
850
+ webhookDeliveryAttemptNumber: number;
851
+ webhookDeliveryAttemptTimestamp: Datetime;
852
+ [k: string]: unknown;
853
+ }
854
+ //# sourceMappingURL=webhook-schema.d.ts.map