@cognigy/rest-api-client 0.13.1 → 0.14.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 (110) hide show
  1. package/.eslintConfig.json +117 -0
  2. package/.eslintrc.json +2 -2
  3. package/CHANGELOG.md +12 -1
  4. package/build/apigroups/ResourcesAPIGroup_2_0.js +25 -4
  5. package/build/shared/charts/descriptors/allFields.js +8 -0
  6. package/build/shared/charts/descriptors/apps/getAppSessionPin.js +9 -9
  7. package/build/shared/charts/descriptors/apps/initAppSession.js +36 -53
  8. package/build/shared/charts/descriptors/apps/setAdaptiveCardAppState.js +5 -18
  9. package/build/shared/charts/descriptors/apps/setAppState.js +6 -6
  10. package/build/shared/charts/descriptors/apps/setHtmlAppState.js +85 -15
  11. package/build/shared/charts/descriptors/apps/utils/buildAppUrl.js +12 -0
  12. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderConnection.js +14 -0
  13. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +19 -0
  14. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/openAIProviderConnection.js +11 -0
  15. package/build/shared/charts/descriptors/index.js +9 -6
  16. package/build/shared/charts/descriptors/logic/switch/switch.js +3 -2
  17. package/build/shared/charts/descriptors/message/question/optionalQuestion.js +30 -7
  18. package/build/shared/charts/descriptors/message/question/question.js +200 -28
  19. package/build/shared/charts/descriptors/message/question/utils/evaluateQuestionAnswer.js +6 -0
  20. package/build/shared/charts/descriptors/message/say.js +33 -2
  21. package/build/shared/charts/descriptors/service/completeText.js +316 -0
  22. package/build/shared/charts/descriptors/service/handoverV2.js +48 -2
  23. package/build/shared/charts/descriptors/service/index.js +3 -1
  24. package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +62 -26
  25. package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +93 -32
  26. package/build/shared/charts/descriptors/voice/nodes/bargeIn.js +53 -0
  27. package/build/shared/charts/descriptors/voice/nodes/dtmf.js +5 -3
  28. package/build/shared/charts/descriptors/voice/nodes/play.js +14 -5
  29. package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +90 -8
  30. package/build/shared/charts/descriptors/voice/nodes/transfer.js +6 -2
  31. package/build/shared/charts/descriptors/voice/utils/helper.js +11 -1
  32. package/build/shared/charts/descriptors/voicegateway/nodes/agentAssist.js +2 -2
  33. package/build/shared/charts/descriptors/voicegateway/nodes/handover.js +5 -1
  34. package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +20 -5
  35. package/build/shared/charts/descriptors/voicegateway2/nodes/refer.js +3 -3
  36. package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +150 -33
  37. package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +95 -7
  38. package/build/shared/charts/descriptors/voicegateway2/utils/helper.js +18 -11
  39. package/build/shared/charts/descriptors/voicegateway2/utils/strip-nulls.js +4 -1
  40. package/build/shared/charts/helpers/generativeAI/getRephraseWithAIFields.js +100 -0
  41. package/build/shared/charts/helpers/generativeAI/rephraseSentenceWithAi.js +44 -0
  42. package/build/shared/constants.js +2 -1
  43. package/build/shared/errors/BadGatewayError.js +2 -1
  44. package/build/shared/errors/BadRequestError.js +2 -1
  45. package/build/shared/errors/ForbiddenError.js +2 -1
  46. package/build/shared/errors/GatewayTimeoutError.js +2 -1
  47. package/build/shared/errors/MethodNotAllowedError.js +2 -1
  48. package/build/shared/errors/NetworkError.js +2 -1
  49. package/build/shared/errors/PayloadTooLargeError.js +2 -1
  50. package/build/shared/errors/PaymentRequiredError.js +2 -1
  51. package/build/shared/errors/ServiceUnavailableError.js +2 -1
  52. package/build/shared/errors/UnauthorizedError.js +2 -1
  53. package/build/shared/errors/baseError.js +27 -4
  54. package/build/shared/errors/conflict.js +2 -1
  55. package/build/shared/errors/databaseConnectError.js +2 -2
  56. package/build/shared/errors/databaseQueryError.js +2 -2
  57. package/build/shared/errors/databaseRead.js +2 -2
  58. package/build/shared/errors/databaseWrite.js +2 -2
  59. package/build/shared/errors/exportError.js +2 -2
  60. package/build/shared/errors/fileRead.js +2 -2
  61. package/build/shared/errors/fileWrite.js +2 -2
  62. package/build/shared/errors/importError.js +1 -1
  63. package/build/shared/errors/inputOutputError.js +2 -2
  64. package/build/shared/errors/internalServerError.js +2 -1
  65. package/build/shared/errors/invalidArgument.js +2 -2
  66. package/build/shared/errors/missingArgument.js +2 -2
  67. package/build/shared/errors/notImplementedError.js +2 -1
  68. package/build/shared/errors/process.js +2 -2
  69. package/build/shared/errors/resourceNotFound.js +5 -1
  70. package/build/shared/errors/smtpConnectError.js +2 -2
  71. package/build/shared/errors/timeoutError.js +2 -2
  72. package/build/shared/interfaces/ai.js +16 -0
  73. package/build/shared/interfaces/analytics/IAnalyticsDataGoals.js +3 -0
  74. package/build/shared/interfaces/endpointInterface.js +1 -0
  75. package/build/shared/interfaces/filemanager/IRuntimeFile.js +30 -0
  76. package/build/shared/interfaces/filemanager/index.js +1 -0
  77. package/build/shared/interfaces/handover.js +40 -3
  78. package/build/shared/interfaces/messageAPI/endpoints.js +2 -0
  79. package/build/shared/interfaces/messageAPI/handover.js +6 -0
  80. package/build/shared/interfaces/resources/IAgentAssistConfig.js +56 -0
  81. package/build/shared/interfaces/resources/IConnectionSchema.js +2 -1
  82. package/build/shared/interfaces/resources/IExtension.js +2 -1
  83. package/build/shared/interfaces/resources/IFlow.js +2 -1
  84. package/build/shared/interfaces/resources/ILexicon.js +15 -2
  85. package/build/shared/interfaces/resources/ILocale.js +25 -3
  86. package/build/shared/interfaces/resources/INodeDescriptorSet.js +2 -1
  87. package/build/shared/interfaces/resources/TResourceType.js +3 -0
  88. package/build/shared/interfaces/resources/intent/IIntent.js +5 -2
  89. package/build/shared/interfaces/resources/intent/IIntentRelation.js +3 -1
  90. package/build/shared/interfaces/resources/settings/IAgentSettings.js +9 -4
  91. package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +136 -0
  92. package/build/shared/interfaces/resources/settings/ISharedSettings.js +1 -1
  93. package/build/shared/interfaces/resources/settings/index.js +7 -1
  94. package/build/shared/interfaces/resources/yesNoIntent/IYesNoItem.js +5 -5
  95. package/build/shared/interfaces/restAPI/administration/liveAgent/v2.0/ICognigyLiveAgentMiddleware_2_0.js +3 -0
  96. package/build/shared/interfaces/restAPI/resources/agentAssist/v2.0/IAgentAssistConfig_2_0.js +3 -0
  97. package/build/shared/interfaces/restAPI/resources/agentAssist/v2.0/ICreateAgentAssistConfigRest_2_0.js +3 -0
  98. package/build/shared/interfaces/restAPI/resources/agentAssist/v2.0/IDeleteAgentAssistConfigRest_2_0.js +3 -0
  99. package/build/shared/interfaces/restAPI/resources/agentAssist/v2.0/IIndexAgentAssistConfigsRest_2_0.js +3 -0
  100. package/build/shared/interfaces/restAPI/resources/agentAssist/v2.0/IReadAgentAssistConfigRest_2_0.js +3 -0
  101. package/build/shared/interfaces/restAPI/resources/agentAssist/v2.0/IUpdateAgentAssistConfigRest_2_0.js +3 -0
  102. package/build/shared/interfaces/restAPI/resources/agentAssist/v2.0/index.js +3 -0
  103. package/build/shared/interfaces/restAPI/resources/flow/v2.0/sentence/IGenerateSentencesRest_2_0.js +3 -0
  104. package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoIntents/ITrainYesNoIntentsProjectRest_2_0.js +3 -0
  105. package/build/shared/interfaces/restAPI/resources/locales/v2.0/yesNoIntents/IYesNoIntents_2_0.js +4 -4
  106. package/build/shared/interfaces/security/IACL.js +1 -1
  107. package/build/shared/interfaces/security/IPermission.js +2 -0
  108. package/build/shared/interfaces/security/IRole.js +4 -0
  109. package/package.json +2 -2
  110. package/types/index.d.ts +925 -388
package/types/index.d.ts CHANGED
@@ -422,6 +422,7 @@ declare const organisationWidePermissions: readonly [
422
422
  ];
423
423
  export declare type TOrganisationWidePermissions = typeof organisationWidePermissions[number];
424
424
  declare const projectWidePermissions: readonly [
425
+ "agentAssistConfigs",
425
426
  "analytics",
426
427
  "connections",
427
428
  "contactProfiles",
@@ -559,6 +560,15 @@ export interface ISuggestedMetaInfo {
559
560
  /** For other keys */
560
561
  [key: string]: any;
561
562
  }
563
+ declare const logLevels: readonly [
564
+ "fatal",
565
+ "error",
566
+ "warn",
567
+ "info",
568
+ "debug",
569
+ "trace"
570
+ ];
571
+ export declare type TLogLevel = typeof logLevels[number];
562
572
  export interface ILoggerStack {
563
573
  /** A traceId represents one particular trace for one request. */
564
574
  traceId?: string;
@@ -614,6 +624,11 @@ export interface IBaseErrorConstructorOptions {
614
624
  httpStatusText: string;
615
625
  stack: ILoggerStack;
616
626
  meta?: ISuggestedMetaInfo;
627
+ /** `logLevel` parameter indicates the overriding log level for the errors.
628
+ * For eg: `ResourceNotFound` scenario is not actually an error in the
629
+ * system, so this parameter will allow us to log them as info/debug level,
630
+ * but do not change the actual error respose in any way. */
631
+ logLevel?: TLogLevel;
617
632
  details: {
618
633
  [key: string]: any;
619
634
  };
@@ -653,7 +668,8 @@ declare class BaseError extends Error {
653
668
  [key: string]: any;
654
669
  };
655
670
  readonly originalErrorDetails: IOriginalErrorDetails;
656
- constructor({ name, message, code, httpStatusCode, httpStatusText, stack, meta, details }: IBaseErrorConstructorOptions);
671
+ private readonly logLevel;
672
+ constructor({ name, message, code, httpStatusCode, httpStatusText, stack, meta, details, logLevel }: IBaseErrorConstructorOptions);
657
673
  private parseOriginalError;
658
674
  toErrorLogDetails(): IErrorLogDetails;
659
675
  toResponse(): IErrorHandler;
@@ -662,81 +678,70 @@ declare class BaseError extends Error {
662
678
  traceId?: string;
663
679
  }): IErrorResponse;
664
680
  }
665
- declare const logLevels: readonly [
666
- "fatal",
667
- "error",
668
- "warn",
669
- "info",
670
- "debug",
671
- "trace"
672
- ];
673
- export declare type TLogLevel = typeof logLevels[number];
674
- export interface ISuggestedMetaInfo {
675
- }
676
681
  declare class BadGatewayError extends BaseError {
677
682
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
678
683
  [key: string]: any;
679
- });
684
+ }, logLevel?: TLogLevel);
680
685
  }
681
686
  declare class BadRequestError extends BaseError {
682
687
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
683
688
  [key: string]: any;
684
- });
689
+ }, logLevel?: TLogLevel);
685
690
  }
686
691
  declare class ConflictError extends BaseError {
687
692
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
688
693
  [key: string]: any;
689
- });
694
+ }, logLevel?: TLogLevel);
690
695
  }
691
696
  declare class DatabaseConnectError extends BadGatewayError {
692
697
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
693
698
  [key: string]: any;
694
- });
699
+ }, logLevel?: TLogLevel);
695
700
  }
696
701
  declare class InternalServerError extends BaseError {
697
702
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
698
703
  [key: string]: any;
699
- });
704
+ }, logLevel?: TLogLevel);
700
705
  }
701
706
  declare class DatabaseQueryError extends InternalServerError {
702
707
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
703
708
  [key: string]: any;
704
- });
709
+ }, logLevel?: TLogLevel);
705
710
  }
706
711
  declare class DatabaseReadError extends InternalServerError {
707
712
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
708
713
  [key: string]: any;
709
- });
714
+ }, logLevel?: TLogLevel);
710
715
  }
711
716
  declare class DatabaseWriteError extends InternalServerError {
712
717
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
713
718
  [key: string]: any;
714
- });
719
+ }, logLevel?: TLogLevel);
715
720
  }
716
721
  declare class ExportError extends InternalServerError {
717
722
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
718
723
  [key: string]: any;
719
- });
724
+ }, logLevel?: TLogLevel);
720
725
  }
721
726
  declare class FileReadError extends InternalServerError {
722
727
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
723
728
  [key: string]: any;
724
- });
729
+ }, logLevel?: TLogLevel);
725
730
  }
726
731
  declare class FileWriteError extends InternalServerError {
727
732
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
728
733
  [key: string]: any;
729
- });
734
+ }, logLevel?: TLogLevel);
730
735
  }
731
736
  declare class ForbiddenError extends BaseError {
732
737
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
733
738
  [key: string]: any;
734
- });
739
+ }, logLevel?: TLogLevel);
735
740
  }
736
741
  declare class GatewayTimeoutError extends BaseError {
737
742
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
738
743
  [key: string]: any;
739
- });
744
+ }, logLevel?: TLogLevel);
740
745
  }
741
746
  export interface IImportErrorDetails {
742
747
  duplicateSynonyms?: string[][];
@@ -746,77 +751,77 @@ export interface IImportErrorDetails {
746
751
  }
747
752
  declare class ImportError extends InternalServerError {
748
753
  readonly details: IImportErrorDetails;
749
- constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: IImportErrorDetails);
754
+ constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: IImportErrorDetails, logLevel?: TLogLevel);
750
755
  }
751
756
  declare class InputOutputError extends InternalServerError {
752
757
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
753
758
  [key: string]: any;
754
- });
759
+ }, logLevel?: TLogLevel);
755
760
  }
756
761
  declare class InvalidArgumentError extends BadRequestError {
757
762
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
758
763
  [key: string]: any;
759
- });
764
+ }, logLevel?: TLogLevel);
760
765
  }
761
766
  declare class MethodNotAllowedError extends BaseError {
762
767
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
763
768
  [key: string]: any;
764
- });
769
+ }, logLevel?: TLogLevel);
765
770
  }
766
771
  declare class MissingArgumentError extends BadRequestError {
767
772
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
768
773
  [key: string]: any;
769
- });
774
+ }, logLevel?: TLogLevel);
770
775
  }
771
776
  declare class NetworkError extends BaseError {
772
777
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
773
778
  [key: string]: any;
774
- });
779
+ }, logLevel?: TLogLevel);
775
780
  }
776
781
  declare class NotImplementedError extends BaseError {
777
782
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
778
783
  [key: string]: any;
779
- });
784
+ }, logLevel?: TLogLevel);
780
785
  }
781
786
  declare class PayloadTooLargeError extends BaseError {
782
787
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
783
788
  [key: string]: any;
784
- });
789
+ }, logLevel?: TLogLevel);
785
790
  }
786
791
  declare class PaymentRequiredError extends BaseError {
787
792
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
788
793
  [key: string]: any;
789
- });
794
+ }, logLevel?: TLogLevel);
790
795
  }
791
796
  declare class ProcessError extends InternalServerError {
792
797
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
793
798
  [key: string]: any;
794
- });
799
+ }, logLevel?: TLogLevel);
795
800
  }
796
801
  declare class ResourceNotFoundError extends BaseError {
797
802
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
798
803
  [key: string]: any;
799
- });
804
+ }, logLevel?: TLogLevel);
800
805
  }
801
806
  declare class SMTPConnectError extends BadGatewayError {
802
807
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
803
808
  [key: string]: any;
804
- });
809
+ }, logLevel?: TLogLevel);
805
810
  }
806
811
  declare class TimeoutError extends GatewayTimeoutError {
807
812
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
808
813
  [key: string]: any;
809
- });
814
+ }, logLevel?: TLogLevel);
810
815
  }
811
816
  declare class UnauthorizedError extends BaseError {
812
817
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
813
818
  [key: string]: any;
814
- });
819
+ }, logLevel?: TLogLevel);
815
820
  }
816
821
  declare class ServiceUnavailableError extends BaseError {
817
822
  constructor(message: string, stack?: ILoggerStack, meta?: ISuggestedMetaInfo, details?: {
818
823
  [key: string]: any;
819
- });
824
+ }, logLevel?: TLogLevel);
820
825
  }
821
826
  export interface IErrorCollection {
822
827
  [ErrorCode.UNAUTHORIZED_ERROR]: typeof UnauthorizedError;
@@ -858,6 +863,7 @@ export interface IErrorHandler {
858
863
  details?: {
859
864
  [key: string]: any;
860
865
  };
866
+ logLevel?: TLogLevel;
861
867
  };
862
868
  }
863
869
  export interface IBasicPayload {
@@ -915,6 +921,8 @@ declare const organisationWideRoles: readonly [
915
921
  ];
916
922
  export declare type TOrganisationWideRole = typeof organisationWideRoles[number];
917
923
  declare const projectWideRoles: readonly [
924
+ "agentAssistConfigAdmin",
925
+ "agentAssistConfigViewer",
918
926
  "analytics",
919
927
  "basic",
920
928
  "connection_admin",
@@ -1073,6 +1081,8 @@ export interface IOrganisationWideAcl {
1073
1081
  * rights:
1074
1082
  * type: object
1075
1083
  * properties:
1084
+ * agentAssistConfigs:
1085
+ * $ref: '#/components/schemas/ICrudPermissions'
1076
1086
  * analytics:
1077
1087
  * $ref: '#/components/schemas/ICrudPermissions'
1078
1088
  * connections:
@@ -1516,6 +1526,7 @@ export interface IHttpAdapter {
1516
1526
  setConfig(config: IRestAPIClientConfig): void;
1517
1527
  }
1518
1528
  declare const arrayTResourceType: readonly [
1529
+ "agentassistconfig",
1519
1530
  "agentSettings",
1520
1531
  "chart",
1521
1532
  "connection",
@@ -2399,6 +2410,14 @@ export interface IWebchat2EndpointSettings extends IWebchatEndpointSharedSetting
2399
2410
  * This setting is used to enable or disable branding in webchat.If true, hides "Powered by Cognigy" link.
2400
2411
  */
2401
2412
  disableBranding?: boolean;
2413
+ /**
2414
+ * Whether to display the file attachment button
2415
+ */
2416
+ enableFileAttachment: boolean;
2417
+ /**
2418
+ * The maximum allowed size of the attachment
2419
+ */
2420
+ fileAttachmentMaxSize: number;
2402
2421
  }
2403
2422
  /**
2404
2423
  * Setting to enable rating for the Webchat.
@@ -2756,6 +2775,8 @@ export interface ISearchResourcesRestReturnValue_2_0 extends ICursorBasedPaginat
2756
2775
  * properties:
2757
2776
  * name:
2758
2777
  * type: string
2778
+ * description:
2779
+ * type: string
2759
2780
  * referenceId:
2760
2781
  * type: string
2761
2782
  * format: uuid
@@ -2767,6 +2788,7 @@ export interface IFlowIndexItem_2_0 {
2767
2788
  _id: TMongoId;
2768
2789
  referenceId: string;
2769
2790
  name: string;
2791
+ description?: string;
2770
2792
  isTrainingOutOfDate: boolean;
2771
2793
  createdAt: number;
2772
2794
  lastChanged: number;
@@ -2888,6 +2910,8 @@ export interface ITrainGroupFeedbackReport_2_0 {
2888
2910
  * properties:
2889
2911
  * name:
2890
2912
  * type: string
2913
+ * description:
2914
+ * type: string
2891
2915
  * context:
2892
2916
  * type: object
2893
2917
  * attachedFlows:
@@ -2924,6 +2948,7 @@ export interface IFlow_2_0 {
2924
2948
  _id: TMongoId;
2925
2949
  referenceId: string;
2926
2950
  name: string;
2951
+ description?: string;
2927
2952
  context: any;
2928
2953
  attachedFlows: TMongoId[];
2929
2954
  attachedLexicons: TMongoId[];
@@ -3019,6 +3044,8 @@ export interface IBatchFlowsRestData_2_0 extends IBatchFlowsRestDataBody_2_0, IB
3019
3044
  export interface IBatchFlowsRestReturnValue_2_0 {
3020
3045
  }
3021
3046
  export interface ICreateFlowRestDataBody_2_0 extends IProjectScope, Partial<Omit<IFlow_2_0, TReferenceAndEntityMetaKeys | "isTrainingOutOfDate" | "feedbackReport">> {
3047
+ transcript?: string;
3048
+ flowGenerationInput?: string;
3022
3049
  }
3023
3050
  export interface ICreateFlowRestData_2_0 extends ICreateFlowRestDataBody_2_0 {
3024
3051
  }
@@ -3137,6 +3164,7 @@ export interface IFlowInDB extends IEntityMeta {
3137
3164
  */
3138
3165
  referenceId: string;
3139
3166
  name: string;
3167
+ description?: string;
3140
3168
  context: any;
3141
3169
  attachedFlows: TMongoId[];
3142
3170
  img: string;
@@ -3371,6 +3399,10 @@ export interface IRemoveIntentFromFlowStateRestReturnValue_2_0 {
3371
3399
  * type: string
3372
3400
  * description: The name of the lexicon
3373
3401
  * example: New Lexicon
3402
+ * description:
3403
+ * type: string
3404
+ * description: A meaningful description of the lexicon
3405
+ * example: Countries members of the European Union, e.g. Spain
3374
3406
  * referenceId:
3375
3407
  * type: string
3376
3408
  * format: uuid
@@ -3383,6 +3415,7 @@ export interface IRemoveIntentFromFlowStateRestReturnValue_2_0 {
3383
3415
  export interface ILexiconIndexItem_2_0 {
3384
3416
  _id: TMongoId;
3385
3417
  name: string;
3418
+ description?: string;
3386
3419
  referenceId: string;
3387
3420
  createdAt: number;
3388
3421
  lastChanged: number;
@@ -3406,7 +3439,11 @@ export interface IIndexLexiconsRestReturnValue_2_0 extends ICursorBasedPaginatio
3406
3439
  * name:
3407
3440
  * type: string
3408
3441
  * description: The name of the lexicon
3409
- * example: New Lexicon
3442
+ * example: EU countries
3443
+ * description:
3444
+ * type: string
3445
+ * description: A meaningful description of the lexicon
3446
+ * example: Countries members of the European Union, e.g. Spain
3410
3447
  *
3411
3448
  * ILexiconGeneratedData_2_0:
3412
3449
  * type: object
@@ -3426,6 +3463,7 @@ export interface IIndexLexiconsRestReturnValue_2_0 extends ICursorBasedPaginatio
3426
3463
  export interface ILexicon_2_0 {
3427
3464
  _id: TMongoId;
3428
3465
  name: string;
3466
+ description?: string;
3429
3467
  referenceId: string;
3430
3468
  createdAt: number;
3431
3469
  lastChanged: number;
@@ -3444,8 +3482,49 @@ export interface IBatchLexiconsRestReturnValue_2_0 {
3444
3482
  }
3445
3483
  export interface ICreateLexiconRestDataBody_2_0 extends IProjectScope, Partial<Omit<ILexicon_2_0, keyof IEntityMeta>> {
3446
3484
  }
3485
+ /**
3486
+ * @openapi
3487
+ * components:
3488
+ * parameters:
3489
+ * shouldGenerateLexiconEntriesParams:
3490
+ * in: query
3491
+ * name: shouldGenerateLexiconEntries
3492
+ * description: Flag to allow the Lexicon creation to use the generative AI to generate entries.
3493
+ * example: true
3494
+ * required: false
3495
+ * schema:
3496
+ * type: boolean
3497
+ * generateLexiconEntriesLimitParam:
3498
+ * in: query
3499
+ * name: generateLexiconEntriesLimit
3500
+ * description: Number of entries to be generated by the Generative AI.
3501
+ * example: 8
3502
+ * required: false
3503
+ * schema:
3504
+ * type: integer
3505
+ * defaultSlotParam:
3506
+ * in: query
3507
+ * name: defaultSlot
3508
+ * description: Default Slot where to associate the generated Lexicon entries.
3509
+ * example: testSlot
3510
+ * required: false
3511
+ * schema:
3512
+ * type: string
3513
+ * languageCode:
3514
+ * in: query
3515
+ * name: languageCode
3516
+ * description: Language code.
3517
+ * required: false
3518
+ * schema:
3519
+ * type: string
3520
+ *
3521
+ */
3447
3522
  export interface ICreateLexiconRestDataQuery_2_0 {
3448
3523
  resourceId?: string;
3524
+ shouldGenerateLexiconEntries?: boolean;
3525
+ generateLexiconEntriesLimit?: number;
3526
+ defaultSlot?: string;
3527
+ languageCode?: string;
3449
3528
  }
3450
3529
  export interface ICreateLexiconRestData_2_0 extends ICreateLexiconRestDataBody_2_0, ICreateLexiconRestDataQuery_2_0 {
3451
3530
  }
@@ -4066,6 +4145,13 @@ export interface IIndexEndpointsRestData_2_0 extends IRestPagination<IEndpointIn
4066
4145
  }
4067
4146
  export interface IIndexEndpointsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue<IEndpointIndexItem_2_0> {
4068
4147
  }
4148
+ export interface IAnalyticsDataGoals {
4149
+ entityReferenceId: string;
4150
+ flowName: string;
4151
+ flowReferenceId: string;
4152
+ label: string;
4153
+ timestamp: number;
4154
+ }
4069
4155
  export interface IBaseAnalyticsData {
4070
4156
  projectId: string;
4071
4157
  projectName: string;
@@ -4090,7 +4176,7 @@ export interface IBaseAnalyticsData {
4090
4176
  executionTime: number;
4091
4177
  execution?: number;
4092
4178
  nodesVisited: Array<string>;
4093
- completedGoals: Array<string>;
4179
+ completedGoals: Array<IAnalyticsDataGoals>;
4094
4180
  }
4095
4181
  declare const analyticsType: readonly [
4096
4182
  "input",
@@ -4176,7 +4262,7 @@ export interface IAnalyticsFlowHistoryData extends IAnalyticsFlowMeta {
4176
4262
  }
4177
4263
  export interface IAnalyticsSourceData extends IBaseAnalyticsSourceData, IAnalyticsUserInputData, IAnalyticsStepData {
4178
4264
  entrypointType: TEntrypointType;
4179
- trackedGoals: string[];
4265
+ trackedGoals: IAnalyticsDataGoals[];
4180
4266
  localeName: string;
4181
4267
  endpointName: string;
4182
4268
  endpointUrlToken: string;
@@ -4213,7 +4299,8 @@ declare const handoverProviders: readonly [
4213
4299
  "chatwoot",
4214
4300
  "salesforce",
4215
4301
  "liveAgent",
4216
- "genesysCloud"
4302
+ "genesysCloud",
4303
+ "eightByEight"
4217
4304
  ];
4218
4305
  export declare type THandoverProvider = typeof handoverProviders[number];
4219
4306
  export interface IHandoverSettings {
@@ -4227,7 +4314,7 @@ declare const whisperAssistConfigurations: readonly [
4227
4314
  "template"
4228
4315
  ];
4229
4316
  export declare type TWhisperAssistConfiguration = typeof whisperAssistConfigurations[number];
4230
- export declare type TProviderSettings = IRCEHandoverSettings | IChatwootHandoverSettings | ICognigyHandoverSettings | ISalesForceHandoverSettings | ILiveAgentHandoverSettings | IGenesysCloudHandoverSettings;
4317
+ export declare type TProviderSettings = IRCEHandoverSettings | IChatwootHandoverSettings | ICognigyHandoverSettings | ISalesForceHandoverSettings | ILiveAgentHandoverSettings | IEightByEightHandoverSettings | IGenesysCloudHandoverSettings;
4231
4318
  export interface IRCEHandoverSettings {
4232
4319
  /**
4233
4320
  * Whether to forward all conversations
@@ -4273,6 +4360,33 @@ export interface IRCEHandoverSettings {
4273
4360
  */
4274
4361
  agentCategoryId: string;
4275
4362
  }
4363
+ export interface IEightByEightHandoverSettings {
4364
+ /**
4365
+ * The API access token
4366
+ * you can create within 8x8
4367
+ */
4368
+ /**
4369
+ * The API URL to the 8x8 environment
4370
+ */
4371
+ baseUrl: string;
4372
+ /**
4373
+ * The API access token
4374
+ * you can create within 8x8
4375
+ */
4376
+ apiKey: string;
4377
+ /**
4378
+ * It is a key which has
4379
+ * to be included in the header
4380
+ */
4381
+ apiTenant: string;
4382
+ /**
4383
+ * This setting cannot be changed,
4384
+ * since the chatwoot client only supports
4385
+ * forwarding handover conversations. The value
4386
+ * is therefore set to 'true'
4387
+ */
4388
+ forwardOnlyHandoverConversations: true;
4389
+ }
4276
4390
  export interface IChatwootHandoverSettings {
4277
4391
  baseUrl: string;
4278
4392
  accountId: string;
@@ -4329,6 +4443,7 @@ export interface ISalesForceHandoverSettings {
4329
4443
  }
4330
4444
  export interface IAgentAssistSettings {
4331
4445
  agentAssistFlowId: string;
4446
+ agentAssistConfigId?: string;
4332
4447
  }
4333
4448
  export interface IGenesysCloudHandoverSettings {
4334
4449
  host: string;
@@ -4654,6 +4769,9 @@ export declare type THandoverStatus = "completed" | "cancelled" | "error" | "age
4654
4769
  * agentAssistFlowId:
4655
4770
  * type: string
4656
4771
  * description: Agent assist flow ID
4772
+ * agentAssistConfigId:
4773
+ * type: string
4774
+ * description: Selected Agent Assist Config ReferenceId
4657
4775
  * orgDataPrivacySettings:
4658
4776
  * $ref: '#/components/schemas/IEndpoitOrgDataPrivacySettings_2_0'
4659
4777
  * IEndpoint_2_0:
@@ -6024,6 +6142,29 @@ export interface IDeleteProjectRestData_2_0 extends IDeleteProjectRestDataParams
6024
6142
  }
6025
6143
  export interface IDeleteProjectRestReturnValue_2_0 extends ICreatedTask_2_0 {
6026
6144
  }
6145
+ export interface IAgentAssistConfig extends IEntityMeta {
6146
+ referenceId: string;
6147
+ name: string;
6148
+ description: string;
6149
+ config: IAgentAssistGridConfig;
6150
+ projectReference: TMongoId;
6151
+ organisationReference: TMongoId;
6152
+ }
6153
+ export interface IAgentAssistGridConfig {
6154
+ [key: string]: {
6155
+ x: number;
6156
+ y: number;
6157
+ columns: number;
6158
+ rows: number;
6159
+ };
6160
+ }
6161
+ export interface IGraphAgentAssistConfig {
6162
+ type: "agentAssistConfig";
6163
+ _id: TMongoId;
6164
+ name: string;
6165
+ referenceId: string;
6166
+ properties: Pick<IAgentAssistConfig, "createdAt" | "createdBy" | "lastChanged" | "lastChangedBy">;
6167
+ }
6027
6168
  export interface IConnectionFields {
6028
6169
  [key: string]: string;
6029
6170
  }
@@ -6493,6 +6634,11 @@ export interface IIntentFeedbackInDBReport {
6493
6634
  fScore: number;
6494
6635
  };
6495
6636
  }
6637
+ declare const biasTowardsParentOrChildIntentsTypes: readonly [
6638
+ "parents",
6639
+ "children"
6640
+ ];
6641
+ export declare type TBiasTowardsParentOrChildIntentsTypes = typeof biasTowardsParentOrChildIntentsTypes[number];
6496
6642
  declare const intentTypes: readonly [
6497
6643
  "yesNoIntent",
6498
6644
  "default"
@@ -6517,6 +6663,7 @@ export interface IIntentInDB extends Omit<IIntent, keyof ILocalizedIntentData> {
6517
6663
  }
6518
6664
  export interface IIntent extends IEntityMeta, ILocalizedIntentData {
6519
6665
  name: string;
6666
+ description?: string;
6520
6667
  referenceId: string;
6521
6668
  isRejectIntent: boolean;
6522
6669
  isDisabled: boolean;
@@ -6524,6 +6671,7 @@ export interface IIntent extends IEntityMeta, ILocalizedIntentData {
6524
6671
  data: any;
6525
6672
  nodeReferenceId: string;
6526
6673
  childFeatures?: boolean | string[];
6674
+ biasTowardsParentOrChildIntents: TBiasTowardsParentOrChildIntentsTypes;
6527
6675
  parentIntentId?: string;
6528
6676
  feedbackReport: IIntentFeedbackInDBReport;
6529
6677
  intentRelationReferences: TMongoId[];
@@ -6607,9 +6755,13 @@ export interface IHandoverNodeV2Params extends INodeFunctionBaseParams {
6607
6755
  quickReply: string;
6608
6756
  chatwootInboxId: string;
6609
6757
  liveAgentInboxId: string;
6758
+ additionalCategoryIds: string[];
6610
6759
  sendTranscriptAsFirstMessage: boolean;
6611
6760
  salesforcePrechatDetails: object[];
6612
6761
  salesforcePrechatEntities: object[];
6762
+ eightByEightChannelId: string;
6763
+ eightByEightQueueId: string;
6764
+ eightByEightJSONProps: object[];
6613
6765
  repeatHandoverMessage: boolean;
6614
6766
  sendResolveEvent: boolean;
6615
6767
  resolveBehavior: "resetEntrypoint" | "continueEntrypoint";
@@ -6714,129 +6866,329 @@ export interface IFuzzySearchParams extends INodeFunctionBaseParams {
6714
6866
  contextKey: string;
6715
6867
  };
6716
6868
  }
6717
- export interface ISensitiveLoggingSettings {
6718
- maskLogging: boolean;
6719
- maskAnalytics: boolean;
6720
- disableConversations: boolean;
6721
- disableIntentTrainer: boolean;
6722
- }
6723
- export interface INLProperties extends ICognigyNLPProperties {
6724
- timeReference?: any;
6725
- organisation?: string;
6726
- result?: any;
6727
- flowId?: string;
6728
- URLToken?: string;
6729
- ngramProcessText?: any;
6730
- }
6731
- export interface IIntentScore {
6732
- id: number;
6733
- name: string;
6734
- score: number;
6735
- negated: boolean;
6736
- confirmationSentence?: string;
6737
- sentenceId?: number;
6738
- sentence?: string;
6739
- legacyScore?: number;
6740
- flow?: string;
6741
- intentId?: string;
6869
+ export declare type INodeAiEnhancedRephraseOutputMode = "none" | "userInputs" | "customInputs";
6870
+ export interface INodeWithAiRephraseConfig {
6871
+ generativeAI_rephraseOutputMode: INodeAiEnhancedRephraseOutputMode;
6872
+ generativeAI_amountOfLastUserInputs: number;
6873
+ generativeAI_customInputs: string[];
6874
+ generativeAI_temperature: number;
6875
+ promtType: TPromptTypes;
6876
+ questionType?: TRephraseWithAIQuestionType;
6742
6877
  }
6743
- export interface IActions {
6744
- addConditionalEntrypoint?: (actions: IActions, flowId: string) => (addConditionalEntrypointParams: IAddConditionalEntrypointParams) => void;
6745
- activateProfile?: () => Promise<any>;
6746
- addLexiconKeyphrase?: (lexicon: string, keyphrase: string, slots: Array<string>, synonyms: Array<string>, data?: Object) => void;
6747
- addToContext?: (key: string, value: any, mode: string) => void;
6748
- checkAgentAvailability?: (params: ICheckAgentAvailabilityNodeParams) => void;
6749
- checkFrustration?: (nodeId: string, input: any) => void;
6750
- checkThink?: (id: string) => boolean;
6751
- completeGoal?: (key: string) => void;
6752
- deactivateProfile?: (deleteData: boolean) => Promise<any>;
6753
- deleteContext?: (key: string) => void;
6754
- deleteProfile?: () => Promise<any>;
6755
- deleteSystemContext?: (key: string) => void;
6756
- getCache?: (key: string) => void;
6757
- getContext?: (key: string) => any;
6758
- getLastTopic?: (type: any, age: number) => void;
6759
- getState?: () => string;
6760
- getSystemContext?: (key: string) => any;
6761
- emitEvent?: TEmitter;
6762
- executeCodeInSecureContext?: (codeParams: ICodeNodeParams) => void;
6763
- executeCognigyNLU?: (params: IExecuteCognigyNLUParams) => Promise<INLProperties>;
6764
- handleIntentDefaultReply?: (params: INLProperties) => Promise<any>;
6765
- extractAnswer?: (extractAnswerParams: IExtractAnswerNodeParams) => Promise<void>;
6766
- getAnalyticsData?: () => IAnalyticsSourceData;
6767
- setAnalyticsData?: (key: string, value: any) => void;
6768
- getInjectedAnySlots?: () => {
6769
- [key: string]: string;
6770
- };
6771
- getInjectedIntent?: () => IIntentScore;
6772
- setInjectedIntent?: (injectedIntent: IIntentScore) => void;
6773
- getReconfirmedIntentSentences?: () => {
6774
- [key: string]: string[];
6878
+ export interface ISayNodeConfigParams {
6879
+ text: string | string[];
6880
+ data: any;
6881
+ loop: boolean;
6882
+ linear: boolean;
6883
+ liveAgentSettings?: ILiveAgentSettings;
6884
+ type: "text" | "quickReplies" | "gallery" | "buttons" | "image" | "list" | "adaptiveCard";
6885
+ _cognigy: {
6886
+ [key: string]: unknown;
6775
6887
  };
6776
- getSystemContextObject?: () => any;
6777
- handover?: (handoverParams: IHandoverNodeParams) => Promise<void>;
6778
- handoverV2?: (handoverParams: IHandoverNodeV2Params & {
6779
- nodeType?: "question" | "handoverToAgent";
6780
- }) => Promise<IHandoverStatusInputObject>;
6781
- isCompatibleRuntimeVersion?: (params: {
6782
- targetRuntimeVersion: number;
6783
- }) => boolean;
6784
- log?: (level: string, text: string) => void;
6785
- mergeProfile?: (contactId: string) => Promise<any>;
6786
- parseCognigyScriptText?: (executionObjects: IExecutionObjects) => (text: string) => string;
6787
- parseCognigyScriptCondition?: (executionObjects: IExecutionObjects, nodeId: string) => (condition: string) => string;
6788
- parseCognigyScriptResultLocation?: (executionObjects: IExecutionObjects, nodeId: string) => (condition: string) => any;
6789
- output?: (text: string, data: any, settings?: ISayNodeSettings) => void;
6790
- outputWithMeta?: (text: string, data: any, metadata?: IOutputEventMetadata, settings?: ISayNodeSettings) => void;
6791
- reloadBrainFlow?: (flowReferenceId: string) => Promise<void>;
6792
- removeFromContext?: (key: string, value: string, mode: string) => void;
6793
- requestHandover?: (text: string, cancel: string, userId: string, sessionId: string, requestHandover: string, inputAnalyticsData: IAnalyticsSourceData, handoverVersion?: IHandoverRequestStatus["handoverVersion"], repeatHandoverMessage?: boolean, sendResolveEvent?: boolean, resolveBehavior?: IHandoverRequestStatus["resolveBehavior"], nodeType?: IHandoverRequestStatus["nodeType"], agentAssistInitMessage?: string, providerResponse?: any) => void;
6794
- resetContext?: () => Promise<object>;
6795
- resetFormBrain?: () => Promise<void>;
6796
- resetState?: () => Promise<string>;
6797
- say?: (text: string, data?: any, settings?: ISayNodeSettings) => void;
6798
- sendHttpRequest?: (httpRequestParams: IHttpRequestNodeParams) => Promise<void>;
6799
- setCache?: (key: string, val: any) => void;
6800
- setContext?: (key: string, value: any) => void;
6801
- setContextAndPersist?: (key: string, value: any) => Promise<void>;
6802
- setInjectedAnySlots?: (anySlots: {
6803
- [key: string]: string;
6804
- }) => void;
6805
- setKeyphrase?: (keyphrase: string, tags: string[], synoyms: string[]) => void;
6806
- setRating?: (params: {
6807
- rating: number;
6808
- comment: string;
6809
- }) => void;
6810
- setLastTopic?: (text: string, type: any, age: number) => void;
6811
- setLocaleReferenceId?: (localeReferenceID: string) => void;
6812
- setSensitiveLoggingSettings?: (settings: ISensitiveLoggingSettings, traceId: string) => void;
6813
- setState?: (state: string) => void;
6814
- setSystemContext?: (key: string, value: any) => void;
6815
- setThinkMarker?: (flowReferenceId: string) => void;
6816
- getTimezoneOffset?: () => number | string;
6817
- setTimezoneOffset?: (offset: number | string) => void;
6818
- setTranslationSettings?: (translationSettings: IEndpointTranslationSettings) => void;
6819
- switchFlow?: (id: string, text: string, data: any, version?: number, absorbContext?: boolean) => void;
6820
- think?: (nodeId: string) => (text: string, data: any) => void;
6821
- thinkV2?: (nodeId: string) => (text: string, data: any) => void;
6822
- trackAnalyticsStep?: (stepLabel: string) => (trackArgs?: ITrackAnalyticsStepsArguments) => void;
6823
- updateProfile?: (profileSchemaField: string, value: any) => Promise<any>;
6824
- }
6825
- export interface ICognigyNLPProperties {
6826
- /** The original text of the user */
6827
- text?: string;
6828
- /** The original data of the user */
6829
- data?: {
6888
+ _data: {
6830
6889
  [key: string]: any;
6831
6890
  };
6832
- attachments?: any[];
6833
- processText?: string;
6834
- keyphraseText?: string;
6835
- synonymText?: string;
6836
- systemSlotText?: string;
6837
- /** The flow parent id, something like "562fa3970685448ac241fa1f8978e496" */
6838
- flowId?: string;
6839
- /** The type of the sentence */
6891
+ }
6892
+ export interface ISayNodeConfig extends INodeWithAiRephraseConfig {
6893
+ say: ISayNodeConfigParams;
6894
+ }
6895
+ export interface ISayParams extends INodeFunctionBaseParams {
6896
+ config: ISayNodeConfig;
6897
+ organisationId: string;
6898
+ }
6899
+ export interface IOptionalQuestionNodeParams extends INodeFunctionBaseParams {
6900
+ config: IOptionalQuestionNodeOtherConfig | IOptionalQuestionNodeKeyphraseConfig | IOptionalQuestionNodeRegexConfig;
6901
+ }
6902
+ export interface IOptionalQuestionNodeSharedConfig extends INodeWithAiRephraseConfig {
6903
+ say: ISayParams["config"]["say"];
6904
+ retentionTime: number;
6905
+ executeChildrenOnly: boolean;
6906
+ cognigyScript: "answer" | "question";
6907
+ storeResultInContext: boolean;
6908
+ contextKey: string;
6909
+ storeDetailedResults: boolean;
6910
+ }
6911
+ export interface IOptionalQuestionNodeKeyphraseConfig extends IOptionalQuestionNodeSharedConfig {
6912
+ type: "keyphrase";
6913
+ keyphraseTag: string;
6914
+ usePositiveOnly: boolean;
6915
+ }
6916
+ export interface IOptionalQuestionNodeRegexConfig extends IOptionalQuestionNodeSharedConfig {
6917
+ type: "regex";
6918
+ regex: string;
6919
+ }
6920
+ export interface IOptionalQuestionNodeOtherConfig extends IOptionalQuestionNodeSharedConfig {
6921
+ type: "email" | "number" | "temperature" | "age" | "date" | "duration" | "yesNo" | "money" | "percentage" | "intent" | "data" | "url" | "app";
6922
+ }
6923
+ export interface IQuestionNodeParams extends INodeFunctionBaseParams {
6924
+ config: IQuestionNodeDatepickerConfig | IQuestionNodeKeyphraseConfig | IQuestionNodeRegexConfig | IQuestionNodeOtherConfig;
6925
+ }
6926
+ export interface IQuestionNodeSharedConfig extends INodeWithAiRephraseConfig {
6927
+ validationMessage: string;
6928
+ repromptCondition: string;
6929
+ validationRepeat: boolean;
6930
+ storeResultInContext: boolean;
6931
+ contextKey: string;
6932
+ skipIfResultInContext: boolean;
6933
+ onlyAcceptEscalationIntents: boolean;
6934
+ storeDetailedResults: boolean;
6935
+ storeInContactProfile: boolean;
6936
+ profileKey: string;
6937
+ say: ISayParams["config"]["say"];
6938
+ parseResultOnEntry: boolean;
6939
+ additionalValidation: string;
6940
+ maxExecutionDiff: number;
6941
+ resultLocation: string;
6942
+ skipRepromptOnIntent: boolean;
6943
+ escalateAnswersAction: "none" | "goto" | "execute" | "skip" | "text" | "handover";
6944
+ escalateAnswersThreshold: number;
6945
+ escalateAnswersGotoTarget: string;
6946
+ escalateAnswersExecuteTarget: string;
6947
+ escalateAnswersGotoExecutionMode: "continue" | "wait";
6948
+ escalateAnswersInjectedText: string;
6949
+ escalateAnswersInjectedData: string;
6950
+ escalateAnswersMessage: ISayParams["config"]["say"];
6951
+ escalateAnswersRepromptPrevention: boolean;
6952
+ escalateAnswersOnce: boolean;
6953
+ escalateAnswersHandoverText: string;
6954
+ escalateAnswersRepeatHandoverMessage: boolean;
6955
+ escalateAnswersHandoverCancelIntent: string;
6956
+ escalateAnswersHandoverQuickReply: string;
6957
+ escalateAnswersHandoverChatwootInboxId: string;
6958
+ escalateAnswersHandoverLiveAgentInboxId: string;
6959
+ escalateAnswersHandoverAdditionalCategoryIds: string[];
6960
+ escalateAnswersHandoverSendTranscriptAsFirstMessage: boolean;
6961
+ escalateAnswersHandoverSalesforcePrechatEntities: object[];
6962
+ escalateAnswersHandoverSalesforcePrechatDetails: object[];
6963
+ escalateAnswersHandoverEightByEightChannelId: string;
6964
+ escalateAnswersHandoverEightByEightQueueId: string;
6965
+ escalateAnswersHandoverEightByEightJSONProps: object[];
6966
+ escalateAnswersHandoverSendResolveEvent: boolean;
6967
+ escalateAnswersHandoverResolveBehavior: "resetEntrypoint" | "continueEntrypoint";
6968
+ escalateAnswersAgentAssistInitMessage: string;
6969
+ escalateAnswersAllowAgentInject: boolean;
6970
+ escalateIntentsAction: "none" | "goto" | "execute" | "skip" | "text" | "handover";
6971
+ escalateIntentsValidIntents: string[];
6972
+ escalateIntentsThreshold: number;
6973
+ escalateIntentsGotoTarget: string;
6974
+ escalateIntentsExecuteTarget: string;
6975
+ escalateIntentsGotoExecutionMode: "continue" | "wait";
6976
+ escalateIntentsInjectedText: string;
6977
+ escalateIntentsInjectedData: any;
6978
+ escalateIntentsMessage: ISayParams["config"]["say"];
6979
+ escalateIntentsRepromptPrevention: boolean;
6980
+ escalateIntentsHandoverText: string;
6981
+ escalateIntentsRepeatHandoverMessage: boolean;
6982
+ escalateIntentsHandoverCancelIntent: string;
6983
+ escalateIntentsHandoverQuickReply: string;
6984
+ escalateIntentsHandoverChatwootInboxId: string;
6985
+ escalateIntentsHandoverLiveAgentInboxId: string;
6986
+ escalateIntentsHandoverAdditionalCategoryIds: string[];
6987
+ escalateIntentHandoverSendTranscriptAsFirstMessage: boolean;
6988
+ escalateIntentsHandoverSalesforcePrechatEntities: object[];
6989
+ escalateIntentsHandoverSalesforcePrechatDetails: object[];
6990
+ escalateIntentsHandoverEightByEightChannelId: string;
6991
+ escalateIntentsHandoverEightByEightQueueId: string;
6992
+ escalateIntentsHandoverEightByEightJSONProps: object[];
6993
+ escalateIntentsHandoverSendResolveEvent: boolean;
6994
+ escalateIntentsHandoverResolveBehavior: "resetEntrypoint" | "continueEntrypoint";
6995
+ escalateIntentsAgentAssistInitMessage: string;
6996
+ escalateIntentsAllowAgentInject: boolean;
6997
+ reconfirmationBehaviour: "none" | "reconfirm";
6998
+ reconfirmationQuestion: string;
6999
+ reconfirmationQuestionReprompt: string;
7000
+ }
7001
+ export interface IQuestionNodeDatepickerConfig extends IQuestionNodeSharedConfig {
7002
+ type: "date";
7003
+ datepicker_eventName: string;
7004
+ datepicker_locale: string;
7005
+ datepicker_dateFormat: string;
7006
+ datepicker_time24Hours: boolean;
7007
+ datepicker_defaultDate: string;
7008
+ datepicker_minDate: string;
7009
+ datepicker_maxDate: string;
7010
+ datepicker_wantEnableDisable: "none" | "enable" | "disable";
7011
+ datepicker_disableEnableRange: boolean;
7012
+ datepicker_enabledDates: string[];
7013
+ datepicker_disabledDates: string[];
7014
+ datepicker_enableTime: boolean;
7015
+ datepicker_mode: "single" | "multiple" | "range";
7016
+ datepicker_openPickerButtonText: string;
7017
+ datepicker_cancelButtonText: string;
7018
+ datepicker_submitButtonText: string;
7019
+ datepicker_defaultHour: number;
7020
+ datepicker_defaultMinute: number;
7021
+ datepicker_enableSeconds: boolean;
7022
+ datepicker_hourIncrement: number;
7023
+ datepicker_minuteIncrement: number;
7024
+ datepicker_noCalendar: boolean;
7025
+ datepicker_weekNumbers: boolean;
7026
+ datepicker_hidePicker: boolean;
7027
+ datepicker_functionEnable: string;
7028
+ datepicker_functionDisable: string;
7029
+ }
7030
+ export interface IActiveQuestion {
7031
+ nodeId: string;
7032
+ type: "date" | "keyphrase" | "regex" | "email" | "number" | "temperature" | "age" | "duration" | "yesNo" | "text" | "money" | "percentage" | "intent" | "data" | "url" | "custom";
7033
+ lastExecutedAt: number;
7034
+ forgetQuestionThreshold: number;
7035
+ repromptCount?: number;
7036
+ escalationCount?: number;
7037
+ tentativeAnswer?: any;
7038
+ tentativeAnswerShortform?: string;
7039
+ onlyAcceptEscalationIntents?: boolean;
7040
+ escalationIntents?: string[];
7041
+ }
7042
+ export interface IQuestionNodeKeyphraseConfig extends IQuestionNodeSharedConfig {
7043
+ type: "keyphrase";
7044
+ keyphraseTag: string;
7045
+ usePositiveOnly: boolean;
7046
+ }
7047
+ export interface IQuestionNodeRegexConfig extends IQuestionNodeSharedConfig {
7048
+ type: "regex";
7049
+ regex: string;
7050
+ }
7051
+ export interface IQuestionNodeOtherConfig extends IQuestionNodeSharedConfig {
7052
+ type: "email" | "number" | "temperature" | "age" | "duration" | "yesNo" | "text" | "money" | "percentage" | "intent" | "data" | "url" | "custom";
7053
+ }
7054
+ export declare type TRephraseWithAIQuestionType = IActiveQuestion["type"] | IOptionalQuestionNodeOtherConfig["type"];
7055
+ export interface ISensitiveLoggingSettings {
7056
+ maskLogging: boolean;
7057
+ maskAnalytics: boolean;
7058
+ disableConversations: boolean;
7059
+ disableIntentTrainer: boolean;
7060
+ }
7061
+ export interface INLProperties extends ICognigyNLPProperties {
7062
+ timeReference?: any;
7063
+ organisation?: string;
7064
+ result?: any;
7065
+ flowId?: string;
7066
+ URLToken?: string;
7067
+ ngramProcessText?: any;
7068
+ }
7069
+ export interface IIntentScore {
7070
+ id: number;
7071
+ name: string;
7072
+ score: number;
7073
+ negated: boolean;
7074
+ confirmationSentence?: string;
7075
+ sentenceId?: number;
7076
+ sentence?: string;
7077
+ legacyScore?: number;
7078
+ flow?: string;
7079
+ intentId?: string;
7080
+ }
7081
+ export declare type TPromptTypes = "statement" | "question" | "reprompt";
7082
+ export interface IRephraseSentenceWithAIOptions {
7083
+ useLastUserInputs?: boolean;
7084
+ amountOfUserInputs?: number;
7085
+ customInputs?: string[];
7086
+ temperature?: number;
7087
+ promptType?: TPromptTypes;
7088
+ questionType?: TRephraseWithAIQuestionType;
7089
+ question?: string;
7090
+ answer?: string;
7091
+ }
7092
+ export interface IActions {
7093
+ addConditionalEntrypoint?: (actions: IActions, flowId: string) => (addConditionalEntrypointParams: IAddConditionalEntrypointParams) => void;
7094
+ activateProfile?: () => Promise<any>;
7095
+ addLexiconKeyphrase?: (lexicon: string, keyphrase: string, slots: Array<string>, synonyms: Array<string>, data?: Object) => void;
7096
+ addToContext?: (key: string, value: any, mode: string) => void;
7097
+ checkAgentAvailability?: (params: ICheckAgentAvailabilityNodeParams) => void;
7098
+ checkFrustration?: (nodeId: string, input: any) => void;
7099
+ checkThink?: (id: string) => boolean;
7100
+ completeGoal?: (goalData: IAnalyticsDataGoals) => void;
7101
+ deactivateProfile?: (deleteData: boolean) => Promise<any>;
7102
+ deleteContext?: (key: string) => void;
7103
+ deleteProfile?: () => Promise<any>;
7104
+ deleteSystemContext?: (key: string) => void;
7105
+ getCache?: (key: string) => void;
7106
+ getContext?: (key: string) => any;
7107
+ getLastTopic?: (type: any, age: number) => void;
7108
+ getState?: () => string;
7109
+ getSystemContext?: (key: string) => any;
7110
+ emitEvent?: TEmitter;
7111
+ executeCodeInSecureContext?: (codeParams: ICodeNodeParams) => void;
7112
+ executeCognigyNLU?: (params: IExecuteCognigyNLUParams) => Promise<INLProperties>;
7113
+ handleIntentDefaultReply?: (params: INLProperties) => Promise<any>;
7114
+ extractAnswer?: (extractAnswerParams: IExtractAnswerNodeParams) => Promise<void>;
7115
+ getAnalyticsData?: () => IAnalyticsSourceData;
7116
+ setAnalyticsData?: (key: string, value: any) => void;
7117
+ getInjectedAnySlots?: () => {
7118
+ [key: string]: string;
7119
+ };
7120
+ getInjectedIntent?: () => IIntentScore;
7121
+ setInjectedIntent?: (injectedIntent: IIntentScore) => void;
7122
+ getReconfirmedIntentSentences?: () => {
7123
+ [key: string]: string[];
7124
+ };
7125
+ getSystemContextObject?: () => any;
7126
+ handover?: (handoverParams: IHandoverNodeParams) => Promise<void>;
7127
+ handoverV2?: (handoverParams: IHandoverNodeV2Params & {
7128
+ nodeType?: "question" | "handoverToAgent";
7129
+ }) => Promise<IHandoverStatusInputObject>;
7130
+ isCompatibleRuntimeVersion?: (params: {
7131
+ targetRuntimeVersion: number;
7132
+ }) => boolean;
7133
+ log?: (level: string, text: string) => void;
7134
+ mergeProfile?: (contactId: string) => Promise<any>;
7135
+ parseCognigyScriptText?: (executionObjects: IExecutionObjects) => (text: string) => string;
7136
+ parseCognigyScriptCondition?: (executionObjects: IExecutionObjects, nodeId: string) => (condition: string) => string;
7137
+ parseCognigyScriptResultLocation?: (executionObjects: IExecutionObjects, nodeId: string) => (condition: string) => any;
7138
+ output?: (text: string, data: any, settings?: ISayNodeSettings) => void;
7139
+ outputWithMeta?: (text: string, data: any, metadata?: IOutputEventMetadata, settings?: ISayNodeSettings) => void;
7140
+ reloadBrainFlow?: (flowReferenceId: string) => Promise<void>;
7141
+ removeFromContext?: (key: string, value: string, mode: string) => void;
7142
+ rephraseSentenceWithAI(sentence: string, options: IRephraseSentenceWithAIOptions): Promise<string>;
7143
+ rephraseMultipleSentencesWithAI(sentences: string[], options: IRephraseSentenceWithAIOptions): Promise<string[]>;
7144
+ requestHandover?: (text: string, cancel: string, userId: string, sessionId: string, requestHandover: string, inputAnalyticsData: IAnalyticsSourceData, handoverVersion?: IHandoverRequestStatus["handoverVersion"], repeatHandoverMessage?: boolean, sendResolveEvent?: boolean, resolveBehavior?: IHandoverRequestStatus["resolveBehavior"], nodeType?: IHandoverRequestStatus["nodeType"], agentAssistInitMessage?: string, providerResponse?: any) => void;
7145
+ runGenerativeAIPrompt?: (options: IRunGenerativeAIPromptOptions) => Promise<string>;
7146
+ resetContext?: () => Promise<object>;
7147
+ resetFormBrain?: () => Promise<void>;
7148
+ resetState?: () => Promise<string>;
7149
+ say?: (text: string, data?: any, settings?: ISayNodeSettings) => void;
7150
+ sendHttpRequest?: (httpRequestParams: IHttpRequestNodeParams) => Promise<void>;
7151
+ setCache?: (key: string, val: any) => void;
7152
+ setContext?: (key: string, value: any) => void;
7153
+ setContextAndPersist?: (key: string, value: any) => Promise<void>;
7154
+ setInjectedAnySlots?: (anySlots: {
7155
+ [key: string]: string;
7156
+ }) => void;
7157
+ setKeyphrase?: (keyphrase: string, tags: string[], synoyms: string[]) => void;
7158
+ setRating?: (params: {
7159
+ rating: number;
7160
+ comment: string;
7161
+ }) => void;
7162
+ setLastTopic?: (text: string, type: any, age: number) => void;
7163
+ setLocaleReferenceId?: (localeReferenceID: string) => void;
7164
+ setSensitiveLoggingSettings?: (settings: ISensitiveLoggingSettings, traceId: string) => void;
7165
+ setState?: (state: string) => void;
7166
+ setSystemContext?: (key: string, value: any) => void;
7167
+ setThinkMarker?: (flowReferenceId: string) => void;
7168
+ getTimezoneOffset?: () => number | string;
7169
+ setTimezoneOffset?: (offset: number | string) => void;
7170
+ setTranslationSettings?: (translationSettings: IEndpointTranslationSettings) => void;
7171
+ switchFlow?: (id: string, text: string, data: any, version?: number, absorbContext?: boolean) => void;
7172
+ think?: (nodeId: string) => (text: string, data: any) => void;
7173
+ thinkV2?: (nodeId: string) => (text: string, data: any) => void;
7174
+ trackAnalyticsStep?: (stepLabel: string) => (trackArgs?: ITrackAnalyticsStepsArguments) => void;
7175
+ updateProfile?: (profileSchemaField: string, value: any) => Promise<any>;
7176
+ }
7177
+ export interface ICognigyNLPProperties {
7178
+ /** The original text of the user */
7179
+ text?: string;
7180
+ /** The original data of the user */
7181
+ data?: {
7182
+ [key: string]: any;
7183
+ };
7184
+ attachments?: any[];
7185
+ processText?: string;
7186
+ keyphraseText?: string;
7187
+ synonymText?: string;
7188
+ systemSlotText?: string;
7189
+ /** The flow parent id, something like "562fa3970685448ac241fa1f8978e496" */
7190
+ flowId?: string;
7191
+ /** The type of the sentence */
6840
7192
  type?: "Statement" | string;
6841
7193
  /** The slots matched witin the text of the user */
6842
7194
  slots?: ICognigyNLPSlots | ISystemSlots;
@@ -7033,6 +7385,53 @@ export interface IExecuteCognigyNLUParams {
7033
7385
  [key: string]: any;
7034
7386
  };
7035
7387
  }
7388
+ export interface IRunGenerativeAIPromptOptions {
7389
+ /** prompt - The prompt string to provide to the OpenAI engine. */
7390
+ prompt: string;
7391
+ /** temperature - (Optional) The temperature range to determine how much the OpenAI should vary its response. Defaults to 0.7 */
7392
+ temperature?: number;
7393
+ /** model - (Optional) The OpenAI model to use. Defaults to 'text-davinci-003' */
7394
+ model?: OpenAiModels | AzureOpenAiModels;
7395
+ /** timeoutInMs - (Optional) The timeout for the request in ms. Defaults to 10000 */
7396
+ timeoutInMs?: number;
7397
+ /** maxTokens - (Optional) Upper bound on how many tokens the API will return.
7398
+ * The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.
7399
+ * If not provided, we calculate the maximum: model_max_tokens - prompt_tokens */
7400
+ maxTokens?: number;
7401
+ /**
7402
+ * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
7403
+ * So 0.1 means only the tokens comprising the top 10% probability mass are considered.
7404
+ * It is recommended altering this or temperature but not both.
7405
+ */
7406
+ topP?: number;
7407
+ /**
7408
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far,
7409
+ * decreasing the model's likelihood to repeat the same line verbatim.
7410
+ */
7411
+ frequencyPenalty?: number;
7412
+ /**
7413
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far,
7414
+ * increasing the model's likelihood to talk about new topics.
7415
+ */
7416
+ presencePenalty?: number;
7417
+ /**
7418
+ * Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
7419
+ */
7420
+ stop?: string[];
7421
+ }
7422
+ declare enum OpenAiModels {
7423
+ "davinci" = "text-davinci-003",
7424
+ "curie" = "text-curie-001",
7425
+ "babbage" = "text-babbage-001",
7426
+ "ada" = "text-ada-001"
7427
+ }
7428
+ declare enum AzureOpenAiModels {
7429
+ "davinci3" = "text-davinci-003",
7430
+ "davinci2" = "text-davinci-002",
7431
+ "curie" = "text-curie-001",
7432
+ "babbage" = "text-babbage-001",
7433
+ "ada" = "text-ada-001"
7434
+ }
7036
7435
  export interface IExecuteFlowNodeConfig {
7037
7436
  flowNode: {
7038
7437
  flow: string;
@@ -7313,7 +7712,7 @@ export interface ISetTranslationNodeParams extends INodeFunctionBaseParams {
7313
7712
  setInputLanguageOnExecutionCount: number;
7314
7713
  };
7315
7714
  }
7316
- export interface INodeExecutionAPI extends Omit<IActions, "parseCognigyScriptCondition" | "parseCognigyScriptText" | "parseCognigyScriptResultLocation" | "think" | "thinkV2" | "addConditionalEntrypoint" | "addToInput" | "resetCognigyScriptInput" | "trackAnalyticsStep" | "executeCognigyNLU" | "handleIntentDefaultReply"> {
7715
+ export interface INodeExecutionAPI extends Omit<IActions, "parseCognigyScriptCondition" | "parseCognigyScriptText" | "parseCognigyScriptResultLocation" | "think" | "thinkV2" | "addConditionalEntrypoint" | "addToInput" | "resetCognigyScriptInput" | "trackAnalyticsStep" | "executeCognigyNLU" | "handleIntentDefaultReply" | "completeGoal"> {
7317
7716
  setNextNode: (nodeId: string, newFlowId?: string) => void;
7318
7717
  resetNextNodes: () => void;
7319
7718
  stopExecution: () => void;
@@ -7390,13 +7789,11 @@ export interface INodeExecutionAPI extends Omit<IActions, "parseCognigyScriptCon
7390
7789
  parseCognigyScript?: (text: string, condition?: boolean) => string;
7391
7790
  trackAnalyticsStep?: (step: string) => void;
7392
7791
  triggerFunction?: (config: ITriggerFunctionNodeParams["config"]) => Promise<boolean>;
7393
- initAppSession?: (params?: {
7394
- appInterimScreenOverride?: string;
7395
- appConnectScreenOverride?: string;
7396
- }) => Promise<any>;
7397
- setAppState?: (appTemplateId: string, appTemplateData: unknown) => void;
7398
- getAppSessionPin?: () => Promise<string>;
7792
+ initAppSession: () => Promise<string>;
7793
+ setAppState: (appTemplateId: string, appTemplateData: Record<string, unknown>) => void;
7794
+ getAppSessionPin: () => Promise<string>;
7399
7795
  validateDatepickerFunctionInSecureContext?: (codeToValidate: string) => string | null;
7796
+ completeGoal: (goal: string) => void;
7400
7797
  }
7401
7798
  export interface INodeExecutionCognigyObject extends IExecutionObjects {
7402
7799
  api: INodeExecutionAPI;
@@ -7445,6 +7842,7 @@ export interface INodeFunctionBaseParams {
7445
7842
  [key: string]: any;
7446
7843
  };
7447
7844
  nodeId: string;
7845
+ organisationId?: string;
7448
7846
  inputOptions?: INodeFunctionInputOptions;
7449
7847
  }
7450
7848
  export declare type TNodeChildConfigs = Pick<IChartExecutableNode, "id" | "type" | "config">;
@@ -7579,7 +7977,8 @@ declare const nodeFieldTypes: readonly [
7579
7977
  "function",
7580
7978
  "appTemplate",
7581
7979
  "sttSelect",
7582
- "ttsSelect"
7980
+ "ttsSelect",
7981
+ "adaptivecard"
7583
7982
  ];
7584
7983
  export declare type TNodeFieldType = typeof nodeFieldTypes[number];
7585
7984
  export declare type TComparableValue = string | number | boolean;
@@ -7694,6 +8093,7 @@ export interface IConnectionSchemaField {
7694
8093
  _id?: TMongoId;
7695
8094
  /** The field name, e.g. 'client_id' */
7696
8095
  fieldName: string;
8096
+ required?: boolean;
7697
8097
  }
7698
8098
  export interface IConnectionSchema extends IEntityMeta {
7699
8099
  _id: TMongoId;
@@ -7815,6 +8215,7 @@ export interface IGraphFunction {
7815
8215
  }
7816
8216
  export interface ILexicon extends IEntityMeta {
7817
8217
  name: string;
8218
+ description?: string;
7818
8219
  referenceId: string;
7819
8220
  projectReference: TMongoId;
7820
8221
  organisationReference: TMongoId;
@@ -7835,6 +8236,12 @@ export interface ILocale extends IEntityMeta {
7835
8236
  fallbackLocaleReference: TMongoId;
7836
8237
  projectReference: TMongoId;
7837
8238
  organisationReference: TMongoId;
8239
+ intentTrainGroupReference: TMongoId;
8240
+ intentTrainGroupReferenceId: string;
8241
+ feedbackReport: Pick<ITrainGroupFeedbackReport, "info" | "findings">;
8242
+ isTrainingOutOfDate: boolean;
8243
+ lastTrainedAt: number;
8244
+ nluOptions: IIntentTrainGroup["nluOptions"];
7838
8245
  }
7839
8246
  export interface IGraphLocale {
7840
8247
  type: "locale";
@@ -7932,7 +8339,7 @@ export interface IGraphPlaybook {
7932
8339
  name: string;
7933
8340
  properties: Pick<IPlaybook, "createdAt" | "createdBy" | "lastChanged" | "lastChangedBy">;
7934
8341
  }
7935
- export declare type IGraphResourceWithReferenceId = IGraphConnection | IGraphFlow | IGraphFunction | IGraphLexicon | IGraphLocale | IGraphNLUConnector | IGraphSnippet;
8342
+ export declare type IGraphResourceWithReferenceId = IGraphConnection | IGraphFlow | IGraphFunction | IGraphLexicon | IGraphLocale | IGraphNLUConnector | IGraphSnippet | IGraphAgentAssistConfig;
7936
8343
  export declare type IGraphResourceWithoutReferenceId = IGraphEndpoint | IGraphExtension | IGraphFile | IGraphPlaybook;
7937
8344
  export declare type IGraphResource = IGraphResourceWithReferenceId | IGraphResourceWithoutReferenceId;
7938
8345
  /**
@@ -8153,7 +8560,10 @@ export interface IIntentFeedbackReport_2_0 {
8153
8560
  * format: uuid
8154
8561
  * name:
8155
8562
  * type: string
8156
- * example: pizza
8563
+ * example: OrderFood
8564
+ * description:
8565
+ * type: string
8566
+ * example: Intent to order food
8157
8567
  * tags:
8158
8568
  * type: array
8159
8569
  * items:
@@ -8173,6 +8583,7 @@ export interface IIntentIndexItem_2_0 {
8173
8583
  _id: string;
8174
8584
  referenceId: string;
8175
8585
  name: string;
8586
+ description?: string;
8176
8587
  tags: string[];
8177
8588
  isRejectIntent: boolean;
8178
8589
  isDisabled: boolean;
@@ -8201,7 +8612,10 @@ export interface IIndexIntentsRestReturnValue_2_0 extends ICursorBasedPagination
8201
8612
  * properties:
8202
8613
  * name:
8203
8614
  * type: string
8204
- * example: pizza
8615
+ * example: OrderFood
8616
+ * description:
8617
+ * type: string
8618
+ * example: Intent to order food
8205
8619
  * condition:
8206
8620
  * type: string
8207
8621
  * rules:
@@ -8233,6 +8647,11 @@ export interface IIndexIntentsRestReturnValue_2_0 extends ICursorBasedPagination
8233
8647
  * items:
8234
8648
  * $ref: '#/components/schemas/TMongoId'
8235
8649
  * example: false
8650
+ * biasTowardsParentOrChildIntents:
8651
+ * type: string
8652
+ * enum:
8653
+ * - parents
8654
+ * - children
8236
8655
  * parentIntentId:
8237
8656
  * $ref: '#/components/schemas/TMongoId'
8238
8657
  * analyticsLabel:
@@ -8260,6 +8679,7 @@ export interface IIntent_2_0 {
8260
8679
  _id: string;
8261
8680
  referenceId: string;
8262
8681
  name: string;
8682
+ description?: string;
8263
8683
  condition: string;
8264
8684
  isRejectIntent: boolean;
8265
8685
  isDisabled: boolean;
@@ -8274,6 +8694,7 @@ export interface IIntent_2_0 {
8274
8694
  lastChangedBy: TMongoId;
8275
8695
  nodeReferenceId: string;
8276
8696
  childFeatures?: boolean | TMongoId[];
8697
+ biasTowardsParentOrChildIntents?: TBiasTowardsParentOrChildIntentsTypes;
8277
8698
  parentIntentId?: TMongoId;
8278
8699
  localeReference: TMongoId;
8279
8700
  feedbackReport: IIntentFeedbackReport_2_0;
@@ -8300,6 +8721,8 @@ export interface ICreateIntentRestDataParams_2_0 {
8300
8721
  flowId: string;
8301
8722
  }
8302
8723
  export interface ICreateIntentRestData_2_0 extends ICreateIntentRestDataBody_2_0, ICreateIntentRestDataParams_2_0 {
8724
+ shouldGenerateSentences?: boolean;
8725
+ generateSentenceLimit?: number;
8303
8726
  }
8304
8727
  export interface ICreateIntentRestReturnValue_2_0 extends IIntent_2_0 {
8305
8728
  }
@@ -8715,6 +9138,17 @@ export interface IBatchSentencesRestReturnValue_2_0 {
8715
9138
  updated: string[];
8716
9139
  deleted: string[];
8717
9140
  }
9141
+ export interface IGenerateSentencesRestDataParams_2_0 {
9142
+ flowId: string;
9143
+ intentId: string;
9144
+ }
9145
+ export interface IGenerateSentencesRestData_2_0 extends IGenerateSentencesRestDataParams_2_0 {
9146
+ localeId?: string;
9147
+ limit?: number;
9148
+ }
9149
+ export interface IGenerateSentencesRestReturnValue_2_0 {
9150
+ sentences: string[];
9151
+ }
8718
9152
  /**
8719
9153
  * @openapi
8720
9154
  *
@@ -8843,19 +9277,27 @@ export interface IChart_2_0 {
8843
9277
  * properties:
8844
9278
  * type:
8845
9279
  * type: string
8846
- * example: "if"
8847
- * referenceId:
8848
- * type: string
8849
- * format: uuid
9280
+ * example: if
9281
+ * description: Type of the Node
8850
9282
  * extension:
8851
9283
  * type: string
8852
9284
  * example: "@cognigy/basic-nodes"
9285
+ * enum:
9286
+ * - "@cognigy/basic-nodes"
9287
+ * - "@cognigy/mongodb"
9288
+ * - "@cognigy/mssql"
9289
+ * - "@cognigy/smtp"
9290
+ * - "@cognigy/voicegateway"
9291
+ * - "@cognigy/microsoft"
9292
+ * - "@cognigy/voiceGateway2"
8853
9293
  * label:
8854
9294
  * type: string
8855
- * example: "A new Node"
9295
+ * example: A new Node
9296
+ * description: Replaces the default name of the Node displayed in the Flow Editor.
8856
9297
  * comment:
8857
9298
  * type: string
8858
- * example: "this is a very important node"
9299
+ * example: this is a very important node
9300
+ * description: Adds additional information about Nodes, for example, a specific of the Node.
8859
9301
  * commentColor:
8860
9302
  * oneOf:
8861
9303
  * - $ref: '#/components/schemas/TCSSColor'
@@ -8863,8 +9305,6 @@ export interface IChart_2_0 {
8863
9305
  * nullable: false
8864
9306
  * enum:
8865
9307
  * - ""
8866
- * preview:
8867
- * example: This is a fancy node
8868
9308
  * isEntryPoint:
8869
9309
  * type: boolean
8870
9310
  * example: false
@@ -8873,10 +9313,14 @@ export interface IChart_2_0 {
8873
9313
  * example: false
8874
9314
  * config:
8875
9315
  * type: object
9316
+ * example: {"condition":{"type":"rule","condition":"","rule":{"left":"1","operand":"gt","right":"2"}}}
8876
9317
  * localeReference:
8877
9318
  * type: string
9319
+ * example: "63bd8ebb648e6e739f1bbd82"
8878
9320
  * analyticsLabel:
8879
9321
  * type: string
9322
+ * example: "condition"
9323
+
8880
9324
  *
8881
9325
  * IChartNode_2_0:
8882
9326
  * allOf:
@@ -9559,6 +10003,9 @@ export interface INodeFieldCondition_2_0 {
9559
10003
  * type: array
9560
10004
  * items:
9561
10005
  * type: string
10006
+ * theme:
10007
+ * type: string
10008
+ * description: Used to highlight sections if they contain new features
9562
10009
  */
9563
10010
  export interface INodeSection_2_0 {
9564
10011
  /** Unique identifier for this section within all sections of a descriptor, e.g. 'authentication' */
@@ -9754,12 +10201,12 @@ export interface IReadYesNoIntentsRestDataParams_2_0 {
9754
10201
  }
9755
10202
  export interface IReadYesNoIntentsRestReturnValue_2_0 extends IYesNoIntentItem_2_0 {
9756
10203
  }
9757
- declare const arrayYesNoIntentsMode: readonly [
9758
- "smartDetectYesNoIntents",
9759
- "enableYesNoIntents",
9760
- "disableYesNoIntents"
10204
+ declare const arrayYesNoLogic: readonly [
10205
+ "yesNoIntents",
10206
+ "yesNoIntentsWithRules",
10207
+ "confirmationWords"
9761
10208
  ];
9762
- export declare type TYesNoIntentsMode_2_0 = typeof arrayYesNoIntentsMode[number];
10209
+ export declare type TYesNoLogic_2_0 = typeof arrayYesNoLogic[number];
9763
10210
  export interface IUpdateYesNoIntentsRestDataParams_2_0 {
9764
10211
  localeId: string;
9765
10212
  intentId: string;
@@ -9778,10 +10225,10 @@ export interface IDeleteYesNoIntentRestData_2_0 extends IDeleteYesNoIntentRestDa
9778
10225
  }
9779
10226
  export interface IDeleteYesNoIntentRestReturnValue_2_0 {
9780
10227
  }
9781
- export interface ITrainYesNoIntentsRestDataParams_2_0 {
10228
+ export interface ITrainYesNoIntentsRestDataParams_2_0 extends Partial<IProjectScope> {
9782
10229
  localeId?: string;
9783
10230
  }
9784
- export interface ITrainYesNoIntentsRestDataBody_2_0 {
10231
+ export interface ITrainYesNoIntentsRestDataBody_2_0 extends Partial<IProjectScope> {
9785
10232
  }
9786
10233
  export interface ITrainYesNoIntentsRestData_2_0 extends ITrainYesNoIntentsRestDataParams_2_0, ITrainYesNoIntentsRestDataBody_2_0 {
9787
10234
  }
@@ -9839,9 +10286,9 @@ export interface ITrainYesNoIntentsRestReturnValue_2_0 extends ICreatedTask_2_0
9839
10286
  * type: boolean
9840
10287
  * useURLSlots:
9841
10288
  * type: boolean
9842
- * yesNoIntentsMode:
10289
+ * yesNoLogic:
9843
10290
  * type: string
9844
- * enum: [smartDetectYesNoIntents, enableYesNoIntents, disableYesNoIntents]
10291
+ * enum: [yesNoIntents, yesNoIntentsWithRules, confirmationWords]
9845
10292
  * yesNoIntentThreshold:
9846
10293
  * type: integer
9847
10294
  */
@@ -9872,7 +10319,7 @@ export interface ISharedSettings_2_0 {
9872
10319
  learnNewExampleSentences: boolean;
9873
10320
  /** The threshold after which a 'learning sentence' is a learned sentence */
9874
10321
  learnNewExampleSentencesThreshold: number;
9875
- yesNoIntentsMode: TYesNoIntentsMode_2_0;
10322
+ yesNoLogic: TYesNoLogic_2_0;
9876
10323
  yesNoIntentThreshold: number;
9877
10324
  }
9878
10325
  /**
@@ -9895,6 +10342,8 @@ export interface ISharedSettings_2_0 {
9895
10342
  * $ref: '#/components/schemas/IAgentTranslationSettings_2_0'
9896
10343
  * audioPreviewSettings:
9897
10344
  * $ref: '#/components/schemas/IAgentAudioPreviewSettings_2_0'
10345
+ * generativeAISettings:
10346
+ * $ref: '#/components/schemas/IGenerativeAIModelSettings_2_0'
9898
10347
  *
9899
10348
  * IAgentSettings_2_0:
9900
10349
  * allOf:
@@ -9918,6 +10367,7 @@ export interface IAgentSettings_2_0 extends ISharedSettings_2_0 {
9918
10367
  lastChangedBy: TMongoId;
9919
10368
  translationSettings: IAgentTranslationSettings_2_0;
9920
10369
  audioPreviewSettings: IAgentAudioPreviewSettings_2_0;
10370
+ generativeAISettings: IGenerativeAISettings_2_0;
9921
10371
  }
9922
10372
  /**
9923
10373
  * @openapi
@@ -9994,6 +10444,8 @@ export interface IAgentTranslationSettings_2_0 {
9994
10444
  * enum:
9995
10445
  * - none
9996
10446
  * - microsoft
10447
+ * - google
10448
+ * - aws
9997
10449
  */
9998
10450
  export declare type TAudioPreviewProvider_2_0 = "none" | "microsoft" | "google" | "aws";
9999
10451
  /**
@@ -10089,31 +10541,152 @@ export interface IAudioPreviewGoogleSettings_2_0 {
10089
10541
  *
10090
10542
  * components:
10091
10543
  * schemas:
10092
- * IAgentAudioPreviewSettings_2_0:
10544
+ * IAgentAudioPreviewSettings_2_0:
10545
+ * type: object
10546
+ * properties:
10547
+ * audioPreviewProvider:
10548
+ * $ref: '#/components/schemas/TAudioPreviewProvider_2_0'
10549
+ * microsoft:
10550
+ * $ref: '#/components/schemas/IAudioPreviewMicrosoftSettings_2_0'
10551
+ * aws:
10552
+ * $ref: '#/components/schemas/IAudioPreviewAWSSettings_2_0'
10553
+ * google:
10554
+ * $ref: '#/components/schemas/IAudioPreviewGoogleSettings_2_0'
10555
+ */
10556
+ /**
10557
+ * The supporting optional fields are not shown in Open API documentation
10558
+ * as those are just place holders and not supported in iteration 1
10559
+ */
10560
+ export interface IAgentAudioPreviewSettings_2_0 {
10561
+ audioPreviewProvider: TAudioPreviewProvider_2_0;
10562
+ microsoft?: IAudioPreviewMicrosoftSettings_2_0;
10563
+ aws?: IAudioPreviewAWSSettings_2_0;
10564
+ google?: IAudioPreviewGoogleSettings_2_0;
10565
+ audioPreviewProviderCustomBaseUrl?: string;
10566
+ audioPreviewRetries?: number;
10567
+ audioPreviewTimeout?: number;
10568
+ audioPreviewCacheExpiry?: number;
10569
+ }
10570
+ /**
10571
+ * @openapi
10572
+ *
10573
+ * components:
10574
+ * schemas:
10575
+ * TGenerativeAIProviders_2_0:
10576
+ * type: string
10577
+ * description: Supported Generative AI Providers
10578
+ * enum:
10579
+ * - none
10580
+ * - openAI
10581
+ * - azureOpenAI
10582
+ */
10583
+ export declare type TGenerativeAIProviders_2_0 = "none" | "openAI" | "azureOpenAI";
10584
+ /**
10585
+ * @openapi
10586
+ *
10587
+ * components:
10588
+ * schemas:
10589
+ * TOpenAIModels_2_0:
10590
+ * type: string
10591
+ * description: Supported Generative AI Models
10592
+ * enum:
10593
+ * - text-davinci-003
10594
+ */
10595
+ export declare type TOpenAIModels_2_0 = "text-davinci-003";
10596
+ /**
10597
+ * @openapi
10598
+ *
10599
+ * components:
10600
+ * schemas:
10601
+ * TAzureOpenAIModels_2_0:
10602
+ * type: string
10603
+ * description: Supported Generative AI Models
10604
+ * enum:
10605
+ * - text-davinci-002
10606
+ */
10607
+ export declare type TAzureOpenAIModels_2_0 = "text-davinci-002";
10608
+ /**
10609
+ * @openapi
10610
+ *
10611
+ * components:
10612
+ * schemas:
10613
+ * IGenerativeAIMeta_2_0:
10614
+ * type: object
10615
+ * properties:
10616
+ * model:
10617
+ * $ref: '#/components/schemas/TOpenAIModels_2_0'
10618
+ * temperature:
10619
+ * type: integer
10620
+ * minimum: 0
10621
+ * maximum: 1
10622
+ * description: Defines the creativity of the model
10623
+ */
10624
+ export interface IGenerativeAIMeta_2_0<MODELS extends TOpenAIModels_2_0 | TAzureOpenAIModels_2_0> {
10625
+ model: MODELS;
10626
+ temperature: number;
10627
+ }
10628
+ export interface IGenerativeAIModelSettings_2_0<P extends TGenerativeAIProviders_2_0, MODELS extends TOpenAIModels_2_0 | TAzureOpenAIModels_2_0, M extends IGenerativeAIMeta_2_0<MODELS>> {
10629
+ provider: P;
10630
+ connectionId?: string;
10631
+ intentGeneration: M;
10632
+ ouputContextualization: M;
10633
+ lexiconGeneration: M;
10634
+ flowGeneration: M;
10635
+ flowExplanation: M;
10636
+ }
10637
+ export interface IOpenAI_2_0 extends IGenerativeAIModelSettings_2_0<"openAI", TOpenAIModels_2_0, IGenerativeAIMeta_2_0<TOpenAIModels_2_0>> {
10638
+ }
10639
+ export interface IAzureOpenAI_2_0 extends IGenerativeAIModelSettings_2_0<"azureOpenAI", TAzureOpenAIModels_2_0, IGenerativeAIMeta_2_0<TAzureOpenAIModels_2_0>> {
10640
+ }
10641
+ /**
10642
+ * @openapi
10643
+ *
10644
+ * components:
10645
+ * schemas:
10646
+ * IGenerativeAIModelSettings_2_0:
10093
10647
  * type: object
10094
10648
  * properties:
10095
- * audioPreviewProvider:
10096
- * $ref: '#/components/schemas/TAudioPreviewProvider_2_0'
10097
- * microsoft:
10098
- * $ref: '#/components/schemas/IAudioPreviewMicrosoftSettings_2_0'
10099
- * aws:
10100
- * $ref: '#/components/schemas/IAudioPreviewAWSSettings_2_0'
10101
- * google:
10102
- * $ref: '#/components/schemas/IAudioPreviewGoogleSettings_2_0'
10649
+ * generativeAIProvider:
10650
+ * $ref: '#/components/schemas/TGenerativeAIProviders_2_0'
10651
+ * openAI:
10652
+ * type: object
10653
+ * properties:
10654
+ * provider:
10655
+ * $ref: '#/components/schemas/TGenerativeAIProviders_2_0'
10656
+ * connectionId:
10657
+ * type: string
10658
+ * maxLength: 300
10659
+ * description: Cognigy GenerativeAI Provider Connection Id
10660
+ * intentGeneration:
10661
+ * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
10662
+ * ouputContextualization:
10663
+ * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
10664
+ * lexiconGeneration:
10665
+ * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
10666
+ * flowGeneration:
10667
+ * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
10668
+ * flowExplanation:
10669
+ * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
10670
+ * azureOpenAI:
10671
+ * type: object
10672
+ * properties:
10673
+ * provider:
10674
+ * $ref: '#/components/schemas/TGenerativeAIProviders_2_0'
10675
+ * intentGeneration:
10676
+ * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
10677
+ * ouputContextualization:
10678
+ * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
10679
+ * lexiconGeneration:
10680
+ * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
10681
+ * flowGeneration:
10682
+ * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
10683
+ * flowExplanation:
10684
+ * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
10103
10685
  */
10104
- /**
10105
- * The supporting optional fields are not shown in Open API documentation
10106
- * as those are just place holders and not supported in iteration 1
10107
- */
10108
- export interface IAgentAudioPreviewSettings_2_0 {
10109
- audioPreviewProvider: TAudioPreviewProvider_2_0;
10110
- microsoft?: IAudioPreviewMicrosoftSettings_2_0;
10111
- aws?: IAudioPreviewAWSSettings_2_0;
10112
- google?: IAudioPreviewGoogleSettings_2_0;
10113
- audioPreviewProviderCustomBaseUrl?: string;
10114
- audioPreviewRetries?: number;
10115
- audioPreviewTimeout?: number;
10116
- audioPreviewCacheExpiry?: number;
10686
+ export interface IGenerativeAISettings_2_0 {
10687
+ generativeAIProvider: TGenerativeAIProviders_2_0;
10688
+ openAI?: IOpenAI_2_0;
10689
+ azureOpenAI?: IAzureOpenAI_2_0;
10117
10690
  }
10118
10691
  export interface IReadAgentSettingsRestDataParams_2_0 extends IProjectScope {
10119
10692
  }
@@ -12507,161 +13080,7 @@ export interface IDatePickerConfig {
12507
13080
  export interface IDatePickerNodeParams extends INodeFunctionBaseParams {
12508
13081
  config: IDatePickerConfig;
12509
13082
  }
12510
- export interface ISayNodeConfigParams {
12511
- text: string | string[];
12512
- data: any;
12513
- loop: boolean;
12514
- linear: boolean;
12515
- liveAgentSettings?: ILiveAgentSettings;
12516
- type: "text" | "quickReplies" | "gallery" | "buttons" | "image" | "list" | "adaptiveCard";
12517
- _cognigy: {
12518
- [key: string]: unknown;
12519
- };
12520
- _data: {
12521
- [key: string]: any;
12522
- };
12523
- }
12524
- export interface ISayParams extends INodeFunctionBaseParams {
12525
- config: {
12526
- say: ISayNodeConfigParams;
12527
- };
12528
- }
12529
13083
  export declare type ISayNodeParams = ISayParams;
12530
- export interface IQuestionNodeParams extends INodeFunctionBaseParams {
12531
- config: IQuestionNodeDatepickerConfig | IQuestionNodeKeyphraseConfig | IQuestionNodeRegexConfig | IQuestionNodeOtherConfig;
12532
- }
12533
- export interface IQuestionNodeSharedConfig {
12534
- validationMessage: string;
12535
- repromptCondition: string;
12536
- validationRepeat: boolean;
12537
- storeResultInContext: boolean;
12538
- contextKey: string;
12539
- skipIfResultInContext: boolean;
12540
- onlyAcceptEscalationIntents: boolean;
12541
- storeDetailedResults: boolean;
12542
- storeInContactProfile: boolean;
12543
- profileKey: string;
12544
- say: ISayParams["config"]["say"];
12545
- parseResultOnEntry: boolean;
12546
- additionalValidation: string;
12547
- maxExecutionDiff: number;
12548
- resultLocation: string;
12549
- skipRepromptOnIntent: boolean;
12550
- escalateAnswersAction: "none" | "goto" | "execute" | "skip" | "text" | "handover";
12551
- escalateAnswersThreshold: number;
12552
- escalateAnswersGotoTarget: string;
12553
- escalateAnswersExecuteTarget: string;
12554
- escalateAnswersGotoExecutionMode: "continue" | "wait";
12555
- escalateAnswersInjectedText: string;
12556
- escalateAnswersInjectedData: string;
12557
- escalateAnswersMessage: ISayParams["config"]["say"];
12558
- escalateAnswersRepromptPrevention: boolean;
12559
- escalateAnswersOnce: boolean;
12560
- escalateAnswersHandoverText: string;
12561
- escalateAnswersRepeatHandoverMessage: boolean;
12562
- escalateAnswersHandoverCancelIntent: string;
12563
- escalateAnswersHandoverQuickReply: string;
12564
- escalateAnswersHandoverChatwootInboxId: string;
12565
- escalateAnswersHandoverLiveAgentInboxId: string;
12566
- escalateAnswersHandoverSendTranscriptAsFirstMessage: boolean;
12567
- escalateAnswersHandoverSalesforcePrechatEntities: object[];
12568
- escalateAnswersHandoverSalesforcePrechatDetails: object[];
12569
- escalateAnswersHandoverSendResolveEvent: boolean;
12570
- escalateAnswersHandoverResolveBehavior: "resetEntrypoint" | "continueEntrypoint";
12571
- escalateAnswersAgentAssistInitMessage: string;
12572
- escalateAnswersAllowAgentInject: boolean;
12573
- escalateIntentsAction: "none" | "goto" | "execute" | "skip" | "text" | "handover";
12574
- escalateIntentsValidIntents: string[];
12575
- escalateIntentsThreshold: number;
12576
- escalateIntentsGotoTarget: string;
12577
- escalateIntentsExecuteTarget: string;
12578
- escalateIntentsGotoExecutionMode: "continue" | "wait";
12579
- escalateIntentsInjectedText: string;
12580
- escalateIntentsInjectedData: any;
12581
- escalateIntentsMessage: ISayParams["config"]["say"];
12582
- escalateIntentsRepromptPrevention: boolean;
12583
- escalateIntentsHandoverText: string;
12584
- escalateIntentsRepeatHandoverMessage: boolean;
12585
- escalateIntentsHandoverCancelIntent: string;
12586
- escalateIntentsHandoverQuickReply: string;
12587
- escalateIntentsHandoverChatwootInboxId: string;
12588
- escalateIntentsHandoverLiveAgentInboxId: string;
12589
- escalateIntentHandoverSendTranscriptAsFirstMessage: boolean;
12590
- escalateIntentsHandoverSalesforcePrechatEntities: object[];
12591
- escalateIntentsHandoverSalesforcePrechatDetails: object[];
12592
- escalateIntentsHandoverSendResolveEvent: boolean;
12593
- escalateIntentsHandoverResolveBehavior: "resetEntrypoint" | "continueEntrypoint";
12594
- escalateIntentsAgentAssistInitMessage: string;
12595
- escalateIntentsAllowAgentInject: boolean;
12596
- reconfirmationBehaviour: "none" | "reconfirm";
12597
- reconfirmationQuestion: string;
12598
- reconfirmationQuestionReprompt: string;
12599
- }
12600
- export interface IQuestionNodeDatepickerConfig extends IQuestionNodeSharedConfig {
12601
- type: "date";
12602
- datepicker_eventName: string;
12603
- datepicker_locale: string;
12604
- datepicker_dateFormat: string;
12605
- datepicker_time24Hours: boolean;
12606
- datepicker_defaultDate: string;
12607
- datepicker_minDate: string;
12608
- datepicker_maxDate: string;
12609
- datepicker_wantEnableDisable: "none" | "enable" | "disable";
12610
- datepicker_disableEnableRange: boolean;
12611
- datepicker_enabledDates: string[];
12612
- datepicker_disabledDates: string[];
12613
- datepicker_enableTime: boolean;
12614
- datepicker_mode: "single" | "multiple" | "range";
12615
- datepicker_openPickerButtonText: string;
12616
- datepicker_cancelButtonText: string;
12617
- datepicker_submitButtonText: string;
12618
- datepicker_defaultHour: number;
12619
- datepicker_defaultMinute: number;
12620
- datepicker_enableSeconds: boolean;
12621
- datepicker_hourIncrement: number;
12622
- datepicker_minuteIncrement: number;
12623
- datepicker_noCalendar: boolean;
12624
- datepicker_weekNumbers: boolean;
12625
- datepicker_hidePicker: boolean;
12626
- datepicker_functionEnable: string;
12627
- datepicker_functionDisable: string;
12628
- }
12629
- export interface IQuestionNodeKeyphraseConfig extends IQuestionNodeSharedConfig {
12630
- type: "keyphrase";
12631
- keyphraseTag: string;
12632
- usePositiveOnly: boolean;
12633
- }
12634
- export interface IQuestionNodeRegexConfig extends IQuestionNodeSharedConfig {
12635
- type: "regex";
12636
- regex: string;
12637
- }
12638
- export interface IQuestionNodeOtherConfig extends IQuestionNodeSharedConfig {
12639
- type: "email" | "number" | "temperature" | "age" | "duration" | "yesNo" | "text" | "money" | "percentage" | "intent" | "data" | "url" | "custom";
12640
- }
12641
- export interface IOptionalQuestionNodeParams extends INodeFunctionBaseParams {
12642
- config: IOptionalQuestionNodeOtherConfig | IOptionalQuestionNodeKeyphraseConfig | IOptionalQuestionNodeRegexConfig;
12643
- }
12644
- export interface IOptionalQuestionNodeSharedConfig {
12645
- say: ISayParams["config"]["say"];
12646
- retentionTime: number;
12647
- executeChildrenOnly: boolean;
12648
- cognigyScript: "answer" | "question";
12649
- storeResultInContext: boolean;
12650
- contextKey: string;
12651
- storeDetailedResults: boolean;
12652
- }
12653
- export interface IOptionalQuestionNodeKeyphraseConfig extends IOptionalQuestionNodeSharedConfig {
12654
- type: "keyphrase";
12655
- keyphraseTag: string;
12656
- usePositiveOnly: boolean;
12657
- }
12658
- export interface IOptionalQuestionNodeRegexConfig extends IOptionalQuestionNodeSharedConfig {
12659
- type: "regex";
12660
- regex: string;
12661
- }
12662
- export interface IOptionalQuestionNodeOtherConfig extends IOptionalQuestionNodeSharedConfig {
12663
- type: "email" | "number" | "temperature" | "age" | "date" | "duration" | "yesNo" | "money" | "percentage" | "intent" | "data" | "url";
12664
- }
12665
13084
  export interface IContinuousASRParams extends INodeFunctionBaseParams {
12666
13085
  config: {
12667
13086
  asrEnabled: boolean;
@@ -12695,6 +13114,8 @@ export interface IVoiceConfigParams {
12695
13114
  bargeInMinWordCount: number;
12696
13115
  bargeInOnSpeech: boolean;
12697
13116
  bargeInOnDtmf: boolean;
13117
+ enableAdvancedSTTConfig: boolean;
13118
+ enableAdvancedTTSConfig: boolean;
12698
13119
  sttLanguage: string;
12699
13120
  sttVendor: string;
12700
13121
  sttHints: string[];
@@ -12707,7 +13128,7 @@ export interface IVoiceConfigParams {
12707
13128
  ttsLanguage: string;
12708
13129
  ttsVendor: TVoiceGateway2TTSVendor;
12709
13130
  azureTtsDeploymentId: string;
12710
- azureSttDeploymentId: string;
13131
+ azureSttContextId: string;
12711
13132
  azureSpeechRecognitionMode: string;
12712
13133
  azureEnableAudioLogging: boolean;
12713
13134
  azureHintsBoost: number;
@@ -12757,12 +13178,18 @@ export interface ITransferParams extends INodeFunctionBaseParams {
12757
13178
  }
12758
13179
  export interface IBargeInParams extends INodeFunctionBaseParams {
12759
13180
  config: {
13181
+ bargeInEnable: boolean;
12760
13182
  bargeInMinWordCount: number;
12761
13183
  bargeInOnSpeech: boolean;
12762
13184
  bargeInOnDtmf: boolean;
13185
+ dtmfEnable: boolean;
13186
+ dtmfInterDigitTimeout: number;
13187
+ dtmfMaxDigits: number;
13188
+ dtmfSubmitDigit: string;
12763
13189
  };
12764
13190
  }
12765
13191
  export interface IVoiceConfigParams {
13192
+ enableAdvancedSTTConfig: boolean;
12766
13193
  sttLanguage: string;
12767
13194
  sttVendor: string;
12768
13195
  sttHints: string[];
@@ -12770,6 +13197,10 @@ export interface IVoiceConfigParams {
12770
13197
  ttsLanguage: string;
12771
13198
  ttsVendor: TVoiceGateway2TTSVendor;
12772
13199
  sttDisablePunctuation: boolean;
13200
+ azureSttContextId: string;
13201
+ azureEnableAudioLogging: boolean;
13202
+ azureTtsDeploymentId: string;
13203
+ enableAdvancedTTSConfig: boolean;
12773
13204
  }
12774
13205
  export interface ISessionSpeechParams extends INodeFunctionBaseParams {
12775
13206
  config: IVoiceConfigParams;
@@ -12850,12 +13281,6 @@ export interface IInitAppSessionNodeParams extends INodeFunctionBaseParams {
12850
13281
  appInterimScreenOverride?: string;
12851
13282
  appConnectScreenOverride?: string;
12852
13283
  }
12853
- export interface ISetAppStateNodeParams extends INodeFunctionBaseParams {
12854
- config: {
12855
- appTemplateId: string;
12856
- appTemplateData: string;
12857
- };
12858
- }
12859
13284
  export interface IGetAppSessionPinNodeParams extends INodeFunctionBaseParams {
12860
13285
  }
12861
13286
  export declare type TCardType = "basic" | "suggested" | "table" | "custom";
@@ -13134,11 +13559,18 @@ export interface IPlayParamsConfig extends IVoiceConfigParams {
13134
13559
  export interface IPlayParams extends INodeFunctionBaseParams {
13135
13560
  config: IPlayParamsConfig;
13136
13561
  }
13137
- export interface IReferParams extends INodeFunctionBaseParams {
13562
+ export interface ITransferNodeParams extends INodeFunctionBaseParams {
13138
13563
  config: {
13139
- referTo: string;
13564
+ transferType: "refer" | "dial";
13565
+ transferReason: string;
13566
+ transferTarget: string;
13140
13567
  useTransferSipHeaders: boolean;
13141
- transferSipHeaders: any;
13568
+ transferSipHeaders: {
13569
+ [key: string]: string | object;
13570
+ };
13571
+ dialCallerId?: string;
13572
+ dialMusic?: string;
13573
+ dialTranscriptionWebhook?: string;
13142
13574
  };
13143
13575
  }
13144
13576
  export interface ISendMetadataParams extends INodeFunctionBaseParams {
@@ -13153,8 +13585,8 @@ export interface ICognigyVoiceGateway2Nodes {
13153
13585
  "dtmf": ICreateChartNodeBasicNodesData<"dtmf", IDtmfParams, TVOICE_GATEWAY_2_EXTENSION>;
13154
13586
  "hangup": ICreateChartNodeBasicNodesData<"hangup", IHangupParams, TVOICE_GATEWAY_2_EXTENSION>;
13155
13587
  "play": ICreateChartNodeBasicNodesData<"play", IPlayParams, TVOICE_GATEWAY_2_EXTENSION>;
13156
- "refer": ICreateChartNodeBasicNodesData<"refer", IReferParams, TVOICE_GATEWAY_2_EXTENSION>;
13157
- "transfer": ICreateChartNodeBasicNodesData<"transfer", IReferParams, TVOICE_GATEWAY_2_EXTENSION>;
13588
+ "refer": ICreateChartNodeBasicNodesData<"refer", ITransferNodeParams, TVOICE_GATEWAY_2_EXTENSION>;
13589
+ "transfer": ICreateChartNodeBasicNodesData<"transfer", ITransferNodeParams, TVOICE_GATEWAY_2_EXTENSION>;
13158
13590
  "sendMetadata": ICreateChartNodeBasicNodesData<"sendMetadata", ISendMetadataParams, TVOICE_GATEWAY_2_EXTENSION>;
13159
13591
  }
13160
13592
  export interface ICognigyBasicNodes {
@@ -13208,7 +13640,6 @@ export interface ICognigyBasicNodes {
13208
13640
  question: ICreateChartNodeBasicNodesData<"question", IQuestionNodeParams, TBASIC_EXTENSION>;
13209
13641
  optionalQuestion: ICreateChartNodeBasicNodesData<"optionalQuestion", IOptionalQuestionNodeParams, TBASIC_EXTENSION>;
13210
13642
  initAppSession: ICreateChartNodeBasicNodesData<"initAppSession", IInitAppSessionNodeParams, TBASIC_EXTENSION>;
13211
- setAppState: ICreateChartNodeBasicNodesData<"setAppState", ISetAppStateNodeParams, TBASIC_EXTENSION>;
13212
13643
  getAppSessionPin: ICreateChartNodeBasicNodesData<"getAppSessionPin", IGetAppSessionPinNodeParams, TBASIC_EXTENSION>;
13213
13644
  hangup: ICreateChartNodeBasicNodesData<"hangup", IHangupParams, TBASIC_EXTENSION>;
13214
13645
  play: ICreateChartNodeBasicNodesData<"play", IPlayParams, TBASIC_EXTENSION>;
@@ -13437,6 +13868,101 @@ export interface IIndexYesNoSentencesRestData_2_0 extends IRestPagination<ISente
13437
13868
  }
13438
13869
  export interface IIndexYesNoSentencesRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue<ISentenceIndexItem_2_0> {
13439
13870
  }
13871
+ /**
13872
+ * @openapi
13873
+ *
13874
+ * components:
13875
+ * schemas:
13876
+ * IAgentAssistGridConfig_2_0:
13877
+ * type: object
13878
+ * properties:
13879
+ * any-config-key:
13880
+ * type: object
13881
+ * properties:
13882
+ * x:
13883
+ * type: number
13884
+ * y:
13885
+ * type: number
13886
+ * columns:
13887
+ * type: number
13888
+ * rows:
13889
+ * type: number
13890
+ *
13891
+ * IAgentAssistConfigData_2_0:
13892
+ * type: object
13893
+ * properties:
13894
+ * name:
13895
+ * type: string
13896
+ * description: The human readable name of the config.
13897
+ * description:
13898
+ * type: string
13899
+ * description: The description which can be used to understand what the agent assist config contains in terms of tiles.
13900
+ * config:
13901
+ * type: object
13902
+ * description: The actual grid-config.
13903
+ * $ref: '#/components/schemas/IAgentAssistGridConfig_2_0'
13904
+ *
13905
+ * IAgentAssistConfigGeneratedData_2_0:
13906
+ * type: object
13907
+ * properties:
13908
+ * referenceId:
13909
+ * type: string
13910
+ * format: uuid
13911
+ *
13912
+ * IAgentAssistConfig_2_0:
13913
+ * allOf:
13914
+ * - $ref: '#/components/schemas/IAgentAssistConfigData_2_0'
13915
+ * - $ref: '#/components/schemas/IAgentAssistConfigGeneratedData_2_0'
13916
+ * - $ref: '#/components/schemas/IEntityMeta'
13917
+ */
13918
+ export interface IAgentAssistConfig_2_0 {
13919
+ _id: TMongoId;
13920
+ name: string;
13921
+ description: string;
13922
+ config: IAgentAssistGridConfig;
13923
+ referenceId: string;
13924
+ projectReference: string;
13925
+ organisationReference: string;
13926
+ createdAt: number;
13927
+ lastChanged: number;
13928
+ createdBy: TMongoId;
13929
+ lastChangedBy: TMongoId;
13930
+ }
13931
+ export interface ICreateAgentAssistConfigRestDataBody_2_0 extends IProjectScope, Partial<Omit<IAgentAssistConfig_2_0, keyof IEntityMeta>> {
13932
+ }
13933
+ export interface ICreateAgentAssistConfigRestData_2_0 extends ICreateAgentAssistConfigRestDataBody_2_0 {
13934
+ }
13935
+ export interface ICreateAgentAssistConfigRestReturnValue_2_0 extends IAgentAssistConfig_2_0 {
13936
+ }
13937
+ export interface IUpdateAgentAssistConfigRestDataBody_2_0 extends Partial<Pick<IAgentAssistConfig_2_0, "name" | "description" | "config">> {
13938
+ }
13939
+ export interface IUpdateAgentAssistConfigRestDataParams_2_0 {
13940
+ configId: string;
13941
+ }
13942
+ export interface IUpdateAgentAssistConfigRestData_2_0 extends IUpdateAgentAssistConfigRestDataBody_2_0, IUpdateAgentAssistConfigRestDataParams_2_0 {
13943
+ }
13944
+ export interface IUpdateAgentAssistConfigRestReturnValue_2_0 {
13945
+ }
13946
+ export interface IReadAgentAssistConfigRestDataParams_2_0 {
13947
+ configId: string;
13948
+ projectId?: string;
13949
+ organisationId?: string;
13950
+ }
13951
+ export interface IReadAgentAssistConfigRestData_2_0 extends IReadAgentAssistConfigRestDataParams_2_0 {
13952
+ }
13953
+ export interface IReadAgentAssistConfigRestReturnValue_2_0 extends IAgentAssistConfig_2_0 {
13954
+ }
13955
+ export interface IDeleteAgentAssistConfigRestDataParams_2_0 {
13956
+ configId: string;
13957
+ }
13958
+ export interface IDeleteAgentAssistConfigRestData_2_0 extends IDeleteAgentAssistConfigRestDataParams_2_0 {
13959
+ }
13960
+ export interface IDeleteAgentAssistConfigRestReturnValue_2_0 {
13961
+ }
13962
+ export interface IIndexAgentAssistConfigsRestData_2_0 extends IRestPagination<IAgentAssistConfig_2_0>, IProjectScope {
13963
+ }
13964
+ export interface IIndexAgentAssistConfigsRestReturnValue_2_0 extends ICursorBasedPaginationReturnValue<IAgentAssistConfig_2_0> {
13965
+ }
13440
13966
  export interface ResourcesAPIGroup_2_0 {
13441
13967
  searchResources: TRestAPIOperation<ISearchResourcesRestData_2_0, ISearchResourcesRestReturnValue_2_0>;
13442
13968
  indexFlows: TRestAPIOperation<TRestAPIOptionalParameter<IIndexFlowsRestData_2_0>, IIndexFlowsRestReturnValue_2_0>;
@@ -13558,6 +14084,7 @@ export interface ResourcesAPIGroup_2_0 {
13558
14084
  readSentence: TRestAPIOperation<IReadSentenceRestData_2_0, IReadSentenceRestReturnValue_2_0>;
13559
14085
  updateSentence: TRestAPIOperation<IUpdateSentenceRestData_2_0, IUpdateSentenceRestReturnValue_2_0>;
13560
14086
  deleteSentence: TRestAPIOperation<IDeleteSentenceRestData_2_0, IDeleteSentenceRestReturnValue_2_0>;
14087
+ generateSentences: TRestAPIOperation<IGenerateSentencesRestData_2_0, IGenerateSentencesRestReturnValue_2_0>;
13561
14088
  indexLearningSentences: TRestAPIOperation<IIndexLearningSentencesRestData_2_0, IIndexLearningSentencesRestReturnValue_2_0>;
13562
14089
  readLearningSentence: TRestAPIOperation<IReadLearningSentenceRestData_2_0, IReadLearningSentenceRestReturnValue_2_0>;
13563
14090
  deleteLearningSentence: TRestAPIOperation<IDeleteLearningSentenceRestData_2_0, IDeleteLearningSentenceRestReturnValue_2_0>;
@@ -13632,12 +14159,18 @@ export interface ResourcesAPIGroup_2_0 {
13632
14159
  updateYesNoIntents: TRestAPIOperation<IUpdateYesNoIntentRestData_2_0, IUpdateNoIntentsRestReturnValue_2_0>;
13633
14160
  deleteYesNoIntents: TRestAPIOperation<IDeleteYesNoIntentRestData_2_0, IDeleteYesNoIntentRestReturnValue_2_0>;
13634
14161
  trainYesNoIntents: TRestAPIOperation<ITrainYesNoIntentsRestData_2_0, ITrainYesNoIntentsRestReturnValue_2_0>;
14162
+ trainYesNoIntentsProject: TRestAPIOperation<ITrainYesNoIntentsRestData_2_0, ITrainYesNoIntentsRestReturnValue_2_0>;
13635
14163
  indexYesNoSentences: TRestAPIOperation<IIndexYesNoSentencesRestData_2_0, IIndexYesNoSentencesRestReturnValue_2_0>;
13636
14164
  createYesNoSentence: TRestAPIOperation<ICreateYesNoSentenceRestData_2_0, ICreateYesNoSentenceRestReturnValue_2_0>;
13637
14165
  updateYesNoSentence: TRestAPIOperation<IUpdateYesNoSentenceRestData_2_0, IUpdateYesNoSentenceRestReturnValue_2_0>;
13638
14166
  deleteYesNoSentence: TRestAPIOperation<IDeleteYesNoSentenceRestData_2_0, IDeleteYesNoSentenceRestReturnValue_2_0>;
13639
14167
  testVoiceProvider: TRestAPIOperation<ITestVoiceProviderRestData_2_0, ITestVoiceProviderRestReturnValue_2_0>;
13640
14168
  testTranslationSettings: TRestAPIOperation<ITestTranslationSettingsRestData_2_0, ITestTranslationSettingsRestReturnValue_2_0>;
14169
+ indexAgentAssistConfigs: TRestAPIOperation<IIndexAgentAssistConfigsRestData_2_0, IIndexAgentAssistConfigsRestReturnValue_2_0>;
14170
+ createAgentAssistConfig: TRestAPIOperation<ICreateAgentAssistConfigRestData_2_0, ICreateAgentAssistConfigRestReturnValue_2_0>;
14171
+ readAgentAssistConfig: TRestAPIOperation<IReadAgentAssistConfigRestData_2_0, IReadAgentAssistConfigRestReturnValue_2_0>;
14172
+ updateAgentAssistConfig: TRestAPIOperation<IUpdateAgentAssistConfigRestData_2_0, IUpdateAgentAssistConfigRestReturnValue_2_0>;
14173
+ deleteAgentAssistConfig: TRestAPIOperation<IDeleteAgentAssistConfigRestData_2_0, IDeleteAgentAssistConfigRestReturnValue_2_0>;
13641
14174
  }
13642
14175
  declare const ResourcesAPIGroup_2_0: (instance: Base) => ResourcesAPIGroup_2_0;
13643
14176
  /**
@@ -15443,6 +15976,7 @@ export declare type TActionType = typeof actionTypes[number];
15443
15976
  * description: Additional resource types for audit purposes
15444
15977
  * example: node
15445
15978
  * enum:
15979
+ * - agentassistconfig
15446
15980
  * - apiKey
15447
15981
  * - analytics
15448
15982
  * - connectionField
@@ -15472,7 +16006,7 @@ export declare type TActionType = typeof actionTypes[number];
15472
16006
  * - user
15473
16007
  * - yesNoIntent
15474
16008
  */
15475
- export declare type TResourceTypeAdditional = "apiKey" | "analytics" | "connectionField" | "conversation" | "examplesentence" | "flowState" | "functionInstance" | "intent" | "keyphrase" | "learningsentence" | "lexiconEntry" | "lexiconKeyphrase" | "lexiconSlot" | "mergePackage" | "node" | "playbookStep" | "playbookStepAssert" | "profile" | "profileSchema" | "project" | "projectsettings" | "snippet" | "synonym" | "slotFiller" | "tag" | "task" | "trainerRecord" | "yesNoIntent" | "user";
16009
+ export declare type TResourceTypeAdditional = "agentassistconfig" | "apiKey" | "analytics" | "connectionField" | "conversation" | "examplesentence" | "flowState" | "functionInstance" | "intent" | "keyphrase" | "learningsentence" | "lexiconEntry" | "lexiconKeyphrase" | "lexiconSlot" | "mergePackage" | "node" | "playbookStep" | "playbookStepAssert" | "profile" | "profileSchema" | "project" | "projectsettings" | "snippet" | "synonym" | "slotFiller" | "tag" | "task" | "trainerRecord" | "yesNoIntent" | "user";
15476
16010
  /**
15477
16011
  * @openapi
15478
16012
  * components:
@@ -16272,14 +16806,14 @@ export interface IResetIdentityProviderRestData_2_0 {
16272
16806
  }
16273
16807
  export interface IResetIdentityProviderRestReturnValue {
16274
16808
  }
16275
- export interface ISetupCognigyLiveAgentRestReturnValue_2_0 {
16809
+ export interface ISetupCognigyLiveAgentRestReturnValue_2_0 extends ICognigyLiveAgentMiddleware_2_0 {
16276
16810
  liveAgentAccount: Number;
16277
16811
  }
16278
16812
  export interface ISetupCognigyLiveAgentInboxRestDataParams_2_0 extends IProjectScope {
16279
16813
  }
16280
16814
  export interface ISetupCognigyLiveAgentInboxRestData_2_0 extends ISetupCognigyLiveAgentInboxRestDataParams_2_0 {
16281
16815
  }
16282
- export interface ISetupCognigyLiveAgentInboxRestReturnValue_2_0 {
16816
+ export interface ISetupCognigyLiveAgentInboxRestReturnValue_2_0 extends ICognigyLiveAgentMiddleware_2_0 {
16283
16817
  liveAgentDefaultInbox: Number;
16284
16818
  }
16285
16819
  export interface IUpdateCognigyLiveAgentInboxRestDataParams_2_0 extends IProjectScope {
@@ -16289,19 +16823,22 @@ export interface IUpdateCognigyLiveAgentInboxRestDataBody_2_0 {
16289
16823
  }
16290
16824
  export interface IUpdateCognigyLiveAgentInboxRestData_2_0 extends IUpdateCognigyLiveAgentInboxRestDataParams_2_0, IUpdateCognigyLiveAgentInboxRestDataBody_2_0 {
16291
16825
  }
16292
- export interface IUpdateCognigyLiveAgentInboxRestReturnValue_2_0 {
16826
+ export interface IUpdateCognigyLiveAgentInboxRestReturnValue_2_0 extends ICognigyLiveAgentMiddleware_2_0 {
16293
16827
  liveAgentDefaultInbox: Number;
16294
16828
  }
16295
16829
  export interface IReadProjectInboxRestDataParams_2_0 extends IProjectScope {
16296
16830
  }
16297
16831
  export interface IReadProjectInboxRestData_2_0 extends IReadProjectInboxRestDataParams_2_0 {
16298
16832
  }
16299
- export interface IReadProjectInboxRestReturnValue_2_0 {
16833
+ export interface IReadProjectInboxRestReturnValue_2_0 extends ICognigyLiveAgentMiddleware_2_0 {
16300
16834
  liveAgentDefaultInbox: Number;
16301
16835
  }
16302
- export interface IReadLiveAgentAccountRestReturnValue_2_0 {
16836
+ export interface IReadLiveAgentAccountRestReturnValue_2_0 extends ICognigyLiveAgentMiddleware_2_0 {
16303
16837
  liveAgentAccount: Number;
16304
16838
  }
16839
+ export interface ICognigyLiveAgentMiddleware_2_0 {
16840
+ error?: string;
16841
+ }
16305
16842
  declare enum EOrganisationDeletionStatus {
16306
16843
  TOKEN_REQUESTED = "TOKEN_REQUESTED",
16307
16844
  IN_PROGRESS = "IN_PROGRESS",