@tellescope/types-models 1.250.2 → 1.252.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 +42 -3
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.d.ts +42 -3
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/index.ts +53 -4
package/src/index.ts
CHANGED
|
@@ -541,6 +541,7 @@ export interface Organization extends Organization_readonly, Organization_requir
|
|
|
541
541
|
answersSyncToPortal?: { id: string, questions: string[] }[]
|
|
542
542
|
externalFormIdsToSync?: string[],
|
|
543
543
|
enforceMFA?: boolean,
|
|
544
|
+
accountSwitchingEnabled?: boolean, // opt-in: must be true for users in this org to participate in linked-account access (as either requester or target)
|
|
544
545
|
analyticsIframes?: {
|
|
545
546
|
title: string,
|
|
546
547
|
iframeURL: string,
|
|
@@ -571,6 +572,7 @@ export interface Organization extends Organization_readonly, Organization_requir
|
|
|
571
572
|
skipActivePatientBilling?: boolean,
|
|
572
573
|
portalV2SchemaURL?: string,
|
|
573
574
|
timeTrackingPrograms?: TimeTrackingProgram[],
|
|
575
|
+
belugaAutomationMappings?: BelugaAutomationMappingEntry[],
|
|
574
576
|
}
|
|
575
577
|
export type OrganizationTheme = {
|
|
576
578
|
name: string,
|
|
@@ -673,6 +675,11 @@ export interface UserSession extends Session, OrganizationLimits { // User joine
|
|
|
673
675
|
availablePhoneNumbers: string[],
|
|
674
676
|
availableFromEmails: string[],
|
|
675
677
|
isa?: boolean,
|
|
678
|
+
// When set, this session was created via account-switching. actorUserId is the user
|
|
679
|
+
// who initiated the switch (e.g. A switching into B → session.id = B, session.actorUserId = A).
|
|
680
|
+
actorUserId?: string,
|
|
681
|
+
actorEmail?: string,
|
|
682
|
+
actorBusinessId?: string,
|
|
676
683
|
}
|
|
677
684
|
|
|
678
685
|
export type StateCredentialInfo = {
|
|
@@ -722,6 +729,31 @@ export type UserCallRoutingBehavior = (
|
|
|
722
729
|
|
|
723
730
|
export type MFASettings = { email?: boolean }
|
|
724
731
|
|
|
732
|
+
export interface LinkedAccount {
|
|
733
|
+
id: string,
|
|
734
|
+
email: string,
|
|
735
|
+
orgName: string,
|
|
736
|
+
fname?: string,
|
|
737
|
+
lname?: string,
|
|
738
|
+
requiresMFA: boolean,
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
export type LinkedAccountAccessStatus = 'pending' | 'accepted'
|
|
742
|
+
|
|
743
|
+
export interface LinkedAccountAccessEntry {
|
|
744
|
+
userId: string,
|
|
745
|
+
email: string,
|
|
746
|
+
fname?: string,
|
|
747
|
+
lname?: string,
|
|
748
|
+
orgName?: string,
|
|
749
|
+
status: LinkedAccountAccessStatus,
|
|
750
|
+
createdAt: Date,
|
|
751
|
+
// Governs only the pending-request TTL. Once status flips to 'accepted',
|
|
752
|
+
// this field is preserved for audit but no longer gates anything; switching
|
|
753
|
+
// is permitted indefinitely until the owner revokes.
|
|
754
|
+
requestExpiresAt: Date,
|
|
755
|
+
}
|
|
756
|
+
|
|
725
757
|
export type LabeledField = { field: string, value: string }
|
|
726
758
|
|
|
727
759
|
export interface User_readonly extends ClientRecord {
|
|
@@ -810,6 +842,7 @@ export interface User extends User_required, User_readonly, User_updatesDisabled
|
|
|
810
842
|
dashboardView?: CustomDashboardView,
|
|
811
843
|
hideFromCalendarView?: boolean,
|
|
812
844
|
requireSSO?: string[],
|
|
845
|
+
linkedAccountAccess?: LinkedAccountAccessEntry[],
|
|
813
846
|
}
|
|
814
847
|
|
|
815
848
|
export type Preference = 'email' | 'sms' | 'call' | 'chat'
|
|
@@ -2127,6 +2160,7 @@ export interface Form extends Form_readonly, Form_required, Form_updatesDisabled
|
|
|
2127
2160
|
score: string,
|
|
2128
2161
|
externalId: string,
|
|
2129
2162
|
}[]
|
|
2163
|
+
syncAnswersAsHtml?: boolean,
|
|
2130
2164
|
hideAfterUnsubmittedInMS?: number,
|
|
2131
2165
|
hideFromCompose?: boolean,
|
|
2132
2166
|
hideFromBulkSubmission?: boolean,
|
|
@@ -2604,7 +2638,7 @@ export interface FormResponse extends FormResponse_readonly, FormResponse_requir
|
|
|
2604
2638
|
calendarEventId?: string,
|
|
2605
2639
|
copiedFrom?: string,
|
|
2606
2640
|
copiedFromEnduserId?: string,
|
|
2607
|
-
groupId?: string, // may be an automationStepId when created from Journey in push forms action
|
|
2641
|
+
groupId?: string, // may be an automationStepId when created from Journey in push forms action — intentional, so Canvas sibling lookup (canvas.ts) and the per-push completion detector can find the batch. The API resolves the real formGroupId from the automation step at trigger-detection time for "Form Group Completed" triggers.
|
|
2608
2642
|
groupInstance?: string,
|
|
2609
2643
|
groupPosition?: number,
|
|
2610
2644
|
utm?: LabeledField[],
|
|
@@ -3372,8 +3406,10 @@ export type BelugaAutoRxPatientPreferenceItem = {
|
|
|
3372
3406
|
medId: string,
|
|
3373
3407
|
}
|
|
3374
3408
|
export type BelugaAutoRxAutomationAction = AutomationActionBuilder<'belugaAutoRx', {
|
|
3375
|
-
|
|
3376
|
-
|
|
3409
|
+
formId: string,
|
|
3410
|
+
patientPreference?: BelugaAutoRxPatientPreferenceItem,
|
|
3411
|
+
pharmacyId?: string,
|
|
3412
|
+
useOrganizationMapping?: boolean,
|
|
3377
3413
|
}>
|
|
3378
3414
|
export type BelugaUpdateVisitPatientPreferenceItem = {
|
|
3379
3415
|
name: string,
|
|
@@ -3384,9 +3420,16 @@ export type BelugaUpdateVisitPatientPreferenceItem = {
|
|
|
3384
3420
|
medId: string,
|
|
3385
3421
|
}
|
|
3386
3422
|
export type BelugaUpdateVisitAutomationAction = AutomationActionBuilder<'belugaUpdateVisit', {
|
|
3423
|
+
formId: string,
|
|
3424
|
+
patientPreferences?: BelugaUpdateVisitPatientPreferenceItem[],
|
|
3425
|
+
pharmacyId?: string,
|
|
3426
|
+
useOrganizationMapping?: boolean,
|
|
3427
|
+
}>
|
|
3428
|
+
export type BelugaAutomationMappingEntry = {
|
|
3429
|
+
enduserCondition: Record<string, any>,
|
|
3387
3430
|
patientPreferences: BelugaUpdateVisitPatientPreferenceItem[],
|
|
3388
3431
|
pharmacyId: string,
|
|
3389
|
-
}
|
|
3432
|
+
}
|
|
3390
3433
|
export type SendChatAutomationAction = AutomationActionBuilder<'sendChat', {
|
|
3391
3434
|
templateId: string,
|
|
3392
3435
|
identifier: string,
|
|
@@ -3951,6 +3994,9 @@ export interface UserLog extends UserLog_readonly, UserLog_required, UserLog_upd
|
|
|
3951
3994
|
info?: Indexable,
|
|
3952
3995
|
enduserId?: string,
|
|
3953
3996
|
note?: string,
|
|
3997
|
+
// Set on logs emitted during a switched-in session; reflects the user who initiated the switch.
|
|
3998
|
+
// userId on the same row is the acted-as user (target). See UserSession.actorUserId.
|
|
3999
|
+
actorUserId?: string,
|
|
3954
4000
|
}
|
|
3955
4001
|
|
|
3956
4002
|
export interface EnduserTask_readonly extends ClientRecord {}
|
|
@@ -4807,6 +4853,9 @@ export type AutomationTriggerEvents = {
|
|
|
4807
4853
|
'Incoming Fax': AutomationTriggerEventBuilder<"Incoming Fax", {
|
|
4808
4854
|
senderFaxNumbers?: string[],
|
|
4809
4855
|
}, {}>,
|
|
4856
|
+
'Beluga Visit Sync Failed': AutomationTriggerEventBuilder<"Beluga Visit Sync Failed", {
|
|
4857
|
+
formIds?: string[],
|
|
4858
|
+
}, {}>,
|
|
4810
4859
|
}
|
|
4811
4860
|
export type AutomationTriggerEventType = keyof AutomationTriggerEvents
|
|
4812
4861
|
export type AutomationTriggerEvent = AutomationTriggerEvents[AutomationTriggerEventType]
|