File tree Expand file tree Collapse file tree 4 files changed +37
-52
lines changed
src/platform/plugins/shared/workflows_management/common/stack_connectors_schema Expand file tree Collapse file tree 4 files changed +37
-52
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,8 @@ import { z } from '@kbn/zod';
1616
1717// Bedrock connector parameter schema
1818export const BedrockParamsSchema = z . object ( {
19- subAction : z . enum ( [ 'run' , 'test' ] ) ,
20- subActionParams : z . object ( {
21- body : z . string ( ) ,
22- model : z . string ( ) . optional ( ) ,
23- } ) ,
19+ body : z . string ( ) ,
20+ model : z . string ( ) . optional ( ) ,
2421} ) ;
2522
2623// Bedrock connector response schema
Original file line number Diff line number Diff line change @@ -16,11 +16,8 @@ import { z } from '@kbn/zod';
1616
1717// Gemini connector parameter schema
1818export const GeminiParamsSchema = z . object ( {
19- subAction : z . enum ( [ 'run' , 'test' , 'dashboard' ] ) ,
20- subActionParams : z . object ( {
21- body : z . string ( ) ,
22- model : z . string ( ) . optional ( ) ,
23- } ) ,
19+ body : z . string ( ) ,
20+ model : z . string ( ) . optional ( ) ,
2421} ) ;
2522
2623// Gemini connector response schema
Original file line number Diff line number Diff line change @@ -16,15 +16,12 @@ import { z } from '@kbn/zod';
1616
1717// OpenAI connector parameter schema
1818export const OpenAIParamsSchema = z . object ( {
19- subAction : z . enum ( [ 'run' , 'test' , 'dashboard' ] ) ,
20- subActionParams : z . object ( {
21- body : z . string ( ) ,
22- model : z . string ( ) . optional ( ) ,
23- n : z . number ( ) . optional ( ) ,
24- stop : z . array ( z . string ( ) ) . optional ( ) ,
25- temperature : z . number ( ) . optional ( ) ,
26- max_tokens : z . number ( ) . optional ( ) ,
27- } ) ,
19+ body : z . string ( ) ,
20+ model : z . string ( ) . optional ( ) ,
21+ n : z . number ( ) . optional ( ) ,
22+ stop : z . array ( z . string ( ) ) . optional ( ) ,
23+ temperature : z . number ( ) . optional ( ) ,
24+ max_tokens : z . number ( ) . optional ( ) ,
2825} ) ;
2926
3027// OpenAI connector response schema
Original file line number Diff line number Diff line change @@ -16,44 +16,38 @@ import { z } from '@kbn/zod';
1616
1717// Swimlane connector parameter schemas for different sub-actions
1818export const SwimlaneCreateRecordParamsSchema = z . object ( {
19- subAction : z . literal ( 'pushToService' ) ,
20- subActionParams : z . object ( {
21- incident : z . object ( {
22- ruleName : z . string ( ) ,
23- alertId : z . string ( ) ,
24- severity : z . string ( ) . optional ( ) ,
25- description : z . string ( ) . optional ( ) ,
26- } ) ,
27- comments : z
28- . array (
29- z . object ( {
30- comment : z . string ( ) ,
31- commentId : z . string ( ) ,
32- } )
33- )
34- . optional ( ) ,
19+ incident : z . object ( {
20+ ruleName : z . string ( ) ,
21+ alertId : z . string ( ) ,
22+ severity : z . string ( ) . optional ( ) ,
23+ description : z . string ( ) . optional ( ) ,
3524 } ) ,
25+ comments : z
26+ . array (
27+ z . object ( {
28+ comment : z . string ( ) ,
29+ commentId : z . string ( ) ,
30+ } )
31+ )
32+ . optional ( ) ,
3633} ) ;
3734
3835export const SwimlaneUpdateRecordParamsSchema = z . object ( {
39- subAction : z . literal ( 'pushToService' ) ,
40- subActionParams : z . object ( {
41- incident : z . object ( {
42- ruleName : z . string ( ) ,
43- alertId : z . string ( ) ,
44- severity : z . string ( ) . optional ( ) ,
45- description : z . string ( ) . optional ( ) ,
46- } ) ,
47- incidentId : z . string ( ) ,
48- comments : z
49- . array (
50- z . object ( {
51- comment : z . string ( ) ,
52- commentId : z . string ( ) ,
53- } )
54- )
55- . optional ( ) ,
36+ incident : z . object ( {
37+ ruleName : z . string ( ) ,
38+ alertId : z . string ( ) ,
39+ severity : z . string ( ) . optional ( ) ,
40+ description : z . string ( ) . optional ( ) ,
5641 } ) ,
42+ incidentId : z . string ( ) ,
43+ comments : z
44+ . array (
45+ z . object ( {
46+ comment : z . string ( ) ,
47+ commentId : z . string ( ) ,
48+ } )
49+ )
50+ . optional ( ) ,
5751} ) ;
5852
5953// Swimlane connector response schema
You can’t perform that action at this time.
0 commit comments