@cognigy/rest-api-client 2025.12.0 → 2025.13.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 (55) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/build/apigroups/ResourcesAPIGroup_2_0.js +4 -0
  3. package/build/shared/charts/descriptors/analytics/trackGoal.js +3 -1
  4. package/build/shared/charts/descriptors/index.js +5 -0
  5. package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +4 -2
  6. package/build/shared/charts/descriptors/message/question/question.js +12 -1
  7. package/build/shared/charts/descriptors/service/GPTPrompt.js +15 -1
  8. package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +32 -173
  9. package/build/shared/charts/descriptors/service/aiAgent/aiAgentJobTool.js +2 -2
  10. package/build/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +175 -0
  11. package/build/shared/charts/descriptors/service/aiAgent/loadAiAgent.js +194 -0
  12. package/build/shared/charts/descriptors/service/handoverV2.js +1 -1
  13. package/build/shared/charts/descriptors/service/index.js +11 -1
  14. package/build/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +922 -0
  15. package/build/shared/charts/descriptors/service/llmPrompt/llmPromptDefault.js +31 -0
  16. package/build/shared/charts/descriptors/service/llmPrompt/llmPromptMCPTool.js +196 -0
  17. package/build/shared/charts/descriptors/service/llmPrompt/llmPromptTool.js +139 -0
  18. package/build/shared/constants.js +1 -5
  19. package/build/shared/interfaces/debugEvents/IGoalCompletedEventPayload.js +3 -0
  20. package/build/shared/interfaces/debugEvents/TDebugEventType.js +1 -0
  21. package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +12 -1
  22. package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeChunk.js +2 -1
  23. package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +5 -18
  24. package/build/shared/interfaces/restAPI/operations/generateOutput/v2.0/index.js +3 -0
  25. package/build/shared/interfaces/security/IPermission.js +2 -0
  26. package/build/shared/interfaces/security/IRole.js +3 -1
  27. package/build/shared/interfaces/security/index.js +1 -1
  28. package/dist/esm/apigroups/ResourcesAPIGroup_2_0.js +4 -0
  29. package/dist/esm/shared/charts/descriptors/analytics/trackGoal.js +3 -1
  30. package/dist/esm/shared/charts/descriptors/index.js +6 -1
  31. package/dist/esm/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +4 -2
  32. package/dist/esm/shared/charts/descriptors/message/question/question.js +12 -1
  33. package/dist/esm/shared/charts/descriptors/service/GPTPrompt.js +15 -1
  34. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +33 -174
  35. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJobTool.js +2 -2
  36. package/dist/esm/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +172 -0
  37. package/dist/esm/shared/charts/descriptors/service/aiAgent/loadAiAgent.js +192 -0
  38. package/dist/esm/shared/charts/descriptors/service/handoverV2.js +1 -1
  39. package/dist/esm/shared/charts/descriptors/service/index.js +5 -0
  40. package/dist/esm/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +909 -0
  41. package/dist/esm/shared/charts/descriptors/service/llmPrompt/llmPromptDefault.js +28 -0
  42. package/dist/esm/shared/charts/descriptors/service/llmPrompt/llmPromptMCPTool.js +193 -0
  43. package/dist/esm/shared/charts/descriptors/service/llmPrompt/llmPromptTool.js +136 -0
  44. package/dist/esm/shared/constants.js +1 -5
  45. package/dist/esm/shared/interfaces/debugEvents/IGoalCompletedEventPayload.js +2 -0
  46. package/dist/esm/shared/interfaces/debugEvents/TDebugEventType.js +1 -0
  47. package/dist/esm/shared/interfaces/generativeAI/IGenerativeAIModels.js +12 -1
  48. package/dist/esm/shared/interfaces/resources/knowledgeStore/IKnowledgeChunk.js +2 -1
  49. package/dist/esm/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -17
  50. package/dist/esm/shared/interfaces/restAPI/operations/generateOutput/v2.0/index.js +2 -0
  51. package/dist/esm/shared/interfaces/security/IPermission.js +2 -0
  52. package/dist/esm/shared/interfaces/security/IRole.js +3 -1
  53. package/dist/esm/shared/interfaces/security/index.js +1 -1
  54. package/package.json +1 -1
  55. package/types/index.d.ts +83 -42
package/types/index.d.ts CHANGED
@@ -464,7 +464,8 @@ declare const projectWidePermissions: readonly [
464
464
  "tasks",
465
465
  "tokens",
466
466
  "yesNoIntents",
467
- "dataPrivacySettings"
467
+ "dataPrivacySettings",
468
+ "simulator"
468
469
  ];
469
470
  export declare type TProjectWidePermissions = typeof projectWidePermissions[number];
470
471
  export declare type TMongoId = string;
@@ -1053,7 +1054,8 @@ declare const projectWideRoles: readonly [
1053
1054
  "tokenEditor",
1054
1055
  "data_privacy_admin",
1055
1056
  "data_privacy_editor",
1056
- "data_privacy_viewer"
1057
+ "data_privacy_viewer",
1058
+ "simulator_admin"
1057
1059
  ];
1058
1060
  export declare type TProjectWideRole = typeof projectWideRoles[number];
1059
1061
  /**
@@ -1253,6 +1255,8 @@ export interface IOrganisationWideAcl {
1253
1255
  * $ref: '#/components/schemas/ICrudPermissions'
1254
1256
  * users:
1255
1257
  * $ref: '#/components/schemas/ICrudPermissions'
1258
+ * simulator:
1259
+ * $ref: '#/components/schemas/ICrudPermissions'
1256
1260
  * additionalProperties:
1257
1261
  * $ref: '#/components/schemas/ICrudPermissions'
1258
1262
  * roles:
@@ -4348,6 +4352,9 @@ declare const generativeAIModels: readonly [
4348
4352
  "gpt-4",
4349
4353
  "gpt-4o",
4350
4354
  "gpt-4o-mini",
4355
+ "gpt-4.1",
4356
+ "gpt-4.1-mini",
4357
+ "gpt-4.1-nano",
4351
4358
  "luminous-extended-control",
4352
4359
  "claude-v1-100k",
4353
4360
  "claude-instant-v1",
@@ -4355,6 +4362,11 @@ declare const generativeAIModels: readonly [
4355
4362
  "claude-3-haiku-20240307",
4356
4363
  "claude-3-sonnet-20240229",
4357
4364
  "claude-3-5-sonnet-20241022",
4365
+ "claude-3-7-sonnet-20250219",
4366
+ "claude-3-5-sonnet-latest",
4367
+ "claude-3-7-sonnet-latest",
4368
+ "claude-opus-4-0",
4369
+ "claude-sonnet-4-0",
4358
4370
  "text-bison@001",
4359
4371
  "custom-model",
4360
4372
  "gemini-1.0-pro",
@@ -4366,11 +4378,14 @@ declare const generativeAIModels: readonly [
4366
4378
  "amazon.nova-pro-v1:0",
4367
4379
  "amazon.nova-micro-v1:0",
4368
4380
  "anthropic.claude-3-5-sonnet-20240620-v1:0",
4369
- "claude-3-7-sonnet-20250219",
4370
4381
  "mistral-large-2411",
4371
4382
  "mistral-small-2503",
4372
4383
  "pixtral-large-2411",
4373
4384
  "pixtral-12b-2409",
4385
+ "mistral-large-latest",
4386
+ "pixtral-large-latest",
4387
+ "mistral-medium-latest",
4388
+ "mistral-small-latest",
4374
4389
  "text-embedding-3-small",
4375
4390
  "text-embedding-3-large",
4376
4391
  "text-embedding-ada-002",
@@ -4462,6 +4477,13 @@ declare const modeType: readonly [
4462
4477
  "embedding"
4463
4478
  ];
4464
4479
  export declare type TModeType = typeof modeType[number];
4480
+ export declare type TBASIC_EXTENSION = "@cognigy/basic-nodes";
4481
+ export declare type TMONGO_DB_EXTENSION = "@cognigy/mongodb";
4482
+ export declare type TSQL_EXTENSION = "@cognigy/mssql";
4483
+ export declare type TSMTP_EXTENSION = "@cognigy/smtp";
4484
+ export declare type TVOICE_GATEWAY_EXTENSION = "@cognigy/voicegateway";
4485
+ export declare type TMICROSOFT_EXTENSION = "@cognigy/microsoft";
4486
+ export declare type TVOICE_GATEWAY_2_EXTENSION = "@cognigy/voicegateway2";
4465
4487
  export interface IGenerativeAIUseCaseSettings {
4466
4488
  largeLanguageModelId: string | null;
4467
4489
  temperature: number;
@@ -5307,6 +5329,7 @@ export interface IAudioPreviewSettings_2_0 {
5307
5329
  * - mistral
5308
5330
  */
5309
5331
  export declare type TGenerativeAIProviders_2_0 = TGenerativeAIProviders;
5332
+ export declare type TConfigurableGenerativeAIUseCases = Exclude<TGenerativeAIUseCases, "intentSentenceGeneration" | "flowGeneration" | "generateNodeOutput" | "lexiconGeneration">;
5310
5333
  /**
5311
5334
  * @openapi
5312
5335
  *
@@ -5322,27 +5345,19 @@ export declare type TGenerativeAIProviders_2_0 = TGenerativeAIProviders;
5322
5345
  * properties:
5323
5346
  * designTimeGeneration:
5324
5347
  * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
5325
- * intentSentenceGeneration:
5326
- * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
5327
5348
  * aiEnhancedOutputs:
5328
5349
  * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
5329
- * lexiconGeneration:
5330
- * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
5331
- * flowGeneration:
5332
- * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
5333
5350
  * gptConversation:
5334
5351
  * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
5335
5352
  * gptPromptNode:
5336
5353
  * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
5337
- * generateNodeOutput:
5338
- * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
5339
5354
  * knowledgeSearch:
5340
5355
  * $ref: '#/components/schemas/IGenerativeAIMeta_2_0'
5341
5356
  */
5342
5357
  export interface IGenerativeAISettings_2_0 {
5343
5358
  enabled: boolean;
5344
5359
  useCasesSettings: {
5345
- [key in TGenerativeAIUseCases]: IGenerativeAIUseCaseSettings;
5360
+ [key in TConfigurableGenerativeAIUseCases]: IGenerativeAIUseCaseSettings;
5346
5361
  };
5347
5362
  }
5348
5363
  /**
@@ -9030,7 +9045,8 @@ declare const arrayTDebugEventTypes: readonly [
9030
9045
  "switchedFlow",
9031
9046
  "nluWarning",
9032
9047
  "debugMessage",
9033
- "debugError"
9048
+ "debugError",
9049
+ "goalCompleted"
9034
9050
  ];
9035
9051
  export declare type TDebugEventType = typeof arrayTDebugEventTypes[number];
9036
9052
  export interface IInputChangedEventPayload {
@@ -9127,7 +9143,28 @@ export interface IDebugEventJsonMessagePayload extends IDebugEventMessagePayload
9127
9143
  message: object;
9128
9144
  }
9129
9145
  export declare type TDebugEventMessagePayload = IDebugEventTextMessagePayload | IDebugEventJsonMessagePayload;
9130
- export declare type TDebugEventPayload = IInputChangedEventPayload | IContextChangedEventPayload | IActiveEntrypointsChangedEventPayload | IProfileChangedEventPayload | INodeExecutedEventPayload | INodeErrorEventPayload | IFinalPingEventPayload | IOutputEventPayload | ISwitchedFlowEventPayload | INluWarningEventPayload | TDebugEventMessagePayload;
9146
+ export interface IGoalAnalyticsPayload {
9147
+ analyticsdata: IGoalEscalations;
9148
+ data: IPayloadBaseMetaData;
9149
+ }
9150
+ export interface IGoalAnalyticsData {
9151
+ projectId: string;
9152
+ organisationId: string;
9153
+ sessionId: string;
9154
+ referenceId: string;
9155
+ version: string;
9156
+ timestamp: Date;
9157
+ goalCycleId: string;
9158
+ stepId: string;
9159
+ goalId: string;
9160
+ contactId: string;
9161
+ stepType?: string;
9162
+ }
9163
+ export interface IGoalEscalations extends IGoalAnalyticsData, IAnalyticsEndpointMeta, IAnalyticsLocaleMeta, IAnalyticsSnapshotMeta {
9164
+ }
9165
+ export interface IGoalCompletedEventPayload extends IGoalAnalyticsPayload {
9166
+ }
9167
+ export declare type TDebugEventPayload = IInputChangedEventPayload | IContextChangedEventPayload | IActiveEntrypointsChangedEventPayload | IProfileChangedEventPayload | INodeExecutedEventPayload | INodeErrorEventPayload | IFinalPingEventPayload | IOutputEventPayload | ISwitchedFlowEventPayload | INluWarningEventPayload | TDebugEventMessagePayload | IGoalCompletedEventPayload;
9131
9168
  declare const audioPreviewProviders: readonly [
9132
9169
  "microsoft",
9133
9170
  "google",
@@ -9586,6 +9623,15 @@ export interface IGraphAiAgent {
9586
9623
  properties: Pick<IAiAgent, "createdAt" | "createdBy" | "lastChanged" | "lastChangedBy" | "knowledgeReferenceId">;
9587
9624
  dependencies?: IAiAgentDependencies[];
9588
9625
  }
9626
+ export interface ILoadAiAgentNodeParams extends INodeFunctionBaseParams {
9627
+ config: {
9628
+ aiAgent: IAiAgent;
9629
+ storeLocation: string;
9630
+ contextKey: string;
9631
+ inputKey: string;
9632
+ keyWarning: string;
9633
+ };
9634
+ }
9589
9635
  export interface ISendTileUpdateParams extends INodeFunctionBaseParams {
9590
9636
  tile: any;
9591
9637
  }
@@ -10477,23 +10523,6 @@ export interface IGenerativeSlotFillerParams extends INodeFunctionBaseParams {
10477
10523
  timeout: number;
10478
10524
  };
10479
10525
  }
10480
- export interface IGoalAnalyticsPayload {
10481
- analyticsdata: IGoalEscalations;
10482
- data: IPayloadBaseMetaData;
10483
- }
10484
- export interface IGoalAnalyticsData {
10485
- projectId: string;
10486
- organisationId: string;
10487
- sessionId: string;
10488
- version: string;
10489
- timestamp: Date;
10490
- goalCycleId: string;
10491
- stepId: string;
10492
- goalId: string;
10493
- contactId: string;
10494
- }
10495
- export interface IGoalEscalations extends IGoalAnalyticsData, IAnalyticsEndpointMeta, IAnalyticsLocaleMeta, IAnalyticsSnapshotMeta {
10496
- }
10497
10526
  export interface IEndpointSettings {
10498
10527
  isFeatureAccmEnabled?: boolean;
10499
10528
  }
@@ -10692,7 +10721,6 @@ export interface IActions {
10692
10721
  getAgentAssistConfigId: () => string;
10693
10722
  getNluEmbeddingCredentials: () => Promise<INluEmbeddingCredentials>;
10694
10723
  getMetadata: () => IGetMetaDataActionValue;
10695
- sendTrackGoal: (payload: IGoalAnalyticsPayload) => Promise<void>;
10696
10724
  getEndpointSettings: () => IEndpointSettings;
10697
10725
  getTranscript: (options: TReadTranscriptOptions) => Promise<TTranscriptEntry[]>;
10698
10726
  addTranscriptStep: (content: TTranscriptEntryContent) => Promise<void>;
@@ -11354,6 +11382,7 @@ export interface INodeExecutionAPI extends Omit<IActions, "parseCognigyScriptCon
11354
11382
  }) => Promise<{
11355
11383
  [x: string]: unknown;
11356
11384
  }>;
11385
+ sendTrackGoal: (payload: IGoalAnalyticsPayload) => Promise<void>;
11357
11386
  }
11358
11387
  export interface INodeExecutionCognigyObject extends IExecutionObjects {
11359
11388
  api: INodeExecutionAPI;
@@ -16006,13 +16035,6 @@ export interface IComposePackageDownloadLinkRestData_2_0 extends IComposePackage
16006
16035
  export interface IComposePackageDownloadLinkRestReturnValue_2_0 {
16007
16036
  downloadLink: string;
16008
16037
  }
16009
- export declare type TBASIC_EXTENSION = "@cognigy/basic-nodes";
16010
- export declare type TMONGO_DB_EXTENSION = "@cognigy/mongodb";
16011
- export declare type TSQL_EXTENSION = "@cognigy/mssql";
16012
- export declare type TSMTP_EXTENSION = "@cognigy/smtp";
16013
- export declare type TVOICE_GATEWAY_EXTENSION = "@cognigy/voicegateway";
16014
- export declare type TMICROSOFT_EXTENSION = "@cognigy/microsoft";
16015
- export declare type TVOICE_GATEWAY_2_EXTENSION = "@cognigy/voicegateway2";
16016
16038
  export interface ICreateChartNodeBasicNodesData<T extends string = string, D extends INodeFunctionBaseParams = any, E extends string = string> extends Partial<Omit<IChartNode<T, D, E>, TReferenceAndEntityMetaKeys | "type" | "extension">> {
16017
16039
  type: T;
16018
16040
  extension?: E;
@@ -16358,6 +16380,7 @@ export interface ITrackGoalNodeParams extends INodeFunctionBaseParams {
16358
16380
  goal: {
16359
16381
  goalId: string;
16360
16382
  name: string;
16383
+ referenceId: string;
16361
16384
  version: string;
16362
16385
  selectedSteps: {
16363
16386
  stepId: string;
@@ -16835,6 +16858,7 @@ export interface ICognigyBasicNodes {
16835
16858
  sendMetadata: ICreateChartNodeBasicNodesData<"sendMetadata", ISendMetadataParams, TBASIC_EXTENSION>;
16836
16859
  assistInfo: ICreateChartNodeBasicNodesData<"assistInfo", IAssistInfoNodeParams, TBASIC_EXTENSION>;
16837
16860
  searchExtractOutput: ICreateChartNodeBasicNodesData<"searchExtractOutput", ISearchExtractOutputNodeParams, TBASIC_EXTENSION>;
16861
+ extractAiAgent: ICreateChartNodeBasicNodesData<"extractAiAgent", ILoadAiAgentNodeParams, TBASIC_EXTENSION>;
16838
16862
  }
16839
16863
  export interface ICognigyNodes {
16840
16864
  "@cognigy/basic-nodes": ICognigyBasicNodes;
@@ -18443,6 +18467,22 @@ export interface IGenerateNluScoresRestData_2_0 extends IGenerateNluScoresRestDa
18443
18467
  }
18444
18468
  export interface IGenerateNluScoresRestReturnValue_2_0 {
18445
18469
  }
18470
+ export interface IGenerateDesignTimeLLMOutputRestDataBody_2_0 {
18471
+ useCase: string;
18472
+ params?: Record<string, string>;
18473
+ messages?: {
18474
+ role: "user" | "assistant";
18475
+ content: string;
18476
+ }[];
18477
+ }
18478
+ export interface IGenerateDesignTimeLLMOutputRestDataParams_2_0 {
18479
+ projectId: string;
18480
+ }
18481
+ export interface IGenerateDesignTimeLLMOutputRestData_2_0 extends IGenerateDesignTimeLLMOutputRestDataBody_2_0, IGenerateDesignTimeLLMOutputRestDataParams_2_0 {
18482
+ }
18483
+ export interface IGenerateDesignTimeLLMOutputRestReturnValue_2_0 {
18484
+ output: string;
18485
+ }
18446
18486
  /**
18447
18487
  * @openapi
18448
18488
  *
@@ -18914,6 +18954,7 @@ export interface ResourcesAPIGroup_2_0 {
18914
18954
  updateKnowledgeChunk: TRestAPIOperation<IUpdateKnowledgeChunkRestData_2_0, IUpdateKnowledgeChunkRestReturnValue_2_0>;
18915
18955
  uploadResumable: TTusAPIOperation<IUploadResumableRestData_2_0, IUploadResumableRestReturnValue_2_0>;
18916
18956
  generateNluScores: TRestAPIOperation<IGenerateNluScoresRestData_2_0, IGenerateNluScoresRestReturnValue_2_0>;
18957
+ generateDesignTimeLLMOutput: TRestAPIOperation<IGenerateDesignTimeLLMOutputRestData_2_0, IGenerateDesignTimeLLMOutputRestReturnValue_2_0>;
18917
18958
  }
18918
18959
  declare const ResourcesAPIGroup_2_0: (instance: Base) => ResourcesAPIGroup_2_0;
18919
18960
  /**
@@ -22770,7 +22811,7 @@ export interface ISimulationRest_2_0 extends IProjectMetadataRest_2_0 {
22770
22811
  }
22771
22812
  export interface IIndexSimulationsRestDataQuery_2_0 {
22772
22813
  projectId?: string;
22773
- filter?: number;
22814
+ filter?: string;
22774
22815
  limit?: number;
22775
22816
  skip?: number;
22776
22817
  sort?: string;
@@ -22904,7 +22945,7 @@ export interface IIndexSimulationRunBatchesRestReturnValue_2_0 {
22904
22945
  }
22905
22946
  export interface IGetAllSimulationRunBatchesRestDataQuery_2_0 {
22906
22947
  projectId: string;
22907
- filter?: number;
22948
+ filter?: string;
22908
22949
  limit?: number;
22909
22950
  skip?: number;
22910
22951
  sort?: string;
@@ -22975,7 +23016,7 @@ export interface ISimulationRunRest_2_0 {
22975
23016
  }
22976
23017
  export interface IIndexSimulationRunsRestDataQuery_2_0 {
22977
23018
  projectId: string;
22978
- filter?: number;
23019
+ filter?: string;
22979
23020
  limit?: number;
22980
23021
  skip?: number;
22981
23022
  sort?: string;