@cognigy/rest-api-client 0.15.0 → 0.17.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 (146) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/build/GenericTusFn.js +64 -0
  3. package/build/RestAPIClient.js +3 -0
  4. package/build/apigroups/AdministrationAPIGroup_2_0.js +7 -2
  5. package/build/apigroups/ResourcesAPIGroup_2_0.js +28 -23
  6. package/build/{shared/interfaces/agentAssist/ISendTileUpdateReferenceParams.js → apigroups/TTusAPIOperation.js} +1 -1
  7. package/build/apigroups/index.js +2 -0
  8. package/build/connector/AxiosAdapter.js +5 -4
  9. package/build/shared/charts/descriptors/agentAssist/constants/constants.js +7 -0
  10. package/build/shared/charts/descriptors/agentAssist/helpers/sentiment.helper.js +41 -0
  11. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/identityAssistTemplate.js +54 -0
  12. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/knowledgeAssistTemplate.js +203 -0
  13. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/nextActionWidgetTemplate.js +93 -0
  14. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage0.js +81 -0
  15. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage1.js +84 -0
  16. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage2.js +97 -0
  17. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stageError.js +85 -0
  18. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/sentimentAnalysisTemplate.js +41 -0
  19. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/stylesPartial.js +15 -0
  20. package/build/shared/charts/descriptors/agentAssist/htmlTemplates/transcriptAssistTemplate.js +53 -0
  21. package/build/shared/charts/descriptors/agentAssist/identityAssist.js +135 -0
  22. package/build/shared/charts/descriptors/agentAssist/index.js +15 -1
  23. package/build/shared/charts/descriptors/agentAssist/knowledgeAssist.js +625 -0
  24. package/build/shared/charts/descriptors/agentAssist/nextActionAssist.js +77 -0
  25. package/build/shared/charts/descriptors/agentAssist/sentimentAssist.js +86 -0
  26. package/build/shared/charts/descriptors/agentAssist/setAdaptiveCardTile.js +2 -2
  27. package/build/shared/charts/descriptors/agentAssist/setAgentAssistGrid.js +120 -0
  28. package/build/shared/charts/descriptors/agentAssist/setHtmlTile.js +2 -2
  29. package/build/shared/charts/descriptors/agentAssist/setIframeTile.js +2 -2
  30. package/build/shared/charts/descriptors/agentAssist/setSecureFormsTile.js +171 -0
  31. package/build/shared/charts/descriptors/agentAssist/transcriptAssist.js +72 -0
  32. package/build/shared/charts/descriptors/allFields.js +12 -0
  33. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/TGenerativeAIConnectionFields.js +3 -0
  34. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/alephAlphaProviderConnection.js +11 -0
  35. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/anthropicProviderConnection.js +1 -1
  36. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderConnectionV2.js +1 -1
  37. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +6 -2
  38. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/openAIProviderConnection.js +1 -1
  39. package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/amazonStorageProviderConnection.js +4 -4
  40. package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/azureBlobStorageProviderConnection.js +3 -3
  41. package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/googleCloudStorageProviderConnection.js +3 -3
  42. package/build/shared/charts/descriptors/connectionNodes/mongoDB/mongoDBConnection.js +1 -1
  43. package/build/shared/charts/descriptors/connectionNodes/smtp/oAuth2Connection.js +8 -8
  44. package/build/shared/charts/descriptors/connectionNodes/smtp/serviceConnection.js +2 -2
  45. package/build/shared/charts/descriptors/connectionNodes/smtp/smtpConnection.js +5 -5
  46. package/build/shared/charts/descriptors/connectionNodes/speechProviders/awsSpeechProviderConnection.js +4 -4
  47. package/build/shared/charts/descriptors/connectionNodes/speechProviders/microsoftSpeechProviderConnection.js +2 -2
  48. package/build/shared/charts/descriptors/connectionNodes/sql/sqlConnection.js +5 -5
  49. package/build/shared/charts/descriptors/connectionNodes/translationProviders/deeplTranslationProviderConnection.js +15 -0
  50. package/build/shared/charts/descriptors/connectionNodes/translationProviders/googleTranslationProviderConnection.js +15 -0
  51. package/build/shared/charts/descriptors/connectionNodes/translationProviders/index.js +23 -0
  52. package/build/shared/charts/descriptors/connectionNodes/translationProviders/microsoftTranslationProviderConnection.js +21 -0
  53. package/build/shared/charts/descriptors/index.js +13 -2
  54. package/build/shared/charts/descriptors/knowledgeSearch/constants/constants.js +6 -0
  55. package/build/shared/charts/descriptors/knowledgeSearch/index.js +5 -1
  56. package/build/shared/charts/descriptors/knowledgeSearch/knowledgeSearch.js +7 -2
  57. package/build/shared/charts/descriptors/knowledgeSearch/knowledgeSearchV2.js +151 -0
  58. package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +985 -0
  59. package/build/shared/charts/descriptors/logic/goTo.js +2 -0
  60. package/build/shared/charts/descriptors/message/question/optionalQuestion.js +2 -2
  61. package/build/shared/charts/descriptors/message/question/question.js +215 -8
  62. package/build/shared/charts/descriptors/nlu/cleanText.js +1 -0
  63. package/build/shared/charts/descriptors/nlu/generativeSlotFiller/prompt.js +107 -5
  64. package/build/shared/charts/descriptors/service/GPTConversation.js +125 -23
  65. package/build/shared/charts/descriptors/service/GPTPrompt.js +148 -12
  66. package/build/shared/charts/descriptors/service/checkAgentAvailability.js +15 -1
  67. package/build/shared/charts/descriptors/service/handoverV2.js +45 -0
  68. package/build/shared/{interfaces/twilioInterface.js → charts/descriptors/voice/interface/IBandwidth.js} +1 -1
  69. package/build/shared/charts/descriptors/voice/mappers/base.mapper.js +14 -0
  70. package/build/shared/charts/descriptors/voice/mappers/hangup.mapper.js +26 -0
  71. package/build/shared/charts/descriptors/voice/mappers/muteSpeechInput.mapper.js +17 -2
  72. package/build/shared/charts/descriptors/voice/mappers/play.mapper.js +54 -0
  73. package/build/shared/charts/descriptors/voice/mappers/record.mapper.js +7 -0
  74. package/build/shared/charts/descriptors/voice/mappers/sendMetadata.mapper.js +15 -0
  75. package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +56 -20
  76. package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +39 -13
  77. package/build/shared/charts/descriptors/voice/nodes/muteSpeechInput.js +1 -1
  78. package/build/shared/charts/descriptors/voice/nodes/play.js +1 -1
  79. package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +120 -29
  80. package/build/shared/charts/descriptors/voice/nodes/transfer.js +11 -3
  81. package/build/shared/charts/descriptors/voice/utils/vgConstants.js +14 -0
  82. package/build/shared/charts/descriptors/voicegateway/index.js +14 -11
  83. package/build/shared/charts/descriptors/voicegateway/utils/paramUtils.js +1 -5
  84. package/build/shared/charts/descriptors/voicegateway2/nodes/muteSpeechInput.js +12 -1
  85. package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +6 -0
  86. package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +159 -36
  87. package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +296 -43
  88. package/build/shared/charts/descriptors/voicegateway2/utils/helper.js +30 -4
  89. package/build/shared/charts/helpers/generativeAI/rephraseSentenceWithAi.js +1 -1
  90. package/build/shared/constants.js +5 -1
  91. package/build/shared/handoverClients/interfaces/THandoverEventType.js +3 -1
  92. package/build/shared/helper/BaseContext.js +33 -15
  93. package/build/shared/helper/nlu/textCleaner.js +25 -3
  94. package/build/shared/interfaces/IEndpointTranslationSettings.js +9 -0
  95. package/build/shared/interfaces/IOrganisation.js +2 -1
  96. package/build/shared/interfaces/agentAssist/ISendConfigUpdateParams.js +3 -0
  97. package/build/shared/interfaces/agentAssist/ISendUpdateReferenceParams.js +3 -0
  98. package/build/shared/interfaces/amqpInterface.js +18 -22
  99. package/build/shared/interfaces/channels/genesysBotConnector.js +21 -0
  100. package/build/shared/interfaces/channels/niceCXOne.js +8 -0
  101. package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +17 -7
  102. package/build/shared/interfaces/handover.js +57 -3
  103. package/build/shared/interfaces/journeys/IJourney.js +6 -0
  104. package/build/shared/interfaces/journeys/IJourneyTrackEvent.js +2 -0
  105. package/build/shared/interfaces/messageAPI/endpoints.js +93 -8
  106. package/build/shared/interfaces/messageAPI/handover.js +4 -4
  107. package/build/shared/interfaces/resources/IAuditEvent.js +1 -0
  108. package/build/shared/interfaces/resources/IConnectionSchema.js +3 -0
  109. package/build/shared/interfaces/resources/IEndpoint.js +1 -0
  110. package/build/shared/interfaces/resources/IExtension.js +3 -0
  111. package/build/shared/interfaces/resources/ILargeLanguageModel.js +24 -5
  112. package/build/shared/interfaces/resources/INodeDescriptorSet.js +24 -1
  113. package/build/shared/interfaces/resources/TNLUConnectorType.js +0 -1
  114. package/build/shared/interfaces/resources/TRestChannelType.js +16 -11
  115. package/build/shared/interfaces/resources/TSocketChannelType.js +5 -1
  116. package/build/shared/interfaces/resources/TWebhookChannelType.js +6 -1
  117. package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeChunk.js +21 -3
  118. package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeSource.js +13 -2
  119. package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeStore.js +1 -1
  120. package/build/shared/interfaces/resources/settings/IAgentSettings.js +3 -23
  121. package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
  122. package/build/shared/interfaces/resources/settings/ITranslationSettings.js +63 -0
  123. package/build/shared/interfaces/resources/settings/index.js +4 -1
  124. package/build/shared/interfaces/restAPI/administration/voiceGateway/v2.0/IReadVoiceGatewayAccountRest_2_0.js +3 -0
  125. package/build/shared/interfaces/restAPI/administration/voiceGateway/v2.0/ISetupVoiceGatewayAccountRest_2_0.js +3 -0
  126. package/build/shared/interfaces/restAPI/administration/voiceGateway/v2.0/index.js +3 -0
  127. package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/ICallCounterAggregatedValue_2_0.js +3 -0
  128. package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/IGetCallCounterOrganisationRest_2_0.js +3 -0
  129. package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/IGetCallCounterRest_2_0.js +3 -0
  130. package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/index.js +3 -0
  131. package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/IGetKnowledgeQueryCounterOrganisationRest_2_0.js +3 -0
  132. package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/IGetKnowledgeQueryCounterRest_2_0.js +3 -0
  133. package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/IKnowlegeQueryCounterAggregatedValue_2_0.js +3 -0
  134. package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/index.js +3 -0
  135. package/build/shared/interfaces/restAPI/resources/nluconnector/v2.0/TNLUConnectorType_2_0.js +0 -2
  136. package/build/shared/interfaces/restAPI/resources/uploadResumable/v2.0/IUploadResumableRest_2_0.js +17 -0
  137. package/build/shared/interfaces/restAPI/resources/uploadResumable/v2.0/index.js +3 -0
  138. package/build/shared/interfaces/security/ICallCounterAggregatedValue.js +3 -0
  139. package/build/shared/interfaces/security/IKnowledgeQueryCounterAggregatedValue.js +3 -0
  140. package/build/shared/interfaces/security/IPermission.js +3 -0
  141. package/build/shared/interfaces/security/IRole.js +9 -1
  142. package/build/shared/interfaces/security/index.js +2 -1
  143. package/build/shared/interfaces/trainer/ITrainerRecord.js +2 -0
  144. package/build/test.js +27 -0
  145. package/package.json +19 -17
  146. package/types/index.d.ts +823 -140
@@ -34,6 +34,14 @@ class BaseContext {
34
34
  createProxy(initial = {}) {
35
35
  return new Proxy(initial, {
36
36
  set: (obj, prop, value) => {
37
+ if (!prop) {
38
+ logger_1.logger.log("debug", { traceId: this.traceId, disableSensitiveLogging: true }, `Trying to set context with an invalid key '${prop === null || prop === void 0 ? void 0 : prop.toString()}' (context with an invalid key cannot be set).`, {
39
+ key: prop,
40
+ module: "BaseContext.ts",
41
+ function: "set:createProxy"
42
+ });
43
+ return true;
44
+ }
37
45
  if (this.ignoreTrapHandler) {
38
46
  obj[prop] = value;
39
47
  return true;
@@ -71,20 +79,13 @@ class BaseContext {
71
79
  * @memberOf Context
72
80
  */
73
81
  importContext(data, traceId, replace) {
74
- var _a;
75
82
  if (replace) {
76
- if (typeof data !== 'object' || data !== null) {
83
+ if (typeof data !== 'object' && data !== null) {
77
84
  logger_1.logger.log("debug", { traceId }, `[importContext] Trying to replace context with data that is not an object`, {
78
85
  organisationId: this.organisationId,
79
86
  projectId: this.projectId,
80
87
  });
81
88
  }
82
- else {
83
- logger_1.logger.log("debug", { traceId }, `[importContext] Replacing the brains context, length: ${(_a = JSON.stringify(data)) === null || _a === void 0 ? void 0 : _a.length}`, {
84
- organisationId: this.organisationId,
85
- projectId: this.projectId,
86
- });
87
- }
88
89
  // make a deep copy of the provided 'data' to get rid of references.
89
90
  // we also do not allow 'null' as an input
90
91
  const deepCopy = JSON.parse(JSON.stringify(data));
@@ -111,18 +112,12 @@ class BaseContext {
111
112
  }
112
113
  }
113
114
  else {
114
- if (typeof data !== 'object' || data !== null) {
115
+ if (typeof data !== 'object' && data !== null) {
115
116
  logger_1.logger.log("debug", { traceId }, `[importContext] Trying to set context for data that is not an object`, {
116
117
  organisationId: this.organisationId,
117
118
  projectId: this.projectId,
118
119
  });
119
120
  }
120
- else {
121
- logger_1.logger.log("debug", { traceId }, `[importContext] Set context for ${Object.keys(data).length} keys`, {
122
- organisationId: this.organisationId,
123
- projectId: this.projectId,
124
- });
125
- }
126
121
  for (let c in data) {
127
122
  this.setContext(c, data[c], traceId);
128
123
  }
@@ -136,6 +131,14 @@ class BaseContext {
136
131
  * @memberOf Context
137
132
  */
138
133
  getContext(key) {
134
+ if (!key) {
135
+ logger_1.logger.log("debug", { traceId: this.traceId, disableSensitiveLogging: true }, `Trying to get context with an invalid key '${key}' (context with an invalid key cannot be accessed).`, {
136
+ key,
137
+ module: "BaseContext.ts",
138
+ function: "getContext"
139
+ });
140
+ return undefined;
141
+ }
139
142
  let s = [];
140
143
  if (key.indexOf(".") > -1)
141
144
  s = key.split(".");
@@ -172,6 +175,14 @@ class BaseContext {
172
175
  * @memberOf Context
173
176
  */
174
177
  setContext(key, value, traceId) {
178
+ if (!key) {
179
+ logger_1.logger.log("debug", { traceId, disableSensitiveLogging: true }, `Trying to set context with an invalid key '${key}' (context with an invalid key cannot be set).`, {
180
+ key,
181
+ module: "BaseContext.ts",
182
+ function: "setContext"
183
+ });
184
+ return;
185
+ }
175
186
  this.context[key] = value;
176
187
  }
177
188
  /**
@@ -227,6 +238,13 @@ class BaseContext {
227
238
  * @memberOf Context
228
239
  */
229
240
  delete(key) {
241
+ if (!key) {
242
+ logger_1.logger.log("debug", { traceId: this.traceId, disableSensitiveLogging: true }, `Trying to delete key from the context with an invalid key '${key}' (context with an invalid key cannot be accessed).`, {
243
+ key,
244
+ module: "BaseContext.ts",
245
+ function: "delete"
246
+ });
247
+ }
230
248
  delete this.context[key];
231
249
  }
232
250
  /**
@@ -54,8 +54,8 @@ class TextCleaner {
54
54
  phrase = this.resolveSpelledOutNumbers(phrase, detailedSlots, false);
55
55
  if (!options || options.resolvePhoneticAlphabet)
56
56
  phrase = this.resolvePhoneticAlphabet(phrase);
57
- if (!options || options.replaceSpecialWords)
58
- phrase = this.replaceSpecialWords(phrase);
57
+ if (!options || options.replaceSpecialWords || options.replaceSpecialPhrases)
58
+ phrase = this.replaceSpecialPhrases(phrase);
59
59
  if (!options || options.resolveSpelledOutAlphabet)
60
60
  phrase = this.resolveSpelledOutAlphabet(phrase);
61
61
  if (!options || options.resolvePhoneticCounters)
@@ -136,6 +136,7 @@ class TextCleaner {
136
136
  /**
137
137
  * Replaces specifically determined words with their replacements
138
138
  * e.g. "färben" -> "verden"
139
+ * @deprecated Use replaceSpecialPhrases instead
139
140
  */
140
141
  replaceSpecialWords(phrase) {
141
142
  phrase = phrase.toLowerCase().replace(this.allowedSymbolsRegex, '');
@@ -159,6 +160,27 @@ class TextCleaner {
159
160
  phrase = cleanedWords.join(' ');
160
161
  return phrase;
161
162
  }
163
+ /**
164
+ * Replaces specifically determined phrases with their replacements
165
+ * e.g. "swiss airlines international" -> "SWISS"
166
+ */
167
+ replaceSpecialPhrases(phrase) {
168
+ // lowercase the whole dictSpecials
169
+ for (const [key, value] of Object.entries(this.dictSpecials)) {
170
+ this.dictSpecials[key.toLowerCase()] = value;
171
+ }
172
+ // Replace all double spaces with single spaces
173
+ let normalizedPhrase = phrase.replace(/\s+/g, ' ').toLowerCase();
174
+ for (let phraseToDetect of Object.keys(this.dictSpecials)) {
175
+ // make phrase regex-safe
176
+ phraseToDetect = phraseToDetect.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
177
+ const matches = normalizedPhrase.match(new RegExp(`\\b(${phraseToDetect})\\b`, 'gi'));
178
+ if (matches) {
179
+ normalizedPhrase = normalizedPhrase.replace(new RegExp(`\\b${matches[0]}\\b`, "gi"), this.dictSpecials[phraseToDetect]);
180
+ }
181
+ }
182
+ return normalizedPhrase;
183
+ }
162
184
  /**
163
185
  * Detects and replaces all words which are known in the spelling alphabet
164
186
  * e.g. "alpha tango lima" -> "a t l" or "anton ida otto" -> "a i o"
@@ -228,7 +250,7 @@ class TextCleaner {
228
250
  let matches;
229
251
  do {
230
252
  const allowedRepeaters = this.dictNumberMultipliers.join("|");
231
- const xMalYRegex = new RegExp(`(\\d){1}\\s*(${allowedRepeaters}|\\*)\\s*[die\\s]*(\\d+|\\w+)`, "gi");
253
+ const xMalYRegex = new RegExp(`(\\d+){1}\\s*(${allowedRepeaters}|\\*)\\s*[die\\s]*(\\d+|\\w+)`, "gi");
232
254
  phrase = phrase.replace(/\s\s/gi, ' ');
233
255
  matches = xMalYRegex.exec(phrase);
234
256
  if (matches && !isNaN(Number(matches[1])) && !isNaN(Number(matches[3]))) {
@@ -18,6 +18,15 @@ exports.translationSettingsEndpointSchema = {
18
18
  noTranslateMarker: {
19
19
  type: "string"
20
20
  },
21
+ glossaryId: {
22
+ type: "string"
23
+ },
24
+ glossaryIdInput: {
25
+ type: "string"
26
+ },
27
+ formality: {
28
+ type: "string"
29
+ },
21
30
  padPayloads: {
22
31
  type: "boolean"
23
32
  },
@@ -10,6 +10,7 @@ exports.organisationDataPrivacySettingsSchema = {
10
10
  properties: {
11
11
  enabled: { type: "boolean" },
12
12
  useAnalytics: { type: "boolean" },
13
+ storeDataPayload: { type: "boolean" },
13
14
  useContactProfiles: { type: "boolean" },
14
15
  useConversations: { type: "boolean" },
15
16
  maskIPAddress: { type: "boolean" },
@@ -59,7 +60,7 @@ exports.organisationSchema = {
59
60
  title: "organisationSchema",
60
61
  type: "object",
61
62
  additionalProperties: false,
62
- properties: Object.assign(Object.assign({ _id: { format: "mongo-id" } }, exports.organisationDataSchema.properties), { liveAgentAccount: { type: "number" } }),
63
+ properties: Object.assign(Object.assign({ _id: { format: "mongo-id" } }, exports.organisationDataSchema.properties), { liveAgentAccount: { type: "number" }, voiceGatewayAccount: { type: "string" } }),
63
64
  };
64
65
  exports.organisationQuerySchema = (0, createQuerySchema_1.createQuerySchema)("organisationQuerySchema", exports.organisationSchema);
65
66
  //# sourceMappingURL=IOrganisation.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ISendConfigUpdateParams.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ISendUpdateReferenceParams.js.map
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.executeRpcInternalParamsSchema = exports.referenceKeys = void 0;
4
- ;
5
4
  exports.referenceKeys = [
6
5
  "analyticsStepReference",
7
6
  "chartReference",
@@ -31,39 +30,33 @@ exports.referenceKeys = [
31
30
  exports.executeRpcInternalParamsSchema = {
32
31
  title: "executeRpcInternalParamsSchema",
33
32
  type: "object",
34
- required: [
35
- "serviceQueue",
36
- "payload"
37
- ],
33
+ required: ["serviceQueue", "payload"],
38
34
  additionalProperties: false,
39
35
  properties: {
40
36
  serviceQueue: {
41
37
  type: "string",
42
- minLength: 1
38
+ minLength: 1,
43
39
  },
44
40
  payload: {
45
41
  type: "object",
46
- required: [
47
- "type",
48
- "data",
49
- ],
42
+ required: ["type", "data"],
50
43
  properties: {
51
44
  type: {
52
45
  type: "string",
53
- minLength: 1
46
+ minLength: 1,
54
47
  },
55
48
  data: {
56
- type: "object"
57
- }
58
- }
49
+ type: "object",
50
+ },
51
+ },
59
52
  },
60
53
  timeout: {
61
54
  anyOf: [
62
55
  {
63
56
  type: ["integer", "null"],
64
- minimum: -1
65
- }
66
- ]
57
+ minimum: -1,
58
+ },
59
+ ],
67
60
  },
68
61
  consumerTag: {
69
62
  type: "string",
@@ -77,18 +70,21 @@ exports.executeRpcInternalParamsSchema = {
77
70
  type: "boolean",
78
71
  },
79
72
  reThrow: {
80
- type: "boolean"
73
+ type: "boolean",
81
74
  },
82
75
  exchange: {
83
- type: "string"
76
+ type: "string",
84
77
  },
85
78
  expiration: {
86
- type: "string"
79
+ type: "string",
87
80
  },
88
81
  errorLogLevel: {
89
82
  type: "string",
90
83
  enum: ["error", "warn"],
91
- }
92
- }
84
+ },
85
+ priority: {
86
+ type: "number",
87
+ },
88
+ },
93
89
  };
94
90
  //# sourceMappingURL=amqpInterface.js.map
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // generated using https://app.quicktype.io/?l=ts
3
+ // and the "post utterance response body" schema
4
+ // https://developer.dev-genesys.cloud/commdigital/textbots/botconnector-customer-api-spec#postutterance-response-schema
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.isJsonChannelConfiguration = exports.isTextChannelConfiguration = void 0;
7
+ /**
8
+ * type-guard that checks whether a "genesys channel configuration" is a "text configuration"
9
+ */
10
+ const isTextChannelConfiguration = (channelContent) => {
11
+ return typeof (channelContent === null || channelContent === void 0 ? void 0 : channelContent.text) === 'string';
12
+ };
13
+ exports.isTextChannelConfiguration = isTextChannelConfiguration;
14
+ /**
15
+ * type-guard that checks whether a "genesys channel configuration" is a "json configuration"
16
+ */
17
+ const isJsonChannelConfiguration = (channelContent) => {
18
+ return !!(channelContent === null || channelContent === void 0 ? void 0 : channelContent.json);
19
+ };
20
+ exports.isJsonChannelConfiguration = isJsonChannelConfiguration;
21
+ //# sourceMappingURL=genesysBotConnector.js.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isNiceCXOneJsonContent = exports.isNiceCXOneTextContent = void 0;
4
+ const isNiceCXOneTextContent = (content) => !!(content === null || content === void 0 ? void 0 : content.text);
5
+ exports.isNiceCXOneTextContent = isNiceCXOneTextContent;
6
+ const isNiceCXOneJsonContent = (content) => !!(content === null || content === void 0 ? void 0 : content.json);
7
+ exports.isNiceCXOneJsonContent = isNiceCXOneJsonContent;
8
+ //# sourceMappingURL=niceCXOne.js.map
@@ -13,8 +13,12 @@ exports.modeType = exports.generativeAIUseCases = exports.generativeAIProviders
13
13
  * type: string
14
14
  * enum:
15
15
  * - gpt-3.5-turbo
16
+ * - gpt-3.5-turbo-instruct
16
17
  * - text-davinci-003
18
+ * - gpt-4
17
19
  * - text-embedding-ada-002
20
+ * - luminous-extended-control
21
+ * - luminous-embedding-128
18
22
  * - claude-v1-100k
19
23
  * - claude-instant-v1
20
24
  * - text-bison@001
@@ -25,11 +29,15 @@ exports.modeType = exports.generativeAIUseCases = exports.generativeAIProviders
25
29
  */
26
30
  exports.generativeAIModels = [
27
31
  "gpt-3.5-turbo",
32
+ "gpt-3.5-turbo-instruct",
33
+ "gpt-4",
28
34
  "text-davinci-003",
29
35
  "text-embedding-ada-002",
36
+ "luminous-extended-control",
37
+ "luminous-embedding-128",
30
38
  "claude-v1-100k",
31
39
  "claude-instant-v1",
32
- "text-bison@001"
40
+ "text-bison@001",
33
41
  ];
34
42
  /*************
35
43
  * PROVIDERS
@@ -46,8 +54,9 @@ exports.generativeAIModels = [
46
54
  * - openAI
47
55
  * - anthropic
48
56
  * - googleVertexAI
57
+ * - alephAlpha
49
58
  */
50
- exports.generativeAIProviders = ["azureOpenAI", "openAI", "anthropic", "googleVertexAI"];
59
+ exports.generativeAIProviders = ["azureOpenAI", "openAI", "alephAlpha", "anthropic", "googleVertexAI"];
51
60
  /***********************
52
61
  * COGNIGY.AI USE CASES
53
62
  ***********************/
@@ -56,14 +65,15 @@ exports.generativeAIProviders = ["azureOpenAI", "openAI", "anthropic", "googleVe
56
65
  * mongoose schema too. models/settings/generativeAISettings.ts
57
66
  */
58
67
  exports.generativeAIUseCases = [
59
- "intentSentenceGeneration",
68
+ "knowledgeSearch",
69
+ "gptPromptNode",
70
+ "gptConversation",
60
71
  "aiEnhancedOutputs",
61
- "lexiconGeneration",
72
+ "sentimentAnalysis",
73
+ "intentSentenceGeneration",
62
74
  "flowGeneration",
63
- "gptConversation",
64
- "gptPromptNode",
65
75
  "generateNodeOutput",
66
- "knowledgeSearch",
76
+ "lexiconGeneration",
67
77
  ];
68
78
  /************************
69
79
  * GENERATIVE AI MODELS MODE TYPES
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.genesysCloudSettingsSchema = exports.liveAgentSettingsSchema = exports.salesforceSettingsSchema = exports.chatwootSettingsSchema = exports.handoverAgentReplySchema = exports.eightByEightSettingsSchema = exports.rceSettingsSchema = exports.foreignSessionDataSchema = exports.handoverRequestSettingsSchema = exports.handoverSettingsSchema = exports.whisperAssistConfigurations = exports.handoverProviders = exports.internalHandoverProviders = exports.externalHandoverProviders = void 0;
3
+ exports.genesysCloudOMSettingsSchema = exports.genesysCloudSettingsSchema = exports.liveAgentSettingsSchema = exports.salesforceSettingsSchema = exports.chatwootSettingsSchema = exports.handoverAgentReplySchema = exports.eightByEightSettingsSchema = exports.rceSettingsSchema = exports.foreignSessionDataSchema = exports.handoverRequestSettingsSchema = exports.handoverSettingsSchema = exports.whisperAssistConfigurations = exports.handoverProviders = exports.internalHandoverProviders = exports.externalHandoverProviders = void 0;
4
4
  exports.externalHandoverProviders = [
5
5
  "rce",
6
6
  "chatwoot",
7
7
  "salesforce",
8
8
  "liveAgent",
9
9
  "genesysCloud",
10
+ "genesysCloudOM",
10
11
  "eightByEight",
11
12
  ];
12
13
  exports.internalHandoverProviders = [
@@ -37,6 +38,7 @@ exports.handoverSettingsSchema = {
37
38
  "salesforce",
38
39
  "liveAgent",
39
40
  "genesysCloud",
41
+ "genesysCloudOM",
40
42
  "eightByEight"
41
43
  ]
42
44
  },
@@ -53,6 +55,7 @@ exports.handoverSettingsSchema = {
53
55
  apiTenant: { type: "string" },
54
56
  usePlatformToken: { type: "boolean" },
55
57
  forwardOnlyHandoverConversations: { type: "boolean" },
58
+ getQueueUpdates: { type: "boolean" },
56
59
  apiAccessToken: { type: "string" },
57
60
  baseApiUrl: { type: "string", format: "url" },
58
61
  realtimeAccessToken: { type: "string" },
@@ -63,6 +66,9 @@ exports.handoverSettingsSchema = {
63
66
  apiVersion: { type: "string" },
64
67
  organizationId: { type: "string" },
65
68
  deploymentId: { type: "string" },
69
+ deploymentName: { type: "string" },
70
+ clientId: { type: "string" },
71
+ clientSecret: { type: "string" },
66
72
  buttonId: { type: "string" },
67
73
  forwardUnknownEventsToFlow: { type: "boolean" },
68
74
  liveAgentInboxId: { type: "string" },
@@ -85,7 +91,8 @@ exports.handoverSettingsSchema = {
85
91
  agentAssistConfigId: { type: "string" },
86
92
  enableTranscriptTile: { type: "boolean" },
87
93
  enableTranscriptTileChatInput: { type: "boolean" },
88
- redactTranscriptTileMessages: { type: "boolean" }
94
+ redactTranscriptTileMessages: { type: "boolean" },
95
+ oAuth2Connection: { type: "string" }
89
96
  }
90
97
  }
91
98
  }
@@ -106,7 +113,13 @@ exports.foreignSessionDataSchema = {
106
113
  foreignSessionId: { type: "string" },
107
114
  memberId: { type: "string" },
108
115
  token: { type: "string" },
109
- affinityToken: { type: "string" }
116
+ affinityToken: { type: "string" },
117
+ userId: { type: "string" },
118
+ firstname: { type: "string" },
119
+ lastname: { type: "string" },
120
+ nickname: { type: "string" },
121
+ integrationId: { type: "string" },
122
+ conversationId: { type: "string" }
110
123
  }
111
124
  };
112
125
  exports.rceSettingsSchema = {
@@ -127,6 +140,9 @@ exports.rceSettingsSchema = {
127
140
  "forwardOnlyHandoverConversations": {
128
141
  "type": "boolean"
129
142
  },
143
+ "getQueueUpdates": {
144
+ "type": "boolean"
145
+ },
130
146
  "apiAccessToken": {
131
147
  "type": "string"
132
148
  },
@@ -342,4 +358,42 @@ exports.genesysCloudSettingsSchema = {
342
358
  }
343
359
  }
344
360
  };
361
+ exports.genesysCloudOMSettingsSchema = {
362
+ title: "genesysCloudOMSettingsSchema",
363
+ type: "object",
364
+ additionalProperties: false,
365
+ required: [
366
+ "host",
367
+ "deploymentName",
368
+ "queue",
369
+ "clientId",
370
+ "clientSecret"
371
+ ],
372
+ properties: {
373
+ host: {
374
+ type: "string"
375
+ },
376
+ deploymentName: {
377
+ type: "string"
378
+ },
379
+ queue: {
380
+ type: "string"
381
+ },
382
+ webhookSecret: {
383
+ type: "string"
384
+ },
385
+ sendProfile: {
386
+ type: "boolean"
387
+ },
388
+ clientId: {
389
+ type: "string"
390
+ },
391
+ clientSecret: {
392
+ type: "string"
393
+ },
394
+ forwardOnlyHandoverConversations: {
395
+ "type": "boolean",
396
+ }
397
+ }
398
+ };
345
399
  //# sourceMappingURL=handover.js.map
@@ -11,6 +11,8 @@ exports.journeyStepGoals = [
11
11
  "createEndpoint",
12
12
  "createLexicon",
13
13
  "createSnapshot",
14
+ "createKnowledgeStore",
15
+ "createKnowledgeSource",
14
16
  "openWebchat",
15
17
  "createCodeNode",
16
18
  "createHttpRequestNode",
@@ -18,6 +20,10 @@ exports.journeyStepGoals = [
18
20
  "createQuestionNode",
19
21
  "createSayNode",
20
22
  "createLookupNode",
23
+ "createKnowledgeSearchNode",
24
+ "createSearchExtractOutputNode",
25
+ "createGptConversationNode",
26
+ "createLlmPromptNode",
21
27
  "updateCaseNode",
22
28
  "updateHttpRequestNode",
23
29
  "updateIfNode",
@@ -8,6 +8,8 @@ exports.trackableJourneyEvent = [
8
8
  "createEndpoint",
9
9
  "createLexicon",
10
10
  "createSnapshot",
11
+ "createKnowledgeStore",
12
+ "createKnowledgeSource",
11
13
  /* endpoint editor */
12
14
  "openWebchat",
13
15
  /* flow chart */