@tellescope/types-models 1.152.0 → 1.153.1

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
@@ -1401,7 +1401,7 @@ export interface Note extends Note_readonly, Note_required, Note_updatesDisabled
1401
1401
  }
1402
1402
 
1403
1403
  export type FormFieldLiteralType = 'description' | 'string' | 'stringLong' | 'number' | 'email' | 'phone' | 'date' /* date + time */ | 'dateString' | 'rating' | 'Time'
1404
- export type FormFieldComplexType = "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"
1404
+ 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"
1405
1405
  export type FormFieldType = FormFieldLiteralType | FormFieldComplexType
1406
1406
 
1407
1407
  export type PreviousFormFieldType = 'root' | 'after' | 'previousEquals' | 'compoundLogic'
@@ -1505,6 +1505,7 @@ export type FormFieldOptions = FormFieldValidation & {
1505
1505
  groupPadding?: number,
1506
1506
  saveIntakeOnPartial?: boolean,
1507
1507
  stripeKey?: string, // publishable key of custom stripe API keys
1508
+ dataSource?: string, // e.g. Canvas for Allergies
1508
1509
  }
1509
1510
  export type MultipleChoiceOptions = Pick<FormFieldOptions, 'choices' | 'radio' | 'other'>
1510
1511
 
@@ -1703,6 +1704,9 @@ export type DatabaseRecordFieldsInfo = {
1703
1704
  'Number': BuildDatabaseRecordField<'Number', number | '', { }>,
1704
1705
  Address: BuildDatabaseRecordField<'Address', Address | undefined, { }>
1705
1706
  'Multiple Select': BuildDatabaseRecordField<'Multiple Select', string[], { options: string[] }>,
1707
+ 'Dropdown': BuildDatabaseRecordField<'Dropdown', string, { options: string[] }>,
1708
+ 'Timestamp': BuildDatabaseRecordField<'Timestamp', string, { }>,
1709
+ 'Date': BuildDatabaseRecordField<'Date', string, { }>,
1706
1710
  }
1707
1711
  export type DatabaseRecordFieldType = keyof DatabaseRecordFieldsInfo
1708
1712
 
@@ -1797,6 +1801,12 @@ export type MedicationResponse = {
1797
1801
  reasonForTaking?: string,
1798
1802
  }
1799
1803
 
1804
+ export type AllergyResponse = {
1805
+ display: string,
1806
+ code: string,
1807
+ system?: string,
1808
+ }
1809
+
1800
1810
  export type FormResponseAnswerTable = FormResponseValueAnswerBuilder<'Table Input', TableInputCell[][]>
1801
1811
  export type FormResponseAnswerGroup = FormResponseValueAnswerBuilder<'Question Group', FormSubField[]>
1802
1812
  export type FormResponseAnswerDescription = FormResponseValueAnswerBuilder<'description', ''>
@@ -1817,6 +1827,8 @@ export type FormResponseAnswerAppointmentBooking = FormResponseValueAnswerBuilde
1817
1827
  export type FormResponseAnswerInsurance = FormResponseValueAnswerBuilder<'Insurance', Partial<EnduserInsurance>>
1818
1828
  export type FormResponseAnswerHeight = FormResponseValueAnswerBuilder<'Height', { feet: number, inches: number }>
1819
1829
  export type FormResponseAnswerRedirect = FormResponseValueAnswerBuilder<'Redirect', string>
1830
+ export type FormResponseAnswerAllergies = FormResponseValueAnswerBuilder<'Allergies', AllergyResponse[]>
1831
+ export type FormResponseAnswerConditions = FormResponseValueAnswerBuilder<'Conditions', AllergyResponse[]>
1820
1832
 
1821
1833
  export type FormResponseAnswerSignatureValue = {
1822
1834
  fullName: string,
@@ -1872,6 +1884,8 @@ export type FormResponseValueAnswer = (
1872
1884
  | FormResponseAnswerRedirect
1873
1885
  | FormResponseAnswerHiddenValue
1874
1886
  | FormResponseAnswerEmotii
1887
+ | FormResponseAnswerAllergies
1888
+ | FormResponseAnswerConditions
1875
1889
  )
1876
1890
 
1877
1891
  export type FormResponseValue = {
@@ -1918,6 +1932,8 @@ export type AnswerForType = {
1918
1932
  'Redirect': FormResponseAnswerRedirect['value']
1919
1933
  'Hidden Value': FormResponseAnswerHiddenValue['value']
1920
1934
  'Emotii': FormResponseAnswerEmotii['value']
1935
+ 'Allergies': FormResponseAnswerAllergies['value']
1936
+ 'Conditions': FormResponseAnswerConditions['value']
1921
1937
  }
1922
1938
 
1923
1939
  export type Addendum = {
@@ -2455,6 +2471,7 @@ export type AfterActionEventInfo = {
2455
2471
  unit: UnitOfTime, // for displaying in editor
2456
2472
  officeHoursOnly?: boolean,
2457
2473
  cancelConditions?: CancelCondition[]
2474
+ abTestCondition?: string,
2458
2475
  }
2459
2476
  export type TicketCompletedEventInfo = {
2460
2477
  automationStepId: string,
@@ -3125,6 +3142,7 @@ export interface PhoneCall extends PhoneCall_readonly, PhoneCall_required, Phone
3125
3142
  timestamp?: Date,
3126
3143
  dialedUserIds?: string[][], // might ring multiple stages, so use list of users dialed at each step
3127
3144
  ignoredUserIds?: string[][], // might ring multiple stages, so use list of users dialed at each step
3145
+ ticketId?: string,
3128
3146
  }
3129
3147
 
3130
3148
  export type AnalyticsQueryResultValue = {
@@ -3537,6 +3555,7 @@ export type AutomationTriggerEvents = {
3537
3555
  'Subscription Ended': AutomationTriggerEventBuilder<"Subscription Ended", { }, {}>,
3538
3556
  'Appointment No-Showed': AutomationTriggerEventBuilder<"Appointment No-Showed", { titles?: string[], templateIds?: string[] }, { }>,
3539
3557
  'Field Equals': AutomationTriggerEventBuilder<"Field Equals", { field: string, value: string }, { }>,
3558
+ 'Contact Created': AutomationTriggerEventBuilder<"Contact Created", { }, { }>,
3540
3559
  'Appointment Created': AutomationTriggerEventBuilder<"Appointment Created", { titles?: string[], templateIds?: string[] }, {}>,
3541
3560
  'Appointment Completed': AutomationTriggerEventBuilder<"Appointment Completed", { titles?: string[], templateIds?: string[] }, {}>,
3542
3561
  'Appointment Cancelled': AutomationTriggerEventBuilder<"Appointment Cancelled", { titles?: string[] }, {}>,
@@ -3687,7 +3706,7 @@ export type PhonePlayback = PhonePlaybackInfo[PhonePlaybackType]
3687
3706
  export type PhoneTreeActionBuilder <T, V> = { type: T, info: V }
3688
3707
  export type PhoneTreeActions = {
3689
3708
  // 'Play': PhoneTreeActionBuilder<"Play", { playback: PhonePlayback }>
3690
- 'Gather': PhoneTreeActionBuilder<"Gather", { digits: boolean, speech: boolean, playback: PhonePlayback }>
3709
+ 'Gather': PhoneTreeActionBuilder<"Gather", { digits: boolean, speech: boolean, playback: PhonePlayback, duration?: number }>
3691
3710
  'Voicemail': PhoneTreeActionBuilder<"Voicemail", { playback: PhonePlayback, journeyId?: string }>
3692
3711
  'Play Message': PhoneTreeActionBuilder<"Play Message", { playback: PhonePlayback, journeyId?: string }>
3693
3712
  'Dial Users': PhoneTreeActionBuilder<"Dial Users", { userIds: string[], playback?: Partial<PhonePlayback>, duration?: number }>
@@ -3871,6 +3890,7 @@ export interface EnduserOrder extends EnduserOrder_readonly, EnduserOrder_requir
3871
3890
  instructions?: string,
3872
3891
  shippedDate?: string,
3873
3892
  frequency?: string,
3893
+ activateBy?: string,
3874
3894
  }
3875
3895
 
3876
3896
  export interface EnduserProblem_readonly extends ClientRecord {}
@@ -4083,7 +4103,17 @@ export interface SuggestedContact_required {
4083
4103
  export interface SuggestedContact_updatesDisabled {}
4084
4104
  export interface SuggestedContact extends SuggestedContact_readonly, SuggestedContact_required, SuggestedContact_updatesDisabled {}
4085
4105
 
4106
+ export interface DiagnosisCode_readonly extends ClientRecord {}
4107
+ export interface DiagnosisCode_required {
4108
+ code: string,
4109
+ display: string,
4110
+ system: string,
4111
+ }
4112
+ export interface DiagnosisCode_updatesDisabled {}
4113
+ export interface DiagnosisCode extends DiagnosisCode_readonly, DiagnosisCode_required, DiagnosisCode_updatesDisabled {}
4114
+
4086
4115
  export type ModelForName_required = {
4116
+ diagnosis_codes: DiagnosisCode_required,
4087
4117
  suggested_contacts: SuggestedContact_required,
4088
4118
  call_hold_queues: CallHoldQueue_required,
4089
4119
  fax_logs: FaxLog_required,
@@ -4168,6 +4198,7 @@ export type ModelForName_required = {
4168
4198
  export type ClientModel_required = ModelForName_required[keyof ModelForName_required]
4169
4199
 
4170
4200
  export interface ModelForName_readonly {
4201
+ diagnosis_codes: DiagnosisCode_readonly,
4171
4202
  suggested_contacts: SuggestedContact_readonly,
4172
4203
  call_hold_queues: CallHoldQueue_readonly,
4173
4204
  fax_logs: FaxLog_readonly,
@@ -4252,6 +4283,7 @@ export interface ModelForName_readonly {
4252
4283
  export type ClientModel_readonly = ModelForName_readonly[keyof ModelForName_readonly]
4253
4284
 
4254
4285
  export interface ModelForName_updatesDisabled {
4286
+ diagnosis_codes: DiagnosisCode_updatesDisabled,
4255
4287
  suggested_contacts: SuggestedContact_updatesDisabled,
4256
4288
  call_hold_queues: CallHoldQueue_updatesDisabled,
4257
4289
  fax_logs: FaxLog_updatesDisabled,
@@ -4336,6 +4368,7 @@ export interface ModelForName_updatesDisabled {
4336
4368
  export type ClientModel_updatesDisabled = ModelForName_updatesDisabled[keyof ModelForName_updatesDisabled]
4337
4369
 
4338
4370
  export interface ModelForName extends ModelForName_required, ModelForName_readonly {
4371
+ diagnosis_codes: DiagnosisCode,
4339
4372
  suggested_contacts: SuggestedContact,
4340
4373
  call_hold_queues: CallHoldQueue,
4341
4374
  fax_logs: FaxLog,
@@ -4430,6 +4463,7 @@ export interface UserActivityInfo {
4430
4463
  export type UserActivityStatus = 'Active' | 'Away' | 'Unavailable'
4431
4464
 
4432
4465
  export const modelNameChecker: { [K in ModelName] : true } = {
4466
+ diagnosis_codes: true,
4433
4467
  suggested_contacts: true,
4434
4468
  call_hold_queues: true,
4435
4469
  fax_logs: true,