@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 @@
|
|
|
1
|
+
{"version":3,"file":"Nullability.js","names":[],"sources":["Nullability.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\nexport interface Nullability {\n noEmptyCollections: boolean;\n noNulls: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
export function isPropertyTypeType(v) {
|
|
18
|
+
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";
|
|
19
|
+
}
|
|
20
|
+
export function isExotic(type) {
|
|
21
|
+
if (type === undefined) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (typeof type === "string") {
|
|
25
|
+
return ["geopoint", "geoshape", "mediaReference", "geotimeSeries"].includes(type);
|
|
26
|
+
} else if (typeof type === "object" && type != null) {
|
|
27
|
+
return type.type === "marking" || type.type === "struct";
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
export function isStruct(type) {
|
|
32
|
+
return typeof type === "object" && type.type === "struct";
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=PropertyTypeType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PropertyTypeType.js","names":["isPropertyTypeType","v","type","isExotic","undefined","includes","isStruct"],"sources":["PropertyTypeType.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 { StructFieldType } from \"@osdk/client.unstable\";\n\nexport type PropertyTypeType =\n | PropertyTypeTypePrimitive\n | PropertyTypeTypeExotic;\n\nexport type PropertyTypeTypePrimitive =\n | \"boolean\"\n | \"byte\"\n | \"date\"\n | \"decimal\"\n | \"double\"\n | \"float\"\n | \"integer\"\n | \"long\"\n | \"short\"\n | \"string\"\n | \"timestamp\";\n\nexport type PropertyTypeTypeExotic =\n | \"geopoint\"\n | \"geoshape\"\n | \"mediaReference\"\n | \"geotimeSeries\"\n | PropertyTypeTypeMarking\n | PropertyTypeTypeStruct\n | PropertyTypeTypeString;\n\ntype PropertyTypeTypeMarking = {\n type: \"marking\";\n markingType: \"MANDATORY\" | \"CBAC\";\n markingInputGroupName: string;\n};\n\nexport type PropertyTypeTypeStruct = {\n type: \"struct\";\n structDefinition: {\n [api_name: string]:\n | StructPropertyType\n | Exclude<PropertyTypeTypesWithoutStruct, PropertyTypeTypeMarking>;\n };\n};\n\ntype PropertyTypeTypeString = {\n type: \"string\";\n isLongText: boolean;\n supportsEfficientLeadingWildcard: boolean;\n supportsExactMatching: boolean;\n};\n\nexport type PropertyTypeTypesWithoutStruct = Exclude<\n PropertyTypeType,\n PropertyTypeTypeStruct\n>;\nexport function isPropertyTypeType(\n v: PropertyTypeType,\n): v is PropertyTypeType {\n return v === \"boolean\" || v === \"byte\"\n || v === \"date\" || v === \"decimal\" || v === \"double\"\n || v === \"float\" || v === \"geopoint\" || v === \"geoshape\"\n || v === \"integer\" || v === \"long\"\n || (typeof v === \"object\" && v.type === \"marking\")\n || v === \"short\" || v === \"string\"\n || v === \"timestamp\";\n}\nexport function isExotic(\n type: PropertyTypeType | undefined,\n): type is PropertyTypeTypeExotic {\n if (type === undefined) {\n return false;\n }\n if (typeof type === \"string\") {\n return [\"geopoint\", \"geoshape\", \"mediaReference\", \"geotimeSeries\"].includes(\n type,\n );\n } else if (typeof type === \"object\" && type != null) {\n return type.type === \"marking\" || type.type === \"struct\";\n }\n return false;\n}\nexport function isStruct(\n type: PropertyTypeType,\n): type is PropertyTypeTypeStruct {\n return typeof type === \"object\" && type.type === \"struct\";\n}\n\ntype Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;\n\nexport interface StructPropertyType extends\n Optional<\n Omit<\n StructFieldType,\n \"fieldType\" | \"structFieldRid\" | \"apiName\"\n >,\n \"typeClasses\" | \"aliases\"\n >\n{\n fieldType: PropertyTypeTypesWithoutStruct;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwDA,OAAO,SAASA,kBAAkBA,CAChCC,CAAmB,EACI;EACvB,OAAOA,CAAC,KAAK,SAAS,IAAIA,CAAC,KAAK,MAAM,IACjCA,CAAC,KAAK,MAAM,IAAIA,CAAC,KAAK,SAAS,IAAIA,CAAC,KAAK,QAAQ,IACjDA,CAAC,KAAK,OAAO,IAAIA,CAAC,KAAK,UAAU,IAAIA,CAAC,KAAK,UAAU,IACrDA,CAAC,KAAK,SAAS,IAAIA,CAAC,KAAK,MAAM,IAC9B,OAAOA,CAAC,KAAK,QAAQ,IAAIA,CAAC,CAACC,IAAI,KAAK,SAAU,IAC/CD,CAAC,KAAK,OAAO,IAAIA,CAAC,KAAK,QAAQ,IAC/BA,CAAC,KAAK,WAAW;AACxB;AACA,OAAO,SAASE,QAAQA,CACtBD,IAAkC,EACF;EAChC,IAAIA,IAAI,KAAKE,SAAS,EAAE;IACtB,OAAO,KAAK;EACd;EACA,IAAI,OAAOF,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAACG,QAAQ,CACzEH,IACF,CAAC;EACH,CAAC,MAAM,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAIA,IAAI,IAAI,IAAI,EAAE;IACnD,OAAOA,IAAI,CAACA,IAAI,KAAK,SAAS,IAAIA,IAAI,CAACA,IAAI,KAAK,QAAQ;EAC1D;EACA,OAAO,KAAK;AACd;AACA,OAAO,SAASI,QAAQA,CACtBJ,IAAsB,EACU;EAChC,OAAO,OAAOA,IAAI,KAAK,QAAQ,IAAIA,IAAI,CAACA,IAAI,KAAK,QAAQ;AAC3D","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharedPropertyType.js","names":[],"sources":["SharedPropertyType.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 OntologyIrValueTypeReferenceWithMetadata,\n SharedPropertyTypeGothamMapping,\n Visibility,\n} from \"@osdk/client.unstable\";\nimport type { OntologyEntityBase } from \"../common/OntologyEntityBase.js\";\nimport type { OntologyEntityTypeEnum } from \"../common/OntologyEntityTypeEnum.js\";\nimport type { TypeClass } from \"../common/TypeClass.js\";\nimport type { Nullability } from \"./Nullability.js\";\nimport type { PropertyTypeType } from \"./PropertyTypeType.js\";\n\nexport interface SharedPropertyType extends OntologyEntityBase, PropertyType {\n apiName: string;\n nonNameSpacedApiName: string;\n gothamMapping?: SharedPropertyTypeGothamMapping;\n __type: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE;\n}\nexport interface PropertyType {\n type: PropertyTypeType;\n array?: boolean;\n description?: string;\n displayName?: string;\n valueType?: OntologyIrValueTypeReferenceWithMetadata;\n visibility?: Visibility;\n typeClasses?: TypeClass[];\n nullability?: Nullability;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import invariant from "tiny-invariant";
|
|
18
17
|
export const defaultTypeClasses = [{
|
|
19
18
|
kind: "render_hint",
|
|
20
19
|
name: "SELECTABLE"
|
|
@@ -33,241 +32,4 @@ export function hasRenderHints(typeClasses) {
|
|
|
33
32
|
export function getPropertyTypeName(type) {
|
|
34
33
|
return typeof type === "object" ? type.type : type;
|
|
35
34
|
}
|
|
36
|
-
export function convertValueType(valueType) {
|
|
37
|
-
return {
|
|
38
|
-
apiName: valueType.apiName,
|
|
39
|
-
version: valueType.version,
|
|
40
|
-
packageNamespace: valueType.packageNamespace,
|
|
41
|
-
displayMetadata: valueType.displayMetadata
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export function convertValueTypeDataConstraints(dataConstraints) {
|
|
45
|
-
if (dataConstraints.length === 0) {
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
const propertyTypeConstraints = dataConstraints.map(constraint => ({
|
|
49
|
-
constraints: dataConstraintToPropertyTypeDataConstraint(constraint.constraint.constraint),
|
|
50
|
-
failureMessage: constraint.constraint.failureMessage
|
|
51
|
-
}));
|
|
52
|
-
return {
|
|
53
|
-
propertyTypeConstraints
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
export function dataConstraintToPropertyTypeDataConstraint(dc) {
|
|
57
|
-
switch (dc.type) {
|
|
58
|
-
case "array":
|
|
59
|
-
return {
|
|
60
|
-
...dc
|
|
61
|
-
};
|
|
62
|
-
case "boolean":
|
|
63
|
-
return {
|
|
64
|
-
...dc
|
|
65
|
-
};
|
|
66
|
-
case "binary":
|
|
67
|
-
throw new Error("Binary type constraints are not supported");
|
|
68
|
-
case "date":
|
|
69
|
-
return {
|
|
70
|
-
...dc
|
|
71
|
-
};
|
|
72
|
-
case "decimal":
|
|
73
|
-
return {
|
|
74
|
-
...dc
|
|
75
|
-
};
|
|
76
|
-
case "double":
|
|
77
|
-
return {
|
|
78
|
-
...dc
|
|
79
|
-
};
|
|
80
|
-
case "float":
|
|
81
|
-
return {
|
|
82
|
-
...dc
|
|
83
|
-
};
|
|
84
|
-
case "integer":
|
|
85
|
-
return {
|
|
86
|
-
...dc
|
|
87
|
-
};
|
|
88
|
-
case "long":
|
|
89
|
-
return {
|
|
90
|
-
...dc
|
|
91
|
-
};
|
|
92
|
-
case "map":
|
|
93
|
-
throw new Error("Map type constraints are not supported");
|
|
94
|
-
case "nullable":
|
|
95
|
-
throw new Error("Nullable constraints are not supported");
|
|
96
|
-
case "short":
|
|
97
|
-
return {
|
|
98
|
-
...dc
|
|
99
|
-
};
|
|
100
|
-
case "string":
|
|
101
|
-
return {
|
|
102
|
-
...dc
|
|
103
|
-
};
|
|
104
|
-
case "struct":
|
|
105
|
-
return {
|
|
106
|
-
type: "struct",
|
|
107
|
-
struct: {
|
|
108
|
-
elementConstraints: Object.fromEntries(Object.entries(dc.struct.elementConstraints).map(([field, constraint]) => [field, convertDataConstraintToDataConstraints(constraint)]))
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
case "structV2":
|
|
112
|
-
throw new Error("StructV2 constraints are not supported");
|
|
113
|
-
case "timestamp":
|
|
114
|
-
return {
|
|
115
|
-
...dc
|
|
116
|
-
};
|
|
117
|
-
default:
|
|
118
|
-
throw new Error(`Unknown DataConstraint type: ${dc.type}`);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
export function convertDataConstraintToDataConstraints(dc) {
|
|
122
|
-
return {
|
|
123
|
-
propertyTypeConstraints: [{
|
|
124
|
-
constraints: dataConstraintToPropertyTypeDataConstraint(dc)
|
|
125
|
-
// known limitation: structs don't carry field-level data constraint failure messages
|
|
126
|
-
}]
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
export function convertNullabilityToDataConstraint(prop) {
|
|
130
|
-
if (typeof prop.type === "object" && prop.type.type === "marking") {
|
|
131
|
-
if (prop.nullability === undefined) {
|
|
132
|
-
return {
|
|
133
|
-
propertyTypeConstraints: [],
|
|
134
|
-
nullability: undefined,
|
|
135
|
-
nullabilityV2: {
|
|
136
|
-
noEmptyCollections: true,
|
|
137
|
-
noNulls: true
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
!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;
|
|
142
|
-
return {
|
|
143
|
-
propertyTypeConstraints: [],
|
|
144
|
-
nullability: undefined,
|
|
145
|
-
nullabilityV2: prop.nullability
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
return prop.nullability === undefined ? undefined : {
|
|
149
|
-
propertyTypeConstraints: [],
|
|
150
|
-
nullability: undefined,
|
|
151
|
-
nullabilityV2: prop.nullability
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
export function convertType(type) {
|
|
155
|
-
switch (true) {
|
|
156
|
-
case typeof type === "object" && "markingType" in type:
|
|
157
|
-
return {
|
|
158
|
-
"type": "marking",
|
|
159
|
-
marking: {
|
|
160
|
-
markingType: type.markingType
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
case typeof type === "object" && "structDefinition" in type:
|
|
164
|
-
const structFields = new Array();
|
|
165
|
-
for (const key in type.structDefinition) {
|
|
166
|
-
const fieldTypeDefinition = type.structDefinition[key];
|
|
167
|
-
let field;
|
|
168
|
-
if (typeof fieldTypeDefinition === "string") {
|
|
169
|
-
field = {
|
|
170
|
-
apiName: key,
|
|
171
|
-
displayMetadata: {
|
|
172
|
-
displayName: key,
|
|
173
|
-
description: undefined
|
|
174
|
-
},
|
|
175
|
-
typeClasses: [],
|
|
176
|
-
aliases: [],
|
|
177
|
-
fieldType: convertType(fieldTypeDefinition)
|
|
178
|
-
};
|
|
179
|
-
} else {
|
|
180
|
-
// If it is a full form type definition then process it as such
|
|
181
|
-
if ("fieldType" in fieldTypeDefinition) {
|
|
182
|
-
field = {
|
|
183
|
-
...fieldTypeDefinition,
|
|
184
|
-
apiName: key,
|
|
185
|
-
fieldType: convertType(fieldTypeDefinition.fieldType),
|
|
186
|
-
typeClasses: fieldTypeDefinition.typeClasses ?? [],
|
|
187
|
-
aliases: fieldTypeDefinition.aliases ?? []
|
|
188
|
-
};
|
|
189
|
-
} else {
|
|
190
|
-
field = {
|
|
191
|
-
apiName: key,
|
|
192
|
-
displayMetadata: {
|
|
193
|
-
displayName: key,
|
|
194
|
-
description: undefined
|
|
195
|
-
},
|
|
196
|
-
typeClasses: [],
|
|
197
|
-
aliases: [],
|
|
198
|
-
fieldType: convertType(fieldTypeDefinition)
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
structFields.push(field);
|
|
203
|
-
}
|
|
204
|
-
return {
|
|
205
|
-
type: "struct",
|
|
206
|
-
struct: {
|
|
207
|
-
structFields
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
case typeof type === "object" && "isLongText" in type:
|
|
211
|
-
return {
|
|
212
|
-
"type": "string",
|
|
213
|
-
"string": {
|
|
214
|
-
analyzerOverride: undefined,
|
|
215
|
-
enableAsciiFolding: undefined,
|
|
216
|
-
isLongText: type.isLongText,
|
|
217
|
-
supportsEfficientLeadingWildcard: type.supportsEfficientLeadingWildcard,
|
|
218
|
-
supportsExactMatching: type.supportsExactMatching
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
case type === "geopoint":
|
|
222
|
-
return {
|
|
223
|
-
type: "geohash",
|
|
224
|
-
geohash: {}
|
|
225
|
-
};
|
|
226
|
-
case type === "decimal":
|
|
227
|
-
return {
|
|
228
|
-
type,
|
|
229
|
-
[type]: {
|
|
230
|
-
precision: undefined,
|
|
231
|
-
scale: undefined
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
case type === "string":
|
|
235
|
-
return {
|
|
236
|
-
type,
|
|
237
|
-
[type]: {
|
|
238
|
-
analyzerOverride: undefined,
|
|
239
|
-
enableAsciiFolding: undefined,
|
|
240
|
-
isLongText: false,
|
|
241
|
-
supportsEfficientLeadingWildcard: false,
|
|
242
|
-
supportsExactMatching: true
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
case type === "mediaReference":
|
|
246
|
-
return {
|
|
247
|
-
type: type,
|
|
248
|
-
mediaReference: {}
|
|
249
|
-
};
|
|
250
|
-
case type === "geotimeSeries":
|
|
251
|
-
return {
|
|
252
|
-
type: "geotimeSeriesReference",
|
|
253
|
-
geotimeSeriesReference: {}
|
|
254
|
-
};
|
|
255
|
-
default:
|
|
256
|
-
// use helper function to distribute `type` properly
|
|
257
|
-
return distributeTypeHelper(type);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Helper function to avoid duplication. Makes the types match properly with the correct
|
|
263
|
-
* behavior without needing to switch on type.
|
|
264
|
-
* @param type
|
|
265
|
-
* @returns
|
|
266
|
-
*/
|
|
267
|
-
export function distributeTypeHelper(type) {
|
|
268
|
-
return {
|
|
269
|
-
type,
|
|
270
|
-
[type]: {}
|
|
271
|
-
}; // any cast to match conditional return type
|
|
272
|
-
}
|
|
273
35
|
//# sourceMappingURL=propertyConversionUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propertyConversionUtils.js","names":["invariant","defaultTypeClasses","kind","name","shouldNotHaveRenderHints","type","includes","getPropertyTypeName","hasRenderHints","typeClasses","some","tc","toLowerCase","convertValueType","valueType","apiName","version","packageNamespace","displayMetadata","convertValueTypeDataConstraints","dataConstraints","length","undefined","propertyTypeConstraints","map","constraint","constraints","dataConstraintToPropertyTypeDataConstraint","failureMessage","dc","Error","struct","elementConstraints","Object","fromEntries","entries","field","convertDataConstraintToDataConstraints","convertNullabilityToDataConstraint","prop","nullability","nullabilityV2","noEmptyCollections","noNulls","process","env","NODE_ENV","convertType","marking","markingType","structFields","Array","key","structDefinition","fieldTypeDefinition","displayName","description","aliases","fieldType","push","analyzerOverride","enableAsciiFolding","isLongText","supportsEfficientLeadingWildcard","supportsExactMatching","geohash","precision","scale","mediaReference","geotimeSeriesReference","distributeTypeHelper"],"sources":["propertyConversionUtils.ts"],"sourcesContent":["/*\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 type {\n DataConstraint,\n DataConstraints,\n OntologyIrStructFieldType,\n OntologyIrType,\n OntologyIrValueTypeReferenceWithMetadata,\n PropertyTypeDataConstraints,\n PropertyTypeDataConstraints_array,\n PropertyTypeDataConstraints_boolean,\n PropertyTypeDataConstraints_date,\n PropertyTypeDataConstraints_decimal,\n PropertyTypeDataConstraints_double,\n PropertyTypeDataConstraints_float,\n PropertyTypeDataConstraints_integer,\n PropertyTypeDataConstraints_long,\n PropertyTypeDataConstraints_short,\n PropertyTypeDataConstraints_string,\n PropertyTypeDataConstraints_struct,\n PropertyTypeDataConstraints_timestamp,\n PropertyTypeDataConstraintsWrapper,\n ValueTypeDataConstraint,\n} from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport type {\n Nullability,\n PropertyTypeType,\n TypeClass,\n ValueTypeDefinitionVersion,\n} from \"./types.js\";\n\nexport const defaultTypeClasses: TypeClass[] = [{\n kind: \"render_hint\",\n name: \"SELECTABLE\",\n}, { kind: \"render_hint\", name: \"SORTABLE\" }];\n\n// ExperimentalTimeDependentV1 and Attachment types should be included here once supported\nexport function shouldNotHaveRenderHints(type: PropertyTypeType): boolean {\n return [\"struct\", \"mediaReference\", \"geotimeSeries\"].includes(\n getPropertyTypeName(type),\n );\n}\n\nexport function hasRenderHints(typeClasses: TypeClass[] | undefined): boolean {\n return (typeClasses ?? []).some(tc =>\n tc.kind.toLowerCase() === \"render_hint\"\n );\n}\n\nexport function getPropertyTypeName(type: PropertyTypeType): string {\n return typeof type === \"object\" ? type.type : type;\n}\n\nexport function convertValueType(\n valueType: ValueTypeDefinitionVersion,\n): OntologyIrValueTypeReferenceWithMetadata {\n return {\n apiName: valueType.apiName,\n version: valueType.version,\n packageNamespace: valueType.packageNamespace,\n displayMetadata: valueType.displayMetadata,\n };\n}\n\nexport function convertValueTypeDataConstraints(\n dataConstraints: ValueTypeDataConstraint[],\n): DataConstraints | undefined {\n if (dataConstraints.length === 0) {\n return undefined;\n }\n\n const propertyTypeConstraints: PropertyTypeDataConstraintsWrapper[] =\n dataConstraints.map(\n (constraint): PropertyTypeDataConstraintsWrapper => ({\n constraints: dataConstraintToPropertyTypeDataConstraint(\n constraint.constraint.constraint,\n ),\n failureMessage: constraint.constraint.failureMessage,\n }),\n );\n\n return {\n propertyTypeConstraints,\n };\n}\n\nexport function dataConstraintToPropertyTypeDataConstraint(\n dc: DataConstraint,\n): PropertyTypeDataConstraints {\n switch (dc.type) {\n case \"array\":\n return { ...dc } as PropertyTypeDataConstraints_array;\n\n case \"boolean\":\n return { ...dc } as PropertyTypeDataConstraints_boolean;\n\n case \"binary\":\n throw new Error(\"Binary type constraints are not supported\");\n\n case \"date\":\n return { ...dc } as PropertyTypeDataConstraints_date;\n\n case \"decimal\":\n return { ...dc } as PropertyTypeDataConstraints_decimal;\n\n case \"double\":\n return { ...dc } as PropertyTypeDataConstraints_double;\n\n case \"float\":\n return { ...dc } as PropertyTypeDataConstraints_float;\n\n case \"integer\":\n return { ...dc } as PropertyTypeDataConstraints_integer;\n\n case \"long\":\n return { ...dc } as PropertyTypeDataConstraints_long;\n\n case \"map\":\n throw new Error(\"Map type constraints are not supported\");\n\n case \"nullable\":\n throw new Error(\"Nullable constraints are not supported\");\n\n case \"short\":\n return { ...dc } as PropertyTypeDataConstraints_short;\n\n case \"string\":\n return { ...dc } as PropertyTypeDataConstraints_string;\n\n case \"struct\":\n return {\n type: \"struct\",\n struct: {\n elementConstraints: Object.fromEntries(\n Object.entries(dc.struct.elementConstraints).map((\n [field, constraint],\n ) => [\n field,\n convertDataConstraintToDataConstraints(constraint),\n ]),\n ),\n },\n } as PropertyTypeDataConstraints_struct;\n\n case \"structV2\":\n throw new Error(\"StructV2 constraints are not supported\");\n\n case \"timestamp\":\n return { ...dc } as PropertyTypeDataConstraints_timestamp;\n\n default:\n throw new Error(`Unknown DataConstraint type: ${(dc as any).type}`);\n }\n}\n\nexport function convertDataConstraintToDataConstraints(\n dc: DataConstraint,\n): DataConstraints {\n return {\n propertyTypeConstraints: [\n {\n constraints: dataConstraintToPropertyTypeDataConstraint(dc),\n // known limitation: structs don't carry field-level data constraint failure messages\n },\n ],\n };\n}\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\nexport function convertType(\n type: PropertyTypeType,\n): OntologyIrType {\n switch (true) {\n case (typeof type === \"object\" && \"markingType\" in type):\n return {\n \"type\": \"marking\",\n marking: { markingType: type.markingType },\n };\n\n case (typeof type === \"object\" && \"structDefinition\" in type):\n const structFields: Array<OntologyIrStructFieldType> = new Array();\n for (const key in type.structDefinition) {\n const fieldTypeDefinition = type.structDefinition[key];\n let field: OntologyIrStructFieldType;\n if (typeof fieldTypeDefinition === \"string\") {\n field = {\n apiName: key,\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: convertType(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: convertType(fieldTypeDefinition.fieldType),\n typeClasses: fieldTypeDefinition.typeClasses ?? [],\n aliases: fieldTypeDefinition.aliases ?? [],\n };\n } else {\n field = {\n apiName: key,\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: convertType(fieldTypeDefinition),\n };\n }\n }\n\n structFields.push(field);\n }\n\n return {\n type: \"struct\",\n struct: { 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:\n type.supportsEfficientLeadingWildcard,\n supportsExactMatching: type.supportsExactMatching,\n },\n };\n\n case (type === \"geopoint\"):\n return { type: \"geohash\", geohash: {} };\n\n case (type === \"decimal\"):\n return { type, [type]: { precision: undefined, scale: undefined } };\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\n case (type === \"mediaReference\"):\n return {\n type: type,\n mediaReference: {},\n };\n\n case (type === \"geotimeSeries\"):\n return {\n type: \"geotimeSeriesReference\",\n geotimeSeriesReference: {},\n };\n\n default:\n // use helper function to distribute `type` properly\n return distributeTypeHelper(type);\n }\n}\n\n/**\n * Helper function to avoid duplication. Makes the types match properly with the correct\n * behavior without needing to switch on type.\n * @param type\n * @returns\n */\nexport function distributeTypeHelper<T extends string>(\n type: T,\n): T extends any ? { type: T } & { [K in T]: {} } : never {\n return { type, [type]: {} } as any; // any cast to match conditional return type\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA,OAAOA,SAAS,MAAM,gBAAgB;AAQtC,OAAO,MAAMC,kBAA+B,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ACA;AACA,OAAO,SAASiE,oBAAoBA,CAClCjE,IAAO,EACiD;EACxD,OAAO;IAAEA,IAAI;IAAE,CAACA,IAAI,GAAG,CAAC;EAAE,CAAC,CAAQ,CAAC;AACtC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"propertyConversionUtils.js","names":["defaultTypeClasses","kind","name","shouldNotHaveRenderHints","type","includes","getPropertyTypeName","hasRenderHints","typeClasses","some","tc","toLowerCase"],"sources":["propertyConversionUtils.ts"],"sourcesContent":["/*\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 type { TypeClass } from \"./common/TypeClass.js\";\nimport type { PropertyTypeType } from \"./properties/PropertyTypeType.js\";\n\nexport const defaultTypeClasses: TypeClass[] = [{\n kind: \"render_hint\",\n name: \"SELECTABLE\",\n}, { kind: \"render_hint\", name: \"SORTABLE\" }];\n\n// ExperimentalTimeDependentV1 and Attachment types should be included here once supported\nexport function shouldNotHaveRenderHints(type: PropertyTypeType): boolean {\n return [\"struct\", \"mediaReference\", \"geotimeSeries\"].includes(\n getPropertyTypeName(type),\n );\n}\n\nexport function hasRenderHints(typeClasses: TypeClass[] | undefined): boolean {\n return (typeClasses ?? []).some(tc =>\n tc.kind.toLowerCase() === \"render_hint\"\n );\n}\n\nexport function getPropertyTypeName(type: PropertyTypeType): string {\n return typeof type === \"object\" ? type.type : type;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAO,MAAMA,kBAA+B,GAAG,CAAC;EAC9CC,IAAI,EAAE,aAAa;EACnBC,IAAI,EAAE;AACR,CAAC,EAAE;EAAED,IAAI,EAAE,aAAa;EAAEC,IAAI,EAAE;AAAW,CAAC,CAAC;;AAE7C;AACA,OAAO,SAASC,wBAAwBA,CAACC,IAAsB,EAAW;EACxE,OAAO,CAAC,QAAQ,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAACC,QAAQ,CAC3DC,mBAAmB,CAACF,IAAI,CAC1B,CAAC;AACH;AAEA,OAAO,SAASG,cAAcA,CAACC,WAAoC,EAAW;EAC5E,OAAO,CAACA,WAAW,IAAI,EAAE,EAAEC,IAAI,CAACC,EAAE,IAChCA,EAAE,CAACT,IAAI,CAACU,WAAW,CAAC,CAAC,KAAK,aAC5B,CAAC;AACH;AAEA,OAAO,SAASL,mBAAmBA,CAACF,IAAsB,EAAU;EAClE,OAAO,OAAOA,IAAI,KAAK,QAAQ,GAAGA,IAAI,CAACA,IAAI,GAAGA,IAAI;AACpD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueTypeDefinitionVersion.js","names":[],"sources":["ValueTypeDefinitionVersion.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 BaseType,\n ExampleValue,\n ValueTypeApiName,\n ValueTypeDataConstraint,\n ValueTypeDisplayMetadata,\n ValueTypeStatus,\n ValueTypeVersion,\n} from \"@osdk/client.unstable\";\nimport type { OntologyEntityBase } from \"../common/OntologyEntityBase.js\";\nimport type { OntologyEntityTypeEnum } from \"../common/OntologyEntityTypeEnum.js\";\n\nexport type ValueTypeDefinitionVersion = OntologyEntityBase & {\n apiName: ValueTypeApiName;\n packageNamespace: string;\n displayMetadata: ValueTypeDisplayMetadata;\n status: ValueTypeStatus;\n version: ValueTypeVersion;\n baseType: BaseType;\n constraints: ValueTypeDataConstraint[];\n exampleValues: ExampleValue[];\n __type: OntologyEntityTypeEnum.VALUE_TYPE;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValueTypeType.js","names":[],"sources":["ValueTypeType.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 { DataConstraint, FailureMessage } from \"@osdk/client.unstable\";\n\nexport type ValueTypeType =\n | ValueTypeType_array\n | ValueTypeType_boolean\n | ValueTypeType_binary\n | ValueTypeType_byte\n | ValueTypeType_date\n | ValueTypeType_decimal\n | ValueTypeType_double\n | ValueTypeType_float\n | ValueTypeType_integer\n | ValueTypeType_long\n | ValueTypeType_map\n | ValueTypeType_optional\n | ValueTypeType_short\n | ValueTypeType_string\n | ValueTypeType_structV2\n | ValueTypeType_timestamp;\n\nexport interface ValueTypeType_array {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"array\" }>[\"array\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"array\";\n value: {\n type: \"array\";\n elementType: ValueTypeType[\"value\"];\n };\n}\n\nexport interface ValueTypeType_boolean {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"boolean\" }>[\"boolean\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"boolean\";\n value: \"boolean\";\n}\n\nexport interface ValueTypeType_binary {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"binary\" }>[\"binary\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"binary\";\n value: \"binary\";\n}\n\nexport interface ValueTypeType_byte {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"byte\" }>[\"byte\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"byte\";\n value: \"byte\";\n}\n\nexport interface ValueTypeType_date {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"date\" }>[\"date\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"date\";\n value: \"date\";\n}\n\nexport interface ValueTypeType_decimal {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"decimal\" }>[\"decimal\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"decimal\";\n value: \"decimal\";\n}\n\nexport interface ValueTypeType_double {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"double\" }>[\"double\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"double\";\n value: \"double\";\n}\n\nexport interface ValueTypeType_float {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"float\" }>[\"float\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"float\";\n value: \"float\";\n}\n\nexport interface ValueTypeType_integer {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"integer\" }>[\"integer\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"integer\";\n value: \"integer\";\n}\n\nexport interface ValueTypeType_long {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"long\" }>[\"long\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"long\";\n value: \"long\";\n}\n\nexport interface ValueTypeType_map {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"map\" }>[\"map\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"map\";\n value: {\n type: \"map\";\n keyType: ValueTypeType[\"value\"];\n valueType: ValueTypeType[\"value\"];\n };\n}\n\nexport interface ValueTypeType_optional {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"optional\" }>[\"optional\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"optional\";\n value: {\n type: \"optional\";\n wrappedType: ValueTypeType[\"value\"];\n };\n}\n\nexport interface ValueTypeType_short {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"short\" }>[\"short\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"short\";\n value: \"short\";\n}\n\nexport interface ValueTypeType_string {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"string\" }>[\"string\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"string\";\n value: \"string\";\n}\n\nexport interface ValueTypeType_structV2 {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"structV2\" }>[\"structV2\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"structV2\";\n value: {\n type: \"struct\";\n fields: Array<{\n identifier: string;\n baseType: ValueTypeType[\"value\"];\n }>;\n };\n}\nexport interface ValueTypeType_timestamp {\n constraints: {\n constraint: Extract<DataConstraint, { type: \"timestamp\" }>[\"timestamp\"];\n failureMessage?: FailureMessage;\n }[];\n type: \"timestamp\";\n value: \"timestamp\";\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapWithProxy.js","names":["importOntologyEntity","wrapWithProxy","entity","Proxy","get","target","prop","receiver","Reflect"],"sources":["wrapWithProxy.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 {
|
|
1
|
+
{"version":3,"file":"wrapWithProxy.js","names":["importOntologyEntity","wrapWithProxy","entity","Proxy","get","target","prop","receiver","Reflect"],"sources":["wrapWithProxy.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 { OntologyEntityBase } from \"./common/OntologyEntityBase.js\";\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<T extends OntologyEntityBase>(entity: T): T {\n return new Proxy(entity, {\n get(target, prop, receiver) {\n importOntologyEntity(target);\n return Reflect.get(target, prop, receiver);\n },\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,oBAAoB,QAAQ,2BAA2B;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAA+BC,MAAS,EAAK;EACxE,OAAO,IAAIC,KAAK,CAACD,MAAM,EAAE;IACvBE,GAAGA,CAACC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAE;MAC1BP,oBAAoB,CAACK,MAAM,CAAC;MAC5B,OAAOG,OAAO,CAACJ,GAAG,CAACC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,CAAC;IAC5C;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -22,8 +22,9 @@ import yargs from "yargs";
|
|
|
22
22
|
import { hideBin } from "yargs/helpers";
|
|
23
23
|
import { defineOntology } from "../api/defineOntology.js";
|
|
24
24
|
const apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
|
|
25
|
+
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
25
26
|
export default async function main(args = process.argv) {
|
|
26
|
-
const commandLineOpts = await yargs(hideBin(args)).version("0.
|
|
27
|
+
const commandLineOpts = await yargs(hideBin(args)).version("0.14.0-beta.2" ?? "").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({
|
|
27
28
|
input: {
|
|
28
29
|
alias: "i",
|
|
29
30
|
describe: "Input file",
|
|
@@ -66,6 +67,11 @@ export default async function main(args = process.argv) {
|
|
|
66
67
|
describe: "File to write dependencies to",
|
|
67
68
|
type: "string",
|
|
68
69
|
coerce: path.resolve
|
|
70
|
+
},
|
|
71
|
+
randomnessKey: {
|
|
72
|
+
describe: "Value used to assure uniqueness of entities",
|
|
73
|
+
type: "string",
|
|
74
|
+
coerce: path.resolve
|
|
69
75
|
}
|
|
70
76
|
}).parseAsync();
|
|
71
77
|
let apiNamespace = "";
|
|
@@ -75,7 +81,10 @@ export default async function main(args = process.argv) {
|
|
|
75
81
|
!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;
|
|
76
82
|
}
|
|
77
83
|
consola.info(`Loading ontology from ${commandLineOpts.input}`);
|
|
78
|
-
|
|
84
|
+
if (commandLineOpts.randomnessKey !== undefined) {
|
|
85
|
+
!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;
|
|
86
|
+
}
|
|
87
|
+
const ontologyIr = await loadOntology(commandLineOpts.input, apiNamespace, commandLineOpts.outputDir, commandLineOpts.dependencies, commandLineOpts.randomnessKey);
|
|
79
88
|
consola.info(`Saving ontology to ${commandLineOpts.output}`);
|
|
80
89
|
await fs.writeFile(commandLineOpts.output, JSON.stringify(ontologyIr, null, 2));
|
|
81
90
|
// No point in generating block if there aren't any value types
|
|
@@ -83,8 +92,8 @@ export default async function main(args = process.argv) {
|
|
|
83
92
|
await fs.writeFile(commandLineOpts.valueTypesOutput, JSON.stringify(ontologyIr.valueTypes, null, 2));
|
|
84
93
|
}
|
|
85
94
|
}
|
|
86
|
-
async function loadOntology(input, apiNamespace, outputDir, dependencyFile) {
|
|
87
|
-
const q = await defineOntology(apiNamespace, async () => await import(input), outputDir, dependencyFile);
|
|
95
|
+
async function loadOntology(input, apiNamespace, outputDir, dependencyFile, randomnessKey) {
|
|
96
|
+
const q = await defineOntology(apiNamespace, async () => await import(input), outputDir, dependencyFile, randomnessKey);
|
|
88
97
|
return q;
|
|
89
98
|
}
|
|
90
99
|
//# sourceMappingURL=main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","names":["consola","fs","path","invariant","yargs","hideBin","defineOntology","apiNamespaceRegex","main","args","process","argv","commandLineOpts","version","wrap","Math","min","terminalWidth","strict","help","options","input","alias","describe","type","default","coerce","resolve","output","apiNamespace","snapshotDir","outputDir","valueTypesOutput","dependencies","parseAsync","length","slice","env","NODE_ENV","test","info","ontologyIr","loadOntology","writeFile","JSON","stringify","valueTypes","importedValueTypes","dependencyFile","q"],"sources":["main.ts"],"sourcesContent":["/*\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\";\n\nconst apiNamespaceRegex = /^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$/;\n\nexport default async function main(\n args: string[] = process.argv,\n): Promise<void> {\n const commandLineOpts: {\n input: string;\n output: string;\n apiNamespace: string;\n snapshotDir: string;\n valueTypesOutput: string;\n outputDir?: string;\n dependencies?: string;\n } = await yargs(hideBin(args))\n .version(process.env.PACKAGE_VERSION ?? \"\")\n .wrap(Math.min(150, yargs().terminalWidth()))\n .strict()\n .help()\n .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 })\n .parseAsync();\n let apiNamespace = \"\";\n if (commandLineOpts.apiNamespace.length !== 0) {\n apiNamespace = (commandLineOpts.apiNamespace.slice(-1) !== \".\")\n ? commandLineOpts.apiNamespace + \".\"\n : commandLineOpts.apiNamespace;\n invariant(apiNamespace.length < 1024, \"API namespace is too long.\");\n invariant(\n apiNamespaceRegex.test(apiNamespace),\n \"API namespace is invalid! It is expected to conform to ^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$\",\n );\n }\n consola.info(`Loading ontology from ${commandLineOpts.input}`);\n\n const ontologyIr = await loadOntology(\n commandLineOpts.input,\n apiNamespace,\n commandLineOpts.outputDir,\n commandLineOpts.dependencies,\n );\n\n consola.info(`Saving ontology to ${commandLineOpts.output}`);\n await fs.writeFile(\n commandLineOpts.output,\n JSON.stringify(\n ontologyIr,\n null,\n 2,\n ),\n );\n // No point in generating block if there aren't any value types\n if (\n ontologyIr.valueTypes.valueTypes.length > 0\n || ontologyIr.importedValueTypes.valueTypes.length > 0\n ) {\n await fs.writeFile(\n commandLineOpts.valueTypesOutput,\n JSON.stringify(\n ontologyIr.valueTypes,\n null,\n 2,\n ),\n );\n }\n}\n\nasync function loadOntology(\n input: string,\n apiNamespace: string,\n outputDir: string | undefined,\n dependencyFile: string | undefined,\n) {\n const q = await defineOntology(\n apiNamespace,\n async () => await import(input),\n outputDir,\n dependencyFile,\n );\n return q;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,SAAS;AACjC,OAAO,KAAKC,EAAE,MAAM,kBAAkB;AACtC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAOC,SAAS,MAAM,gBAAgB;AACtC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,eAAe;AACvC,SAASC,cAAc,QAAQ,0BAA0B;AAEzD,MAAMC,iBAAiB,GAAG,+BAA+B;
|
|
1
|
+
{"version":3,"file":"main.js","names":["consola","fs","path","invariant","yargs","hideBin","defineOntology","apiNamespaceRegex","uuidRegex","main","args","process","argv","commandLineOpts","version","wrap","Math","min","terminalWidth","strict","help","options","input","alias","describe","type","default","coerce","resolve","output","apiNamespace","snapshotDir","outputDir","valueTypesOutput","dependencies","randomnessKey","parseAsync","length","slice","env","NODE_ENV","test","info","undefined","ontologyIr","loadOntology","writeFile","JSON","stringify","valueTypes","importedValueTypes","dependencyFile","q"],"sources":["main.ts"],"sourcesContent":["/*\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\";\n\nconst apiNamespaceRegex = /^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$/;\nconst uuidRegex =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;\n\nexport default async function main(\n args: string[] = process.argv,\n): Promise<void> {\n const commandLineOpts: {\n input: string;\n output: string;\n apiNamespace: string;\n snapshotDir: string;\n valueTypesOutput: string;\n outputDir?: string;\n dependencies?: string;\n randomnessKey?: string;\n } = await yargs(hideBin(args))\n .version(process.env.PACKAGE_VERSION ?? \"\")\n .wrap(Math.min(150, yargs().terminalWidth()))\n .strict()\n .help()\n .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 })\n .parseAsync();\n let apiNamespace = \"\";\n if (commandLineOpts.apiNamespace.length !== 0) {\n apiNamespace = (commandLineOpts.apiNamespace.slice(-1) !== \".\")\n ? commandLineOpts.apiNamespace + \".\"\n : commandLineOpts.apiNamespace;\n invariant(apiNamespace.length < 1024, \"API namespace is too long.\");\n invariant(\n apiNamespaceRegex.test(apiNamespace),\n \"API namespace is invalid! It is expected to conform to ^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$\",\n );\n }\n consola.info(`Loading ontology from ${commandLineOpts.input}`);\n\n if (commandLineOpts.randomnessKey !== undefined) {\n invariant(\n uuidRegex.test(commandLineOpts.randomnessKey),\n \"Supplied randomness key is not a uuid and shouldn't be used as a uniqueness guarantee\",\n );\n }\n\n const ontologyIr = await loadOntology(\n commandLineOpts.input,\n apiNamespace,\n commandLineOpts.outputDir,\n commandLineOpts.dependencies,\n commandLineOpts.randomnessKey,\n );\n\n consola.info(`Saving ontology to ${commandLineOpts.output}`);\n await fs.writeFile(\n commandLineOpts.output,\n JSON.stringify(\n ontologyIr,\n null,\n 2,\n ),\n );\n // No point in generating block if there aren't any value types\n if (\n ontologyIr.valueTypes.valueTypes.length > 0\n || ontologyIr.importedValueTypes.valueTypes.length > 0\n ) {\n await fs.writeFile(\n commandLineOpts.valueTypesOutput,\n JSON.stringify(\n ontologyIr.valueTypes,\n null,\n 2,\n ),\n );\n }\n}\n\nasync function loadOntology(\n input: string,\n apiNamespace: string,\n outputDir: string | undefined,\n dependencyFile: string | undefined,\n randomnessKey?: string,\n) {\n const q = await defineOntology(\n apiNamespace,\n async () => await import(input),\n outputDir,\n dependencyFile,\n randomnessKey,\n );\n return q;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,SAAS;AACjC,OAAO,KAAKC,EAAE,MAAM,kBAAkB;AACtC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAOC,SAAS,MAAM,gBAAgB;AACtC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,eAAe;AACvC,SAASC,cAAc,QAAQ,0BAA0B;AAEzD,MAAMC,iBAAiB,GAAG,+BAA+B;AACzD,MAAMC,SAAS,GACb,gEAAgE;AAElE,eAAe,eAAeC,IAAIA,CAChCC,IAAc,GAAGC,OAAO,CAACC,IAAI,EACd;EACf,MAAMC,eASL,GAAG,MAAMT,KAAK,CAACC,OAAO,CAACK,IAAI,CAAC,CAAC,CAC3BI,OAAO,CAAC,mBAA+B,EAAE,CAAC,CAC1CC,IAAI,CAACC,IAAI,CAACC,GAAG,CAAC,GAAG,EAAEb,KAAK,CAAC,CAAC,CAACc,aAAa,CAAC,CAAC,CAAC,CAAC,CAC5CC,MAAM,CAAC,CAAC,CACRC,IAAI,CAAC,CAAC,CACNC,OAAO,CAAC;IACPC,KAAK,EAAE;MACLC,KAAK,EAAE,GAAG;MACVC,QAAQ,EAAE,YAAY;MACtBC,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAE,uBAAuB;MAChCC,MAAM,EAAEzB,IAAI,CAAC0B;IACf,CAAC;IACDC,MAAM,EAAE;MACNN,KAAK,EAAE,GAAG;MACVC,QAAQ,EAAE,aAAa;MACvBC,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAE,eAAe;MACxBC,MAAM,EAAEzB,IAAI,CA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CAAC,GAAG,MAAM9C,cAAc,CAC5BwB,YAAY,EACZ,YAAY,MAAM,MAAM,CAACR,KAAK,CAAC,EAC/BU,SAAS,EACTmB,cAAc,EACdhB,aACF,CAAC;EACD,OAAOiB,CAAC;AACV","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
export function distributeTypeHelper(type) {
|
|
18
|
+
return {
|
|
19
|
+
type,
|
|
20
|
+
[type]: {}
|
|
21
|
+
}; // any cast to match conditional return type
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=distributeTypeHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distributeTypeHelper.js","names":["distributeTypeHelper","type"],"sources":["distributeTypeHelper.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\nexport function distributeTypeHelper<T extends string>(\n type: T,\n): T extends any ?\n & { type: T }\n & {\n [K in T]: {};\n }\n : never\n{\n return { type, [type]: {} } as any; // any cast to match conditional return type\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,oBAAoBA,CAClCC,IAAO,EAOT;EACE,OAAO;IAAEA,IAAI;IAAE,CAACA,IAAI,GAAG,CAAC;EAAE,CAAC,CAAQ,CAAC;AACtC","ignoreList":[]}
|
|
@@ -0,0 +1,88 @@
|
|
|
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 { extractAllowedValues } from "../../api/defineOntology.js";
|
|
18
|
+
import { convertConditionDefinition } from "./convertConditionDefinition.js";
|
|
19
|
+
export function convertActionParameterConditionalOverride(override, validation, actionParameters) {
|
|
20
|
+
let parameterBlockOverride;
|
|
21
|
+
switch (override.type) {
|
|
22
|
+
case "required":
|
|
23
|
+
parameterBlockOverride = {
|
|
24
|
+
type: "parameterRequired",
|
|
25
|
+
parameterRequired: {
|
|
26
|
+
required: validation.required ? {
|
|
27
|
+
type: "notRequired",
|
|
28
|
+
notRequired: {}
|
|
29
|
+
} : {
|
|
30
|
+
type: "required",
|
|
31
|
+
required: {}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
break;
|
|
36
|
+
case "visibility":
|
|
37
|
+
parameterBlockOverride = {
|
|
38
|
+
type: "visibility",
|
|
39
|
+
visibility: {
|
|
40
|
+
visibility: validation.defaultVisibility === "editable" ? {
|
|
41
|
+
type: "hidden",
|
|
42
|
+
hidden: {}
|
|
43
|
+
} : {
|
|
44
|
+
type: "editable",
|
|
45
|
+
editable: {}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
break;
|
|
50
|
+
case "disabled":
|
|
51
|
+
parameterBlockOverride = {
|
|
52
|
+
type: "visibility",
|
|
53
|
+
visibility: {
|
|
54
|
+
visibility: validation.defaultVisibility === "editable" ? {
|
|
55
|
+
type: "disabled",
|
|
56
|
+
disabled: {}
|
|
57
|
+
} : {
|
|
58
|
+
type: "editable",
|
|
59
|
+
editable: {}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
break;
|
|
64
|
+
case "defaultValue":
|
|
65
|
+
parameterBlockOverride = {
|
|
66
|
+
type: "prefill",
|
|
67
|
+
prefill: {
|
|
68
|
+
prefill: override.defaultValue
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
break;
|
|
72
|
+
case "constraint":
|
|
73
|
+
parameterBlockOverride = {
|
|
74
|
+
type: "allowedValues",
|
|
75
|
+
allowedValues: {
|
|
76
|
+
allowedValues: extractAllowedValues(override.constraint)
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
break;
|
|
80
|
+
default:
|
|
81
|
+
throw new Error(`Unknown parameter override type`);
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
condition: convertConditionDefinition(override.condition, actionParameters),
|
|
85
|
+
parameterBlockOverrides: [parameterBlockOverride]
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=convertActionParameterConditionalOverride.js.map
|