@osdk/maker 0.13.0-beta.17 → 0.13.0-beta.18
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 +7 -0
- package/build/browser/api/defineOntology.js +1 -0
- package/build/browser/api/defineOntology.js.map +1 -1
- package/build/browser/api/overall.test.js +4 -0
- package/build/browser/api/overall.test.js.map +1 -1
- package/build/browser/cli/main.js +3 -3
- package/build/browser/cli/main.js.map +1 -1
- package/build/cjs/index.cjs +4 -3
- package/build/cjs/index.cjs.map +1 -1
- package/build/esm/api/defineOntology.js +1 -0
- package/build/esm/api/defineOntology.js.map +1 -1
- package/build/esm/api/overall.test.js +4 -0
- package/build/esm/api/overall.test.js.map +1 -1
- package/build/esm/cli/main.js +3 -3
- package/build/esm/cli/main.js.map +1 -1
- package/build/types/api/defineOntology.d.ts.map +1 -1
- package/build/types/cli/main.d.ts.map +1 -1
- package/package.json +3 -4
|
@@ -123,6 +123,7 @@ export function writeStaticObjects(outputDir) {
|
|
|
123
123
|
import { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';
|
|
124
124
|
import type { ${entityTypeName} } from '@osdk/maker';
|
|
125
125
|
|
|
126
|
+
/** @type {import('@osdk/maker').${entityTypeName}} */
|
|
126
127
|
const ${entityFileNameBase}_base: ${entityTypeName} = ${ontologyTypeEnumKey === "VALUE_TYPE" ? entityJSON.slice(1, -2) : entityJSON} as unknown as ${entityTypeName};
|
|
127
128
|
|
|
128
129
|
export const ${entityFileNameBase}: ${entityTypeName} = wrapWithProxy(${entityFileNameBase}_base);
|
|
@@ -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","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.includ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;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":[]}
|
|
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\n/** @type {import('@osdk/maker').${entityTypeName}} */\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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sB,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":[]}
|
|
@@ -13377,6 +13377,7 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
|
|
|
13377
13377
|
import { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';
|
|
13378
13378
|
import type { InterfaceType } from '@osdk/maker';
|
|
13379
13379
|
|
|
13380
|
+
/** @type {import('@osdk/maker').InterfaceType} */
|
|
13380
13381
|
const myInterface_base: InterfaceType = {
|
|
13381
13382
|
"apiName": "com.my.package.myInterface",
|
|
13382
13383
|
"displayMetadata": {
|
|
@@ -13422,6 +13423,7 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
|
|
|
13422
13423
|
import { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';
|
|
13423
13424
|
import type { ObjectType } from '@osdk/maker';
|
|
13424
13425
|
|
|
13426
|
+
/** @type {import('@osdk/maker').ObjectType} */
|
|
13425
13427
|
const myObject_base: ObjectType = {
|
|
13426
13428
|
"titlePropertyApiName": "bar",
|
|
13427
13429
|
"displayName": "My Object",
|
|
@@ -13492,6 +13494,7 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
|
|
|
13492
13494
|
import { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';
|
|
13493
13495
|
import type { SharedPropertyType } from '@osdk/maker';
|
|
13494
13496
|
|
|
13497
|
+
/** @type {import('@osdk/maker').SharedPropertyType} */
|
|
13495
13498
|
const mySpt_base: SharedPropertyType = {
|
|
13496
13499
|
"apiName": "com.my.package.mySpt",
|
|
13497
13500
|
"type": "string",
|
|
@@ -13517,6 +13520,7 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
|
|
|
13517
13520
|
import { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';
|
|
13518
13521
|
import type { InterfaceType } from '@osdk/maker';
|
|
13519
13522
|
|
|
13523
|
+
/** @type {import('@osdk/maker').InterfaceType} */
|
|
13520
13524
|
const childInterface_base: InterfaceType = {
|
|
13521
13525
|
"apiName": "com.palantir.childInterface",
|
|
13522
13526
|
"displayMetadata": {
|