@cognigy/rest-api-client
Version:
Cognigy REST-Client
524 lines • 15.5 kB
JavaScript
;
/**
* IMPORTANT: This file exists in two places:
* - cognigy/services/service-handover/src/old_shared/interfaces/handover.ts
* - cognigy/shared/interfaces/handover.ts
*
* Please keep both files in sync.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.genesysCloudOMSettingsSchema = exports.genesysCloudSettingsSchema = exports.liveAgentSettingsSchema = exports.salesforceMIAWSettingsSchema = exports.salesforceSettingsSchema = exports.chatwootSettingsSchema = exports.handoverAgentReplySchema = exports.queueUpdateOptionsSchema = exports.eightByEightSettingsSchema = exports.rceSettingsSchema = exports.foreignSessionDataSchema = exports.handoverRequestSettingsSchema = exports.handoverSettingsSchema = exports.copilotType = exports.whisperAssistConfigurations = exports.handoverProviders = exports.internalHandoverProviders = exports.externalHandoverProviders = void 0;
exports.externalHandoverProviders = [
"rce",
"chatwoot",
"salesforce",
"salesforceMIAW",
"liveAgent",
"genesysCloud",
"genesysCloudOM",
"eightByEight",
"salesforceMIAW"
];
exports.internalHandoverProviders = [
"cognigy",
"none"
];
exports.handoverProviders = [
...exports.internalHandoverProviders,
...exports.externalHandoverProviders
];
exports.whisperAssistConfigurations = [
"none",
"basic",
"template"
];
exports.copilotType = [
"none",
"workspace",
"whisper"
];
exports.handoverSettingsSchema = {
title: "handoverSettingsSchema",
type: "object",
additionalProperties: false,
properties: {
provider: {
type: "string",
enum: [
"none",
"chatwoot",
"cognigy",
"rce",
"salesforce",
"salesforceMIAW",
"liveAgent",
"genesysCloud",
"genesysCloudOM",
"eightByEight"
]
},
providerSettings: {
type: "object",
oneOf: [
{
type: "object",
// Temporary due to handover provider changes
additionalProperties: true,
properties: {
accountId: { type: "string" },
baseUrl: { type: "string" },
apiKey: { type: "string" },
apiTenant: { type: "string" },
usePlatformToken: { type: "boolean" },
forwardOnlyHandoverConversations: { type: "boolean" },
getQueueUpdates: { type: "boolean" },
apiAccessToken: { type: "string" },
baseApiUrl: { type: "string", format: "url" },
realtimeAccessToken: { type: "string" },
realtimeEndpointUrl: { type: "string" },
webhookSecret: { type: "string" },
agentCategoryId: { type: "string" },
botCategoryId: { type: "string" },
apiVersion: { type: "string" },
organizationId: { type: "string" },
deploymentId: { type: "string" },
deploymentName: { type: "string" },
clientId: { type: "string" },
clientSecret: { type: "string" },
buttonId: { type: "string" },
forwardUnknownEventsToFlow: { type: "boolean" },
liveAgentInboxId: { type: "string" },
chatwootInboxId: { type: "string" },
host: { type: "string" },
oAuth2Connection: { type: "string" },
queue: { type: "string" },
queueId: { type: "string" },
sendProfile: { type: "boolean" },
sessionDuration: { type: "number" },
esDeveloperName: { type: "string" },
capabilitiesVersion: { type: "string" },
rceConnection: { type: "string" },
eightByEightConnection: { type: "string" },
chatwootConnection: { type: "string" },
liveAgentConnection: { type: "string" },
genesysCloudConnection: { type: "string" },
genesysCloudOMConnection: { type: "string" }
}
}
]
},
agentAssistSettings: {
type: "object",
additionalProperties: false,
properties: {
copilotType: {
type: "string",
enum: [...exports.copilotType]
},
agentAssistFlowId: { type: "string" },
agentAssistConfigId: { type: "string" },
enableTranscriptTile: { type: "boolean" },
enableTranscriptTileChatInput: { type: "boolean" },
redactTranscriptTileMessages: { type: "boolean" },
enableAgentCopilotAuthentication: { type: "boolean" },
agentCopilotAuthentication: { type: "string" },
}
}
}
};
exports.handoverRequestSettingsSchema = {
title: "handoverRequestSettingsSchema",
type: "object",
additionalProperties: false,
properties: {
additionalCategoryIds: { type: "array" },
enableHandoverDisconnectMessageRingCentralEngage: { type: "boolean" },
enableHandoverConnectMessageRingCentralEngage: { type: "boolean" }
}
};
exports.foreignSessionDataSchema = {
title: "foreignSettingsDataSchema",
type: "object",
additionalProperties: false,
properties: {
foreignSessionId: { type: "string" },
memberId: { type: "string" },
token: { type: "string" },
affinityToken: { type: "string" },
userId: { type: "string" },
firstname: { type: "string" },
lastname: { type: "string" },
nickname: { type: "string" },
integrationId: { type: "string" },
conversationId: { type: "string" },
clientPollTimeout: { type: "number" },
accessToken: { type: "string" },
lastEventId: { type: "string" },
apiKey: { type: "string" }
}
};
exports.rceSettingsSchema = {
"title": "rceSettingsSchema",
"type": "object",
"additionalProperties": false,
"required": [
"baseApiUrl",
"forwardOnlyHandoverConversations",
"realtimeEndpointUrl",
"agentCategoryId",
"botCategoryId"
],
"properties": {
"forwardOnlyHandoverConversations": {
"type": "boolean"
},
"getQueueUpdates": {
"type": "boolean"
},
"apiAccessToken": {
"type": "string"
},
"baseApiUrl": {
"type": "string",
"format": "url"
},
"realtimeAccessToken": {
"type": "string"
},
"realtimeEndpointUrl": {
"type": "string",
"format": "url"
},
"webhookSecret": {
"type": "string"
},
"agentCategoryId": {
"type": "string"
},
"botCategoryId": {
"type": "string"
},
// TODO: add as required once we have migrated all providers to the new connection ids
"rceConnection": {
"type": "string"
}
}
};
exports.eightByEightSettingsSchema = {
"title": "eightByEightSettingsSchema",
"type": "object",
"additionalProperties": false,
"required": [
"baseUrl",
"apiTenant"
],
"properties": {
"baseUrl": {
"type": "string",
"format": "url"
},
"apiKey": {
"type": "string"
},
"apiTenant": {
"type": "string",
"maxLength": 255
},
"forwardOnlyHandoverConversations": {
"type": "boolean"
},
// TODO: add as required once we have migrated all providers to the new connection ids
"eightByEightConnection": {
"type": "string"
}
}
};
exports.queueUpdateOptionsSchema = {
"title": "queueUpdateOptionsSchema",
"type": "object",
"additionalProperties": true,
"required": [],
"properties": {
"getQueuePosition": {
"type": "boolean"
},
"getEstimatedWaitTime": {
"type": "boolean"
},
"updateIntervalQueuePosition": {
"type": ["number", "null"]
},
"updateIntervalEstimatedWaitTime": {
"type": ["number", "null"]
},
"alternativeUpdate": {
"type": "boolean"
},
"maximumQueuePosition": {
"anyOf": [
{ "type": "number" },
{ "type": "string", "const": "" }
]
},
"maximumEstimatedWaitTime": {
"anyOf": [
{ "type": "number" },
{ "type": "string", "const": "" }
]
},
"alternativeText": {
"type": ["string", "null"]
}
}
};
exports.handoverAgentReplySchema = {
"required": ["sessionId", "message"],
"type": "object",
"additionalProperties": false,
"properties": {
"sessionId": {
"type": "string"
},
"message": {
"type": "string"
},
"attachments": {
"type": "array",
"items": {
"additionalProperties": false,
"required": ["url", "type"],
"properties": {
"url": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
};
exports.chatwootSettingsSchema = {
title: "chatwootSettingsSchema",
type: "object",
additionalProperties: false,
required: [
"baseUrl",
"accountId",
],
properties: {
accountId: {
type: "string"
},
// TODO: remove once we have migrated all providers to the new connection ids
apiKey: {
type: "string"
},
baseUrl: {
type: "string",
format: "url"
},
chatwootInboxId: {
type: "string",
},
forwardOnlyHandoverConversations: {
"type": "boolean",
},
// TODO: add as required once we have migrated all providers to the new connection ids
chatwootConnection: {
"type": "string"
}
}
};
exports.salesforceSettingsSchema = {
title: "salesforceSettingsSchema",
type: "object",
additionalProperties: false,
required: [
"apiVersion",
"baseUrl",
"organizationId",
"deploymentId",
"buttonId"
],
properties: {
apiVersion: {
type: "string"
},
baseUrl: {
type: "string",
format: "url"
},
organizationId: {
type: "string",
},
deploymentId: {
type: "string",
},
buttonId: {
"type": "string",
},
forwardOnlyHandoverConversations: {
"type": "boolean",
},
forwardUnknownEventsToFlow: {
type: "boolean"
},
}
};
exports.salesforceMIAWSettingsSchema = {
title: "salesforceMIAWSettingsSchema",
type: "object",
additionalProperties: false,
required: [
"baseUrl",
"capabilitiesVersion",
"organizationId",
"esDeveloperName"
],
properties: {
baseUrl: {
type: "string",
format: "url"
},
capabilitiesVersion: {
type: "string"
},
organizationId: {
type: "string",
},
esDeveloperName: {
type: "string",
},
forwardOnlyHandoverConversations: {
"type": "boolean",
},
forwardUnknownEventsToFlow: {
type: "boolean"
},
}
};
exports.liveAgentSettingsSchema = {
title: "liveAgentSettingsSchema",
type: "object",
additionalProperties: false,
required: [
"baseUrl",
"accountId",
],
properties: {
accountId: {
type: "string"
},
// TODO: remove once we have migrated all providers to the new connection ids
apiKey: {
type: "string"
},
baseUrl: {
type: "string",
format: "url"
},
liveAgentInboxId: {
type: "string",
},
forwardOnlyHandoverConversations: {
"type": "boolean",
},
usePlatformToken: {
"type": "boolean",
},
// TODO: add as required once we have migrated all providers to the new connection ids
liveAgentConnection: {
"type": "string"
}
}
};
exports.genesysCloudSettingsSchema = {
title: "genesysCloudSettingsSchema",
type: "object",
additionalProperties: false,
required: [
"host",
"organizationId",
"deploymentId",
"queue",
"queueId",
],
properties: {
host: {
type: "string"
},
organizationId: {
type: "string"
},
deploymentId: {
type: "string"
},
queue: {
type: "string"
},
queueId: {
type: "string"
},
sendProfile: {
type: "boolean"
},
sessionDuration: {
type: "integer"
},
forwardOnlyHandoverConversations: {
"type": "boolean",
},
// TODO: remove once we have migrated all providers to the new connection ids
oAuth2Connection: {
type: "string"
},
// TODO: add as required once we have migrated all providers to the new connection ids
genesysCloudConnection: {
"type": "string"
}
}
};
exports.genesysCloudOMSettingsSchema = {
title: "genesysCloudOMSettingsSchema",
type: "object",
additionalProperties: false,
required: [
"host",
"deploymentName",
"queue",
],
properties: {
host: {
type: "string"
},
deploymentName: {
type: "string"
},
queue: {
type: "string"
},
// TODO: remove once we have migrated all providers to the new connection ids
webhookSecret: {
type: "string"
},
sendProfile: {
type: "boolean"
},
clientId: {
type: "string"
},
clientSecret: {
type: "string"
},
// TODO: add as required once we have migrated all providers to the new connection ids
genesysCloudOMConnection: {
"type": "string"
},
forwardOnlyHandoverConversations: {
"type": "boolean",
}
}
};
//# sourceMappingURL=handover.js.map