@cognigy/rest-api-client
Version:
Cognigy REST-Client
33 lines • 1.22 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSwitchedFlowData = exports.callRecordingActions = exports.userSchema = void 0;
exports.userSchema = {
title: "userSchema",
type: "object",
additionalProperties: false,
properties: {
channel: { type: "string", minLength: 1 },
endpointType: { type: ["string", "null"], minLength: 1 },
ip: { type: "string", minLength: 1 },
organisation: { type: "string", minLength: 1 },
sessionId: { type: "string", minLength: 1 },
type: { type: "string", minLength: 1 },
userId: { type: "string", minLength: 1 },
},
};
exports.callRecordingActions = ["startCallRecording", "stopCallRecording", "pauseCallRecording", "resumeCallRecording"];
/**
* Type-Guard for "ISwitchedFlowData" in "AnyProcessOutputData"
*
* Can be used to easily exclude the type to get typed access to _cognigy
*/
const isSwitchedFlowData = (data) => {
if (!data)
return false;
const { type, fromFlowId, toFlowId } = data;
if (!type || !fromFlowId || !toFlowId)
return false;
return true;
};
exports.isSwitchedFlowData = isSwitchedFlowData;
//# sourceMappingURL=ai.js.map