@cognigy/rest-api-client 0.15.0 → 0.16.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.
- package/CHANGELOG.md +11 -0
- package/build/GenericTusFn.js +64 -0
- package/build/RestAPIClient.js +3 -0
- package/build/apigroups/AdministrationAPIGroup_2_0.js +7 -2
- package/build/apigroups/ResourcesAPIGroup_2_0.js +28 -23
- package/build/{shared/interfaces/agentAssist/ISendTileUpdateReferenceParams.js → apigroups/TTusAPIOperation.js} +1 -1
- package/build/apigroups/index.js +2 -0
- package/build/connector/AxiosAdapter.js +5 -4
- package/build/shared/charts/descriptors/agentAssist/constants/constants.js +7 -0
- package/build/shared/charts/descriptors/agentAssist/helpers/sentiment.helper.js +41 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/identityAssistTemplate.js +54 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/knowledgeAssistTemplate.js +187 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/nextActionWidgetTemplate.js +93 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage0.js +81 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage1.js +84 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage2.js +97 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stageError.js +85 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/sentimentAnalysisTemplate.js +41 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/stylesPartial.js +15 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/transcriptAssistTemplate.js +53 -0
- package/build/shared/charts/descriptors/agentAssist/identityAssist.js +135 -0
- package/build/shared/charts/descriptors/agentAssist/index.js +15 -1
- package/build/shared/charts/descriptors/agentAssist/knowledgeAssist.js +625 -0
- package/build/shared/charts/descriptors/agentAssist/nextActionAssist.js +77 -0
- package/build/shared/charts/descriptors/agentAssist/sentimentAssist.js +86 -0
- package/build/shared/charts/descriptors/agentAssist/setAdaptiveCardTile.js +2 -2
- package/build/shared/charts/descriptors/agentAssist/setAgentAssistGrid.js +105 -0
- package/build/shared/charts/descriptors/agentAssist/setHtmlTile.js +2 -2
- package/build/shared/charts/descriptors/agentAssist/setIframeTile.js +2 -2
- package/build/shared/charts/descriptors/agentAssist/setSecureFormsTile.js +171 -0
- package/build/shared/charts/descriptors/agentAssist/transcriptAssist.js +72 -0
- package/build/shared/charts/descriptors/allFields.js +6 -0
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/TGenerativeAIConnectionFields.js +3 -0
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/alephAlphaProviderConnection.js +11 -0
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/anthropicProviderConnection.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderConnectionV2.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +6 -2
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/openAIProviderConnection.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/amazonStorageProviderConnection.js +4 -4
- package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/azureBlobStorageProviderConnection.js +3 -3
- package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/googleCloudStorageProviderConnection.js +3 -3
- package/build/shared/charts/descriptors/connectionNodes/mongoDB/mongoDBConnection.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/smtp/oAuth2Connection.js +8 -8
- package/build/shared/charts/descriptors/connectionNodes/smtp/serviceConnection.js +2 -2
- package/build/shared/charts/descriptors/connectionNodes/smtp/smtpConnection.js +5 -5
- package/build/shared/charts/descriptors/connectionNodes/speechProviders/awsSpeechProviderConnection.js +4 -4
- package/build/shared/charts/descriptors/connectionNodes/speechProviders/microsoftSpeechProviderConnection.js +2 -2
- package/build/shared/charts/descriptors/connectionNodes/sql/sqlConnection.js +5 -5
- package/build/shared/charts/descriptors/connectionNodes/translationProviders/deeplTranslationProviderConnection.js +15 -0
- package/build/shared/charts/descriptors/connectionNodes/translationProviders/googleTranslationProviderConnection.js +15 -0
- package/build/shared/charts/descriptors/connectionNodes/translationProviders/index.js +23 -0
- package/build/shared/charts/descriptors/connectionNodes/translationProviders/microsoftTranslationProviderConnection.js +21 -0
- package/build/shared/charts/descriptors/index.js +13 -2
- package/build/shared/charts/descriptors/knowledgeSearch/constants/constants.js +6 -0
- package/build/shared/charts/descriptors/knowledgeSearch/index.js +5 -1
- package/build/shared/charts/descriptors/knowledgeSearch/knowledgeSearch.js +7 -2
- package/build/shared/charts/descriptors/knowledgeSearch/knowledgeSearchV2.js +151 -0
- package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +985 -0
- package/build/shared/charts/descriptors/logic/goTo.js +3 -1
- package/build/shared/charts/descriptors/message/question/optionalQuestion.js +2 -2
- package/build/shared/charts/descriptors/message/question/question.js +215 -8
- package/build/shared/charts/descriptors/nlu/cleanText.js +1 -0
- package/build/shared/charts/descriptors/nlu/generativeSlotFiller/prompt.js +103 -5
- package/build/shared/charts/descriptors/service/GPTConversation.js +125 -23
- package/build/shared/charts/descriptors/service/GPTPrompt.js +148 -12
- package/build/shared/charts/descriptors/service/checkAgentAvailability.js +15 -1
- package/build/shared/charts/descriptors/service/handoverV2.js +45 -0
- package/build/shared/{interfaces/twilioInterface.js → charts/descriptors/voice/interface/IBandwidth.js} +1 -1
- package/build/shared/charts/descriptors/voice/mappers/base.mapper.js +14 -0
- package/build/shared/charts/descriptors/voice/mappers/hangup.mapper.js +26 -0
- package/build/shared/charts/descriptors/voice/mappers/muteSpeechInput.mapper.js +17 -2
- package/build/shared/charts/descriptors/voice/mappers/play.mapper.js +54 -0
- package/build/shared/charts/descriptors/voice/mappers/record.mapper.js +7 -0
- package/build/shared/charts/descriptors/voice/mappers/sendMetadata.mapper.js +15 -0
- package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +38 -8
- package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +31 -9
- package/build/shared/charts/descriptors/voice/nodes/muteSpeechInput.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/play.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +118 -4
- package/build/shared/charts/descriptors/voice/nodes/transfer.js +11 -3
- package/build/shared/charts/descriptors/voice/utils/vgConstants.js +14 -0
- package/build/shared/charts/descriptors/voicegateway/index.js +14 -11
- package/build/shared/charts/descriptors/voicegateway/utils/paramUtils.js +1 -5
- package/build/shared/charts/descriptors/voicegateway2/nodes/muteSpeechInput.js +12 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +6 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +158 -10
- package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +296 -43
- package/build/shared/charts/descriptors/voicegateway2/utils/helper.js +30 -4
- package/build/shared/charts/helpers/generativeAI/rephraseSentenceWithAi.js +1 -1
- package/build/shared/constants.js +5 -1
- package/build/shared/handoverClients/interfaces/THandoverEventType.js +3 -1
- package/build/shared/helper/BaseContext.js +2 -15
- package/build/shared/helper/nlu/textCleaner.js +25 -3
- package/build/shared/interfaces/IEndpointTranslationSettings.js +9 -0
- package/build/shared/interfaces/IOrganisation.js +2 -1
- package/build/shared/interfaces/agentAssist/ISendConfigUpdateParams.js +3 -0
- package/build/shared/interfaces/agentAssist/ISendUpdateReferenceParams.js +3 -0
- package/build/shared/interfaces/amqpInterface.js +18 -22
- package/build/shared/interfaces/channels/genesysBotConnector.js +21 -0
- package/build/shared/interfaces/channels/niceCXOne.js +8 -0
- package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +15 -7
- package/build/shared/interfaces/handover.js +57 -3
- package/build/shared/interfaces/journeys/IJourney.js +6 -0
- package/build/shared/interfaces/journeys/IJourneyTrackEvent.js +2 -0
- package/build/shared/interfaces/messageAPI/endpoints.js +91 -8
- package/build/shared/interfaces/resources/IAuditEvent.js +1 -0
- package/build/shared/interfaces/resources/IConnectionSchema.js +3 -0
- package/build/shared/interfaces/resources/IEndpoint.js +1 -0
- package/build/shared/interfaces/resources/IExtension.js +3 -0
- package/build/shared/interfaces/resources/ILargeLanguageModel.js +24 -5
- package/build/shared/interfaces/resources/INodeDescriptorSet.js +23 -1
- package/build/shared/interfaces/resources/TNLUConnectorType.js +0 -1
- package/build/shared/interfaces/resources/TRestChannelType.js +16 -11
- package/build/shared/interfaces/resources/TWebhookChannelType.js +6 -1
- package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeChunk.js +21 -3
- package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeSource.js +13 -2
- package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeStore.js +1 -1
- package/build/shared/interfaces/resources/settings/IAgentSettings.js +3 -23
- package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
- package/build/shared/interfaces/resources/settings/ITranslationSettings.js +63 -0
- package/build/shared/interfaces/resources/settings/index.js +4 -1
- package/build/shared/interfaces/restAPI/administration/voiceGateway/v2.0/IReadVoiceGatewayAccountRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/administration/voiceGateway/v2.0/ISetupVoiceGatewayAccountRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/administration/voiceGateway/v2.0/index.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/IGetKnowledgeQueryCounterOrganisationRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/IGetKnowledgeQueryCounterRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/IKnowlegeQueryCounterAggregatedValue_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/index.js +3 -0
- package/build/shared/interfaces/restAPI/resources/nluconnector/v2.0/TNLUConnectorType_2_0.js +0 -2
- package/build/shared/interfaces/restAPI/resources/uploadResumable/v2.0/IUploadResumableRest_2_0.js +17 -0
- package/build/shared/interfaces/restAPI/resources/uploadResumable/v2.0/index.js +3 -0
- package/build/shared/interfaces/security/IKnowledgeQueryCounterAggregatedValue.js +3 -0
- package/build/shared/interfaces/security/IPermission.js +2 -0
- package/build/shared/interfaces/security/IRole.js +3 -1
- package/build/test.js +27 -0
- package/package.json +19 -17
- package/types/index.d.ts +581 -129
|
@@ -1,18 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.largeLanguageModelQuerySchema = exports.largeLanguageModelSchema = exports.largeLanguageModelDataSchema = exports.googleVertexAIMeataSchema = exports.azureOpenAIMeataSchema = void 0;
|
|
3
|
+
exports.largeLanguageModelQuerySchema = exports.largeLanguageModelSchema = exports.largeLanguageModelDataSchema = exports.googleVertexAIMeataSchema = exports.azureOpenAIMeataSchema = exports.openAIMeataSchema = exports.alephAlphaMeataSchema = 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",
|
|
10
|
+
type: "object",
|
|
11
|
+
additionalProperties: false,
|
|
12
|
+
properties: {
|
|
13
|
+
customModel: { type: "string" }
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
exports.openAIMeataSchema = {
|
|
17
|
+
title: "openAIMeataSchema",
|
|
18
|
+
type: "object",
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
properties: {
|
|
21
|
+
customModel: { type: "string" }
|
|
22
|
+
}
|
|
23
|
+
};
|
|
8
24
|
exports.azureOpenAIMeataSchema = {
|
|
9
25
|
title: "azureOpenAIMeataSchema",
|
|
10
26
|
type: "object",
|
|
11
27
|
additionalProperties: false,
|
|
12
28
|
properties: {
|
|
13
|
-
resourceName: { type: "string",
|
|
14
|
-
deploymentName: { type: "string",
|
|
15
|
-
apiVersion: { type: ["string", "null"] }
|
|
29
|
+
resourceName: { type: ["string", "null"] },
|
|
30
|
+
deploymentName: { type: ["string", "null"] },
|
|
31
|
+
apiVersion: { type: ["string", "null"] },
|
|
32
|
+
baseCustomUrl: { type: ["string", "null"] },
|
|
16
33
|
}
|
|
17
34
|
};
|
|
18
35
|
exports.googleVertexAIMeataSchema = {
|
|
@@ -40,8 +57,10 @@ exports.largeLanguageModelDataSchema = {
|
|
|
40
57
|
provider: { type: "string", enum: [...IGenerativeAIModels_1.generativeAIProviders] },
|
|
41
58
|
connectionId: { type: "string", format: "uuid" },
|
|
42
59
|
isDefault: { type: "boolean" },
|
|
60
|
+
openAI: exports.openAIMeataSchema,
|
|
43
61
|
azureOpenAI: exports.azureOpenAIMeataSchema,
|
|
44
|
-
googleVertexAI: exports.googleVertexAIMeataSchema
|
|
62
|
+
googleVertexAI: exports.googleVertexAIMeataSchema,
|
|
63
|
+
alephAlpha: exports.alephAlphaMeataSchema
|
|
45
64
|
}
|
|
46
65
|
};
|
|
47
66
|
exports.largeLanguageModelSchema = {
|
|
@@ -24,7 +24,7 @@ const nodeBehaviorSchema = {
|
|
|
24
24
|
entrypoint: { type: "boolean" }
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
exports.nodePreviewTypes = ["text", "sayNode", "custom", "resource"];
|
|
27
|
+
exports.nodePreviewTypes = ["text", "sayNode", "custom", "resource", "image"];
|
|
28
28
|
const nodePreviewSchema = {
|
|
29
29
|
title: "nodePreviewSchema",
|
|
30
30
|
type: "object",
|
|
@@ -84,6 +84,7 @@ const nodeDependenciesSchema = {
|
|
|
84
84
|
};
|
|
85
85
|
exports.nodeFieldTypes = [
|
|
86
86
|
"adaptivecard",
|
|
87
|
+
"agentAssistConfig",
|
|
87
88
|
"appTemplate",
|
|
88
89
|
"caseNode",
|
|
89
90
|
"checkbox",
|
|
@@ -103,6 +104,9 @@ exports.nodeFieldTypes = [
|
|
|
103
104
|
"json",
|
|
104
105
|
"keyValuePairs",
|
|
105
106
|
"knowledgeStore",
|
|
107
|
+
"knowledgeStoreSelect",
|
|
108
|
+
"knowledgeSourceTags",
|
|
109
|
+
"llmSelect",
|
|
106
110
|
"lexicon",
|
|
107
111
|
"localeField",
|
|
108
112
|
"node",
|
|
@@ -117,6 +121,7 @@ exports.nodeFieldTypes = [
|
|
|
117
121
|
"sttLanguageAzureSelect",
|
|
118
122
|
"sttLanguageGoogleSelect",
|
|
119
123
|
"sttSelect",
|
|
124
|
+
"sttTierModelSelect",
|
|
120
125
|
"switchNode",
|
|
121
126
|
"text",
|
|
122
127
|
"textArray",
|
|
@@ -279,6 +284,23 @@ exports.nodeSectionSchema = {
|
|
|
279
284
|
}
|
|
280
285
|
]
|
|
281
286
|
},
|
|
287
|
+
description: {
|
|
288
|
+
oneOf: [
|
|
289
|
+
{ type: "string", minLength: 1, maxLength: 200 },
|
|
290
|
+
{
|
|
291
|
+
type: "object",
|
|
292
|
+
additionalProperties: false,
|
|
293
|
+
properties: {
|
|
294
|
+
default: { type: "string", maxLength: 200 },
|
|
295
|
+
enUS: { type: "string", maxLength: 200 },
|
|
296
|
+
deDE: { type: "string", maxLength: 200 },
|
|
297
|
+
jaJP: { type: "string", maxLength: 200 },
|
|
298
|
+
esES: { type: "string", maxLength: 200 },
|
|
299
|
+
koKR: { type: "string", maxLength: 200 }
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
]
|
|
303
|
+
},
|
|
282
304
|
condition: exports.nodeFieldConditionSchema,
|
|
283
305
|
defaultCollapsed: { type: "boolean" },
|
|
284
306
|
fields: {
|
|
@@ -5,27 +5,24 @@ exports.restChannelTypes = [
|
|
|
5
5
|
"alexa",
|
|
6
6
|
"audioCodes",
|
|
7
7
|
"avaya",
|
|
8
|
+
"bandwidth",
|
|
8
9
|
"dialogflow",
|
|
9
|
-
"google",
|
|
10
10
|
"line",
|
|
11
11
|
"microsoftTeams",
|
|
12
12
|
"rest",
|
|
13
|
-
"twilio-autopilot",
|
|
14
13
|
"twilio-sms",
|
|
15
14
|
"twilio",
|
|
16
15
|
"userlike",
|
|
17
16
|
"nonConversational",
|
|
18
|
-
"amazonLex"
|
|
17
|
+
"amazonLex",
|
|
18
|
+
"genesysBotConnector",
|
|
19
|
+
"niceCXOne"
|
|
19
20
|
];
|
|
20
21
|
exports.restChannelDisplayNames = [
|
|
21
22
|
{
|
|
22
23
|
channel: "alexa",
|
|
23
24
|
displayName: "Alexa"
|
|
24
25
|
},
|
|
25
|
-
{
|
|
26
|
-
channel: "google",
|
|
27
|
-
displayName: "Google Actions"
|
|
28
|
-
},
|
|
29
26
|
{
|
|
30
27
|
channel: "rest",
|
|
31
28
|
displayName: "Rest"
|
|
@@ -42,10 +39,6 @@ exports.restChannelDisplayNames = [
|
|
|
42
39
|
channel: "twilio-sms",
|
|
43
40
|
displayName: "Twilio SMS"
|
|
44
41
|
},
|
|
45
|
-
{
|
|
46
|
-
channel: "twilio-autopilot",
|
|
47
|
-
displayName: "Twilio Autopilot"
|
|
48
|
-
},
|
|
49
42
|
{
|
|
50
43
|
channel: "microsoftTeams",
|
|
51
44
|
displayName: "Microsoft Teams"
|
|
@@ -73,6 +66,18 @@ exports.restChannelDisplayNames = [
|
|
|
73
66
|
{
|
|
74
67
|
channel: "amazonLex",
|
|
75
68
|
displayName: "Amazon Lex"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
channel: "bandwidth",
|
|
72
|
+
displayName: "Bandwidth"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
channel: "genesysBotConnector",
|
|
76
|
+
displayName: "Genesys Bot Connector"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
channel: "niceCXOne",
|
|
80
|
+
displayName: "NICE CXone"
|
|
76
81
|
}
|
|
77
82
|
];
|
|
78
83
|
//# sourceMappingURL=TRestChannelType.js.map
|
|
@@ -12,7 +12,8 @@ exports.webhookChannelTypes = [
|
|
|
12
12
|
"ringCentralEngage",
|
|
13
13
|
"intercom",
|
|
14
14
|
"whatsapp",
|
|
15
|
-
"eightByEight"
|
|
15
|
+
"eightByEight",
|
|
16
|
+
"agentAssistVoice",
|
|
16
17
|
];
|
|
17
18
|
exports.webhookChannelDisplayNames = [
|
|
18
19
|
{
|
|
@@ -35,6 +36,10 @@ exports.webhookChannelDisplayNames = [
|
|
|
35
36
|
channel: "webhook",
|
|
36
37
|
displayName: "Webhook"
|
|
37
38
|
},
|
|
39
|
+
{
|
|
40
|
+
channel: "agentAssistVoice",
|
|
41
|
+
displayName: "Voice Copilot"
|
|
42
|
+
},
|
|
38
43
|
{
|
|
39
44
|
channel: "microsoftBotFramework",
|
|
40
45
|
displayName: "Azure Bot Service"
|
|
@@ -3,21 +3,39 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.knowledgeChunkSchema = exports.knowledgeChunkDataSchema = void 0;
|
|
4
4
|
/* Interfaces & Types */
|
|
5
5
|
const IEntityMeta_1 = require("../IEntityMeta");
|
|
6
|
+
const IGenerativeAIModels_1 = require("../../generativeAI/IGenerativeAIModels");
|
|
6
7
|
exports.knowledgeChunkDataSchema = {
|
|
7
8
|
title: "knowledgeChunkDataSchema",
|
|
8
9
|
type: "object",
|
|
9
10
|
additionalProperties: false,
|
|
10
11
|
properties: {
|
|
11
12
|
order: { type: "number" },
|
|
12
|
-
text: {
|
|
13
|
+
text: {
|
|
14
|
+
type: "string",
|
|
15
|
+
minLength: 0,
|
|
16
|
+
maxLength: parseInt(process.env.MAX_CHUNK_SIZE, 10) || 2000,
|
|
17
|
+
},
|
|
18
|
+
embedding: {
|
|
19
|
+
type: "object",
|
|
20
|
+
additionalProperties: false,
|
|
21
|
+
properties: {
|
|
22
|
+
vector: {
|
|
23
|
+
type: "array"
|
|
24
|
+
},
|
|
25
|
+
model: {
|
|
26
|
+
type: "string",
|
|
27
|
+
enum: [...IGenerativeAIModels_1.generativeAIModels]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
13
31
|
data: {
|
|
14
32
|
type: "object",
|
|
15
33
|
additionalProperties: false,
|
|
16
|
-
maxProperties: 20,
|
|
34
|
+
maxProperties: parseInt(process.env.MAX_CHUNK_METADATA_LIMIT, 10) || 20,
|
|
17
35
|
patternProperties: {
|
|
18
36
|
"^(?=.{1,200}$)[a-zA-Z][0-9a-zA-Z_$]*$": {
|
|
19
37
|
type: ["number", "string", "boolean"],
|
|
20
|
-
maxLength: 1000
|
|
38
|
+
maxLength: parseInt(process.env.METADATA_VALUE_MAX_LENGTH, 10) || 1000
|
|
21
39
|
}
|
|
22
40
|
},
|
|
23
41
|
}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.knowledgeSourceSchema = exports.knowledgeSourceDataSchema = exports.knowledgeSourceType = exports.knowledgeSourceStatus = void 0;
|
|
4
4
|
/* Interfaces & Types */
|
|
5
5
|
const IEntityMeta_1 = require("../IEntityMeta");
|
|
6
|
-
exports.knowledgeSourceStatus = ["ready", "ingesting", "disabled"];
|
|
7
|
-
exports.knowledgeSourceType = ["
|
|
6
|
+
exports.knowledgeSourceStatus = ["ready", "ingesting", "disabled", "failure"];
|
|
7
|
+
exports.knowledgeSourceType = ["pdf", "txt", "docx", "ctxt", "url", "manual"];
|
|
8
8
|
exports.knowledgeSourceDataSchema = {
|
|
9
9
|
title: "knowledgeSourceDataSchema",
|
|
10
10
|
type: "object",
|
|
@@ -20,6 +20,17 @@ exports.knowledgeSourceDataSchema = {
|
|
|
20
20
|
status: { type: "string", enum: [...exports.knowledgeSourceStatus] },
|
|
21
21
|
metaData: { type: "object" },
|
|
22
22
|
chunkCount: { type: "number" },
|
|
23
|
+
data: {
|
|
24
|
+
type: "object",
|
|
25
|
+
additionalProperties: false,
|
|
26
|
+
maxProperties: parseInt(process.env.MAX_SOURCE_METADATA_LIMIT, 10) || 20,
|
|
27
|
+
patternProperties: {
|
|
28
|
+
"^(?=.{1,200}$)[a-zA-Z][0-9a-zA-Z_$]*$": {
|
|
29
|
+
type: ["number", "string", "boolean"],
|
|
30
|
+
maxLength: parseInt(process.env.METADATA_VALUE_MAX_LENGTH, 10) || 1000
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
}
|
|
23
34
|
}
|
|
24
35
|
};
|
|
25
36
|
exports.knowledgeSourceSchema = {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.knowledgeStoreSchema = exports.knowledgeStoreDataSchema = exports.knowledgeStoreStatus = void 0;
|
|
4
4
|
/* Interfaces & Types */
|
|
5
5
|
const IEntityMeta_1 = require("../IEntityMeta");
|
|
6
|
-
exports.knowledgeStoreStatus = ["ready", "warning"];
|
|
6
|
+
exports.knowledgeStoreStatus = ["ready", "ingesting", "warning", "empty"];
|
|
7
7
|
exports.knowledgeStoreDataSchema = {
|
|
8
8
|
title: "knowledgeStoreDataSchema",
|
|
9
9
|
type: "object",
|
|
@@ -5,12 +5,7 @@ const IEntityMeta_1 = require("../IEntityMeta");
|
|
|
5
5
|
const ISharedSettings_1 = require("./ISharedSettings");
|
|
6
6
|
const IGenerativeAISettings_1 = require("./IGenerativeAISettings");
|
|
7
7
|
const IAudioPreviewSettings_1 = require("./IAudioPreviewSettings");
|
|
8
|
-
const
|
|
9
|
-
"none",
|
|
10
|
-
"microsoft",
|
|
11
|
-
"google",
|
|
12
|
-
"deepl"
|
|
13
|
-
];
|
|
8
|
+
const ITranslationSettings_1 = require("./ITranslationSettings");
|
|
14
9
|
const generateAgentSettingsRedisKey = (data) => {
|
|
15
10
|
return [
|
|
16
11
|
`organisationId:${data.organisationReference}:projectId:${data.projectReference}:agentsettings:v3`
|
|
@@ -22,24 +17,9 @@ exports.agentSettingsDataSchema = {
|
|
|
22
17
|
type: "object",
|
|
23
18
|
additionalProperties: false,
|
|
24
19
|
properties: Object.assign(Object.assign({}, ISharedSettings_1.sharedSettingsSchema.properties), { trackDataOnlyInputs: { type: "boolean" }, collectAnalytics: { type: "boolean" }, timezone: { type: "string", format: "timezone" }, useCaseSensitiveIntentMapping: { type: "boolean" }, translationSettings: {
|
|
25
|
-
type: "object",
|
|
20
|
+
type: ["object", "null"],
|
|
26
21
|
additionalProperties: false,
|
|
27
|
-
properties: {
|
|
28
|
-
translationProvider: {
|
|
29
|
-
type: "string",
|
|
30
|
-
enum: [...arrayTranslationProviders]
|
|
31
|
-
},
|
|
32
|
-
translationAPIKey: { type: "string", maxLength: 255 },
|
|
33
|
-
translationProviderCustomBaseUrl: { type: "string", maxLength: 255 },
|
|
34
|
-
translationRetries: { type: "integer", minimum: 0, maximum: 3 },
|
|
35
|
-
translationTimeout: { type: "integer", minimum: 0, maximum: 8000 },
|
|
36
|
-
translationCacheExpiry: { type: "integer", enum: [0, 3600, 84600] },
|
|
37
|
-
translationRegion: {
|
|
38
|
-
type: "string",
|
|
39
|
-
maxLength: 255,
|
|
40
|
-
default: undefined
|
|
41
|
-
}
|
|
42
|
-
}
|
|
22
|
+
properties: Object.assign({}, ITranslationSettings_1.translationSettingsDataSchema.properties)
|
|
43
23
|
}, audioPreviewSettings: {
|
|
44
24
|
type: ["object", "null"],
|
|
45
25
|
additionalProperties: false,
|
|
@@ -62,6 +62,10 @@ exports.generativeAISettingsDataSchema = {
|
|
|
62
62
|
type: "object",
|
|
63
63
|
properties: Object.assign({}, exports.generativeAIUseCaseDataSchema.properties)
|
|
64
64
|
},
|
|
65
|
+
sentimentAnalysis: {
|
|
66
|
+
type: "object",
|
|
67
|
+
properties: Object.assign({}, exports.generativeAIUseCaseDataSchema.properties)
|
|
68
|
+
}
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
71
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.translationSettingsDataSchema = exports.translationProviders = void 0;
|
|
4
|
+
exports.translationProviders = [
|
|
5
|
+
"none",
|
|
6
|
+
"microsoft",
|
|
7
|
+
"google",
|
|
8
|
+
"deepl"
|
|
9
|
+
];
|
|
10
|
+
exports.translationSettingsDataSchema = {
|
|
11
|
+
title: "translationSettingsDataSchema",
|
|
12
|
+
type: ["object", "null"],
|
|
13
|
+
additionalProperties: false,
|
|
14
|
+
properties: {
|
|
15
|
+
provider: { type: ["string", "null"], enum: [...exports.translationProviders] },
|
|
16
|
+
connections: {
|
|
17
|
+
type: ["object", "null"],
|
|
18
|
+
properties: {
|
|
19
|
+
none: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
connectionId: { type: ["string", "null"], format: "uuid" },
|
|
23
|
+
retries: { type: "number" },
|
|
24
|
+
timeout: { type: "number" },
|
|
25
|
+
cacheExpiry: { type: "number" },
|
|
26
|
+
customBaseUrl: { type: ["string", "null"] }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
deepl: {
|
|
30
|
+
type: "object",
|
|
31
|
+
properties: {
|
|
32
|
+
connectionId: { type: ["string", "null"], format: "uuid" },
|
|
33
|
+
retries: { type: "number" },
|
|
34
|
+
timeout: { type: "number" },
|
|
35
|
+
cacheExpiry: { type: "number" },
|
|
36
|
+
customBaseUrl: { type: ["string", "null"] }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
microsoft: {
|
|
40
|
+
type: "object",
|
|
41
|
+
properties: {
|
|
42
|
+
connectionId: { type: ["string", "null"], format: "uuid" },
|
|
43
|
+
retries: { type: "number" },
|
|
44
|
+
timeout: { type: "number" },
|
|
45
|
+
cacheExpiry: { type: "number" },
|
|
46
|
+
customBaseUrl: { type: ["string", "null"] }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
google: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
connectionId: { type: ["string", "null"], format: "uuid" },
|
|
53
|
+
retries: { type: "number" },
|
|
54
|
+
timeout: { type: "number" },
|
|
55
|
+
cacheExpiry: { type: "number" },
|
|
56
|
+
customBaseUrl: { type: ["string", "null"] }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=ITranslationSettings.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.audioPreviewProviders = exports.audioPreviewSettingsDataSchema = exports.generativeAISettingsDataSchema = exports.sharedSettingsSchema = exports.flowSettingsSchema = exports.flowSettingsDataSchema = exports.flowIntentMappingOrderType = exports.agentSettingsSchema = exports.agentSettingsDataSchema = void 0;
|
|
3
|
+
exports.translationProviders = exports.translationSettingsDataSchema = exports.audioPreviewProviders = exports.audioPreviewSettingsDataSchema = exports.generativeAISettingsDataSchema = exports.sharedSettingsSchema = exports.flowSettingsSchema = exports.flowSettingsDataSchema = exports.flowIntentMappingOrderType = exports.agentSettingsSchema = exports.agentSettingsDataSchema = void 0;
|
|
4
4
|
var IAgentSettings_1 = require("./IAgentSettings");
|
|
5
5
|
Object.defineProperty(exports, "agentSettingsDataSchema", { enumerable: true, get: function () { return IAgentSettings_1.agentSettingsDataSchema; } });
|
|
6
6
|
Object.defineProperty(exports, "agentSettingsSchema", { enumerable: true, get: function () { return IAgentSettings_1.agentSettingsSchema; } });
|
|
@@ -15,4 +15,7 @@ Object.defineProperty(exports, "generativeAISettingsDataSchema", { enumerable: t
|
|
|
15
15
|
var IAudioPreviewSettings_1 = require("./IAudioPreviewSettings");
|
|
16
16
|
Object.defineProperty(exports, "audioPreviewSettingsDataSchema", { enumerable: true, get: function () { return IAudioPreviewSettings_1.audioPreviewSettingsDataSchema; } });
|
|
17
17
|
Object.defineProperty(exports, "audioPreviewProviders", { enumerable: true, get: function () { return IAudioPreviewSettings_1.audioPreviewProviders; } });
|
|
18
|
+
var ITranslationSettings_1 = require("./ITranslationSettings");
|
|
19
|
+
Object.defineProperty(exports, "translationSettingsDataSchema", { enumerable: true, get: function () { return ITranslationSettings_1.translationSettingsDataSchema; } });
|
|
20
|
+
Object.defineProperty(exports, "translationProviders", { enumerable: true, get: function () { return ITranslationSettings_1.translationProviders; } });
|
|
18
21
|
//# sourceMappingURL=index.js.map
|
package/build/shared/interfaces/restAPI/resources/nluconnector/v2.0/TNLUConnectorType_2_0.js
CHANGED
|
@@ -15,7 +15,6 @@ exports.arrayNLUConnectorType_2_0 = void 0;
|
|
|
15
15
|
* - dialogflow
|
|
16
16
|
* - dialogflowBuiltIn
|
|
17
17
|
* - amazonLexBuiltIn
|
|
18
|
-
* - twilioAutopilotBuiltIn
|
|
19
18
|
* - luis
|
|
20
19
|
* - watson
|
|
21
20
|
* - noNlu
|
|
@@ -29,7 +28,6 @@ exports.arrayNLUConnectorType_2_0 = [
|
|
|
29
28
|
"dialogflow",
|
|
30
29
|
"dialogflowBuiltIn",
|
|
31
30
|
"amazonLexBuiltIn",
|
|
32
|
-
"twilioAutopilotBuiltIn",
|
|
33
31
|
"luis",
|
|
34
32
|
"watson",
|
|
35
33
|
"noNlu",
|
package/build/shared/interfaces/restAPI/resources/uploadResumable/v2.0/IUploadResumableRest_2_0.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uploadResumableTypes = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @openapi
|
|
6
|
+
*
|
|
7
|
+
* components:
|
|
8
|
+
* schemas:
|
|
9
|
+
* TUploadResumableTypes:
|
|
10
|
+
* type: string
|
|
11
|
+
* enum:
|
|
12
|
+
* - snapshots
|
|
13
|
+
*/
|
|
14
|
+
exports.uploadResumableTypes = [
|
|
15
|
+
"snapshots"
|
|
16
|
+
];
|
|
17
|
+
//# sourceMappingURL=IUploadResumableRest_2_0.js.map
|
|
@@ -15,6 +15,7 @@ exports.availablePermissions = exports.projectWidePermissions = exports.organisa
|
|
|
15
15
|
* - projects
|
|
16
16
|
* - userDetails
|
|
17
17
|
* - users
|
|
18
|
+
* - voiceGatewayAccount
|
|
18
19
|
*/
|
|
19
20
|
exports.organisationWidePermissions = [
|
|
20
21
|
"analyticsOdata",
|
|
@@ -23,6 +24,7 @@ exports.organisationWidePermissions = [
|
|
|
23
24
|
"projects",
|
|
24
25
|
"userDetails",
|
|
25
26
|
"users",
|
|
27
|
+
"voiceGatewayAccount",
|
|
26
28
|
];
|
|
27
29
|
/**
|
|
28
30
|
* @openapi
|
|
@@ -19,6 +19,7 @@ exports.projectRolesWithSpecialOrgRights = exports.availableRoles = exports.proj
|
|
|
19
19
|
* - projectManager
|
|
20
20
|
* - userManager
|
|
21
21
|
* - userDetailsViewer
|
|
22
|
+
* - voiceGatewayUser
|
|
22
23
|
*/
|
|
23
24
|
exports.organisationWideRoles = [
|
|
24
25
|
"admin",
|
|
@@ -31,7 +32,8 @@ exports.organisationWideRoles = [
|
|
|
31
32
|
"odata",
|
|
32
33
|
"projectManager",
|
|
33
34
|
"userManager",
|
|
34
|
-
"userDetailsViewer"
|
|
35
|
+
"userDetailsViewer",
|
|
36
|
+
"voiceGatewayUser",
|
|
35
37
|
];
|
|
36
38
|
/**
|
|
37
39
|
* @openapi
|
package/build/test.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const RestAPIClient_1 = require("./RestAPIClient");
|
|
4
|
+
const OAUTH_CLIENT_ID = "cognigy-ui";
|
|
5
|
+
const OAUTH_CLIENT_SECRET = "KR7yxR3rAhZ9sEn923dZ5KeNs9SVuwBjHxXKpmqtvSNXw5xWz35Y5YRtTBt96Jaa";
|
|
6
|
+
const baseUrl = "https://api.test";
|
|
7
|
+
const instance = new RestAPIClient_1.RestAPIClient({
|
|
8
|
+
numberOfRetries: 2,
|
|
9
|
+
baseUrl,
|
|
10
|
+
versions: {
|
|
11
|
+
administration: "2.0",
|
|
12
|
+
external: "2.0",
|
|
13
|
+
metrics: "2.0",
|
|
14
|
+
resources: "2.0",
|
|
15
|
+
sessions: "2.0"
|
|
16
|
+
},
|
|
17
|
+
timeout: 10000
|
|
18
|
+
});
|
|
19
|
+
(async () => {
|
|
20
|
+
const slot = await instance.addSlotToLexiconEntry({
|
|
21
|
+
lexiconId: "6464b5eb6d1cdad42f38fe37",
|
|
22
|
+
entryId: "6464b5fb6d1cdaf3f138fe55",
|
|
23
|
+
value: "slot1"
|
|
24
|
+
});
|
|
25
|
+
console.log(slot);
|
|
26
|
+
})();
|
|
27
|
+
//# sourceMappingURL=test.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cognigy/rest-api-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Cognigy REST-Client",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"module": "dist/rollup-plugin-babel.esm.js",
|
|
@@ -31,11 +31,13 @@
|
|
|
31
31
|
"license": "Cognigy Proprietary License",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"ajv": "6.12.6",
|
|
34
|
-
"axios": "
|
|
34
|
+
"axios": "1.6.0",
|
|
35
35
|
"form-data": "4.0.0",
|
|
36
|
+
"tus-js-client": "^3.1.1",
|
|
36
37
|
"uuidv4": "6.2.13"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
40
|
+
"@babel/cli": "7.18.10",
|
|
39
41
|
"@babel/core": "7.18.10",
|
|
40
42
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
41
43
|
"@babel/plugin-proposal-object-rest-spread": "7.18.9",
|
|
@@ -44,34 +46,34 @@
|
|
|
44
46
|
"@babel/preset-env": "7.18.10",
|
|
45
47
|
"@babel/preset-typescript": "7.18.6",
|
|
46
48
|
"@babel/runtime": "7.18.9",
|
|
49
|
+
"@rollup/plugin-babel": "5.3.1",
|
|
50
|
+
"@rollup/plugin-commonjs": "22.0.2",
|
|
51
|
+
"@rollup/plugin-json": "4.1.0",
|
|
47
52
|
"@rollup/plugin-node-resolve": "13.3.0",
|
|
53
|
+
"@rollup/plugin-typescript": "8.3.4",
|
|
48
54
|
"@types/node": "18.7.6",
|
|
49
55
|
"@types/sinon": "10.0.13",
|
|
50
|
-
"@
|
|
56
|
+
"@types/tus-js-client": "^2.1.0",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "5.33.1",
|
|
58
|
+
"@typescript-eslint/parser": "5.33.1",
|
|
51
59
|
"core-js": "3.24.1",
|
|
52
60
|
"dts-bundle-generator": "6.12.0",
|
|
53
|
-
"regenerator-runtime": "0.13.9",
|
|
54
|
-
"rimraf": "3.0.2",
|
|
55
|
-
"rollup": "2.78.0",
|
|
56
|
-
"@rollup/plugin-babel": "5.3.1",
|
|
57
|
-
"@rollup/plugin-commonjs": "22.0.2",
|
|
58
|
-
"@rollup/plugin-json": "4.1.0",
|
|
59
|
-
"@rollup/plugin-typescript": "8.3.4",
|
|
60
61
|
"eslint": "8.22.0",
|
|
62
|
+
"eslint-config-prettier": "8.5.0",
|
|
63
|
+
"eslint-plugin-node": "11.1.0",
|
|
64
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
61
65
|
"eslint-plugin-promise": "6.0.0",
|
|
62
66
|
"eslint-plugin-security": "1.5.0",
|
|
63
67
|
"eslint-plugin-security-node": "^1.1.1",
|
|
64
68
|
"eslint-plugin-sonarjs": "0.15.0",
|
|
65
|
-
"eslint-config-prettier": "8.5.0",
|
|
66
|
-
"eslint-plugin-prettier": "4.2.1",
|
|
67
|
-
"eslint-plugin-node": "11.1.0",
|
|
68
69
|
"prettier": "2.7.1",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
70
|
+
"regenerator-runtime": "0.13.9",
|
|
71
|
+
"rimraf": "3.0.2",
|
|
72
|
+
"rollup": "2.78.0",
|
|
73
|
+
"typescript": "4.7.4"
|
|
72
74
|
},
|
|
73
75
|
"engines": {
|
|
74
|
-
"node": ">=
|
|
76
|
+
"node": ">=18.17.1",
|
|
75
77
|
"vscode": "^1.22.0"
|
|
76
78
|
}
|
|
77
79
|
}
|