@osdk/maker 0.13.0-beta.9 → 0.14.0-beta.2
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 +91 -0
- package/README.md +55 -13
- package/build/browser/api/action/ActionLevelValidationDefinition.js +2 -0
- package/build/browser/api/action/ActionLevelValidationDefinition.js.map +1 -0
- package/build/browser/api/action/ActionParameter.js +2 -0
- package/build/browser/api/action/ActionParameter.js.map +1 -0
- package/build/browser/api/action/ActionParameterAllowedValues.js +2 -0
- package/build/browser/api/action/ActionParameterAllowedValues.js.map +1 -0
- package/build/browser/api/action/ActionParameterConditionalOverride.js +2 -0
- package/build/browser/api/action/ActionParameterConditionalOverride.js.map +1 -0
- package/build/browser/api/action/ActionParameterConfiguration.js +2 -0
- package/build/browser/api/action/ActionParameterConfiguration.js.map +1 -0
- package/build/browser/api/action/ActionParameterType.js +22 -0
- package/build/browser/api/action/ActionParameterType.js.map +1 -0
- package/build/browser/api/action/ActionSection.js +2 -0
- package/build/browser/api/action/ActionSection.js.map +1 -0
- package/build/browser/api/action/ActionStatus.js +2 -0
- package/build/browser/api/action/ActionStatus.js.map +1 -0
- package/build/browser/api/action/ActionType.js +2 -0
- package/build/browser/api/action/ActionType.js.map +1 -0
- package/build/browser/api/action/ActionValidationRule.js +2 -0
- package/build/browser/api/action/ActionValidationRule.js.map +1 -0
- package/build/browser/api/action/ConditionDefinition.js +2 -0
- package/build/browser/api/action/ConditionDefinition.js.map +1 -0
- package/build/browser/api/action/MappingValue.js +2 -0
- package/build/browser/api/action/MappingValue.js.map +1 -0
- package/build/browser/api/action/SectionConditionalOverride.js +2 -0
- package/build/browser/api/action/SectionConditionalOverride.js.map +1 -0
- package/build/browser/api/action/SubmissionMetadata.js +2 -0
- package/build/browser/api/action/SubmissionMetadata.js.map +1 -0
- package/build/browser/api/common/BlueprintIcons.js +2 -0
- package/build/browser/api/common/BlueprintIcons.js.map +1 -0
- package/build/browser/api/common/OntologyDefinition.js +2 -0
- package/build/browser/api/common/OntologyDefinition.js.map +1 -0
- package/build/browser/api/common/OntologyEntityBase.js +2 -0
- package/build/browser/api/common/OntologyEntityBase.js.map +1 -0
- package/build/browser/api/{types.js → common/OntologyEntityTypeEnum.js} +2 -8
- package/build/browser/api/common/OntologyEntityTypeEnum.js.map +1 -0
- package/build/browser/api/common/OntologyEntityTypeMapping.js +2 -0
- package/build/browser/api/common/OntologyEntityTypeMapping.js.map +1 -0
- package/build/browser/api/common/TypeClass.js +2 -0
- package/build/browser/api/common/TypeClass.js.map +1 -0
- package/build/browser/api/defineAction.js +69 -46
- package/build/browser/api/defineAction.js.map +1 -1
- package/build/browser/api/defineInterface.js +14 -34
- package/build/browser/api/defineInterface.js.map +1 -1
- package/build/browser/api/defineInterfaceLinkConstraint.js +3 -2
- package/build/browser/api/defineInterfaceLinkConstraint.js.map +1 -1
- package/build/browser/api/defineLink.js +33 -12
- package/build/browser/api/defineLink.js.map +1 -1
- package/build/browser/api/defineObject.js +9 -29
- package/build/browser/api/defineObject.js.map +1 -1
- package/build/browser/api/defineOntology.js +17 -552
- package/build/browser/api/defineOntology.js.map +1 -1
- package/build/browser/api/defineSpt.js +1 -1
- package/build/browser/api/defineSpt.js.map +1 -1
- package/build/browser/api/defineValueType.js +1 -1
- package/build/browser/api/defineValueType.js.map +1 -1
- package/build/browser/api/importOntologyEntity.js +1 -1
- package/build/browser/api/importOntologyEntity.js.map +1 -1
- package/build/browser/api/{defineImportSpt.js → importSharedPropertyType.js} +2 -3
- package/build/browser/api/importSharedPropertyType.js.map +1 -0
- package/build/browser/api/interface/InterfacePropertyType.js +2 -0
- package/build/browser/api/interface/InterfacePropertyType.js.map +1 -0
- package/build/browser/api/interface/InterfaceType.js +2 -0
- package/build/browser/api/interface/InterfaceType.js.map +1 -0
- package/build/browser/api/interface/getFlattenedInterfaceProperties.js +27 -0
- package/build/browser/api/interface/getFlattenedInterfaceProperties.js.map +1 -0
- package/build/browser/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js +42 -0
- package/build/browser/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js.map +1 -0
- package/build/browser/api/links/LinkType.js +2 -0
- package/build/browser/api/links/LinkType.js.map +1 -0
- package/build/browser/api/namespace/combineApiNamespaceIfMissing.js +20 -0
- package/build/browser/api/namespace/combineApiNamespaceIfMissing.js.map +1 -0
- package/build/browser/api/object/InterfaceImplementation.js +2 -0
- package/build/browser/api/object/InterfaceImplementation.js.map +1 -0
- package/build/browser/api/object/ObjectPropertyType.js +2 -0
- package/build/browser/api/object/ObjectPropertyType.js.map +1 -0
- package/build/browser/api/object/ObjectPropertyTypeUserDefinition.js +2 -0
- package/build/browser/api/object/ObjectPropertyTypeUserDefinition.js.map +1 -0
- package/build/browser/api/object/ObjectType.js +2 -0
- package/build/browser/api/object/ObjectType.js.map +1 -0
- package/build/browser/api/object/ObjectTypeDatasourceDefinition.js +2 -0
- package/build/browser/api/object/ObjectTypeDatasourceDefinition.js.map +1 -0
- package/build/browser/api/object/ObjectTypeDefinition.js +2 -0
- package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -0
- package/build/browser/api/object/ObjectTypeStatus.js +2 -0
- package/build/browser/api/object/ObjectTypeStatus.js.map +1 -0
- package/build/browser/api/objectStatus.test.js.map +1 -1
- package/build/browser/api/overall.test.js +1987 -691
- package/build/browser/api/overall.test.js.map +1 -1
- package/build/browser/api/properties/Nullability.js +2 -0
- package/build/browser/api/properties/Nullability.js.map +1 -0
- package/build/browser/api/properties/PropertyTypeType.js +34 -0
- package/build/browser/api/properties/PropertyTypeType.js.map +1 -0
- package/build/browser/api/properties/SharedPropertyType.js +2 -0
- package/build/browser/api/properties/SharedPropertyType.js.map +1 -0
- package/build/browser/api/propertyConversionUtils.js +0 -238
- package/build/browser/api/propertyConversionUtils.js.map +1 -1
- package/build/browser/api/values/ValueTypeDefinitionVersion.js +2 -0
- package/build/browser/api/values/ValueTypeDefinitionVersion.js.map +1 -0
- package/build/browser/api/values/ValueTypeType.js +2 -0
- package/build/browser/api/values/ValueTypeType.js.map +1 -0
- package/build/browser/api/wrapWithProxy.js +1 -0
- package/build/browser/api/wrapWithProxy.js.map +1 -1
- package/build/browser/cli/main.js +13 -4
- package/build/browser/cli/main.js.map +1 -1
- package/build/browser/conversion/toConjure/distributeTypeHelper.js +23 -0
- package/build/browser/conversion/toConjure/distributeTypeHelper.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js +88 -0
- package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertActionParameters.js +31 -0
- package/build/browser/conversion/toMarketplace/convertActionParameters.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertActionSections.js +43 -0
- package/build/browser/conversion/toMarketplace/convertActionSections.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertActionValidation.js +93 -0
- package/build/browser/conversion/toMarketplace/convertActionValidation.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertActionVisibility.js +41 -0
- package/build/browser/conversion/toMarketplace/convertActionVisibility.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertCardinality.js +23 -0
- package/build/browser/conversion/toMarketplace/convertCardinality.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertConditionDefinition.js +88 -0
- package/build/browser/conversion/toMarketplace/convertConditionDefinition.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertDataConstraintToDataConstraints.js +26 -0
- package/build/browser/conversion/toMarketplace/convertDataConstraintToDataConstraints.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js +89 -0
- package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertInterface.js +47 -0
- package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertLink.js +132 -0
- package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertMappingValue.js +41 -0
- package/build/browser/conversion/toMarketplace/convertMappingValue.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js +43 -0
- package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertObject.js +108 -0
- package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js +53 -0
- package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js +29 -0
- package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +57 -0
- package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertOntologyToValueTypeIr.js +24 -0
- package/build/browser/conversion/toMarketplace/convertOntologyToValueTypeIr.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js +35 -0
- package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertSpt.js +62 -0
- package/build/browser/conversion/toMarketplace/convertSpt.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertValueType.js +25 -0
- package/build/browser/conversion/toMarketplace/convertValueType.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertValueTypeDataConstraints.js +30 -0
- package/build/browser/conversion/toMarketplace/convertValueTypeDataConstraints.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertValueTypesToIr.js +34 -0
- package/build/browser/conversion/toMarketplace/convertValueTypesToIr.js.map +1 -0
- package/build/browser/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js +83 -0
- package/build/browser/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js.map +1 -0
- package/build/browser/conversion/toMarketplace/getFormContentOrdering.js +39 -0
- package/build/browser/conversion/toMarketplace/getFormContentOrdering.js.map +1 -0
- package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +124 -0
- package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
- package/build/browser/index.js +5 -5
- package/build/browser/index.js.map +1 -1
- package/build/browser/util/OptionalFields.js +2 -0
- package/build/browser/util/OptionalFields.js.map +1 -0
- package/build/browser/util/RequiredFields.js +2 -0
- package/build/browser/util/RequiredFields.js.map +1 -0
- package/build/cjs/index.cjs +1177 -1045
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +417 -346
- package/build/esm/api/action/ActionLevelValidationDefinition.js +2 -0
- package/build/esm/api/action/ActionLevelValidationDefinition.js.map +1 -0
- package/build/esm/api/action/ActionParameter.js +2 -0
- package/build/esm/api/action/ActionParameter.js.map +1 -0
- package/build/esm/api/action/ActionParameterAllowedValues.js +2 -0
- package/build/esm/api/action/ActionParameterAllowedValues.js.map +1 -0
- package/build/esm/api/action/ActionParameterConditionalOverride.js +2 -0
- package/build/esm/api/action/ActionParameterConditionalOverride.js.map +1 -0
- package/build/esm/api/action/ActionParameterConfiguration.js +2 -0
- package/build/esm/api/action/ActionParameterConfiguration.js.map +1 -0
- package/build/esm/api/action/ActionParameterType.js +22 -0
- package/build/esm/api/action/ActionParameterType.js.map +1 -0
- package/build/esm/api/action/ActionSection.js +2 -0
- package/build/esm/api/action/ActionSection.js.map +1 -0
- package/build/esm/api/action/ActionStatus.js +2 -0
- package/build/esm/api/action/ActionStatus.js.map +1 -0
- package/build/esm/api/action/ActionType.js +2 -0
- package/build/esm/api/action/ActionType.js.map +1 -0
- package/build/esm/api/action/ActionValidationRule.js +2 -0
- package/build/esm/api/action/ActionValidationRule.js.map +1 -0
- package/build/esm/api/action/ConditionDefinition.js +2 -0
- package/build/esm/api/action/ConditionDefinition.js.map +1 -0
- package/build/esm/api/action/MappingValue.js +2 -0
- package/build/esm/api/action/MappingValue.js.map +1 -0
- package/build/esm/api/action/SectionConditionalOverride.js +2 -0
- package/build/esm/api/action/SectionConditionalOverride.js.map +1 -0
- package/build/esm/api/action/SubmissionMetadata.js +2 -0
- package/build/esm/api/action/SubmissionMetadata.js.map +1 -0
- package/build/esm/api/common/BlueprintIcons.js +2 -0
- package/build/esm/api/common/BlueprintIcons.js.map +1 -0
- package/build/esm/api/common/OntologyDefinition.js +2 -0
- package/build/esm/api/common/OntologyDefinition.js.map +1 -0
- package/build/esm/api/common/OntologyEntityBase.js +2 -0
- package/build/esm/api/common/OntologyEntityBase.js.map +1 -0
- package/build/esm/api/{types.js → common/OntologyEntityTypeEnum.js} +2 -8
- package/build/esm/api/common/OntologyEntityTypeEnum.js.map +1 -0
- package/build/esm/api/common/OntologyEntityTypeMapping.js +2 -0
- package/build/esm/api/common/OntologyEntityTypeMapping.js.map +1 -0
- package/build/esm/api/common/TypeClass.js +2 -0
- package/build/esm/api/common/TypeClass.js.map +1 -0
- package/build/esm/api/defineAction.js +69 -46
- package/build/esm/api/defineAction.js.map +1 -1
- package/build/esm/api/defineInterface.js +14 -34
- package/build/esm/api/defineInterface.js.map +1 -1
- package/build/esm/api/defineInterfaceLinkConstraint.js +3 -2
- package/build/esm/api/defineInterfaceLinkConstraint.js.map +1 -1
- package/build/esm/api/defineLink.js +33 -12
- package/build/esm/api/defineLink.js.map +1 -1
- package/build/esm/api/defineObject.js +9 -29
- package/build/esm/api/defineObject.js.map +1 -1
- package/build/esm/api/defineOntology.js +17 -552
- package/build/esm/api/defineOntology.js.map +1 -1
- package/build/esm/api/defineSpt.js +1 -1
- package/build/esm/api/defineSpt.js.map +1 -1
- package/build/esm/api/defineValueType.js +1 -1
- package/build/esm/api/defineValueType.js.map +1 -1
- package/build/esm/api/importOntologyEntity.js +1 -1
- package/build/esm/api/importOntologyEntity.js.map +1 -1
- package/build/esm/api/{defineImportSpt.js → importSharedPropertyType.js} +2 -3
- package/build/esm/api/importSharedPropertyType.js.map +1 -0
- package/build/esm/api/interface/InterfacePropertyType.js +2 -0
- package/build/esm/api/interface/InterfacePropertyType.js.map +1 -0
- package/build/esm/api/interface/InterfaceType.js +2 -0
- package/build/esm/api/interface/InterfaceType.js.map +1 -0
- package/build/esm/api/interface/getFlattenedInterfaceProperties.js +27 -0
- package/build/esm/api/interface/getFlattenedInterfaceProperties.js.map +1 -0
- package/build/esm/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js +42 -0
- package/build/esm/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js.map +1 -0
- package/build/esm/api/links/LinkType.js +2 -0
- package/build/esm/api/links/LinkType.js.map +1 -0
- package/build/esm/api/namespace/combineApiNamespaceIfMissing.js +20 -0
- package/build/esm/api/namespace/combineApiNamespaceIfMissing.js.map +1 -0
- package/build/esm/api/object/InterfaceImplementation.js +2 -0
- package/build/esm/api/object/InterfaceImplementation.js.map +1 -0
- package/build/esm/api/object/ObjectPropertyType.js +2 -0
- package/build/esm/api/object/ObjectPropertyType.js.map +1 -0
- package/build/esm/api/object/ObjectPropertyTypeUserDefinition.js +2 -0
- package/build/esm/api/object/ObjectPropertyTypeUserDefinition.js.map +1 -0
- package/build/esm/api/object/ObjectType.js +2 -0
- package/build/esm/api/object/ObjectType.js.map +1 -0
- package/build/esm/api/object/ObjectTypeDatasourceDefinition.js +2 -0
- package/build/esm/api/object/ObjectTypeDatasourceDefinition.js.map +1 -0
- package/build/esm/api/object/ObjectTypeDefinition.js +2 -0
- package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -0
- package/build/esm/api/object/ObjectTypeStatus.js +2 -0
- package/build/esm/api/object/ObjectTypeStatus.js.map +1 -0
- package/build/esm/api/objectStatus.test.js.map +1 -1
- package/build/esm/api/overall.test.js +1987 -691
- package/build/esm/api/overall.test.js.map +1 -1
- package/build/esm/api/properties/Nullability.js +2 -0
- package/build/esm/api/properties/Nullability.js.map +1 -0
- package/build/esm/api/properties/PropertyTypeType.js +34 -0
- package/build/esm/api/properties/PropertyTypeType.js.map +1 -0
- package/build/esm/api/properties/SharedPropertyType.js +2 -0
- package/build/esm/api/properties/SharedPropertyType.js.map +1 -0
- package/build/esm/api/propertyConversionUtils.js +0 -238
- package/build/esm/api/propertyConversionUtils.js.map +1 -1
- package/build/esm/api/values/ValueTypeDefinitionVersion.js +2 -0
- package/build/esm/api/values/ValueTypeDefinitionVersion.js.map +1 -0
- package/build/esm/api/values/ValueTypeType.js +2 -0
- package/build/esm/api/values/ValueTypeType.js.map +1 -0
- package/build/esm/api/wrapWithProxy.js +1 -0
- package/build/esm/api/wrapWithProxy.js.map +1 -1
- package/build/esm/cli/main.js +13 -4
- package/build/esm/cli/main.js.map +1 -1
- package/build/esm/conversion/toConjure/distributeTypeHelper.js +23 -0
- package/build/esm/conversion/toConjure/distributeTypeHelper.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js +88 -0
- package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertActionParameters.js +31 -0
- package/build/esm/conversion/toMarketplace/convertActionParameters.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertActionSections.js +43 -0
- package/build/esm/conversion/toMarketplace/convertActionSections.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertActionValidation.js +93 -0
- package/build/esm/conversion/toMarketplace/convertActionValidation.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertActionVisibility.js +41 -0
- package/build/esm/conversion/toMarketplace/convertActionVisibility.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertCardinality.js +23 -0
- package/build/esm/conversion/toMarketplace/convertCardinality.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertConditionDefinition.js +88 -0
- package/build/esm/conversion/toMarketplace/convertConditionDefinition.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertDataConstraintToDataConstraints.js +26 -0
- package/build/esm/conversion/toMarketplace/convertDataConstraintToDataConstraints.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js +89 -0
- package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertInterface.js +47 -0
- package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertLink.js +132 -0
- package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertMappingValue.js +41 -0
- package/build/esm/conversion/toMarketplace/convertMappingValue.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js +43 -0
- package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertObject.js +108 -0
- package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js +53 -0
- package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js +29 -0
- package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +57 -0
- package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertOntologyToValueTypeIr.js +24 -0
- package/build/esm/conversion/toMarketplace/convertOntologyToValueTypeIr.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js +35 -0
- package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertSpt.js +62 -0
- package/build/esm/conversion/toMarketplace/convertSpt.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertValueType.js +25 -0
- package/build/esm/conversion/toMarketplace/convertValueType.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertValueTypeDataConstraints.js +30 -0
- package/build/esm/conversion/toMarketplace/convertValueTypeDataConstraints.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertValueTypesToIr.js +34 -0
- package/build/esm/conversion/toMarketplace/convertValueTypesToIr.js.map +1 -0
- package/build/esm/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js +83 -0
- package/build/esm/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.js.map +1 -0
- package/build/esm/conversion/toMarketplace/getFormContentOrdering.js +39 -0
- package/build/esm/conversion/toMarketplace/getFormContentOrdering.js.map +1 -0
- package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +124 -0
- package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
- package/build/esm/index.js +5 -5
- package/build/esm/index.js.map +1 -1
- package/build/esm/util/OptionalFields.js +2 -0
- package/build/esm/util/OptionalFields.js.map +1 -0
- package/build/esm/util/RequiredFields.js +2 -0
- package/build/esm/util/RequiredFields.js.map +1 -0
- package/build/types/api/action/ActionLevelValidationDefinition.d.ts +7 -0
- package/build/types/api/action/ActionLevelValidationDefinition.d.ts.map +1 -0
- package/build/types/api/action/ActionParameter.d.ts +14 -0
- package/build/types/api/action/ActionParameter.d.ts.map +1 -0
- package/build/types/api/action/ActionParameterAllowedValues.d.ts +50 -0
- package/build/types/api/action/ActionParameterAllowedValues.d.ts.map +1 -0
- package/build/types/api/action/ActionParameterConditionalOverride.d.ts +26 -0
- package/build/types/api/action/ActionParameterConditionalOverride.d.ts.map +1 -0
- package/build/types/api/action/ActionParameterConfiguration.d.ts +20 -0
- package/build/types/api/action/ActionParameterConfiguration.d.ts.map +1 -0
- package/build/types/api/action/ActionParameterType.d.ts +6 -0
- package/build/types/api/action/ActionParameterType.d.ts.map +1 -0
- package/build/types/api/action/ActionSection.d.ts +13 -0
- package/build/types/api/action/ActionSection.d.ts.map +1 -0
- package/build/types/api/action/ActionStatus.d.ts +2 -0
- package/build/types/api/action/ActionStatus.d.ts.map +1 -0
- package/build/types/api/action/ActionType.d.ts +36 -0
- package/build/types/api/action/ActionType.d.ts.map +1 -0
- package/build/types/api/action/ActionValidationRule.d.ts +2 -0
- package/build/types/api/action/ActionValidationRule.d.ts.map +1 -0
- package/build/types/api/action/ConditionDefinition.d.ts +15 -0
- package/build/types/api/action/ConditionDefinition.d.ts.map +1 -0
- package/build/types/api/action/MappingValue.d.ts +13 -0
- package/build/types/api/action/MappingValue.d.ts.map +1 -0
- package/build/types/api/action/SectionConditionalOverride.d.ts +2 -0
- package/build/types/api/action/SectionConditionalOverride.d.ts.map +1 -0
- package/build/types/api/action/SubmissionMetadata.d.ts +6 -0
- package/build/types/api/action/SubmissionMetadata.d.ts.map +1 -0
- package/build/types/api/{iconNames.d.ts.map → common/BlueprintIcons.d.ts.map} +1 -1
- package/build/types/api/common/OntologyDefinition.d.ts +6 -0
- package/build/types/api/common/OntologyDefinition.d.ts.map +1 -0
- package/build/types/api/common/OntologyEntityBase.d.ts +5 -0
- package/build/types/api/common/OntologyEntityBase.d.ts.map +1 -0
- package/build/types/api/common/OntologyEntityTypeEnum.d.ts +8 -0
- package/build/types/api/common/OntologyEntityTypeEnum.d.ts.map +1 -0
- package/build/types/api/common/OntologyEntityTypeMapping.d.ts +16 -0
- package/build/types/api/common/OntologyEntityTypeMapping.d.ts.map +1 -0
- package/build/types/api/common/TypeClass.d.ts +4 -0
- package/build/types/api/common/TypeClass.d.ts.map +1 -0
- package/build/types/api/defineAction.d.ts +38 -3
- package/build/types/api/defineAction.d.ts.map +1 -1
- package/build/types/api/defineInterface.d.ts +5 -3
- package/build/types/api/defineInterface.d.ts.map +1 -1
- package/build/types/api/defineInterfaceLinkConstraint.d.ts +1 -1
- package/build/types/api/defineInterfaceLinkConstraint.d.ts.map +1 -1
- package/build/types/api/defineLink.d.ts +1 -1
- package/build/types/api/defineLink.d.ts.map +1 -1
- package/build/types/api/defineObject.d.ts +2 -4
- package/build/types/api/defineObject.d.ts.map +1 -1
- package/build/types/api/defineOntology.d.ts +11 -4
- package/build/types/api/defineOntology.d.ts.map +1 -1
- package/build/types/api/defineSpt.d.ts +2 -1
- package/build/types/api/defineSpt.d.ts.map +1 -1
- package/build/types/api/defineValueType.d.ts +2 -1
- package/build/types/api/defineValueType.d.ts.map +1 -1
- package/build/types/api/importOntologyEntity.d.ts +1 -1
- package/build/types/api/importOntologyEntity.d.ts.map +1 -1
- package/build/types/api/{defineImportSpt.d.ts → importSharedPropertyType.d.ts} +2 -1
- package/build/types/api/importSharedPropertyType.d.ts.map +1 -0
- package/build/types/api/interface/InterfacePropertyType.d.ts +5 -0
- package/build/types/api/interface/InterfacePropertyType.d.ts.map +1 -0
- package/build/types/api/interface/InterfaceType.d.ts +10 -0
- package/build/types/api/interface/InterfaceType.d.ts.map +1 -0
- package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts +3 -0
- package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts.map +1 -0
- package/build/types/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.d.ts +3 -0
- package/build/types/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.d.ts.map +1 -0
- package/build/types/api/links/LinkType.d.ts +100 -0
- package/build/types/api/links/LinkType.d.ts.map +1 -0
- package/build/types/api/namespace/combineApiNamespaceIfMissing.d.ts +1 -0
- package/build/types/api/namespace/combineApiNamespaceIfMissing.d.ts.map +1 -0
- package/build/types/api/object/InterfaceImplementation.d.ts +8 -0
- package/build/types/api/object/InterfaceImplementation.d.ts.map +1 -0
- package/build/types/api/object/ObjectPropertyType.d.ts +27 -0
- package/build/types/api/object/ObjectPropertyType.d.ts.map +1 -0
- package/build/types/api/object/ObjectPropertyTypeUserDefinition.d.ts +3 -0
- package/build/types/api/object/ObjectPropertyTypeUserDefinition.d.ts.map +1 -0
- package/build/types/api/object/ObjectType.d.ts +29 -0
- package/build/types/api/object/ObjectType.d.ts.map +1 -0
- package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts +11 -0
- package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts.map +1 -0
- package/build/types/api/object/ObjectTypeDefinition.d.ts +26 -0
- package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -0
- package/build/types/api/object/ObjectTypeStatus.d.ts +5 -0
- package/build/types/api/object/ObjectTypeStatus.d.ts.map +1 -0
- package/build/types/api/properties/Nullability.d.ts +4 -0
- package/build/types/api/properties/Nullability.d.ts.map +1 -0
- package/build/types/api/properties/PropertyTypeType.d.ts +33 -0
- package/build/types/api/properties/PropertyTypeType.d.ts.map +1 -0
- package/build/types/api/properties/SharedPropertyType.d.ts +22 -0
- package/build/types/api/properties/SharedPropertyType.d.ts.map +1 -0
- package/build/types/api/propertyConversionUtils.d.ts +2 -20
- package/build/types/api/propertyConversionUtils.d.ts.map +1 -1
- package/build/types/api/values/ValueTypeDefinitionVersion.d.ts +14 -0
- package/build/types/api/values/ValueTypeDefinitionVersion.d.ts.map +1 -0
- package/build/types/api/values/ValueTypeType.d.ts +178 -0
- package/build/types/api/values/ValueTypeType.d.ts.map +1 -0
- package/build/types/api/wrapWithProxy.d.ts +1 -1
- package/build/types/api/wrapWithProxy.d.ts.map +1 -1
- package/build/types/cli/main.d.ts.map +1 -1
- package/build/types/conversion/toConjure/distributeTypeHelper.d.ts +3 -0
- package/build/types/conversion/toConjure/distributeTypeHelper.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts +4 -0
- package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertActionParameters.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertActionParameters.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertActionSections.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertActionSections.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertActionValidation.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertActionValidation.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertActionVisibility.d.ts +2 -0
- package/build/types/conversion/toMarketplace/convertActionVisibility.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertCardinality.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertCardinality.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts +4 -0
- package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertDataConstraintToDataConstraints.d.ts +2 -0
- package/build/types/conversion/toMarketplace/convertDataConstraintToDataConstraints.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts +4 -0
- package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertInterface.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertInterface.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertLink.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertMappingValue.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertMappingValue.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts +7 -0
- package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertObject.d.ts +9 -0
- package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertOntologyToValueTypeIr.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertOntologyToValueTypeIr.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts +4 -0
- package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertSpt.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertSpt.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertValueType.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertValueType.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertValueTypeDataConstraints.d.ts +2 -0
- package/build/types/conversion/toMarketplace/convertValueTypeDataConstraints.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertValueTypesToIr.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertValueTypesToIr.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.d.ts +2 -0
- package/build/types/conversion/toMarketplace/dataConstraintToPropertyTypeDataConstraint.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/getFormContentOrdering.d.ts +3 -0
- package/build/types/conversion/toMarketplace/getFormContentOrdering.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts +3 -0
- package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts.map +1 -0
- package/build/types/index.d.ts +22 -6
- package/build/types/index.d.ts.map +1 -1
- package/build/types/util/OptionalFields.d.ts +4 -0
- package/build/types/util/OptionalFields.d.ts.map +1 -0
- package/build/types/util/RequiredFields.d.ts +4 -0
- package/build/types/util/RequiredFields.d.ts.map +1 -0
- package/package.json +5 -5
- package/build/browser/api/defineImportSpt.js.map +0 -1
- package/build/browser/api/iconNames.js +0 -2
- package/build/browser/api/iconNames.js.map +0 -1
- package/build/browser/api/ontologyUtils.js +0 -243
- package/build/browser/api/ontologyUtils.js.map +0 -1
- package/build/browser/api/types.js.map +0 -1
- package/build/esm/api/defineImportSpt.js.map +0 -1
- package/build/esm/api/iconNames.js +0 -2
- package/build/esm/api/iconNames.js.map +0 -1
- package/build/esm/api/ontologyUtils.js +0 -243
- package/build/esm/api/ontologyUtils.js.map +0 -1
- package/build/esm/api/types.js.map +0 -1
- package/build/types/api/defineImportSpt.d.ts.map +0 -1
- package/build/types/api/ontologyUtils.d.ts +0 -8
- package/build/types/api/ontologyUtils.d.ts.map +0 -1
- package/build/types/api/types.d.ts +0 -625
- package/build/types/api/types.d.ts.map +0 -1
- /package/build/types/api/{iconNames.d.ts → common/BlueprintIcons.d.ts} +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { cleanAndValidateLinkTypeId } from "../../api/defineOntology.js";
|
|
18
|
+
import { convertCardinality } from "./convertCardinality.js";
|
|
19
|
+
export function convertLink(linkType) {
|
|
20
|
+
let definition;
|
|
21
|
+
let datasource = undefined;
|
|
22
|
+
if ("one" in linkType) {
|
|
23
|
+
definition = {
|
|
24
|
+
type: "oneToMany",
|
|
25
|
+
oneToMany: {
|
|
26
|
+
cardinalityHint: convertCardinality(linkType.cardinality),
|
|
27
|
+
manyToOneLinkMetadata: linkType.toMany.metadata,
|
|
28
|
+
objectTypeRidManySide: linkType.toMany.object.apiName,
|
|
29
|
+
objectTypeRidOneSide: linkType.one.object.apiName,
|
|
30
|
+
oneToManyLinkMetadata: linkType.one.metadata,
|
|
31
|
+
oneSidePrimaryKeyToManySidePropertyMapping: [{
|
|
32
|
+
from: {
|
|
33
|
+
apiName: linkType.one.object.primaryKeyPropertyApiName,
|
|
34
|
+
object: linkType.one.object.apiName
|
|
35
|
+
},
|
|
36
|
+
to: {
|
|
37
|
+
apiName: linkType.manyForeignKeyProperty,
|
|
38
|
+
object: linkType.toMany.object.apiName
|
|
39
|
+
}
|
|
40
|
+
}]
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
} else if ("intermediaryObjectType" in linkType) {
|
|
44
|
+
definition = {
|
|
45
|
+
type: "intermediary",
|
|
46
|
+
intermediary: {
|
|
47
|
+
objectTypeAToBLinkMetadata: linkType.many.metadata,
|
|
48
|
+
objectTypeBToALinkMetadata: linkType.toMany.metadata,
|
|
49
|
+
objectTypeRidA: linkType.many.object.apiName,
|
|
50
|
+
objectTypeRidB: linkType.toMany.object.apiName,
|
|
51
|
+
intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,
|
|
52
|
+
aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(linkType.many.linkToIntermediary.apiName),
|
|
53
|
+
intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(linkType.toMany.linkToIntermediary.apiName)
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
} else {
|
|
57
|
+
definition = {
|
|
58
|
+
type: "manyToMany",
|
|
59
|
+
manyToMany: {
|
|
60
|
+
objectTypeAToBLinkMetadata: linkType.many.metadata,
|
|
61
|
+
objectTypeBToALinkMetadata: linkType.toMany.metadata,
|
|
62
|
+
objectTypeRidA: linkType.many.object.apiName,
|
|
63
|
+
objectTypeRidB: linkType.toMany.object.apiName,
|
|
64
|
+
peeringMetadata: undefined,
|
|
65
|
+
objectTypeAPrimaryKeyPropertyMapping: [{
|
|
66
|
+
from: {
|
|
67
|
+
apiName: linkType.many.object.primaryKeyPropertyApiName,
|
|
68
|
+
object: linkType.many.object.apiName
|
|
69
|
+
},
|
|
70
|
+
to: {
|
|
71
|
+
apiName: linkType.many.object.primaryKeyPropertyApiName,
|
|
72
|
+
object: linkType.many.object.apiName
|
|
73
|
+
}
|
|
74
|
+
}],
|
|
75
|
+
objectTypeBPrimaryKeyPropertyMapping: [{
|
|
76
|
+
from: {
|
|
77
|
+
apiName: linkType.toMany.object.primaryKeyPropertyApiName,
|
|
78
|
+
object: linkType.toMany.object.apiName
|
|
79
|
+
},
|
|
80
|
+
to: {
|
|
81
|
+
apiName: linkType.toMany.object.primaryKeyPropertyApiName,
|
|
82
|
+
object: linkType.toMany.object.apiName
|
|
83
|
+
}
|
|
84
|
+
}]
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
datasource = {
|
|
88
|
+
datasourceName: linkType.apiName,
|
|
89
|
+
datasource: {
|
|
90
|
+
type: "dataset",
|
|
91
|
+
dataset: {
|
|
92
|
+
datasetRid: "link-".concat(linkType.apiName),
|
|
93
|
+
writebackDatasetRid: undefined,
|
|
94
|
+
objectTypeAPrimaryKeyMapping: [{
|
|
95
|
+
property: {
|
|
96
|
+
apiName: linkType.many.object.primaryKeyPropertyApiName,
|
|
97
|
+
object: linkType.many.object.apiName
|
|
98
|
+
},
|
|
99
|
+
column: linkType.many.object.primaryKeyPropertyApiName
|
|
100
|
+
}],
|
|
101
|
+
objectTypeBPrimaryKeyMapping: [{
|
|
102
|
+
property: {
|
|
103
|
+
apiName: linkType.toMany.object.primaryKeyPropertyApiName,
|
|
104
|
+
object: linkType.toMany.object.apiName
|
|
105
|
+
},
|
|
106
|
+
column: linkType.toMany.object.primaryKeyPropertyApiName
|
|
107
|
+
}]
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
editsConfiguration: {
|
|
111
|
+
onlyAllowPrivilegedEdits: false
|
|
112
|
+
},
|
|
113
|
+
redacted: linkType.redacted
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
linkType: {
|
|
118
|
+
definition: definition,
|
|
119
|
+
id: cleanAndValidateLinkTypeId(linkType.apiName),
|
|
120
|
+
status: linkType.status ?? {
|
|
121
|
+
type: "active",
|
|
122
|
+
active: {}
|
|
123
|
+
},
|
|
124
|
+
redacted: linkType.redacted ?? false
|
|
125
|
+
},
|
|
126
|
+
datasources: datasource !== undefined ? [datasource] : [],
|
|
127
|
+
entityMetadata: {
|
|
128
|
+
arePatchesEnabled: linkType.editsEnabled ?? false
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=convertLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertLink.js","names":["cleanAndValidateLinkTypeId","convertCardinality","convertLink","linkType","definition","datasource","undefined","type","oneToMany","cardinalityHint","cardinality","manyToOneLinkMetadata","toMany","metadata","objectTypeRidManySide","object","apiName","objectTypeRidOneSide","one","oneToManyLinkMetadata","oneSidePrimaryKeyToManySidePropertyMapping","from","primaryKeyPropertyApiName","to","manyForeignKeyProperty","intermediary","objectTypeAToBLinkMetadata","many","objectTypeBToALinkMetadata","objectTypeRidA","objectTypeRidB","intermediaryObjectTypeRid","intermediaryObjectType","aToIntermediaryLinkTypeRid","linkToIntermediary","intermediaryToBLinkTypeRid","manyToMany","peeringMetadata","objectTypeAPrimaryKeyPropertyMapping","objectTypeBPrimaryKeyPropertyMapping","datasourceName","dataset","datasetRid","concat","writebackDatasetRid","objectTypeAPrimaryKeyMapping","property","column","objectTypeBPrimaryKeyMapping","editsConfiguration","onlyAllowPrivilegedEdits","redacted","id","status","active","datasources","entityMetadata","arePatchesEnabled","editsEnabled"],"sources":["convertLink.ts"],"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\nimport type {\n OntologyIrLinkDefinition,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrManyToManyLinkTypeDatasource,\n} from \"@osdk/client.unstable\";\nimport { cleanAndValidateLinkTypeId } from \"../../api/defineOntology.js\";\nimport type { LinkType } from \"../../api/links/LinkType.js\";\nimport { convertCardinality } from \"./convertCardinality.js\";\n\nexport function convertLink(\n linkType: LinkType,\n): OntologyIrLinkTypeBlockDataV2 {\n let definition: OntologyIrLinkDefinition;\n let datasource: OntologyIrManyToManyLinkTypeDatasource | undefined =\n 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(\n linkType.many.linkToIntermediary.apiName,\n ),\n intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.toMany.linkToIntermediary.apiName,\n ),\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\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\n return {\n linkType: {\n definition: definition,\n id: cleanAndValidateLinkTypeId(linkType.apiName),\n status: linkType.status ?? { type: \"active\", active: {} },\n redacted: linkType.redacted ?? false,\n },\n datasources: datasource !== undefined ? [datasource] : [],\n entityMetadata: {\n arePatchesEnabled: linkType.editsEnabled ?? false,\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;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AQ,CAACkD,MAAM,IAAI;QAAE9C,IAAI,EAAE,QAAQ;QAAE+C,MAAM,EAAE,CAAC;MAAE,CAAC;MACzDH,QAAQ,EAAEhD,QAAQ,CAACgD,QAAQ,IAAI;IACjC,CAAC;IACDI,WAAW,EAAElD,UAAU,KAAKC,SAAS,GAAG,CAACD,UAAU,CAAC,GAAG,EAAE;IACzDmD,cAAc,EAAE;MACdC,iBAAiB,EAAEtD,QAAQ,CAACuD,YAAY,IAAI;IAC9C;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { randomUUID } from "crypto";
|
|
18
|
+
export function convertMappingValue(value) {
|
|
19
|
+
switch (value.type) {
|
|
20
|
+
case "uuid":
|
|
21
|
+
return {
|
|
22
|
+
type: "uniqueIdentifier",
|
|
23
|
+
uniqueIdentifier: {
|
|
24
|
+
linkId: value.linkId ?? randomUUID()
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
case "currentTime":
|
|
28
|
+
return {
|
|
29
|
+
type: "currentTime",
|
|
30
|
+
currentTime: {}
|
|
31
|
+
};
|
|
32
|
+
case "currentUser":
|
|
33
|
+
return {
|
|
34
|
+
type: "currentUser",
|
|
35
|
+
currentUser: {}
|
|
36
|
+
};
|
|
37
|
+
default:
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=convertMappingValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertMappingValue.js","names":["randomUUID","convertMappingValue","value","type","uniqueIdentifier","linkId","currentTime","currentUser"],"sources":["convertMappingValue.ts"],"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\nimport type { OntologyIrLogicRuleValue } from \"@osdk/client.unstable\";\nimport { randomUUID } from \"crypto\";\nimport type { MappingValue } from \"../../api/action/MappingValue.js\";\n\nexport function convertMappingValue(\n value: MappingValue,\n): OntologyIrLogicRuleValue {\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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,UAAU,QAAQ,QAAQ;AAGnC,OAAO,SAASC,mBAAmBA,CACjCC,KAAmB,EACO;EAC1B,QAAQA,KAAK,CAACC,IAAI;IAChB,KAAK,MAAM;MACT,OAAO;QACLA,IAAI,EAAE,kBAAkB;QACxBC,gBAAgB,EAAE;UAChBC,MAAM,EAAEH,KAAK,CAACG,MAAM,IAAIL,UAAU,CAAC;QACrC;MACF,CAAC;IACH,KAAK,aAAa;MAChB,OAAO;QACLG,IAAI,EAAE,aAAa;QACnBG,WAAW,EAAE,CAAC;MAChB,CAAC;IACH,KAAK,aAAa;MAChB,OAAO;QACLH,IAAI,EAAE,aAAa;QACnBI,WAAW,EAAE,CAAC;MAChB,CAAC;IACH;MACE,OAAOL,KAAK;EAChB;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import invariant from "tiny-invariant";
|
|
18
|
+
export function convertNullabilityToDataConstraint(prop) {
|
|
19
|
+
if (typeof prop.type === "object" && prop.type.type === "marking") {
|
|
20
|
+
if (prop.nullability === undefined) {
|
|
21
|
+
return {
|
|
22
|
+
propertyTypeConstraints: [],
|
|
23
|
+
nullability: undefined,
|
|
24
|
+
nullabilityV2: {
|
|
25
|
+
noEmptyCollections: true,
|
|
26
|
+
noNulls: true
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
!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;
|
|
31
|
+
return {
|
|
32
|
+
propertyTypeConstraints: [],
|
|
33
|
+
nullability: undefined,
|
|
34
|
+
nullabilityV2: prop.nullability
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return prop.nullability === undefined ? undefined : {
|
|
38
|
+
propertyTypeConstraints: [],
|
|
39
|
+
nullability: undefined,
|
|
40
|
+
nullabilityV2: prop.nullability
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=convertNullabilityToDataConstraint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertNullabilityToDataConstraint.js","names":["invariant","convertNullabilityToDataConstraint","prop","type","nullability","undefined","propertyTypeConstraints","nullabilityV2","noEmptyCollections","noNulls","process","env","NODE_ENV"],"sources":["convertNullabilityToDataConstraint.ts"],"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\nimport type { DataConstraints } from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport type { Nullability } from \"../../api/properties/Nullability.js\";\nimport type { PropertyTypeType } from \"../../api/properties/PropertyTypeType.js\";\n\nexport function convertNullabilityToDataConstraint(\n prop: { type: PropertyTypeType; nullability?: Nullability },\n): DataConstraints | undefined {\n if (typeof prop.type === \"object\" && prop.type.type === \"marking\") {\n if (prop.nullability === undefined) {\n return {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: { noEmptyCollections: true, noNulls: true },\n };\n }\n invariant(\n prop.nullability?.noNulls,\n \"Marking property type has noNulls set to false, marking properties must not be nullable\",\n );\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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,SAAS,MAAM,gBAAgB;AAItC,OAAO,SAASC,kCAAkCA,CAChDC,IAA2D,EAC9B;EAC7B,IAAI,OAAOA,IAAI,CAACC,IAAI,KAAK,QAAQ,IAAID,IAAI,CAACC,IAAI,CAACA,IAAI,KAAK,SAAS,EAAE;IACjE,IAAID,IAAI,CAACE,WAAW,KAAKC,SAAS,EAAE;MAClC,OAAO;QACLC,uBAAuB,EAAE,EAAE;QAC3BF,WAAW,EAAEC,SAAS;QACtBE,aAAa,EAAE;UAAEC,kBAAkB,EAAE,IAAI;UAAEC,OAAO,EAAE;QAAK;MAC3D,CAAC;IACH;IACA,CACEP,IAAI,CAACE,WAAW,EAAEK,OAAO,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAD3BZ,SAAS,QAEP,yFAAyF,IAF3FA,SAAS;IAIT,OAAO;MACLM,uBAAuB,EAAE,EAAE;MAC3BF,WAAW,EAAEC,SAAS;MACtBE,aAAa,EAAEL,IAAI,CAACE;IACtB,CAAC;EACH;EACA,OAAOF,IAAI,CAACE,WAAW,KAAKC,SAAS,GAAGA,SAAS,GAAG;IAClDC,uBAAuB,EAAE,EAAE;IAC3BF,WAAW,EAAEC,SAAS;IACtBE,aAAa,EAAEL,IAAI,CAACE;EACtB,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { addNamespaceIfNone, buildDatasource, convertObjectStatus } from "../../api/defineOntology.js";
|
|
18
|
+
import { isExotic } from "../../api/properties/PropertyTypeType.js";
|
|
19
|
+
import { convertDatasourceDefinition } from "./convertDatasourceDefinition.js";
|
|
20
|
+
import { convertObjectPropertyType } from "./convertObjectPropertyType.js";
|
|
21
|
+
export function convertObject(objectType) {
|
|
22
|
+
const propertyDatasources = (objectType.properties ?? []).flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));
|
|
23
|
+
const classificationGroupMarkingNames = extractMarkingGroups(objectType.properties ?? [], "CBAC");
|
|
24
|
+
const mandatoryMarkingNames = extractMarkingGroups(objectType.properties ?? [], "MANDATORY");
|
|
25
|
+
const classificationInputGroup = classificationGroupMarkingNames.length > 0 ? classificationGroupMarkingNames.reduce((l, r) => l + "/" + r) : undefined;
|
|
26
|
+
const mandatoryInputGroup = mandatoryMarkingNames.length > 0 ? mandatoryMarkingNames.reduce((l, r) => l + "/" + r) : undefined;
|
|
27
|
+
const objectDatasource = buildDatasource(objectType.apiName, convertDatasourceDefinition(objectType, objectType.properties ?? []), classificationInputGroup, mandatoryInputGroup);
|
|
28
|
+
const implementations = objectType.implementsInterfaces ?? [];
|
|
29
|
+
return {
|
|
30
|
+
objectType: {
|
|
31
|
+
displayMetadata: {
|
|
32
|
+
description: objectType.description,
|
|
33
|
+
displayName: objectType.displayName,
|
|
34
|
+
groupDisplayName: undefined,
|
|
35
|
+
icon: {
|
|
36
|
+
type: "blueprint",
|
|
37
|
+
blueprint: objectType.icon ?? {
|
|
38
|
+
locator: "cube",
|
|
39
|
+
color: "#2D72D2"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
pluralDisplayName: objectType.pluralDisplayName,
|
|
43
|
+
visibility: objectType.visibility ?? "NORMAL"
|
|
44
|
+
},
|
|
45
|
+
primaryKeys: [objectType.primaryKeyPropertyApiName],
|
|
46
|
+
propertyTypes: Object.fromEntries(objectType.properties?.map(val => [val.apiName, convertObjectPropertyType(val)]) ?? []),
|
|
47
|
+
titlePropertyTypeRid: objectType.titlePropertyApiName,
|
|
48
|
+
apiName: objectType.apiName,
|
|
49
|
+
status: convertObjectStatus(objectType.status),
|
|
50
|
+
redacted: false,
|
|
51
|
+
implementsInterfaces2: implementations.map(impl => ({
|
|
52
|
+
interfaceTypeApiName: impl.implements.apiName,
|
|
53
|
+
linksV2: {},
|
|
54
|
+
propertiesV2: {},
|
|
55
|
+
properties: Object.fromEntries(impl.propertyMapping.map(mapping => [addNamespaceIfNone(mapping.interfaceProperty), {
|
|
56
|
+
propertyTypeRid: mapping.mapsTo
|
|
57
|
+
}]))
|
|
58
|
+
})),
|
|
59
|
+
allImplementsInterfaces: {}
|
|
60
|
+
},
|
|
61
|
+
datasources: [...propertyDatasources, objectDatasource],
|
|
62
|
+
entityMetadata: {
|
|
63
|
+
arePatchesEnabled: objectType.editsEnabled ?? false
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Extracts marking group names of a specific type from object properties
|
|
70
|
+
*/
|
|
71
|
+
export function extractMarkingGroups(properties, markingType) {
|
|
72
|
+
return properties.map(prop => {
|
|
73
|
+
if (typeof prop.type === "object" && prop.type.type === "marking" && prop.type.markingType === markingType) {
|
|
74
|
+
return prop.type.markingInputGroupName;
|
|
75
|
+
}
|
|
76
|
+
return undefined;
|
|
77
|
+
}).filter(val => val !== undefined);
|
|
78
|
+
}
|
|
79
|
+
export function extractPropertyDatasource(property, objectTypeApiName) {
|
|
80
|
+
if (!isExotic(property.type)) {
|
|
81
|
+
return [];
|
|
82
|
+
}
|
|
83
|
+
const identifier = objectTypeApiName + "." + property.apiName;
|
|
84
|
+
switch (property.type) {
|
|
85
|
+
case "geotimeSeries":
|
|
86
|
+
const geotimeDefinition = {
|
|
87
|
+
type: "geotimeSeries",
|
|
88
|
+
geotimeSeries: {
|
|
89
|
+
geotimeSeriesIntegrationRid: identifier,
|
|
90
|
+
properties: [property.apiName]
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
return [buildDatasource(property.apiName, geotimeDefinition)];
|
|
94
|
+
case "mediaReference":
|
|
95
|
+
const mediaSetDefinition = {
|
|
96
|
+
type: "mediaSetView",
|
|
97
|
+
mediaSetView: {
|
|
98
|
+
assumedMarkings: [],
|
|
99
|
+
mediaSetViewLocator: identifier,
|
|
100
|
+
properties: [property.apiName]
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
return [buildDatasource(property.apiName, mediaSetDefinition)];
|
|
104
|
+
default:
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=convertObject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertObject.js","names":["addNamespaceIfNone","buildDatasource","convertObjectStatus","isExotic","convertDatasourceDefinition","convertObjectPropertyType","convertObject","objectType","propertyDatasources","properties","flatMap","prop","extractPropertyDatasource","apiName","classificationGroupMarkingNames","extractMarkingGroups","mandatoryMarkingNames","classificationInputGroup","length","reduce","l","r","undefined","mandatoryInputGroup","objectDatasource","implementations","implementsInterfaces","displayMetadata","description","displayName","groupDisplayName","icon","type","blueprint","locator","color","pluralDisplayName","visibility","primaryKeys","primaryKeyPropertyApiName","propertyTypes","Object","fromEntries","map","val","titlePropertyTypeRid","titlePropertyApiName","status","redacted","implementsInterfaces2","impl","interfaceTypeApiName","implements","linksV2","propertiesV2","propertyMapping","mapping","interfaceProperty","propertyTypeRid","mapsTo","allImplementsInterfaces","datasources","entityMetadata","arePatchesEnabled","editsEnabled","markingType","markingInputGroupName","filter","property","objectTypeApiName","identifier","geotimeDefinition","geotimeSeries","geotimeSeriesIntegrationRid","mediaSetDefinition","mediaSetView","assumedMarkings","mediaSetViewLocator"],"sources":["convertObject.ts"],"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\nimport type {\n OntologyIrObjectTypeBlockDataV2,\n OntologyIrObjectTypeDatasource,\n OntologyIrObjectTypeDatasourceDefinition,\n OntologyIrPropertyType,\n} from \"@osdk/client.unstable\";\nimport {\n addNamespaceIfNone,\n buildDatasource,\n convertObjectStatus,\n} from \"../../api/defineOntology.js\";\nimport type { ObjectPropertyType } from \"../../api/object/ObjectPropertyType.js\";\nimport type { ObjectType } from \"../../api/object/ObjectType.js\";\nimport { isExotic } from \"../../api/properties/PropertyTypeType.js\";\nimport { convertDatasourceDefinition } from \"./convertDatasourceDefinition.js\";\nimport { convertObjectPropertyType } from \"./convertObjectPropertyType.js\";\n\nexport function convertObject(\n objectType: ObjectType,\n): OntologyIrObjectTypeBlockDataV2 {\n const propertyDatasources: OntologyIrObjectTypeDatasource[] =\n (objectType.properties ?? [])\n .flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));\n\n const classificationGroupMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"CBAC\",\n );\n\n const mandatoryMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"MANDATORY\",\n );\n\n const classificationInputGroup = classificationGroupMarkingNames.length > 0\n ? classificationGroupMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const mandatoryInputGroup = mandatoryMarkingNames.length > 0\n ? mandatoryMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const objectDatasource = buildDatasource(\n objectType.apiName,\n convertDatasourceDefinition(\n objectType,\n objectType.properties ?? [],\n ),\n classificationInputGroup,\n mandatoryInputGroup,\n );\n\n const implementations = objectType.implementsInterfaces ?? [];\n\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 ?? { locator: \"cube\", color: \"#2D72D2\" },\n },\n pluralDisplayName: objectType.pluralDisplayName,\n visibility: objectType.visibility ?? \"NORMAL\",\n },\n primaryKeys: [objectType.primaryKeyPropertyApiName],\n propertyTypes: Object.fromEntries(\n objectType.properties?.map<[string, OntologyIrPropertyType]>(\n val => [val.apiName, convertObjectPropertyType(val)],\n ) ?? [],\n ),\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(\n impl.propertyMapping.map(\n mapping => [addNamespaceIfNone(mapping.interfaceProperty), {\n propertyTypeRid: mapping.mapsTo,\n }],\n ),\n ),\n })),\n allImplementsInterfaces: {},\n },\n datasources: [...propertyDatasources, objectDatasource],\n entityMetadata: { arePatchesEnabled: objectType.editsEnabled ?? false },\n };\n}\n\n/**\n * Extracts marking group names of a specific type from object properties\n */\nexport function extractMarkingGroups(\n properties: ObjectPropertyType[],\n markingType: \"CBAC\" | \"MANDATORY\",\n): string[] {\n return properties\n .map(prop => {\n if (\n typeof prop.type === \"object\"\n && prop.type.type === \"marking\"\n && prop.type.markingType === markingType\n ) {\n return prop.type.markingInputGroupName;\n }\n return undefined;\n })\n .filter((val): val is string => val !== undefined);\n}\nexport function extractPropertyDatasource(\n property: ObjectPropertyType,\n objectTypeApiName: string,\n): OntologyIrObjectTypeDatasource[] {\n if (!isExotic(property.type)) {\n return [];\n }\n const identifier = objectTypeApiName + \".\" + property.apiName;\n switch (property.type as string) {\n case \"geotimeSeries\":\n const geotimeDefinition: OntologyIrObjectTypeDatasourceDefinition = {\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: OntologyIrObjectTypeDatasourceDefinition = {\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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SACEA,kBAAkB,EAClBC,eAAe,EACfC,mBAAmB,QACd,6BAA6B;AAGpC,SAASC,QAAQ,QAAQ,0CAA0C;AACnE,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,yBAAyB,QAAQ,gCAAgC;AAE1E,OAAO,SAASC,aAAaA,CAC3BC,UAAsB,EACW;EACjC,MAAMC,mBAAqD,GACzD,CAACD,UAAU,CAACE,UAAU,IAAI,EAAE,EACzBC,OAAO,CAACC,IAAI,IAAIC,yBAAyB,CAACD,IAAI,EAAEJ,UAAU,CAACM,OAAO,CAAC,CAAC;EAEzE,MAAMC,+BAA+B,GAAGC,oBAAoB,CAC1DR,UAAU,CAACE,UAAU,IAAI,EAAE,EAC3B,MACF,CAAC;EAED,MAAMO,qBAAqB,GAAGD,oBAAoB,CAChDR,UAAU,CAACE,UAAU,IAAI,EAAE,EAC3B,WACF,CAAC;EAED,MAAMQ,wBAAwB,GAA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OAAO,SAASV,yBAAyBA,CACvCwD,QAA4B,EAC5BC,iBAAyB,EACS;EAClC,IAAI,CAAClE,QAAQ,CAACiE,QAAQ,CAACpC,IAAI,CAAC,EAAE;IAC5B,OAAO,EAAE;EACX;EACA,MAAMsC,UAAU,GAAGD,iBAAiB,GAAG,GAAG,GAAGD,QAAQ,CAACvD,OAAO;EAC7D,QAAQuD,QAAQ,CAACpC,IAAI;IACnB,KAAK,eAAe;MAClB,MAAMuC,iBAA2D,GAAG;QAClEvC,IAAI,EAAE,eAAe;QACrBwC,aAAa,EAAE;UACbC,2BAA2B,EAAEH,UAAU;UACvC7D,UAAU,EAAE,CAAC2D,QAAQ,CAACvD,OAAO;QAC/B;MACF,CAAC;MACD,OAAO,CAACZ,eAAe,CAACmE,QAAQ,CAACvD,OAAO,EAAE0D,iBAAiB,CAAC,CAAC;IAC/D,KAAK,gBAAgB;MACnB,MAAMG,kBAA4D,GAAG;QACnE1C,IAAI,EAAE,cAAc;QACpB2C,YAAY,EAAE;UACZC,eAAe,EAAE,EAAE;UACnBC,mBAAmB,EAAEP,UAAU;UAC/B7D,UAAU,EAAE,CAAC2D,QAAQ,CAACvD,OAAO;QAC/B;MACF,CAAC;MACD,OAAO,CAACZ,eAAe,CAACmE,QAAQ,CAACvD,OAAO,EAAE6D,kBAAkB,CAAC,CAAC;IAChE;MACE,OAAO,EAAE;EACb;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import invariant from "tiny-invariant";
|
|
18
|
+
import { convertObjectStatus, namespace } from "../../api/defineOntology.js";
|
|
19
|
+
import { defaultTypeClasses, getPropertyTypeName, hasRenderHints, shouldNotHaveRenderHints } from "../../api/propertyConversionUtils.js";
|
|
20
|
+
import { convertNullabilityToDataConstraint } from "./convertNullabilityToDataConstraint.js";
|
|
21
|
+
import { convertValueType } from "./convertValueType.js";
|
|
22
|
+
import { convertValueTypeDataConstraints } from "./convertValueTypeDataConstraints.js";
|
|
23
|
+
import { propertyTypeTypeToOntologyIrType } from "./propertyTypeTypeToOntologyIrType.js";
|
|
24
|
+
export function convertObjectPropertyType(property) {
|
|
25
|
+
const apiName = namespace + property.apiName;
|
|
26
|
+
!(!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;
|
|
27
|
+
const output = {
|
|
28
|
+
apiName: property.apiName,
|
|
29
|
+
sharedPropertyTypeApiName: property.sharedPropertyType?.apiName,
|
|
30
|
+
displayMetadata: {
|
|
31
|
+
displayName: property.displayName,
|
|
32
|
+
description: property.description,
|
|
33
|
+
visibility: property.visibility ?? "NORMAL"
|
|
34
|
+
},
|
|
35
|
+
indexedForSearch: property.indexedForSearch ?? true,
|
|
36
|
+
ruleSetBinding: undefined,
|
|
37
|
+
baseFormatter: property.baseFormatter,
|
|
38
|
+
type: property.array ? {
|
|
39
|
+
type: "array",
|
|
40
|
+
array: {
|
|
41
|
+
subtype: propertyTypeTypeToOntologyIrType(property.type)
|
|
42
|
+
}
|
|
43
|
+
} : propertyTypeTypeToOntologyIrType(property.type),
|
|
44
|
+
typeClasses: property.typeClasses ?? (shouldNotHaveRenderHints(property.type) ? [] : defaultTypeClasses),
|
|
45
|
+
status: convertObjectStatus(property.status),
|
|
46
|
+
inlineAction: undefined,
|
|
47
|
+
dataConstraints: property.valueType ? convertValueTypeDataConstraints(property.valueType.constraints) : convertNullabilityToDataConstraint(property),
|
|
48
|
+
sharedPropertyTypeRid: property.sharedPropertyType?.apiName,
|
|
49
|
+
valueType: property.valueType ? convertValueType(property.valueType) : undefined
|
|
50
|
+
};
|
|
51
|
+
return output;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=convertObjectPropertyType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertObjectPropertyType.js","names":["invariant","convertObjectStatus","namespace","defaultTypeClasses","getPropertyTypeName","hasRenderHints","shouldNotHaveRenderHints","convertNullabilityToDataConstraint","convertValueType","convertValueTypeDataConstraints","propertyTypeTypeToOntologyIrType","convertObjectPropertyType","property","apiName","type","typeClasses","process","env","NODE_ENV","output","sharedPropertyTypeApiName","sharedPropertyType","displayMetadata","displayName","description","visibility","indexedForSearch","ruleSetBinding","undefined","baseFormatter","array","subtype","status","inlineAction","dataConstraints","valueType","constraints","sharedPropertyTypeRid"],"sources":["convertObjectPropertyType.ts"],"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\nimport type { OntologyIrPropertyType } from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport { convertObjectStatus, namespace } from \"../../api/defineOntology.js\";\nimport type { ObjectPropertyType } from \"../../api/object/ObjectPropertyType.js\";\nimport {\n defaultTypeClasses,\n getPropertyTypeName,\n hasRenderHints,\n shouldNotHaveRenderHints,\n} from \"../../api/propertyConversionUtils.js\";\nimport { convertNullabilityToDataConstraint } from \"./convertNullabilityToDataConstraint.js\";\nimport { convertValueType } from \"./convertValueType.js\";\nimport { convertValueTypeDataConstraints } from \"./convertValueTypeDataConstraints.js\";\nimport { propertyTypeTypeToOntologyIrType } from \"./propertyTypeTypeToOntologyIrType.js\";\n\nexport function convertObjectPropertyType(\n property: ObjectPropertyType,\n): OntologyIrPropertyType {\n const apiName = namespace + property.apiName;\n invariant(\n !shouldNotHaveRenderHints(property.type)\n || !hasRenderHints(property.typeClasses),\n `Property type ${apiName} of type '${\n getPropertyTypeName(property.type)\n }' should not have render hints`,\n );\n const output: OntologyIrPropertyType = {\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 ? {\n type: \"array\" as const,\n array: {\n subtype: propertyTypeTypeToOntologyIrType(property.type),\n },\n }\n : propertyTypeTypeToOntologyIrType(property.type),\n typeClasses: property.typeClasses\n ?? (shouldNotHaveRenderHints(property.type) ? [] : defaultTypeClasses),\n status: convertObjectStatus(property.status),\n inlineAction: undefined,\n dataConstraints: property.valueType\n ? convertValueTypeDataConstraints(property.valueType.constraints)\n : convertNullabilityToDataConstraint(property),\n sharedPropertyTypeRid: property.sharedPropertyType?.apiName,\n valueType: property.valueType\n ? convertValueType(property.valueType)\n : undefined,\n };\n return output;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,mBAAmB,EAAEC,SAAS,QAAQ,6BAA6B;AAE5E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W,KAC3BT,wBAAwB,CAACM,QAAQ,CAACE,IAAI,CAAC,GAAG,EAAE,GAAGX,kBAAkB,CAAC;IACxE6B,MAAM,EAAE/B,mBAAmB,CAACW,QAAQ,CAACoB,MAAM,CAAC;IAC5CC,YAAY,EAAEL,SAAS;IACvBM,eAAe,EAAEtB,QAAQ,CAACuB,SAAS,GAC/B1B,+BAA+B,CAACG,QAAQ,CAACuB,SAAS,CAACC,WAAW,CAAC,GAC/D7B,kCAAkC,CAACK,QAAQ,CAAC;IAChDyB,qBAAqB,EAAEzB,QAAQ,CAACS,kBAAkB,EAAER,OAAO;IAC3DsB,SAAS,EAAEvB,QAAQ,CAACuB,SAAS,GACzB3B,gBAAgB,CAACI,QAAQ,CAACuB,SAAS,CAAC,GACpCP;EACN,CAAC;EACD,OAAOT,MAAM;AACf","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { importedTypes } from "../../api/defineOntology.js";
|
|
18
|
+
import { convertOntologyDefinitionToWireBlockData } from "./convertOntologyDefinitionToWireBlockData.js";
|
|
19
|
+
import { convertOntologyToValueTypeIr } from "./convertOntologyToValueTypeIr.js";
|
|
20
|
+
export function convertOntologyDefinition(ontology, randomnessKey) {
|
|
21
|
+
return {
|
|
22
|
+
ontology: convertOntologyDefinitionToWireBlockData(ontology),
|
|
23
|
+
importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),
|
|
24
|
+
valueTypes: convertOntologyToValueTypeIr(ontology),
|
|
25
|
+
importedValueTypes: convertOntologyToValueTypeIr(importedTypes),
|
|
26
|
+
randomnessKey
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=convertOntologyDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertOntologyDefinition.js","names":["importedTypes","convertOntologyDefinitionToWireBlockData","convertOntologyToValueTypeIr","convertOntologyDefinition","ontology","randomnessKey","importedOntology","valueTypes","importedValueTypes"],"sources":["convertOntologyDefinition.ts"],"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\nimport type { OntologyIr } from \"@osdk/client.unstable\";\nimport type { OntologyDefinition } from \"../../api/common/OntologyDefinition.js\";\nimport { importedTypes } from \"../../api/defineOntology.js\";\nimport { convertOntologyDefinitionToWireBlockData } from \"./convertOntologyDefinitionToWireBlockData.js\";\nimport { convertOntologyToValueTypeIr } from \"./convertOntologyToValueTypeIr.js\";\n\nexport function convertOntologyDefinition(\n ontology: OntologyDefinition,\n randomnessKey?: string,\n): OntologyIr {\n return {\n ontology: convertOntologyDefinitionToWireBlockData(ontology),\n importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),\n valueTypes: convertOntologyToValueTypeIr(ontology),\n importedValueTypes: convertOntologyToValueTypeIr(importedTypes),\n randomnessKey,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,wCAAwC,QAAQ,+CAA+C;AACxG,SAASC,4BAA4B,QAAQ,mCAAmC;AAEhF,OAAO,SAASC,yBAAyBA,CACvCC,QAA4B,EAC5BC,aAAsB,EACV;EACZ,OAAO;IACLD,QAAQ,EAAEH,wCAAwC,CAACG,QAAQ,CAAC;IAC5DE,gBAAgB,EAAEL,wCAAwC,CAACD,aAAa,CAAC;IACzEO,UAAU,EAAEL,4BAA4B,CAACE,QAAQ,CAAC;IAClDI,kBAAkB,EAAEN,4BAA4B,CAACF,aAAa,CAAC;IAC/DK;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { OntologyEntityTypeEnum } from "../../api/common/OntologyEntityTypeEnum.js";
|
|
18
|
+
import { cleanAndValidateLinkTypeId, convertAction } from "../../api/defineOntology.js";
|
|
19
|
+
import { convertInterface } from "./convertInterface.js";
|
|
20
|
+
import { convertLink } from "./convertLink.js";
|
|
21
|
+
import { convertObject } from "./convertObject.js";
|
|
22
|
+
import { convertSpt } from "./convertSpt.js";
|
|
23
|
+
export function convertOntologyDefinitionToWireBlockData(ontology) {
|
|
24
|
+
return {
|
|
25
|
+
objectTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.OBJECT_TYPE]).map(([apiName, objectType]) => {
|
|
26
|
+
return [apiName, convertObject(objectType)];
|
|
27
|
+
})),
|
|
28
|
+
sharedPropertyTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]).map(([apiName, spt]) => [apiName, {
|
|
29
|
+
sharedPropertyType: convertSpt(spt)
|
|
30
|
+
}])),
|
|
31
|
+
interfaceTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.INTERFACE_TYPE]).map(([apiName, interfaceType]) => {
|
|
32
|
+
return [apiName, {
|
|
33
|
+
interfaceType: convertInterface(interfaceType)
|
|
34
|
+
}];
|
|
35
|
+
})),
|
|
36
|
+
linkTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.LINK_TYPE]).map(([id, link]) => {
|
|
37
|
+
return [cleanAndValidateLinkTypeId(id), convertLink(link)];
|
|
38
|
+
})),
|
|
39
|
+
actionTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).map(([apiName, action]) => {
|
|
40
|
+
return [apiName, convertAction(action)];
|
|
41
|
+
})),
|
|
42
|
+
blockPermissionInformation: {
|
|
43
|
+
actionTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).filter(([apiName, action]) => action.validation).map(([apiName, action]) => {
|
|
44
|
+
return [apiName, {
|
|
45
|
+
restrictionStatus: {
|
|
46
|
+
hasRolesApplied: true,
|
|
47
|
+
ontologyPackageRid: null,
|
|
48
|
+
publicProject: false
|
|
49
|
+
}
|
|
50
|
+
}];
|
|
51
|
+
})),
|
|
52
|
+
linkTypes: {},
|
|
53
|
+
objectTypes: {}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=convertOntologyDefinitionToWireBlockData.js.map
|
package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertOntologyDefinitionToWireBlockData.js","names":["OntologyEntityTypeEnum","cleanAndValidateLinkTypeId","convertAction","convertInterface","convertLink","convertObject","convertSpt","convertOntologyDefinitionToWireBlockData","ontology","objectTypes","Object","fromEntries","entries","OBJECT_TYPE","map","apiName","objectType","sharedPropertyTypes","SHARED_PROPERTY_TYPE","spt","sharedPropertyType","interfaceTypes","INTERFACE_TYPE","interfaceType","linkTypes","LINK_TYPE","id","link","actionTypes","ACTION_TYPE","action","blockPermissionInformation","filter","validation","restrictionStatus","hasRolesApplied","ontologyPackageRid","publicProject"],"sources":["convertOntologyDefinitionToWireBlockData.ts"],"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\nimport type {\n ActionTypePermissionInformation,\n OntologyIrActionTypeBlockDataV2,\n OntologyIrInterfaceTypeBlockDataV2,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrObjectTypeBlockDataV2,\n OntologyIrOntologyBlockDataV2,\n OntologyIrSharedPropertyTypeBlockDataV2,\n} from \"@osdk/client.unstable\";\nimport { type OntologyDefinition } from \"../../api/common/OntologyDefinition.js\";\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport {\n cleanAndValidateLinkTypeId,\n convertAction,\n} from \"../../api/defineOntology.js\";\nimport { convertInterface } from \"./convertInterface.js\";\nimport { convertLink } from \"./convertLink.js\";\nimport { convertObject } from \"./convertObject.js\";\nimport { convertSpt } from \"./convertSpt.js\";\n\nexport function convertOntologyDefinitionToWireBlockData(\n ontology: OntologyDefinition,\n): OntologyIrOntologyBlockDataV2 {\n return ({\n objectTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.OBJECT_TYPE]).map<\n [string, OntologyIrObjectTypeBlockDataV2]\n >(([apiName, objectType]) => {\n return [apiName, convertObject(objectType)];\n }),\n ),\n sharedPropertyTypes: Object.fromEntries(\n Object.entries(\n ontology[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE],\n )\n .map<[string, OntologyIrSharedPropertyTypeBlockDataV2]>((\n [apiName, spt],\n ) => [apiName, { sharedPropertyType: convertSpt(spt) }]),\n ),\n interfaceTypes: Object.fromEntries(\n Object.entries(\n ontology[OntologyEntityTypeEnum.INTERFACE_TYPE],\n )\n .map<[string, OntologyIrInterfaceTypeBlockDataV2]>(\n ([apiName, interfaceType]) => {\n return [apiName, {\n interfaceType: convertInterface(interfaceType),\n }];\n },\n ),\n ),\n linkTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.LINK_TYPE]).map<\n [string, OntologyIrLinkTypeBlockDataV2]\n >(([id, link]) => {\n return [cleanAndValidateLinkTypeId(id), convertLink(link)];\n }),\n ),\n actionTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).map<\n [string, OntologyIrActionTypeBlockDataV2]\n >(([apiName, action]) => {\n return [apiName, convertAction(action)];\n }),\n ),\n blockPermissionInformation: {\n actionTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE])\n .filter(([apiName, action]) => action.validation)\n .map<\n [string, ActionTypePermissionInformation]\n >(([apiName, action]) => {\n return [apiName, {\n restrictionStatus: {\n hasRolesApplied: true,\n ontologyPackageRid: null,\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rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { OntologyEntityTypeEnum } from "../../api/common/OntologyEntityTypeEnum.js";
|
|
18
|
+
import { convertValueTypesToIr } from "./convertValueTypesToIr.js";
|
|
19
|
+
export function convertOntologyToValueTypeIr(ontology) {
|
|
20
|
+
return {
|
|
21
|
+
valueTypes: convertValueTypesToIr(ontology[OntologyEntityTypeEnum.VALUE_TYPE])
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=convertOntologyToValueTypeIr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertOntologyToValueTypeIr.js","names":["OntologyEntityTypeEnum","convertValueTypesToIr","convertOntologyToValueTypeIr","ontology","valueTypes","VALUE_TYPE"],"sources":["convertOntologyToValueTypeIr.ts"],"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\nimport type { OntologyIrValueTypeBlockData } from \"@osdk/client.unstable\";\nimport { type OntologyDefinition } from \"../../api/common/OntologyDefinition.js\";\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport { convertValueTypesToIr } from \"./convertValueTypesToIr.js\";\n\nexport function convertOntologyToValueTypeIr(\n ontology: OntologyDefinition,\n): OntologyIrValueTypeBlockData {\n return {\n valueTypes: convertValueTypesToIr(\n ontology[OntologyEntityTypeEnum.VALUE_TYPE],\n ),\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,sBAAsB,QAAQ,4CAA4C;AACnF,SAASC,qBAAqB,QAAQ,4BAA4B;AAElE,OAAO,SAASC,4BAA4BA,CAC1CC,QAA4B,EACE;EAC9B,OAAO;IACLC,UAAU,EAAEH,qBAAqB,CAC/BE,QAAQ,CAACH,sBAAsB,CAACK,UAAU,CAC5C;EACF,CAAC;AACH","ignoreList":[]}
|