syllable-sdk 1.0.15-rc.3 → 1.0.16-rc.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.
- package/README.md +38 -38
- package/bin/mcp-server.js +203 -88
- package/bin/mcp-server.js.map +13 -12
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/eventtaskevents.d.ts +4 -5
- package/models/components/eventtaskevents.d.ts.map +1 -1
- package/models/components/eventtaskevents.js +0 -5
- package/models/components/eventtaskevents.js.map +1 -1
- package/models/components/expressiontask.d.ts +1 -1
- package/models/components/expressiontaskevents.d.ts +5 -5
- package/models/components/expressiontaskevents.d.ts.map +1 -1
- package/models/components/expressiontaskevents.js +0 -4
- package/models/components/expressiontaskevents.js.map +1 -1
- package/models/components/getvalueaction.d.ts +135 -0
- package/models/components/getvalueaction.d.ts.map +1 -0
- package/models/components/getvalueaction.js +208 -0
- package/models/components/getvalueaction.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/stepeventactions.d.ts +13 -12
- package/models/components/stepeventactions.d.ts.map +1 -1
- package/models/components/stepeventactions.js +9 -8
- package/models/components/stepeventactions.js.map +1 -1
- package/openapi.json +169 -67
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/eventtaskevents.ts +1 -16
- package/src/models/components/expressiontask.ts +1 -1
- package/src/models/components/expressiontaskevents.ts +3 -16
- package/src/models/components/getvalueaction.ts +435 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/stepeventactions.ts +30 -21
|
@@ -18,12 +18,6 @@ import {
|
|
|
18
18
|
IncrementAction$Outbound,
|
|
19
19
|
IncrementAction$outboundSchema,
|
|
20
20
|
} from "./incrementaction.js";
|
|
21
|
-
import {
|
|
22
|
-
SaveAction,
|
|
23
|
-
SaveAction$inboundSchema,
|
|
24
|
-
SaveAction$Outbound,
|
|
25
|
-
SaveAction$outboundSchema,
|
|
26
|
-
} from "./saveaction.js";
|
|
27
21
|
import {
|
|
28
22
|
SayAction,
|
|
29
23
|
SayAction$inboundSchema,
|
|
@@ -40,7 +34,6 @@ import {
|
|
|
40
34
|
export type EventTaskEventsStart =
|
|
41
35
|
| CallAction
|
|
42
36
|
| IncrementAction
|
|
43
|
-
| SaveAction
|
|
44
37
|
| SayAction
|
|
45
38
|
| SetValueAction;
|
|
46
39
|
|
|
@@ -49,9 +42,7 @@ export type EventTaskEvents = {
|
|
|
49
42
|
* Actions to execute on the first input from the user.
|
|
50
43
|
*/
|
|
51
44
|
start?:
|
|
52
|
-
| Array<
|
|
53
|
-
CallAction | IncrementAction | SaveAction | SayAction | SetValueAction
|
|
54
|
-
>
|
|
45
|
+
| Array<CallAction | IncrementAction | SayAction | SetValueAction>
|
|
55
46
|
| null
|
|
56
47
|
| undefined;
|
|
57
48
|
};
|
|
@@ -64,7 +55,6 @@ export const EventTaskEventsStart$inboundSchema: z.ZodType<
|
|
|
64
55
|
> = z.union([
|
|
65
56
|
CallAction$inboundSchema,
|
|
66
57
|
IncrementAction$inboundSchema,
|
|
67
|
-
SaveAction$inboundSchema,
|
|
68
58
|
SayAction$inboundSchema,
|
|
69
59
|
SetValueAction$inboundSchema,
|
|
70
60
|
]);
|
|
@@ -72,7 +62,6 @@ export const EventTaskEventsStart$inboundSchema: z.ZodType<
|
|
|
72
62
|
export type EventTaskEventsStart$Outbound =
|
|
73
63
|
| CallAction$Outbound
|
|
74
64
|
| IncrementAction$Outbound
|
|
75
|
-
| SaveAction$Outbound
|
|
76
65
|
| SayAction$Outbound
|
|
77
66
|
| SetValueAction$Outbound;
|
|
78
67
|
|
|
@@ -84,7 +73,6 @@ export const EventTaskEventsStart$outboundSchema: z.ZodType<
|
|
|
84
73
|
> = z.union([
|
|
85
74
|
CallAction$outboundSchema,
|
|
86
75
|
IncrementAction$outboundSchema,
|
|
87
|
-
SaveAction$outboundSchema,
|
|
88
76
|
SayAction$outboundSchema,
|
|
89
77
|
SetValueAction$outboundSchema,
|
|
90
78
|
]);
|
|
@@ -117,7 +105,6 @@ export const EventTaskEvents$inboundSchema: z.ZodType<
|
|
|
117
105
|
z.union([
|
|
118
106
|
CallAction$inboundSchema,
|
|
119
107
|
IncrementAction$inboundSchema,
|
|
120
|
-
SaveAction$inboundSchema,
|
|
121
108
|
SayAction$inboundSchema,
|
|
122
109
|
SetValueAction$inboundSchema,
|
|
123
110
|
]),
|
|
@@ -130,7 +117,6 @@ export type EventTaskEvents$Outbound = {
|
|
|
130
117
|
| Array<
|
|
131
118
|
| CallAction$Outbound
|
|
132
119
|
| IncrementAction$Outbound
|
|
133
|
-
| SaveAction$Outbound
|
|
134
120
|
| SayAction$Outbound
|
|
135
121
|
| SetValueAction$Outbound
|
|
136
122
|
>
|
|
@@ -149,7 +135,6 @@ export const EventTaskEvents$outboundSchema: z.ZodType<
|
|
|
149
135
|
z.union([
|
|
150
136
|
CallAction$outboundSchema,
|
|
151
137
|
IncrementAction$outboundSchema,
|
|
152
|
-
SaveAction$outboundSchema,
|
|
153
138
|
SayAction$outboundSchema,
|
|
154
139
|
SetValueAction$outboundSchema,
|
|
155
140
|
]),
|
|
@@ -89,7 +89,7 @@ export type ExpressionTask = {
|
|
|
89
89
|
| undefined;
|
|
90
90
|
output?: any | null | undefined;
|
|
91
91
|
/**
|
|
92
|
-
* Actions to perform when events occur (
|
|
92
|
+
* Actions to perform when events occur (start, submit).
|
|
93
93
|
*/
|
|
94
94
|
on?: ExpressionTaskEvents | undefined;
|
|
95
95
|
};
|
|
@@ -37,12 +37,7 @@ import {
|
|
|
37
37
|
SetValueAction$outboundSchema,
|
|
38
38
|
} from "./setvalueaction.js";
|
|
39
39
|
|
|
40
|
-
export type Start =
|
|
41
|
-
| CallAction
|
|
42
|
-
| IncrementAction
|
|
43
|
-
| SaveAction
|
|
44
|
-
| SayAction
|
|
45
|
-
| SetValueAction;
|
|
40
|
+
export type Start = CallAction | IncrementAction | SayAction | SetValueAction;
|
|
46
41
|
|
|
47
42
|
export type Submit =
|
|
48
43
|
| CallAction
|
|
@@ -52,16 +47,14 @@ export type Submit =
|
|
|
52
47
|
| SetValueAction;
|
|
53
48
|
|
|
54
49
|
/**
|
|
55
|
-
* Actions to perform when events occur (
|
|
50
|
+
* Actions to perform when events occur (start, submit).
|
|
56
51
|
*/
|
|
57
52
|
export type ExpressionTaskEvents = {
|
|
58
53
|
/**
|
|
59
54
|
* Actions to execute on the first input from the user.
|
|
60
55
|
*/
|
|
61
56
|
start?:
|
|
62
|
-
| Array<
|
|
63
|
-
CallAction | IncrementAction | SaveAction | SayAction | SetValueAction
|
|
64
|
-
>
|
|
57
|
+
| Array<CallAction | IncrementAction | SayAction | SetValueAction>
|
|
65
58
|
| null
|
|
66
59
|
| undefined;
|
|
67
60
|
/**
|
|
@@ -80,7 +73,6 @@ export const Start$inboundSchema: z.ZodType<Start, z.ZodTypeDef, unknown> = z
|
|
|
80
73
|
.union([
|
|
81
74
|
CallAction$inboundSchema,
|
|
82
75
|
IncrementAction$inboundSchema,
|
|
83
|
-
SaveAction$inboundSchema,
|
|
84
76
|
SayAction$inboundSchema,
|
|
85
77
|
SetValueAction$inboundSchema,
|
|
86
78
|
]);
|
|
@@ -88,7 +80,6 @@ export const Start$inboundSchema: z.ZodType<Start, z.ZodTypeDef, unknown> = z
|
|
|
88
80
|
export type Start$Outbound =
|
|
89
81
|
| CallAction$Outbound
|
|
90
82
|
| IncrementAction$Outbound
|
|
91
|
-
| SaveAction$Outbound
|
|
92
83
|
| SayAction$Outbound
|
|
93
84
|
| SetValueAction$Outbound;
|
|
94
85
|
|
|
@@ -100,7 +91,6 @@ export const Start$outboundSchema: z.ZodType<
|
|
|
100
91
|
> = z.union([
|
|
101
92
|
CallAction$outboundSchema,
|
|
102
93
|
IncrementAction$outboundSchema,
|
|
103
|
-
SaveAction$outboundSchema,
|
|
104
94
|
SayAction$outboundSchema,
|
|
105
95
|
SetValueAction$outboundSchema,
|
|
106
96
|
]);
|
|
@@ -172,7 +162,6 @@ export const ExpressionTaskEvents$inboundSchema: z.ZodType<
|
|
|
172
162
|
z.union([
|
|
173
163
|
CallAction$inboundSchema,
|
|
174
164
|
IncrementAction$inboundSchema,
|
|
175
|
-
SaveAction$inboundSchema,
|
|
176
165
|
SayAction$inboundSchema,
|
|
177
166
|
SetValueAction$inboundSchema,
|
|
178
167
|
]),
|
|
@@ -196,7 +185,6 @@ export type ExpressionTaskEvents$Outbound = {
|
|
|
196
185
|
| Array<
|
|
197
186
|
| CallAction$Outbound
|
|
198
187
|
| IncrementAction$Outbound
|
|
199
|
-
| SaveAction$Outbound
|
|
200
188
|
| SayAction$Outbound
|
|
201
189
|
| SetValueAction$Outbound
|
|
202
190
|
>
|
|
@@ -225,7 +213,6 @@ export const ExpressionTaskEvents$outboundSchema: z.ZodType<
|
|
|
225
213
|
z.union([
|
|
226
214
|
CallAction$outboundSchema,
|
|
227
215
|
IncrementAction$outboundSchema,
|
|
228
|
-
SaveAction$outboundSchema,
|
|
229
216
|
SayAction$outboundSchema,
|
|
230
217
|
SetValueAction$outboundSchema,
|
|
231
218
|
]),
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
CaseExpression,
|
|
12
|
+
CaseExpression$inboundSchema,
|
|
13
|
+
CaseExpression$Outbound,
|
|
14
|
+
CaseExpression$outboundSchema,
|
|
15
|
+
} from "./caseexpression.js";
|
|
16
|
+
import {
|
|
17
|
+
CelExpression,
|
|
18
|
+
CelExpression$inboundSchema,
|
|
19
|
+
CelExpression$Outbound,
|
|
20
|
+
CelExpression$outboundSchema,
|
|
21
|
+
} from "./celexpression.js";
|
|
22
|
+
import {
|
|
23
|
+
JMESPathExpression,
|
|
24
|
+
JMESPathExpression$inboundSchema,
|
|
25
|
+
JMESPathExpression$Outbound,
|
|
26
|
+
JMESPathExpression$outboundSchema,
|
|
27
|
+
} from "./jmespathexpression.js";
|
|
28
|
+
|
|
29
|
+
export type GetValueActionValueFrom1 =
|
|
30
|
+
| CelExpression
|
|
31
|
+
| (JMESPathExpression & { type: "jmespath" })
|
|
32
|
+
| (JMESPathExpression & { type: "jp" });
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Expression to compute initial value (mutually exclusive with value).
|
|
36
|
+
*/
|
|
37
|
+
export type GetValueActionValueFrom =
|
|
38
|
+
| CaseExpression
|
|
39
|
+
| CelExpression
|
|
40
|
+
| (JMESPathExpression & { type: "jmespath" })
|
|
41
|
+
| (JMESPathExpression & { type: "jp" })
|
|
42
|
+
| string;
|
|
43
|
+
|
|
44
|
+
export type GetValueActionIf1 =
|
|
45
|
+
| CelExpression
|
|
46
|
+
| (JMESPathExpression & { type: "jmespath" })
|
|
47
|
+
| (JMESPathExpression & { type: "jp" });
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* An expression that must evaluate to true for the action to be applied.
|
|
51
|
+
*/
|
|
52
|
+
export type GetValueActionIf =
|
|
53
|
+
| CaseExpression
|
|
54
|
+
| CelExpression
|
|
55
|
+
| (JMESPathExpression & { type: "jmespath" })
|
|
56
|
+
| (JMESPathExpression & { type: "jp" })
|
|
57
|
+
| string;
|
|
58
|
+
|
|
59
|
+
export type GetValueAction = {
|
|
60
|
+
/**
|
|
61
|
+
* Initial value of the variable.
|
|
62
|
+
*/
|
|
63
|
+
value?: any | null | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Expression to compute initial value (mutually exclusive with value).
|
|
66
|
+
*/
|
|
67
|
+
valueFrom?:
|
|
68
|
+
| CaseExpression
|
|
69
|
+
| CelExpression
|
|
70
|
+
| (JMESPathExpression & { type: "jmespath" })
|
|
71
|
+
| (JMESPathExpression & { type: "jp" })
|
|
72
|
+
| string
|
|
73
|
+
| null
|
|
74
|
+
| undefined;
|
|
75
|
+
/**
|
|
76
|
+
* An expression that must evaluate to true for the action to be applied.
|
|
77
|
+
*/
|
|
78
|
+
if?:
|
|
79
|
+
| CaseExpression
|
|
80
|
+
| CelExpression
|
|
81
|
+
| (JMESPathExpression & { type: "jmespath" })
|
|
82
|
+
| (JMESPathExpression & { type: "jp" })
|
|
83
|
+
| string
|
|
84
|
+
| null
|
|
85
|
+
| undefined;
|
|
86
|
+
action: "get";
|
|
87
|
+
/**
|
|
88
|
+
* Input field names to populate; None populates all step inputs.
|
|
89
|
+
*/
|
|
90
|
+
inputs?: Array<string> | null | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* If False (default), only populate empty inputs. If True, always overwrite.
|
|
93
|
+
*/
|
|
94
|
+
overwrite?: boolean | undefined;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const GetValueActionValueFrom1$inboundSchema: z.ZodType<
|
|
99
|
+
GetValueActionValueFrom1,
|
|
100
|
+
z.ZodTypeDef,
|
|
101
|
+
unknown
|
|
102
|
+
> = z.union([
|
|
103
|
+
CelExpression$inboundSchema,
|
|
104
|
+
JMESPathExpression$inboundSchema.and(
|
|
105
|
+
z.object({ type: z.literal("jmespath") }),
|
|
106
|
+
),
|
|
107
|
+
JMESPathExpression$inboundSchema.and(z.object({ type: z.literal("jp") })),
|
|
108
|
+
]);
|
|
109
|
+
/** @internal */
|
|
110
|
+
export type GetValueActionValueFrom1$Outbound =
|
|
111
|
+
| CelExpression$Outbound
|
|
112
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
113
|
+
| (JMESPathExpression$Outbound & { type: "jp" });
|
|
114
|
+
|
|
115
|
+
/** @internal */
|
|
116
|
+
export const GetValueActionValueFrom1$outboundSchema: z.ZodType<
|
|
117
|
+
GetValueActionValueFrom1$Outbound,
|
|
118
|
+
z.ZodTypeDef,
|
|
119
|
+
GetValueActionValueFrom1
|
|
120
|
+
> = z.union([
|
|
121
|
+
CelExpression$outboundSchema,
|
|
122
|
+
JMESPathExpression$outboundSchema.and(
|
|
123
|
+
z.object({ type: z.literal("jmespath") }),
|
|
124
|
+
),
|
|
125
|
+
JMESPathExpression$outboundSchema.and(z.object({ type: z.literal("jp") })),
|
|
126
|
+
]);
|
|
127
|
+
|
|
128
|
+
export function getValueActionValueFrom1ToJSON(
|
|
129
|
+
getValueActionValueFrom1: GetValueActionValueFrom1,
|
|
130
|
+
): string {
|
|
131
|
+
return JSON.stringify(
|
|
132
|
+
GetValueActionValueFrom1$outboundSchema.parse(getValueActionValueFrom1),
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
export function getValueActionValueFrom1FromJSON(
|
|
136
|
+
jsonString: string,
|
|
137
|
+
): SafeParseResult<GetValueActionValueFrom1, SDKValidationError> {
|
|
138
|
+
return safeParse(
|
|
139
|
+
jsonString,
|
|
140
|
+
(x) => GetValueActionValueFrom1$inboundSchema.parse(JSON.parse(x)),
|
|
141
|
+
`Failed to parse 'GetValueActionValueFrom1' from JSON`,
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const GetValueActionValueFrom$inboundSchema: z.ZodType<
|
|
147
|
+
GetValueActionValueFrom,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
unknown
|
|
150
|
+
> = z.union([
|
|
151
|
+
CaseExpression$inboundSchema,
|
|
152
|
+
z.union([
|
|
153
|
+
CelExpression$inboundSchema,
|
|
154
|
+
JMESPathExpression$inboundSchema.and(
|
|
155
|
+
z.object({ type: z.literal("jmespath") }),
|
|
156
|
+
),
|
|
157
|
+
JMESPathExpression$inboundSchema.and(z.object({ type: z.literal("jp") })),
|
|
158
|
+
]),
|
|
159
|
+
z.string(),
|
|
160
|
+
]);
|
|
161
|
+
/** @internal */
|
|
162
|
+
export type GetValueActionValueFrom$Outbound =
|
|
163
|
+
| CaseExpression$Outbound
|
|
164
|
+
| CelExpression$Outbound
|
|
165
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
166
|
+
| (JMESPathExpression$Outbound & { type: "jp" })
|
|
167
|
+
| string;
|
|
168
|
+
|
|
169
|
+
/** @internal */
|
|
170
|
+
export const GetValueActionValueFrom$outboundSchema: z.ZodType<
|
|
171
|
+
GetValueActionValueFrom$Outbound,
|
|
172
|
+
z.ZodTypeDef,
|
|
173
|
+
GetValueActionValueFrom
|
|
174
|
+
> = z.union([
|
|
175
|
+
CaseExpression$outboundSchema,
|
|
176
|
+
z.union([
|
|
177
|
+
CelExpression$outboundSchema,
|
|
178
|
+
JMESPathExpression$outboundSchema.and(
|
|
179
|
+
z.object({ type: z.literal("jmespath") }),
|
|
180
|
+
),
|
|
181
|
+
JMESPathExpression$outboundSchema.and(z.object({ type: z.literal("jp") })),
|
|
182
|
+
]),
|
|
183
|
+
z.string(),
|
|
184
|
+
]);
|
|
185
|
+
|
|
186
|
+
export function getValueActionValueFromToJSON(
|
|
187
|
+
getValueActionValueFrom: GetValueActionValueFrom,
|
|
188
|
+
): string {
|
|
189
|
+
return JSON.stringify(
|
|
190
|
+
GetValueActionValueFrom$outboundSchema.parse(getValueActionValueFrom),
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
export function getValueActionValueFromFromJSON(
|
|
194
|
+
jsonString: string,
|
|
195
|
+
): SafeParseResult<GetValueActionValueFrom, SDKValidationError> {
|
|
196
|
+
return safeParse(
|
|
197
|
+
jsonString,
|
|
198
|
+
(x) => GetValueActionValueFrom$inboundSchema.parse(JSON.parse(x)),
|
|
199
|
+
`Failed to parse 'GetValueActionValueFrom' from JSON`,
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** @internal */
|
|
204
|
+
export const GetValueActionIf1$inboundSchema: z.ZodType<
|
|
205
|
+
GetValueActionIf1,
|
|
206
|
+
z.ZodTypeDef,
|
|
207
|
+
unknown
|
|
208
|
+
> = z.union([
|
|
209
|
+
CelExpression$inboundSchema,
|
|
210
|
+
JMESPathExpression$inboundSchema.and(
|
|
211
|
+
z.object({ type: z.literal("jmespath") }),
|
|
212
|
+
),
|
|
213
|
+
JMESPathExpression$inboundSchema.and(z.object({ type: z.literal("jp") })),
|
|
214
|
+
]);
|
|
215
|
+
/** @internal */
|
|
216
|
+
export type GetValueActionIf1$Outbound =
|
|
217
|
+
| CelExpression$Outbound
|
|
218
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
219
|
+
| (JMESPathExpression$Outbound & { type: "jp" });
|
|
220
|
+
|
|
221
|
+
/** @internal */
|
|
222
|
+
export const GetValueActionIf1$outboundSchema: z.ZodType<
|
|
223
|
+
GetValueActionIf1$Outbound,
|
|
224
|
+
z.ZodTypeDef,
|
|
225
|
+
GetValueActionIf1
|
|
226
|
+
> = z.union([
|
|
227
|
+
CelExpression$outboundSchema,
|
|
228
|
+
JMESPathExpression$outboundSchema.and(
|
|
229
|
+
z.object({ type: z.literal("jmespath") }),
|
|
230
|
+
),
|
|
231
|
+
JMESPathExpression$outboundSchema.and(z.object({ type: z.literal("jp") })),
|
|
232
|
+
]);
|
|
233
|
+
|
|
234
|
+
export function getValueActionIf1ToJSON(
|
|
235
|
+
getValueActionIf1: GetValueActionIf1,
|
|
236
|
+
): string {
|
|
237
|
+
return JSON.stringify(
|
|
238
|
+
GetValueActionIf1$outboundSchema.parse(getValueActionIf1),
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
export function getValueActionIf1FromJSON(
|
|
242
|
+
jsonString: string,
|
|
243
|
+
): SafeParseResult<GetValueActionIf1, SDKValidationError> {
|
|
244
|
+
return safeParse(
|
|
245
|
+
jsonString,
|
|
246
|
+
(x) => GetValueActionIf1$inboundSchema.parse(JSON.parse(x)),
|
|
247
|
+
`Failed to parse 'GetValueActionIf1' from JSON`,
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/** @internal */
|
|
252
|
+
export const GetValueActionIf$inboundSchema: z.ZodType<
|
|
253
|
+
GetValueActionIf,
|
|
254
|
+
z.ZodTypeDef,
|
|
255
|
+
unknown
|
|
256
|
+
> = z.union([
|
|
257
|
+
CaseExpression$inboundSchema,
|
|
258
|
+
z.union([
|
|
259
|
+
CelExpression$inboundSchema,
|
|
260
|
+
JMESPathExpression$inboundSchema.and(
|
|
261
|
+
z.object({ type: z.literal("jmespath") }),
|
|
262
|
+
),
|
|
263
|
+
JMESPathExpression$inboundSchema.and(z.object({ type: z.literal("jp") })),
|
|
264
|
+
]),
|
|
265
|
+
z.string(),
|
|
266
|
+
]);
|
|
267
|
+
/** @internal */
|
|
268
|
+
export type GetValueActionIf$Outbound =
|
|
269
|
+
| CaseExpression$Outbound
|
|
270
|
+
| CelExpression$Outbound
|
|
271
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
272
|
+
| (JMESPathExpression$Outbound & { type: "jp" })
|
|
273
|
+
| string;
|
|
274
|
+
|
|
275
|
+
/** @internal */
|
|
276
|
+
export const GetValueActionIf$outboundSchema: z.ZodType<
|
|
277
|
+
GetValueActionIf$Outbound,
|
|
278
|
+
z.ZodTypeDef,
|
|
279
|
+
GetValueActionIf
|
|
280
|
+
> = z.union([
|
|
281
|
+
CaseExpression$outboundSchema,
|
|
282
|
+
z.union([
|
|
283
|
+
CelExpression$outboundSchema,
|
|
284
|
+
JMESPathExpression$outboundSchema.and(
|
|
285
|
+
z.object({ type: z.literal("jmespath") }),
|
|
286
|
+
),
|
|
287
|
+
JMESPathExpression$outboundSchema.and(z.object({ type: z.literal("jp") })),
|
|
288
|
+
]),
|
|
289
|
+
z.string(),
|
|
290
|
+
]);
|
|
291
|
+
|
|
292
|
+
export function getValueActionIfToJSON(
|
|
293
|
+
getValueActionIf: GetValueActionIf,
|
|
294
|
+
): string {
|
|
295
|
+
return JSON.stringify(
|
|
296
|
+
GetValueActionIf$outboundSchema.parse(getValueActionIf),
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
export function getValueActionIfFromJSON(
|
|
300
|
+
jsonString: string,
|
|
301
|
+
): SafeParseResult<GetValueActionIf, SDKValidationError> {
|
|
302
|
+
return safeParse(
|
|
303
|
+
jsonString,
|
|
304
|
+
(x) => GetValueActionIf$inboundSchema.parse(JSON.parse(x)),
|
|
305
|
+
`Failed to parse 'GetValueActionIf' from JSON`,
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** @internal */
|
|
310
|
+
export const GetValueAction$inboundSchema: z.ZodType<
|
|
311
|
+
GetValueAction,
|
|
312
|
+
z.ZodTypeDef,
|
|
313
|
+
unknown
|
|
314
|
+
> = z.object({
|
|
315
|
+
value: z.nullable(z.any()).optional(),
|
|
316
|
+
value_from: z.nullable(
|
|
317
|
+
z.union([
|
|
318
|
+
CaseExpression$inboundSchema,
|
|
319
|
+
z.union([
|
|
320
|
+
CelExpression$inboundSchema,
|
|
321
|
+
JMESPathExpression$inboundSchema.and(
|
|
322
|
+
z.object({ type: z.literal("jmespath") }),
|
|
323
|
+
),
|
|
324
|
+
JMESPathExpression$inboundSchema.and(
|
|
325
|
+
z.object({ type: z.literal("jp") }),
|
|
326
|
+
),
|
|
327
|
+
]),
|
|
328
|
+
z.string(),
|
|
329
|
+
]),
|
|
330
|
+
).optional(),
|
|
331
|
+
if: z.nullable(
|
|
332
|
+
z.union([
|
|
333
|
+
CaseExpression$inboundSchema,
|
|
334
|
+
z.union([
|
|
335
|
+
CelExpression$inboundSchema,
|
|
336
|
+
JMESPathExpression$inboundSchema.and(
|
|
337
|
+
z.object({ type: z.literal("jmespath") }),
|
|
338
|
+
),
|
|
339
|
+
JMESPathExpression$inboundSchema.and(
|
|
340
|
+
z.object({ type: z.literal("jp") }),
|
|
341
|
+
),
|
|
342
|
+
]),
|
|
343
|
+
z.string(),
|
|
344
|
+
]),
|
|
345
|
+
).optional(),
|
|
346
|
+
action: z.literal("get"),
|
|
347
|
+
inputs: z.nullable(z.array(z.string())).optional(),
|
|
348
|
+
overwrite: z.boolean().default(false),
|
|
349
|
+
}).transform((v) => {
|
|
350
|
+
return remap$(v, {
|
|
351
|
+
"value_from": "valueFrom",
|
|
352
|
+
});
|
|
353
|
+
});
|
|
354
|
+
/** @internal */
|
|
355
|
+
export type GetValueAction$Outbound = {
|
|
356
|
+
value?: any | null | undefined;
|
|
357
|
+
value_from?:
|
|
358
|
+
| CaseExpression$Outbound
|
|
359
|
+
| CelExpression$Outbound
|
|
360
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
361
|
+
| (JMESPathExpression$Outbound & { type: "jp" })
|
|
362
|
+
| string
|
|
363
|
+
| null
|
|
364
|
+
| undefined;
|
|
365
|
+
if?:
|
|
366
|
+
| CaseExpression$Outbound
|
|
367
|
+
| CelExpression$Outbound
|
|
368
|
+
| (JMESPathExpression$Outbound & { type: "jmespath" })
|
|
369
|
+
| (JMESPathExpression$Outbound & { type: "jp" })
|
|
370
|
+
| string
|
|
371
|
+
| null
|
|
372
|
+
| undefined;
|
|
373
|
+
action: "get";
|
|
374
|
+
inputs?: Array<string> | null | undefined;
|
|
375
|
+
overwrite: boolean;
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
/** @internal */
|
|
379
|
+
export const GetValueAction$outboundSchema: z.ZodType<
|
|
380
|
+
GetValueAction$Outbound,
|
|
381
|
+
z.ZodTypeDef,
|
|
382
|
+
GetValueAction
|
|
383
|
+
> = z.object({
|
|
384
|
+
value: z.nullable(z.any()).optional(),
|
|
385
|
+
valueFrom: z.nullable(
|
|
386
|
+
z.union([
|
|
387
|
+
CaseExpression$outboundSchema,
|
|
388
|
+
z.union([
|
|
389
|
+
CelExpression$outboundSchema,
|
|
390
|
+
JMESPathExpression$outboundSchema.and(
|
|
391
|
+
z.object({ type: z.literal("jmespath") }),
|
|
392
|
+
),
|
|
393
|
+
JMESPathExpression$outboundSchema.and(
|
|
394
|
+
z.object({ type: z.literal("jp") }),
|
|
395
|
+
),
|
|
396
|
+
]),
|
|
397
|
+
z.string(),
|
|
398
|
+
]),
|
|
399
|
+
).optional(),
|
|
400
|
+
if: z.nullable(
|
|
401
|
+
z.union([
|
|
402
|
+
CaseExpression$outboundSchema,
|
|
403
|
+
z.union([
|
|
404
|
+
CelExpression$outboundSchema,
|
|
405
|
+
JMESPathExpression$outboundSchema.and(
|
|
406
|
+
z.object({ type: z.literal("jmespath") }),
|
|
407
|
+
),
|
|
408
|
+
JMESPathExpression$outboundSchema.and(
|
|
409
|
+
z.object({ type: z.literal("jp") }),
|
|
410
|
+
),
|
|
411
|
+
]),
|
|
412
|
+
z.string(),
|
|
413
|
+
]),
|
|
414
|
+
).optional(),
|
|
415
|
+
action: z.literal("get"),
|
|
416
|
+
inputs: z.nullable(z.array(z.string())).optional(),
|
|
417
|
+
overwrite: z.boolean().default(false),
|
|
418
|
+
}).transform((v) => {
|
|
419
|
+
return remap$(v, {
|
|
420
|
+
valueFrom: "value_from",
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
export function getValueActionToJSON(getValueAction: GetValueAction): string {
|
|
425
|
+
return JSON.stringify(GetValueAction$outboundSchema.parse(getValueAction));
|
|
426
|
+
}
|
|
427
|
+
export function getValueActionFromJSON(
|
|
428
|
+
jsonString: string,
|
|
429
|
+
): SafeParseResult<GetValueAction, SDKValidationError> {
|
|
430
|
+
return safeParse(
|
|
431
|
+
jsonString,
|
|
432
|
+
(x) => GetValueAction$inboundSchema.parse(JSON.parse(x)),
|
|
433
|
+
`Failed to parse 'GetValueAction' from JSON`,
|
|
434
|
+
);
|
|
435
|
+
}
|
|
@@ -89,6 +89,7 @@ export * from "./eventtaskevents.js";
|
|
|
89
89
|
export * from "./expressiontask.js";
|
|
90
90
|
export * from "./expressiontaskevents.js";
|
|
91
91
|
export * from "./folderdetails.js";
|
|
92
|
+
export * from "./getvalueaction.js";
|
|
92
93
|
export * from "./incidentcreaterequest.js";
|
|
93
94
|
export * from "./incidentorganizationresponse.js";
|
|
94
95
|
export * from "./incidentproperties.js";
|