@tellescope/types-models 1.85.2 → 1.86.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/lib/cjs/index.d.ts +48 -1
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +2 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.d.ts +48 -1
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +2 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/index.ts +49 -4
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,
|
|
@@ -303,6 +319,10 @@ export interface Organization extends Organization_readonly, Organization_requir
|
|
|
303
319
|
enduserProfileWebhooks?: BasicWebhook[],
|
|
304
320
|
showCommunity?: boolean,
|
|
305
321
|
phoneLabels?: { number: string, label: string }[];
|
|
322
|
+
mfaxAccountId?: string,
|
|
323
|
+
athenaFieldsSync?: FieldSync[]
|
|
324
|
+
athenaSubscriptions?: AthenaSubscription[],
|
|
325
|
+
fieldsToAdminNote?: string[],
|
|
306
326
|
// _AIEnabled?: boolean,
|
|
307
327
|
}
|
|
308
328
|
export type OrganizationTheme = {
|
|
@@ -1086,7 +1106,7 @@ export interface File extends File_readonly, File_required, File_updatesDisabled
|
|
|
1086
1106
|
}
|
|
1087
1107
|
|
|
1088
1108
|
|
|
1089
|
-
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 | '' }
|
|
1090
1110
|
export type TicketActions = {
|
|
1091
1111
|
"Complete Form": TicketActionBuilder<'Complete Form', { formId: string, formResponseId?: string }>,
|
|
1092
1112
|
"Create Prescription": TicketActionBuilder<'Create Prescription', { }>,
|
|
@@ -1284,7 +1304,10 @@ export type FormFieldOptions = FormFieldValidation & {
|
|
|
1284
1304
|
customPriceMessage?: string,
|
|
1285
1305
|
billingProvider?: 'Canvas' | "Candid" | string,
|
|
1286
1306
|
bookingPageId?: string,
|
|
1287
|
-
userTags?: string[],
|
|
1307
|
+
userTags?: string[], // for user(s) selection by tags
|
|
1308
|
+
userFilterTags?: string[],
|
|
1309
|
+
|
|
1310
|
+
requirePredefinedInsurer?: boolean,
|
|
1288
1311
|
addressFields?: string[], // supports specifying just 'state', for now
|
|
1289
1312
|
autoAdvance?: boolean,
|
|
1290
1313
|
prefillSignature?: boolean,
|
|
@@ -1424,6 +1447,7 @@ export interface Integration_required {}
|
|
|
1424
1447
|
export interface Integration_updatesDisabled {}
|
|
1425
1448
|
export interface Integration extends Integration_readonly, Integration_required, Integration_updatesDisabled {
|
|
1426
1449
|
title: string,
|
|
1450
|
+
tenantId?: string, // e.g. for athena health practice id which doesn't fit in authentication
|
|
1427
1451
|
authentication: IntegrationAuthentication,
|
|
1428
1452
|
emailDisabled?: boolean,
|
|
1429
1453
|
syncUnrecognizedSenders?: boolean,
|
|
@@ -2225,6 +2249,7 @@ export type SmartMeterPlaceOrderAutomationAction = AutomationActionBuilder<'smar
|
|
|
2225
2249
|
shipping?: string,
|
|
2226
2250
|
}>
|
|
2227
2251
|
export type HealthieSyncAutomationAction = AutomationActionBuilder<'healthieSync', {}>
|
|
2252
|
+
export type CompleteTicketsAutomationAction = AutomationActionBuilder<'completeTickets', { journeyIds?: string[] }>
|
|
2228
2253
|
|
|
2229
2254
|
export type IterableFieldsMapping = {
|
|
2230
2255
|
iterable: string,
|
|
@@ -2277,6 +2302,7 @@ export type AutomationActionForType = {
|
|
|
2277
2302
|
'pagerDutyCreateIncident': PagerDutyCreateIncidentAutomationAction,
|
|
2278
2303
|
'smartMeterPlaceOrder': SmartMeterPlaceOrderAutomationAction,
|
|
2279
2304
|
'healthieSync': HealthieSyncAutomationAction,
|
|
2305
|
+
'completeTickets': CompleteTicketsAutomationAction,
|
|
2280
2306
|
}
|
|
2281
2307
|
export type AutomationActionType = keyof AutomationActionForType
|
|
2282
2308
|
export type AutomationAction = AutomationActionForType[AutomationActionType]
|
|
@@ -2346,7 +2372,9 @@ export interface EnduserObservation extends EnduserObservation_readonly, Enduser
|
|
|
2346
2372
|
references?: RelatedRecord[],
|
|
2347
2373
|
reviewedAt?: Date,
|
|
2348
2374
|
reviewedBy?: string,
|
|
2375
|
+
statusChangedBy?: string, // when updating code (e.g. to cancelled or entered-in-error), track who made that change
|
|
2349
2376
|
classifications?: { configurationId: string, classification: string }[]
|
|
2377
|
+
beforeMeal?: boolean,
|
|
2350
2378
|
}
|
|
2351
2379
|
|
|
2352
2380
|
export type BlockType = 'h1' | 'h2' | 'html' | 'image' | 'youtube' | 'pdf' | 'iframe'
|
|
@@ -3036,6 +3064,10 @@ export type AutomationTriggerEvents = {
|
|
|
3036
3064
|
classifications: string[],
|
|
3037
3065
|
}, {}>,
|
|
3038
3066
|
'SMS Reply': AutomationTriggerEventBuilder<"SMS Reply", { templateIds: string[], replyKeywords?: string[] }, {}>,
|
|
3067
|
+
'Order Status Equals': AutomationTriggerEventBuilder<"Order Status Equals", {
|
|
3068
|
+
source: string,
|
|
3069
|
+
status: string
|
|
3070
|
+
}, { }>,
|
|
3039
3071
|
}
|
|
3040
3072
|
export type AutomationTriggerEventType = keyof AutomationTriggerEvents
|
|
3041
3073
|
export type AutomationTriggerEvent = AutomationTriggerEvents[AutomationTriggerEventType]
|
|
@@ -3413,8 +3445,16 @@ export interface VitalConfiguration extends VitalConfiguration_readonly, VitalCo
|
|
|
3413
3445
|
ranges: VitalConfigurationRange[],
|
|
3414
3446
|
}
|
|
3415
3447
|
|
|
3448
|
+
export interface BlockedPhone_readonly extends ClientRecord { }
|
|
3449
|
+
export interface BlockedPhone_required {}
|
|
3450
|
+
export interface BlockedPhone_updatesDisabled {}
|
|
3451
|
+
export interface BlockedPhone extends BlockedPhone_readonly, BlockedPhone_required, BlockedPhone_updatesDisabled {
|
|
3452
|
+
phone: string,
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3416
3455
|
export type ModelForName_required = {
|
|
3417
3456
|
vital_configurations: VitalConfiguration_required,
|
|
3457
|
+
blocked_phones: BlockedPhone_required,
|
|
3418
3458
|
enduser_encounters: EnduserEncounter_required,
|
|
3419
3459
|
enduser_orders: EnduserOrder_required,
|
|
3420
3460
|
group_mms_conversations: GroupMMSConversation_required,
|
|
@@ -3487,6 +3527,7 @@ export type ModelForName_required = {
|
|
|
3487
3527
|
export type ClientModel_required = ModelForName_required[keyof ModelForName_required]
|
|
3488
3528
|
|
|
3489
3529
|
export interface ModelForName_readonly {
|
|
3530
|
+
blocked_phones: BlockedPhone_readonly,
|
|
3490
3531
|
vital_configurations: VitalConfiguration_readonly,
|
|
3491
3532
|
enduser_encounters: EnduserEncounter_readonly,
|
|
3492
3533
|
enduser_orders: EnduserOrder_readonly,
|
|
@@ -3560,6 +3601,7 @@ export interface ModelForName_readonly {
|
|
|
3560
3601
|
export type ClientModel_readonly = ModelForName_readonly[keyof ModelForName_readonly]
|
|
3561
3602
|
|
|
3562
3603
|
export interface ModelForName_updatesDisabled {
|
|
3604
|
+
blocked_phones: BlockedPhone_updatesDisabled,
|
|
3563
3605
|
vital_configurations: VitalConfiguration_updatesDisabled,
|
|
3564
3606
|
enduser_encounters: EnduserEncounter_updatesDisabled,
|
|
3565
3607
|
enduser_orders: EnduserOrder_updatesDisabled,
|
|
@@ -3633,6 +3675,7 @@ export interface ModelForName_updatesDisabled {
|
|
|
3633
3675
|
export type ClientModel_updatesDisabled = ModelForName_updatesDisabled[keyof ModelForName_updatesDisabled]
|
|
3634
3676
|
|
|
3635
3677
|
export interface ModelForName extends ModelForName_required, ModelForName_readonly {
|
|
3678
|
+
blocked_phones: BlockedPhone,
|
|
3636
3679
|
vital_configurations: VitalConfiguration,
|
|
3637
3680
|
enduser_encounters: EnduserEncounter,
|
|
3638
3681
|
enduser_orders: EnduserOrder,
|
|
@@ -3716,6 +3759,7 @@ export interface UserActivityInfo {
|
|
|
3716
3759
|
export type UserActivityStatus = 'Active' | 'Away' | 'Unavailable'
|
|
3717
3760
|
|
|
3718
3761
|
export const modelNameChecker: { [K in ModelName] : true } = {
|
|
3762
|
+
blocked_phones: true,
|
|
3719
3763
|
vital_configurations: true,
|
|
3720
3764
|
enduser_encounters: true,
|
|
3721
3765
|
enduser_orders: true,
|
|
@@ -3810,6 +3854,7 @@ export type JourneyContext = {
|
|
|
3810
3854
|
formResponseId?: string,
|
|
3811
3855
|
purchaseId?: string,
|
|
3812
3856
|
templateId?: string,
|
|
3857
|
+
orderId?: string,
|
|
3813
3858
|
}
|
|
3814
3859
|
|
|
3815
3860
|
// https://gist.github.com/aviflax/a4093965be1cd008f172/
|