@tellescope/types-models 1.256.0 → 1.256.2
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 +52 -13
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.d.ts +52 -13
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/index.ts +61 -9
package/lib/cjs/index.d.ts
CHANGED
|
@@ -1086,7 +1086,20 @@ export interface Enduser extends Enduser_readonly, Enduser_required, Enduser_upd
|
|
|
1086
1086
|
preferredPharmacy?: Pharmacy;
|
|
1087
1087
|
aiSummary?: string;
|
|
1088
1088
|
aiSummaryUpdatedAt?: Date;
|
|
1089
|
+
aiConversations?: EnduserAIConversation[];
|
|
1089
1090
|
}
|
|
1091
|
+
export type EnduserAIConversation = {
|
|
1092
|
+
channel: 'SMS';
|
|
1093
|
+
aiConversationId: string;
|
|
1094
|
+
source: string;
|
|
1095
|
+
destination: string;
|
|
1096
|
+
active: boolean;
|
|
1097
|
+
startedAt: Date;
|
|
1098
|
+
endedAt?: Date;
|
|
1099
|
+
endedReason?: string;
|
|
1100
|
+
journeyId?: string;
|
|
1101
|
+
automationStepId?: string;
|
|
1102
|
+
};
|
|
1090
1103
|
export interface EnduserCustomType_readonly extends ClientRecord {
|
|
1091
1104
|
}
|
|
1092
1105
|
export interface EnduserCustomType_required {
|
|
@@ -1179,7 +1192,7 @@ export type APIKeyScope = typeof API_KEY_SCOPES[number];
|
|
|
1179
1192
|
* semantics: `scopes: []` on an API key means unrestricted, whereas a session confined to no scopes
|
|
1180
1193
|
* reaches nothing. The route table is intentionally backend-only; only the names are public.
|
|
1181
1194
|
*/
|
|
1182
|
-
export declare const SESSION_SCOPES: readonly ["video-join-link", "video-start-link", "public-form", "appointment-booking", "ics-download"];
|
|
1195
|
+
export declare const SESSION_SCOPES: readonly ["video-join-link", "video-start-link", "public-form", "appointment-booking", "ics-download", "embeddables-token"];
|
|
1183
1196
|
export type SessionScope = typeof SESSION_SCOPES[number];
|
|
1184
1197
|
export interface APIKey_readonly extends ClientRecord {
|
|
1185
1198
|
hashedKey: string;
|
|
@@ -3127,7 +3140,7 @@ export interface WebhookCall {
|
|
|
3127
3140
|
integrity: string;
|
|
3128
3141
|
description?: string;
|
|
3129
3142
|
}
|
|
3130
|
-
export type AutomationEventType = 'onJourneyStart' | 'afterAction' | "formResponse" | "formResponses" | "formUnsubmitted" | "formsUnsubmitted" | "ticketCompleted" | 'waitForTrigger' | "onCallOutcome" | "onAIDecision" | "onError";
|
|
3143
|
+
export type AutomationEventType = 'onJourneyStart' | 'afterAction' | "formResponse" | "formResponses" | "formUnsubmitted" | "formsUnsubmitted" | "ticketCompleted" | 'waitForTrigger' | "onCallOutcome" | "onAIDecision" | "onAIConversationOutcome" | "onError";
|
|
3131
3144
|
interface AutomationEventBuilder<T extends AutomationEventType, V extends object> {
|
|
3132
3145
|
type: T;
|
|
3133
3146
|
info: V;
|
|
@@ -3273,6 +3286,10 @@ export type OnAIDecisionAutomationEvent = AutomationEventBuilder<'onAIDecision',
|
|
|
3273
3286
|
automationStepId: string;
|
|
3274
3287
|
outcomes: string[];
|
|
3275
3288
|
}>;
|
|
3289
|
+
export type OnAIConversationOutcomeAutomationEvent = AutomationEventBuilder<'onAIConversationOutcome', {
|
|
3290
|
+
automationStepId: string;
|
|
3291
|
+
outcome: string;
|
|
3292
|
+
}>;
|
|
3276
3293
|
export type OnErrorEventInfo = {
|
|
3277
3294
|
automationStepId: string;
|
|
3278
3295
|
};
|
|
@@ -3288,6 +3305,7 @@ export type AutomationEventForType = {
|
|
|
3288
3305
|
'waitForTrigger': WaitForTriggerAutomationEvent;
|
|
3289
3306
|
'onCallOutcome': OnCallOutcomeAutomationEvent;
|
|
3290
3307
|
'onAIDecision': OnAIDecisionAutomationEvent;
|
|
3308
|
+
'onAIConversationOutcome': OnAIConversationOutcomeAutomationEvent;
|
|
3291
3309
|
'onError': OnErrorAutomationEvent;
|
|
3292
3310
|
};
|
|
3293
3311
|
export type AutomationEvent = AutomationEventForType[keyof AutomationEventForType];
|
|
@@ -3482,6 +3500,15 @@ export type BelugaAutomationMappingEntry = {
|
|
|
3482
3500
|
patientPreferences: BelugaUpdateVisitPatientPreferenceItem[];
|
|
3483
3501
|
pharmacyId: string;
|
|
3484
3502
|
};
|
|
3503
|
+
export type BelugaTriggerRefillPatientPreferenceItem = {
|
|
3504
|
+
medId: string;
|
|
3505
|
+
};
|
|
3506
|
+
export type BelugaTriggerRefillAutomationAction = AutomationActionBuilder<'belugaTriggerRefill', {
|
|
3507
|
+
formId: string;
|
|
3508
|
+
patientPreferences?: BelugaTriggerRefillPatientPreferenceItem[];
|
|
3509
|
+
useOrganizationMapping?: boolean;
|
|
3510
|
+
customFieldName?: string;
|
|
3511
|
+
}>;
|
|
3485
3512
|
export type SendChatAutomationAction = AutomationActionBuilder<'sendChat', {
|
|
3486
3513
|
templateId: string;
|
|
3487
3514
|
identifier: string;
|
|
@@ -3637,9 +3664,18 @@ export type CreateScriptSureDraftAutomationAction = AutomationActionBuilder<'cre
|
|
|
3637
3664
|
matchMedicationTitle?: string;
|
|
3638
3665
|
matchEnduserState?: boolean;
|
|
3639
3666
|
}>;
|
|
3667
|
+
export type StartAIConversationActionInfo = AIAgentBaseConfig & {
|
|
3668
|
+
channel: 'SMS';
|
|
3669
|
+
senderId: string;
|
|
3670
|
+
fromNumber?: string;
|
|
3671
|
+
initialMessage: string;
|
|
3672
|
+
inactivityTimeoutHours?: number;
|
|
3673
|
+
};
|
|
3674
|
+
export type StartAIConversationAutomationAction = AutomationActionBuilder<'startAIConversation', StartAIConversationActionInfo>;
|
|
3640
3675
|
export type AutomationActionForType = {
|
|
3641
3676
|
'aiDecision': AIDecisionAutomationAction;
|
|
3642
3677
|
'generateEnduserSummary': GenerateEnduserSummaryAutomationAction;
|
|
3678
|
+
'startAIConversation': StartAIConversationAutomationAction;
|
|
3643
3679
|
'assignInboxItem': AssignInboxItemAutomationAction;
|
|
3644
3680
|
'stripeChargeCardOnFile': StripeChargeCardOnFileAutomationAction;
|
|
3645
3681
|
'stripeCancelSubscription': StripeCancelSubscriptionAutomationAction;
|
|
@@ -3675,6 +3711,7 @@ export type AutomationActionForType = {
|
|
|
3675
3711
|
'smartMeterPlaceOrder': SmartMeterPlaceOrderAutomationAction;
|
|
3676
3712
|
'belugaAutoRx': BelugaAutoRxAutomationAction;
|
|
3677
3713
|
'belugaUpdateVisit': BelugaUpdateVisitAutomationAction;
|
|
3714
|
+
'belugaTriggerRefill': BelugaTriggerRefillAutomationAction;
|
|
3678
3715
|
'healthieSync': HealthieSyncAutomationAction;
|
|
3679
3716
|
healthieAddToCourse: HealthieAddToCourseAutomationAction;
|
|
3680
3717
|
healthieSendChat: HealthieSendChatAutomationAction;
|
|
@@ -5160,6 +5197,18 @@ export type PhoneTreeAgentTools = {
|
|
|
5160
5197
|
};
|
|
5161
5198
|
export type PhoneTreeAgentToolType = keyof PhoneTreeAgentTools;
|
|
5162
5199
|
export type PhoneTreeAgentTool = PhoneTreeAgentTools[PhoneTreeAgentToolType];
|
|
5200
|
+
export type AIAgentBaseConfig = {
|
|
5201
|
+
prompt: string;
|
|
5202
|
+
outcomes: {
|
|
5203
|
+
value: string;
|
|
5204
|
+
description: string;
|
|
5205
|
+
}[];
|
|
5206
|
+
tools?: PhoneTreeAgentTool[];
|
|
5207
|
+
model?: string;
|
|
5208
|
+
maxTokensPerTurn?: number;
|
|
5209
|
+
maxTurns?: number;
|
|
5210
|
+
maxCreditsPerCall?: number;
|
|
5211
|
+
};
|
|
5163
5212
|
export type PhoneTreeActionBuilder<T, V> = {
|
|
5164
5213
|
type: T;
|
|
5165
5214
|
info: V;
|
|
@@ -5236,22 +5285,12 @@ export type PhoneTreeActions = {
|
|
|
5236
5285
|
'Add to Journey': PhoneTreeActionBuilder<"Add to Journey", {
|
|
5237
5286
|
journeyId: string;
|
|
5238
5287
|
}>;
|
|
5239
|
-
'AI Agent': PhoneTreeActionBuilder<"AI Agent", {
|
|
5240
|
-
prompt: string;
|
|
5288
|
+
'AI Agent': PhoneTreeActionBuilder<"AI Agent", AIAgentBaseConfig & {
|
|
5241
5289
|
greeting?: string;
|
|
5242
5290
|
voice?: string;
|
|
5243
5291
|
language?: string;
|
|
5244
5292
|
interruptible?: boolean;
|
|
5245
|
-
maxTokensPerTurn?: number;
|
|
5246
|
-
maxTurns?: number;
|
|
5247
5293
|
maxDurationSeconds?: number;
|
|
5248
|
-
maxCreditsPerCall?: number;
|
|
5249
|
-
model?: string;
|
|
5250
|
-
outcomes: {
|
|
5251
|
-
value: string;
|
|
5252
|
-
description: string;
|
|
5253
|
-
}[];
|
|
5254
|
-
tools?: PhoneTreeAgentTool[];
|
|
5255
5294
|
}>;
|
|
5256
5295
|
};
|
|
5257
5296
|
export type PhoneTreeActionType = keyof PhoneTreeActions;
|