@tellescope/types-models 1.85.3 → 1.86.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
@@ -37,11 +37,11 @@ export type IndexUpdate = {
37
37
  index: number,
38
38
  }
39
39
 
40
- export type Filters = { _exists: boolean, _gt: number, _gte: number, _lt: number, _lte: number, _all: any[], _in: any[] }
40
+ export type Filters = { _exists: boolean, _gt: number, _gte: number, _lt: number, _lte: number, _all: any[], _in: any[], _nin: any[], _ne: any }
41
41
  export type ExistsFilter = { _exists: boolean }
42
42
  export type FilterType = Filters
43
43
  export type FilterKey = keyof Filters
44
- export const FilterKeys = ['_exists', '_gt', '_gte', '_lt', '_lte', '_all'] as const
44
+ export const FilterKeys = ['_exists', '_gt', '_gte', '_lt', '_lte', '_all', "_ne", "_nin"] as const
45
45
  export type ReadFilter<T> = { [K in keyof T]?: T[K] | Partial<FilterType> }
46
46
 
47
47
  export type FlowchartUI = {
@@ -184,6 +184,7 @@ export type OrganizationSettings = {
184
184
  defaultJourneyDueDateOffsetInMS?: number | '',
185
185
  disableSnooze?: boolean,
186
186
  showCommunications?: boolean,
187
+ showJourneys?: boolean,
187
188
  },
188
189
  calendar?: {
189
190
  dayStart?: {
@@ -224,6 +225,20 @@ export type BasicWebhook = {
224
225
  method?: 'Link' | 'POST'
225
226
  }
226
227
 
228
+ export type SyncDirection = "Bidirectional" | "From Tellescope" | "To Tellescope"
229
+ export type FieldSync = {
230
+ field: string,
231
+ externalField: string,
232
+ direction: SyncDirection,
233
+ }
234
+
235
+ export type AthenaSubscription = {
236
+ // make sure to update validator if adding new types here
237
+ type: 'patients',
238
+ frequencyInMinutes: number,
239
+ lastSyncedAt: Date,
240
+ }
241
+
227
242
  export interface Organization_readonly extends ClientRecord {
228
243
  subscriptionExpiresAt: Date;
229
244
  subscriptionPeriod: number;
@@ -281,6 +296,7 @@ export interface Organization extends Organization_readonly, Organization_requir
281
296
  hasConnectedGoGoMeds?: boolean,
282
297
  hasConnectedPagerDuty?: boolean,
283
298
  hasConnectedSmartMeter?: boolean,
299
+ hasConnectedAthena?: boolean,
284
300
  hasConfiguredZoom?: boolean,
285
301
  hasTicketQueues?: boolean,
286
302
  vitalTeamId?: string,
@@ -304,6 +320,9 @@ export interface Organization extends Organization_readonly, Organization_requir
304
320
  showCommunity?: boolean,
305
321
  phoneLabels?: { number: string, label: string }[];
306
322
  mfaxAccountId?: string,
323
+ athenaFieldsSync?: FieldSync[]
324
+ athenaSubscriptions?: AthenaSubscription[],
325
+ fieldsToAdminNote?: string[],
307
326
  // _AIEnabled?: boolean,
308
327
  }
309
328
  export type OrganizationTheme = {
@@ -1087,7 +1106,7 @@ export interface File extends File_readonly, File_required, File_updatesDisabled
1087
1106
  }
1088
1107
 
1089
1108
 
1090
- export type TicketActionBuilder <T, I> = { type: T, info: I, completedAt?: Date | '' }
1109
+ export type TicketActionBuilder <T, I> = { type: T, info: I, optional?: boolean, completedAt?: Date | '' }
1091
1110
  export type TicketActions = {
1092
1111
  "Complete Form": TicketActionBuilder<'Complete Form', { formId: string, formResponseId?: string }>,
1093
1112
  "Create Prescription": TicketActionBuilder<'Create Prescription', { }>,
@@ -1285,7 +1304,10 @@ export type FormFieldOptions = FormFieldValidation & {
1285
1304
  customPriceMessage?: string,
1286
1305
  billingProvider?: 'Canvas' | "Candid" | string,
1287
1306
  bookingPageId?: string,
1288
- userTags?: string[],
1307
+ userTags?: string[], // for user(s) selection by tags
1308
+ userFilterTags?: string[],
1309
+
1310
+ requirePredefinedInsurer?: boolean,
1289
1311
  addressFields?: string[], // supports specifying just 'state', for now
1290
1312
  autoAdvance?: boolean,
1291
1313
  prefillSignature?: boolean,
@@ -1425,6 +1447,7 @@ export interface Integration_required {}
1425
1447
  export interface Integration_updatesDisabled {}
1426
1448
  export interface Integration extends Integration_readonly, Integration_required, Integration_updatesDisabled {
1427
1449
  title: string,
1450
+ tenantId?: string, // e.g. for athena health practice id which doesn't fit in authentication
1428
1451
  authentication: IntegrationAuthentication,
1429
1452
  emailDisabled?: boolean,
1430
1453
  syncUnrecognizedSenders?: boolean,
@@ -1971,6 +1994,7 @@ export interface AppointmentBookingPage extends AppointmentBookingPage_readonly,
1971
1994
  hoursBeforeBookingAllowed?: number | '',
1972
1995
  limitedToCareTeam?: boolean,
1973
1996
  limitedByState?: boolean,
1997
+ requireLocationSelection?: boolean,
1974
1998
  // productIds?: string[], // defer to specific template
1975
1999
  }
1976
2000
 
@@ -2226,6 +2250,7 @@ export type SmartMeterPlaceOrderAutomationAction = AutomationActionBuilder<'smar
2226
2250
  shipping?: string,
2227
2251
  }>
2228
2252
  export type HealthieSyncAutomationAction = AutomationActionBuilder<'healthieSync', {}>
2253
+ export type CompleteTicketsAutomationAction = AutomationActionBuilder<'completeTickets', { journeyIds?: string[] }>
2229
2254
 
2230
2255
  export type IterableFieldsMapping = {
2231
2256
  iterable: string,
@@ -2278,6 +2303,7 @@ export type AutomationActionForType = {
2278
2303
  'pagerDutyCreateIncident': PagerDutyCreateIncidentAutomationAction,
2279
2304
  'smartMeterPlaceOrder': SmartMeterPlaceOrderAutomationAction,
2280
2305
  'healthieSync': HealthieSyncAutomationAction,
2306
+ 'completeTickets': CompleteTicketsAutomationAction,
2281
2307
  }
2282
2308
  export type AutomationActionType = keyof AutomationActionForType
2283
2309
  export type AutomationAction = AutomationActionForType[AutomationActionType]
@@ -3420,8 +3446,27 @@ export interface VitalConfiguration extends VitalConfiguration_readonly, VitalCo
3420
3446
  ranges: VitalConfigurationRange[],
3421
3447
  }
3422
3448
 
3449
+ export interface BlockedPhone_readonly extends ClientRecord { }
3450
+ export interface BlockedPhone_required {}
3451
+ export interface BlockedPhone_updatesDisabled {}
3452
+ export interface BlockedPhone extends BlockedPhone_readonly, BlockedPhone_required, BlockedPhone_updatesDisabled {
3453
+ phone: string,
3454
+ }
3455
+
3456
+ export interface PrescriptionRoute_readonly extends ClientRecord { }
3457
+ export interface PrescriptionRoute_required {}
3458
+ export interface PrescriptionRoute_updatesDisabled {}
3459
+ export interface PrescriptionRoute extends PrescriptionRoute_readonly, PrescriptionRoute_required, PrescriptionRoute_updatesDisabled {
3460
+ title: string,
3461
+ state: string,
3462
+ templateIds: string[],
3463
+ pharmacyId?: string,
3464
+ }
3465
+
3423
3466
  export type ModelForName_required = {
3467
+ prescription_routes: PrescriptionRoute_required,
3424
3468
  vital_configurations: VitalConfiguration_required,
3469
+ blocked_phones: BlockedPhone_required,
3425
3470
  enduser_encounters: EnduserEncounter_required,
3426
3471
  enduser_orders: EnduserOrder_required,
3427
3472
  group_mms_conversations: GroupMMSConversation_required,
@@ -3494,6 +3539,8 @@ export type ModelForName_required = {
3494
3539
  export type ClientModel_required = ModelForName_required[keyof ModelForName_required]
3495
3540
 
3496
3541
  export interface ModelForName_readonly {
3542
+ prescription_routes: PrescriptionRoute_readonly,
3543
+ blocked_phones: BlockedPhone_readonly,
3497
3544
  vital_configurations: VitalConfiguration_readonly,
3498
3545
  enduser_encounters: EnduserEncounter_readonly,
3499
3546
  enduser_orders: EnduserOrder_readonly,
@@ -3567,6 +3614,8 @@ export interface ModelForName_readonly {
3567
3614
  export type ClientModel_readonly = ModelForName_readonly[keyof ModelForName_readonly]
3568
3615
 
3569
3616
  export interface ModelForName_updatesDisabled {
3617
+ prescription_routes: PrescriptionRoute_updatesDisabled,
3618
+ blocked_phones: BlockedPhone_updatesDisabled,
3570
3619
  vital_configurations: VitalConfiguration_updatesDisabled,
3571
3620
  enduser_encounters: EnduserEncounter_updatesDisabled,
3572
3621
  enduser_orders: EnduserOrder_updatesDisabled,
@@ -3640,6 +3689,8 @@ export interface ModelForName_updatesDisabled {
3640
3689
  export type ClientModel_updatesDisabled = ModelForName_updatesDisabled[keyof ModelForName_updatesDisabled]
3641
3690
 
3642
3691
  export interface ModelForName extends ModelForName_required, ModelForName_readonly {
3692
+ prescription_routes: PrescriptionRoute,
3693
+ blocked_phones: BlockedPhone,
3643
3694
  vital_configurations: VitalConfiguration,
3644
3695
  enduser_encounters: EnduserEncounter,
3645
3696
  enduser_orders: EnduserOrder,
@@ -3723,6 +3774,8 @@ export interface UserActivityInfo {
3723
3774
  export type UserActivityStatus = 'Active' | 'Away' | 'Unavailable'
3724
3775
 
3725
3776
  export const modelNameChecker: { [K in ModelName] : true } = {
3777
+ prescription_routes: true,
3778
+ blocked_phones: true,
3726
3779
  vital_configurations: true,
3727
3780
  enduser_encounters: true,
3728
3781
  enduser_orders: true,