@tellescope/types-models 1.220.0 → 1.222.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;
@@ -1762,6 +1765,7 @@ export type FormCustomization = {
1762
1765
  multiPagePublicQuestions?: boolean,
1763
1766
  hideBg?: boolean,
1764
1767
  portalShowThanksAfterSubmission?: boolean,
1768
+ maxWidth?: number,
1765
1769
  }
1766
1770
  export interface Form_readonly extends ClientRecord {
1767
1771
  numFields: number,
@@ -1831,6 +1835,7 @@ export interface Form extends Form_readonly, Form_required, Form_updatesDisabled
1831
1835
  matchCareTeamTagsForCanvasPractitionerResolution?: ListOfStringsWithQualifier,
1832
1836
  dontSyncToCanvasOnSubmission?: boolean,
1833
1837
  belugaVisitType?: string,
1838
+ showByUserTags?: string[],
1834
1839
  }
1835
1840
 
1836
1841
  export interface FormGroup_readonly extends ClientRecord {}
@@ -3178,6 +3183,7 @@ export interface EnduserObservation extends EnduserObservation_readonly, Enduser
3178
3183
  statusChangedBy?: string, // when updating code (e.g. to cancelled or entered-in-error), track who made that change
3179
3184
  classifications?: { configurationId: string, classification: string }[]
3180
3185
  beforeMeal?: boolean,
3186
+ medStatus?: string,
3181
3187
  timestampIsEstimated?: boolean,
3182
3188
  dontTrigger?: boolean,
3183
3189
  showWithPlotsByUnit?: string[],
@@ -3887,6 +3893,11 @@ export type AnalyticsQueryOptions = {
3887
3893
  groupByCareTeam?: boolean, // supports multi-grouping for both care team and a normal field
3888
3894
  }
3889
3895
 
3896
+ export type AnalyticsAggregationRequest = {
3897
+ modelName: string,
3898
+ aggregation: any[],
3899
+ }
3900
+
3890
3901
  export type AnalyticsFrameGroupingCategory = {
3891
3902
  category: string,
3892
3903
  keys: string[],
@@ -4088,6 +4099,7 @@ export type AutomationTriggerEvents = {
4088
4099
  'Vital Update': AutomationTriggerEventBuilder<"Vital Update", {
4089
4100
  configurationIds: string[],
4090
4101
  classifications: string[],
4102
+ ignoreDelayedReadings?: boolean,
4091
4103
  }, {}>,
4092
4104
  'SMS Reply': AutomationTriggerEventBuilder<"SMS Reply", { templateIds: string[], replyKeywords?: string[] }, {}>,
4093
4105
  'Order Status Equals': AutomationTriggerEventBuilder<"Order Status Equals", {
@@ -4758,7 +4770,31 @@ export interface AIConversation_required {
4758
4770
  export interface AIConversation_updatesDisabled {}
4759
4771
  export interface AIConversation extends AIConversation_readonly, AIConversation_required, AIConversation_updatesDisabled {}
4760
4772
 
4773
+ export interface InboxThread_readonly extends ClientRecord {}
4774
+ export interface InboxThread_required {
4775
+ type: "Email" | "SMS" | "Chat" | "GroupMMS" | "Phone",
4776
+ title: string,
4777
+ preview: string,
4778
+ timestamp: Date,
4779
+ assignedTo: string[],
4780
+ userIds: string[], // supporting Default access
4781
+ enduserIds: string[], // supporting Assigned access and filtering by enduserId, finding care team(s) when assignedTo is empty
4782
+ inboxStatus: string,
4783
+ threadId: string, // unique identifier for thread
4784
+ }
4785
+ export interface InboxThread_updatesDisabled {}
4786
+ export interface InboxThread extends InboxThread_readonly, InboxThread_required, InboxThread_updatesDisabled {
4787
+ tags?: string[],
4788
+ phoneNumber?: string,
4789
+ enduserPhoneNumber?: string,
4790
+ emailMessageId?: string | null,
4791
+ readBy?: { [index: string] : Date | '' };
4792
+ outboundTimestamp?: Date | '',
4793
+ outboundPreview?: string,
4794
+ }
4795
+
4761
4796
  export type ModelForName_required = {
4797
+ inbox_threads: InboxThread_required,
4762
4798
  ai_conversations: AIConversation_required,
4763
4799
  waitlists: Waitlist_required,
4764
4800
  agent_records: AgentRecord_required,
@@ -4850,6 +4886,7 @@ export type ModelForName_required = {
4850
4886
  export type ClientModel_required = ModelForName_required[keyof ModelForName_required]
4851
4887
 
4852
4888
  export interface ModelForName_readonly {
4889
+ inbox_threads: InboxThread_readonly,
4853
4890
  ai_conversations: AIConversation_readonly,
4854
4891
  waitlists: Waitlist_readonly,
4855
4892
  agent_records: AgentRecord_readonly,
@@ -4941,6 +4978,7 @@ export interface ModelForName_readonly {
4941
4978
  export type ClientModel_readonly = ModelForName_readonly[keyof ModelForName_readonly]
4942
4979
 
4943
4980
  export interface ModelForName_updatesDisabled {
4981
+ inbox_threads: InboxThread_updatesDisabled,
4944
4982
  ai_conversations: AIConversation_updatesDisabled,
4945
4983
  waitlists: Waitlist_updatesDisabled,
4946
4984
  agent_records: AgentRecord_updatesDisabled,
@@ -5032,6 +5070,7 @@ export interface ModelForName_updatesDisabled {
5032
5070
  export type ClientModel_updatesDisabled = ModelForName_updatesDisabled[keyof ModelForName_updatesDisabled]
5033
5071
 
5034
5072
  export interface ModelForName extends ModelForName_required, ModelForName_readonly {
5073
+ inbox_threads: InboxThread,
5035
5074
  ai_conversations: AIConversation,
5036
5075
  waitlists: Waitlist,
5037
5076
  agent_records: AgentRecord,
@@ -5133,6 +5172,7 @@ export interface UserActivityInfo {
5133
5172
  export type UserActivityStatus = 'Active' | 'Away' | 'Unavailable'
5134
5173
 
5135
5174
  export const modelNameChecker: { [K in ModelName] : true } = {
5175
+ inbox_threads: true,
5136
5176
  ai_conversations: true,
5137
5177
  waitlists: true,
5138
5178
  agent_records: true,