@cognigy/rest-api-client 2025.22.0 → 2025.24.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 (39) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/build/apigroups/SimulationAPIGroup_2_0.js +2 -1
  3. package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderOauth2Connection.js +3 -1
  4. package/build/shared/charts/descriptors/index.js +2 -0
  5. package/build/shared/charts/descriptors/nlu/matchPattern.js +1 -0
  6. package/build/shared/charts/descriptors/service/agentTools/knowledgeTool.js +340 -0
  7. package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +3 -2
  8. package/build/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +63 -30
  9. package/build/shared/charts/descriptors/service/handoverConnections.js +9 -1
  10. package/build/shared/charts/descriptors/service/index.js +4 -1
  11. package/build/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +3 -2
  12. package/build/shared/interfaces/IProfile.js +6 -1
  13. package/build/shared/interfaces/resources/INodeDescriptorSet.js +11 -1
  14. package/build/shared/interfaces/resources/TRestChannelType.js +2 -2
  15. package/build/shared/interfaces/resources/settings/IAgentSettings.js +12 -7
  16. package/build/shared/interfaces/resources/settings/IPiiDataRedactionSettings.js +142 -0
  17. package/build/shared/interfaces/resources/settings/index.js +4 -1
  18. package/build/shared/interfaces/restAPI/resources/project/v2.0/settings/IAgentSettings_2_0.js +104 -0
  19. package/build/shared/interfaces/restAPI/simulation/persona/IGeneratePersonaFromTranscriptRest_2_0.js +20 -0
  20. package/dist/esm/apigroups/SimulationAPIGroup_2_0.js +2 -1
  21. package/dist/esm/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderOauth2Connection.js +3 -1
  22. package/dist/esm/shared/charts/descriptors/index.js +3 -1
  23. package/dist/esm/shared/charts/descriptors/nlu/matchPattern.js +1 -0
  24. package/dist/esm/shared/charts/descriptors/service/agentTools/knowledgeTool.js +338 -0
  25. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +3 -2
  26. package/dist/esm/shared/charts/descriptors/service/aiAgent/helpers/createToolDefinitions.js +61 -29
  27. package/dist/esm/shared/charts/descriptors/service/handoverConnections.js +8 -0
  28. package/dist/esm/shared/charts/descriptors/service/index.js +2 -1
  29. package/dist/esm/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +3 -2
  30. package/dist/esm/shared/interfaces/IProfile.js +5 -0
  31. package/dist/esm/shared/interfaces/resources/INodeDescriptorSet.js +11 -1
  32. package/dist/esm/shared/interfaces/resources/TRestChannelType.js +2 -2
  33. package/dist/esm/shared/interfaces/resources/settings/IAgentSettings.js +16 -11
  34. package/dist/esm/shared/interfaces/resources/settings/IPiiDataRedactionSettings.js +139 -0
  35. package/dist/esm/shared/interfaces/resources/settings/index.js +5 -4
  36. package/dist/esm/shared/interfaces/restAPI/resources/project/v2.0/settings/IAgentSettings_2_0.js +103 -1
  37. package/dist/esm/shared/interfaces/restAPI/simulation/persona/IGeneratePersonaFromTranscriptRest_2_0.js +19 -0
  38. package/package.json +1 -1
  39. package/types/index.d.ts +245 -18
@@ -0,0 +1,139 @@
1
+ export var EPiiBehaviorType;
2
+ (function (EPiiBehaviorType) {
3
+ EPiiBehaviorType["PREDEFINED_ALIAS"] = "predefined-alias";
4
+ EPiiBehaviorType["CUSTOM_ALIAS"] = "custom-alias";
5
+ })(EPiiBehaviorType || (EPiiBehaviorType = {}));
6
+ export const piiFieldSettingsSchema = {
7
+ title: "piiFieldSettingsSchema",
8
+ type: "object",
9
+ additionalProperties: false,
10
+ required: ["enabled", "name"],
11
+ properties: {
12
+ enabled: { type: "boolean" },
13
+ behavior: {
14
+ oneOf: [
15
+ {
16
+ type: "object",
17
+ additionalProperties: false,
18
+ required: ["type"],
19
+ properties: {
20
+ type: {
21
+ type: "string",
22
+ enum: [EPiiBehaviorType.PREDEFINED_ALIAS],
23
+ },
24
+ customAlias: { type: "null" },
25
+ },
26
+ },
27
+ {
28
+ type: "object",
29
+ additionalProperties: false,
30
+ // @ts-ignore
31
+ required: ["type", "customAlias"],
32
+ properties: {
33
+ type: {
34
+ type: "string",
35
+ enum: [EPiiBehaviorType.CUSTOM_ALIAS],
36
+ },
37
+ customAlias: {
38
+ type: "string",
39
+ minLength: 3,
40
+ maxLength: 100
41
+ },
42
+ },
43
+ },
44
+ ],
45
+ },
46
+ scope: {
47
+ type: ["object", "null"],
48
+ additionalProperties: false,
49
+ required: ["logs", "analytics"],
50
+ properties: {
51
+ logs: { type: "boolean" },
52
+ analytics: { type: "boolean" },
53
+ },
54
+ },
55
+ name: { type: "string", minLength: 3, maxLength: 100, pattern: "^[a-zA-Z0-9_\\s]+$" },
56
+ },
57
+ if: {
58
+ properties: {
59
+ enabled: { const: true }
60
+ }
61
+ },
62
+ then: {
63
+ required: ["enabled", "name", "behavior", "scope"]
64
+ },
65
+ else: {
66
+ required: ["enabled", "name"]
67
+ }
68
+ };
69
+ export const customPatternSettingsSchema = {
70
+ title: "customPatternSettingsSchema",
71
+ type: "object",
72
+ additionalProperties: false,
73
+ required: ["name", "regex", "behavior", "scope"],
74
+ properties: {
75
+ regex: {
76
+ type: "string",
77
+ minLength: 1,
78
+ maxLength: 1000
79
+ },
80
+ behavior: {
81
+ type: "object",
82
+ additionalProperties: false,
83
+ // @ts-ignore
84
+ required: ["type", "customAlias"],
85
+ properties: {
86
+ type: {
87
+ type: "string",
88
+ enum: [EPiiBehaviorType.CUSTOM_ALIAS],
89
+ },
90
+ customAlias: {
91
+ type: "string",
92
+ minLength: 3,
93
+ maxLength: 100
94
+ },
95
+ },
96
+ },
97
+ scope: {
98
+ type: ["object", "null"],
99
+ additionalProperties: false,
100
+ required: ["logs", "analytics"],
101
+ properties: {
102
+ logs: { type: "boolean" },
103
+ analytics: { type: "boolean" },
104
+ },
105
+ },
106
+ name: {
107
+ type: "string",
108
+ minLength: 3,
109
+ maxLength: 100,
110
+ pattern: "^[a-zA-Z0-9_\\s]+$"
111
+ },
112
+ },
113
+ };
114
+ export const piiDataRedactionSettingsSchema = {
115
+ title: "piiDataRedactionSettingsSchema",
116
+ type: "object",
117
+ additionalProperties: false,
118
+ required: [
119
+ "emailAddress",
120
+ "phoneNumber",
121
+ "creditCard",
122
+ "ssn",
123
+ "ipAddressV4",
124
+ "ipAddressV6",
125
+ ],
126
+ properties: {
127
+ emailAddress: piiFieldSettingsSchema,
128
+ phoneNumber: piiFieldSettingsSchema,
129
+ creditCard: piiFieldSettingsSchema,
130
+ ssn: piiFieldSettingsSchema,
131
+ ipAddressV4: piiFieldSettingsSchema,
132
+ ipAddressV6: piiFieldSettingsSchema,
133
+ customTypes: {
134
+ type: ["object", "null"],
135
+ additionalProperties: customPatternSettingsSchema
136
+ },
137
+ },
138
+ };
139
+ //# sourceMappingURL=IPiiDataRedactionSettings.js.map
@@ -1,8 +1,9 @@
1
1
  export { agentSettingsDataSchema, agentSettingsSchema, } from "./IAgentSettings";
2
- export { flowIntentMappingOrderType, flowSettingsDataSchema, flowSettingsSchema } from "./IFlowSettings";
2
+ export { flowIntentMappingOrderType, flowSettingsDataSchema, flowSettingsSchema, } from "./IFlowSettings";
3
3
  export { sharedSettingsSchema } from "./ISharedSettings";
4
- export { generativeAISettingsDataSchema } from "./IGenerativeAISettings";
5
- export { audioPreviewSettingsDataSchema, audioPreviewProviders } from "./IAudioPreviewSettings";
6
- export { translationSettingsDataSchema, translationProviders } from "./ITranslationSettings";
4
+ export { generativeAISettingsDataSchema, } from "./IGenerativeAISettings";
5
+ export { audioPreviewSettingsDataSchema, audioPreviewProviders, } from "./IAudioPreviewSettings";
6
+ export { translationSettingsDataSchema, translationProviders, } from "./ITranslationSettings";
7
7
  export { knowledgeAISettingsDataSchema, fileExtractorOptions, } from "./IKnowledgeAISettings";
8
+ export { EPiiBehaviorType, piiDataRedactionSettingsSchema, } from "./IPiiDataRedactionSettings";
8
9
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,104 @@
1
- export {};
1
+ /**
2
+ * @openapi
3
+ *
4
+ * components:
5
+ * schemas:
6
+ * EPiiBehaviorType:
7
+ * type: string
8
+ * description: PII redaction behavior types
9
+ * enum:
10
+ * - predefined-alias
11
+ * - custom-alias
12
+ *
13
+ * IRedactionBehavior:
14
+ * oneOf:
15
+ * - type: object
16
+ * properties:
17
+ * type:
18
+ * type: string
19
+ * enum: [predefined-alias]
20
+ * customAlias:
21
+ * type: string
22
+ * nullable: true
23
+ * required: [type, customAlias]
24
+ * - type: object
25
+ * properties:
26
+ * type:
27
+ * type: string
28
+ * enum: [custom-alias]
29
+ * customAlias:
30
+ * type: string
31
+ * description: Custom alias to replace PII data with
32
+ * required: [type, customAlias]
33
+ *
34
+ * IRedactionScope:
35
+ * type: object
36
+ * properties:
37
+ * logs:
38
+ * type: boolean
39
+ * description: Whether to redact PII in logs
40
+ * analytics:
41
+ * type: boolean
42
+ * description: Whether to redact PII in analytics
43
+ * required: [logs, analytics]
44
+ *
45
+ * IPiiFieldSettings:
46
+ * type: object
47
+ * properties:
48
+ * enabled:
49
+ * type: boolean
50
+ * description: Whether PII redaction is enabled for this field type
51
+ * behavior:
52
+ * $ref: '#/components/schemas/IRedactionBehavior'
53
+ * scope:
54
+ * $ref: '#/components/schemas/IRedactionScope'
55
+ * name:
56
+ * type: string
57
+ * description: Display name for the PII field type
58
+ * required: [enabled, behavior, scope, name]
59
+ *
60
+ * ICustomPatternSettings:
61
+ * type: object
62
+ * properties:
63
+ * behavior:
64
+ * $ref: '#/components/schemas/IRedactionBehavior'
65
+ * scope:
66
+ * $ref: '#/components/schemas/IRedactionScope'
67
+ * name:
68
+ * type: string
69
+ * description: Display name for the custom PII field type
70
+ * regex:
71
+ * type: string
72
+ * description: Regular expression pattern to match custom PII data (RE2 syntax)
73
+ * minLength: 1
74
+ * maxLength: 2000
75
+ * required: [behavior, scope, name, regex]
76
+ *
77
+ * IPiiDataRedactionSettings_2_0:
78
+ * type: object
79
+ * properties:
80
+ * emailAddress:
81
+ * $ref: '#/components/schemas/IPiiFieldSettings'
82
+ * phoneNumber:
83
+ * $ref: '#/components/schemas/IPiiFieldSettings'
84
+ * creditCard:
85
+ * $ref: '#/components/schemas/IPiiFieldSettings'
86
+ * ssn:
87
+ * $ref: '#/components/schemas/IPiiFieldSettings'
88
+ * ipAddressV4:
89
+ * $ref: '#/components/schemas/IPiiFieldSettings'
90
+ * ipAddressV6:
91
+ * $ref: '#/components/schemas/IPiiFieldSettings'
92
+ * customTypes:
93
+ * type: object
94
+ * additionalProperties:
95
+ * $ref: '#/components/schemas/ICustomPatternSettings'
96
+ * description: User-defined custom PII patterns with regex matching
97
+ * required: [emailAddress, phoneNumber, creditCard, ssn, ipAddressV4, ipAddressV6]
98
+ */
99
+ export var EPiiBehaviorType;
100
+ (function (EPiiBehaviorType) {
101
+ EPiiBehaviorType["PREDEFINED_ALIAS"] = "predefined-alias";
102
+ EPiiBehaviorType["CUSTOM_ALIAS"] = "custom-alias";
103
+ })(EPiiBehaviorType || (EPiiBehaviorType = {}));
2
104
  //# sourceMappingURL=IAgentSettings_2_0.js.map
@@ -0,0 +1,19 @@
1
+ /**
2
+ * POST /testing/beta/personas/from-transcript
3
+ *
4
+ * Create a scenario draft by analyzing a conversation transcript. The system uses LLM to extract user intent,
5
+ * conversation goals, and user characteristics from the transcript, then generates an appropriate persona package.
6
+ *
7
+ * The endpoint supports:
8
+ * - Fetching transcript via sessionId from analytics service (RPC call)
9
+ * - Direct transcript content via transcriptContent
10
+ * - Optional flow context for enhanced persona generation
11
+ * - Content safety validation (warnings only, non-blocking)
12
+ *
13
+ * Priority: If both sessionId and transcriptContent are provided, sessionId takes precedence.
14
+ *
15
+ * operationId: createScenarioFromTranscript
16
+ * tags: Personas
17
+ */
18
+ export {};
19
+ //# sourceMappingURL=IGeneratePersonaFromTranscriptRest_2_0.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognigy/rest-api-client",
3
- "version": "2025.22.0",
3
+ "version": "2025.24.0",
4
4
  "description": "Cognigy REST-Client",
5
5
  "main": "build/index.js",
6
6
  "module": "dist/esm/index.js",