@tellescope/types-models 1.241.0 → 1.242.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
@@ -97,6 +97,10 @@ export type OrganizationLimit = 'endusersLimit'
97
97
  // [K in OrganizationLimit]?: number;
98
98
  // }
99
99
 
100
+ // DEA Schedule codes for controlled substances (ScriptSure MED_REF_DEA_CD)
101
+ // "0" = Non-Controlled, "2" = Schedule II, "3" = Schedule III, "4" = Schedule IV, "5" = Schedule V
102
+ export type ControlledSubstanceCode = "0" | "2" | "3" | "4" | "5"
103
+
100
104
  export type PortalSettings = {
101
105
  authentication?: {
102
106
  landingTitle?: string,
@@ -642,7 +646,8 @@ export type WeeklyAvailability = {
642
646
  monthlyRestriction?: MonthlyRestriction,
643
647
  }
644
648
  export type NotificationPreference = {
645
- email?: boolean
649
+ email?: boolean,
650
+ browser?: boolean,
646
651
  }
647
652
  export type AccountType = string
648
653
 
@@ -735,6 +740,7 @@ export interface User extends User_required, User_readonly, User_updatesDisabled
735
740
  iOSBadgeCount?: number,
736
741
  doseSpotUserId?: string,
737
742
  scriptSurePrescriberId?: string,
743
+ isScriptsureProvider?: boolean,
738
744
  url?: string,
739
745
  requiresMFAConfiguration?: boolean,
740
746
  templateFields?: LabeledField[]
@@ -1074,6 +1080,8 @@ export interface EnduserMedication extends EnduserMedication_readonly, EnduserMe
1074
1080
  // Compound-specific fields
1075
1081
  compoundQuantity?: number,
1076
1082
  compoundQuantityQualifier?: string,
1083
+ pharmacyNote?: string, // Note to pharmacy
1084
+ controlledSubstance?: ControlledSubstanceCode, // DEA schedule (MED_REF_DEA_CD)
1077
1085
  },
1078
1086
  }
1079
1087
 
@@ -5026,6 +5034,8 @@ export interface PrescriptionRoute extends PrescriptionRoute_readonly, Prescript
5026
5034
  compoundQuantity?: number, // e.g., 10
5027
5035
  compoundQuantityQualifier?: string, // NCPDP code e.g., "C64933" for Each
5028
5036
  sig?: string, // Directions/instructions for the prescription (e.g., "Take 1 tablet by mouth daily")
5037
+ pharmacyNote?: string, // Note to send to pharmacy
5038
+ controlledSubstance?: ControlledSubstanceCode, // DEA schedule code (maps to MED_REF_DEA_CD)
5029
5039
  }
5030
5040
 
5031
5041
  export interface FlowchartNote_readonly extends ClientRecord { }
@@ -5103,6 +5113,21 @@ export interface IntegrationLog_required {}
5103
5113
  export interface IntegrationLog_updatesDisabled {}
5104
5114
  export interface IntegrationLog extends IntegrationLog_readonly, IntegrationLog_required, IntegrationLog_updatesDisabled {}
5105
5115
 
5116
+ export type OrganizationPaymentStatus = "pending" | "completed" | "failed" | "refunded"
5117
+ export interface OrganizationPayment_readonly extends ClientRecord {
5118
+ amountInCents: number,
5119
+ type: string, // e.g. "ai_credits", "subscription"
5120
+ status: OrganizationPaymentStatus,
5121
+ stripePaymentIntentId: string,
5122
+ stripeCheckoutSessionId?: string,
5123
+ userId: string,
5124
+ title: string,
5125
+ data?: Indexable, // type-specific data, e.g. { creditsAdded: number } for ai_credits
5126
+ }
5127
+ export interface OrganizationPayment_required {}
5128
+ export interface OrganizationPayment_updatesDisabled {}
5129
+ export interface OrganizationPayment extends OrganizationPayment_readonly, OrganizationPayment_required, OrganizationPayment_updatesDisabled {}
5130
+
5106
5131
 
5107
5132
  export interface EnduserEligibilityResult_readonly extends ClientRecord {}
5108
5133
  export interface EnduserEligibilityResult_updatesDisabled {}
@@ -5205,6 +5230,7 @@ export interface InboxThread extends InboxThread_readonly, InboxThread_required,
5205
5230
  recentInboundEnduserId?: string,
5206
5231
  draftMessageIds?: string[],
5207
5232
  scheduledMessageIds?: string[],
5233
+ isDraftOnlyThread?: boolean, // Marker for threads created with only draft/scheduled messages, no sent messages yet
5208
5234
  }
5209
5235
 
5210
5236
  export type ModelForName_required = {
@@ -5214,6 +5240,7 @@ export type ModelForName_required = {
5214
5240
  agent_records: AgentRecord_required,
5215
5241
  enduser_eligibility_results: EnduserEligibilityResult_required,
5216
5242
  integration_logs: IntegrationLog_required,
5243
+ organization_payments: OrganizationPayment_required,
5217
5244
  allergy_codes: AllergyCode_required,
5218
5245
  diagnosis_codes: DiagnosisCode_required,
5219
5246
  suggested_contacts: SuggestedContact_required,
@@ -5308,6 +5335,7 @@ export interface ModelForName_readonly {
5308
5335
  agent_records: AgentRecord_readonly,
5309
5336
  enduser_eligibility_results: EnduserEligibilityResult_readonly,
5310
5337
  integration_logs: IntegrationLog_readonly,
5338
+ organization_payments: OrganizationPayment_readonly,
5311
5339
  allergy_codes: AllergyCode_readonly,
5312
5340
  diagnosis_codes: DiagnosisCode_readonly,
5313
5341
  suggested_contacts: SuggestedContact_readonly,
@@ -5402,6 +5430,7 @@ export interface ModelForName_updatesDisabled {
5402
5430
  agent_records: AgentRecord_updatesDisabled,
5403
5431
  enduser_eligibility_results: EnduserEligibilityResult_updatesDisabled,
5404
5432
  integration_logs: IntegrationLog_updatesDisabled,
5433
+ organization_payments: OrganizationPayment_updatesDisabled,
5405
5434
  allergy_codes: AllergyCode_updatesDisabled,
5406
5435
  diagnosis_codes: DiagnosisCode_updatesDisabled,
5407
5436
  suggested_contacts: SuggestedContact_updatesDisabled,
@@ -5496,6 +5525,7 @@ export interface ModelForName extends ModelForName_required, ModelForName_readon
5496
5525
  agent_records: AgentRecord,
5497
5526
  enduser_eligibility_results: EnduserEligibilityResult,
5498
5527
  integration_logs: IntegrationLog,
5528
+ organization_payments: OrganizationPayment,
5499
5529
  allergy_codes: AllergyCode,
5500
5530
  diagnosis_codes: DiagnosisCode,
5501
5531
  suggested_contacts: SuggestedContact,
@@ -5600,6 +5630,7 @@ export const modelNameChecker: { [K in ModelName] : true } = {
5600
5630
  agent_records: true,
5601
5631
  enduser_eligibility_results: true,
5602
5632
  integration_logs: true,
5633
+ organization_payments: true,
5603
5634
  allergy_codes: true,
5604
5635
  diagnosis_codes: true,
5605
5636
  suggested_contacts: true,