@tellescope/types-models 1.171.1 → 1.173.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/src/index.ts CHANGED
@@ -385,6 +385,7 @@ export interface Organization extends Organization_readonly, Organization_requir
385
385
  defaultDoseSpotPharmacies?: { id: string, name: string }[]
386
386
  groups?: string[],
387
387
  observationInvalidationReasons?: string[],
388
+ chargebeeEnvironments?: string[],
388
389
  // _AIEnabled?: boolean,
389
390
  }
390
391
  export type OrganizationTheme = {
@@ -811,6 +812,9 @@ export interface Enduser extends Enduser_readonly, Enduser_required, Enduser_upd
811
812
  lastDoseSpotSyncAt?: Date,
812
813
  diagnoses?: EnduserDiagnosis[]
813
814
  lockedFromPortal?: boolean,
815
+ chargebeeEnvironment?: string,
816
+ chargebeeId?: string,
817
+ healthieSyncError?: string,
814
818
  // unsubscribedFromEmail?: boolean,
815
819
  // unsubscribedFromSMS?: boolean,
816
820
  }
@@ -1065,7 +1069,7 @@ export interface Email extends Email_required, Email_readonly, Email_updatesDisa
1065
1069
  replyTo?: string | null;
1066
1070
  isBounce?: boolean,
1067
1071
  via?: string,
1068
- readBy?: { [index: string] : Date };
1072
+ readBy?: { [index: string] : Date | '' };
1069
1073
  journeyContext?: JourneyContext,
1070
1074
  sendAt?: Date | '',
1071
1075
  pinnedAt?: Date | '',
@@ -1117,7 +1121,7 @@ export interface SMSMessage extends SMSMessage_readonly, SMSMessage_required, SM
1117
1121
  autoResolveToFrom?: boolean,
1118
1122
  isAutoreply?: boolean,
1119
1123
  userId?: string, // defaults to self, but should allow future options to send as other user
1120
- readBy?: { [index: string] : Date };
1124
+ readBy?: { [index: string] : Date | '' };
1121
1125
  hiddenBy?: { [index: string] : Date | '' };
1122
1126
  hiddenForAll?: boolean,
1123
1127
  error?: string,
@@ -1152,6 +1156,7 @@ export interface ChatRoom_readonly extends ClientRecord {
1152
1156
  }
1153
1157
  export type ChatRoomUserInfo = {
1154
1158
  unreadCount: number
1159
+ markedUnread?: boolean,
1155
1160
  }
1156
1161
  export interface ChatRoom_required {}
1157
1162
  export interface ChatRoom_updatesDisabled {}
@@ -1209,7 +1214,7 @@ export interface ChatMessage_updatesDisabled {
1209
1214
  export interface ChatMessage extends ChatMessage_readonly, ChatMessage_required, ChatMessage_updatesDisabled, TextCommunication {
1210
1215
  senderId: string | null;
1211
1216
  html?: string,
1212
- readBy?: { [index: string] : Date };
1217
+ readBy?: { [index: string] : Date | '' };
1213
1218
  hiddenBy?: { [index: string] : Date | '' };
1214
1219
  hiddenForAll?: boolean,
1215
1220
  attachments?: ChatAttachment[]
@@ -1427,7 +1432,7 @@ export interface Note extends Note_readonly, Note_required, Note_updatesDisabled
1427
1432
  }
1428
1433
 
1429
1434
  export type FormFieldLiteralType = 'Rich Text' | 'description' | 'string' | 'stringLong' | 'number' | 'email' | 'phone' | 'date' /* date + time */ | 'dateString' | 'rating' | 'Time'
1430
- export type FormFieldComplexType = "Conditions" | "Allergies" | "Emotii" | "Hidden Value" | "Redirect" | "Height" | "Appointment Booking" | "multiple_choice" | "file" | 'files' | "signature" | 'ranking' | 'Question Group' | 'Table Input' | "Address" | "Stripe" | "Dropdown" | "Database Select" | "Medications" | "Related Contacts" | "Insurance"
1435
+ export type FormFieldComplexType = "Conditions" | "Allergies" | "Emotii" | "Hidden Value" | "Redirect" | "Height" | "Appointment Booking" | "multiple_choice" | "file" | 'files' | "signature" | 'ranking' | 'Question Group' | 'Table Input' | "Address" | "Chargebee" | "Stripe" | "Dropdown" | "Database Select" | "Medications" | "Related Contacts" | "Insurance"
1431
1436
  export type FormFieldType = FormFieldLiteralType | FormFieldComplexType
1432
1437
 
1433
1438
  export type PreviousFormFieldType = 'root' | 'after' | 'previousEquals' | 'compoundLogic'
@@ -1458,6 +1463,7 @@ export type TableInputChoices = {
1458
1463
  Text: TableChoiceBuilder<'Text', {}>
1459
1464
  Select: TableChoiceBuilder<'Select', { choices: string[] }>
1460
1465
  Date: TableChoiceBuilder<'Date', { }> // dateString not datetime
1466
+ Database: TableChoiceBuilder<'Database', { databaseId: string, databaseLabel: string }>
1461
1467
  }
1462
1468
 
1463
1469
  export type TableInputChoiceType = keyof TableInputChoices
@@ -1538,6 +1544,8 @@ export type FormFieldOptions = FormFieldValidation & {
1538
1544
  observationDisplay?: string,
1539
1545
  observationUnit?: string,
1540
1546
  autoUploadFiles?: boolean,
1547
+ chargebeeEnvironment?: string,
1548
+ chargebeePlanId?: string,
1541
1549
  }
1542
1550
  export type MultipleChoiceOptions = Pick<FormFieldOptions, 'choices' | 'radio' | 'other'>
1543
1551
 
@@ -1887,6 +1895,7 @@ export type FormResponseAnswerHeight = FormResponseValueAnswerBuilder<'Height',
1887
1895
  export type FormResponseAnswerRedirect = FormResponseValueAnswerBuilder<'Redirect', string>
1888
1896
  export type FormResponseAnswerAllergies = FormResponseValueAnswerBuilder<'Allergies', AllergyResponse[]>
1889
1897
  export type FormResponseAnswerConditions = FormResponseValueAnswerBuilder<'Conditions', ConditionResponse[]>
1898
+ export type FormResponseAnswerChargebee = FormResponseValueAnswerBuilder<'Chargebee', { url: string }>
1890
1899
 
1891
1900
  export type FormResponseAnswerSignatureValue = {
1892
1901
  fullName: string,
@@ -1945,6 +1954,7 @@ export type FormResponseValueAnswer = (
1945
1954
  | FormResponseAnswerEmotii
1946
1955
  | FormResponseAnswerAllergies
1947
1956
  | FormResponseAnswerConditions
1957
+ | FormResponseAnswerChargebee
1948
1958
  )
1949
1959
 
1950
1960
  export type FormResponseValue = {
@@ -1988,6 +1998,7 @@ export type AnswerForType = {
1988
1998
  'Related Contacts': FormResponseAnswerRelatedContacts['value']
1989
1999
  'Insurance': FormResponseAnswerInsurance['value']
1990
2000
  'Appointment Booking': FormResponseAnswerAppointmentBooking['value']
2001
+ 'Chargebee': FormResponseAnswerChargebee['value']
1991
2002
  'Height': FormResponseAnswerHeight['value']
1992
2003
  'Redirect': FormResponseAnswerRedirect['value']
1993
2004
  'Hidden Value': FormResponseAnswerHiddenValue['value']
@@ -2688,10 +2699,11 @@ export type SendWebhookAutomationAction = AutomationActionBuilder<'sendWebhook',
2688
2699
  export type ShareContentAutomationAction = AutomationActionBuilder<'shareContent', {
2689
2700
  managedContentRecordIds: string[],
2690
2701
  }>
2691
- export type AddEnduserTagsAutomationAction = AutomationActionBuilder<'addEnduserTags', { tags: string[] }>
2702
+ export type AddEnduserTagsAutomationAction = AutomationActionBuilder<'addEnduserTags', { tags: string[], replaceExisting?: boolean }>
2692
2703
  export type RemoveEnduserTagsAutomationAction = AutomationActionBuilder<'removeEnduserTags', { tags: string[] }>
2693
2704
  export type AddToJourneyAutomationAction = AutomationActionBuilder<'addToJourney', { journeyId: string }>
2694
2705
  export type RemoveFromJourneyAutomationAction = AutomationActionBuilder<'removeFromJourney', { journeyId: string }>
2706
+ export type RemoveFromAllJourneysAutomationAction = AutomationActionBuilder<'removeFromAllJourneys', { }>
2695
2707
  export type IterableSendEmailAutomationAction = AutomationActionBuilder<'iterableSendEmail', { campaignId: string }>
2696
2708
  export type ZendeskCreateTicketAutomationAction = AutomationActionBuilder<'zendeskCreateTicket', {
2697
2709
  templateId: string,
@@ -2729,6 +2741,12 @@ export type ActiveCampaignAddToListsAutomationAction = AutomationActionBuilder<'
2729
2741
  export type SwitchToRelatedContactAutomationAction = AutomationActionBuilder<'switchToRelatedContact', { type: string, otherTypes?: string[] }>
2730
2742
  export type ElationSyncAutomationAction = AutomationActionBuilder<'elationSync', { }>
2731
2743
  export type CanvasSyncAutomationAction = AutomationActionBuilder<'canvasSync', {}>
2744
+ export type DevelopHealthMedicationEligibilityAutomationAction = AutomationActionBuilder<'developHealthMedEligibility', {
2745
+ drugs: DevelopHealthDrug[],
2746
+ diagnoses: DevelopHealthDiagnosis[],
2747
+ providerUserId: string,
2748
+ mock_result?: DevelopHealthMockResult,
2749
+ }>
2732
2750
 
2733
2751
  export type IterableFieldsMapping = {
2734
2752
  iterable: string,
@@ -2775,6 +2793,7 @@ export type AutomationActionForType = {
2775
2793
  'removeEnduserTags': RemoveEnduserTagsAutomationAction,
2776
2794
  'addToJourney': AddToJourneyAutomationAction,
2777
2795
  'removeFromJourney': RemoveFromJourneyAutomationAction,
2796
+ removeFromAllJourneys: RemoveFromAllJourneysAutomationAction,
2778
2797
  'iterableSendEmail': IterableSendEmailAutomationAction,
2779
2798
  'iterableCustomEvent': IterableCustomEventAutomationAction,
2780
2799
  'zendeskCreateTicket': ZendeskCreateTicketAutomationAction,
@@ -2795,6 +2814,7 @@ export type AutomationActionForType = {
2795
2814
  'elationSync': ElationSyncAutomationAction,
2796
2815
  canvasSync: CanvasSyncAutomationAction,
2797
2816
  pushFormsToPortal: PushFormsAutomationAction,
2817
+ developHealthMedEligibility: DevelopHealthMedicationEligibilityAutomationAction,
2798
2818
  }
2799
2819
  export type AutomationActionType = keyof AutomationActionForType
2800
2820
  export type AutomationAction = AutomationActionForType[AutomationActionType]
@@ -3305,6 +3325,7 @@ export type AnalyticsQueryFilterForType = {
3305
3325
  },
3306
3326
  born?: DateRange,
3307
3327
  tags?: ListOfStringsWithQualifier,
3328
+ entityTypes?: string[],
3308
3329
  },
3309
3330
  "Calendar Events": {
3310
3331
  userIds?: string[],
@@ -3656,7 +3677,7 @@ export type AutomationTriggerActions = {
3656
3677
  "Add To Journey": AutomationTriggerActionBuilder<'Add To Journey', { journeyId: string, doNotRestart?: boolean }>,
3657
3678
  "Remove From Journey": AutomationTriggerActionBuilder<'Remove From Journey', { journeyId: string }>,
3658
3679
  "Remove From All Journeys": AutomationTriggerActionBuilder<'Remove From All Journeys', { }>,
3659
- "Add Tags": AutomationTriggerActionBuilder<'Add Tags', { tags: string[] }>,
3680
+ "Add Tags": AutomationTriggerActionBuilder<'Add Tags', { tags: string[], replaceExisting?: boolean }>,
3660
3681
  "Remove Tags": AutomationTriggerActionBuilder<'Remove Tags', { tags: string[] }>,
3661
3682
  "Add Access Tags": AutomationTriggerActionBuilder<'Add Access Tags', { tags: string[] }>,
3662
3683
  "Set Fields": AutomationTriggerActionBuilder<'Set Fields', { fields: EnduserFieldSetter[] }>,
@@ -3672,7 +3693,7 @@ export type AutomationTriggerActions = {
3672
3693
  }>,
3673
3694
  "Require Form Followups": AutomationTriggerActionBuilder<'Require Form Followups', {
3674
3695
  formIds: string[],
3675
- }>,
3696
+ }>,
3676
3697
  }
3677
3698
  export type AutomationTriggerActionType = keyof AutomationTriggerActions
3678
3699
  export type AutomationTriggerAction = AutomationTriggerActions[AutomationTriggerActionType]
@@ -3746,6 +3767,9 @@ export type AutomationTriggerEvents = {
3746
3767
  }, {}>,
3747
3768
  'Database Entry Added': AutomationTriggerEventBuilder<"Database Entry Added", { databaseId: string }, {}>,
3748
3769
  'Form Started': AutomationTriggerEventBuilder<"Form Started", { formIds?: string[] }, {}>,
3770
+ "Eligibility Result Received": AutomationTriggerActionBuilder<'Eligibility Result Received', {
3771
+ source: string,
3772
+ }>,
3749
3773
  }
3750
3774
  export type AutomationTriggerEventType = keyof AutomationTriggerEvents
3751
3775
  export type AutomationTriggerEvent = AutomationTriggerEvents[AutomationTriggerEventType]
@@ -3866,6 +3890,7 @@ export type PhoneTreeActions = {
3866
3890
  playback?: Partial<PhonePlayback>,
3867
3891
  duration?: number,
3868
3892
  addToCareTeam?: boolean,
3893
+ dialRecentAgent?: boolean,
3869
3894
  }>
3870
3895
  "Select Care Team Member": PhoneTreeActionBuilder<"Select Care Team Member", {
3871
3896
  playback?: Partial<PhonePlayback>,
@@ -3876,6 +3901,7 @@ export type PhoneTreeActions = {
3876
3901
  timezone?: Timezone,
3877
3902
  weeklyAvailabilities?: WeeklyAvailability[],
3878
3903
  hasCareTeam?: boolean,
3904
+ hasOneCareTeamMember?: boolean,
3879
3905
  }>
3880
3906
  'Add to Queue': PhoneTreeActionBuilder<"Add to Queue", { queueId: string, playback?: Partial<PhonePlayback>, }>
3881
3907
  }
@@ -3963,7 +3989,7 @@ export interface TicketThreadComment_readonly extends ClientRecord {
3963
3989
  externalId?: string,
3964
3990
  source?: string,
3965
3991
  references?: RelatedRecord[]
3966
- readBy?: { [index: string] : Date };
3992
+ readBy?: { [index: string] : Date | '' };
3967
3993
  timestamp?: Date,
3968
3994
  group?: string,
3969
3995
  }
@@ -4141,6 +4167,7 @@ export type GroupMMSMessage = {
4141
4167
  export type GroupMMSUserState = {
4142
4168
  id: string,
4143
4169
  numUnread: number,
4170
+ markedUnread?: boolean,
4144
4171
  }
4145
4172
 
4146
4173
  // lots of readonly as we use custom endpoint to create and send messages
@@ -4812,6 +4839,7 @@ export type JourneyContext = {
4812
4839
  emailId?: string,
4813
4840
  databaseRecordId?: string,
4814
4841
  databaseRecordCreator?: string,
4842
+ eligibilityResultId?: string,
4815
4843
  }
4816
4844
 
4817
4845
  // https://gist.github.com/aviflax/a4093965be1cd008f172/
@@ -5554,12 +5582,21 @@ export type TwilioQueue = {
5554
5582
  averageWaitTime: number,
5555
5583
  }
5556
5584
 
5585
+ export type DevelopHealthDrug = {
5586
+ name: string,
5587
+ dosage: string,
5588
+ quantity: number,
5589
+ }
5590
+ export type DevelopHealthMockResult = {
5591
+ status: string, // e.g. "completed",
5592
+ case: string, // e.g. "drugs_covered__prior_auth_required__has_copay"
5593
+ }
5594
+ export type DevelopHealthDiagnosis = {
5595
+ code: string, // ICD-10
5596
+ }
5597
+
5557
5598
  export type DevelopHealthRunBenefitVerificationBaseArguments = {
5558
- drugs: {
5559
- name: string,
5560
- dosage: string,
5561
- quantity: number,
5562
- }[],
5599
+ drugs: DevelopHealthDrug[],
5563
5600
  drug_history: {
5564
5601
  currently_taking_drugs: {
5565
5602
  name: string,
@@ -5568,13 +5605,8 @@ export type DevelopHealthRunBenefitVerificationBaseArguments = {
5568
5605
  name: string,
5569
5606
  }[],
5570
5607
  },
5571
- diagnoses: {
5572
- code: string, // ICD-10
5573
- }[],
5574
- mock_result?: {
5575
- status: string, // e.g. "completed",
5576
- case: string, // e.g. "drugs_covered__prior_auth_required__has_copay"
5577
- },
5608
+ diagnoses: DevelopHealthDiagnosis[],
5609
+ mock_result?: DevelopHealthMockResult,
5578
5610
  use_patient_plan_fund_source_check?: boolean,
5579
5611
  }
5580
5612