@osdk/maker 0.13.0-beta.14 → 0.13.0-beta.16
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 +16 -0
- package/README.md +6 -0
- package/build/browser/api/defineOntology.js +2 -2
- package/build/browser/api/defineOntology.js.map +1 -1
- package/build/browser/api/overall.test.js +22 -0
- package/build/browser/api/overall.test.js.map +1 -1
- package/build/browser/cli/main.js +4 -4
- package/build/browser/cli/main.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js +3 -2
- package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -1
- package/build/cjs/index.cjs +9 -8
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +1 -1
- package/build/esm/api/defineOntology.js +2 -2
- package/build/esm/api/defineOntology.js.map +1 -1
- package/build/esm/api/overall.test.js +22 -0
- package/build/esm/api/overall.test.js.map +1 -1
- package/build/esm/cli/main.js +4 -4
- package/build/esm/cli/main.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js +3 -2
- package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -1
- package/build/types/api/defineOntology.d.ts +1 -1
- package/build/types/api/defineOntology.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts +1 -1
- package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @osdk/maker
|
|
2
2
|
|
|
3
|
+
## 0.13.0-beta.16
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7f22c27: Finish wiring up randomness key
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- @osdk/api@2.5.0-beta.15
|
|
12
|
+
|
|
13
|
+
## 0.13.0-beta.15
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 04e664e: readme update and missing changeset for wiring up randomness key
|
|
18
|
+
|
|
3
19
|
## 0.13.0-beta.14
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -655,6 +655,12 @@ const createEmployeePersonAction = defineCreateInterfaceObjectAction(
|
|
|
655
655
|
const modifyPersonAction = defineModifyInterfaceObjectAction({
|
|
656
656
|
interfaceType: personInterface,
|
|
657
657
|
});
|
|
658
|
+
|
|
659
|
+
// Define a more complex interface action
|
|
660
|
+
const modifyPersonAction = defineModifyInterfaceObjectAction({
|
|
661
|
+
interfaceType: personInterface,
|
|
662
|
+
excludedProperties: ["primaryKey"],
|
|
663
|
+
});
|
|
658
664
|
```
|
|
659
665
|
|
|
660
666
|
### Custom Action
|
|
@@ -48,7 +48,7 @@ export function updateOntology(entity) {
|
|
|
48
48
|
}
|
|
49
49
|
ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName].push(entity);
|
|
50
50
|
}
|
|
51
|
-
export async function defineOntology(ns, body, outputDir, dependencyFile) {
|
|
51
|
+
export async function defineOntology(ns, body, outputDir, dependencyFile, randomnessKey) {
|
|
52
52
|
namespace = ns;
|
|
53
53
|
dependencies = {};
|
|
54
54
|
ontologyDefinition = {
|
|
@@ -80,7 +80,7 @@ export async function defineOntology(ns, body, outputDir, dependencyFile) {
|
|
|
80
80
|
if (dependencyFile) {
|
|
81
81
|
writeDependencyFile(dependencyFile);
|
|
82
82
|
}
|
|
83
|
-
return convertOntologyDefinition(ontologyDefinition);
|
|
83
|
+
return convertOntologyDefinition(ontologyDefinition, randomnessKey);
|
|
84
84
|
}
|
|
85
85
|
export function writeStaticObjects(outputDir) {
|
|
86
86
|
const codegenDir = path.resolve(outputDir, "codegen");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineOntology.js","names":["fs","path","convertActionParameters","convertActionSections","convertActionValidation","convertOntologyDefinition","convertOntologyToValueTypeIr","getFormContentOrdering","OntologyEntityTypeEnum","ontologyDefinition","importedTypes","dependencies","namespace","updateOntology","entity","__type","VALUE_TYPE","apiName","undefined","push","defineOntology","ns","body","outputDir","dependencyFile","OBJECT_TYPE","ACTION_TYPE","LINK_TYPE","INTERFACE_TYPE","SHARED_PROPERTY_TYPE","e","console","error","writeStaticObjects","writeDependencyFile","codegenDir","resolve","typeDirs","existsSync","mkdirSync","recursive","Object","values","forEach","typeDirNameFromMap","currentTypeDirPath","join","rmSync","force","topLevelExportStatements","entries","ontologyTypeEnumKey","entities","typeDirName","typeDirPath","entityModuleNames","entityFileNameBase","camel","withoutNamespace","filePath","entityTypeName","getEntityTypeName","entityJSON","JSON","stringify","replace","_","prefix","value","content","slice","writeFileSync","flag","entityModuleName","length","mainIndexContent","dependencyInjectionString","mainIndexFilePath","buildDatasource","definition","classificationMarkingGroupName","mandatoryMarkingGroupName","needsSecurity","securityConfig","classificationConstraint","markingGroupName","markingConstraint","datasourceName","datasource","editsConfiguration","onlyAllowPrivilegedEdits","redacted","dataSecurity","cleanAndValidateLinkTypeId","step1","linkTypeId","toLowerCase","test","Error","dumpOntologyFullMetadata","dumpValueTypeWireType","convertObjectStatus","status","type","active","experimental","deprecated","message","deadline","replacedBy","convertAction","action","actionValidation","actionParameters","actionSections","parameterOrdering","parameters","map","p","id","actionType","actionTypeLogic","logic","rules","validation","metadata","displayMetadata","configuration","defaultLayout","defaultFormat","displayAndFormat","table","columnWidthByParameterRid","enableFileImport","fitHorizontally","frozenColumnCount","rowHeightInLines","enableLayoutUserSwitch","enableLayoutSwitch","description","displayName","icon","blueprint","locator","color","successMessage","submissionMetadata","typeClasses","submitButtonDisplayMetadata","undoButtonConfiguration","formContentOrdering","sections","extractAllowedValues","allowedValues","oneOf","labelledValues","otherValueAllowed","allowed","min","max","range","minimum","inclusive","maximum","minLength","maxLength","regex","text","failureMessage","datetime","objectTypeReference","interfaceTypeRids","interfaceTypes","geotimeSeriesReference","geotimeSeries","k","renderHintFromBaseType","parameter","checkbox","numericInput","textInput","dateTimePicker","filePicker","mandatoryMarkingPicker","cbacMarkingPicker","dropdown","extractNamespace","substring","lastIndexOf","lastDot","str","result","c","toUpperCase","charAt","namespaceNoDot","endsWith","addNamespaceIfNone","includes"],"sources":["defineOntology.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionTypeStatus,\n OntologyIr,\n OntologyIrActionTypeBlockDataV2,\n OntologyIrAllowedParameterValues,\n OntologyIrObjectTypeDatasource,\n OntologyIrObjectTypeDatasourceDefinition,\n OntologyIrParameter,\n OntologyIrSection,\n OntologyIrValueTypeBlockData,\n ParameterId,\n ParameterRenderHint,\n SectionId,\n} from \"@osdk/client.unstable\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport { convertActionParameters } from \"../conversion/toMarketplace/convertActionParameters.js\";\nimport { convertActionSections } from \"../conversion/toMarketplace/convertActionSections.js\";\nimport { convertActionValidation } from \"../conversion/toMarketplace/convertActionValidation.js\";\nimport { convertOntologyDefinition } from \"../conversion/toMarketplace/convertOntologyDefinition.js\";\nimport { convertOntologyToValueTypeIr } from \"../conversion/toMarketplace/convertOntologyToValueTypeIr.js\";\nimport { getFormContentOrdering } from \"../conversion/toMarketplace/getFormContentOrdering.js\";\nimport type { ActionParameter } from \"./action/ActionParameter.js\";\nimport type { ActionParameterAllowedValues } from \"./action/ActionParameterAllowedValues.js\";\nimport type { ActionType } from \"./action/ActionType.js\";\nimport type { OntologyDefinition } from \"./common/OntologyDefinition.js\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport type { OntologyEntityType } from \"./common/OntologyEntityTypeMapping.js\";\n\n// type -> apiName -> entity\n/** @internal */\nexport let ontologyDefinition: OntologyDefinition;\n\n// type -> apiName -> entity\n/** @internal */\nexport let importedTypes: OntologyDefinition;\n\n// namespace -> version\n/** @internal */\nexport let dependencies: Record<string, string>;\n\n/** @internal */\nexport let namespace: string;\n\nexport function updateOntology<\n T extends OntologyEntityType,\n>(\n entity: T,\n): void {\n if (entity.__type !== OntologyEntityTypeEnum.VALUE_TYPE) {\n ontologyDefinition[entity.__type][entity.apiName] = entity;\n return;\n }\n // value types are a special case\n if (\n ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName]\n === undefined\n ) {\n ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName] = [];\n }\n ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName]\n .push(entity);\n}\n\nexport async function defineOntology(\n ns: string,\n body: () => void | Promise<void>,\n outputDir: string | undefined,\n dependencyFile?: string,\n uniquenessKey?: string,\n): Promise<OntologyIr> {\n namespace = ns;\n dependencies = {};\n ontologyDefinition = {\n OBJECT_TYPE: {},\n ACTION_TYPE: {},\n LINK_TYPE: {},\n INTERFACE_TYPE: {},\n SHARED_PROPERTY_TYPE: {},\n VALUE_TYPE: {},\n };\n importedTypes = {\n SHARED_PROPERTY_TYPE: {},\n OBJECT_TYPE: {},\n ACTION_TYPE: {},\n LINK_TYPE: {},\n INTERFACE_TYPE: {},\n VALUE_TYPE: {},\n };\n try {\n await body();\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\n \"Unexpected error while processing the body of the ontology\",\n e,\n );\n throw e;\n }\n\n if (outputDir) {\n writeStaticObjects(outputDir);\n }\n if (dependencyFile) {\n writeDependencyFile(dependencyFile);\n }\n return convertOntologyDefinition(ontologyDefinition);\n}\n\nexport function writeStaticObjects(outputDir: string): void {\n const codegenDir = path.resolve(outputDir, \"codegen\");\n const typeDirs = {\n [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: \"shared-property-types\",\n [OntologyEntityTypeEnum.ACTION_TYPE]: \"action-types\",\n [OntologyEntityTypeEnum.OBJECT_TYPE]: \"object-types\",\n [OntologyEntityTypeEnum.LINK_TYPE]: \"link-types\",\n [OntologyEntityTypeEnum.INTERFACE_TYPE]: \"interface-types\",\n [OntologyEntityTypeEnum.VALUE_TYPE]: \"value-types\",\n };\n\n if (!fs.existsSync(codegenDir)) {\n fs.mkdirSync(codegenDir, { recursive: true });\n }\n\n Object.values(typeDirs).forEach(typeDirNameFromMap => {\n const currentTypeDirPath = path.join(codegenDir, typeDirNameFromMap);\n if (fs.existsSync(currentTypeDirPath)) {\n fs.rmSync(currentTypeDirPath, { recursive: true, force: true });\n }\n fs.mkdirSync(currentTypeDirPath, { recursive: true });\n });\n\n const topLevelExportStatements: string[] = [];\n\n Object.entries(ontologyDefinition).forEach(\n ([ontologyTypeEnumKey, entities]) => {\n const typeDirName =\n typeDirs[ontologyTypeEnumKey as OntologyEntityTypeEnum];\n\n const typeDirPath = path.join(codegenDir, typeDirName);\n const entityModuleNames: string[] = [];\n\n Object.entries(entities).forEach(\n ([apiName, entity]: [string, OntologyEntityType]) => {\n const entityFileNameBase = camel(withoutNamespace(apiName))\n + (ontologyTypeEnumKey as OntologyEntityTypeEnum\n === OntologyEntityTypeEnum.VALUE_TYPE\n ? \"ValueType\"\n : \"\");\n const filePath = path.join(typeDirPath, `${entityFileNameBase}.ts`);\n const entityTypeName = getEntityTypeName(ontologyTypeEnumKey);\n const entityJSON = JSON.stringify(entity, null, 2).replace(\n /(\"__type\"\\s*:\\s*)\"([^\"]*)\"/g,\n (_, prefix, value) => `${prefix}OntologyEntityTypeEnum.${value}`,\n );\n const content = `\nimport { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';\nimport type { ${entityTypeName} } from '@osdk/maker';\n\nconst ${entityFileNameBase}_base: ${entityTypeName} = ${\n ontologyTypeEnumKey === \"VALUE_TYPE\"\n ? entityJSON.slice(1, -2)\n : entityJSON\n } as unknown as ${entityTypeName};\n \nexport const ${entityFileNameBase}: ${entityTypeName} = wrapWithProxy(${entityFileNameBase}_base);\n `;\n fs.writeFileSync(filePath, content, { flag: \"w\" });\n entityModuleNames.push(entityFileNameBase);\n },\n );\n\n for (const entityModuleName of entityModuleNames) {\n topLevelExportStatements.push(\n `export { ${entityModuleName} } from \"./codegen/${typeDirName}/${entityModuleName}.js\";`,\n );\n }\n },\n );\n\n if (topLevelExportStatements.length > 0) {\n const mainIndexContent = dependencyInjectionString()\n + topLevelExportStatements.join(\"\\n\") + \"\\n\";\n const mainIndexFilePath = path.join(outputDir, \"index.ts\");\n fs.writeFileSync(mainIndexFilePath, mainIndexContent, { flag: \"w\" });\n }\n}\n\nexport function buildDatasource(\n apiName: string,\n definition: OntologyIrObjectTypeDatasourceDefinition,\n classificationMarkingGroupName?: string,\n mandatoryMarkingGroupName?: string,\n): OntologyIrObjectTypeDatasource {\n const needsSecurity = classificationMarkingGroupName !== undefined\n || mandatoryMarkingGroupName !== undefined;\n\n const securityConfig = needsSecurity\n ? {\n classificationConstraint: classificationMarkingGroupName\n ? {\n markingGroupName: classificationMarkingGroupName,\n }\n : undefined,\n markingConstraint: mandatoryMarkingGroupName\n ? {\n markingGroupName: mandatoryMarkingGroupName,\n }\n : undefined,\n }\n : undefined;\n return ({\n datasourceName: apiName,\n datasource: definition,\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false,\n },\n redacted: false,\n ...((securityConfig !== undefined) && { dataSecurity: securityConfig }),\n });\n}\n\nexport function cleanAndValidateLinkTypeId(apiName: string): string {\n // Insert a dash before any uppercase letter that follows a lowercase letter or digit\n const step1 = apiName.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\");\n // Insert a dash after a sequence of uppercase letters when followed by a lowercase letter\n // then convert the whole string to lowercase\n // e.g., apiName, APIname, and apiNAME will all be converted to api-name\n const linkTypeId = step1.replace(/([A-Z])([A-Z][a-z])/g, \"$1-$2\")\n .toLowerCase();\n\n const VALIDATION_PATTERN = /^([a-z][a-z0-9\\-]*)$/;\n if (!VALIDATION_PATTERN.test(linkTypeId)) {\n throw new Error(\n `LinkType id '${linkTypeId}' must be lower case with dashes.`,\n );\n }\n return linkTypeId;\n}\n\nexport function dumpOntologyFullMetadata(): OntologyIr {\n return convertOntologyDefinition(ontologyDefinition);\n}\n\nexport function dumpValueTypeWireType(): OntologyIrValueTypeBlockData {\n return convertOntologyToValueTypeIr(ontologyDefinition);\n}\n\nexport function convertObjectStatus(status: any): any {\n if (status === undefined) {\n return {\n type: \"active\",\n active: {},\n };\n }\n\n if (status === \"active\") {\n return {\n type: \"active\",\n active: {},\n };\n }\n\n if (status === \"experimental\") {\n return {\n type: \"experimental\",\n experimental: {},\n };\n }\n\n if (typeof status === \"object\" && status.type === \"deprecated\") {\n return {\n type: \"deprecated\",\n deprecated: {\n message: status.message,\n deadline: status.deadline,\n replacedBy: undefined,\n },\n };\n }\n\n return status;\n}\n\nexport function convertAction(\n action: ActionType,\n): OntologyIrActionTypeBlockDataV2 {\n const actionValidation = convertActionValidation(action);\n const actionParameters: Record<ParameterId, OntologyIrParameter> =\n convertActionParameters(action);\n const actionSections: Record<SectionId, OntologyIrSection> =\n convertActionSections(action);\n const parameterOrdering = action.parameterOrdering\n ?? (action.parameters ?? []).map(p => p.id);\n return {\n actionType: {\n actionTypeLogic: {\n logic: {\n rules: action.rules,\n },\n validation: actionValidation,\n },\n metadata: {\n apiName: action.apiName,\n 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\",\n blueprint: action.icon ?? { locator: \"edit\", color: \"#000000\" },\n },\n successMessage: action.submissionMetadata?.successMessage\n ? [{\n type: \"message\",\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 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 },\n };\n}\n\nexport function extractAllowedValues(\n allowedValues: ActionParameterAllowedValues,\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,\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 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 // TODO(dpaquin): there's probably a TS clean way to do this\n }\n}\n\nexport function renderHintFromBaseType(\n parameter: ActionParameter,\n): ParameterRenderHint {\n // TODO(dpaquin): these are just guesses, we should find where they're actually defined\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 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\nexport function extractNamespace(apiName: string): string {\n return apiName.substring(0, apiName.lastIndexOf(\".\") + 1);\n}\n\nexport function withoutNamespace(apiName: string): string {\n const lastDot = apiName.lastIndexOf(\".\");\n if (lastDot === -1) {\n return apiName;\n }\n return apiName.substring(lastDot + 1);\n}\n\nfunction camel(str: string): string {\n if (!str) {\n return str;\n }\n let result = str.replace(/[-_]+(.)?/g, (_, c) => (c ? c.toUpperCase() : \"\"));\n result = result.charAt(0).toLowerCase() + result.slice(1);\n return result;\n}\n\n/**\n * Gets the TypeScript type name corresponding to an OntologyEntityTypeEnum value\n */\nfunction getEntityTypeName(type: string): string {\n return {\n [OntologyEntityTypeEnum.OBJECT_TYPE]: \"ObjectType\",\n [OntologyEntityTypeEnum.LINK_TYPE]: \"LinkType\",\n [OntologyEntityTypeEnum.INTERFACE_TYPE]: \"InterfaceType\",\n [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: \"SharedPropertyType\",\n [OntologyEntityTypeEnum.ACTION_TYPE]: \"ActionType\",\n [OntologyEntityTypeEnum.VALUE_TYPE]: \"ValueTypeDefinitionVersion\",\n }[type]!;\n}\n\nfunction writeDependencyFile(dependencyFile: string): void {\n fs.writeFileSync(dependencyFile, JSON.stringify(dependencies, null, 2));\n}\n\nfunction dependencyInjectionString(): string {\n const namespaceNoDot: string = namespace.endsWith(\".\")\n ? namespace.slice(0, -1)\n : namespace;\n\n return `import { addDependency } from \"@osdk/maker\";\n// @ts-ignore\naddDependency(\"${namespaceNoDot}\", new URL(import.meta.url).pathname);\n`;\n}\n\nexport function addNamespaceIfNone(apiName: string): string {\n return apiName.includes(\".\") ? apiName : namespace + apiName;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA,OAAO,KAAKA,EAAE,MAAM,IAAI;AACxB,OAAO,KAAKC,IAAI,MAAM,MAAM;AAC5B,SAASC,uBAAuB,QAAQ,wDAAwD;AAChG,SAASC,qBAAqB,QAAQ,sDAAsD;AAC5F,SAASC,uBAAuB,QAAQ,wDAAwD;AAChG,SAASC,yBAAyB,QAAQ,0DAA0D;AACpG,SAASC,4BAA4B,QAAQ,6DAA6D;AAC1G,SAASC,sBAAsB,QAAQ,uDAAuD;AAK9F,SAASC,sBAAsB,QAAQ,oCAAoC;AAG3E;AACA;AACA,OAAO,IAAIC,kBAAsC;;AAEjD;AACA;AACA,OAAO,IAAIC,aAAiC;;AAE5C;AACA;AACA,OAAO,IAAIC,YAAoC;;AAE/C;AACA,OAAO,IAAIC,SAAiB;AAE5B,OAAO,SAASC,cAAcA,CAG5BC,MAAS,EACH;EACN,IAAIA,MAAM,CAACC,MAAM,KAAKP,sBAAsB,CAACQ,UAAU,EAAE;IACvDP,kBAAkB,CAACK,MAAM,CAACC,MAAM,CAAC,CAACD,MAAM,CAACG,OAAO,CAAC,GAAGH,MAAM;IAC1D;EACF;EACA;EACA,IACEL,kBAAkB,CAACD,sBAAsB,CAACQ,UAAU,CAAC,CAACF,MAAM,CAACG,OAAO,CAAC,KAC/DC,SAAS,EACf;IACAT,kBAAkB,CAACD,sBAAsB,CAACQ,UAAU,CAAC,CAACF,MAAM,CAACG,OAAO,CAAC,GAAG,EAAE;EAC5E;EACAR,kBAAkB,CAACD,sBAAsB,CAACQ,UAAU,CAAC,CAACF,MAAM,CAACG,OAAO,CAAC,CAClEE,IAAI,CA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AC,GAClDxL,SAAS,CAAC0D,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GACtB1D,SAAS;EAEb,OAAO;AACT;AACA,iBAAiBuL,cAAc;AAC/B,CAAC;AACD;AAEA,OAAO,SAASE,kBAAkBA,CAACpL,OAAe,EAAU;EAC1D,OAAOA,OAAO,CAACqL,QAAQ,CAAC,GAAG,CAAC,GAAGrL,OAAO,GAAGL,SAAS,GAAGK,OAAO;AAC9D","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"defineOntology.js","names":["fs","path","convertActionParameters","convertActionSections","convertActionValidation","convertOntologyDefinition","convertOntologyToValueTypeIr","getFormContentOrdering","OntologyEntityTypeEnum","ontologyDefinition","importedTypes","dependencies","namespace","updateOntology","entity","__type","VALUE_TYPE","apiName","undefined","push","defineOntology","ns","body","outputDir","dependencyFile","randomnessKey","OBJECT_TYPE","ACTION_TYPE","LINK_TYPE","INTERFACE_TYPE","SHARED_PROPERTY_TYPE","e","console","error","writeStaticObjects","writeDependencyFile","codegenDir","resolve","typeDirs","existsSync","mkdirSync","recursive","Object","values","forEach","typeDirNameFromMap","currentTypeDirPath","join","rmSync","force","topLevelExportStatements","entries","ontologyTypeEnumKey","entities","typeDirName","typeDirPath","entityModuleNames","entityFileNameBase","camel","withoutNamespace","filePath","entityTypeName","getEntityTypeName","entityJSON","JSON","stringify","replace","_","prefix","value","content","slice","writeFileSync","flag","entityModuleName","length","mainIndexContent","dependencyInjectionString","mainIndexFilePath","buildDatasource","definition","classificationMarkingGroupName","mandatoryMarkingGroupName","needsSecurity","securityConfig","classificationConstraint","markingGroupName","markingConstraint","datasourceName","datasource","editsConfiguration","onlyAllowPrivilegedEdits","redacted","dataSecurity","cleanAndValidateLinkTypeId","step1","linkTypeId","toLowerCase","test","Error","dumpOntologyFullMetadata","dumpValueTypeWireType","convertObjectStatus","status","type","active","experimental","deprecated","message","deadline","replacedBy","convertAction","action","actionValidation","actionParameters","actionSections","parameterOrdering","parameters","map","p","id","actionType","actionTypeLogic","logic","rules","validation","metadata","displayMetadata","configuration","defaultLayout","defaultFormat","displayAndFormat","table","columnWidthByParameterRid","enableFileImport","fitHorizontally","frozenColumnCount","rowHeightInLines","enableLayoutUserSwitch","enableLayoutSwitch","description","displayName","icon","blueprint","locator","color","successMessage","submissionMetadata","typeClasses","submitButtonDisplayMetadata","undoButtonConfiguration","formContentOrdering","sections","extractAllowedValues","allowedValues","oneOf","labelledValues","otherValueAllowed","allowed","min","max","range","minimum","inclusive","maximum","minLength","maxLength","regex","text","failureMessage","datetime","objectTypeReference","interfaceTypeRids","interfaceTypes","geotimeSeriesReference","geotimeSeries","k","renderHintFromBaseType","parameter","checkbox","numericInput","textInput","dateTimePicker","filePicker","mandatoryMarkingPicker","cbacMarkingPicker","dropdown","extractNamespace","substring","lastIndexOf","lastDot","str","result","c","toUpperCase","charAt","namespaceNoDot","endsWith","addNamespaceIfNone","includes"],"sources":["defineOntology.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionTypeStatus,\n OntologyIr,\n OntologyIrActionTypeBlockDataV2,\n OntologyIrAllowedParameterValues,\n OntologyIrObjectTypeDatasource,\n OntologyIrObjectTypeDatasourceDefinition,\n OntologyIrParameter,\n OntologyIrSection,\n OntologyIrValueTypeBlockData,\n ParameterId,\n ParameterRenderHint,\n SectionId,\n} from \"@osdk/client.unstable\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport { convertActionParameters } from \"../conversion/toMarketplace/convertActionParameters.js\";\nimport { convertActionSections } from \"../conversion/toMarketplace/convertActionSections.js\";\nimport { convertActionValidation } from \"../conversion/toMarketplace/convertActionValidation.js\";\nimport { convertOntologyDefinition } from \"../conversion/toMarketplace/convertOntologyDefinition.js\";\nimport { convertOntologyToValueTypeIr } from \"../conversion/toMarketplace/convertOntologyToValueTypeIr.js\";\nimport { getFormContentOrdering } from \"../conversion/toMarketplace/getFormContentOrdering.js\";\nimport type { ActionParameter } from \"./action/ActionParameter.js\";\nimport type { ActionParameterAllowedValues } from \"./action/ActionParameterAllowedValues.js\";\nimport type { ActionType } from \"./action/ActionType.js\";\nimport type { OntologyDefinition } from \"./common/OntologyDefinition.js\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport type { OntologyEntityType } from \"./common/OntologyEntityTypeMapping.js\";\n\n// type -> apiName -> entity\n/** @internal */\nexport let ontologyDefinition: OntologyDefinition;\n\n// type -> apiName -> entity\n/** @internal */\nexport let importedTypes: OntologyDefinition;\n\n// namespace -> version\n/** @internal */\nexport let dependencies: Record<string, string>;\n\n/** @internal */\nexport let namespace: string;\n\nexport function updateOntology<\n T extends OntologyEntityType,\n>(\n entity: T,\n): void {\n if (entity.__type !== OntologyEntityTypeEnum.VALUE_TYPE) {\n ontologyDefinition[entity.__type][entity.apiName] = entity;\n return;\n }\n // value types are a special case\n if (\n ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName]\n === undefined\n ) {\n ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName] = [];\n }\n ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName]\n .push(entity);\n}\n\nexport async function defineOntology(\n ns: string,\n body: () => void | Promise<void>,\n outputDir: string | undefined,\n dependencyFile?: string,\n randomnessKey?: string,\n): Promise<OntologyIr> {\n namespace = ns;\n dependencies = {};\n ontologyDefinition = {\n OBJECT_TYPE: {},\n ACTION_TYPE: {},\n LINK_TYPE: {},\n INTERFACE_TYPE: {},\n SHARED_PROPERTY_TYPE: {},\n VALUE_TYPE: {},\n };\n importedTypes = {\n SHARED_PROPERTY_TYPE: {},\n OBJECT_TYPE: {},\n ACTION_TYPE: {},\n LINK_TYPE: {},\n INTERFACE_TYPE: {},\n VALUE_TYPE: {},\n };\n try {\n await body();\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\n \"Unexpected error while processing the body of the ontology\",\n e,\n );\n throw e;\n }\n\n if (outputDir) {\n writeStaticObjects(outputDir);\n }\n if (dependencyFile) {\n writeDependencyFile(dependencyFile);\n }\n return convertOntologyDefinition(ontologyDefinition, randomnessKey);\n}\n\nexport function writeStaticObjects(outputDir: string): void {\n const codegenDir = path.resolve(outputDir, \"codegen\");\n const typeDirs = {\n [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: \"shared-property-types\",\n [OntologyEntityTypeEnum.ACTION_TYPE]: \"action-types\",\n [OntologyEntityTypeEnum.OBJECT_TYPE]: \"object-types\",\n [OntologyEntityTypeEnum.LINK_TYPE]: \"link-types\",\n [OntologyEntityTypeEnum.INTERFACE_TYPE]: \"interface-types\",\n [OntologyEntityTypeEnum.VALUE_TYPE]: \"value-types\",\n };\n\n if (!fs.existsSync(codegenDir)) {\n fs.mkdirSync(codegenDir, { recursive: true });\n }\n\n Object.values(typeDirs).forEach(typeDirNameFromMap => {\n const currentTypeDirPath = path.join(codegenDir, typeDirNameFromMap);\n if (fs.existsSync(currentTypeDirPath)) {\n fs.rmSync(currentTypeDirPath, { recursive: true, force: true });\n }\n fs.mkdirSync(currentTypeDirPath, { recursive: true });\n });\n\n const topLevelExportStatements: string[] = [];\n\n Object.entries(ontologyDefinition).forEach(\n ([ontologyTypeEnumKey, entities]) => {\n const typeDirName =\n typeDirs[ontologyTypeEnumKey as OntologyEntityTypeEnum];\n\n const typeDirPath = path.join(codegenDir, typeDirName);\n const entityModuleNames: string[] = [];\n\n Object.entries(entities).forEach(\n ([apiName, entity]: [string, OntologyEntityType]) => {\n const entityFileNameBase = camel(withoutNamespace(apiName))\n + (ontologyTypeEnumKey as OntologyEntityTypeEnum\n === OntologyEntityTypeEnum.VALUE_TYPE\n ? \"ValueType\"\n : \"\");\n const filePath = path.join(typeDirPath, `${entityFileNameBase}.ts`);\n const entityTypeName = getEntityTypeName(ontologyTypeEnumKey);\n const entityJSON = JSON.stringify(entity, null, 2).replace(\n /(\"__type\"\\s*:\\s*)\"([^\"]*)\"/g,\n (_, prefix, value) => `${prefix}OntologyEntityTypeEnum.${value}`,\n );\n const content = `\nimport { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';\nimport type { ${entityTypeName} } from '@osdk/maker';\n\nconst ${entityFileNameBase}_base: ${entityTypeName} = ${\n ontologyTypeEnumKey === \"VALUE_TYPE\"\n ? entityJSON.slice(1, -2)\n : entityJSON\n } as unknown as ${entityTypeName};\n \nexport const ${entityFileNameBase}: ${entityTypeName} = wrapWithProxy(${entityFileNameBase}_base);\n `;\n fs.writeFileSync(filePath, content, { flag: \"w\" });\n entityModuleNames.push(entityFileNameBase);\n },\n );\n\n for (const entityModuleName of entityModuleNames) {\n topLevelExportStatements.push(\n `export { ${entityModuleName} } from \"./codegen/${typeDirName}/${entityModuleName}.js\";`,\n );\n }\n },\n );\n\n if (topLevelExportStatements.length > 0) {\n const mainIndexContent = dependencyInjectionString()\n + topLevelExportStatements.join(\"\\n\") + \"\\n\";\n const mainIndexFilePath = path.join(outputDir, \"index.ts\");\n fs.writeFileSync(mainIndexFilePath, mainIndexContent, { flag: \"w\" });\n }\n}\n\nexport function buildDatasource(\n apiName: string,\n definition: OntologyIrObjectTypeDatasourceDefinition,\n classificationMarkingGroupName?: string,\n mandatoryMarkingGroupName?: string,\n): OntologyIrObjectTypeDatasource {\n const needsSecurity = classificationMarkingGroupName !== undefined\n || mandatoryMarkingGroupName !== undefined;\n\n const securityConfig = needsSecurity\n ? {\n classificationConstraint: classificationMarkingGroupName\n ? {\n markingGroupName: classificationMarkingGroupName,\n }\n : undefined,\n markingConstraint: mandatoryMarkingGroupName\n ? {\n markingGroupName: mandatoryMarkingGroupName,\n }\n : undefined,\n }\n : undefined;\n return ({\n datasourceName: apiName,\n datasource: definition,\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false,\n },\n redacted: false,\n ...((securityConfig !== undefined) && { dataSecurity: securityConfig }),\n });\n}\n\nexport function cleanAndValidateLinkTypeId(apiName: string): string {\n // Insert a dash before any uppercase letter that follows a lowercase letter or digit\n const step1 = apiName.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\");\n // Insert a dash after a sequence of uppercase letters when followed by a lowercase letter\n // then convert the whole string to lowercase\n // e.g., apiName, APIname, and apiNAME will all be converted to api-name\n const linkTypeId = step1.replace(/([A-Z])([A-Z][a-z])/g, \"$1-$2\")\n .toLowerCase();\n\n const VALIDATION_PATTERN = /^([a-z][a-z0-9\\-]*)$/;\n if (!VALIDATION_PATTERN.test(linkTypeId)) {\n throw new Error(\n `LinkType id '${linkTypeId}' must be lower case with dashes.`,\n );\n }\n return linkTypeId;\n}\n\nexport function dumpOntologyFullMetadata(): OntologyIr {\n return convertOntologyDefinition(ontologyDefinition);\n}\n\nexport function dumpValueTypeWireType(): OntologyIrValueTypeBlockData {\n return convertOntologyToValueTypeIr(ontologyDefinition);\n}\n\nexport function convertObjectStatus(status: any): any {\n if (status === undefined) {\n return {\n type: \"active\",\n active: {},\n };\n }\n\n if (status === \"active\") {\n return {\n type: \"active\",\n active: {},\n };\n }\n\n if (status === \"experimental\") {\n return {\n type: \"experimental\",\n experimental: {},\n };\n }\n\n if (typeof status === \"object\" && status.type === \"deprecated\") {\n return {\n type: \"deprecated\",\n deprecated: {\n message: status.message,\n deadline: status.deadline,\n replacedBy: undefined,\n },\n };\n }\n\n return status;\n}\n\nexport function convertAction(\n action: ActionType,\n): OntologyIrActionTypeBlockDataV2 {\n const actionValidation = convertActionValidation(action);\n const actionParameters: Record<ParameterId, OntologyIrParameter> =\n convertActionParameters(action);\n const actionSections: Record<SectionId, OntologyIrSection> =\n convertActionSections(action);\n const parameterOrdering = action.parameterOrdering\n ?? (action.parameters ?? []).map(p => p.id);\n return {\n actionType: {\n actionTypeLogic: {\n logic: {\n rules: action.rules,\n },\n validation: actionValidation,\n },\n metadata: {\n apiName: action.apiName,\n 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\",\n blueprint: action.icon ?? { locator: \"edit\", color: \"#000000\" },\n },\n successMessage: action.submissionMetadata?.successMessage\n ? [{\n type: \"message\",\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 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 },\n };\n}\n\nexport function extractAllowedValues(\n allowedValues: ActionParameterAllowedValues,\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,\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 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 // TODO(dpaquin): there's probably a TS clean way to do this\n }\n}\n\nexport function renderHintFromBaseType(\n parameter: ActionParameter,\n): ParameterRenderHint {\n // TODO(dpaquin): these are just guesses, we should find where they're actually defined\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 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\nexport function extractNamespace(apiName: string): string {\n return apiName.substring(0, apiName.lastIndexOf(\".\") + 1);\n}\n\nexport function withoutNamespace(apiName: string): string {\n const lastDot = apiName.lastIndexOf(\".\");\n if (lastDot === -1) {\n return apiName;\n }\n return apiName.substring(lastDot + 1);\n}\n\nfunction camel(str: string): string {\n if (!str) {\n return str;\n }\n let result = str.replace(/[-_]+(.)?/g, (_, c) => (c ? c.toUpperCase() : \"\"));\n result = result.charAt(0).toLowerCase() + result.slice(1);\n return result;\n}\n\n/**\n * Gets the TypeScript type name corresponding to an OntologyEntityTypeEnum value\n */\nfunction getEntityTypeName(type: string): string {\n return {\n [OntologyEntityTypeEnum.OBJECT_TYPE]: \"ObjectType\",\n [OntologyEntityTypeEnum.LINK_TYPE]: \"LinkType\",\n [OntologyEntityTypeEnum.INTERFACE_TYPE]: \"InterfaceType\",\n [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: \"SharedPropertyType\",\n [OntologyEntityTypeEnum.ACTION_TYPE]: \"ActionType\",\n [OntologyEntityTypeEnum.VALUE_TYPE]: \"ValueTypeDefinitionVersion\",\n }[type]!;\n}\n\nfunction writeDependencyFile(dependencyFile: string): void {\n fs.writeFileSync(dependencyFile, JSON.stringify(dependencies, null, 2));\n}\n\nfunction dependencyInjectionString(): string {\n const namespaceNoDot: string = namespace.endsWith(\".\")\n ? namespace.slice(0, -1)\n : namespace;\n\n return `import { addDependency } from \"@osdk/maker\";\n// @ts-ignore\naddDependency(\"${namespaceNoDot}\", new URL(import.meta.url).pathname);\n`;\n}\n\nexport function addNamespaceIfNone(apiName: string): string {\n return apiName.includes(\".\") ? apiName : namespace + apiName;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA,OAAO,KAAKA,EAAE,MAAM,IAAI;AACxB,OAAO,KAAKC,IAAI,MAAM,MAAM;AAC5B,SAASC,uBAAuB,QAAQ,wDAAwD;AAChG,SAASC,qBAAqB,QAAQ,sDAAsD;AAC5F,SAASC,uBAAuB,QAAQ,wDAAwD;AAChG,SAASC,yBAAyB,QAAQ,0DAA0D;AACpG,SAASC,4BAA4B,QAAQ,6DAA6D;AAC1G,SAASC,sBAAsB,QAAQ,uDAAuD;AAK9F,SAASC,sBAAsB,QAAQ,oCAAoC;AAG3E;AACA;AACA,OAAO,IAAIC,kBAAsC;;AAEjD;AACA;AACA,OAAO,IAAIC,aAAiC;;AAE5C;AACA;AACA,OAAO,IAAIC,YAAoC;;AAE/C;AACA,OAAO,IAAIC,SAAiB;AAE5B,OAAO,SAASC,cAAcA,CAG5BC,MAAS,EACH;EACN,IAAIA,MAAM,CAACC,MAAM,KAAKP,sBAAsB,CAACQ,UAAU,EAAE;IACvDP,k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sB,oBAAoB,GAAG,oBAAoB;IACnE,CAACtB,sBAAsB,CAACmB,WAAW,GAAG,YAAY;IAClD,CAACnB,sBAAsB,CAACQ,UAAU,GAAG;EACvC,CAAC,CAACwF,IAAI,CAAC;AACT;AAEA,SAASrE,mBAAmBA,CAACX,cAAsB,EAAQ;EACzDxB,EAAE,CAACwE,aAAa,CAAChD,cAAc,EAAEwC,IAAI,CAACC,SAAS,CAACtD,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACzE;AAEA,SAASkE,yBAAyBA,CAAA,EAAW;EAC3C,MAAMuH,cAAsB,GAAGxL,SAAS,CAACyL,QAAQ,CAAC,GAAG,CAAC,GAClDzL,SAAS,CAAC2D,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GACtB3D,SAAS;EAEb,OAAO;AACT;AACA,iBAAiBwL,cAAc;AAC/B,CAAC;AACD;AAEA,OAAO,SAASE,kBAAkBA,CAACrL,OAAe,EAAU;EAC1D,OAAOA,OAAO,CAACsL,QAAQ,CAAC,GAAG,CAAC,GAAGtL,OAAO,GAAGL,SAAS,GAAGK,OAAO;AAC9D","ignoreList":[]}
|
|
@@ -3586,6 +3586,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
|
|
|
3586
3586
|
},
|
|
3587
3587
|
"sharedPropertyTypes": {},
|
|
3588
3588
|
},
|
|
3589
|
+
"randomnessKey": undefined,
|
|
3589
3590
|
"valueTypes": {
|
|
3590
3591
|
"valueTypes": [],
|
|
3591
3592
|
},
|
|
@@ -3760,6 +3761,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
|
|
|
3760
3761
|
},
|
|
3761
3762
|
"sharedPropertyTypes": {},
|
|
3762
3763
|
},
|
|
3764
|
+
"randomnessKey": undefined,
|
|
3763
3765
|
"valueTypes": {
|
|
3764
3766
|
"valueTypes": [],
|
|
3765
3767
|
},
|
|
@@ -3935,6 +3937,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
|
|
|
3935
3937
|
},
|
|
3936
3938
|
"sharedPropertyTypes": {},
|
|
3937
3939
|
},
|
|
3940
|
+
"randomnessKey": undefined,
|
|
3938
3941
|
"valueTypes": {
|
|
3939
3942
|
"valueTypes": [],
|
|
3940
3943
|
},
|
|
@@ -4119,6 +4122,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
|
|
|
4119
4122
|
"objectTypes": {},
|
|
4120
4123
|
"sharedPropertyTypes": {},
|
|
4121
4124
|
},
|
|
4125
|
+
"randomnessKey": undefined,
|
|
4122
4126
|
"valueTypes": {
|
|
4123
4127
|
"valueTypes": [],
|
|
4124
4128
|
},
|
|
@@ -5099,6 +5103,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
|
|
|
5099
5103
|
},
|
|
5100
5104
|
},
|
|
5101
5105
|
},
|
|
5106
|
+
"randomnessKey": undefined,
|
|
5102
5107
|
"valueTypes": {
|
|
5103
5108
|
"valueTypes": [],
|
|
5104
5109
|
},
|
|
@@ -5261,6 +5266,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
|
|
|
5261
5266
|
"objectTypes": {},
|
|
5262
5267
|
"sharedPropertyTypes": {},
|
|
5263
5268
|
},
|
|
5269
|
+
"randomnessKey": undefined,
|
|
5264
5270
|
"valueTypes": {
|
|
5265
5271
|
"valueTypes": [],
|
|
5266
5272
|
},
|
|
@@ -5510,6 +5516,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
|
|
|
5510
5516
|
"objectTypes": {},
|
|
5511
5517
|
"sharedPropertyTypes": {},
|
|
5512
5518
|
},
|
|
5519
|
+
"randomnessKey": undefined,
|
|
5513
5520
|
"valueTypes": {
|
|
5514
5521
|
"valueTypes": [],
|
|
5515
5522
|
},
|
|
@@ -6408,6 +6415,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
|
|
|
6408
6415
|
},
|
|
6409
6416
|
"sharedPropertyTypes": {},
|
|
6410
6417
|
},
|
|
6418
|
+
"randomnessKey": undefined,
|
|
6411
6419
|
"valueTypes": {
|
|
6412
6420
|
"valueTypes": [],
|
|
6413
6421
|
},
|
|
@@ -7808,6 +7816,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
|
|
|
7808
7816
|
},
|
|
7809
7817
|
"sharedPropertyTypes": {},
|
|
7810
7818
|
},
|
|
7819
|
+
"randomnessKey": undefined,
|
|
7811
7820
|
"valueTypes": {
|
|
7812
7821
|
"valueTypes": [],
|
|
7813
7822
|
},
|
|
@@ -8435,6 +8444,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
|
|
|
8435
8444
|
},
|
|
8436
8445
|
"sharedPropertyTypes": {},
|
|
8437
8446
|
},
|
|
8447
|
+
"randomnessKey": undefined,
|
|
8438
8448
|
"valueTypes": {
|
|
8439
8449
|
"valueTypes": [],
|
|
8440
8450
|
},
|
|
@@ -9064,6 +9074,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
|
|
|
9064
9074
|
},
|
|
9065
9075
|
"sharedPropertyTypes": {},
|
|
9066
9076
|
},
|
|
9077
|
+
"randomnessKey": undefined,
|
|
9067
9078
|
"valueTypes": {
|
|
9068
9079
|
"valueTypes": [],
|
|
9069
9080
|
},
|
|
@@ -9564,6 +9575,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
|
|
|
9564
9575
|
},
|
|
9565
9576
|
"sharedPropertyTypes": {},
|
|
9566
9577
|
},
|
|
9578
|
+
"randomnessKey": undefined,
|
|
9567
9579
|
"valueTypes": {
|
|
9568
9580
|
"valueTypes": [],
|
|
9569
9581
|
},
|
|
@@ -10051,6 +10063,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
|
|
|
10051
10063
|
},
|
|
10052
10064
|
},
|
|
10053
10065
|
},
|
|
10066
|
+
"randomnessKey": undefined,
|
|
10054
10067
|
"valueTypes": {
|
|
10055
10068
|
"valueTypes": [],
|
|
10056
10069
|
},
|
|
@@ -10611,6 +10624,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
|
|
|
10611
10624
|
},
|
|
10612
10625
|
},
|
|
10613
10626
|
},
|
|
10627
|
+
"randomnessKey": undefined,
|
|
10614
10628
|
"valueTypes": {
|
|
10615
10629
|
"valueTypes": [],
|
|
10616
10630
|
},
|
|
@@ -10995,6 +11009,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
|
|
|
10995
11009
|
},
|
|
10996
11010
|
"sharedPropertyTypes": {},
|
|
10997
11011
|
},
|
|
11012
|
+
"randomnessKey": undefined,
|
|
10998
11013
|
"valueTypes": {
|
|
10999
11014
|
"valueTypes": [],
|
|
11000
11015
|
},
|
|
@@ -11379,6 +11394,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
|
|
|
11379
11394
|
},
|
|
11380
11395
|
"sharedPropertyTypes": {},
|
|
11381
11396
|
},
|
|
11397
|
+
"randomnessKey": undefined,
|
|
11382
11398
|
"valueTypes": {
|
|
11383
11399
|
"valueTypes": [],
|
|
11384
11400
|
},
|
|
@@ -12207,6 +12223,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
|
|
|
12207
12223
|
},
|
|
12208
12224
|
"sharedPropertyTypes": {},
|
|
12209
12225
|
},
|
|
12226
|
+
"randomnessKey": undefined,
|
|
12210
12227
|
"valueTypes": {
|
|
12211
12228
|
"valueTypes": [],
|
|
12212
12229
|
},
|
|
@@ -12637,6 +12654,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
|
|
|
12637
12654
|
},
|
|
12638
12655
|
"sharedPropertyTypes": {},
|
|
12639
12656
|
},
|
|
12657
|
+
"randomnessKey": undefined,
|
|
12640
12658
|
"valueTypes": {
|
|
12641
12659
|
"valueTypes": [],
|
|
12642
12660
|
},
|
|
@@ -13112,6 +13130,7 @@ parameterOrdering:["foo","id"]});}).toThrowErrorMatchingInlineSnapshot(`[Error:
|
|
|
13112
13130
|
},
|
|
13113
13131
|
"sharedPropertyTypes": {},
|
|
13114
13132
|
},
|
|
13133
|
+
"randomnessKey": undefined,
|
|
13115
13134
|
"valueTypes": {
|
|
13116
13135
|
"valueTypes": [],
|
|
13117
13136
|
},
|
|
@@ -13229,6 +13248,7 @@ parameterOrdering:["foo","id"]});}).toThrowErrorMatchingInlineSnapshot(`[Error:
|
|
|
13229
13248
|
"objectTypes": {},
|
|
13230
13249
|
"sharedPropertyTypes": {},
|
|
13231
13250
|
},
|
|
13251
|
+
"randomnessKey": undefined,
|
|
13232
13252
|
"valueTypes": {
|
|
13233
13253
|
"valueTypes": [],
|
|
13234
13254
|
},
|
|
@@ -13347,6 +13367,7 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
|
|
|
13347
13367
|
"objectTypes": {},
|
|
13348
13368
|
"sharedPropertyTypes": {},
|
|
13349
13369
|
},
|
|
13370
|
+
"randomnessKey": undefined,
|
|
13350
13371
|
"valueTypes": {
|
|
13351
13372
|
"valueTypes": [],
|
|
13352
13373
|
},
|
|
@@ -13964,6 +13985,7 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
|
|
|
13964
13985
|
},
|
|
13965
13986
|
},
|
|
13966
13987
|
},
|
|
13988
|
+
"randomnessKey": undefined,
|
|
13967
13989
|
"valueTypes": {
|
|
13968
13990
|
"valueTypes": [],
|
|
13969
13991
|
},
|