@modernedi/configuration-runner 0.2.0-rc.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.
@@ -0,0 +1,446 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://www.modernedi.com/schemas/configuration-runner/v1/configuration-plan-artifact.schema.json",
4
+ "title": "ModernEDI Configuration Plan Artifact",
5
+ "description": "Deterministic review artifact emitted by @modernedi/configuration-runner.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "apiVersion",
10
+ "kind",
11
+ "desiredBundleSha256",
12
+ "planSha256",
13
+ "plan"
14
+ ],
15
+ "properties": {
16
+ "apiVersion": {
17
+ "const": "modernedi.com/configuration-runner/v1"
18
+ },
19
+ "kind": {
20
+ "const": "ConfigurationPlanArtifact"
21
+ },
22
+ "desiredBundleSha256": {
23
+ "$ref": "#/$defs/sha256"
24
+ },
25
+ "planSha256": {
26
+ "$ref": "#/$defs/nullableSha256"
27
+ },
28
+ "plan": {
29
+ "$ref": "#/$defs/plan"
30
+ }
31
+ },
32
+ "$defs": {
33
+ "sha256": {
34
+ "type": "string",
35
+ "pattern": "^[0-9a-f]{64}$"
36
+ },
37
+ "nullableSha256": {
38
+ "anyOf": [
39
+ {
40
+ "$ref": "#/$defs/sha256"
41
+ },
42
+ {
43
+ "type": "null"
44
+ }
45
+ ]
46
+ },
47
+ "etag": {
48
+ "type": "string",
49
+ "pattern": "^\"[0-9a-f]{64}\"$"
50
+ },
51
+ "resourceKind": {
52
+ "type": "string",
53
+ "enum": [
54
+ "As2Connection",
55
+ "Partner",
56
+ "Mapping",
57
+ "ScenarioDefinition",
58
+ "ScenarioBinding"
59
+ ]
60
+ },
61
+ "action": {
62
+ "type": "string",
63
+ "enum": [
64
+ "CREATE",
65
+ "UPDATE",
66
+ "DELETE"
67
+ ]
68
+ },
69
+ "summary": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": [
73
+ "create",
74
+ "update",
75
+ "delete",
76
+ "unchanged"
77
+ ],
78
+ "properties": {
79
+ "create": {
80
+ "type": "integer",
81
+ "minimum": 0
82
+ },
83
+ "update": {
84
+ "type": "integer",
85
+ "minimum": 0
86
+ },
87
+ "delete": {
88
+ "type": "integer",
89
+ "minimum": 0
90
+ },
91
+ "unchanged": {
92
+ "type": "integer",
93
+ "minimum": 0
94
+ }
95
+ }
96
+ },
97
+ "validationContext": {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": [
101
+ "syntaxTreeCatalogRevision",
102
+ "syntaxTreeCatalogManifestSha256"
103
+ ],
104
+ "properties": {
105
+ "syntaxTreeCatalogRevision": {
106
+ "type": [
107
+ "string",
108
+ "null"
109
+ ]
110
+ },
111
+ "syntaxTreeCatalogManifestSha256": {
112
+ "$ref": "#/$defs/nullableSha256"
113
+ },
114
+ "scenarioAuthorityEtag": {
115
+ "$ref": "#/$defs/etag"
116
+ }
117
+ }
118
+ },
119
+ "currentValue": {
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "required": [
123
+ "resourceId",
124
+ "contentSha256",
125
+ "apiEtag"
126
+ ],
127
+ "properties": {
128
+ "resourceId": {
129
+ "type": "integer",
130
+ "minimum": 1
131
+ },
132
+ "contentSha256": {
133
+ "$ref": "#/$defs/sha256"
134
+ },
135
+ "apiEtag": {
136
+ "$ref": "#/$defs/etag"
137
+ }
138
+ }
139
+ },
140
+ "desiredValue": {
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": [
144
+ "contentSha256"
145
+ ],
146
+ "properties": {
147
+ "contentSha256": {
148
+ "$ref": "#/$defs/sha256"
149
+ }
150
+ }
151
+ },
152
+ "operation": {
153
+ "type": "object",
154
+ "additionalProperties": false,
155
+ "required": [
156
+ "action",
157
+ "kind",
158
+ "key",
159
+ "path"
160
+ ],
161
+ "properties": {
162
+ "action": {
163
+ "$ref": "#/$defs/action"
164
+ },
165
+ "kind": {
166
+ "$ref": "#/$defs/resourceKind"
167
+ },
168
+ "key": {
169
+ "type": "string",
170
+ "format": "uuid"
171
+ },
172
+ "path": {
173
+ "type": "string",
174
+ "minLength": 1
175
+ },
176
+ "current": {
177
+ "$ref": "#/$defs/currentValue"
178
+ },
179
+ "desired": {
180
+ "$ref": "#/$defs/desiredValue"
181
+ }
182
+ }
183
+ },
184
+ "resourceIdentity": {
185
+ "type": "object",
186
+ "additionalProperties": false,
187
+ "required": [
188
+ "kind",
189
+ "key"
190
+ ],
191
+ "properties": {
192
+ "kind": {
193
+ "$ref": "#/$defs/resourceKind"
194
+ },
195
+ "key": {
196
+ "type": "string",
197
+ "format": "uuid"
198
+ }
199
+ }
200
+ },
201
+ "diagnostic": {
202
+ "type": "object",
203
+ "additionalProperties": false,
204
+ "required": [
205
+ "severity",
206
+ "code",
207
+ "message",
208
+ "pointer"
209
+ ],
210
+ "properties": {
211
+ "severity": {
212
+ "type": "string",
213
+ "enum": [
214
+ "ERROR",
215
+ "WARNING"
216
+ ]
217
+ },
218
+ "code": {
219
+ "type": "string",
220
+ "minLength": 1
221
+ },
222
+ "message": {
223
+ "type": "string",
224
+ "minLength": 1
225
+ },
226
+ "pointer": {
227
+ "type": "string"
228
+ },
229
+ "filePath": {
230
+ "type": "string"
231
+ },
232
+ "resource": {
233
+ "$ref": "#/$defs/resourceIdentity"
234
+ },
235
+ "line": {
236
+ "type": "integer",
237
+ "minimum": 1
238
+ },
239
+ "column": {
240
+ "type": "integer",
241
+ "minimum": 1
242
+ }
243
+ }
244
+ },
245
+ "scenarioResource": {
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "required": [
249
+ "kind",
250
+ "key",
251
+ "action"
252
+ ],
253
+ "properties": {
254
+ "kind": {
255
+ "$ref": "#/$defs/resourceKind"
256
+ },
257
+ "key": {
258
+ "type": "string",
259
+ "format": "uuid"
260
+ },
261
+ "action": {
262
+ "$ref": "#/$defs/action"
263
+ }
264
+ }
265
+ },
266
+ "scenarioDefinition": {
267
+ "type": "object",
268
+ "additionalProperties": false,
269
+ "required": [
270
+ "namespace",
271
+ "key",
272
+ "version"
273
+ ],
274
+ "properties": {
275
+ "namespace": {
276
+ "type": "string"
277
+ },
278
+ "key": {
279
+ "type": "string"
280
+ },
281
+ "version": {
282
+ "type": "string"
283
+ }
284
+ }
285
+ },
286
+ "affectedScenario": {
287
+ "type": "object",
288
+ "additionalProperties": false,
289
+ "required": [
290
+ "bindingId",
291
+ "revision",
292
+ "name",
293
+ "environment",
294
+ "definition",
295
+ "effect",
296
+ "resources"
297
+ ],
298
+ "properties": {
299
+ "bindingId": {
300
+ "type": "string",
301
+ "minLength": 1
302
+ },
303
+ "revision": {
304
+ "type": "integer",
305
+ "minimum": 0
306
+ },
307
+ "name": {
308
+ "type": "string",
309
+ "minLength": 1
310
+ },
311
+ "environment": {
312
+ "type": "string",
313
+ "enum": [
314
+ "production",
315
+ "test"
316
+ ]
317
+ },
318
+ "definition": {
319
+ "$ref": "#/$defs/scenarioDefinition"
320
+ },
321
+ "effect": {
322
+ "enum": [
323
+ "REAPPLY_REQUIRED",
324
+ "REAPPLIED_BY_APPLY",
325
+ "RETIRED_BY_APPLY"
326
+ ]
327
+ },
328
+ "resources": {
329
+ "type": "array",
330
+ "minItems": 1,
331
+ "items": {
332
+ "$ref": "#/$defs/scenarioResource"
333
+ }
334
+ }
335
+ }
336
+ },
337
+ "affectedRun": {
338
+ "type": "object",
339
+ "additionalProperties": false,
340
+ "required": [
341
+ "runId",
342
+ "bindingId",
343
+ "bindingRevision",
344
+ "effect",
345
+ "resources"
346
+ ],
347
+ "properties": {
348
+ "runId": {
349
+ "type": "string",
350
+ "minLength": 1
351
+ },
352
+ "bindingId": {
353
+ "type": "string",
354
+ "minLength": 1
355
+ },
356
+ "bindingRevision": {
357
+ "type": "integer",
358
+ "minimum": 0
359
+ },
360
+ "effect": {
361
+ "const": "CANCEL_OR_COMPLETE_REQUIRED"
362
+ },
363
+ "resources": {
364
+ "type": "array",
365
+ "minItems": 1,
366
+ "items": {
367
+ "$ref": "#/$defs/scenarioResource"
368
+ }
369
+ }
370
+ }
371
+ },
372
+ "plan": {
373
+ "type": "object",
374
+ "additionalProperties": false,
375
+ "required": [
376
+ "success",
377
+ "applicable",
378
+ "desiredBundleSha256",
379
+ "currentSnapshotEtag",
380
+ "runtimeConfigurationRevision",
381
+ "validationContext",
382
+ "planSha256",
383
+ "summary",
384
+ "operations",
385
+ "diagnostics",
386
+ "scenarioImpactComplete",
387
+ "affectedScenarios",
388
+ "affectedRuns"
389
+ ],
390
+ "properties": {
391
+ "success": {
392
+ "const": true
393
+ },
394
+ "applicable": {
395
+ "type": "boolean"
396
+ },
397
+ "desiredBundleSha256": {
398
+ "$ref": "#/$defs/sha256"
399
+ },
400
+ "currentSnapshotEtag": {
401
+ "$ref": "#/$defs/etag"
402
+ },
403
+ "runtimeConfigurationRevision": {
404
+ "type": "integer",
405
+ "minimum": 0
406
+ },
407
+ "validationContext": {
408
+ "$ref": "#/$defs/validationContext"
409
+ },
410
+ "planSha256": {
411
+ "$ref": "#/$defs/nullableSha256"
412
+ },
413
+ "summary": {
414
+ "$ref": "#/$defs/summary"
415
+ },
416
+ "operations": {
417
+ "type": "array",
418
+ "items": {
419
+ "$ref": "#/$defs/operation"
420
+ }
421
+ },
422
+ "diagnostics": {
423
+ "type": "array",
424
+ "items": {
425
+ "$ref": "#/$defs/diagnostic"
426
+ }
427
+ },
428
+ "scenarioImpactComplete": {
429
+ "type": "boolean"
430
+ },
431
+ "affectedScenarios": {
432
+ "type": "array",
433
+ "items": {
434
+ "$ref": "#/$defs/affectedScenario"
435
+ }
436
+ },
437
+ "affectedRuns": {
438
+ "type": "array",
439
+ "items": {
440
+ "$ref": "#/$defs/affectedRun"
441
+ }
442
+ }
443
+ }
444
+ }
445
+ }
446
+ }