@tellescope/types-models 1.219.0 → 1.221.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
@@ -17,7 +17,8 @@ export type StripeCheckoutInfo = {
17
17
  businessName: string
18
18
  }
19
19
 
20
- export type SortBy = 'updatedAt' | 'dueDateInMS' | 'closedAt'
20
+ export type SortBy = 'updatedAt' | 'dueDateInMS' | 'closedAt' | 'timestamp'
21
+ export const SORT_BY_OPTIONS: SortBy[] = ['updatedAt', 'dueDateInMS', 'closedAt', 'timestamp']
21
22
 
22
23
  export type AccessType = "All" | "Default" | "Assigned" | null
23
24
  export type AccessAction = "create" | "read" | "update" | "delete"
@@ -340,6 +341,8 @@ export interface Organization_updatesDisabled {
340
341
  subdomain: string;
341
342
  }
342
343
  export interface Organization extends Organization_readonly, Organization_required, Organization_updatesDisabled {
344
+ inboxThreadsBuiltFrom?: Date | '',
345
+ inboxThreadsBuiltTo?: Date | '',
343
346
  bedrockAIAllowed?: boolean,
344
347
  subdomains?: string[],
345
348
  owner?: string,
@@ -1262,9 +1265,7 @@ export type ChatRoomType = 'internal' | 'external' | 'Group Chat'
1262
1265
  export interface ChatRoom_readonly extends ClientRecord {
1263
1266
  recentMessage?: string,
1264
1267
  recentEnduserMessage?: string,
1265
- recentEnduserMessageSentAt?: number,
1266
1268
  recentSender?: string,
1267
- recentMessageSentAt?: number,
1268
1269
  numMessages: number,
1269
1270
  }
1270
1271
  export type ChatRoomUserInfo = {
@@ -1274,6 +1275,8 @@ export type ChatRoomUserInfo = {
1274
1275
  export interface ChatRoom_required {}
1275
1276
  export interface ChatRoom_updatesDisabled {}
1276
1277
  export interface ChatRoom extends ChatRoom_readonly, ChatRoom_required, ChatRoom_updatesDisabled {
1278
+ recentMessageSentAt?: number,
1279
+ recentEnduserMessageSentAt?: number,
1277
1280
  markedUnreadForAll?: boolean,
1278
1281
  inboxStatus?: string,
1279
1282
  description?: string;
@@ -1831,6 +1834,7 @@ export interface Form extends Form_readonly, Form_required, Form_updatesDisabled
1831
1834
  matchCareTeamTagsForCanvasPractitionerResolution?: ListOfStringsWithQualifier,
1832
1835
  dontSyncToCanvasOnSubmission?: boolean,
1833
1836
  belugaVisitType?: string,
1837
+ showByUserTags?: string[],
1834
1838
  }
1835
1839
 
1836
1840
  export interface FormGroup_readonly extends ClientRecord {}
@@ -3033,6 +3037,7 @@ export type CallUserAutomationAction = AutomationActionBuilder<
3033
3037
  export type StripeChargeCardOnFileAutomationAction = AutomationActionBuilder<'stripeChargeCardOnFile', {
3034
3038
  stripeKey?: string, // indicating custom vs. stripe connect
3035
3039
  priceIds: string[], // Stripe price ids to charge
3040
+ subscriptionPriceId?: string
3036
3041
  }>
3037
3042
 
3038
3043
  export type AIContextSource = {
@@ -3177,6 +3182,7 @@ export interface EnduserObservation extends EnduserObservation_readonly, Enduser
3177
3182
  statusChangedBy?: string, // when updating code (e.g. to cancelled or entered-in-error), track who made that change
3178
3183
  classifications?: { configurationId: string, classification: string }[]
3179
3184
  beforeMeal?: boolean,
3185
+ medStatus?: string,
3180
3186
  timestampIsEstimated?: boolean,
3181
3187
  dontTrigger?: boolean,
3182
3188
  showWithPlotsByUnit?: string[],
@@ -4757,7 +4763,31 @@ export interface AIConversation_required {
4757
4763
  export interface AIConversation_updatesDisabled {}
4758
4764
  export interface AIConversation extends AIConversation_readonly, AIConversation_required, AIConversation_updatesDisabled {}
4759
4765
 
4766
+ export interface InboxThread_readonly extends ClientRecord {}
4767
+ export interface InboxThread_required {
4768
+ type: "Email" | "SMS" | "Chat" | "GroupMMS" | "Phone",
4769
+ title: string,
4770
+ preview: string,
4771
+ timestamp: Date,
4772
+ assignedTo: string[],
4773
+ userIds: string[], // supporting Default access
4774
+ enduserIds: string[], // supporting Assigned access and filtering by enduserId, finding care team(s) when assignedTo is empty
4775
+ inboxStatus: string,
4776
+ threadId: string, // unique identifier for thread
4777
+ }
4778
+ export interface InboxThread_updatesDisabled {}
4779
+ export interface InboxThread extends InboxThread_readonly, InboxThread_required, InboxThread_updatesDisabled {
4780
+ tags?: string[],
4781
+ phoneNumber?: string,
4782
+ enduserPhoneNumber?: string,
4783
+ emailMessageId?: string | null,
4784
+ readBy?: { [index: string] : Date | '' };
4785
+ outboundTimestamp?: Date | '',
4786
+ outboundPreview?: string,
4787
+ }
4788
+
4760
4789
  export type ModelForName_required = {
4790
+ inbox_threads: InboxThread_required,
4761
4791
  ai_conversations: AIConversation_required,
4762
4792
  waitlists: Waitlist_required,
4763
4793
  agent_records: AgentRecord_required,
@@ -4849,6 +4879,7 @@ export type ModelForName_required = {
4849
4879
  export type ClientModel_required = ModelForName_required[keyof ModelForName_required]
4850
4880
 
4851
4881
  export interface ModelForName_readonly {
4882
+ inbox_threads: InboxThread_readonly,
4852
4883
  ai_conversations: AIConversation_readonly,
4853
4884
  waitlists: Waitlist_readonly,
4854
4885
  agent_records: AgentRecord_readonly,
@@ -4940,6 +4971,7 @@ export interface ModelForName_readonly {
4940
4971
  export type ClientModel_readonly = ModelForName_readonly[keyof ModelForName_readonly]
4941
4972
 
4942
4973
  export interface ModelForName_updatesDisabled {
4974
+ inbox_threads: InboxThread_updatesDisabled,
4943
4975
  ai_conversations: AIConversation_updatesDisabled,
4944
4976
  waitlists: Waitlist_updatesDisabled,
4945
4977
  agent_records: AgentRecord_updatesDisabled,
@@ -5031,6 +5063,7 @@ export interface ModelForName_updatesDisabled {
5031
5063
  export type ClientModel_updatesDisabled = ModelForName_updatesDisabled[keyof ModelForName_updatesDisabled]
5032
5064
 
5033
5065
  export interface ModelForName extends ModelForName_required, ModelForName_readonly {
5066
+ inbox_threads: InboxThread,
5034
5067
  ai_conversations: AIConversation,
5035
5068
  waitlists: Waitlist,
5036
5069
  agent_records: AgentRecord,
@@ -5132,6 +5165,7 @@ export interface UserActivityInfo {
5132
5165
  export type UserActivityStatus = 'Active' | 'Away' | 'Unavailable'
5133
5166
 
5134
5167
  export const modelNameChecker: { [K in ModelName] : true } = {
5168
+ inbox_threads: true,
5135
5169
  ai_conversations: true,
5136
5170
  waitlists: true,
5137
5171
  agent_records: true,