@tellescope/types-models 1.224.0 → 1.226.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.
- package/lib/cjs/index.d.ts +45 -1
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.d.ts +45 -1
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/index.ts +60 -9
package/src/index.ts
CHANGED
|
@@ -132,13 +132,14 @@ export type PortalSettings = {
|
|
|
132
132
|
|
|
133
133
|
export type WithLinkOpenTrackingIds = { linkOpenTrackingIds: string[] }
|
|
134
134
|
|
|
135
|
-
type BuildCustomEnduserField <T, I> = {
|
|
135
|
+
type BuildCustomEnduserField <T, I> = {
|
|
136
136
|
type: T,
|
|
137
137
|
info: I,
|
|
138
138
|
field: string,
|
|
139
139
|
required?: boolean,
|
|
140
140
|
hiddenFromProfile?: boolean,
|
|
141
141
|
requireConfirmation?: boolean,
|
|
142
|
+
tags?: string[],
|
|
142
143
|
}
|
|
143
144
|
export type CustomEnduserFields = {
|
|
144
145
|
"Select": BuildCustomEnduserField<'Select', { options: string[], other?: boolean }>,
|
|
@@ -380,6 +381,7 @@ export interface Organization extends Organization_readonly, Organization_requir
|
|
|
380
381
|
externalCalendarEventPlaceholderDescription?: string,
|
|
381
382
|
customZoomEmailTemplate?: string,
|
|
382
383
|
customZoomEmailSubject?: string,
|
|
384
|
+
customZoomSMSTemplate?: string,
|
|
383
385
|
customVoicemailText?: string,
|
|
384
386
|
hasConnectedOpenAI?: boolean,
|
|
385
387
|
hasConnectedHealthie?: boolean,
|
|
@@ -573,6 +575,12 @@ export type StateCredentialInfo = {
|
|
|
573
575
|
expiresAt?: Date,
|
|
574
576
|
}
|
|
575
577
|
|
|
578
|
+
export type MonthlyRestriction = {
|
|
579
|
+
// Which occurrences of this day within the month (1st, 2nd, 3rd, 4th, 5th)
|
|
580
|
+
// For example: [1, 3] means "only on the 1st and 3rd occurrence of this day in the month"
|
|
581
|
+
occurrences: (1 | 2 | 3 | 4 | 5)[]
|
|
582
|
+
}
|
|
583
|
+
|
|
576
584
|
export type WeeklyAvailability = {
|
|
577
585
|
dayOfWeekStartingSundayIndexedByZero: number,
|
|
578
586
|
startTimeInMinutes: number,
|
|
@@ -584,6 +592,7 @@ export type WeeklyAvailability = {
|
|
|
584
592
|
locationIds?: string[],
|
|
585
593
|
validTemplateIds?: string[],
|
|
586
594
|
priority?: number,
|
|
595
|
+
monthlyRestriction?: MonthlyRestriction,
|
|
587
596
|
}
|
|
588
597
|
export type NotificationPreference = {
|
|
589
598
|
email?: boolean
|
|
@@ -898,6 +907,7 @@ export interface Enduser extends Enduser_readonly, Enduser_required, Enduser_upd
|
|
|
898
907
|
markedReadAt?: Date | '',
|
|
899
908
|
markedUnreadAt?: Date | '',
|
|
900
909
|
note?: string,
|
|
910
|
+
noteIsFlagged?: boolean,
|
|
901
911
|
mfa?: MFASettings,
|
|
902
912
|
lastZendeskSyncAt?: Date,
|
|
903
913
|
accessTags?: string[],
|
|
@@ -1642,6 +1652,7 @@ export type FormFieldOptions = FormFieldValidation & {
|
|
|
1642
1652
|
subFields?: FormSubField[],
|
|
1643
1653
|
validFileTypes?: string[], // should be human readable files where the lower-case version is included in a filetype, e.g. Image, Video, PDF
|
|
1644
1654
|
maxFileSize?: number, // in bytes
|
|
1655
|
+
hideFromPortal?: boolean, // hide uploaded files from patient portal
|
|
1645
1656
|
signatureUrl?: string,
|
|
1646
1657
|
productIds?: string[],
|
|
1647
1658
|
chargeImmediately?: boolean,
|
|
@@ -1804,6 +1815,7 @@ export interface Form extends Form_readonly, Form_required, Form_updatesDisabled
|
|
|
1804
1815
|
htmlThanksMessage?: string,
|
|
1805
1816
|
type?: FormType,
|
|
1806
1817
|
scoring?: FormScoring[]
|
|
1818
|
+
realTimeScoring?: boolean,
|
|
1807
1819
|
externalId?: string,
|
|
1808
1820
|
ga4measurementId?: string,
|
|
1809
1821
|
backgroundColor?: string,
|
|
@@ -2425,6 +2437,7 @@ export interface CalendarEvent extends CalendarEvent_readonly, CalendarEvent_req
|
|
|
2425
2437
|
canvasReasonCoding?: CanvasCoding,
|
|
2426
2438
|
canvasLocationId?: string,
|
|
2427
2439
|
completedAt?: Date | '',
|
|
2440
|
+
completedBy?: string, // user ID when manually completed, or integration title when completed via integration
|
|
2428
2441
|
holdUntil?: Date,
|
|
2429
2442
|
holdFormResponseId?: string,
|
|
2430
2443
|
tags?: string[],
|
|
@@ -2667,6 +2680,8 @@ export interface AppointmentBookingPage extends AppointmentBookingPage_readonly,
|
|
|
2667
2680
|
archivedAt?: Date | '',
|
|
2668
2681
|
gtmTag?: string,
|
|
2669
2682
|
dontRestrictRescheduleToOriginalHost?: boolean,
|
|
2683
|
+
calendarTitleText?: string, // Custom text for "Pick a date and time for your visit" - can be empty to hide
|
|
2684
|
+
emailFieldBehavior?: "required" | "optional" | "hidden",
|
|
2670
2685
|
// productIds?: string[], // defer to specific template
|
|
2671
2686
|
}
|
|
2672
2687
|
|
|
@@ -2704,7 +2719,7 @@ export interface WebhookCall {
|
|
|
2704
2719
|
description?: string,
|
|
2705
2720
|
}
|
|
2706
2721
|
|
|
2707
|
-
export type AutomationEventType =
|
|
2722
|
+
export type AutomationEventType =
|
|
2708
2723
|
'onJourneyStart'
|
|
2709
2724
|
| 'afterAction'
|
|
2710
2725
|
| "formResponse"
|
|
@@ -2715,6 +2730,7 @@ export type AutomationEventType =
|
|
|
2715
2730
|
| 'waitForTrigger'
|
|
2716
2731
|
| "onCallOutcome"
|
|
2717
2732
|
| "onAIDecision"
|
|
2733
|
+
| "onError"
|
|
2718
2734
|
|
|
2719
2735
|
interface AutomationEventBuilder <T extends AutomationEventType, V extends object> {
|
|
2720
2736
|
type: T,
|
|
@@ -2811,6 +2827,11 @@ export type AfterActionAutomationEvent = AutomationEventBuilder<'afterAction', A
|
|
|
2811
2827
|
eventCondition?: {
|
|
2812
2828
|
before?: boolean,
|
|
2813
2829
|
},
|
|
2830
|
+
dayOfMonthCondition?: {
|
|
2831
|
+
dayOfMonth: number, // 1-31
|
|
2832
|
+
hour?: number, // 0-23, defaults to 9 AM
|
|
2833
|
+
minute?: number, // 0-59, defaults to 0
|
|
2834
|
+
},
|
|
2814
2835
|
skipIfDelayPassed?: boolean,
|
|
2815
2836
|
}>
|
|
2816
2837
|
export type FormUnsubmittedEvent = AutomationEventBuilder<'formUnsubmitted', FormUnsubmittedEventInfo>
|
|
@@ -2819,11 +2840,16 @@ export type OnJourneyStartAutomationEvent = AutomationEventBuilder<'onJourneySta
|
|
|
2819
2840
|
export type TicketCompletedAutomationEvent = AutomationEventBuilder<'ticketCompleted', TicketCompletedEventInfo>
|
|
2820
2841
|
export type WaitForTriggerAutomationEvent = AutomationEventBuilder<'waitForTrigger', { automationStepId: string, triggerId: string }>
|
|
2821
2842
|
export type OnCallOutcomeAutomationEvent = AutomationEventBuilder<'onCallOutcome', { automationStepId: string, outcome: string }>
|
|
2822
|
-
export type OnAIDecisionAutomationEvent = AutomationEventBuilder<'onAIDecision', { automationStepId: string, outcomes: string[] }>
|
|
2843
|
+
export type OnAIDecisionAutomationEvent = AutomationEventBuilder<'onAIDecision', { automationStepId: string, outcomes: string[] }>
|
|
2844
|
+
|
|
2845
|
+
export type OnErrorEventInfo = {
|
|
2846
|
+
automationStepId: string,
|
|
2847
|
+
}
|
|
2848
|
+
export type OnErrorAutomationEvent = AutomationEventBuilder<'onError', OnErrorEventInfo>
|
|
2823
2849
|
|
|
2824
2850
|
export type AutomationEventForType = {
|
|
2825
2851
|
'onJourneyStart': OnJourneyStartAutomationEvent
|
|
2826
|
-
'afterAction': AfterActionAutomationEvent
|
|
2852
|
+
'afterAction': AfterActionAutomationEvent
|
|
2827
2853
|
"formResponse": FormResponseAutomationEvent
|
|
2828
2854
|
"formResponses": FormResponsesAutomationEvent
|
|
2829
2855
|
'formUnsubmitted': FormUnsubmittedEvent
|
|
@@ -2832,6 +2858,7 @@ export type AutomationEventForType = {
|
|
|
2832
2858
|
'waitForTrigger': WaitForTriggerAutomationEvent
|
|
2833
2859
|
'onCallOutcome': OnCallOutcomeAutomationEvent,
|
|
2834
2860
|
'onAIDecision': OnAIDecisionAutomationEvent
|
|
2861
|
+
'onError': OnErrorAutomationEvent
|
|
2835
2862
|
}
|
|
2836
2863
|
export type AutomationEvent = AutomationEventForType[keyof AutomationEventForType]
|
|
2837
2864
|
|
|
@@ -3046,6 +3073,7 @@ export type CallUserAutomationAction = AutomationActionBuilder<
|
|
|
3046
3073
|
export type StripeChargeCardOnFileAutomationAction = AutomationActionBuilder<'stripeChargeCardOnFile', {
|
|
3047
3074
|
stripeKey?: string, // indicating custom vs. stripe connect
|
|
3048
3075
|
priceIds: string[], // Stripe price ids to charge
|
|
3076
|
+
productIds?: string[], // Tellescope product IDs to extract price IDs from
|
|
3049
3077
|
subscriptionPriceId?: string
|
|
3050
3078
|
}>
|
|
3051
3079
|
|
|
@@ -3200,15 +3228,27 @@ export interface EnduserObservation extends EnduserObservation_readonly, Enduser
|
|
|
3200
3228
|
}
|
|
3201
3229
|
|
|
3202
3230
|
export type BlockType = 'h1' | 'h2' | 'html' | 'image' | 'youtube' | 'pdf' | 'iframe' | 'content-link'
|
|
3231
|
+
|
|
3232
|
+
export type BlockStyle = {
|
|
3233
|
+
width?: number,
|
|
3234
|
+
height?: number,
|
|
3235
|
+
backgroundColor?: string,
|
|
3236
|
+
borderColor?: string,
|
|
3237
|
+
borderWidth?: number,
|
|
3238
|
+
textColor?: string,
|
|
3239
|
+
}
|
|
3240
|
+
|
|
3203
3241
|
export type ContentBlockBuilder <BLOCK extends BlockType, INFO extends object> = {
|
|
3204
3242
|
type: BLOCK,
|
|
3205
3243
|
info: INFO,
|
|
3244
|
+
style?: BlockStyle,
|
|
3206
3245
|
}
|
|
3207
3246
|
|
|
3208
3247
|
export type BlockContentText = { text: string }
|
|
3209
3248
|
export type BlockContentMedia = {
|
|
3210
3249
|
link: string,
|
|
3211
3250
|
name?: string,
|
|
3251
|
+
alt?: string,
|
|
3212
3252
|
height?: number,
|
|
3213
3253
|
maxHeight?: number,
|
|
3214
3254
|
width?: number,
|
|
@@ -3293,7 +3333,7 @@ export type CareTeamMemberPortalCustomizationInfo = {
|
|
|
3293
3333
|
role?: string, // for matching to care team role for a specific team member
|
|
3294
3334
|
}
|
|
3295
3335
|
export type PortalBlockForType = {
|
|
3296
|
-
careTeam: BuildPortalBlockInfo<'careTeam', {
|
|
3336
|
+
careTeam: BuildPortalBlockInfo<'careTeam', {
|
|
3297
3337
|
title: string,
|
|
3298
3338
|
roles?: string[],
|
|
3299
3339
|
showAll?: boolean,
|
|
@@ -3307,6 +3347,10 @@ export type PortalBlockForType = {
|
|
|
3307
3347
|
"Orders": BuildPortalBlockInfo<'Orders', { }>
|
|
3308
3348
|
"Manage Subscription Button": BuildPortalBlockInfo<'Manage Subscription Button', { }>
|
|
3309
3349
|
HTML: BuildPortalBlockInfo<'HTML', { html: string }>
|
|
3350
|
+
pinnedForms: BuildPortalBlockInfo<'pinnedForms', {
|
|
3351
|
+
title?: string,
|
|
3352
|
+
formIds?: string[],
|
|
3353
|
+
}>
|
|
3310
3354
|
}
|
|
3311
3355
|
export type PortalBlockType = keyof PortalBlockForType
|
|
3312
3356
|
export type PortalBlock = PortalBlockForType[PortalBlockType]
|
|
@@ -3555,7 +3599,8 @@ export interface PhoneCall extends PhoneCall_readonly, PhoneCall_required, Phone
|
|
|
3555
3599
|
externalConferenceId?: string,
|
|
3556
3600
|
conferenceAttendees?: (string[]) | (string[][]), // old code caused multiple lists to be pushed by mistake
|
|
3557
3601
|
unread?: boolean,
|
|
3558
|
-
transcription?: string,
|
|
3602
|
+
transcription?: string, // Twilio voicemail transcription
|
|
3603
|
+
recordingTranscriptionData?: string, // Full AWS Transcribe JSON response (stringified) with metadata
|
|
3559
3604
|
note?: string,
|
|
3560
3605
|
userId?: string,
|
|
3561
3606
|
pinnedAt?: Date | '',
|
|
@@ -3709,6 +3754,7 @@ export type AnalyticsQueryGroupingForType = {
|
|
|
3709
3754
|
"Calendar Events": {
|
|
3710
3755
|
Type: boolean,
|
|
3711
3756
|
"Scheduled By"?: boolean,
|
|
3757
|
+
"Completed By"?: boolean,
|
|
3712
3758
|
alsoGroupByHost?: boolean, // for further breaking down a grouping by host
|
|
3713
3759
|
"Cancel Reason"?: boolean,
|
|
3714
3760
|
} & EnduserGrouping & { Enduser: string },
|
|
@@ -3920,8 +3966,8 @@ export interface AnalyticsFrame_required {
|
|
|
3920
3966
|
groupByCareTeam?: boolean, // supports multi-grouping for both care team and a normal field
|
|
3921
3967
|
}
|
|
3922
3968
|
export interface AnalyticsFrame_updatesDisabled {}
|
|
3923
|
-
export interface AnalyticsFrame extends
|
|
3924
|
-
AnalyticsFrame_readonly, AnalyticsFrame_required, AnalyticsFrame_updatesDisabled, AnalyticsQueryOptions
|
|
3969
|
+
export interface AnalyticsFrame extends
|
|
3970
|
+
AnalyticsFrame_readonly, AnalyticsFrame_required, AnalyticsFrame_updatesDisabled, AnalyticsQueryOptions
|
|
3925
3971
|
{
|
|
3926
3972
|
parentFrame?: string,
|
|
3927
3973
|
type?: AnalyticsFrameType,
|
|
@@ -3935,6 +3981,7 @@ export interface AnalyticsFrame extends
|
|
|
3935
3981
|
visibleForRoles?: string[],
|
|
3936
3982
|
visibleForUserIds?: string[],
|
|
3937
3983
|
index?: number,
|
|
3984
|
+
tags?: string[],
|
|
3938
3985
|
}
|
|
3939
3986
|
|
|
3940
3987
|
|
|
@@ -4070,6 +4117,8 @@ export type AutomationTriggerActions = {
|
|
|
4070
4117
|
tags?: ListOfStringsWithQualifier,
|
|
4071
4118
|
maxUsers?: number,
|
|
4072
4119
|
}>,
|
|
4120
|
+
"Zendesk: Update Ticket Assignee": AutomationTriggerActionBuilder<'Zendesk: Update Ticket Assignee', {
|
|
4121
|
+
}>,
|
|
4073
4122
|
}
|
|
4074
4123
|
export type AutomationTriggerActionType = keyof AutomationTriggerActions
|
|
4075
4124
|
export type AutomationTriggerAction = AutomationTriggerActions[AutomationTriggerActionType]
|
|
@@ -4103,7 +4152,7 @@ export type AutomationTriggerEvents = {
|
|
|
4103
4152
|
excludeCancelUpcomingEventsJourney?: boolean, // if true, will not trigger from cancelUpcomingEvents Journey action
|
|
4104
4153
|
by?: '' | 'enduser' | 'user', // only implemented for enduser for now
|
|
4105
4154
|
}, {}>,
|
|
4106
|
-
'Appointment Rescheduled': AutomationTriggerEventBuilder<"Appointment Rescheduled", { titles?: string[] }, {}>,
|
|
4155
|
+
'Appointment Rescheduled': AutomationTriggerEventBuilder<"Appointment Rescheduled", { titles?: string[], detectManualReschedules?: boolean }, {}>,
|
|
4107
4156
|
'Medication Added': AutomationTriggerEventBuilder<"Medication Added", { titles: string[] }, {}>,
|
|
4108
4157
|
'No Recent Appointment': AutomationTriggerEventBuilder<"No Recent Appointment", {
|
|
4109
4158
|
intervalInMS: number,
|
|
@@ -5320,6 +5369,8 @@ export type JourneyContext = {
|
|
|
5320
5369
|
fileId?: string,
|
|
5321
5370
|
chatRoomId?: string,
|
|
5322
5371
|
twilioNumber?: string,
|
|
5372
|
+
ticketThreadId?: string,
|
|
5373
|
+
ticketThreadCommentId?: string,
|
|
5323
5374
|
}
|
|
5324
5375
|
|
|
5325
5376
|
// https://gist.github.com/aviflax/a4093965be1cd008f172/
|