@inventarch/service-contracts 0.0.0-stage → 1.1.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,484 @@
1
+ import { z } from 'zod';
2
+ export declare const installationPointer: z.ZodObject<{
3
+ formatVersion: z.ZodLiteral<1>;
4
+ generation: z.ZodString;
5
+ previous: z.ZodNullable<z.ZodString>;
6
+ counter: z.ZodNumber;
7
+ }, z.core.$strict>;
8
+ export declare const installationSource: z.ZodObject<{
9
+ workspaceId: z.ZodString;
10
+ revisionId: z.ZodString;
11
+ generation: z.ZodNumber;
12
+ }, z.core.$strict>;
13
+ export declare const installationPlanRequest: z.ZodObject<{
14
+ commandId: z.ZodString;
15
+ source: z.ZodObject<{
16
+ workspaceId: z.ZodString;
17
+ revisionId: z.ZodString;
18
+ generation: z.ZodNumber;
19
+ }, z.core.$strict>;
20
+ acquisitionId: z.ZodString;
21
+ operation: z.ZodEnum<{
22
+ install: "install";
23
+ update: "update";
24
+ remove: "remove";
25
+ }>;
26
+ }, z.core.$strict>;
27
+ export declare const installationReviewRequest: z.ZodObject<{
28
+ commandId: z.ZodString;
29
+ planId: z.ZodString;
30
+ digest: z.ZodString;
31
+ accept: z.ZodBoolean;
32
+ rationale: z.ZodString;
33
+ }, z.core.$strict>;
34
+ export declare const installationApplyRequest: z.ZodObject<{
35
+ commandId: z.ZodString;
36
+ planId: z.ZodString;
37
+ digest: z.ZodString;
38
+ decisionId: z.ZodString;
39
+ }, z.core.$strict>;
40
+ export declare const installationChanges: z.ZodObject<{
41
+ added: z.ZodArray<z.ZodString>;
42
+ removed: z.ZodArray<z.ZodString>;
43
+ updated: z.ZodArray<z.ZodString>;
44
+ shadowed: z.ZodArray<z.ZodString>;
45
+ }, z.core.$strict>;
46
+ export declare const installationPrepared: z.ZodObject<{
47
+ state: z.ZodLiteral<"prepared">;
48
+ planId: z.ZodString;
49
+ digest: z.ZodString;
50
+ source: z.ZodObject<{
51
+ workspaceId: z.ZodString;
52
+ revisionId: z.ZodString;
53
+ generation: z.ZodNumber;
54
+ }, z.core.$strict>;
55
+ acquisitionId: z.ZodString;
56
+ operation: z.ZodEnum<{
57
+ install: "install";
58
+ update: "update";
59
+ remove: "remove";
60
+ }>;
61
+ previous: z.ZodNullable<z.ZodObject<{
62
+ formatVersion: z.ZodLiteral<1>;
63
+ generation: z.ZodString;
64
+ previous: z.ZodNullable<z.ZodString>;
65
+ counter: z.ZodNumber;
66
+ }, z.core.$strict>>;
67
+ pointer: z.ZodObject<{
68
+ formatVersion: z.ZodLiteral<1>;
69
+ generation: z.ZodString;
70
+ previous: z.ZodNullable<z.ZodString>;
71
+ counter: z.ZodNumber;
72
+ }, z.core.$strict>;
73
+ lock: z.ZodObject<{
74
+ formatVersion: z.ZodLiteral<1>;
75
+ engine: z.ZodString;
76
+ requests: z.ZodArray<z.ZodObject<{
77
+ id: z.ZodString;
78
+ range: z.ZodString;
79
+ }, z.core.$strict>>;
80
+ packages: z.ZodArray<z.ZodObject<{
81
+ id: z.ZodString;
82
+ version: z.ZodString;
83
+ archive: z.ZodString;
84
+ manifest: z.ZodString;
85
+ location: z.ZodString;
86
+ dependencies: z.ZodArray<z.ZodString>;
87
+ }, z.core.$strict>>;
88
+ }, z.core.$strict>;
89
+ nativeDigest: z.ZodString;
90
+ policyDigest: z.ZodString;
91
+ validator: z.ZodString;
92
+ decisionDigest: z.ZodString;
93
+ changes: z.ZodObject<{
94
+ added: z.ZodArray<z.ZodString>;
95
+ removed: z.ZodArray<z.ZodString>;
96
+ updated: z.ZodArray<z.ZodString>;
97
+ shadowed: z.ZodArray<z.ZodString>;
98
+ }, z.core.$strict>;
99
+ admission: z.ZodObject<{
100
+ ok: z.ZodBoolean;
101
+ revision: z.ZodString;
102
+ refused: z.ZodNumber;
103
+ diagnostics: z.ZodArray<z.ZodObject<{
104
+ code: z.ZodString;
105
+ path: z.ZodString;
106
+ line: z.ZodNumber;
107
+ }, z.core.$strict>>;
108
+ unavailableChecks: z.ZodArray<z.ZodString>;
109
+ }, z.core.$strict>;
110
+ createdAt: z.ZodString;
111
+ expiresAt: z.ZodString;
112
+ }, z.core.$strict>;
113
+ export declare const installationDecision: z.ZodObject<{
114
+ state: z.ZodEnum<{
115
+ rejected: "rejected";
116
+ reviewed: "reviewed";
117
+ }>;
118
+ planId: z.ZodString;
119
+ digest: z.ZodString;
120
+ decisionId: z.ZodString;
121
+ reviewer: z.ZodString;
122
+ accept: z.ZodBoolean;
123
+ rationale: z.ZodString;
124
+ reviewedAt: z.ZodString;
125
+ }, z.core.$strict>;
126
+ export declare const installationReceipt: z.ZodObject<{
127
+ state: z.ZodLiteral<"applied">;
128
+ planId: z.ZodString;
129
+ digest: z.ZodString;
130
+ decisionId: z.ZodString;
131
+ pointer: z.ZodObject<{
132
+ formatVersion: z.ZodLiteral<1>;
133
+ generation: z.ZodString;
134
+ previous: z.ZodNullable<z.ZodString>;
135
+ counter: z.ZodNumber;
136
+ }, z.core.$strict>;
137
+ source: z.ZodObject<{
138
+ workspaceId: z.ZodString;
139
+ generation: z.ZodNumber;
140
+ draftHead: z.ZodNullable<z.ZodString>;
141
+ activeHead: z.ZodNullable<z.ZodString>;
142
+ revisionId: z.ZodOptional<z.ZodString>;
143
+ admission: z.ZodOptional<z.ZodObject<{
144
+ ok: z.ZodBoolean;
145
+ revision: z.ZodString;
146
+ refused: z.ZodNumber;
147
+ diagnostics: z.ZodArray<z.ZodObject<{
148
+ code: z.ZodString;
149
+ path: z.ZodString;
150
+ line: z.ZodNumber;
151
+ }, z.core.$strict>>;
152
+ unavailableChecks: z.ZodArray<z.ZodString>;
153
+ }, z.core.$strict>>;
154
+ removed: z.ZodOptional<z.ZodArray<z.ZodString>>;
155
+ }, z.core.$strict>;
156
+ appliedAt: z.ZodString;
157
+ }, z.core.$strict>;
158
+ export declare const installationInspectRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
159
+ kind: z.ZodLiteral<"current">;
160
+ }, z.core.$strict>, z.ZodObject<{
161
+ kind: z.ZodLiteral<"plan">;
162
+ planId: z.ZodString;
163
+ }, z.core.$strict>], "kind">;
164
+ export declare const installationCurrent: z.ZodObject<{
165
+ kind: z.ZodLiteral<"current">;
166
+ state: z.ZodEnum<{
167
+ unavailable: "unavailable";
168
+ absent: "absent";
169
+ installed: "installed";
170
+ }>;
171
+ planId: z.ZodNullable<z.ZodString>;
172
+ source: z.ZodNullable<z.ZodObject<{
173
+ workspaceId: z.ZodString;
174
+ revisionId: z.ZodString;
175
+ }, z.core.$strict>>;
176
+ pointer: z.ZodNullable<z.ZodObject<{
177
+ formatVersion: z.ZodLiteral<1>;
178
+ generation: z.ZodString;
179
+ previous: z.ZodNullable<z.ZodString>;
180
+ counter: z.ZodNumber;
181
+ }, z.core.$strict>>;
182
+ lock: z.ZodNullable<z.ZodObject<{
183
+ formatVersion: z.ZodLiteral<1>;
184
+ engine: z.ZodString;
185
+ requests: z.ZodArray<z.ZodObject<{
186
+ id: z.ZodString;
187
+ range: z.ZodString;
188
+ }, z.core.$strict>>;
189
+ packages: z.ZodArray<z.ZodObject<{
190
+ id: z.ZodString;
191
+ version: z.ZodString;
192
+ archive: z.ZodString;
193
+ manifest: z.ZodString;
194
+ location: z.ZodString;
195
+ dependencies: z.ZodArray<z.ZodString>;
196
+ }, z.core.$strict>>;
197
+ }, z.core.$strict>>;
198
+ }, z.core.$strict>;
199
+ export declare const installationInspection: z.ZodObject<{
200
+ kind: z.ZodLiteral<"plan">;
201
+ state: z.ZodEnum<{
202
+ unavailable: "unavailable";
203
+ applied: "applied";
204
+ rejected: "rejected";
205
+ prepared: "prepared";
206
+ reviewed: "reviewed";
207
+ }>;
208
+ planId: z.ZodString;
209
+ prepared: z.ZodNullable<z.ZodObject<{
210
+ state: z.ZodLiteral<"prepared">;
211
+ planId: z.ZodString;
212
+ digest: z.ZodString;
213
+ source: z.ZodObject<{
214
+ workspaceId: z.ZodString;
215
+ revisionId: z.ZodString;
216
+ generation: z.ZodNumber;
217
+ }, z.core.$strict>;
218
+ acquisitionId: z.ZodString;
219
+ operation: z.ZodEnum<{
220
+ install: "install";
221
+ update: "update";
222
+ remove: "remove";
223
+ }>;
224
+ previous: z.ZodNullable<z.ZodObject<{
225
+ formatVersion: z.ZodLiteral<1>;
226
+ generation: z.ZodString;
227
+ previous: z.ZodNullable<z.ZodString>;
228
+ counter: z.ZodNumber;
229
+ }, z.core.$strict>>;
230
+ pointer: z.ZodObject<{
231
+ formatVersion: z.ZodLiteral<1>;
232
+ generation: z.ZodString;
233
+ previous: z.ZodNullable<z.ZodString>;
234
+ counter: z.ZodNumber;
235
+ }, z.core.$strict>;
236
+ lock: z.ZodObject<{
237
+ formatVersion: z.ZodLiteral<1>;
238
+ engine: z.ZodString;
239
+ requests: z.ZodArray<z.ZodObject<{
240
+ id: z.ZodString;
241
+ range: z.ZodString;
242
+ }, z.core.$strict>>;
243
+ packages: z.ZodArray<z.ZodObject<{
244
+ id: z.ZodString;
245
+ version: z.ZodString;
246
+ archive: z.ZodString;
247
+ manifest: z.ZodString;
248
+ location: z.ZodString;
249
+ dependencies: z.ZodArray<z.ZodString>;
250
+ }, z.core.$strict>>;
251
+ }, z.core.$strict>;
252
+ nativeDigest: z.ZodString;
253
+ policyDigest: z.ZodString;
254
+ validator: z.ZodString;
255
+ decisionDigest: z.ZodString;
256
+ changes: z.ZodObject<{
257
+ added: z.ZodArray<z.ZodString>;
258
+ removed: z.ZodArray<z.ZodString>;
259
+ updated: z.ZodArray<z.ZodString>;
260
+ shadowed: z.ZodArray<z.ZodString>;
261
+ }, z.core.$strict>;
262
+ admission: z.ZodObject<{
263
+ ok: z.ZodBoolean;
264
+ revision: z.ZodString;
265
+ refused: z.ZodNumber;
266
+ diagnostics: z.ZodArray<z.ZodObject<{
267
+ code: z.ZodString;
268
+ path: z.ZodString;
269
+ line: z.ZodNumber;
270
+ }, z.core.$strict>>;
271
+ unavailableChecks: z.ZodArray<z.ZodString>;
272
+ }, z.core.$strict>;
273
+ createdAt: z.ZodString;
274
+ expiresAt: z.ZodString;
275
+ }, z.core.$strict>>;
276
+ decision: z.ZodNullable<z.ZodObject<{
277
+ state: z.ZodEnum<{
278
+ rejected: "rejected";
279
+ reviewed: "reviewed";
280
+ }>;
281
+ planId: z.ZodString;
282
+ digest: z.ZodString;
283
+ decisionId: z.ZodString;
284
+ reviewer: z.ZodString;
285
+ accept: z.ZodBoolean;
286
+ rationale: z.ZodString;
287
+ reviewedAt: z.ZodString;
288
+ }, z.core.$strict>>;
289
+ receipt: z.ZodNullable<z.ZodObject<{
290
+ state: z.ZodLiteral<"applied">;
291
+ planId: z.ZodString;
292
+ digest: z.ZodString;
293
+ decisionId: z.ZodString;
294
+ pointer: z.ZodObject<{
295
+ formatVersion: z.ZodLiteral<1>;
296
+ generation: z.ZodString;
297
+ previous: z.ZodNullable<z.ZodString>;
298
+ counter: z.ZodNumber;
299
+ }, z.core.$strict>;
300
+ source: z.ZodObject<{
301
+ workspaceId: z.ZodString;
302
+ generation: z.ZodNumber;
303
+ draftHead: z.ZodNullable<z.ZodString>;
304
+ activeHead: z.ZodNullable<z.ZodString>;
305
+ revisionId: z.ZodOptional<z.ZodString>;
306
+ admission: z.ZodOptional<z.ZodObject<{
307
+ ok: z.ZodBoolean;
308
+ revision: z.ZodString;
309
+ refused: z.ZodNumber;
310
+ diagnostics: z.ZodArray<z.ZodObject<{
311
+ code: z.ZodString;
312
+ path: z.ZodString;
313
+ line: z.ZodNumber;
314
+ }, z.core.$strict>>;
315
+ unavailableChecks: z.ZodArray<z.ZodString>;
316
+ }, z.core.$strict>>;
317
+ removed: z.ZodOptional<z.ZodArray<z.ZodString>>;
318
+ }, z.core.$strict>;
319
+ appliedAt: z.ZodString;
320
+ }, z.core.$strict>>;
321
+ }, z.core.$strict>;
322
+ export declare const installationInspectResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
323
+ kind: z.ZodLiteral<"current">;
324
+ state: z.ZodEnum<{
325
+ unavailable: "unavailable";
326
+ absent: "absent";
327
+ installed: "installed";
328
+ }>;
329
+ planId: z.ZodNullable<z.ZodString>;
330
+ source: z.ZodNullable<z.ZodObject<{
331
+ workspaceId: z.ZodString;
332
+ revisionId: z.ZodString;
333
+ }, z.core.$strict>>;
334
+ pointer: z.ZodNullable<z.ZodObject<{
335
+ formatVersion: z.ZodLiteral<1>;
336
+ generation: z.ZodString;
337
+ previous: z.ZodNullable<z.ZodString>;
338
+ counter: z.ZodNumber;
339
+ }, z.core.$strict>>;
340
+ lock: z.ZodNullable<z.ZodObject<{
341
+ formatVersion: z.ZodLiteral<1>;
342
+ engine: z.ZodString;
343
+ requests: z.ZodArray<z.ZodObject<{
344
+ id: z.ZodString;
345
+ range: z.ZodString;
346
+ }, z.core.$strict>>;
347
+ packages: z.ZodArray<z.ZodObject<{
348
+ id: z.ZodString;
349
+ version: z.ZodString;
350
+ archive: z.ZodString;
351
+ manifest: z.ZodString;
352
+ location: z.ZodString;
353
+ dependencies: z.ZodArray<z.ZodString>;
354
+ }, z.core.$strict>>;
355
+ }, z.core.$strict>>;
356
+ }, z.core.$strict>, z.ZodObject<{
357
+ kind: z.ZodLiteral<"plan">;
358
+ state: z.ZodEnum<{
359
+ unavailable: "unavailable";
360
+ applied: "applied";
361
+ rejected: "rejected";
362
+ prepared: "prepared";
363
+ reviewed: "reviewed";
364
+ }>;
365
+ planId: z.ZodString;
366
+ prepared: z.ZodNullable<z.ZodObject<{
367
+ state: z.ZodLiteral<"prepared">;
368
+ planId: z.ZodString;
369
+ digest: z.ZodString;
370
+ source: z.ZodObject<{
371
+ workspaceId: z.ZodString;
372
+ revisionId: z.ZodString;
373
+ generation: z.ZodNumber;
374
+ }, z.core.$strict>;
375
+ acquisitionId: z.ZodString;
376
+ operation: z.ZodEnum<{
377
+ install: "install";
378
+ update: "update";
379
+ remove: "remove";
380
+ }>;
381
+ previous: z.ZodNullable<z.ZodObject<{
382
+ formatVersion: z.ZodLiteral<1>;
383
+ generation: z.ZodString;
384
+ previous: z.ZodNullable<z.ZodString>;
385
+ counter: z.ZodNumber;
386
+ }, z.core.$strict>>;
387
+ pointer: z.ZodObject<{
388
+ formatVersion: z.ZodLiteral<1>;
389
+ generation: z.ZodString;
390
+ previous: z.ZodNullable<z.ZodString>;
391
+ counter: z.ZodNumber;
392
+ }, z.core.$strict>;
393
+ lock: z.ZodObject<{
394
+ formatVersion: z.ZodLiteral<1>;
395
+ engine: z.ZodString;
396
+ requests: z.ZodArray<z.ZodObject<{
397
+ id: z.ZodString;
398
+ range: z.ZodString;
399
+ }, z.core.$strict>>;
400
+ packages: z.ZodArray<z.ZodObject<{
401
+ id: z.ZodString;
402
+ version: z.ZodString;
403
+ archive: z.ZodString;
404
+ manifest: z.ZodString;
405
+ location: z.ZodString;
406
+ dependencies: z.ZodArray<z.ZodString>;
407
+ }, z.core.$strict>>;
408
+ }, z.core.$strict>;
409
+ nativeDigest: z.ZodString;
410
+ policyDigest: z.ZodString;
411
+ validator: z.ZodString;
412
+ decisionDigest: z.ZodString;
413
+ changes: z.ZodObject<{
414
+ added: z.ZodArray<z.ZodString>;
415
+ removed: z.ZodArray<z.ZodString>;
416
+ updated: z.ZodArray<z.ZodString>;
417
+ shadowed: z.ZodArray<z.ZodString>;
418
+ }, z.core.$strict>;
419
+ admission: z.ZodObject<{
420
+ ok: z.ZodBoolean;
421
+ revision: z.ZodString;
422
+ refused: z.ZodNumber;
423
+ diagnostics: z.ZodArray<z.ZodObject<{
424
+ code: z.ZodString;
425
+ path: z.ZodString;
426
+ line: z.ZodNumber;
427
+ }, z.core.$strict>>;
428
+ unavailableChecks: z.ZodArray<z.ZodString>;
429
+ }, z.core.$strict>;
430
+ createdAt: z.ZodString;
431
+ expiresAt: z.ZodString;
432
+ }, z.core.$strict>>;
433
+ decision: z.ZodNullable<z.ZodObject<{
434
+ state: z.ZodEnum<{
435
+ rejected: "rejected";
436
+ reviewed: "reviewed";
437
+ }>;
438
+ planId: z.ZodString;
439
+ digest: z.ZodString;
440
+ decisionId: z.ZodString;
441
+ reviewer: z.ZodString;
442
+ accept: z.ZodBoolean;
443
+ rationale: z.ZodString;
444
+ reviewedAt: z.ZodString;
445
+ }, z.core.$strict>>;
446
+ receipt: z.ZodNullable<z.ZodObject<{
447
+ state: z.ZodLiteral<"applied">;
448
+ planId: z.ZodString;
449
+ digest: z.ZodString;
450
+ decisionId: z.ZodString;
451
+ pointer: z.ZodObject<{
452
+ formatVersion: z.ZodLiteral<1>;
453
+ generation: z.ZodString;
454
+ previous: z.ZodNullable<z.ZodString>;
455
+ counter: z.ZodNumber;
456
+ }, z.core.$strict>;
457
+ source: z.ZodObject<{
458
+ workspaceId: z.ZodString;
459
+ generation: z.ZodNumber;
460
+ draftHead: z.ZodNullable<z.ZodString>;
461
+ activeHead: z.ZodNullable<z.ZodString>;
462
+ revisionId: z.ZodOptional<z.ZodString>;
463
+ admission: z.ZodOptional<z.ZodObject<{
464
+ ok: z.ZodBoolean;
465
+ revision: z.ZodString;
466
+ refused: z.ZodNumber;
467
+ diagnostics: z.ZodArray<z.ZodObject<{
468
+ code: z.ZodString;
469
+ path: z.ZodString;
470
+ line: z.ZodNumber;
471
+ }, z.core.$strict>>;
472
+ unavailableChecks: z.ZodArray<z.ZodString>;
473
+ }, z.core.$strict>>;
474
+ removed: z.ZodOptional<z.ZodArray<z.ZodString>>;
475
+ }, z.core.$strict>;
476
+ appliedAt: z.ZodString;
477
+ }, z.core.$strict>>;
478
+ }, z.core.$strict>], "kind">;
479
+ export type InstallationPrepared = z.infer<typeof installationPrepared>;
480
+ export type InstallationDecision = z.infer<typeof installationDecision>;
481
+ export type InstallationReceipt = z.infer<typeof installationReceipt>;
482
+ export type InstallationPlanRequest = z.infer<typeof installationPlanRequest>;
483
+ export type InstallationInspectResult = z.infer<typeof installationInspectResult>;
484
+ //# sourceMappingURL=installation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installation.d.ts","sourceRoot":"","sources":["../src/installation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE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oBAAoB,CAAC,CAAC;AACxE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC9E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -0,0 +1,97 @@
1
+ // Browser-only installation shapes. Authority and native derivation remain on the host.
2
+ import { z } from 'zod';
3
+ import { digest, id } from './index.js';
4
+ import { distributionLock } from './marketplace.js';
5
+ import { sourceAdmission, sourceReceipt, sourceReference } from './sources.js';
6
+ const counter = z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
7
+ export const installationPointer = z.strictObject({
8
+ formatVersion: z.literal(1),
9
+ generation: digest,
10
+ previous: digest.nullable(),
11
+ counter: counter.min(1),
12
+ });
13
+ export const installationSource = sourceReference.extend({ generation: counter });
14
+ export const installationPlanRequest = z.strictObject({
15
+ commandId: id,
16
+ source: installationSource,
17
+ acquisitionId: id,
18
+ operation: z.enum(['install', 'update', 'remove']),
19
+ });
20
+ export const installationReviewRequest = z.strictObject({
21
+ commandId: id,
22
+ planId: id,
23
+ digest,
24
+ accept: z.boolean(),
25
+ rationale: z
26
+ .string()
27
+ .min(1)
28
+ .max(4096)
29
+ .refine((text) => text.trim().length > 0),
30
+ });
31
+ export const installationApplyRequest = z.strictObject({ commandId: id, planId: id, digest, decisionId: id });
32
+ export const installationChanges = z.strictObject({
33
+ added: z.array(z.string().min(1).max(256)).max(100),
34
+ removed: z.array(z.string().min(1).max(256)).max(100),
35
+ updated: z.array(z.string().min(1).max(256)).max(100),
36
+ shadowed: z.array(z.string().min(1).max(1024)).max(10_000),
37
+ });
38
+ export const installationPrepared = z.strictObject({
39
+ state: z.literal('prepared'),
40
+ planId: digest,
41
+ digest,
42
+ source: installationSource,
43
+ acquisitionId: id,
44
+ operation: installationPlanRequest.shape.operation,
45
+ previous: installationPointer.nullable(),
46
+ pointer: installationPointer,
47
+ lock: distributionLock,
48
+ nativeDigest: digest,
49
+ policyDigest: digest,
50
+ validator: digest,
51
+ decisionDigest: digest,
52
+ changes: installationChanges,
53
+ admission: sourceAdmission,
54
+ createdAt: z.string().datetime(),
55
+ expiresAt: z.string().datetime(),
56
+ });
57
+ export const installationDecision = z.strictObject({
58
+ state: z.enum(['reviewed', 'rejected']),
59
+ planId: digest,
60
+ digest,
61
+ decisionId: digest,
62
+ reviewer: z.string().min(1).max(512),
63
+ accept: z.boolean(),
64
+ rationale: installationReviewRequest.shape.rationale,
65
+ reviewedAt: z.string().datetime(),
66
+ });
67
+ export const installationReceipt = z.strictObject({
68
+ state: z.literal('applied'),
69
+ planId: digest,
70
+ digest,
71
+ decisionId: digest,
72
+ pointer: installationPointer,
73
+ source: sourceReceipt,
74
+ appliedAt: z.string().datetime(),
75
+ });
76
+ export const installationInspectRequest = z.discriminatedUnion('kind', [
77
+ z.strictObject({ kind: z.literal('current') }),
78
+ z.strictObject({ kind: z.literal('plan'), planId: digest }),
79
+ ]);
80
+ export const installationCurrent = z.strictObject({
81
+ kind: z.literal('current'),
82
+ state: z.enum(['absent', 'installed', 'unavailable']),
83
+ planId: digest.nullable(),
84
+ source: sourceReference.nullable(),
85
+ pointer: installationPointer.nullable(),
86
+ lock: distributionLock.nullable(),
87
+ });
88
+ export const installationInspection = z.strictObject({
89
+ kind: z.literal('plan'),
90
+ state: z.enum(['prepared', 'reviewed', 'rejected', 'applied', 'unavailable']),
91
+ planId: digest,
92
+ prepared: installationPrepared.nullable(),
93
+ decision: installationDecision.nullable(),
94
+ receipt: installationReceipt.nullable(),
95
+ });
96
+ export const installationInspectResult = z.discriminatedUnion('kind', [installationCurrent, installationInspection]);
97
+ //# sourceMappingURL=installation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installation.js","sourceRoot":"","sources":["../src/installation.ts"],"names":[],"mappings":"AAAA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