@takeshape/schema 10.2.20 → 10.2.24
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.
- package/dist/api-version.js +2 -4
- package/dist/builtin-schema.js +4 -7
- package/dist/migration/index.js +2 -4
- package/dist/migration/to/v3.0.0.js +1 -2
- package/dist/migration/to/v3.1.0.js +1 -2
- package/dist/migration/to/v3.10.0.js +1 -2
- package/dist/migration/to/v3.11.0.js +1 -2
- package/dist/migration/to/v3.12.0.js +1 -2
- package/dist/migration/to/v3.12.1.js +1 -2
- package/dist/migration/to/v3.12.2.js +1 -2
- package/dist/migration/to/v3.12.3.js +1 -2
- package/dist/migration/to/v3.13.0.js +1 -2
- package/dist/migration/to/v3.14.0.js +1 -2
- package/dist/migration/to/v3.15.0.js +1 -2
- package/dist/migration/to/v3.16.0.js +1 -2
- package/dist/migration/to/v3.17.0.js +1 -2
- package/dist/migration/to/v3.17.1.js +1 -2
- package/dist/migration/to/v3.18.0.js +1 -2
- package/dist/migration/to/v3.18.1.js +1 -2
- package/dist/migration/to/v3.18.2.js +1 -2
- package/dist/migration/to/v3.19.0.js +1 -2
- package/dist/migration/to/v3.2.0.js +1 -2
- package/dist/migration/to/v3.20.0.js +1 -2
- package/dist/migration/to/v3.21.0.js +1 -2
- package/dist/migration/to/v3.22.0.js +1 -2
- package/dist/migration/to/v3.23.0.js +1 -2
- package/dist/migration/to/v3.24.0.js +1 -2
- package/dist/migration/to/v3.25.0.js +1 -2
- package/dist/migration/to/v3.26.0.js +1 -2
- package/dist/migration/to/v3.27.0.js +1 -2
- package/dist/migration/to/v3.28.0.js +1 -2
- package/dist/migration/to/v3.29.0.js +1 -2
- package/dist/migration/to/v3.3.0.js +1 -2
- package/dist/migration/to/v3.30.0.js +1 -2
- package/dist/migration/to/v3.31.0.js +1 -2
- package/dist/migration/to/v3.32.0.js +1 -2
- package/dist/migration/to/v3.33.0.js +1 -2
- package/dist/migration/to/v3.34.0.js +1 -2
- package/dist/migration/to/v3.35.0.js +1 -2
- package/dist/migration/to/v3.36.0.js +1 -2
- package/dist/migration/to/v3.37.0.js +1 -2
- package/dist/migration/to/v3.38.0.js +1 -2
- package/dist/migration/to/v3.39.0.js +1 -2
- package/dist/migration/to/v3.4.0.js +1 -2
- package/dist/migration/to/v3.5.0.js +1 -2
- package/dist/migration/to/v3.5.1.js +1 -2
- package/dist/migration/to/v3.6.0.js +1 -2
- package/dist/migration/to/v3.7.0.js +1 -2
- package/dist/migration/to/v3.8.0.js +1 -2
- package/dist/migration/to/v3.9.0.js +1 -2
- package/dist/project-schema/index.js +50 -100
- package/dist/scalars.js +1 -2
- package/dist/schema-util.js +12 -24
- package/dist/schemas/index.js +2 -4
- package/dist/taxonomies.js +3 -5
- package/dist/template-shapes/templates.js +20 -40
- package/dist/template-shapes/types.js +2 -3
- package/dist/template-shapes/where.js +5 -11
- package/dist/types/types.js +5 -9
- package/dist/unions.js +2 -4
- package/dist/util/api-indexing.js +2 -4
- package/dist/versions.js +3 -6
- package/dist/workflows.js +1 -2
- package/es/layers/type-utils.js +1 -0
- package/es/services.js +3 -0
- package/es/template-shapes/where.js +0 -1
- package/es/types/types.js +4 -0
- package/package.json +6 -6
package/dist/api-version.js
CHANGED
|
@@ -21,7 +21,5 @@ const createVersionPredicate = (featureVersion, comparison) => {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
exports.createVersionPredicate = createVersionPredicate;
|
|
24
|
-
const workflowsEnabled = createVersionPredicate('2.0.0', _gte.default);
|
|
25
|
-
exports.
|
|
26
|
-
const whereClauseEnabled = createVersionPredicate('2.0.0', _gte.default);
|
|
27
|
-
exports.whereClauseEnabled = whereClauseEnabled;
|
|
24
|
+
const workflowsEnabled = exports.workflowsEnabled = createVersionPredicate('2.0.0', _gte.default);
|
|
25
|
+
const whereClauseEnabled = exports.whereClauseEnabled = createVersionPredicate('2.0.0', _gte.default);
|
package/dist/builtin-schema.js
CHANGED
|
@@ -18,14 +18,13 @@ function getAssetS3Path(content) {
|
|
|
18
18
|
function setAssetS3Path(content, path) {
|
|
19
19
|
content[ASSET_PATH] = path;
|
|
20
20
|
}
|
|
21
|
-
const jsonShape = {
|
|
21
|
+
const jsonShape = exports.jsonShape = {
|
|
22
22
|
id: 'JSON',
|
|
23
23
|
name: 'JSON',
|
|
24
24
|
title: 'JSON',
|
|
25
25
|
schema: {}
|
|
26
26
|
};
|
|
27
|
-
exports.
|
|
28
|
-
const builtInShapes = {
|
|
27
|
+
const builtInShapes = exports.builtInShapes = {
|
|
29
28
|
JSON: jsonShape,
|
|
30
29
|
TSRelationship: {
|
|
31
30
|
id: 'TSRelationship',
|
|
@@ -395,8 +394,7 @@ const builtInShapes = {
|
|
|
395
394
|
}
|
|
396
395
|
}
|
|
397
396
|
};
|
|
398
|
-
exports.
|
|
399
|
-
const builtInForms = {
|
|
397
|
+
const builtInForms = exports.builtInForms = {
|
|
400
398
|
Asset: {
|
|
401
399
|
default: {
|
|
402
400
|
order: ['title', 'description', 'caption', 'credit', 'filename', 'path', 'mimeType', 'sourceUrl', 'uploadStatus'],
|
|
@@ -609,5 +607,4 @@ const builtInForms = {
|
|
|
609
607
|
}
|
|
610
608
|
}
|
|
611
609
|
}
|
|
612
|
-
};
|
|
613
|
-
exports.builtInForms = builtInForms;
|
|
610
|
+
};
|
package/dist/migration/index.js
CHANGED
|
@@ -68,7 +68,7 @@ Object.keys(_utils).forEach(function (key) {
|
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
71
|
-
const migrateTo = {
|
|
71
|
+
const migrateTo = exports.migrateTo = {
|
|
72
72
|
'v3.0.0': _v.default,
|
|
73
73
|
'v3.1.0': _v2.default,
|
|
74
74
|
'v3.2.0': _v3.default,
|
|
@@ -117,6 +117,4 @@ const migrateTo = {
|
|
|
117
117
|
'v3.38.0': _v46.default,
|
|
118
118
|
'v3.39.0': _v47.default
|
|
119
119
|
};
|
|
120
|
-
exports.
|
|
121
|
-
const listTypePrefix = 'PaginatedList';
|
|
122
|
-
exports.listTypePrefix = listTypePrefix;
|
|
120
|
+
const listTypePrefix = exports.listTypePrefix = 'PaginatedList';
|
|
@@ -673,103 +673,53 @@ function createVersionPredicate(expectedVersion) {
|
|
|
673
673
|
return Boolean(expectedVersion && schemaVersion && expectedVersion === schemaVersion);
|
|
674
674
|
};
|
|
675
675
|
}
|
|
676
|
-
const isProjectSchemaJSONV1_0_0 = createVersionPredicate('1.0.0');
|
|
677
|
-
exports.
|
|
678
|
-
const
|
|
679
|
-
exports.
|
|
680
|
-
const
|
|
681
|
-
exports.
|
|
682
|
-
const
|
|
683
|
-
exports.
|
|
684
|
-
const
|
|
685
|
-
exports.
|
|
686
|
-
const
|
|
687
|
-
exports.
|
|
688
|
-
const
|
|
689
|
-
exports.
|
|
690
|
-
const
|
|
691
|
-
exports.
|
|
692
|
-
const
|
|
693
|
-
exports.
|
|
694
|
-
const
|
|
695
|
-
exports.
|
|
696
|
-
const
|
|
697
|
-
exports.
|
|
698
|
-
const
|
|
699
|
-
exports.
|
|
700
|
-
const
|
|
701
|
-
exports.
|
|
702
|
-
const
|
|
703
|
-
exports.
|
|
704
|
-
const
|
|
705
|
-
exports.
|
|
706
|
-
const
|
|
707
|
-
exports.
|
|
708
|
-
const
|
|
709
|
-
exports.
|
|
710
|
-
const
|
|
711
|
-
exports.
|
|
712
|
-
const
|
|
713
|
-
exports.
|
|
714
|
-
const
|
|
715
|
-
exports.
|
|
716
|
-
const
|
|
717
|
-
exports.
|
|
718
|
-
const
|
|
719
|
-
exports.
|
|
720
|
-
const
|
|
721
|
-
exports.
|
|
722
|
-
const
|
|
723
|
-
exports.
|
|
724
|
-
const
|
|
725
|
-
exports.
|
|
726
|
-
const isProjectSchemaJSONV3_18_1 = createVersionPredicate('3.18.1');
|
|
727
|
-
exports.isProjectSchemaJSONV3_18_1 = isProjectSchemaJSONV3_18_1;
|
|
728
|
-
const isProjectSchemaJSONV3_18_2 = createVersionPredicate('3.18.2');
|
|
729
|
-
exports.isProjectSchemaJSONV3_18_2 = isProjectSchemaJSONV3_18_2;
|
|
730
|
-
const isProjectSchemaJSONV3_19_0 = createVersionPredicate('3.19.0');
|
|
731
|
-
exports.isProjectSchemaJSONV3_19_0 = isProjectSchemaJSONV3_19_0;
|
|
732
|
-
const isProjectSchemaJSONV3_20_0 = createVersionPredicate('3.20.0');
|
|
733
|
-
exports.isProjectSchemaJSONV3_20_0 = isProjectSchemaJSONV3_20_0;
|
|
734
|
-
const isProjectSchemaJSONV3_21_0 = createVersionPredicate('3.21.0');
|
|
735
|
-
exports.isProjectSchemaJSONV3_21_0 = isProjectSchemaJSONV3_21_0;
|
|
736
|
-
const isProjectSchemaJSONV3_22_0 = createVersionPredicate('3.22.0');
|
|
737
|
-
exports.isProjectSchemaJSONV3_22_0 = isProjectSchemaJSONV3_22_0;
|
|
738
|
-
const isProjectSchemaJSONV3_23_0 = createVersionPredicate('3.23.0');
|
|
739
|
-
exports.isProjectSchemaJSONV3_23_0 = isProjectSchemaJSONV3_23_0;
|
|
740
|
-
const isProjectSchemaJSONV3_24_0 = createVersionPredicate('3.24.0');
|
|
741
|
-
exports.isProjectSchemaJSONV3_24_0 = isProjectSchemaJSONV3_24_0;
|
|
742
|
-
const isProjectSchemaJSONV3_25_0 = createVersionPredicate('3.25.0');
|
|
743
|
-
exports.isProjectSchemaJSONV3_25_0 = isProjectSchemaJSONV3_25_0;
|
|
744
|
-
const isProjectSchemaJSONV3_26_0 = createVersionPredicate('3.26.0');
|
|
745
|
-
exports.isProjectSchemaJSONV3_26_0 = isProjectSchemaJSONV3_26_0;
|
|
746
|
-
const isProjectSchemaJSONV3_27_0 = createVersionPredicate('3.27.0');
|
|
747
|
-
exports.isProjectSchemaJSONV3_27_0 = isProjectSchemaJSONV3_27_0;
|
|
748
|
-
const isProjectSchemaJSONV3_28_0 = createVersionPredicate('3.28.0');
|
|
749
|
-
exports.isProjectSchemaJSONV3_28_0 = isProjectSchemaJSONV3_28_0;
|
|
750
|
-
const isProjectSchemaJSONV3_29_0 = createVersionPredicate('3.29.0');
|
|
751
|
-
exports.isProjectSchemaJSONV3_29_0 = isProjectSchemaJSONV3_29_0;
|
|
752
|
-
const isProjectSchemaJSONV3_30_0 = createVersionPredicate('3.30.0');
|
|
753
|
-
exports.isProjectSchemaJSONV3_30_0 = isProjectSchemaJSONV3_30_0;
|
|
754
|
-
const isProjectSchemaJSONV3_31_0 = createVersionPredicate('3.31.0');
|
|
755
|
-
exports.isProjectSchemaJSONV3_31_0 = isProjectSchemaJSONV3_31_0;
|
|
756
|
-
const isProjectSchemaJSONV3_32_0 = createVersionPredicate('3.32.0');
|
|
757
|
-
exports.isProjectSchemaJSONV3_32_0 = isProjectSchemaJSONV3_32_0;
|
|
758
|
-
const isProjectSchemaJSONV3_33_0 = createVersionPredicate('3.33.0');
|
|
759
|
-
exports.isProjectSchemaJSONV3_33_0 = isProjectSchemaJSONV3_33_0;
|
|
760
|
-
const isProjectSchemaJSONV3_34_0 = createVersionPredicate('3.34.0');
|
|
761
|
-
exports.isProjectSchemaJSONV3_34_0 = isProjectSchemaJSONV3_34_0;
|
|
762
|
-
const isProjectSchemaJSONV3_35_0 = createVersionPredicate('3.35.0');
|
|
763
|
-
exports.isProjectSchemaJSONV3_35_0 = isProjectSchemaJSONV3_35_0;
|
|
764
|
-
const isProjectSchemaJSONV3_36_0 = createVersionPredicate('3.36.0');
|
|
765
|
-
exports.isProjectSchemaJSONV3_36_0 = isProjectSchemaJSONV3_36_0;
|
|
766
|
-
const isProjectSchemaJSONV3_37_0 = createVersionPredicate('3.37.0');
|
|
767
|
-
exports.isProjectSchemaJSONV3_37_0 = isProjectSchemaJSONV3_37_0;
|
|
768
|
-
const isProjectSchemaJSONV3_38_0 = createVersionPredicate('3.38.0');
|
|
769
|
-
exports.isProjectSchemaJSONV3_38_0 = isProjectSchemaJSONV3_38_0;
|
|
770
|
-
const isProjectSchemaJSONV3_39_0 = createVersionPredicate('3.39.0');
|
|
771
|
-
exports.isProjectSchemaJSONV3_39_0 = isProjectSchemaJSONV3_39_0;
|
|
772
|
-
const isLatestProjectSchemaJSON = createVersionPredicate('3.39.0');
|
|
773
|
-
exports.isLatestProjectSchemaJSON = isLatestProjectSchemaJSON;
|
|
774
|
-
const isProjectSchemaJSONV4_0_0 = createVersionPredicate('4.0.0');
|
|
775
|
-
exports.isProjectSchemaJSONV4_0_0 = isProjectSchemaJSONV4_0_0;
|
|
676
|
+
const isProjectSchemaJSONV1_0_0 = exports.isProjectSchemaJSONV1_0_0 = createVersionPredicate('1.0.0');
|
|
677
|
+
const isProjectSchemaJSONV3_0_0 = exports.isProjectSchemaJSONV3_0_0 = createVersionPredicate('3.0.0');
|
|
678
|
+
const isProjectSchemaJSONV3_1_0 = exports.isProjectSchemaJSONV3_1_0 = createVersionPredicate('3.1.0');
|
|
679
|
+
const isProjectSchemaJSONV3_2_0 = exports.isProjectSchemaJSONV3_2_0 = createVersionPredicate('3.2.0');
|
|
680
|
+
const isProjectSchemaJSONV3_3_0 = exports.isProjectSchemaJSONV3_3_0 = createVersionPredicate('3.3.0');
|
|
681
|
+
const isProjectSchemaJSONV3_4_0 = exports.isProjectSchemaJSONV3_4_0 = createVersionPredicate('3.4.0');
|
|
682
|
+
const isProjectSchemaJSONV3_5_0 = exports.isProjectSchemaJSONV3_5_0 = createVersionPredicate('3.5.0');
|
|
683
|
+
const isProjectSchemaJSONV3_5_1 = exports.isProjectSchemaJSONV3_5_1 = createVersionPredicate('3.5.1');
|
|
684
|
+
const isProjectSchemaJSONV3_6_0 = exports.isProjectSchemaJSONV3_6_0 = createVersionPredicate('3.6.0');
|
|
685
|
+
const isProjectSchemaJSONV3_7_0 = exports.isProjectSchemaJSONV3_7_0 = createVersionPredicate('3.7.0');
|
|
686
|
+
const isProjectSchemaJSONV3_8_0 = exports.isProjectSchemaJSONV3_8_0 = createVersionPredicate('3.8.0');
|
|
687
|
+
const isProjectSchemaJSONV3_9_0 = exports.isProjectSchemaJSONV3_9_0 = createVersionPredicate('3.9.0');
|
|
688
|
+
const isProjectSchemaJSONV3_10_0 = exports.isProjectSchemaJSONV3_10_0 = createVersionPredicate('3.10.0');
|
|
689
|
+
const isProjectSchemaJSONV3_11_0 = exports.isProjectSchemaJSONV3_11_0 = createVersionPredicate('3.11.0');
|
|
690
|
+
const isProjectSchemaJSONV3_12_0 = exports.isProjectSchemaJSONV3_12_0 = createVersionPredicate('3.12.0');
|
|
691
|
+
const isProjectSchemaJSONV3_12_1 = exports.isProjectSchemaJSONV3_12_1 = createVersionPredicate('3.12.1');
|
|
692
|
+
const isProjectSchemaJSONV3_12_2 = exports.isProjectSchemaJSONV3_12_2 = createVersionPredicate('3.12.2');
|
|
693
|
+
const isProjectSchemaJSONV3_12_3 = exports.isProjectSchemaJSONV3_12_3 = createVersionPredicate('3.12.3');
|
|
694
|
+
const isProjectSchemaJSONV3_13_0 = exports.isProjectSchemaJSONV3_13_0 = createVersionPredicate('3.13.0');
|
|
695
|
+
const isProjectSchemaJSONV3_14_0 = exports.isProjectSchemaJSONV3_14_0 = createVersionPredicate('3.14.0');
|
|
696
|
+
const isProjectSchemaJSONV3_15_0 = exports.isProjectSchemaJSONV3_15_0 = createVersionPredicate('3.15.0');
|
|
697
|
+
const isProjectSchemaJSONV3_16_0 = exports.isProjectSchemaJSONV3_16_0 = createVersionPredicate('3.16.0');
|
|
698
|
+
const isProjectSchemaJSONV3_17_0 = exports.isProjectSchemaJSONV3_17_0 = createVersionPredicate('3.17.0');
|
|
699
|
+
const isProjectSchemaJSONV3_17_1 = exports.isProjectSchemaJSONV3_17_1 = createVersionPredicate('3.17.1');
|
|
700
|
+
const isProjectSchemaJSONV3_18_0 = exports.isProjectSchemaJSONV3_18_0 = createVersionPredicate('3.18.0');
|
|
701
|
+
const isProjectSchemaJSONV3_18_1 = exports.isProjectSchemaJSONV3_18_1 = createVersionPredicate('3.18.1');
|
|
702
|
+
const isProjectSchemaJSONV3_18_2 = exports.isProjectSchemaJSONV3_18_2 = createVersionPredicate('3.18.2');
|
|
703
|
+
const isProjectSchemaJSONV3_19_0 = exports.isProjectSchemaJSONV3_19_0 = createVersionPredicate('3.19.0');
|
|
704
|
+
const isProjectSchemaJSONV3_20_0 = exports.isProjectSchemaJSONV3_20_0 = createVersionPredicate('3.20.0');
|
|
705
|
+
const isProjectSchemaJSONV3_21_0 = exports.isProjectSchemaJSONV3_21_0 = createVersionPredicate('3.21.0');
|
|
706
|
+
const isProjectSchemaJSONV3_22_0 = exports.isProjectSchemaJSONV3_22_0 = createVersionPredicate('3.22.0');
|
|
707
|
+
const isProjectSchemaJSONV3_23_0 = exports.isProjectSchemaJSONV3_23_0 = createVersionPredicate('3.23.0');
|
|
708
|
+
const isProjectSchemaJSONV3_24_0 = exports.isProjectSchemaJSONV3_24_0 = createVersionPredicate('3.24.0');
|
|
709
|
+
const isProjectSchemaJSONV3_25_0 = exports.isProjectSchemaJSONV3_25_0 = createVersionPredicate('3.25.0');
|
|
710
|
+
const isProjectSchemaJSONV3_26_0 = exports.isProjectSchemaJSONV3_26_0 = createVersionPredicate('3.26.0');
|
|
711
|
+
const isProjectSchemaJSONV3_27_0 = exports.isProjectSchemaJSONV3_27_0 = createVersionPredicate('3.27.0');
|
|
712
|
+
const isProjectSchemaJSONV3_28_0 = exports.isProjectSchemaJSONV3_28_0 = createVersionPredicate('3.28.0');
|
|
713
|
+
const isProjectSchemaJSONV3_29_0 = exports.isProjectSchemaJSONV3_29_0 = createVersionPredicate('3.29.0');
|
|
714
|
+
const isProjectSchemaJSONV3_30_0 = exports.isProjectSchemaJSONV3_30_0 = createVersionPredicate('3.30.0');
|
|
715
|
+
const isProjectSchemaJSONV3_31_0 = exports.isProjectSchemaJSONV3_31_0 = createVersionPredicate('3.31.0');
|
|
716
|
+
const isProjectSchemaJSONV3_32_0 = exports.isProjectSchemaJSONV3_32_0 = createVersionPredicate('3.32.0');
|
|
717
|
+
const isProjectSchemaJSONV3_33_0 = exports.isProjectSchemaJSONV3_33_0 = createVersionPredicate('3.33.0');
|
|
718
|
+
const isProjectSchemaJSONV3_34_0 = exports.isProjectSchemaJSONV3_34_0 = createVersionPredicate('3.34.0');
|
|
719
|
+
const isProjectSchemaJSONV3_35_0 = exports.isProjectSchemaJSONV3_35_0 = createVersionPredicate('3.35.0');
|
|
720
|
+
const isProjectSchemaJSONV3_36_0 = exports.isProjectSchemaJSONV3_36_0 = createVersionPredicate('3.36.0');
|
|
721
|
+
const isProjectSchemaJSONV3_37_0 = exports.isProjectSchemaJSONV3_37_0 = createVersionPredicate('3.37.0');
|
|
722
|
+
const isProjectSchemaJSONV3_38_0 = exports.isProjectSchemaJSONV3_38_0 = createVersionPredicate('3.38.0');
|
|
723
|
+
const isProjectSchemaJSONV3_39_0 = exports.isProjectSchemaJSONV3_39_0 = createVersionPredicate('3.39.0');
|
|
724
|
+
const isLatestProjectSchemaJSON = exports.isLatestProjectSchemaJSON = createVersionPredicate('3.39.0');
|
|
725
|
+
const isProjectSchemaJSONV4_0_0 = exports.isProjectSchemaJSONV4_0_0 = createVersionPredicate('4.0.0');
|
package/dist/scalars.js
CHANGED
|
@@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.isScalar = isScalar;
|
|
7
7
|
exports.scalars = void 0;
|
|
8
|
-
const scalars = ['string', 'boolean', 'integer', 'number'];
|
|
9
|
-
exports.scalars = scalars;
|
|
8
|
+
const scalars = exports.scalars = ['string', 'boolean', 'integer', 'number'];
|
|
10
9
|
function isScalar(str) {
|
|
11
10
|
return Array.from(scalars).includes(str);
|
|
12
11
|
}
|
package/dist/schema-util.js
CHANGED
|
@@ -88,8 +88,7 @@ var _isArray = _interopRequireDefault(require("lodash/isArray"));
|
|
|
88
88
|
var _some = _interopRequireDefault(require("lodash/some"));
|
|
89
89
|
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
90
90
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
91
|
-
const SERVICE_OBJECT_PATTERN_NAME = 'pattern:service-object';
|
|
92
|
-
exports.SERVICE_OBJECT_PATTERN_NAME = SERVICE_OBJECT_PATTERN_NAME;
|
|
91
|
+
const SERVICE_OBJECT_PATTERN_NAME = exports.SERVICE_OBJECT_PATTERN_NAME = 'pattern:service-object';
|
|
93
92
|
function isBuiltinShape(shapeName) {
|
|
94
93
|
return Boolean(_builtinSchema.builtInShapes[shapeName]);
|
|
95
94
|
}
|
|
@@ -104,22 +103,15 @@ function isBuiltinType(projectSchema, refSchema) {
|
|
|
104
103
|
const shapeName = (0, _refs.getRefShapeName)(projectSchema, refSchema);
|
|
105
104
|
return shapeName !== undefined && isBuiltinShape(shapeName);
|
|
106
105
|
}
|
|
107
|
-
const schemaMetadataKeys = ['$comment', 'title', 'description', '@l10n', '@deprecationReason', '@tag', '@tags', '@syncLocaleStructure', '@sensitive'];
|
|
108
|
-
exports.
|
|
109
|
-
const
|
|
110
|
-
exports.
|
|
111
|
-
const
|
|
112
|
-
exports.
|
|
113
|
-
const objectSchemaKeys = [...commonSchemaKeys, 'properties', 'required'];
|
|
114
|
-
exports.objectSchemaKeys = objectSchemaKeys;
|
|
115
|
-
const arraySchemaKeys = [...commonSchemaKeys, 'items', 'additionalItems', 'maxItems', 'minItems', 'uniqueItems'];
|
|
116
|
-
exports.arraySchemaKeys = arraySchemaKeys;
|
|
117
|
-
const multipleRelationshipSchemaKeys = [...schemaMetadataKeys, 'maxItems', 'minItems'];
|
|
106
|
+
const schemaMetadataKeys = exports.schemaMetadataKeys = ['$comment', 'title', 'description', '@l10n', '@deprecationReason', '@tag', '@tags', '@syncLocaleStructure', '@sensitive'];
|
|
107
|
+
const commonSchemaKeys = exports.commonSchemaKeys = ['type', 'default', 'readOnly', ...schemaMetadataKeys];
|
|
108
|
+
const scalarSchemaKeys = exports.scalarSchemaKeys = [...commonSchemaKeys, 'format', 'oneOf', 'multipleOf', 'maximum', 'exclusiveMaximum', 'minimum', 'exclusiveMinimum', 'maxLength', 'minLength', 'pattern'];
|
|
109
|
+
const objectSchemaKeys = exports.objectSchemaKeys = [...commonSchemaKeys, 'properties', 'required'];
|
|
110
|
+
const arraySchemaKeys = exports.arraySchemaKeys = [...commonSchemaKeys, 'items', 'additionalItems', 'maxItems', 'minItems', 'uniqueItems'];
|
|
111
|
+
const multipleRelationshipSchemaKeys = exports.multipleRelationshipSchemaKeys = [...schemaMetadataKeys, 'maxItems', 'minItems'];
|
|
118
112
|
|
|
119
113
|
// All properties except properties, items, additionalItems
|
|
120
|
-
exports.
|
|
121
|
-
const nonStructuralSchemaKeys = [...scalarSchemaKeys, '@resolver', '@input', '@output', '@backreference', '@args', 'required', 'maxItems', 'minItems', 'uniqueItems'];
|
|
122
|
-
exports.nonStructuralSchemaKeys = nonStructuralSchemaKeys;
|
|
114
|
+
const nonStructuralSchemaKeys = exports.nonStructuralSchemaKeys = [...scalarSchemaKeys, '@resolver', '@input', '@output', '@backreference', '@args', 'required', 'maxItems', 'minItems', 'uniqueItems'];
|
|
123
115
|
function getServiceIdFieldName(serviceFieldName) {
|
|
124
116
|
return `${serviceFieldName}Id`;
|
|
125
117
|
}
|
|
@@ -319,8 +311,7 @@ function getCommonBuiltInProperties(shape) {
|
|
|
319
311
|
}
|
|
320
312
|
};
|
|
321
313
|
}
|
|
322
|
-
const DEFAULT_ID_FIELD = 'id';
|
|
323
|
-
exports.DEFAULT_ID_FIELD = DEFAULT_ID_FIELD;
|
|
314
|
+
const DEFAULT_ID_FIELD = exports.DEFAULT_ID_FIELD = 'id';
|
|
324
315
|
function getIdField(obj) {
|
|
325
316
|
return obj?.idField ?? DEFAULT_ID_FIELD;
|
|
326
317
|
}
|
|
@@ -431,13 +422,12 @@ function getBuiltInPropertyNames(profile = BuiltInPropertiesProfile.Model) {
|
|
|
431
422
|
}
|
|
432
423
|
return new Set(keys);
|
|
433
424
|
}
|
|
434
|
-
let BuiltInPropertiesProfile = /*#__PURE__*/function (BuiltInPropertiesProfile) {
|
|
425
|
+
let BuiltInPropertiesProfile = exports.BuiltInPropertiesProfile = /*#__PURE__*/function (BuiltInPropertiesProfile) {
|
|
435
426
|
BuiltInPropertiesProfile[BuiltInPropertiesProfile["Model"] = 0] = "Model";
|
|
436
427
|
BuiltInPropertiesProfile[BuiltInPropertiesProfile["Cached"] = 1] = "Cached";
|
|
437
428
|
BuiltInPropertiesProfile[BuiltInPropertiesProfile["None"] = 2] = "None";
|
|
438
429
|
return BuiltInPropertiesProfile;
|
|
439
430
|
}({});
|
|
440
|
-
exports.BuiltInPropertiesProfile = BuiltInPropertiesProfile;
|
|
441
431
|
const BUILT_IN_PROPERTY_NAMES = {
|
|
442
432
|
[BuiltInPropertiesProfile.Model]: getBuiltInPropertyNames(BuiltInPropertiesProfile.Model),
|
|
443
433
|
[BuiltInPropertiesProfile.Cached]: getBuiltInPropertyNames(BuiltInPropertiesProfile.Cached),
|
|
@@ -1030,7 +1020,7 @@ function collectReferencedShapeNames(context, shapeNames) {
|
|
|
1030
1020
|
* Creates a schema property list chainable fn, allowing you to manipulate and
|
|
1031
1021
|
* iterate the properties in a schema.
|
|
1032
1022
|
*/
|
|
1033
|
-
const createSchemaPropertyList = (0, _curry.default)((context, shapeOrSchema) => {
|
|
1023
|
+
const createSchemaPropertyList = exports.createSchemaPropertyList = (0, _curry.default)((context, shapeOrSchema) => {
|
|
1034
1024
|
const propSchema = isShape(shapeOrSchema) ? shapeOrSchema.schema : shapeOrSchema;
|
|
1035
1025
|
const schema = (0, _refs.dereferenceSchema)(context, propSchema, isShape(shapeOrSchema) ? ['shapes', shapeOrSchema.name] : undefined);
|
|
1036
1026
|
const propertyIterator = new Map((0, _utils.isObjectSchema)(schema) ? Object.entries(schema.properties) : undefined);
|
|
@@ -1091,7 +1081,6 @@ const createSchemaPropertyList = (0, _curry.default)((context, shapeOrSchema) =>
|
|
|
1091
1081
|
};
|
|
1092
1082
|
return self;
|
|
1093
1083
|
});
|
|
1094
|
-
exports.createSchemaPropertyList = createSchemaPropertyList;
|
|
1095
1084
|
function isShape(shapeOrSchema) {
|
|
1096
1085
|
return 'schema' in shapeOrSchema;
|
|
1097
1086
|
}
|
|
@@ -1122,10 +1111,9 @@ class SchemaPropertyAccessor {
|
|
|
1122
1111
|
* Creates a schema property accessor, allowing you to safely access schema
|
|
1123
1112
|
* properties.
|
|
1124
1113
|
*/
|
|
1125
|
-
const createSchemaPropertyAccessor = (0, _curry.default)((context, shapeOrSchema) => {
|
|
1114
|
+
const createSchemaPropertyAccessor = exports.createSchemaPropertyAccessor = (0, _curry.default)((context, shapeOrSchema) => {
|
|
1126
1115
|
return new SchemaPropertyAccessor(context, shapeOrSchema);
|
|
1127
1116
|
});
|
|
1128
|
-
exports.createSchemaPropertyAccessor = createSchemaPropertyAccessor;
|
|
1129
1117
|
function findQueryHelper(slice, shapeName, resolver, type) {
|
|
1130
1118
|
const schemaPath = type === 'query' ? 'queries' : 'mutations';
|
|
1131
1119
|
return Object.keys(slice[schemaPath]).find(queryName => {
|
package/dist/schemas/index.js
CHANGED
|
@@ -80,7 +80,5 @@ var _v48 = _interopRequireDefault(require("./project-schema/v3.38.0.json"));
|
|
|
80
80
|
var _v49 = _interopRequireDefault(require("./project-schema/v4.0.0.json"));
|
|
81
81
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
82
82
|
// This file is generated by "pnpm json2ts"
|
|
83
|
-
const CURRENT_SCHEMA_VERSION = '3.39.0';
|
|
84
|
-
exports.
|
|
85
|
-
const allProjectSchemas = [_metaSchemaV.default, _v2.default, _metaSchemaV2.default, _v3.default, _metaSchemaV3.default, _v4.default, _metaSchemaV4.default, _v5.default, _metaSchemaV5.default, _v6.default, _metaSchemaV6.default, _v7.default, _metaSchemaV7.default, _v8.default, _metaSchemaV8.default, _v9.default, _metaSchemaV9.default, _v10.default, _metaSchemaV10.default, _v11.default, _metaSchemaV11.default, _v12.default, _metaSchemaV12.default, _v13.default, _v14.default, _v15.default, _v16.default, _v17.default, _v18.default, _v19.default, _v20.default, _v21.default, _v22.default, _v23.default, _v24.default, _v25.default, _v26.default, _v27.default, _v28.default, _v29.default, _v30.default, _v31.default, _v32.default, _v33.default, _v34.default, _v35.default, _v36.default, _v37.default, _v38.default, _v39.default, _v40.default, _v41.default, _v42.default, _v43.default, _v44.default, _v45.default, _v46.default, _v47.default, _v48.default, _v.default, _v49.default];
|
|
86
|
-
exports.allProjectSchemas = allProjectSchemas;
|
|
83
|
+
const CURRENT_SCHEMA_VERSION = exports.CURRENT_SCHEMA_VERSION = '3.39.0';
|
|
84
|
+
const allProjectSchemas = exports.allProjectSchemas = [_metaSchemaV.default, _v2.default, _metaSchemaV2.default, _v3.default, _metaSchemaV3.default, _v4.default, _metaSchemaV4.default, _v5.default, _metaSchemaV5.default, _v6.default, _metaSchemaV6.default, _v7.default, _metaSchemaV7.default, _v8.default, _metaSchemaV8.default, _v9.default, _metaSchemaV9.default, _v10.default, _metaSchemaV10.default, _v11.default, _metaSchemaV11.default, _v12.default, _metaSchemaV12.default, _v13.default, _v14.default, _v15.default, _v16.default, _v17.default, _v18.default, _v19.default, _v20.default, _v21.default, _v22.default, _v23.default, _v24.default, _v25.default, _v26.default, _v27.default, _v28.default, _v29.default, _v30.default, _v31.default, _v32.default, _v33.default, _v34.default, _v35.default, _v36.default, _v37.default, _v38.default, _v39.default, _v40.default, _v41.default, _v42.default, _v43.default, _v44.default, _v45.default, _v46.default, _v47.default, _v48.default, _v.default, _v49.default];
|
package/dist/taxonomies.js
CHANGED
|
@@ -28,9 +28,8 @@ function getFirstStringFieldV3(shape, projectSchema) {
|
|
|
28
28
|
key: schemaProperties.getKey(name)
|
|
29
29
|
} : null;
|
|
30
30
|
}
|
|
31
|
-
const getTaxonomyField = weakMemoize((shape, projectSchema) => shape.model?.type === 'taxonomy' ? getFirstStringFieldV3(shape, projectSchema) : null);
|
|
32
|
-
exports.
|
|
33
|
-
const getTaxonomies = weakMemoize(projectSchema => {
|
|
31
|
+
const getTaxonomyField = exports.getTaxonomyField = weakMemoize((shape, projectSchema) => shape.model?.type === 'taxonomy' ? getFirstStringFieldV3(shape, projectSchema) : null);
|
|
32
|
+
const getTaxonomies = exports.getTaxonomies = weakMemoize(projectSchema => {
|
|
34
33
|
const {
|
|
35
34
|
shapes
|
|
36
35
|
} = projectSchema;
|
|
@@ -45,5 +44,4 @@ const getTaxonomies = weakMemoize(projectSchema => {
|
|
|
45
44
|
}
|
|
46
45
|
return result;
|
|
47
46
|
}, []);
|
|
48
|
-
});
|
|
49
|
-
exports.getTaxonomies = getTaxonomies;
|
|
47
|
+
});
|
|
@@ -25,35 +25,21 @@ var _util2 = require("../util");
|
|
|
25
25
|
var _createInputSchema = require("../create-input-schema");
|
|
26
26
|
var _get = _interopRequireDefault(require("lodash/get"));
|
|
27
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
28
|
-
const TSGetArgs = getIDQueryArgs('TSGetArgs');
|
|
29
|
-
exports.
|
|
30
|
-
const
|
|
31
|
-
exports.
|
|
32
|
-
const
|
|
33
|
-
exports.
|
|
34
|
-
const
|
|
35
|
-
exports.
|
|
36
|
-
const
|
|
37
|
-
exports.
|
|
38
|
-
const
|
|
39
|
-
exports.
|
|
40
|
-
const
|
|
41
|
-
exports.
|
|
42
|
-
const
|
|
43
|
-
exports.DeleteArgs = DeleteArgs;
|
|
44
|
-
const PaginatedList = getPaginatedListShape;
|
|
45
|
-
exports.PaginatedList = PaginatedList;
|
|
46
|
-
const SearchResults = getSearchResultsShape;
|
|
47
|
-
exports.SearchResults = SearchResults;
|
|
48
|
-
const CreateResult = getMutationResultType(_types.TemplateVerbs.Create);
|
|
49
|
-
exports.CreateResult = CreateResult;
|
|
50
|
-
const UpdateResult = getMutationResultType(_types.TemplateVerbs.Update);
|
|
51
|
-
exports.UpdateResult = UpdateResult;
|
|
52
|
-
const DuplicateResult = getMutationResultType(_types.TemplateVerbs.Duplicate);
|
|
53
|
-
exports.DuplicateResult = DuplicateResult;
|
|
54
|
-
const DeleteResult = getMutationResultType(_types.TemplateVerbs.Delete);
|
|
55
|
-
exports.DeleteResult = DeleteResult;
|
|
56
|
-
const TSSearchSortInput = (0, _schemaUtil.createShape)('TSSearchSortInput', {
|
|
28
|
+
const TSGetArgs = exports.TSGetArgs = getIDQueryArgs('TSGetArgs');
|
|
29
|
+
const TSGetSingletonArgs = exports.TSGetSingletonArgs = getIDQueryArgs('TSGetSingletonArgs');
|
|
30
|
+
const TSListArgs = exports.TSListArgs = getShapeListQueryArgs('TSListArgs', true);
|
|
31
|
+
const TSSearchArgs = exports.TSSearchArgs = getShapeListQueryArgs('TSSearchArgs', false);
|
|
32
|
+
const CreateArgs = exports.CreateArgs = getMutationArgs('CreateArgs', _types.TemplateVerbs.Create);
|
|
33
|
+
const UpdateArgs = exports.UpdateArgs = getMutationArgs('UpdateArgs', _types.TemplateVerbs.Update);
|
|
34
|
+
const DuplicateArgs = exports.DuplicateArgs = getMutationArgs('DuplicateArgs', _types.TemplateVerbs.Duplicate);
|
|
35
|
+
const DeleteArgs = exports.DeleteArgs = getMutationArgs('DeleteArgs', _types.TemplateVerbs.Delete);
|
|
36
|
+
const PaginatedList = exports.PaginatedList = getPaginatedListShape;
|
|
37
|
+
const SearchResults = exports.SearchResults = getSearchResultsShape;
|
|
38
|
+
const CreateResult = exports.CreateResult = getMutationResultType(_types.TemplateVerbs.Create);
|
|
39
|
+
const UpdateResult = exports.UpdateResult = getMutationResultType(_types.TemplateVerbs.Update);
|
|
40
|
+
const DuplicateResult = exports.DuplicateResult = getMutationResultType(_types.TemplateVerbs.Duplicate);
|
|
41
|
+
const DeleteResult = exports.DeleteResult = getMutationResultType(_types.TemplateVerbs.Delete);
|
|
42
|
+
const TSSearchSortInput = exports.TSSearchSortInput = (0, _schemaUtil.createShape)('TSSearchSortInput', {
|
|
57
43
|
type: 'object',
|
|
58
44
|
properties: {
|
|
59
45
|
field: {
|
|
@@ -66,8 +52,7 @@ const TSSearchSortInput = (0, _schemaUtil.createShape)('TSSearchSortInput', {
|
|
|
66
52
|
},
|
|
67
53
|
required: ['field', 'order']
|
|
68
54
|
});
|
|
69
|
-
exports.
|
|
70
|
-
const commonSearchProps = {
|
|
55
|
+
const commonSearchProps = exports.commonSearchProps = {
|
|
71
56
|
terms: {
|
|
72
57
|
type: 'string'
|
|
73
58
|
},
|
|
@@ -91,8 +76,7 @@ const commonSearchProps = {
|
|
|
91
76
|
}
|
|
92
77
|
}
|
|
93
78
|
};
|
|
94
|
-
exports.
|
|
95
|
-
const localeProps = {
|
|
79
|
+
const localeProps = exports.localeProps = {
|
|
96
80
|
type: 'object',
|
|
97
81
|
properties: {
|
|
98
82
|
locale: {
|
|
@@ -104,8 +88,7 @@ const localeProps = {
|
|
|
104
88
|
}
|
|
105
89
|
}
|
|
106
90
|
};
|
|
107
|
-
exports.
|
|
108
|
-
const termsProps = {
|
|
91
|
+
const termsProps = exports.termsProps = {
|
|
109
92
|
type: 'object',
|
|
110
93
|
properties: {
|
|
111
94
|
terms: {
|
|
@@ -113,8 +96,7 @@ const termsProps = {
|
|
|
113
96
|
}
|
|
114
97
|
}
|
|
115
98
|
};
|
|
116
|
-
exports.
|
|
117
|
-
const TSContentStructureInput = (0, _schemaUtil.createShape)('TSContentStructureInput', {
|
|
99
|
+
const TSContentStructureInput = exports.TSContentStructureInput = (0, _schemaUtil.createShape)('TSContentStructureInput', {
|
|
118
100
|
type: 'object',
|
|
119
101
|
properties: {
|
|
120
102
|
path: {
|
|
@@ -133,7 +115,6 @@ const TSContentStructureInput = (0, _schemaUtil.createShape)('TSContentStructure
|
|
|
133
115
|
}, {
|
|
134
116
|
description: 'Describes a structural update to an array of data.'
|
|
135
117
|
});
|
|
136
|
-
exports.TSContentStructureInput = TSContentStructureInput;
|
|
137
118
|
function getPaginatedListShape(context, shape) {
|
|
138
119
|
const shapeName = `${shape.name}${_migration.listTypePrefix}`;
|
|
139
120
|
return {
|
|
@@ -349,7 +330,7 @@ function getMutationResultType(verb) {
|
|
|
349
330
|
};
|
|
350
331
|
};
|
|
351
332
|
}
|
|
352
|
-
const commonSearchArgs = {
|
|
333
|
+
const commonSearchArgs = exports.commonSearchArgs = {
|
|
353
334
|
type: 'object',
|
|
354
335
|
properties: {
|
|
355
336
|
terms: {
|
|
@@ -376,7 +357,6 @@ const commonSearchArgs = {
|
|
|
376
357
|
}
|
|
377
358
|
}
|
|
378
359
|
};
|
|
379
|
-
exports.commonSearchArgs = commonSearchArgs;
|
|
380
360
|
const legacyListArgs = {
|
|
381
361
|
type: 'object',
|
|
382
362
|
properties: {
|
|
@@ -4,11 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TemplateVerbs = void 0;
|
|
7
|
-
let TemplateVerbs = /*#__PURE__*/function (TemplateVerbs) {
|
|
7
|
+
let TemplateVerbs = exports.TemplateVerbs = /*#__PURE__*/function (TemplateVerbs) {
|
|
8
8
|
TemplateVerbs["Create"] = "create";
|
|
9
9
|
TemplateVerbs["Update"] = "update";
|
|
10
10
|
TemplateVerbs["Duplicate"] = "duplicate";
|
|
11
11
|
TemplateVerbs["Delete"] = "delete";
|
|
12
12
|
return TemplateVerbs;
|
|
13
|
-
}({});
|
|
14
|
-
exports.TemplateVerbs = TemplateVerbs;
|
|
13
|
+
}({});
|
|
@@ -21,8 +21,7 @@ var _unions = require("../unions");
|
|
|
21
21
|
var _utils = require("../types/utils");
|
|
22
22
|
var _relationships = require("../relationships");
|
|
23
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
-
const MAX_RELATIONSHIP_DEPTH = 1;
|
|
25
|
-
exports.MAX_RELATIONSHIP_DEPTH = MAX_RELATIONSHIP_DEPTH;
|
|
24
|
+
const MAX_RELATIONSHIP_DEPTH = exports.MAX_RELATIONSHIP_DEPTH = 1;
|
|
26
25
|
const exceededRelationshipDepth = (depth = 0) => depth >= MAX_RELATIONSHIP_DEPTH;
|
|
27
26
|
exports.exceededRelationshipDepth = exceededRelationshipDepth;
|
|
28
27
|
class ShapeCache {
|
|
@@ -53,7 +52,7 @@ class ShapeCache {
|
|
|
53
52
|
return result;
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
|
-
const fieldTypeComparison = {
|
|
55
|
+
const fieldTypeComparison = exports.fieldTypeComparison = {
|
|
57
56
|
id: {
|
|
58
57
|
comparators: ['eq', 'in'],
|
|
59
58
|
type: 'string'
|
|
@@ -91,8 +90,7 @@ const fieldTypeComparison = {
|
|
|
91
90
|
type: 'string'
|
|
92
91
|
}
|
|
93
92
|
};
|
|
94
|
-
exports.
|
|
95
|
-
const comparatorDescriptions = {
|
|
93
|
+
const comparatorDescriptions = exports.comparatorDescriptions = {
|
|
96
94
|
eq: 'Exact match',
|
|
97
95
|
gt: 'Greater than',
|
|
98
96
|
gte: 'Greater than or equal',
|
|
@@ -102,15 +100,12 @@ const comparatorDescriptions = {
|
|
|
102
100
|
match: 'Full text searching with fuzzy matching.',
|
|
103
101
|
regexp: 'Regular expression string matching. Use of * wildcards could degrade performance.'
|
|
104
102
|
};
|
|
105
|
-
exports.
|
|
106
|
-
const
|
|
107
|
-
exports.booleanOperators = booleanOperators;
|
|
108
|
-
const boolOpDescriptionMap = {
|
|
103
|
+
const booleanOperators = exports.booleanOperators = ['AND', 'OR', 'NOT'];
|
|
104
|
+
const boolOpDescriptionMap = exports.boolOpDescriptionMap = {
|
|
109
105
|
AND: 'AND takes an array of conditions that must appear in the matching results. Nested boolean operators can be used to create complex filters.',
|
|
110
106
|
OR: 'OR takes an array of conditions that should appear in the matching results. Nested boolean operators can be used to create complex filters.',
|
|
111
107
|
NOT: 'NOT takes a single condition that must not appear in the matching results.'
|
|
112
108
|
};
|
|
113
|
-
exports.boolOpDescriptionMap = boolOpDescriptionMap;
|
|
114
109
|
function getConflictingProperties(projectSchema, shapes) {
|
|
115
110
|
const conflicts = new Set();
|
|
116
111
|
const allProps = {};
|
|
@@ -344,7 +339,6 @@ function getPropertyComparisonType(name, prop, shapeName, context) {
|
|
|
344
339
|
...context,
|
|
345
340
|
conflictingProperties: undefined // non-union objects have no conflicts
|
|
346
341
|
};
|
|
347
|
-
|
|
348
342
|
for (const propName of Object.keys(properties)) {
|
|
349
343
|
Object.assign(props, getPropertyComparisonType(propName, properties[propName], shapeName, fieldContext));
|
|
350
344
|
}
|
package/dist/types/types.js
CHANGED
|
@@ -4,9 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.projectSchemaImportOptionalProps = exports.legacyProjectSchemaImportOptionalProps = exports.RefType = exports.ArgsType = void 0;
|
|
7
|
-
const projectSchemaImportOptionalProps = ['projectId', 'locales', 'defaultLocale', 'author'];
|
|
8
|
-
exports.
|
|
9
|
-
const legacyProjectSchemaImportOptionalProps = ['created', 'updated', 'version', 'dataKey'];
|
|
7
|
+
const projectSchemaImportOptionalProps = exports.projectSchemaImportOptionalProps = ['projectId', 'locales', 'defaultLocale', 'author'];
|
|
8
|
+
const legacyProjectSchemaImportOptionalProps = exports.legacyProjectSchemaImportOptionalProps = ['created', 'updated', 'version', 'dataKey'];
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Remote service configuration types
|
|
@@ -25,11 +24,10 @@ const legacyProjectSchemaImportOptionalProps = ['created', 'updated', 'version',
|
|
|
25
24
|
* A type suitable for service object updates, mostly concerns authentication
|
|
26
25
|
* requirements.
|
|
27
26
|
*/
|
|
28
|
-
exports.legacyProjectSchemaImportOptionalProps = legacyProjectSchemaImportOptionalProps;
|
|
29
27
|
/**
|
|
30
28
|
* Types of refs
|
|
31
29
|
*/
|
|
32
|
-
let RefType = /*#__PURE__*/function (RefType) {
|
|
30
|
+
let RefType = exports.RefType = /*#__PURE__*/function (RefType) {
|
|
33
31
|
RefType["@ref"] = "@ref";
|
|
34
32
|
RefType["$ref"] = "$ref";
|
|
35
33
|
return RefType;
|
|
@@ -37,11 +35,10 @@ let RefType = /*#__PURE__*/function (RefType) {
|
|
|
37
35
|
/**
|
|
38
36
|
* Stub of a PropertySchema that may contain a `$ref` or `@ref`.
|
|
39
37
|
*/
|
|
40
|
-
exports.RefType = RefType;
|
|
41
38
|
/**
|
|
42
39
|
* Types of args
|
|
43
40
|
*/
|
|
44
|
-
let ArgsType = /*#__PURE__*/function (ArgsType) {
|
|
41
|
+
let ArgsType = exports.ArgsType = /*#__PURE__*/function (ArgsType) {
|
|
45
42
|
ArgsType["@args"] = "@args";
|
|
46
43
|
ArgsType["args"] = "args";
|
|
47
44
|
return ArgsType;
|
|
@@ -60,5 +57,4 @@ let ArgsType = /*#__PURE__*/function (ArgsType) {
|
|
|
60
57
|
*/
|
|
61
58
|
/**
|
|
62
59
|
* The old relationship format, used in client UI.
|
|
63
|
-
*/
|
|
64
|
-
exports.ArgsType = ArgsType;
|
|
60
|
+
*/
|
package/dist/unions.js
CHANGED
|
@@ -127,13 +127,11 @@ function transformOneOf(process) {
|
|
|
127
127
|
* See https://github.com/graphql/graphql-spec/pull/825 for more on "GraphQL oneOf"
|
|
128
128
|
* Opposite of `wrapOneOfObjects`
|
|
129
129
|
*/
|
|
130
|
-
const unwrapOneOfObjects = transformOneOf(createUnwrapTransform);
|
|
130
|
+
const unwrapOneOfObjects = exports.unwrapOneOfObjects = transformOneOf(createUnwrapTransform);
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* Wrap oneOf objects in "GraphQL oneOf" style wrapper objects
|
|
134
134
|
* See https://github.com/graphql/graphql-spec/pull/825 for more on "GraphQL oneOf"
|
|
135
135
|
* Opposite of `unwrapOneOfObjects`
|
|
136
136
|
*/
|
|
137
|
-
exports.
|
|
138
|
-
const wrapOneOfObjects = transformOneOf(createWrapTransform);
|
|
139
|
-
exports.wrapOneOfObjects = wrapOneOfObjects;
|
|
137
|
+
const wrapOneOfObjects = exports.wrapOneOfObjects = transformOneOf(createWrapTransform);
|
|
@@ -71,7 +71,5 @@ function getQueryIndexConfigHelper(op) {
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
const getListQueryIndexConfigs = getQueryIndexConfigHelper('list');
|
|
75
|
-
exports.
|
|
76
|
-
const getGetQueryIndexConfig = getQueryIndexConfigHelper('get');
|
|
77
|
-
exports.getGetQueryIndexConfig = getGetQueryIndexConfig;
|
|
74
|
+
const getListQueryIndexConfigs = exports.getListQueryIndexConfigs = getQueryIndexConfigHelper('list');
|
|
75
|
+
const getGetQueryIndexConfig = exports.getGetQueryIndexConfig = getQueryIndexConfigHelper('get');
|
package/dist/versions.js
CHANGED
|
@@ -12,9 +12,6 @@ Object.defineProperty(exports, "CURRENT_SCHEMA_VERSION", {
|
|
|
12
12
|
});
|
|
13
13
|
exports.LEGACY_SCHEMA_VERSION = exports.LEGACY_API_VERSION = void 0;
|
|
14
14
|
var _schemas = require("./schemas");
|
|
15
|
-
const LEGACY_SCHEMA_VERSION = '1.0.0';
|
|
16
|
-
exports.
|
|
17
|
-
const
|
|
18
|
-
exports.CURRENT_API_VERSION = CURRENT_API_VERSION;
|
|
19
|
-
const LEGACY_API_VERSION = '1';
|
|
20
|
-
exports.LEGACY_API_VERSION = LEGACY_API_VERSION;
|
|
15
|
+
const LEGACY_SCHEMA_VERSION = exports.LEGACY_SCHEMA_VERSION = '1.0.0';
|
|
16
|
+
const CURRENT_API_VERSION = exports.CURRENT_API_VERSION = '2';
|
|
17
|
+
const LEGACY_API_VERSION = exports.LEGACY_API_VERSION = '1';
|
package/dist/workflows.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.getWorkflow = getWorkflow;
|
|
|
12
12
|
exports.getWorkflowStepKeys = getWorkflowStepKeys;
|
|
13
13
|
exports.statusFallback = statusFallback;
|
|
14
14
|
var _schemaUtil = require("./schema-util");
|
|
15
|
-
const defaultWorkflow = {
|
|
15
|
+
const defaultWorkflow = exports.defaultWorkflow = {
|
|
16
16
|
name: 'default',
|
|
17
17
|
title: 'Default',
|
|
18
18
|
steps: [{
|
|
@@ -29,7 +29,6 @@ const defaultWorkflow = {
|
|
|
29
29
|
live: true
|
|
30
30
|
}]
|
|
31
31
|
};
|
|
32
|
-
exports.defaultWorkflow = defaultWorkflow;
|
|
33
32
|
function getWorkflow(projectSchema, shapeId) {
|
|
34
33
|
const workflow = (0, _schemaUtil.getShapeById)(projectSchema, shapeId)?.workflow;
|
|
35
34
|
if (workflow) {
|
package/es/layers/type-utils.js
CHANGED
|
@@ -4,6 +4,7 @@ import isString from 'lodash/isString';
|
|
|
4
4
|
import isArray from 'lodash/isArray';
|
|
5
5
|
import { latestSchemaJson } from '../schemas';
|
|
6
6
|
/** Resolver Type Utils **/
|
|
7
|
+
|
|
7
8
|
/**
|
|
8
9
|
* Only tests that the shape is right, not that the name is correct. That's a job for the validator.
|
|
9
10
|
*/
|
package/es/services.js
CHANGED
|
@@ -14,12 +14,15 @@ import isEmpty from 'lodash/isEmpty';
|
|
|
14
14
|
* Throws an error if decryption fails
|
|
15
15
|
*/
|
|
16
16
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
17
|
+
|
|
17
18
|
/**
|
|
18
19
|
* Decrypt an encrypted authentication JSON string
|
|
19
20
|
* Returns undefined if decryption fails
|
|
20
21
|
*/
|
|
21
22
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
23
|
+
|
|
22
24
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
25
|
+
|
|
23
26
|
/**
|
|
24
27
|
* Given a `StoredServiceConfig` returns a usable `ServiceConfig` with the
|
|
25
28
|
* authentication object decrypted.
|
|
@@ -326,7 +326,6 @@ export function getPropertyComparisonType(name, prop, shapeName, context) {
|
|
|
326
326
|
...context,
|
|
327
327
|
conflictingProperties: undefined // non-union objects have no conflicts
|
|
328
328
|
};
|
|
329
|
-
|
|
330
329
|
for (const propName of Object.keys(properties)) {
|
|
331
330
|
Object.assign(props, getPropertyComparisonType(propName, properties[propName], shapeName, fieldContext));
|
|
332
331
|
}
|
package/es/types/types.js
CHANGED
|
@@ -4,17 +4,21 @@ export const legacyProjectSchemaImportOptionalProps = ['created', 'updated', 've
|
|
|
4
4
|
/**
|
|
5
5
|
* Remote service configuration types
|
|
6
6
|
*/
|
|
7
|
+
|
|
7
8
|
/**
|
|
8
9
|
* Old service authentication
|
|
9
10
|
* @deprecated
|
|
10
11
|
*/
|
|
12
|
+
|
|
11
13
|
/**
|
|
12
14
|
* Support null sentinels for authentication
|
|
13
15
|
*/
|
|
16
|
+
|
|
14
17
|
/**
|
|
15
18
|
* A type suitable for service object updates, mostly concerns authentication
|
|
16
19
|
* requirements.
|
|
17
20
|
*/
|
|
21
|
+
|
|
18
22
|
/**
|
|
19
23
|
* Types of refs
|
|
20
24
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/schema",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.24",
|
|
4
4
|
"description": "TakeShape Schema",
|
|
5
5
|
"homepage": "https://www.takeshape.io",
|
|
6
6
|
"repository": {
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"p-reduce": "^2.1.0",
|
|
29
29
|
"semver": "^7.3.2",
|
|
30
30
|
"tiny-invariant": "^1.2.0",
|
|
31
|
-
"@takeshape/errors": "10.2.
|
|
32
|
-
"@takeshape/json-schema": "10.2.
|
|
33
|
-
"@takeshape/util": "10.2.
|
|
31
|
+
"@takeshape/errors": "10.2.24",
|
|
32
|
+
"@takeshape/json-schema": "10.2.24",
|
|
33
|
+
"@takeshape/util": "10.2.24"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@takeshape/json-schema-to-typescript": "^11.0.0",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"meow": "^9.0.0",
|
|
47
47
|
"p-map": "^5.0.0",
|
|
48
48
|
"shortid": "^2.2.15",
|
|
49
|
-
"@takeshape/infra": "10.2.
|
|
50
|
-
"@takeshape/typescript-jest-junit-reporter": "10.2.
|
|
49
|
+
"@takeshape/infra": "10.2.24",
|
|
50
|
+
"@takeshape/typescript-jest-junit-reporter": "10.2.24"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
53
|
"node": ">=18"
|