@osdk/maker 0.16.0-beta.3 → 0.16.0-beta.5
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/CHANGELOG.md +22 -0
- package/build/browser/api/cloneDefinition.js +36 -0
- package/build/browser/api/cloneDefinition.js.map +1 -0
- package/build/browser/api/code-snippets/createCodeSnippets.js +1 -1
- package/build/browser/api/code-snippets/createCodeSnippets.js.map +1 -1
- package/build/browser/api/defineAction.js +3 -1
- package/build/browser/api/defineAction.js.map +1 -1
- package/build/browser/api/defineCreateInterfaceObjectAction.js +3 -1
- package/build/browser/api/defineCreateInterfaceObjectAction.js.map +1 -1
- package/build/browser/api/defineCreateObjectAction.js +3 -1
- package/build/browser/api/defineCreateObjectAction.js.map +1 -1
- package/build/browser/api/defineCreateOrModifyObjectAction.js +3 -1
- package/build/browser/api/defineCreateOrModifyObjectAction.js.map +1 -1
- package/build/browser/api/defineDeleteInterfaceObjectAction.js +3 -1
- package/build/browser/api/defineDeleteInterfaceObjectAction.js.map +1 -1
- package/build/browser/api/defineDeleteObjectAction.js +3 -1
- package/build/browser/api/defineDeleteObjectAction.js.map +1 -1
- package/build/browser/api/defineInterface.js +3 -1
- package/build/browser/api/defineInterface.js.map +1 -1
- package/build/browser/api/defineInterfaceLinkConstraint.js +6 -2
- package/build/browser/api/defineInterfaceLinkConstraint.js.map +1 -1
- package/build/browser/api/defineLink.js +3 -1
- package/build/browser/api/defineLink.js.map +1 -1
- package/build/browser/api/defineModifyInterfaceObjectAction.js +3 -1
- package/build/browser/api/defineModifyInterfaceObjectAction.js.map +1 -1
- package/build/browser/api/defineModifyObjectAction.js +3 -1
- package/build/browser/api/defineModifyObjectAction.js.map +1 -1
- package/build/browser/api/defineObject.js +3 -1
- package/build/browser/api/defineObject.js.map +1 -1
- package/build/browser/api/defineSpt.js +3 -1
- package/build/browser/api/defineSpt.js.map +1 -1
- package/build/browser/api/defineValueType.js +3 -1
- package/build/browser/api/defineValueType.js.map +1 -1
- package/build/browser/api/object/ObjectTypeDatasourceDefinition.js.map +1 -1
- package/build/browser/cli/main.js +1 -1
- package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js +10 -1
- package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -1
- package/build/cjs/index.cjs +54 -17
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +20 -15
- package/build/esm/api/cloneDefinition.js +36 -0
- package/build/esm/api/cloneDefinition.js.map +1 -0
- package/build/esm/api/code-snippets/createCodeSnippets.js +1 -1
- package/build/esm/api/code-snippets/createCodeSnippets.js.map +1 -1
- package/build/esm/api/defineAction.js +3 -1
- package/build/esm/api/defineAction.js.map +1 -1
- package/build/esm/api/defineCreateInterfaceObjectAction.js +3 -1
- package/build/esm/api/defineCreateInterfaceObjectAction.js.map +1 -1
- package/build/esm/api/defineCreateObjectAction.js +3 -1
- package/build/esm/api/defineCreateObjectAction.js.map +1 -1
- package/build/esm/api/defineCreateOrModifyObjectAction.js +3 -1
- package/build/esm/api/defineCreateOrModifyObjectAction.js.map +1 -1
- package/build/esm/api/defineDeleteInterfaceObjectAction.js +3 -1
- package/build/esm/api/defineDeleteInterfaceObjectAction.js.map +1 -1
- package/build/esm/api/defineDeleteObjectAction.js +3 -1
- package/build/esm/api/defineDeleteObjectAction.js.map +1 -1
- package/build/esm/api/defineInterface.js +3 -1
- package/build/esm/api/defineInterface.js.map +1 -1
- package/build/esm/api/defineInterfaceLinkConstraint.js +6 -2
- package/build/esm/api/defineInterfaceLinkConstraint.js.map +1 -1
- package/build/esm/api/defineLink.js +3 -1
- package/build/esm/api/defineLink.js.map +1 -1
- package/build/esm/api/defineModifyInterfaceObjectAction.js +3 -1
- package/build/esm/api/defineModifyInterfaceObjectAction.js.map +1 -1
- package/build/esm/api/defineModifyObjectAction.js +3 -1
- package/build/esm/api/defineModifyObjectAction.js.map +1 -1
- package/build/esm/api/defineObject.js +3 -1
- package/build/esm/api/defineObject.js.map +1 -1
- package/build/esm/api/defineSpt.js +3 -1
- package/build/esm/api/defineSpt.js.map +1 -1
- package/build/esm/api/defineValueType.js +3 -1
- package/build/esm/api/defineValueType.js.map +1 -1
- package/build/esm/api/object/ObjectTypeDatasourceDefinition.js.map +1 -1
- package/build/esm/cli/main.js +1 -1
- package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js +10 -1
- package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -1
- package/build/types/api/cloneDefinition.d.ts +9 -0
- package/build/types/api/cloneDefinition.d.ts.map +1 -0
- package/build/types/api/defineAction.d.ts +1 -1
- package/build/types/api/defineAction.d.ts.map +1 -1
- package/build/types/api/defineCreateInterfaceObjectAction.d.ts +1 -1
- package/build/types/api/defineCreateInterfaceObjectAction.d.ts.map +1 -1
- package/build/types/api/defineCreateObjectAction.d.ts +1 -1
- package/build/types/api/defineCreateObjectAction.d.ts.map +1 -1
- package/build/types/api/defineCreateOrModifyObjectAction.d.ts +1 -1
- package/build/types/api/defineCreateOrModifyObjectAction.d.ts.map +1 -1
- package/build/types/api/defineDeleteInterfaceObjectAction.d.ts +1 -1
- package/build/types/api/defineDeleteInterfaceObjectAction.d.ts.map +1 -1
- package/build/types/api/defineDeleteObjectAction.d.ts +1 -1
- package/build/types/api/defineDeleteObjectAction.d.ts.map +1 -1
- package/build/types/api/defineInterface.d.ts +1 -1
- package/build/types/api/defineInterface.d.ts.map +1 -1
- package/build/types/api/defineInterfaceLinkConstraint.d.ts +1 -1
- package/build/types/api/defineInterfaceLinkConstraint.d.ts.map +1 -1
- package/build/types/api/defineLink.d.ts +1 -1
- package/build/types/api/defineLink.d.ts.map +1 -1
- package/build/types/api/defineModifyInterfaceObjectAction.d.ts +1 -1
- package/build/types/api/defineModifyInterfaceObjectAction.d.ts.map +1 -1
- package/build/types/api/defineModifyObjectAction.d.ts +1 -1
- package/build/types/api/defineModifyObjectAction.d.ts.map +1 -1
- package/build/types/api/defineObject.d.ts +1 -1
- package/build/types/api/defineObject.d.ts.map +1 -1
- package/build/types/api/defineSpt.d.ts +1 -1
- package/build/types/api/defineSpt.d.ts.map +1 -1
- package/build/types/api/defineValueType.d.ts +1 -1
- package/build/types/api/defineValueType.d.ts.map +1 -1
- package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts +6 -1
- package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts.map +1 -1
- package/package.json +5 -5
package/build/cjs/index.cjs
CHANGED
|
@@ -282,6 +282,19 @@ function convertLinkStatus(status) {
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
+
// src/api/cloneDefinition.ts
|
|
286
|
+
function cloneDefinition(input) {
|
|
287
|
+
const clone = {
|
|
288
|
+
...input
|
|
289
|
+
};
|
|
290
|
+
for (const key in clone) {
|
|
291
|
+
if (Object.prototype.hasOwnProperty.call(clone, key) && Array.isArray(clone[key])) {
|
|
292
|
+
clone[key] = [...clone[key]];
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return clone;
|
|
296
|
+
}
|
|
297
|
+
|
|
285
298
|
// src/api/interface/InterfacePropertyType.ts
|
|
286
299
|
function isInterfaceSharedPropertyType(interfacePropertyType) {
|
|
287
300
|
return "sharedPropertyType" in interfacePropertyType;
|
|
@@ -330,7 +343,8 @@ function isStruct(type) {
|
|
|
330
343
|
var ISO_8601_DURATION = /^P(?!$)(?:(?:((?:\d+Y)|(?:\d+(?:\.|,)\d+Y$))?((?:\d+M)|(?:\d+(?:\.|,)\d+M$))?((?:\d+D)|(?:\d+(?:\.|,)\d+D$))?(T((?:\d+H)|(?:\d+(?:\.|,)\d+H$))?((?:\d+M)|(?:\d+(?:\.|,)\d+M$))?((?:\d+S)|(?:\d+(?:\.|,)\d+S$))?)?)|(?:\d+(?:(?:\.|,)\d+)?W))$/;
|
|
331
344
|
var ISO_8601_DATETIME = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?)?$/;
|
|
332
345
|
var API_NAME_PATTERN = /^([a-zA-Z][a-zA-Z0-9\\-]*)$/;
|
|
333
|
-
function defineObject(
|
|
346
|
+
function defineObject(objectDefInput) {
|
|
347
|
+
const objectDef = cloneDefinition(objectDefInput);
|
|
334
348
|
const apiName = namespace + objectDef.apiName;
|
|
335
349
|
const propertyApiNames = objectDef.properties ? Object.keys(objectDef.properties) : [];
|
|
336
350
|
if (ontologyDefinition[OntologyEntityTypeEnum.OBJECT_TYPE][apiName] !== void 0) {
|
|
@@ -1300,7 +1314,7 @@ function convertInterface(interfaceType) {
|
|
|
1300
1314
|
};
|
|
1301
1315
|
}
|
|
1302
1316
|
function convertDatasourceDefinition(objectType, properties) {
|
|
1303
|
-
const baseDatasource = objectType.datasources?.find((ds) => ["dataset", "stream", "restrictedView"].includes(ds.type));
|
|
1317
|
+
const baseDatasource = objectType.datasources?.find((ds) => ["dataset", "stream", "restrictedView", "direct"].includes(ds.type));
|
|
1304
1318
|
switch (baseDatasource?.type) {
|
|
1305
1319
|
case "stream":
|
|
1306
1320
|
const window = baseDatasource.retentionPeriod;
|
|
@@ -1339,6 +1353,15 @@ function convertDatasourceDefinition(objectType, properties) {
|
|
|
1339
1353
|
propertyMapping: buildPropertyMapping(properties)
|
|
1340
1354
|
}
|
|
1341
1355
|
};
|
|
1356
|
+
case "direct":
|
|
1357
|
+
return {
|
|
1358
|
+
type: "direct",
|
|
1359
|
+
direct: {
|
|
1360
|
+
directSourceRid: objectType.apiName,
|
|
1361
|
+
propertyMapping: buildPropertyMapping(properties),
|
|
1362
|
+
propertySecurityGroups: convertPropertySecurityGroups(baseDatasource, properties, objectType.primaryKeyPropertyApiName)
|
|
1363
|
+
}
|
|
1364
|
+
};
|
|
1342
1365
|
case "dataset":
|
|
1343
1366
|
default:
|
|
1344
1367
|
if (objectType.properties?.some((prop) => typeof prop.type === "object" && prop.type.type === "marking") || baseDatasource?.objectSecurityPolicy || baseDatasource?.propertySecurityGroups) {
|
|
@@ -2039,7 +2062,7 @@ function generateInterfaceSnippet(interfaceType, packageName) {
|
|
|
2039
2062
|
"interfaceApiName": interfaceType.apiName,
|
|
2040
2063
|
"packageName": packageName,
|
|
2041
2064
|
"objectOrInterfaceApiName": interfaceType.apiName,
|
|
2042
|
-
"propertyNames":
|
|
2065
|
+
"propertyNames": Object.keys(interfaceType.propertiesV3),
|
|
2043
2066
|
"interfaceName": interfaceType.displayMetadata.displayName
|
|
2044
2067
|
};
|
|
2045
2068
|
return getSnippets(interfaceSnippets, interfaceContext);
|
|
@@ -2599,7 +2622,7 @@ function addNamespaceIfNone(apiName) {
|
|
|
2599
2622
|
var apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
|
|
2600
2623
|
var uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
2601
2624
|
async function main(args = process.argv) {
|
|
2602
|
-
const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.16.0-beta.
|
|
2625
|
+
const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.16.0-beta.5").wrap(Math.min(150, yargs__default.default().terminalWidth())).strict().help().options({
|
|
2603
2626
|
input: {
|
|
2604
2627
|
alias: "i",
|
|
2605
2628
|
describe: "Input file",
|
|
@@ -2721,7 +2744,8 @@ var CREATE_OR_MODIFY_OBJECT_PARAMETER = "objectToCreateOrModifyParameter";
|
|
|
2721
2744
|
var DELETE_OBJECT_PARAMETER = "objectToDeleteParameter";
|
|
2722
2745
|
var CREATE_INTERFACE_OBJECT_PARAMETER = "objectTypeParameter";
|
|
2723
2746
|
var MODIFY_INTERFACE_OBJECT_PARAMETER = "interfaceObjectToModifyParameter";
|
|
2724
|
-
function defineAction(
|
|
2747
|
+
function defineAction(actionDefInput) {
|
|
2748
|
+
const actionDef = cloneDefinition(actionDefInput);
|
|
2725
2749
|
const apiName = namespace + actionDef.apiName;
|
|
2726
2750
|
const parameterIds = (actionDef.parameters ?? []).map((p) => p.id);
|
|
2727
2751
|
if (ontologyDefinition[OntologyEntityTypeEnum.ACTION_TYPE][apiName] !== void 0) {
|
|
@@ -3451,7 +3475,8 @@ function convertMappingValue(value) {
|
|
|
3451
3475
|
}
|
|
3452
3476
|
|
|
3453
3477
|
// src/api/defineCreateInterfaceObjectAction.ts
|
|
3454
|
-
function defineCreateInterfaceObjectAction(
|
|
3478
|
+
function defineCreateInterfaceObjectAction(defInput) {
|
|
3479
|
+
const def = cloneDefinition(defInput);
|
|
3455
3480
|
const allProperties = getFlattenedInterfaceProperties(def.interfaceType);
|
|
3456
3481
|
validateActionParameters(def, Object.keys(allProperties), def.interfaceType.apiName);
|
|
3457
3482
|
const actionInterfaceProperties = Object.entries(allProperties).filter(([apiName, type]) => isPropertyParameter(def, apiName, getInterfacePropertyTypeType(type)));
|
|
@@ -3541,7 +3566,8 @@ function defineCreateInterfaceObjectAction(def) {
|
|
|
3541
3566
|
}
|
|
3542
3567
|
|
|
3543
3568
|
// src/api/defineCreateObjectAction.ts
|
|
3544
|
-
function defineCreateObjectAction(
|
|
3569
|
+
function defineCreateObjectAction(defInput) {
|
|
3570
|
+
const def = cloneDefinition(defInput);
|
|
3545
3571
|
validateActionParameters(def, Object.keys(def.objectType.properties ?? {}), def.objectType.apiName);
|
|
3546
3572
|
const propertiesWithDerivedDatasources = (def.objectType.datasources ?? []).filter((ds) => ds.type === "derived").flatMap((ds) => Object.keys(ds.propertyMapping));
|
|
3547
3573
|
const propertyParameters = Object.keys(def.objectType.properties ?? {}).filter((id) => isPropertyParameter(def, id, def.objectType.properties?.[id].type) && !isStruct(def.objectType.properties?.[id].type) && !propertiesWithDerivedDatasources.includes(id));
|
|
@@ -3606,7 +3632,8 @@ function defineCreateObjectAction(def) {
|
|
|
3606
3632
|
}
|
|
3607
3633
|
|
|
3608
3634
|
// src/api/defineCreateOrModifyObjectAction.ts
|
|
3609
|
-
function defineCreateOrModifyObjectAction(
|
|
3635
|
+
function defineCreateOrModifyObjectAction(defInput) {
|
|
3636
|
+
const def = cloneDefinition(defInput);
|
|
3610
3637
|
validateActionParameters(def, Object.keys(def.objectType.properties ?? {}), def.objectType.apiName);
|
|
3611
3638
|
const propertiesWithDerivedDatasources = (def.objectType.datasources ?? []).filter((ds) => ds.type === "derived").flatMap((ds) => Object.keys(ds.propertyMapping));
|
|
3612
3639
|
const propertyParameters = Object.keys(def.objectType.properties ?? {}).filter((id) => !Object.keys(def.nonParameterMappings ?? {}).includes(id) && !def.excludedProperties?.includes(id) && !isStruct(def.objectType.properties?.[id].type) && id !== def.objectType.primaryKeyPropertyApiName && !propertiesWithDerivedDatasources.includes(id));
|
|
@@ -3686,7 +3713,8 @@ function defineCreateOrModifyObjectAction(def) {
|
|
|
3686
3713
|
}
|
|
3687
3714
|
|
|
3688
3715
|
// src/api/defineDeleteInterfaceObjectAction.ts
|
|
3689
|
-
function defineDeleteInterfaceObjectAction(
|
|
3716
|
+
function defineDeleteInterfaceObjectAction(defInput) {
|
|
3717
|
+
const def = cloneDefinition(defInput);
|
|
3690
3718
|
return defineAction({
|
|
3691
3719
|
apiName: def.apiName ?? `delete-interface-object-${kebab(def.interfaceType.apiName.split(".").pop() ?? def.interfaceType.apiName)}`,
|
|
3692
3720
|
displayName: def.displayName ?? `Delete ${def.interfaceType.displayMetadata.displayName}`,
|
|
@@ -3726,7 +3754,8 @@ function defineDeleteInterfaceObjectAction(def) {
|
|
|
3726
3754
|
}
|
|
3727
3755
|
|
|
3728
3756
|
// src/api/defineDeleteObjectAction.ts
|
|
3729
|
-
function defineDeleteObjectAction(
|
|
3757
|
+
function defineDeleteObjectAction(defInput) {
|
|
3758
|
+
const def = cloneDefinition(defInput);
|
|
3730
3759
|
return defineAction({
|
|
3731
3760
|
apiName: def.apiName ?? `delete-object-${kebab(def.objectType.apiName.split(".").pop() ?? def.objectType.apiName)}`,
|
|
3732
3761
|
displayName: def.displayName ?? `Delete ${def.objectType.displayName}`,
|
|
@@ -3791,7 +3820,8 @@ function combineApiNamespaceIfMissing(namespace2, apiName) {
|
|
|
3791
3820
|
}
|
|
3792
3821
|
|
|
3793
3822
|
// src/api/defineInterface.ts
|
|
3794
|
-
function defineInterface(
|
|
3823
|
+
function defineInterface(interfaceDefInput) {
|
|
3824
|
+
const interfaceDef = cloneDefinition(interfaceDefInput);
|
|
3795
3825
|
const apiName = namespace + interfaceDef.apiName;
|
|
3796
3826
|
!(ontologyDefinition[OntologyEntityTypeEnum.INTERFACE_TYPE][apiName] === void 0) ? process.env.NODE_ENV !== "production" ? invariant9__default.default(false, `Interface ${apiName} already exists`) : invariant9__default.default(false) : void 0;
|
|
3797
3827
|
const spts = Object.fromEntries(Object.entries(interfaceDef.properties ?? {}).filter(([_name, prop]) => {
|
|
@@ -3860,7 +3890,9 @@ function verifyBasePropertyDefinition(namespace2, apiName, type) {
|
|
|
3860
3890
|
})}`) : invariant9__default.default(false) : void 0;
|
|
3861
3891
|
return type;
|
|
3862
3892
|
}
|
|
3863
|
-
function defineInterfaceLinkConstraint(
|
|
3893
|
+
function defineInterfaceLinkConstraint(linkDefInput) {
|
|
3894
|
+
const linkDef = cloneDefinition(linkDefInput);
|
|
3895
|
+
!(importedTypes[OntologyEntityTypeEnum.INTERFACE_TYPE][linkDef.from.apiName] == null) ? process.env.NODE_ENV !== "production" ? invariant9__default.default(false, `Cannot define a link constraint from imported interface ${linkDef.from.apiName}. The "from" side must be a locally defined interface.`) : invariant9__default.default(false) : void 0;
|
|
3864
3896
|
const fromLinkMeta = getLinkMeta(linkDef);
|
|
3865
3897
|
!(linkDef.from.links.find((a) => a.metadata.apiName === fromLinkMeta.apiName) == null) ? process.env.NODE_ENV !== "production" ? invariant9__default.default(false, `Link with apiName ${fromLinkMeta.apiName} already exists on ${linkDef.apiName}`) : invariant9__default.default(false) : void 0;
|
|
3866
3898
|
linkDef.from.links.push({
|
|
@@ -3892,7 +3924,8 @@ function getLinkMeta(meta) {
|
|
|
3892
3924
|
}
|
|
3893
3925
|
|
|
3894
3926
|
// src/api/defineLink.ts
|
|
3895
|
-
function defineLink(
|
|
3927
|
+
function defineLink(linkDefinitionInput) {
|
|
3928
|
+
const linkDefinition = cloneDefinition(linkDefinitionInput);
|
|
3896
3929
|
let fullLinkDefinition;
|
|
3897
3930
|
if ("one" in linkDefinition) {
|
|
3898
3931
|
fullLinkDefinition = {
|
|
@@ -3954,7 +3987,8 @@ function convertLinkTypeMetadata(metadata) {
|
|
|
3954
3987
|
}
|
|
3955
3988
|
|
|
3956
3989
|
// src/api/defineModifyInterfaceObjectAction.ts
|
|
3957
|
-
function defineModifyInterfaceObjectAction(
|
|
3990
|
+
function defineModifyInterfaceObjectAction(defInput) {
|
|
3991
|
+
const def = cloneDefinition(defInput);
|
|
3958
3992
|
const allProperties = getFlattenedInterfaceProperties(def.interfaceType);
|
|
3959
3993
|
validateActionParameters(def, Object.keys(allProperties), def.interfaceType.apiName);
|
|
3960
3994
|
const actionInterfaceProperties = Object.entries(allProperties).filter(([apiName, type]) => {
|
|
@@ -4046,7 +4080,8 @@ function defineModifyInterfaceObjectAction(def) {
|
|
|
4046
4080
|
}
|
|
4047
4081
|
|
|
4048
4082
|
// src/api/defineModifyObjectAction.ts
|
|
4049
|
-
function defineModifyObjectAction(
|
|
4083
|
+
function defineModifyObjectAction(defInput) {
|
|
4084
|
+
const def = cloneDefinition(defInput);
|
|
4050
4085
|
validateActionParameters(def, Object.keys(def.objectType.properties ?? {}), def.objectType.apiName);
|
|
4051
4086
|
const propertyParameters = Object.keys(def.objectType.properties ?? {}).filter((id) => isPropertyParameter(def, id, def.objectType.properties?.[id].type) && id !== def.objectType.primaryKeyPropertyApiName);
|
|
4052
4087
|
const parameterNames = new Set(propertyParameters);
|
|
@@ -4123,7 +4158,8 @@ function defineModifyObjectAction(def) {
|
|
|
4123
4158
|
}
|
|
4124
4159
|
});
|
|
4125
4160
|
}
|
|
4126
|
-
function defineSharedPropertyType(
|
|
4161
|
+
function defineSharedPropertyType(sptDefInput) {
|
|
4162
|
+
const sptDef = cloneDefinition(sptDefInput);
|
|
4127
4163
|
const apiName = namespace + sptDef.apiName;
|
|
4128
4164
|
!(ontologyDefinition[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE][apiName] === void 0) ? process.env.NODE_ENV !== "production" ? invariant9__default.default(false, `Shared property type ${apiName} already exists`) : invariant9__default.default(false) : void 0;
|
|
4129
4165
|
!(!shouldNotHaveRenderHints(sptDef.type) || !hasRenderHints(sptDef.typeClasses)) ? process.env.NODE_ENV !== "production" ? invariant9__default.default(false, `Shared property type ${apiName} of type '${getPropertyTypeName(sptDef.type)}' should not have render hints`) : invariant9__default.default(false) : void 0;
|
|
@@ -4182,7 +4218,8 @@ function convertValueTypeTypeToBaseType(valueType) {
|
|
|
4182
4218
|
throw new Error("Invalid ValueTypeType");
|
|
4183
4219
|
}
|
|
4184
4220
|
}
|
|
4185
|
-
function defineValueType(
|
|
4221
|
+
function defineValueType(valueTypeDefInput) {
|
|
4222
|
+
const valueTypeDef = cloneDefinition(valueTypeDefInput);
|
|
4186
4223
|
const {
|
|
4187
4224
|
apiName: inputApiName,
|
|
4188
4225
|
displayName,
|