@vivocha/public-types
Advanced tools
Comparing version 1.2.0-gaia.1 to 1.2.0
@@ -6,2 +6,24 @@ # Change Log | ||
# [1.2.0](https://github.com/vivocha/vivocha/compare/@vivocha/public-types@1.1.4...@vivocha/public-types@1.2.0) (2024-06-19) | ||
### Features | ||
* **public-types:** add translation manager types, fix lib core imports ([a1f08e2](https://github.com/vivocha/vivocha/commit/a1f08e2a083968a365626778582aff008966b750)) | ||
## [1.1.4](https://github.com/vivocha/vivocha/compare/@vivocha/public-types@1.1.3...@vivocha/public-types@1.1.4) (2024-06-07) | ||
### Bug Fixes | ||
* export schema on types instead of wrappers ([0230599](https://github.com/vivocha/vivocha/commit/02305993fe4d883606e91b188d8797eec89feb91)) | ||
## [1.1.3](https://github.com/vivocha/vivocha/compare/@vivocha/public-types@1.1.2...@vivocha/public-types@1.1.3) (2024-06-06) | ||
@@ -8,0 +30,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 { OpenAPIV3 } from 'openapi-police'; | ||
export declare type ExtensionType = 'bot.agent' | 'bot.filter' | 'webhook' | 'extrouter' | 'mediahook' | 'channel' | 'asset_manager' | 'appointments_scheduler'; | ||
export declare type ExtensionType = 'bot.agent' | 'bot.filter' | 'webhook' | 'extrouter' | 'mediahook' | 'channel' | 'asset_manager' | 'appointments_scheduler' | 'translation_manager'; | ||
export declare type ExtensionIcon = string | { | ||
@@ -4,0 +4,0 @@ default?: string; |
@@ -11,1 +11,2 @@ export * from './asset_manager'; | ||
export * from './widget'; | ||
export * from './translation_manager'; |
@@ -23,2 +23,3 @@ "use strict"; | ||
__exportStar(require("./widget"), exports); | ||
__exportStar(require("./translation_manager"), exports); | ||
//# sourceMappingURL=index.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.2.0-gaia.1", | ||
"version": "1.2.0", | ||
"description": "Vivocha public types", | ||
@@ -26,3 +26,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "2ae3622ae1e81e1f7c7479458fbc2b099a0c34db" | ||
"gitHead": "b489e1b953eaaa0740e04ae946ef6b3debee1a3e" | ||
} |
@@ -511,4 +511,78 @@ { | ||
} | ||
}, | ||
"translationManagerAPI": { | ||
"definitions": { | ||
"language": { | ||
"type": "object", | ||
"properties": { | ||
"code": { "type": "string" }, | ||
"name": { "type": "string" }, | ||
"occurrences": { "type": "integer" }, | ||
"selected": { "type": "boolean" }, | ||
"score": { "type": "number" } | ||
}, | ||
"required": ["code", "name"], | ||
"additionalProperties": false | ||
}, | ||
"direction": { | ||
"type": "object", | ||
"properties": { | ||
"from": { "type": "string" }, | ||
"to": { "type": "string" }, | ||
"valid": { "type": "boolean" } | ||
}, | ||
"required": ["from", "to"] | ||
}, | ||
"source": { | ||
"type": "object", | ||
"properties": { | ||
"direction": { "$ref": "#/definitions/translationManagerAPI/definitions/direction"}, | ||
"text": { "type": "string" }, | ||
"translatedText": { "type": "string" } | ||
}, | ||
"required": ["text"] | ||
}, | ||
"detectRequest": { | ||
"type": "object", | ||
"allOf": [{ "$ref": "#/definitions/request" }], | ||
"required": ["sources"], | ||
"properties": { | ||
"sources": { | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/translationManagerAPI/definitions/source"} | ||
} | ||
} | ||
}, | ||
"detectResponse": { | ||
"allOf": [{ "$ref": "#/definitions/response" }], | ||
"type": "array", | ||
"items": { "$ref": "#/definitions/translationManagerAPI/definitions/language" } | ||
}, | ||
"translationRequest": { | ||
"type": "object", | ||
"allOf": [{ "$ref": "#/definitions/request" }], | ||
"required": ["sources", "direction"], | ||
"properties": { | ||
"direction": { "$ref": "#/definitions/translationManagerAPI/definitions/direction" }, | ||
"sources": { | ||
"type": "array", | ||
"items": { "$ref": "#/definitions/translationManagerAPI/definitions/source" } | ||
} | ||
} | ||
}, | ||
"translationResponse": { | ||
"type": "array", | ||
"items": { "$ref": "#/definitions/translationManagerAPI/definitions/source" } | ||
}, | ||
"languagesResponse": { | ||
"type": "object", | ||
"allOf": [{ "$ref": "#/definitions/response" }], | ||
"items": { | ||
"from": { "type": "array", "items": { "$ref": "#/definitions/translationManagerAPI/definitions/language" } }, | ||
"to": { "type": "array", "items": { "$ref": "#/definitions/translationManagerAPI/definitions/language" } } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
66861
41
2285
1