@tellescope/types-models 1.87.0 → 1.89.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
@@ -227,9 +227,12 @@ export type BasicWebhook = {
227
227
  }
228
228
 
229
229
  export type SyncDirection = "Bidirectional" | "From Tellescope" | "To Tellescope"
230
- export type FieldSync = {
230
+ export type AthenaFieldSync = {
231
231
  field: string,
232
- externalField: string,
232
+ externalField: {
233
+ id: string,
234
+ options: { id: string, value: string }[]
235
+ },
233
236
  direction: SyncDirection,
234
237
  }
235
238
 
@@ -321,8 +324,9 @@ export interface Organization extends Organization_readonly, Organization_requir
321
324
  showCommunity?: boolean,
322
325
  phoneLabels?: { number: string, label: string }[];
323
326
  mfaxAccountId?: string,
324
- athenaFieldsSync?: FieldSync[]
327
+ athenaFieldsSync?: AthenaFieldSync[]
325
328
  athenaSubscriptions?: AthenaSubscription[],
329
+ athenaDepartmentIds?: string[],
326
330
  fieldsToAdminNote?: string[],
327
331
  // _AIEnabled?: boolean,
328
332
  }
@@ -410,6 +414,7 @@ export interface UserSession extends Session, OrganizationLimits { // User joine
410
414
  eat?: boolean, // enableAccessTags
411
415
  lockedOutUntil?: number,
412
416
  duration?: number,
417
+ availablePhoneNumbers: string[],
413
418
  }
414
419
 
415
420
  export type StateCredentialInfo = {
@@ -483,6 +488,7 @@ export interface User extends User_required, User_readonly, User_updatesDisabled
483
488
  weeklyAvailabilities?: WeeklyAvailability[],
484
489
  autoReplyEnabled?: boolean,
485
490
  twilioNumber?: string;
491
+ availableFromNumbers?: string[],
486
492
  hashedPass?: string,
487
493
  pushNotificationIosTokens?: string[],
488
494
  pushNotificationDestinations?: string[],
@@ -1113,6 +1119,7 @@ export type TicketActionBuilder <T, I> = { type: T, info: I, optional?: boolean,
1113
1119
  export type TicketActions = {
1114
1120
  "Complete Form": TicketActionBuilder<'Complete Form', { formId: string, formResponseId?: string }>,
1115
1121
  "Create Prescription": TicketActionBuilder<'Create Prescription', { }>,
1122
+ "Send SMS": TicketActionBuilder<'Send SMS', { templateId: string, smsId?: string }>,
1116
1123
  }
1117
1124
  export type TicketActionType = keyof TicketActions
1118
1125
  export type TicketAction = TicketActions[TicketActionType]
@@ -1185,6 +1192,7 @@ export interface Ticket extends Ticket_readonly, Ticket_required, Ticket_updates
1185
1192
  preserveContext?: boolean,
1186
1193
  phoneCallId?: string,
1187
1194
  calendarEventId?: string,
1195
+ observationId?: string,
1188
1196
  }
1189
1197
 
1190
1198
  export type AttendeeInfo = {
@@ -1303,6 +1311,7 @@ export type FormFieldOptions = FormFieldValidation & {
1303
1311
  },
1304
1312
  useDatePicker?: boolean,
1305
1313
  sharedIntakeFields?: string[],
1314
+ copyResponse?: boolean, // copy to related contacts when created
1306
1315
  disableGoBack?: boolean,
1307
1316
  disableNext?: boolean,
1308
1317
  customPriceMessage?: string,
@@ -1313,6 +1322,7 @@ export type FormFieldOptions = FormFieldValidation & {
1313
1322
 
1314
1323
  requirePredefinedInsurer?: boolean,
1315
1324
  addressFields?: string[], // supports specifying just 'state', for now
1325
+ validStates?: string[],
1316
1326
  autoAdvance?: boolean,
1317
1327
  prefillSignature?: boolean,
1318
1328
  }
@@ -1418,6 +1428,8 @@ export interface Form extends Form_readonly, Form_required, Form_updatesDisabled
1418
1428
  tags?: string[]
1419
1429
  language?: string,
1420
1430
  isNonVisitElationNote?: boolean,
1431
+ canvasId?: string,
1432
+ canvasQuestionId?: string,
1421
1433
  }
1422
1434
 
1423
1435
 
@@ -1647,7 +1659,7 @@ export type FormResponseValue = {
1647
1659
  sharedWithEnduser?: boolean,
1648
1660
  isCalledOut?: boolean,
1649
1661
  isHighlightedOnTimeline?: boolean,
1650
- computedValueKey?: 'Height' | 'Weight',
1662
+ computedValueKey?: 'Height' | 'Weight' | 'Date of Birth',
1651
1663
  }
1652
1664
 
1653
1665
  export type AnswerForType = {
@@ -1723,6 +1735,7 @@ export interface FormResponse extends FormResponse_readonly, FormResponse_requir
1723
1735
  carePlanId?: string,
1724
1736
  context?: string,
1725
1737
  calendarEventId?: string,
1738
+ copiedFrom?: string,
1726
1739
  }
1727
1740
 
1728
1741
  export interface WebHook_readonly extends ClientRecord {}
@@ -2158,6 +2171,7 @@ export type SetEnduserStatusInfo = { status: string }
2158
2171
  interface AutomationActionBuilder <T extends string, V extends object> {
2159
2172
  type: T,
2160
2173
  info: V,
2174
+ continueOnError?: boolean,
2161
2175
  }
2162
2176
 
2163
2177
  export type AssignToQueueInfo = {
@@ -2666,6 +2680,10 @@ export interface RoleBasedAccessPermission_updatesDisabled {}
2666
2680
  export interface RoleBasedAccessPermission extends RoleBasedAccessPermission_readonly, RoleBasedAccessPermission_required, RoleBasedAccessPermission_updatesDisabled {}
2667
2681
 
2668
2682
  export interface PhoneCall_readonly extends ClientRecord {
2683
+ }
2684
+ export interface PhoneCall_required {}
2685
+ export interface PhoneCall_updatesDisabled {}
2686
+ export interface PhoneCall extends PhoneCall_readonly, PhoneCall_required, PhoneCall_updatesDisabled {
2669
2687
  enduserId: string,
2670
2688
  externalId: string,
2671
2689
  from: string,
@@ -2679,10 +2697,6 @@ export interface PhoneCall_readonly extends ClientRecord {
2679
2697
  transcriptionId?: string,
2680
2698
  conferenceId?: string,
2681
2699
  conferenceAttendees?: string[],
2682
- }
2683
- export interface PhoneCall_required {}
2684
- export interface PhoneCall_updatesDisabled {}
2685
- export interface PhoneCall extends PhoneCall_readonly, PhoneCall_required, PhoneCall_updatesDisabled {
2686
2700
  unread?: boolean,
2687
2701
  transcription?: string,
2688
2702
  note?: string,
@@ -2696,6 +2710,7 @@ export interface PhoneCall extends PhoneCall_readonly, PhoneCall_required, Phone
2696
2710
  answeredAt?: Date,
2697
2711
  recordingCancelledAt?: Date,
2698
2712
  assignedTo?: string[],
2713
+ timestamp?: Date,
2699
2714
  }
2700
2715
 
2701
2716
  export type AnalyticsQueryResultValue = {
@@ -2803,7 +2818,7 @@ export type AnalyticsQueryGroupingForType = {
2803
2818
  Cost?: boolean,
2804
2819
  } & EnduserGrouping & { Enduser: string },
2805
2820
  "Purchase Credits": {} & EnduserGrouping & { Enduser: string },
2806
- "Tickets": {} & EnduserGrouping & { Enduser: string },
2821
+ "Tickets": { Owner: boolean } & EnduserGrouping & { Enduser: string },
2807
2822
  "Phone Calls": {} & EnduserGrouping & { Enduser: string },
2808
2823
  "SMS Messages": {
2809
2824
  Score?: boolean,
@@ -2817,16 +2832,17 @@ type DefaultRangeKey = 'Created At' | 'Updated At'
2817
2832
  export type AnalyticsQueryRangeKeyForType = {
2818
2833
  "Endusers": DefaultRangeKey,// | 'Last Active At',
2819
2834
  "Calendar Events": DefaultRangeKey,
2820
- "Form Responses": DefaultRangeKey,
2835
+ "Form Responses": DefaultRangeKey | "Submitted At",
2821
2836
  "Purchases": DefaultRangeKey,
2822
2837
  "Purchase Credits": DefaultRangeKey,
2823
- "Tickets": DefaultRangeKey,
2838
+ "Tickets": DefaultRangeKey | "Closed At",
2824
2839
  "Phone Calls": DefaultRangeKey,
2825
2840
  "SMS Messages": DefaultRangeKey,
2826
2841
  "Emails": DefaultRangeKey,
2827
2842
  "Medications": DefaultRangeKey,
2828
2843
  "Files": DefaultRangeKey,
2829
2844
  }
2845
+ export type RangeKey = DefaultRangeKey | 'Submitted At' | "Closed At"
2830
2846
 
2831
2847
  export type AnalyticsQueryRangeInterval = 'Hourly' | 'Daily' | 'Weekly' | 'Monthly'
2832
2848
  export type AnalyticsQueryRange <R> = {
@@ -3875,6 +3891,7 @@ export type JourneyContext = {
3875
3891
  purchaseId?: string,
3876
3892
  templateId?: string,
3877
3893
  orderId?: string,
3894
+ observationId?: string,
3878
3895
  }
3879
3896
 
3880
3897
  // https://gist.github.com/aviflax/a4093965be1cd008f172/