@toolproof-npm/schema 0.1.19 → 0.1.20

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.
@@ -1,8 +1,8 @@
1
1
  // Auto-generated strict composite type. Do not edit.
2
- export type ResourceData_Job = ResourceDataMetaBase & {
2
+ export type ResourceData_Job = ResourceCanonicalMetaBase & {
3
3
  extractedData: Job;
4
4
  };
5
- export type ResourceDataMetaBase = ResourceBase &
5
+ export type ResourceCanonicalMetaBase = ResourceBase &
6
6
  ResourceKind & {
7
7
  kind: "realized";
8
8
  } & Path &
@@ -3,6 +3,7 @@
3
3
  export type CombinedEntry =
4
4
  | BranchStep
5
5
  | BranchStepId
6
+ | CanonicalRef
6
7
  | ConditionalWrapper
7
8
  | CreationContext
8
9
  | Description
@@ -27,19 +28,18 @@ export type CombinedEntry =
27
28
  | MeritValue
28
29
  | Name
29
30
  | Path
31
+ | PendingRef
30
32
  | ResourceBase
33
+ | ResourceCanonicalMeta
34
+ | ResourceCanonicalMetaBase
31
35
  | ResourceData
32
- | ResourceDataMeta
33
- | ResourceDataMetaBase
34
36
  | ResourceId
35
37
  | ResourceKind
36
38
  | ResourceMap
37
- | ResourceMapPointer
38
39
  | ResourceMeta
39
40
  | ResourcePotentialInput
40
41
  | ResourcePotentialOutput
41
42
  | ResourceSocket
42
- | ResourceStoragePointer
43
43
  | RoleBindingMap
44
44
  | RoleBindingsInner
45
45
  | RoleBindingsOuter1
@@ -308,30 +308,30 @@ export type ResourceBase = Identifiable & {
308
308
  * via the `definition` "TypeId".
309
309
  */
310
310
  export type TypeId = `TYPE-${string}`;
311
+ export type ResourceCanonicalMeta = ResourceBase &
312
+ ResourceKind & {
313
+ kind: "realized";
314
+ } & Path &
315
+ Timestamp;
316
+ /**
317
+ * This interface was referenced by `GenesisJson`'s JSON-Schema
318
+ * via the `definition` "ResourceCanonicalMetaBase".
319
+ */
320
+ export type ResourceCanonicalMetaBase = ResourceBase &
321
+ ResourceKind & {
322
+ kind: "realized";
323
+ } & Path &
324
+ Timestamp;
311
325
  /**
312
326
  * This interface was referenced by `GenesisJson`'s JSON-Schema
313
327
  * via the `definition` "ResourceData".
314
328
  */
315
- export type ResourceData = ResourceDataMetaBase & {
329
+ export type ResourceData = ResourceCanonicalMetaBase & {
316
330
  extractedData: {
317
331
  identity: string | number | boolean;
318
332
  [k: string]: JsonValue;
319
333
  };
320
334
  };
321
- /**
322
- * This interface was referenced by `GenesisJson`'s JSON-Schema
323
- * via the `definition` "ResourceDataMetaBase".
324
- */
325
- export type ResourceDataMetaBase = ResourceBase &
326
- ResourceKind & {
327
- kind: "realized";
328
- } & Path &
329
- Timestamp;
330
- export type ResourceDataMeta = ResourceBase &
331
- ResourceKind & {
332
- kind: "realized";
333
- } & Path &
334
- Timestamp;
335
335
  /**
336
336
  * This interface was referenced by `GenesisJson`'s JSON-Schema
337
337
  * via the `definition` "ResourcePotentialInput".
@@ -339,7 +339,7 @@ export type ResourceDataMeta = ResourceBase &
339
339
  export type ResourcePotentialInput = ResourceBase &
340
340
  ResourceKind & {
341
341
  kind: "potential-input";
342
- } & ResourceMapPointer;
342
+ } & PendingRef;
343
343
  /**
344
344
  * This interface was referenced by `GenesisJson`'s JSON-Schema
345
345
  * via the `definition` "ResourcePotentialOutput".
@@ -352,7 +352,7 @@ export type ResourcePotentialOutput = ResourceBase &
352
352
  * This interface was referenced by `GenesisJson`'s JSON-Schema
353
353
  * via the `definition` "ResourceMeta".
354
354
  */
355
- export type ResourceMeta = ResourceBase & ResourceStoragePointer & Timestamp;
355
+ export type ResourceMeta = ResourceBase & CanonicalRef & Timestamp;
356
356
  /**
357
357
  * This interface was referenced by `GenesisJson`'s JSON-Schema
358
358
  * via the `definition` "RoleLiteral".
@@ -434,9 +434,9 @@ export type WorkflowSpec = Identifiable & {
434
434
  export type WorkflowSpecId = `WORKFLOWSPEC-${string}`;
435
435
  /**
436
436
  * This interface was referenced by `GenesisJson`'s JSON-Schema
437
- * via the `definition` "ResourceDataMeta".
437
+ * via the `definition` "ResourceCanonicalMeta".
438
438
  */
439
- export type ResourceDataMetaBase1 = ResourceBase &
439
+ export type ResourceCanonicalMetaBase1 = ResourceBase &
440
440
  ResourceKind & {
441
441
  kind: "realized";
442
442
  } & Path &
@@ -479,6 +479,13 @@ export interface RoleBindingsInner {
479
479
  * via the `definition` "RoleBindingMap".
480
480
  */
481
481
  export type RoleBindingMap = Record<RoleId, ResourceId>;
482
+ /**
483
+ * This interface was referenced by `GenesisJson`'s JSON-Schema
484
+ * via the `definition` "CanonicalRef".
485
+ */
486
+ export interface CanonicalRef {
487
+ canonicalRef: string;
488
+ }
482
489
  /**
483
490
  * This interface was referenced by `GenesisJson`'s JSON-Schema
484
491
  * via the `definition` "CreationContext".
@@ -584,6 +591,17 @@ export interface Job_RoleMap {
584
591
  export interface Job_Uri {
585
592
  uri: string;
586
593
  }
594
+ /**
595
+ * This interface was referenced by `GenesisJson`'s JSON-Schema
596
+ * via the `definition` "PendingRef".
597
+ */
598
+ export interface PendingRef {
599
+ pendingRef: ResourceSocket1;
600
+ }
601
+ export interface ResourceSocket1 {
602
+ executionId: ExecutionId;
603
+ roleId: RoleId;
604
+ }
587
605
  /**
588
606
  * This interface was referenced by `GenesisJson`'s JSON-Schema
589
607
  * via the `definition` "ResourceKind".
@@ -603,24 +621,6 @@ export interface Timestamp {
603
621
  * via the `definition` "ResourceMap".
604
622
  */
605
623
  export type ResourceMap = Record<ExecutionId, Record<RoleId, ResourcePotential | ResourceData>>;
606
- /**
607
- * This interface was referenced by `GenesisJson`'s JSON-Schema
608
- * via the `definition` "ResourceMapPointer".
609
- */
610
- export interface ResourceMapPointer {
611
- resourceMapPointer: ResourceSocket1;
612
- }
613
- export interface ResourceSocket1 {
614
- executionId: ExecutionId;
615
- roleId: RoleId;
616
- }
617
- /**
618
- * This interface was referenced by `GenesisJson`'s JSON-Schema
619
- * via the `definition` "ResourceStoragePointer".
620
- */
621
- export interface ResourceStoragePointer {
622
- resourceStoragePointer: string;
623
- }
624
624
  /**
625
625
  * This interface was referenced by `GenesisJson`'s JSON-Schema
626
626
  * via the `definition` "RoleBindingsOuter".
@@ -45,6 +45,20 @@
45
45
  "$anchor": "BranchStepId",
46
46
  "pattern": "^BRANCHSTEP-.+$"
47
47
  },
48
+ "CanonicalRef": {
49
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
50
+ "type": "object",
51
+ "properties": {
52
+ "canonicalRef": {
53
+ "$comment": "This points to the canonical resource with an identical contentHash as this one. If no such resource exists, this resource will itself be the canonical resource and point to itself (i.e. canonicalRef = id).",
54
+ "$ref": "#/$defs/ResourceId"
55
+ }
56
+ },
57
+ "required": [
58
+ "canonicalRef"
59
+ ],
60
+ "$anchor": "CanonicalRef"
61
+ },
48
62
  "ConditionalWrapper": {
49
63
  "$schema": "https://json-schema.org/draft/2020-12/schema",
50
64
  "type": "object",
@@ -545,6 +559,20 @@
545
559
  ],
546
560
  "$anchor": "Path"
547
561
  },
562
+ "PendingRef": {
563
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
564
+ "type": "object",
565
+ "properties": {
566
+ "pendingRef": {
567
+ "$comment": "This points to a resource created at a previous step in the same workflow. This resource is not yet realized at the time of defining the workflow, but will be realized when the step using this resource is executed.The Engine resolves this pointer at runtime.",
568
+ "$ref": "#/$defs/ResourceSocket"
569
+ }
570
+ },
571
+ "required": [
572
+ "pendingRef"
573
+ ],
574
+ "$anchor": "PendingRef"
575
+ },
548
576
  "ResourceBase": {
549
577
  "$schema": "https://json-schema.org/draft/2020-12/schema",
550
578
  "type": "object",
@@ -578,12 +606,48 @@
578
606
  ],
579
607
  "$anchor": "ResourceBase"
580
608
  },
609
+ "ResourceCanonicalMeta": {
610
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
611
+ "type": "object",
612
+ "unevaluatedProperties": false,
613
+ "$anchor": "ResourceCanonicalMeta",
614
+ "$ref": "#/$defs/ResourceCanonicalMetaBase"
615
+ },
616
+ "ResourceCanonicalMetaBase": {
617
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
618
+ "type": "object",
619
+ "allOf": [
620
+ {
621
+ "$ref": "#/$defs/ResourceBase"
622
+ },
623
+ {
624
+ "$ref": "#/$defs/ResourceKind"
625
+ },
626
+ {
627
+ "properties": {
628
+ "kind": {
629
+ "const": "realized"
630
+ }
631
+ },
632
+ "required": [
633
+ "kind"
634
+ ]
635
+ },
636
+ {
637
+ "$ref": "#/$defs/Path"
638
+ },
639
+ {
640
+ "$ref": "#/$defs/Timestamp"
641
+ }
642
+ ],
643
+ "$anchor": "ResourceCanonicalMetaBase"
644
+ },
581
645
  "ResourceData": {
582
646
  "$schema": "https://json-schema.org/draft/2020-12/schema",
583
647
  "type": "object",
584
648
  "allOf": [
585
649
  {
586
- "$ref": "#/$defs/ResourceDataMetaBase"
650
+ "$ref": "#/$defs/ResourceCanonicalMetaBase"
587
651
  },
588
652
  {
589
653
  "properties": {
@@ -615,42 +679,6 @@
615
679
  "unevaluatedProperties": false,
616
680
  "$anchor": "ResourceData"
617
681
  },
618
- "ResourceDataMeta": {
619
- "$schema": "https://json-schema.org/draft/2020-12/schema",
620
- "type": "object",
621
- "unevaluatedProperties": false,
622
- "$anchor": "ResourceDataMeta",
623
- "$ref": "#/$defs/ResourceDataMetaBase"
624
- },
625
- "ResourceDataMetaBase": {
626
- "$schema": "https://json-schema.org/draft/2020-12/schema",
627
- "type": "object",
628
- "allOf": [
629
- {
630
- "$ref": "#/$defs/ResourceBase"
631
- },
632
- {
633
- "$ref": "#/$defs/ResourceKind"
634
- },
635
- {
636
- "properties": {
637
- "kind": {
638
- "const": "realized"
639
- }
640
- },
641
- "required": [
642
- "kind"
643
- ]
644
- },
645
- {
646
- "$ref": "#/$defs/Path"
647
- },
648
- {
649
- "$ref": "#/$defs/Timestamp"
650
- }
651
- ],
652
- "$anchor": "ResourceDataMetaBase"
653
- },
654
682
  "ResourceId": {
655
683
  "$schema": "https://json-schema.org/draft/2020-12/schema",
656
684
  "type": "string",
@@ -702,20 +730,6 @@
702
730
  "$ref": "#/$defs/ExecutionId"
703
731
  }
704
732
  },
705
- "ResourceMapPointer": {
706
- "$schema": "https://json-schema.org/draft/2020-12/schema",
707
- "type": "object",
708
- "properties": {
709
- "resourceMapPointer": {
710
- "$comment": "This points to a resource created at a previous step in the same workflow. This resource is not yet realized at the time of defining the workflow, but will be realized when the step using this resource is executed.The Engine resolves this pointer at runtime.",
711
- "$ref": "#/$defs/ResourceSocket"
712
- }
713
- },
714
- "required": [
715
- "resourceMapPointer"
716
- ],
717
- "$anchor": "ResourceMapPointer"
718
- },
719
733
  "ResourceMeta": {
720
734
  "$schema": "https://json-schema.org/draft/2020-12/schema",
721
735
  "type": "object",
@@ -724,7 +738,7 @@
724
738
  "$ref": "#/$defs/ResourceBase"
725
739
  },
726
740
  {
727
- "$ref": "#/$defs/ResourceStoragePointer"
741
+ "$ref": "#/$defs/CanonicalRef"
728
742
  },
729
743
  {
730
744
  "$ref": "#/$defs/Timestamp"
@@ -754,7 +768,7 @@
754
768
  ]
755
769
  },
756
770
  {
757
- "$ref": "#/$defs/ResourceMapPointer"
771
+ "$ref": "#/$defs/PendingRef"
758
772
  }
759
773
  ],
760
774
  "unevaluatedProperties": false,
@@ -801,20 +815,6 @@
801
815
  ],
802
816
  "$anchor": "ResourceSocket"
803
817
  },
804
- "ResourceStoragePointer": {
805
- "$schema": "https://json-schema.org/draft/2020-12/schema",
806
- "type": "object",
807
- "properties": {
808
- "resourceStoragePointer": {
809
- "$comment": "This points to the canonical resource with an identical contentHash as this one. If no such resource exists, this resource will itself be the canonical resource and point to itself (i.e. resourceStoragePointer = id).",
810
- "$ref": "#/$defs/ResourceId"
811
- }
812
- },
813
- "required": [
814
- "resourceStoragePointer"
815
- ],
816
- "$anchor": "ResourceStoragePointer"
817
- },
818
818
  "RoleBindingMap": {
819
819
  "$schema": "https://json-schema.org/draft/2020-12/schema",
820
820
  "type": "object",
@@ -52,7 +52,7 @@ async function main() {
52
52
  title: `ResourceData_${name}`,
53
53
  type: 'object',
54
54
  allOf: [
55
- { $ref: './Genesis.json#/$defs/ResourceDataMetaBase' },
55
+ { $ref: './Genesis.json#/$defs/ResourceCanonicalMetaBase' },
56
56
  {
57
57
  type: 'object',
58
58
  required: ['extractedData'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolproof-npm/schema",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "JSON schemas and TypeScript types for ToolProof",
5
5
  "keywords": ["toolproof", "schemas", "json-schema", "typescript"],
6
6
  "author": "ToolProof Team",