@cognigy/rest-api-client 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/GenericTusFn.js +6 -1
  3. package/build/GenericUploadFn.js +3 -5
  4. package/build/apigroups/ResourcesAPIGroup_2_0.js +12 -1
  5. package/build/connector/AxiosAdapter.js +35 -15
  6. package/build/shared/charts/createNodeDescriptor.js +5 -5
  7. package/build/shared/charts/descriptors/agentAssist/constants/constants.js +16 -1
  8. package/build/shared/charts/descriptors/agentAssist/helpers/agentAssistTranslator.helper.js +19 -0
  9. package/build/shared/charts/descriptors/agentAssist/helpers/getFontSizeFieldOptions.js +84 -0
  10. package/build/shared/charts/descriptors/agentAssist/helpers/getLanguageName.helper.js +33 -0
  11. package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/answerExtraction.helper.js +59 -0
  12. package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/configValidator.helper.js +20 -0
  13. package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/errorHandler.helper.js +64 -0
  14. package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/followUpDetection.helper.js +72 -0
  15. package/build/shared/charts/descriptors/agentAssist/helpers/knowledgeSearch/knowledgeSearch.helper.js +58 -0
  16. package/build/shared/charts/descriptors/agentAssist/helpers/sentiment.helper.js +7 -13
  17. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/identityAssistTemplate.js +17 -18
  18. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/knowledgeAssistTemplate.js +330 -153
  19. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/nextActionWidgetTemplate.js +212 -80
  20. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/sentimentAnalysisTemplate.js +11 -6
  21. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/transcriptAssistTemplate.js +15 -13
  22. package/build/shared/charts/descriptors/agentAssist/identityAssist.js +87 -14
  23. package/build/shared/charts/descriptors/agentAssist/knowledgeAssist.js +192 -327
  24. package/build/shared/charts/descriptors/agentAssist/locales/cs.locale.js +11 -0
  25. package/build/shared/charts/descriptors/agentAssist/locales/de.locale.js +11 -0
  26. package/build/shared/charts/descriptors/agentAssist/locales/en.locale.js +11 -0
  27. package/build/shared/charts/descriptors/agentAssist/locales/es.locale.js +11 -0
  28. package/build/shared/charts/descriptors/agentAssist/locales/fr.locale.js +11 -0
  29. package/build/shared/charts/descriptors/agentAssist/locales/index.js +22 -0
  30. package/build/shared/charts/descriptors/agentAssist/locales/ja.locale.js +11 -0
  31. package/build/shared/charts/descriptors/agentAssist/locales/ko.locale.js +11 -0
  32. package/build/shared/charts/descriptors/agentAssist/locales/pt.locale.js +11 -0
  33. package/build/shared/charts/descriptors/agentAssist/nextActionAssist.js +485 -10
  34. package/build/shared/charts/descriptors/agentAssist/sentimentAssist.js +31 -8
  35. package/build/shared/charts/descriptors/agentAssist/transcriptAssist.js +40 -2
  36. package/build/shared/charts/descriptors/analytics/requestRating.js +56 -2
  37. package/build/shared/charts/descriptors/index.js +1 -3
  38. package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +1 -1
  39. package/build/shared/charts/descriptors/message/question/optionalQuestion.js +1 -1
  40. package/build/shared/charts/descriptors/message/question/question.js +123 -2
  41. package/build/shared/charts/descriptors/message/question/utils/evaluateQuestionAnswer.js +44 -3
  42. package/build/shared/charts/descriptors/nlu/generativeSlotFiller/prompt.js +28 -12
  43. package/build/shared/charts/descriptors/nlu/index.js +1 -3
  44. package/build/shared/charts/descriptors/service/GPTPrompt.js +320 -22
  45. package/build/shared/charts/descriptors/service/LLMEntityExtract.js +274 -0
  46. package/build/shared/charts/descriptors/service/httpRequest.js +33 -1
  47. package/build/shared/charts/descriptors/service/index.js +3 -1
  48. package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +17 -13
  49. package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +4 -4
  50. package/build/shared/charts/descriptors/voice/nodes/play.js +8 -1
  51. package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +44 -45
  52. package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +0 -1
  53. package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +31 -39
  54. package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +17 -25
  55. package/build/shared/charts/helpers/generativeAI/generativeAIPrompts.js +55 -0
  56. package/build/shared/interfaces/appsession/IAppSession.js +3 -0
  57. package/build/shared/interfaces/appsession/ISetAppState.js +3 -0
  58. package/build/shared/interfaces/appsession/index.js +3 -0
  59. package/build/shared/interfaces/fileStorage.js +6 -0
  60. package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +32 -3
  61. package/build/shared/interfaces/handover.js +2 -1
  62. package/build/shared/interfaces/messageAPI/endpoints.js +15 -2
  63. package/build/shared/interfaces/messageAPI/handover.js +5 -1
  64. package/build/shared/interfaces/nlu/nlu.js +3 -0
  65. package/build/shared/interfaces/resources/IAuditEvent.js +10 -9
  66. package/build/shared/interfaces/resources/ILargeLanguageModel.js +34 -20
  67. package/build/shared/interfaces/resources/IMilestone.js +50 -0
  68. package/build/shared/interfaces/resources/INodeDescriptorSet.js +84 -75
  69. package/build/shared/interfaces/resources/TResourceType.js +12 -5
  70. package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
  71. package/build/shared/interfaces/restAPI/resources/milestone/v2.0/ICloneMilestoneRest_2_0.js +3 -0
  72. package/build/shared/interfaces/restAPI/resources/milestone/v2.0/ICreateMilestoneRest_2_0.js +3 -0
  73. package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IDeleteMilestoneRest_2_0.js +3 -0
  74. package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IIndexMilestonesRest_2_0.js +3 -0
  75. package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IMilestoneIndexItem_2_0.js +3 -0
  76. package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IMilestoneStepMetric_2_0.js +3 -0
  77. package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IMilestoneStep_2_0.js +3 -0
  78. package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IMilestone_2_0.js +3 -0
  79. package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IReadMilestoneRest_2_0.js +3 -0
  80. package/build/shared/interfaces/restAPI/resources/milestone/v2.0/IUpdateMilestoneRest_2_0.js +3 -0
  81. package/build/shared/interfaces/restAPI/resources/milestone/v2.0/index.js +3 -0
  82. package/build/shared/interfaces/restAPI/resources/uploadResumable/v2.0/IUploadResumableRest_2_0.js +3 -1
  83. package/build/shared/interfaces/security/IPermission.js +4 -2
  84. package/build/shared/interfaces/security/index.js +1 -1
  85. package/package.json +2 -2
  86. package/types/index.d.ts +938 -285
  87. package/build/shared/charts/descriptors/nlu/extractAnswer.js +0 -115
@@ -35,48 +35,12 @@ exports.voiceConfigFields = [
35
35
  description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__BARGE_IN_ON_DTMF__DESCRIPTION",
36
36
  defaultValue: false
37
37
  },
38
- {
39
- key: "sttVendor",
40
- type: "sttSelect",
41
- label: "_unused_",
42
- description: "_unused_",
43
- defaultValue: "",
44
- params: {
45
- languageKey: "config.sttLanguage",
46
- }
47
- },
48
- {
49
- key: "sttLanguage",
50
- type: "sttSelect",
51
- defaultValue: "",
52
- label: "_unused_",
53
- },
54
- {
55
- key: "sttDeepgramTier",
56
- type: "sttTierModelSelect",
57
- label: "_unused_",
58
- description: "_unused_",
59
- defaultValue: "base",
60
- params: {
61
- languageKey: "config.sttDeepgramModel",
62
- },
63
- condition: {
64
- key: "sttVendor",
65
- value: "deepgram"
66
- }
67
- },
68
- {
69
- key: "sttDeepgramModel",
70
- type: "sttTierModelSelect",
71
- defaultValue: "general",
72
- label: "_unused_",
73
- },
74
38
  {
75
39
  key: "deepgramEndpointing",
76
40
  type: "toggle",
77
41
  label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING__LABEL",
78
42
  description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING__DESCRIPTION",
79
- defaultValue: false,
43
+ defaultValue: true,
80
44
  condition: {
81
45
  key: "sttVendor",
82
46
  value: "deepgram"
@@ -87,7 +51,7 @@ exports.voiceConfigFields = [
87
51
  type: "number",
88
52
  label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING_TIME__LABEL",
89
53
  description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING_TIME__DESCRIPTION",
90
- defaultValue: 1000,
54
+ defaultValue: 250,
91
55
  params: {
92
56
  min: 10,
93
57
  max: 1000
@@ -275,6 +239,35 @@ exports.voiceConfigFields = [
275
239
  description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__TTS_DISABLE_CACHE__DESCRIPTION",
276
240
  defaultValue: false
277
241
  },
242
+ {
243
+ key: "sttVendor",
244
+ type: "sttSelect",
245
+ label: "_unused_",
246
+ description: "_unused_",
247
+ defaultValue: "",
248
+ params: {
249
+ languageKey: "config.sttLanguage",
250
+ modelKey: "config.sttDeepgramModel",
251
+ }
252
+ },
253
+ {
254
+ key: "sttLanguage",
255
+ type: "sttSelect",
256
+ label: "_unused_",
257
+ description: "_unused_",
258
+ defaultValue: "",
259
+ },
260
+ {
261
+ key: "sttDeepgramModel",
262
+ type: "sttSelect",
263
+ label: "_unused_",
264
+ description: "_unused_",
265
+ defaultValue: "",
266
+ condition: {
267
+ key: "sttVendor",
268
+ value: "deepgram"
269
+ }
270
+ },
278
271
  {
279
272
  key: "ttsVendor",
280
273
  defaultValue: "",
@@ -696,7 +689,6 @@ exports.setSessionConfigNode = (0, createNodeDescriptor_1.createNodeDescriptor)(
696
689
  fields: [
697
690
  "sttVendor",
698
691
  "sttLabel",
699
- "sttDeepgramTier",
700
692
  "deepgramEndpointing",
701
693
  "deepgramEndpointingValue",
702
694
  "deepgramSmartFormatting",
@@ -242,18 +242,31 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
242
242
  description: "_unused_",
243
243
  defaultValue: "",
244
244
  params: {
245
- languageKey: "config.sttLanguage"
245
+ languageKey: "config.sttLanguage",
246
+ modelKey: "config.sttDeepgramModel"
246
247
  },
247
248
  condition: {
248
249
  key: "transferType",
249
250
  value: "dial"
250
251
  }
251
252
  },
253
+ {
254
+ key: "sttDeepgramModel",
255
+ type: "sttSelect",
256
+ label: "_unused_",
257
+ description: "_unused_",
258
+ defaultValue: "nova-2",
259
+ condition: {
260
+ key: "sttVendor",
261
+ value: "deepgram"
262
+ }
263
+ },
252
264
  {
253
265
  key: "sttLanguage",
254
266
  type: "sttSelect",
267
+ label: "_unused_",
268
+ description: "_unused_",
255
269
  defaultValue: "",
256
- label: "_unused_"
257
270
  },
258
271
  {
259
272
  key: "sttDisablePunctuation",
@@ -274,26 +287,6 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
274
287
  ]
275
288
  }
276
289
  },
277
- {
278
- key: "sttDeepgramTier",
279
- type: "sttTierModelSelect",
280
- label: "_unused_",
281
- description: "_unused_",
282
- defaultValue: "base",
283
- params: {
284
- languageKey: "config.sttDeepgramModel"
285
- },
286
- condition: {
287
- key: "sttVendor",
288
- value: "deepgram"
289
- }
290
- },
291
- {
292
- key: "sttDeepgramModel",
293
- type: "sttTierModelSelect",
294
- defaultValue: "general",
295
- label: "_unused_"
296
- },
297
290
  {
298
291
  key: "deepgramEndpointing",
299
292
  type: "toggle",
@@ -396,7 +389,6 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
396
389
  "sttVendor",
397
390
  "sttLabel",
398
391
  "sttDisablePunctuation",
399
- "sttDeepgramTier",
400
392
  "deepgramEndpointing",
401
393
  "deepgramEndpointingValue",
402
394
  "deepgramSmartFormatting",
@@ -480,7 +472,7 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
480
472
  summary: "UI__NODE_EDITOR__VOICEGATEWAY2__TRANSFER__SUMMARY",
481
473
  function: async ({ cognigy, config, organisationId, projectId }) => {
482
474
  const { api, input } = cognigy;
483
- const { transferType, transferTarget, referredBy, useTransferSipHeaders, transferSipHeaders = {}, transferReason, dialMusic, dialTranscriptionWebhook, dialCallerId, recognitionChannel, sttVendor, sttLanguage, sttDisablePunctuation, dialTimeout, amdEnabled, amdRedirectOnMachineDetected, amdRedirectText, sttLabel, googleModel, sttDeepgramTier, sttDeepgramModel, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting, agentAssistEnabled, agentAssistHeadersKey = customHeaderDefaultValue } = config;
475
+ const { transferType, transferTarget, referredBy, useTransferSipHeaders, transferSipHeaders = {}, transferReason, dialMusic, dialTranscriptionWebhook, dialCallerId, recognitionChannel, sttVendor, sttLanguage, sttDisablePunctuation, dialTimeout, amdEnabled, amdRedirectOnMachineDetected, amdRedirectText, sttLabel, googleModel, sttDeepgramModel, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting, agentAssistEnabled, agentAssistHeadersKey = customHeaderDefaultValue } = config;
484
476
  const transferParams = {
485
477
  transferType,
486
478
  transferReason,
@@ -539,7 +531,7 @@ exports.transferNode = (0, createNodeDescriptor_1.createNodeDescriptor)({
539
531
  transferParams.useTransferSipHeaders = false;
540
532
  api.log("error", "Invalid JSON in Transfer SIP Headers");
541
533
  }
542
- const payload = transfer_mapper_1.transfer.handleInput("voiceGateway2", transferParams, false, recognitionChannel, sttVendor, sttLanguage, googleModel, sttDeepgramTier, sttDeepgramModel, sttDisablePunctuation, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting);
534
+ const payload = transfer_mapper_1.transfer.handleInput("voiceGateway2", transferParams, false, recognitionChannel, sttVendor, sttLanguage, googleModel, sttDeepgramModel, sttDisablePunctuation, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting);
543
535
  api.say(null, {
544
536
  _cognigy: payload,
545
537
  });
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLLMEntityExtractSystemMessage = exports.getLLMEntityExtractPrompt = void 0;
4
+ /**
5
+ * Helper function for the LLM Entity Extract functionality
6
+ * @param entityName Name of the entity to extract
7
+ * @param entityDescription Description of the entity to extract
8
+ * @param examples Examples of the entity to extract
9
+ * @param text The text to extract the entity from
10
+ * @returns The prompt for the LLM Entity Extract functionality
11
+ */
12
+ const getLLMEntityExtractPrompt = (entityName, entityDescription, examples, text) => {
13
+ let formattedExamples = "";
14
+ examples && Object.keys(examples).forEach((key) => {
15
+ formattedExamples += `- "${key}" - { "${entityName}": "` + examples[key] + `" }\n`;
16
+ });
17
+ // add one negative example to formattedExamples
18
+ formattedExamples += `- "sdf sdf sdf" - { "${entityName}": null }\n`;
19
+ const prompt = `Your task is to parse an unstructured text and return a valid JSON with an extracted entity.
20
+ The entity you're to extract is ${entityName} - ${entityDescription}.
21
+ If you can't find a ${entityName}, return { "${entityName}": null }.
22
+ Examples:
23
+ ${formattedExamples}
24
+
25
+ The given text is: "${text}"
26
+
27
+ Answer: {"${entityName}":`;
28
+ return prompt;
29
+ };
30
+ exports.getLLMEntityExtractPrompt = getLLMEntityExtractPrompt;
31
+ /**
32
+ * Helper function for the LLM Entity Extract functionality
33
+ * @param entityName Name of the entity to extract
34
+ * @param entityDescription Description of the entity to extract
35
+ * @param examples Examples of the entity to extract
36
+ * @returns The system instrctions for the LLM Entity Extract functionality when using chat models
37
+ */
38
+ const getLLMEntityExtractSystemMessage = (entityName, entityDescription, examples) => {
39
+ let formattedExamples = "";
40
+ examples && Object.keys(examples).forEach((key) => {
41
+ formattedExamples += `- "${key}" - { "${entityName}": "` + examples[key] + `" }\n`;
42
+ });
43
+ // add one negative example to formattedExamples
44
+ formattedExamples += `- "sdf sdf sdf" - { "${entityName}": null }\n`;
45
+ const prompt = `Your task is to parse an unstructured text and return a valid JSON with an extracted entity.
46
+ The entity you're to extract is ${entityName} - ${entityDescription}.
47
+ If you can't find a ${entityName}, return { "${entityName}": null }.
48
+ Examples:
49
+ ${formattedExamples}
50
+
51
+ Answer: {"${entityName}":`;
52
+ return prompt;
53
+ };
54
+ exports.getLLMEntityExtractSystemMessage = getLLMEntityExtractSystemMessage;
55
+ //# sourceMappingURL=generativeAIPrompts.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAppSession.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ISetAppState.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -6,6 +6,12 @@ exports.fileStorageSettingsSchema = {
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
+ "enabled": {
10
+ "type": "boolean"
11
+ },
12
+ "dropzoneText": {
13
+ "type": "string"
14
+ },
9
15
  "storageProvider": {
10
16
  "type": "string"
11
17
  },
@@ -3,7 +3,7 @@
3
3
  * MODELS
4
4
  **********/
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.modeType = exports.generativeAIUseCases = exports.generativeAIProviders = exports.generativeAIModels = void 0;
6
+ exports.modeType = exports.generativeAIUseCases = exports.generativeAIProviders = exports.modelGroups = exports.generativeAIModels = exports.embeddingModels = void 0;
7
7
  /**
8
8
  * @openapi
9
9
  *
@@ -21,23 +21,51 @@ exports.modeType = exports.generativeAIUseCases = exports.generativeAIProviders
21
21
  * - luminous-embedding-128
22
22
  * - claude-v1-100k
23
23
  * - claude-instant-v1
24
+ * - claude-3-opus-20240229
24
25
  * - text-bison@001
25
26
  */
26
27
  /**
27
28
  * WARNING: if new models are added for the supported providers make suer we also update the
28
29
  * maxAllowed tokens in the openAI.ts and azureOpenAI.ts files
29
30
  */
31
+ exports.embeddingModels = [
32
+ "text-embedding-3-large",
33
+ "text-embedding-ada-002",
34
+ "luminous-embedding-128",
35
+ ];
30
36
  exports.generativeAIModels = [
31
37
  "gpt-3.5-turbo",
32
38
  "gpt-3.5-turbo-instruct",
33
39
  "gpt-4",
34
40
  "text-davinci-003",
35
- "text-embedding-ada-002",
36
41
  "luminous-extended-control",
37
- "luminous-embedding-128",
38
42
  "claude-v1-100k",
39
43
  "claude-instant-v1",
44
+ "claude-3-opus-20240229",
45
+ "claude-3-haiku-20240307",
46
+ "claude-3-sonnet-20240229",
40
47
  "text-bison@001",
48
+ "custom-model",
49
+ ...exports.embeddingModels,
50
+ ];
51
+ /**
52
+ * @openapi
53
+ *
54
+ * components:
55
+ * schemas:
56
+ * TModelGroups:
57
+ * type: string
58
+ * enum:
59
+ * - chat
60
+ * - completion
61
+ */
62
+ /**
63
+ /**
64
+ * this is the model type for the custom models introduced by the user
65
+ */
66
+ exports.modelGroups = [
67
+ "chat",
68
+ "completion"
41
69
  ];
42
70
  /*************
43
71
  * PROVIDERS
@@ -65,6 +93,7 @@ exports.generativeAIProviders = ["azureOpenAI", "openAI", "alephAlpha", "anthrop
65
93
  * mongoose schema too. models/settings/generativeAISettings.ts
66
94
  */
67
95
  exports.generativeAIUseCases = [
96
+ "nlu",
68
97
  "knowledgeSearch",
69
98
  "gptPromptNode",
70
99
  "gptConversation",
@@ -119,7 +119,8 @@ exports.foreignSessionDataSchema = {
119
119
  lastname: { type: "string" },
120
120
  nickname: { type: "string" },
121
121
  integrationId: { type: "string" },
122
- conversationId: { type: "string" }
122
+ conversationId: { type: "string" },
123
+ clientPollTimeout: { type: "number" },
123
124
  }
124
125
  };
125
126
  exports.rceSettingsSchema = {
@@ -75,6 +75,18 @@ exports.businessHoursMenuSchema = {
75
75
  }
76
76
  }
77
77
  },
78
+ times: {
79
+ type: "array",
80
+ items: {
81
+ type: "object",
82
+ additionalProperties: false,
83
+ properties: {
84
+ startTime: { type: "string" },
85
+ endTime: { type: "string" },
86
+ weekDay: { type: "string" },
87
+ }
88
+ }
89
+ },
78
90
  enabled: { type: "boolean" },
79
91
  mode: { type: "string" },
80
92
  text: { type: "string" },
@@ -130,12 +142,12 @@ const callFailoverSettingsSchema = {
130
142
  dialTranscribeRecognitionChannel: { type: "number" },
131
143
  dialTranscribeRecognitionGoogleModel: { type: 'string' },
132
144
  dialTranscribeLabel: { type: "string" },
133
- dialTranscribeDeepgramTier: { type: 'string' },
134
145
  dialTranscribeDeepgramModel: { type: 'string' },
135
146
  referredBy: { type: "string" },
136
147
  deepgramSmartFormatting: { type: "boolean" },
137
148
  deepgramEndpointing: { type: "boolean" },
138
- deepgramEndpointingValue: { type: "number" }
149
+ deepgramEndpointingValue: { type: "number" },
150
+ dialTranscribeDeepgramTier: { type: "string" }
139
151
  }
140
152
  };
141
153
  exports.callEventSettingsSchema = {
@@ -582,6 +594,7 @@ exports.AMAZON_POLLY_LANGUAGE_MAPPING = {
582
594
  { voice: "Polly.Astrid", gender: "female" }
583
595
  ]
584
596
  };
597
+ [];
585
598
  exports.avayaEndpointSettingsSchema = {
586
599
  type: "object",
587
600
  properties: {
@@ -250,8 +250,12 @@ exports.pollAgentRepliesEventSchema = {
250
250
  handoverSettings: handover_1.handoverSettingsSchema,
251
251
  foreignSessionData: handover_1.foreignSessionDataSchema,
252
252
  foreignSessionId: { type: "string" },
253
+ organisation: { type: "string" },
254
+ sessionId: { type: "string" },
253
255
  traceId: { type: "string" },
254
- disableSensitiveLogging: { type: "boolean" }
256
+ disableSensitiveLogging: { type: "boolean" },
257
+ pollingTimeoutAt: { type: "number" },
258
+ sequence: { type: "number" }
255
259
  },
256
260
  };
257
261
  exports.handleHandoverRpcEventSchema = {
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=nlu.js.map
@@ -7,7 +7,7 @@ exports.auditEventTypes = [
7
7
  "replace",
8
8
  "patch",
9
9
  "delete",
10
- "unauthorized"
10
+ "unauthorized",
11
11
  ];
12
12
  exports.actionTypes = [
13
13
  "acceptTermsOfService",
@@ -35,6 +35,7 @@ exports.actionTypes = [
35
35
  "cancelTask",
36
36
  "changePlaybookStepOrder",
37
37
  "cloneFlow",
38
+ "cloneMilestone",
38
39
  "cloneLargeLanguageModel",
39
40
  "configureIdentityProvider",
40
41
  "createKnowledgeSearchIndex",
@@ -105,7 +106,7 @@ exports.actionTypes = [
105
106
  "updateFlowSettings",
106
107
  "optionsResolver",
107
108
  "processKnowledgeSourceUrl",
108
- "processKnowledgeSourceFile"
109
+ "processKnowledgeSourceFile",
109
110
  ];
110
111
  exports.auditEventSchema = {
111
112
  title: "auditEventSchema",
@@ -117,14 +118,14 @@ exports.auditEventSchema = {
117
118
  "user",
118
119
  "userReference",
119
120
  "organisationReference",
120
- "expiresAt"
121
+ "expiresAt",
121
122
  ],
122
123
  properties: {
123
124
  _id: { type: "string", format: "mongo-id" },
124
125
  timestamp: { type: "object", format: "date-time" },
125
126
  type: {
126
127
  type: "string",
127
- enum: [...exports.auditEventTypes]
128
+ enum: [...exports.auditEventTypes],
128
129
  },
129
130
  actionType: { type: "string", enum: [...exports.actionTypes] },
130
131
  user: { type: "string", format: "email" },
@@ -139,13 +140,13 @@ exports.auditEventSchema = {
139
140
  additionalProperties: false,
140
141
  properties: {
141
142
  elementId: { type: "string", format: "mongo-id" },
142
- elementType: { type: "string" }
143
- }
144
- }
143
+ elementType: { type: "string" },
144
+ },
145
+ },
145
146
  },
146
147
  expiresAt: { type: "object", format: "date-time" },
147
148
  payload: { type: "string" },
148
- projectReference: { type: "string", format: "mongo-id" }
149
- }
149
+ projectReference: { type: "string", format: "mongo-id" },
150
+ },
150
151
  };
151
152
  //# sourceMappingURL=IAuditEvent.js.map
@@ -1,28 +1,37 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.largeLanguageModelQuerySchema = exports.largeLanguageModelSchema = exports.largeLanguageModelDataSchema = exports.googleVertexAIMeataSchema = exports.azureOpenAIMeataSchema = exports.openAIMeataSchema = exports.alephAlphaMeataSchema = void 0;
3
+ exports.largeLanguageModelQuerySchema = exports.largeLanguageModelSchema = exports.largeLanguageModelDataSchema = exports.googleVertexAIMetaSchema = exports.azureOpenAIMetaSchema = exports.openAIMetaSchema = exports.alephAlphaMetaSchema = exports.anthropicMetaSchema = void 0;
4
4
  /* Custom Modules */
5
5
  const createQuerySchema_1 = require("../../helper/createQuerySchema");
6
6
  const IEntityMeta_1 = require("./IEntityMeta");
7
7
  const IGenerativeAIModels_1 = require("../generativeAI/IGenerativeAIModels");
8
- exports.alephAlphaMeataSchema = {
9
- title: "alephAlphaMeataSchema",
8
+ exports.anthropicMetaSchema = {
9
+ title: "anthropicMetaSchema",
10
10
  type: "object",
11
11
  additionalProperties: false,
12
12
  properties: {
13
- customModel: { type: "string" }
13
+ customModel: { type: ["string", "null"] }
14
14
  }
15
15
  };
16
- exports.openAIMeataSchema = {
17
- title: "openAIMeataSchema",
16
+ exports.alephAlphaMetaSchema = {
17
+ title: "alephAlphaMetaSchema",
18
18
  type: "object",
19
19
  additionalProperties: false,
20
20
  properties: {
21
- customModel: { type: "string" }
21
+ customModel: { type: ["string", "null"] },
22
+ baseCustomUrl: { type: ["string", "null"] },
23
+ }
24
+ };
25
+ exports.openAIMetaSchema = {
26
+ title: "openAIMetaSchema",
27
+ type: "object",
28
+ additionalProperties: false,
29
+ properties: {
30
+ customModel: { type: ["string", "null"] }
22
31
  }
23
32
  };
24
- exports.azureOpenAIMeataSchema = {
25
- title: "azureOpenAIMeataSchema",
33
+ exports.azureOpenAIMetaSchema = {
34
+ title: "azureOpenAIMetaSchema",
26
35
  type: "object",
27
36
  additionalProperties: false,
28
37
  properties: {
@@ -30,37 +39,42 @@ exports.azureOpenAIMeataSchema = {
30
39
  deploymentName: { type: ["string", "null"] },
31
40
  apiVersion: { type: ["string", "null"] },
32
41
  baseCustomUrl: { type: ["string", "null"] },
42
+ customModel: { type: ["string", "null"] }
33
43
  }
34
44
  };
35
- exports.googleVertexAIMeataSchema = {
36
- title: "googleVertexAIMeataSchema",
45
+ exports.googleVertexAIMetaSchema = {
46
+ title: "googleVertexAIMetaSchema",
37
47
  type: "object",
38
48
  additionalProperties: false,
39
49
  properties: {
40
50
  apiEndPoint: { type: "string", format: "resource-name" },
41
51
  location: { type: "string", format: "resource-name" },
42
- publisher: { type: ["string", "null"] }
52
+ publisher: { type: ["string", "null"] },
53
+ customModel: { type: ["string", "null"] },
43
54
  }
44
55
  };
45
56
  exports.largeLanguageModelDataSchema = {
46
57
  title: "largeLanguageModelDataSchema",
47
58
  type: "object",
48
59
  additionalProperties: false,
49
- required: [
50
- "name",
51
- "modelType",
60
+ oneOf: [
61
+ { required: ["name", "modelType",] },
62
+ { required: ["name", "modelType", "modelGroup", "isCustomModel"] }
52
63
  ],
53
64
  properties: {
54
65
  name: { type: "string", format: "resource-name" },
55
66
  description: { type: "string", format: "resource-description" },
56
- modelType: { type: "string", enum: [...IGenerativeAIModels_1.generativeAIModels] },
67
+ modelType: { type: "string" } /* wildcard string for the Custom Models */,
68
+ isCustomModel: { type: "boolean" },
69
+ modelGroup: { type: "string", enum: [...IGenerativeAIModels_1.modelGroups] },
57
70
  provider: { type: "string", enum: [...IGenerativeAIModels_1.generativeAIProviders] },
58
71
  connectionId: { type: "string", format: "uuid" },
59
72
  isDefault: { type: "boolean" },
60
- openAI: exports.openAIMeataSchema,
61
- azureOpenAI: exports.azureOpenAIMeataSchema,
62
- googleVertexAI: exports.googleVertexAIMeataSchema,
63
- alephAlpha: exports.alephAlphaMeataSchema
73
+ openAI: exports.openAIMetaSchema,
74
+ azureOpenAI: exports.azureOpenAIMetaSchema,
75
+ googleVertexAI: exports.googleVertexAIMetaSchema,
76
+ alephAlpha: exports.alephAlphaMetaSchema,
77
+ anthropic: exports.anthropicMetaSchema
64
78
  }
65
79
  };
66
80
  exports.largeLanguageModelSchema = {
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.milestoneSchema = exports.milestoneDataSchema = exports.milestoneStepSchema = exports.milestoneStepMetricSchema = void 0;
4
+ const IEntityMeta_1 = require("./IEntityMeta");
5
+ exports.milestoneStepMetricSchema = {
6
+ title: "milestoneStepMetricSchema",
7
+ type: "object",
8
+ additionalProperties: false,
9
+ properties: {
10
+ _id: { type: "string", format: "mongo-id" },
11
+ name: { type: "string" },
12
+ description: { type: "string" },
13
+ type: { type: "string", enum: ["currency", "duration"] },
14
+ value: { type: "number" },
15
+ },
16
+ };
17
+ exports.milestoneStepSchema = {
18
+ title: "milestoneStepSchema",
19
+ type: "object",
20
+ additionalProperties: false,
21
+ properties: {
22
+ _id: { type: "string", format: "mongo-id" },
23
+ name: { type: "string" },
24
+ description: { type: "string" },
25
+ order: { type: "number" },
26
+ type: { type: "string", enum: ["start", "completion"] },
27
+ metrics: {
28
+ type: "array",
29
+ items: exports.milestoneStepMetricSchema,
30
+ },
31
+ },
32
+ };
33
+ exports.milestoneDataSchema = {
34
+ title: "milestoneDataSchema",
35
+ type: "object",
36
+ additionalProperties: false,
37
+ properties: {
38
+ version: { type: "number" },
39
+ description: { type: "string" },
40
+ name: { type: "string", format: "resource-name" },
41
+ steps: { type: "array", items: exports.milestoneStepSchema },
42
+ },
43
+ };
44
+ exports.milestoneSchema = {
45
+ title: "milestoneSchema",
46
+ type: "object",
47
+ additionalProperties: false,
48
+ properties: Object.assign(Object.assign(Object.assign({}, exports.milestoneDataSchema.properties), IEntityMeta_1.entityMetaSchema.properties), { referenceId: { type: "string", format: "uuid" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } }),
49
+ };
50
+ //# sourceMappingURL=IMilestone.js.map