@substrat-run/contract-tests 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,727 @@
1
+ import type { ModuleRegistration, OperationHandler } from '@substrat-run/kernel';
2
+ export declare const testModManifest: {
3
+ id: string & import("zod").BRAND<"ModuleId">;
4
+ permissions: {
5
+ key: string & import("zod").BRAND<"PermissionKey">;
6
+ description: string;
7
+ }[];
8
+ version: string;
9
+ kernelContract: string;
10
+ events: {
11
+ emits: {
12
+ type: string;
13
+ schemaVersion: number;
14
+ }[];
15
+ consumes: {
16
+ type: string;
17
+ schemaVersion: number;
18
+ }[];
19
+ };
20
+ migrations: {
21
+ journalDir: string;
22
+ compatibleFrom: string;
23
+ };
24
+ attachmentTargets: {
25
+ entityType: string;
26
+ readPermission: string & import("zod").BRAND<"PermissionKey">;
27
+ }[];
28
+ entitlementKey: string;
29
+ entityRelations?: {
30
+ entityType: string;
31
+ parentType: string;
32
+ }[] | undefined;
33
+ guards?: {
34
+ before: string;
35
+ predicate: string;
36
+ config: Record<string, unknown>;
37
+ }[] | undefined;
38
+ withdraws?: string[] | undefined;
39
+ api?: string | undefined;
40
+ searchables?: {
41
+ entityType: string;
42
+ fields: string[];
43
+ }[] | undefined;
44
+ ui?: {
45
+ routes?: {
46
+ path: string;
47
+ permission: string & import("zod").BRAND<"PermissionKey">;
48
+ screen: string;
49
+ }[] | undefined;
50
+ nav?: {
51
+ permission: string & import("zod").BRAND<"PermissionKey">;
52
+ label: string;
53
+ to: string;
54
+ icon?: string | undefined;
55
+ }[] | undefined;
56
+ entityViews?: {
57
+ entityType: string;
58
+ view: string;
59
+ }[] | undefined;
60
+ widgets?: {
61
+ permission: string & import("zod").BRAND<"PermissionKey">;
62
+ slot: string;
63
+ component: string;
64
+ }[] | undefined;
65
+ settingsPanels?: {
66
+ permission: string & import("zod").BRAND<"PermissionKey">;
67
+ label: string;
68
+ component: string;
69
+ }[] | undefined;
70
+ } | undefined;
71
+ };
72
+ export declare const flowModManifest: {
73
+ id: string & import("zod").BRAND<"ModuleId">;
74
+ permissions: {
75
+ key: string & import("zod").BRAND<"PermissionKey">;
76
+ description: string;
77
+ }[];
78
+ version: string;
79
+ kernelContract: string;
80
+ events: {
81
+ emits: {
82
+ type: string;
83
+ schemaVersion: number;
84
+ }[];
85
+ consumes: {
86
+ type: string;
87
+ schemaVersion: number;
88
+ }[];
89
+ };
90
+ migrations: {
91
+ journalDir: string;
92
+ compatibleFrom: string;
93
+ };
94
+ attachmentTargets: {
95
+ entityType: string;
96
+ readPermission: string & import("zod").BRAND<"PermissionKey">;
97
+ }[];
98
+ entitlementKey: string;
99
+ entityRelations?: {
100
+ entityType: string;
101
+ parentType: string;
102
+ }[] | undefined;
103
+ guards?: {
104
+ before: string;
105
+ predicate: string;
106
+ config: Record<string, unknown>;
107
+ }[] | undefined;
108
+ withdraws?: string[] | undefined;
109
+ api?: string | undefined;
110
+ searchables?: {
111
+ entityType: string;
112
+ fields: string[];
113
+ }[] | undefined;
114
+ ui?: {
115
+ routes?: {
116
+ path: string;
117
+ permission: string & import("zod").BRAND<"PermissionKey">;
118
+ screen: string;
119
+ }[] | undefined;
120
+ nav?: {
121
+ permission: string & import("zod").BRAND<"PermissionKey">;
122
+ label: string;
123
+ to: string;
124
+ icon?: string | undefined;
125
+ }[] | undefined;
126
+ entityViews?: {
127
+ entityType: string;
128
+ view: string;
129
+ }[] | undefined;
130
+ widgets?: {
131
+ permission: string & import("zod").BRAND<"PermissionKey">;
132
+ slot: string;
133
+ component: string;
134
+ }[] | undefined;
135
+ settingsPanels?: {
136
+ permission: string & import("zod").BRAND<"PermissionKey">;
137
+ label: string;
138
+ component: string;
139
+ }[] | undefined;
140
+ } | undefined;
141
+ };
142
+ export declare const lateModManifest: {
143
+ id: string & import("zod").BRAND<"ModuleId">;
144
+ permissions: {
145
+ key: string & import("zod").BRAND<"PermissionKey">;
146
+ description: string;
147
+ }[];
148
+ version: string;
149
+ kernelContract: string;
150
+ events: {
151
+ emits: {
152
+ type: string;
153
+ schemaVersion: number;
154
+ }[];
155
+ consumes: {
156
+ type: string;
157
+ schemaVersion: number;
158
+ }[];
159
+ };
160
+ migrations: {
161
+ journalDir: string;
162
+ compatibleFrom: string;
163
+ };
164
+ attachmentTargets: {
165
+ entityType: string;
166
+ readPermission: string & import("zod").BRAND<"PermissionKey">;
167
+ }[];
168
+ entitlementKey: string;
169
+ entityRelations?: {
170
+ entityType: string;
171
+ parentType: string;
172
+ }[] | undefined;
173
+ guards?: {
174
+ before: string;
175
+ predicate: string;
176
+ config: Record<string, unknown>;
177
+ }[] | undefined;
178
+ withdraws?: string[] | undefined;
179
+ api?: string | undefined;
180
+ searchables?: {
181
+ entityType: string;
182
+ fields: string[];
183
+ }[] | undefined;
184
+ ui?: {
185
+ routes?: {
186
+ path: string;
187
+ permission: string & import("zod").BRAND<"PermissionKey">;
188
+ screen: string;
189
+ }[] | undefined;
190
+ nav?: {
191
+ permission: string & import("zod").BRAND<"PermissionKey">;
192
+ label: string;
193
+ to: string;
194
+ icon?: string | undefined;
195
+ }[] | undefined;
196
+ entityViews?: {
197
+ entityType: string;
198
+ view: string;
199
+ }[] | undefined;
200
+ widgets?: {
201
+ permission: string & import("zod").BRAND<"PermissionKey">;
202
+ slot: string;
203
+ component: string;
204
+ }[] | undefined;
205
+ settingsPanels?: {
206
+ permission: string & import("zod").BRAND<"PermissionKey">;
207
+ label: string;
208
+ component: string;
209
+ }[] | undefined;
210
+ } | undefined;
211
+ };
212
+ export declare const billedModManifest: {
213
+ id: string & import("zod").BRAND<"ModuleId">;
214
+ permissions: {
215
+ key: string & import("zod").BRAND<"PermissionKey">;
216
+ description: string;
217
+ }[];
218
+ version: string;
219
+ kernelContract: string;
220
+ events: {
221
+ emits: {
222
+ type: string;
223
+ schemaVersion: number;
224
+ }[];
225
+ consumes: {
226
+ type: string;
227
+ schemaVersion: number;
228
+ }[];
229
+ };
230
+ migrations: {
231
+ journalDir: string;
232
+ compatibleFrom: string;
233
+ };
234
+ attachmentTargets: {
235
+ entityType: string;
236
+ readPermission: string & import("zod").BRAND<"PermissionKey">;
237
+ }[];
238
+ entitlementKey: string;
239
+ entityRelations?: {
240
+ entityType: string;
241
+ parentType: string;
242
+ }[] | undefined;
243
+ guards?: {
244
+ before: string;
245
+ predicate: string;
246
+ config: Record<string, unknown>;
247
+ }[] | undefined;
248
+ withdraws?: string[] | undefined;
249
+ api?: string | undefined;
250
+ searchables?: {
251
+ entityType: string;
252
+ fields: string[];
253
+ }[] | undefined;
254
+ ui?: {
255
+ routes?: {
256
+ path: string;
257
+ permission: string & import("zod").BRAND<"PermissionKey">;
258
+ screen: string;
259
+ }[] | undefined;
260
+ nav?: {
261
+ permission: string & import("zod").BRAND<"PermissionKey">;
262
+ label: string;
263
+ to: string;
264
+ icon?: string | undefined;
265
+ }[] | undefined;
266
+ entityViews?: {
267
+ entityType: string;
268
+ view: string;
269
+ }[] | undefined;
270
+ widgets?: {
271
+ permission: string & import("zod").BRAND<"PermissionKey">;
272
+ slot: string;
273
+ component: string;
274
+ }[] | undefined;
275
+ settingsPanels?: {
276
+ permission: string & import("zod").BRAND<"PermissionKey">;
277
+ label: string;
278
+ component: string;
279
+ }[] | undefined;
280
+ } | undefined;
281
+ };
282
+ export declare const guardedModManifest: {
283
+ id: string & import("zod").BRAND<"ModuleId">;
284
+ permissions: {
285
+ key: string & import("zod").BRAND<"PermissionKey">;
286
+ description: string;
287
+ }[];
288
+ version: string;
289
+ kernelContract: string;
290
+ events: {
291
+ emits: {
292
+ type: string;
293
+ schemaVersion: number;
294
+ }[];
295
+ consumes: {
296
+ type: string;
297
+ schemaVersion: number;
298
+ }[];
299
+ };
300
+ migrations: {
301
+ journalDir: string;
302
+ compatibleFrom: string;
303
+ };
304
+ attachmentTargets: {
305
+ entityType: string;
306
+ readPermission: string & import("zod").BRAND<"PermissionKey">;
307
+ }[];
308
+ entitlementKey: string;
309
+ entityRelations?: {
310
+ entityType: string;
311
+ parentType: string;
312
+ }[] | undefined;
313
+ guards?: {
314
+ before: string;
315
+ predicate: string;
316
+ config: Record<string, unknown>;
317
+ }[] | undefined;
318
+ withdraws?: string[] | undefined;
319
+ api?: string | undefined;
320
+ searchables?: {
321
+ entityType: string;
322
+ fields: string[];
323
+ }[] | undefined;
324
+ ui?: {
325
+ routes?: {
326
+ path: string;
327
+ permission: string & import("zod").BRAND<"PermissionKey">;
328
+ screen: string;
329
+ }[] | undefined;
330
+ nav?: {
331
+ permission: string & import("zod").BRAND<"PermissionKey">;
332
+ label: string;
333
+ to: string;
334
+ icon?: string | undefined;
335
+ }[] | undefined;
336
+ entityViews?: {
337
+ entityType: string;
338
+ view: string;
339
+ }[] | undefined;
340
+ widgets?: {
341
+ permission: string & import("zod").BRAND<"PermissionKey">;
342
+ slot: string;
343
+ component: string;
344
+ }[] | undefined;
345
+ settingsPanels?: {
346
+ permission: string & import("zod").BRAND<"PermissionKey">;
347
+ label: string;
348
+ component: string;
349
+ }[] | undefined;
350
+ } | undefined;
351
+ };
352
+ export declare const withdrawEarlyManifest: {
353
+ id: string & import("zod").BRAND<"ModuleId">;
354
+ permissions: {
355
+ key: string & import("zod").BRAND<"PermissionKey">;
356
+ description: string;
357
+ }[];
358
+ version: string;
359
+ kernelContract: string;
360
+ events: {
361
+ emits: {
362
+ type: string;
363
+ schemaVersion: number;
364
+ }[];
365
+ consumes: {
366
+ type: string;
367
+ schemaVersion: number;
368
+ }[];
369
+ };
370
+ migrations: {
371
+ journalDir: string;
372
+ compatibleFrom: string;
373
+ };
374
+ attachmentTargets: {
375
+ entityType: string;
376
+ readPermission: string & import("zod").BRAND<"PermissionKey">;
377
+ }[];
378
+ entitlementKey: string;
379
+ entityRelations?: {
380
+ entityType: string;
381
+ parentType: string;
382
+ }[] | undefined;
383
+ guards?: {
384
+ before: string;
385
+ predicate: string;
386
+ config: Record<string, unknown>;
387
+ }[] | undefined;
388
+ withdraws?: string[] | undefined;
389
+ api?: string | undefined;
390
+ searchables?: {
391
+ entityType: string;
392
+ fields: string[];
393
+ }[] | undefined;
394
+ ui?: {
395
+ routes?: {
396
+ path: string;
397
+ permission: string & import("zod").BRAND<"PermissionKey">;
398
+ screen: string;
399
+ }[] | undefined;
400
+ nav?: {
401
+ permission: string & import("zod").BRAND<"PermissionKey">;
402
+ label: string;
403
+ to: string;
404
+ icon?: string | undefined;
405
+ }[] | undefined;
406
+ entityViews?: {
407
+ entityType: string;
408
+ view: string;
409
+ }[] | undefined;
410
+ widgets?: {
411
+ permission: string & import("zod").BRAND<"PermissionKey">;
412
+ slot: string;
413
+ component: string;
414
+ }[] | undefined;
415
+ settingsPanels?: {
416
+ permission: string & import("zod").BRAND<"PermissionKey">;
417
+ label: string;
418
+ component: string;
419
+ }[] | undefined;
420
+ } | undefined;
421
+ };
422
+ export declare const victimModManifest: {
423
+ id: string & import("zod").BRAND<"ModuleId">;
424
+ permissions: {
425
+ key: string & import("zod").BRAND<"PermissionKey">;
426
+ description: string;
427
+ }[];
428
+ version: string;
429
+ kernelContract: string;
430
+ events: {
431
+ emits: {
432
+ type: string;
433
+ schemaVersion: number;
434
+ }[];
435
+ consumes: {
436
+ type: string;
437
+ schemaVersion: number;
438
+ }[];
439
+ };
440
+ migrations: {
441
+ journalDir: string;
442
+ compatibleFrom: string;
443
+ };
444
+ attachmentTargets: {
445
+ entityType: string;
446
+ readPermission: string & import("zod").BRAND<"PermissionKey">;
447
+ }[];
448
+ entitlementKey: string;
449
+ entityRelations?: {
450
+ entityType: string;
451
+ parentType: string;
452
+ }[] | undefined;
453
+ guards?: {
454
+ before: string;
455
+ predicate: string;
456
+ config: Record<string, unknown>;
457
+ }[] | undefined;
458
+ withdraws?: string[] | undefined;
459
+ api?: string | undefined;
460
+ searchables?: {
461
+ entityType: string;
462
+ fields: string[];
463
+ }[] | undefined;
464
+ ui?: {
465
+ routes?: {
466
+ path: string;
467
+ permission: string & import("zod").BRAND<"PermissionKey">;
468
+ screen: string;
469
+ }[] | undefined;
470
+ nav?: {
471
+ permission: string & import("zod").BRAND<"PermissionKey">;
472
+ label: string;
473
+ to: string;
474
+ icon?: string | undefined;
475
+ }[] | undefined;
476
+ entityViews?: {
477
+ entityType: string;
478
+ view: string;
479
+ }[] | undefined;
480
+ widgets?: {
481
+ permission: string & import("zod").BRAND<"PermissionKey">;
482
+ slot: string;
483
+ component: string;
484
+ }[] | undefined;
485
+ settingsPanels?: {
486
+ permission: string & import("zod").BRAND<"PermissionKey">;
487
+ label: string;
488
+ component: string;
489
+ }[] | undefined;
490
+ } | undefined;
491
+ };
492
+ export declare const withdrawLateManifest: {
493
+ id: string & import("zod").BRAND<"ModuleId">;
494
+ permissions: {
495
+ key: string & import("zod").BRAND<"PermissionKey">;
496
+ description: string;
497
+ }[];
498
+ version: string;
499
+ kernelContract: string;
500
+ events: {
501
+ emits: {
502
+ type: string;
503
+ schemaVersion: number;
504
+ }[];
505
+ consumes: {
506
+ type: string;
507
+ schemaVersion: number;
508
+ }[];
509
+ };
510
+ migrations: {
511
+ journalDir: string;
512
+ compatibleFrom: string;
513
+ };
514
+ attachmentTargets: {
515
+ entityType: string;
516
+ readPermission: string & import("zod").BRAND<"PermissionKey">;
517
+ }[];
518
+ entitlementKey: string;
519
+ entityRelations?: {
520
+ entityType: string;
521
+ parentType: string;
522
+ }[] | undefined;
523
+ guards?: {
524
+ before: string;
525
+ predicate: string;
526
+ config: Record<string, unknown>;
527
+ }[] | undefined;
528
+ withdraws?: string[] | undefined;
529
+ api?: string | undefined;
530
+ searchables?: {
531
+ entityType: string;
532
+ fields: string[];
533
+ }[] | undefined;
534
+ ui?: {
535
+ routes?: {
536
+ path: string;
537
+ permission: string & import("zod").BRAND<"PermissionKey">;
538
+ screen: string;
539
+ }[] | undefined;
540
+ nav?: {
541
+ permission: string & import("zod").BRAND<"PermissionKey">;
542
+ label: string;
543
+ to: string;
544
+ icon?: string | undefined;
545
+ }[] | undefined;
546
+ entityViews?: {
547
+ entityType: string;
548
+ view: string;
549
+ }[] | undefined;
550
+ widgets?: {
551
+ permission: string & import("zod").BRAND<"PermissionKey">;
552
+ slot: string;
553
+ component: string;
554
+ }[] | undefined;
555
+ settingsPanels?: {
556
+ permission: string & import("zod").BRAND<"PermissionKey">;
557
+ label: string;
558
+ component: string;
559
+ }[] | undefined;
560
+ } | undefined;
561
+ };
562
+ export declare const gateModManifest: {
563
+ id: string & import("zod").BRAND<"ModuleId">;
564
+ permissions: {
565
+ key: string & import("zod").BRAND<"PermissionKey">;
566
+ description: string;
567
+ }[];
568
+ version: string;
569
+ kernelContract: string;
570
+ events: {
571
+ emits: {
572
+ type: string;
573
+ schemaVersion: number;
574
+ }[];
575
+ consumes: {
576
+ type: string;
577
+ schemaVersion: number;
578
+ }[];
579
+ };
580
+ migrations: {
581
+ journalDir: string;
582
+ compatibleFrom: string;
583
+ };
584
+ attachmentTargets: {
585
+ entityType: string;
586
+ readPermission: string & import("zod").BRAND<"PermissionKey">;
587
+ }[];
588
+ entitlementKey: string;
589
+ entityRelations?: {
590
+ entityType: string;
591
+ parentType: string;
592
+ }[] | undefined;
593
+ guards?: {
594
+ before: string;
595
+ predicate: string;
596
+ config: Record<string, unknown>;
597
+ }[] | undefined;
598
+ withdraws?: string[] | undefined;
599
+ api?: string | undefined;
600
+ searchables?: {
601
+ entityType: string;
602
+ fields: string[];
603
+ }[] | undefined;
604
+ ui?: {
605
+ routes?: {
606
+ path: string;
607
+ permission: string & import("zod").BRAND<"PermissionKey">;
608
+ screen: string;
609
+ }[] | undefined;
610
+ nav?: {
611
+ permission: string & import("zod").BRAND<"PermissionKey">;
612
+ label: string;
613
+ to: string;
614
+ icon?: string | undefined;
615
+ }[] | undefined;
616
+ entityViews?: {
617
+ entityType: string;
618
+ view: string;
619
+ }[] | undefined;
620
+ widgets?: {
621
+ permission: string & import("zod").BRAND<"PermissionKey">;
622
+ slot: string;
623
+ component: string;
624
+ }[] | undefined;
625
+ settingsPanels?: {
626
+ permission: string & import("zod").BRAND<"PermissionKey">;
627
+ label: string;
628
+ component: string;
629
+ }[] | undefined;
630
+ } | undefined;
631
+ };
632
+ export declare const permModManifest: {
633
+ id: string & import("zod").BRAND<"ModuleId">;
634
+ permissions: {
635
+ key: string & import("zod").BRAND<"PermissionKey">;
636
+ description: string;
637
+ }[];
638
+ version: string;
639
+ kernelContract: string;
640
+ events: {
641
+ emits: {
642
+ type: string;
643
+ schemaVersion: number;
644
+ }[];
645
+ consumes: {
646
+ type: string;
647
+ schemaVersion: number;
648
+ }[];
649
+ };
650
+ migrations: {
651
+ journalDir: string;
652
+ compatibleFrom: string;
653
+ };
654
+ attachmentTargets: {
655
+ entityType: string;
656
+ readPermission: string & import("zod").BRAND<"PermissionKey">;
657
+ }[];
658
+ entitlementKey: string;
659
+ entityRelations?: {
660
+ entityType: string;
661
+ parentType: string;
662
+ }[] | undefined;
663
+ guards?: {
664
+ before: string;
665
+ predicate: string;
666
+ config: Record<string, unknown>;
667
+ }[] | undefined;
668
+ withdraws?: string[] | undefined;
669
+ api?: string | undefined;
670
+ searchables?: {
671
+ entityType: string;
672
+ fields: string[];
673
+ }[] | undefined;
674
+ ui?: {
675
+ routes?: {
676
+ path: string;
677
+ permission: string & import("zod").BRAND<"PermissionKey">;
678
+ screen: string;
679
+ }[] | undefined;
680
+ nav?: {
681
+ permission: string & import("zod").BRAND<"PermissionKey">;
682
+ label: string;
683
+ to: string;
684
+ icon?: string | undefined;
685
+ }[] | undefined;
686
+ entityViews?: {
687
+ entityType: string;
688
+ view: string;
689
+ }[] | undefined;
690
+ widgets?: {
691
+ permission: string & import("zod").BRAND<"PermissionKey">;
692
+ slot: string;
693
+ component: string;
694
+ }[] | undefined;
695
+ settingsPanels?: {
696
+ permission: string & import("zod").BRAND<"PermissionKey">;
697
+ label: string;
698
+ component: string;
699
+ }[] | undefined;
700
+ } | undefined;
701
+ };
702
+ export declare const contractTestBareOps: Record<string, OperationHandler<never, unknown>>;
703
+ export declare const testMod: ModuleRegistration;
704
+ export declare const flowMod: ModuleRegistration;
705
+ export declare const guardedMod: ModuleRegistration;
706
+ export declare const gateMod: ModuleRegistration;
707
+ export declare const withdrawEarlyMod: ModuleRegistration;
708
+ export declare const victimMod: ModuleRegistration;
709
+ export declare const withdrawLateMod: ModuleRegistration;
710
+ export declare const lateMod: ModuleRegistration;
711
+ export declare const billedMod: ModuleRegistration;
712
+ export declare const permMod: ModuleRegistration;
713
+ /**
714
+ * The modules the scope-host suite's `beforeAll` registers, in the exact order
715
+ * the original inline registration used — order carries meaning: the early
716
+ * withdrawer precedes @test/victim, the late withdrawer follows it, and the
717
+ * guarded module precedes the gate that supplies its predicate.
718
+ */
719
+ export declare const contractTestInitialModules: ModuleRegistration[];
720
+ /**
721
+ * Every module a CF ScopeDO must carry to serve BOTH suites — the initial set
722
+ * plus the ones the suites register mid-test (`lateMod`, `billedMod`) and the
723
+ * permission suite's module. The DO closes over all of them at construction; the
724
+ * facade still gates/withdraws exactly as each suite drives it.
725
+ */
726
+ export declare const contractTestModules: ModuleRegistration[];
727
+ //# sourceMappingURL=modules.d.ts.map