@vivocha/public-types
Advanced tools
Comparing version 1.1.1-gaia.10 to 1.1.1-transfer-conversation-transcript.0
import { AssetManagerAPITypes } from './asset_manager'; | ||
import { ContactDataCollection } from './contact'; | ||
import { ExtensionAPITypes } from './extension'; | ||
@@ -63,14 +62,2 @@ import { Event as VivochaEvent, Message as VivochaMessage } from './message'; | ||
} | ||
interface ContextOptions { | ||
tags?: string[]; | ||
optionalTags?: string[]; | ||
startAsIdle?: boolean; | ||
userAgent?: string; | ||
channelEntryPointLanguage?: string; | ||
mediaPreset?: string; | ||
ani?: string; | ||
dnis?: string; | ||
holdRouting?: boolean; | ||
data?: ContactDataCollection; | ||
} | ||
interface Context { | ||
@@ -80,4 +67,8 @@ sender: Party; | ||
sessionId?: string; | ||
refId?: string; | ||
options?: ContextOptions; | ||
options?: { | ||
tags?: string[]; | ||
optionalTags?: string[]; | ||
userAgent?: string; | ||
channelEntryPointLanguage?: string; | ||
}; | ||
} | ||
@@ -153,8 +144,1 @@ interface Request extends ExtensionAPITypes.Messages.Request { | ||
} | ||
export declare type ChannelAsrPayload = { | ||
id: string; | ||
type: 'gaia' | 'aws' | 'google'; | ||
event: 'start' | 'keepalive' | 'end'; | ||
acct_id: string; | ||
data?: any; | ||
}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// ALL TYPES | ||
// caps (req) | ||
// message (opt, text, is_writing, attachment, postback, etc) | ||
// mediaClient (opt) | ||
// FSM A (stateless) | ||
// new (opt, if missing is inferred) | ||
// FSM B (stateful, no negotiation) | ||
// new (req) | ||
// cleared (req) | ||
// joined (opt) | ||
// left (opt) | ||
// transferred (opt) | ||
// FSM C (stateful, negotiation) | ||
// offer | ||
// answer | ||
// established | ||
// FSM D (client driven) | ||
//# sourceMappingURL=channel.js.map |
import { Encryptable } from './encryptable'; | ||
import { ChannelAsrPayload } from './channel'; | ||
export interface AttachmentMeta { | ||
@@ -32,3 +31,3 @@ originalUrl?: string; | ||
id?: string; | ||
code: 'message' | 'join' | 'leave' | 'transfer' | 'data' | 'ping' | 'event' | 'ai'; | ||
code: 'message' | 'join' | 'leave' | 'transfer' | 'data' | 'ping' | 'event'; | ||
ts?: string | Date; | ||
@@ -38,3 +37,2 @@ api?: boolean; | ||
is_bot?: boolean; | ||
suggested?: boolean; | ||
to_id?: string; | ||
@@ -49,72 +47,2 @@ from_id?: string; | ||
} | ||
export declare namespace Ai { | ||
interface Base extends VvcRawMessage { | ||
code: 'ai'; | ||
lang?: string; | ||
payload?: string; | ||
} | ||
namespace Request { | ||
interface Start extends Base { | ||
type: 'start'; | ||
config: any; | ||
} | ||
interface End extends Base { | ||
type: 'end'; | ||
} | ||
interface Message extends Base { | ||
type: 'message'; | ||
payload: string; | ||
} | ||
} | ||
type Request = Ai.Request.Start | Ai.Request.End | Ai.Request.Message; | ||
interface Response extends Base { | ||
type: /*'usage' |*/ 'kpi' | 'insight' | 'summary' | 'customerInfo' | 'cannedAnswer' | string; | ||
payload: any; | ||
} | ||
} | ||
export declare namespace CallEvent { | ||
type Data = { | ||
callId: string; | ||
[key: string]: any; | ||
}; | ||
type WorkerData = { | ||
name: string; | ||
payload: ChannelAsrPayload; | ||
}; | ||
interface Base extends EventRawMessage { | ||
code: 'event'; | ||
type: 'start-call' | 'transfer-back' | 'left' | 'outbound-result'; | ||
data: Data; | ||
} | ||
interface Start extends Base { | ||
type: 'start-call'; | ||
data: Data & { | ||
direction: 'inbound' | 'outbound'; | ||
worker?: WorkerData; | ||
}; | ||
} | ||
interface Route extends Base { | ||
type: 'transfer-back'; | ||
data: Data & { | ||
settings: any; | ||
}; | ||
} | ||
interface End extends Base { | ||
type: 'left'; | ||
data: Data & { | ||
channels: { | ||
total: number; | ||
vvcu: number; | ||
}; | ||
worker?: WorkerData; | ||
}; | ||
} | ||
interface OutboundResult extends Base { | ||
type: 'outbound-result'; | ||
} | ||
} | ||
export declare type MessageMetadata = { | ||
can_create?: boolean; | ||
[key: string]: any; | ||
}; | ||
export interface GenericMessage extends VvcRawMessage { | ||
@@ -133,14 +61,3 @@ code: 'message'; | ||
modal?: boolean; | ||
meta?: MessageMetadata; | ||
} | ||
export interface SpeechToTextMessage extends TextMessage { | ||
type: 'text'; | ||
body: string; | ||
meta?: MessageMetadata; | ||
} | ||
export interface TextToSpeechMessage extends TextMessage { | ||
type: 'text'; | ||
body: string; | ||
meta?: MessageMetadata; | ||
} | ||
export interface TemplateType { | ||
@@ -247,3 +164,3 @@ type: 'generic' | 'list' | string; | ||
} | ||
export declare type Message = TextMessage | TextToSpeechMessage | SpeechToTextMessage | LinkMessage | ActionMessage | IsWritingMessage | AckMessage | MediaChangeMessage | AttachmentMessage | PostbackMessage | LocationMessage | TimePickerMessage | Ai.Request | Ai.Response; | ||
export declare type Message = TextMessage | LinkMessage | ActionMessage | IsWritingMessage | AckMessage | MediaChangeMessage | AttachmentMessage | PostbackMessage | LocationMessage | TimePickerMessage; | ||
export declare type MessageExt = Message | JoinRawMessage | LeaveRawMessage | TransferRawMessage | DataRawMessage | PingRawMessage | EventRawMessage; | ||
@@ -250,0 +167,0 @@ export interface GenericEvent { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CallEvent = void 0; | ||
var CallEvent; | ||
(function (CallEvent) { | ||
; | ||
; | ||
; | ||
; | ||
})(CallEvent = exports.CallEvent || (exports.CallEvent = {})); | ||
//# sourceMappingURL=message.js.map |
{ | ||
"name": "@vivocha/public-types", | ||
"version": "1.1.1-gaia.10", | ||
"version": "1.1.1-transfer-conversation-transcript.0", | ||
"description": "Vivocha public types", | ||
@@ -25,3 +25,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "aa8186b683c9f9a3f9c298c36707df7d0c2b67d1" | ||
"gitHead": "c92d28f9c14d2cbe98e09b2a85e98bf4af1679f7" | ||
} |
30868
992