@tellescope/types-models 1.151.0 → 1.153.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
@@ -683,6 +683,8 @@ export type EnduserInsurance = {
683
683
  },
684
684
  payerType?: string, // for Healthie
685
685
  groupNumber?: string,
686
+ planName?: string,
687
+ startDate?: string,
686
688
  }
687
689
 
688
690
  export type EnduserDiagnosis = {
@@ -1399,7 +1401,7 @@ export interface Note extends Note_readonly, Note_required, Note_updatesDisabled
1399
1401
  }
1400
1402
 
1401
1403
  export type FormFieldLiteralType = 'description' | 'string' | 'stringLong' | 'number' | 'email' | 'phone' | 'date' /* date + time */ | 'dateString' | 'rating' | 'Time'
1402
- 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 = "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"
1403
1405
  export type FormFieldType = FormFieldLiteralType | FormFieldComplexType
1404
1406
 
1405
1407
  export type PreviousFormFieldType = 'root' | 'after' | 'previousEquals' | 'compoundLogic'
@@ -1503,6 +1505,7 @@ export type FormFieldOptions = FormFieldValidation & {
1503
1505
  groupPadding?: number,
1504
1506
  saveIntakeOnPartial?: boolean,
1505
1507
  stripeKey?: string, // publishable key of custom stripe API keys
1508
+ dataSource?: string, // e.g. Canvas for Allergies
1506
1509
  }
1507
1510
  export type MultipleChoiceOptions = Pick<FormFieldOptions, 'choices' | 'radio' | 'other'>
1508
1511
 
@@ -1701,6 +1704,9 @@ export type DatabaseRecordFieldsInfo = {
1701
1704
  'Number': BuildDatabaseRecordField<'Number', number | '', { }>,
1702
1705
  Address: BuildDatabaseRecordField<'Address', Address | undefined, { }>
1703
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, { }>,
1704
1710
  }
1705
1711
  export type DatabaseRecordFieldType = keyof DatabaseRecordFieldsInfo
1706
1712
 
@@ -1795,6 +1801,12 @@ export type MedicationResponse = {
1795
1801
  reasonForTaking?: string,
1796
1802
  }
1797
1803
 
1804
+ export type AllergyResponse = {
1805
+ display: string,
1806
+ code: string,
1807
+ system?: string,
1808
+ }
1809
+
1798
1810
  export type FormResponseAnswerTable = FormResponseValueAnswerBuilder<'Table Input', TableInputCell[][]>
1799
1811
  export type FormResponseAnswerGroup = FormResponseValueAnswerBuilder<'Question Group', FormSubField[]>
1800
1812
  export type FormResponseAnswerDescription = FormResponseValueAnswerBuilder<'description', ''>
@@ -1815,6 +1827,7 @@ export type FormResponseAnswerAppointmentBooking = FormResponseValueAnswerBuilde
1815
1827
  export type FormResponseAnswerInsurance = FormResponseValueAnswerBuilder<'Insurance', Partial<EnduserInsurance>>
1816
1828
  export type FormResponseAnswerHeight = FormResponseValueAnswerBuilder<'Height', { feet: number, inches: number }>
1817
1829
  export type FormResponseAnswerRedirect = FormResponseValueAnswerBuilder<'Redirect', string>
1830
+ export type FormResponseAnswerAllergies = FormResponseValueAnswerBuilder<'Allergies', AllergyResponse[]>
1818
1831
 
1819
1832
  export type FormResponseAnswerSignatureValue = {
1820
1833
  fullName: string,
@@ -1870,6 +1883,7 @@ export type FormResponseValueAnswer = (
1870
1883
  | FormResponseAnswerRedirect
1871
1884
  | FormResponseAnswerHiddenValue
1872
1885
  | FormResponseAnswerEmotii
1886
+ | FormResponseAnswerAllergies
1873
1887
  )
1874
1888
 
1875
1889
  export type FormResponseValue = {
@@ -1916,6 +1930,13 @@ export type AnswerForType = {
1916
1930
  'Redirect': FormResponseAnswerRedirect['value']
1917
1931
  'Hidden Value': FormResponseAnswerHiddenValue['value']
1918
1932
  'Emotii': FormResponseAnswerEmotii['value']
1933
+ 'Allergies': FormResponseAnswerAllergies['value']
1934
+ }
1935
+
1936
+ export type Addendum = {
1937
+ timestamp: Date,
1938
+ userId: string,
1939
+ text: string,
1919
1940
  }
1920
1941
 
1921
1942
  export interface FormResponse_readonly extends ClientRecord {
@@ -1991,6 +2012,7 @@ export interface FormResponse extends FormResponse_readonly, FormResponse_requir
1991
2012
  discussionRoomId?: string,
1992
2013
  formsort?: string,
1993
2014
  hideAfterUnsubmittedInMS?: number,
2015
+ addenda?: Addendum[]
1994
2016
  }
1995
2017
 
1996
2018
  export interface WebHook_readonly extends ClientRecord {}
@@ -2416,7 +2438,12 @@ export interface AutomationForSender {
2416
2438
  }
2417
2439
  export interface AutomationForFormRequest extends AutomationForForm, AutomationForSender { channel?: CommunicationsChannel }
2418
2440
  export interface AutomationForMessage extends AutomationForTemplate, AutomationForSender {}
2419
- export interface AutomationForWebhook { message: string }
2441
+ export interface AutomationForWebhook {
2442
+ message: string,
2443
+ url?: string,
2444
+ secret?: string,
2445
+ fields?: LabeledField[],
2446
+ }
2420
2447
 
2421
2448
  export type FormResponseAutomationEvent = AutomationEventBuilder<'formResponse', {
2422
2449
  automationStepId: string,
@@ -3111,6 +3138,7 @@ export interface PhoneCall extends PhoneCall_readonly, PhoneCall_required, Phone
3111
3138
  timestamp?: Date,
3112
3139
  dialedUserIds?: string[][], // might ring multiple stages, so use list of users dialed at each step
3113
3140
  ignoredUserIds?: string[][], // might ring multiple stages, so use list of users dialed at each step
3141
+ ticketId?: string,
3114
3142
  }
3115
3143
 
3116
3144
  export type AnalyticsQueryResultValue = {
@@ -3523,6 +3551,7 @@ export type AutomationTriggerEvents = {
3523
3551
  'Subscription Ended': AutomationTriggerEventBuilder<"Subscription Ended", { }, {}>,
3524
3552
  'Appointment No-Showed': AutomationTriggerEventBuilder<"Appointment No-Showed", { titles?: string[], templateIds?: string[] }, { }>,
3525
3553
  'Field Equals': AutomationTriggerEventBuilder<"Field Equals", { field: string, value: string }, { }>,
3554
+ 'Contact Created': AutomationTriggerEventBuilder<"Contact Created", { }, { }>,
3526
3555
  'Appointment Created': AutomationTriggerEventBuilder<"Appointment Created", { titles?: string[], templateIds?: string[] }, {}>,
3527
3556
  'Appointment Completed': AutomationTriggerEventBuilder<"Appointment Completed", { titles?: string[], templateIds?: string[] }, {}>,
3528
3557
  'Appointment Cancelled': AutomationTriggerEventBuilder<"Appointment Cancelled", { titles?: string[] }, {}>,
@@ -3673,7 +3702,7 @@ export type PhonePlayback = PhonePlaybackInfo[PhonePlaybackType]
3673
3702
  export type PhoneTreeActionBuilder <T, V> = { type: T, info: V }
3674
3703
  export type PhoneTreeActions = {
3675
3704
  // 'Play': PhoneTreeActionBuilder<"Play", { playback: PhonePlayback }>
3676
- 'Gather': PhoneTreeActionBuilder<"Gather", { digits: boolean, speech: boolean, playback: PhonePlayback }>
3705
+ 'Gather': PhoneTreeActionBuilder<"Gather", { digits: boolean, speech: boolean, playback: PhonePlayback, duration?: number }>
3677
3706
  'Voicemail': PhoneTreeActionBuilder<"Voicemail", { playback: PhonePlayback, journeyId?: string }>
3678
3707
  'Play Message': PhoneTreeActionBuilder<"Play Message", { playback: PhonePlayback, journeyId?: string }>
3679
3708
  'Dial Users': PhoneTreeActionBuilder<"Dial Users", { userIds: string[], playback?: Partial<PhonePlayback>, duration?: number }>
@@ -3857,6 +3886,7 @@ export interface EnduserOrder extends EnduserOrder_readonly, EnduserOrder_requir
3857
3886
  instructions?: string,
3858
3887
  shippedDate?: string,
3859
3888
  frequency?: string,
3889
+ activateBy?: string,
3860
3890
  }
3861
3891
 
3862
3892
  export interface EnduserProblem_readonly extends ClientRecord {}