@cognigy/rest-api-client
Version:
Cognigy REST-Client
215 lines • 6.17 kB
JavaScript
import { entrypointType } from "../TEntrypointType";
import { analyticsModeTypes } from "./TAnalyticsMode";
// Set the default max length for custom fields from environment variable or fallback to 1024
const INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH = parseInt(process.env.INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH || "1024", 10);
export const customerUpdatableAnalyticsSchema = {
title: "customerUpdatableAnalyticsSchema",
type: "object",
additionalProperties: false,
properties: {
state: {
type: ["string", "null"],
maxLength: 256,
},
mode: {
type: "string",
enum: [...analyticsModeTypes],
},
userType: {
type: ["string", "null"],
maxLength: 256,
},
channel: {
type: ["string", "null"],
maxLength: 256,
},
flowLanguage: {
type: ["string", "null"],
maxLength: 256,
},
intent: {
type: ["string", "null"],
maxLength: 256,
},
intentScore: {
type: ["number", "null"],
},
intentFlow: {
type: ["string", "null"],
maxLength: 256,
},
flowName: {
type: ["string", "null"],
maxLength: 256,
},
inHandoverRequest: {
type: ["boolean", "null"],
},
inHandoverConversation: {
type: ["boolean", "null"],
},
localeName: {
type: ["string", "null"],
},
rating: {
type: ["number", "null"],
},
ratingComment: {
type: ["string", "null"],
maxLength: 256,
},
entrypointType: {
type: "string",
enum: [...entrypointType],
},
endpointName: {
type: ["string", "null"],
},
endpointUrlToken: {
type: ["string", "null"],
},
handoverEscalations: {
type: ["number", "null"],
},
snapshotName: {
type: ["string", "null"],
},
slots: {
type: ["null", "object"],
},
custom1: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom2: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom3: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom4: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom5: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom6: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom7: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom8: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom9: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom10: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
},
};
export const customerEditableAnalyticsSchema = {
title: "customerEditableAnalyticsSchema",
type: "object",
additionalProperties: false,
properties: {
intent: {
type: ["string", "null"],
maxLength: 256,
},
inputText: {
type: ["string", "null"],
maxLength: 256,
},
inputData: {
type: ["object", "null"],
},
state: {
type: ["string", "null"],
maxLength: 256,
},
slots: {
type: ["object", "null"],
},
completedGoals: {
type: ["array", "null"],
},
traceId: {
type: ["string", "null"],
},
disableSensitiveLogging: {
type: ["boolean", "null"],
},
intentScore: {
type: ["number", "null"],
},
intentFlow: {
type: ["string", "null"],
maxLength: 256,
},
understood: {
type: ["boolean", "null"],
},
inHandoverRequest: {
type: ["boolean", "null"],
},
inHandoverConversation: {
type: ["boolean", "null"],
},
handoverEscalations: {
type: ["number", "null"],
},
custom1: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom2: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom3: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom4: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom5: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom6: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom7: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom8: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom9: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
custom10: {
type: ["string", "null"],
maxLength: INSIGHTS_ANALYTICS_CUSTOM_MAX_LENGTH,
},
},
};
//# sourceMappingURL=IAnalyticsSourceData.js.map