@cognigy/rest-api-client 0.11.0 → 0.12.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 (189) hide show
  1. package/.snyk +1 -1
  2. package/build/GenericUploadFn.js +1 -1
  3. package/build/RestAPIClient.js +14 -0
  4. package/build/apigroups/AdministrationAPIGroup_2_0.js +25 -3
  5. package/build/apigroups/AnalyticsAPIGroup_2_0.js +12 -0
  6. package/build/apigroups/InsightsAPIGroup_2_0.js +53 -0
  7. package/build/apigroups/ResourcesAPIGroup_2_0.js +23 -2
  8. package/build/apigroups/index.js +5 -1
  9. package/build/authentication/BasicAuthentication/BasicAuthentication.js +8 -1
  10. package/build/authentication/OAuth2/ILoginByClientCredentialsParameters.js +3 -0
  11. package/build/authentication/OAuth2/IOAuth2ClientCredentialsGrantAccessTokenRequest.js +11 -0
  12. package/build/authentication/OAuth2/OAuth2Authentication.js +41 -15
  13. package/build/shared/charts/createNodeDescriptor.js +1 -1
  14. package/build/shared/charts/descriptors/apps/index.js +8 -0
  15. package/build/shared/charts/descriptors/apps/initAppSession.js +33 -0
  16. package/build/shared/charts/descriptors/apps/setAppState.js +46 -0
  17. package/build/shared/charts/descriptors/connectionNodes/smtp/emailNotification.js +6 -4
  18. package/build/shared/charts/descriptors/connectionNodes/smtp/sendEmail.js +2 -2
  19. package/build/shared/charts/descriptors/end.js +1 -0
  20. package/build/shared/charts/descriptors/index.js +86 -67
  21. package/build/shared/charts/descriptors/logic/goTo.js +1 -0
  22. package/build/shared/charts/descriptors/logic/if/else.js +2 -0
  23. package/build/shared/charts/descriptors/logic/if/if.js +2 -1
  24. package/build/shared/charts/descriptors/logic/if/then.js +2 -0
  25. package/build/shared/charts/descriptors/logic/index.js +5 -3
  26. package/build/shared/charts/descriptors/logic/interval/elseInterval.js +1 -0
  27. package/build/shared/charts/descriptors/logic/interval/onInterval.js +1 -0
  28. package/build/shared/charts/descriptors/logic/once/afterwards.js +1 -0
  29. package/build/shared/charts/descriptors/logic/once/onFirstExecution.js +1 -0
  30. package/build/shared/charts/descriptors/logic/setTranslation.js +88 -0
  31. package/build/shared/charts/descriptors/logic/switch/case.js +2 -0
  32. package/build/shared/charts/descriptors/logic/switch/default.js +2 -0
  33. package/build/shared/charts/descriptors/logic/switch/switch.js +52 -4
  34. package/build/shared/charts/descriptors/logic/switchLocale.js +30 -2
  35. package/build/shared/charts/descriptors/logic/think.js +7 -3
  36. package/build/shared/charts/descriptors/logic/thinkV2.js +104 -0
  37. package/build/shared/charts/descriptors/logic/wait.js +2 -9
  38. package/build/shared/charts/descriptors/message/checkChannelChange/checkChannelChange.js +1 -0
  39. package/build/shared/charts/descriptors/message/checkChannelChange/onNo.js +3 -1
  40. package/build/shared/charts/descriptors/message/checkChannelChange/onYes.js +3 -1
  41. package/build/shared/charts/descriptors/message/checkChannelChange/unchanged.js +3 -1
  42. package/build/shared/charts/descriptors/message/question/onAnswer.js +3 -1
  43. package/build/shared/charts/descriptors/message/question/onQuestion.js +3 -1
  44. package/build/shared/charts/descriptors/message/question/question.js +474 -56
  45. package/build/shared/charts/descriptors/message/question/utils/datepickerUtils.js +1 -0
  46. package/build/shared/charts/descriptors/message/question/utils/evaluateQuestionAnswer.js +9 -3
  47. package/build/shared/charts/descriptors/message/question/utils/generateAnswerShortForm.js +37 -0
  48. package/build/shared/charts/descriptors/message/question/utils/getQuestionText.js +36 -0
  49. package/build/shared/charts/descriptors/message/question/utils/resetNodeState.js +12 -0
  50. package/build/shared/charts/descriptors/message/question/utils/storeQuestionAnswer.js +30 -0
  51. package/build/shared/charts/descriptors/message/question/utils/validateQuestionAnswer.js +22 -0
  52. package/build/shared/charts/descriptors/microsoft/getToken.js +34 -0
  53. package/build/shared/charts/descriptors/microsoft/index.js +22 -0
  54. package/build/shared/charts/descriptors/microsoft/invalidateToken.js +29 -0
  55. package/build/shared/charts/descriptors/microsoft/tokenStatus/index.js +51 -0
  56. package/build/shared/charts/descriptors/microsoft/tokenStatus/tokenGranted.js +24 -0
  57. package/build/shared/charts/descriptors/microsoft/tokenStatus/tokenNotGranted.js +24 -0
  58. package/build/shared/charts/descriptors/microsoft/utils/design.js +5 -0
  59. package/build/shared/charts/descriptors/nlu/executeCognigyNLU.js +5 -0
  60. package/build/shared/charts/descriptors/nlu/extractAnswer.js +115 -0
  61. package/build/shared/charts/descriptors/nlu/fuzzySearch.js +270 -0
  62. package/build/shared/charts/descriptors/nlu/index.js +7 -1
  63. package/build/shared/charts/descriptors/nlu/matchPattern.js +104 -0
  64. package/build/shared/charts/descriptors/nlu/utils/patternMatcher.js +197 -0
  65. package/build/shared/charts/descriptors/profile/index.js +5 -1
  66. package/build/shared/charts/descriptors/profile/overwriteAnalytics.js +54 -2
  67. package/build/shared/charts/descriptors/profile/requestRating.js +57 -0
  68. package/build/shared/charts/descriptors/profile/setRating.js +39 -0
  69. package/build/shared/charts/descriptors/service/handover.js +29 -2
  70. package/build/shared/charts/descriptors/service/handoverV2.js +129 -0
  71. package/build/shared/charts/descriptors/service/httpRequest.js +26 -7
  72. package/build/shared/charts/descriptors/service/index.js +3 -1
  73. package/build/shared/charts/descriptors/service/triggerFunction/onScheduled.js +2 -0
  74. package/build/shared/charts/descriptors/service/triggerFunction/onSchedulingError.js +2 -0
  75. package/build/shared/charts/descriptors/start.js +1 -0
  76. package/build/shared/charts/descriptors/voicegateway/nodes/callRecording.js +36 -16
  77. package/build/shared/charts/descriptors/voicegateway/nodes/handover.js +2 -2
  78. package/build/shared/charts/descriptors/voicegateway/nodes/playURL.js +9 -0
  79. package/build/shared/charts/descriptors/voicegateway/nodes/sendMessage.js +1 -1
  80. package/build/shared/charts/descriptors/voicegateway/utils/paramUtils.js +9 -1
  81. package/build/shared/charts/descriptors/voicegateway2/index.js +21 -0
  82. package/build/shared/charts/descriptors/voicegateway2/nodes/dtmf.js +56 -0
  83. package/build/shared/charts/descriptors/voicegateway2/nodes/hangup.js +48 -0
  84. package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +199 -0
  85. package/build/shared/charts/descriptors/voicegateway2/nodes/refer.js +44 -0
  86. package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +584 -0
  87. package/build/shared/charts/descriptors/voicegateway2/utils/design.js +5 -0
  88. package/build/shared/charts/descriptors/voicegateway2/utils/strip-nulls.js +19 -0
  89. package/build/shared/constants.js +9 -1
  90. package/build/shared/errors/baseError.js +34 -1
  91. package/build/shared/helper/rest/array.js +19 -0
  92. package/build/shared/helper/rest/boolean.js +5 -1
  93. package/build/shared/helper/rest/index.js +4 -1
  94. package/build/shared/interfaces/IEndpointTranslationSettings.js +32 -0
  95. package/build/shared/interfaces/IHandoverRequestStatus.js +3 -0
  96. package/build/shared/interfaces/{restAPI/administration/user/v2.0/IDeleteUserMeRest_2_0.js → IHttpRequest.js} +1 -1
  97. package/build/shared/interfaces/IOrganisation.js +1 -1
  98. package/build/shared/interfaces/TEntrypointType.js +2 -0
  99. package/build/shared/interfaces/amqpInterface.js +3 -0
  100. package/build/shared/interfaces/analytics/IAnalyticsFlowHistoryData.js +3 -0
  101. package/build/shared/interfaces/analytics/IAnalyticsSourceData.js +196 -45
  102. package/build/shared/interfaces/analytics/IStepEvent.js +2 -1
  103. package/build/shared/interfaces/analytics/TAnalyticsMode.js +10 -0
  104. package/build/shared/interfaces/analytics/TAnalyticsType.js +5 -0
  105. package/build/shared/interfaces/debugEvents/IErrorEventPayload.js +3 -0
  106. package/build/shared/interfaces/debugEvents/TDebugEndpointEvent.js +1 -0
  107. package/build/shared/interfaces/debugEvents/TDebugEventType.js +2 -1
  108. package/build/shared/interfaces/debugEvents/TSessionStateEmitParams.js +3 -0
  109. package/build/shared/interfaces/handover.js +81 -3
  110. package/build/shared/interfaces/license.js +34 -0
  111. package/build/shared/interfaces/license.js.map +1 -0
  112. package/build/shared/interfaces/messageAPI/ai.js +15 -1
  113. package/build/shared/interfaces/messageAPI/endpoints.js +273 -9
  114. package/build/shared/interfaces/resources/IAuditEvent.js +15 -2
  115. package/build/shared/interfaces/resources/IChartNode.js +56 -10
  116. package/build/shared/interfaces/resources/IEndpoint.js +5 -2
  117. package/build/shared/interfaces/resources/IFlow.js +1 -1
  118. package/build/shared/interfaces/resources/ILexicon.js +8 -2
  119. package/build/shared/interfaces/resources/INLUConnector.js +15 -2
  120. package/build/shared/interfaces/resources/INodeDescriptorSet.js +164 -52
  121. package/build/shared/interfaces/resources/IOptionsResolverFunction.js +18 -0
  122. package/build/shared/interfaces/resources/IPlaybookRun.js +61 -0
  123. package/build/shared/interfaces/resources/IProject.js +7 -1
  124. package/build/shared/interfaces/resources/ISlotFiller.js +38 -21
  125. package/build/shared/interfaces/resources/ISnapshot.js +1 -1
  126. package/build/shared/interfaces/resources/ITrackAnalyticsStepsArguments.js +3 -0
  127. package/build/shared/interfaces/resources/TNLUConnectorType.js +2 -1
  128. package/build/shared/interfaces/resources/TResourceType.js +1 -0
  129. package/build/shared/interfaces/resources/TRestChannelType.js +5 -0
  130. package/build/shared/interfaces/resources/TSocketChannelType.js +5 -1
  131. package/build/shared/interfaces/resources/chart/IChartExecutable.js +3 -2
  132. package/build/shared/interfaces/resources/chart/IChartExecutableNode.js +1 -0
  133. package/build/shared/interfaces/resources/intent/IIntent.js +4 -2
  134. package/build/shared/interfaces/resources/intent/IIntentTrainGroup.js +3 -1
  135. package/build/shared/interfaces/resources/intent/ISentence.js +32 -8
  136. package/build/shared/interfaces/resources/settings/IAgentSettings.js +40 -2
  137. package/build/shared/interfaces/resources/settings/IFlowSettings.js +1 -1
  138. package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/IReadLiveAgentAccountRest_2_0.js +3 -0
  139. package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/IReadProjectInboxRest_2_0.js +3 -0
  140. package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/ISetupCognigyLiveAgentInboxRest_2_0.js +3 -0
  141. package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/ISetupCognigyLiveAgentRest_2_0.js +3 -0
  142. package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/index.js +3 -0
  143. package/build/shared/interfaces/restAPI/analytics/IDeleteAnalyticsRecordsRest_2_0.js +3 -0
  144. package/build/shared/interfaces/restAPI/analytics/IUpdateAnalyticsRecordProperties_2_0.js +3 -0
  145. package/build/shared/interfaces/restAPI/analytics/IUpdateAnalyticsRecordsRest_2_0.js +3 -0
  146. package/build/shared/interfaces/restAPI/insights/IAnalyticsQueryFilter_2_0.js +3 -0
  147. package/build/shared/interfaces/restAPI/insights/TAnalyticsQueryFilterOperator_2_0.js +3 -0
  148. package/build/shared/interfaces/restAPI/insights/messages/IGenerateMessagesRest_2_0.js +5 -0
  149. package/build/shared/interfaces/restAPI/insights/messages/ILoadMessagesReportByQueryHashResponse_2_0.js +3 -0
  150. package/build/shared/interfaces/restAPI/insights/messages/ILoadMessagesReportByQueryHashRestData_2_0.js +3 -0
  151. package/build/shared/interfaces/restAPI/insights/messages/ITopNMessages_2_0.js +3 -0
  152. package/build/shared/interfaces/restAPI/insights/reports/IGenerateReportResponse_2_0.js +3 -0
  153. package/build/shared/interfaces/restAPI/insights/reports/IGenerateReportRest_2_0.js +41 -0
  154. package/build/shared/interfaces/restAPI/insights/reports/ILoadReportByQueryHashResponse_2_0.js +3 -0
  155. package/build/shared/interfaces/restAPI/insights/reports/ILoadReportByQueryHashRest_2_0.js +3 -0
  156. package/build/shared/interfaces/restAPI/insights/steps/IGenerateStepReportRest_2_0.js +3 -0
  157. package/build/shared/interfaces/restAPI/insights/steps/IIndexStepsRest_2_0.js +3 -0
  158. package/build/shared/interfaces/restAPI/insights/steps/ILoadStepReportByQueryHashResponse_2_0.js +3 -0
  159. package/build/shared/interfaces/restAPI/insights/steps/ILoadStepReportByQueryHashRestData_2_0.js +3 -0
  160. package/build/shared/interfaces/restAPI/insights/steps/IStepIndexItem_2_0.js +3 -0
  161. package/build/shared/interfaces/restAPI/insights/steps/IStepReport_2_0.js +3 -0
  162. package/build/shared/interfaces/restAPI/insights/steps/IStep_2_0.js +3 -0
  163. package/build/shared/interfaces/restAPI/insights/transcripts/IGenerateTranscriptsRest_2_0.js +3 -0
  164. package/build/shared/interfaces/restAPI/insights/transcripts/ILoadTranscriptsReportByQueryHashResponse_2_0.js +3 -0
  165. package/build/shared/interfaces/restAPI/insights/transcripts/ILoadTranscriptsReportByQueryHashRestData_2_0.js +3 -0
  166. package/build/shared/interfaces/restAPI/insights/transcripts/IStepPath_2_0.js +3 -0
  167. package/build/shared/interfaces/restAPI/resources/chart/v2.0/ISearchChartNodesRest_2_0.js +3 -0
  168. package/build/shared/interfaces/restAPI/resources/extension/v2.0/IUpdateExtensionPackageRest_2_0.js +4 -0
  169. package/build/shared/interfaces/restAPI/resources/flow/v2.0/ICreateFlowFromChildrenRest_2_0.js +4 -0
  170. package/build/shared/interfaces/restAPI/resources/flow/v2.0/intent/ITrainYesNoIntentsRest_2_0.js +3 -0
  171. package/build/shared/interfaces/restAPI/resources/lexicon/v2.0/IComposeLexiconDownloadLinkRest_2_0.js +3 -0
  172. package/build/shared/interfaces/restAPI/resources/nluconnector/v2.0/TNLUConnectorType_2_0.js +3 -1
  173. package/build/shared/interfaces/restAPI/resources/nodedescriptorsets/v2.0/IOptionsResolverRest_2_0.js +3 -0
  174. package/build/shared/interfaces/restAPI/resources/playbook/v2.0/IDeletePlaybookRunRest_2_0.js +3 -0
  175. package/build/shared/interfaces/restAPI/resources/playbook/v2.0/IIndexPlaybookRunsRest_2_0.js +3 -0
  176. package/build/shared/interfaces/restAPI/resources/playbook/v2.0/IPlaybookRunIndexItem_2_0.js +3 -0
  177. package/build/shared/interfaces/restAPI/resources/playbook/v2.0/IPlaybookRun_2_0.js +7 -0
  178. package/build/shared/interfaces/restAPI/resources/playbook/v2.0/IReadPlaybookRunRest_2_0.js +3 -0
  179. package/build/shared/interfaces/restAPI/resources/playbook/v2.0/ISchedulePlaybookRunRest_2_0.js +3 -0
  180. package/build/shared/interfaces/security/IACL.js +1 -1
  181. package/build/shared/interfaces/security/IPermission.js +6 -0
  182. package/build/shared/interfaces/security/IRole.js +8 -2
  183. package/build/shared/interfaces/sessionstate/ISessionState.js +3 -0
  184. package/build/shared/interfaces/sessionstate/index.js +3 -0
  185. package/build/shared/interfaces/trainer/ITrainerRecord.js +4 -0
  186. package/build/shared/interfaces/translation.js +11 -0
  187. package/package.json +5 -5
  188. package/types/index.d.ts +3905 -1178
  189. package/build/shared/charts/descriptors/logic/checkFrustration.js +0 -82
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseBoolean = void 0;
3
+ exports.parseBooleanValues = exports.parseBoolean = void 0;
4
4
  const parseBoolean = (value) => {
5
5
  return value === "true" ? true : undefined;
6
6
  };
7
7
  exports.parseBoolean = parseBoolean;
8
+ const parseBooleanValues = (value) => {
9
+ return value === "true" ? true : value === "false" ? false : undefined;
10
+ };
11
+ exports.parseBooleanValues = parseBooleanValues;
8
12
  //# sourceMappingURL=boolean.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseBoolean = exports.NumberRange = exports.validateBatchOperations = exports.stringifyQuery = exports.parseQuery = exports.parseSkip = exports.parseLimit = exports.stringifySort = exports.parseSort = void 0;
3
+ exports.parseArray = exports.parseBooleanValues = exports.parseBoolean = exports.NumberRange = exports.validateBatchOperations = exports.stringifyQuery = exports.parseQuery = exports.parseSkip = exports.parseLimit = exports.stringifySort = exports.parseSort = void 0;
4
4
  var sort_1 = require("./sort");
5
5
  Object.defineProperty(exports, "parseSort", { enumerable: true, get: function () { return sort_1.parseSort; } });
6
6
  Object.defineProperty(exports, "stringifySort", { enumerable: true, get: function () { return sort_1.stringifySort; } });
@@ -17,4 +17,7 @@ var NumberRange_1 = require("./NumberRange");
17
17
  Object.defineProperty(exports, "NumberRange", { enumerable: true, get: function () { return NumberRange_1.NumberRange; } });
18
18
  var boolean_1 = require("./boolean");
19
19
  Object.defineProperty(exports, "parseBoolean", { enumerable: true, get: function () { return boolean_1.parseBoolean; } });
20
+ Object.defineProperty(exports, "parseBooleanValues", { enumerable: true, get: function () { return boolean_1.parseBooleanValues; } });
21
+ var array_1 = require("./array");
22
+ Object.defineProperty(exports, "parseArray", { enumerable: true, get: function () { return array_1.parseArray; } });
20
23
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.translationSettingsEndpointSchema = void 0;
4
+ exports.translationSettingsEndpointSchema = {
5
+ title: "translationSettingsEndpointSchema",
6
+ type: "object",
7
+ additionalProperties: false,
8
+ properties: {
9
+ translationEnabled: {
10
+ type: "boolean"
11
+ },
12
+ flowLanguage: {
13
+ type: "string"
14
+ },
15
+ inputLanguage: {
16
+ type: "string"
17
+ },
18
+ noTranslateMarker: {
19
+ type: "string"
20
+ },
21
+ padPayloads: {
22
+ type: "boolean"
23
+ },
24
+ alwaysRemoveNoTranslateMarker: {
25
+ type: "boolean",
26
+ },
27
+ setInputLanguageOnExecutionCount: {
28
+ type: "number",
29
+ },
30
+ }
31
+ };
32
+ //# sourceMappingURL=IEndpointTranslationSettings.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IHandoverRequestStatus.js.map
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IDeleteUserMeRest_2_0.js.map
3
+ //# sourceMappingURL=IHttpRequest.js.map
@@ -45,7 +45,7 @@ exports.organisationSchema = {
45
45
  title: "organisationSchema",
46
46
  type: "object",
47
47
  additionalProperties: false,
48
- properties: Object.assign({ _id: { format: "mongo-id" } }, exports.organisationDataSchema.properties),
48
+ properties: Object.assign(Object.assign({ _id: { format: "mongo-id" } }, exports.organisationDataSchema.properties), { liveAgentAccount: { type: "number" } }),
49
49
  };
50
50
  exports.organisationQuerySchema = createQuerySchema_1.createQuerySchema("organisationQuerySchema", exports.organisationSchema);
51
51
  //# sourceMappingURL=IOrganisation.js.map
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.entrypointType = void 0;
4
+ exports.entrypointType = ["project", "snapshot"];
3
5
  //# sourceMappingURL=TEntrypointType.js.map
@@ -71,6 +71,9 @@ exports.executeRpcInternalParamsSchema = {
71
71
  minimum: 1,
72
72
  },
73
73
  session: {},
74
+ bulk: {
75
+ type: "boolean",
76
+ },
74
77
  reThrow: {
75
78
  type: "boolean"
76
79
  },
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAnalyticsFlowHistoryData.js.map
@@ -1,65 +1,216 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.customerEditableAnalyticsSchema = void 0;
3
+ exports.customerEditableAnalyticsSchema = exports.customerUpdatableAnalyticsSchema = void 0;
4
+ const TEntrypointType_1 = require("../TEntrypointType");
5
+ const TAnalyticsMode_1 = require("./TAnalyticsMode");
6
+ exports.customerUpdatableAnalyticsSchema = {
7
+ title: "customerUpdatableAnalyticsSchema",
8
+ type: "object",
9
+ additionalProperties: false,
10
+ properties: {
11
+ state: {
12
+ type: ["string", "null"],
13
+ maxLength: 256,
14
+ },
15
+ mode: {
16
+ type: "string",
17
+ enum: [...TAnalyticsMode_1.analyticsModeTypes],
18
+ },
19
+ userType: {
20
+ type: ["string", "null"],
21
+ maxLength: 256,
22
+ },
23
+ channel: {
24
+ type: ["string", "null"],
25
+ maxLength: 256,
26
+ },
27
+ flowLanguage: {
28
+ type: ["string", "null"],
29
+ maxLength: 256,
30
+ },
31
+ intent: {
32
+ type: ["string", "null"],
33
+ maxLength: 256,
34
+ },
35
+ intentScore: {
36
+ type: ["number", "null"],
37
+ },
38
+ intentFlow: {
39
+ type: ["string", "null"],
40
+ maxLength: 256,
41
+ },
42
+ flowName: {
43
+ type: ["string", "null"],
44
+ maxLength: 256,
45
+ },
46
+ inHandoverRequest: {
47
+ type: ["boolean", "null"],
48
+ },
49
+ inHandoverConversation: {
50
+ type: ["boolean", "null"],
51
+ },
52
+ localeName: {
53
+ type: ["string", "null"],
54
+ },
55
+ rating: {
56
+ type: ["number", "null"],
57
+ },
58
+ ratingComment: {
59
+ type: ["string", "null"],
60
+ maxLength: 256,
61
+ },
62
+ entrypointType: {
63
+ type: "string",
64
+ enum: [...TEntrypointType_1.entrypointType],
65
+ },
66
+ endpointName: {
67
+ type: ["string", "null"],
68
+ },
69
+ endpointUrlToken: {
70
+ type: ["string", "null"],
71
+ },
72
+ handoverEscalations: {
73
+ type: ["number", "null"],
74
+ },
75
+ snapshotName: {
76
+ type: ["string", "null"],
77
+ },
78
+ slots: {
79
+ type: ["null", "object"],
80
+ },
81
+ custom1: {
82
+ type: ["string", "null"],
83
+ maxLength: 512,
84
+ },
85
+ custom2: {
86
+ type: ["string", "null"],
87
+ maxLength: 512,
88
+ },
89
+ custom3: {
90
+ type: ["string", "null"],
91
+ maxLength: 512,
92
+ },
93
+ custom4: {
94
+ type: ["string", "null"],
95
+ maxLength: 512,
96
+ },
97
+ custom5: {
98
+ type: ["string", "null"],
99
+ maxLength: 512,
100
+ },
101
+ custom6: {
102
+ type: ["string", "null"],
103
+ maxLength: 512,
104
+ },
105
+ custom7: {
106
+ type: ["string", "null"],
107
+ maxLength: 512,
108
+ },
109
+ custom8: {
110
+ type: ["string", "null"],
111
+ maxLength: 512,
112
+ },
113
+ custom9: {
114
+ type: ["string", "null"],
115
+ maxLength: 512,
116
+ },
117
+ custom10: {
118
+ type: ["string", "null"],
119
+ maxLength: 512,
120
+ },
121
+ },
122
+ };
4
123
  exports.customerEditableAnalyticsSchema = {
5
- "type": "object",
6
- "additionalProperties": false,
7
- "properties": {
8
- "intent": {
9
- "type": ["string", "null"],
10
- "maxLength": 256,
124
+ title: "customerEditableAnalyticsSchema",
125
+ type: "object",
126
+ additionalProperties: false,
127
+ properties: {
128
+ intent: {
129
+ type: ["string", "null"],
130
+ maxLength: 256,
131
+ },
132
+ inputText: {
133
+ type: ["string", "null"],
134
+ maxLength: 256,
135
+ },
136
+ inputData: {
137
+ type: ["object", "null"],
138
+ },
139
+ state: {
140
+ type: ["string", "null"],
141
+ maxLength: 256,
142
+ },
143
+ slots: {
144
+ type: ["object", "null"],
145
+ },
146
+ completedGoals: {
147
+ type: ["array", "null"],
148
+ },
149
+ traceId: {
150
+ type: ["string", "null"],
151
+ },
152
+ disableSensitiveLogging: {
153
+ type: ["boolean", "null"],
154
+ },
155
+ intentScore: {
156
+ type: ["number", "null"],
157
+ },
158
+ intentFlow: {
159
+ type: ["string", "null"],
160
+ maxLength: 256,
11
161
  },
12
- "inputText": {
13
- "type": ["string", "null"],
14
- "maxLength": 256,
162
+ understood: {
163
+ type: ["boolean", "null"],
15
164
  },
16
- "inputData": {
17
- "type": ["object", "null"]
165
+ inHandoverRequest: {
166
+ type: ["boolean", "null"],
18
167
  },
19
- "state": {
20
- "type": ["string", "null"],
21
- "maxLength": 256
168
+ inHandoverConversation: {
169
+ type: ["boolean", "null"],
22
170
  },
23
- "slots": {
24
- "type": ["object", "null"]
171
+ handoverEscalations: {
172
+ type: ["number", "null"],
25
173
  },
26
- "completedGoals": {
27
- "type": ["array", "null"]
174
+ custom1: {
175
+ type: ["string", "null"],
176
+ maxLength: 512,
28
177
  },
29
- "traceId": {
30
- "type": ["string", "null"],
178
+ custom2: {
179
+ type: ["string", "null"],
180
+ maxLength: 512,
31
181
  },
32
- "disableSensitiveLogging": {
33
- "type": ["boolean", "null"]
182
+ custom3: {
183
+ type: ["string", "null"],
184
+ maxLength: 512,
34
185
  },
35
- "intentScore": {
36
- "type": ["number", "null"]
186
+ custom4: {
187
+ type: ["string", "null"],
188
+ maxLength: 512,
37
189
  },
38
- "intentFlow": {
39
- "type": ["string", "null"],
40
- "maxLength": 256
190
+ custom5: {
191
+ type: ["string", "null"],
192
+ maxLength: 512,
41
193
  },
42
- "understood": {
43
- "type": ["boolean", "null"]
194
+ custom6: {
195
+ type: ["string", "null"],
196
+ maxLength: 512,
44
197
  },
45
- "inHandoverRequest": {
46
- "type": ["boolean", "null"]
198
+ custom7: {
199
+ type: ["string", "null"],
200
+ maxLength: 512,
47
201
  },
48
- "inHandoverConversation": {
49
- "type": ["boolean", "null"]
202
+ custom8: {
203
+ type: ["string", "null"],
204
+ maxLength: 512,
50
205
  },
51
- "custom1": {
52
- "type": ["string", "null"],
53
- "maxLength": 512
206
+ custom9: {
207
+ type: ["string", "null"],
208
+ maxLength: 512,
54
209
  },
55
- "custom2": {
56
- "type": ["string", "null"],
57
- "maxLength": 512
210
+ custom10: {
211
+ type: ["string", "null"],
212
+ maxLength: 512,
58
213
  },
59
- "custom3": {
60
- "type": ["string", "null"],
61
- "maxLength": 512
62
- }
63
- }
214
+ },
64
215
  };
65
216
  //# sourceMappingURL=IAnalyticsSourceData.js.map
@@ -31,8 +31,9 @@ exports.stepEventSchema = {
31
31
  type: { type: "string", enum: ["intent", "node"] },
32
32
  flowName: { type: "string", format: "resource-name" },
33
33
  flowReferenceId: { type: "string", format: "uuid" },
34
- endpointName: { type: ["string", "null"], format: "resource-name" },
35
34
  endpointUrlToken: { type: ["string", "null"] },
35
+ endpointName: { type: ["string", "null"], format: "resource-name" },
36
+ channel: { type: "string" },
36
37
  localeName: { type: ["string", "null"], format: "resource-name" },
37
38
  localeReferenceId: { type: ["string", "null"], format: "uuid" },
38
39
  projectName: { type: "string", format: "resource-name" },
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.analyticsModeTypes = void 0;
4
+ exports.analyticsModeTypes = [
5
+ "TextOnly",
6
+ "DataOnly",
7
+ "TextData",
8
+ "Empty",
9
+ ];
10
+ //# sourceMappingURL=TAnalyticsMode.js.map
@@ -1,3 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.analyticsType = void 0;
4
+ exports.analyticsType = [
5
+ "input",
6
+ "output",
7
+ ];
3
8
  //# sourceMappingURL=TAnalyticsType.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IErrorEventPayload.js.map
@@ -8,6 +8,7 @@ exports.debugEventTypes = [
8
8
  "inputChanged",
9
9
  "nodeError",
10
10
  "nodeExecuted",
11
+ "input",
11
12
  "output",
12
13
  "profileChanged",
13
14
  "switchedFlow",
@@ -9,8 +9,9 @@ exports.arrayTDebugEventTypes = [
9
9
  "nodeExecuted",
10
10
  "nodeError",
11
11
  "finalPing",
12
+ "input",
12
13
  "output",
13
14
  "switchedFlow",
14
- "nluWarning"
15
+ "nluWarning",
15
16
  ];
16
17
  //# sourceMappingURL=TDebugEventType.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TSessionStateEmitParams.js.map
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.chatwootSettingsSchema = exports.handoverAgentReplySchema = exports.rceSettingsSchema = exports.handoverSettingsSchema = exports.handoverProviders = exports.internalHandoverProviders = exports.externalHandoverProviders = void 0;
3
+ exports.liveAgentSettingsSchema = exports.salesforceSettingsSchema = exports.chatwootSettingsSchema = exports.handoverAgentReplySchema = exports.rceSettingsSchema = exports.handoverSettingsSchema = exports.handoverProviders = exports.internalHandoverProviders = exports.externalHandoverProviders = void 0;
4
4
  exports.externalHandoverProviders = [
5
5
  "rce",
6
6
  "chatwoot",
7
+ "salesforce",
8
+ "liveAgent"
7
9
  ];
8
10
  exports.internalHandoverProviders = [
9
11
  "cognigy",
@@ -20,7 +22,7 @@ exports.handoverSettingsSchema = {
20
22
  properties: {
21
23
  provider: {
22
24
  type: "string",
23
- enum: ["none", "chatwoot", "cognigy", "rce"]
25
+ enum: ["none", "chatwoot", "cognigy", "rce", "salesforce", "liveAgent"]
24
26
  },
25
27
  providerSettings: {
26
28
  type: "object",
@@ -32,6 +34,7 @@ exports.handoverSettingsSchema = {
32
34
  accountId: { type: "string" },
33
35
  baseUrl: { type: "string" },
34
36
  apiKey: { type: "string" },
37
+ usePlatformToken: { type: "boolean" },
35
38
  forwardOnlyHandoverConversations: { type: "boolean" },
36
39
  apiAccessToken: { type: "string" },
37
40
  baseApiUrl: { type: "string", format: "url" },
@@ -39,10 +42,21 @@ exports.handoverSettingsSchema = {
39
42
  realtimeEndpointUrl: { type: "string" },
40
43
  webhookSecret: { type: "string" },
41
44
  agentCategoryId: { type: "string" },
42
- botCategoryId: { type: "string" }
45
+ botCategoryId: { type: "string" },
46
+ apiVersion: { type: "string" },
47
+ organizationId: { type: "string" },
48
+ deploymentId: { type: "string" },
49
+ buttonId: { type: "string" }
43
50
  }
44
51
  }
45
52
  ]
53
+ },
54
+ agentAssistSettings: {
55
+ type: "object",
56
+ additionalProperties: false,
57
+ properties: {
58
+ agentAssistFlowId: { type: "string" },
59
+ }
46
60
  }
47
61
  }
48
62
  };
@@ -145,4 +159,68 @@ exports.chatwootSettingsSchema = {
145
159
  },
146
160
  }
147
161
  };
162
+ exports.salesforceSettingsSchema = {
163
+ title: "salesforceSettingsSchema",
164
+ type: "object",
165
+ additionalProperties: false,
166
+ required: [
167
+ "apiVersion",
168
+ "baseUrl",
169
+ "organizationId",
170
+ "deploymentId",
171
+ "buttonId"
172
+ ],
173
+ properties: {
174
+ apiVersion: {
175
+ type: "string"
176
+ },
177
+ baseUrl: {
178
+ type: "string",
179
+ format: "url"
180
+ },
181
+ organizationId: {
182
+ type: "string",
183
+ },
184
+ deploymentId: {
185
+ type: "string",
186
+ },
187
+ buttonId: {
188
+ "type": "string",
189
+ },
190
+ forwardOnlyHandoverConversations: {
191
+ "type": "boolean",
192
+ },
193
+ }
194
+ };
195
+ exports.liveAgentSettingsSchema = {
196
+ title: "liveAgentSettingsSchema",
197
+ type: "object",
198
+ additionalProperties: false,
199
+ required: [
200
+ "baseUrl",
201
+ "accountId",
202
+ "apiKey",
203
+ ],
204
+ properties: {
205
+ accountId: {
206
+ type: "string"
207
+ },
208
+ apiKey: {
209
+ type: "string"
210
+ },
211
+ baseUrl: {
212
+ type: "string",
213
+ format: "url"
214
+ },
215
+ liveAgentInboxId: {
216
+ type: "string",
217
+ },
218
+ forwardOnlyHandoverConversations: {
219
+ "type": "boolean",
220
+ },
221
+ usePlatformToken: {
222
+ "type": "boolean",
223
+ }
224
+ }
225
+ };
148
226
  //# sourceMappingURL=handover.js.map
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.licenseCapabilitiesMapping = exports.licenseCapabilitiesFromKey = exports.licenseStates = void 0;
4
+ /**
5
+ * @openapi
6
+ * components:
7
+ * schemas:
8
+ * TLicenseState:
9
+ * type: string
10
+ * description: The state of the license
11
+ * example: valid
12
+ * enum:
13
+ * - invalid
14
+ * - valid
15
+ * - valid3MonthsLeft
16
+ * - willExpireSoon
17
+ * - expiredRenewRequired
18
+ * - expired
19
+ */
20
+ exports.licenseStates = [
21
+ "invalid",
22
+ "valid",
23
+ "valid3MonthsLeft",
24
+ "willExpireSoon",
25
+ "expiredRenewRequired",
26
+ "expired" /* The license is expired. The system can no longer be used (ui, api) */
27
+ ];
28
+ exports.licenseCapabilitiesFromKey = ["ui", "handover", "liveAgent"];
29
+ exports.licenseCapabilitiesMapping = {
30
+ ui: "uiLicensed",
31
+ handover: "handoverLicensed",
32
+ liveAgent: 'liveAgentLicensed',
33
+ };
34
+ //# sourceMappingURL=license.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license.js","sourceRoot":"","sources":["../../../src/shared/interfaces/license.ts"],"names":[],"mappings":";;;AAuBA;;;;;;;;;;;;;;;GAeG;AACU,QAAA,aAAa,GAAU;IACnC,SAAS;IACT,OAAO;IACP,kBAAkB;IAClB,gBAAgB;IAChB,sBAAsB;IACtB,SAAS,CAAC,wEAAwE;CAClF,CAAC;AAaW,QAAA,0BAA0B,GAAU,CAAC,IAAI,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAGpE,QAAA,0BAA0B,GAA8D;IACpG,EAAE,EAAE,YAAY;IAChB,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,mBAAmB;CAC9B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.userSchema = void 0;
3
+ exports.isSwitchedFlowData = exports.userSchema = void 0;
4
4
  exports.userSchema = {
5
5
  title: "userSchema",
6
6
  type: "object",
@@ -15,4 +15,18 @@ exports.userSchema = {
15
15
  userId: { type: "string", minLength: 1 },
16
16
  },
17
17
  };
18
+ /**
19
+ * Type-Guard for "ISwitchedFlowData" in "AnyProcessOutputData"
20
+ *
21
+ * Can be used to easily exclude the type to get typed access to _cognigy
22
+ */
23
+ const isSwitchedFlowData = (data) => {
24
+ if (!data)
25
+ return false;
26
+ const { type, fromFlowId, toFlowId } = data;
27
+ if (!type || !fromFlowId || !toFlowId)
28
+ return false;
29
+ return true;
30
+ };
31
+ exports.isSwitchedFlowData = isSwitchedFlowData;
18
32
  //# sourceMappingURL=ai.js.map