@osdk/maker 0.9.1 → 0.10.0-beta.10

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 (51) hide show
  1. package/CHANGELOG.md +73 -89
  2. package/build/browser/api/defineInterface.js +30 -18
  3. package/build/browser/api/defineInterface.js.map +1 -1
  4. package/build/browser/api/defineObject.js +6 -6
  5. package/build/browser/api/defineObject.js.map +1 -1
  6. package/build/browser/api/defineOntology.js +7 -2
  7. package/build/browser/api/defineOntology.js.map +1 -1
  8. package/build/browser/api/overall.test.js +638 -464
  9. package/build/browser/api/overall.test.js.map +1 -1
  10. package/build/browser/api/types.js.map +1 -1
  11. package/build/browser/cli/main.js +1 -13
  12. package/build/browser/cli/main.js.map +1 -1
  13. package/build/cjs/index.cjs +44 -27
  14. package/build/cjs/index.cjs.map +1 -1
  15. package/build/cjs/index.d.cts +12 -3
  16. package/build/esm/api/defineInterface.js +30 -18
  17. package/build/esm/api/defineInterface.js.map +1 -1
  18. package/build/esm/api/defineObject.js +6 -6
  19. package/build/esm/api/defineObject.js.map +1 -1
  20. package/build/esm/api/defineOntology.js +7 -2
  21. package/build/esm/api/defineOntology.js.map +1 -1
  22. package/build/esm/api/overall.test.js +638 -464
  23. package/build/esm/api/overall.test.js.map +1 -1
  24. package/build/esm/api/types.js.map +1 -1
  25. package/build/esm/cli/main.js +1 -13
  26. package/build/esm/cli/main.js.map +1 -1
  27. package/build/types/api/defineImportSpt.d.ts +9 -0
  28. package/build/types/api/defineImportSpt.d.ts.map +1 -0
  29. package/build/types/api/defineInterface.d.ts +29 -0
  30. package/build/types/api/defineInterface.d.ts.map +1 -0
  31. package/build/types/api/defineInterfaceLinkConstraint.d.ts +22 -0
  32. package/build/types/api/defineInterfaceLinkConstraint.d.ts.map +1 -0
  33. package/build/types/api/defineObject.d.ts +2 -0
  34. package/build/types/api/defineObject.d.ts.map +1 -0
  35. package/build/types/api/defineOntology.d.ts +9 -0
  36. package/build/types/api/defineOntology.d.ts.map +1 -0
  37. package/build/types/api/defineSpt.d.ts +12 -0
  38. package/build/types/api/defineSpt.d.ts.map +1 -0
  39. package/build/types/api/defineValueType.d.ts +14 -0
  40. package/build/types/api/defineValueType.d.ts.map +1 -0
  41. package/build/types/api/iconNames.d.ts +2 -0
  42. package/build/types/api/iconNames.d.ts.map +1 -0
  43. package/build/types/api/overall.test.d.ts +1 -0
  44. package/build/types/api/overall.test.d.ts.map +1 -0
  45. package/build/types/api/types.d.ts +276 -0
  46. package/build/types/api/types.d.ts.map +1 -0
  47. package/build/types/cli/main.d.ts +1 -0
  48. package/build/types/cli/main.d.ts.map +1 -0
  49. package/build/types/index.d.ts +7 -0
  50. package/build/types/index.d.ts.map +1 -0
  51. package/package.json +8 -8
@@ -157,6 +157,7 @@ describe("Ontology Defining", () => {
157
157
  "allExtendsInterfaces": [],
158
158
  "allLinks": [],
159
159
  "allProperties": [],
160
+ "allPropertiesV2": {},
160
161
  "apiName": "com.palantir.Foo",
161
162
  "displayMetadata": {
162
163
  "description": "Foo",
@@ -165,43 +166,47 @@ describe("Ontology Defining", () => {
165
166
  },
166
167
  "extendsInterfaces": [],
167
168
  "links": [],
168
- "properties": [
169
- {
170
- "aliases": [],
171
- "apiName": "com.palantir.foo",
172
- "baseFormatter": undefined,
173
- "dataConstraints": undefined,
174
- "displayMetadata": {
175
- "description": undefined,
176
- "displayName": "foo",
177
- "visibility": "NORMAL",
178
- },
179
- "gothamMapping": undefined,
180
- "indexedForSearch": true,
181
- "provenance": undefined,
182
- "type": {
183
- "string": {
184
- "analyzerOverride": undefined,
185
- "enableAsciiFolding": undefined,
186
- "isLongText": false,
187
- "supportsEfficientLeadingWildcard": false,
188
- "supportsExactMatching": true,
169
+ "properties": [],
170
+ "propertiesV2": {
171
+ "com.palantir.foo": {
172
+ "required": true,
173
+ "sharedPropertyType": {
174
+ "aliases": [],
175
+ "apiName": "com.palantir.foo",
176
+ "baseFormatter": undefined,
177
+ "dataConstraints": undefined,
178
+ "displayMetadata": {
179
+ "description": undefined,
180
+ "displayName": "foo",
181
+ "visibility": "NORMAL",
189
182
  },
190
- "type": "string",
191
- },
192
- "typeClasses": [
193
- {
194
- "kind": "render_hint",
195
- "name": "SELECTABLE",
196
- },
197
- {
198
- "kind": "render_hint",
199
- "name": "SORTABLE",
183
+ "gothamMapping": undefined,
184
+ "indexedForSearch": true,
185
+ "provenance": undefined,
186
+ "type": {
187
+ "string": {
188
+ "analyzerOverride": undefined,
189
+ "enableAsciiFolding": undefined,
190
+ "isLongText": false,
191
+ "supportsEfficientLeadingWildcard": false,
192
+ "supportsExactMatching": true,
193
+ },
194
+ "type": "string",
200
195
  },
201
- ],
202
- "valueType": undefined,
196
+ "typeClasses": [
197
+ {
198
+ "kind": "render_hint",
199
+ "name": "SELECTABLE",
200
+ },
201
+ {
202
+ "kind": "render_hint",
203
+ "name": "SORTABLE",
204
+ },
205
+ ],
206
+ "valueType": undefined,
207
+ },
203
208
  },
204
- ],
209
+ },
205
210
  "status": {
206
211
  "active": {},
207
212
  "type": "active",
@@ -344,6 +349,7 @@ describe("Ontology Defining", () => {
344
349
  "allExtendsInterfaces": [],
345
350
  "allLinks": [],
346
351
  "allProperties": [],
352
+ "allPropertiesV2": {},
347
353
  "apiName": "com.palantir.childInterface",
348
354
  "displayMetadata": {
349
355
  "description": "childInterface",
@@ -354,43 +360,47 @@ describe("Ontology Defining", () => {
354
360
  "com.palantir.parentInterface",
355
361
  ],
356
362
  "links": [],
357
- "properties": [
358
- {
359
- "aliases": [],
360
- "apiName": "com.palantir.property2",
361
- "baseFormatter": undefined,
362
- "dataConstraints": undefined,
363
- "displayMetadata": {
364
- "description": undefined,
365
- "displayName": "property2",
366
- "visibility": "NORMAL",
367
- },
368
- "gothamMapping": undefined,
369
- "indexedForSearch": true,
370
- "provenance": undefined,
371
- "type": {
372
- "string": {
373
- "analyzerOverride": undefined,
374
- "enableAsciiFolding": undefined,
375
- "isLongText": false,
376
- "supportsEfficientLeadingWildcard": false,
377
- "supportsExactMatching": true,
378
- },
379
- "type": "string",
380
- },
381
- "typeClasses": [
382
- {
383
- "kind": "render_hint",
384
- "name": "SELECTABLE",
363
+ "properties": [],
364
+ "propertiesV2": {
365
+ "com.palantir.property2": {
366
+ "required": true,
367
+ "sharedPropertyType": {
368
+ "aliases": [],
369
+ "apiName": "com.palantir.property2",
370
+ "baseFormatter": undefined,
371
+ "dataConstraints": undefined,
372
+ "displayMetadata": {
373
+ "description": undefined,
374
+ "displayName": "property2",
375
+ "visibility": "NORMAL",
385
376
  },
386
- {
387
- "kind": "render_hint",
388
- "name": "SORTABLE",
377
+ "gothamMapping": undefined,
378
+ "indexedForSearch": true,
379
+ "provenance": undefined,
380
+ "type": {
381
+ "string": {
382
+ "analyzerOverride": undefined,
383
+ "enableAsciiFolding": undefined,
384
+ "isLongText": false,
385
+ "supportsEfficientLeadingWildcard": false,
386
+ "supportsExactMatching": true,
387
+ },
388
+ "type": "string",
389
389
  },
390
- ],
391
- "valueType": undefined,
390
+ "typeClasses": [
391
+ {
392
+ "kind": "render_hint",
393
+ "name": "SELECTABLE",
394
+ },
395
+ {
396
+ "kind": "render_hint",
397
+ "name": "SORTABLE",
398
+ },
399
+ ],
400
+ "valueType": undefined,
401
+ },
392
402
  },
393
- ],
403
+ },
394
404
  "status": {
395
405
  "active": {},
396
406
  "type": "active",
@@ -402,6 +412,7 @@ describe("Ontology Defining", () => {
402
412
  "allExtendsInterfaces": [],
403
413
  "allLinks": [],
404
414
  "allProperties": [],
415
+ "allPropertiesV2": {},
405
416
  "apiName": "com.palantir.parentInterface",
406
417
  "displayMetadata": {
407
418
  "description": "parentInterface",
@@ -410,43 +421,47 @@ describe("Ontology Defining", () => {
410
421
  },
411
422
  "extendsInterfaces": [],
412
423
  "links": [],
413
- "properties": [
414
- {
415
- "aliases": [],
416
- "apiName": "com.palantir.property1",
417
- "baseFormatter": undefined,
418
- "dataConstraints": undefined,
419
- "displayMetadata": {
420
- "description": undefined,
421
- "displayName": "property1",
422
- "visibility": "NORMAL",
423
- },
424
- "gothamMapping": undefined,
425
- "indexedForSearch": true,
426
- "provenance": undefined,
427
- "type": {
428
- "string": {
429
- "analyzerOverride": undefined,
430
- "enableAsciiFolding": undefined,
431
- "isLongText": false,
432
- "supportsEfficientLeadingWildcard": false,
433
- "supportsExactMatching": true,
434
- },
435
- "type": "string",
436
- },
437
- "typeClasses": [
438
- {
439
- "kind": "render_hint",
440
- "name": "SELECTABLE",
424
+ "properties": [],
425
+ "propertiesV2": {
426
+ "com.palantir.property1": {
427
+ "required": true,
428
+ "sharedPropertyType": {
429
+ "aliases": [],
430
+ "apiName": "com.palantir.property1",
431
+ "baseFormatter": undefined,
432
+ "dataConstraints": undefined,
433
+ "displayMetadata": {
434
+ "description": undefined,
435
+ "displayName": "property1",
436
+ "visibility": "NORMAL",
441
437
  },
442
- {
443
- "kind": "render_hint",
444
- "name": "SORTABLE",
438
+ "gothamMapping": undefined,
439
+ "indexedForSearch": true,
440
+ "provenance": undefined,
441
+ "type": {
442
+ "string": {
443
+ "analyzerOverride": undefined,
444
+ "enableAsciiFolding": undefined,
445
+ "isLongText": false,
446
+ "supportsEfficientLeadingWildcard": false,
447
+ "supportsExactMatching": true,
448
+ },
449
+ "type": "string",
445
450
  },
446
- ],
447
- "valueType": undefined,
451
+ "typeClasses": [
452
+ {
453
+ "kind": "render_hint",
454
+ "name": "SELECTABLE",
455
+ },
456
+ {
457
+ "kind": "render_hint",
458
+ "name": "SORTABLE",
459
+ },
460
+ ],
461
+ "valueType": undefined,
462
+ },
448
463
  },
449
- ],
464
+ },
450
465
  "status": {
451
466
  "active": {},
452
467
  "type": "active",
@@ -534,6 +549,129 @@ describe("Ontology Defining", () => {
534
549
  }
535
550
  `);
536
551
  });
552
+ it("supports optional properties", () => {
553
+ defineInterface({
554
+ apiName: "parentInterface",
555
+ properties: {
556
+ property1: {
557
+ required: false,
558
+ propertyDefinition: "string"
559
+ }
560
+ }
561
+ });
562
+ expect(dumpOntologyFullMetadata().blockData).toMatchInlineSnapshot(`
563
+ {
564
+ "blockPermissionInformation": {
565
+ "actionTypes": {},
566
+ "linkTypes": {},
567
+ "objectTypes": {},
568
+ },
569
+ "interfaceTypes": {
570
+ "com.palantir.parentInterface": {
571
+ "interfaceType": {
572
+ "allExtendsInterfaces": [],
573
+ "allLinks": [],
574
+ "allProperties": [],
575
+ "allPropertiesV2": {},
576
+ "apiName": "com.palantir.parentInterface",
577
+ "displayMetadata": {
578
+ "description": "parentInterface",
579
+ "displayName": "parentInterface",
580
+ "icon": undefined,
581
+ },
582
+ "extendsInterfaces": [],
583
+ "links": [],
584
+ "properties": [],
585
+ "propertiesV2": {
586
+ "com.palantir.property1": {
587
+ "required": false,
588
+ "sharedPropertyType": {
589
+ "aliases": [],
590
+ "apiName": "com.palantir.property1",
591
+ "baseFormatter": undefined,
592
+ "dataConstraints": undefined,
593
+ "displayMetadata": {
594
+ "description": undefined,
595
+ "displayName": "property1",
596
+ "visibility": "NORMAL",
597
+ },
598
+ "gothamMapping": undefined,
599
+ "indexedForSearch": true,
600
+ "provenance": undefined,
601
+ "type": {
602
+ "string": {
603
+ "analyzerOverride": undefined,
604
+ "enableAsciiFolding": undefined,
605
+ "isLongText": false,
606
+ "supportsEfficientLeadingWildcard": false,
607
+ "supportsExactMatching": true,
608
+ },
609
+ "type": "string",
610
+ },
611
+ "typeClasses": [
612
+ {
613
+ "kind": "render_hint",
614
+ "name": "SELECTABLE",
615
+ },
616
+ {
617
+ "kind": "render_hint",
618
+ "name": "SORTABLE",
619
+ },
620
+ ],
621
+ "valueType": undefined,
622
+ },
623
+ },
624
+ },
625
+ "status": {
626
+ "active": {},
627
+ "type": "active",
628
+ },
629
+ },
630
+ },
631
+ },
632
+ "objectTypes": {},
633
+ "sharedPropertyTypes": {
634
+ "com.palantir.property1": {
635
+ "sharedPropertyType": {
636
+ "aliases": [],
637
+ "apiName": "com.palantir.property1",
638
+ "baseFormatter": undefined,
639
+ "dataConstraints": undefined,
640
+ "displayMetadata": {
641
+ "description": undefined,
642
+ "displayName": "property1",
643
+ "visibility": "NORMAL",
644
+ },
645
+ "gothamMapping": undefined,
646
+ "indexedForSearch": true,
647
+ "provenance": undefined,
648
+ "type": {
649
+ "string": {
650
+ "analyzerOverride": undefined,
651
+ "enableAsciiFolding": undefined,
652
+ "isLongText": false,
653
+ "supportsEfficientLeadingWildcard": false,
654
+ "supportsExactMatching": true,
655
+ },
656
+ "type": "string",
657
+ },
658
+ "typeClasses": [
659
+ {
660
+ "kind": "render_hint",
661
+ "name": "SELECTABLE",
662
+ },
663
+ {
664
+ "kind": "render_hint",
665
+ "name": "SORTABLE",
666
+ },
667
+ ],
668
+ "valueType": undefined,
669
+ },
670
+ },
671
+ },
672
+ }
673
+ `);
674
+ });
537
675
  it("allows extends interfaces with apiName provided", () => {
538
676
  defineInterface({
539
677
  apiName: "parentInterface",
@@ -561,6 +699,7 @@ describe("Ontology Defining", () => {
561
699
  "allExtendsInterfaces": [],
562
700
  "allLinks": [],
563
701
  "allProperties": [],
702
+ "allPropertiesV2": {},
564
703
  "apiName": "com.palantir.childInterface",
565
704
  "displayMetadata": {
566
705
  "description": "childInterface",
@@ -571,43 +710,47 @@ describe("Ontology Defining", () => {
571
710
  "parentInterface",
572
711
  ],
573
712
  "links": [],
574
- "properties": [
575
- {
576
- "aliases": [],
577
- "apiName": "com.palantir.property2",
578
- "baseFormatter": undefined,
579
- "dataConstraints": undefined,
580
- "displayMetadata": {
581
- "description": undefined,
582
- "displayName": "property2",
583
- "visibility": "NORMAL",
584
- },
585
- "gothamMapping": undefined,
586
- "indexedForSearch": true,
587
- "provenance": undefined,
588
- "type": {
589
- "string": {
590
- "analyzerOverride": undefined,
591
- "enableAsciiFolding": undefined,
592
- "isLongText": false,
593
- "supportsEfficientLeadingWildcard": false,
594
- "supportsExactMatching": true,
595
- },
596
- "type": "string",
597
- },
598
- "typeClasses": [
599
- {
600
- "kind": "render_hint",
601
- "name": "SELECTABLE",
713
+ "properties": [],
714
+ "propertiesV2": {
715
+ "com.palantir.property2": {
716
+ "required": true,
717
+ "sharedPropertyType": {
718
+ "aliases": [],
719
+ "apiName": "com.palantir.property2",
720
+ "baseFormatter": undefined,
721
+ "dataConstraints": undefined,
722
+ "displayMetadata": {
723
+ "description": undefined,
724
+ "displayName": "property2",
725
+ "visibility": "NORMAL",
602
726
  },
603
- {
604
- "kind": "render_hint",
605
- "name": "SORTABLE",
727
+ "gothamMapping": undefined,
728
+ "indexedForSearch": true,
729
+ "provenance": undefined,
730
+ "type": {
731
+ "string": {
732
+ "analyzerOverride": undefined,
733
+ "enableAsciiFolding": undefined,
734
+ "isLongText": false,
735
+ "supportsEfficientLeadingWildcard": false,
736
+ "supportsExactMatching": true,
737
+ },
738
+ "type": "string",
606
739
  },
607
- ],
608
- "valueType": undefined,
740
+ "typeClasses": [
741
+ {
742
+ "kind": "render_hint",
743
+ "name": "SELECTABLE",
744
+ },
745
+ {
746
+ "kind": "render_hint",
747
+ "name": "SORTABLE",
748
+ },
749
+ ],
750
+ "valueType": undefined,
751
+ },
609
752
  },
610
- ],
753
+ },
611
754
  "status": {
612
755
  "active": {},
613
756
  "type": "active",
@@ -619,6 +762,7 @@ describe("Ontology Defining", () => {
619
762
  "allExtendsInterfaces": [],
620
763
  "allLinks": [],
621
764
  "allProperties": [],
765
+ "allPropertiesV2": {},
622
766
  "apiName": "com.palantir.parentInterface",
623
767
  "displayMetadata": {
624
768
  "description": "parentInterface",
@@ -627,43 +771,47 @@ describe("Ontology Defining", () => {
627
771
  },
628
772
  "extendsInterfaces": [],
629
773
  "links": [],
630
- "properties": [
631
- {
632
- "aliases": [],
633
- "apiName": "com.palantir.property1",
634
- "baseFormatter": undefined,
635
- "dataConstraints": undefined,
636
- "displayMetadata": {
637
- "description": undefined,
638
- "displayName": "property1",
639
- "visibility": "NORMAL",
640
- },
641
- "gothamMapping": undefined,
642
- "indexedForSearch": true,
643
- "provenance": undefined,
644
- "type": {
645
- "string": {
646
- "analyzerOverride": undefined,
647
- "enableAsciiFolding": undefined,
648
- "isLongText": false,
649
- "supportsEfficientLeadingWildcard": false,
650
- "supportsExactMatching": true,
651
- },
652
- "type": "string",
653
- },
654
- "typeClasses": [
655
- {
656
- "kind": "render_hint",
657
- "name": "SELECTABLE",
774
+ "properties": [],
775
+ "propertiesV2": {
776
+ "com.palantir.property1": {
777
+ "required": true,
778
+ "sharedPropertyType": {
779
+ "aliases": [],
780
+ "apiName": "com.palantir.property1",
781
+ "baseFormatter": undefined,
782
+ "dataConstraints": undefined,
783
+ "displayMetadata": {
784
+ "description": undefined,
785
+ "displayName": "property1",
786
+ "visibility": "NORMAL",
658
787
  },
659
- {
660
- "kind": "render_hint",
661
- "name": "SORTABLE",
788
+ "gothamMapping": undefined,
789
+ "indexedForSearch": true,
790
+ "provenance": undefined,
791
+ "type": {
792
+ "string": {
793
+ "analyzerOverride": undefined,
794
+ "enableAsciiFolding": undefined,
795
+ "isLongText": false,
796
+ "supportsEfficientLeadingWildcard": false,
797
+ "supportsExactMatching": true,
798
+ },
799
+ "type": "string",
662
800
  },
663
- ],
664
- "valueType": undefined,
801
+ "typeClasses": [
802
+ {
803
+ "kind": "render_hint",
804
+ "name": "SELECTABLE",
805
+ },
806
+ {
807
+ "kind": "render_hint",
808
+ "name": "SORTABLE",
809
+ },
810
+ ],
811
+ "valueType": undefined,
812
+ },
665
813
  },
666
- ],
814
+ },
667
815
  "status": {
668
816
  "active": {},
669
817
  "type": "active",
@@ -783,6 +931,7 @@ describe("Ontology Defining", () => {
783
931
  "allExtendsInterfaces": [],
784
932
  "allLinks": [],
785
933
  "allProperties": [],
934
+ "allPropertiesV2": {},
786
935
  "apiName": "com.palantir.A",
787
936
  "displayMetadata": {
788
937
  "description": "A",
@@ -806,6 +955,7 @@ describe("Ontology Defining", () => {
806
955
  },
807
956
  ],
808
957
  "properties": [],
958
+ "propertiesV2": {},
809
959
  "status": {
810
960
  "active": {},
811
961
  "type": "active",
@@ -817,6 +967,7 @@ describe("Ontology Defining", () => {
817
967
  "allExtendsInterfaces": [],
818
968
  "allLinks": [],
819
969
  "allProperties": [],
970
+ "allPropertiesV2": {},
820
971
  "apiName": "com.palantir.B",
821
972
  "displayMetadata": {
822
973
  "description": "B",
@@ -826,6 +977,7 @@ describe("Ontology Defining", () => {
826
977
  "extendsInterfaces": [],
827
978
  "links": [],
828
979
  "properties": [],
980
+ "propertiesV2": {},
829
981
  "status": {
830
982
  "active": {},
831
983
  "type": "active",
@@ -857,6 +1009,7 @@ describe("Ontology Defining", () => {
857
1009
  "allExtendsInterfaces": [],
858
1010
  "allLinks": [],
859
1011
  "allProperties": [],
1012
+ "allPropertiesV2": {},
860
1013
  "apiName": "com.palantir.A",
861
1014
  "displayMetadata": {
862
1015
  "description": "A",
@@ -880,6 +1033,7 @@ describe("Ontology Defining", () => {
880
1033
  },
881
1034
  ],
882
1035
  "properties": [],
1036
+ "propertiesV2": {},
883
1037
  "status": {
884
1038
  "active": {},
885
1039
  "type": "active",
@@ -891,6 +1045,7 @@ describe("Ontology Defining", () => {
891
1045
  "allExtendsInterfaces": [],
892
1046
  "allLinks": [],
893
1047
  "allProperties": [],
1048
+ "allPropertiesV2": {},
894
1049
  "apiName": "com.palantir.B",
895
1050
  "displayMetadata": {
896
1051
  "description": "B",
@@ -900,6 +1055,7 @@ describe("Ontology Defining", () => {
900
1055
  "extendsInterfaces": [],
901
1056
  "links": [],
902
1057
  "properties": [],
1058
+ "propertiesV2": {},
903
1059
  "status": {
904
1060
  "active": {},
905
1061
  "type": "active",
@@ -956,6 +1112,7 @@ describe("Ontology Defining", () => {
956
1112
  "allExtendsInterfaces": [],
957
1113
  "allLinks": [],
958
1114
  "allProperties": [],
1115
+ "allPropertiesV2": {},
959
1116
  "apiName": "com.palantir.FooInterface",
960
1117
  "displayMetadata": {
961
1118
  "description": "Foo Interface",
@@ -970,43 +1127,47 @@ describe("Ontology Defining", () => {
970
1127
  },
971
1128
  "extendsInterfaces": [],
972
1129
  "links": [],
973
- "properties": [
974
- {
975
- "aliases": [],
976
- "apiName": "com.palantir.fooSpt",
977
- "baseFormatter": undefined,
978
- "dataConstraints": undefined,
979
- "displayMetadata": {
980
- "description": undefined,
981
- "displayName": "fooSpt",
982
- "visibility": "NORMAL",
983
- },
984
- "gothamMapping": undefined,
985
- "indexedForSearch": true,
986
- "provenance": undefined,
987
- "type": {
988
- "string": {
989
- "analyzerOverride": undefined,
990
- "enableAsciiFolding": undefined,
991
- "isLongText": false,
992
- "supportsEfficientLeadingWildcard": false,
993
- "supportsExactMatching": true,
994
- },
995
- "type": "string",
996
- },
997
- "typeClasses": [
998
- {
999
- "kind": "render_hint",
1000
- "name": "SELECTABLE",
1130
+ "properties": [],
1131
+ "propertiesV2": {
1132
+ "com.palantir.fooSpt": {
1133
+ "required": true,
1134
+ "sharedPropertyType": {
1135
+ "aliases": [],
1136
+ "apiName": "com.palantir.fooSpt",
1137
+ "baseFormatter": undefined,
1138
+ "dataConstraints": undefined,
1139
+ "displayMetadata": {
1140
+ "description": undefined,
1141
+ "displayName": "fooSpt",
1142
+ "visibility": "NORMAL",
1001
1143
  },
1002
- {
1003
- "kind": "render_hint",
1004
- "name": "SORTABLE",
1144
+ "gothamMapping": undefined,
1145
+ "indexedForSearch": true,
1146
+ "provenance": undefined,
1147
+ "type": {
1148
+ "string": {
1149
+ "analyzerOverride": undefined,
1150
+ "enableAsciiFolding": undefined,
1151
+ "isLongText": false,
1152
+ "supportsEfficientLeadingWildcard": false,
1153
+ "supportsExactMatching": true,
1154
+ },
1155
+ "type": "string",
1005
1156
  },
1006
- ],
1007
- "valueType": undefined,
1157
+ "typeClasses": [
1158
+ {
1159
+ "kind": "render_hint",
1160
+ "name": "SELECTABLE",
1161
+ },
1162
+ {
1163
+ "kind": "render_hint",
1164
+ "name": "SORTABLE",
1165
+ },
1166
+ ],
1167
+ "valueType": undefined,
1168
+ },
1008
1169
  },
1009
- ],
1170
+ },
1010
1171
  "status": {
1011
1172
  "active": {},
1012
1173
  "type": "active",
@@ -1181,6 +1342,7 @@ describe("Ontology Defining", () => {
1181
1342
  "allExtendsInterfaces": [],
1182
1343
  "allLinks": [],
1183
1344
  "allProperties": [],
1345
+ "allPropertiesV2": {},
1184
1346
  "apiName": "com.palantir.interface",
1185
1347
  "displayMetadata": {
1186
1348
  "description": "interface",
@@ -1189,72 +1351,79 @@ describe("Ontology Defining", () => {
1189
1351
  },
1190
1352
  "extendsInterfaces": [],
1191
1353
  "links": [],
1192
- "properties": [
1193
- {
1194
- "aliases": [],
1195
- "apiName": "com.palantir.foo",
1196
- "baseFormatter": undefined,
1197
- "dataConstraints": {
1198
- "nullability": undefined,
1199
- "nullabilityV2": {
1200
- "noEmptyCollections": true,
1201
- "noNulls": true,
1354
+ "properties": [],
1355
+ "propertiesV2": {
1356
+ "com.palantir.bar.bar": {
1357
+ "required": true,
1358
+ "sharedPropertyType": {
1359
+ "aliases": [],
1360
+ "apiName": "com.palantir.bar.bar",
1361
+ "baseFormatter": undefined,
1362
+ "dataConstraints": undefined,
1363
+ "displayMetadata": {
1364
+ "description": undefined,
1365
+ "displayName": "com.palantir.bar.bar",
1366
+ "visibility": "NORMAL",
1202
1367
  },
1203
- "propertyTypeConstraints": [],
1204
- },
1205
- "displayMetadata": {
1206
- "description": undefined,
1207
- "displayName": "foo",
1208
- "visibility": "NORMAL",
1209
- },
1210
- "gothamMapping": undefined,
1211
- "indexedForSearch": true,
1212
- "provenance": undefined,
1213
- "type": {
1214
- "marking": {
1215
- "markingType": "CBAC",
1368
+ "gothamMapping": undefined,
1369
+ "indexedForSearch": true,
1370
+ "provenance": undefined,
1371
+ "type": {
1372
+ "string": {
1373
+ "analyzerOverride": undefined,
1374
+ "enableAsciiFolding": undefined,
1375
+ "isLongText": false,
1376
+ "supportsEfficientLeadingWildcard": false,
1377
+ "supportsExactMatching": true,
1378
+ },
1379
+ "type": "string",
1216
1380
  },
1217
- "type": "marking",
1381
+ "typeClasses": [],
1382
+ "valueType": undefined,
1218
1383
  },
1219
- "typeClasses": [
1220
- {
1221
- "kind": "render_hint",
1222
- "name": "SELECTABLE",
1384
+ },
1385
+ "com.palantir.foo": {
1386
+ "required": true,
1387
+ "sharedPropertyType": {
1388
+ "aliases": [],
1389
+ "apiName": "com.palantir.foo",
1390
+ "baseFormatter": undefined,
1391
+ "dataConstraints": {
1392
+ "nullability": undefined,
1393
+ "nullabilityV2": {
1394
+ "noEmptyCollections": true,
1395
+ "noNulls": true,
1396
+ },
1397
+ "propertyTypeConstraints": [],
1223
1398
  },
1224
- {
1225
- "kind": "render_hint",
1226
- "name": "SORTABLE",
1399
+ "displayMetadata": {
1400
+ "description": undefined,
1401
+ "displayName": "foo",
1402
+ "visibility": "NORMAL",
1227
1403
  },
1228
- ],
1229
- "valueType": undefined,
1230
- },
1231
- {
1232
- "aliases": [],
1233
- "apiName": "com.palantir.bar.bar",
1234
- "baseFormatter": undefined,
1235
- "dataConstraints": undefined,
1236
- "displayMetadata": {
1237
- "description": undefined,
1238
- "displayName": "com.palantir.bar.bar",
1239
- "visibility": "NORMAL",
1240
- },
1241
- "gothamMapping": undefined,
1242
- "indexedForSearch": true,
1243
- "provenance": undefined,
1244
- "type": {
1245
- "string": {
1246
- "analyzerOverride": undefined,
1247
- "enableAsciiFolding": undefined,
1248
- "isLongText": false,
1249
- "supportsEfficientLeadingWildcard": false,
1250
- "supportsExactMatching": true,
1404
+ "gothamMapping": undefined,
1405
+ "indexedForSearch": true,
1406
+ "provenance": undefined,
1407
+ "type": {
1408
+ "marking": {
1409
+ "markingType": "CBAC",
1410
+ },
1411
+ "type": "marking",
1251
1412
  },
1252
- "type": "string",
1413
+ "typeClasses": [
1414
+ {
1415
+ "kind": "render_hint",
1416
+ "name": "SELECTABLE",
1417
+ },
1418
+ {
1419
+ "kind": "render_hint",
1420
+ "name": "SORTABLE",
1421
+ },
1422
+ ],
1423
+ "valueType": undefined,
1253
1424
  },
1254
- "typeClasses": [],
1255
- "valueType": undefined,
1256
1425
  },
1257
- ],
1426
+ },
1258
1427
  "status": {
1259
1428
  "active": {},
1260
1429
  "type": "active",
@@ -1474,208 +1643,213 @@ describe("Ontology Defining", () => {
1474
1643
  });
1475
1644
  expect(dumpOntologyFullMetadata().blockData).toMatchInlineSnapshot(`
1476
1645
  {
1477
- "blockPermissionInformation": {
1478
- "actionTypes": {},
1479
- "linkTypes": {},
1480
- "objectTypes": {},
1481
- },
1482
- "interfaceTypes": {
1483
- "com.palantir.interface": {
1484
- "interfaceType": {
1485
- "allExtendsInterfaces": [],
1486
- "allLinks": [],
1487
- "allProperties": [],
1488
- "apiName": "com.palantir.interface",
1489
- "displayMetadata": {
1490
- "description": "interface",
1491
- "displayName": "interface",
1492
- "icon": undefined,
1493
- },
1494
- "extendsInterfaces": [],
1495
- "links": [],
1496
- "properties": [
1497
- {
1498
- "aliases": [],
1499
- "apiName": "com.palantir.foo",
1500
- "baseFormatter": undefined,
1501
- "dataConstraints": undefined,
1502
- "displayMetadata": {
1503
- "description": undefined,
1504
- "displayName": "foo",
1505
- "visibility": "NORMAL",
1506
- },
1507
- "gothamMapping": undefined,
1508
- "indexedForSearch": true,
1509
- "provenance": undefined,
1510
- "type": {
1511
- "string": {
1512
- "analyzerOverride": undefined,
1513
- "enableAsciiFolding": undefined,
1514
- "isLongText": false,
1515
- "supportsEfficientLeadingWildcard": false,
1516
- "supportsExactMatching": true,
1517
- },
1518
- "type": "string",
1519
- },
1520
- "typeClasses": [
1521
- {
1522
- "kind": "render_hint",
1523
- "name": "SELECTABLE",
1524
- },
1525
- {
1526
- "kind": "render_hint",
1527
- "name": "SORTABLE",
1528
- },
1529
- ],
1530
- "valueType": undefined,
1531
- },
1532
- ],
1533
- "status": {
1534
- "active": {},
1535
- "type": "active",
1536
- },
1537
- },
1538
- },
1539
- },
1540
- "objectTypes": {
1541
- "com.palantir.foo": {
1542
- "datasources": [
1543
- {
1544
- "datasource": {
1545
- "datasetV2": {
1546
- "datasetRid": "com.palantir.foo",
1547
- "propertyMapping": {
1548
- "bar": {
1549
- "column": "bar",
1550
- "type": "column",
1551
- },
1552
- },
1553
- },
1554
- "type": "datasetV2",
1555
- },
1556
- "editsConfiguration": {
1557
- "onlyAllowPrivilegedEdits": false,
1558
- },
1559
- "redacted": false,
1560
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
1561
- },
1562
- ],
1563
- "entityMetadata": {
1564
- "arePatchesEnabled": false,
1565
- },
1566
- "objectType": {
1567
- "allImplementsInterfaces": {},
1568
- "apiName": "com.palantir.foo",
1569
- "displayMetadata": {
1570
- "description": undefined,
1571
- "displayName": "Foo",
1572
- "groupDisplayName": undefined,
1573
- "icon": {
1574
- "blueprint": {
1575
- "color": "#2D72D2",
1576
- "locator": "cube",
1577
- },
1578
- "type": "blueprint",
1579
- },
1580
- "pluralDisplayName": "Foo",
1581
- "visibility": "NORMAL",
1582
- },
1583
- "implementsInterfaces2": [
1584
- {
1585
- "interfaceTypeApiName": "com.palantir.interface",
1586
- "properties": {
1587
- "com.palantir.foo": {
1588
- "propertyTypeRid": "bar",
1589
- },
1590
- },
1591
- },
1592
- ],
1593
- "primaryKeys": [
1594
- "bar",
1595
- ],
1596
- "propertyTypes": {
1597
- "bar": {
1598
- "apiName": "bar",
1599
- "baseFormatter": undefined,
1600
- "dataConstraints": undefined,
1601
- "displayMetadata": {
1602
- "description": undefined,
1603
- "displayName": "Bar",
1604
- "visibility": "NORMAL",
1605
- },
1606
- "indexedForSearch": true,
1607
- "inlineAction": undefined,
1608
- "ruleSetBinding": undefined,
1609
- "sharedPropertyTypeApiName": undefined,
1610
- "sharedPropertyTypeRid": undefined,
1611
- "status": {
1612
- "active": {},
1613
- "type": "active",
1614
- },
1615
- "type": {
1616
- "string": {
1617
- "analyzerOverride": undefined,
1618
- "enableAsciiFolding": undefined,
1619
- "isLongText": false,
1620
- "supportsEfficientLeadingWildcard": false,
1621
- "supportsExactMatching": true,
1622
- },
1623
- "type": "string",
1624
- },
1625
- "typeClasses": [],
1626
- "valueType": undefined,
1627
- },
1628
- },
1629
- "redacted": false,
1630
- "status": {
1631
- "active": {},
1632
- "type": "active",
1633
- },
1634
- "titlePropertyTypeRid": "bar",
1635
- },
1636
- },
1637
- },
1638
- "sharedPropertyTypes": {
1639
- "com.palantir.foo": {
1640
- "sharedPropertyType": {
1641
- "aliases": [],
1642
- "apiName": "com.palantir.foo",
1643
- "baseFormatter": undefined,
1644
- "dataConstraints": undefined,
1645
- "displayMetadata": {
1646
- "description": undefined,
1647
- "displayName": "foo",
1648
- "visibility": "NORMAL",
1649
- },
1650
- "gothamMapping": undefined,
1651
- "indexedForSearch": true,
1652
- "provenance": undefined,
1653
- "type": {
1654
- "string": {
1655
- "analyzerOverride": undefined,
1656
- "enableAsciiFolding": undefined,
1657
- "isLongText": false,
1658
- "supportsEfficientLeadingWildcard": false,
1659
- "supportsExactMatching": true,
1660
- },
1661
- "type": "string",
1662
- },
1663
- "typeClasses": [
1664
- {
1665
- "kind": "render_hint",
1666
- "name": "SELECTABLE",
1667
- },
1668
- {
1669
- "kind": "render_hint",
1670
- "name": "SORTABLE",
1671
- },
1672
- ],
1673
- "valueType": undefined,
1674
- },
1675
- },
1676
- },
1677
- }
1678
- `);
1646
+ "blockPermissionInformation": {
1647
+ "actionTypes": {},
1648
+ "linkTypes": {},
1649
+ "objectTypes": {},
1650
+ },
1651
+ "interfaceTypes": {
1652
+ "com.palantir.interface": {
1653
+ "interfaceType": {
1654
+ "allExtendsInterfaces": [],
1655
+ "allLinks": [],
1656
+ "allProperties": [],
1657
+ "allPropertiesV2": {},
1658
+ "apiName": "com.palantir.interface",
1659
+ "displayMetadata": {
1660
+ "description": "interface",
1661
+ "displayName": "interface",
1662
+ "icon": undefined,
1663
+ },
1664
+ "extendsInterfaces": [],
1665
+ "links": [],
1666
+ "properties": [],
1667
+ "propertiesV2": {
1668
+ "com.palantir.foo": {
1669
+ "required": true,
1670
+ "sharedPropertyType": {
1671
+ "aliases": [],
1672
+ "apiName": "com.palantir.foo",
1673
+ "baseFormatter": undefined,
1674
+ "dataConstraints": undefined,
1675
+ "displayMetadata": {
1676
+ "description": undefined,
1677
+ "displayName": "foo",
1678
+ "visibility": "NORMAL",
1679
+ },
1680
+ "gothamMapping": undefined,
1681
+ "indexedForSearch": true,
1682
+ "provenance": undefined,
1683
+ "type": {
1684
+ "string": {
1685
+ "analyzerOverride": undefined,
1686
+ "enableAsciiFolding": undefined,
1687
+ "isLongText": false,
1688
+ "supportsEfficientLeadingWildcard": false,
1689
+ "supportsExactMatching": true,
1690
+ },
1691
+ "type": "string",
1692
+ },
1693
+ "typeClasses": [
1694
+ {
1695
+ "kind": "render_hint",
1696
+ "name": "SELECTABLE",
1697
+ },
1698
+ {
1699
+ "kind": "render_hint",
1700
+ "name": "SORTABLE",
1701
+ },
1702
+ ],
1703
+ "valueType": undefined,
1704
+ },
1705
+ },
1706
+ },
1707
+ "status": {
1708
+ "active": {},
1709
+ "type": "active",
1710
+ },
1711
+ },
1712
+ },
1713
+ },
1714
+ "objectTypes": {
1715
+ "com.palantir.foo": {
1716
+ "datasources": [
1717
+ {
1718
+ "datasource": {
1719
+ "datasetV2": {
1720
+ "datasetRid": "com.palantir.foo",
1721
+ "propertyMapping": {
1722
+ "bar": {
1723
+ "column": "bar",
1724
+ "type": "column",
1725
+ },
1726
+ },
1727
+ },
1728
+ "type": "datasetV2",
1729
+ },
1730
+ "editsConfiguration": {
1731
+ "onlyAllowPrivilegedEdits": false,
1732
+ },
1733
+ "redacted": false,
1734
+ "rid": "ri.ontology.main.datasource.com.palantir.foo",
1735
+ },
1736
+ ],
1737
+ "entityMetadata": {
1738
+ "arePatchesEnabled": false,
1739
+ },
1740
+ "objectType": {
1741
+ "allImplementsInterfaces": {},
1742
+ "apiName": "com.palantir.foo",
1743
+ "displayMetadata": {
1744
+ "description": undefined,
1745
+ "displayName": "Foo",
1746
+ "groupDisplayName": undefined,
1747
+ "icon": {
1748
+ "blueprint": {
1749
+ "color": "#2D72D2",
1750
+ "locator": "cube",
1751
+ },
1752
+ "type": "blueprint",
1753
+ },
1754
+ "pluralDisplayName": "Foo",
1755
+ "visibility": "NORMAL",
1756
+ },
1757
+ "implementsInterfaces2": [
1758
+ {
1759
+ "interfaceTypeApiName": "com.palantir.interface",
1760
+ "properties": {
1761
+ "com.palantir.foo": {
1762
+ "propertyTypeRid": "bar",
1763
+ },
1764
+ },
1765
+ },
1766
+ ],
1767
+ "primaryKeys": [
1768
+ "bar",
1769
+ ],
1770
+ "propertyTypes": {
1771
+ "bar": {
1772
+ "apiName": "bar",
1773
+ "baseFormatter": undefined,
1774
+ "dataConstraints": undefined,
1775
+ "displayMetadata": {
1776
+ "description": undefined,
1777
+ "displayName": "Bar",
1778
+ "visibility": "NORMAL",
1779
+ },
1780
+ "indexedForSearch": true,
1781
+ "inlineAction": undefined,
1782
+ "ruleSetBinding": undefined,
1783
+ "sharedPropertyTypeApiName": undefined,
1784
+ "sharedPropertyTypeRid": undefined,
1785
+ "status": {
1786
+ "active": {},
1787
+ "type": "active",
1788
+ },
1789
+ "type": {
1790
+ "string": {
1791
+ "analyzerOverride": undefined,
1792
+ "enableAsciiFolding": undefined,
1793
+ "isLongText": false,
1794
+ "supportsEfficientLeadingWildcard": false,
1795
+ "supportsExactMatching": true,
1796
+ },
1797
+ "type": "string",
1798
+ },
1799
+ "typeClasses": [],
1800
+ "valueType": undefined,
1801
+ },
1802
+ },
1803
+ "redacted": false,
1804
+ "status": {
1805
+ "active": {},
1806
+ "type": "active",
1807
+ },
1808
+ "titlePropertyTypeRid": "bar",
1809
+ },
1810
+ },
1811
+ },
1812
+ "sharedPropertyTypes": {
1813
+ "com.palantir.foo": {
1814
+ "sharedPropertyType": {
1815
+ "aliases": [],
1816
+ "apiName": "com.palantir.foo",
1817
+ "baseFormatter": undefined,
1818
+ "dataConstraints": undefined,
1819
+ "displayMetadata": {
1820
+ "description": undefined,
1821
+ "displayName": "foo",
1822
+ "visibility": "NORMAL",
1823
+ },
1824
+ "gothamMapping": undefined,
1825
+ "indexedForSearch": true,
1826
+ "provenance": undefined,
1827
+ "type": {
1828
+ "string": {
1829
+ "analyzerOverride": undefined,
1830
+ "enableAsciiFolding": undefined,
1831
+ "isLongText": false,
1832
+ "supportsEfficientLeadingWildcard": false,
1833
+ "supportsExactMatching": true,
1834
+ },
1835
+ "type": "string",
1836
+ },
1837
+ "typeClasses": [
1838
+ {
1839
+ "kind": "render_hint",
1840
+ "name": "SELECTABLE",
1841
+ },
1842
+ {
1843
+ "kind": "render_hint",
1844
+ "name": "SORTABLE",
1845
+ },
1846
+ ],
1847
+ "valueType": undefined,
1848
+ },
1849
+ },
1850
+ },
1851
+ }
1852
+ `);
1679
1853
  });
1680
1854
  });
1681
1855
  });