@vivocha/public-types
Advanced tools
Comparing version 1.2.2-contact-ani.0 to 1.3.0-ai-messages-channels.0
@@ -6,10 +6,62 @@ # Change Log | ||
## [1.2.1](https://github.com/vivocha/vivocha/compare/@vivocha/public-types@1.2.1-multi-attachment.1...@vivocha/public-types@1.2.1) (2024-07-24) | ||
# [1.3.0-gaia.6](https://github.com/vivocha/vivocha/compare/@vivocha/public-types@1.3.0-gaia.5...@vivocha/public-types@1.3.0-gaia.6) (2024-09-09) | ||
**Note:** Version bump only for package @vivocha/public-types | ||
### Bug Fixes | ||
* **server-core:** add channelName in bot message environment ([c5dfcad](https://github.com/vivocha/vivocha/commit/c5dfcadcee735fcd4ef86eb57ff0efde60a9720d)) | ||
# [1.3.0-gaia.5](https://github.com/vivocha/vivocha/compare/@vivocha/public-types@1.3.0-gaia.4...@vivocha/public-types@1.3.0-gaia.5) (2024-08-27) | ||
### Bug Fixes | ||
* **server-core:** add phoneNumber property in bot environment ([a157bb8](https://github.com/vivocha/vivocha/commit/a157bb815fe694dbf3d69865dd6ebe0353b43a7b)) | ||
# [1.3.0-gaia.4](https://github.com/vivocha/vivocha/compare/@vivocha/public-types@1.3.0-gaia.3...@vivocha/public-types@1.3.0-gaia.4) (2024-08-09) | ||
### Bug Fixes | ||
* **public-types:** rm data from ContextOptions as available on sender ([cfcfe66](https://github.com/vivocha/vivocha/commit/cfcfe66d937828bb4283c64f2561bfbf1e092973)) | ||
# [1.3.0-gaia.3](https://github.com/vivocha/vivocha/compare/@vivocha/public-types@1.3.0-gaia.2...@vivocha/public-types@1.3.0-gaia.3) (2024-07-25) | ||
### Bug Fixes | ||
* fix schema to allow registering multi attachment schema ([46c9328](https://github.com/vivocha/vivocha/commit/46c93284939168e34a6000aeeb2016599f3b2fd9)) | ||
### Features | ||
* **public-types:** add types and register new schemas for multi attach ([3b634f3](https://github.com/vivocha/vivocha/commit/3b634f3307046796db38a54c345a3e30fd9743f8)) | ||
# [1.3.0-gaia.2](https://github.com/vivocha/vivocha/compare/@vivocha/public-types@1.3.0-gaia.1...@vivocha/public-types@1.3.0-gaia.2) (2024-07-18) | ||
### Bug Fixes | ||
* **public-types:** add ignoreAniOnCustomer ([b291c8f](https://github.com/vivocha/vivocha/commit/b291c8fe925430df5cfeee9826ca5cb4b5b5b6d2)) | ||
# [1.2.0](https://github.com/vivocha/vivocha/compare/@vivocha/public-types@1.1.4...@vivocha/public-types@1.2.0) (2024-06-19) | ||
@@ -16,0 +68,0 @@ |
@@ -23,2 +23,3 @@ import { ActionMessage, AttachmentMessage, IsWritingMessage, LocationMessage, MultiAttachmentMessage, PostbackMessage, TextMessage } from './message'; | ||
channelId?: string; | ||
channelName?: string; | ||
entrypointId?: string; | ||
@@ -25,0 +26,0 @@ engagementId?: string; |
@@ -62,2 +62,14 @@ import { AssetManagerAPITypes } from './asset_manager'; | ||
} | ||
interface ContextOptions { | ||
tags?: string[]; | ||
optionalTags?: string[]; | ||
startAsIdle?: boolean; | ||
ignoreAniOnCustomer?: boolean; | ||
userAgent?: string; | ||
channelEntryPointLanguage?: string; | ||
mediaPreset?: string; | ||
ani?: string; | ||
dnis?: string; | ||
holdRouting?: boolean; | ||
} | ||
interface Context { | ||
@@ -67,8 +79,4 @@ sender: Party; | ||
sessionId?: string; | ||
options?: { | ||
tags?: string[]; | ||
optionalTags?: string[]; | ||
userAgent?: string; | ||
channelEntryPointLanguage?: string; | ||
}; | ||
refId?: string; | ||
options?: ContextOptions; | ||
} | ||
@@ -144,1 +152,8 @@ 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 { | ||
@@ -31,3 +32,3 @@ originalUrl?: string; | ||
id?: string; | ||
code: 'message' | 'join' | 'leave' | 'transfer' | 'data' | 'ping' | 'event'; | ||
code: 'message' | 'join' | 'leave' | 'transfer' | 'data' | 'ping' | 'event' | 'ai'; | ||
ts?: string | Date; | ||
@@ -37,2 +38,3 @@ api?: boolean; | ||
is_bot?: boolean; | ||
suggested?: boolean; | ||
to_id?: string; | ||
@@ -46,3 +48,74 @@ from_id?: string; | ||
read?: false | Date; | ||
recipients?: 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 { | ||
@@ -61,3 +134,14 @@ 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 { | ||
@@ -168,3 +252,3 @@ type: 'generic' | 'list' | string; | ||
} | ||
export declare type Message = TextMessage | LinkMessage | ActionMessage | IsWritingMessage | AckMessage | MediaChangeMessage | AttachmentMessage | MultiAttachmentMessage | PostbackMessage | LocationMessage | TimePickerMessage; | ||
export declare type Message = TextMessage | TextToSpeechMessage | SpeechToTextMessage | LinkMessage | ActionMessage | IsWritingMessage | AckMessage | MediaChangeMessage | AttachmentMessage | MultiAttachmentMessage | PostbackMessage | LocationMessage | TimePickerMessage | Ai.Request | Ai.Response; | ||
export declare type MessageExt = Message | JoinRawMessage | LeaveRawMessage | TransferRawMessage | DataRawMessage | PingRawMessage | EventRawMessage; | ||
@@ -171,0 +255,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.2.2-contact-ani.0", | ||
"version": "1.3.0-ai-messages-channels.0", | ||
"description": "Vivocha public types", | ||
@@ -26,3 +26,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "4c1f598db8115b19f7f969787bde42300e705909" | ||
"gitHead": "b9df3d594c4121512a081601166b9badb59c1bce" | ||
} |
@@ -109,2 +109,6 @@ { | ||
}, | ||
"channelName": { | ||
"type": "string", | ||
"description": "Vivocha Channel Name" | ||
}, | ||
"entrypointId": { | ||
@@ -111,0 +115,0 @@ "type": "string", |
73321
2452