@osdk/maker-experimental 0.6.0-beta.2 → 0.6.0-beta.4
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 +27 -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,469 @@
|
|
|
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 { getOntologyDefinition } from "@osdk/maker";
|
|
18
|
+
import { ReadableIdGenerator } from "../../util/generateRid.js";
|
|
19
|
+
import { convertActionParameters } from "./convertActionParameters.js";
|
|
20
|
+
import { convertActionSections } from "./convertActionSections.js";
|
|
21
|
+
import { convertActionValidation } from "./convertActionValidation.js";
|
|
22
|
+
import { flattenInterface } from "./convertObject.js";
|
|
23
|
+
import { getFormContentOrdering } from "./getFormContentOrdering.js";
|
|
24
|
+
export function buildDatasource(apiName, definition, ridGenerator, classificationMarkingGroupName, mandatoryMarkingGroupName) {
|
|
25
|
+
const needsSecurity = classificationMarkingGroupName !== undefined || mandatoryMarkingGroupName !== undefined;
|
|
26
|
+
const securityConfig = needsSecurity ? {
|
|
27
|
+
classificationConstraint: classificationMarkingGroupName ? {
|
|
28
|
+
markings: [classificationMarkingGroupName]
|
|
29
|
+
} : undefined,
|
|
30
|
+
markingConstraint: mandatoryMarkingGroupName ? {
|
|
31
|
+
markingIds: [mandatoryMarkingGroupName]
|
|
32
|
+
} : undefined
|
|
33
|
+
} : undefined;
|
|
34
|
+
return {
|
|
35
|
+
rid: ridGenerator.generateDatasourceRid(apiName),
|
|
36
|
+
datasource: definition,
|
|
37
|
+
editsConfiguration: {
|
|
38
|
+
onlyAllowPrivilegedEdits: false
|
|
39
|
+
},
|
|
40
|
+
redacted: false,
|
|
41
|
+
...(securityConfig !== undefined && {
|
|
42
|
+
dataSecurity: securityConfig
|
|
43
|
+
})
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function convertAction(action, ridGenerator) {
|
|
47
|
+
const actionValidation = convertActionValidation(action, ridGenerator);
|
|
48
|
+
const actionParameters = convertActionParameters(action, ridGenerator);
|
|
49
|
+
const actionSections = convertActionSections(action, ridGenerator);
|
|
50
|
+
const parameterOrdering = action.parameterOrdering ?? (action.parameters ?? []).map(p => p.id);
|
|
51
|
+
|
|
52
|
+
// Build parameterIds mapping: UUID (BlockInternalId) -> ParameterId (API name)
|
|
53
|
+
const parameterIds = {};
|
|
54
|
+
(action.parameters ?? []).forEach(p => {
|
|
55
|
+
const readableId = ReadableIdGenerator.getForParameter(action.apiName, p.id);
|
|
56
|
+
const uuid = ridGenerator.toBlockInternalId(readableId);
|
|
57
|
+
parameterIds[uuid] = p.id;
|
|
58
|
+
});
|
|
59
|
+
const ontologyDefinition = getOntologyDefinition();
|
|
60
|
+
|
|
61
|
+
// Helper function to convert interface property values from API names to RIDs
|
|
62
|
+
const convertInterfacePropertyValuesToRids = (interfacePropertyValues, allParentInterfaces) => {
|
|
63
|
+
const result = {};
|
|
64
|
+
for (const [apiName, value] of Object.entries(interfacePropertyValues)) {
|
|
65
|
+
const parentInterface = allParentInterfaces.find(maybeSourceParent => maybeSourceParent.propertiesV3[apiName] !== undefined);
|
|
66
|
+
const rid = ridGenerator.generateInterfacePropertyTypeRid(apiName, parentInterface.apiName);
|
|
67
|
+
result[rid] = value;
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// Helper function to convert shared property values from API names to RIDs
|
|
73
|
+
const convertSharedPropertyValuesToRids = sharedPropertyValues => {
|
|
74
|
+
const result = {};
|
|
75
|
+
for (const [apiName, value] of Object.entries(sharedPropertyValues)) {
|
|
76
|
+
const rid = ridGenerator.generateSptRid(apiName);
|
|
77
|
+
result[rid] = value;
|
|
78
|
+
}
|
|
79
|
+
return result;
|
|
80
|
+
};
|
|
81
|
+
return {
|
|
82
|
+
actionType: {
|
|
83
|
+
actionTypeLogic: {
|
|
84
|
+
logic: {
|
|
85
|
+
// Convert logic rules with proper RID mappings
|
|
86
|
+
rules: action.rules.map(rule => {
|
|
87
|
+
if (rule.type === "addInterfaceRule") {
|
|
88
|
+
const interfaceAndParents = flattenInterface(ontologyDefinition.INTERFACE_TYPE[rule.addInterfaceRule.interfaceApiName], new Set());
|
|
89
|
+
return {
|
|
90
|
+
type: "addInterfaceRule",
|
|
91
|
+
addInterfaceRule: {
|
|
92
|
+
interfaceTypeRid: ridGenerator.generateRidForInterface(rule.addInterfaceRule.interfaceApiName),
|
|
93
|
+
objectType: rule.addInterfaceRule.objectTypeParameter,
|
|
94
|
+
interfacePropertyValues: convertInterfacePropertyValuesToRids(rule.addInterfaceRule.interfacePropertyValues, interfaceAndParents),
|
|
95
|
+
sharedPropertyValues: convertSharedPropertyValuesToRids(rule.addInterfaceRule.sharedPropertyValues),
|
|
96
|
+
structFieldValues: {},
|
|
97
|
+
logicRuleRid: rule.addInterfaceRule.logicRuleRid
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
} else if (rule.type === "modifyInterfaceRule") {
|
|
101
|
+
const interfaceAndParents = flattenInterface(ontologyDefinition.INTERFACE_TYPE[rule.modifyInterfaceRule.interfaceApiName], new Set());
|
|
102
|
+
return {
|
|
103
|
+
type: "modifyInterfaceRule",
|
|
104
|
+
modifyInterfaceRule: {
|
|
105
|
+
interfaceObjectToModify: rule.modifyInterfaceRule.interfaceObjectToModifyParameter,
|
|
106
|
+
interfacePropertyValues: convertInterfacePropertyValuesToRids(rule.modifyInterfaceRule.interfacePropertyValues, interfaceAndParents),
|
|
107
|
+
sharedPropertyValues: convertSharedPropertyValuesToRids(rule.modifyInterfaceRule.sharedPropertyValues),
|
|
108
|
+
structFieldValues: {}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
} else if (rule.type === "addObjectRule") {
|
|
112
|
+
return {
|
|
113
|
+
type: "addObjectRule",
|
|
114
|
+
addObjectRule: {
|
|
115
|
+
objectTypeId: ridGenerator.generateObjectTypeId(rule.addObjectRule.objectTypeId),
|
|
116
|
+
propertyValues: rule.addObjectRule.propertyValues,
|
|
117
|
+
structFieldValues: rule.addObjectRule.structFieldValues,
|
|
118
|
+
logicRuleRid: rule.addObjectRule.logicRuleRid
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
// Pass through other rule types unchanged
|
|
123
|
+
return rule;
|
|
124
|
+
})
|
|
125
|
+
},
|
|
126
|
+
validation: actionValidation,
|
|
127
|
+
notifications: []
|
|
128
|
+
},
|
|
129
|
+
metadata: buildActionMetadata(action, ridGenerator, parameterOrdering, actionParameters, actionSections)
|
|
130
|
+
},
|
|
131
|
+
parameterIds
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Build action type metadata with all fields that Java produces.
|
|
137
|
+
* Uses an intermediate variable to allow extra fields beyond the TS type definition
|
|
138
|
+
* (notificationSettings, applyingMessage) without casting to any.
|
|
139
|
+
*/
|
|
140
|
+
function buildActionMetadata(action, ridGenerator, parameterOrdering, actionParameters, actionSections) {
|
|
141
|
+
const displayMetadata = {
|
|
142
|
+
configuration: {
|
|
143
|
+
defaultLayout: action.defaultFormat ?? "FORM",
|
|
144
|
+
displayAndFormat: action.displayAndFormat ?? {
|
|
145
|
+
table: {
|
|
146
|
+
columnWidthByParameterRid: {},
|
|
147
|
+
enableFileImport: true,
|
|
148
|
+
fitHorizontally: false,
|
|
149
|
+
frozenColumnCount: 0,
|
|
150
|
+
rowHeightInLines: 1
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
enableLayoutUserSwitch: action.enableLayoutSwitch ?? false
|
|
154
|
+
},
|
|
155
|
+
description: action.description ?? "",
|
|
156
|
+
displayName: action.displayName,
|
|
157
|
+
icon: {
|
|
158
|
+
type: "blueprint",
|
|
159
|
+
blueprint: action.icon ?? {
|
|
160
|
+
locator: "edit",
|
|
161
|
+
color: "#000000"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
applyingMessage: [],
|
|
165
|
+
successMessage: action.submissionMetadata?.successMessage ? [{
|
|
166
|
+
type: "message",
|
|
167
|
+
message: action.submissionMetadata.successMessage
|
|
168
|
+
}] : [],
|
|
169
|
+
typeClasses: action.typeClasses ?? [],
|
|
170
|
+
...(action.submissionMetadata?.submitButtonDisplayMetadata && {
|
|
171
|
+
submitButtonDisplayMetadata: action.submissionMetadata.submitButtonDisplayMetadata
|
|
172
|
+
}),
|
|
173
|
+
...(action.submissionMetadata?.undoButtonConfiguration && {
|
|
174
|
+
undoButtonConfiguration: action.submissionMetadata.undoButtonConfiguration
|
|
175
|
+
})
|
|
176
|
+
};
|
|
177
|
+
const metadata = {
|
|
178
|
+
rid: ridGenerator.generateRidForActionType(action.apiName),
|
|
179
|
+
version: "",
|
|
180
|
+
apiName: action.apiName,
|
|
181
|
+
notificationSettings: {
|
|
182
|
+
renderingSettings: {
|
|
183
|
+
type: "anyNotificationRenderingCanFail",
|
|
184
|
+
anyNotificationRenderingCanFail: {}
|
|
185
|
+
},
|
|
186
|
+
redactionOverride: null
|
|
187
|
+
},
|
|
188
|
+
displayMetadata,
|
|
189
|
+
parameterOrdering: parameterOrdering,
|
|
190
|
+
formContentOrdering: getFormContentOrdering(action, parameterOrdering),
|
|
191
|
+
parameters: actionParameters,
|
|
192
|
+
sections: actionSections,
|
|
193
|
+
status: typeof action.status === "string" ? {
|
|
194
|
+
type: action.status,
|
|
195
|
+
[action.status]: {}
|
|
196
|
+
} : action.status,
|
|
197
|
+
entities: action.entities ? {
|
|
198
|
+
affectedInterfaceTypes: action.entities.affectedInterfaceTypes.map(apiName => ridGenerator.generateRidForInterface(apiName)),
|
|
199
|
+
affectedLinkTypes: action.entities.affectedLinkTypes,
|
|
200
|
+
affectedObjectTypes: action.entities.affectedObjectTypes.map(apiName => ridGenerator.generateObjectTypeId(apiName)),
|
|
201
|
+
typeGroups: action.entities.typeGroups
|
|
202
|
+
} : {
|
|
203
|
+
affectedInterfaceTypes: [],
|
|
204
|
+
affectedLinkTypes: [],
|
|
205
|
+
affectedObjectTypes: [],
|
|
206
|
+
typeGroups: []
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
return metadata;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Helper function to convert allowed value option values with ObjectTypeId conversion
|
|
213
|
+
function convertAllowedValueOptionValue(value, ridGenerator) {
|
|
214
|
+
if (value?.type === "objectType") {
|
|
215
|
+
return {
|
|
216
|
+
type: "objectType",
|
|
217
|
+
objectType: {
|
|
218
|
+
objectTypeId: ridGenerator.generateObjectTypeId(value.objectType.objectTypeId)
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
// Pass through other value types unchanged (staticValue, parameterValue, etc.)
|
|
223
|
+
return value;
|
|
224
|
+
}
|
|
225
|
+
export function extractAllowedValues(allowedValues, ridGenerator) {
|
|
226
|
+
switch (allowedValues.type) {
|
|
227
|
+
case "oneOf":
|
|
228
|
+
return {
|
|
229
|
+
type: "oneOf",
|
|
230
|
+
oneOf: {
|
|
231
|
+
type: "oneOf",
|
|
232
|
+
oneOf: {
|
|
233
|
+
labelledValues: allowedValues.oneOf.map(option => ({
|
|
234
|
+
...option,
|
|
235
|
+
value: convertAllowedValueOptionValue(option.value, ridGenerator)
|
|
236
|
+
})),
|
|
237
|
+
otherValueAllowed: {
|
|
238
|
+
allowed: allowedValues.otherValueAllowed ?? false
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
case "range":
|
|
244
|
+
const {
|
|
245
|
+
min,
|
|
246
|
+
max
|
|
247
|
+
} = allowedValues;
|
|
248
|
+
return {
|
|
249
|
+
type: "range",
|
|
250
|
+
range: {
|
|
251
|
+
type: "range",
|
|
252
|
+
range: {
|
|
253
|
+
...(min === undefined ? {} : {
|
|
254
|
+
minimum: {
|
|
255
|
+
inclusive: true,
|
|
256
|
+
value: min
|
|
257
|
+
}
|
|
258
|
+
}),
|
|
259
|
+
...(max === undefined ? {} : {
|
|
260
|
+
maximum: {
|
|
261
|
+
inclusive: true,
|
|
262
|
+
value: max
|
|
263
|
+
}
|
|
264
|
+
})
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
case "text":
|
|
269
|
+
const {
|
|
270
|
+
minLength,
|
|
271
|
+
maxLength,
|
|
272
|
+
regex
|
|
273
|
+
} = allowedValues;
|
|
274
|
+
return {
|
|
275
|
+
type: "text",
|
|
276
|
+
text: {
|
|
277
|
+
type: "text",
|
|
278
|
+
text: {
|
|
279
|
+
...(minLength === undefined ? {} : {
|
|
280
|
+
minLength: minLength
|
|
281
|
+
}),
|
|
282
|
+
...(maxLength === undefined ? {} : {
|
|
283
|
+
maxLength: maxLength
|
|
284
|
+
}),
|
|
285
|
+
...(regex === undefined ? {} : {
|
|
286
|
+
regex: {
|
|
287
|
+
regex: regex,
|
|
288
|
+
failureMessage: "Invalid input"
|
|
289
|
+
}
|
|
290
|
+
})
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
case "datetime":
|
|
295
|
+
const {
|
|
296
|
+
minimum,
|
|
297
|
+
maximum
|
|
298
|
+
} = allowedValues;
|
|
299
|
+
return {
|
|
300
|
+
type: "datetime",
|
|
301
|
+
datetime: {
|
|
302
|
+
type: "datetime",
|
|
303
|
+
datetime: {
|
|
304
|
+
minimum,
|
|
305
|
+
maximum
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
case "objectTypeReference":
|
|
310
|
+
return {
|
|
311
|
+
type: "objectTypeReference",
|
|
312
|
+
objectTypeReference: {
|
|
313
|
+
type: "objectTypeReference",
|
|
314
|
+
objectTypeReference: {
|
|
315
|
+
interfaceTypeRids: allowedValues.interfaceTypes
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
case "redacted":
|
|
320
|
+
return {
|
|
321
|
+
type: "redacted",
|
|
322
|
+
redacted: {}
|
|
323
|
+
};
|
|
324
|
+
case "geotimeSeriesReference":
|
|
325
|
+
return {
|
|
326
|
+
type: "geotimeSeriesReference",
|
|
327
|
+
geotimeSeriesReference: {
|
|
328
|
+
type: "geotimeSeries",
|
|
329
|
+
geotimeSeries: {}
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
case "user":
|
|
333
|
+
return {
|
|
334
|
+
type: "user",
|
|
335
|
+
user: {
|
|
336
|
+
type: "user",
|
|
337
|
+
user: {
|
|
338
|
+
filter: (allowedValues.fromGroups ?? []).map(group => {
|
|
339
|
+
// Register static group IDs with ridGenerator
|
|
340
|
+
if (group.type === "static") {
|
|
341
|
+
ridGenerator.getGroupIds().put(ReadableIdGenerator.getForGroup(group.name), group.name);
|
|
342
|
+
}
|
|
343
|
+
return {
|
|
344
|
+
type: "groupFilter",
|
|
345
|
+
groupFilter: {
|
|
346
|
+
groupId: group.type === "static" ? {
|
|
347
|
+
type: "staticValue",
|
|
348
|
+
staticValue: {
|
|
349
|
+
type: "string",
|
|
350
|
+
string: group.name
|
|
351
|
+
}
|
|
352
|
+
} : {
|
|
353
|
+
type: "parameterId",
|
|
354
|
+
parameterId: group.parameter
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
})
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
case "multipassGroup":
|
|
363
|
+
return {
|
|
364
|
+
type: "multipassGroup",
|
|
365
|
+
multipassGroup: {
|
|
366
|
+
type: "group",
|
|
367
|
+
group: {}
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
default:
|
|
371
|
+
const k = allowedValues.type;
|
|
372
|
+
return {
|
|
373
|
+
type: k,
|
|
374
|
+
[k]: {
|
|
375
|
+
type: k,
|
|
376
|
+
[k]: {}
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
export function renderHintFromBaseType(parameter, validation) {
|
|
382
|
+
const type = typeof parameter.type === "string" ? parameter.type : parameter.type.type;
|
|
383
|
+
switch (type) {
|
|
384
|
+
case "boolean":
|
|
385
|
+
case "booleanList":
|
|
386
|
+
return {
|
|
387
|
+
type: "checkbox",
|
|
388
|
+
checkbox: {}
|
|
389
|
+
};
|
|
390
|
+
case "integer":
|
|
391
|
+
case "integerList":
|
|
392
|
+
case "long":
|
|
393
|
+
case "longList":
|
|
394
|
+
case "double":
|
|
395
|
+
case "doubleList":
|
|
396
|
+
case "decimal":
|
|
397
|
+
case "decimalList":
|
|
398
|
+
return {
|
|
399
|
+
type: "numericInput",
|
|
400
|
+
numericInput: {}
|
|
401
|
+
};
|
|
402
|
+
case "string":
|
|
403
|
+
if (validation?.allowedValues?.type === "user" || validation?.allowedValues?.type === "multipassGroup") {
|
|
404
|
+
return {
|
|
405
|
+
type: "userDropdown",
|
|
406
|
+
userDropdown: {}
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
case "stringList":
|
|
410
|
+
case "geohash":
|
|
411
|
+
case "geohashList":
|
|
412
|
+
case "geoshape":
|
|
413
|
+
case "geoshapeList":
|
|
414
|
+
case "objectSetRid":
|
|
415
|
+
return {
|
|
416
|
+
type: "textInput",
|
|
417
|
+
textInput: {}
|
|
418
|
+
};
|
|
419
|
+
case "timestamp":
|
|
420
|
+
case "timestampList":
|
|
421
|
+
case "date":
|
|
422
|
+
case "dateList":
|
|
423
|
+
return {
|
|
424
|
+
type: "dateTimePicker",
|
|
425
|
+
dateTimePicker: {}
|
|
426
|
+
};
|
|
427
|
+
case "attachment":
|
|
428
|
+
case "attachmentList":
|
|
429
|
+
return {
|
|
430
|
+
type: "filePicker",
|
|
431
|
+
filePicker: {}
|
|
432
|
+
};
|
|
433
|
+
case "marking":
|
|
434
|
+
case "markingList":
|
|
435
|
+
if (parameter.validation.allowedValues?.type === "mandatoryMarking") {
|
|
436
|
+
return {
|
|
437
|
+
type: "mandatoryMarkingPicker",
|
|
438
|
+
mandatoryMarkingPicker: {}
|
|
439
|
+
};
|
|
440
|
+
} else if (parameter.validation.allowedValues?.type === "cbacMarking") {
|
|
441
|
+
return {
|
|
442
|
+
type: "cbacMarkingPicker",
|
|
443
|
+
cbacMarkingPicker: {}
|
|
444
|
+
};
|
|
445
|
+
} else {
|
|
446
|
+
throw new Error(`The allowed values for "${parameter.displayName}" are not compatible with the base parameter type`);
|
|
447
|
+
}
|
|
448
|
+
case "timeSeriesReference":
|
|
449
|
+
case "objectReference":
|
|
450
|
+
case "objectReferenceList":
|
|
451
|
+
case "interfaceReference":
|
|
452
|
+
case "interfaceReferenceList":
|
|
453
|
+
case "objectTypeReference":
|
|
454
|
+
case "mediaReference":
|
|
455
|
+
case "mediaReferenceList":
|
|
456
|
+
case "geotimeSeriesReference":
|
|
457
|
+
case "geotimeSeriesReferenceList":
|
|
458
|
+
return {
|
|
459
|
+
type: "dropdown",
|
|
460
|
+
dropdown: {}
|
|
461
|
+
};
|
|
462
|
+
case "struct":
|
|
463
|
+
case "structList":
|
|
464
|
+
throw new Error("Structs are not supported yet");
|
|
465
|
+
default:
|
|
466
|
+
throw new Error(`Unknown type ${type}`);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
//# sourceMappingURL=convertActionHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertActionHelpers.js","names":["getOntologyDefinition","ReadableIdGenerator","convertActionParameters","convertActionSections","convertActionValidation","flattenInterface","getFormContentOrdering","buildDatasource","apiName","definition","ridGenerator","classificationMarkingGroupName","mandatoryMarkingGroupName","needsSecurity","undefined","securityConfig","classificationConstraint","markings","markingConstraint","markingIds","rid","generateDatasourceRid","datasource","editsConfiguration","onlyAllowPrivilegedEdits","redacted","dataSecurity","convertAction","action","actionValidation","actionParameters","actionSections","parameterOrdering","parameters","map","p","id","parameterIds","forEach","readableId","getForParameter","uuid","toBlockInternalId","ontologyDefinition","convertInterfacePropertyValuesToRids","interfacePropertyValues","allParentInterfaces","result","value","Object","entries","parentInterface","find","maybeSourceParent","propertiesV3","generateInterfacePropertyTypeRid","convertSharedPropertyValuesToRids","sharedPropertyValues","generateSptRid","actionType","actionTypeLogic","logic","rules","rule","type","interfaceAndParents","INTERFACE_TYPE","addInterfaceRule","interfaceApiName","Set","interfaceTypeRid","generateRidForInterface","objectType","objectTypeParameter","structFieldValues","logicRuleRid","modifyInterfaceRule","interfaceObjectToModify","interfaceObjectToModifyParameter","addObjectRule","objectTypeId","generateObjectTypeId","propertyValues","validation","notifications","metadata","buildActionMetadata","displayMetadata","configuration","defaultLayout","defaultFormat","displayAndFormat","table","columnWidthByParameterRid","enableFileImport","fitHorizontally","frozenColumnCount","rowHeightInLines","enableLayoutUserSwitch","enableLayoutSwitch","description","displayName","icon","blueprint","locator","color","applyingMessage","successMessage","submissionMetadata","message","typeClasses","submitButtonDisplayMetadata","undoButtonConfiguration","generateRidForActionType","version","notificationSettings","renderingSettings","anyNotificationRenderingCanFail","redactionOverride","formContentOrdering","sections","status","entities","affectedInterfaceTypes","affectedLinkTypes","affectedObjectTypes","typeGroups","convertAllowedValueOptionValue","extractAllowedValues","allowedValues","oneOf","labelledValues","option","otherValueAllowed","allowed","min","max","range","minimum","inclusive","maximum","minLength","maxLength","regex","text","failureMessage","datetime","objectTypeReference","interfaceTypeRids","interfaceTypes","geotimeSeriesReference","geotimeSeries","user","filter","fromGroups","group","getGroupIds","put","getForGroup","name","groupFilter","groupId","staticValue","string","parameterId","parameter","multipassGroup","k","renderHintFromBaseType","checkbox","numericInput","userDropdown","textInput","dateTimePicker","filePicker","mandatoryMarkingPicker","cbacMarkingPicker","Error","dropdown"],"sources":["convertActionHelpers.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 ActionTypeBlockDataV2,\n ActionTypeStatus,\n MarketplaceActionTypeMetadata,\n ObjectTypeDatasource,\n ObjectTypeDatasourceDefinition,\n OntologyIrAllowedParameterValues,\n Parameter,\n ParameterId,\n ParameterRenderHint,\n Section,\n SectionId,\n} from \"@osdk/client.unstable\";\nimport type {\n ActionParameter,\n ActionParameterAllowedValues,\n ActionParameterValidation,\n ActionType,\n InterfaceType,\n} from \"@osdk/maker\";\nimport { getOntologyDefinition } from \"@osdk/maker\";\nimport type { OntologyRidGenerator } from \"../../util/generateRid.js\";\nimport { ReadableIdGenerator } from \"../../util/generateRid.js\";\nimport { convertActionParameters } from \"./convertActionParameters.js\";\nimport { convertActionSections } from \"./convertActionSections.js\";\nimport { convertActionValidation } from \"./convertActionValidation.js\";\nimport { flattenInterface } from \"./convertObject.js\";\nimport { getFormContentOrdering } from \"./getFormContentOrdering.js\";\n\nexport function buildDatasource(\n apiName: string,\n definition: ObjectTypeDatasourceDefinition,\n ridGenerator: OntologyRidGenerator,\n classificationMarkingGroupName?: string,\n mandatoryMarkingGroupName?: string,\n): ObjectTypeDatasource {\n const needsSecurity = classificationMarkingGroupName !== undefined\n || mandatoryMarkingGroupName !== undefined;\n\n const securityConfig = needsSecurity\n ? {\n classificationConstraint: classificationMarkingGroupName\n ? {\n markings: [classificationMarkingGroupName],\n }\n : undefined,\n markingConstraint: mandatoryMarkingGroupName\n ? {\n markingIds: [mandatoryMarkingGroupName],\n }\n : undefined,\n }\n : undefined;\n return ({\n rid: ridGenerator.generateDatasourceRid(apiName),\n datasource: definition,\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false,\n },\n redacted: false,\n ...((securityConfig !== undefined) && { dataSecurity: securityConfig }),\n });\n}\n\nexport function convertAction(\n action: ActionType,\n ridGenerator: OntologyRidGenerator,\n): ActionTypeBlockDataV2 {\n const actionValidation = convertActionValidation(action, ridGenerator);\n const actionParameters: Record<ParameterId, Parameter> =\n convertActionParameters(action, ridGenerator);\n const actionSections: Record<SectionId, Section> = convertActionSections(\n action,\n ridGenerator,\n );\n const parameterOrdering = action.parameterOrdering\n ?? (action.parameters ?? []).map(p => p.id);\n\n // Build parameterIds mapping: UUID (BlockInternalId) -> ParameterId (API name)\n const parameterIds: Record<string, ParameterId> = {};\n (action.parameters ?? []).forEach(p => {\n const readableId = ReadableIdGenerator.getForParameter(\n action.apiName,\n p.id,\n );\n const uuid = ridGenerator.toBlockInternalId(readableId);\n parameterIds[uuid] = p.id;\n });\n\n const ontologyDefinition = getOntologyDefinition();\n\n // Helper function to convert interface property values from API names to RIDs\n const convertInterfacePropertyValuesToRids = (\n interfacePropertyValues: Record<string, any>,\n allParentInterfaces: Array<InterfaceType>,\n ): Record<string, any> => {\n const result: Record<string, any> = {};\n for (const [apiName, value] of Object.entries(interfacePropertyValues)) {\n const parentInterface = allParentInterfaces.find(maybeSourceParent =>\n maybeSourceParent.propertiesV3[apiName] !== undefined\n )!;\n const rid = ridGenerator.generateInterfacePropertyTypeRid(\n apiName,\n parentInterface.apiName,\n );\n result[rid] = value;\n }\n return result;\n };\n\n // Helper function to convert shared property values from API names to RIDs\n const convertSharedPropertyValuesToRids = (\n sharedPropertyValues: Record<string, any>,\n ): Record<string, any> => {\n const result: Record<string, any> = {};\n for (const [apiName, value] of Object.entries(sharedPropertyValues)) {\n const rid = ridGenerator.generateSptRid(apiName);\n result[rid] = value;\n }\n return result;\n };\n return {\n actionType: {\n actionTypeLogic: {\n logic: {\n // Convert logic rules with proper RID mappings\n rules: action.rules.map(rule => {\n if (rule.type === \"addInterfaceRule\") {\n const interfaceAndParents = flattenInterface(\n ontologyDefinition\n .INTERFACE_TYPE[rule.addInterfaceRule.interfaceApiName],\n new Set(),\n );\n return {\n type: \"addInterfaceRule\",\n addInterfaceRule: {\n interfaceTypeRid: ridGenerator.generateRidForInterface(\n rule.addInterfaceRule.interfaceApiName,\n ),\n objectType: rule.addInterfaceRule.objectTypeParameter,\n interfacePropertyValues: convertInterfacePropertyValuesToRids(\n rule.addInterfaceRule.interfacePropertyValues,\n interfaceAndParents,\n ),\n sharedPropertyValues: convertSharedPropertyValuesToRids(\n rule.addInterfaceRule.sharedPropertyValues,\n ),\n structFieldValues: {},\n logicRuleRid: rule.addInterfaceRule.logicRuleRid,\n },\n };\n } else if (rule.type === \"modifyInterfaceRule\") {\n const interfaceAndParents = flattenInterface(\n ontologyDefinition\n .INTERFACE_TYPE[rule.modifyInterfaceRule.interfaceApiName],\n new Set(),\n );\n\n return {\n type: \"modifyInterfaceRule\",\n modifyInterfaceRule: {\n interfaceObjectToModify:\n rule.modifyInterfaceRule.interfaceObjectToModifyParameter,\n interfacePropertyValues: convertInterfacePropertyValuesToRids(\n rule.modifyInterfaceRule.interfacePropertyValues,\n interfaceAndParents,\n ),\n sharedPropertyValues: convertSharedPropertyValuesToRids(\n rule.modifyInterfaceRule.sharedPropertyValues,\n ),\n structFieldValues: {},\n },\n };\n } else if (rule.type === \"addObjectRule\") {\n return {\n type: \"addObjectRule\",\n addObjectRule: {\n objectTypeId: ridGenerator.generateObjectTypeId(\n rule.addObjectRule.objectTypeId,\n ),\n propertyValues: rule.addObjectRule.propertyValues,\n structFieldValues: rule.addObjectRule.structFieldValues,\n logicRuleRid: rule.addObjectRule.logicRuleRid,\n },\n };\n }\n // Pass through other rule types unchanged\n return rule as any;\n }),\n },\n validation: actionValidation,\n notifications: [],\n },\n metadata: buildActionMetadata(\n action,\n ridGenerator,\n parameterOrdering,\n actionParameters,\n actionSections,\n ),\n },\n parameterIds,\n };\n}\n\n/**\n * Build action type metadata with all fields that Java produces.\n * Uses an intermediate variable to allow extra fields beyond the TS type definition\n * (notificationSettings, applyingMessage) without casting to any.\n */\nfunction buildActionMetadata(\n action: ActionType,\n ridGenerator: OntologyRidGenerator,\n parameterOrdering: string[],\n actionParameters: Record<ParameterId, Parameter>,\n actionSections: Record<SectionId, Section>,\n): MarketplaceActionTypeMetadata {\n const displayMetadata = {\n configuration: {\n defaultLayout: action.defaultFormat ?? \"FORM\",\n displayAndFormat: action.displayAndFormat ?? {\n table: {\n columnWidthByParameterRid: {},\n enableFileImport: true,\n fitHorizontally: false,\n frozenColumnCount: 0,\n rowHeightInLines: 1,\n },\n },\n enableLayoutUserSwitch: action.enableLayoutSwitch ?? false,\n },\n description: action.description ?? \"\",\n displayName: action.displayName,\n icon: {\n type: \"blueprint\" as const,\n blueprint: action.icon ?? { locator: \"edit\", color: \"#000000\" },\n },\n applyingMessage: [] as Array<{ type: string; message: string }>,\n successMessage: action.submissionMetadata?.successMessage\n ? [{\n type: \"message\" as const,\n message: action.submissionMetadata.successMessage,\n }]\n : [],\n typeClasses: action.typeClasses ?? [],\n ...(action.submissionMetadata?.submitButtonDisplayMetadata\n && {\n submitButtonDisplayMetadata:\n action.submissionMetadata.submitButtonDisplayMetadata,\n }),\n ...(action.submissionMetadata?.undoButtonConfiguration\n && {\n undoButtonConfiguration:\n action.submissionMetadata.undoButtonConfiguration,\n }),\n };\n\n const metadata = {\n rid: ridGenerator.generateRidForActionType(action.apiName),\n version: \"\",\n apiName: action.apiName,\n notificationSettings: {\n renderingSettings: {\n type: \"anyNotificationRenderingCanFail\" as const,\n anyNotificationRenderingCanFail: {},\n },\n redactionOverride: null,\n },\n displayMetadata,\n parameterOrdering: parameterOrdering,\n formContentOrdering: getFormContentOrdering(action, parameterOrdering),\n parameters: actionParameters,\n sections: actionSections,\n status: typeof action.status === \"string\"\n ? {\n type: action.status,\n [action.status]: {},\n } as unknown as ActionTypeStatus\n : action.status,\n entities: action.entities\n ? {\n affectedInterfaceTypes: action.entities.affectedInterfaceTypes.map(\n apiName => ridGenerator.generateRidForInterface(apiName),\n ),\n affectedLinkTypes: action.entities.affectedLinkTypes,\n affectedObjectTypes: action.entities.affectedObjectTypes.map(\n apiName => ridGenerator.generateObjectTypeId(apiName),\n ),\n typeGroups: action.entities.typeGroups,\n }\n : {\n affectedInterfaceTypes: [],\n affectedLinkTypes: [],\n affectedObjectTypes: [],\n typeGroups: [],\n },\n };\n return metadata as MarketplaceActionTypeMetadata;\n}\n\n// Helper function to convert allowed value option values with ObjectTypeId conversion\nfunction convertAllowedValueOptionValue(\n value: any,\n ridGenerator: OntologyRidGenerator,\n): any {\n if (value?.type === \"objectType\") {\n return {\n type: \"objectType\",\n objectType: {\n objectTypeId: ridGenerator.generateObjectTypeId(\n value.objectType.objectTypeId,\n ),\n },\n };\n }\n // Pass through other value types unchanged (staticValue, parameterValue, etc.)\n return value;\n}\n\nexport function extractAllowedValues(\n allowedValues: ActionParameterAllowedValues,\n ridGenerator: OntologyRidGenerator,\n): OntologyIrAllowedParameterValues {\n switch (allowedValues.type) {\n case \"oneOf\":\n return {\n type: \"oneOf\",\n oneOf: {\n type: \"oneOf\",\n oneOf: {\n labelledValues: allowedValues.oneOf.map(option => ({\n ...option,\n value: convertAllowedValueOptionValue(option.value, ridGenerator),\n })),\n otherValueAllowed: {\n allowed: allowedValues.otherValueAllowed\n ?? false,\n },\n },\n },\n };\n case \"range\":\n const { min, max } = allowedValues;\n return {\n type: \"range\",\n range: {\n type: \"range\",\n range: {\n ...(min === undefined\n ? {}\n : { minimum: { inclusive: true, value: min } }),\n ...(max === undefined\n ? {}\n : { maximum: { inclusive: true, value: max } }),\n },\n },\n };\n case \"text\":\n const { minLength, maxLength, regex } = allowedValues;\n return {\n type: \"text\",\n text: {\n type: \"text\",\n text: {\n ...(minLength === undefined\n ? {}\n : { minLength: minLength }),\n ...(maxLength === undefined\n ? {}\n : { maxLength: maxLength }),\n ...(regex === undefined\n ? {}\n : { regex: { regex: regex, failureMessage: \"Invalid input\" } }),\n },\n },\n };\n case \"datetime\":\n const { minimum, maximum } = allowedValues;\n return {\n type: \"datetime\",\n datetime: {\n type: \"datetime\",\n datetime: {\n minimum,\n maximum,\n },\n },\n };\n case \"objectTypeReference\":\n return {\n type: \"objectTypeReference\",\n objectTypeReference: {\n type: \"objectTypeReference\",\n objectTypeReference: {\n interfaceTypeRids: allowedValues.interfaceTypes,\n },\n },\n };\n case \"redacted\":\n return {\n type: \"redacted\",\n redacted: {},\n };\n case \"geotimeSeriesReference\":\n return {\n type: \"geotimeSeriesReference\",\n geotimeSeriesReference: {\n type: \"geotimeSeries\",\n geotimeSeries: {},\n },\n };\n case \"user\":\n return {\n type: \"user\",\n user: {\n type: \"user\",\n user: {\n filter: (allowedValues.fromGroups ?? []).map(group => {\n // Register static group IDs with ridGenerator\n if (group.type === \"static\") {\n ridGenerator.getGroupIds().put(\n ReadableIdGenerator.getForGroup(group.name),\n group.name,\n );\n }\n\n return {\n type: \"groupFilter\",\n groupFilter: {\n groupId: group.type === \"static\"\n ? {\n type: \"staticValue\",\n staticValue: {\n type: \"string\",\n string: group.name,\n },\n }\n : {\n type: \"parameterId\",\n parameterId: group.parameter,\n },\n },\n };\n }),\n },\n },\n };\n case \"multipassGroup\":\n return {\n type: \"multipassGroup\",\n multipassGroup: {\n type: \"group\",\n group: {},\n },\n };\n default:\n const k: Partial<OntologyIrAllowedParameterValues[\"type\"]> =\n allowedValues.type;\n return {\n type: k,\n [k]: {\n type: k,\n [k]: {},\n },\n } as unknown as OntologyIrAllowedParameterValues;\n }\n}\n\nexport function renderHintFromBaseType(\n parameter: ActionParameter,\n validation?: ActionParameterValidation,\n): ParameterRenderHint {\n const type = typeof parameter.type === \"string\"\n ? parameter.type\n : parameter.type.type;\n switch (type) {\n case \"boolean\":\n case \"booleanList\":\n return { type: \"checkbox\", checkbox: {} };\n case \"integer\":\n case \"integerList\":\n case \"long\":\n case \"longList\":\n case \"double\":\n case \"doubleList\":\n case \"decimal\":\n case \"decimalList\":\n return { type: \"numericInput\", numericInput: {} };\n case \"string\":\n if (\n validation?.allowedValues?.type === \"user\"\n || validation?.allowedValues?.type === \"multipassGroup\"\n ) {\n return { type: \"userDropdown\", userDropdown: {} };\n }\n case \"stringList\":\n case \"geohash\":\n case \"geohashList\":\n case \"geoshape\":\n case \"geoshapeList\":\n case \"objectSetRid\":\n return { type: \"textInput\", textInput: {} };\n case \"timestamp\":\n case \"timestampList\":\n case \"date\":\n case \"dateList\":\n return { type: \"dateTimePicker\", dateTimePicker: {} };\n case \"attachment\":\n case \"attachmentList\":\n return { type: \"filePicker\", filePicker: {} };\n case \"marking\":\n case \"markingList\":\n if (parameter.validation.allowedValues?.type === \"mandatoryMarking\") {\n return { type: \"mandatoryMarkingPicker\", mandatoryMarkingPicker: {} };\n } else if (parameter.validation.allowedValues?.type === \"cbacMarking\") {\n return { type: \"cbacMarkingPicker\", cbacMarkingPicker: {} };\n } else {\n throw new Error(\n `The allowed values for \"${parameter.displayName}\" are not compatible with the base parameter type`,\n );\n }\n case \"timeSeriesReference\":\n case \"objectReference\":\n case \"objectReferenceList\":\n case \"interfaceReference\":\n case \"interfaceReferenceList\":\n case \"objectTypeReference\":\n case \"mediaReference\":\n case \"mediaReferenceList\":\n case \"geotimeSeriesReference\":\n case \"geotimeSeriesReferenceList\":\n return { type: \"dropdown\", dropdown: {} };\n case \"struct\":\n case \"structList\":\n throw new Error(\"Structs are not supported yet\");\n default:\n throw new Error(`Unknown type ${type}`);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAsBA,SAASA,qBAAqB,QAAQ,aAAa;AAEnD,SAASC,mBAAmB,QAAQ,2BAA2B;AAC/D,SAASC,uBAAuB,QAAQ,8BAA8B;AACtE,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,uBAAuB,QAAQ,8BAA8B;AACtE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,sBAAsB,QAAQ,6BAA6B;AAEpE,OAAO,SAASC,eAAeA,CAC7BC,OAAe,EACfC,UAA0C,EAC1CC,YAAkC,EAClCC,8BAAuC,EACvCC,yBAAkC,EACZ;EACtB,MAAMC,aAAa,GAAGF,8BAA8B,KAAKG,SAAS,IAC7DF,yBAAyB,KAAKE,SAAS;EAE5C,MAAMC,cAAc,GAAGF,aAAa,GAChC;IACAG,wBAAwB,EAAEL,8BAA8B,GACpD;MACAM,QAAQ,EAAE,CAACN,8BAA8B;IAC3C,CAAC,GACCG,SAAS;IACbI,iBAAiB,EAAEN,yBAAyB,GACxC;MACAO,UAAU,EAAE,CAACP,yBAAyB;IACxC,CAAC,GACCE;EACN,CAAC,GACCA,SAAS;EACb,OAAQ;IACNM,GAAG,EAAEV,YAAY,CAACW,qBAAqB,CAACb,OAAO,CAAC;IAChDc,UAAU,EAAEb,UAAU;IACtBc,kBAAkB,EAAE;MAClBC,wBAAwB,EAAE;IAC5B,CAAC;IACDC,QAAQ,EAAE,KAAK;IACf,IAAKV,cAAc,KAAKD,SAAS,IAAK;MAA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cAAc,EAAE,CAAC;MAAE,CAAC;IACvD,KAAK,YAAY;IACjB,KAAK,gBAAgB;MACnB,OAAO;QAAE7G,IAAI,EAAE,YAAY;QAAE8G,UAAU,EAAE,CAAC;MAAE,CAAC;IAC/C,KAAK,SAAS;IACd,KAAK,aAAa;MAChB,IAAIT,SAAS,CAAClF,UAAU,CAAC8C,aAAa,EAAEjE,IAAI,KAAK,kBAAkB,EAAE;QACnE,OAAO;UAAEA,IAAI,EAAE,wBAAwB;UAAE+G,sBAAsB,EAAE,CAAC;QAAE,CAAC;MACvE,CAAC,MAAM,IAAIV,SAAS,CAAClF,UAAU,CAAC8C,aAAa,EAAEjE,IAAI,KAAK,aAAa,EAAE;QACrE,OAAO;UAAEA,IAAI,EAAE,mBAAmB;UAAEgH,iBAAiB,EAAE,CAAC;QAAE,CAAC;MAC7D,CAAC,MAAM;QACL,MAAM,IAAIC,KAAK,CACb,2BAA2BZ,SAAS,CAAChE,WAAW,mDAClD,CAAC;MACH;IACF,KAAK,qBAAqB;IAC1B,KAAK,iBAAiB;IACtB,KAAK,qBAAqB;IAC1B,KAAK,oBAAoB;IACzB,KAAK,wBAAwB;IAC7B,KAAK,qBAAqB;IAC1B,KAAK,gBAAgB;IACrB,KAAK,oBAAoB;IACzB,KAAK,wBAAwB;IAC7B,KAAK,4BAA4B;MAC/B,OAAO;QAAErC,IAAI,EAAE,UAAU;QAAEkH,QAAQ,EAAE,CAAC;MAAE,CAAC;IAC3C,KAAK,QAAQ;IACb,KAAK,YAAY;MACf,MAAM,IAAID,KAAK,CAAC,+BAA+B,CAAC;IAClD;MACE,MAAM,IAAIA,KAAK,CAAC,gBAAgBjH,IAAI,EAAE,CAAC;EAC3C;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,96 @@
|
|
|
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 "./convertActionHelpers.js";
|
|
18
|
+
import { convertConditionDefinition } from "./convertConditionDefinition.js";
|
|
19
|
+
export function convertActionParameterConditionalOverride(override, validation, ridGenerator, 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
|
+
let overrideType = override.then ?? (validation.defaultVisibility === "editable" ? "hidden" : "editable");
|
|
38
|
+
parameterBlockOverride = {
|
|
39
|
+
type: "visibility",
|
|
40
|
+
visibility: {
|
|
41
|
+
visibility: overrideType === "editable" ? {
|
|
42
|
+
type: "editable",
|
|
43
|
+
editable: {}
|
|
44
|
+
} : overrideType === "hidden" ? {
|
|
45
|
+
type: "hidden",
|
|
46
|
+
hidden: {}
|
|
47
|
+
} : {
|
|
48
|
+
type: "disabled",
|
|
49
|
+
disabled: {}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
break;
|
|
54
|
+
case "disabled":
|
|
55
|
+
overrideType = override.then ?? (validation.defaultVisibility === "editable" ? "disabled" : "editable");
|
|
56
|
+
parameterBlockOverride = {
|
|
57
|
+
type: "visibility",
|
|
58
|
+
visibility: {
|
|
59
|
+
visibility: overrideType === "editable" ? {
|
|
60
|
+
type: "editable",
|
|
61
|
+
editable: {}
|
|
62
|
+
} : overrideType === "hidden" ? {
|
|
63
|
+
type: "hidden",
|
|
64
|
+
hidden: {}
|
|
65
|
+
} : {
|
|
66
|
+
type: "disabled",
|
|
67
|
+
disabled: {}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
break;
|
|
72
|
+
case "defaultValue":
|
|
73
|
+
parameterBlockOverride = {
|
|
74
|
+
type: "prefill",
|
|
75
|
+
prefill: {
|
|
76
|
+
prefill: override.defaultValue
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
break;
|
|
80
|
+
case "constraint":
|
|
81
|
+
parameterBlockOverride = {
|
|
82
|
+
type: "allowedValues",
|
|
83
|
+
allowedValues: {
|
|
84
|
+
allowedValues: extractAllowedValues(override.constraint, ridGenerator)
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
break;
|
|
88
|
+
default:
|
|
89
|
+
throw new Error(`Unknown parameter override type`);
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
condition: convertConditionDefinition(override.condition, actionParameters),
|
|
93
|
+
parameterBlockOverrides: [parameterBlockOverride]
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=convertActionParameterConditionalOverride.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertActionParameterConditionalOverride.js","names":["extractAllowedValues","convertConditionDefinition","convertActionParameterConditionalOverride","override","validation","ridGenerator","actionParameters","parameterBlockOverride","type","parameterRequired","required","notRequired","overrideType","then","defaultVisibility","visibility","editable","hidden","disabled","prefill","defaultValue","allowedValues","constraint","Error","condition","parameterBlockOverrides"],"sources":["convertActionParameterConditionalOverride.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 OntologyIrConditionalOverride,\n OntologyIrParameterValidationBlockOverride,\n} from \"@osdk/client.unstable\";\nimport type {\n ActionParameter,\n ActionParameterConditionalOverride,\n ActionParameterValidation,\n} from \"@osdk/maker\";\nimport type { OntologyRidGenerator } from \"../../util/generateRid.js\";\nimport { extractAllowedValues } from \"./convertActionHelpers.js\";\nimport { convertConditionDefinition } from \"./convertConditionDefinition.js\";\n\nexport function convertActionParameterConditionalOverride(\n override: ActionParameterConditionalOverride,\n validation: ActionParameterValidation,\n ridGenerator: OntologyRidGenerator,\n actionParameters?: ActionParameter[],\n): OntologyIrConditionalOverride {\n let parameterBlockOverride: OntologyIrParameterValidationBlockOverride;\n switch (override.type) {\n case \"required\":\n parameterBlockOverride = {\n type: \"parameterRequired\",\n parameterRequired: {\n required: validation.required\n ? {\n type: \"notRequired\",\n notRequired: {},\n }\n : {\n type: \"required\",\n required: {},\n },\n },\n };\n break;\n case \"visibility\":\n let overrideType = override.then ?? (\n validation.defaultVisibility === \"editable\" ? \"hidden\" : \"editable\"\n );\n parameterBlockOverride = {\n type: \"visibility\",\n visibility: {\n visibility: overrideType === \"editable\"\n ? {\n type: \"editable\",\n editable: {},\n }\n : overrideType === \"hidden\"\n ? {\n type: \"hidden\",\n hidden: {},\n }\n : {\n type: \"disabled\",\n disabled: {},\n },\n },\n };\n break;\n case \"disabled\":\n overrideType = override.then ?? (\n validation.defaultVisibility === \"editable\" ? \"disabled\" : \"editable\"\n );\n parameterBlockOverride = {\n type: \"visibility\",\n visibility: {\n visibility: overrideType === \"editable\"\n ? {\n type: \"editable\",\n editable: {},\n }\n : overrideType === \"hidden\"\n ? {\n type: \"hidden\",\n hidden: {},\n }\n : {\n type: \"disabled\",\n disabled: {},\n },\n },\n };\n break;\n case \"defaultValue\":\n parameterBlockOverride = {\n type: \"prefill\",\n prefill: {\n prefill: override.defaultValue,\n },\n };\n break;\n case \"constraint\":\n parameterBlockOverride = {\n type: \"allowedValues\",\n allowedValues: {\n allowedValues: extractAllowedValues(\n override.constraint,\n ridGenerator,\n ),\n },\n };\n break;\n default:\n throw new Error(`Unknown parameter override type`);\n }\n return {\n condition: convertConditionDefinition(override.condition, actionParameters),\n parameterBlockOverrides: [parameterBlockOverride],\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,SAASA,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,0BAA0B,QAAQ,iCAAiC;AAE5E,OAAO,SAASC,yCAAyCA,CACvDC,QAA4C,EAC5CC,UAAqC,EACrCC,YAAkC,EAClCC,gBAAoC,EACL;EAC/B,IAAIC,sBAAkE;EACtE,QAAQJ,QAAQ,CAACK,IAAI;IACnB,KAAK,UAAU;MACbD,sBAAsB,GAAG;QACvBC,IAAI,EAAE,mBAAmB;QACzBC,iBAAiB,EAAE;UACjBC,QAAQ,EAAEN,UAAU,CAACM,QAAQ,GACzB;YACAF,IAAI,EAAE,aAAa;YACnBG,WAAW,EAAE,CAAC;UAChB,CAAC,GACC;YACAH,IAAI,EAAE,UAAU;YAChBE,QAAQ,EAAE,CAAC;UACb;QACJ;MACF,CAAC;MACD;IACF,KAAK,YAAY;MACf,IAAIE,YAAY,GAAGT,QAAQ,CAACU,IAAI,KAC9BT,UAAU,CAACU,iBAAiB,KAAK,UAAU,GAAG,QAAQ,GAAG,UAAU,CACpE;MACDP,sBAAsB,GAAG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