@cognigy/rest-api-client 2025.18.0 → 2025.18.1

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 (34) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/authentication/AuthenticationAPI.js +1 -1
  3. package/build/authentication/OAuth2/OAuth2Authentication.js +10 -9
  4. package/build/connector/AxiosAdapter.js +2 -1
  5. package/build/shared/charts/descriptors/service/GPTPrompt.js +2 -2
  6. package/build/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +2 -2
  7. package/build/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +2 -2
  8. package/build/shared/generativeAI/utils/generativeAIPrompts.js +17 -446
  9. package/build/shared/generativeAI/utils/prompts/flowGeneration.js +168 -0
  10. package/build/shared/generativeAI/utils/prompts/generateNodeOutput.js +39 -0
  11. package/build/shared/generativeAI/utils/prompts/intentSentenceGeneration.js +15 -0
  12. package/build/shared/generativeAI/utils/prompts/lexiconGeneration.js +22 -0
  13. package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +4 -0
  14. package/build/shared/interfaces/messageAPI/endpoints.js +3 -2
  15. package/build/shared/interfaces/resources/INodeDescriptorSet.js +87 -77
  16. package/build/test.js +39 -0
  17. package/dist/esm/authentication/AuthenticationAPI.js +1 -1
  18. package/dist/esm/authentication/OAuth2/OAuth2Authentication.js +10 -9
  19. package/dist/esm/connector/AxiosAdapter.js +2 -1
  20. package/dist/esm/shared/charts/descriptors/service/GPTPrompt.js +1 -1
  21. package/dist/esm/shared/charts/descriptors/service/aiAgent/aiAgentJob.js +1 -1
  22. package/dist/esm/shared/charts/descriptors/service/llmPrompt/LLMPromptV2.js +1 -1
  23. package/dist/esm/shared/generativeAI/utils/generativeAIPrompts.js +16 -445
  24. package/dist/esm/shared/generativeAI/utils/prompts/flowGeneration.js +165 -0
  25. package/dist/esm/shared/generativeAI/utils/prompts/generateNodeOutput.js +36 -0
  26. package/dist/esm/shared/generativeAI/utils/prompts/intentSentenceGeneration.js +12 -0
  27. package/dist/esm/shared/generativeAI/utils/prompts/lexiconGeneration.js +19 -0
  28. package/dist/esm/shared/interfaces/generativeAI/IGenerativeAIModels.js +4 -0
  29. package/dist/esm/shared/interfaces/messageAPI/endpoints.js +3 -2
  30. package/dist/esm/shared/interfaces/resources/INodeDescriptorSet.js +88 -78
  31. package/dist/esm/shared/interfaces/restAPI/management/authentication/ICreateJWTToken.js +1 -0
  32. package/dist/esm/test.js +39 -0
  33. package/package.json +1 -1
  34. package/types/index.d.ts +20 -2
@@ -0,0 +1,165 @@
1
+ const flowGenerationWithTranscriptPromptString = `Create a new bot called "@@name" based on the following transcript example between the bot and a user:
2
+
3
+ # Transcript:
4
+
5
+ @@text
6
+
7
+ Write the bot in @@lng. Consider the following list of constraints:
8
+
9
+ # Instructions:
10
+
11
+ ## Do only use flow nodes of the following list. Do not use other nodes.
12
+
13
+ ## The configurable parameters are listed in brackets:
14
+ - say "Say stuff and output something using {{Node.js Code}}"
15
+ - question (output: "context.variable", validation: "text|yesNo|number|email|url", options: "Option 1|Option 2|Option 3") "Ask question with {{Node.js Code}} support?"
16
+ - backendCall (output: "context.variable") "Call external API"
17
+ - code "Node.js Code"
18
+ - switch "Node.js Code"
19
+ - case
20
+ - default
21
+ - if "Node.js Code"
22
+ - then
23
+ - else
24
+
25
+ # Examples:
26
+
27
+ ## Example flow in English:
28
+
29
+ - question (output: "context.email", validation: "email") "What is your email address?"
30
+ - question (output: "context.url", validation: "url") "And what is the URL?"
31
+ - code "function areDomainsSame(email, url) { let emailSplit = email.split('@'); let urlSplit = url.split('.'); if (emailSplit[1] === urlSplit[1]) { return true; } return false;} context.areDomainsSame = areDomainsSame(context.email, context.url);"
32
+ - if "context.areDomainsSame === true"
33
+ - then
34
+ - say "The domains are the same."
35
+ - else
36
+ - say "The domains are not the same."
37
+
38
+ ## Example flow in German:
39
+
40
+ - say "Hallo, ich bin ein Faktenprüfer. Ich entlarve Mythen durch Fakten."
41
+ - question (output: "context.color", validation: "text", options: "rot|grün|blau") "Welche Farbe hat der Himmel?"
42
+ - switch "context.color"
43
+ - case "blau"
44
+ - say "Du hast recht, das ist eine Tatsache."
45
+ - case "rot"
46
+ - say "Ja tatsächlich, manchmal ist der Himmel sogar rot."
47
+ - default
48
+ - say "Nein, der Himmel ist tagsüber normalerweise blau."
49
+
50
+ ## Example flow in Spanish:
51
+
52
+ - say "Hola, puedo conectarlo con nuestro equipo de soporte."
53
+ - question (output: "context.wantsSupport", validation: "yesNo") "¿Te gustaría contactar el soporte?"
54
+ - if "context.wantsSupport === true"
55
+ - then
56
+ - backendCall (output: "context.contactDetails") "call API to retrieve contact details of support"
57
+ - say "Aquí tienes. Por favor vea los detalles de contacto de nuestro soporte: {{context.contactDetails}}"
58
+ - else
59
+ - backendCall (output: "context.success") "call API to log decision"
60
+
61
+ # Additional information:
62
+
63
+ ## Say nodes and question nodes execute Node.js in double curly braces, for example:
64
+
65
+ - say "This is a {{context.variable.toLowerCase()}}"
66
+ - question (output: "context.result", validation: "text") "Do you like {{"banana".toUpperCase()}}?"
67
+
68
+ ## When using the option parameter then use human-readable text and more than one option.
69
+ ## Only use a switch node when considering multiple options.
70
+ ## When using a switch node then always use a default node as last resort.
71
+ ## Do not use a backendCall if a Code Node can solve it.
72
+ ## Dot not use "for" nodes to simulate a for-loop.
73
+ ## Use a smallest amount of flow nodes possible.
74
+
75
+ ## Return just a list of nodes following the required format and instructions, and nothing else.`;
76
+ export const flowGenerationWithTranscriptPrompt = [
77
+ {
78
+ role: "system",
79
+ content: flowGenerationWithTranscriptPromptString,
80
+ },
81
+ {
82
+ role: "user",
83
+ content: "Let's start."
84
+ }
85
+ ];
86
+ const flowGenerationWithDescriptionPromptString = `Create a new bot called "@@name" with the following description:
87
+ "@@text" Write the bot in @@lng. Consider the following list of constraints:
88
+
89
+ # Instructions:
90
+
91
+ ## Do only use flow nodes of the following list. Do not use other nodes.
92
+
93
+ ## The configurable parameters are listed in brackets:
94
+ - say "Say stuff and output something using {{Node.js Code}}"
95
+ - question (output: "context.variable", validation: "text|yesNo|number|email|url", options: "Option 1|Option 2|Option 3") "Ask question with {{Node.js Code}} support?"
96
+ - backendCall (output: "context.variable") "Call external API"
97
+ - code "Node.js Code"
98
+ - switch "Node.js Code"
99
+ - case
100
+ - default
101
+ - if "Node.js Code"
102
+ - then
103
+ - else
104
+
105
+ # Examples:
106
+
107
+ ## Example flow in English:
108
+
109
+ - question (output: "context.email", validation: "email") "What is your email address?"
110
+ - question (output: "context.url", validation: "url") "And what is the URL?"
111
+ - code "function areDomainsSame(email, url) { let emailSplit = email.split('@'); let urlSplit = url.split('.'); if (emailSplit[1] === urlSplit[1]) { return true; } return false;} context.areDomainsSame = areDomainsSame(context.email, context.url);"
112
+ - if "context.areDomainsSame === true"
113
+ - then
114
+ - say "The domains are the same."
115
+ - else
116
+ - say "The domains are not the same."
117
+
118
+ ## Example flow in German:
119
+
120
+ - say "Hallo, ich bin ein Faktenprüfer. Ich entlarve Mythen durch Fakten."
121
+ - question (output: "context.color", validation: "text", options: "rot|grün|blau") "Welche Farbe hat der Himmel?"
122
+ - switch "context.color"
123
+ - case "blau"
124
+ - say "Du hast recht, das ist eine Tatsache."
125
+ - case "rot"
126
+ - say "Ja tatsächlich, manchmal ist der Himmel sogar rot."
127
+ - default
128
+ - say "Nein, der Himmel ist tagsüber normalerweise blau."
129
+
130
+ ## Example flow in Spanish:
131
+
132
+ - say "Hola, puedo conectarlo con nuestro equipo de soporte."
133
+ - question (output: "context.wantsSupport", validation: "yesNo") "¿Te gustaría contactar el soporte?"
134
+ - if "context.wantsSupport === true"
135
+ - then
136
+ - backendCall (output: "context.contactDetails") "call API to retrieve contact details of support"
137
+ - say "Aquí tienes. Por favor vea los detalles de contacto de nuestro soporte: {{context.contactDetails}}"
138
+ - else
139
+ - backendCall (output: "context.success") "call API to log decision"
140
+
141
+ # Additional information:
142
+
143
+ ## Say nodes and question nodes execute Node.js in double curly braces, for example:
144
+ - say "This is a {{context.variable.toLowerCase()}}"
145
+ - question (output: "context.result", validation: "text") "Do you like {{"banana".toUpperCase()}}?"
146
+
147
+ ## When using the option parameter then use human-readable text and more than one option.
148
+ ## Only use a switch node when considering multiple options.
149
+ ## When using a switch node then always use a default node as last resort.
150
+ ## Do not use a backendCall if a Code Node can solve it.
151
+ ## Dot not use "for" nodes to simulate a for-loop.
152
+ ## Use a smallest amount of flow nodes possible.
153
+
154
+ ## Return just a list of nodes following the required format and instructions, and nothing else.`;
155
+ export const flowGenerationWithDescriptionPrompt = [
156
+ {
157
+ role: "system",
158
+ content: flowGenerationWithDescriptionPromptString,
159
+ },
160
+ {
161
+ role: "user",
162
+ content: "Let's start."
163
+ }
164
+ ];
165
+ //# sourceMappingURL=flowGeneration.js.map
@@ -0,0 +1,36 @@
1
+ const generateNodeOutputTextPromptString = 'Create @@noOfSentencesToGenerate unique sentences based on the description: "@@description" in @@language and return them as a pipe-separated string.';
2
+ export const generateNodeOutputTextPrompt = [
3
+ {
4
+ role: "system",
5
+ content: generateNodeOutputTextPromptString,
6
+ },
7
+ {
8
+ role: "user",
9
+ content: "Let's start."
10
+ }
11
+ ];
12
+ const generateNodeOutputCreateAdaptiveCardPromptString = 'Create an adaptiveCard based on the description: "@@description" in @@language. Return nothing but the Adaptive Card JSON object. Your Adaptive Card should accurately reflect the requirements described in the description, while still adhering to the Adaptive Card JSON specification.';
13
+ export const generateNodeOutputCreateAdaptiveCardPrompt = [
14
+ {
15
+ role: "system",
16
+ content: generateNodeOutputCreateAdaptiveCardPromptString,
17
+ },
18
+ {
19
+ role: "user",
20
+ content: "Let's start."
21
+ }
22
+ ];
23
+ const generateNodeOutputModifyAdaptiveCardPromptString = 'Please modify the @@lastOutput Adaptive Card JSON based on the provided instruction "@@description". Return nothing but the Adaptive Card JSON object. The language of the Adaptive Card text should be @@language. Your modified Adaptive Card should accurately reflect the changes described in the description, while still adhering to the Adaptive Card JSON specification.';
24
+ export const generateNodeOutputModifyAdaptiveCardPrompt = [
25
+ {
26
+ role: "system",
27
+ content: generateNodeOutputModifyAdaptiveCardPromptString,
28
+ },
29
+ // The user role is a workaround for Anthropic models which require a user message as per our implementation in llm-providers.
30
+ // However, the user role confuses gpt-3.5-turbo, which needs a more descriptive user message to generate the adaptive card.
31
+ {
32
+ role: "user",
33
+ content: "Let's start generating the adaptive card."
34
+ }
35
+ ];
36
+ //# sourceMappingURL=generateNodeOutput.js.map
@@ -0,0 +1,12 @@
1
+ const intentSentenceGenerationPromptString = `For NLU model intent '@@name'<description> with the description '@@description'</description>. Create @@noOfSentencesToGenerate varied sentences other than the given examples<language> in @@language</language>. Return nothing but a JSON array of strings.\n<default-reply>Also, consider framing the sentences like a user question that a human would answer: @@defaultReply.\n</default-reply><example-sentences>Examples: @@exampleSentences \n</example-sentences>`;
2
+ export const intentSentenceGenerationPrompt = [
3
+ {
4
+ role: "system",
5
+ content: intentSentenceGenerationPromptString,
6
+ },
7
+ {
8
+ role: "user",
9
+ content: "Let's start."
10
+ }
11
+ ];
12
+ //# sourceMappingURL=intentSentenceGeneration.js.map
@@ -0,0 +1,19 @@
1
+ const lexiconGenerationPromptString = 'For the NLU model lexicon with the title "@@name" and the description "@@description",' +
2
+ ' generate @@lexiconEntries varied words in "@@lng".@@synonymInstructions' +
3
+ '\n\nRespond with a valid JSON with the format following the example: `@@example`';
4
+ export const lexiconGenerationPrompt = [
5
+ {
6
+ role: "system",
7
+ content: lexiconGenerationPromptString,
8
+ },
9
+ // The user role is a workaround for Anthropic models which require a user message as per our implementation in llm-providers.
10
+ // However, the user role confuses gpt-4.1, which needs a more descriptive user message to generate the lexicon entries.
11
+ {
12
+ role: "user",
13
+ content: "Let's start generating the lexicon entries."
14
+ }
15
+ ];
16
+ export const LEXICON_GENERATION_PROMPT_SYNONYM_INSTRUCTIONS = " For each word, also list all known synonyms. The number of synonyms for each word does not have to be the same.";
17
+ export const LEXICON_GENERATION_RESPONSE_EXAMPLE = '[{"word": "test","synonyms": ["trial","attempt"]},{"word": "demo","synonyms": ["proof of concept"]}]';
18
+ export const LEXICON_GENERATION_RESPONSE_EXAMPLE_NO_SYNONYMS = '[{"word": "test"},{"word": "demo"}]';
19
+ //# sourceMappingURL=lexiconGeneration.js.map
@@ -19,6 +19,10 @@ export const generativeAIModels = [
19
19
  "gpt-4.1",
20
20
  "gpt-4.1-mini",
21
21
  "gpt-4.1-nano",
22
+ "gpt-5",
23
+ "gpt-5-nano",
24
+ "gpt-5-mini",
25
+ "gpt-5-chat-latest",
22
26
  "luminous-extended-control",
23
27
  "claude-v1-100k",
24
28
  "claude-instant-v1",
@@ -125,7 +125,7 @@ const callEvents = [
125
125
  const callFailoverSettingsSchema = {
126
126
  title: "callEventSettingsSchema",
127
127
  type: "object",
128
- additionalProperties: false,
128
+ additionalProperties: true,
129
129
  properties: {
130
130
  enabled: { type: "boolean" },
131
131
  enabledForSpeech: { type: "boolean" },
@@ -157,7 +157,7 @@ const callFailoverSettingsSchema = {
157
157
  export const callEventSettingsSchema = {
158
158
  title: "callEventSettingsSchema",
159
159
  type: "object",
160
- additionalProperties: false,
160
+ additionalProperties: true,
161
161
  properties: {
162
162
  enabled: { type: "boolean" },
163
163
  action: { type: "string", enum: ["executeFlow", "inject", "transfer", "none"] },
@@ -712,6 +712,7 @@ export const zoomContactCenterEndpointSettingsSchema = {
712
712
  export const anyEndpointSettingsSchema = {
713
713
  title: "anyEndpointSettingsSchema",
714
714
  type: "object",
715
+ additionalProperties: true,
715
716
  properties: Object.assign({ action: { type: "string" }, accessScope: { type: "string" }, accessToken: { type: "string" }, appId: { type: "string" }, appSecret: { type: "string" }, backgroundImageUrl: { type: "string" }, basicAuthPassword: { type: "string" }, basicAuthUser: { type: "string" }, botUserId: { type: "string" }, colorScheme: { type: "string" }, connectionName: { type: "string" }, cpaasToken: { type: "string" }, customJSON: { type: "string" }, designTemplate: { type: "integer" }, disableHtmlContentSanitization: { type: "boolean" }, disableInputAutocomplete: { type: "boolean" }, disableUrlButtonSanitization: { type: "boolean" }, disableInputSanitization: { type: "boolean" }, disableSkipUriTags: { type: "boolean" }, enableAsyncCommunication: { type: "boolean" }, enableCollectMetadata: { type: "boolean" }, enableGenericHTMLStyling: { type: "boolean" }, enableDemoWebchat: { type: "boolean" }, enableFileUpload: { type: "boolean" }, enablePersistentMenu: { type: "boolean" }, enableRating: { type: "string", enum: ["always", "once", "onRequest"] }, enableSTT: { type: "boolean" }, enableTTS: { type: "boolean" }, enableTypingIndicator: { type: "boolean" }, enableFileAttachment: { type: "boolean" }, fileAttachmentMaxSize: { type: "number" }, facebookPageToken: { type: "string" }, finishOnKey: {
716
717
  type: "string",
717
718
  enum: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "#"]
@@ -1,4 +1,4 @@
1
- import { chartableResourceTypes, } from "./TResourceType";
1
+ import { chartableResourceTypes } from "./TResourceType";
2
2
  import { snippetDataSchema } from "./ISnippet";
3
3
  const nodeAppearanceSchema = {
4
4
  title: "nodeAppearanceSchema",
@@ -9,8 +9,8 @@ const nodeAppearanceSchema = {
9
9
  textColor: { type: "string", format: "color" },
10
10
  contrastTextColor: { type: "string", format: "color" },
11
11
  showIcon: { type: "boolean" },
12
- variant: { type: "string", enum: ["regular", "mini", "hexagon"] },
13
- },
12
+ variant: { type: "string", enum: ["regular", "mini", "hexagon"] }
13
+ }
14
14
  };
15
15
  const nodeBehaviorSchema = {
16
16
  title: "nodeBehaviorSchema",
@@ -18,8 +18,8 @@ const nodeBehaviorSchema = {
18
18
  additionalProperties: false,
19
19
  properties: {
20
20
  stopping: { type: "boolean" },
21
- entrypoint: { type: "boolean" },
22
- },
21
+ entrypoint: { type: "boolean" }
22
+ }
23
23
  };
24
24
  export const nodePreviewTypes = [
25
25
  "text",
@@ -35,8 +35,8 @@ const nodePreviewSchema = {
35
35
  additionalProperties: false,
36
36
  properties: {
37
37
  key: { type: "string", minLength: 1, maxLength: 200 },
38
- type: { type: "string", enum: [...nodePreviewTypes] },
39
- },
38
+ type: { type: "string", enum: [...nodePreviewTypes] }
39
+ }
40
40
  };
41
41
  const nodeConstraintSchema = {
42
42
  title: "nodeConstraintSchema",
@@ -45,13 +45,13 @@ const nodeConstraintSchema = {
45
45
  properties: {
46
46
  blacklist: {
47
47
  type: "array",
48
- items: { type: "string", minLength: 1, maxLength: 200 },
48
+ items: { type: "string", minLength: 1, maxLength: 200 }
49
49
  },
50
50
  whitelist: {
51
51
  type: "array",
52
- items: { type: "string", minLength: 1, maxLength: 200 },
53
- },
54
- },
52
+ items: { type: "string", minLength: 1, maxLength: 200 }
53
+ }
54
+ }
55
55
  };
56
56
  const nodeConstraintsSchema = {
57
57
  title: "nodeConstraintsSchema",
@@ -70,10 +70,10 @@ const nodeConstraintsSchema = {
70
70
  properties: {
71
71
  children: nodeConstraintSchema,
72
72
  predecessor: nodeConstraintSchema,
73
- successor: nodeConstraintSchema,
74
- },
75
- },
76
- },
73
+ successor: nodeConstraintSchema
74
+ }
75
+ }
76
+ }
77
77
  };
78
78
  const nodeDependenciesSchema = {
79
79
  title: "nodeDependenciesSchema",
@@ -82,9 +82,9 @@ const nodeDependenciesSchema = {
82
82
  properties: {
83
83
  children: {
84
84
  type: "array",
85
- items: { type: "string", minLength: 1, maxLength: 200 },
86
- },
87
- },
85
+ items: { type: "string", minLength: 1, maxLength: 200 }
86
+ }
87
+ }
88
88
  };
89
89
  export const nodeFieldTypes = [
90
90
  "adaptivecard",
@@ -154,7 +154,7 @@ export const searchableNodeFieldTypes = [
154
154
  "say",
155
155
  "code",
156
156
  "caseNode",
157
- "select",
157
+ "select"
158
158
  ];
159
159
  export const nodeFieldSingleConditionSchema = {
160
160
  title: "nodeFieldSingleConditionSchema",
@@ -171,11 +171,11 @@ export const nodeFieldSingleConditionSchema = {
171
171
  { type: "number" },
172
172
  { type: "array", items: { type: "number" } },
173
173
  { type: "boolean" },
174
- { type: "array", items: { type: "boolean" } },
175
- ],
174
+ { type: "array", items: { type: "boolean" } }
175
+ ]
176
176
  },
177
- negate: { type: "boolean" },
178
- },
177
+ negate: { type: "boolean" }
178
+ }
179
179
  };
180
180
  export const nodeFieldANDConditionSchema = {
181
181
  title: "nodeFieldANDConditionSchema",
@@ -183,8 +183,8 @@ export const nodeFieldANDConditionSchema = {
183
183
  additionalProperties: false,
184
184
  required: ["and"],
185
185
  properties: {
186
- and: { type: "array", items: { $ref: "nodeFieldConditionSchema" } },
187
- },
186
+ and: { type: "array", items: { $ref: "nodeFieldConditionSchema" } }
187
+ }
188
188
  };
189
189
  export const nodeFieldORConditionSchema = {
190
190
  title: "nodeFieldORConditionSchema",
@@ -192,8 +192,8 @@ export const nodeFieldORConditionSchema = {
192
192
  additionalProperties: false,
193
193
  required: ["or"],
194
194
  properties: {
195
- or: { type: "array", items: { $ref: "nodeFieldConditionSchema" } },
196
- },
195
+ or: { type: "array", items: { $ref: "nodeFieldConditionSchema" } }
196
+ }
197
197
  };
198
198
  // @ts-ignore
199
199
  export const nodeFieldConditionSchema = {
@@ -206,8 +206,8 @@ export const nodeFieldConditionSchema = {
206
206
  // @ts-ignore
207
207
  nodeFieldANDConditionSchema,
208
208
  // @ts-ignore
209
- nodeFieldORConditionSchema,
210
- ],
209
+ nodeFieldORConditionSchema
210
+ ]
211
211
  };
212
212
  export const nodeOptionsResolverSchema = {
213
213
  title: "nodeOptionsResolverSchema",
@@ -216,10 +216,10 @@ export const nodeOptionsResolverSchema = {
216
216
  properties: {
217
217
  dependencies: {
218
218
  type: "array",
219
- items: { type: "string", minLength: 1, maxLength: 200 },
219
+ items: { type: "string", minLength: 1, maxLength: 200 }
220
220
  },
221
- resolverFunction: {},
222
- },
221
+ resolverFunction: {}
222
+ }
223
223
  };
224
224
  export const nodeFieldSchema = {
225
225
  title: "nodeFieldSchema",
@@ -240,10 +240,10 @@ export const nodeFieldSchema = {
240
240
  deDE: { type: "string", maxLength: 200 },
241
241
  jaJP: { type: "string", maxLength: 200 },
242
242
  esES: { type: "string", maxLength: 200 },
243
- koKR: { type: "string", maxLength: 200 },
244
- },
245
- },
246
- ],
243
+ koKR: { type: "string", maxLength: 200 }
244
+ }
245
+ }
246
+ ]
247
247
  },
248
248
  condition: nodeFieldConditionSchema,
249
249
  defaultValue: {
@@ -253,8 +253,18 @@ export const nodeFieldSchema = {
253
253
  { type: "number" },
254
254
  { type: "null" },
255
255
  { type: "object" },
256
- { type: "string" },
257
- ],
256
+ { type: "string" }
257
+ ]
258
+ },
259
+ fallbackValue: {
260
+ oneOf: [
261
+ { type: "array" },
262
+ { type: "boolean" },
263
+ { type: "number" },
264
+ { type: "null" },
265
+ { type: "object" },
266
+ { type: "string" }
267
+ ]
258
268
  },
259
269
  description: {
260
270
  oneOf: [
@@ -268,10 +278,10 @@ export const nodeFieldSchema = {
268
278
  deDE: { type: "string", maxLength: 200 },
269
279
  jaJP: { type: "string", maxLength: 200 },
270
280
  esES: { type: "string", maxLength: 200 },
271
- koKR: { type: "string", maxLength: 200 },
272
- },
273
- },
274
- ],
281
+ koKR: { type: "string", maxLength: 200 }
282
+ }
283
+ }
284
+ ]
275
285
  },
276
286
  params: { type: "object" },
277
287
  optionsResolver: nodeOptionsResolverSchema,
@@ -282,11 +292,11 @@ export const nodeFieldSchema = {
282
292
  lookupValue: { type: "string" },
283
293
  fieldsToReset: {
284
294
  type: "array",
285
- items: { type: "string" },
286
- },
287
- },
288
- },
289
- },
295
+ items: { type: "string" }
296
+ }
297
+ }
298
+ }
299
+ }
290
300
  };
291
301
  export const nodeSectionSchema = {
292
302
  title: "nodeSectionSchema",
@@ -306,10 +316,10 @@ export const nodeSectionSchema = {
306
316
  deDE: { type: "string", maxLength: 200 },
307
317
  jaJP: { type: "string", maxLength: 200 },
308
318
  esES: { type: "string", maxLength: 200 },
309
- koKR: { type: "string", maxLength: 200 },
310
- },
311
- },
312
- ],
319
+ koKR: { type: "string", maxLength: 200 }
320
+ }
321
+ }
322
+ ]
313
323
  },
314
324
  description: {
315
325
  oneOf: [
@@ -323,10 +333,10 @@ export const nodeSectionSchema = {
323
333
  deDE: { type: "string", maxLength: 200 },
324
334
  jaJP: { type: "string", maxLength: 200 },
325
335
  esES: { type: "string", maxLength: 200 },
326
- koKR: { type: "string", maxLength: 200 },
327
- },
328
- },
329
- ],
336
+ koKR: { type: "string", maxLength: 200 }
337
+ }
338
+ }
339
+ ]
330
340
  },
331
341
  condition: nodeFieldConditionSchema,
332
342
  defaultCollapsed: { type: "boolean" },
@@ -338,10 +348,10 @@ export const nodeSectionSchema = {
338
348
  items: {
339
349
  type: "string",
340
350
  minLength: 1,
341
- maxLength: 200,
342
- },
343
- },
344
- },
351
+ maxLength: 200
352
+ }
353
+ }
354
+ }
345
355
  };
346
356
  export const nodeFieldAndSectionFormElementSchema = {
347
357
  title: "nodeFieldAndSectionFormElementSchema",
@@ -349,8 +359,8 @@ export const nodeFieldAndSectionFormElementSchema = {
349
359
  required: ["key", "type"],
350
360
  properties: {
351
361
  key: { type: "string", minLength: 1, maxLength: 200 },
352
- type: { type: "string", enum: ["field", "section"] },
353
- },
362
+ type: { type: "string", enum: ["field", "section"] }
363
+ }
354
364
  };
355
365
  export const nodeDescriptorSchema = {
356
366
  title: "nodeDescriptorSchema",
@@ -372,10 +382,10 @@ export const nodeDescriptorSchema = {
372
382
  deDE: { type: "string", maxLength: 200 },
373
383
  jaJP: { type: "string", maxLength: 200 },
374
384
  esES: { type: "string", maxLength: 200 },
375
- koKR: { type: "string", maxLength: 200 },
376
- },
377
- },
378
- ],
385
+ koKR: { type: "string", maxLength: 200 }
386
+ }
387
+ }
388
+ ]
379
389
  },
380
390
  summary: {
381
391
  oneOf: [
@@ -389,10 +399,10 @@ export const nodeDescriptorSchema = {
389
399
  deDE: { type: "string", maxLength: 200 },
390
400
  jaJP: { type: "string", maxLength: 200 },
391
401
  esES: { type: "string", maxLength: 200 },
392
- koKR: { type: "string", maxLength: 200 },
393
- },
394
- },
395
- ],
402
+ koKR: { type: "string", maxLength: 200 }
403
+ }
404
+ }
405
+ ]
396
406
  },
397
407
  appearance: nodeAppearanceSchema,
398
408
  behavior: nodeBehaviorSchema,
@@ -405,25 +415,25 @@ export const nodeDescriptorSchema = {
405
415
  type: "array",
406
416
  items: { type: "string" },
407
417
  uniqueItems: true,
408
- minItems: 0,
418
+ minItems: 0
409
419
  },
410
420
  tokens: {
411
421
  type: "array",
412
422
  items: snippetDataSchema,
413
- uniqueItems: true,
423
+ uniqueItems: true
414
424
  },
415
425
  sections: {
416
426
  type: "array",
417
427
  additionalItems: false,
418
- items: nodeSectionSchema,
428
+ items: nodeSectionSchema
419
429
  },
420
430
  form: {
421
431
  type: "array",
422
432
  additionalItems: false,
423
433
  maxLength: 25,
424
- items: nodeFieldAndSectionFormElementSchema,
425
- },
426
- },
434
+ items: nodeFieldAndSectionFormElementSchema
435
+ }
436
+ }
427
437
  };
428
438
  export const nodeDescriptorSetSchema = {
429
439
  title: "nodeDescriptorSetSchema",
@@ -439,10 +449,10 @@ export const nodeDescriptorSetSchema = {
439
449
  descriptors: {
440
450
  type: "array",
441
451
  additionalItems: false,
442
- items: nodeDescriptorSchema,
452
+ items: nodeDescriptorSchema
443
453
  },
444
454
  resourceType: { type: "string", enum: chartableResourceTypes },
445
- trustedCode: { type: "boolean" },
446
- },
455
+ trustedCode: { type: "boolean" }
456
+ }
447
457
  };
448
458
  //# sourceMappingURL=INodeDescriptorSet.js.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=ICreateJWTToken.js.map
@@ -0,0 +1,39 @@
1
+ /* import { RestAPIClient, TRestAPIClient } from "./RestAPIClient";
2
+ import * as fs from "fs";
3
+ const FormData = require("form-data");
4
+
5
+ const OAUTH_CLIENT_ID = "cognigy-ui";
6
+ const OAUTH_CLIENT_SECRET =
7
+ "KR7yxR3rAhZ9sEn923dZ5KeNs9SVuwBjHxXKpmqtvSNXw5xWz35Y5YRtTBt96Jaa";
8
+ const baseUrl = "https://api.test";
9
+
10
+ const instance = new RestAPIClient({
11
+ numberOfRetries: 2,
12
+ baseUrl,
13
+ versions: {
14
+ administration: "2.0",
15
+ external: "2.0",
16
+ metrics: "2.0",
17
+ resources: "2.0",
18
+ sessions: "2.0"
19
+ },
20
+ timeout: 10000
21
+ });
22
+
23
+ (async () => {
24
+
25
+ const base64SnapshotString = fs.readFileSync('./src/IDE/fixtures/snapshots/overrideSnapshotConnections_project.csnap')
26
+ const form = new FormData();
27
+
28
+ form.append("projectId", projectId);
29
+ form.append("file", base64SnapshotString, "snapshot.csnap");
30
+
31
+ const slot = await instance.uploadExtension({
32
+ projectId: "your-project-id"
33
+ fs.readFileSync('./src/IDE/fixtures/snapshots/overrideSnapshotConnections_project.csnap'),
34
+ user: "your-user-id",
35
+ });
36
+ console.log(slot);
37
+ })();
38
+ */
39
+ //# sourceMappingURL=test.js.map