@tellescope/types-models 1.247.0 → 1.249.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
@@ -336,6 +336,8 @@ export type BasicWebhook = {
336
336
  export type TimeTrackingBillingCode = {
337
337
  billingCode: string,
338
338
  timeInMinutes: number,
339
+ repeatable?: boolean,
340
+ feeCents?: number,
339
341
  }
340
342
  export type TimeTrackingProgramForm = {
341
343
  id: string,
@@ -344,6 +346,7 @@ export type TimeTrackingProgram = {
344
346
  title: string,
345
347
  billingCodes: TimeTrackingBillingCode[],
346
348
  forms?: TimeTrackingProgramForm[],
349
+ summaryFormId?: string,
347
350
  }
348
351
 
349
352
  export type SyncDirection = "Bidirectional" | "From Tellescope" | "To Tellescope"
@@ -470,6 +473,7 @@ export interface Organization extends Organization_readonly, Organization_requir
470
473
  hasConnectedZus?: boolean,
471
474
  hasConnectedCanvas?: boolean,
472
475
  canvasURL?: string,
476
+ healthiePortalURL?: string,
473
477
  hasConnectedCandid?: boolean,
474
478
  hasConnectedGoGoMeds?: boolean,
475
479
  hasScriptSure?: boolean,
@@ -514,6 +518,8 @@ export interface Organization extends Organization_readonly, Organization_requir
514
518
  showCommunity?: boolean,
515
519
  phoneLabels?: { number: string, label: string }[];
516
520
  faxDestinations?: { label: string, number: string }[],
521
+ faxCoverPageEnabled?: boolean,
522
+ faxCoverPageId?: string,
517
523
  mfaxAccountId?: string,
518
524
  athenaFieldsSync?: AthenaFieldSync[]
519
525
  athenaSubscriptions?: AthenaSubscription[],
@@ -651,7 +657,8 @@ export interface UserSession extends Session, OrganizationLimits { // User joine
651
657
  verifiedEmail: boolean;
652
658
  wasAutomated: boolean;
653
659
  limits?: OrganizationLimits,
654
- uiRestrictions?: UserUIRestrictions
660
+ uiRestrictions?: UserUIRestrictions,
661
+ fieldRedactions?: UserFieldRedactions,
655
662
  dashboardView?: CustomDashboardView,
656
663
  hasTicketQueues?: boolean,
657
664
  eat?: boolean, // enableAccessTags
@@ -912,6 +919,17 @@ export type EnduserInsurance = {
912
919
  groupNumber?: string,
913
920
  planName?: string,
914
921
  startDate?: string,
922
+ // Insurance authorization fields
923
+ authorizationStartDate?: string, // Healthie InsuranceAuthorization.start_on
924
+ authorizationEndDate?: string, // Healthie InsuranceAuthorization.end_on
925
+ track?: string, // Healthie InsuranceAuthorization.unit_type (units/visits/hours)
926
+ visitsAuthorized?: number, // Healthie InsuranceAuthorization.visits_authorized
927
+ visitsUsed?: number, // Healthie InsuranceAuthorization.visits_used
928
+ procedureCodes?: string[], // Healthie Policy.cpt_codes_policies[].code
929
+ diagnosisCodes?: string[], // Healthie Policy.icd_codes_policies[].code
930
+ // Internal Healthie sync fields
931
+ healthieAuthorizationId?: string, // Healthie InsuranceAuthorization ID
932
+ healthiePolicyId?: string, // Healthie Policy ID (links auth + codes to policy)
915
933
  }
916
934
 
917
935
  export type Pharmacy = {
@@ -964,11 +982,12 @@ export interface Enduser_readonly extends UserActivityInfo, ClientRecord, Enduse
964
982
  mergedIds?: string[],
965
983
  _updateKey?: string,
966
984
  passwordLastChangedAt?: Date,
967
- }
985
+ }
968
986
  export interface Enduser_required {}
969
987
  export interface Enduser_updatesDisabled {
970
988
  }
971
989
  export interface Enduser extends Enduser_readonly, Enduser_required, Enduser_updatesDisabled {
990
+ invalidateSessionsBefore?: Date,
972
991
  references?: RelatedRecord[],
973
992
  recentViewers?: RecentViewer[],
974
993
  healthie_dietitian_id?: string,
@@ -1068,6 +1087,7 @@ export interface EnduserCustomType_updatesDisabled {}
1068
1087
  export interface EnduserCustomType extends EnduserCustomType_readonly, EnduserCustomType_required, EnduserCustomType_updatesDisabled {
1069
1088
  builtinFields?: EnduserBuiltInField[];
1070
1089
  customFields?: CustomEnduserField[];
1090
+ createEnduserForms?: string[];
1071
1091
  }
1072
1092
 
1073
1093
  export interface EnduserStatusUpdate_readonly extends ClientRecord {}
@@ -1138,8 +1158,9 @@ export interface EnduserMedication extends EnduserMedication_readonly, EnduserMe
1138
1158
  },
1139
1159
  }
1140
1160
 
1141
- export interface APIKey_readonly extends ClientRecord {
1161
+ export interface APIKey_readonly extends ClientRecord {
1142
1162
  hashedKey: string, // stored as hash
1163
+ approvedBusinessIds?: string[], // org IDs this key can target via header
1143
1164
  }
1144
1165
  export interface APIKey_required {}
1145
1166
  export interface APIKey_updatesDisabled {}
@@ -2088,6 +2109,8 @@ export interface Form extends Form_readonly, Form_required, Form_updatesDisabled
2088
2109
  version?: 'v1' | 'v2',
2089
2110
  mdiCaseOfferings?: { offering_id: string }[],
2090
2111
  autoMergeOnSubmission?: boolean,
2112
+ procedureCodes?: FormResponseProcedureCode[],
2113
+ diagnosisCodes?: FormResponseDiagnosisCode[],
2091
2114
  }
2092
2115
 
2093
2116
  export interface FormGroup_readonly extends ClientRecord {}
@@ -2132,6 +2155,12 @@ export interface Integration_readonly extends ClientRecord {
2132
2155
  }
2133
2156
  export interface Integration_required {}
2134
2157
  export interface Integration_updatesDisabled {}
2158
+ /**
2159
+ * IMPORTANT: When adding new non-sensitive, user-configurable fields to this interface,
2160
+ * also add them to INTEGRATION_SETTINGS_ALLOWLIST in packages/private/api/api/v1/api.ts
2161
+ * so they can be updated via the update_settings endpoint.
2162
+ * Do NOT add sensitive fields (credentials, tokens, secrets) to the allowlist.
2163
+ */
2135
2164
  export interface Integration extends Integration_readonly, Integration_required, Integration_updatesDisabled {
2136
2165
  title: string,
2137
2166
  tenantId?: string, // e.g. for athena health practice id which doesn't fit in authentication
@@ -2306,6 +2335,7 @@ export type BelugaPatientPreferenceResponse = {
2306
2335
  }
2307
2336
 
2308
2337
  export type BelugaPharmacyMapping = {
2338
+ title?: string,
2309
2339
  pharmacyId: string,
2310
2340
  patientPreference: string, // stringified JSON — resilient to field changes
2311
2341
  conditions: CompoundFilter<string>,
@@ -2313,7 +2343,7 @@ export type BelugaPharmacyMapping = {
2313
2343
 
2314
2344
  export type FormResponseAnswerTable = FormResponseValueAnswerBuilder<'Table Input', TableInputCell[][]>
2315
2345
  export type FormResponseAnswerGroup = FormResponseValueAnswerBuilder<'Question Group', FormSubField[]>
2316
- export type FormResponseAnswerDescription = FormResponseValueAnswerBuilder<'description', ''>
2346
+ export type FormResponseAnswerDescription = FormResponseValueAnswerBuilder<'description', string>
2317
2347
  export type FormResponseAnswerEmail = FormResponseValueAnswerBuilder<'email', string>
2318
2348
  export type FormResponseAnswerNumber = FormResponseValueAnswerBuilder<'number', number>
2319
2349
  export type FormResponseAnswerPhone = FormResponseValueAnswerBuilder<'phone', string>
@@ -2571,6 +2601,8 @@ export interface FormResponse extends FormResponse_readonly, FormResponse_requir
2571
2601
  timestamp: Date,
2572
2602
  }[],
2573
2603
  startedViaPinnedForm?: boolean,
2604
+ procedureCodes?: FormResponseProcedureCode[],
2605
+ diagnosisCodes?: FormResponseDiagnosisCode[],
2574
2606
  }
2575
2607
 
2576
2608
  export interface WebHook_readonly extends ClientRecord {}
@@ -3431,6 +3463,7 @@ export type ChargebeeChargeCardOnFileAutomationAction = AutomationActionBuilder<
3431
3463
  chargeType: 'One-Time' | 'Subscription', // Branching between one-time invoice vs subscription
3432
3464
  itemPriceId: string, // Chargebee item_price_id
3433
3465
  quantity?: number, // Quantity (default 1)
3466
+ couponIds?: string[], // Chargebee coupon IDs to apply
3434
3467
  }>
3435
3468
 
3436
3469
  export type AIContextSource = {
@@ -3927,6 +3960,8 @@ export interface CarePlan extends CarePlan_readonly, CarePlan_required, CarePlan
3927
3960
  }
3928
3961
 
3929
3962
  export type TypedField = { type?: string, field?: string, }
3963
+ export type UserFieldRedactions = { [modelName: string]: string[] }
3964
+
3930
3965
  export type UserUIRestrictions = {
3931
3966
  hideDashboard?: boolean,
3932
3967
  hideInbox?: boolean,
@@ -3946,6 +3981,10 @@ export type UserUIRestrictions = {
3946
3981
  visibleIntegrations?: string[],
3947
3982
  hideViewPortalAsEnduser?: boolean,
3948
3983
  hideEnduserNote?: boolean,
3984
+ disableTimeTrackApproval?: boolean,
3985
+ hideCalendarUserSelector?: boolean,
3986
+ hideCalendarSavedViews?: boolean,
3987
+ hideCalendarFilters?: boolean,
3949
3988
  }
3950
3989
 
3951
3990
  export interface RoleBasedAccessPermission_readonly extends ClientRecord {}
@@ -3953,6 +3992,7 @@ export interface RoleBasedAccessPermission_required {
3953
3992
  role: string,
3954
3993
  permissions: Partial<AccessPermissions>,
3955
3994
  uiRestrictions?: UserUIRestrictions,
3995
+ fieldRedactions?: UserFieldRedactions,
3956
3996
  }
3957
3997
  export interface RoleBasedAccessPermission_updatesDisabled {}
3958
3998
  export interface RoleBasedAccessPermission extends RoleBasedAccessPermission_readonly, RoleBasedAccessPermission_required, RoleBasedAccessPermission_updatesDisabled {}
@@ -4187,7 +4227,10 @@ export type AnalyticsQueryFilterForType = {
4187
4227
  },
4188
4228
  Orders: { },
4189
4229
  "Chat Rooms": { },
4190
- "Chats": { },
4230
+ "Chats": {
4231
+ direction?: string,
4232
+ "Chat Tags"?: ListOfStringsWithQualifier,
4233
+ },
4191
4234
  }
4192
4235
 
4193
4236
  export type EnduserGrouping = {
@@ -4239,7 +4282,9 @@ export type AnalyticsQueryGroupingForType = {
4239
4282
  "Meetings": { Host?: boolean },
4240
4283
  "Orders": {} & EnduserGrouping & { Enduser: string },
4241
4284
  "Chat Rooms": {} & EnduserGrouping & { Enduser: string },
4242
- "Chats": {} & EnduserGrouping & { Enduser: string },
4285
+ "Chats": {
4286
+ "Chat Tags"?: boolean,
4287
+ } & EnduserGrouping & { Enduser: string },
4243
4288
  }
4244
4289
 
4245
4290
  type DefaultRangeKey = 'Created At' | 'Updated At'
@@ -4619,12 +4664,13 @@ export type AutomationTriggerAction = AutomationTriggerActions[AutomationTrigger
4619
4664
  export type AutomationTriggerEventBuilder <T, I, C> = { type: T, info: I, conditions?: C }
4620
4665
 
4621
4666
  export type AutomationTriggerEvents = {
4622
- 'Form Submitted': AutomationTriggerEventBuilder<"Form Submitted", {
4623
- formId: string,
4667
+ 'Form Submitted': AutomationTriggerEventBuilder<"Form Submitted", {
4668
+ formId: string,
4624
4669
  otherFormIds?: string[],
4625
- submitterType?: SessionType | 'Anyone',
4670
+ submitterType?: SessionType | 'Anyone',
4626
4671
  publicIdentifier?: string,
4627
4672
  hasExpiredEvent?: boolean,
4673
+ conditionsByFormId?: Record<string, any>,
4628
4674
  }, {}>,
4629
4675
  'Form Unsubmitted': AutomationTriggerEventBuilder<"Form Unsubmitted", { formId: string, intervalInMS: number }, {}>,
4630
4676
  'Purchase Made': AutomationTriggerEventBuilder<"Purchase Made", { titles?: string[], productIds?: string[], titlePartialMatches?: string[] }, {}>,
@@ -4667,14 +4713,15 @@ export type AutomationTriggerEvents = {
4667
4713
  ignoreDelayedReadings?: boolean,
4668
4714
  }, {}>,
4669
4715
  'SMS Reply': AutomationTriggerEventBuilder<"SMS Reply", { templateIds: string[], replyKeywords?: string[] }, {}>,
4670
- 'Order Status Equals': AutomationTriggerEventBuilder<"Order Status Equals", {
4671
- source: string,
4716
+ 'Order Status Equals': AutomationTriggerEventBuilder<"Order Status Equals", {
4717
+ source: string,
4672
4718
  status: string,
4673
4719
  fills?: string[],
4674
4720
  skus?: string[],
4675
4721
  skuPartials?: string[],
4676
4722
  titlePartials?: string[],
4677
4723
  titlePartialsAnd?: string[],
4724
+ protocols?: string[],
4678
4725
  }, { }>,
4679
4726
  'Missed Call': AutomationTriggerEventBuilder<"Missed Call", {
4680
4727
  phoneNumbers?: string[],
@@ -4780,6 +4827,18 @@ export type SuperbillLineItem = {
4780
4827
  diagnosisCodes?: string[],
4781
4828
  }
4782
4829
 
4830
+ export type FormResponseProcedureCode = {
4831
+ code: string,
4832
+ units: number, // CMS1500 Box 24G — number of units billed for this code (matches Healthie's `units` field)
4833
+ feeCents?: number, // CMS1500 Box 24F — line-item charge in cents
4834
+ modifiers?: string[],
4835
+ }
4836
+
4837
+ export type FormResponseDiagnosisCode = {
4838
+ code: string,
4839
+ description?: string,
4840
+ }
4841
+
4783
4842
  export type SuperbillPatientInfo = {
4784
4843
  name: string
4785
4844
  dateOfBirth: string,
@@ -5071,6 +5130,7 @@ export interface EnduserOrder extends EnduserOrder_readonly, EnduserOrder_requir
5071
5130
  cancellationReason?: string,
5072
5131
  medication?: string,
5073
5132
  medicationSku?: string,
5133
+ protocol?: string,
5074
5134
  }
5075
5135
 
5076
5136
  export interface EnduserProblem_readonly extends ClientRecord {}