@suss/intent-ir 0.31.2 → 0.33.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.
- package/README.md +4 -2
- package/dist/index.cjs +214 -59
- package/dist/index.d.cts +630 -29
- package/dist/index.d.ts +630 -29
- package/dist/index.js +210 -58
- package/package.json +10 -4
- package/schema/intent-doc.schema.json +1476 -0
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ declare const IntentFindingKindSchema: z.ZodEnum<{
|
|
|
8
8
|
undeclaredOutcome: "undeclaredOutcome";
|
|
9
9
|
unkeyableBoundary: "unkeyableBoundary";
|
|
10
10
|
renamedBoundary: "renamedBoundary";
|
|
11
|
+
unreadInputField: "unreadInputField";
|
|
12
|
+
undeclaredInputRead: "undeclaredInputRead";
|
|
11
13
|
unlinkedScenario: "unlinkedScenario";
|
|
12
14
|
danglingScenarioLink: "danglingScenarioLink";
|
|
13
15
|
ambiguousScenarioLink: "ambiguousScenarioLink";
|
|
@@ -53,6 +55,8 @@ declare const IntentFindingSchema: z.ZodObject<{
|
|
|
53
55
|
undeclaredOutcome: "undeclaredOutcome";
|
|
54
56
|
unkeyableBoundary: "unkeyableBoundary";
|
|
55
57
|
renamedBoundary: "renamedBoundary";
|
|
58
|
+
unreadInputField: "unreadInputField";
|
|
59
|
+
undeclaredInputRead: "undeclaredInputRead";
|
|
56
60
|
unlinkedScenario: "unlinkedScenario";
|
|
57
61
|
danglingScenarioLink: "danglingScenarioLink";
|
|
58
62
|
ambiguousScenarioLink: "ambiguousScenarioLink";
|
|
@@ -105,6 +109,13 @@ declare const IntentSourceSchema: z.ZodDefault<z.ZodEnum<{
|
|
|
105
109
|
* and a placeholder that validated would read as finished.
|
|
106
110
|
*/
|
|
107
111
|
declare function blanksLeftEmpty(doc: unknown, failedFields: string[]): string[];
|
|
112
|
+
/**
|
|
113
|
+
* The same draft with a placeholder written into each blank, so a
|
|
114
|
+
* reader after the parts a draft does state can validate it and have
|
|
115
|
+
* them. Nothing that fills the blanks this way should show them to
|
|
116
|
+
* anybody: the words are suss's, not the team's.
|
|
117
|
+
*/
|
|
118
|
+
declare function fillBlanks(doc: unknown, blanks: string[]): unknown;
|
|
108
119
|
interface AuthoredShape {
|
|
109
120
|
type: z.infer<typeof PrimitiveTypeName> | "array" | "object";
|
|
110
121
|
items?: AuthoredShape | undefined;
|
|
@@ -115,25 +126,213 @@ declare const BodyShapeSchema: z.ZodUnion<readonly [z.ZodType<AuthoredShape, unk
|
|
|
115
126
|
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
116
127
|
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
128
|
}, z.core.$strip>]>;
|
|
129
|
+
declare const InputFieldSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
130
|
+
type: z.ZodEnum<{
|
|
131
|
+
string: "string";
|
|
132
|
+
number: "number";
|
|
133
|
+
boolean: "boolean";
|
|
134
|
+
integer: "integer";
|
|
135
|
+
null: "null";
|
|
136
|
+
unknown: "unknown";
|
|
137
|
+
}>;
|
|
138
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
139
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"array">;
|
|
141
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
142
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
143
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"object">;
|
|
145
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
146
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
147
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
148
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
149
|
+
}, z.core.$strict>]>;
|
|
150
|
+
/**
|
|
151
|
+
* A request comes in four parts the sender fills separately, so the
|
|
152
|
+
* REST spelling has a section per part. `body` is a shape rather than a
|
|
153
|
+
* map of fields, because a body is one value with properties under it.
|
|
154
|
+
*/
|
|
155
|
+
declare const RestReceivesSchema: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
157
|
+
type: z.ZodEnum<{
|
|
158
|
+
string: "string";
|
|
159
|
+
number: "number";
|
|
160
|
+
boolean: "boolean";
|
|
161
|
+
integer: "integer";
|
|
162
|
+
null: "null";
|
|
163
|
+
unknown: "unknown";
|
|
164
|
+
}>;
|
|
165
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
166
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
167
|
+
type: z.ZodLiteral<"array">;
|
|
168
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
169
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
170
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
171
|
+
type: z.ZodLiteral<"object">;
|
|
172
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
173
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
174
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
175
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
176
|
+
}, z.core.$strict>]>>>;
|
|
177
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
178
|
+
type: z.ZodEnum<{
|
|
179
|
+
string: "string";
|
|
180
|
+
number: "number";
|
|
181
|
+
boolean: "boolean";
|
|
182
|
+
integer: "integer";
|
|
183
|
+
null: "null";
|
|
184
|
+
unknown: "unknown";
|
|
185
|
+
}>;
|
|
186
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
187
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
188
|
+
type: z.ZodLiteral<"array">;
|
|
189
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
190
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
191
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
192
|
+
type: z.ZodLiteral<"object">;
|
|
193
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
194
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
195
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
196
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
197
|
+
}, z.core.$strict>]>>>;
|
|
198
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
199
|
+
type: z.ZodEnum<{
|
|
200
|
+
string: "string";
|
|
201
|
+
number: "number";
|
|
202
|
+
boolean: "boolean";
|
|
203
|
+
integer: "integer";
|
|
204
|
+
null: "null";
|
|
205
|
+
unknown: "unknown";
|
|
206
|
+
}>;
|
|
207
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
208
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
209
|
+
type: z.ZodLiteral<"array">;
|
|
210
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
211
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
212
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
213
|
+
type: z.ZodLiteral<"object">;
|
|
214
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
215
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
216
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
217
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
218
|
+
}, z.core.$strict>]>>>;
|
|
219
|
+
body: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>, z.ZodObject<{
|
|
220
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
221
|
+
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
222
|
+
}, z.core.$strip>]>>;
|
|
223
|
+
}, z.core.$strict>>;
|
|
118
224
|
declare const BoundarySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
119
225
|
transport: z.ZodDefault<z.ZodLiteral<"http">>;
|
|
120
226
|
semantics: z.ZodLiteral<"rest">;
|
|
121
227
|
method: z.ZodString;
|
|
122
228
|
path: z.ZodString;
|
|
123
|
-
|
|
229
|
+
receives: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
231
|
+
type: z.ZodEnum<{
|
|
232
|
+
string: "string";
|
|
233
|
+
number: "number";
|
|
234
|
+
boolean: "boolean";
|
|
235
|
+
integer: "integer";
|
|
236
|
+
null: "null";
|
|
237
|
+
unknown: "unknown";
|
|
238
|
+
}>;
|
|
239
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
240
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
241
|
+
type: z.ZodLiteral<"array">;
|
|
242
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
243
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
244
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
245
|
+
type: z.ZodLiteral<"object">;
|
|
246
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
247
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
248
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
249
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
250
|
+
}, z.core.$strict>]>>>;
|
|
251
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
252
|
+
type: z.ZodEnum<{
|
|
253
|
+
string: "string";
|
|
254
|
+
number: "number";
|
|
255
|
+
boolean: "boolean";
|
|
256
|
+
integer: "integer";
|
|
257
|
+
null: "null";
|
|
258
|
+
unknown: "unknown";
|
|
259
|
+
}>;
|
|
260
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
261
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
262
|
+
type: z.ZodLiteral<"array">;
|
|
263
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
264
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
265
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
266
|
+
type: z.ZodLiteral<"object">;
|
|
267
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
268
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
269
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
270
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
271
|
+
}, z.core.$strict>]>>>;
|
|
272
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
273
|
+
type: z.ZodEnum<{
|
|
274
|
+
string: "string";
|
|
275
|
+
number: "number";
|
|
276
|
+
boolean: "boolean";
|
|
277
|
+
integer: "integer";
|
|
278
|
+
null: "null";
|
|
279
|
+
unknown: "unknown";
|
|
280
|
+
}>;
|
|
281
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
282
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
283
|
+
type: z.ZodLiteral<"array">;
|
|
284
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
285
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
286
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
287
|
+
type: z.ZodLiteral<"object">;
|
|
288
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
289
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
290
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
291
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
292
|
+
}, z.core.$strict>]>>>;
|
|
293
|
+
body: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>, z.ZodObject<{
|
|
294
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
295
|
+
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
296
|
+
}, z.core.$strip>]>>;
|
|
297
|
+
}, z.core.$strict>>;
|
|
298
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
124
299
|
transport: z.ZodDefault<z.ZodString>;
|
|
125
300
|
semantics: z.ZodLiteral<"function-call">;
|
|
126
301
|
module: z.ZodOptional<z.ZodString>;
|
|
127
302
|
exportName: z.ZodOptional<z.ZodString>;
|
|
128
303
|
package: z.ZodOptional<z.ZodString>;
|
|
129
304
|
exportPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
130
|
-
|
|
305
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
306
|
+
type: z.ZodEnum<{
|
|
307
|
+
string: "string";
|
|
308
|
+
number: "number";
|
|
309
|
+
boolean: "boolean";
|
|
310
|
+
integer: "integer";
|
|
311
|
+
null: "null";
|
|
312
|
+
unknown: "unknown";
|
|
313
|
+
}>;
|
|
314
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
315
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
316
|
+
type: z.ZodLiteral<"array">;
|
|
317
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
318
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
319
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
320
|
+
type: z.ZodLiteral<"object">;
|
|
321
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
322
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
323
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
324
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
325
|
+
}, z.core.$strict>]>>>;
|
|
326
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
131
327
|
semantics: z.ZodLiteral<"message-bus">;
|
|
132
328
|
messageBus: z.ZodEnum<{
|
|
133
329
|
aws_sqs: "aws_sqs";
|
|
134
330
|
"aws.sns": "aws.sns";
|
|
135
331
|
s3: "s3";
|
|
136
332
|
eventbridge: "eventbridge";
|
|
333
|
+
aws_kinesis: "aws_kinesis";
|
|
334
|
+
aws_firehose: "aws_firehose";
|
|
335
|
+
gcp_pubsub: "gcp_pubsub";
|
|
137
336
|
bullmq: "bullmq";
|
|
138
337
|
kafka: "kafka";
|
|
139
338
|
nats: "nats";
|
|
@@ -142,13 +341,55 @@ declare const BoundarySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
142
341
|
"cloudflare-tail": "cloudflare-tail";
|
|
143
342
|
}>;
|
|
144
343
|
channel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
145
|
-
|
|
344
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
345
|
+
type: z.ZodEnum<{
|
|
346
|
+
string: "string";
|
|
347
|
+
number: "number";
|
|
348
|
+
boolean: "boolean";
|
|
349
|
+
integer: "integer";
|
|
350
|
+
null: "null";
|
|
351
|
+
unknown: "unknown";
|
|
352
|
+
}>;
|
|
353
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
354
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
355
|
+
type: z.ZodLiteral<"array">;
|
|
356
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
357
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
358
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
359
|
+
type: z.ZodLiteral<"object">;
|
|
360
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
361
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
362
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
363
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
364
|
+
}, z.core.$strict>]>>>;
|
|
365
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
146
366
|
semantics: z.ZodLiteral<"storage">;
|
|
147
|
-
storageSystem: z.ZodString
|
|
367
|
+
storageSystem: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
148
368
|
scope: z.ZodDefault<z.ZodString>;
|
|
149
369
|
container: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
150
370
|
accessPath: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
151
|
-
|
|
371
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
372
|
+
type: z.ZodEnum<{
|
|
373
|
+
string: "string";
|
|
374
|
+
number: "number";
|
|
375
|
+
boolean: "boolean";
|
|
376
|
+
integer: "integer";
|
|
377
|
+
null: "null";
|
|
378
|
+
unknown: "unknown";
|
|
379
|
+
}>;
|
|
380
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
381
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
382
|
+
type: z.ZodLiteral<"array">;
|
|
383
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
384
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
385
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
386
|
+
type: z.ZodLiteral<"object">;
|
|
387
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
388
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
389
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
390
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
391
|
+
}, z.core.$strict>]>>>;
|
|
392
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
152
393
|
semantics: z.ZodLiteral<"unit-invocation">;
|
|
153
394
|
deploymentTarget: z.ZodEnum<{
|
|
154
395
|
lambda: "lambda";
|
|
@@ -158,7 +399,35 @@ declare const BoundarySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
158
399
|
worker: "worker";
|
|
159
400
|
}>;
|
|
160
401
|
instanceName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
161
|
-
|
|
402
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
403
|
+
type: z.ZodEnum<{
|
|
404
|
+
string: "string";
|
|
405
|
+
number: "number";
|
|
406
|
+
boolean: "boolean";
|
|
407
|
+
integer: "integer";
|
|
408
|
+
null: "null";
|
|
409
|
+
unknown: "unknown";
|
|
410
|
+
}>;
|
|
411
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
412
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
413
|
+
type: z.ZodLiteral<"array">;
|
|
414
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
415
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
416
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
417
|
+
type: z.ZodLiteral<"object">;
|
|
418
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
419
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
420
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
421
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
422
|
+
}, z.core.$strict>]>>>;
|
|
423
|
+
}, z.core.$strict>], "semantics">;
|
|
424
|
+
/**
|
|
425
|
+
* The meta key `emptyIfNull` leaves on a field for the JSON Schema
|
|
426
|
+
* generator, which rewrites the field to accept null and takes the key
|
|
427
|
+
* back out. JSON Schema has no word for a preprocess, so without this
|
|
428
|
+
* the published schema would reject a bare `returns:` that suss takes.
|
|
429
|
+
*/
|
|
430
|
+
declare const ACCEPTS_NULL = "x-suss-accepts-null";
|
|
162
431
|
/** One effect, written `- writes: postgresql:invoices`. */
|
|
163
432
|
type DeclaredEffect = Partial<Record<EffectRelation, string>> & {
|
|
164
433
|
/** The columns it touches, when the outcome turns on which ones. */
|
|
@@ -197,7 +466,7 @@ declare const BoundaryTransitionSchema: z.ZodObject<{
|
|
|
197
466
|
errorType: z.ZodOptional<z.ZodString>;
|
|
198
467
|
}, z.core.$strip>>>;
|
|
199
468
|
results: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<DeclaredEffect, unknown, z.core.$ZodTypeInternals<DeclaredEffect, unknown>>, ...z.ZodType<DeclaredEffect, unknown, z.core.$ZodTypeInternals<DeclaredEffect, unknown>>[]]>>>;
|
|
200
|
-
}, z.core.$
|
|
469
|
+
}, z.core.$strict>;
|
|
201
470
|
declare const BoundaryIntentSchema: z.ZodObject<{
|
|
202
471
|
kind: z.ZodLiteral<"boundary">;
|
|
203
472
|
name: z.ZodString;
|
|
@@ -213,20 +482,113 @@ declare const BoundaryIntentSchema: z.ZodObject<{
|
|
|
213
482
|
semantics: z.ZodLiteral<"rest">;
|
|
214
483
|
method: z.ZodString;
|
|
215
484
|
path: z.ZodString;
|
|
216
|
-
|
|
485
|
+
receives: z.ZodOptional<z.ZodObject<{
|
|
486
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
487
|
+
type: z.ZodEnum<{
|
|
488
|
+
string: "string";
|
|
489
|
+
number: "number";
|
|
490
|
+
boolean: "boolean";
|
|
491
|
+
integer: "integer";
|
|
492
|
+
null: "null";
|
|
493
|
+
unknown: "unknown";
|
|
494
|
+
}>;
|
|
495
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
496
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
497
|
+
type: z.ZodLiteral<"array">;
|
|
498
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
499
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
500
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
501
|
+
type: z.ZodLiteral<"object">;
|
|
502
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
503
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
504
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
505
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
506
|
+
}, z.core.$strict>]>>>;
|
|
507
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
508
|
+
type: z.ZodEnum<{
|
|
509
|
+
string: "string";
|
|
510
|
+
number: "number";
|
|
511
|
+
boolean: "boolean";
|
|
512
|
+
integer: "integer";
|
|
513
|
+
null: "null";
|
|
514
|
+
unknown: "unknown";
|
|
515
|
+
}>;
|
|
516
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
517
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
518
|
+
type: z.ZodLiteral<"array">;
|
|
519
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
520
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
521
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
522
|
+
type: z.ZodLiteral<"object">;
|
|
523
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
524
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
525
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
526
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
527
|
+
}, z.core.$strict>]>>>;
|
|
528
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
529
|
+
type: z.ZodEnum<{
|
|
530
|
+
string: "string";
|
|
531
|
+
number: "number";
|
|
532
|
+
boolean: "boolean";
|
|
533
|
+
integer: "integer";
|
|
534
|
+
null: "null";
|
|
535
|
+
unknown: "unknown";
|
|
536
|
+
}>;
|
|
537
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
538
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
539
|
+
type: z.ZodLiteral<"array">;
|
|
540
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
541
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
542
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
543
|
+
type: z.ZodLiteral<"object">;
|
|
544
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
545
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
546
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
547
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
548
|
+
}, z.core.$strict>]>>>;
|
|
549
|
+
body: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>, z.ZodObject<{
|
|
550
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
551
|
+
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
552
|
+
}, z.core.$strip>]>>;
|
|
553
|
+
}, z.core.$strict>>;
|
|
554
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
217
555
|
transport: z.ZodDefault<z.ZodString>;
|
|
218
556
|
semantics: z.ZodLiteral<"function-call">;
|
|
219
557
|
module: z.ZodOptional<z.ZodString>;
|
|
220
558
|
exportName: z.ZodOptional<z.ZodString>;
|
|
221
559
|
package: z.ZodOptional<z.ZodString>;
|
|
222
560
|
exportPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
223
|
-
|
|
561
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
562
|
+
type: z.ZodEnum<{
|
|
563
|
+
string: "string";
|
|
564
|
+
number: "number";
|
|
565
|
+
boolean: "boolean";
|
|
566
|
+
integer: "integer";
|
|
567
|
+
null: "null";
|
|
568
|
+
unknown: "unknown";
|
|
569
|
+
}>;
|
|
570
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
571
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
572
|
+
type: z.ZodLiteral<"array">;
|
|
573
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
574
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
575
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
576
|
+
type: z.ZodLiteral<"object">;
|
|
577
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
578
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
579
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
580
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
581
|
+
}, z.core.$strict>]>>>;
|
|
582
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
224
583
|
semantics: z.ZodLiteral<"message-bus">;
|
|
225
584
|
messageBus: z.ZodEnum<{
|
|
226
585
|
aws_sqs: "aws_sqs";
|
|
227
586
|
"aws.sns": "aws.sns";
|
|
228
587
|
s3: "s3";
|
|
229
588
|
eventbridge: "eventbridge";
|
|
589
|
+
aws_kinesis: "aws_kinesis";
|
|
590
|
+
aws_firehose: "aws_firehose";
|
|
591
|
+
gcp_pubsub: "gcp_pubsub";
|
|
230
592
|
bullmq: "bullmq";
|
|
231
593
|
kafka: "kafka";
|
|
232
594
|
nats: "nats";
|
|
@@ -235,13 +597,55 @@ declare const BoundaryIntentSchema: z.ZodObject<{
|
|
|
235
597
|
"cloudflare-tail": "cloudflare-tail";
|
|
236
598
|
}>;
|
|
237
599
|
channel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
238
|
-
|
|
600
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
601
|
+
type: z.ZodEnum<{
|
|
602
|
+
string: "string";
|
|
603
|
+
number: "number";
|
|
604
|
+
boolean: "boolean";
|
|
605
|
+
integer: "integer";
|
|
606
|
+
null: "null";
|
|
607
|
+
unknown: "unknown";
|
|
608
|
+
}>;
|
|
609
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
610
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
611
|
+
type: z.ZodLiteral<"array">;
|
|
612
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
613
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
614
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
615
|
+
type: z.ZodLiteral<"object">;
|
|
616
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
617
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
618
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
619
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
620
|
+
}, z.core.$strict>]>>>;
|
|
621
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
239
622
|
semantics: z.ZodLiteral<"storage">;
|
|
240
|
-
storageSystem: z.ZodString
|
|
623
|
+
storageSystem: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
241
624
|
scope: z.ZodDefault<z.ZodString>;
|
|
242
625
|
container: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
243
626
|
accessPath: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
244
|
-
|
|
627
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
628
|
+
type: z.ZodEnum<{
|
|
629
|
+
string: "string";
|
|
630
|
+
number: "number";
|
|
631
|
+
boolean: "boolean";
|
|
632
|
+
integer: "integer";
|
|
633
|
+
null: "null";
|
|
634
|
+
unknown: "unknown";
|
|
635
|
+
}>;
|
|
636
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
637
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
638
|
+
type: z.ZodLiteral<"array">;
|
|
639
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
640
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
641
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
642
|
+
type: z.ZodLiteral<"object">;
|
|
643
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
644
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
645
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
646
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
647
|
+
}, z.core.$strict>]>>>;
|
|
648
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
245
649
|
semantics: z.ZodLiteral<"unit-invocation">;
|
|
246
650
|
deploymentTarget: z.ZodEnum<{
|
|
247
651
|
lambda: "lambda";
|
|
@@ -251,7 +655,28 @@ declare const BoundaryIntentSchema: z.ZodObject<{
|
|
|
251
655
|
worker: "worker";
|
|
252
656
|
}>;
|
|
253
657
|
instanceName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
254
|
-
|
|
658
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
659
|
+
type: z.ZodEnum<{
|
|
660
|
+
string: "string";
|
|
661
|
+
number: "number";
|
|
662
|
+
boolean: "boolean";
|
|
663
|
+
integer: "integer";
|
|
664
|
+
null: "null";
|
|
665
|
+
unknown: "unknown";
|
|
666
|
+
}>;
|
|
667
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
668
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
669
|
+
type: z.ZodLiteral<"array">;
|
|
670
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
671
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
672
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
673
|
+
type: z.ZodLiteral<"object">;
|
|
674
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
675
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
676
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
677
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
678
|
+
}, z.core.$strict>]>>>;
|
|
679
|
+
}, z.core.$strict>], "semantics">;
|
|
255
680
|
transitions: z.ZodArray<z.ZodObject<{
|
|
256
681
|
id: z.ZodString;
|
|
257
682
|
when: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodType<WhenClause, unknown, z.core.$ZodTypeInternals<WhenClause, unknown>>, ...z.ZodType<WhenClause, unknown, z.core.$ZodTypeInternals<WhenClause, unknown>>[]]>>]>;
|
|
@@ -272,14 +697,14 @@ declare const BoundaryIntentSchema: z.ZodObject<{
|
|
|
272
697
|
errorType: z.ZodOptional<z.ZodString>;
|
|
273
698
|
}, z.core.$strip>>>;
|
|
274
699
|
results: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<DeclaredEffect, unknown, z.core.$ZodTypeInternals<DeclaredEffect, unknown>>, ...z.ZodType<DeclaredEffect, unknown, z.core.$ZodTypeInternals<DeclaredEffect, unknown>>[]]>>>;
|
|
275
|
-
}, z.core.$
|
|
276
|
-
}, z.core.$
|
|
700
|
+
}, z.core.$strict>>;
|
|
701
|
+
}, z.core.$strict>;
|
|
277
702
|
declare const PrdScenarioSchema: z.ZodObject<{
|
|
278
703
|
title: z.ZodOptional<z.ZodString>;
|
|
279
704
|
when: z.ZodString;
|
|
280
705
|
expect: z.ZodString;
|
|
281
706
|
link: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
282
|
-
}, z.core.$
|
|
707
|
+
}, z.core.$strict>;
|
|
283
708
|
declare const PrdSchema: z.ZodObject<{
|
|
284
709
|
kind: z.ZodLiteral<"prd">;
|
|
285
710
|
title: z.ZodString;
|
|
@@ -295,8 +720,8 @@ declare const PrdSchema: z.ZodObject<{
|
|
|
295
720
|
when: z.ZodString;
|
|
296
721
|
expect: z.ZodString;
|
|
297
722
|
link: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
298
|
-
}, z.core.$
|
|
299
|
-
}, z.core.$
|
|
723
|
+
}, z.core.$strict>>;
|
|
724
|
+
}, z.core.$strict>;
|
|
300
725
|
declare const IntentDocSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
301
726
|
kind: z.ZodLiteral<"boundary">;
|
|
302
727
|
name: z.ZodString;
|
|
@@ -312,20 +737,113 @@ declare const IntentDocSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
312
737
|
semantics: z.ZodLiteral<"rest">;
|
|
313
738
|
method: z.ZodString;
|
|
314
739
|
path: z.ZodString;
|
|
315
|
-
|
|
740
|
+
receives: z.ZodOptional<z.ZodObject<{
|
|
741
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
742
|
+
type: z.ZodEnum<{
|
|
743
|
+
string: "string";
|
|
744
|
+
number: "number";
|
|
745
|
+
boolean: "boolean";
|
|
746
|
+
integer: "integer";
|
|
747
|
+
null: "null";
|
|
748
|
+
unknown: "unknown";
|
|
749
|
+
}>;
|
|
750
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
751
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
752
|
+
type: z.ZodLiteral<"array">;
|
|
753
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
754
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
755
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
756
|
+
type: z.ZodLiteral<"object">;
|
|
757
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
758
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
759
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
760
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
761
|
+
}, z.core.$strict>]>>>;
|
|
762
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
763
|
+
type: z.ZodEnum<{
|
|
764
|
+
string: "string";
|
|
765
|
+
number: "number";
|
|
766
|
+
boolean: "boolean";
|
|
767
|
+
integer: "integer";
|
|
768
|
+
null: "null";
|
|
769
|
+
unknown: "unknown";
|
|
770
|
+
}>;
|
|
771
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
772
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
773
|
+
type: z.ZodLiteral<"array">;
|
|
774
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
775
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
776
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
777
|
+
type: z.ZodLiteral<"object">;
|
|
778
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
779
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
780
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
781
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
782
|
+
}, z.core.$strict>]>>>;
|
|
783
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
784
|
+
type: z.ZodEnum<{
|
|
785
|
+
string: "string";
|
|
786
|
+
number: "number";
|
|
787
|
+
boolean: "boolean";
|
|
788
|
+
integer: "integer";
|
|
789
|
+
null: "null";
|
|
790
|
+
unknown: "unknown";
|
|
791
|
+
}>;
|
|
792
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
793
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
794
|
+
type: z.ZodLiteral<"array">;
|
|
795
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
796
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
797
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
798
|
+
type: z.ZodLiteral<"object">;
|
|
799
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
800
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
801
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
802
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
803
|
+
}, z.core.$strict>]>>>;
|
|
804
|
+
body: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>, z.ZodObject<{
|
|
805
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
806
|
+
required: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
807
|
+
}, z.core.$strip>]>>;
|
|
808
|
+
}, z.core.$strict>>;
|
|
809
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
316
810
|
transport: z.ZodDefault<z.ZodString>;
|
|
317
811
|
semantics: z.ZodLiteral<"function-call">;
|
|
318
812
|
module: z.ZodOptional<z.ZodString>;
|
|
319
813
|
exportName: z.ZodOptional<z.ZodString>;
|
|
320
814
|
package: z.ZodOptional<z.ZodString>;
|
|
321
815
|
exportPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
322
|
-
|
|
816
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
817
|
+
type: z.ZodEnum<{
|
|
818
|
+
string: "string";
|
|
819
|
+
number: "number";
|
|
820
|
+
boolean: "boolean";
|
|
821
|
+
integer: "integer";
|
|
822
|
+
null: "null";
|
|
823
|
+
unknown: "unknown";
|
|
824
|
+
}>;
|
|
825
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
826
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
827
|
+
type: z.ZodLiteral<"array">;
|
|
828
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
829
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
830
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
831
|
+
type: z.ZodLiteral<"object">;
|
|
832
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
833
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
834
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
835
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
836
|
+
}, z.core.$strict>]>>>;
|
|
837
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
323
838
|
semantics: z.ZodLiteral<"message-bus">;
|
|
324
839
|
messageBus: z.ZodEnum<{
|
|
325
840
|
aws_sqs: "aws_sqs";
|
|
326
841
|
"aws.sns": "aws.sns";
|
|
327
842
|
s3: "s3";
|
|
328
843
|
eventbridge: "eventbridge";
|
|
844
|
+
aws_kinesis: "aws_kinesis";
|
|
845
|
+
aws_firehose: "aws_firehose";
|
|
846
|
+
gcp_pubsub: "gcp_pubsub";
|
|
329
847
|
bullmq: "bullmq";
|
|
330
848
|
kafka: "kafka";
|
|
331
849
|
nats: "nats";
|
|
@@ -334,13 +852,55 @@ declare const IntentDocSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
334
852
|
"cloudflare-tail": "cloudflare-tail";
|
|
335
853
|
}>;
|
|
336
854
|
channel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
337
|
-
|
|
855
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
856
|
+
type: z.ZodEnum<{
|
|
857
|
+
string: "string";
|
|
858
|
+
number: "number";
|
|
859
|
+
boolean: "boolean";
|
|
860
|
+
integer: "integer";
|
|
861
|
+
null: "null";
|
|
862
|
+
unknown: "unknown";
|
|
863
|
+
}>;
|
|
864
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
865
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
866
|
+
type: z.ZodLiteral<"array">;
|
|
867
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
868
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
869
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
870
|
+
type: z.ZodLiteral<"object">;
|
|
871
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
872
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
873
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
874
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
875
|
+
}, z.core.$strict>]>>>;
|
|
876
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
338
877
|
semantics: z.ZodLiteral<"storage">;
|
|
339
|
-
storageSystem: z.ZodString
|
|
878
|
+
storageSystem: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
340
879
|
scope: z.ZodDefault<z.ZodString>;
|
|
341
880
|
container: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
342
881
|
accessPath: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
343
|
-
|
|
882
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
883
|
+
type: z.ZodEnum<{
|
|
884
|
+
string: "string";
|
|
885
|
+
number: "number";
|
|
886
|
+
boolean: "boolean";
|
|
887
|
+
integer: "integer";
|
|
888
|
+
null: "null";
|
|
889
|
+
unknown: "unknown";
|
|
890
|
+
}>;
|
|
891
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
892
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
893
|
+
type: z.ZodLiteral<"array">;
|
|
894
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
895
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
896
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
897
|
+
type: z.ZodLiteral<"object">;
|
|
898
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
899
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
900
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
901
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
902
|
+
}, z.core.$strict>]>>>;
|
|
903
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
344
904
|
semantics: z.ZodLiteral<"unit-invocation">;
|
|
345
905
|
deploymentTarget: z.ZodEnum<{
|
|
346
906
|
lambda: "lambda";
|
|
@@ -350,7 +910,28 @@ declare const IntentDocSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
350
910
|
worker: "worker";
|
|
351
911
|
}>;
|
|
352
912
|
instanceName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
353
|
-
|
|
913
|
+
receives: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
914
|
+
type: z.ZodEnum<{
|
|
915
|
+
string: "string";
|
|
916
|
+
number: "number";
|
|
917
|
+
boolean: "boolean";
|
|
918
|
+
integer: "integer";
|
|
919
|
+
null: "null";
|
|
920
|
+
unknown: "unknown";
|
|
921
|
+
}>;
|
|
922
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
923
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
924
|
+
type: z.ZodLiteral<"array">;
|
|
925
|
+
items: z.ZodOptional<z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>;
|
|
926
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
927
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
928
|
+
type: z.ZodLiteral<"object">;
|
|
929
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<AuthoredShape, unknown, z.core.$ZodTypeInternals<AuthoredShape, unknown>>>>;
|
|
930
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
931
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
932
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
933
|
+
}, z.core.$strict>]>>>;
|
|
934
|
+
}, z.core.$strict>], "semantics">;
|
|
354
935
|
transitions: z.ZodArray<z.ZodObject<{
|
|
355
936
|
id: z.ZodString;
|
|
356
937
|
when: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodType<WhenClause, unknown, z.core.$ZodTypeInternals<WhenClause, unknown>>, ...z.ZodType<WhenClause, unknown, z.core.$ZodTypeInternals<WhenClause, unknown>>[]]>>]>;
|
|
@@ -371,8 +952,8 @@ declare const IntentDocSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
371
952
|
errorType: z.ZodOptional<z.ZodString>;
|
|
372
953
|
}, z.core.$strip>>>;
|
|
373
954
|
results: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<DeclaredEffect, unknown, z.core.$ZodTypeInternals<DeclaredEffect, unknown>>, ...z.ZodType<DeclaredEffect, unknown, z.core.$ZodTypeInternals<DeclaredEffect, unknown>>[]]>>>;
|
|
374
|
-
}, z.core.$
|
|
375
|
-
}, z.core.$
|
|
955
|
+
}, z.core.$strict>>;
|
|
956
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
376
957
|
kind: z.ZodLiteral<"prd">;
|
|
377
958
|
title: z.ZodString;
|
|
378
959
|
purpose: z.ZodString;
|
|
@@ -387,8 +968,8 @@ declare const IntentDocSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
387
968
|
when: z.ZodString;
|
|
388
969
|
expect: z.ZodString;
|
|
389
970
|
link: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
390
|
-
}, z.core.$
|
|
391
|
-
}, z.core.$
|
|
971
|
+
}, z.core.$strict>>;
|
|
972
|
+
}, z.core.$strict>], "kind">;
|
|
392
973
|
type IntentDoc = z.infer<typeof IntentDocSchema>;
|
|
393
974
|
type BoundaryIntent = z.infer<typeof BoundaryIntentSchema>;
|
|
394
975
|
type Prd = z.infer<typeof PrdSchema>;
|
|
@@ -400,6 +981,11 @@ type AuthoredBoundary = z.input<typeof BoundarySchema>;
|
|
|
400
981
|
type BoundaryTransition = z.infer<typeof BoundaryTransitionSchema>;
|
|
401
982
|
type EffectOutcome = z.infer<typeof EffectOutcomeSchema>;
|
|
402
983
|
type BodyShape = z.infer<typeof BodyShapeSchema>;
|
|
984
|
+
type AuthoredInputField = z.infer<typeof InputFieldSchema>;
|
|
985
|
+
/** One `receives` block as somebody writes it, before defaults are put in. */
|
|
986
|
+
type AuthoredReceives = Record<string, z.input<typeof InputFieldSchema>>;
|
|
987
|
+
/** The same, in the four sections a REST boundary writes it under. */
|
|
988
|
+
type AuthoredRestReceives = NonNullable<z.input<typeof RestReceivesSchema>>;
|
|
403
989
|
type IntentSource = z.infer<typeof IntentSourceSchema>;
|
|
404
990
|
declare const PrimitiveTypeName: z.ZodEnum<{
|
|
405
991
|
string: "string";
|
|
@@ -459,6 +1045,18 @@ interface IntentOutcome {
|
|
|
459
1045
|
/** The effects this outcome declares. Empty when it declares none. */
|
|
460
1046
|
effects: IntentEffect[];
|
|
461
1047
|
}
|
|
1048
|
+
/**
|
|
1049
|
+
* One field of the value the boundary is handed. Every spelling of
|
|
1050
|
+
* `receives` normalises to a list of these, so the checker has one pass
|
|
1051
|
+
* over the list and never looks at the boundary kind.
|
|
1052
|
+
*/
|
|
1053
|
+
interface IntentInputField {
|
|
1054
|
+
/** `pair.provider` becomes `["pair", "provider"]`, a header `["headers", "x-tenant-id"]`. */
|
|
1055
|
+
path: string[];
|
|
1056
|
+
/** Null when the author named the field and said nothing else about it. */
|
|
1057
|
+
shape: TypeShape | null;
|
|
1058
|
+
required: boolean;
|
|
1059
|
+
}
|
|
462
1060
|
interface BoundaryIntentSummary {
|
|
463
1061
|
kind: "boundary";
|
|
464
1062
|
name: string;
|
|
@@ -466,6 +1064,8 @@ interface BoundaryIntentSummary {
|
|
|
466
1064
|
audience: string;
|
|
467
1065
|
source: IntentSource;
|
|
468
1066
|
boundary: BoundaryBinding;
|
|
1067
|
+
/** Empty for a doc with no `receives` block, which states nothing about the input. */
|
|
1068
|
+
receives: IntentInputField[];
|
|
469
1069
|
outcomes: IntentOutcome[];
|
|
470
1070
|
}
|
|
471
1071
|
interface PrdScenarioSummary {
|
|
@@ -488,5 +1088,6 @@ interface PrdSummary {
|
|
|
488
1088
|
type IntentSummary = BoundaryIntentSummary | PrdSummary;
|
|
489
1089
|
declare function intentDocToSummary(doc: IntentDoc): IntentSummary;
|
|
490
1090
|
declare function toBoundaryBinding(boundary: Boundary): BoundaryBinding;
|
|
1091
|
+
declare function toReceives(boundary: Boundary): IntentInputField[];
|
|
491
1092
|
|
|
492
|
-
export { type AuthoredBoundary, type AuthoredShape, type BodyShape, BodyShapeSchema, type Boundary, type BoundaryIntent, type BoundaryIntentSummary, BoundarySchema, type BoundaryTransition, type EffectOutcome, type IntentCondition, type IntentDoc, IntentDocSchema, type IntentEffect, type IntentFinding, type IntentFindingKind, IntentFindingKindSchema, IntentFindingSchema, type IntentFindingSeverity, IntentFindingSeveritySchema, type IntentFindingSuppression, IntentFindingSuppressionSchema, type IntentOutcome, type IntentOutcomeKind, type IntentRef, IntentRefSchema, type IntentSource, IntentSourceSchema, type IntentSummary, type Prd, type PrdScenario, type PrdScenarioSummary, type PrdSummary, PrimitiveTypeName, type When, type WhenClause, blanksLeftEmpty, intentDocToSummary, toBoundaryBinding };
|
|
1093
|
+
export { ACCEPTS_NULL, type AuthoredBoundary, type AuthoredInputField, type AuthoredReceives, type AuthoredRestReceives, type AuthoredShape, type BodyShape, BodyShapeSchema, type Boundary, type BoundaryIntent, type BoundaryIntentSummary, BoundarySchema, type BoundaryTransition, type EffectOutcome, type IntentCondition, type IntentDoc, IntentDocSchema, type IntentEffect, type IntentFinding, type IntentFindingKind, IntentFindingKindSchema, IntentFindingSchema, type IntentFindingSeverity, IntentFindingSeveritySchema, type IntentFindingSuppression, IntentFindingSuppressionSchema, type IntentInputField, type IntentOutcome, type IntentOutcomeKind, type IntentRef, IntentRefSchema, type IntentSource, IntentSourceSchema, type IntentSummary, type Prd, type PrdScenario, type PrdScenarioSummary, type PrdSummary, PrimitiveTypeName, type When, type WhenClause, blanksLeftEmpty, fillBlanks, intentDocToSummary, toBoundaryBinding, toReceives };
|