@osdk/maker-experimental 0.6.0-beta.1 → 0.6.0-beta.3
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 +24 -0
- package/bin/maker-experimental.mjs +6 -0
- package/build/browser/api/defineOntologyV2.js +35 -0
- package/build/browser/api/defineOntologyV2.js.map +1 -0
- package/build/browser/cli/main.js +120 -0
- package/build/browser/cli/main.js.map +1 -0
- package/build/browser/cli/marketplaceSerialization/BlockGeneratorResult.js +2 -0
- package/build/browser/cli/marketplaceSerialization/BlockGeneratorResult.js.map +1 -0
- package/build/browser/cli/marketplaceSerialization/CodeBlockSetSpec.js +2 -0
- package/build/browser/cli/marketplaceSerialization/CodeBlockSetSpec.js.map +1 -0
- package/build/browser/cli/marketplaceSerialization/CodeBlockSpec.js +53 -0
- package/build/browser/cli/marketplaceSerialization/CodeBlockSpec.js.map +1 -0
- package/build/browser/cli/marketplaceSerialization/StoreManifestEntry.js +2 -0
- package/build/browser/cli/marketplaceSerialization/StoreManifestEntry.js.map +1 -0
- package/build/browser/cli/marketplaceSerialization/index.js +2 -0
- package/build/browser/cli/marketplaceSerialization/index.js.map +1 -0
- package/build/browser/cli/marketplaceSerialization/specGenerators.js +70 -0
- package/build/browser/cli/marketplaceSerialization/specGenerators.js.map +1 -0
- package/build/browser/cli/marketplaceSerialization/supportingTypes.js +2 -0
- package/build/browser/cli/marketplaceSerialization/supportingTypes.js.map +1 -0
- package/build/browser/conversion/toConjure/distributeTypeHelper.js +23 -0
- package/build/browser/conversion/toConjure/distributeTypeHelper.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertActionHelpers.js +469 -0
- package/build/browser/conversion/toMarketplace/convertActionHelpers.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js +96 -0
- package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertActionParameters.js +81 -0
- package/build/browser/conversion/toMarketplace/convertActionParameters.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertActionSections.js +45 -0
- package/build/browser/conversion/toMarketplace/convertActionSections.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertActionValidation.js +160 -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 +352 -0
- package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertInterface.js +75 -0
- package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertInterfacePropertyType.js +62 -0
- package/build/browser/conversion/toMarketplace/convertInterfacePropertyType.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertLink.js +247 -0
- package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertMappingValue.js +76 -0
- package/build/browser/conversion/toMarketplace/convertMappingValue.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js +42 -0
- package/build/browser/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertObject.js +262 -0
- package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js +59 -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 +236 -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 +65 -0
- package/build/browser/conversion/toMarketplace/convertSpt.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertValueType.js +20 -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/propertyTypeTypeToOntologyIrInterfaceType.js +146 -0
- package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js.map +1 -0
- package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +156 -0
- package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.js +442 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.js.map +1 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js +562 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js.map +1 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.js +513 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.js.map +1 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.js +274 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.js.map +1 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.js +425 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.js.map +1 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js +677 -0
- package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js.map +1 -0
- package/build/browser/conversion/toMarketplace/typeVisitors.js +615 -0
- package/build/browser/conversion/toMarketplace/typeVisitors.js.map +1 -0
- package/build/browser/index.js +2 -0
- package/build/browser/index.js.map +1 -1
- package/build/browser/util/generateRid.js +476 -0
- package/build/browser/util/generateRid.js.map +1 -0
- package/build/cjs/ActionTypeShapeExtractor-5IVLHAPH.cjs +395 -0
- package/build/cjs/ActionTypeShapeExtractor-5IVLHAPH.cjs.map +1 -0
- package/build/cjs/chunk-AWYOBJ25.cjs +440 -0
- package/build/cjs/chunk-AWYOBJ25.cjs.map +1 -0
- package/build/cjs/index.cjs +3965 -2663
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +103 -1
- package/build/esm/api/defineOntologyV2.js +35 -0
- package/build/esm/api/defineOntologyV2.js.map +1 -0
- package/build/esm/cli/main.js +120 -0
- package/build/esm/cli/main.js.map +1 -0
- package/build/esm/cli/marketplaceSerialization/BlockGeneratorResult.js +2 -0
- package/build/esm/cli/marketplaceSerialization/BlockGeneratorResult.js.map +1 -0
- package/build/esm/cli/marketplaceSerialization/CodeBlockSetSpec.js +2 -0
- package/build/esm/cli/marketplaceSerialization/CodeBlockSetSpec.js.map +1 -0
- package/build/esm/cli/marketplaceSerialization/CodeBlockSpec.js +53 -0
- package/build/esm/cli/marketplaceSerialization/CodeBlockSpec.js.map +1 -0
- package/build/esm/cli/marketplaceSerialization/StoreManifestEntry.js +2 -0
- package/build/esm/cli/marketplaceSerialization/StoreManifestEntry.js.map +1 -0
- package/build/esm/cli/marketplaceSerialization/index.js +2 -0
- package/build/esm/cli/marketplaceSerialization/index.js.map +1 -0
- package/build/esm/cli/marketplaceSerialization/specGenerators.js +70 -0
- package/build/esm/cli/marketplaceSerialization/specGenerators.js.map +1 -0
- package/build/esm/cli/marketplaceSerialization/supportingTypes.js +2 -0
- package/build/esm/cli/marketplaceSerialization/supportingTypes.js.map +1 -0
- package/build/esm/conversion/toConjure/distributeTypeHelper.js +23 -0
- package/build/esm/conversion/toConjure/distributeTypeHelper.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertActionHelpers.js +469 -0
- package/build/esm/conversion/toMarketplace/convertActionHelpers.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js +96 -0
- package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertActionParameters.js +81 -0
- package/build/esm/conversion/toMarketplace/convertActionParameters.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertActionSections.js +45 -0
- package/build/esm/conversion/toMarketplace/convertActionSections.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertActionValidation.js +160 -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 +352 -0
- package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertInterface.js +75 -0
- package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertInterfacePropertyType.js +62 -0
- package/build/esm/conversion/toMarketplace/convertInterfacePropertyType.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertLink.js +247 -0
- package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertMappingValue.js +76 -0
- package/build/esm/conversion/toMarketplace/convertMappingValue.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js +42 -0
- package/build/esm/conversion/toMarketplace/convertNullabilityToDataConstraint.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertObject.js +262 -0
- package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js +59 -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 +236 -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 +65 -0
- package/build/esm/conversion/toMarketplace/convertSpt.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertValueType.js +20 -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/propertyTypeTypeToOntologyIrInterfaceType.js +146 -0
- package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js.map +1 -0
- package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +156 -0
- package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.js +442 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.js.map +1 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js +562 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js.map +1 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.js +513 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.js.map +1 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.js +274 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.js.map +1 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.js +425 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.js.map +1 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js +677 -0
- package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js.map +1 -0
- package/build/esm/conversion/toMarketplace/typeVisitors.js +615 -0
- package/build/esm/conversion/toMarketplace/typeVisitors.js.map +1 -0
- package/build/esm/index.js +2 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/util/generateRid.js +476 -0
- package/build/esm/util/generateRid.js.map +1 -0
- package/build/types/api/defineOntologyV2.d.ts +3 -0
- package/build/types/api/defineOntologyV2.d.ts.map +1 -0
- package/build/types/cli/main.d.ts +1 -0
- package/build/types/cli/main.d.ts.map +1 -0
- package/build/types/cli/marketplaceSerialization/BlockGeneratorResult.d.ts +69 -0
- package/build/types/cli/marketplaceSerialization/BlockGeneratorResult.d.ts.map +1 -0
- package/build/types/cli/marketplaceSerialization/CodeBlockSetSpec.d.ts +60 -0
- package/build/types/cli/marketplaceSerialization/CodeBlockSetSpec.d.ts.map +1 -0
- package/build/types/cli/marketplaceSerialization/CodeBlockSpec.d.ts +48 -0
- package/build/types/cli/marketplaceSerialization/CodeBlockSpec.d.ts.map +1 -0
- package/build/types/cli/marketplaceSerialization/StoreManifestEntry.d.ts +13 -0
- package/build/types/cli/marketplaceSerialization/StoreManifestEntry.d.ts.map +1 -0
- package/build/types/cli/marketplaceSerialization/index.d.ts +11 -0
- package/build/types/cli/marketplaceSerialization/index.d.ts.map +1 -0
- package/build/types/cli/marketplaceSerialization/specGenerators.d.ts +10 -0
- package/build/types/cli/marketplaceSerialization/specGenerators.d.ts.map +1 -0
- package/build/types/cli/marketplaceSerialization/supportingTypes.d.ts +31 -0
- package/build/types/cli/marketplaceSerialization/supportingTypes.d.ts.map +1 -0
- 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/convertActionHelpers.d.ts +7 -0
- package/build/types/conversion/toMarketplace/convertActionHelpers.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 +4 -0
- package/build/types/conversion/toMarketplace/convertActionParameters.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertActionSections.d.ts +4 -0
- package/build/types/conversion/toMarketplace/convertActionSections.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertActionValidation.d.ts +4 -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 +3 -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 +4 -0
- package/build/types/conversion/toMarketplace/convertInterface.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertInterfacePropertyType.d.ts +4 -0
- package/build/types/conversion/toMarketplace/convertInterfacePropertyType.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertLink.d.ts +9 -0
- package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertMappingValue.d.ts +4 -0
- package/build/types/conversion/toMarketplace/convertMappingValue.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts +6 -0
- package/build/types/conversion/toMarketplace/convertNullabilityToDataConstraint.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertObject.d.ts +10 -0
- package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts +4 -0
- package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts +4 -0
- package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts +4 -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 +3 -0
- package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertSpt.d.ts +4 -0
- package/build/types/conversion/toMarketplace/convertSpt.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertValueType.d.ts +4 -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/propertyTypeTypeToOntologyIrInterfaceType.d.ts +4 -0
- package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts +4 -0
- package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.d.ts +13 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.d.ts +1 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.d.ts +11 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/IrShapeExtractor.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.d.ts +43 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/LinkTypeShapeExtractor.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.d.ts +28 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.d.ts +1 -0
- package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/typeVisitors.d.ts +17 -0
- package/build/types/conversion/toMarketplace/typeVisitors.d.ts.map +1 -0
- package/build/types/index.d.ts +3 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/util/generateRid.d.ts +216 -0
- package/build/types/util/generateRid.d.ts.map +1 -0
- package/package.json +10 -4
- package/build/cjs/chunk-ZPP374PZ.cjs +0 -17
- package/build/cjs/chunk-ZPP374PZ.cjs.map +0 -1
- package/build/cjs/prompt-VSXFWPU4.cjs +0 -955
- package/build/cjs/prompt-VSXFWPU4.cjs.map +0 -1
|
@@ -0,0 +1,513 @@
|
|
|
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 { ReadableIdGenerator } from "../../../util/generateRid.js";
|
|
18
|
+
import { typeToMarketplaceBaseType, typeToMarketplaceObjectPropertyType } from "../typeVisitors.js";
|
|
19
|
+
import { LinkTypeShapeExtractor } from "./LinkTypeShapeExtractor.js";
|
|
20
|
+
import { ObjectTypeShapeExtractor } from "./ObjectTypeShapeExtractor.js";
|
|
21
|
+
export const MIGRATION_SHAPE_READABLE_ID = "migration-input";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Helper to create LocalizedTitleAndDescription with empty localizations
|
|
25
|
+
*/
|
|
26
|
+
function createLocalizedAbout(fallbackTitle, fallbackDescription) {
|
|
27
|
+
return {
|
|
28
|
+
fallbackTitle,
|
|
29
|
+
fallbackDescription,
|
|
30
|
+
localizedTitle: {},
|
|
31
|
+
localizedDescription: {}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Main entry point for extracting all shapes from an ontology
|
|
37
|
+
*/
|
|
38
|
+
export async function getShapes(ontologyBlockDataV2, ridGenerator, randomnessKey) {
|
|
39
|
+
const allBlockShapes = {
|
|
40
|
+
inputShapes: new Map(),
|
|
41
|
+
outputShapes: new Map(),
|
|
42
|
+
inputShapeMetadata: new Map()
|
|
43
|
+
};
|
|
44
|
+
const outputSharedPropertyTypeRids = new Set(Object.keys(ontologyBlockDataV2.sharedPropertyTypes));
|
|
45
|
+
|
|
46
|
+
// Interfaces
|
|
47
|
+
for (const [_rid, interfaceType] of Object.entries(ontologyBlockDataV2.interfaceTypes)) {
|
|
48
|
+
extractInterfaceType(allBlockShapes.outputShapes, allBlockShapes.inputShapes, ontologyBlockDataV2.knownIdentifiers, outputSharedPropertyTypeRids, interfaceType.interfaceType, ridGenerator);
|
|
49
|
+
}
|
|
50
|
+
// Shared Property Types
|
|
51
|
+
for (const [_rid, sharedPropertyTypeBlock] of Object.entries(ontologyBlockDataV2.sharedPropertyTypes)) {
|
|
52
|
+
extractSharedPropertyType(allBlockShapes, sharedPropertyTypeBlock.sharedPropertyType, ridGenerator);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Objects
|
|
56
|
+
const objectReadableIds = ridGenerator.getObjectTypeRids().inverse();
|
|
57
|
+
for (const [rid, objectType] of Object.entries(ontologyBlockDataV2.objectTypes)) {
|
|
58
|
+
const readableId = objectReadableIds.get(rid);
|
|
59
|
+
if (readableId) {
|
|
60
|
+
const objectExtractor = new ObjectTypeShapeExtractor(randomnessKey);
|
|
61
|
+
const objectShapes = objectExtractor.extract(readableId, objectType, ridGenerator);
|
|
62
|
+
consumeBlockShapes(allBlockShapes, objectShapes);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Marking shapes
|
|
67
|
+
const markingShapes = getMarkingShapes(ontologyBlockDataV2, ridGenerator);
|
|
68
|
+
consumeBlockShapes(allBlockShapes, markingShapes);
|
|
69
|
+
|
|
70
|
+
// Links
|
|
71
|
+
const linkReadableIds = ridGenerator.getLinkTypeRids().inverse();
|
|
72
|
+
for (const [rid, linkType] of Object.entries(ontologyBlockDataV2.linkTypes)) {
|
|
73
|
+
const readableId = linkReadableIds.get(rid);
|
|
74
|
+
if (readableId) {
|
|
75
|
+
const linkExtractor = new LinkTypeShapeExtractor();
|
|
76
|
+
const linkShapes = linkExtractor.extract(readableId, linkType, ridGenerator);
|
|
77
|
+
consumeBlockShapes(allBlockShapes, linkShapes);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Actions
|
|
82
|
+
const {
|
|
83
|
+
ActionTypeShapeExtractor
|
|
84
|
+
} = await import("./ActionTypeShapeExtractor.js");
|
|
85
|
+
for (const [_rid, actionType] of Object.entries(ontologyBlockDataV2.actionTypes || {})) {
|
|
86
|
+
const actionExtractor = new ActionTypeShapeExtractor();
|
|
87
|
+
const actionShapes = actionExtractor.extract(actionType, ridGenerator, ontologyBlockDataV2.knownIdentifiers);
|
|
88
|
+
consumeBlockShapes(allBlockShapes, actionShapes);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Multipass groups
|
|
92
|
+
for (const [readableId, groupId] of ridGenerator.getGroupIds().entries()) {
|
|
93
|
+
const groupShapes = extractMultipassGroup(groupId, readableId);
|
|
94
|
+
consumeBlockShapes(allBlockShapes, groupShapes);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Migration shape
|
|
98
|
+
const migrationShapes = getMigrationShape();
|
|
99
|
+
consumeBlockShapes(allBlockShapes, migrationShapes);
|
|
100
|
+
return allBlockShapes;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Extract interface type shapes
|
|
105
|
+
*/
|
|
106
|
+
function extractInterfaceType(outputShapeMap, inputShapeMap, knownMarketplaceIdentifiers, outputSharedPropertyTypeRids, interfaceType, ridGenerator) {
|
|
107
|
+
const interfaceReadableId = getReadableIdForInterface(interfaceType.apiName);
|
|
108
|
+
// Build propertiesV2 from propertiesV3 entries
|
|
109
|
+
const propertiesV2 = [];
|
|
110
|
+
for (const [propertyRid, _property] of Object.entries(interfaceType.propertiesV3 ?? {})) {
|
|
111
|
+
const readableId = ridGenerator.getInterfacePropertyTypeRids().inverse().get(propertyRid);
|
|
112
|
+
if (readableId) {
|
|
113
|
+
propertiesV2.push(ridGenerator.toBlockInternalId(readableId));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Build interface type output shape
|
|
118
|
+
const interfaceTypeOutputShape = {
|
|
119
|
+
about: createLocalizedAbout(interfaceType.displayMetadata.displayName, interfaceType.displayMetadata.description ?? ""),
|
|
120
|
+
properties: (interfaceType.properties ?? []).map(spt => {
|
|
121
|
+
const sptId = knownMarketplaceIdentifiers.sharedPropertyTypes?.[spt.rid];
|
|
122
|
+
return sptId ?? spt.rid;
|
|
123
|
+
}),
|
|
124
|
+
propertiesV2,
|
|
125
|
+
links: (interfaceType.links ?? []).map(ilt => {
|
|
126
|
+
const iltId = knownMarketplaceIdentifiers.interfaceLinkTypes?.[ilt.rid];
|
|
127
|
+
return iltId ?? ilt.rid;
|
|
128
|
+
}),
|
|
129
|
+
extendsInterfaces: (interfaceType.extendsInterfaces ?? []).map(it => {
|
|
130
|
+
const itId = knownMarketplaceIdentifiers.interfaceTypes?.[it];
|
|
131
|
+
return itId ?? it;
|
|
132
|
+
})
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// Add shared property type input shapes for properties not in output
|
|
136
|
+
for (const [propertyRid, property] of Object.entries(interfaceType.propertiesV3) ?? []) {
|
|
137
|
+
if (property.type === "sharedPropertyBasedPropertyType" && !outputSharedPropertyTypeRids.has(property.sharedPropertyBasedPropertyType.sharedPropertyType.rid)) {
|
|
138
|
+
const spt = property.sharedPropertyBasedPropertyType.sharedPropertyType;
|
|
139
|
+
const sptReadableId = getReadableIdForSpt(spt.apiName);
|
|
140
|
+
const sharedPropInputShape = {
|
|
141
|
+
about: getTitleAndDescriptionForSharedPropertyType(spt),
|
|
142
|
+
type: {
|
|
143
|
+
type: "objectPropertyType",
|
|
144
|
+
objectPropertyType: typeToMarketplaceObjectPropertyType(spt.type)
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
inputShapeMap.set(sptReadableId, {
|
|
148
|
+
type: "sharedPropertyType",
|
|
149
|
+
sharedPropertyType: sharedPropInputShape
|
|
150
|
+
});
|
|
151
|
+
} else if (property.type === "interfaceDefinedPropertyType") {
|
|
152
|
+
outputShapeMap.set(ridGenerator.getInterfacePropertyTypeRids().inverse().get(propertyRid), {
|
|
153
|
+
type: "interfacePropertyType",
|
|
154
|
+
interfacePropertyType: {
|
|
155
|
+
type: typeToMarketplaceObjectPropertyType(property.interfaceDefinedPropertyType.type),
|
|
156
|
+
about: {
|
|
157
|
+
fallbackTitle: property.interfaceDefinedPropertyType.displayMetadata.displayName,
|
|
158
|
+
fallbackDescription: property.interfaceDefinedPropertyType.displayMetadata.description ?? "",
|
|
159
|
+
localizedDescription: {},
|
|
160
|
+
localizedTitle: {}
|
|
161
|
+
},
|
|
162
|
+
interfaceType: ridGenerator.toBlockInternalId(interfaceReadableId),
|
|
163
|
+
requireImplementation: property.interfaceDefinedPropertyType.constraints.requireImplementation
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Add interface link type output shapes
|
|
170
|
+
for (const interfaceLinkType of interfaceType.links ?? []) {
|
|
171
|
+
const outputShape = getInterfaceLinkTypeOutputShape(knownMarketplaceIdentifiers, interfaceType, interfaceLinkType, ridGenerator);
|
|
172
|
+
outputShapeMap.set(outputShape.id, outputShape.outputShape);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Add interface type output shape
|
|
176
|
+
outputShapeMap.set(interfaceReadableId, {
|
|
177
|
+
type: "interfaceType",
|
|
178
|
+
interfaceType: interfaceTypeOutputShape
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Get interface link type output shape
|
|
184
|
+
*/
|
|
185
|
+
function getInterfaceLinkTypeOutputShape(knownMarketplaceIdentifiers, interfaceType, interfaceLinkType, ridGenerator) {
|
|
186
|
+
// Build linked entity type reference
|
|
187
|
+
const interfaceRidOrUndefined = interfaceLinkType.linkedEntityTypeId.type === "interfaceType" ? interfaceLinkType.linkedEntityTypeId.interfaceType : undefined;
|
|
188
|
+
if (!interfaceRidOrUndefined) {
|
|
189
|
+
throw new Error("Object link references not implemented");
|
|
190
|
+
}
|
|
191
|
+
const linkedEntityTypeRef = ridGenerator.toBlockInternalId(ridGenerator.getInterfaceRids().inverse().get(interfaceRidOrUndefined));
|
|
192
|
+
|
|
193
|
+
// Map cardinality
|
|
194
|
+
const cardinality = interfaceLinkType.cardinality === "SINGLE" ? "SINGLE" : "MANY";
|
|
195
|
+
const shape = {
|
|
196
|
+
about: createLocalizedAbout(interfaceLinkType.metadata.displayName, interfaceLinkType.metadata.description),
|
|
197
|
+
interfaceType: knownMarketplaceIdentifiers.interfaceTypes?.[interfaceType.rid] ?? interfaceType.rid,
|
|
198
|
+
linkedEntityType: {
|
|
199
|
+
type: "interfaceType",
|
|
200
|
+
interfaceType: linkedEntityTypeRef
|
|
201
|
+
},
|
|
202
|
+
cardinality,
|
|
203
|
+
required: interfaceLinkType.required
|
|
204
|
+
};
|
|
205
|
+
const readableId = getReadableIdForInterfaceLink(interfaceType.apiName, interfaceLinkType.metadata.apiName);
|
|
206
|
+
return {
|
|
207
|
+
id: readableId,
|
|
208
|
+
outputShape: {
|
|
209
|
+
type: "interfaceLinkType",
|
|
210
|
+
interfaceLinkType: shape
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Extract shared property type shapes
|
|
217
|
+
*/
|
|
218
|
+
function extractSharedPropertyType(blockShapes, sharedPropertyType, ridGenerator) {
|
|
219
|
+
const readableId = getReadableIdForSpt(sharedPropertyType.apiName);
|
|
220
|
+
const propertyType = typeToMarketplaceObjectPropertyType(sharedPropertyType.type);
|
|
221
|
+
const outputShape = {
|
|
222
|
+
about: getTitleAndDescriptionForSharedPropertyType(sharedPropertyType),
|
|
223
|
+
type: propertyType
|
|
224
|
+
};
|
|
225
|
+
blockShapes.outputShapes.set(readableId, {
|
|
226
|
+
type: "sharedPropertyType",
|
|
227
|
+
sharedPropertyType: outputShape
|
|
228
|
+
});
|
|
229
|
+
extractValueTypeInputShapeIfPresent(sharedPropertyType.valueType ?? undefined, sharedPropertyType.displayMetadata.displayName, sharedPropertyType.type, blockShapes, ridGenerator);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Extract value type input shape if present
|
|
234
|
+
*/
|
|
235
|
+
export function extractValueTypeInputShapeIfPresent(maybeValueTypeReference, displayName, type, blockShapes, ridGenerator) {
|
|
236
|
+
if (!maybeValueTypeReference) return;
|
|
237
|
+
const valueTypeInput = {
|
|
238
|
+
type: "valueType",
|
|
239
|
+
valueType: {
|
|
240
|
+
about: createLocalizedAbout(`Value Type Input for ${displayName}`, ""),
|
|
241
|
+
baseType: typeToMarketplaceBaseType(type)
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
const mappingEntry = ridGenerator.valueTypeMappingForReference(maybeValueTypeReference);
|
|
245
|
+
blockShapes.inputShapes.set(mappingEntry.input, valueTypeInput);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Get title and description for shared property type
|
|
250
|
+
*/
|
|
251
|
+
function getTitleAndDescriptionForSharedPropertyType(sharedPropertyType) {
|
|
252
|
+
return createLocalizedAbout(sharedPropertyType.displayMetadata.displayName, sharedPropertyType.displayMetadata.description ?? "Shared Property Type");
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Extract multipass group shape
|
|
257
|
+
*/
|
|
258
|
+
function extractMultipassGroup(groupId, readableId) {
|
|
259
|
+
const multipassGroup = {
|
|
260
|
+
about: createLocalizedAbout(`Group ${groupId}`, "")
|
|
261
|
+
};
|
|
262
|
+
return {
|
|
263
|
+
inputShapes: new Map([[readableId, {
|
|
264
|
+
type: "multipassGroup",
|
|
265
|
+
multipassGroup
|
|
266
|
+
}]]),
|
|
267
|
+
outputShapes: new Map(),
|
|
268
|
+
inputShapeMetadata: new Map()
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Get migration shape
|
|
274
|
+
*/
|
|
275
|
+
function getMigrationShape() {
|
|
276
|
+
const migrationShape = {
|
|
277
|
+
about: createLocalizedAbout("Allow Ontology schema migrations", "Required user acknowledgement for any breaking schema change that requires an Ontology schema migration.")
|
|
278
|
+
};
|
|
279
|
+
return {
|
|
280
|
+
inputShapes: new Map([[MIGRATION_SHAPE_READABLE_ID, {
|
|
281
|
+
type: "allowOntologySchemaMigrations",
|
|
282
|
+
allowOntologySchemaMigrations: migrationShape
|
|
283
|
+
}]]),
|
|
284
|
+
outputShapes: new Map(),
|
|
285
|
+
inputShapeMetadata: new Map([[MIGRATION_SHAPE_READABLE_ID, {
|
|
286
|
+
isOptional: true,
|
|
287
|
+
isAccessedInReconcile: false
|
|
288
|
+
}]])
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
const MAX_CLASS_DESC = "The maximum classification for data under mandatory control property types and/or the max classification" + " allowed on an action type classification parameter.";
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Get properties for a datasource definition (keys of propertyMapping).
|
|
295
|
+
*/
|
|
296
|
+
function getPropertiesForDatasource(datasourceDef) {
|
|
297
|
+
const dsType = datasourceDef.type;
|
|
298
|
+
let propertyMapping;
|
|
299
|
+
switch (dsType) {
|
|
300
|
+
case "dataset":
|
|
301
|
+
propertyMapping = datasourceDef.dataset?.propertyMapping;
|
|
302
|
+
break;
|
|
303
|
+
case "datasetV2":
|
|
304
|
+
propertyMapping = datasourceDef.datasetV2?.propertyMapping;
|
|
305
|
+
break;
|
|
306
|
+
case "datasetV3":
|
|
307
|
+
propertyMapping = datasourceDef.datasetV3?.propertyMapping;
|
|
308
|
+
break;
|
|
309
|
+
case "restrictedView":
|
|
310
|
+
propertyMapping = datasourceDef.restrictedView?.propertyMapping;
|
|
311
|
+
break;
|
|
312
|
+
case "restrictedViewV2":
|
|
313
|
+
propertyMapping = datasourceDef.restrictedViewV2?.propertyMapping;
|
|
314
|
+
break;
|
|
315
|
+
case "stream":
|
|
316
|
+
propertyMapping = datasourceDef.stream?.propertyMapping;
|
|
317
|
+
break;
|
|
318
|
+
case "streamV2":
|
|
319
|
+
propertyMapping = datasourceDef.streamV2?.propertyMapping;
|
|
320
|
+
break;
|
|
321
|
+
case "streamV3":
|
|
322
|
+
propertyMapping = datasourceDef.streamV3?.propertyMapping;
|
|
323
|
+
break;
|
|
324
|
+
default:
|
|
325
|
+
return new Set();
|
|
326
|
+
}
|
|
327
|
+
return new Set(propertyMapping ? Object.keys(propertyMapping) : []);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Extract marking shapes from the ontology block data.
|
|
332
|
+
* Port of Java's MarkingShapeExtractor.getMarkingShapes().
|
|
333
|
+
*/
|
|
334
|
+
function getMarkingShapes(ontologyBlockDataV2, ridGenerator) {
|
|
335
|
+
// Collect CBAC and mandatory marking constraints across all object types
|
|
336
|
+
const cbacMarkingsAndAffectedProps = new Map();
|
|
337
|
+
const mandatoryMarkingsAndAffectedProps = new Map();
|
|
338
|
+
// CBAC markings from additionalMandatory.markings in property security groups
|
|
339
|
+
const additionalCbacMarkingsAndAffectedProps = new Map();
|
|
340
|
+
for (const objectType of Object.values(ontologyBlockDataV2.objectTypes)) {
|
|
341
|
+
const objectApiName = objectType.objectType.apiName ?? "";
|
|
342
|
+
|
|
343
|
+
// Identify CBAC and mandatory marking properties by PropertyTypeRid
|
|
344
|
+
const cbacReadableIdsByRid = new Map();
|
|
345
|
+
const mandatoryReadableIdsByRid = new Map();
|
|
346
|
+
for (const [propertyRid, propertyType] of Object.entries(objectType.objectType.propertyTypes)) {
|
|
347
|
+
if (propertyType.type.type === "marking") {
|
|
348
|
+
const markingData = propertyType.type.marking;
|
|
349
|
+
const markingType = markingData?.markingType;
|
|
350
|
+
const propertyApiName = propertyType.apiName ?? propertyType.displayMetadata?.displayName;
|
|
351
|
+
if (propertyApiName) {
|
|
352
|
+
const readableId = ReadableIdGenerator.getForObjectProperty(objectApiName, propertyApiName);
|
|
353
|
+
if (markingType === "CBAC") {
|
|
354
|
+
cbacReadableIdsByRid.set(propertyRid, readableId);
|
|
355
|
+
} else if (markingType === "MANDATORY") {
|
|
356
|
+
mandatoryReadableIdsByRid.set(propertyRid, readableId);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// For each datasource, extract marking constraints
|
|
363
|
+
for (const ds of objectType.datasources) {
|
|
364
|
+
const propertiesForDs = getPropertiesForDatasource(ds.datasource);
|
|
365
|
+
|
|
366
|
+
// Find CBAC and mandatory props affected by this datasource
|
|
367
|
+
const cbacPropsAffected = new Set();
|
|
368
|
+
for (const rid of cbacReadableIdsByRid.keys()) {
|
|
369
|
+
if (propertiesForDs.has(rid)) {
|
|
370
|
+
cbacPropsAffected.add(rid);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
const mandatoryPropsAffected = new Set();
|
|
374
|
+
for (const rid of mandatoryReadableIdsByRid.keys()) {
|
|
375
|
+
if (propertiesForDs.has(rid)) {
|
|
376
|
+
mandatoryPropsAffected.add(rid);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
if (cbacPropsAffected.size === 0 && mandatoryPropsAffected.size === 0) {
|
|
380
|
+
continue;
|
|
381
|
+
}
|
|
382
|
+
const dataSecurity = ds.dataSecurity;
|
|
383
|
+
if (!dataSecurity) continue;
|
|
384
|
+
if (cbacPropsAffected.size > 0 && dataSecurity.classificationConstraint) {
|
|
385
|
+
const markings = dataSecurity.classificationConstraint.markings ?? [];
|
|
386
|
+
const markingId = markings[0];
|
|
387
|
+
if (markingId) {
|
|
388
|
+
const existing = cbacMarkingsAndAffectedProps.get(markingId) ?? new Set();
|
|
389
|
+
for (const rid of cbacPropsAffected) {
|
|
390
|
+
const readableId = cbacReadableIdsByRid.get(rid);
|
|
391
|
+
if (readableId) existing.add(readableId);
|
|
392
|
+
}
|
|
393
|
+
cbacMarkingsAndAffectedProps.set(markingId, existing);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
if (mandatoryPropsAffected.size > 0 && dataSecurity.markingConstraint) {
|
|
397
|
+
const markingIds = dataSecurity.markingConstraint.markingIds ?? [];
|
|
398
|
+
const markingId = markingIds[0];
|
|
399
|
+
if (markingId) {
|
|
400
|
+
const existing = mandatoryMarkingsAndAffectedProps.get(markingId) ?? new Set();
|
|
401
|
+
for (const rid of mandatoryPropsAffected) {
|
|
402
|
+
const readableId = mandatoryReadableIdsByRid.get(rid);
|
|
403
|
+
if (readableId) existing.add(readableId);
|
|
404
|
+
}
|
|
405
|
+
mandatoryMarkingsAndAffectedProps.set(markingId, existing);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// Extract CBAC markings from additionalMandatory.markings in property security groups
|
|
410
|
+
const dsDef = ds.datasource;
|
|
411
|
+
const innerDef = dsDef[dsDef.type];
|
|
412
|
+
const groups = innerDef?.propertySecurityGroups?.groups ?? [];
|
|
413
|
+
for (const group of groups) {
|
|
414
|
+
const additionalMarkings = group.security?.granular?.viewPolicy?.additionalMandatory?.markings ?? [];
|
|
415
|
+
if (additionalMarkings.length === 0) continue;
|
|
416
|
+
const groupPropertyRids = group.properties ?? [];
|
|
417
|
+
for (const markingId of additionalMarkings) {
|
|
418
|
+
const existing = additionalCbacMarkingsAndAffectedProps.get(markingId) ?? new Set();
|
|
419
|
+
for (const propRid of groupPropertyRids) {
|
|
420
|
+
// Look up the property apiName from the object type's propertyTypes
|
|
421
|
+
const propType = objectType.objectType.propertyTypes[propRid];
|
|
422
|
+
if (propType) {
|
|
423
|
+
const propApiName = propType.apiName ?? propType.displayMetadata?.displayName;
|
|
424
|
+
if (propApiName) {
|
|
425
|
+
existing.add(ReadableIdGenerator.getForObjectProperty(objectApiName, propApiName));
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
additionalCbacMarkingsAndAffectedProps.set(markingId, existing);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// Build marking shapes
|
|
436
|
+
const inputShapes = new Map();
|
|
437
|
+
for (const [markingId, props] of cbacMarkingsAndAffectedProps) {
|
|
438
|
+
const readableId = ReadableIdGenerator.getForMarking(markingId, "CBAC");
|
|
439
|
+
const shape = {
|
|
440
|
+
about: createLocalizedAbout(`Max Classification ${markingId}`, MAX_CLASS_DESC),
|
|
441
|
+
operation: "USE",
|
|
442
|
+
affectedShapes: Array.from(props).map(p => ridGenerator.toBlockInternalId(p)),
|
|
443
|
+
supportedMarkingsType: "CBAC",
|
|
444
|
+
stableId: markingId
|
|
445
|
+
};
|
|
446
|
+
inputShapes.set(readableId, {
|
|
447
|
+
type: "markings",
|
|
448
|
+
markings: shape
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
for (const [markingId, props] of additionalCbacMarkingsAndAffectedProps) {
|
|
452
|
+
const readableId = ReadableIdGenerator.getForMarking(markingId, "CBAC");
|
|
453
|
+
const shape = {
|
|
454
|
+
about: createLocalizedAbout(`Marking ${markingId}`, "Marking"),
|
|
455
|
+
operation: "USE",
|
|
456
|
+
affectedShapes: Array.from(props).map(p => ridGenerator.toBlockInternalId(p)),
|
|
457
|
+
supportedMarkingsType: "CBAC",
|
|
458
|
+
stableId: markingId
|
|
459
|
+
};
|
|
460
|
+
inputShapes.set(readableId, {
|
|
461
|
+
type: "markings",
|
|
462
|
+
markings: shape
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
for (const [markingId, props] of mandatoryMarkingsAndAffectedProps) {
|
|
466
|
+
const readableId = ReadableIdGenerator.getForMarking(markingId, "MANDATORY");
|
|
467
|
+
const shape = {
|
|
468
|
+
about: createLocalizedAbout(`Max Marking ${markingId}`, "Max Marking"),
|
|
469
|
+
operation: "USE",
|
|
470
|
+
affectedShapes: Array.from(props).map(p => ridGenerator.toBlockInternalId(p)),
|
|
471
|
+
supportedMarkingsType: "MANDATORY",
|
|
472
|
+
stableId: markingId
|
|
473
|
+
};
|
|
474
|
+
inputShapes.set(readableId, {
|
|
475
|
+
type: "markings",
|
|
476
|
+
markings: shape
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
return {
|
|
480
|
+
inputShapes,
|
|
481
|
+
outputShapes: new Map(),
|
|
482
|
+
inputShapeMetadata: new Map()
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Consume (merge) block shapes into the target
|
|
488
|
+
*/
|
|
489
|
+
function consumeBlockShapes(target, source) {
|
|
490
|
+
for (const [key, value] of source.inputShapes.entries()) {
|
|
491
|
+
target.inputShapes.set(key, value);
|
|
492
|
+
}
|
|
493
|
+
for (const [key, value] of source.outputShapes.entries()) {
|
|
494
|
+
target.outputShapes.set(key, value);
|
|
495
|
+
}
|
|
496
|
+
for (const [key, value] of source.inputShapeMetadata.entries()) {
|
|
497
|
+
target.inputShapeMetadata.set(key, value);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
// Placeholder functions for readable ID generation
|
|
502
|
+
// These should match the Java ReadableIdGenerator patterns
|
|
503
|
+
|
|
504
|
+
function getReadableIdForSpt(apiName) {
|
|
505
|
+
return ReadableIdGenerator.getForSpt(apiName);
|
|
506
|
+
}
|
|
507
|
+
function getReadableIdForInterface(apiName) {
|
|
508
|
+
return ReadableIdGenerator.getForInterface(apiName);
|
|
509
|
+
}
|
|
510
|
+
function getReadableIdForInterfaceLink(interfaceApiName, linkApiName) {
|
|
511
|
+
return ReadableIdGenerator.getForInterfaceLinkType(interfaceApiName, linkApiName);
|
|
512
|
+
}
|
|
513
|
+
//# sourceMappingURL=IrShapeExtractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IrShapeExtractor.js","names":["ReadableIdGenerator","typeToMarketplaceBaseType","typeToMarketplaceObjectPropertyType","LinkTypeShapeExtractor","ObjectTypeShapeExtractor","MIGRATION_SHAPE_READABLE_ID","createLocalizedAbout","fallbackTitle","fallbackDescription","localizedTitle","localizedDescription","getShapes","ontologyBlockDataV2","ridGenerator","randomnessKey","allBlockShapes","inputShapes","Map","outputShapes","inputShapeMetadata","outputSharedPropertyTypeRids","Set","Object","keys","sharedPropertyTypes","_rid","interfaceType","entries","interfaceTypes","extractInterfaceType","knownIdentifiers","sharedPropertyTypeBlock","extractSharedPropertyType","sharedPropertyType","objectReadableIds","getObjectTypeRids","inverse","rid","objectType","objectTypes","readableId","get","objectExtractor","objectShapes","extract","consumeBlockShapes","markingShapes","getMarkingShapes","linkReadableIds","getLinkTypeRids","linkType","linkTypes","linkExtractor","linkShapes","ActionTypeShapeExtractor","actionType","actionTypes","actionExtractor","actionShapes","groupId","getGroupIds","groupShapes","extractMultipassGroup","migrationShapes","getMigrationShape","outputShapeMap","inputShapeMap","knownMarketplaceIdentifiers","interfaceReadableId","getReadableIdForInterface","apiName","propertiesV2","propertyRid","_property","propertiesV3","getInterfacePropertyTypeRids","push","toBlockInternalId","interfaceTypeOutputShape","about","displayMetadata","displayName","description","properties","map","spt","sptId","links","ilt","iltId","interfaceLinkTypes","extendsInterfaces","it","itId","property","type","has","sharedPropertyBasedPropertyType","sptReadableId","getReadableIdForSpt","sharedPropInputShape","getTitleAndDescriptionForSharedPropertyType","objectPropertyType","set","interfacePropertyType","interfaceDefinedPropertyType","requireImplementation","constraints","interfaceLinkType","outputShape","getInterfaceLinkTypeOutputShape","id","interfaceRidOrUndefined","linkedEntityTypeId","undefined","Error","linkedEntityTypeRef","getInterfaceRids","cardinality","shape","metadata","linkedEntityType","required","getReadableIdForInterfaceLink","blockShapes","propertyType","extractValueTypeInputShapeIfPresent","valueType","maybeValueTypeReference","valueTypeInput","baseType","mappingEntry","valueTypeMappingForReference","input","multipassGroup","migrationShape","allowOntologySchemaMigrations","isOptional","isAccessedInReconcile","MAX_CLASS_DESC","getPropertiesForDatasource","datasourceDef","dsType","propertyMapping","dataset","datasetV2","datasetV3","restrictedView","restrictedViewV2","stream","streamV2","streamV3","cbacMarkingsAndAffectedProps","mandatoryMarkingsAndAffectedProps","additionalCbacMarkingsAndAffectedProps","values","objectApiName","cbacReadableIdsByRid","mandatoryReadableIdsByRid","propertyTypes","markingData","marking","markingType","propertyApiName","getForObjectProperty","ds","datasources","propertiesForDs","datasource","cbacPropsAffected","add","mandatoryPropsAffected","size","dataSecurity","classificationConstraint","markings","markingId","existing","markingConstraint","markingIds","dsDef","innerDef","groups","propertySecurityGroups","group","additionalMarkings","security","granular","viewPolicy","additionalMandatory","length","groupPropertyRids","propRid","propType","propApiName","props","getForMarking","operation","affectedShapes","Array","from","p","supportedMarkingsType","stableId","target","source","key","value","getForSpt","getForInterface","interfaceApiName","linkApiName","getForInterfaceLinkType"],"sources":["IrShapeExtractor.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 GroupId,\n KnownMarketplaceIdentifiers,\n MarketplaceInterfaceLinkType,\n MarketplaceInterfaceType,\n ObjectTypeRid,\n OntologyBlockDataV2,\n SharedPropertyType,\n Type,\n ValueTypeReference,\n} from \"@osdk/client.unstable\";\nimport type {\n AllowOntologySchemaMigrationsShape,\n InputShape,\n InterfaceLinkTypeOutputShape,\n InterfaceTypeOutputShape,\n LocalizedTitleAndDescription,\n MarkingsShape,\n MultipassGroupShape,\n OutputShape,\n SharedPropertyTypeInputShape,\n SharedPropertyTypeOutputShape,\n} from \"@osdk/client.unstable/api\";\nimport {\n type BlockShapes,\n type OntologyRidGenerator,\n type ReadableId,\n ReadableIdGenerator,\n} from \"../../../util/generateRid.js\";\nimport {\n typeToMarketplaceBaseType,\n typeToMarketplaceObjectPropertyType,\n} from \"../typeVisitors.js\";\nimport { LinkTypeShapeExtractor } from \"./LinkTypeShapeExtractor.js\";\nimport { ObjectTypeShapeExtractor } from \"./ObjectTypeShapeExtractor.js\";\n\nexport const MIGRATION_SHAPE_READABLE_ID: ReadableId =\n \"migration-input\" as ReadableId;\n\n/**\n * Helper to create LocalizedTitleAndDescription with empty localizations\n */\nfunction createLocalizedAbout(\n fallbackTitle: string,\n fallbackDescription: string,\n): LocalizedTitleAndDescription {\n return {\n fallbackTitle,\n fallbackDescription,\n localizedTitle: {},\n localizedDescription: {},\n };\n}\n\n/**\n * Main entry point for extracting all shapes from an ontology\n */\nexport async function getShapes(\n ontologyBlockDataV2: OntologyBlockDataV2,\n ridGenerator: OntologyRidGenerator,\n randomnessKey?: string,\n): Promise<BlockShapes> {\n const allBlockShapes: BlockShapes = {\n inputShapes: new Map(),\n outputShapes: new Map(),\n inputShapeMetadata: new Map(),\n };\n\n const outputSharedPropertyTypeRids = new Set(\n Object.keys(ontologyBlockDataV2.sharedPropertyTypes),\n );\n\n // Interfaces\n for (\n const [_rid, interfaceType] of Object.entries(\n ontologyBlockDataV2.interfaceTypes,\n )\n ) {\n extractInterfaceType(\n allBlockShapes.outputShapes,\n allBlockShapes.inputShapes,\n ontologyBlockDataV2.knownIdentifiers,\n outputSharedPropertyTypeRids,\n interfaceType.interfaceType,\n ridGenerator,\n );\n }\n // Shared Property Types\n for (\n const [_rid, sharedPropertyTypeBlock] of Object.entries(\n ontologyBlockDataV2.sharedPropertyTypes,\n )\n ) {\n extractSharedPropertyType(\n allBlockShapes,\n sharedPropertyTypeBlock.sharedPropertyType,\n ridGenerator,\n );\n }\n\n // Objects\n const objectReadableIds = ridGenerator.getObjectTypeRids().inverse();\n for (\n const [rid, objectType] of Object.entries(ontologyBlockDataV2.objectTypes)\n ) {\n const readableId = objectReadableIds.get(rid as ObjectTypeRid);\n if (readableId) {\n const objectExtractor = new ObjectTypeShapeExtractor(randomnessKey);\n const objectShapes = objectExtractor.extract(\n readableId,\n objectType,\n ridGenerator,\n );\n consumeBlockShapes(allBlockShapes, objectShapes);\n }\n }\n\n // Marking shapes\n const markingShapes = getMarkingShapes(ontologyBlockDataV2, ridGenerator);\n consumeBlockShapes(allBlockShapes, markingShapes);\n\n // Links\n const linkReadableIds = ridGenerator.getLinkTypeRids().inverse();\n for (const [rid, linkType] of Object.entries(ontologyBlockDataV2.linkTypes)) {\n const readableId = linkReadableIds.get(rid);\n if (readableId) {\n const linkExtractor = new LinkTypeShapeExtractor();\n const linkShapes = linkExtractor.extract(\n readableId,\n linkType,\n ridGenerator,\n );\n consumeBlockShapes(allBlockShapes, linkShapes);\n }\n }\n\n // Actions\n const { ActionTypeShapeExtractor } = await import(\n \"./ActionTypeShapeExtractor.js\"\n );\n for (\n const [_rid, actionType] of Object.entries(\n ontologyBlockDataV2.actionTypes || {},\n )\n ) {\n const actionExtractor = new ActionTypeShapeExtractor();\n const actionShapes = actionExtractor.extract(\n actionType,\n ridGenerator,\n ontologyBlockDataV2.knownIdentifiers,\n );\n consumeBlockShapes(allBlockShapes, actionShapes);\n }\n\n // Multipass groups\n for (const [readableId, groupId] of ridGenerator.getGroupIds().entries()) {\n const groupShapes = extractMultipassGroup(groupId, readableId);\n consumeBlockShapes(allBlockShapes, groupShapes);\n }\n\n // Migration shape\n const migrationShapes = getMigrationShape();\n consumeBlockShapes(allBlockShapes, migrationShapes);\n\n return allBlockShapes;\n}\n\n/**\n * Extract interface type shapes\n */\nfunction extractInterfaceType(\n outputShapeMap: Map<ReadableId, OutputShape>,\n inputShapeMap: Map<ReadableId, InputShape>,\n knownMarketplaceIdentifiers: KnownMarketplaceIdentifiers,\n outputSharedPropertyTypeRids: Set<string>,\n interfaceType: MarketplaceInterfaceType,\n ridGenerator: OntologyRidGenerator,\n): void {\n const interfaceReadableId = getReadableIdForInterface(interfaceType.apiName);\n // Build propertiesV2 from propertiesV3 entries\n const propertiesV2: string[] = [];\n for (\n const [propertyRid, _property] of Object.entries(\n interfaceType.propertiesV3 ?? {},\n )\n ) {\n const readableId = ridGenerator.getInterfacePropertyTypeRids().inverse()\n .get(propertyRid);\n if (readableId) {\n propertiesV2.push(ridGenerator.toBlockInternalId(readableId));\n }\n }\n\n // Build interface type output shape\n const interfaceTypeOutputShape: InterfaceTypeOutputShape = {\n about: createLocalizedAbout(\n interfaceType.displayMetadata.displayName,\n interfaceType.displayMetadata.description ?? \"\",\n ),\n properties: (interfaceType.properties ?? []).map((spt: any) => {\n const sptId = knownMarketplaceIdentifiers.sharedPropertyTypes?.[spt.rid];\n return sptId ?? spt.rid;\n }),\n propertiesV2,\n links: (interfaceType.links ?? []).map((ilt: any) => {\n const iltId = knownMarketplaceIdentifiers.interfaceLinkTypes?.[ilt.rid];\n return iltId ?? ilt.rid;\n }),\n extendsInterfaces: (interfaceType.extendsInterfaces ?? []).map(\n (it: string) => {\n const itId = knownMarketplaceIdentifiers.interfaceTypes?.[it];\n return itId ?? it;\n },\n ),\n };\n\n // Add shared property type input shapes for properties not in output\n for (\n const [propertyRid, property] of Object.entries(interfaceType.propertiesV3)\n ?? []\n ) {\n if (\n property.type === \"sharedPropertyBasedPropertyType\"\n && !outputSharedPropertyTypeRids.has(\n property.sharedPropertyBasedPropertyType.sharedPropertyType.rid,\n )\n ) {\n const spt = property.sharedPropertyBasedPropertyType.sharedPropertyType;\n const sptReadableId = getReadableIdForSpt(spt.apiName);\n const sharedPropInputShape: SharedPropertyTypeInputShape = {\n about: getTitleAndDescriptionForSharedPropertyType(spt),\n type: {\n type: \"objectPropertyType\",\n objectPropertyType: typeToMarketplaceObjectPropertyType(spt.type),\n },\n };\n inputShapeMap.set(\n sptReadableId,\n {\n type: \"sharedPropertyType\",\n sharedPropertyType: sharedPropInputShape,\n },\n );\n } else if (property.type === \"interfaceDefinedPropertyType\") {\n outputShapeMap.set(\n ridGenerator.getInterfacePropertyTypeRids().inverse().get(propertyRid)!,\n {\n type: \"interfacePropertyType\",\n interfacePropertyType: {\n type: typeToMarketplaceObjectPropertyType(\n property.interfaceDefinedPropertyType.type,\n ),\n about: {\n fallbackTitle:\n property.interfaceDefinedPropertyType.displayMetadata\n .displayName,\n fallbackDescription:\n property.interfaceDefinedPropertyType.displayMetadata\n .description ?? \"\",\n localizedDescription: {},\n localizedTitle: {},\n },\n interfaceType: ridGenerator.toBlockInternalId(interfaceReadableId),\n requireImplementation:\n property.interfaceDefinedPropertyType.constraints\n .requireImplementation,\n },\n },\n );\n }\n }\n\n // Add interface link type output shapes\n for (const interfaceLinkType of interfaceType.links ?? []) {\n const outputShape = getInterfaceLinkTypeOutputShape(\n knownMarketplaceIdentifiers,\n interfaceType,\n interfaceLinkType,\n ridGenerator,\n );\n outputShapeMap.set(outputShape.id, outputShape.outputShape);\n }\n\n // Add interface type output shape\n outputShapeMap.set(interfaceReadableId, {\n type: \"interfaceType\",\n interfaceType: interfaceTypeOutputShape,\n });\n}\n\n/**\n * Get interface link type output shape\n */\nfunction getInterfaceLinkTypeOutputShape(\n knownMarketplaceIdentifiers: KnownMarketplaceIdentifiers,\n interfaceType: MarketplaceInterfaceType,\n interfaceLinkType: MarketplaceInterfaceLinkType,\n ridGenerator: OntologyRidGenerator,\n): { id: ReadableId; outputShape: OutputShape } {\n // Build linked entity type reference\n const interfaceRidOrUndefined =\n interfaceLinkType.linkedEntityTypeId.type === \"interfaceType\"\n ? interfaceLinkType.linkedEntityTypeId.interfaceType\n : undefined;\n\n if (!interfaceRidOrUndefined) {\n throw new Error(\"Object link references not implemented\");\n }\n\n const linkedEntityTypeRef = ridGenerator.toBlockInternalId(\n ridGenerator.getInterfaceRids().inverse().get(interfaceRidOrUndefined)!,\n );\n\n // Map cardinality\n const cardinality = interfaceLinkType.cardinality === \"SINGLE\"\n ? \"SINGLE\"\n : \"MANY\";\n\n const shape: InterfaceLinkTypeOutputShape = {\n about: createLocalizedAbout(\n interfaceLinkType.metadata.displayName,\n interfaceLinkType.metadata.description,\n ),\n interfaceType:\n knownMarketplaceIdentifiers.interfaceTypes?.[interfaceType.rid]\n ?? interfaceType.rid,\n linkedEntityType: {\n type: \"interfaceType\",\n interfaceType: linkedEntityTypeRef,\n },\n cardinality,\n required: interfaceLinkType.required,\n };\n\n const readableId = getReadableIdForInterfaceLink(\n interfaceType.apiName,\n interfaceLinkType.metadata.apiName,\n );\n\n return {\n id: readableId,\n outputShape: {\n type: \"interfaceLinkType\",\n interfaceLinkType: shape,\n },\n };\n}\n\n/**\n * Extract shared property type shapes\n */\nfunction extractSharedPropertyType(\n blockShapes: BlockShapes,\n sharedPropertyType: SharedPropertyType,\n ridGenerator: OntologyRidGenerator,\n): void {\n const readableId = getReadableIdForSpt(sharedPropertyType.apiName);\n const propertyType = typeToMarketplaceObjectPropertyType(\n sharedPropertyType.type,\n );\n\n const outputShape: SharedPropertyTypeOutputShape = {\n about: getTitleAndDescriptionForSharedPropertyType(sharedPropertyType),\n type: propertyType,\n };\n\n blockShapes.outputShapes.set(readableId, {\n type: \"sharedPropertyType\",\n sharedPropertyType: outputShape,\n });\n\n extractValueTypeInputShapeIfPresent(\n sharedPropertyType.valueType ?? undefined,\n sharedPropertyType.displayMetadata.displayName,\n sharedPropertyType.type,\n blockShapes,\n ridGenerator,\n );\n}\n\n/**\n * Extract value type input shape if present\n */\nexport function extractValueTypeInputShapeIfPresent(\n maybeValueTypeReference: ValueTypeReference | undefined,\n displayName: string,\n type: Type,\n blockShapes: BlockShapes,\n ridGenerator: OntologyRidGenerator,\n): void {\n if (!maybeValueTypeReference) return;\n\n const valueTypeInput: InputShape = {\n type: \"valueType\",\n valueType: {\n about: createLocalizedAbout(`Value Type Input for ${displayName}`, \"\"),\n baseType: typeToMarketplaceBaseType(type),\n },\n };\n\n const mappingEntry = ridGenerator.valueTypeMappingForReference(\n maybeValueTypeReference,\n );\n blockShapes.inputShapes.set(mappingEntry.input, valueTypeInput);\n}\n\n/**\n * Get title and description for shared property type\n */\nfunction getTitleAndDescriptionForSharedPropertyType(\n sharedPropertyType: SharedPropertyType | any,\n): LocalizedTitleAndDescription {\n return createLocalizedAbout(\n sharedPropertyType.displayMetadata.displayName,\n sharedPropertyType.displayMetadata.description ?? \"Shared Property Type\",\n );\n}\n\n/**\n * Extract multipass group shape\n */\nfunction extractMultipassGroup(\n groupId: GroupId,\n readableId: ReadableId,\n): BlockShapes {\n const multipassGroup: MultipassGroupShape = {\n about: createLocalizedAbout(`Group ${groupId}`, \"\"),\n };\n\n return {\n inputShapes: new Map([[readableId, {\n type: \"multipassGroup\",\n multipassGroup,\n }]]),\n outputShapes: new Map(),\n inputShapeMetadata: new Map(),\n };\n}\n\n/**\n * Get migration shape\n */\nfunction getMigrationShape(): BlockShapes {\n const migrationShape: AllowOntologySchemaMigrationsShape = {\n about: createLocalizedAbout(\n \"Allow Ontology schema migrations\",\n \"Required user acknowledgement for any breaking schema change that requires an Ontology schema migration.\",\n ),\n };\n\n return {\n inputShapes: new Map([[MIGRATION_SHAPE_READABLE_ID, {\n type: \"allowOntologySchemaMigrations\",\n allowOntologySchemaMigrations: migrationShape,\n }]]),\n outputShapes: new Map(),\n inputShapeMetadata: new Map([[MIGRATION_SHAPE_READABLE_ID, {\n isOptional: true,\n isAccessedInReconcile: false,\n }]]),\n };\n}\n\nconst MAX_CLASS_DESC =\n \"The maximum classification for data under mandatory control property types and/or the max classification\"\n + \" allowed on an action type classification parameter.\";\n\n/**\n * Get properties for a datasource definition (keys of propertyMapping).\n */\nfunction getPropertiesForDatasource(\n datasourceDef: { type: string; [key: string]: unknown },\n): Set<string> {\n const dsType = datasourceDef.type;\n let propertyMapping: Record<string, unknown> | undefined;\n\n switch (dsType) {\n case \"dataset\":\n propertyMapping =\n (datasourceDef.dataset as { propertyMapping?: Record<string, unknown> })\n ?.propertyMapping;\n break;\n case \"datasetV2\":\n propertyMapping = (datasourceDef.datasetV2 as {\n propertyMapping?: Record<string, unknown>;\n })?.propertyMapping;\n break;\n case \"datasetV3\":\n propertyMapping = (datasourceDef.datasetV3 as {\n propertyMapping?: Record<string, unknown>;\n })?.propertyMapping;\n break;\n case \"restrictedView\":\n propertyMapping = (datasourceDef.restrictedView as {\n propertyMapping?: Record<string, unknown>;\n })?.propertyMapping;\n break;\n case \"restrictedViewV2\":\n propertyMapping = (datasourceDef.restrictedViewV2 as {\n propertyMapping?: Record<string, unknown>;\n })?.propertyMapping;\n break;\n case \"stream\":\n propertyMapping =\n (datasourceDef.stream as { propertyMapping?: Record<string, unknown> })\n ?.propertyMapping;\n break;\n case \"streamV2\":\n propertyMapping = (datasourceDef.streamV2 as {\n propertyMapping?: Record<string, unknown>;\n })?.propertyMapping;\n break;\n case \"streamV3\":\n propertyMapping = (datasourceDef.streamV3 as {\n propertyMapping?: Record<string, unknown>;\n })?.propertyMapping;\n break;\n default:\n return new Set();\n }\n\n return new Set(propertyMapping ? Object.keys(propertyMapping) : []);\n}\n\n/**\n * Extract marking shapes from the ontology block data.\n * Port of Java's MarkingShapeExtractor.getMarkingShapes().\n */\nfunction getMarkingShapes(\n ontologyBlockDataV2: OntologyBlockDataV2,\n ridGenerator: OntologyRidGenerator,\n): BlockShapes {\n // Collect CBAC and mandatory marking constraints across all object types\n const cbacMarkingsAndAffectedProps = new Map<string, Set<ReadableId>>();\n const mandatoryMarkingsAndAffectedProps = new Map<string, Set<ReadableId>>();\n // CBAC markings from additionalMandatory.markings in property security groups\n const additionalCbacMarkingsAndAffectedProps = new Map<\n string,\n Set<ReadableId>\n >();\n\n for (const objectType of Object.values(ontologyBlockDataV2.objectTypes)) {\n const objectApiName = objectType.objectType.apiName ?? \"\";\n\n // Identify CBAC and mandatory marking properties by PropertyTypeRid\n const cbacReadableIdsByRid = new Map<string, ReadableId>();\n const mandatoryReadableIdsByRid = new Map<string, ReadableId>();\n\n for (\n const [propertyRid, propertyType] of Object.entries(\n objectType.objectType.propertyTypes,\n )\n ) {\n if (propertyType.type.type === \"marking\") {\n const markingData =\n (propertyType.type as { marking?: { markingType?: string } }).marking;\n const markingType = markingData?.markingType;\n const propertyApiName = propertyType.apiName\n ?? propertyType.displayMetadata?.displayName;\n if (propertyApiName) {\n const readableId = ReadableIdGenerator.getForObjectProperty(\n objectApiName,\n propertyApiName,\n );\n if (markingType === \"CBAC\") {\n cbacReadableIdsByRid.set(propertyRid, readableId);\n } else if (markingType === \"MANDATORY\") {\n mandatoryReadableIdsByRid.set(propertyRid, readableId);\n }\n }\n }\n }\n\n // For each datasource, extract marking constraints\n for (const ds of objectType.datasources) {\n const propertiesForDs = getPropertiesForDatasource(\n ds.datasource as unknown as { type: string; [key: string]: unknown },\n );\n\n // Find CBAC and mandatory props affected by this datasource\n const cbacPropsAffected = new Set<string>();\n for (const rid of cbacReadableIdsByRid.keys()) {\n if (propertiesForDs.has(rid)) {\n cbacPropsAffected.add(rid);\n }\n }\n\n const mandatoryPropsAffected = new Set<string>();\n for (const rid of mandatoryReadableIdsByRid.keys()) {\n if (propertiesForDs.has(rid)) {\n mandatoryPropsAffected.add(rid);\n }\n }\n\n if (cbacPropsAffected.size === 0 && mandatoryPropsAffected.size === 0) {\n continue;\n }\n\n const dataSecurity = ds.dataSecurity;\n if (!dataSecurity) continue;\n\n if (cbacPropsAffected.size > 0 && dataSecurity.classificationConstraint) {\n const markings = dataSecurity.classificationConstraint.markings ?? [];\n const markingId = markings[0];\n if (markingId) {\n const existing = cbacMarkingsAndAffectedProps.get(markingId)\n ?? new Set();\n for (const rid of cbacPropsAffected) {\n const readableId = cbacReadableIdsByRid.get(rid);\n if (readableId) existing.add(readableId);\n }\n cbacMarkingsAndAffectedProps.set(markingId, existing);\n }\n }\n\n if (mandatoryPropsAffected.size > 0 && dataSecurity.markingConstraint) {\n const markingIds = dataSecurity.markingConstraint.markingIds ?? [];\n const markingId = markingIds[0];\n if (markingId) {\n const existing = mandatoryMarkingsAndAffectedProps.get(markingId)\n ?? new Set();\n for (const rid of mandatoryPropsAffected) {\n const readableId = mandatoryReadableIdsByRid.get(rid);\n if (readableId) existing.add(readableId);\n }\n mandatoryMarkingsAndAffectedProps.set(markingId, existing);\n }\n }\n\n // Extract CBAC markings from additionalMandatory.markings in property security groups\n const dsDef = ds.datasource as unknown as {\n type: string;\n [key: string]: unknown;\n };\n const innerDef = dsDef[dsDef.type] as {\n propertySecurityGroups?: {\n groups?: Array<{\n properties?: string[];\n security?: {\n granular?: {\n viewPolicy?: { additionalMandatory?: { markings?: string[] } };\n };\n };\n }>;\n };\n } | undefined;\n const groups = innerDef?.propertySecurityGroups?.groups ?? [];\n for (const group of groups) {\n const additionalMarkings =\n group.security?.granular?.viewPolicy?.additionalMandatory?.markings\n ?? [];\n if (additionalMarkings.length === 0) continue;\n const groupPropertyRids = group.properties ?? [];\n for (const markingId of additionalMarkings) {\n const existing = additionalCbacMarkingsAndAffectedProps.get(markingId)\n ?? new Set();\n for (const propRid of groupPropertyRids) {\n // Look up the property apiName from the object type's propertyTypes\n const propType = objectType.objectType.propertyTypes[propRid];\n if (propType) {\n const propApiName = propType.apiName\n ?? propType.displayMetadata?.displayName;\n if (propApiName) {\n existing.add(\n ReadableIdGenerator.getForObjectProperty(\n objectApiName,\n propApiName,\n ),\n );\n }\n }\n }\n additionalCbacMarkingsAndAffectedProps.set(markingId, existing);\n }\n }\n }\n }\n\n // Build marking shapes\n const inputShapes = new Map<ReadableId, InputShape>();\n\n for (const [markingId, props] of cbacMarkingsAndAffectedProps) {\n const readableId = ReadableIdGenerator.getForMarking(markingId, \"CBAC\");\n const shape: MarkingsShape = {\n about: createLocalizedAbout(\n `Max Classification ${markingId}`,\n MAX_CLASS_DESC,\n ),\n operation: \"USE\",\n affectedShapes: Array.from(props).map(p =>\n ridGenerator.toBlockInternalId(p)\n ),\n supportedMarkingsType: \"CBAC\",\n stableId: markingId,\n };\n inputShapes.set(readableId, { type: \"markings\", markings: shape });\n }\n\n for (const [markingId, props] of additionalCbacMarkingsAndAffectedProps) {\n const readableId = ReadableIdGenerator.getForMarking(markingId, \"CBAC\");\n const shape: MarkingsShape = {\n about: createLocalizedAbout(\n `Marking ${markingId}`,\n \"Marking\",\n ),\n operation: \"USE\",\n affectedShapes: Array.from(props).map(p =>\n ridGenerator.toBlockInternalId(p)\n ),\n supportedMarkingsType: \"CBAC\",\n stableId: markingId,\n };\n inputShapes.set(readableId, { type: \"markings\", markings: shape });\n }\n\n for (const [markingId, props] of mandatoryMarkingsAndAffectedProps) {\n const readableId = ReadableIdGenerator.getForMarking(\n markingId,\n \"MANDATORY\",\n );\n const shape: MarkingsShape = {\n about: createLocalizedAbout(\n `Max Marking ${markingId}`,\n \"Max Marking\",\n ),\n operation: \"USE\",\n affectedShapes: Array.from(props).map(p =>\n ridGenerator.toBlockInternalId(p)\n ),\n supportedMarkingsType: \"MANDATORY\",\n stableId: markingId,\n };\n inputShapes.set(readableId, { type: \"markings\", markings: shape });\n }\n\n return {\n inputShapes,\n outputShapes: new Map(),\n inputShapeMetadata: new Map(),\n };\n}\n\n/**\n * Consume (merge) block shapes into the target\n */\nfunction consumeBlockShapes(target: BlockShapes, source: BlockShapes): void {\n for (const [key, value] of source.inputShapes.entries()) {\n target.inputShapes.set(key, value);\n }\n for (const [key, value] of source.outputShapes.entries()) {\n target.outputShapes.set(key, value);\n }\n for (const [key, value] of source.inputShapeMetadata.entries()) {\n target.inputShapeMetadata.set(key, value);\n }\n}\n\n// Placeholder functions for readable ID generation\n// These should match the Java ReadableIdGenerator patterns\n\nfunction getReadableIdForSpt(apiName: string): ReadableId {\n return ReadableIdGenerator.getForSpt(apiName);\n}\n\nfunction getReadableIdForInterface(apiName: string): ReadableId {\n return ReadableIdGenerator.getForInterface(apiName);\n}\n\nfunction getReadableIdForInterfaceLink(\n interfaceApiName: string,\n linkApiName: string,\n): ReadableId {\n return ReadableIdGenerator.getForInterfaceLinkType(\n interfaceApiName,\n linkApiName,\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBA,SAIEA,mBAAmB,QACd,8BAA8B;AACrC,SACEC,yBAAyB,EACzBC,mCAAmC,QAC9B,oBAAoB;AAC3B,SAASC,sBAAsB,QAAQ,6BAA6B;AACpE,SAASC,wBAAwB,QAAQ,+BAA+B;AAExE,OAAO,MAAMC,2BAAuC,GAClD,iBAA+B;;AAEjC;AACA;AACA;AACA,SAASC,oBAAoBA,CAC3BC,aAAqB,EACrBC,mBAA2B,EACG;EAC9B,OAAO;IACLD,aAAa;IACbC,mBAAmB;IACnBC,cAAc,EAAE,CAAC,CAAC;IAClBC,oBAAoB,EAAE,CAAC;EACzB,CAAC;AACH;;AAEA;AACA;AACA;AACA,OAAO,eAAeC,SAASA,CAC7BC,mBAAwC,EACxCC,YAAkC,EAClCC,aAAsB,EACA;EACtB,MAAMC,cAA2B,GAAG;IAClCC,WAAW,EAAE,IAAIC,GAAG,CAAC,CAAC;IACtBC,YAAY,EAAE,IAAID,GAA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