@osdk/maker 0.14.0-beta.6 → 0.14.0-beta.7
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 +11 -0
- package/README.md +86 -22
- package/build/browser/api/defineCreateObjectAction.js +3 -1
- package/build/browser/api/defineCreateObjectAction.js.map +1 -1
- package/build/browser/api/defineCreateOrModifyObjectAction.js +2 -1
- package/build/browser/api/defineCreateOrModifyObjectAction.js.map +1 -1
- package/build/browser/api/defineDeleteInterfaceObjectAction.js +53 -0
- package/build/browser/api/defineDeleteInterfaceObjectAction.js.map +1 -0
- package/build/browser/api/defineLink.js +5 -13
- package/build/browser/api/defineLink.js.map +1 -1
- package/build/browser/api/defineObject.js +94 -3
- package/build/browser/api/defineObject.js.map +1 -1
- package/build/browser/api/links/LinkType.js.map +1 -1
- package/build/browser/api/object/ObjectType.js.map +1 -1
- package/build/browser/api/object/ObjectTypeDatasourceDefinition.js.map +1 -1
- package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -1
- package/build/browser/api/test/actions.test.js +788 -2
- package/build/browser/api/test/actions.test.js.map +1 -1
- package/build/browser/api/test/objects.test.js +1109 -12
- package/build/browser/api/test/objects.test.js.map +1 -1
- package/build/browser/cli/main.js +1 -1
- package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js +3 -2
- package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertLink.js +109 -24
- package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertObject.js +81 -4
- package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -1
- package/build/browser/index.js +1 -0
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +442 -194
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +139 -99
- package/build/esm/api/defineCreateObjectAction.js +3 -1
- package/build/esm/api/defineCreateObjectAction.js.map +1 -1
- package/build/esm/api/defineCreateOrModifyObjectAction.js +2 -1
- package/build/esm/api/defineCreateOrModifyObjectAction.js.map +1 -1
- package/build/esm/api/defineDeleteInterfaceObjectAction.js +53 -0
- package/build/esm/api/defineDeleteInterfaceObjectAction.js.map +1 -0
- package/build/esm/api/defineLink.js +5 -13
- package/build/esm/api/defineLink.js.map +1 -1
- package/build/esm/api/defineObject.js +94 -3
- package/build/esm/api/defineObject.js.map +1 -1
- package/build/esm/api/links/LinkType.js.map +1 -1
- package/build/esm/api/object/ObjectType.js.map +1 -1
- package/build/esm/api/object/ObjectTypeDatasourceDefinition.js.map +1 -1
- package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -1
- package/build/esm/api/test/actions.test.js +788 -2
- package/build/esm/api/test/actions.test.js.map +1 -1
- package/build/esm/api/test/objects.test.js +1109 -12
- package/build/esm/api/test/objects.test.js.map +1 -1
- package/build/esm/cli/main.js +1 -1
- package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js +3 -2
- package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertLink.js +109 -24
- package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertObject.js +81 -4
- package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/types/api/defineCreateObjectAction.d.ts.map +1 -1
- package/build/types/api/defineDeleteInterfaceObjectAction.d.ts +3 -0
- package/build/types/api/defineDeleteInterfaceObjectAction.d.ts.map +1 -0
- package/build/types/api/defineLink.d.ts.map +1 -1
- package/build/types/api/defineObject.d.ts.map +1 -1
- package/build/types/api/links/LinkType.d.ts +7 -7
- package/build/types/api/object/ObjectType.d.ts +1 -1
- package/build/types/api/object/ObjectType.d.ts.map +1 -1
- package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts +41 -1
- package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts.map +1 -1
- package/build/types/api/object/ObjectTypeDefinition.d.ts +1 -1
- package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertLink.d.ts +6 -0
- package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/package.json +3 -3
package/build/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/conversion/toMarketplace/convertActionParameters.ts","../../src/api/common/OntologyEntityTypeEnum.ts","../../src/api/interface/getFlattenedInterfaceProperties.ts","../../src/api/properties/PropertyTypeType.ts","../../src/api/defineObject.ts","../../src/conversion/toMarketplace/convertActionSections.ts","../../src/conversion/toMarketplace/convertConditionDefinition.ts","../../src/conversion/toMarketplace/convertActionParameterConditionalOverride.ts","../../src/conversion/toMarketplace/convertActionVisibility.ts","../../src/conversion/toMarketplace/convertSectionConditionalOverride.ts","../../src/conversion/toMarketplace/convertActionValidation.ts","../../src/conversion/toMarketplace/convertNullabilityToDataConstraint.ts","../../src/conversion/toConjure/distributeTypeHelper.ts","../../src/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.ts","../../src/conversion/toMarketplace/convertSpt.ts","../../src/conversion/toMarketplace/convertInterface.ts","../../src/conversion/toMarketplace/convertCardinality.ts","../../src/conversion/toMarketplace/convertLink.ts","../../src/conversion/toMarketplace/convertDatasourceDefinition.ts","../../src/api/propertyConversionUtils.ts","../../src/conversion/toMarketplace/convertValueType.ts","../../src/conversion/toMarketplace/convertDataConstraintToDataConstraints.ts","../../src/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.ts","../../src/conversion/toMarketplace/convertValueTypeDataConstraints.ts","../../src/conversion/toMarketplace/convertObjectPropertyType.ts","../../src/conversion/toMarketplace/convertObject.ts","../../src/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.ts","../../src/conversion/toMarketplace/convertValueTypesToIr.ts","../../src/conversion/toMarketplace/convertOntologyToValueTypeIr.ts","../../src/conversion/toMarketplace/convertOntologyDefinition.ts","../../src/conversion/toMarketplace/getFormContentOrdering.ts","../../src/api/defineOntology.ts","../../src/cli/main.ts","../../src/api/addDependency.ts","../../src/api/action/ActionParameterType.ts","../../src/api/defineAction.ts","../../src/conversion/toMarketplace/convertMappingValue.ts","../../src/api/defineCreateInterfaceObjectAction.ts","../../src/api/defineCreateObjectAction.ts","../../src/api/defineCreateOrModifyObjectAction.ts","../../src/api/defineDeleteObjectAction.ts","../../src/api/defineSpt.ts","../../src/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.ts","../../src/api/namespace/combineApiNamespaceIfMissing.ts","../../src/api/defineInterface.ts","../../src/api/defineInterfaceLinkConstraint.ts","../../src/api/defineLink.ts","../../src/api/defineModifyInterfaceObjectAction.ts","../../src/api/defineModifyObjectAction.ts","../../src/api/defineValueType.ts","../../src/api/importOntologyEntity.ts","../../src/api/importSharedPropertyType.ts","../../src/api/wrapWithProxy.ts"],"names":["OntologyEntityTypeEnum","invariant","apiName","path","fs","yargs","hideBin","path2","consola","fs2","path3","fs3","randomUUID","namespace"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,SAAS,wBAAwB,MAAQ,EAAA;AAC9C,EAAO,OAAA,MAAA,CAAO,WAAa,CAAA,CAAA,MAAA,CAAO,UAAc,IAAA,IAAI,GAAI,CAAA,CAAA,CAAA,KAAK,CAAC,CAAA,CAAE,EAAI,EAAA;AAAA,IAClE,IAAI,CAAE,CAAA,EAAA;AAAA,IACN,IAAM,EAAA,OAAO,CAAE,CAAA,IAAA,KAAS,QAAW,GAAA;AAAA,MACjC,MAAM,CAAE,CAAA,IAAA;AAAA,MACR,CAAC,CAAA,CAAE,IAAI,GAAG;AAAC,QACT,CAAE,CAAA,IAAA;AAAA,IACN,eAAiB,EAAA;A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,MAAA;AAAA;AAEvK,EAAA,MAAM,GAAM,GAAA;AAAA,IACV,OAAS,EAAA,WAAA;AAAA,IACT,IAAM,EAAA,QAAA;AAAA,IACN,oBAAsB,EAAA,OAAA;AAAA,IACtB,OAAO,KAAS,IAAA,KAAA;AAAA,IAChB,QAAQ,sBAAuB,CAAA;AAAA,GACjC;AACA,EAAA,oBAAA,CAAqB,GAAG,CAAA;AACxB,EAAO,OAAA,GAAA;AACT;;;ACnBO,SAAS,cAAc,MAAQ,EAAA;AACpC,EAAO,OAAA,IAAI,MAAM,MAAQ,EAAA;AAAA,IACvB,GAAA,CAAI,MAAQ,EAAA,IAAA,EAAM,QAAU,EAAA;AAC1B,MAAA,oBAAA,CAAqB,MAAM,CAAA;AAC3B,MAAA,OAAO,OAAQ,CAAA,GAAA,CAAI,MAAQ,EAAA,IAAA,EAAM,QAAQ,CAAA;AAAA;AAC3C,GACD,CAAA;AACH","file":"index.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertActionParameters(action) {\n return Object.fromEntries((action.parameters ?? []).map(p => [p.id, {\n id: p.id,\n type: typeof p.type === \"string\" ? {\n type: p.type,\n [p.type]: {}\n } : p.type,\n displayMetadata: {\n displayName: p.displayName,\n description: p.description ?? \"\",\n typeClasses: []\n }\n }]));\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport let OntologyEntityTypeEnum = /*#__PURE__*/function (OntologyEntityTypeEnum) {\n OntologyEntityTypeEnum[\"OBJECT_TYPE\"] = \"OBJECT_TYPE\";\n OntologyEntityTypeEnum[\"LINK_TYPE\"] = \"LINK_TYPE\";\n OntologyEntityTypeEnum[\"INTERFACE_TYPE\"] = \"INTERFACE_TYPE\";\n OntologyEntityTypeEnum[\"SHARED_PROPERTY_TYPE\"] = \"SHARED_PROPERTY_TYPE\";\n OntologyEntityTypeEnum[\"ACTION_TYPE\"] = \"ACTION_TYPE\";\n OntologyEntityTypeEnum[\"VALUE_TYPE\"] = \"VALUE_TYPE\";\n return OntologyEntityTypeEnum;\n}({});","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getFlattenedInterfaceProperties(interfaceType) {\n let properties = interfaceType.propertiesV2;\n interfaceType.extendsInterfaces.forEach(ext => {\n properties = {\n ...properties,\n ...getFlattenedInterfaceProperties(ext)\n };\n });\n return properties;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isPropertyTypeType(v) {\n return v === \"boolean\" || v === \"byte\" || v === \"date\" || v === \"decimal\" || v === \"double\" || v === \"float\" || v === \"geopoint\" || v === \"geoshape\" || v === \"integer\" || v === \"long\" || typeof v === \"object\" && v.type === \"marking\" || v === \"short\" || v === \"string\" || v === \"timestamp\";\n}\nexport function isExotic(type) {\n if (type === undefined) {\n return false;\n }\n if (typeof type === \"string\") {\n return [\"geopoint\", \"geoshape\", \"mediaReference\", \"geotimeSeries\"].includes(type);\n } else if (typeof type === \"object\" && type != null) {\n return type.type === \"marking\" || type.type === \"struct\";\n }\n return false;\n}\nexport function isStruct(type) {\n return typeof type === \"object\" && type.type === \"struct\";\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { addNamespaceIfNone, namespace, ontologyDefinition, updateOntology } from \"./defineOntology.js\";\nimport { getFlattenedInterfaceProperties } from \"./interface/getFlattenedInterfaceProperties.js\";\nimport { isExotic } from \"./properties/PropertyTypeType.js\";\n// From https://stackoverflow.com/a/79288714\nconst 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))$/;\n\n// ISO 8601 date and time format (YYYY-MM-DDThh:mm:ss.sssZ)\nconst ISO_8601_DATETIME = /^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})?)?$/;\nconst API_NAME_PATTERN = /^([a-zA-Z][a-zA-Z0-9\\\\-]*)$/;\nexport function defineObject(objectDef) {\n const apiName = namespace + objectDef.apiName;\n const propertyApiNames = objectDef.properties ? Object.keys(objectDef.properties) : [];\n if (ontologyDefinition[OntologyEntityTypeEnum.OBJECT_TYPE][apiName] !== undefined) {\n throw new Error(`Object type with apiName ${objectDef.apiName} is already defined`);\n }\n !API_NAME_PATTERN.test(objectDef.apiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Invalid API name ${objectDef.apiName}. API names must match the regex ${API_NAME_PATTERN}.`) : invariant(false) : void 0;\n !propertyApiNames.includes(objectDef.titlePropertyApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Title property ${objectDef.titlePropertyApiName} is not defined on object ${objectDef.apiName}`) : invariant(false) : void 0;\n !propertyApiNames.includes(objectDef.primaryKeyPropertyApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Primary key property ${objectDef.primaryKeyPropertyApiName} does not exist on object ${objectDef.apiName}`) : invariant(false) : void 0;\n !!objectDef.properties?.[objectDef.primaryKeyPropertyApiName]?.editOnly ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Primary key property ${objectDef.primaryKeyPropertyApiName} on object ${objectDef.apiName} cannot be edit-only`) : invariant(false) : void 0;\n const retentionPeriod = objectDef.datasource?.retentionPeriod;\n !(retentionPeriod === undefined || ISO_8601_DURATION.test(retentionPeriod)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Retention period \"${retentionPeriod}\" on object \"${objectDef.apiName}\" is not a valid ISO 8601 duration string`) : invariant(false) : void 0;\n\n // Validate that if object status is experimental, no property can have a status of active\n if (objectDef.status === \"experimental\") {\n const activeProperties = [];\n Object.entries(objectDef.properties ?? {}).forEach(([apiName, property]) => {\n if (property.status === \"active\") {\n activeProperties.push(apiName);\n }\n });\n !(activeProperties.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `When object \"${objectDef.apiName}\" has experimental status, no properties can have \"active\" status, but found active properties: ${activeProperties.join(\", \")}`) : invariant(false) : void 0;\n }\n\n // Validate deprecated status deadline is in ISO 8601 format\n if (objectDef.status && typeof objectDef.status === \"object\" && objectDef.status.type === \"deprecated\") {\n const deadline = objectDef.status.deadline;\n !(deadline !== undefined && ISO_8601_DATETIME.test(deadline)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Deprecated status deadline \"${deadline}\" on object \"${objectDef.apiName}\" is not a valid ISO 8601 datetime string`) : invariant(false) : void 0;\n }\n !!isExotic(objectDef.properties?.[objectDef.titlePropertyApiName]?.type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Title property ${objectDef.titlePropertyApiName} must be a primitive type`) : invariant(false) : void 0;\n !!isExotic(objectDef.properties?.[objectDef.primaryKeyPropertyApiName]?.type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Primary key property ${objectDef.primaryKeyPropertyApiName} can only be primitive types`) : invariant(false) : void 0;\n objectDef.implementsInterfaces?.forEach(interfaceImpl => {\n const allInterfaceProperties = getFlattenedInterfaceProperties(interfaceImpl.implements);\n const nonExistentInterfaceProperties = interfaceImpl.propertyMapping.map(val => val.interfaceProperty).filter(interfaceProperty => allInterfaceProperties[addNamespaceIfNone(interfaceProperty)] === undefined).map(interfaceProp => ({\n type: \"invalid\",\n reason: `Interface property ${interfaceProp} referenced in ${objectDef.apiName} object does not exist`\n }));\n const interfaceToObjectProperties = Object.fromEntries(interfaceImpl.propertyMapping.map(mapping => [addNamespaceIfNone(mapping.interfaceProperty), mapping.mapsTo]));\n const validateProperty = interfaceProp => {\n if (interfaceProp[1].sharedPropertyType.apiName in interfaceToObjectProperties) {\n return validateInterfaceImplProperty(interfaceProp[1].sharedPropertyType, interfaceToObjectProperties[interfaceProp[0]], objectDef);\n }\n return {\n type: \"invalid\",\n reason: `Interface property ${interfaceProp[1].sharedPropertyType.apiName} not implemented by ${objectDef.apiName} object definition`\n };\n };\n const validations = Object.entries(getFlattenedInterfaceProperties(interfaceImpl.implements)).map(validateProperty);\n const allFailedValidations = validations.concat(nonExistentInterfaceProperties).filter(val => val.type === \"invalid\");\n !(allFailedValidations.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"\\n\" + allFailedValidations.map(formatValidationErrors).join(\"\\n\")) : invariant(false) : void 0;\n });\n const flattenedProperties = Object.entries(objectDef.properties ?? {}).map(([apiName, property]) => convertUserObjectPropertyType(property.apiName ?? apiName, property));\n const finalObject = {\n ...objectDef,\n apiName: apiName,\n __type: OntologyEntityTypeEnum.OBJECT_TYPE,\n properties: flattenedProperties\n };\n updateOntology(finalObject);\n objectDef.apiName = apiName;\n return objectDef;\n}\nfunction formatValidationErrors(error) {\n return `Ontology Definition Error: ${error.reason}\\n`;\n}\n\n// Validate that the object and the interface property match up\nfunction validateInterfaceImplProperty(spt, mappedObjectProp, object) {\n const objProp = object.properties?.[mappedObjectProp];\n if (objProp === undefined) {\n return {\n type: \"invalid\",\n reason: `Object property mapped to interface does not exist. Object Property Mapped: ${mappedObjectProp}`\n };\n }\n if (JSON.stringify(spt.type) !== JSON.stringify(objProp?.type)) {\n return {\n type: \"invalid\",\n reason: `Object property type does not match the interface property it is mapped to. Interface Property: ${spt.apiName}, objectProperty: ${mappedObjectProp}`\n };\n }\n return {\n type: \"valid\"\n };\n}\nexport function uppercaseFirstLetter(s) {\n return s === undefined || s == null ? \"\" : s.charAt(0).toUpperCase() + s.slice(1);\n}\n\n// TODO: edge cases\nexport function convertToPluralDisplayName(s) {\n return s === undefined || s == null ? \"\" : s.endsWith(\"s\") ? uppercaseFirstLetter(s) : uppercaseFirstLetter(s) + \"s\";\n}\nfunction convertUserObjectPropertyType(apiName, property) {\n // fill in missing fields to be used by actions\n property.apiName = apiName;\n property.displayName = property.displayName ?? uppercaseFirstLetter(apiName);\n return {\n ...property,\n apiName: apiName,\n displayName: property.displayName ?? uppercaseFirstLetter(apiName),\n type: property.type\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { uppercaseFirstLetter } from \"../../api/defineObject.js\";\nexport function convertActionSections(action) {\n return Object.fromEntries(Object.entries(action.sections ?? {}).map(([sectionId, section]) => [sectionId, {\n id: sectionId,\n content: section.parameters.map(p => ({\n type: \"parameterId\",\n parameterId: p\n })),\n displayMetadata: {\n collapsedByDefault: section.collapsedByDefault ?? false,\n columnCount: section.columnCount ?? 1,\n description: section.description ?? \"\",\n displayName: section.displayName ?? uppercaseFirstLetter(sectionId),\n showTitleBar: section.showTitleBar ?? true,\n ...(section.style && {\n style: section.style === \"box\" ? {\n type: \"box\",\n box: {}\n } : {\n type: \"minimal\",\n minimal: {}\n }\n })\n }\n }]));\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nexport function convertConditionDefinition(condition, actionParameters) {\n switch (condition.type) {\n case \"and\":\n if (\"conditions\" in condition) {\n return {\n type: \"and\",\n and: {\n conditions: condition.conditions.map(c => convertConditionDefinition(c, actionParameters))\n }\n };\n } else {\n return condition;\n }\n case \"or\":\n if (\"conditions\" in condition) {\n return {\n type: \"or\",\n or: {\n conditions: condition.conditions.map(c => convertConditionDefinition(c, actionParameters))\n }\n };\n } else {\n return condition;\n }\n case \"group\":\n return {\n type: \"comparison\",\n comparison: {\n operator: \"INTERSECTS\",\n left: {\n type: \"userProperty\",\n userProperty: {\n userId: {\n type: \"currentUser\",\n currentUser: {}\n },\n propertyValue: {\n type: \"groupIds\",\n groupIds: {}\n }\n }\n },\n right: {\n type: \"staticValue\",\n staticValue: {\n type: \"stringList\",\n stringList: {\n strings: [condition.name]\n }\n }\n }\n }\n };\n case \"parameter\":\n !actionParameters?.some(param => param.id === condition.parameterId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Action parameter condition references unknown parameter ${condition.parameterId}`) : invariant(false) : void 0;\n return {\n type: \"comparison\",\n comparison: {\n operator: \"EQUALS\",\n left: {\n type: \"parameterId\",\n parameterId: condition.parameterId\n },\n right: condition.matches\n }\n };\n default:\n return condition;\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { extractAllowedValues } from \"../../api/defineOntology.js\";\nimport { convertConditionDefinition } from \"./convertConditionDefinition.js\";\nexport function convertActionParameterConditionalOverride(override, validation, actionParameters) {\n let parameterBlockOverride;\n switch (override.type) {\n case \"required\":\n parameterBlockOverride = {\n type: \"parameterRequired\",\n parameterRequired: {\n required: validation.required ? {\n type: \"notRequired\",\n notRequired: {}\n } : {\n type: \"required\",\n required: {}\n }\n }\n };\n break;\n case \"visibility\":\n parameterBlockOverride = {\n type: \"visibility\",\n visibility: {\n visibility: validation.defaultVisibility === \"editable\" ? {\n type: \"hidden\",\n hidden: {}\n } : {\n type: \"editable\",\n editable: {}\n }\n }\n };\n break;\n case \"disabled\":\n parameterBlockOverride = {\n type: \"visibility\",\n visibility: {\n visibility: validation.defaultVisibility === \"editable\" ? {\n type: \"disabled\",\n disabled: {}\n } : {\n type: \"editable\",\n editable: {}\n }\n }\n };\n break;\n case \"defaultValue\":\n parameterBlockOverride = {\n type: \"prefill\",\n prefill: {\n prefill: override.defaultValue\n }\n };\n break;\n case \"constraint\":\n parameterBlockOverride = {\n type: \"allowedValues\",\n allowedValues: {\n allowedValues: extractAllowedValues(override.constraint)\n }\n };\n break;\n default:\n throw new Error(`Unknown parameter override type`);\n }\n return {\n condition: convertConditionDefinition(override.condition, actionParameters),\n parameterBlockOverrides: [parameterBlockOverride]\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertActionVisibility(visibility) {\n switch (visibility) {\n case \"editable\":\n return {\n type: \"editable\",\n editable: {}\n };\n case \"disabled\":\n return {\n type: \"disabled\",\n disabled: {}\n };\n case \"hidden\":\n return {\n type: \"hidden\",\n hidden: {}\n };\n default:\n return {\n type: \"editable\",\n editable: {}\n };\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertConditionDefinition } from \"./convertConditionDefinition.js\";\nexport function convertSectionConditionalOverride(override, defaultVisibility, actionParameters) {\n return {\n condition: convertConditionDefinition(override.condition, actionParameters),\n sectionBlockOverrides: [{\n type: \"visibility\",\n visibility: {\n visibility: defaultVisibility === \"visible\" ? {\n type: \"hidden\",\n hidden: {}\n } : {\n type: \"visible\",\n visible: {}\n }\n }\n }]\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { extractAllowedValues, renderHintFromBaseType } from \"../../api/defineOntology.js\";\nimport { convertActionParameterConditionalOverride } from \"./convertActionParameterConditionalOverride.js\";\nimport { convertActionVisibility } from \"./convertActionVisibility.js\";\nimport { convertSectionConditionalOverride } from \"./convertSectionConditionalOverride.js\";\nexport function convertActionValidation(action) {\n return {\n actionTypeLevelValidation: {\n rules: Object.fromEntries((action.validation ?? [{\n condition: {\n type: \"true\",\n true: {}\n },\n displayMetadata: {\n failureMessage: \"\",\n typeClasses: []\n }\n }]).map((rule, idx) => [idx, rule]))\n },\n parameterValidations: Object.fromEntries((action.parameters ?? []).map(p => {\n return [p.id, {\n defaultValidation: {\n display: {\n renderHint: renderHintFromBaseType(p),\n visibility: convertActionVisibility(p.validation.defaultVisibility),\n ...(p.defaultValue && {\n prefill: p.defaultValue\n })\n },\n validation: {\n allowedValues: extractAllowedValues(p.validation.allowedValues),\n required: convertParameterRequirementConstraint(p.validation.required)\n }\n },\n conditionalOverrides: p.validation.conditionalOverrides?.map(override => convertActionParameterConditionalOverride(override, p.validation, action.parameters)) ?? []\n }];\n })),\n sectionValidations: {\n ...Object.fromEntries(Object.entries(action.sections ?? {}).map(([sectionId, section]) => [section.id, {\n defaultDisplayMetadata: section.defaultVisibility === \"hidden\" ? {\n visibility: {\n type: \"hidden\",\n hidden: {}\n }\n } : {\n visibility: {\n type: \"visible\",\n visible: {}\n }\n },\n conditionalOverrides: section.conditionalOverrides?.map(override => convertSectionConditionalOverride(override, section.defaultVisibility ?? \"visible\", action.parameters)) ?? []\n }]))\n }\n };\n}\nfunction convertParameterRequirementConstraint(required) {\n if (typeof required === \"boolean\") {\n return required ? {\n type: \"required\",\n required: {}\n } : {\n type: \"notRequired\",\n notRequired: {}\n };\n }\n const {\n min,\n max\n } = required.listLength;\n return {\n type: \"listLengthValidation\",\n listLengthValidation: {\n minLength: min,\n maxLength: max\n }\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nexport function convertNullabilityToDataConstraint(prop) {\n if (typeof prop.type === \"object\" && prop.type.type === \"marking\") {\n if (prop.nullability === undefined) {\n return {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: {\n noEmptyCollections: true,\n noNulls: true\n }\n };\n }\n !prop.nullability?.noNulls ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Marking property type has noNulls set to false, marking properties must not be nullable\") : invariant(false) : void 0;\n return {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: prop.nullability\n };\n }\n return prop.nullability === undefined ? undefined : {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: prop.nullability\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function distributeTypeHelper(type) {\n return {\n type,\n [type]: {}\n }; // any cast to match conditional return type\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { distributeTypeHelper } from \"../toConjure/distributeTypeHelper.js\";\nexport function propertyTypeTypeToOntologyIrType(type) {\n switch (true) {\n case typeof type === \"object\" && \"markingType\" in type:\n return {\n \"type\": \"marking\",\n marking: {\n markingType: type.markingType\n }\n };\n case typeof type === \"object\" && \"structDefinition\" in type:\n const structFields = new Array();\n for (const key in type.structDefinition) {\n const fieldTypeDefinition = type.structDefinition[key];\n let field;\n if (typeof fieldTypeDefinition === \"string\") {\n field = {\n apiName: key,\n displayMetadata: {\n displayName: key,\n description: undefined\n },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition)\n };\n } else {\n // If it is a full form type definition then process it as such\n if (\"fieldType\" in fieldTypeDefinition) {\n field = {\n ...fieldTypeDefinition,\n apiName: key,\n fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition.fieldType),\n typeClasses: fieldTypeDefinition.typeClasses ?? [],\n aliases: fieldTypeDefinition.aliases ?? []\n };\n } else {\n field = {\n apiName: key,\n displayMetadata: {\n displayName: key,\n description: undefined\n },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition)\n };\n }\n }\n structFields.push(field);\n }\n return {\n type: \"struct\",\n struct: {\n structFields\n }\n };\n case typeof type === \"object\" && \"isLongText\" in type:\n return {\n \"type\": \"string\",\n \"string\": {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: type.isLongText,\n supportsEfficientLeadingWildcard: type.supportsEfficientLeadingWildcard,\n supportsExactMatching: type.supportsExactMatching\n }\n };\n case type === \"geopoint\":\n return {\n type: \"geohash\",\n geohash: {}\n };\n case type === \"decimal\":\n return {\n type,\n [type]: {\n precision: undefined,\n scale: undefined\n }\n };\n case type === \"string\":\n return {\n type,\n [type]: {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: false,\n supportsEfficientLeadingWildcard: false,\n supportsExactMatching: true\n }\n };\n case type === \"mediaReference\":\n return {\n type: type,\n mediaReference: {}\n };\n case type === \"geotimeSeries\":\n return {\n type: \"geotimeSeriesReference\",\n geotimeSeriesReference: {}\n };\n default:\n // use helper function to distribute `type` properly\n return distributeTypeHelper(type);\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertNullabilityToDataConstraint } from \"./convertNullabilityToDataConstraint.js\";\nimport { propertyTypeTypeToOntologyIrType } from \"./propertyTypeTypeToOntologyIrType.js\";\nexport function convertSpt({\n type,\n array,\n description,\n apiName,\n displayName,\n visibility,\n gothamMapping,\n typeClasses,\n valueType,\n nullability\n}) {\n const dataConstraint = convertNullabilityToDataConstraint({\n type,\n nullability\n });\n return {\n apiName,\n displayMetadata: {\n displayName: displayName ?? apiName,\n visibility: visibility ?? \"NORMAL\",\n description\n },\n type: array ? {\n type: \"array\",\n array: {\n subtype: propertyTypeTypeToOntologyIrType(type)\n }\n } : propertyTypeTypeToOntologyIrType(type),\n aliases: [],\n baseFormatter: undefined,\n dataConstraints: dataConstraint,\n gothamMapping: gothamMapping,\n indexedForSearch: true,\n typeClasses: typeClasses ?? [],\n valueType: valueType === undefined ? undefined : {\n apiName: valueType.apiName,\n version: valueType.version,\n packageNamespace: valueType.packageNamespace,\n displayMetadata: valueType.displayMetadata\n }\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertSpt } from \"./convertSpt.js\";\nexport function convertInterface(interfaceType) {\n const {\n __type,\n ...other\n } = interfaceType;\n return {\n ...other,\n propertiesV2: Object.fromEntries(Object.values(interfaceType.propertiesV2).map(spt => [spt.sharedPropertyType.apiName, {\n required: spt.required,\n sharedPropertyType: convertSpt(spt.sharedPropertyType)\n }])),\n displayMetadata: {\n displayName: interfaceType.displayMetadata.displayName,\n description: interfaceType.displayMetadata.description,\n icon: interfaceType.displayMetadata.icon ?? {\n type: \"blueprint\",\n blueprint: {\n color: \"#4C90F0\",\n locator: \"layout-hierarchy\"\n }\n }\n },\n extendsInterfaces: interfaceType.extendsInterfaces.map(i => i.apiName),\n // these are omitted from our internal types but we need to re-add them for the final json\n properties: [],\n // TODO(mwalther): Support propertiesV3\n propertiesV3: {}\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertCardinality(cardinality) {\n if (cardinality === \"OneToMany\" || cardinality === undefined) {\n return \"ONE_TO_MANY\";\n }\n return \"ONE_TO_ONE\";\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { cleanAndValidateLinkTypeId } from \"../../api/defineOntology.js\";\nimport { convertCardinality } from \"./convertCardinality.js\";\nexport function convertLink(linkType) {\n let definition;\n let datasource = undefined;\n if (\"one\" in linkType) {\n definition = {\n type: \"oneToMany\",\n oneToMany: {\n cardinalityHint: convertCardinality(linkType.cardinality),\n manyToOneLinkMetadata: linkType.toMany.metadata,\n objectTypeRidManySide: linkType.toMany.object.apiName,\n objectTypeRidOneSide: linkType.one.object.apiName,\n oneToManyLinkMetadata: linkType.one.metadata,\n oneSidePrimaryKeyToManySidePropertyMapping: [{\n from: {\n apiName: linkType.one.object.primaryKeyPropertyApiName,\n object: linkType.one.object.apiName\n },\n to: {\n apiName: linkType.manyForeignKeyProperty,\n object: linkType.toMany.object.apiName\n }\n }]\n }\n };\n } else if (\"intermediaryObjectType\" in linkType) {\n definition = {\n type: \"intermediary\",\n intermediary: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: linkType.many.object.apiName,\n objectTypeRidB: linkType.toMany.object.apiName,\n intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,\n aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(linkType.many.linkToIntermediary.apiName),\n intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(linkType.toMany.linkToIntermediary.apiName)\n }\n };\n } else {\n definition = {\n type: \"manyToMany\",\n manyToMany: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: linkType.many.object.apiName,\n objectTypeRidB: linkType.toMany.object.apiName,\n peeringMetadata: undefined,\n objectTypeAPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName\n },\n to: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName\n }\n }],\n objectTypeBPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName\n },\n to: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName\n }\n }]\n }\n };\n datasource = {\n datasourceName: linkType.apiName,\n datasource: {\n type: \"dataset\",\n dataset: {\n datasetRid: \"link-\".concat(linkType.apiName),\n writebackDatasetRid: undefined,\n objectTypeAPrimaryKeyMapping: [{\n property: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName\n },\n column: linkType.many.object.primaryKeyPropertyApiName\n }],\n objectTypeBPrimaryKeyMapping: [{\n property: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName\n },\n column: linkType.toMany.object.primaryKeyPropertyApiName\n }]\n }\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false\n },\n redacted: linkType.redacted\n };\n }\n return {\n linkType: {\n definition: definition,\n id: cleanAndValidateLinkTypeId(linkType.apiName),\n status: linkType.status ?? {\n type: \"active\",\n active: {}\n },\n redacted: linkType.redacted ?? false\n },\n datasources: datasource !== undefined ? [datasource] : [],\n entityMetadata: {\n arePatchesEnabled: linkType.editsEnabled ?? false\n }\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertDatasourceDefinition(objectType, properties) {\n switch (objectType.datasource?.type) {\n case \"stream\":\n const window = objectType.datasource.retentionPeriod;\n const retentionPolicy = window ? {\n type: \"time\",\n time: {\n window\n }\n } : {\n type: \"none\",\n none: {}\n };\n const propertyMapping = Object.fromEntries(properties.map(prop => [prop.apiName, prop.apiName]));\n return {\n type: \"streamV2\",\n streamV2: {\n streamLocator: objectType.apiName,\n propertyMapping,\n retentionPolicy,\n propertySecurityGroups: undefined\n }\n };\n case \"restrictedView\":\n return {\n type: \"restrictedViewV2\",\n restrictedViewV2: {\n restrictedViewRid: objectType.apiName,\n propertyMapping: buildPropertyMapping(properties)\n }\n };\n case \"dataset\":\n default:\n return {\n type: \"datasetV2\",\n datasetV2: {\n datasetRid: objectType.apiName,\n propertyMapping: buildPropertyMapping(properties)\n }\n };\n }\n}\nfunction buildPropertyMapping(properties) {\n return Object.fromEntries(properties.map(prop => {\n // editOnly\n if (prop.editOnly) {\n return [prop.apiName, {\n type: \"editOnly\",\n editOnly: {}\n }];\n }\n // structs\n if (typeof prop.type === \"object\" && prop.type?.type === \"struct\") {\n const structMapping = {\n type: \"struct\",\n struct: {\n column: prop.apiName,\n mapping: Object.fromEntries(Object.keys(prop.type.structDefinition).map(fieldName => [fieldName, {\n apiName: fieldName,\n mappings: {}\n }]))\n }\n };\n return [prop.apiName, structMapping];\n }\n // default: column mapping\n return [prop.apiName, {\n type: \"column\",\n column: prop.apiName\n }];\n }));\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const defaultTypeClasses = [{\n kind: \"render_hint\",\n name: \"SELECTABLE\"\n}, {\n kind: \"render_hint\",\n name: \"SORTABLE\"\n}];\n\n// ExperimentalTimeDependentV1 and Attachment types should be included here once supported\nexport function shouldNotHaveRenderHints(type) {\n return [\"struct\", \"mediaReference\", \"geotimeSeries\"].includes(getPropertyTypeName(type));\n}\nexport function hasRenderHints(typeClasses) {\n return (typeClasses ?? []).some(tc => tc.kind.toLowerCase() === \"render_hint\");\n}\nexport function getPropertyTypeName(type) {\n return typeof type === \"object\" ? type.type : type;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertValueType(valueType) {\n return {\n apiName: valueType.apiName,\n version: valueType.version,\n packageNamespace: valueType.packageNamespace,\n displayMetadata: valueType.displayMetadata\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { dataConstraintToPropertyTypeDataConstraint } from \"./dataConstraintToPropertyTypeDataConstraint.js\";\nexport function convertDataConstraintToDataConstraints(dc) {\n return {\n propertyTypeConstraints: [{\n constraints: dataConstraintToPropertyTypeDataConstraint(dc)\n // known limitation: structs don't carry field-level data constraint failure messages\n }]\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertDataConstraintToDataConstraints } from \"./convertDataConstraintToDataConstraints.js\";\nexport function dataConstraintToPropertyTypeDataConstraint(dc) {\n switch (dc.type) {\n case \"array\":\n return {\n ...dc\n };\n case \"boolean\":\n return {\n ...dc\n };\n case \"binary\":\n throw new Error(\"Binary type constraints are not supported\");\n case \"date\":\n return {\n ...dc\n };\n case \"decimal\":\n return {\n ...dc\n };\n case \"double\":\n return {\n ...dc\n };\n case \"float\":\n return {\n ...dc\n };\n case \"integer\":\n return {\n ...dc\n };\n case \"long\":\n return {\n ...dc\n };\n case \"map\":\n throw new Error(\"Map type constraints are not supported\");\n case \"nullable\":\n throw new Error(\"Nullable constraints are not supported\");\n case \"short\":\n return {\n ...dc\n };\n case \"string\":\n return {\n ...dc\n };\n case \"struct\":\n return {\n type: \"struct\",\n struct: {\n elementConstraints: Object.fromEntries(Object.entries(dc.struct.elementConstraints).map(([field, constraint]) => [field, convertDataConstraintToDataConstraints(constraint)]))\n }\n };\n case \"structV2\":\n throw new Error(\"StructV2 constraints are not supported\");\n case \"timestamp\":\n return {\n ...dc\n };\n default:\n throw new Error(`Unknown DataConstraint type: ${dc.type}`);\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { dataConstraintToPropertyTypeDataConstraint } from \"./dataConstraintToPropertyTypeDataConstraint.js\";\nexport function convertValueTypeDataConstraints(dataConstraints) {\n if (dataConstraints.length === 0) {\n return undefined;\n }\n const propertyTypeConstraints = dataConstraints.map(constraint => ({\n constraints: dataConstraintToPropertyTypeDataConstraint(constraint.constraint.constraint),\n failureMessage: constraint.constraint.failureMessage\n }));\n return {\n propertyTypeConstraints\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { convertObjectStatus, namespace } from \"../../api/defineOntology.js\";\nimport { defaultTypeClasses, getPropertyTypeName, hasRenderHints, shouldNotHaveRenderHints } from \"../../api/propertyConversionUtils.js\";\nimport { convertNullabilityToDataConstraint } from \"./convertNullabilityToDataConstraint.js\";\nimport { convertValueType } from \"./convertValueType.js\";\nimport { convertValueTypeDataConstraints } from \"./convertValueTypeDataConstraints.js\";\nimport { propertyTypeTypeToOntologyIrType } from \"./propertyTypeTypeToOntologyIrType.js\";\nexport function convertObjectPropertyType(property) {\n const apiName = namespace + property.apiName;\n !(!shouldNotHaveRenderHints(property.type) || !hasRenderHints(property.typeClasses)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Property type ${apiName} of type '${getPropertyTypeName(property.type)}' should not have render hints`) : invariant(false) : void 0;\n const output = {\n apiName: property.apiName,\n sharedPropertyTypeApiName: property.sharedPropertyType?.apiName,\n displayMetadata: {\n displayName: property.displayName,\n description: property.description,\n visibility: property.visibility ?? \"NORMAL\"\n },\n indexedForSearch: property.indexedForSearch ?? true,\n ruleSetBinding: undefined,\n baseFormatter: property.baseFormatter,\n type: property.array ? {\n type: \"array\",\n array: {\n subtype: propertyTypeTypeToOntologyIrType(property.type)\n }\n } : propertyTypeTypeToOntologyIrType(property.type),\n typeClasses: property.typeClasses ?? (shouldNotHaveRenderHints(property.type) ? [] : defaultTypeClasses),\n status: convertObjectStatus(property.status),\n inlineAction: undefined,\n dataConstraints: property.valueType ? convertValueTypeDataConstraints(property.valueType.constraints) : convertNullabilityToDataConstraint(property),\n sharedPropertyTypeRid: property.sharedPropertyType?.apiName,\n valueType: property.valueType ? convertValueType(property.valueType) : undefined\n };\n return output;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { addNamespaceIfNone, buildDatasource, convertObjectStatus } from \"../../api/defineOntology.js\";\nimport { isExotic } from \"../../api/properties/PropertyTypeType.js\";\nimport { convertDatasourceDefinition } from \"./convertDatasourceDefinition.js\";\nimport { convertObjectPropertyType } from \"./convertObjectPropertyType.js\";\nexport function convertObject(objectType) {\n const propertyDatasources = (objectType.properties ?? []).flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));\n const classificationGroupMarkingNames = extractMarkingGroups(objectType.properties ?? [], \"CBAC\");\n const mandatoryMarkingNames = extractMarkingGroups(objectType.properties ?? [], \"MANDATORY\");\n const classificationInputGroup = classificationGroupMarkingNames.length > 0 ? classificationGroupMarkingNames.reduce((l, r) => l + \"/\" + r) : undefined;\n const mandatoryInputGroup = mandatoryMarkingNames.length > 0 ? mandatoryMarkingNames.reduce((l, r) => l + \"/\" + r) : undefined;\n const objectDatasource = buildDatasource(objectType.apiName, convertDatasourceDefinition(objectType, objectType.properties ?? []), classificationInputGroup, mandatoryInputGroup);\n const implementations = objectType.implementsInterfaces ?? [];\n return {\n objectType: {\n displayMetadata: {\n description: objectType.description,\n displayName: objectType.displayName,\n groupDisplayName: undefined,\n icon: {\n type: \"blueprint\",\n blueprint: objectType.icon ?? {\n locator: \"cube\",\n color: \"#2D72D2\"\n }\n },\n pluralDisplayName: objectType.pluralDisplayName,\n visibility: objectType.visibility ?? \"NORMAL\"\n },\n primaryKeys: [objectType.primaryKeyPropertyApiName],\n propertyTypes: Object.fromEntries(objectType.properties?.map(val => [val.apiName, convertObjectPropertyType(val)]) ?? []),\n titlePropertyTypeRid: objectType.titlePropertyApiName,\n apiName: objectType.apiName,\n status: convertObjectStatus(objectType.status),\n redacted: false,\n implementsInterfaces2: implementations.map(impl => ({\n interfaceTypeApiName: impl.implements.apiName,\n linksV2: {},\n propertiesV2: {},\n properties: Object.fromEntries(impl.propertyMapping.map(mapping => [addNamespaceIfNone(mapping.interfaceProperty), {\n propertyTypeRid: mapping.mapsTo\n }]))\n })),\n allImplementsInterfaces: {}\n },\n datasources: [...propertyDatasources, objectDatasource],\n entityMetadata: {\n arePatchesEnabled: objectType.editsEnabled ?? false\n }\n };\n}\n\n/**\n * Extracts marking group names of a specific type from object properties\n */\nexport function extractMarkingGroups(properties, markingType) {\n return properties.map(prop => {\n if (typeof prop.type === \"object\" && prop.type.type === \"marking\" && prop.type.markingType === markingType) {\n return prop.type.markingInputGroupName;\n }\n return undefined;\n }).filter(val => val !== undefined);\n}\nexport function extractPropertyDatasource(property, objectTypeApiName) {\n if (!isExotic(property.type)) {\n return [];\n }\n const identifier = objectTypeApiName + \".\" + property.apiName;\n switch (property.type) {\n case \"geotimeSeries\":\n const geotimeDefinition = {\n type: \"geotimeSeries\",\n geotimeSeries: {\n geotimeSeriesIntegrationRid: identifier,\n properties: [property.apiName]\n }\n };\n return [buildDatasource(property.apiName, geotimeDefinition)];\n case \"mediaReference\":\n const mediaSetDefinition = {\n type: \"mediaSetView\",\n mediaSetView: {\n assumedMarkings: [],\n mediaSetViewLocator: identifier,\n properties: [property.apiName]\n }\n };\n return [buildDatasource(property.apiName, mediaSetDefinition)];\n default:\n return [];\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport { cleanAndValidateLinkTypeId, convertAction } from \"../../api/defineOntology.js\";\nimport { convertInterface } from \"./convertInterface.js\";\nimport { convertLink } from \"./convertLink.js\";\nimport { convertObject } from \"./convertObject.js\";\nimport { convertSpt } from \"./convertSpt.js\";\nexport function convertOntologyDefinitionToWireBlockData(ontology) {\n return {\n objectTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.OBJECT_TYPE]).map(([apiName, objectType]) => {\n return [apiName, convertObject(objectType)];\n })),\n sharedPropertyTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]).map(([apiName, spt]) => [apiName, {\n sharedPropertyType: convertSpt(spt)\n }])),\n interfaceTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.INTERFACE_TYPE]).map(([apiName, interfaceType]) => {\n return [apiName, {\n interfaceType: convertInterface(interfaceType)\n }];\n })),\n linkTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.LINK_TYPE]).map(([id, link]) => {\n return [cleanAndValidateLinkTypeId(id), convertLink(link)];\n })),\n actionTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).map(([apiName, action]) => {\n return [apiName, convertAction(action)];\n })),\n blockPermissionInformation: {\n actionTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).filter(([apiName, action]) => action.validation).map(([apiName, action]) => {\n return [apiName, {\n restrictionStatus: {\n hasRolesApplied: true,\n ontologyPackageRid: null,\n publicProject: false\n }\n }];\n })),\n linkTypes: {},\n objectTypes: {}\n }\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertValueTypesToIr(valueTypes) {\n return Object.values(valueTypes).map(definitions => ({\n metadata: {\n apiName: definitions[0].apiName,\n packageNamespace: definitions[0].packageNamespace,\n displayMetadata: definitions[0].displayMetadata,\n status: definitions[0].status\n },\n // TODO(dpaquin): instead of deduping here, we should refactor the value type types from arrays to maps\n versions: Array.from(new Map(definitions.map(definition => [definition.version, definition])).values()).map(definition => ({\n version: definition.version,\n baseType: definition.baseType,\n constraints: definition.constraints,\n exampleValues: definition.exampleValues\n }))\n }));\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport { convertValueTypesToIr } from \"./convertValueTypesToIr.js\";\nexport function convertOntologyToValueTypeIr(ontology) {\n return {\n valueTypes: convertValueTypesToIr(ontology[OntologyEntityTypeEnum.VALUE_TYPE])\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { importedTypes } from \"../../api/defineOntology.js\";\nimport { convertOntologyDefinitionToWireBlockData } from \"./convertOntologyDefinitionToWireBlockData.js\";\nimport { convertOntologyToValueTypeIr } from \"./convertOntologyToValueTypeIr.js\";\nexport function convertOntologyDefinition(ontology, randomnessKey) {\n return {\n ontology: convertOntologyDefinitionToWireBlockData(ontology),\n importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),\n valueTypes: convertOntologyToValueTypeIr(ontology),\n importedValueTypes: convertOntologyToValueTypeIr(importedTypes),\n randomnessKey\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getFormContentOrdering(action, parameterOrdering) {\n if (!action.sections) return [];\n const parametersToSection = Object.fromEntries(Object.entries(action.sections).flatMap(([sectionId, section]) => section.parameters.map(param => [param, sectionId])));\n const seenIds = new Set();\n const formContentOrdering = [];\n parameterOrdering.forEach(param => {\n if (param in parametersToSection && !seenIds.has(parametersToSection[param])) {\n formContentOrdering.push({\n type: \"sectionId\",\n sectionId: parametersToSection[param]\n });\n seenIds.add(parametersToSection[param]);\n } else if (!(param in parametersToSection)) {\n formContentOrdering.push({\n type: \"parameterId\",\n parameterId: param\n });\n seenIds.add(param);\n }\n });\n return formContentOrdering;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport { convertActionParameters } from \"../conversion/toMarketplace/convertActionParameters.js\";\nimport { convertActionSections } from \"../conversion/toMarketplace/convertActionSections.js\";\nimport { convertActionValidation } from \"../conversion/toMarketplace/convertActionValidation.js\";\nimport { convertOntologyDefinition } from \"../conversion/toMarketplace/convertOntologyDefinition.js\";\nimport { convertOntologyToValueTypeIr } from \"../conversion/toMarketplace/convertOntologyToValueTypeIr.js\";\nimport { getFormContentOrdering } from \"../conversion/toMarketplace/getFormContentOrdering.js\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\n// type -> apiName -> entity\n/** @internal */\nexport let ontologyDefinition;\n\n// type -> apiName -> entity\n/** @internal */\nexport let importedTypes;\n\n// namespace -> version\n/** @internal */\nexport let dependencies;\n\n/** @internal */\nexport let namespace;\nexport function updateOntology(entity) {\n if (entity.__type !== OntologyEntityTypeEnum.VALUE_TYPE) {\n ontologyDefinition[entity.__type][entity.apiName] = entity;\n return;\n }\n // value types are a special case\n if (ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName] === undefined) {\n ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName] = [];\n }\n ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName].push(entity);\n}\nexport async function defineOntology(ns, body, outputDir, dependencyFile, randomnessKey) {\n namespace = ns;\n dependencies = {};\n ontologyDefinition = {\n OBJECT_TYPE: {},\n ACTION_TYPE: {},\n LINK_TYPE: {},\n INTERFACE_TYPE: {},\n SHARED_PROPERTY_TYPE: {},\n VALUE_TYPE: {}\n };\n importedTypes = {\n SHARED_PROPERTY_TYPE: {},\n OBJECT_TYPE: {},\n ACTION_TYPE: {},\n LINK_TYPE: {},\n INTERFACE_TYPE: {},\n VALUE_TYPE: {}\n };\n try {\n await body();\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Unexpected error while processing the body of the ontology\", e);\n throw e;\n }\n if (outputDir) {\n writeStaticObjects(outputDir);\n }\n if (dependencyFile) {\n writeDependencyFile(dependencyFile);\n }\n return convertOntologyDefinition(ontologyDefinition, randomnessKey);\n}\nexport function writeStaticObjects(outputDir) {\n const codegenDir = path.resolve(outputDir, \"codegen\");\n const typeDirs = {\n [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: \"shared-property-types\",\n [OntologyEntityTypeEnum.ACTION_TYPE]: \"action-types\",\n [OntologyEntityTypeEnum.OBJECT_TYPE]: \"object-types\",\n [OntologyEntityTypeEnum.LINK_TYPE]: \"link-types\",\n [OntologyEntityTypeEnum.INTERFACE_TYPE]: \"interface-types\",\n [OntologyEntityTypeEnum.VALUE_TYPE]: \"value-types\"\n };\n if (!fs.existsSync(codegenDir)) {\n fs.mkdirSync(codegenDir, {\n recursive: true\n });\n }\n Object.values(typeDirs).forEach(typeDirNameFromMap => {\n const currentTypeDirPath = path.join(codegenDir, typeDirNameFromMap);\n if (fs.existsSync(currentTypeDirPath)) {\n fs.rmSync(currentTypeDirPath, {\n recursive: true,\n force: true\n });\n }\n fs.mkdirSync(currentTypeDirPath, {\n recursive: true\n });\n });\n const topLevelExportStatements = [];\n Object.entries(ontologyDefinition).forEach(([ontologyTypeEnumKey, entities]) => {\n const typeDirName = typeDirs[ontologyTypeEnumKey];\n const typeDirPath = path.join(codegenDir, typeDirName);\n const entityModuleNames = [];\n Object.entries(entities).forEach(([apiName, entity]) => {\n const entityFileNameBase = camel(withoutNamespace(apiName)) + (ontologyTypeEnumKey === OntologyEntityTypeEnum.VALUE_TYPE ? \"ValueType\" : \"\");\n const filePath = path.join(typeDirPath, `${entityFileNameBase}.ts`);\n const entityTypeName = getEntityTypeName(ontologyTypeEnumKey);\n const entityJSON = JSON.stringify(entity, null, 2).replace(/(\"__type\"\\s*:\\s*)\"([^\"]*)\"/g, (_, prefix, value) => `${prefix}OntologyEntityTypeEnum.${value}`);\n const content = `\nimport { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';\nimport type { ${entityTypeName} } from '@osdk/maker';\n\n/** @type {import('@osdk/maker').${entityTypeName}} */\nconst ${entityFileNameBase}_base: ${entityTypeName} = ${ontologyTypeEnumKey === \"VALUE_TYPE\" ? entityJSON.slice(1, -2) : entityJSON} as unknown as ${entityTypeName};\n \nexport const ${entityFileNameBase}: ${entityTypeName} = wrapWithProxy(${entityFileNameBase}_base);\n `;\n fs.writeFileSync(filePath, content, {\n flag: \"w\"\n });\n entityModuleNames.push(entityFileNameBase);\n });\n for (const entityModuleName of entityModuleNames) {\n topLevelExportStatements.push(`export { ${entityModuleName} } from \"./codegen/${typeDirName}/${entityModuleName}.js\";`);\n }\n });\n if (topLevelExportStatements.length > 0) {\n const mainIndexContent = dependencyInjectionString() + topLevelExportStatements.join(\"\\n\") + \"\\n\";\n const mainIndexFilePath = path.join(outputDir, \"index.ts\");\n fs.writeFileSync(mainIndexFilePath, mainIndexContent, {\n flag: \"w\"\n });\n }\n}\nexport function buildDatasource(apiName, definition, classificationMarkingGroupName, mandatoryMarkingGroupName) {\n const needsSecurity = classificationMarkingGroupName !== undefined || mandatoryMarkingGroupName !== undefined;\n const securityConfig = needsSecurity ? {\n classificationConstraint: classificationMarkingGroupName ? {\n markingGroupName: classificationMarkingGroupName\n } : undefined,\n markingConstraint: mandatoryMarkingGroupName ? {\n markingGroupName: mandatoryMarkingGroupName\n } : undefined\n } : undefined;\n return {\n datasourceName: apiName,\n datasource: definition,\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false\n },\n redacted: false,\n ...(securityConfig !== undefined && {\n dataSecurity: securityConfig\n })\n };\n}\nexport function cleanAndValidateLinkTypeId(apiName) {\n // Insert a dash before any uppercase letter that follows a lowercase letter or digit\n const step1 = apiName.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\");\n // Insert a dash after a sequence of uppercase letters when followed by a lowercase letter\n // then convert the whole string to lowercase\n // e.g., apiName, APIname, and apiNAME will all be converted to api-name\n const linkTypeId = step1.replace(/([A-Z])([A-Z][a-z])/g, \"$1-$2\").toLowerCase();\n const VALIDATION_PATTERN = /^([a-z][a-z0-9\\-]*)$/;\n if (!VALIDATION_PATTERN.test(linkTypeId)) {\n throw new Error(`LinkType id '${linkTypeId}' must be lower case with dashes.`);\n }\n return linkTypeId;\n}\nexport function dumpOntologyFullMetadata() {\n return convertOntologyDefinition(ontologyDefinition);\n}\nexport function dumpValueTypeWireType() {\n return convertOntologyToValueTypeIr(ontologyDefinition);\n}\nexport function convertObjectStatus(status) {\n if (status === undefined) {\n return {\n type: \"active\",\n active: {}\n };\n }\n if (status === \"active\") {\n return {\n type: \"active\",\n active: {}\n };\n }\n if (status === \"experimental\") {\n return {\n type: \"experimental\",\n experimental: {}\n };\n }\n if (typeof status === \"object\" && status.type === \"deprecated\") {\n return {\n type: \"deprecated\",\n deprecated: {\n message: status.message,\n deadline: status.deadline,\n replacedBy: undefined\n }\n };\n }\n return status;\n}\nexport function convertAction(action) {\n const actionValidation = convertActionValidation(action);\n const actionParameters = convertActionParameters(action);\n const actionSections = convertActionSections(action);\n const parameterOrdering = action.parameterOrdering ?? (action.parameters ?? []).map(p => p.id);\n return {\n actionType: {\n actionTypeLogic: {\n logic: {\n rules: action.rules\n },\n validation: actionValidation\n },\n metadata: {\n apiName: action.apiName,\n displayMetadata: {\n configuration: {\n defaultLayout: action.defaultFormat ?? \"FORM\",\n displayAndFormat: action.displayAndFormat ?? {\n table: {\n columnWidthByParameterRid: {},\n enableFileImport: true,\n fitHorizontally: false,\n frozenColumnCount: 0,\n rowHeightInLines: 1\n }\n },\n enableLayoutUserSwitch: action.enableLayoutSwitch ?? false\n },\n description: action.description ?? \"\",\n displayName: action.displayName,\n icon: {\n type: \"blueprint\",\n blueprint: action.icon ?? {\n locator: \"edit\",\n color: \"#000000\"\n }\n },\n successMessage: action.submissionMetadata?.successMessage ? [{\n type: \"message\",\n message: action.submissionMetadata.successMessage\n }] : [],\n typeClasses: action.typeClasses ?? [],\n ...(action.submissionMetadata?.submitButtonDisplayMetadata && {\n submitButtonDisplayMetadata: action.submissionMetadata.submitButtonDisplayMetadata\n }),\n ...(action.submissionMetadata?.undoButtonConfiguration && {\n undoButtonConfiguration: action.submissionMetadata.undoButtonConfiguration\n })\n },\n parameterOrdering: parameterOrdering,\n formContentOrdering: getFormContentOrdering(action, parameterOrdering),\n parameters: actionParameters,\n sections: actionSections,\n status: typeof action.status === \"string\" ? {\n type: action.status,\n [action.status]: {}\n } : action.status,\n entities: action.entities\n }\n }\n };\n}\nexport function extractAllowedValues(allowedValues) {\n switch (allowedValues.type) {\n case \"oneOf\":\n return {\n type: \"oneOf\",\n oneOf: {\n type: \"oneOf\",\n oneOf: {\n labelledValues: allowedValues.oneOf,\n otherValueAllowed: {\n allowed: allowedValues.otherValueAllowed ?? false\n }\n }\n }\n };\n case \"range\":\n const {\n min,\n max\n } = allowedValues;\n return {\n type: \"range\",\n range: {\n type: \"range\",\n range: {\n ...(min === undefined ? {} : {\n minimum: {\n inclusive: true,\n value: min\n }\n }),\n ...(max === undefined ? {} : {\n maximum: {\n inclusive: true,\n value: max\n }\n })\n }\n }\n };\n case \"text\":\n const {\n minLength,\n maxLength,\n regex\n } = allowedValues;\n return {\n type: \"text\",\n text: {\n type: \"text\",\n text: {\n ...(minLength === undefined ? {} : {\n minLength: minLength\n }),\n ...(maxLength === undefined ? {} : {\n maxLength: maxLength\n }),\n ...(regex === undefined ? {} : {\n regex: {\n regex: regex,\n failureMessage: \"Invalid input\"\n }\n })\n }\n }\n };\n case \"datetime\":\n const {\n minimum,\n maximum\n } = allowedValues;\n return {\n type: \"datetime\",\n datetime: {\n type: \"datetime\",\n datetime: {\n minimum,\n maximum\n }\n }\n };\n case \"objectTypeReference\":\n return {\n type: \"objectTypeReference\",\n objectTypeReference: {\n type: \"objectTypeReference\",\n objectTypeReference: {\n interfaceTypeRids: allowedValues.interfaceTypes\n }\n }\n };\n case \"redacted\":\n return {\n type: \"redacted\",\n redacted: {}\n };\n case \"geotimeSeriesReference\":\n return {\n type: \"geotimeSeriesReference\",\n geotimeSeriesReference: {\n type: \"geotimeSeries\",\n geotimeSeries: {}\n }\n };\n default:\n const k = allowedValues.type;\n return {\n type: k,\n [k]: {\n type: k,\n [k]: {}\n }\n };\n // TODO(dpaquin): there's probably a TS clean way to do this\n }\n}\nexport function renderHintFromBaseType(parameter) {\n // TODO(dpaquin): these are just guesses, we should find where they're actually defined\n const type = typeof parameter.type === \"string\" ? parameter.type : parameter.type.type;\n switch (type) {\n case \"boolean\":\n case \"booleanList\":\n return {\n type: \"checkbox\",\n checkbox: {}\n };\n case \"integer\":\n case \"integerList\":\n case \"long\":\n case \"longList\":\n case \"double\":\n case \"doubleList\":\n case \"decimal\":\n case \"decimalList\":\n return {\n type: \"numericInput\",\n numericInput: {}\n };\n case \"string\":\n case \"stringList\":\n case \"geohash\":\n case \"geohashList\":\n case \"geoshape\":\n case \"geoshapeList\":\n case \"objectSetRid\":\n return {\n type: \"textInput\",\n textInput: {}\n };\n case \"timestamp\":\n case \"timestampList\":\n case \"date\":\n case \"dateList\":\n return {\n type: \"dateTimePicker\",\n dateTimePicker: {}\n };\n case \"attachment\":\n case \"attachmentList\":\n return {\n type: \"filePicker\",\n filePicker: {}\n };\n case \"marking\":\n case \"markingList\":\n if (parameter.validation.allowedValues?.type === \"mandatoryMarking\") {\n return {\n type: \"mandatoryMarkingPicker\",\n mandatoryMarkingPicker: {}\n };\n } else if (parameter.validation.allowedValues?.type === \"cbacMarking\") {\n return {\n type: \"cbacMarkingPicker\",\n cbacMarkingPicker: {}\n };\n } else {\n throw new Error(`The allowed values for \"${parameter.displayName}\" are not compatible with the base parameter type`);\n }\n case \"timeSeriesReference\":\n case \"objectReference\":\n case \"objectReferenceList\":\n case \"interfaceReference\":\n case \"interfaceReferenceList\":\n case \"objectTypeReference\":\n case \"mediaReference\":\n case \"mediaReferenceList\":\n case \"geotimeSeriesReference\":\n case \"geotimeSeriesReferenceList\":\n return {\n type: \"dropdown\",\n dropdown: {}\n };\n case \"struct\":\n case \"structList\":\n throw new Error(\"Structs are not supported yet\");\n default:\n throw new Error(`Unknown type ${type}`);\n }\n}\nexport function extractNamespace(apiName) {\n return apiName.substring(0, apiName.lastIndexOf(\".\") + 1);\n}\nexport function withoutNamespace(apiName) {\n const lastDot = apiName.lastIndexOf(\".\");\n if (lastDot === -1) {\n return apiName;\n }\n return apiName.substring(lastDot + 1);\n}\nfunction camel(str) {\n if (!str) {\n return str;\n }\n let result = str.replace(/[-_]+(.)?/g, (_, c) => c ? c.toUpperCase() : \"\");\n result = result.charAt(0).toLowerCase() + result.slice(1);\n return result;\n}\n\n/**\n * Gets the TypeScript type name corresponding to an OntologyEntityTypeEnum value\n */\nfunction getEntityTypeName(type) {\n return {\n [OntologyEntityTypeEnum.OBJECT_TYPE]: \"ObjectType\",\n [OntologyEntityTypeEnum.LINK_TYPE]: \"LinkType\",\n [OntologyEntityTypeEnum.INTERFACE_TYPE]: \"InterfaceType\",\n [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: \"SharedPropertyType\",\n [OntologyEntityTypeEnum.ACTION_TYPE]: \"ActionType\",\n [OntologyEntityTypeEnum.VALUE_TYPE]: \"ValueTypeDefinitionVersion\"\n }[type];\n}\nfunction writeDependencyFile(dependencyFile) {\n fs.writeFileSync(dependencyFile, JSON.stringify(dependencies, null, 2));\n}\nfunction dependencyInjectionString() {\n const namespaceNoDot = namespace.endsWith(\".\") ? namespace.slice(0, -1) : namespace;\n return `import { addDependency } from \"@osdk/maker\";\n// @ts-ignore\naddDependency(\"${namespaceNoDot}\", new URL(import.meta.url).pathname);\n`;\n}\nexport function addNamespaceIfNone(apiName) {\n return apiName.includes(\".\") ? apiName : namespace + apiName;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport invariant from \"tiny-invariant\";\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport { defineOntology } from \"../api/defineOntology.js\";\nconst apiNamespaceRegex = /^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$/;\nconst uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;\nexport default async function main(args = process.argv) {\n const commandLineOpts = await yargs(hideBin(args)).version(process.env.PACKAGE_VERSION ?? \"\").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({\n input: {\n alias: \"i\",\n describe: \"Input file\",\n type: \"string\",\n default: \".ontology/ontology.ts\",\n coerce: path.resolve\n },\n output: {\n alias: \"o\",\n describe: \"Output file\",\n type: \"string\",\n default: \"ontology.json\",\n coerce: path.resolve\n },\n apiNamespace: {\n describe: \"Api name prefix for namespaced ontology types\",\n type: \"string\",\n default: \"\"\n },\n snapshotDir: {\n alias: \"s\",\n describe: \"Snapshot directory\",\n type: \"string\",\n default: \"snapshots\",\n coerce: path.resolve\n },\n outputDir: {\n alias: \"d\",\n describe: \"Directory for generated ontology entities\",\n type: \"string\",\n coerce: path.resolve\n },\n valueTypesOutput: {\n describe: \"Value Type Output File\",\n type: \"string\",\n default: \"value-types.json\",\n coerce: path.resolve\n },\n dependencies: {\n describe: \"File to write dependencies to\",\n type: \"string\",\n coerce: path.resolve\n },\n randomnessKey: {\n describe: \"Value used to assure uniqueness of entities\",\n type: \"string\",\n coerce: path.resolve\n }\n }).parseAsync();\n let apiNamespace = \"\";\n if (commandLineOpts.apiNamespace.length !== 0) {\n apiNamespace = commandLineOpts.apiNamespace.slice(-1) !== \".\" ? commandLineOpts.apiNamespace + \".\" : commandLineOpts.apiNamespace;\n !(apiNamespace.length < 1024) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"API namespace is too long.\") : invariant(false) : void 0;\n !apiNamespaceRegex.test(apiNamespace) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"API namespace is invalid! It is expected to conform to ^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$\") : invariant(false) : void 0;\n }\n consola.info(`Loading ontology from ${commandLineOpts.input}`);\n if (commandLineOpts.randomnessKey !== undefined) {\n !uuidRegex.test(commandLineOpts.randomnessKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Supplied randomness key is not a uuid and shouldn't be used as a uniqueness guarantee\") : invariant(false) : void 0;\n }\n const ontologyIr = await loadOntology(commandLineOpts.input, apiNamespace, commandLineOpts.outputDir, commandLineOpts.dependencies, commandLineOpts.randomnessKey);\n consola.info(`Saving ontology to ${commandLineOpts.output}`);\n await fs.writeFile(commandLineOpts.output, JSON.stringify(ontologyIr, null, 2));\n // No point in generating block if there aren't any value types\n if (ontologyIr.valueTypes.valueTypes.length > 0 || ontologyIr.importedValueTypes.valueTypes.length > 0) {\n await fs.writeFile(commandLineOpts.valueTypesOutput, JSON.stringify(ontologyIr.valueTypes, null, 2));\n }\n}\nasync function loadOntology(input, apiNamespace, outputDir, dependencyFile, randomnessKey) {\n const q = await defineOntology(apiNamespace, async () => await import(input), outputDir, dependencyFile, randomnessKey);\n return q;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport { dependencies } from \"./defineOntology.js\";\nconst MAX_SEARCH_DEPTH = 5;\nexport function addDependency(namespaceNoDot, fileInPackage) {\n let dir = path.dirname(fileInPackage);\n let packageJsonPath = null;\n for (let i = 0; i < MAX_SEARCH_DEPTH; i++) {\n const candidate = path.join(dir, \"package.json\");\n if (fs.existsSync(candidate)) {\n packageJsonPath = candidate;\n break;\n }\n const parentDir = path.dirname(dir);\n if (parentDir === dir) break;\n dir = parentDir;\n }\n if (!packageJsonPath) {\n throw new Error(`Could not find a package.json within ${MAX_SEARCH_DEPTH} parent directories of ${fileInPackage}`);\n }\n const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf-8\"));\n dependencies[namespaceNoDot] = packageJson.version ?? \"\";\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// FIXME: these should not use conjure types\n\nexport function isActionParameterTypePrimitive(type) {\n return [\"boolean\", \"booleanList\", \"integer\", \"integerList\", \"long\", \"longList\", \"double\", \"doubleList\", \"string\", \"stringList\", \"decimal\", \"decimalList\", \"timestamp\", \"timestampList\", \"geohash\", \"geohashList\", \"geoshape\", \"geoshapeList\", \"timeSeriesReference\", \"date\", \"dateList\", \"objectTypeReference\", \"objectReference\", \"attachment\", \"attachmentList\", \"marking\", \"markingList\", \"mediaReference\", \"mediaReferenceList\", \"geotimeSeriesReference\", \"geotimeSeriesReferenceList\"].includes(type);\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { convertConditionDefinition } from \"../conversion/toMarketplace/convertConditionDefinition.js\";\nimport { isActionParameterTypePrimitive } from \"./action/ActionParameterType.js\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { uppercaseFirstLetter } from \"./defineObject.js\";\nimport { addNamespaceIfNone, importedTypes, namespace, ontologyDefinition, updateOntology } from \"./defineOntology.js\";\nimport { getFlattenedInterfaceProperties } from \"./interface/getFlattenedInterfaceProperties.js\";\nimport { isStruct } from \"./properties/PropertyTypeType.js\";\nexport const MODIFY_OBJECT_PARAMETER = \"objectToModifyParameter\";\nexport const CREATE_OR_MODIFY_OBJECT_PARAMETER = \"objectToCreateOrModifyParameter\";\nexport const CREATE_INTERFACE_OBJECT_PARAMETER = \"objectTypeParameter\";\nexport const MODIFY_INTERFACE_OBJECT_PARAMETER = \"interfaceObjectToModifyParameter\";\nexport function defineAction(actionDef) {\n const apiName = namespace + actionDef.apiName;\n const parameterIds = (actionDef.parameters ?? []).map(p => p.id);\n if (ontologyDefinition[OntologyEntityTypeEnum.ACTION_TYPE][apiName] !== undefined) {\n throw new Error(`Action type with apiName ${actionDef.apiName} is already defined`);\n }\n !/^[a-z0-9]+(-[a-z0-9]+)*$/.test(actionDef.apiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Action type apiName \"${actionDef.apiName}\" must be alphanumeric, lowercase, and kebab-case`) : invariant(false) : void 0;\n const parameterIdsSet = new Set(parameterIds);\n !(parameterIdsSet.size === parameterIds.length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameter ids must be unique`) : invariant(false) : void 0;\n const parameterIdsNotFound = Array.from(referencedParameterIds(actionDef)).filter(p => !parameterIdsSet.has(p));\n !(parameterIdsNotFound.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameters ${JSON.stringify(parameterIdsNotFound)} were referenced but not defined`) : invariant(false) : void 0;\n const definedSectionIds = new Set(Object.keys(actionDef.sections ?? []));\n const undefinedSectionsInOrdering = (actionDef.formContentOrdering ?? []).flatMap(s => s.type === \"parameterId\" ? [] : [s.sectionId]).filter(sId => !definedSectionIds.has(sId));\n !(undefinedSectionsInOrdering.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Sections [${undefinedSectionsInOrdering}] were referenced in content ordering but not defined`) : invariant(false) : void 0;\n !(actionDef.rules.length > 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Action type ${actionDef.apiName} must have at least one logic rule`) : invariant(false) : void 0;\n actionDef.rules.forEach(rule => {\n if (rule.type === \"modifyObjectRule\") {\n !parameterIds.some(id => id === rule.modifyObjectRule.objectToModify) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Object to modify parameter must be defined in parameters`) : invariant(false) : void 0;\n }\n if (rule.type === \"deleteObjectRule\") {\n !parameterIds.some(id => id === rule.deleteObjectRule.objectToDelete) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Object to delete parameter must be defined in parameters`) : invariant(false) : void 0;\n }\n if (rule.type === \"modifyInterfaceRule\") {\n // The there must be a parameter for the interface, and the interface there must exist\n const interfaceParam = actionDef.parameters.find(p => p.id === rule.modifyInterfaceRule.interfaceObjectToModifyParameter);\n !(interfaceParam !== undefined && typeof interfaceParam.type === \"object\" && (interfaceParam.type.type === \"interfaceReference\" || interfaceParam.type.type === \"interfaceReferenceList\")) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface object to modify parameter must be an interface reference`) : invariant(false) : void 0;\n const interfaceReference = interfaceParam.type.type === \"interfaceReference\" ? interfaceParam.type.interfaceReference.interfaceTypeRid : interfaceParam.type.interfaceReferenceList.interfaceTypeRid;\n !(ontologyDefinition.INTERFACE_TYPE[interfaceReference] !== undefined || importedTypes.INTERFACE_TYPE[interfaceReference] !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface type ${interfaceReference} does not exist`) : invariant(false) : void 0;\n\n // All referenced SPTs must exist on the interface\n const interfaceType = ontologyDefinition.INTERFACE_TYPE[interfaceReference];\n Object.keys(rule.modifyInterfaceRule.sharedPropertyValues).forEach(spt => {\n !Object.keys(getFlattenedInterfaceProperties(interfaceType)).includes(spt) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Shared property type ${spt} does not exist in interface type ${interfaceReference}`) : invariant(false) : void 0;\n });\n }\n if (rule.type === \"addInterfaceRule\") {\n // The referenced interface must exist globally\n const interfaceType = ontologyDefinition.INTERFACE_TYPE[rule.addInterfaceRule.interfaceApiName] ?? importedTypes.INTERFACE_TYPE[rule.addInterfaceRule.interfaceApiName];\n !(interfaceType !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface type ${rule.addInterfaceRule.interfaceApiName} does not exist`) : invariant(false) : void 0;\n\n // All referenced SPTs must exist on the interface\n Object.keys(rule.addInterfaceRule.sharedPropertyValues).forEach(spt => {\n !Object.keys(getFlattenedInterfaceProperties(interfaceType)).includes(spt) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Shared property type ${spt} does not exist in interface type ${interfaceType.apiName}`) : invariant(false) : void 0;\n });\n }\n });\n const fullAction = {\n ...actionDef,\n apiName: apiName,\n entities: actionDef.entities ?? {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [],\n affectedLinkTypes: [],\n typeGroups: []\n },\n __type: OntologyEntityTypeEnum.ACTION_TYPE\n };\n validateActionConfiguration(fullAction);\n updateOntology(fullAction);\n return fullAction;\n}\nexport function isPropertyParameter(def, name, type) {\n return !Object.keys(def.nonParameterMappings ?? {}).includes(name) && !isStruct(type) && !def.excludedProperties?.includes(name);\n}\nexport function createParameters(def, propertyMap, parameterSet, requiredMap) {\n const targetParams = getTargetParameters(def, parameterSet);\n return [...targetParams, ...Array.from(parameterSet).map(id => ({\n id,\n displayName: def.parameterConfiguration?.[id]?.displayName ?? propertyMap[id]?.displayName ?? uppercaseFirstLetter(id),\n type: def.parameterConfiguration?.[id]?.customParameterType ?? extractActionParameterType(propertyMap[id]),\n validation: def.parameterConfiguration?.[id] !== undefined ? {\n ...def.parameterConfiguration?.[id],\n allowedValues: def.parameterConfiguration?.[id].allowedValues ?? (def.parameterConfiguration?.[id].customParameterType ? extractAllowedValuesFromActionParameterType(def.parameterConfiguration?.[id].customParameterType) : extractAllowedValuesFromPropertyType(propertyMap[id]?.type)),\n required: def.parameterConfiguration?.[id].required ?? propertyMap[id]?.nullability?.noNulls ?? false\n } : {\n required: propertyMap[id]?.array ?? false ? {\n listLength: propertyMap[id]?.nullability?.noEmptyCollections ? {\n min: 1\n } : {}\n } : requiredMap?.[id] ?? propertyMap[id]?.nullability?.noNulls ?? false,\n allowedValues: extractAllowedValuesFromPropertyType(propertyMap[id]?.type)\n },\n defaultValue: def.parameterConfiguration?.[id]?.defaultValue,\n description: def.parameterConfiguration?.[id]?.description\n }))];\n}\nfunction getTargetParameters(def, parameterSet) {\n const targetParams = [];\n parameterSet.forEach(name => {\n if (name === MODIFY_OBJECT_PARAMETER) {\n targetParams.push({\n id: MODIFY_OBJECT_PARAMETER,\n displayName: def.parameterConfiguration?.[name]?.displayName ?? \"Modify object\",\n type: {\n type: \"objectReference\",\n objectReference: {\n objectTypeId: def.objectType.apiName\n }\n },\n validation: {\n ...def.parameterConfiguration?.[name],\n allowedValues: {\n type: \"objectQuery\"\n },\n required: def.parameterConfiguration?.[name]?.required ?? true\n },\n defaultValue: def.parameterConfiguration?.[name]?.defaultValue,\n description: def.parameterConfiguration?.[name]?.description\n });\n parameterSet.delete(MODIFY_OBJECT_PARAMETER);\n }\n if (name === CREATE_OR_MODIFY_OBJECT_PARAMETER) {\n targetParams.push({\n id: CREATE_OR_MODIFY_OBJECT_PARAMETER,\n displayName: def.parameterConfiguration?.[name]?.displayName ?? \"Create or modify object\",\n type: {\n type: \"objectReference\",\n objectReference: {\n objectTypeId: def.objectType.apiName,\n maybeCreateObjectOption: !(\"primaryKeyOption\" in def) ? {\n type: \"autoGenerated\",\n autoGenerated: {}\n } : def.primaryKeyOption === \"autoGenerated\" ? {\n type: \"autoGenerated\",\n autoGenerated: {}\n } : {\n type: \"userInput\",\n userInput: {}\n }\n }\n },\n validation: {\n ...def.parameterConfiguration?.[name],\n allowedValues: {\n type: \"objectQuery\"\n },\n required: def.parameterConfiguration?.[name]?.required ?? true\n },\n defaultValue: def.parameterConfiguration?.[name]?.defaultValue,\n description: def.parameterConfiguration?.[name]?.description\n });\n parameterSet.delete(CREATE_OR_MODIFY_OBJECT_PARAMETER);\n }\n if (name === CREATE_INTERFACE_OBJECT_PARAMETER && \"interfaceType\" in def) {\n targetParams.push({\n id: CREATE_INTERFACE_OBJECT_PARAMETER,\n displayName: def.parameterConfiguration?.[name]?.displayName ?? \"Object type to create\",\n type: {\n type: \"objectTypeReference\",\n objectTypeReference: {\n interfaceTypeRids: [def.interfaceType.apiName]\n }\n },\n validation: {\n ...def.parameterConfiguration?.[name],\n required: true,\n allowedValues: def.objectType === undefined ? {\n type: \"objectTypeReference\",\n interfaceTypes: [def.interfaceType.apiName]\n } : {\n type: \"oneOf\",\n oneOf: [{\n label: def.objectType.displayName,\n value: {\n type: \"objectType\",\n objectType: {\n objectTypeId: def.objectType.apiName\n }\n }\n }]\n }\n },\n defaultValue: def.parameterConfiguration?.[name]?.defaultValue,\n description: def.parameterConfiguration?.[name]?.description\n });\n parameterSet.delete(CREATE_INTERFACE_OBJECT_PARAMETER);\n }\n if (name === MODIFY_INTERFACE_OBJECT_PARAMETER && \"interfaceType\" in def) {\n targetParams.push({\n id: MODIFY_INTERFACE_OBJECT_PARAMETER,\n displayName: def.parameterConfiguration?.[name]?.displayName ?? \"Object type to modify\",\n type: {\n type: \"interfaceReference\",\n interfaceReference: {\n interfaceTypeRid: def.interfaceType.apiName\n }\n },\n validation: {\n ...def.parameterConfiguration?.[name],\n required: true,\n allowedValues: def.objectType === undefined ? {\n type: \"interfaceObjectQuery\"\n } : {\n type: \"oneOf\",\n oneOf: [{\n label: def.objectType.displayName,\n value: {\n type: \"objectType\",\n objectType: {\n objectTypeId: def.objectType.apiName\n }\n }\n }]\n }\n },\n defaultValue: def.parameterConfiguration?.[name]?.defaultValue,\n description: def.parameterConfiguration?.[name]?.description\n });\n parameterSet.delete(MODIFY_INTERFACE_OBJECT_PARAMETER);\n }\n });\n return targetParams;\n}\nfunction referencedParameterIds(actionDef) {\n const parameterIds = new Set();\n\n // section definitions\n Object.values(actionDef.sections ?? {}).flatMap(p => p.parameters).forEach(pId => parameterIds.add(pId));\n\n // form content ordering\n (actionDef.formContentOrdering ?? []).forEach(item => {\n if (item.type === \"parameterId\") {\n parameterIds.add(item.parameterId);\n }\n });\n\n // logic rules\n actionDef.rules.forEach(rule => {\n // when visiting each rule, we also do drive-by namespace prefixing\n switch (rule.type) {\n case \"addInterfaceRule\":\n rule.addInterfaceRule.interfaceApiName = sanitize(rule.addInterfaceRule.interfaceApiName);\n parameterIds.add(rule.addInterfaceRule.objectTypeParameter);\n Object.entries(rule.addInterfaceRule.sharedPropertyValues).forEach(([k, v]) => {\n if (v.type === \"parameterId\") {\n parameterIds.add(v.parameterId);\n }\n delete rule.addInterfaceRule.sharedPropertyValues[k];\n rule.addInterfaceRule.sharedPropertyValues[sanitize(k)] = v;\n });\n break;\n case \"modifyInterfaceRule\":\n parameterIds.add(rule.modifyInterfaceRule.interfaceObjectToModifyParameter);\n Object.entries(rule.modifyInterfaceRule.sharedPropertyValues).forEach(([k, v]) => {\n if (v.type === \"parameterId\") {\n parameterIds.add(v.parameterId);\n }\n delete rule.modifyInterfaceRule.sharedPropertyValues[k];\n rule.modifyInterfaceRule.sharedPropertyValues[sanitize(k)] = v;\n });\n break;\n case \"addObjectRule\":\n Object.entries(rule.addObjectRule.propertyValues).forEach(([k, v]) => {\n if (v.type === \"parameterId\") {\n parameterIds.add(v.parameterId);\n }\n });\n break;\n case \"modifyObjectRule\":\n Object.entries(rule.modifyObjectRule.propertyValues).forEach(([k, v]) => {\n if (v.type === \"parameterId\") {\n parameterIds.add(v.parameterId);\n }\n });\n break;\n case \"addOrModifyObjectRuleV2\":\n Object.entries(rule.addOrModifyObjectRuleV2.propertyValues).forEach(([k, v]) => {\n if (v.type === \"parameterId\") {\n parameterIds.add(v.parameterId);\n }\n });\n break;\n }\n });\n return parameterIds;\n}\nfunction extractAllowedValuesFromActionParameterType(type) {\n if (typeof type === \"object\") {\n switch (type.type) {\n case \"objectReference\":\n case \"objectReferenceList\":\n return {\n type: \"objectQuery\"\n };\n case \"struct\":\n case \"structList\":\n throw new Error(\"Structs are not supported yet\");\n default:\n throw new Error(`Inferred allowed values for ${type.type} not yet supported. Please explicitly provide allowed values.`);\n }\n }\n switch (type) {\n case \"boolean\":\n case \"booleanList\":\n return {\n type: \"boolean\"\n };\n case \"integer\":\n case \"integerList\":\n case \"decimal\":\n case \"decimalList\":\n case \"double\":\n case \"doubleList\":\n case \"long\":\n case \"longList\":\n return {\n type: \"range\"\n };\n case \"timestamp\":\n case \"timestampList\":\n case \"date\":\n case \"dateList\":\n return {\n type: \"datetime\"\n };\n case \"string\":\n case \"stringList\":\n return {\n type: \"text\"\n };\n case \"geohash\":\n case \"geohashList\":\n return {\n type: \"geohash\"\n };\n case \"geoshape\":\n case \"geoshapeList\":\n return {\n type: \"geoshape\"\n };\n case \"mediaReference\":\n case \"mediaReferenceList\":\n return {\n type: \"mediaReference\"\n };\n case \"geotimeSeriesReference\":\n case \"geotimeSeriesReferenceList\":\n return {\n type: \"geotimeSeriesReference\"\n };\n case \"attachment\":\n case \"attachmentList\":\n return {\n type: \"attachment\"\n };\n default:\n throw new Error(`Inferred allowed values for ${type} not yet supported. Please explicitly provide allowed values.`);\n }\n}\nfunction extractAllowedValuesFromPropertyType(type) {\n switch (type) {\n case \"boolean\":\n return {\n type: \"boolean\"\n };\n case \"byte\":\n return {\n type: \"range\",\n min: {\n type: \"staticValue\",\n staticValue: {\n type: \"integer\",\n integer: 0\n }\n },\n max: {\n type: \"staticValue\",\n staticValue: {\n type: \"integer\",\n integer: 255\n }\n }\n };\n case \"timestamp\":\n case \"date\":\n return {\n type: \"datetime\"\n };\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n return {\n type: \"range\"\n };\n case \"short\":\n return {\n type: \"range\",\n min: {\n type: \"staticValue\",\n staticValue: {\n type: \"integer\",\n integer: 0\n }\n },\n max: {\n type: \"staticValue\",\n staticValue: {\n type: \"integer\",\n integer: 65535\n }\n }\n };\n case \"string\":\n return {\n type: \"text\"\n };\n case \"geopoint\":\n return {\n type: \"geohash\"\n };\n case \"geoshape\":\n return {\n type: \"geoshape\"\n };\n case \"mediaReference\":\n return {\n type: \"mediaReference\"\n };\n case \"geotimeSeries\":\n return {\n type: \"geotimeSeriesReference\"\n };\n default:\n switch (type.type) {\n case \"marking\":\n return type.markingType === \"CBAC\" ? {\n type: \"cbacMarking\"\n } : {\n type: \"mandatoryMarking\"\n };\n case \"string\":\n return {\n type: \"text\"\n };\n case \"struct\":\n throw new Error(\"Structs are not supported yet\");\n default:\n throw new Error(\"Unknown type\");\n }\n break;\n }\n}\nfunction extractActionParameterType(pt) {\n const typeType = pt.type;\n if (typeof typeType === \"object\") {\n switch (typeType.type) {\n case \"marking\":\n return maybeAddList(\"marking\", pt);\n case \"string\":\n return maybeAddList(\"string\", pt);\n case \"struct\":\n throw new Error(\"Structs are not supported yet\");\n default:\n throw new Error(`Unknown type`);\n }\n }\n if (typeof typeType === \"string\" && isActionParameterTypePrimitive(typeType)) {\n return maybeAddList(typeType, pt);\n }\n switch (typeType) {\n case \"byte\":\n case \"short\":\n return maybeAddList(\"integer\", pt);\n case \"geopoint\":\n return maybeAddList(\"geohash\", pt);\n case \"float\":\n return maybeAddList(\"double\", pt);\n case \"geotimeSeries\":\n return maybeAddList(\"geotimeSeriesReference\", pt);\n default:\n throw new Error(\"Unknown type\");\n }\n}\nfunction maybeAddList(type, pt) {\n return pt.array ?? false ? type + \"List\" : type;\n}\nexport function kebab(s) {\n return s.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/([A-Z])([A-Z][a-z])/g, \"$1-$2\").replace(/\\./g, \"-\").toLowerCase();\n}\nfunction sanitize(s) {\n return s.includes(\".\") ? s : namespace + s;\n}\nexport function convertValidationRule(actionValidation, actionParameters) {\n return actionValidation.map(rule => {\n return {\n condition: convertConditionDefinition(rule.condition, actionParameters),\n displayMetadata: rule.displayMetadata ?? {\n failureMessage: \"Did not satisfy validation\",\n typeClasses: []\n }\n };\n });\n}\nfunction validateActionConfiguration(action) {\n const seenParameterIds = new Set();\n const parameterMap = action.parameters?.reduce((acc, param) => {\n acc[param.id] = param;\n return acc;\n }, {}) ?? {};\n const orderedParameters = action.parameterOrdering?.map(id => parameterMap[id]) ?? action.parameters;\n orderedParameters?.forEach(param => {\n param.validation.conditionalOverrides?.forEach(override => {\n validateParameterCondition(override.condition, param.id, seenParameterIds, action.parameters);\n });\n validateParameterPrefill(param.id, seenParameterIds, action.parameters, param.defaultValue);\n seenParameterIds.add(param.id);\n });\n}\nfunction validateParameterCondition(condition, currentParameterId, seenParameterIds, parameters) {\n switch (condition.type) {\n case \"parameter\":\n const overrideParamId = condition.parameterId;\n !parameters?.some(p => p.id === overrideParamId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameter condition on ${currentParameterId} is referencing unknown parameter ${overrideParamId}`) : invariant(false) : void 0;\n !(overrideParamId !== currentParameterId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameter condition on ${currentParameterId} is referencing itself`) : invariant(false) : void 0;\n !seenParameterIds.has(overrideParamId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameter condition on ${currentParameterId} is referencing later parameter ${overrideParamId}`) : invariant(false) : void 0;\n break;\n case \"and\":\n // this will not catch the niche edge case where users use the full syntax for unions\n if (\"conditions\" in condition) {\n condition.conditions.forEach(c => validateParameterCondition(c, currentParameterId, seenParameterIds, parameters));\n }\n break;\n case \"or\":\n if (\"conditions\" in condition) {\n condition.conditions.forEach(c => validateParameterCondition(c, currentParameterId, seenParameterIds, parameters));\n }\n break;\n case \"comparison\":\n case \"group\":\n case \"not\":\n case \"markings\":\n case \"regex\":\n case \"redacted\":\n case \"true\":\n break;\n default:\n throw new Error(`Unknown condition type on parameter ${currentParameterId}`);\n }\n}\nfunction validateParameterPrefill(currentParameterId, seenParameterIds, parameters, defaultValue) {\n if (!defaultValue) return;\n switch (defaultValue.type) {\n case \"objectParameterPropertyValue\":\n !parameters?.some(p => p.id === defaultValue.objectParameterPropertyValue.parameterId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Default value for parameter ${currentParameterId} is referencing unknown parameter ${defaultValue.objectParameterPropertyValue.parameterId}`) : invariant(false) : void 0;\n !seenParameterIds.has(defaultValue.objectParameterPropertyValue.parameterId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Default value for parameter ${currentParameterId} is referencing later parameter ${defaultValue.objectParameterPropertyValue.parameterId}`) : invariant(false) : void 0;\n break;\n case \"staticValue\":\n !(defaultValue.staticValue.type === parameters?.find(p => p.id === currentParameterId)?.type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Default static value for parameter ${currentParameterId} does not match type`) : invariant(false) : void 0;\n break;\n case \"staticObject\":\n case \"interfaceParameterPropertyValue\":\n case \"objectQueryPrefill\":\n case \"objectQueryPropertyValue\":\n case \"objectSetRidPrefill\":\n case \"redacted\":\n break;\n default:\n throw new Error(`Unknown default value type for parameter ${currentParameterId}`);\n }\n}\nexport function validateActionParameters(def, properties, name) {\n // validates that parameters either exist as object properties or have a type defined\n [...Object.keys(def.parameterConfiguration ?? {})].forEach(id => {\n !(properties.includes(id) || properties.includes(addNamespaceIfNone(id)) || def.parameterConfiguration?.[id].customParameterType !== undefined || isTargetParameter(id)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameter ${id} does not exist as a property on ${name} and its type is not explicitly defined`) : invariant(false) : void 0;\n });\n [...Object.keys(def.nonParameterMappings ?? {}), ...(def.excludedProperties ?? [])].forEach(id => {\n !(properties.includes(id) || properties.includes(addNamespaceIfNone(id))) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Property ${id} does not exist as a property on ${name}`) : invariant(false) : void 0;\n });\n}\n\n// Parameters with configurations will be ordered first in the order they were defined\n// followed by the rest of the parameters in the order they were defined on the object type.\nexport function createDefaultParameterOrdering(def, properties, parameters, priorityId) {\n return [...(priorityId ? [priorityId] : []), ...Object.keys(def.parameterConfiguration ?? {}).filter(id => id !== priorityId), ...properties.filter(id => !def.parameterConfiguration?.[id] && parameters.some(p => p.id === id))];\n}\nexport function validateParameterOrdering(parameterOrdering, parameterSet, actionApiName) {\n const orderingSet = new Set(parameterOrdering);\n const missingParameters = [...parameterSet].filter(param => !orderingSet.has(param));\n const extraneousParameters = parameterOrdering.filter(param => !parameterSet.has(param));\n !(extraneousParameters.length === 0 && missingParameters.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Action parameter ordering for ${actionApiName} does not match expected parameters. Extraneous parameters in ordering: {${extraneousParameters}}, Missing parameters in ordering: {${missingParameters}}`) : invariant(false) : void 0;\n}\nexport function isTargetParameter(parameterId) {\n return parameterId === MODIFY_OBJECT_PARAMETER || parameterId === CREATE_OR_MODIFY_OBJECT_PARAMETER || parameterId === CREATE_INTERFACE_OBJECT_PARAMETER || parameterId === MODIFY_INTERFACE_OBJECT_PARAMETER;\n}\nexport function addNamespaceToActionDefinition(def) {\n def.parameterConfiguration = Object.fromEntries(Object.entries(def.parameterConfiguration ?? {}).map(([id, config]) => [getInterfaceParameterName(def, id), config]));\n def.nonParameterMappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [addNamespaceIfNone(id), value]));\n def.excludedProperties = (def.excludedProperties ?? []).map(id => addNamespaceIfNone(id));\n def.sections = def.sections?.map(section => ({\n ...section,\n parameters: section.parameters.map(p => getInterfaceParameterName(def, p))\n }));\n}\n\n// Adds a namespace to an interface parameter name if it is supposed to be namespaced\nexport function getInterfaceParameterName(def, parameter) {\n return isTargetParameter(parameter) || !Object.keys(def.interfaceType.propertiesV2).includes(addNamespaceIfNone(parameter)) ? parameter : addNamespaceIfNone(parameter);\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { randomUUID } from \"crypto\";\nexport function convertMappingValue(value) {\n switch (value.type) {\n case \"uuid\":\n return {\n type: \"uniqueIdentifier\",\n uniqueIdentifier: {\n linkId: value.linkId ?? randomUUID()\n }\n };\n case \"currentTime\":\n return {\n type: \"currentTime\",\n currentTime: {}\n };\n case \"currentUser\":\n return {\n type: \"currentUser\",\n currentUser: {}\n };\n default:\n return value;\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { addNamespaceToActionDefinition, convertValidationRule, CREATE_INTERFACE_OBJECT_PARAMETER, createDefaultParameterOrdering, createParameters, defineAction, getInterfaceParameterName, isPropertyParameter, kebab, validateActionParameters, validateParameterOrdering } from \"./defineAction.js\";\nimport { getFlattenedInterfaceProperties } from \"./interface/getFlattenedInterfaceProperties.js\";\nexport function defineCreateInterfaceObjectAction(def) {\n addNamespaceToActionDefinition(def);\n const allProperties = getFlattenedInterfaceProperties(def.interfaceType);\n validateActionParameters(def, Object.keys(allProperties), def.interfaceType.apiName);\n const propertyParameters = Object.keys(allProperties).filter(apiName => isPropertyParameter(def, apiName, allProperties[apiName].sharedPropertyType.type));\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(getInterfaceParameterName(def, param)));\n parameterNames.add(CREATE_INTERFACE_OBJECT_PARAMETER);\n const actionApiName = def.apiName ?? `create-${kebab(def.interfaceType.apiName.split(\".\").pop() ?? def.interfaceType.apiName)}${def.objectType === undefined ? \"\" : `-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`}`;\n if (def.parameterOrdering) {\n if (!def.parameterOrdering.includes(CREATE_INTERFACE_OBJECT_PARAMETER)) {\n def.parameterOrdering.unshift(CREATE_INTERFACE_OBJECT_PARAMETER);\n }\n validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);\n }\n const parameters = createParameters(def, Object.fromEntries(Object.entries(allProperties).map(([id, prop]) => [id, prop.sharedPropertyType])), parameterNames, Object.fromEntries(Object.entries(allProperties).map(([id, prop]) => [id, prop.required])));\n const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName ?? `Create ${def.interfaceType.displayMetadata.displayName}`,\n parameters: parameters,\n status: def.status ?? (def.interfaceType.status.type !== \"deprecated\" ? def.interfaceType.status.type : def.interfaceType.status),\n entities: {\n affectedInterfaceTypes: [def.interfaceType.apiName],\n affectedObjectTypes: [],\n affectedLinkTypes: [],\n typeGroups: []\n },\n rules: [{\n type: \"addInterfaceRule\",\n addInterfaceRule: {\n interfaceApiName: def.interfaceType.apiName,\n objectTypeParameter: CREATE_INTERFACE_OBJECT_PARAMETER,\n sharedPropertyValues: {\n ...Object.fromEntries(propertyParameters.map(id => [id, {\n type: \"parameterId\",\n parameterId: id\n }])),\n ...mappings\n }\n }\n }],\n parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(allProperties), parameters, CREATE_INTERFACE_OBJECT_PARAMETER),\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation, parameters)\n } : {}),\n ...(def.defaultFormat && {\n defaultFormat: def.defaultFormat\n }),\n ...(def.enableLayoutSwitch && {\n enableLayoutSwitch: def.enableLayoutSwitch\n }),\n ...(def.tableConfiguration && {\n displayAndFormat: {\n table: def.tableConfiguration\n }\n }),\n ...(def.sections && {\n sections: Object.fromEntries(def.sections.map(section => [section.id, section]))\n }),\n ...(def.submissionMetadata && {\n submissionMetadata: def.submissionMetadata\n })\n });\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { convertValidationRule, createDefaultParameterOrdering, createParameters, defineAction, isPropertyParameter, kebab, validateActionParameters, validateParameterOrdering } from \"./defineAction.js\";\nexport function defineCreateObjectAction(def) {\n validateActionParameters(def, Object.keys(def.objectType.properties ?? {}), def.objectType.apiName);\n const propertyParameters = Object.keys(def.objectType.properties ?? {}).filter(id => isPropertyParameter(def, id, def.objectType.properties?.[id].type));\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(param));\n const actionApiName = def.apiName ?? `create-object-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`;\n if (def.parameterOrdering) {\n validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);\n }\n const parameters = createParameters(def, def.objectType.properties ?? {}, parameterNames);\n const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName ?? `Create ${def.objectType.displayName}`,\n parameters: parameters,\n status: def.status ?? \"active\",\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.objectType.apiName],\n affectedLinkTypes: [],\n typeGroups: []\n },\n rules: [{\n type: \"addObjectRule\",\n addObjectRule: {\n objectTypeId: def.objectType.apiName,\n propertyValues: {\n ...Object.fromEntries(propertyParameters.map(p => [p, {\n type: \"parameterId\",\n parameterId: p\n }])),\n ...mappings\n },\n structFieldValues: {}\n }\n }],\n parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(def.objectType.properties ?? {}), parameters),\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation, parameters)\n } : {}),\n ...(def.defaultFormat && {\n defaultFormat: def.defaultFormat\n }),\n ...(def.enableLayoutSwitch && {\n enableLayoutSwitch: def.enableLayoutSwitch\n }),\n ...(def.tableConfiguration && {\n displayAndFormat: {\n table: def.tableConfiguration\n }\n }),\n ...(def.sections && {\n sections: Object.fromEntries(def.sections.map(section => [section.id, section]))\n }),\n ...(def.submissionMetadata && {\n submissionMetadata: def.submissionMetadata\n })\n });\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { convertValidationRule, CREATE_OR_MODIFY_OBJECT_PARAMETER, createDefaultParameterOrdering, createParameters, defineAction, kebab, validateActionParameters, validateParameterOrdering } from \"./defineAction.js\";\nimport { isStruct } from \"./properties/PropertyTypeType.js\";\nexport function defineCreateOrModifyObjectAction(def) {\n validateActionParameters(def, Object.keys(def.objectType.properties ?? {}), def.objectType.apiName);\n 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);\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(param));\n parameterNames.add(CREATE_OR_MODIFY_OBJECT_PARAMETER);\n const actionApiName = def.apiName ?? `create-or-modify-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`;\n if (def.parameterOrdering) {\n if (!def.parameterOrdering.includes(CREATE_OR_MODIFY_OBJECT_PARAMETER)) {\n def.parameterOrdering.unshift(CREATE_OR_MODIFY_OBJECT_PARAMETER);\n }\n validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);\n }\n const parameters = createParameters(def, def.objectType.properties ?? {}, parameterNames);\n parameters.forEach(p => {\n if (p.id !== CREATE_OR_MODIFY_OBJECT_PARAMETER && p.defaultValue === undefined) {\n p.defaultValue = {\n type: \"objectParameterPropertyValue\",\n objectParameterPropertyValue: {\n parameterId: CREATE_OR_MODIFY_OBJECT_PARAMETER,\n propertyTypeId: p.id\n }\n };\n }\n });\n const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName ?? `Create or Modify ${def.objectType.displayName}`,\n parameters: parameters,\n status: def.status ?? \"active\",\n rules: [{\n type: \"addOrModifyObjectRuleV2\",\n addOrModifyObjectRuleV2: {\n objectToModify: CREATE_OR_MODIFY_OBJECT_PARAMETER,\n propertyValues: {\n ...Object.fromEntries(propertyParameters.map(p => [p, {\n type: \"parameterId\",\n parameterId: p\n }])),\n ...mappings\n },\n structFieldValues: {}\n }\n }],\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.objectType.apiName],\n affectedLinkTypes: [],\n typeGroups: []\n },\n parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(def.objectType.properties ?? {}), parameters, CREATE_OR_MODIFY_OBJECT_PARAMETER),\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation, parameters)\n } : {}),\n ...(def.defaultFormat && {\n defaultFormat: def.defaultFormat\n }),\n ...(def.enableLayoutSwitch && {\n enableLayoutSwitch: def.enableLayoutSwitch\n }),\n ...(def.tableConfiguration && {\n displayAndFormat: {\n table: def.tableConfiguration\n }\n }),\n ...(def.sections && {\n sections: Object.fromEntries(def.sections.map(section => [section.id, section]))\n }),\n ...(def.submissionMetadata && {\n submissionMetadata: def.submissionMetadata\n })\n });\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertValidationRule, defineAction, kebab } from \"./defineAction.js\";\nexport function defineDeleteObjectAction(def) {\n return defineAction({\n apiName: def.apiName ?? `delete-object-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`,\n displayName: def.displayName ?? `Delete ${def.objectType.displayName}`,\n parameters: [{\n id: \"objectToDeleteParameter\",\n displayName: \"Delete object\",\n type: {\n type: \"objectReference\",\n objectReference: {\n objectTypeId: def.objectType.apiName\n }\n },\n validation: {\n required: true,\n allowedValues: {\n type: \"objectQuery\"\n }\n }\n }],\n status: def.status ?? \"active\",\n rules: [{\n type: \"deleteObjectRule\",\n deleteObjectRule: {\n objectToDelete: \"objectToDeleteParameter\"\n }\n }],\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.objectType.apiName],\n affectedLinkTypes: [],\n typeGroups: []\n },\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation)\n } : {})\n });\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { namespace, ontologyDefinition, updateOntology } from \"./defineOntology.js\";\nimport { defaultTypeClasses, getPropertyTypeName, hasRenderHints, shouldNotHaveRenderHints } from \"./propertyConversionUtils.js\";\nexport function defineSharedPropertyType(sptDef) {\n const apiName = namespace + sptDef.apiName;\n !(ontologyDefinition[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE][apiName] === undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Shared property type ${apiName} already exists`) : invariant(false) : void 0;\n !(!shouldNotHaveRenderHints(sptDef.type) || !hasRenderHints(sptDef.typeClasses)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Shared property type ${apiName} of type '${getPropertyTypeName(sptDef.type)}' should not have render hints`) : invariant(false) : void 0;\n const fullSpt = {\n ...sptDef,\n apiName,\n nonNameSpacedApiName: sptDef.apiName,\n displayName: sptDef.displayName ?? sptDef.apiName,\n // This way the non-namespaced api name is the display name (maybe not ideal)\n typeClasses: sptDef.typeClasses ?? (shouldNotHaveRenderHints(sptDef.type) ? [] : defaultTypeClasses),\n __type: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE\n };\n updateOntology(fullSpt);\n return fullSpt;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function mapSimplifiedStatusToInterfaceTypeStatus(status) {\n switch (status.type) {\n case \"deprecated\":\n return {\n type: \"deprecated\",\n deprecated: {\n message: status.message,\n deadline: status.deadline,\n replacedBy: undefined\n }\n };\n case \"active\":\n return {\n type: \"active\",\n active: {}\n };\n case \"experimental\":\n return {\n type: \"experimental\",\n experimental: {}\n };\n default:\n throw new Error(`Invalid status type: ${status.type}`);\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function combineApiNamespaceIfMissing(namespace, apiName) {\n return apiName.includes(\".\") ? apiName : namespace + apiName;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { namespace, ontologyDefinition, updateOntology, withoutNamespace } from \"./defineOntology.js\";\nimport { defineSharedPropertyType } from \"./defineSpt.js\";\nimport { mapSimplifiedStatusToInterfaceTypeStatus } from \"./interface/mapSimplifiedStatusToInterfaceTypeStatus.js\";\nimport { combineApiNamespaceIfMissing } from \"./namespace/combineApiNamespaceIfMissing.js\";\nimport { isPropertyTypeType } from \"./properties/PropertyTypeType.js\";\nexport function defineInterface(interfaceDef) {\n const apiName = namespace + interfaceDef.apiName;\n !(ontologyDefinition[OntologyEntityTypeEnum.INTERFACE_TYPE][apiName] === undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface ${apiName} already exists`) : invariant(false) : void 0;\n const properties = Object.fromEntries(Object.entries(interfaceDef.properties ?? {}).map(([unNamespacedPropApiName, type]) => {\n if (typeof type === \"object\" && \"propertyDefinition\" in type) {\n // If the property is an imported SPT, use the SPT's apiName\n const apiName = combineApiNamespaceIfMissing(namespace, typeof type.propertyDefinition === \"object\" && \"apiName\" in type.propertyDefinition ? type.propertyDefinition.apiName : unNamespacedPropApiName);\n return [apiName, {\n required: type.required,\n sharedPropertyType: unifyBasePropertyDefinition(namespace, unNamespacedPropApiName, type.propertyDefinition)\n }];\n }\n\n // If the property is an imported SPT, use the SPT's apiName\n const apiName = combineApiNamespaceIfMissing(namespace, typeof type === \"object\" && \"apiName\" in type ? type.apiName : unNamespacedPropApiName);\n return [apiName, {\n required: true,\n sharedPropertyType: unifyBasePropertyDefinition(namespace, unNamespacedPropApiName, type)\n }];\n }));\n const extendsInterfaces = interfaceDef.extends ? Array.isArray(interfaceDef.extends) ? interfaceDef.extends : [interfaceDef.extends] : [];\n const status = mapSimplifiedStatusToInterfaceTypeStatus(interfaceDef.status ?? {\n type: \"active\"\n });\n !(status.type !== \"deprecated\" || status.deprecated.message && status.deprecated.deadline) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Deprecated status must include message and deadline properties.`) : invariant(false) : void 0;\n const fullInterface = {\n apiName,\n displayMetadata: {\n displayName: interfaceDef.displayName ?? interfaceDef.apiName,\n description: interfaceDef.description ?? interfaceDef.displayName ?? interfaceDef.apiName,\n icon: interfaceDef.icon !== undefined ? {\n type: \"blueprint\",\n blueprint: {\n color: interfaceDef.icon.color,\n locator: interfaceDef.icon.locator\n }\n } : undefined\n },\n extendsInterfaces,\n links: [],\n status,\n propertiesV2: properties,\n searchable: interfaceDef.searchable ?? true,\n __type: OntologyEntityTypeEnum.INTERFACE_TYPE\n };\n updateOntology(fullInterface);\n return fullInterface;\n}\nfunction unifyBasePropertyDefinition(namespace, apiName, type) {\n if (typeof type === \"string\" || typeof type === \"object\" && !(\"apiName\" in type)) {\n !isPropertyTypeType(type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Invalid data type ${JSON.stringify(type)} for property ${apiName} on InterfaceType ${apiName}`) : invariant(false) : void 0;\n const spt = defineSharedPropertyType({\n apiName,\n displayName: apiName,\n type,\n array: false\n });\n return spt;\n } else {\n const unNamespacedTypeApiName = withoutNamespace(type.apiName);\n !(namespace + apiName === type.apiName || apiName === unNamespacedTypeApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `property key and it's apiName must be identical. ${JSON.stringify({\n key: apiName,\n apiName: type.apiName\n })}`) : invariant(false) : void 0;\n return type;\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { namespace, withoutNamespace } from \"./defineOntology.js\";\nimport { combineApiNamespaceIfMissing } from \"./namespace/combineApiNamespaceIfMissing.js\";\nexport function defineInterfaceLinkConstraint(linkDef) {\n const fromLinkMeta = getLinkMeta(linkDef);\n !(linkDef.from.links.find(a => a.metadata.apiName === fromLinkMeta.apiName) == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Link with apiName ${fromLinkMeta.apiName} already exists on ${linkDef.apiName}`) : invariant(false) : void 0;\n linkDef.from.links.push({\n cardinality: linkDef.toMany ? \"MANY\" : \"SINGLE\",\n linkedEntityTypeId: getLinkedType(linkDef.toMany ?? linkDef.toOne),\n metadata: fromLinkMeta,\n required: linkDef.required ?? true\n });\n}\nfunction getLinkedType(t) {\n return {\n type: \"interfaceType\",\n interfaceType: typeof t === \"string\" ? t : t.apiName\n };\n}\nfunction getLinkMeta(meta) {\n const {\n apiName,\n displayName,\n description\n } = meta;\n const apiNameWithNamespace = combineApiNamespaceIfMissing(namespace, apiName);\n const apiNameWithoutNamespace = withoutNamespace(apiNameWithNamespace);\n return {\n apiName: apiNameWithNamespace,\n displayName: displayName ?? apiNameWithoutNamespace,\n description: description ?? displayName ?? apiNameWithoutNamespace\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { convertToPluralDisplayName, uppercaseFirstLetter } from \"./defineObject.js\";\nimport { updateOntology } from \"./defineOntology.js\";\nconst typeIdPattern = /([a-z][a-z0-9\\\\-]*)/;\nexport function defineLink(linkDefinition) {\n if (\"one\" in linkDefinition) {\n const foreignKey = linkDefinition.toMany.object.properties?.[linkDefinition.manyForeignKeyProperty];\n !(foreignKey !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Foreign key ${linkDefinition.manyForeignKeyProperty} on link ${linkDefinition.apiName} does not exist on object ${linkDefinition.toMany.object.apiName}}`) : invariant(false) : void 0;\n !typeIdPattern.test(linkDefinition.apiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Top level link api names are expected to match the regex pattern ([a-z][a-z0-9\\\\-]*) ${linkDefinition.apiName} does not match`) : invariant(false) : void 0;\n const typesMatch = foreignKey.type === linkDefinition.one.object.properties?.[linkDefinition.one.object.primaryKeyPropertyApiName].type;\n !typesMatch ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Link ${linkDefinition.apiName} has type mismatch between the one side's primary key and the foreign key on the many side`) : invariant(false) : void 0;\n }\n if (\"intermediaryObjectType\" in linkDefinition) {\n !(\"one\" in linkDefinition.many.linkToIntermediary && linkDefinition.many.linkToIntermediary.one.object.apiName === linkDefinition.many.object.apiName && linkDefinition.many.linkToIntermediary.toMany.object.apiName === linkDefinition.intermediaryObjectType.apiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `LinkTypeA ${linkDefinition.many.linkToIntermediary.apiName} must be a many to one link from intermediary object ${linkDefinition.intermediaryObjectType.apiName} to objectA ${linkDefinition.many.object.apiName}`) : invariant(false) : void 0;\n !(\"one\" in linkDefinition.toMany.linkToIntermediary && linkDefinition.toMany.linkToIntermediary.one.object.apiName === linkDefinition.toMany.object.apiName && linkDefinition.toMany.linkToIntermediary.toMany.object.apiName === linkDefinition.intermediaryObjectType.apiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `LinkTypeB ${linkDefinition.toMany.linkToIntermediary.apiName} must be a many to one link from intermediary object ${linkDefinition.intermediaryObjectType.apiName} to objectB ${linkDefinition.toMany.object.apiName}`) : invariant(false) : void 0;\n }\n let fullLinkDefinition;\n if (\"one\" in linkDefinition) {\n fullLinkDefinition = {\n ...linkDefinition,\n one: convertUserOneToManyLinkDefinition(linkDefinition.one),\n toMany: convertUserOneToManyLinkDefinition(linkDefinition.toMany)\n };\n } else if (\"intermediaryObjectType\" in linkDefinition) {\n fullLinkDefinition = {\n ...linkDefinition,\n many: convertUserIntermediaryLinkDefinition(linkDefinition.many),\n toMany: convertUserIntermediaryLinkDefinition(linkDefinition.toMany)\n };\n } else {\n fullLinkDefinition = {\n ...linkDefinition,\n many: convertUserManyToManyLinkDefinition(linkDefinition.many),\n toMany: convertUserManyToManyLinkDefinition(linkDefinition.toMany)\n };\n }\n const linkType = {\n cardinality: \"one\" in linkDefinition ? linkDefinition.cardinality : undefined,\n ...fullLinkDefinition,\n __type: OntologyEntityTypeEnum.LINK_TYPE\n };\n updateOntology(linkType);\n return linkType;\n}\nfunction convertUserOneToManyLinkDefinition(oneToMany) {\n return {\n ...oneToMany,\n metadata: convertLinkTypeMetadata(oneToMany.metadata)\n };\n}\nfunction convertUserManyToManyLinkDefinition(manyToMany) {\n return {\n ...manyToMany,\n metadata: convertLinkTypeMetadata(manyToMany.metadata)\n };\n}\nfunction convertUserIntermediaryLinkDefinition(intermediary) {\n return {\n ...intermediary,\n metadata: convertLinkTypeMetadata(intermediary.metadata)\n };\n}\nfunction convertLinkTypeMetadata(metadata) {\n return {\n apiName: metadata.apiName,\n displayMetadata: {\n displayName: metadata.displayName ?? uppercaseFirstLetter(metadata.apiName),\n pluralDisplayName: metadata.pluralDisplayName ?? convertToPluralDisplayName(metadata.apiName),\n visibility: metadata.visibility ?? \"NORMAL\",\n groupDisplayName: metadata.groupDisplayName ?? \"\"\n },\n typeClasses: []\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { addNamespaceToActionDefinition, convertValidationRule, createDefaultParameterOrdering, createParameters, defineAction, getInterfaceParameterName, isPropertyParameter, kebab, MODIFY_INTERFACE_OBJECT_PARAMETER, validateActionParameters, validateParameterOrdering } from \"./defineAction.js\";\nimport { getFlattenedInterfaceProperties } from \"./interface/getFlattenedInterfaceProperties.js\";\nexport function defineModifyInterfaceObjectAction(def) {\n addNamespaceToActionDefinition(def);\n const allProperties = getFlattenedInterfaceProperties(def.interfaceType);\n validateActionParameters(def, Object.keys(allProperties), def.interfaceType.apiName);\n const propertyParameters = Object.keys(allProperties).filter(apiName => isPropertyParameter(def, apiName, allProperties[apiName].sharedPropertyType.type));\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(getInterfaceParameterName(def, param)));\n parameterNames.add(MODIFY_INTERFACE_OBJECT_PARAMETER);\n const actionApiName = def.apiName ?? `modify-${kebab(def.interfaceType.apiName.split(\".\").pop() ?? def.interfaceType.apiName)}${def.objectType === undefined ? \"\" : `-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`}`;\n if (def.parameterOrdering) {\n if (!def.parameterOrdering.includes(MODIFY_INTERFACE_OBJECT_PARAMETER)) {\n def.parameterOrdering.unshift(MODIFY_INTERFACE_OBJECT_PARAMETER);\n }\n validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);\n }\n const parameters = createParameters(def, Object.fromEntries(Object.entries(allProperties).map(([id, prop]) => [id, prop.sharedPropertyType])), parameterNames, Object.fromEntries(Object.entries(allProperties).map(([id, prop]) => [id, prop.required])));\n const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName ?? `Modify ${def.interfaceType.displayMetadata.displayName}`,\n parameters: parameters,\n status: def.status ?? (def.interfaceType.status.type !== \"deprecated\" ? def.interfaceType.status.type : def.interfaceType.status),\n entities: {\n affectedInterfaceTypes: [def.interfaceType.apiName],\n affectedObjectTypes: [],\n affectedLinkTypes: [],\n typeGroups: []\n },\n rules: [{\n type: \"modifyInterfaceRule\",\n modifyInterfaceRule: {\n interfaceObjectToModifyParameter: \"interfaceObjectToModifyParameter\",\n sharedPropertyValues: {\n ...Object.fromEntries(propertyParameters.map(id => [id, {\n type: \"parameterId\",\n parameterId: id\n }])),\n ...mappings\n }\n }\n }],\n parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(allProperties), parameters, MODIFY_INTERFACE_OBJECT_PARAMETER),\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation, parameters)\n } : {}),\n ...(def.defaultFormat && {\n defaultFormat: def.defaultFormat\n }),\n ...(def.enableLayoutSwitch && {\n enableLayoutSwitch: def.enableLayoutSwitch\n }),\n ...(def.tableConfiguration && {\n displayAndFormat: {\n table: def.tableConfiguration\n }\n }),\n ...(def.sections && {\n sections: Object.fromEntries(def.sections.map(section => [section.id, section]))\n }),\n ...(def.submissionMetadata && {\n submissionMetadata: def.submissionMetadata\n })\n });\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { convertValidationRule, createDefaultParameterOrdering, createParameters, defineAction, isPropertyParameter, kebab, MODIFY_OBJECT_PARAMETER, validateActionParameters, validateParameterOrdering } from \"./defineAction.js\";\nexport function defineModifyObjectAction(def) {\n validateActionParameters(def, Object.keys(def.objectType.properties ?? {}), def.objectType.apiName);\n const propertyParameters = Object.keys(def.objectType.properties ?? {}).filter(id => isPropertyParameter(def, id, def.objectType.properties?.[id].type) && id !== def.objectType.primaryKeyPropertyApiName);\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(param));\n parameterNames.add(MODIFY_OBJECT_PARAMETER);\n const actionApiName = def.apiName ?? `modify-object-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`;\n if (def.parameterOrdering) {\n if (!def.parameterOrdering.includes(MODIFY_OBJECT_PARAMETER)) {\n def.parameterOrdering.unshift(MODIFY_OBJECT_PARAMETER);\n }\n validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);\n }\n const parameters = createParameters(def, def.objectType.properties ?? {}, parameterNames);\n parameters.forEach(p => {\n if (p.id !== MODIFY_OBJECT_PARAMETER && p.defaultValue === undefined) {\n p.defaultValue = {\n type: \"objectParameterPropertyValue\",\n objectParameterPropertyValue: {\n parameterId: MODIFY_OBJECT_PARAMETER,\n propertyTypeId: p.id\n }\n };\n }\n });\n const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName ?? `Modify ${def.objectType.displayName}`,\n parameters: parameters,\n status: def.status ?? \"active\",\n rules: [{\n type: \"modifyObjectRule\",\n modifyObjectRule: {\n objectToModify: MODIFY_OBJECT_PARAMETER,\n propertyValues: {\n ...Object.fromEntries(propertyParameters.map(p => [p, {\n type: \"parameterId\",\n parameterId: p\n }])),\n ...mappings\n },\n structFieldValues: {}\n }\n }],\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.objectType.apiName],\n affectedLinkTypes: [],\n typeGroups: []\n },\n parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(def.objectType.properties ?? {}), parameters, MODIFY_OBJECT_PARAMETER),\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation, parameters)\n } : {}),\n ...(def.defaultFormat && {\n defaultFormat: def.defaultFormat\n }),\n ...(def.enableLayoutSwitch && {\n enableLayoutSwitch: def.enableLayoutSwitch\n }),\n ...(def.tableConfiguration && {\n displayAndFormat: {\n table: def.tableConfiguration\n }\n }),\n ...(def.sections && {\n sections: Object.fromEntries(def.sections.map(section => [section.id, section]))\n }),\n ...(def.submissionMetadata && {\n submissionMetadata: def.submissionMetadata\n })\n });\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { namespace, updateOntology } from \"./defineOntology.js\";\nfunction convertValueTypeTypeToBaseType(valueType) {\n if (typeof valueType === \"string\") {}\n switch (true) {\n case typeof valueType === \"object\" && valueType.type === \"array\":\n return {\n type: \"array\",\n array: {\n elementType: convertValueTypeTypeToBaseType(valueType.elementType)\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"struct\":\n return {\n type: \"structV2\",\n structV2: {\n fields: valueType.fields.map(field => ({\n identifier: field.identifier,\n baseType: convertValueTypeTypeToBaseType(field.baseType)\n }))\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"map\":\n return {\n type: \"map\",\n map: {\n keyType: convertValueTypeTypeToBaseType(valueType.keyType),\n valueType: convertValueTypeTypeToBaseType(valueType.valueType)\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"optional\":\n return {\n type: \"optional\",\n optional: {\n wrappedType: convertValueTypeTypeToBaseType(valueType.wrappedType)\n }\n };\n case typeof valueType === \"string\":\n return {\n type: valueType,\n [valueType]: {}\n };\n default:\n throw new Error(\"Invalid ValueTypeType\");\n }\n}\nexport function defineValueType(valueTypeDef) {\n const {\n apiName,\n displayName,\n description,\n type,\n version\n } = valueTypeDef;\n const semverValidation = /^((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)$/;\n !semverValidation.test(version) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Version is not a valid semver\") : invariant(false) : void 0;\n const typeName = typeof type.type === \"string\" ? type.type : type.type.type === \"struct\" ? \"structV2\" : type.type.type;\n // These suck but TS doesn't understand the relationship from the key of the base type to the type string\n const constraints = type.constraints ? type.constraints.map(constraint => {\n const output = {\n constraint: {\n type: typeName,\n [typeName]: constraint.constraint\n },\n failureMessage: constraint.failureMessage\n };\n return {\n constraint: output\n };\n }) : [];\n const baseType = convertValueTypeTypeToBaseType(type.type);\n const vt = {\n apiName,\n packageNamespace: namespace.substring(0, namespace.length - 1),\n displayMetadata: {\n displayName: displayName,\n description: description ?? \"\"\n },\n status: {\n type: \"active\",\n active: {}\n },\n version: version,\n baseType: baseType,\n constraints: constraints,\n exampleValues: [],\n __type: OntologyEntityTypeEnum.VALUE_TYPE\n };\n updateOntology(vt);\n return vt;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { importedTypes } from \"./defineOntology.js\";\nexport function importOntologyEntity(e) {\n if (e.__type !== OntologyEntityTypeEnum.VALUE_TYPE) {\n importedTypes[e.__type][e.apiName] = e;\n return;\n }\n // value types are a special case\n if (importedTypes[OntologyEntityTypeEnum.VALUE_TYPE][e.apiName] === undefined) {\n importedTypes[OntologyEntityTypeEnum.VALUE_TYPE][e.apiName] = [];\n }\n importedTypes[OntologyEntityTypeEnum.VALUE_TYPE][e.apiName].push(e);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { importOntologyEntity } from \"./importOntologyEntity.js\";\n/**\n * Defines a foreign shared property type you want to take as an input to your product. The typeHint field is used for OSDK generation\n */\nexport function importSharedPropertyType(opts) {\n const {\n apiName,\n packageName,\n typeHint,\n array\n } = opts;\n const fullApiName = packageName === undefined ? apiName : `${packageName}.${apiName}`;\n if (packageName !== undefined) {\n !!packageName.endsWith(\".\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Package name format invalid ends with period\") : invariant(false) : void 0;\n !(packageName.match(\"[A-Z]\") == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Package name includes upper case characters\") : invariant(false) : void 0;\n }\n const spt = {\n apiName: fullApiName,\n type: typeHint,\n nonNameSpacedApiName: apiName,\n array: array ?? false,\n __type: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE\n };\n importOntologyEntity(spt);\n return spt;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { importOntologyEntity } from \"./importOntologyEntity.js\";\n\n/**\n * Wraps an OntologyEntityType with a Proxy that calls importOntologyEntity when properties are accessed.\n *\n * @param entity - The OntologyEntityType to wrap with a Proxy\n * @returns A Proxy that imports the entity when properties are accessed\n */\nexport function wrapWithProxy(entity) {\n return new Proxy(entity, {\n get(target, prop, receiver) {\n importOntologyEntity(target);\n return Reflect.get(target, prop, receiver);\n }\n });\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/conversion/toMarketplace/convertActionParameters.ts","../../src/api/common/OntologyEntityTypeEnum.ts","../../src/conversion/toMarketplace/convertCardinality.ts","../../src/conversion/toMarketplace/convertLink.ts","../../src/api/interface/getFlattenedInterfaceProperties.ts","../../src/api/properties/PropertyTypeType.ts","../../src/api/defineObject.ts","../../src/conversion/toMarketplace/convertActionSections.ts","../../src/conversion/toMarketplace/convertConditionDefinition.ts","../../src/conversion/toMarketplace/convertActionParameterConditionalOverride.ts","../../src/conversion/toMarketplace/convertActionVisibility.ts","../../src/conversion/toMarketplace/convertSectionConditionalOverride.ts","../../src/conversion/toMarketplace/convertActionValidation.ts","../../src/conversion/toMarketplace/convertNullabilityToDataConstraint.ts","../../src/conversion/toConjure/distributeTypeHelper.ts","../../src/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.ts","../../src/conversion/toMarketplace/convertSpt.ts","../../src/conversion/toMarketplace/convertInterface.ts","../../src/conversion/toMarketplace/convertDatasourceDefinition.ts","../../src/api/propertyConversionUtils.ts","../../src/conversion/toMarketplace/convertValueType.ts","../../src/conversion/toMarketplace/convertDataConstraintToDataConstraints.ts","../../src/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.ts","../../src/conversion/toMarketplace/convertValueTypeDataConstraints.ts","../../src/conversion/toMarketplace/convertObjectPropertyType.ts","../../src/conversion/toMarketplace/convertObject.ts","../../src/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.ts","../../src/conversion/toMarketplace/convertValueTypesToIr.ts","../../src/conversion/toMarketplace/convertOntologyToValueTypeIr.ts","../../src/conversion/toMarketplace/convertOntologyDefinition.ts","../../src/conversion/toMarketplace/getFormContentOrdering.ts","../../src/api/defineOntology.ts","../../src/cli/main.ts","../../src/api/addDependency.ts","../../src/api/action/ActionParameterType.ts","../../src/api/defineAction.ts","../../src/conversion/toMarketplace/convertMappingValue.ts","../../src/api/defineCreateInterfaceObjectAction.ts","../../src/api/defineCreateObjectAction.ts","../../src/api/defineCreateOrModifyObjectAction.ts","../../src/api/defineDeleteInterfaceObjectAction.ts","../../src/api/defineDeleteObjectAction.ts","../../src/api/defineSpt.ts","../../src/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.ts","../../src/api/namespace/combineApiNamespaceIfMissing.ts","../../src/api/defineInterface.ts","../../src/api/defineInterfaceLinkConstraint.ts","../../src/api/defineLink.ts","../../src/api/defineModifyInterfaceObjectAction.ts","../../src/api/defineModifyObjectAction.ts","../../src/api/defineValueType.ts","../../src/api/importOntologyEntity.ts","../../src/api/importSharedPropertyType.ts","../../src/api/wrapWithProxy.ts"],"names":["OntologyEntityTypeEnum","invariant","apiName","path","fs","yargs","hideBin","path2","consola","fs2","path3","fs3","randomUUID","namespace"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,SAAS,wBAAwB,MAAQ,EAAA;AAC9C,EAAO,OAAA,MAAA,CAAO,WAAa,CAAA,CAAA,MAAA,CAAO,UAAc,IAAA,IAAI,GAAI,CAAA,CAAA,CAAA,KAAK,CAAC,CAAA,CAAE,EAAI,EAAA;AAAA,IAClE,IAAI,CAAE,CAAA,EAAA;AAAA,IACN,IAAM,EAAA,OAAO,CAAE,CAAA,IAAA,KAAS,QAAW,GAAA;AAAA,MACjC,MAAM,CAAE,CAAA,IAAA;AAAA,MACR,CAAC,CAAA,CAAE,IAAI,GAAG;AAAC,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EAAA,MAAM,GAAM,GAAA;AAAA,IACV,OAAS,EAAA,WAAA;AAAA,IACT,IAAM,EAAA,QAAA;AAAA,IACN,oBAAsB,EAAA,OAAA;AAAA,IACtB,OAAO,KAAS,IAAA,KAAA;AAAA,IAChB,QAAQ,sBAAuB,CAAA;AAAA,GACjC;AACA,EAAA,oBAAA,CAAqB,GAAG,CAAA;AACxB,EAAO,OAAA,GAAA;AACT;;;ACnBO,SAAS,cAAc,MAAQ,EAAA;AACpC,EAAO,OAAA,IAAI,MAAM,MAAQ,EAAA;AAAA,IACvB,GAAA,CAAI,MAAQ,EAAA,IAAA,EAAM,QAAU,EAAA;AAC1B,MAAA,oBAAA,CAAqB,MAAM,CAAA;AAC3B,MAAA,OAAO,OAAQ,CAAA,GAAA,CAAI,MAAQ,EAAA,IAAA,EAAM,QAAQ,CAAA;AAAA;AAC3C,GACD,CAAA;AACH","file":"index.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertActionParameters(action) {\n return Object.fromEntries((action.parameters ?? []).map(p => [p.id, {\n id: p.id,\n type: typeof p.type === \"string\" ? {\n type: p.type,\n [p.type]: {}\n } : p.type,\n displayMetadata: {\n displayName: p.displayName,\n description: p.description ?? \"\",\n typeClasses: []\n }\n }]));\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport let OntologyEntityTypeEnum = /*#__PURE__*/function (OntologyEntityTypeEnum) {\n OntologyEntityTypeEnum[\"OBJECT_TYPE\"] = \"OBJECT_TYPE\";\n OntologyEntityTypeEnum[\"LINK_TYPE\"] = \"LINK_TYPE\";\n OntologyEntityTypeEnum[\"INTERFACE_TYPE\"] = \"INTERFACE_TYPE\";\n OntologyEntityTypeEnum[\"SHARED_PROPERTY_TYPE\"] = \"SHARED_PROPERTY_TYPE\";\n OntologyEntityTypeEnum[\"ACTION_TYPE\"] = \"ACTION_TYPE\";\n OntologyEntityTypeEnum[\"VALUE_TYPE\"] = \"VALUE_TYPE\";\n return OntologyEntityTypeEnum;\n}({});","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertCardinality(cardinality) {\n if (cardinality === \"OneToMany\" || cardinality === undefined) {\n return \"ONE_TO_MANY\";\n }\n return \"ONE_TO_ONE\";\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport { cleanAndValidateLinkTypeId, ontologyDefinition } from \"../../api/defineOntology.js\";\nimport { convertCardinality } from \"./convertCardinality.js\";\nexport function convertLink(linkType) {\n validateLink(linkType);\n let definition;\n let datasource = undefined;\n if (\"one\" in linkType) {\n const {\n apiName: oneObjectApiName,\n object: oneObject\n } = getObject(linkType.one.object);\n const {\n apiName: toManyObjectApiName,\n object: toManyObject\n } = getObject(linkType.toMany.object);\n definition = {\n type: \"oneToMany\",\n oneToMany: {\n cardinalityHint: convertCardinality(linkType.cardinality),\n manyToOneLinkMetadata: linkType.toMany.metadata,\n objectTypeRidManySide: toManyObjectApiName,\n objectTypeRidOneSide: oneObjectApiName,\n oneToManyLinkMetadata: linkType.one.metadata,\n oneSidePrimaryKeyToManySidePropertyMapping: [{\n from: {\n apiName: oneObject.primaryKeyPropertyApiName,\n object: oneObjectApiName\n },\n to: {\n apiName: linkType.manyForeignKeyProperty,\n object: toManyObjectApiName\n }\n }]\n }\n };\n } else if (\"intermediaryObjectType\" in linkType) {\n const {\n apiName: manyObjectApiName,\n object: manyObject\n } = getObject(linkType.many.object);\n const {\n apiName: toManyObjectApiName,\n object: toManyObject\n } = getObject(linkType.toMany.object);\n definition = {\n type: \"intermediary\",\n intermediary: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: manyObjectApiName,\n objectTypeRidB: toManyObjectApiName,\n intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,\n aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(linkType.many.linkToIntermediary.apiName),\n intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(linkType.toMany.linkToIntermediary.apiName)\n }\n };\n } else {\n const {\n apiName: manyObjectApiName,\n object: manyObject\n } = getObject(linkType.many.object);\n const {\n apiName: toManyObjectApiName,\n object: toManyObject\n } = getObject(linkType.toMany.object);\n definition = {\n type: \"manyToMany\",\n manyToMany: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: manyObjectApiName,\n objectTypeRidB: toManyObjectApiName,\n peeringMetadata: undefined,\n objectTypeAPrimaryKeyPropertyMapping: [{\n from: {\n apiName: manyObject.primaryKeyPropertyApiName,\n object: manyObjectApiName\n },\n to: {\n apiName: manyObject.primaryKeyPropertyApiName,\n object: manyObjectApiName\n }\n }],\n objectTypeBPrimaryKeyPropertyMapping: [{\n from: {\n apiName: toManyObject.primaryKeyPropertyApiName,\n object: toManyObjectApiName\n },\n to: {\n apiName: toManyObject.primaryKeyPropertyApiName,\n object: toManyObjectApiName\n }\n }]\n }\n };\n datasource = {\n datasourceName: linkType.apiName,\n datasource: {\n type: \"dataset\",\n dataset: {\n datasetRid: \"link-\".concat(linkType.apiName),\n writebackDatasetRid: undefined,\n objectTypeAPrimaryKeyMapping: [{\n property: {\n apiName: manyObject.primaryKeyPropertyApiName,\n object: manyObjectApiName\n },\n column: manyObject.primaryKeyPropertyApiName\n }],\n objectTypeBPrimaryKeyMapping: [{\n property: {\n apiName: toManyObject.primaryKeyPropertyApiName,\n object: toManyObjectApiName\n },\n column: toManyObject.primaryKeyPropertyApiName\n }]\n }\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false\n },\n redacted: linkType.redacted\n };\n }\n return {\n linkType: {\n definition: definition,\n id: cleanAndValidateLinkTypeId(linkType.apiName),\n status: linkType.status ?? {\n type: \"active\",\n active: {}\n },\n redacted: linkType.redacted ?? false\n },\n datasources: datasource !== undefined ? [datasource] : [],\n entityMetadata: {\n arePatchesEnabled: linkType.editsEnabled ?? false\n }\n };\n}\nfunction validateLink(linkDefinition) {\n if (\"one\" in linkDefinition) {\n const {\n apiName: oneObjectApiName,\n object: oneObject\n } = getObject(linkDefinition.one.object);\n const {\n apiName: toManyObjectApiName,\n object: toManyObject\n } = getObject(linkDefinition.toMany.object);\n const foreignKey = toManyObject.properties?.find(p => p.apiName === linkDefinition.manyForeignKeyProperty);\n !(foreignKey !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Foreign key ${linkDefinition.manyForeignKeyProperty} on link ${linkDefinition.apiName} does not exist on object ${toManyObjectApiName}`) : invariant(false) : void 0;\n !/([a-z][a-z0-9\\\\-]*)/.test(linkDefinition.apiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Top level link api names are expected to match the regex pattern ([a-z][a-z0-9\\\\-]*) ${linkDefinition.apiName} does not match`) : invariant(false) : void 0;\n const typesMatch = foreignKey.type === oneObject.properties?.find(p => p.apiName === oneObject.primaryKeyPropertyApiName)?.type;\n !typesMatch ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Link ${linkDefinition.apiName} has type mismatch between the one side's primary key and the foreign key on the many side`) : invariant(false) : void 0;\n }\n if (\"intermediaryObjectType\" in linkDefinition) {\n const {\n apiName: intermediaryObjectTypeApiName,\n object: intermediaryObjectType\n } = getObject(linkDefinition.intermediaryObjectType);\n const {\n apiName: manyObjectApiName,\n object: manyObject\n } = getObject(linkDefinition.many.object);\n const {\n apiName: toManyObjectApiName,\n object: toManyObject\n } = getObject(linkDefinition.toMany.object);\n const {\n apiName: manyIntermediaryOneObjectApiName,\n object: manyIntermediaryOneObject\n } = getObject(linkDefinition.many.linkToIntermediary.one.object);\n const {\n apiName: manyIntermediaryToManyObjectApiName,\n object: manyIntermediaryToManyObject\n } = getObject(linkDefinition.many.linkToIntermediary.toMany.object);\n !(\"one\" in linkDefinition.many.linkToIntermediary && manyIntermediaryOneObjectApiName === manyObject.apiName && manyIntermediaryToManyObjectApiName === intermediaryObjectTypeApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `LinkTypeA ${linkDefinition.many.linkToIntermediary.apiName} must be a many to one link from intermediary object ${intermediaryObjectTypeApiName} to objectA ${manyObjectApiName}`) : invariant(false) : void 0;\n const {\n apiName: toManyIntermediaryOneObjectApiName,\n object: toManyIntermediaryOneObject\n } = getObject(linkDefinition.toMany.linkToIntermediary.one.object);\n const {\n apiName: toManyIntermediaryToManyObjectApiName,\n object: toManyIntermediaryToManyObject\n } = getObject(linkDefinition.toMany.linkToIntermediary.toMany.object);\n !(\"one\" in linkDefinition.toMany.linkToIntermediary && toManyIntermediaryOneObjectApiName === toManyObjectApiName && toManyIntermediaryToManyObjectApiName === intermediaryObjectTypeApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `LinkTypeB ${linkDefinition.toMany.linkToIntermediary.apiName} must be a many to one link from intermediary object ${intermediaryObjectTypeApiName} to objectB ${toManyObjectApiName}`) : invariant(false) : void 0;\n }\n}\nexport function getObject(object) {\n const objectApiName = typeof object === \"string\" ? object : object.apiName;\n const fullObject = ontologyDefinition[OntologyEntityTypeEnum.OBJECT_TYPE][objectApiName];\n !(fullObject !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Object ${objectApiName} is not defined`) : invariant(false) : void 0;\n return {\n apiName: objectApiName,\n object: fullObject\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getFlattenedInterfaceProperties(interfaceType) {\n let properties = interfaceType.propertiesV2;\n interfaceType.extendsInterfaces.forEach(ext => {\n properties = {\n ...properties,\n ...getFlattenedInterfaceProperties(ext)\n };\n });\n return properties;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isPropertyTypeType(v) {\n return v === \"boolean\" || v === \"byte\" || v === \"date\" || v === \"decimal\" || v === \"double\" || v === \"float\" || v === \"geopoint\" || v === \"geoshape\" || v === \"integer\" || v === \"long\" || typeof v === \"object\" && v.type === \"marking\" || v === \"short\" || v === \"string\" || v === \"timestamp\";\n}\nexport function isExotic(type) {\n if (type === undefined) {\n return false;\n }\n if (typeof type === \"string\") {\n return [\"geopoint\", \"geoshape\", \"mediaReference\", \"geotimeSeries\"].includes(type);\n } else if (typeof type === \"object\" && type != null) {\n return type.type === \"marking\" || type.type === \"struct\";\n }\n return false;\n}\nexport function isStruct(type) {\n return typeof type === \"object\" && type.type === \"struct\";\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { getObject } from \"../conversion/toMarketplace/convertLink.js\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { addNamespaceIfNone, importedTypes, namespace, ontologyDefinition, updateOntology } from \"./defineOntology.js\";\nimport { getFlattenedInterfaceProperties } from \"./interface/getFlattenedInterfaceProperties.js\";\nimport { isExotic } from \"./properties/PropertyTypeType.js\";\n// From https://stackoverflow.com/a/79288714\nconst 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))$/;\n\n// ISO 8601 date and time format (YYYY-MM-DDThh:mm:ss.sssZ)\nconst ISO_8601_DATETIME = /^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})?)?$/;\nconst API_NAME_PATTERN = /^([a-zA-Z][a-zA-Z0-9\\\\-]*)$/;\nexport function defineObject(objectDef) {\n const apiName = namespace + objectDef.apiName;\n const propertyApiNames = objectDef.properties ? Object.keys(objectDef.properties) : [];\n if (ontologyDefinition[OntologyEntityTypeEnum.OBJECT_TYPE][apiName] !== undefined) {\n throw new Error(`Object type with apiName ${objectDef.apiName} is already defined`);\n }\n !API_NAME_PATTERN.test(objectDef.apiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Invalid API name ${objectDef.apiName}. API names must match the regex ${API_NAME_PATTERN}.`) : invariant(false) : void 0;\n !propertyApiNames.includes(objectDef.titlePropertyApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Title property ${objectDef.titlePropertyApiName} is not defined on object ${objectDef.apiName}`) : invariant(false) : void 0;\n !propertyApiNames.includes(objectDef.primaryKeyPropertyApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Primary key property ${objectDef.primaryKeyPropertyApiName} does not exist on object ${objectDef.apiName}`) : invariant(false) : void 0;\n !!objectDef.properties?.[objectDef.primaryKeyPropertyApiName]?.editOnly ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Primary key property ${objectDef.primaryKeyPropertyApiName} on object ${objectDef.apiName} cannot be edit-only`) : invariant(false) : void 0;\n const retentionPeriods = (objectDef.datasources ?? []).filter(ds => ds.type === \"stream\").map(ds => ds.retentionPeriod);\n retentionPeriods.forEach(retentionPeriod => {\n !(retentionPeriod === undefined || ISO_8601_DURATION.test(retentionPeriod)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Retention period \"${retentionPeriod}\" on object \"${objectDef.apiName}\" is not a valid ISO 8601 duration string`) : invariant(false) : void 0;\n });\n const baseDatasources = (objectDef.datasources ?? []).filter(ds => [\"dataset\", \"stream\", \"restrictedView\"].includes(ds.type));\n !(baseDatasources.length <= 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Object ${objectDef.apiName} has more than one base datasource (got: [${baseDatasources.map(ds => ds.type).join(\", \")}])`) : invariant(false) : void 0;\n const derivedDatasources = (objectDef.datasources ?? []).filter(ds => ds.type === \"derived\");\n if (derivedDatasources.length > 0) {\n derivedDatasources.forEach(ds => validateDerivedDatasource(objectDef, ds));\n }\n\n // Validate that if object status is experimental, no property can have a status of active\n if (objectDef.status === \"experimental\") {\n const activeProperties = [];\n Object.entries(objectDef.properties ?? {}).forEach(([apiName, property]) => {\n if (property.status === \"active\") {\n activeProperties.push(apiName);\n }\n });\n !(activeProperties.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `When object \"${objectDef.apiName}\" has experimental status, no properties can have \"active\" status, but found active properties: ${activeProperties.join(\", \")}`) : invariant(false) : void 0;\n }\n\n // Validate deprecated status deadline is in ISO 8601 format\n if (objectDef.status && typeof objectDef.status === \"object\" && objectDef.status.type === \"deprecated\") {\n const deadline = objectDef.status.deadline;\n !(deadline !== undefined && ISO_8601_DATETIME.test(deadline)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Deprecated status deadline \"${deadline}\" on object \"${objectDef.apiName}\" is not a valid ISO 8601 datetime string`) : invariant(false) : void 0;\n }\n !!isExotic(objectDef.properties?.[objectDef.titlePropertyApiName]?.type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Title property ${objectDef.titlePropertyApiName} must be a primitive type`) : invariant(false) : void 0;\n !!isExotic(objectDef.properties?.[objectDef.primaryKeyPropertyApiName]?.type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Primary key property ${objectDef.primaryKeyPropertyApiName} can only be primitive types`) : invariant(false) : void 0;\n objectDef.implementsInterfaces?.forEach(interfaceImpl => {\n const allInterfaceProperties = getFlattenedInterfaceProperties(interfaceImpl.implements);\n const nonExistentInterfaceProperties = interfaceImpl.propertyMapping.map(val => val.interfaceProperty).filter(interfaceProperty => allInterfaceProperties[addNamespaceIfNone(interfaceProperty)] === undefined).map(interfaceProp => ({\n type: \"invalid\",\n reason: `Interface property ${interfaceProp} referenced in ${objectDef.apiName} object does not exist`\n }));\n const interfaceToObjectProperties = Object.fromEntries(interfaceImpl.propertyMapping.map(mapping => [addNamespaceIfNone(mapping.interfaceProperty), mapping.mapsTo]));\n const validateProperty = interfaceProp => {\n if (interfaceProp[1].sharedPropertyType.apiName in interfaceToObjectProperties) {\n return validateInterfaceImplProperty(interfaceProp[1].sharedPropertyType, interfaceToObjectProperties[interfaceProp[0]], objectDef);\n }\n return {\n type: \"invalid\",\n reason: `Interface property ${interfaceProp[1].sharedPropertyType.apiName} not implemented by ${objectDef.apiName} object definition`\n };\n };\n const validations = Object.entries(getFlattenedInterfaceProperties(interfaceImpl.implements)).map(validateProperty);\n const allFailedValidations = validations.concat(nonExistentInterfaceProperties).filter(val => val.type === \"invalid\");\n !(allFailedValidations.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"\\n\" + allFailedValidations.map(formatValidationErrors).join(\"\\n\")) : invariant(false) : void 0;\n });\n const flattenedProperties = Object.entries(objectDef.properties ?? {}).map(([apiName, property]) => convertUserObjectPropertyType(property.apiName ?? apiName, property));\n const finalObject = {\n ...objectDef,\n apiName: apiName,\n __type: OntologyEntityTypeEnum.OBJECT_TYPE,\n properties: flattenedProperties\n };\n updateOntology(finalObject);\n objectDef.apiName = apiName;\n return objectDef;\n}\nfunction formatValidationErrors(error) {\n return `Ontology Definition Error: ${error.reason}\\n`;\n}\n\n// Validate that the object and the interface property match up\nfunction validateInterfaceImplProperty(spt, mappedObjectProp, object) {\n const objProp = object.properties?.[mappedObjectProp];\n if (objProp === undefined) {\n return {\n type: \"invalid\",\n reason: `Object property mapped to interface does not exist. Object Property Mapped: ${mappedObjectProp}`\n };\n }\n if (JSON.stringify(spt.type) !== JSON.stringify(objProp?.type)) {\n return {\n type: \"invalid\",\n reason: `Object property type does not match the interface property it is mapped to. Interface Property: ${spt.apiName}, objectProperty: ${mappedObjectProp}`\n };\n }\n return {\n type: \"valid\"\n };\n}\nexport function uppercaseFirstLetter(s) {\n return s === undefined || s == null ? \"\" : s.charAt(0).toUpperCase() + s.slice(1);\n}\n\n// TODO: edge cases\nexport function convertToPluralDisplayName(s) {\n return s === undefined || s == null ? \"\" : s.endsWith(\"s\") ? uppercaseFirstLetter(s) : uppercaseFirstLetter(s) + \"s\";\n}\nfunction convertUserObjectPropertyType(apiName, property) {\n // fill in missing fields to be used by actions\n property.apiName = apiName;\n property.displayName = property.displayName ?? uppercaseFirstLetter(apiName);\n return {\n ...property,\n apiName: apiName,\n displayName: property.displayName ?? uppercaseFirstLetter(apiName),\n type: property.type\n };\n}\nfunction validateDerivedDatasource(objectDef, datasource) {\n // there should be at least one link\n !(datasource.linkDefinition.length > 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Derived datasource for object '${objectDef.apiName}' must have at least one link.`) : invariant(false) : void 0;\n\n // all of the links references should exist\n datasource.linkDefinition.forEach(link => {\n const linkApiName = link.linkType.apiName;\n !(ontologyDefinition[OntologyEntityTypeEnum.LINK_TYPE][linkApiName] !== undefined || importedTypes[OntologyEntityTypeEnum.LINK_TYPE][linkApiName] !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Link type '${linkApiName}' used in derived datasource for object '${objectDef.apiName}' is not defined.`) : invariant(false) : void 0;\n });\n\n // all of the properties references on the source object should exist\n Object.keys(datasource.propertyMapping).forEach(prop => {\n !(objectDef.properties?.[prop] !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Property '${prop}' used in derived datasource for object '${objectDef.apiName}' is not defined.`) : invariant(false) : void 0;\n });\n const isLinkedProperties = typeof Object.values(datasource.propertyMapping)[0] === \"string\";\n if (isLinkedProperties) {\n validateLinkedProperties(datasource, objectDef);\n } else {\n validateAggregations(datasource, objectDef);\n }\n}\nfunction validateLinkedProperties(datasource, objectDef) {\n const foreignProperties = Object.values(datasource.propertyMapping);\n // the foreign property must exist in the final object in the link chain\n const finalObject = getObject(datasource.linkDefinition.at(-1).linkType.toMany.object).object;\n foreignProperties.forEach(prop => {\n !(finalObject.properties?.find(p => p.apiName === prop) !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Property '${prop}' on object '${finalObject.apiName}' is not defined`) : invariant(false) : void 0;\n });\n}\nfunction validateAggregations(datasource, objectDef) {\n const props = datasource.propertyMapping;\n Object.entries(props).forEach(([propName, agg]) => {\n // TODO(dpaquin): check that the property type matches the foreign property type,\n // for collectList/collectSet and maybe min/max too?\n const property = objectDef.properties[propName];\n switch (agg.type) {\n case \"collectList\":\n case \"collectSet\":\n // property's type is collectible\n !isCollectible(property) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Property '${propName}' on object '${objectDef.apiName}' is not collectible`) : invariant(false) : void 0;\n // limit <= 100\n !(agg.limit <= 100) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `[Error] Limit for collection '${propName}' on object '${objectDef.apiName}' is greater than 100`) : invariant(false) : void 0;\n break;\n case \"avg\":\n case \"sum\":\n // property's type is numeric\n !isNumeric(property.type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Property '${propName}' on object '${objectDef.apiName}' is not numeric`) : invariant(false) : void 0;\n break;\n case \"min\":\n case \"max\":\n case \"approximateCardinality\":\n case \"exactCardinality\":\n // property's type is primitive\n !isPrimitive(property.type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Property '${propName}' on object '${objectDef.apiName}' is not primitive`) : invariant(false) : void 0;\n break;\n default:\n break;\n }\n\n // if a foreign property is referenced, it must exist in the final object\n if (agg.type !== \"count\") {\n const foreignProperty = agg.property;\n const finalObject = getObject(datasource.linkDefinition.at(-1).linkType.toMany.object).object;\n !(finalObject.properties?.find(p => p.apiName === foreignProperty) !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Property '${foreignProperty}' on object '${finalObject.apiName}' is not defined`) : invariant(false) : void 0;\n }\n });\n}\nfunction isCollectible(property) {\n if (!(property.array ?? false)) {\n return false;\n }\n const typeType = typeof property.type === \"string\" ? property.type : property.type.type;\n return [\"boolean\", \"byte\", \"date\", \"double\", \"float\", \"geohash\", \"geoshape\", \"integer\", \"long\", \"mediareference\", \"short\", \"string\", \"struct\", \"timestamp\"].includes(typeType);\n}\nfunction isNumeric(type) {\n const typeType = typeof type === \"string\" ? type : type.type;\n return [\"byte\", \"double\", \"float\", \"integer\", \"long\", \"short\"].includes(typeType);\n}\nfunction isPrimitive(type) {\n const typeType = typeof type === \"string\" ? type : type.type;\n return [\"boolean\", \"byte\", \"date\", \"double\", \"float\", \"integer\", \"long\", \"short\", \"string\", \"timestamp\"].includes(typeType);\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { uppercaseFirstLetter } from \"../../api/defineObject.js\";\nexport function convertActionSections(action) {\n return Object.fromEntries(Object.entries(action.sections ?? {}).map(([sectionId, section]) => [sectionId, {\n id: sectionId,\n content: section.parameters.map(p => ({\n type: \"parameterId\",\n parameterId: p\n })),\n displayMetadata: {\n collapsedByDefault: section.collapsedByDefault ?? false,\n columnCount: section.columnCount ?? 1,\n description: section.description ?? \"\",\n displayName: section.displayName ?? uppercaseFirstLetter(sectionId),\n showTitleBar: section.showTitleBar ?? true,\n ...(section.style && {\n style: section.style === \"box\" ? {\n type: \"box\",\n box: {}\n } : {\n type: \"minimal\",\n minimal: {}\n }\n })\n }\n }]));\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nexport function convertConditionDefinition(condition, actionParameters) {\n switch (condition.type) {\n case \"and\":\n if (\"conditions\" in condition) {\n return {\n type: \"and\",\n and: {\n conditions: condition.conditions.map(c => convertConditionDefinition(c, actionParameters))\n }\n };\n } else {\n return condition;\n }\n case \"or\":\n if (\"conditions\" in condition) {\n return {\n type: \"or\",\n or: {\n conditions: condition.conditions.map(c => convertConditionDefinition(c, actionParameters))\n }\n };\n } else {\n return condition;\n }\n case \"group\":\n return {\n type: \"comparison\",\n comparison: {\n operator: \"INTERSECTS\",\n left: {\n type: \"userProperty\",\n userProperty: {\n userId: {\n type: \"currentUser\",\n currentUser: {}\n },\n propertyValue: {\n type: \"groupIds\",\n groupIds: {}\n }\n }\n },\n right: {\n type: \"staticValue\",\n staticValue: {\n type: \"stringList\",\n stringList: {\n strings: [condition.name]\n }\n }\n }\n }\n };\n case \"parameter\":\n !actionParameters?.some(param => param.id === condition.parameterId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Action parameter condition references unknown parameter ${condition.parameterId}`) : invariant(false) : void 0;\n return {\n type: \"comparison\",\n comparison: {\n operator: \"EQUALS\",\n left: {\n type: \"parameterId\",\n parameterId: condition.parameterId\n },\n right: condition.matches\n }\n };\n default:\n return condition;\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { extractAllowedValues } from \"../../api/defineOntology.js\";\nimport { convertConditionDefinition } from \"./convertConditionDefinition.js\";\nexport function convertActionParameterConditionalOverride(override, validation, actionParameters) {\n let parameterBlockOverride;\n switch (override.type) {\n case \"required\":\n parameterBlockOverride = {\n type: \"parameterRequired\",\n parameterRequired: {\n required: validation.required ? {\n type: \"notRequired\",\n notRequired: {}\n } : {\n type: \"required\",\n required: {}\n }\n }\n };\n break;\n case \"visibility\":\n parameterBlockOverride = {\n type: \"visibility\",\n visibility: {\n visibility: validation.defaultVisibility === \"editable\" ? {\n type: \"hidden\",\n hidden: {}\n } : {\n type: \"editable\",\n editable: {}\n }\n }\n };\n break;\n case \"disabled\":\n parameterBlockOverride = {\n type: \"visibility\",\n visibility: {\n visibility: validation.defaultVisibility === \"editable\" ? {\n type: \"disabled\",\n disabled: {}\n } : {\n type: \"editable\",\n editable: {}\n }\n }\n };\n break;\n case \"defaultValue\":\n parameterBlockOverride = {\n type: \"prefill\",\n prefill: {\n prefill: override.defaultValue\n }\n };\n break;\n case \"constraint\":\n parameterBlockOverride = {\n type: \"allowedValues\",\n allowedValues: {\n allowedValues: extractAllowedValues(override.constraint)\n }\n };\n break;\n default:\n throw new Error(`Unknown parameter override type`);\n }\n return {\n condition: convertConditionDefinition(override.condition, actionParameters),\n parameterBlockOverrides: [parameterBlockOverride]\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertActionVisibility(visibility) {\n switch (visibility) {\n case \"editable\":\n return {\n type: \"editable\",\n editable: {}\n };\n case \"disabled\":\n return {\n type: \"disabled\",\n disabled: {}\n };\n case \"hidden\":\n return {\n type: \"hidden\",\n hidden: {}\n };\n default:\n return {\n type: \"editable\",\n editable: {}\n };\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertConditionDefinition } from \"./convertConditionDefinition.js\";\nexport function convertSectionConditionalOverride(override, defaultVisibility, actionParameters) {\n return {\n condition: convertConditionDefinition(override.condition, actionParameters),\n sectionBlockOverrides: [{\n type: \"visibility\",\n visibility: {\n visibility: defaultVisibility === \"visible\" ? {\n type: \"hidden\",\n hidden: {}\n } : {\n type: \"visible\",\n visible: {}\n }\n }\n }]\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { extractAllowedValues, renderHintFromBaseType } from \"../../api/defineOntology.js\";\nimport { convertActionParameterConditionalOverride } from \"./convertActionParameterConditionalOverride.js\";\nimport { convertActionVisibility } from \"./convertActionVisibility.js\";\nimport { convertSectionConditionalOverride } from \"./convertSectionConditionalOverride.js\";\nexport function convertActionValidation(action) {\n return {\n actionTypeLevelValidation: {\n rules: Object.fromEntries((action.validation ?? [{\n condition: {\n type: \"true\",\n true: {}\n },\n displayMetadata: {\n failureMessage: \"\",\n typeClasses: []\n }\n }]).map((rule, idx) => [idx, rule]))\n },\n parameterValidations: Object.fromEntries((action.parameters ?? []).map(p => {\n return [p.id, {\n defaultValidation: {\n display: {\n renderHint: renderHintFromBaseType(p),\n visibility: convertActionVisibility(p.validation.defaultVisibility),\n ...(p.defaultValue && {\n prefill: p.defaultValue\n })\n },\n validation: {\n allowedValues: extractAllowedValues(p.validation.allowedValues),\n required: convertParameterRequirementConstraint(p.validation.required)\n }\n },\n conditionalOverrides: p.validation.conditionalOverrides?.map(override => convertActionParameterConditionalOverride(override, p.validation, action.parameters)) ?? []\n }];\n })),\n sectionValidations: {\n ...Object.fromEntries(Object.entries(action.sections ?? {}).map(([sectionId, section]) => [section.id, {\n defaultDisplayMetadata: section.defaultVisibility === \"hidden\" ? {\n visibility: {\n type: \"hidden\",\n hidden: {}\n }\n } : {\n visibility: {\n type: \"visible\",\n visible: {}\n }\n },\n conditionalOverrides: section.conditionalOverrides?.map(override => convertSectionConditionalOverride(override, section.defaultVisibility ?? \"visible\", action.parameters)) ?? []\n }]))\n }\n };\n}\nfunction convertParameterRequirementConstraint(required) {\n if (typeof required === \"boolean\") {\n return required ? {\n type: \"required\",\n required: {}\n } : {\n type: \"notRequired\",\n notRequired: {}\n };\n }\n const {\n min,\n max\n } = required.listLength;\n return {\n type: \"listLengthValidation\",\n listLengthValidation: {\n minLength: min,\n maxLength: max\n }\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nexport function convertNullabilityToDataConstraint(prop) {\n if (typeof prop.type === \"object\" && prop.type.type === \"marking\") {\n if (prop.nullability === undefined) {\n return {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: {\n noEmptyCollections: true,\n noNulls: true\n }\n };\n }\n !prop.nullability?.noNulls ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Marking property type has noNulls set to false, marking properties must not be nullable\") : invariant(false) : void 0;\n return {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: prop.nullability\n };\n }\n return prop.nullability === undefined ? undefined : {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: prop.nullability\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function distributeTypeHelper(type) {\n return {\n type,\n [type]: {}\n }; // any cast to match conditional return type\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { distributeTypeHelper } from \"../toConjure/distributeTypeHelper.js\";\nexport function propertyTypeTypeToOntologyIrType(type) {\n switch (true) {\n case typeof type === \"object\" && \"markingType\" in type:\n return {\n \"type\": \"marking\",\n marking: {\n markingType: type.markingType\n }\n };\n case typeof type === \"object\" && \"structDefinition\" in type:\n const structFields = new Array();\n for (const key in type.structDefinition) {\n const fieldTypeDefinition = type.structDefinition[key];\n let field;\n if (typeof fieldTypeDefinition === \"string\") {\n field = {\n apiName: key,\n displayMetadata: {\n displayName: key,\n description: undefined\n },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition)\n };\n } else {\n // If it is a full form type definition then process it as such\n if (\"fieldType\" in fieldTypeDefinition) {\n field = {\n ...fieldTypeDefinition,\n apiName: key,\n fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition.fieldType),\n typeClasses: fieldTypeDefinition.typeClasses ?? [],\n aliases: fieldTypeDefinition.aliases ?? []\n };\n } else {\n field = {\n apiName: key,\n displayMetadata: {\n displayName: key,\n description: undefined\n },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition)\n };\n }\n }\n structFields.push(field);\n }\n return {\n type: \"struct\",\n struct: {\n structFields\n }\n };\n case typeof type === \"object\" && \"isLongText\" in type:\n return {\n \"type\": \"string\",\n \"string\": {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: type.isLongText,\n supportsEfficientLeadingWildcard: type.supportsEfficientLeadingWildcard,\n supportsExactMatching: type.supportsExactMatching\n }\n };\n case type === \"geopoint\":\n return {\n type: \"geohash\",\n geohash: {}\n };\n case type === \"decimal\":\n return {\n type,\n [type]: {\n precision: undefined,\n scale: undefined\n }\n };\n case type === \"string\":\n return {\n type,\n [type]: {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: false,\n supportsEfficientLeadingWildcard: false,\n supportsExactMatching: true\n }\n };\n case type === \"mediaReference\":\n return {\n type: type,\n mediaReference: {}\n };\n case type === \"geotimeSeries\":\n return {\n type: \"geotimeSeriesReference\",\n geotimeSeriesReference: {}\n };\n default:\n // use helper function to distribute `type` properly\n return distributeTypeHelper(type);\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertNullabilityToDataConstraint } from \"./convertNullabilityToDataConstraint.js\";\nimport { propertyTypeTypeToOntologyIrType } from \"./propertyTypeTypeToOntologyIrType.js\";\nexport function convertSpt({\n type,\n array,\n description,\n apiName,\n displayName,\n visibility,\n gothamMapping,\n typeClasses,\n valueType,\n nullability\n}) {\n const dataConstraint = convertNullabilityToDataConstraint({\n type,\n nullability\n });\n return {\n apiName,\n displayMetadata: {\n displayName: displayName ?? apiName,\n visibility: visibility ?? \"NORMAL\",\n description\n },\n type: array ? {\n type: \"array\",\n array: {\n subtype: propertyTypeTypeToOntologyIrType(type)\n }\n } : propertyTypeTypeToOntologyIrType(type),\n aliases: [],\n baseFormatter: undefined,\n dataConstraints: dataConstraint,\n gothamMapping: gothamMapping,\n indexedForSearch: true,\n typeClasses: typeClasses ?? [],\n valueType: valueType === undefined ? undefined : {\n apiName: valueType.apiName,\n version: valueType.version,\n packageNamespace: valueType.packageNamespace,\n displayMetadata: valueType.displayMetadata\n }\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertSpt } from \"./convertSpt.js\";\nexport function convertInterface(interfaceType) {\n const {\n __type,\n ...other\n } = interfaceType;\n return {\n ...other,\n propertiesV2: Object.fromEntries(Object.values(interfaceType.propertiesV2).map(spt => [spt.sharedPropertyType.apiName, {\n required: spt.required,\n sharedPropertyType: convertSpt(spt.sharedPropertyType)\n }])),\n displayMetadata: {\n displayName: interfaceType.displayMetadata.displayName,\n description: interfaceType.displayMetadata.description,\n icon: interfaceType.displayMetadata.icon ?? {\n type: \"blueprint\",\n blueprint: {\n color: \"#4C90F0\",\n locator: \"layout-hierarchy\"\n }\n }\n },\n extendsInterfaces: interfaceType.extendsInterfaces.map(i => i.apiName),\n // these are omitted from our internal types but we need to re-add them for the final json\n properties: [],\n // TODO(mwalther): Support propertiesV3\n propertiesV3: {}\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertDatasourceDefinition(objectType, properties) {\n const baseDatasource = objectType.datasources?.find(ds => [\"dataset\", \"stream\", \"restrictedView\"].includes(ds.type));\n switch (baseDatasource?.type) {\n case \"stream\":\n const window = baseDatasource.retentionPeriod;\n const retentionPolicy = window ? {\n type: \"time\",\n time: {\n window\n }\n } : {\n type: \"none\",\n none: {}\n };\n const propertyMapping = Object.fromEntries(properties.map(prop => [prop.apiName, prop.apiName]));\n return {\n type: \"streamV2\",\n streamV2: {\n streamLocator: objectType.apiName,\n propertyMapping,\n retentionPolicy,\n propertySecurityGroups: undefined\n }\n };\n case \"restrictedView\":\n return {\n type: \"restrictedViewV2\",\n restrictedViewV2: {\n restrictedViewRid: objectType.apiName,\n propertyMapping: buildPropertyMapping(properties)\n }\n };\n case \"dataset\":\n default:\n return {\n type: \"datasetV2\",\n datasetV2: {\n datasetRid: objectType.apiName,\n propertyMapping: buildPropertyMapping(properties)\n }\n };\n }\n}\nfunction buildPropertyMapping(properties) {\n return Object.fromEntries(properties.map(prop => {\n // editOnly\n if (prop.editOnly) {\n return [prop.apiName, {\n type: \"editOnly\",\n editOnly: {}\n }];\n }\n // structs\n if (typeof prop.type === \"object\" && prop.type?.type === \"struct\") {\n const structMapping = {\n type: \"struct\",\n struct: {\n column: prop.apiName,\n mapping: Object.fromEntries(Object.keys(prop.type.structDefinition).map(fieldName => [fieldName, {\n apiName: fieldName,\n mappings: {}\n }]))\n }\n };\n return [prop.apiName, structMapping];\n }\n // default: column mapping\n return [prop.apiName, {\n type: \"column\",\n column: prop.apiName\n }];\n }));\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const defaultTypeClasses = [{\n kind: \"render_hint\",\n name: \"SELECTABLE\"\n}, {\n kind: \"render_hint\",\n name: \"SORTABLE\"\n}];\n\n// ExperimentalTimeDependentV1 and Attachment types should be included here once supported\nexport function shouldNotHaveRenderHints(type) {\n return [\"struct\", \"mediaReference\", \"geotimeSeries\"].includes(getPropertyTypeName(type));\n}\nexport function hasRenderHints(typeClasses) {\n return (typeClasses ?? []).some(tc => tc.kind.toLowerCase() === \"render_hint\");\n}\nexport function getPropertyTypeName(type) {\n return typeof type === \"object\" ? type.type : type;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertValueType(valueType) {\n return {\n apiName: valueType.apiName,\n version: valueType.version,\n packageNamespace: valueType.packageNamespace,\n displayMetadata: valueType.displayMetadata\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { dataConstraintToPropertyTypeDataConstraint } from \"./dataConstraintToPropertyTypeDataConstraint.js\";\nexport function convertDataConstraintToDataConstraints(dc) {\n return {\n propertyTypeConstraints: [{\n constraints: dataConstraintToPropertyTypeDataConstraint(dc)\n // known limitation: structs don't carry field-level data constraint failure messages\n }]\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertDataConstraintToDataConstraints } from \"./convertDataConstraintToDataConstraints.js\";\nexport function dataConstraintToPropertyTypeDataConstraint(dc) {\n switch (dc.type) {\n case \"array\":\n return {\n ...dc\n };\n case \"boolean\":\n return {\n ...dc\n };\n case \"binary\":\n throw new Error(\"Binary type constraints are not supported\");\n case \"date\":\n return {\n ...dc\n };\n case \"decimal\":\n return {\n ...dc\n };\n case \"double\":\n return {\n ...dc\n };\n case \"float\":\n return {\n ...dc\n };\n case \"integer\":\n return {\n ...dc\n };\n case \"long\":\n return {\n ...dc\n };\n case \"map\":\n throw new Error(\"Map type constraints are not supported\");\n case \"nullable\":\n throw new Error(\"Nullable constraints are not supported\");\n case \"short\":\n return {\n ...dc\n };\n case \"string\":\n return {\n ...dc\n };\n case \"struct\":\n return {\n type: \"struct\",\n struct: {\n elementConstraints: Object.fromEntries(Object.entries(dc.struct.elementConstraints).map(([field, constraint]) => [field, convertDataConstraintToDataConstraints(constraint)]))\n }\n };\n case \"structV2\":\n throw new Error(\"StructV2 constraints are not supported\");\n case \"timestamp\":\n return {\n ...dc\n };\n default:\n throw new Error(`Unknown DataConstraint type: ${dc.type}`);\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { dataConstraintToPropertyTypeDataConstraint } from \"./dataConstraintToPropertyTypeDataConstraint.js\";\nexport function convertValueTypeDataConstraints(dataConstraints) {\n if (dataConstraints.length === 0) {\n return undefined;\n }\n const propertyTypeConstraints = dataConstraints.map(constraint => ({\n constraints: dataConstraintToPropertyTypeDataConstraint(constraint.constraint.constraint),\n failureMessage: constraint.constraint.failureMessage\n }));\n return {\n propertyTypeConstraints\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { convertObjectStatus, namespace } from \"../../api/defineOntology.js\";\nimport { defaultTypeClasses, getPropertyTypeName, hasRenderHints, shouldNotHaveRenderHints } from \"../../api/propertyConversionUtils.js\";\nimport { convertNullabilityToDataConstraint } from \"./convertNullabilityToDataConstraint.js\";\nimport { convertValueType } from \"./convertValueType.js\";\nimport { convertValueTypeDataConstraints } from \"./convertValueTypeDataConstraints.js\";\nimport { propertyTypeTypeToOntologyIrType } from \"./propertyTypeTypeToOntologyIrType.js\";\nexport function convertObjectPropertyType(property) {\n const apiName = namespace + property.apiName;\n !(!shouldNotHaveRenderHints(property.type) || !hasRenderHints(property.typeClasses)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Property type ${apiName} of type '${getPropertyTypeName(property.type)}' should not have render hints`) : invariant(false) : void 0;\n const output = {\n apiName: property.apiName,\n sharedPropertyTypeApiName: property.sharedPropertyType?.apiName,\n displayMetadata: {\n displayName: property.displayName,\n description: property.description,\n visibility: property.visibility ?? \"NORMAL\"\n },\n indexedForSearch: property.indexedForSearch ?? true,\n ruleSetBinding: undefined,\n baseFormatter: property.baseFormatter,\n type: property.array ? {\n type: \"array\",\n array: {\n subtype: propertyTypeTypeToOntologyIrType(property.type)\n }\n } : propertyTypeTypeToOntologyIrType(property.type),\n typeClasses: property.typeClasses ?? (shouldNotHaveRenderHints(property.type) ? [] : defaultTypeClasses),\n status: convertObjectStatus(property.status),\n inlineAction: undefined,\n dataConstraints: property.valueType ? convertValueTypeDataConstraints(property.valueType.constraints) : convertNullabilityToDataConstraint(property),\n sharedPropertyTypeRid: property.sharedPropertyType?.apiName,\n valueType: property.valueType ? convertValueType(property.valueType) : undefined\n };\n return output;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { addNamespaceIfNone, buildDatasource, cleanAndValidateLinkTypeId, convertObjectStatus } from \"../../api/defineOntology.js\";\nimport { isExotic } from \"../../api/properties/PropertyTypeType.js\";\nimport { convertDatasourceDefinition } from \"./convertDatasourceDefinition.js\";\nimport { convertObjectPropertyType } from \"./convertObjectPropertyType.js\";\nexport function convertObject(objectType) {\n const {\n derivedDatasources,\n derivedPropertyNames\n } = extractDerivedDatasources(objectType);\n const propertyDatasources = (objectType.properties ?? []).filter(prop => !derivedPropertyNames.includes(prop.apiName)).flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));\n const classificationGroupMarkingNames = extractMarkingGroups(objectType.properties ?? [], \"CBAC\");\n const mandatoryMarkingNames = extractMarkingGroups(objectType.properties ?? [], \"MANDATORY\");\n const classificationInputGroup = classificationGroupMarkingNames.length > 0 ? classificationGroupMarkingNames.reduce((l, r) => l + \"/\" + r) : undefined;\n const mandatoryInputGroup = mandatoryMarkingNames.length > 0 ? mandatoryMarkingNames.reduce((l, r) => l + \"/\" + r) : undefined;\n const objectDatasource = buildDatasource(objectType.apiName, convertDatasourceDefinition(objectType, (objectType.properties ?? []).filter(prop => !derivedPropertyNames.includes(prop.apiName))), classificationInputGroup, mandatoryInputGroup);\n const implementations = objectType.implementsInterfaces ?? [];\n return {\n objectType: {\n displayMetadata: {\n description: objectType.description,\n displayName: objectType.displayName,\n groupDisplayName: undefined,\n icon: {\n type: \"blueprint\",\n blueprint: objectType.icon ?? {\n locator: \"cube\",\n color: \"#2D72D2\"\n }\n },\n pluralDisplayName: objectType.pluralDisplayName,\n visibility: objectType.visibility ?? \"NORMAL\"\n },\n primaryKeys: [objectType.primaryKeyPropertyApiName],\n propertyTypes: Object.fromEntries(objectType.properties?.map(val => [val.apiName, convertObjectPropertyType(val)]) ?? []),\n titlePropertyTypeRid: objectType.titlePropertyApiName,\n apiName: objectType.apiName,\n status: convertObjectStatus(objectType.status),\n redacted: false,\n implementsInterfaces2: implementations.map(impl => ({\n interfaceTypeApiName: impl.implements.apiName,\n linksV2: {},\n propertiesV2: {},\n properties: Object.fromEntries(impl.propertyMapping.map(mapping => [addNamespaceIfNone(mapping.interfaceProperty), {\n propertyTypeRid: mapping.mapsTo\n }]))\n })),\n allImplementsInterfaces: {}\n },\n datasources: [...propertyDatasources, ...derivedDatasources, objectDatasource],\n entityMetadata: {\n arePatchesEnabled: objectType.editsEnabled ?? false\n }\n };\n}\n\n/**\n * Extracts marking group names of a specific type from object properties\n */\nexport function extractMarkingGroups(properties, markingType) {\n return properties.map(prop => {\n if (typeof prop.type === \"object\" && prop.type.type === \"marking\" && prop.type.markingType === markingType) {\n return prop.type.markingInputGroupName;\n }\n return undefined;\n }).filter(val => val !== undefined);\n}\nexport function extractPropertyDatasource(property, objectTypeApiName) {\n if (!isExotic(property.type)) {\n return [];\n }\n const identifier = objectTypeApiName + \".\" + property.apiName;\n switch (property.type) {\n case \"geotimeSeries\":\n const geotimeDefinition = {\n type: \"geotimeSeries\",\n geotimeSeries: {\n geotimeSeriesIntegrationRid: identifier,\n properties: [property.apiName]\n }\n };\n return [buildDatasource(property.apiName, geotimeDefinition)];\n case \"mediaReference\":\n const mediaSetDefinition = {\n type: \"mediaSetView\",\n mediaSetView: {\n assumedMarkings: [],\n mediaSetViewLocator: identifier,\n properties: [property.apiName]\n }\n };\n return [buildDatasource(property.apiName, mediaSetDefinition)];\n default:\n return [];\n }\n}\nfunction extractDerivedDatasources(objectType) {\n const inputDerivedDatasources = (objectType.datasources ?? []).filter(ds => ds.type === \"derived\");\n const derivedDatasources = inputDerivedDatasources.map((ds, i) => buildDerivedDatasource(ds, i, objectType.apiName));\n const derivedPropertyNames = inputDerivedDatasources.flatMap(ds => Object.keys(ds.propertyMapping));\n return {\n derivedDatasources,\n derivedPropertyNames\n };\n}\nfunction buildDerivedDatasource(datasource, index, objectTypeApiName) {\n const linkDefinition = {\n type: \"multiHopLink\",\n multiHopLink: {\n steps: datasource.linkDefinition.map(step => ({\n type: \"searchAround\",\n searchAround: {\n linkTypeIdentifier: {\n type: \"linkType\",\n linkType: cleanAndValidateLinkTypeId(step.linkType.apiName)\n },\n linkTypeSide: step.side ?? \"SOURCE\"\n }\n }))\n }\n };\n const isLinkedProperties = typeof Object.values(datasource.propertyMapping)[0] === \"string\";\n const derivedDefinition = isLinkedProperties ? {\n type: \"linkedProperties\",\n linkedProperties: {\n linkDefinition,\n propertyTypeMapping: Object.fromEntries(Object.entries(datasource.propertyMapping).map(([sourceProp, targetProp]) => [sourceProp, {\n type: \"propertyType\",\n propertyType: targetProp\n }]))\n }\n } : {\n type: \"aggregatedProperties\",\n aggregatedProperties: {\n linkDefinition,\n propertyTypeMapping: Object.fromEntries(Object.entries(datasource.propertyMapping).map(([sourceProp, agg]) => [sourceProp, buildAggregation(agg)]))\n }\n };\n const fullDefinition = {\n type: \"derived\",\n derived: {\n definition: derivedDefinition\n }\n };\n return buildDatasource(objectTypeApiName + \".derived.\" + index.toString(), fullDefinition);\n}\nfunction buildAggregation(agg) {\n const type = agg.type;\n const limit = \"limit\" in agg ? agg.limit : undefined;\n const foreignProperty = \"property\" in agg ? agg.property : undefined;\n const innerDef = {};\n if (type !== \"count\") {\n if ([\"collectList\", \"collectSet\"].includes(type)) {\n innerDef[\"linkedProperty\"] = {\n type: \"propertyType\",\n propertyType: foreignProperty\n };\n innerDef[\"limit\"] = limit;\n } else {\n innerDef[\"property\"] = {\n type: \"propertyType\",\n propertyType: foreignProperty\n };\n }\n }\n return {\n type,\n [type]: innerDef\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport { cleanAndValidateLinkTypeId, convertAction } from \"../../api/defineOntology.js\";\nimport { convertInterface } from \"./convertInterface.js\";\nimport { convertLink } from \"./convertLink.js\";\nimport { convertObject } from \"./convertObject.js\";\nimport { convertSpt } from \"./convertSpt.js\";\nexport function convertOntologyDefinitionToWireBlockData(ontology) {\n return {\n objectTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.OBJECT_TYPE]).map(([apiName, objectType]) => {\n return [apiName, convertObject(objectType)];\n })),\n sharedPropertyTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]).map(([apiName, spt]) => [apiName, {\n sharedPropertyType: convertSpt(spt)\n }])),\n interfaceTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.INTERFACE_TYPE]).map(([apiName, interfaceType]) => {\n return [apiName, {\n interfaceType: convertInterface(interfaceType)\n }];\n })),\n linkTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.LINK_TYPE]).map(([id, link]) => {\n return [cleanAndValidateLinkTypeId(id), convertLink(link)];\n })),\n actionTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).map(([apiName, action]) => {\n return [apiName, convertAction(action)];\n })),\n blockPermissionInformation: {\n actionTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).filter(([apiName, action]) => action.validation).map(([apiName, action]) => {\n return [apiName, {\n restrictionStatus: {\n hasRolesApplied: true,\n ontologyPackageRid: null,\n publicProject: false\n }\n }];\n })),\n linkTypes: {},\n objectTypes: {}\n }\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function convertValueTypesToIr(valueTypes) {\n return Object.values(valueTypes).map(definitions => ({\n metadata: {\n apiName: definitions[0].apiName,\n packageNamespace: definitions[0].packageNamespace,\n displayMetadata: definitions[0].displayMetadata,\n status: definitions[0].status\n },\n // TODO(dpaquin): instead of deduping here, we should refactor the value type types from arrays to maps\n versions: Array.from(new Map(definitions.map(definition => [definition.version, definition])).values()).map(definition => ({\n version: definition.version,\n baseType: definition.baseType,\n constraints: definition.constraints,\n exampleValues: definition.exampleValues\n }))\n }));\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport { convertValueTypesToIr } from \"./convertValueTypesToIr.js\";\nexport function convertOntologyToValueTypeIr(ontology) {\n return {\n valueTypes: convertValueTypesToIr(ontology[OntologyEntityTypeEnum.VALUE_TYPE])\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { importedTypes } from \"../../api/defineOntology.js\";\nimport { convertOntologyDefinitionToWireBlockData } from \"./convertOntologyDefinitionToWireBlockData.js\";\nimport { convertOntologyToValueTypeIr } from \"./convertOntologyToValueTypeIr.js\";\nexport function convertOntologyDefinition(ontology, randomnessKey) {\n return {\n ontology: convertOntologyDefinitionToWireBlockData(ontology),\n importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),\n valueTypes: convertOntologyToValueTypeIr(ontology),\n importedValueTypes: convertOntologyToValueTypeIr(importedTypes),\n randomnessKey\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getFormContentOrdering(action, parameterOrdering) {\n if (!action.sections) return [];\n const parametersToSection = Object.fromEntries(Object.entries(action.sections).flatMap(([sectionId, section]) => section.parameters.map(param => [param, sectionId])));\n const seenIds = new Set();\n const formContentOrdering = [];\n parameterOrdering.forEach(param => {\n if (param in parametersToSection && !seenIds.has(parametersToSection[param])) {\n formContentOrdering.push({\n type: \"sectionId\",\n sectionId: parametersToSection[param]\n });\n seenIds.add(parametersToSection[param]);\n } else if (!(param in parametersToSection)) {\n formContentOrdering.push({\n type: \"parameterId\",\n parameterId: param\n });\n seenIds.add(param);\n }\n });\n return formContentOrdering;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport { convertActionParameters } from \"../conversion/toMarketplace/convertActionParameters.js\";\nimport { convertActionSections } from \"../conversion/toMarketplace/convertActionSections.js\";\nimport { convertActionValidation } from \"../conversion/toMarketplace/convertActionValidation.js\";\nimport { convertOntologyDefinition } from \"../conversion/toMarketplace/convertOntologyDefinition.js\";\nimport { convertOntologyToValueTypeIr } from \"../conversion/toMarketplace/convertOntologyToValueTypeIr.js\";\nimport { getFormContentOrdering } from \"../conversion/toMarketplace/getFormContentOrdering.js\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\n// type -> apiName -> entity\n/** @internal */\nexport let ontologyDefinition;\n\n// type -> apiName -> entity\n/** @internal */\nexport let importedTypes;\n\n// namespace -> version\n/** @internal */\nexport let dependencies;\n\n/** @internal */\nexport let namespace;\nexport function updateOntology(entity) {\n if (entity.__type !== OntologyEntityTypeEnum.VALUE_TYPE) {\n ontologyDefinition[entity.__type][entity.apiName] = entity;\n return;\n }\n // value types are a special case\n if (ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName] === undefined) {\n ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName] = [];\n }\n ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName].push(entity);\n}\nexport async function defineOntology(ns, body, outputDir, dependencyFile, randomnessKey) {\n namespace = ns;\n dependencies = {};\n ontologyDefinition = {\n OBJECT_TYPE: {},\n ACTION_TYPE: {},\n LINK_TYPE: {},\n INTERFACE_TYPE: {},\n SHARED_PROPERTY_TYPE: {},\n VALUE_TYPE: {}\n };\n importedTypes = {\n SHARED_PROPERTY_TYPE: {},\n OBJECT_TYPE: {},\n ACTION_TYPE: {},\n LINK_TYPE: {},\n INTERFACE_TYPE: {},\n VALUE_TYPE: {}\n };\n try {\n await body();\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Unexpected error while processing the body of the ontology\", e);\n throw e;\n }\n if (outputDir) {\n writeStaticObjects(outputDir);\n }\n if (dependencyFile) {\n writeDependencyFile(dependencyFile);\n }\n return convertOntologyDefinition(ontologyDefinition, randomnessKey);\n}\nexport function writeStaticObjects(outputDir) {\n const codegenDir = path.resolve(outputDir, \"codegen\");\n const typeDirs = {\n [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: \"shared-property-types\",\n [OntologyEntityTypeEnum.ACTION_TYPE]: \"action-types\",\n [OntologyEntityTypeEnum.OBJECT_TYPE]: \"object-types\",\n [OntologyEntityTypeEnum.LINK_TYPE]: \"link-types\",\n [OntologyEntityTypeEnum.INTERFACE_TYPE]: \"interface-types\",\n [OntologyEntityTypeEnum.VALUE_TYPE]: \"value-types\"\n };\n if (!fs.existsSync(codegenDir)) {\n fs.mkdirSync(codegenDir, {\n recursive: true\n });\n }\n Object.values(typeDirs).forEach(typeDirNameFromMap => {\n const currentTypeDirPath = path.join(codegenDir, typeDirNameFromMap);\n if (fs.existsSync(currentTypeDirPath)) {\n fs.rmSync(currentTypeDirPath, {\n recursive: true,\n force: true\n });\n }\n fs.mkdirSync(currentTypeDirPath, {\n recursive: true\n });\n });\n const topLevelExportStatements = [];\n Object.entries(ontologyDefinition).forEach(([ontologyTypeEnumKey, entities]) => {\n const typeDirName = typeDirs[ontologyTypeEnumKey];\n const typeDirPath = path.join(codegenDir, typeDirName);\n const entityModuleNames = [];\n Object.entries(entities).forEach(([apiName, entity]) => {\n const entityFileNameBase = camel(withoutNamespace(apiName)) + (ontologyTypeEnumKey === OntologyEntityTypeEnum.VALUE_TYPE ? \"ValueType\" : \"\");\n const filePath = path.join(typeDirPath, `${entityFileNameBase}.ts`);\n const entityTypeName = getEntityTypeName(ontologyTypeEnumKey);\n const entityJSON = JSON.stringify(entity, null, 2).replace(/(\"__type\"\\s*:\\s*)\"([^\"]*)\"/g, (_, prefix, value) => `${prefix}OntologyEntityTypeEnum.${value}`);\n const content = `\nimport { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';\nimport type { ${entityTypeName} } from '@osdk/maker';\n\n/** @type {import('@osdk/maker').${entityTypeName}} */\nconst ${entityFileNameBase}_base: ${entityTypeName} = ${ontologyTypeEnumKey === \"VALUE_TYPE\" ? entityJSON.slice(1, -2) : entityJSON} as unknown as ${entityTypeName};\n \nexport const ${entityFileNameBase}: ${entityTypeName} = wrapWithProxy(${entityFileNameBase}_base);\n `;\n fs.writeFileSync(filePath, content, {\n flag: \"w\"\n });\n entityModuleNames.push(entityFileNameBase);\n });\n for (const entityModuleName of entityModuleNames) {\n topLevelExportStatements.push(`export { ${entityModuleName} } from \"./codegen/${typeDirName}/${entityModuleName}.js\";`);\n }\n });\n if (topLevelExportStatements.length > 0) {\n const mainIndexContent = dependencyInjectionString() + topLevelExportStatements.join(\"\\n\") + \"\\n\";\n const mainIndexFilePath = path.join(outputDir, \"index.ts\");\n fs.writeFileSync(mainIndexFilePath, mainIndexContent, {\n flag: \"w\"\n });\n }\n}\nexport function buildDatasource(apiName, definition, classificationMarkingGroupName, mandatoryMarkingGroupName) {\n const needsSecurity = classificationMarkingGroupName !== undefined || mandatoryMarkingGroupName !== undefined;\n const securityConfig = needsSecurity ? {\n classificationConstraint: classificationMarkingGroupName ? {\n markingGroupName: classificationMarkingGroupName\n } : undefined,\n markingConstraint: mandatoryMarkingGroupName ? {\n markingGroupName: mandatoryMarkingGroupName\n } : undefined\n } : undefined;\n return {\n datasourceName: apiName,\n datasource: definition,\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false\n },\n redacted: false,\n ...(securityConfig !== undefined && {\n dataSecurity: securityConfig\n })\n };\n}\nexport function cleanAndValidateLinkTypeId(apiName) {\n // Insert a dash before any uppercase letter that follows a lowercase letter or digit\n const step1 = apiName.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\");\n // Insert a dash after a sequence of uppercase letters when followed by a lowercase letter\n // then convert the whole string to lowercase\n // e.g., apiName, APIname, and apiNAME will all be converted to api-name\n const linkTypeId = step1.replace(/([A-Z])([A-Z][a-z])/g, \"$1-$2\").toLowerCase();\n const VALIDATION_PATTERN = /^([a-z][a-z0-9\\-]*)$/;\n if (!VALIDATION_PATTERN.test(linkTypeId)) {\n throw new Error(`LinkType id '${linkTypeId}' must be lower case with dashes.`);\n }\n return linkTypeId;\n}\nexport function dumpOntologyFullMetadata() {\n return convertOntologyDefinition(ontologyDefinition);\n}\nexport function dumpValueTypeWireType() {\n return convertOntologyToValueTypeIr(ontologyDefinition);\n}\nexport function convertObjectStatus(status) {\n if (status === undefined) {\n return {\n type: \"active\",\n active: {}\n };\n }\n if (status === \"active\") {\n return {\n type: \"active\",\n active: {}\n };\n }\n if (status === \"experimental\") {\n return {\n type: \"experimental\",\n experimental: {}\n };\n }\n if (typeof status === \"object\" && status.type === \"deprecated\") {\n return {\n type: \"deprecated\",\n deprecated: {\n message: status.message,\n deadline: status.deadline,\n replacedBy: undefined\n }\n };\n }\n return status;\n}\nexport function convertAction(action) {\n const actionValidation = convertActionValidation(action);\n const actionParameters = convertActionParameters(action);\n const actionSections = convertActionSections(action);\n const parameterOrdering = action.parameterOrdering ?? (action.parameters ?? []).map(p => p.id);\n return {\n actionType: {\n actionTypeLogic: {\n logic: {\n rules: action.rules\n },\n validation: actionValidation\n },\n metadata: {\n apiName: action.apiName,\n displayMetadata: {\n configuration: {\n defaultLayout: action.defaultFormat ?? \"FORM\",\n displayAndFormat: action.displayAndFormat ?? {\n table: {\n columnWidthByParameterRid: {},\n enableFileImport: true,\n fitHorizontally: false,\n frozenColumnCount: 0,\n rowHeightInLines: 1\n }\n },\n enableLayoutUserSwitch: action.enableLayoutSwitch ?? false\n },\n description: action.description ?? \"\",\n displayName: action.displayName,\n icon: {\n type: \"blueprint\",\n blueprint: action.icon ?? {\n locator: \"edit\",\n color: \"#000000\"\n }\n },\n successMessage: action.submissionMetadata?.successMessage ? [{\n type: \"message\",\n message: action.submissionMetadata.successMessage\n }] : [],\n typeClasses: action.typeClasses ?? [],\n ...(action.submissionMetadata?.submitButtonDisplayMetadata && {\n submitButtonDisplayMetadata: action.submissionMetadata.submitButtonDisplayMetadata\n }),\n ...(action.submissionMetadata?.undoButtonConfiguration && {\n undoButtonConfiguration: action.submissionMetadata.undoButtonConfiguration\n })\n },\n parameterOrdering: parameterOrdering,\n formContentOrdering: getFormContentOrdering(action, parameterOrdering),\n parameters: actionParameters,\n sections: actionSections,\n status: typeof action.status === \"string\" ? {\n type: action.status,\n [action.status]: {}\n } : action.status,\n entities: action.entities\n }\n }\n };\n}\nexport function extractAllowedValues(allowedValues) {\n switch (allowedValues.type) {\n case \"oneOf\":\n return {\n type: \"oneOf\",\n oneOf: {\n type: \"oneOf\",\n oneOf: {\n labelledValues: allowedValues.oneOf,\n otherValueAllowed: {\n allowed: allowedValues.otherValueAllowed ?? false\n }\n }\n }\n };\n case \"range\":\n const {\n min,\n max\n } = allowedValues;\n return {\n type: \"range\",\n range: {\n type: \"range\",\n range: {\n ...(min === undefined ? {} : {\n minimum: {\n inclusive: true,\n value: min\n }\n }),\n ...(max === undefined ? {} : {\n maximum: {\n inclusive: true,\n value: max\n }\n })\n }\n }\n };\n case \"text\":\n const {\n minLength,\n maxLength,\n regex\n } = allowedValues;\n return {\n type: \"text\",\n text: {\n type: \"text\",\n text: {\n ...(minLength === undefined ? {} : {\n minLength: minLength\n }),\n ...(maxLength === undefined ? {} : {\n maxLength: maxLength\n }),\n ...(regex === undefined ? {} : {\n regex: {\n regex: regex,\n failureMessage: \"Invalid input\"\n }\n })\n }\n }\n };\n case \"datetime\":\n const {\n minimum,\n maximum\n } = allowedValues;\n return {\n type: \"datetime\",\n datetime: {\n type: \"datetime\",\n datetime: {\n minimum,\n maximum\n }\n }\n };\n case \"objectTypeReference\":\n return {\n type: \"objectTypeReference\",\n objectTypeReference: {\n type: \"objectTypeReference\",\n objectTypeReference: {\n interfaceTypeRids: allowedValues.interfaceTypes\n }\n }\n };\n case \"redacted\":\n return {\n type: \"redacted\",\n redacted: {}\n };\n case \"geotimeSeriesReference\":\n return {\n type: \"geotimeSeriesReference\",\n geotimeSeriesReference: {\n type: \"geotimeSeries\",\n geotimeSeries: {}\n }\n };\n default:\n const k = allowedValues.type;\n return {\n type: k,\n [k]: {\n type: k,\n [k]: {}\n }\n };\n // TODO(dpaquin): there's probably a TS clean way to do this\n }\n}\nexport function renderHintFromBaseType(parameter) {\n // TODO(dpaquin): these are just guesses, we should find where they're actually defined\n const type = typeof parameter.type === \"string\" ? parameter.type : parameter.type.type;\n switch (type) {\n case \"boolean\":\n case \"booleanList\":\n return {\n type: \"checkbox\",\n checkbox: {}\n };\n case \"integer\":\n case \"integerList\":\n case \"long\":\n case \"longList\":\n case \"double\":\n case \"doubleList\":\n case \"decimal\":\n case \"decimalList\":\n return {\n type: \"numericInput\",\n numericInput: {}\n };\n case \"string\":\n case \"stringList\":\n case \"geohash\":\n case \"geohashList\":\n case \"geoshape\":\n case \"geoshapeList\":\n case \"objectSetRid\":\n return {\n type: \"textInput\",\n textInput: {}\n };\n case \"timestamp\":\n case \"timestampList\":\n case \"date\":\n case \"dateList\":\n return {\n type: \"dateTimePicker\",\n dateTimePicker: {}\n };\n case \"attachment\":\n case \"attachmentList\":\n return {\n type: \"filePicker\",\n filePicker: {}\n };\n case \"marking\":\n case \"markingList\":\n if (parameter.validation.allowedValues?.type === \"mandatoryMarking\") {\n return {\n type: \"mandatoryMarkingPicker\",\n mandatoryMarkingPicker: {}\n };\n } else if (parameter.validation.allowedValues?.type === \"cbacMarking\") {\n return {\n type: \"cbacMarkingPicker\",\n cbacMarkingPicker: {}\n };\n } else {\n throw new Error(`The allowed values for \"${parameter.displayName}\" are not compatible with the base parameter type`);\n }\n case \"timeSeriesReference\":\n case \"objectReference\":\n case \"objectReferenceList\":\n case \"interfaceReference\":\n case \"interfaceReferenceList\":\n case \"objectTypeReference\":\n case \"mediaReference\":\n case \"mediaReferenceList\":\n case \"geotimeSeriesReference\":\n case \"geotimeSeriesReferenceList\":\n return {\n type: \"dropdown\",\n dropdown: {}\n };\n case \"struct\":\n case \"structList\":\n throw new Error(\"Structs are not supported yet\");\n default:\n throw new Error(`Unknown type ${type}`);\n }\n}\nexport function extractNamespace(apiName) {\n return apiName.substring(0, apiName.lastIndexOf(\".\") + 1);\n}\nexport function withoutNamespace(apiName) {\n const lastDot = apiName.lastIndexOf(\".\");\n if (lastDot === -1) {\n return apiName;\n }\n return apiName.substring(lastDot + 1);\n}\nfunction camel(str) {\n if (!str) {\n return str;\n }\n let result = str.replace(/[-_]+(.)?/g, (_, c) => c ? c.toUpperCase() : \"\");\n result = result.charAt(0).toLowerCase() + result.slice(1);\n return result;\n}\n\n/**\n * Gets the TypeScript type name corresponding to an OntologyEntityTypeEnum value\n */\nfunction getEntityTypeName(type) {\n return {\n [OntologyEntityTypeEnum.OBJECT_TYPE]: \"ObjectType\",\n [OntologyEntityTypeEnum.LINK_TYPE]: \"LinkType\",\n [OntologyEntityTypeEnum.INTERFACE_TYPE]: \"InterfaceType\",\n [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: \"SharedPropertyType\",\n [OntologyEntityTypeEnum.ACTION_TYPE]: \"ActionType\",\n [OntologyEntityTypeEnum.VALUE_TYPE]: \"ValueTypeDefinitionVersion\"\n }[type];\n}\nfunction writeDependencyFile(dependencyFile) {\n fs.writeFileSync(dependencyFile, JSON.stringify(dependencies, null, 2));\n}\nfunction dependencyInjectionString() {\n const namespaceNoDot = namespace.endsWith(\".\") ? namespace.slice(0, -1) : namespace;\n return `import { addDependency } from \"@osdk/maker\";\n// @ts-ignore\naddDependency(\"${namespaceNoDot}\", new URL(import.meta.url).pathname);\n`;\n}\nexport function addNamespaceIfNone(apiName) {\n return apiName.includes(\".\") ? apiName : namespace + apiName;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport invariant from \"tiny-invariant\";\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport { defineOntology } from \"../api/defineOntology.js\";\nconst apiNamespaceRegex = /^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$/;\nconst uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;\nexport default async function main(args = process.argv) {\n const commandLineOpts = await yargs(hideBin(args)).version(process.env.PACKAGE_VERSION ?? \"\").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({\n input: {\n alias: \"i\",\n describe: \"Input file\",\n type: \"string\",\n default: \".ontology/ontology.ts\",\n coerce: path.resolve\n },\n output: {\n alias: \"o\",\n describe: \"Output file\",\n type: \"string\",\n default: \"ontology.json\",\n coerce: path.resolve\n },\n apiNamespace: {\n describe: \"Api name prefix for namespaced ontology types\",\n type: \"string\",\n default: \"\"\n },\n snapshotDir: {\n alias: \"s\",\n describe: \"Snapshot directory\",\n type: \"string\",\n default: \"snapshots\",\n coerce: path.resolve\n },\n outputDir: {\n alias: \"d\",\n describe: \"Directory for generated ontology entities\",\n type: \"string\",\n coerce: path.resolve\n },\n valueTypesOutput: {\n describe: \"Value Type Output File\",\n type: \"string\",\n default: \"value-types.json\",\n coerce: path.resolve\n },\n dependencies: {\n describe: \"File to write dependencies to\",\n type: \"string\",\n coerce: path.resolve\n },\n randomnessKey: {\n describe: \"Value used to assure uniqueness of entities\",\n type: \"string\",\n coerce: path.resolve\n }\n }).parseAsync();\n let apiNamespace = \"\";\n if (commandLineOpts.apiNamespace.length !== 0) {\n apiNamespace = commandLineOpts.apiNamespace.slice(-1) !== \".\" ? commandLineOpts.apiNamespace + \".\" : commandLineOpts.apiNamespace;\n !(apiNamespace.length < 1024) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"API namespace is too long.\") : invariant(false) : void 0;\n !apiNamespaceRegex.test(apiNamespace) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"API namespace is invalid! It is expected to conform to ^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$\") : invariant(false) : void 0;\n }\n consola.info(`Loading ontology from ${commandLineOpts.input}`);\n if (commandLineOpts.randomnessKey !== undefined) {\n !uuidRegex.test(commandLineOpts.randomnessKey) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Supplied randomness key is not a uuid and shouldn't be used as a uniqueness guarantee\") : invariant(false) : void 0;\n }\n const ontologyIr = await loadOntology(commandLineOpts.input, apiNamespace, commandLineOpts.outputDir, commandLineOpts.dependencies, commandLineOpts.randomnessKey);\n consola.info(`Saving ontology to ${commandLineOpts.output}`);\n await fs.writeFile(commandLineOpts.output, JSON.stringify(ontologyIr, null, 2));\n // No point in generating block if there aren't any value types\n if (ontologyIr.valueTypes.valueTypes.length > 0 || ontologyIr.importedValueTypes.valueTypes.length > 0) {\n await fs.writeFile(commandLineOpts.valueTypesOutput, JSON.stringify(ontologyIr.valueTypes, null, 2));\n }\n}\nasync function loadOntology(input, apiNamespace, outputDir, dependencyFile, randomnessKey) {\n const q = await defineOntology(apiNamespace, async () => await import(input), outputDir, dependencyFile, randomnessKey);\n return q;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport { dependencies } from \"./defineOntology.js\";\nconst MAX_SEARCH_DEPTH = 5;\nexport function addDependency(namespaceNoDot, fileInPackage) {\n let dir = path.dirname(fileInPackage);\n let packageJsonPath = null;\n for (let i = 0; i < MAX_SEARCH_DEPTH; i++) {\n const candidate = path.join(dir, \"package.json\");\n if (fs.existsSync(candidate)) {\n packageJsonPath = candidate;\n break;\n }\n const parentDir = path.dirname(dir);\n if (parentDir === dir) break;\n dir = parentDir;\n }\n if (!packageJsonPath) {\n throw new Error(`Could not find a package.json within ${MAX_SEARCH_DEPTH} parent directories of ${fileInPackage}`);\n }\n const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, \"utf-8\"));\n dependencies[namespaceNoDot] = packageJson.version ?? \"\";\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// FIXME: these should not use conjure types\n\nexport function isActionParameterTypePrimitive(type) {\n return [\"boolean\", \"booleanList\", \"integer\", \"integerList\", \"long\", \"longList\", \"double\", \"doubleList\", \"string\", \"stringList\", \"decimal\", \"decimalList\", \"timestamp\", \"timestampList\", \"geohash\", \"geohashList\", \"geoshape\", \"geoshapeList\", \"timeSeriesReference\", \"date\", \"dateList\", \"objectTypeReference\", \"objectReference\", \"attachment\", \"attachmentList\", \"marking\", \"markingList\", \"mediaReference\", \"mediaReferenceList\", \"geotimeSeriesReference\", \"geotimeSeriesReferenceList\"].includes(type);\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { convertConditionDefinition } from \"../conversion/toMarketplace/convertConditionDefinition.js\";\nimport { isActionParameterTypePrimitive } from \"./action/ActionParameterType.js\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { uppercaseFirstLetter } from \"./defineObject.js\";\nimport { addNamespaceIfNone, importedTypes, namespace, ontologyDefinition, updateOntology } from \"./defineOntology.js\";\nimport { getFlattenedInterfaceProperties } from \"./interface/getFlattenedInterfaceProperties.js\";\nimport { isStruct } from \"./properties/PropertyTypeType.js\";\nexport const MODIFY_OBJECT_PARAMETER = \"objectToModifyParameter\";\nexport const CREATE_OR_MODIFY_OBJECT_PARAMETER = \"objectToCreateOrModifyParameter\";\nexport const CREATE_INTERFACE_OBJECT_PARAMETER = \"objectTypeParameter\";\nexport const MODIFY_INTERFACE_OBJECT_PARAMETER = \"interfaceObjectToModifyParameter\";\nexport function defineAction(actionDef) {\n const apiName = namespace + actionDef.apiName;\n const parameterIds = (actionDef.parameters ?? []).map(p => p.id);\n if (ontologyDefinition[OntologyEntityTypeEnum.ACTION_TYPE][apiName] !== undefined) {\n throw new Error(`Action type with apiName ${actionDef.apiName} is already defined`);\n }\n !/^[a-z0-9]+(-[a-z0-9]+)*$/.test(actionDef.apiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Action type apiName \"${actionDef.apiName}\" must be alphanumeric, lowercase, and kebab-case`) : invariant(false) : void 0;\n const parameterIdsSet = new Set(parameterIds);\n !(parameterIdsSet.size === parameterIds.length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameter ids must be unique`) : invariant(false) : void 0;\n const parameterIdsNotFound = Array.from(referencedParameterIds(actionDef)).filter(p => !parameterIdsSet.has(p));\n !(parameterIdsNotFound.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameters ${JSON.stringify(parameterIdsNotFound)} were referenced but not defined`) : invariant(false) : void 0;\n const definedSectionIds = new Set(Object.keys(actionDef.sections ?? []));\n const undefinedSectionsInOrdering = (actionDef.formContentOrdering ?? []).flatMap(s => s.type === \"parameterId\" ? [] : [s.sectionId]).filter(sId => !definedSectionIds.has(sId));\n !(undefinedSectionsInOrdering.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Sections [${undefinedSectionsInOrdering}] were referenced in content ordering but not defined`) : invariant(false) : void 0;\n !(actionDef.rules.length > 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Action type ${actionDef.apiName} must have at least one logic rule`) : invariant(false) : void 0;\n actionDef.rules.forEach(rule => {\n if (rule.type === \"modifyObjectRule\") {\n !parameterIds.some(id => id === rule.modifyObjectRule.objectToModify) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Object to modify parameter must be defined in parameters`) : invariant(false) : void 0;\n }\n if (rule.type === \"deleteObjectRule\") {\n !parameterIds.some(id => id === rule.deleteObjectRule.objectToDelete) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Object to delete parameter must be defined in parameters`) : invariant(false) : void 0;\n }\n if (rule.type === \"modifyInterfaceRule\") {\n // The there must be a parameter for the interface, and the interface there must exist\n const interfaceParam = actionDef.parameters.find(p => p.id === rule.modifyInterfaceRule.interfaceObjectToModifyParameter);\n !(interfaceParam !== undefined && typeof interfaceParam.type === \"object\" && (interfaceParam.type.type === \"interfaceReference\" || interfaceParam.type.type === \"interfaceReferenceList\")) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface object to modify parameter must be an interface reference`) : invariant(false) : void 0;\n const interfaceReference = interfaceParam.type.type === \"interfaceReference\" ? interfaceParam.type.interfaceReference.interfaceTypeRid : interfaceParam.type.interfaceReferenceList.interfaceTypeRid;\n !(ontologyDefinition.INTERFACE_TYPE[interfaceReference] !== undefined || importedTypes.INTERFACE_TYPE[interfaceReference] !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface type ${interfaceReference} does not exist`) : invariant(false) : void 0;\n\n // All referenced SPTs must exist on the interface\n const interfaceType = ontologyDefinition.INTERFACE_TYPE[interfaceReference];\n Object.keys(rule.modifyInterfaceRule.sharedPropertyValues).forEach(spt => {\n !Object.keys(getFlattenedInterfaceProperties(interfaceType)).includes(spt) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Shared property type ${spt} does not exist in interface type ${interfaceReference}`) : invariant(false) : void 0;\n });\n }\n if (rule.type === \"addInterfaceRule\") {\n // The referenced interface must exist globally\n const interfaceType = ontologyDefinition.INTERFACE_TYPE[rule.addInterfaceRule.interfaceApiName] ?? importedTypes.INTERFACE_TYPE[rule.addInterfaceRule.interfaceApiName];\n !(interfaceType !== undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface type ${rule.addInterfaceRule.interfaceApiName} does not exist`) : invariant(false) : void 0;\n\n // All referenced SPTs must exist on the interface\n Object.keys(rule.addInterfaceRule.sharedPropertyValues).forEach(spt => {\n !Object.keys(getFlattenedInterfaceProperties(interfaceType)).includes(spt) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Shared property type ${spt} does not exist in interface type ${interfaceType.apiName}`) : invariant(false) : void 0;\n });\n }\n });\n const fullAction = {\n ...actionDef,\n apiName: apiName,\n entities: actionDef.entities ?? {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [],\n affectedLinkTypes: [],\n typeGroups: []\n },\n __type: OntologyEntityTypeEnum.ACTION_TYPE\n };\n validateActionConfiguration(fullAction);\n updateOntology(fullAction);\n return fullAction;\n}\nexport function isPropertyParameter(def, name, type) {\n return !Object.keys(def.nonParameterMappings ?? {}).includes(name) && !isStruct(type) && !def.excludedProperties?.includes(name);\n}\nexport function createParameters(def, propertyMap, parameterSet, requiredMap) {\n const targetParams = getTargetParameters(def, parameterSet);\n return [...targetParams, ...Array.from(parameterSet).map(id => ({\n id,\n displayName: def.parameterConfiguration?.[id]?.displayName ?? propertyMap[id]?.displayName ?? uppercaseFirstLetter(id),\n type: def.parameterConfiguration?.[id]?.customParameterType ?? extractActionParameterType(propertyMap[id]),\n validation: def.parameterConfiguration?.[id] !== undefined ? {\n ...def.parameterConfiguration?.[id],\n allowedValues: def.parameterConfiguration?.[id].allowedValues ?? (def.parameterConfiguration?.[id].customParameterType ? extractAllowedValuesFromActionParameterType(def.parameterConfiguration?.[id].customParameterType) : extractAllowedValuesFromPropertyType(propertyMap[id]?.type)),\n required: def.parameterConfiguration?.[id].required ?? propertyMap[id]?.nullability?.noNulls ?? false\n } : {\n required: propertyMap[id]?.array ?? false ? {\n listLength: propertyMap[id]?.nullability?.noEmptyCollections ? {\n min: 1\n } : {}\n } : requiredMap?.[id] ?? propertyMap[id]?.nullability?.noNulls ?? false,\n allowedValues: extractAllowedValuesFromPropertyType(propertyMap[id]?.type)\n },\n defaultValue: def.parameterConfiguration?.[id]?.defaultValue,\n description: def.parameterConfiguration?.[id]?.description\n }))];\n}\nfunction getTargetParameters(def, parameterSet) {\n const targetParams = [];\n parameterSet.forEach(name => {\n if (name === MODIFY_OBJECT_PARAMETER) {\n targetParams.push({\n id: MODIFY_OBJECT_PARAMETER,\n displayName: def.parameterConfiguration?.[name]?.displayName ?? \"Modify object\",\n type: {\n type: \"objectReference\",\n objectReference: {\n objectTypeId: def.objectType.apiName\n }\n },\n validation: {\n ...def.parameterConfiguration?.[name],\n allowedValues: {\n type: \"objectQuery\"\n },\n required: def.parameterConfiguration?.[name]?.required ?? true\n },\n defaultValue: def.parameterConfiguration?.[name]?.defaultValue,\n description: def.parameterConfiguration?.[name]?.description\n });\n parameterSet.delete(MODIFY_OBJECT_PARAMETER);\n }\n if (name === CREATE_OR_MODIFY_OBJECT_PARAMETER) {\n targetParams.push({\n id: CREATE_OR_MODIFY_OBJECT_PARAMETER,\n displayName: def.parameterConfiguration?.[name]?.displayName ?? \"Create or modify object\",\n type: {\n type: \"objectReference\",\n objectReference: {\n objectTypeId: def.objectType.apiName,\n maybeCreateObjectOption: !(\"primaryKeyOption\" in def) ? {\n type: \"autoGenerated\",\n autoGenerated: {}\n } : def.primaryKeyOption === \"autoGenerated\" ? {\n type: \"autoGenerated\",\n autoGenerated: {}\n } : {\n type: \"userInput\",\n userInput: {}\n }\n }\n },\n validation: {\n ...def.parameterConfiguration?.[name],\n allowedValues: {\n type: \"objectQuery\"\n },\n required: def.parameterConfiguration?.[name]?.required ?? true\n },\n defaultValue: def.parameterConfiguration?.[name]?.defaultValue,\n description: def.parameterConfiguration?.[name]?.description\n });\n parameterSet.delete(CREATE_OR_MODIFY_OBJECT_PARAMETER);\n }\n if (name === CREATE_INTERFACE_OBJECT_PARAMETER && \"interfaceType\" in def) {\n targetParams.push({\n id: CREATE_INTERFACE_OBJECT_PARAMETER,\n displayName: def.parameterConfiguration?.[name]?.displayName ?? \"Object type to create\",\n type: {\n type: \"objectTypeReference\",\n objectTypeReference: {\n interfaceTypeRids: [def.interfaceType.apiName]\n }\n },\n validation: {\n ...def.parameterConfiguration?.[name],\n required: true,\n allowedValues: def.objectType === undefined ? {\n type: \"objectTypeReference\",\n interfaceTypes: [def.interfaceType.apiName]\n } : {\n type: \"oneOf\",\n oneOf: [{\n label: def.objectType.displayName,\n value: {\n type: \"objectType\",\n objectType: {\n objectTypeId: def.objectType.apiName\n }\n }\n }]\n }\n },\n defaultValue: def.parameterConfiguration?.[name]?.defaultValue,\n description: def.parameterConfiguration?.[name]?.description\n });\n parameterSet.delete(CREATE_INTERFACE_OBJECT_PARAMETER);\n }\n if (name === MODIFY_INTERFACE_OBJECT_PARAMETER && \"interfaceType\" in def) {\n targetParams.push({\n id: MODIFY_INTERFACE_OBJECT_PARAMETER,\n displayName: def.parameterConfiguration?.[name]?.displayName ?? \"Object type to modify\",\n type: {\n type: \"interfaceReference\",\n interfaceReference: {\n interfaceTypeRid: def.interfaceType.apiName\n }\n },\n validation: {\n ...def.parameterConfiguration?.[name],\n required: true,\n allowedValues: def.objectType === undefined ? {\n type: \"interfaceObjectQuery\"\n } : {\n type: \"oneOf\",\n oneOf: [{\n label: def.objectType.displayName,\n value: {\n type: \"objectType\",\n objectType: {\n objectTypeId: def.objectType.apiName\n }\n }\n }]\n }\n },\n defaultValue: def.parameterConfiguration?.[name]?.defaultValue,\n description: def.parameterConfiguration?.[name]?.description\n });\n parameterSet.delete(MODIFY_INTERFACE_OBJECT_PARAMETER);\n }\n });\n return targetParams;\n}\nfunction referencedParameterIds(actionDef) {\n const parameterIds = new Set();\n\n // section definitions\n Object.values(actionDef.sections ?? {}).flatMap(p => p.parameters).forEach(pId => parameterIds.add(pId));\n\n // form content ordering\n (actionDef.formContentOrdering ?? []).forEach(item => {\n if (item.type === \"parameterId\") {\n parameterIds.add(item.parameterId);\n }\n });\n\n // logic rules\n actionDef.rules.forEach(rule => {\n // when visiting each rule, we also do drive-by namespace prefixing\n switch (rule.type) {\n case \"addInterfaceRule\":\n rule.addInterfaceRule.interfaceApiName = sanitize(rule.addInterfaceRule.interfaceApiName);\n parameterIds.add(rule.addInterfaceRule.objectTypeParameter);\n Object.entries(rule.addInterfaceRule.sharedPropertyValues).forEach(([k, v]) => {\n if (v.type === \"parameterId\") {\n parameterIds.add(v.parameterId);\n }\n delete rule.addInterfaceRule.sharedPropertyValues[k];\n rule.addInterfaceRule.sharedPropertyValues[sanitize(k)] = v;\n });\n break;\n case \"modifyInterfaceRule\":\n parameterIds.add(rule.modifyInterfaceRule.interfaceObjectToModifyParameter);\n Object.entries(rule.modifyInterfaceRule.sharedPropertyValues).forEach(([k, v]) => {\n if (v.type === \"parameterId\") {\n parameterIds.add(v.parameterId);\n }\n delete rule.modifyInterfaceRule.sharedPropertyValues[k];\n rule.modifyInterfaceRule.sharedPropertyValues[sanitize(k)] = v;\n });\n break;\n case \"addObjectRule\":\n Object.entries(rule.addObjectRule.propertyValues).forEach(([k, v]) => {\n if (v.type === \"parameterId\") {\n parameterIds.add(v.parameterId);\n }\n });\n break;\n case \"modifyObjectRule\":\n Object.entries(rule.modifyObjectRule.propertyValues).forEach(([k, v]) => {\n if (v.type === \"parameterId\") {\n parameterIds.add(v.parameterId);\n }\n });\n break;\n case \"addOrModifyObjectRuleV2\":\n Object.entries(rule.addOrModifyObjectRuleV2.propertyValues).forEach(([k, v]) => {\n if (v.type === \"parameterId\") {\n parameterIds.add(v.parameterId);\n }\n });\n break;\n }\n });\n return parameterIds;\n}\nfunction extractAllowedValuesFromActionParameterType(type) {\n if (typeof type === \"object\") {\n switch (type.type) {\n case \"objectReference\":\n case \"objectReferenceList\":\n return {\n type: \"objectQuery\"\n };\n case \"struct\":\n case \"structList\":\n throw new Error(\"Structs are not supported yet\");\n default:\n throw new Error(`Inferred allowed values for ${type.type} not yet supported. Please explicitly provide allowed values.`);\n }\n }\n switch (type) {\n case \"boolean\":\n case \"booleanList\":\n return {\n type: \"boolean\"\n };\n case \"integer\":\n case \"integerList\":\n case \"decimal\":\n case \"decimalList\":\n case \"double\":\n case \"doubleList\":\n case \"long\":\n case \"longList\":\n return {\n type: \"range\"\n };\n case \"timestamp\":\n case \"timestampList\":\n case \"date\":\n case \"dateList\":\n return {\n type: \"datetime\"\n };\n case \"string\":\n case \"stringList\":\n return {\n type: \"text\"\n };\n case \"geohash\":\n case \"geohashList\":\n return {\n type: \"geohash\"\n };\n case \"geoshape\":\n case \"geoshapeList\":\n return {\n type: \"geoshape\"\n };\n case \"mediaReference\":\n case \"mediaReferenceList\":\n return {\n type: \"mediaReference\"\n };\n case \"geotimeSeriesReference\":\n case \"geotimeSeriesReferenceList\":\n return {\n type: \"geotimeSeriesReference\"\n };\n case \"attachment\":\n case \"attachmentList\":\n return {\n type: \"attachment\"\n };\n default:\n throw new Error(`Inferred allowed values for ${type} not yet supported. Please explicitly provide allowed values.`);\n }\n}\nfunction extractAllowedValuesFromPropertyType(type) {\n switch (type) {\n case \"boolean\":\n return {\n type: \"boolean\"\n };\n case \"byte\":\n return {\n type: \"range\",\n min: {\n type: \"staticValue\",\n staticValue: {\n type: \"integer\",\n integer: 0\n }\n },\n max: {\n type: \"staticValue\",\n staticValue: {\n type: \"integer\",\n integer: 255\n }\n }\n };\n case \"timestamp\":\n case \"date\":\n return {\n type: \"datetime\"\n };\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n return {\n type: \"range\"\n };\n case \"short\":\n return {\n type: \"range\",\n min: {\n type: \"staticValue\",\n staticValue: {\n type: \"integer\",\n integer: 0\n }\n },\n max: {\n type: \"staticValue\",\n staticValue: {\n type: \"integer\",\n integer: 65535\n }\n }\n };\n case \"string\":\n return {\n type: \"text\"\n };\n case \"geopoint\":\n return {\n type: \"geohash\"\n };\n case \"geoshape\":\n return {\n type: \"geoshape\"\n };\n case \"mediaReference\":\n return {\n type: \"mediaReference\"\n };\n case \"geotimeSeries\":\n return {\n type: \"geotimeSeriesReference\"\n };\n default:\n switch (type.type) {\n case \"marking\":\n return type.markingType === \"CBAC\" ? {\n type: \"cbacMarking\"\n } : {\n type: \"mandatoryMarking\"\n };\n case \"string\":\n return {\n type: \"text\"\n };\n case \"struct\":\n throw new Error(\"Structs are not supported yet\");\n default:\n throw new Error(\"Unknown type\");\n }\n break;\n }\n}\nfunction extractActionParameterType(pt) {\n const typeType = pt.type;\n if (typeof typeType === \"object\") {\n switch (typeType.type) {\n case \"marking\":\n return maybeAddList(\"marking\", pt);\n case \"string\":\n return maybeAddList(\"string\", pt);\n case \"struct\":\n throw new Error(\"Structs are not supported yet\");\n default:\n throw new Error(`Unknown type`);\n }\n }\n if (typeof typeType === \"string\" && isActionParameterTypePrimitive(typeType)) {\n return maybeAddList(typeType, pt);\n }\n switch (typeType) {\n case \"byte\":\n case \"short\":\n return maybeAddList(\"integer\", pt);\n case \"geopoint\":\n return maybeAddList(\"geohash\", pt);\n case \"float\":\n return maybeAddList(\"double\", pt);\n case \"geotimeSeries\":\n return maybeAddList(\"geotimeSeriesReference\", pt);\n default:\n throw new Error(\"Unknown type\");\n }\n}\nfunction maybeAddList(type, pt) {\n return pt.array ?? false ? type + \"List\" : type;\n}\nexport function kebab(s) {\n return s.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/([A-Z])([A-Z][a-z])/g, \"$1-$2\").replace(/\\./g, \"-\").toLowerCase();\n}\nfunction sanitize(s) {\n return s.includes(\".\") ? s : namespace + s;\n}\nexport function convertValidationRule(actionValidation, actionParameters) {\n return actionValidation.map(rule => {\n return {\n condition: convertConditionDefinition(rule.condition, actionParameters),\n displayMetadata: rule.displayMetadata ?? {\n failureMessage: \"Did not satisfy validation\",\n typeClasses: []\n }\n };\n });\n}\nfunction validateActionConfiguration(action) {\n const seenParameterIds = new Set();\n const parameterMap = action.parameters?.reduce((acc, param) => {\n acc[param.id] = param;\n return acc;\n }, {}) ?? {};\n const orderedParameters = action.parameterOrdering?.map(id => parameterMap[id]) ?? action.parameters;\n orderedParameters?.forEach(param => {\n param.validation.conditionalOverrides?.forEach(override => {\n validateParameterCondition(override.condition, param.id, seenParameterIds, action.parameters);\n });\n validateParameterPrefill(param.id, seenParameterIds, action.parameters, param.defaultValue);\n seenParameterIds.add(param.id);\n });\n}\nfunction validateParameterCondition(condition, currentParameterId, seenParameterIds, parameters) {\n switch (condition.type) {\n case \"parameter\":\n const overrideParamId = condition.parameterId;\n !parameters?.some(p => p.id === overrideParamId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameter condition on ${currentParameterId} is referencing unknown parameter ${overrideParamId}`) : invariant(false) : void 0;\n !(overrideParamId !== currentParameterId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameter condition on ${currentParameterId} is referencing itself`) : invariant(false) : void 0;\n !seenParameterIds.has(overrideParamId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameter condition on ${currentParameterId} is referencing later parameter ${overrideParamId}`) : invariant(false) : void 0;\n break;\n case \"and\":\n // this will not catch the niche edge case where users use the full syntax for unions\n if (\"conditions\" in condition) {\n condition.conditions.forEach(c => validateParameterCondition(c, currentParameterId, seenParameterIds, parameters));\n }\n break;\n case \"or\":\n if (\"conditions\" in condition) {\n condition.conditions.forEach(c => validateParameterCondition(c, currentParameterId, seenParameterIds, parameters));\n }\n break;\n case \"comparison\":\n case \"group\":\n case \"not\":\n case \"markings\":\n case \"regex\":\n case \"redacted\":\n case \"true\":\n break;\n default:\n throw new Error(`Unknown condition type on parameter ${currentParameterId}`);\n }\n}\nfunction validateParameterPrefill(currentParameterId, seenParameterIds, parameters, defaultValue) {\n if (!defaultValue) return;\n switch (defaultValue.type) {\n case \"objectParameterPropertyValue\":\n !parameters?.some(p => p.id === defaultValue.objectParameterPropertyValue.parameterId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Default value for parameter ${currentParameterId} is referencing unknown parameter ${defaultValue.objectParameterPropertyValue.parameterId}`) : invariant(false) : void 0;\n !seenParameterIds.has(defaultValue.objectParameterPropertyValue.parameterId) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Default value for parameter ${currentParameterId} is referencing later parameter ${defaultValue.objectParameterPropertyValue.parameterId}`) : invariant(false) : void 0;\n break;\n case \"staticValue\":\n !(defaultValue.staticValue.type === parameters?.find(p => p.id === currentParameterId)?.type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Default static value for parameter ${currentParameterId} does not match type`) : invariant(false) : void 0;\n break;\n case \"staticObject\":\n case \"interfaceParameterPropertyValue\":\n case \"objectQueryPrefill\":\n case \"objectQueryPropertyValue\":\n case \"objectSetRidPrefill\":\n case \"redacted\":\n break;\n default:\n throw new Error(`Unknown default value type for parameter ${currentParameterId}`);\n }\n}\nexport function validateActionParameters(def, properties, name) {\n // validates that parameters either exist as object properties or have a type defined\n [...Object.keys(def.parameterConfiguration ?? {})].forEach(id => {\n !(properties.includes(id) || properties.includes(addNamespaceIfNone(id)) || def.parameterConfiguration?.[id].customParameterType !== undefined || isTargetParameter(id)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Parameter ${id} does not exist as a property on ${name} and its type is not explicitly defined`) : invariant(false) : void 0;\n });\n [...Object.keys(def.nonParameterMappings ?? {}), ...(def.excludedProperties ?? [])].forEach(id => {\n !(properties.includes(id) || properties.includes(addNamespaceIfNone(id))) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Property ${id} does not exist as a property on ${name}`) : invariant(false) : void 0;\n });\n}\n\n// Parameters with configurations will be ordered first in the order they were defined\n// followed by the rest of the parameters in the order they were defined on the object type.\nexport function createDefaultParameterOrdering(def, properties, parameters, priorityId) {\n return [...(priorityId ? [priorityId] : []), ...Object.keys(def.parameterConfiguration ?? {}).filter(id => id !== priorityId), ...properties.filter(id => !def.parameterConfiguration?.[id] && parameters.some(p => p.id === id))];\n}\nexport function validateParameterOrdering(parameterOrdering, parameterSet, actionApiName) {\n const orderingSet = new Set(parameterOrdering);\n const missingParameters = [...parameterSet].filter(param => !orderingSet.has(param));\n const extraneousParameters = parameterOrdering.filter(param => !parameterSet.has(param));\n !(extraneousParameters.length === 0 && missingParameters.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Action parameter ordering for ${actionApiName} does not match expected parameters. Extraneous parameters in ordering: {${extraneousParameters}}, Missing parameters in ordering: {${missingParameters}}`) : invariant(false) : void 0;\n}\nexport function isTargetParameter(parameterId) {\n return parameterId === MODIFY_OBJECT_PARAMETER || parameterId === CREATE_OR_MODIFY_OBJECT_PARAMETER || parameterId === CREATE_INTERFACE_OBJECT_PARAMETER || parameterId === MODIFY_INTERFACE_OBJECT_PARAMETER;\n}\nexport function addNamespaceToActionDefinition(def) {\n def.parameterConfiguration = Object.fromEntries(Object.entries(def.parameterConfiguration ?? {}).map(([id, config]) => [getInterfaceParameterName(def, id), config]));\n def.nonParameterMappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [addNamespaceIfNone(id), value]));\n def.excludedProperties = (def.excludedProperties ?? []).map(id => addNamespaceIfNone(id));\n def.sections = def.sections?.map(section => ({\n ...section,\n parameters: section.parameters.map(p => getInterfaceParameterName(def, p))\n }));\n}\n\n// Adds a namespace to an interface parameter name if it is supposed to be namespaced\nexport function getInterfaceParameterName(def, parameter) {\n return isTargetParameter(parameter) || !Object.keys(def.interfaceType.propertiesV2).includes(addNamespaceIfNone(parameter)) ? parameter : addNamespaceIfNone(parameter);\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { randomUUID } from \"crypto\";\nexport function convertMappingValue(value) {\n switch (value.type) {\n case \"uuid\":\n return {\n type: \"uniqueIdentifier\",\n uniqueIdentifier: {\n linkId: value.linkId ?? randomUUID()\n }\n };\n case \"currentTime\":\n return {\n type: \"currentTime\",\n currentTime: {}\n };\n case \"currentUser\":\n return {\n type: \"currentUser\",\n currentUser: {}\n };\n default:\n return value;\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { addNamespaceToActionDefinition, convertValidationRule, CREATE_INTERFACE_OBJECT_PARAMETER, createDefaultParameterOrdering, createParameters, defineAction, getInterfaceParameterName, isPropertyParameter, kebab, validateActionParameters, validateParameterOrdering } from \"./defineAction.js\";\nimport { getFlattenedInterfaceProperties } from \"./interface/getFlattenedInterfaceProperties.js\";\nexport function defineCreateInterfaceObjectAction(def) {\n addNamespaceToActionDefinition(def);\n const allProperties = getFlattenedInterfaceProperties(def.interfaceType);\n validateActionParameters(def, Object.keys(allProperties), def.interfaceType.apiName);\n const propertyParameters = Object.keys(allProperties).filter(apiName => isPropertyParameter(def, apiName, allProperties[apiName].sharedPropertyType.type));\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(getInterfaceParameterName(def, param)));\n parameterNames.add(CREATE_INTERFACE_OBJECT_PARAMETER);\n const actionApiName = def.apiName ?? `create-${kebab(def.interfaceType.apiName.split(\".\").pop() ?? def.interfaceType.apiName)}${def.objectType === undefined ? \"\" : `-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`}`;\n if (def.parameterOrdering) {\n if (!def.parameterOrdering.includes(CREATE_INTERFACE_OBJECT_PARAMETER)) {\n def.parameterOrdering.unshift(CREATE_INTERFACE_OBJECT_PARAMETER);\n }\n validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);\n }\n const parameters = createParameters(def, Object.fromEntries(Object.entries(allProperties).map(([id, prop]) => [id, prop.sharedPropertyType])), parameterNames, Object.fromEntries(Object.entries(allProperties).map(([id, prop]) => [id, prop.required])));\n const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName ?? `Create ${def.interfaceType.displayMetadata.displayName}`,\n parameters: parameters,\n status: def.status ?? (def.interfaceType.status.type !== \"deprecated\" ? def.interfaceType.status.type : def.interfaceType.status),\n entities: {\n affectedInterfaceTypes: [def.interfaceType.apiName],\n affectedObjectTypes: [],\n affectedLinkTypes: [],\n typeGroups: []\n },\n rules: [{\n type: \"addInterfaceRule\",\n addInterfaceRule: {\n interfaceApiName: def.interfaceType.apiName,\n objectTypeParameter: CREATE_INTERFACE_OBJECT_PARAMETER,\n sharedPropertyValues: {\n ...Object.fromEntries(propertyParameters.map(id => [id, {\n type: \"parameterId\",\n parameterId: id\n }])),\n ...mappings\n }\n }\n }],\n parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(allProperties), parameters, CREATE_INTERFACE_OBJECT_PARAMETER),\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation, parameters)\n } : {}),\n ...(def.defaultFormat && {\n defaultFormat: def.defaultFormat\n }),\n ...(def.enableLayoutSwitch && {\n enableLayoutSwitch: def.enableLayoutSwitch\n }),\n ...(def.tableConfiguration && {\n displayAndFormat: {\n table: def.tableConfiguration\n }\n }),\n ...(def.sections && {\n sections: Object.fromEntries(def.sections.map(section => [section.id, section]))\n }),\n ...(def.submissionMetadata && {\n submissionMetadata: def.submissionMetadata\n })\n });\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { convertValidationRule, createDefaultParameterOrdering, createParameters, defineAction, isPropertyParameter, kebab, validateActionParameters, validateParameterOrdering } from \"./defineAction.js\";\nimport { isStruct } from \"./properties/PropertyTypeType.js\";\nexport function defineCreateObjectAction(def) {\n validateActionParameters(def, Object.keys(def.objectType.properties ?? {}), def.objectType.apiName);\n const propertiesWithDerivedDatasources = (def.objectType.datasources ?? []).filter(ds => ds.type === \"derived\").flatMap(ds => Object.keys(ds.propertyMapping));\n 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));\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(param));\n const actionApiName = def.apiName ?? `create-object-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`;\n if (def.parameterOrdering) {\n validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);\n }\n const parameters = createParameters(def, def.objectType.properties ?? {}, parameterNames);\n const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName ?? `Create ${def.objectType.displayName}`,\n parameters: parameters,\n status: def.status ?? \"active\",\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.objectType.apiName],\n affectedLinkTypes: [],\n typeGroups: []\n },\n rules: [{\n type: \"addObjectRule\",\n addObjectRule: {\n objectTypeId: def.objectType.apiName,\n propertyValues: {\n ...Object.fromEntries(propertyParameters.map(p => [p, {\n type: \"parameterId\",\n parameterId: p\n }])),\n ...mappings\n },\n structFieldValues: {}\n }\n }],\n parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(def.objectType.properties ?? {}), parameters),\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation, parameters)\n } : {}),\n ...(def.defaultFormat && {\n defaultFormat: def.defaultFormat\n }),\n ...(def.enableLayoutSwitch && {\n enableLayoutSwitch: def.enableLayoutSwitch\n }),\n ...(def.tableConfiguration && {\n displayAndFormat: {\n table: def.tableConfiguration\n }\n }),\n ...(def.sections && {\n sections: Object.fromEntries(def.sections.map(section => [section.id, section]))\n }),\n ...(def.submissionMetadata && {\n submissionMetadata: def.submissionMetadata\n })\n });\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { convertValidationRule, CREATE_OR_MODIFY_OBJECT_PARAMETER, createDefaultParameterOrdering, createParameters, defineAction, kebab, validateActionParameters, validateParameterOrdering } from \"./defineAction.js\";\nimport { isStruct } from \"./properties/PropertyTypeType.js\";\nexport function defineCreateOrModifyObjectAction(def) {\n validateActionParameters(def, Object.keys(def.objectType.properties ?? {}), def.objectType.apiName);\n const propertiesWithDerivedDatasources = (def.objectType.datasources ?? []).filter(ds => ds.type === \"derived\").flatMap(ds => Object.keys(ds.propertyMapping));\n 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));\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(param));\n parameterNames.add(CREATE_OR_MODIFY_OBJECT_PARAMETER);\n const actionApiName = def.apiName ?? `create-or-modify-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`;\n if (def.parameterOrdering) {\n if (!def.parameterOrdering.includes(CREATE_OR_MODIFY_OBJECT_PARAMETER)) {\n def.parameterOrdering.unshift(CREATE_OR_MODIFY_OBJECT_PARAMETER);\n }\n validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);\n }\n const parameters = createParameters(def, def.objectType.properties ?? {}, parameterNames);\n parameters.forEach(p => {\n if (p.id !== CREATE_OR_MODIFY_OBJECT_PARAMETER && p.defaultValue === undefined) {\n p.defaultValue = {\n type: \"objectParameterPropertyValue\",\n objectParameterPropertyValue: {\n parameterId: CREATE_OR_MODIFY_OBJECT_PARAMETER,\n propertyTypeId: p.id\n }\n };\n }\n });\n const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName ?? `Create or Modify ${def.objectType.displayName}`,\n parameters: parameters,\n status: def.status ?? \"active\",\n rules: [{\n type: \"addOrModifyObjectRuleV2\",\n addOrModifyObjectRuleV2: {\n objectToModify: CREATE_OR_MODIFY_OBJECT_PARAMETER,\n propertyValues: {\n ...Object.fromEntries(propertyParameters.map(p => [p, {\n type: \"parameterId\",\n parameterId: p\n }])),\n ...mappings\n },\n structFieldValues: {}\n }\n }],\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.objectType.apiName],\n affectedLinkTypes: [],\n typeGroups: []\n },\n parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(def.objectType.properties ?? {}), parameters, CREATE_OR_MODIFY_OBJECT_PARAMETER),\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation, parameters)\n } : {}),\n ...(def.defaultFormat && {\n defaultFormat: def.defaultFormat\n }),\n ...(def.enableLayoutSwitch && {\n enableLayoutSwitch: def.enableLayoutSwitch\n }),\n ...(def.tableConfiguration && {\n displayAndFormat: {\n table: def.tableConfiguration\n }\n }),\n ...(def.sections && {\n sections: Object.fromEntries(def.sections.map(section => [section.id, section]))\n }),\n ...(def.submissionMetadata && {\n submissionMetadata: def.submissionMetadata\n })\n });\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineAction, kebab } from \"./defineAction.js\";\nexport function defineDeleteInterfaceObjectAction(def) {\n return defineAction({\n apiName: def.apiName ?? `delete-interface-object-${kebab(def.interfaceType.apiName.split(\".\").pop() ?? def.interfaceType.apiName)}`,\n displayName: def.displayName ?? `Delete ${def.interfaceType.displayMetadata.displayName}`,\n parameters: [{\n id: \"objectToDeleteParameter\",\n displayName: \"Delete object\",\n type: {\n type: \"interfaceReference\",\n interfaceReference: {\n interfaceTypeRid: def.interfaceType.apiName\n }\n },\n validation: {\n required: true,\n allowedValues: {\n type: \"interfaceObjectQuery\"\n }\n }\n }],\n status: def.status ?? \"active\",\n rules: [{\n type: \"deleteObjectRule\",\n deleteObjectRule: {\n objectToDelete: \"objectToDeleteParameter\"\n }\n }],\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.interfaceType.apiName],\n affectedLinkTypes: [],\n typeGroups: []\n }\n });\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertValidationRule, defineAction, kebab } from \"./defineAction.js\";\nexport function defineDeleteObjectAction(def) {\n return defineAction({\n apiName: def.apiName ?? `delete-object-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`,\n displayName: def.displayName ?? `Delete ${def.objectType.displayName}`,\n parameters: [{\n id: \"objectToDeleteParameter\",\n displayName: \"Delete object\",\n type: {\n type: \"objectReference\",\n objectReference: {\n objectTypeId: def.objectType.apiName\n }\n },\n validation: {\n required: true,\n allowedValues: {\n type: \"objectQuery\"\n }\n }\n }],\n status: def.status ?? \"active\",\n rules: [{\n type: \"deleteObjectRule\",\n deleteObjectRule: {\n objectToDelete: \"objectToDeleteParameter\"\n }\n }],\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.objectType.apiName],\n affectedLinkTypes: [],\n typeGroups: []\n },\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation)\n } : {})\n });\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { namespace, ontologyDefinition, updateOntology } from \"./defineOntology.js\";\nimport { defaultTypeClasses, getPropertyTypeName, hasRenderHints, shouldNotHaveRenderHints } from \"./propertyConversionUtils.js\";\nexport function defineSharedPropertyType(sptDef) {\n const apiName = namespace + sptDef.apiName;\n !(ontologyDefinition[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE][apiName] === undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Shared property type ${apiName} already exists`) : invariant(false) : void 0;\n !(!shouldNotHaveRenderHints(sptDef.type) || !hasRenderHints(sptDef.typeClasses)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Shared property type ${apiName} of type '${getPropertyTypeName(sptDef.type)}' should not have render hints`) : invariant(false) : void 0;\n const fullSpt = {\n ...sptDef,\n apiName,\n nonNameSpacedApiName: sptDef.apiName,\n displayName: sptDef.displayName ?? sptDef.apiName,\n // This way the non-namespaced api name is the display name (maybe not ideal)\n typeClasses: sptDef.typeClasses ?? (shouldNotHaveRenderHints(sptDef.type) ? [] : defaultTypeClasses),\n __type: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE\n };\n updateOntology(fullSpt);\n return fullSpt;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function mapSimplifiedStatusToInterfaceTypeStatus(status) {\n switch (status.type) {\n case \"deprecated\":\n return {\n type: \"deprecated\",\n deprecated: {\n message: status.message,\n deadline: status.deadline,\n replacedBy: undefined\n }\n };\n case \"active\":\n return {\n type: \"active\",\n active: {}\n };\n case \"experimental\":\n return {\n type: \"experimental\",\n experimental: {}\n };\n default:\n throw new Error(`Invalid status type: ${status.type}`);\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function combineApiNamespaceIfMissing(namespace, apiName) {\n return apiName.includes(\".\") ? apiName : namespace + apiName;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { namespace, ontologyDefinition, updateOntology, withoutNamespace } from \"./defineOntology.js\";\nimport { defineSharedPropertyType } from \"./defineSpt.js\";\nimport { mapSimplifiedStatusToInterfaceTypeStatus } from \"./interface/mapSimplifiedStatusToInterfaceTypeStatus.js\";\nimport { combineApiNamespaceIfMissing } from \"./namespace/combineApiNamespaceIfMissing.js\";\nimport { isPropertyTypeType } from \"./properties/PropertyTypeType.js\";\nexport function defineInterface(interfaceDef) {\n const apiName = namespace + interfaceDef.apiName;\n !(ontologyDefinition[OntologyEntityTypeEnum.INTERFACE_TYPE][apiName] === undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface ${apiName} already exists`) : invariant(false) : void 0;\n const properties = Object.fromEntries(Object.entries(interfaceDef.properties ?? {}).map(([unNamespacedPropApiName, type]) => {\n if (typeof type === \"object\" && \"propertyDefinition\" in type) {\n // If the property is an imported SPT, use the SPT's apiName\n const apiName = combineApiNamespaceIfMissing(namespace, typeof type.propertyDefinition === \"object\" && \"apiName\" in type.propertyDefinition ? type.propertyDefinition.apiName : unNamespacedPropApiName);\n return [apiName, {\n required: type.required,\n sharedPropertyType: unifyBasePropertyDefinition(namespace, unNamespacedPropApiName, type.propertyDefinition)\n }];\n }\n\n // If the property is an imported SPT, use the SPT's apiName\n const apiName = combineApiNamespaceIfMissing(namespace, typeof type === \"object\" && \"apiName\" in type ? type.apiName : unNamespacedPropApiName);\n return [apiName, {\n required: true,\n sharedPropertyType: unifyBasePropertyDefinition(namespace, unNamespacedPropApiName, type)\n }];\n }));\n const extendsInterfaces = interfaceDef.extends ? Array.isArray(interfaceDef.extends) ? interfaceDef.extends : [interfaceDef.extends] : [];\n const status = mapSimplifiedStatusToInterfaceTypeStatus(interfaceDef.status ?? {\n type: \"active\"\n });\n !(status.type !== \"deprecated\" || status.deprecated.message && status.deprecated.deadline) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Deprecated status must include message and deadline properties.`) : invariant(false) : void 0;\n const fullInterface = {\n apiName,\n displayMetadata: {\n displayName: interfaceDef.displayName ?? interfaceDef.apiName,\n description: interfaceDef.description ?? interfaceDef.displayName ?? interfaceDef.apiName,\n icon: interfaceDef.icon !== undefined ? {\n type: \"blueprint\",\n blueprint: {\n color: interfaceDef.icon.color,\n locator: interfaceDef.icon.locator\n }\n } : undefined\n },\n extendsInterfaces,\n links: [],\n status,\n propertiesV2: properties,\n searchable: interfaceDef.searchable ?? true,\n __type: OntologyEntityTypeEnum.INTERFACE_TYPE\n };\n updateOntology(fullInterface);\n return fullInterface;\n}\nfunction unifyBasePropertyDefinition(namespace, apiName, type) {\n if (typeof type === \"string\" || typeof type === \"object\" && !(\"apiName\" in type)) {\n !isPropertyTypeType(type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Invalid data type ${JSON.stringify(type)} for property ${apiName} on InterfaceType ${apiName}`) : invariant(false) : void 0;\n const spt = defineSharedPropertyType({\n apiName,\n displayName: apiName,\n type,\n array: false\n });\n return spt;\n } else {\n const unNamespacedTypeApiName = withoutNamespace(type.apiName);\n !(namespace + apiName === type.apiName || apiName === unNamespacedTypeApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `property key and it's apiName must be identical. ${JSON.stringify({\n key: apiName,\n apiName: type.apiName\n })}`) : invariant(false) : void 0;\n return type;\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { namespace, withoutNamespace } from \"./defineOntology.js\";\nimport { combineApiNamespaceIfMissing } from \"./namespace/combineApiNamespaceIfMissing.js\";\nexport function defineInterfaceLinkConstraint(linkDef) {\n const fromLinkMeta = getLinkMeta(linkDef);\n !(linkDef.from.links.find(a => a.metadata.apiName === fromLinkMeta.apiName) == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Link with apiName ${fromLinkMeta.apiName} already exists on ${linkDef.apiName}`) : invariant(false) : void 0;\n linkDef.from.links.push({\n cardinality: linkDef.toMany ? \"MANY\" : \"SINGLE\",\n linkedEntityTypeId: getLinkedType(linkDef.toMany ?? linkDef.toOne),\n metadata: fromLinkMeta,\n required: linkDef.required ?? true\n });\n}\nfunction getLinkedType(t) {\n return {\n type: \"interfaceType\",\n interfaceType: typeof t === \"string\" ? t : t.apiName\n };\n}\nfunction getLinkMeta(meta) {\n const {\n apiName,\n displayName,\n description\n } = meta;\n const apiNameWithNamespace = combineApiNamespaceIfMissing(namespace, apiName);\n const apiNameWithoutNamespace = withoutNamespace(apiNameWithNamespace);\n return {\n apiName: apiNameWithNamespace,\n displayName: displayName ?? apiNameWithoutNamespace,\n description: description ?? displayName ?? apiNameWithoutNamespace\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { convertToPluralDisplayName, uppercaseFirstLetter } from \"./defineObject.js\";\nimport { updateOntology } from \"./defineOntology.js\";\nexport function defineLink(linkDefinition) {\n // NOTE: we would normally do validation here, but because of circular dependencies\n // we have to wait to validate until everything has been defined. The code for validation\n // was moved to convertLink.ts.\n\n let fullLinkDefinition;\n if (\"one\" in linkDefinition) {\n fullLinkDefinition = {\n ...linkDefinition,\n one: convertUserOneToManyLinkDefinition(linkDefinition.one),\n toMany: convertUserOneToManyLinkDefinition(linkDefinition.toMany)\n };\n } else if (\"intermediaryObjectType\" in linkDefinition) {\n fullLinkDefinition = {\n ...linkDefinition,\n many: convertUserIntermediaryLinkDefinition(linkDefinition.many),\n toMany: convertUserIntermediaryLinkDefinition(linkDefinition.toMany)\n };\n } else {\n fullLinkDefinition = {\n ...linkDefinition,\n many: convertUserManyToManyLinkDefinition(linkDefinition.many),\n toMany: convertUserManyToManyLinkDefinition(linkDefinition.toMany)\n };\n }\n const linkType = {\n cardinality: \"one\" in linkDefinition ? linkDefinition.cardinality : undefined,\n ...fullLinkDefinition,\n apiName: linkDefinition.apiName,\n __type: OntologyEntityTypeEnum.LINK_TYPE\n };\n updateOntology(linkType);\n return linkType;\n}\nfunction convertUserOneToManyLinkDefinition(oneToMany) {\n return {\n ...oneToMany,\n metadata: convertLinkTypeMetadata(oneToMany.metadata)\n };\n}\nfunction convertUserManyToManyLinkDefinition(manyToMany) {\n return {\n ...manyToMany,\n metadata: convertLinkTypeMetadata(manyToMany.metadata)\n };\n}\nfunction convertUserIntermediaryLinkDefinition(intermediary) {\n return {\n ...intermediary,\n metadata: convertLinkTypeMetadata(intermediary.metadata)\n };\n}\nfunction convertLinkTypeMetadata(metadata) {\n return {\n apiName: metadata.apiName,\n displayMetadata: {\n displayName: metadata.displayName ?? uppercaseFirstLetter(metadata.apiName),\n pluralDisplayName: metadata.pluralDisplayName ?? convertToPluralDisplayName(metadata.apiName),\n visibility: metadata.visibility ?? \"NORMAL\",\n groupDisplayName: metadata.groupDisplayName ?? \"\"\n },\n typeClasses: []\n };\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { addNamespaceToActionDefinition, convertValidationRule, createDefaultParameterOrdering, createParameters, defineAction, getInterfaceParameterName, isPropertyParameter, kebab, MODIFY_INTERFACE_OBJECT_PARAMETER, validateActionParameters, validateParameterOrdering } from \"./defineAction.js\";\nimport { getFlattenedInterfaceProperties } from \"./interface/getFlattenedInterfaceProperties.js\";\nexport function defineModifyInterfaceObjectAction(def) {\n addNamespaceToActionDefinition(def);\n const allProperties = getFlattenedInterfaceProperties(def.interfaceType);\n validateActionParameters(def, Object.keys(allProperties), def.interfaceType.apiName);\n const propertyParameters = Object.keys(allProperties).filter(apiName => isPropertyParameter(def, apiName, allProperties[apiName].sharedPropertyType.type));\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(getInterfaceParameterName(def, param)));\n parameterNames.add(MODIFY_INTERFACE_OBJECT_PARAMETER);\n const actionApiName = def.apiName ?? `modify-${kebab(def.interfaceType.apiName.split(\".\").pop() ?? def.interfaceType.apiName)}${def.objectType === undefined ? \"\" : `-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`}`;\n if (def.parameterOrdering) {\n if (!def.parameterOrdering.includes(MODIFY_INTERFACE_OBJECT_PARAMETER)) {\n def.parameterOrdering.unshift(MODIFY_INTERFACE_OBJECT_PARAMETER);\n }\n validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);\n }\n const parameters = createParameters(def, Object.fromEntries(Object.entries(allProperties).map(([id, prop]) => [id, prop.sharedPropertyType])), parameterNames, Object.fromEntries(Object.entries(allProperties).map(([id, prop]) => [id, prop.required])));\n const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName ?? `Modify ${def.interfaceType.displayMetadata.displayName}`,\n parameters: parameters,\n status: def.status ?? (def.interfaceType.status.type !== \"deprecated\" ? def.interfaceType.status.type : def.interfaceType.status),\n entities: {\n affectedInterfaceTypes: [def.interfaceType.apiName],\n affectedObjectTypes: [],\n affectedLinkTypes: [],\n typeGroups: []\n },\n rules: [{\n type: \"modifyInterfaceRule\",\n modifyInterfaceRule: {\n interfaceObjectToModifyParameter: \"interfaceObjectToModifyParameter\",\n sharedPropertyValues: {\n ...Object.fromEntries(propertyParameters.map(id => [id, {\n type: \"parameterId\",\n parameterId: id\n }])),\n ...mappings\n }\n }\n }],\n parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(allProperties), parameters, MODIFY_INTERFACE_OBJECT_PARAMETER),\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation, parameters)\n } : {}),\n ...(def.defaultFormat && {\n defaultFormat: def.defaultFormat\n }),\n ...(def.enableLayoutSwitch && {\n enableLayoutSwitch: def.enableLayoutSwitch\n }),\n ...(def.tableConfiguration && {\n displayAndFormat: {\n table: def.tableConfiguration\n }\n }),\n ...(def.sections && {\n sections: Object.fromEntries(def.sections.map(section => [section.id, section]))\n }),\n ...(def.submissionMetadata && {\n submissionMetadata: def.submissionMetadata\n })\n });\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertMappingValue } from \"../conversion/toMarketplace/convertMappingValue.js\";\nimport { convertValidationRule, createDefaultParameterOrdering, createParameters, defineAction, isPropertyParameter, kebab, MODIFY_OBJECT_PARAMETER, validateActionParameters, validateParameterOrdering } from \"./defineAction.js\";\nexport function defineModifyObjectAction(def) {\n validateActionParameters(def, Object.keys(def.objectType.properties ?? {}), def.objectType.apiName);\n const propertyParameters = Object.keys(def.objectType.properties ?? {}).filter(id => isPropertyParameter(def, id, def.objectType.properties?.[id].type) && id !== def.objectType.primaryKeyPropertyApiName);\n const parameterNames = new Set(propertyParameters);\n Object.keys(def.parameterConfiguration ?? {}).forEach(param => parameterNames.add(param));\n parameterNames.add(MODIFY_OBJECT_PARAMETER);\n const actionApiName = def.apiName ?? `modify-object-${kebab(def.objectType.apiName.split(\".\").pop() ?? def.objectType.apiName)}`;\n if (def.parameterOrdering) {\n if (!def.parameterOrdering.includes(MODIFY_OBJECT_PARAMETER)) {\n def.parameterOrdering.unshift(MODIFY_OBJECT_PARAMETER);\n }\n validateParameterOrdering(def.parameterOrdering, parameterNames, actionApiName);\n }\n const parameters = createParameters(def, def.objectType.properties ?? {}, parameterNames);\n parameters.forEach(p => {\n if (p.id !== MODIFY_OBJECT_PARAMETER && p.defaultValue === undefined) {\n p.defaultValue = {\n type: \"objectParameterPropertyValue\",\n objectParameterPropertyValue: {\n parameterId: MODIFY_OBJECT_PARAMETER,\n propertyTypeId: p.id\n }\n };\n }\n });\n const mappings = Object.fromEntries(Object.entries(def.nonParameterMappings ?? {}).map(([id, value]) => [id, convertMappingValue(value)]));\n return defineAction({\n apiName: actionApiName,\n displayName: def.displayName ?? `Modify ${def.objectType.displayName}`,\n parameters: parameters,\n status: def.status ?? \"active\",\n rules: [{\n type: \"modifyObjectRule\",\n modifyObjectRule: {\n objectToModify: MODIFY_OBJECT_PARAMETER,\n propertyValues: {\n ...Object.fromEntries(propertyParameters.map(p => [p, {\n type: \"parameterId\",\n parameterId: p\n }])),\n ...mappings\n },\n structFieldValues: {}\n }\n }],\n entities: {\n affectedInterfaceTypes: [],\n affectedObjectTypes: [def.objectType.apiName],\n affectedLinkTypes: [],\n typeGroups: []\n },\n parameterOrdering: def.parameterOrdering ?? createDefaultParameterOrdering(def, Object.keys(def.objectType.properties ?? {}), parameters, MODIFY_OBJECT_PARAMETER),\n ...(def.actionLevelValidation ? {\n validation: convertValidationRule(def.actionLevelValidation, parameters)\n } : {}),\n ...(def.defaultFormat && {\n defaultFormat: def.defaultFormat\n }),\n ...(def.enableLayoutSwitch && {\n enableLayoutSwitch: def.enableLayoutSwitch\n }),\n ...(def.tableConfiguration && {\n displayAndFormat: {\n table: def.tableConfiguration\n }\n }),\n ...(def.sections && {\n sections: Object.fromEntries(def.sections.map(section => [section.id, section]))\n }),\n ...(def.submissionMetadata && {\n submissionMetadata: def.submissionMetadata\n })\n });\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { namespace, updateOntology } from \"./defineOntology.js\";\nfunction convertValueTypeTypeToBaseType(valueType) {\n if (typeof valueType === \"string\") {}\n switch (true) {\n case typeof valueType === \"object\" && valueType.type === \"array\":\n return {\n type: \"array\",\n array: {\n elementType: convertValueTypeTypeToBaseType(valueType.elementType)\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"struct\":\n return {\n type: \"structV2\",\n structV2: {\n fields: valueType.fields.map(field => ({\n identifier: field.identifier,\n baseType: convertValueTypeTypeToBaseType(field.baseType)\n }))\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"map\":\n return {\n type: \"map\",\n map: {\n keyType: convertValueTypeTypeToBaseType(valueType.keyType),\n valueType: convertValueTypeTypeToBaseType(valueType.valueType)\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"optional\":\n return {\n type: \"optional\",\n optional: {\n wrappedType: convertValueTypeTypeToBaseType(valueType.wrappedType)\n }\n };\n case typeof valueType === \"string\":\n return {\n type: valueType,\n [valueType]: {}\n };\n default:\n throw new Error(\"Invalid ValueTypeType\");\n }\n}\nexport function defineValueType(valueTypeDef) {\n const {\n apiName,\n displayName,\n description,\n type,\n version\n } = valueTypeDef;\n const semverValidation = /^((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)$/;\n !semverValidation.test(version) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Version is not a valid semver\") : invariant(false) : void 0;\n const typeName = typeof type.type === \"string\" ? type.type : type.type.type === \"struct\" ? \"structV2\" : type.type.type;\n // These suck but TS doesn't understand the relationship from the key of the base type to the type string\n const constraints = type.constraints ? type.constraints.map(constraint => {\n const output = {\n constraint: {\n type: typeName,\n [typeName]: constraint.constraint\n },\n failureMessage: constraint.failureMessage\n };\n return {\n constraint: output\n };\n }) : [];\n const baseType = convertValueTypeTypeToBaseType(type.type);\n const vt = {\n apiName,\n packageNamespace: namespace.substring(0, namespace.length - 1),\n displayMetadata: {\n displayName: displayName,\n description: description ?? \"\"\n },\n status: {\n type: \"active\",\n active: {}\n },\n version: version,\n baseType: baseType,\n constraints: constraints,\n exampleValues: [],\n __type: OntologyEntityTypeEnum.VALUE_TYPE\n };\n updateOntology(vt);\n return vt;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { importedTypes } from \"./defineOntology.js\";\nexport function importOntologyEntity(e) {\n if (e.__type !== OntologyEntityTypeEnum.VALUE_TYPE) {\n importedTypes[e.__type][e.apiName] = e;\n return;\n }\n // value types are a special case\n if (importedTypes[OntologyEntityTypeEnum.VALUE_TYPE][e.apiName] === undefined) {\n importedTypes[OntologyEntityTypeEnum.VALUE_TYPE][e.apiName] = [];\n }\n importedTypes[OntologyEntityTypeEnum.VALUE_TYPE][e.apiName].push(e);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport { importOntologyEntity } from \"./importOntologyEntity.js\";\n/**\n * Defines a foreign shared property type you want to take as an input to your product. The typeHint field is used for OSDK generation\n */\nexport function importSharedPropertyType(opts) {\n const {\n apiName,\n packageName,\n typeHint,\n array\n } = opts;\n const fullApiName = packageName === undefined ? apiName : `${packageName}.${apiName}`;\n if (packageName !== undefined) {\n !!packageName.endsWith(\".\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Package name format invalid ends with period\") : invariant(false) : void 0;\n !(packageName.match(\"[A-Z]\") == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Package name includes upper case characters\") : invariant(false) : void 0;\n }\n const spt = {\n apiName: fullApiName,\n type: typeHint,\n nonNameSpacedApiName: apiName,\n array: array ?? false,\n __type: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE\n };\n importOntologyEntity(spt);\n return spt;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { importOntologyEntity } from \"./importOntologyEntity.js\";\n\n/**\n * Wraps an OntologyEntityType with a Proxy that calls importOntologyEntity when properties are accessed.\n *\n * @param entity - The OntologyEntityType to wrap with a Proxy\n * @returns A Proxy that imports the entity when properties are accessed\n */\nexport function wrapWithProxy(entity) {\n return new Proxy(entity, {\n get(target, prop, receiver) {\n importOntologyEntity(target);\n return Reflect.get(target, prop, receiver);\n }\n });\n}"]}
|