@toolproof-core/schema 1.0.2 → 1.0.4

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 (90) hide show
  1. package/dist/generated/normalized/Genesis.d.ts +2 -0
  2. package/dist/generated/normalized/Genesis.js +2 -0
  3. package/dist/generated/normalized/Genesis.json +2008 -0
  4. package/dist/generated/resources/Genesis.d.ts +2 -0
  5. package/dist/generated/resources/Genesis.js +2 -0
  6. package/dist/generated/resources/Genesis.json +2907 -0
  7. package/dist/generated/schemas/Genesis.d.ts +2 -0
  8. package/dist/generated/schemas/Genesis.js +2 -0
  9. package/dist/generated/schemas/Genesis.json +1466 -0
  10. package/dist/generated/schemas/standalone/Goal.d.ts +2 -0
  11. package/dist/generated/schemas/standalone/Goal.js +2 -0
  12. package/dist/generated/schemas/standalone/Goal.json +86 -0
  13. package/dist/generated/schemas/standalone/Job.d.ts +2 -0
  14. package/dist/generated/schemas/standalone/Job.js +2 -0
  15. package/dist/generated/schemas/standalone/Job.json +236 -0
  16. package/dist/generated/schemas/standalone/RawStrategy.d.ts +2 -0
  17. package/dist/generated/schemas/standalone/RawStrategy.js +2 -0
  18. package/dist/generated/schemas/standalone/RawStrategy.json +650 -0
  19. package/dist/generated/schemas/standalone/ResourceType.d.ts +2 -0
  20. package/dist/generated/schemas/standalone/ResourceType.js +2 -0
  21. package/dist/generated/schemas/standalone/ResourceType.json +140 -0
  22. package/dist/generated/schemas/standalone/RunnableStrategy.d.ts +2 -0
  23. package/dist/generated/schemas/standalone/RunnableStrategy.js +2 -0
  24. package/dist/generated/schemas/standalone/RunnableStrategy.json +720 -0
  25. package/dist/generated/schemas/standalone/StrategyRun.d.ts +2 -0
  26. package/dist/generated/schemas/standalone/StrategyRun.js +2 -0
  27. package/dist/generated/schemas/standalone/StrategyRun.json +1002 -0
  28. package/dist/generated/{types → typesTS}/standalone/Resource_Genesis.d.ts +1 -1
  29. package/{src/generated/types → dist/generated/typesTS}/standalone/Resource_Job.d.ts +1 -1
  30. package/{src/generated/types → dist/generated/typesTS}/standalone/Resource_RawStrategy.d.ts +1 -1
  31. package/{src/generated/types → dist/generated/typesTS}/standalone/Resource_ResourceType.d.ts +1 -1
  32. package/dist/generated/{types → typesTS}/standalone/Resource_RunnableStrategy.d.ts +1 -1
  33. package/dist/generated/typesTS/typesTS.d.ts +745 -0
  34. package/dist/index.d.ts +10 -0
  35. package/dist/index.js +5 -0
  36. package/dist/scripts/_lib/config.d.ts +10 -10
  37. package/dist/scripts/_lib/config.js +23 -23
  38. package/dist/scripts/extractSchemasFromResourceTypeShells.js +109 -103
  39. package/dist/scripts/generateDependencies.js +15 -14
  40. package/dist/scripts/generateSchemaShims.js +76 -84
  41. package/dist/scripts/generateStandaloneSchema.js +47 -37
  42. package/dist/scripts/generateStandaloneTypeTS.js +108 -0
  43. package/dist/scripts/generateTypesTS.js +430 -0
  44. package/dist/scripts/normalizeAnchorsToPointers.js +37 -30
  45. package/dist/scripts/wrapResourceTypesWithResourceShells.js +14 -16
  46. package/package.json +11 -12
  47. package/src/Genesis.json +2007 -1999
  48. package/src/generated/{dependencyMap.json → dependencies/dependencyMap.json} +7 -6
  49. package/src/generated/normalized/Genesis.json +17 -9
  50. package/src/generated/resources/Genesis.json +19 -11
  51. package/src/generated/schemas/Genesis.json +15 -7
  52. package/src/generated/schemas/standalone/RawStrategy.json +15 -7
  53. package/src/generated/schemas/standalone/RunnableStrategy.json +15 -7
  54. package/src/generated/schemas/standalone/StrategyRun.json +15 -7
  55. package/src/generated/{types → typesTS}/standalone/Resource_Genesis.d.ts +1 -1
  56. package/{dist/generated/types → src/generated/typesTS}/standalone/Resource_Job.d.ts +1 -1
  57. package/{dist/generated/types → src/generated/typesTS}/standalone/Resource_RawStrategy.d.ts +1 -1
  58. package/{dist/generated/types → src/generated/typesTS}/standalone/Resource_ResourceType.d.ts +1 -1
  59. package/src/generated/{types → typesTS}/standalone/Resource_RunnableStrategy.d.ts +1 -1
  60. package/src/generated/typesTS/typesTS.d.ts +745 -0
  61. package/src/index.ts +67 -1
  62. package/src/scripts/_lib/config.ts +205 -205
  63. package/src/scripts/extractSchemasFromResourceTypeShells.ts +261 -218
  64. package/src/scripts/generateDependencies.ts +121 -120
  65. package/src/scripts/generateSchemaShims.ts +127 -135
  66. package/src/scripts/generateStandaloneSchema.ts +185 -175
  67. package/src/scripts/generateStandaloneTypeTS.ts +127 -0
  68. package/src/scripts/generateTypesTS.ts +532 -0
  69. package/src/scripts/normalizeAnchorsToPointers.ts +115 -123
  70. package/src/scripts/wrapResourceTypesWithResourceShells.ts +82 -84
  71. package/dist/generated/types/types.d.ts +0 -1723
  72. package/dist/scripts/generateStandaloneType.js +0 -102
  73. package/dist/scripts/generateTypes.js +0 -550
  74. package/src/generated/types/types.d.ts +0 -1723
  75. package/src/scripts/generateStandaloneType.ts +0 -119
  76. package/src/scripts/generateTypes.ts +0 -615
  77. /package/dist/generated/{types → typesTS}/standalone/Resource_Genesis.js +0 -0
  78. /package/dist/generated/{types → typesTS}/standalone/Resource_Job.js +0 -0
  79. /package/dist/generated/{types → typesTS}/standalone/Resource_RawStrategy.js +0 -0
  80. /package/dist/generated/{types → typesTS}/standalone/Resource_ResourceType.js +0 -0
  81. /package/dist/generated/{types → typesTS}/standalone/Resource_RunnableStrategy.js +0 -0
  82. /package/dist/generated/{types/types.js → typesTS/typesTS.js} +0 -0
  83. /package/dist/scripts/{generateStandaloneType.d.ts → generateStandaloneTypeTS.d.ts} +0 -0
  84. /package/dist/scripts/{generateTypes.d.ts → generateTypesTS.d.ts} +0 -0
  85. /package/src/generated/{types → typesTS}/standalone/Resource_Genesis.js +0 -0
  86. /package/src/generated/{types → typesTS}/standalone/Resource_Job.js +0 -0
  87. /package/src/generated/{types → typesTS}/standalone/Resource_RawStrategy.js +0 -0
  88. /package/src/generated/{types → typesTS}/standalone/Resource_ResourceType.js +0 -0
  89. /package/src/generated/{types → typesTS}/standalone/Resource_RunnableStrategy.js +0 -0
  90. /package/src/generated/{types/types.js → typesTS/typesTS.js} +0 -0
@@ -0,0 +1,1002 @@
1
+ {
2
+ "$anchor": "StrategyRun",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "required": [
6
+ "identity",
7
+ "runnableStrategyHandle",
8
+ "recordedAt",
9
+ "runEvents"
10
+ ],
11
+ "properties": {
12
+ "identity": {
13
+ "$ref": "#/$defs/StrategyRunIdentity"
14
+ },
15
+ "runnableStrategyHandle": {
16
+ "$comment": "Could be derived from the first event but useful for indexing.",
17
+ "$ref": "#/$defs/RunnableStrategyIdentity"
18
+ },
19
+ "recordedAt": {
20
+ "$ref": "#/$defs/Timestamp"
21
+ },
22
+ "runEvents": {
23
+ "type": "array",
24
+ "items": {
25
+ "$ref": "#/$defs/RunEvent"
26
+ }
27
+ }
28
+ },
29
+ "unevaluatedProperties": false,
30
+ "$defs": {
31
+ "StrategyRunIdentity": {
32
+ "$anchor": "StrategyRunIdentity",
33
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
34
+ "type": "string",
35
+ "pattern": "^STRATEGY_RUN-.+$"
36
+ },
37
+ "RunnableStrategyIdentity": {
38
+ "$anchor": "RunnableStrategyIdentity",
39
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
40
+ "type": "string",
41
+ "pattern": "^RUNNABLE_STRATEGY-.+$"
42
+ },
43
+ "Timestamp": {
44
+ "$anchor": "Timestamp",
45
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
46
+ "type": "string",
47
+ "format": "date-time"
48
+ },
49
+ "RunEvent": {
50
+ "$anchor": "RunEvent",
51
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
52
+ "type": "object",
53
+ "oneOf": [
54
+ {
55
+ "$ref": "#/$defs/GraphStartRunEvent"
56
+ },
57
+ {
58
+ "$ref": "#/$defs/TickRunEvent"
59
+ },
60
+ {
61
+ "$ref": "#/$defs/InterruptRunEvent"
62
+ },
63
+ {
64
+ "$ref": "#/$defs/GraphEndRunEvent"
65
+ }
66
+ ]
67
+ },
68
+ "GraphStartRunEvent": {
69
+ "$anchor": "GraphStartRunEvent",
70
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
71
+ "allOf": [
72
+ {
73
+ "$ref": "#/$defs/RunEventBase"
74
+ },
75
+ {
76
+ "type": "object",
77
+ "required": [
78
+ "runnableStrategySeed"
79
+ ],
80
+ "properties": {
81
+ "runEventKind": {
82
+ "const": "graph_start"
83
+ },
84
+ "runnableStrategySeed": {
85
+ "$ref": "#/$defs/RunnableStrategy"
86
+ }
87
+ }
88
+ }
89
+ ]
90
+ },
91
+ "TickRunEvent": {
92
+ "$anchor": "TickRunEvent",
93
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
94
+ "allOf": [
95
+ {
96
+ "$ref": "#/$defs/RunEventBase"
97
+ },
98
+ {
99
+ "type": "object",
100
+ "properties": {
101
+ "runEventKind": {
102
+ "const": "tick"
103
+ }
104
+ }
105
+ }
106
+ ]
107
+ },
108
+ "InterruptRunEvent": {
109
+ "$anchor": "InterruptRunEvent",
110
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
111
+ "allOf": [
112
+ {
113
+ "$ref": "#/$defs/RunEventBase"
114
+ },
115
+ {
116
+ "type": "object",
117
+ "properties": {
118
+ "runEventKind": {
119
+ "const": "interrupt"
120
+ }
121
+ }
122
+ }
123
+ ]
124
+ },
125
+ "GraphEndRunEvent": {
126
+ "$anchor": "GraphEndRunEvent",
127
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
128
+ "allOf": [
129
+ {
130
+ "$ref": "#/$defs/RunEventBase"
131
+ },
132
+ {
133
+ "type": "object",
134
+ "properties": {
135
+ "runEventKind": {
136
+ "const": "graph_end"
137
+ }
138
+ }
139
+ }
140
+ ]
141
+ },
142
+ "RunEventBase": {
143
+ "$anchor": "RunEventBase",
144
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
145
+ "type": "object",
146
+ "required": [
147
+ "runEventKind",
148
+ "runnableStrategyHandle",
149
+ "strategyThreadHandle",
150
+ "createdAt",
151
+ "nodeName",
152
+ "eventSeq"
153
+ ],
154
+ "properties": {
155
+ "runEventKind": {
156
+ "$ref": "#/$defs/RunEventKind"
157
+ },
158
+ "runnableStrategyHandle": {
159
+ "$ref": "#/$defs/RunnableStrategyIdentity"
160
+ },
161
+ "strategyThreadHandle": {
162
+ "$ref": "#/$defs/StrategyThreadIdentity"
163
+ },
164
+ "createdAt": {
165
+ "$ref": "#/$defs/Timestamp"
166
+ },
167
+ "nodeName": {
168
+ "type": "string"
169
+ },
170
+ "eventSeq": {
171
+ "type": "integer"
172
+ },
173
+ "counters": {
174
+ "$ref": "#/$defs/RunEventCounters"
175
+ },
176
+ "stepMetadata": {
177
+ "$ref": "#/$defs/RunEventStepMetadata"
178
+ },
179
+ "updates": {
180
+ "$ref": "#/$defs/RunEventUpdates"
181
+ }
182
+ }
183
+ },
184
+ "RunnableStrategy": {
185
+ "$anchor": "RunnableStrategy",
186
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
187
+ "type": "object",
188
+ "required": [
189
+ "identity",
190
+ "runnableStrategyContext"
191
+ ],
192
+ "properties": {
193
+ "identity": {
194
+ "$ref": "#/$defs/RunnableStrategyIdentity"
195
+ },
196
+ "runnableStrategyContext": {
197
+ "$ref": "#/$defs/RunnableStrategyContext"
198
+ }
199
+ },
200
+ "allOf": [
201
+ {
202
+ "$comment": "The Engine runs jobs specified by steps in strategyThreadMap. The Engine also injects repeted steps when encountering loops.",
203
+ "$ref": "#/$defs/StrategyThreadMapFacet"
204
+ },
205
+ {
206
+ "$comment": "The Engine updates strategyState with materialized Resources upon job completions and runtime-provided input events. It also inserts input-potential and output-potential Resources upon step injections.",
207
+ "$ref": "#/$defs/StrategyStateFacet"
208
+ }
209
+ ],
210
+ "unevaluatedProperties": false
211
+ },
212
+ "RunEventKind": {
213
+ "$anchor": "RunEventKind",
214
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
215
+ "type": "string",
216
+ "enum": [
217
+ "graph_start",
218
+ "tick",
219
+ "interrupt",
220
+ "graph_end"
221
+ ]
222
+ },
223
+ "StrategyThreadIdentity": {
224
+ "$anchor": "StrategyThreadIdentity",
225
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
226
+ "type": "string",
227
+ "pattern": "^STRATEGY_THREAD-.+$"
228
+ },
229
+ "RunEventCounters": {
230
+ "$anchor": "RunEventCounters",
231
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
232
+ "type": "object",
233
+ "properties": {
234
+ "stepCounterAfter": {
235
+ "type": "integer"
236
+ },
237
+ "iterationCounterAfter": {
238
+ "type": "integer"
239
+ }
240
+ }
241
+ },
242
+ "RunEventStepMetadata": {
243
+ "$anchor": "RunEventStepMetadata",
244
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
245
+ "type": "object",
246
+ "required": [
247
+ "stepHandle",
248
+ "stepKind",
249
+ "threadStepIndex"
250
+ ],
251
+ "properties": {
252
+ "stepHandle": {
253
+ "$ref": "#/$defs/StepIdentity"
254
+ },
255
+ "stepKind": {
256
+ "$ref": "#/$defs/StepKind"
257
+ },
258
+ "threadStepIndex": {
259
+ "type": "integer"
260
+ }
261
+ }
262
+ },
263
+ "RunEventUpdates": {
264
+ "$anchor": "RunEventUpdates",
265
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
266
+ "type": "object",
267
+ "properties": {
268
+ "stepsMutation": {
269
+ "type": "object",
270
+ "required": [
271
+ "insertAt",
272
+ "inserted"
273
+ ],
274
+ "properties": {
275
+ "insertAt": {
276
+ "type": "integer"
277
+ },
278
+ "inserted": {
279
+ "$ref": "#/$defs/StepArray"
280
+ }
281
+ }
282
+ },
283
+ "interruptData": {
284
+ "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
285
+ "type": [
286
+ "object",
287
+ "null"
288
+ ]
289
+ }
290
+ },
291
+ "allOf": [
292
+ {
293
+ "$ref": "#/$defs/StrategyStateDelta"
294
+ }
295
+ ]
296
+ },
297
+ "RunnableStrategyContext": {
298
+ "$anchor": "RunnableStrategyContext",
299
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
300
+ "type": "object",
301
+ "required": [
302
+ "status"
303
+ ],
304
+ "properties": {
305
+ "status": {
306
+ "$ref": "#/$defs/RunnableStrategyStatus"
307
+ },
308
+ "startedAt": {
309
+ "$ref": "#/$defs/Timestamp"
310
+ },
311
+ "completedAt": {
312
+ "$ref": "#/$defs/Timestamp"
313
+ }
314
+ },
315
+ "unevaluatedProperties": false
316
+ },
317
+ "StrategyThreadMapFacet": {
318
+ "$anchor": "StrategyThreadMapFacet",
319
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
320
+ "type": "object",
321
+ "required": [
322
+ "strategyThreadMap"
323
+ ],
324
+ "properties": {
325
+ "strategyThreadMap": {
326
+ "$ref": "#/$defs/StrategyThreadMap"
327
+ }
328
+ }
329
+ },
330
+ "StrategyStateFacet": {
331
+ "$anchor": "StrategyStateFacet",
332
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
333
+ "type": "object",
334
+ "required": [
335
+ "strategyState"
336
+ ],
337
+ "properties": {
338
+ "strategyState": {
339
+ "$ref": "#/$defs/StrategyState"
340
+ }
341
+ }
342
+ },
343
+ "StepIdentity": {
344
+ "$anchor": "StepIdentity",
345
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
346
+ "type": "object",
347
+ "oneOf": [
348
+ {
349
+ "$ref": "#/$defs/JobStepIdentity"
350
+ },
351
+ {
352
+ "$ref": "#/$defs/BranchStepIdentity"
353
+ },
354
+ {
355
+ "$ref": "#/$defs/WhileStepIdentity"
356
+ },
357
+ {
358
+ "$ref": "#/$defs/ForStepIdentity"
359
+ }
360
+ ]
361
+ },
362
+ "StepKind": {
363
+ "$anchor": "StepKind",
364
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
365
+ "type": "string",
366
+ "enum": [
367
+ "job",
368
+ "branch",
369
+ "while",
370
+ "for"
371
+ ]
372
+ },
373
+ "StepArray": {
374
+ "$anchor": "StepArray",
375
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
376
+ "type": "array",
377
+ "items": {
378
+ "$ref": "#/$defs/Step"
379
+ },
380
+ "uniqueItems": true
381
+ },
382
+ "StrategyStateDelta": {
383
+ "$anchor": "StrategyStateDelta",
384
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
385
+ "type": "object",
386
+ "required": [
387
+ "strategyStateUpdate"
388
+ ],
389
+ "properties": {
390
+ "strategyStateUpdate": {
391
+ "$ref": "#/$defs/StrategyState"
392
+ }
393
+ }
394
+ },
395
+ "RunnableStrategyStatus": {
396
+ "$anchor": "RunnableStrategyStatus",
397
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
398
+ "type": "string",
399
+ "enum": [
400
+ "pending",
401
+ "running",
402
+ "completed",
403
+ "failed",
404
+ "cancelled"
405
+ ]
406
+ },
407
+ "StrategyThreadMap": {
408
+ "$anchor": "StrategyThreadMap",
409
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
410
+ "type": "object",
411
+ "propertyNames": {
412
+ "$ref": "#/$defs/StrategyThreadIdentity"
413
+ },
414
+ "additionalProperties": {
415
+ "$ref": "#/$defs/StepArray"
416
+ },
417
+ "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads."
418
+ },
419
+ "StrategyState": {
420
+ "$anchor": "StrategyState",
421
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
422
+ "type": "object",
423
+ "propertyNames": {
424
+ "$ref": "#/$defs/JobStepIdentity"
425
+ },
426
+ "additionalProperties": {
427
+ "$ref": "#/$defs/JobStepSocket"
428
+ }
429
+ },
430
+ "JobStepIdentity": {
431
+ "$anchor": "JobStepIdentity",
432
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
433
+ "type": "string",
434
+ "pattern": "^JOB_STEP-.+$"
435
+ },
436
+ "BranchStepIdentity": {
437
+ "$anchor": "BranchStepIdentity",
438
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
439
+ "type": "string",
440
+ "pattern": "^BRANCH_STEP-.+$"
441
+ },
442
+ "WhileStepIdentity": {
443
+ "$anchor": "WhileStepIdentity",
444
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
445
+ "type": "string",
446
+ "pattern": "^WHILE_STEP-.+$"
447
+ },
448
+ "ForStepIdentity": {
449
+ "$anchor": "ForStepIdentity",
450
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
451
+ "type": "string",
452
+ "pattern": "^FOR_STEP-.+$"
453
+ },
454
+ "Step": {
455
+ "$anchor": "Step",
456
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
457
+ "type": "object",
458
+ "oneOf": [
459
+ {
460
+ "$ref": "#/$defs/JobStep"
461
+ },
462
+ {
463
+ "$ref": "#/$defs/BranchStep"
464
+ },
465
+ {
466
+ "$ref": "#/$defs/WhileStep"
467
+ },
468
+ {
469
+ "$ref": "#/$defs/ForStep"
470
+ }
471
+ ],
472
+ "unevaluatedProperties": false
473
+ },
474
+ "JobStepSocket": {
475
+ "$anchor": "JobStepSocket",
476
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
477
+ "type": "object",
478
+ "propertyNames": {
479
+ "$ref": "#/$defs/ResourceRoleIdentity"
480
+ },
481
+ "additionalProperties": {
482
+ "$ref": "#/$defs/Resource"
483
+ }
484
+ },
485
+ "JobStep": {
486
+ "$anchor": "JobStep",
487
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
488
+ "type": "object",
489
+ "required": [
490
+ "identity",
491
+ "stepKind",
492
+ "jobHandle"
493
+ ],
494
+ "properties": {
495
+ "identity": {
496
+ "$ref": "#/$defs/JobStepIdentity"
497
+ },
498
+ "stepKind": {
499
+ "const": "job"
500
+ },
501
+ "jobHandle": {
502
+ "$ref": "#/$defs/JobIdentity"
503
+ }
504
+ },
505
+ "allOf": [
506
+ {
507
+ "$ref": "#/$defs/StepKindFacet"
508
+ },
509
+ {
510
+ "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
511
+ "$ref": "#/$defs/RoleBindingsFacet"
512
+ }
513
+ ]
514
+ },
515
+ "BranchStep": {
516
+ "$anchor": "BranchStep",
517
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
518
+ "type": "object",
519
+ "required": [
520
+ "identity",
521
+ "stepKind",
522
+ "cases"
523
+ ],
524
+ "properties": {
525
+ "identity": {
526
+ "$ref": "#/$defs/BranchStepIdentity"
527
+ },
528
+ "stepKind": {
529
+ "const": "branch"
530
+ },
531
+ "cases": {
532
+ "type": "array",
533
+ "items": {
534
+ "$ref": "#/$defs/Conditional"
535
+ },
536
+ "minItems": 1,
537
+ "uniqueItems": true
538
+ }
539
+ },
540
+ "allOf": [
541
+ {
542
+ "$ref": "#/$defs/StepKindFacet"
543
+ }
544
+ ]
545
+ },
546
+ "WhileStep": {
547
+ "$anchor": "WhileStep",
548
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
549
+ "type": "object",
550
+ "required": [
551
+ "identity",
552
+ "stepKind",
553
+ "case"
554
+ ],
555
+ "properties": {
556
+ "identity": {
557
+ "$ref": "#/$defs/WhileStepIdentity"
558
+ },
559
+ "stepKind": {
560
+ "const": "while"
561
+ },
562
+ "case": {
563
+ "$ref": "#/$defs/Conditional"
564
+ }
565
+ },
566
+ "allOf": [
567
+ {
568
+ "$ref": "#/$defs/StepKindFacet"
569
+ }
570
+ ]
571
+ },
572
+ "ForStep": {
573
+ "$anchor": "ForStep",
574
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
575
+ "type": "object",
576
+ "required": [
577
+ "identity",
578
+ "stepKind",
579
+ "case"
580
+ ],
581
+ "properties": {
582
+ "identity": {
583
+ "$ref": "#/$defs/ForStepIdentity"
584
+ },
585
+ "stepKind": {
586
+ "const": "for"
587
+ },
588
+ "case": {
589
+ "$ref": "#/$defs/Conditional"
590
+ }
591
+ },
592
+ "allOf": [
593
+ {
594
+ "$ref": "#/$defs/StepKindFacet"
595
+ }
596
+ ]
597
+ },
598
+ "ResourceRoleIdentity": {
599
+ "$anchor": "ResourceRoleIdentity",
600
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
601
+ "type": "string",
602
+ "pattern": "^ROLE-.+$"
603
+ },
604
+ "Resource": {
605
+ "$anchor": "Resource",
606
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
607
+ "type": "object",
608
+ "oneOf": [
609
+ {
610
+ "$ref": "#/$defs/ResourceMissing"
611
+ },
612
+ {
613
+ "$ref": "#/$defs/ResourceInputPotential"
614
+ },
615
+ {
616
+ "$ref": "#/$defs/ResourceOutputPotential"
617
+ },
618
+ {
619
+ "$ref": "#/$defs/ResourceMaterialized"
620
+ }
621
+ ],
622
+ "unevaluatedProperties": false
623
+ },
624
+ "JobIdentity": {
625
+ "$anchor": "JobIdentity",
626
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
627
+ "type": "string",
628
+ "pattern": "^JOB-.+$"
629
+ },
630
+ "StepKindFacet": {
631
+ "$anchor": "StepKindFacet",
632
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
633
+ "type": "object",
634
+ "required": [
635
+ "stepKind"
636
+ ],
637
+ "properties": {
638
+ "stepKind": {
639
+ "$ref": "#/$defs/StepKind"
640
+ }
641
+ }
642
+ },
643
+ "RoleBindingsFacet": {
644
+ "$anchor": "RoleBindingsFacet",
645
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
646
+ "type": "object",
647
+ "required": [
648
+ "roleBindings"
649
+ ],
650
+ "properties": {
651
+ "roleBindings": {
652
+ "$ref": "#/$defs/RoleBindings"
653
+ }
654
+ }
655
+ },
656
+ "Conditional": {
657
+ "$anchor": "Conditional",
658
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
659
+ "type": "object",
660
+ "required": [
661
+ "when",
662
+ "what"
663
+ ],
664
+ "properties": {
665
+ "when": {
666
+ "$ref": "#/$defs/JobStep"
667
+ },
668
+ "what": {
669
+ "$ref": "#/$defs/JobStep"
670
+ }
671
+ },
672
+ "unevaluatedProperties": false
673
+ },
674
+ "ResourceMissing": {
675
+ "$anchor": "ResourceMissing",
676
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
677
+ "type": "object",
678
+ "$ref": "#/$defs/ShellMissing",
679
+ "unevaluatedProperties": false
680
+ },
681
+ "ResourceInputPotential": {
682
+ "$anchor": "ResourceInputPotential",
683
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
684
+ "type": "object",
685
+ "$ref": "#/$defs/ShellInputPotential",
686
+ "unevaluatedProperties": false
687
+ },
688
+ "ResourceOutputPotential": {
689
+ "$anchor": "ResourceOutputPotential",
690
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
691
+ "type": "object",
692
+ "$ref": "#/$defs/ShellOutputPotential",
693
+ "unevaluatedProperties": false
694
+ },
695
+ "ResourceMaterialized": {
696
+ "$anchor": "ResourceMaterialized",
697
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
698
+ "type": "object",
699
+ "allOf": [
700
+ {
701
+ "$ref": "#/$defs/ShellMaterializedBase"
702
+ },
703
+ {
704
+ "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
705
+ "$ref": "#/$defs/NucleusFacet"
706
+ }
707
+ ],
708
+ "unevaluatedProperties": false
709
+ },
710
+ "RoleBindings": {
711
+ "$anchor": "RoleBindings",
712
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
713
+ "type": "object",
714
+ "required": [
715
+ "inputBindings",
716
+ "outputBindings"
717
+ ],
718
+ "properties": {
719
+ "inputBindings": {
720
+ "$ref": "#/$defs/RoleBindingArray"
721
+ },
722
+ "outputBindings": {
723
+ "$ref": "#/$defs/RoleBindingArray"
724
+ }
725
+ }
726
+ },
727
+ "ShellMissing": {
728
+ "$anchor": "ShellMissing",
729
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
730
+ "type": "object",
731
+ "properties": {
732
+ "resourceKind": {
733
+ "const": "missing"
734
+ }
735
+ },
736
+ "allOf": [
737
+ {
738
+ "$ref": "#/$defs/ResourceShellBase"
739
+ },
740
+ {
741
+ "$ref": "#/$defs/ResourceKindFacet"
742
+ }
743
+ ],
744
+ "unevaluatedProperties": false
745
+ },
746
+ "ShellInputPotential": {
747
+ "$anchor": "ShellInputPotential",
748
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
749
+ "type": "object",
750
+ "properties": {
751
+ "resourceKind": {
752
+ "const": "input-potential"
753
+ }
754
+ },
755
+ "allOf": [
756
+ {
757
+ "$ref": "#/$defs/ResourceShellBase"
758
+ },
759
+ {
760
+ "$ref": "#/$defs/CreationContextFacet"
761
+ },
762
+ {
763
+ "$ref": "#/$defs/ResourceKindFacet"
764
+ }
765
+ ],
766
+ "unevaluatedProperties": false
767
+ },
768
+ "ShellOutputPotential": {
769
+ "$anchor": "ShellOutputPotential",
770
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
771
+ "type": "object",
772
+ "properties": {
773
+ "resourceKind": {
774
+ "const": "output-potential"
775
+ }
776
+ },
777
+ "allOf": [
778
+ {
779
+ "$ref": "#/$defs/ResourceShellBase"
780
+ },
781
+ {
782
+ "$ref": "#/$defs/CreationContextFacet"
783
+ },
784
+ {
785
+ "$ref": "#/$defs/ResourceKindFacet"
786
+ }
787
+ ],
788
+ "unevaluatedProperties": false
789
+ },
790
+ "ShellMaterializedBase": {
791
+ "$anchor": "ShellMaterializedBase",
792
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
793
+ "type": "object",
794
+ "required": [
795
+ "version"
796
+ ],
797
+ "properties": {
798
+ "version": {
799
+ "const": 1
800
+ },
801
+ "resourceKind": {
802
+ "const": "materialized"
803
+ }
804
+ },
805
+ "allOf": [
806
+ {
807
+ "$ref": "#/$defs/ResourceShellBase"
808
+ },
809
+ {
810
+ "$ref": "#/$defs/CreationContextFacet"
811
+ },
812
+ {
813
+ "$ref": "#/$defs/ResourceKindFacet"
814
+ },
815
+ {
816
+ "$ref": "#/$defs/TimestampFacet"
817
+ },
818
+ {
819
+ "$ref": "#/$defs/PathFacet"
820
+ }
821
+ ]
822
+ },
823
+ "NucleusFacet": {
824
+ "$anchor": "NucleusFacet",
825
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
826
+ "type": "object",
827
+ "required": [
828
+ "nucleus"
829
+ ],
830
+ "properties": {
831
+ "nucleus": {
832
+ "$ref": "#/$defs/Nucleus"
833
+ }
834
+ }
835
+ },
836
+ "RoleBindingArray": {
837
+ "$anchor": "RoleBindingArray",
838
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
839
+ "type": "array",
840
+ "items": {
841
+ "$ref": "#/$defs/ResourceRoleIdentity"
842
+ }
843
+ },
844
+ "ResourceShellBase": {
845
+ "$anchor": "ResourceShellBase",
846
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
847
+ "type": "object",
848
+ "required": [
849
+ "identity",
850
+ "resourceTypeHandle",
851
+ "resourceKind"
852
+ ],
853
+ "properties": {
854
+ "identity": {
855
+ "$ref": "#/$defs/ResourceIdentity"
856
+ },
857
+ "resourceTypeHandle": {
858
+ "$ref": "#/$defs/ResourceTypeIdentity"
859
+ },
860
+ "resourceKind": {
861
+ "$ref": "#/$defs/ResourceKind"
862
+ }
863
+ }
864
+ },
865
+ "ResourceKindFacet": {
866
+ "$anchor": "ResourceKindFacet",
867
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
868
+ "type": "object",
869
+ "required": [
870
+ "resourceKind"
871
+ ],
872
+ "properties": {
873
+ "resourceKind": {
874
+ "$ref": "#/$defs/ResourceKind"
875
+ }
876
+ }
877
+ },
878
+ "CreationContextFacet": {
879
+ "$anchor": "CreationContextFacet",
880
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
881
+ "type": "object",
882
+ "required": [
883
+ "creationContext"
884
+ ],
885
+ "properties": {
886
+ "creationContext": {
887
+ "$ref": "#/$defs/CreationContext"
888
+ }
889
+ }
890
+ },
891
+ "TimestampFacet": {
892
+ "$anchor": "TimestampFacet",
893
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
894
+ "type": "object",
895
+ "required": [
896
+ "timestamp"
897
+ ],
898
+ "properties": {
899
+ "timestamp": {
900
+ "$ref": "#/$defs/Timestamp"
901
+ }
902
+ }
903
+ },
904
+ "PathFacet": {
905
+ "$anchor": "PathFacet",
906
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
907
+ "type": "object",
908
+ "required": [
909
+ "path"
910
+ ],
911
+ "properties": {
912
+ "path": {
913
+ "$ref": "#/$defs/Path"
914
+ }
915
+ }
916
+ },
917
+ "Nucleus": {
918
+ "$anchor": "Nucleus",
919
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
920
+ "type": "object",
921
+ "additionalProperties": {
922
+ "$ref": "#/$defs/JsonData"
923
+ }
924
+ },
925
+ "ResourceIdentity": {
926
+ "$anchor": "ResourceIdentity",
927
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
928
+ "type": "string",
929
+ "pattern": "^RESOURCE-.+$"
930
+ },
931
+ "ResourceTypeIdentity": {
932
+ "$anchor": "ResourceTypeIdentity",
933
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
934
+ "type": "string",
935
+ "pattern": "^TYPE-.+$"
936
+ },
937
+ "ResourceKind": {
938
+ "$anchor": "ResourceKind",
939
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
940
+ "type": "string",
941
+ "enum": [
942
+ "missing",
943
+ "input-potential",
944
+ "output-potential",
945
+ "materialized"
946
+ ]
947
+ },
948
+ "CreationContext": {
949
+ "$anchor": "CreationContext",
950
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
951
+ "type": "object",
952
+ "required": [
953
+ "resourceRoleHandle",
954
+ "jobStepHandle"
955
+ ],
956
+ "properties": {
957
+ "resourceRoleHandle": {
958
+ "$ref": "#/$defs/ResourceRoleIdentity"
959
+ },
960
+ "jobStepHandle": {
961
+ "$ref": "#/$defs/JobStepIdentity"
962
+ }
963
+ }
964
+ },
965
+ "Path": {
966
+ "$anchor": "Path",
967
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
968
+ "type": "string",
969
+ "format": "uri-reference"
970
+ },
971
+ "JsonData": {
972
+ "$anchor": "JsonData",
973
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
974
+ "oneOf": [
975
+ {
976
+ "type": "null"
977
+ },
978
+ {
979
+ "type": "boolean"
980
+ },
981
+ {
982
+ "type": "number"
983
+ },
984
+ {
985
+ "type": "string"
986
+ },
987
+ {
988
+ "type": "array",
989
+ "items": {
990
+ "$ref": "#/$defs/JsonData"
991
+ }
992
+ },
993
+ {
994
+ "type": "object",
995
+ "additionalProperties": {
996
+ "$ref": "#/$defs/JsonData"
997
+ }
998
+ }
999
+ ]
1000
+ }
1001
+ }
1002
+ }