@osdk/maker 0.15.0-beta.3 → 0.15.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/build/browser/api/action/ActionParameterAllowedValues.js.map +1 -1
  3. package/build/browser/api/defineAction.js +84 -3
  4. package/build/browser/api/defineAction.js.map +1 -1
  5. package/build/browser/api/defineDeleteObjectAction.js +3 -18
  6. package/build/browser/api/defineDeleteObjectAction.js.map +1 -1
  7. package/build/browser/api/defineOntology.js +41 -1
  8. package/build/browser/api/defineOntology.js.map +1 -1
  9. package/build/browser/api/test/actions.test.js +2129 -1318
  10. package/build/browser/api/test/actions.test.js.map +1 -1
  11. package/build/browser/cli/main.js +1 -1
  12. package/build/browser/conversion/toMarketplace/convertActionValidation.js +1 -1
  13. package/build/browser/conversion/toMarketplace/convertActionValidation.js.map +1 -1
  14. package/build/browser/index.js +1 -1
  15. package/build/browser/index.js.map +1 -1
  16. package/build/cjs/index.cjs +130 -23
  17. package/build/cjs/index.cjs.map +1 -1
  18. package/build/cjs/index.d.cts +16 -1
  19. package/build/esm/api/action/ActionParameterAllowedValues.js.map +1 -1
  20. package/build/esm/api/defineAction.js +84 -3
  21. package/build/esm/api/defineAction.js.map +1 -1
  22. package/build/esm/api/defineDeleteObjectAction.js +3 -18
  23. package/build/esm/api/defineDeleteObjectAction.js.map +1 -1
  24. package/build/esm/api/defineOntology.js +41 -1
  25. package/build/esm/api/defineOntology.js.map +1 -1
  26. package/build/esm/api/test/actions.test.js +2129 -1318
  27. package/build/esm/api/test/actions.test.js.map +1 -1
  28. package/build/esm/cli/main.js +1 -1
  29. package/build/esm/conversion/toMarketplace/convertActionValidation.js +1 -1
  30. package/build/esm/conversion/toMarketplace/convertActionValidation.js.map +1 -1
  31. package/build/esm/index.js +1 -1
  32. package/build/esm/index.js.map +1 -1
  33. package/build/types/api/action/ActionParameterAllowedValues.d.ts +14 -0
  34. package/build/types/api/action/ActionParameterAllowedValues.d.ts.map +1 -1
  35. package/build/types/api/defineAction.d.ts +1 -0
  36. package/build/types/api/defineAction.d.ts.map +1 -1
  37. package/build/types/api/defineDeleteObjectAction.d.ts.map +1 -1
  38. package/build/types/api/defineOntology.d.ts +2 -2
  39. package/build/types/api/defineOntology.d.ts.map +1 -1
  40. package/build/types/index.d.ts +1 -1
  41. package/build/types/index.d.ts.map +1 -1
  42. package/package.json +4 -4
@@ -24,7 +24,7 @@ import { defineOntology } from "../api/defineOntology.js";
24
24
  const apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
25
25
  const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
26
26
  export default async function main(args = process.argv) {
27
- const commandLineOpts = await yargs(hideBin(args)).version("0.15.0-beta.3" ?? "").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({
27
+ const commandLineOpts = await yargs(hideBin(args)).version("0.15.0-beta.4" ?? "").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({
28
28
  input: {
29
29
  alias: "i",
30
30
  describe: "Input file",
@@ -36,7 +36,7 @@ export function convertActionValidation(action) {
36
36
  return [p.id, {
37
37
  defaultValidation: {
38
38
  display: {
39
- renderHint: renderHintFromBaseType(p),
39
+ renderHint: renderHintFromBaseType(p, p.validation),
40
40
  visibility: convertActionVisibility(p.validation.defaultVisibility),
41
41
  ...(p.defaultValue && {
42
42
  prefill: p.defaultValue
@@ -1 +1 @@
1
- {"version":3,"file":"convertActionValidation.js","names":["extractAllowedValues","renderHintFromBaseType","convertActionParameterConditionalOverride","convertActionVisibility","convertSectionConditionalOverride","convertActionValidation","action","actionTypeLevelValidation","rules","Object","fromEntries","validation","condition","type","true","displayMetadata","failureMessage","typeClasses","map","rule","idx","parameterValidations","parameters","p","id","defaultValidation","display","renderHint","visibility","defaultVisibility","defaultValue","prefill","allowedValues","required","convertParameterRequirementConstraint","conditionalOverrides","override","sectionValidations","entries","sections","sectionId","section","defaultDisplayMetadata","hidden","visible","notRequired","min","max","listLength","listLengthValidation","minLength","maxLength"],"sources":["convertActionValidation.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 OntologyIrActionValidation,\n ParameterRequiredConfiguration,\n} from \"@osdk/client.unstable\";\nimport type { ActionParameterRequirementConstraint } from \"../../api/action/ActionParameterConfiguration.js\";\nimport type { ActionType } from \"../../api/action/ActionType.js\";\nimport {\n extractAllowedValues,\n renderHintFromBaseType,\n} from \"../../api/defineOntology.js\";\nimport { convertActionParameterConditionalOverride } from \"./convertActionParameterConditionalOverride.js\";\nimport { convertActionVisibility } from \"./convertActionVisibility.js\";\nimport { convertSectionConditionalOverride } from \"./convertSectionConditionalOverride.js\";\n\nexport function convertActionValidation(\n action: ActionType,\n): OntologyIrActionValidation {\n return {\n actionTypeLevelValidation: {\n rules: Object.fromEntries(\n (action.validation\n ?? [{\n condition: { type: \"true\", true: {} },\n displayMetadata: { failureMessage: \"\", typeClasses: [] },\n }]).map((rule, idx) => [idx, rule]),\n ),\n },\n parameterValidations: Object.fromEntries(\n (action.parameters ?? []).map(p => {\n return [\n p.id,\n {\n defaultValidation: {\n display: {\n renderHint: renderHintFromBaseType(p),\n visibility: convertActionVisibility(\n p.validation.defaultVisibility,\n ),\n ...p.defaultValue\n && { prefill: p.defaultValue },\n },\n validation: {\n allowedValues: extractAllowedValues(\n p.validation.allowedValues!,\n ),\n required: convertParameterRequirementConstraint(\n p.validation.required!,\n ),\n },\n },\n conditionalOverrides: p.validation.conditionalOverrides?.map(\n (override) =>\n convertActionParameterConditionalOverride(\n override,\n p.validation,\n action.parameters,\n ),\n ) ?? [],\n },\n ];\n }),\n ),\n sectionValidations: {\n ...Object.fromEntries(\n Object.entries(action.sections ?? {}).map((\n [sectionId, section],\n ) => [\n section.id,\n {\n defaultDisplayMetadata: section.defaultVisibility === \"hidden\"\n ? {\n visibility: {\n type: \"hidden\",\n hidden: {},\n },\n }\n : {\n visibility: {\n type: \"visible\",\n visible: {},\n },\n },\n conditionalOverrides: section.conditionalOverrides?.map(\n (override) =>\n convertSectionConditionalOverride(\n override,\n section.defaultVisibility ?? \"visible\",\n action.parameters,\n ),\n ) ?? [],\n },\n ]),\n ),\n },\n };\n}\n\nfunction convertParameterRequirementConstraint(\n required: ActionParameterRequirementConstraint,\n): ParameterRequiredConfiguration {\n if (typeof required === \"boolean\") {\n return required\n ? { type: \"required\", required: {} }\n : { type: \"notRequired\", notRequired: {} };\n }\n const { min, max } = required.listLength;\n return {\n type: \"listLengthValidation\",\n listLengthValidation: { minLength: min, maxLength: max },\n };\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"convertActionValidation.js","names":["extractAllowedValues","renderHintFromBaseType","convertActionParameterConditionalOverride","convertActionVisibility","convertSectionConditionalOverride","convertActionValidation","action","actionTypeLevelValidation","rules","Object","fromEntries","validation","condition","type","true","displayMetadata","failureMessage","typeClasses","map","rule","idx","parameterValidations","parameters","p","id","defaultValidation","display","renderHint","visibility","defaultVisibility","defaultValue","prefill","allowedValues","required","convertParameterRequirementConstraint","conditionalOverrides","override","sectionValidations","entries","sections","sectionId","section","defaultDisplayMetadata","hidden","visible","notRequired","min","max","listLength","listLengthValidation","minLength","maxLength"],"sources":["convertActionValidation.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 OntologyIrActionValidation,\n ParameterRequiredConfiguration,\n} from \"@osdk/client.unstable\";\nimport type { ActionParameterRequirementConstraint } from \"../../api/action/ActionParameterConfiguration.js\";\nimport type { ActionType } from \"../../api/action/ActionType.js\";\nimport {\n extractAllowedValues,\n renderHintFromBaseType,\n} from \"../../api/defineOntology.js\";\nimport { convertActionParameterConditionalOverride } from \"./convertActionParameterConditionalOverride.js\";\nimport { convertActionVisibility } from \"./convertActionVisibility.js\";\nimport { convertSectionConditionalOverride } from \"./convertSectionConditionalOverride.js\";\n\nexport function convertActionValidation(\n action: ActionType,\n): OntologyIrActionValidation {\n return {\n actionTypeLevelValidation: {\n rules: Object.fromEntries(\n (action.validation\n ?? [{\n condition: { type: \"true\", true: {} },\n displayMetadata: { failureMessage: \"\", typeClasses: [] },\n }]).map((rule, idx) => [idx, rule]),\n ),\n },\n parameterValidations: Object.fromEntries(\n (action.parameters ?? []).map(p => {\n return [\n p.id,\n {\n defaultValidation: {\n display: {\n renderHint: renderHintFromBaseType(p, p.validation),\n visibility: convertActionVisibility(\n p.validation.defaultVisibility,\n ),\n ...p.defaultValue\n && { prefill: p.defaultValue },\n },\n validation: {\n allowedValues: extractAllowedValues(\n p.validation.allowedValues!,\n ),\n required: convertParameterRequirementConstraint(\n p.validation.required!,\n ),\n },\n },\n conditionalOverrides: p.validation.conditionalOverrides?.map(\n (override) =>\n convertActionParameterConditionalOverride(\n override,\n p.validation,\n action.parameters,\n ),\n ) ?? [],\n },\n ];\n }),\n ),\n sectionValidations: {\n ...Object.fromEntries(\n Object.entries(action.sections ?? {}).map((\n [sectionId, section],\n ) => [\n section.id,\n {\n defaultDisplayMetadata: section.defaultVisibility === \"hidden\"\n ? {\n visibility: {\n type: \"hidden\",\n hidden: {},\n },\n }\n : {\n visibility: {\n type: \"visible\",\n visible: {},\n },\n },\n conditionalOverrides: section.conditionalOverrides?.map(\n (override) =>\n convertSectionConditionalOverride(\n override,\n section.defaultVisibility ?? \"visible\",\n action.parameters,\n ),\n ) ?? [],\n },\n ]),\n ),\n },\n };\n}\n\nfunction convertParameterRequirementConstraint(\n required: ActionParameterRequirementConstraint,\n): ParameterRequiredConfiguration {\n if (typeof required === \"boolean\") {\n return required\n ? { type: \"required\", required: {} }\n : { type: \"notRequired\", notRequired: {} };\n }\n const { min, max } = required.listLength;\n return {\n type: \"listLengthValidation\",\n listLengthValidation: { minLength: min, maxLength: max },\n };\n}\n"],"mappings":"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","ignoreList":[]}
@@ -17,7 +17,7 @@
17
17
  export { default } from "./cli/main.js";
18
18
  export { addDependency } from "./api/addDependency.js";
19
19
  export { OntologyEntityTypeEnum } from "./api/common/OntologyEntityTypeEnum.js";
20
- export { CREATE_INTERFACE_OBJECT_PARAMETER, CREATE_OR_MODIFY_OBJECT_PARAMETER, defineAction, MODIFY_INTERFACE_OBJECT_PARAMETER, MODIFY_OBJECT_PARAMETER } from "./api/defineAction.js";
20
+ export { CREATE_INTERFACE_OBJECT_PARAMETER, CREATE_OR_MODIFY_OBJECT_PARAMETER, defineAction, DELETE_OBJECT_PARAMETER, MODIFY_INTERFACE_OBJECT_PARAMETER, MODIFY_OBJECT_PARAMETER } from "./api/defineAction.js";
21
21
  export { defineCreateInterfaceObjectAction } from "./api/defineCreateInterfaceObjectAction.js";
22
22
  export { defineCreateObjectAction } from "./api/defineCreateObjectAction.js";
23
23
  export { defineCreateOrModifyObjectAction } from "./api/defineCreateOrModifyObjectAction.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","addDependency","OntologyEntityTypeEnum","CREATE_INTERFACE_OBJECT_PARAMETER","CREATE_OR_MODIFY_OBJECT_PARAMETER","defineAction","MODIFY_INTERFACE_OBJECT_PARAMETER","MODIFY_OBJECT_PARAMETER","defineCreateInterfaceObjectAction","defineCreateObjectAction","defineCreateOrModifyObjectAction","defineDeleteInterfaceObjectAction","defineDeleteObjectAction","defineInterface","defineInterfaceLinkConstraint","defineLink","defineModifyInterfaceObjectAction","defineModifyObjectAction","convertToPluralDisplayName","defineObject","uppercaseFirstLetter","convertToDisplayName","addNamespaceIfNone","defineOntology","dumpOntologyFullMetadata","defineSharedPropertyType","defineValueType","importOntologyEntity","importSharedPropertyType","wrapWithProxy","propertyTypeTypeToOntologyIrType","convertType"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { default as default } from \"./cli/main.js\";\n\nexport type { ActionParameterValidation } from \"./api/action/ActionParameter.js\";\nexport type {\n ActionParameterAllowedValues,\n} from \"./api/action/ActionParameterAllowedValues.js\";\nexport type { ActionParameterConditionalOverride } from \"./api/action/ActionParameterConditionalOverride.js\";\nexport type { ActionParameterConfiguration } from \"./api/action/ActionParameterConfiguration.js\";\nexport type { ActionSection } from \"./api/action/ActionSection.js\";\nexport type { ActionType } from \"./api/action/ActionType.js\";\nexport type { ConditionDefinition } from \"./api/action/ConditionDefinition.js\";\nexport type {\n CurrentTimeMappingValue,\n CurrentUserMappingValue,\n CustomMapping,\n MappingValue,\n UuidMappingValue,\n} from \"./api/action/MappingValue.js\";\nexport type { SectionConditionalOverride } from \"./api/action/SectionConditionalOverride.js\";\nexport type { SubmissionMetadata } from \"./api/action/SubmissionMetadata.js\";\nexport { addDependency } from \"./api/addDependency.js\";\nexport { OntologyEntityTypeEnum } from \"./api/common/OntologyEntityTypeEnum.js\";\nexport {\n CREATE_INTERFACE_OBJECT_PARAMETER,\n CREATE_OR_MODIFY_OBJECT_PARAMETER,\n defineAction,\n MODIFY_INTERFACE_OBJECT_PARAMETER,\n MODIFY_OBJECT_PARAMETER,\n} from \"./api/defineAction.js\";\nexport { defineCreateInterfaceObjectAction } from \"./api/defineCreateInterfaceObjectAction.js\";\nexport { defineCreateObjectAction } from \"./api/defineCreateObjectAction.js\";\nexport { defineCreateOrModifyObjectAction } from \"./api/defineCreateOrModifyObjectAction.js\";\nexport { defineDeleteInterfaceObjectAction } from \"./api/defineDeleteInterfaceObjectAction.js\";\nexport { defineDeleteObjectAction } from \"./api/defineDeleteObjectAction.js\";\nexport { defineInterface } from \"./api/defineInterface.js\";\nexport { defineInterfaceLinkConstraint } from \"./api/defineInterfaceLinkConstraint.js\";\nexport { defineLink } from \"./api/defineLink.js\";\nexport { defineModifyInterfaceObjectAction } from \"./api/defineModifyInterfaceObjectAction.js\";\nexport { defineModifyObjectAction } from \"./api/defineModifyObjectAction.js\";\nexport {\n convertToPluralDisplayName,\n defineObject,\n uppercaseFirstLetter as convertToDisplayName,\n} from \"./api/defineObject.js\";\nexport {\n addNamespaceIfNone,\n defineOntology,\n dumpOntologyFullMetadata,\n} from \"./api/defineOntology.js\";\nexport { defineSharedPropertyType } from \"./api/defineSpt.js\";\nexport { defineValueType } from \"./api/defineValueType.js\";\nexport { importOntologyEntity } from \"./api/importOntologyEntity.js\";\nexport { importSharedPropertyType } from \"./api/importSharedPropertyType.js\";\nexport type { InterfaceType } from \"./api/interface/InterfaceType.js\";\nexport type { LinkType } from \"./api/links/LinkType.js\";\nexport type { ObjectPropertyType } from \"./api/object/ObjectPropertyType.js\";\nexport type { ObjectType } from \"./api/object/ObjectType.js\";\nexport type { PropertyTypeType } from \"./api/properties/PropertyTypeType.js\";\nexport type { SharedPropertyType } from \"./api/properties/SharedPropertyType.js\";\nexport type { ValueTypeDefinitionVersion } from \"./api/values/ValueTypeDefinitionVersion.js\";\nexport { wrapWithProxy } from \"./api/wrapWithProxy.js\";\nexport { propertyTypeTypeToOntologyIrType as convertType } from \"./conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAkB,QAAQ,eAAe;AAoBlD,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SACEC,iCAAiC,EACjCC,iCAAiC,EACjCC,YAAY,EACZC,iCAAiC,EACjCC,uBAAuB,QAClB,uBAAuB;AAC9B,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,gCAAgC,QAAQ,2CAA2C;AAC5F,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SACEC,0BAA0B,EAC1BC,YAAY,EACZC,oBAAoB,IAAIC,oBAAoB,QACvC,uBAAuB;AAC9B,SACEC,kBAAkB,EAClBC,cAAc,EACdC,wBAAwB,QACnB,yBAAyB;AAChC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,wBAAwB,QAAQ,mCAAmC;AAQ5E,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,gCAAgC,IAAIC,WAAW,QAAQ,gEAAgE","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["default","addDependency","OntologyEntityTypeEnum","CREATE_INTERFACE_OBJECT_PARAMETER","CREATE_OR_MODIFY_OBJECT_PARAMETER","defineAction","DELETE_OBJECT_PARAMETER","MODIFY_INTERFACE_OBJECT_PARAMETER","MODIFY_OBJECT_PARAMETER","defineCreateInterfaceObjectAction","defineCreateObjectAction","defineCreateOrModifyObjectAction","defineDeleteInterfaceObjectAction","defineDeleteObjectAction","defineInterface","defineInterfaceLinkConstraint","defineLink","defineModifyInterfaceObjectAction","defineModifyObjectAction","convertToPluralDisplayName","defineObject","uppercaseFirstLetter","convertToDisplayName","addNamespaceIfNone","defineOntology","dumpOntologyFullMetadata","defineSharedPropertyType","defineValueType","importOntologyEntity","importSharedPropertyType","wrapWithProxy","propertyTypeTypeToOntologyIrType","convertType"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { default as default } from \"./cli/main.js\";\n\nexport type { ActionParameterValidation } from \"./api/action/ActionParameter.js\";\nexport type {\n ActionParameterAllowedValues,\n} from \"./api/action/ActionParameterAllowedValues.js\";\nexport type { ActionParameterConditionalOverride } from \"./api/action/ActionParameterConditionalOverride.js\";\nexport type { ActionParameterConfiguration } from \"./api/action/ActionParameterConfiguration.js\";\nexport type { ActionSection } from \"./api/action/ActionSection.js\";\nexport type { ActionType } from \"./api/action/ActionType.js\";\nexport type { ConditionDefinition } from \"./api/action/ConditionDefinition.js\";\nexport type {\n CurrentTimeMappingValue,\n CurrentUserMappingValue,\n CustomMapping,\n MappingValue,\n UuidMappingValue,\n} from \"./api/action/MappingValue.js\";\nexport type { SectionConditionalOverride } from \"./api/action/SectionConditionalOverride.js\";\nexport type { SubmissionMetadata } from \"./api/action/SubmissionMetadata.js\";\nexport { addDependency } from \"./api/addDependency.js\";\nexport { OntologyEntityTypeEnum } from \"./api/common/OntologyEntityTypeEnum.js\";\nexport {\n CREATE_INTERFACE_OBJECT_PARAMETER,\n CREATE_OR_MODIFY_OBJECT_PARAMETER,\n defineAction,\n DELETE_OBJECT_PARAMETER,\n MODIFY_INTERFACE_OBJECT_PARAMETER,\n MODIFY_OBJECT_PARAMETER,\n} from \"./api/defineAction.js\";\nexport { defineCreateInterfaceObjectAction } from \"./api/defineCreateInterfaceObjectAction.js\";\nexport { defineCreateObjectAction } from \"./api/defineCreateObjectAction.js\";\nexport { defineCreateOrModifyObjectAction } from \"./api/defineCreateOrModifyObjectAction.js\";\nexport { defineDeleteInterfaceObjectAction } from \"./api/defineDeleteInterfaceObjectAction.js\";\nexport { defineDeleteObjectAction } from \"./api/defineDeleteObjectAction.js\";\nexport { defineInterface } from \"./api/defineInterface.js\";\nexport { defineInterfaceLinkConstraint } from \"./api/defineInterfaceLinkConstraint.js\";\nexport { defineLink } from \"./api/defineLink.js\";\nexport { defineModifyInterfaceObjectAction } from \"./api/defineModifyInterfaceObjectAction.js\";\nexport { defineModifyObjectAction } from \"./api/defineModifyObjectAction.js\";\nexport {\n convertToPluralDisplayName,\n defineObject,\n uppercaseFirstLetter as convertToDisplayName,\n} from \"./api/defineObject.js\";\nexport {\n addNamespaceIfNone,\n defineOntology,\n dumpOntologyFullMetadata,\n} from \"./api/defineOntology.js\";\nexport { defineSharedPropertyType } from \"./api/defineSpt.js\";\nexport { defineValueType } from \"./api/defineValueType.js\";\nexport { importOntologyEntity } from \"./api/importOntologyEntity.js\";\nexport { importSharedPropertyType } from \"./api/importSharedPropertyType.js\";\nexport type { InterfaceType } from \"./api/interface/InterfaceType.js\";\nexport type { LinkType } from \"./api/links/LinkType.js\";\nexport type { ObjectPropertyType } from \"./api/object/ObjectPropertyType.js\";\nexport type { ObjectType } from \"./api/object/ObjectType.js\";\nexport type { PropertyTypeType } from \"./api/properties/PropertyTypeType.js\";\nexport type { SharedPropertyType } from \"./api/properties/SharedPropertyType.js\";\nexport type { ValueTypeDefinitionVersion } from \"./api/values/ValueTypeDefinitionVersion.js\";\nexport { wrapWithProxy } from \"./api/wrapWithProxy.js\";\nexport { propertyTypeTypeToOntologyIrType as convertType } from \"./conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAkB,QAAQ,eAAe;AAoBlD,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SACEC,iCAAiC,EACjCC,iCAAiC,EACjCC,YAAY,EACZC,uBAAuB,EACvBC,iCAAiC,EACjCC,uBAAuB,QAClB,uBAAuB;AAC9B,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,gCAAgC,QAAQ,2CAA2C;AAC5F,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SACEC,0BAA0B,EAC1BC,YAAY,EACZC,oBAAoB,IAAIC,oBAAoB,QACvC,uBAAuB;AAC9B,SACEC,kBAAkB,EAClBC,cAAc,EACdC,wBAAwB,QACnB,yBAAyB;AAChC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,wBAAwB,QAAQ,mCAAmC;AAQ5E,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,gCAAgC,IAAIC,WAAW,QAAQ,gEAAgE","ignoreList":[]}
@@ -693,7 +693,7 @@ function convertActionValidation(action) {
693
693
  return [p.id, {
694
694
  defaultValidation: {
695
695
  display: {
696
- renderHint: renderHintFromBaseType(p),
696
+ renderHint: renderHintFromBaseType(p, p.validation),
697
697
  visibility: convertActionVisibility(p.validation.defaultVisibility),
698
698
  ...p.defaultValue && {
699
699
  prefill: p.defaultValue
@@ -1905,6 +1905,40 @@ function extractAllowedValues(allowedValues) {
1905
1905
  geotimeSeries: {}
1906
1906
  }
1907
1907
  };
1908
+ case "user":
1909
+ return {
1910
+ type: "user",
1911
+ user: {
1912
+ type: "user",
1913
+ user: {
1914
+ filter: (allowedValues.fromGroups ?? []).map((group) => {
1915
+ return {
1916
+ type: "groupFilter",
1917
+ groupFilter: {
1918
+ groupId: group.type === "static" ? {
1919
+ type: "staticValue",
1920
+ staticValue: {
1921
+ type: "string",
1922
+ string: group.name
1923
+ }
1924
+ } : {
1925
+ type: "parameterId",
1926
+ parameterId: group.parameter
1927
+ }
1928
+ }
1929
+ };
1930
+ })
1931
+ }
1932
+ }
1933
+ };
1934
+ case "multipassGroup":
1935
+ return {
1936
+ type: "multipassGroup",
1937
+ multipassGroup: {
1938
+ type: "group",
1939
+ group: {}
1940
+ }
1941
+ };
1908
1942
  default:
1909
1943
  const k = allowedValues.type;
1910
1944
  return {
@@ -1916,7 +1950,7 @@ function extractAllowedValues(allowedValues) {
1916
1950
  };
1917
1951
  }
1918
1952
  }
1919
- function renderHintFromBaseType(parameter) {
1953
+ function renderHintFromBaseType(parameter, validation) {
1920
1954
  const type = typeof parameter.type === "string" ? parameter.type : parameter.type.type;
1921
1955
  switch (type) {
1922
1956
  case "boolean":
@@ -1938,6 +1972,12 @@ function renderHintFromBaseType(parameter) {
1938
1972
  numericInput: {}
1939
1973
  };
1940
1974
  case "string":
1975
+ if (validation?.allowedValues?.type === "user" || validation?.allowedValues?.type === "multipassGroup") {
1976
+ return {
1977
+ type: "userDropdown",
1978
+ userDropdown: {}
1979
+ };
1980
+ }
1941
1981
  case "stringList":
1942
1982
  case "geohash":
1943
1983
  case "geohashList":
@@ -2041,7 +2081,7 @@ function addNamespaceIfNone(apiName) {
2041
2081
  var apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
2042
2082
  var uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
2043
2083
  async function main(args = process.argv) {
2044
- const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.15.0-beta.3").wrap(Math.min(150, yargs__default.default().terminalWidth())).strict().help().options({
2084
+ const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.15.0-beta.4").wrap(Math.min(150, yargs__default.default().terminalWidth())).strict().help().options({
2045
2085
  input: {
2046
2086
  alias: "i",
2047
2087
  describe: "Input file",
@@ -2160,6 +2200,7 @@ function isActionParameterTypePrimitive(type) {
2160
2200
  // src/api/defineAction.ts
2161
2201
  var MODIFY_OBJECT_PARAMETER = "objectToModifyParameter";
2162
2202
  var CREATE_OR_MODIFY_OBJECT_PARAMETER = "objectToCreateOrModifyParameter";
2203
+ var DELETE_OBJECT_PARAMETER = "objectToDeleteParameter";
2163
2204
  var CREATE_INTERFACE_OBJECT_PARAMETER = "objectTypeParameter";
2164
2205
  var MODIFY_INTERFACE_OBJECT_PARAMETER = "interfaceObjectToModifyParameter";
2165
2206
  function defineAction(actionDef) {
@@ -2249,7 +2290,12 @@ function getTargetParameters(def, parameterSet) {
2249
2290
  targetParams.push({
2250
2291
  id: MODIFY_OBJECT_PARAMETER,
2251
2292
  displayName: def.parameterConfiguration?.[name]?.displayName ?? "Modify object",
2252
- type: {
2293
+ type: typeof def.parameterConfiguration?.[name]?.required === "object" && "listLength" in def.parameterConfiguration?.[name]?.required ? {
2294
+ type: "objectReferenceList",
2295
+ objectReferenceList: {
2296
+ objectTypeId: def.objectType.apiName
2297
+ }
2298
+ } : {
2253
2299
  type: "objectReference",
2254
2300
  objectReference: {
2255
2301
  objectTypeId: def.objectType.apiName
@@ -2299,11 +2345,43 @@ function getTargetParameters(def, parameterSet) {
2299
2345
  });
2300
2346
  parameterSet.delete(CREATE_OR_MODIFY_OBJECT_PARAMETER);
2301
2347
  }
2348
+ if (name === DELETE_OBJECT_PARAMETER && !("interfaceType" in def)) {
2349
+ targetParams.push({
2350
+ id: DELETE_OBJECT_PARAMETER,
2351
+ displayName: def.parameterConfiguration?.[name]?.displayName ?? "Delete object",
2352
+ type: typeof def.parameterConfiguration?.[name]?.required === "object" && "listLength" in def.parameterConfiguration?.[name]?.required ? {
2353
+ type: "objectReferenceList",
2354
+ objectReferenceList: {
2355
+ objectTypeId: def.objectType.apiName
2356
+ }
2357
+ } : {
2358
+ type: "objectReference",
2359
+ objectReference: {
2360
+ objectTypeId: def.objectType.apiName
2361
+ }
2362
+ },
2363
+ validation: {
2364
+ ...def.parameterConfiguration?.[name],
2365
+ allowedValues: {
2366
+ type: "objectQuery"
2367
+ },
2368
+ required: def.parameterConfiguration?.[name]?.required ?? true
2369
+ },
2370
+ defaultValue: def.parameterConfiguration?.[name]?.defaultValue,
2371
+ description: def.parameterConfiguration?.[name]?.description
2372
+ });
2373
+ parameterSet.delete(DELETE_OBJECT_PARAMETER);
2374
+ }
2302
2375
  if (name === CREATE_INTERFACE_OBJECT_PARAMETER && "interfaceType" in def) {
2303
2376
  targetParams.push({
2304
2377
  id: CREATE_INTERFACE_OBJECT_PARAMETER,
2305
2378
  displayName: def.parameterConfiguration?.[name]?.displayName ?? "Object type to create",
2306
- type: {
2379
+ type: typeof def.parameterConfiguration?.[name]?.required === "object" && "listLength" in def.parameterConfiguration?.[name]?.required ? {
2380
+ type: "objectReferenceList",
2381
+ objectReferenceList: {
2382
+ objectTypeId: def.objectType.apiName
2383
+ }
2384
+ } : {
2307
2385
  type: "objectTypeReference",
2308
2386
  objectTypeReference: {
2309
2387
  interfaceTypeRids: [def.interfaceType.apiName]
@@ -2337,7 +2415,12 @@ function getTargetParameters(def, parameterSet) {
2337
2415
  targetParams.push({
2338
2416
  id: MODIFY_INTERFACE_OBJECT_PARAMETER,
2339
2417
  displayName: def.parameterConfiguration?.[name]?.displayName ?? "Object type to modify",
2340
- type: {
2418
+ type: typeof def.parameterConfiguration?.[name]?.required === "object" && "listLength" in def.parameterConfiguration?.[name]?.required ? {
2419
+ type: "interfaceReferenceList",
2420
+ interfaceReferenceList: {
2421
+ interfaceTypeRid: def.interfaceType.apiName
2422
+ }
2423
+ } : {
2341
2424
  type: "interfaceReference",
2342
2425
  interfaceReference: {
2343
2426
  interfaceTypeRid: def.interfaceType.apiName
@@ -2366,6 +2449,44 @@ function getTargetParameters(def, parameterSet) {
2366
2449
  });
2367
2450
  parameterSet.delete(MODIFY_INTERFACE_OBJECT_PARAMETER);
2368
2451
  }
2452
+ if (name === DELETE_OBJECT_PARAMETER && "interfaceType" in def) {
2453
+ targetParams.push({
2454
+ id: DELETE_OBJECT_PARAMETER,
2455
+ displayName: def.parameterConfiguration?.[name]?.displayName ?? "Delete Object",
2456
+ type: typeof def.parameterConfiguration?.[name]?.required === "object" && "listLength" in def.parameterConfiguration?.[name]?.required ? {
2457
+ type: "interfaceReferenceList",
2458
+ interfaceReferenceList: {
2459
+ interfaceTypeRid: def.interfaceType.apiName
2460
+ }
2461
+ } : {
2462
+ type: "interfaceReference",
2463
+ interfaceReference: {
2464
+ interfaceTypeRid: def.interfaceType.apiName
2465
+ }
2466
+ },
2467
+ validation: {
2468
+ ...def.parameterConfiguration?.[name],
2469
+ required: true,
2470
+ allowedValues: def.objectType === void 0 ? {
2471
+ type: "interfaceObjectQuery"
2472
+ } : {
2473
+ type: "oneOf",
2474
+ oneOf: [{
2475
+ label: def.objectType.displayName,
2476
+ value: {
2477
+ type: "objectType",
2478
+ objectType: {
2479
+ objectTypeId: def.objectType.apiName
2480
+ }
2481
+ }
2482
+ }]
2483
+ }
2484
+ },
2485
+ defaultValue: def.parameterConfiguration?.[name]?.defaultValue,
2486
+ description: def.parameterConfiguration?.[name]?.description
2487
+ });
2488
+ parameterSet.delete(DELETE_OBJECT_PARAMETER);
2489
+ }
2369
2490
  });
2370
2491
  return targetParams;
2371
2492
  }
@@ -3032,27 +3153,12 @@ function defineDeleteObjectAction(def) {
3032
3153
  return defineAction({
3033
3154
  apiName: def.apiName ?? `delete-object-${kebab(def.objectType.apiName.split(".").pop() ?? def.objectType.apiName)}`,
3034
3155
  displayName: def.displayName ?? `Delete ${def.objectType.displayName}`,
3035
- parameters: [{
3036
- id: "objectToDeleteParameter",
3037
- displayName: "Delete object",
3038
- type: {
3039
- type: "objectReference",
3040
- objectReference: {
3041
- objectTypeId: def.objectType.apiName
3042
- }
3043
- },
3044
- validation: {
3045
- required: true,
3046
- allowedValues: {
3047
- type: "objectQuery"
3048
- }
3049
- }
3050
- }],
3156
+ parameters: createParameters(def, {}, /* @__PURE__ */ new Set([DELETE_OBJECT_PARAMETER])),
3051
3157
  status: def.status ?? "active",
3052
3158
  rules: [{
3053
3159
  type: "deleteObjectRule",
3054
3160
  deleteObjectRule: {
3055
- objectToDelete: "objectToDeleteParameter"
3161
+ objectToDelete: DELETE_OBJECT_PARAMETER
3056
3162
  }
3057
3163
  }],
3058
3164
  entities: {
@@ -3558,6 +3664,7 @@ function wrapWithProxy(entity) {
3558
3664
 
3559
3665
  exports.CREATE_INTERFACE_OBJECT_PARAMETER = CREATE_INTERFACE_OBJECT_PARAMETER;
3560
3666
  exports.CREATE_OR_MODIFY_OBJECT_PARAMETER = CREATE_OR_MODIFY_OBJECT_PARAMETER;
3667
+ exports.DELETE_OBJECT_PARAMETER = DELETE_OBJECT_PARAMETER;
3561
3668
  exports.MODIFY_INTERFACE_OBJECT_PARAMETER = MODIFY_INTERFACE_OBJECT_PARAMETER;
3562
3669
  exports.MODIFY_OBJECT_PARAMETER = MODIFY_OBJECT_PARAMETER;
3563
3670
  exports.OntologyEntityTypeEnum = OntologyEntityTypeEnum;