@osdk/generator 1.14.0-beta.0 → 1.14.0-beta.1

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/GenerateContext/EnhancedBase.ts","../../src/GenerateContext/EnhancedAction.ts","../../src/util/deleteUndefineds.ts","../../src/GenerateContext/EnhancedInterfaceType.ts","../../src/GenerateContext/EnhancedObjectType.ts","../../src/GenerateContext/EnhancedQuery.ts","../../src/GenerateContext/EnhancedSharedPropertyType.ts","../../src/GenerateContext/ForeignType.ts","../../src/GenerateContext/EnhancedOntologyDefinition.ts","../../src/GenerateContext/enhanceOntology.ts","../../src/shared/sanitizeMetadata.ts","../../src/util/verifyOutDir.ts","../../src/shared/getEditedEntities.ts","../../src/util/test/formatTs.ts","../../src/v1.1/generateActions.ts","../../src/v1.1/backcompat/util/reexportConsts.ts","../../src/v1.1/backcompat/internal-foundry-oauth-dist/generateConfidentialClientDir.ts","../../src/v1.1/backcompat/internal-foundry-oauth-dist/generatePublicClientDir.ts","../../src/v1.1/backcompat/internal-foundry-oauth-dist/generateUserTokenDir.ts","../../src/v1.1/backcompat/util/reexportTypes.ts","../../src/v1.1/backcompat/generateOAuthDistDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/aggregations/generateAggregationsAggregations.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/aggregations/generateGroupBy.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/aggregations/generateMetrics.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateAggregationsDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateAttachmentsDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateGeoshapesDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateObjectSetDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateSharedObjectCode.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateTimeSeriesDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateBaseTypesDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateClientDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateFiltersDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/ontologyProvider/generateErrors.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/ontologyProvider/generateOntologyMetadata.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/ontologyProvider/generateResult.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateOntologyProviderDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generatePagingDir.ts","../../src/v1.1/backcompat/generateOntologyRuntimeDistDir.ts","../../src/v1.1/generateBackCompatDeprecatedExports.ts","../../src/v1.1/generateBatchActions.ts","../../src/v1.1/generateBulkActions.ts","../../src/v1.1/generateFoundryClientFile.ts","../../src/v1.1/generateIndexFile.ts","../../src/util/commaSeparatedIdentifiers.ts","../../src/util/commaSeparatedTypeIdentifiers.ts","../../src/v1.1/generateMetadataFile.ts","../../src/v1.1/generateObjectsInterfaceFile.ts","../../src/v1.1/generateObjectsInterfaceSupportFiles.ts","../../src/v1.1/generateOntologyIndexFile.ts","../../src/shared/getObjectImports.ts","../../src/shared/wireActionTypeV2ToSdkActionDefinition.ts","../../src/util/stringUnionFrom.ts","../../src/v1.1/generatePerActionDataFilesV1.ts","../../src/util/stringify.ts","../../src/v1.1/wireObjectTypeV2ToSdkObjectConstV1.ts","../../src/util/reservedKeywords.ts","../../src/v1.1/wireObjectTypeV2ToV1ObjectInterfaceString.ts","../../src/v1.1/generatePerObjectInterfaceAndDataFiles.ts","../../src/shared/getObjectTypesFromQueryDataType.ts","../../src/shared/getObjectTypeApiNamesFromQuery.ts","../../src/shared/isNullableQueryDataType.ts","../../src/shared/wireQueryDataTypeToQueryDataTypeDefinition.ts","../../src/shared/wireQueryTypeV2ToSdkQueryDefinition.ts","../../src/v1.1/generatePerQueryDataFiles.ts","../../src/v1.1/generateQueries.ts","../../src/v1.1/generateClientSdkVersionOneDotOne.ts","../../src/v2.0/generateMetadata.ts","../../src/shared/propertyJsdoc.ts","../../src/v2.0/wireObjectTypeV2ToSdkObjectConstV2.ts","../../src/v2.0/generatePerActionDataFiles.ts","../../src/v2.0/generatePerQueryDataFiles.ts","../../src/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.ts","../../src/v2.0/generateClientSdkVersionTwoPointZero.ts","../../src/generateClientSdkPackage.ts"],"names":["path","fs","path6","path7","path8","path9","path10","path12","path15","path19","path20","path21","path22","path23","path24","path28","join","path31","stringUnionFrom","value","wireObjectTypeFullMetadataToSdkObjectTypeDefinition","definition","path36","extractReferencedObjectsFromAction","extractReferencedObjectsFromActionParameter","getObjectImports","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","maybeStripNamespace","path41"],"mappings":";;;;;;;;;;AAiBO,IAAM,qBAAN,MAAyB;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9B,WAAA,CAAY,MAAQ,EAAA,WAAA,EAAa,QAAU,EAAA;AACzC,IAAA,IAAA,CAAK,OAAU,GAAA,MAAA,CAAA;AACf,IAAA,IAAA,CAAK,WAAc,GAAA,WAAA,CAAA;AACnB,IAAA,CAAC,KAAK,YAAc,EAAA,IAAA,CAAK,YAAY,CAAI,GAAA,gBAAA,CAAiB,KAAK,WAAW,CAAA,CAAA;AAC1E,IAAM,MAAA;AAAA,MACJ,oBAAA;AAAA,MACA,sBAAA;AAAA,MACA,SAAA;AAAA,KACE,GAAA,MAAA,CAAA;AACJ,IAAK,IAAA,CAAA,OAAA,GAAU,yBAAyB,IAAK,CAAA,YAAA,CAAA;AAC7C,IAAK,IAAA,CAAA,aAAA,GAAgB,IAAK,C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A;AAAA,KACT;AAAA,IACA,GAAG,2BAA4B,CAAA,UAAA,EAAY,kBAAkB,CAAA;AAAA,IAC7D,KAAO,EAAA,CAAC,SAAW,EAAA,WAAA,EAAa,sBAAsB,CAAA;AAAA,GACxD,CAAA;AACF,CAAA;AACA,eAAe,SAAA,CAAU,SAAW,EAAA,QAAA,EAAU,IAAM,EAAA;AAGlD,EAAO,OAAA,MAAM,SAAU,CAAA,SAAA,CAAU,QAAU,EAAA,IAAA,CAAK,UAAU,IAAM,EAAA,KAAA,CAAA,EAAW,CAAC,CAAA,GAAI,IAAI,CAAA,CAAA;AACtF","file":"index.js","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 * as path from \"node:path\";\nexport class AbstractImportable {\n /**\n * Either a path relative to the ourDir (e.g. \"./ontology/objects/foo.js\") or a normal\n * module import (e.g. \"@something/foo\")/\n */\n\n constructor(common, fullApiName, basePath) {\n this._common = common;\n this.fullApiName = fullApiName;\n [this.apiNamespace, this.shortApiName] = extractNamespace(this.fullApiName);\n const {\n ontologyApiNamespace,\n apiNamespacePackageMap,\n importExt\n } = common;\n this.isLocal = ontologyApiNamespace === this.apiNamespace;\n this.sourcePackage = this.apiNamespace && !this.isLocal ? apiNamespacePackageMap.get(this.apiNamespace) : undefined;\n this.importPath = this.isLocal ? `${basePath}/${this.shortApiName}${importExt}` : this.sourcePackage;\n this.uniqueImportName = this.shortApiName;\n }\n getImportPathRelTo = filePath => {\n if (this.importPath.startsWith(\".\")) {\n const result = path.relative(path.dirname(filePath), this.importPath);\n if (result.startsWith(\".\")) {\n return result;\n } else {\n return `./${result}`;\n }\n } else {\n return this.importPath;\n }\n };\n}\nexport class EnhancedBase extends AbstractImportable {\n constructor(common, og, fullApiName, basePath) {\n super(common, fullApiName, basePath);\n this.og = og;\n if (!this.isLocal && !this.sourcePackage) {\n throw new Error(`Expected { ns:'${this.apiNamespace}', shortName: '${this.shortApiName}'} to be in namespace '${common.ontologyApiNamespace}' or in a provided package mapping`);\n }\n }\n}\nexport function extractNamespace(fqApiName) {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1) return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}","/*\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 { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedAction extends EnhancedBase {\n constructor(common, og) {\n super(common, og, og.apiName, \"./ontology/actions\");\n this.og = og;\n }\n get description() {\n return this.og.description;\n }\n get parameters() {\n return this.og.parameters;\n }\n get operations() {\n return this.og.operations;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Parameters`;\n }\n get definitionIdentifier() {\n return `${this.shortApiName}.Definition`;\n }\n get definitionParamsIdentifier() {\n return `${this.shortApiName}.ParamsDefinition`;\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function deleteUndefineds(obj) {\n return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));\n}","/*\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 { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedInterfaceType extends EnhancedBase {\n constructor(common, og) {\n super(common, og, og.apiName, \"./ontology/interfaces\");\n this.og = og;\n }\n getDefinitionIdentifier(v2) {\n return v2 ? this.shortApiName : `${this.shortApiName}Def`;\n }\n getImportedDefinitionIdentifier(v2) {\n return this.getDefinitionIdentifier(v2);\n }\n get properties() {\n return this.og.properties;\n }\n getCleanedUpDefinition(v2) {\n return deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(this.og, v2));\n }\n}","/*\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 { wireObjectTypeFullMetadataToSdkObjectTypeDefinition } from \"@osdk/generator-converters\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedObjectType extends EnhancedBase {\n constructor(common, og) {\n super(common, og, og.objectType.apiName, \"./ontology/objects\");\n this.og = og;\n }\n getDefinitionIdentifier(v2) {\n return v2 ? `${this.shortApiName}` : `${this.shortApiName}Def`;\n }\n getImportedDefinitionIdentifier(v2) {\n return this.getDefinitionIdentifier(v2);\n }\n getCleanedUpDefinition(v2) {\n return deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectTypeDefinition(this.og, v2));\n }\n}","/*\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 { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedQuery extends EnhancedBase {\n constructor(common, og) {\n super(common, og, og.apiName, \"./ontology/queries\");\n this.og = og;\n }\n get description() {\n return this.og.description;\n }\n get parameters() {\n return this.og.parameters;\n }\n get output() {\n return this.og.output;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Parameters`;\n }\n get definitionIdentifier() {\n return `${this.shortApiName}.Definition`;\n }\n get definitionParamsIdentifier() {\n return `${this.definitionIdentifier}$Params`;\n }\n}","/*\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 { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedSharedPropertyType extends EnhancedBase {\n constructor(common, og) {\n super(common, og, og.apiName, \"./ontology/interfaces\");\n this.og = og;\n }\n}","/*\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 { AbstractImportable } from \"./EnhancedBase.js\";\nexport class ForeignType extends AbstractImportable {\n constructor(_common, type, apiNamespace, shortApiName) {\n super(_common, `${apiNamespace}.${shortApiName}`, _common.apiNamespacePackageMap.get(apiNamespace));\n this._common = _common;\n this.type = type;\n }\n getImportedDefinitionIdentifier(v2) {\n return `$Imported$${this.type}$${this.apiNamespace.replace(/\\./g, \"$\")}$${this.shortApiName}`;\n }\n getDefinitionIdentifier(v2) {\n if (this.type === \"objectTypes\") {\n return v2 ? this.uniqueImportName : `${this.uniqueImportName}Def`;\n } else {\n return this.uniqueImportName;\n }\n }\n}","/*\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 { EnhancedAction } from \"./EnhancedAction.js\";\nimport { extractNamespace } from \"./EnhancedBase.js\";\nimport { EnhancedInterfaceType } from \"./EnhancedInterfaceType.js\";\nimport { EnhancedObjectType } from \"./EnhancedObjectType.js\";\nimport { EnhancedQuery } from \"./EnhancedQuery.js\";\nimport { EnhancedSharedPropertyType } from \"./EnhancedSharedPropertyType.js\";\nimport { ForeignType } from \"./ForeignType.js\";\nexport class EnhancedOntologyDefinition {\n constructor(original, ontologyApiNamespace, apiNamespacePackageMap, importExt) {\n this.common = {\n apiNamespacePackageMap,\n enhancedOntology: this,\n importExt,\n ontologyApiNamespace\n };\n this.og = original;\n this.ontology = original.ontology;\n this.objectTypes = remap(original.objectTypes, this.common, EnhancedObjectType);\n this.actionTypes = remap(original.actionTypes, this.common, EnhancedAction);\n this.queryTypes = remap(original.queryTypes, this.common, EnhancedQuery);\n this.interfaceTypes = remap(original.interfaceTypes, this.common, EnhancedInterfaceType);\n this.sharedPropertyTypes = remap(original.sharedPropertyTypes, this.common, EnhancedSharedPropertyType);\n }\n #createRequireType = type => {\n return (fullApiName, localOnly) => {\n const ret = this[type][fullApiName];\n if (!ret) {\n const [apiNamespace, shortApiName] = extractNamespace(fullApiName);\n if (localOnly || !apiNamespace) {\n throw new Error(`Unable to find ${type}: No entry for '${fullApiName}`);\n }\n if (!this.common.apiNamespacePackageMap.has(apiNamespace)) {\n throw new Error(`Unable to find ${type}: Unknown namespace '${apiNamespace}'`);\n }\n return new ForeignType(this.common, type, apiNamespace, shortApiName);\n }\n return ret;\n };\n };\n requireObjectType = this.#createRequireType(\"objectTypes\");\n requireInterfaceType = this.#createRequireType(\"interfaceTypes\");\n requireActionType = this.#createRequireType(\"actionTypes\");\n requireQueryType = this.#createRequireType(\"queryTypes\");\n requireSharedPropertyType = this.#createRequireType(\"sharedPropertyTypes\");\n}\nfunction remap(r, common, Constructor) {\n return Object.fromEntries(Object.entries(r ?? {}).map(([fullApiName, v]) => {\n return [fullApiName, new Constructor(common, v)];\n }).sort((a, b) => a[0].localeCompare(b[0])));\n}","/*\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 { EnhancedOntologyDefinition } from \"./EnhancedOntologyDefinition.js\";\nexport function enhanceOntology(sanitized, ontologyApiNamespace, apiNamespacePackageMap, importExt) {\n return new EnhancedOntologyDefinition(sanitized, ontologyApiNamespace, apiNamespacePackageMap, importExt);\n}","/*\n * Copyright 2023 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\n/**\n * @internal\n */\n\n/**\n * @internal\n */\n\n/**\n * @internal\n */\nexport function sanitizeMetadata(ontology) {\n return {\n ...ontology,\n actionTypes: Object.fromEntries(Object.values(ontology.actionTypes).map(actionType => {\n return [camelize(actionType.apiName), {\n ...actionType,\n apiName: camelize(actionType.apiName)\n }];\n }))\n };\n}\nfunction camelize(name) {\n return name.replace(/-./g, segment => segment[1].toUpperCase());\n}","/*\n * Copyright 2023 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\n/**\n * Verify that the target outDir does not yet exist OR is empty.\n *\n * Re-generating an ontology on top of itself is not supported and may leave old\n * files around or refuse to update files with new contents in some cases.\n */\nexport async function verifyOutDir(outDir, fs) {\n // if outDir exists and is not empty, we cannot proceed with the generation\n try {\n const contents = await fs.readdir(outDir);\n if (contents.length !== 0) {\n throw new Error(`outDir ${outDir} is not empty, please delete its contents and try again`);\n }\n } catch (e) {\n if (e.code === \"ENOENT\") {\n // acceptable, we'll create the directory ourselves\n } else {\n throw e;\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getModifiedEntityTypes(action) {\n const addedObjects = new Set();\n const modifiedObjects = new Set();\n for (const operation of action.operations) {\n switch (operation.type) {\n case \"createObject\":\n addedObjects.add(operation.objectTypeApiName);\n break;\n case \"modifyObject\":\n modifiedObjects.add(operation.objectTypeApiName);\n break;\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n break;\n default:\n const _ = operation;\n }\n }\n return {\n addedObjects,\n modifiedObjects\n };\n}","/*\n * Copyright 2023 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 { format } from \"prettier\";\n// @ts-ignore the plugin doesn't have types but we need to import the actual plugin\n// so we can bundle it rather than trying to resolve it at runtime\nimport organizeImports from \"prettier-plugin-organize-imports\";\nexport function formatTs(contents) {\n try {\n return format(contents, {\n parser: \"typescript\",\n singleQuote: true,\n trailingComma: \"all\",\n plugins: [organizeImports],\n tabWidth: 2,\n printWidth: 120\n });\n } catch (e) {\n console.error(\"Failed to format file\", e);\n console.log(contents);\n return contents;\n }\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getModifiedEntityTypes } from \"../shared/getEditedEntities.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateActions(ontology, fs, outDir, importExt = \"\") {\n const importedObjects = new Set();\n let actionSignatures = [];\n for (const action of Object.values(ontology.actionTypes)) {\n const entries = Object.entries(action.parameters);\n const modifiedEntityTypes = getModifiedEntityTypes(action);\n const addedObjects = Array.from(modifiedEntityTypes.addedObjects);\n const modifiedObjects = Array.from(modifiedEntityTypes.modifiedObjects);\n addedObjects.forEach(importedObjects.add, importedObjects);\n modifiedObjects.forEach(importedObjects.add, importedObjects);\n let jsDocBlock = [\"/**\"];\n if (action.description) {\n jsDocBlock.push(`* ${action.description}`);\n }\n let parameterBlock = \"\";\n if (entries.length > 0) {\n parameterBlock = `params: { \\n`;\n for (const [parameterName, parameterData] of entries) {\n parameterBlock += `\"${parameterName}\"`;\n parameterBlock += parameterData.required ? \": \" : \"?: \";\n const typeScriptType = getTypeScriptTypeFromDataType(parameterData.dataType, importedObjects);\n parameterBlock += `${typeScriptType};\\n`;\n jsDocBlock.push(`* @param {${typeScriptType}} params.${parameterName}`);\n }\n parameterBlock += \"}, \";\n }\n jsDocBlock.push(`*/`);\n actionSignatures.push(`\n ${jsDocBlock.join(\"\\n\")}\n ${action.apiName}<O extends ActionExecutionOptions>(${parameterBlock}options?: O): \n Promise<Result<ActionResponseFromOptions<O, Edits<${addedObjects.length > 0 ? addedObjects.join(\" | \") : \"void\"}, ${modifiedObjects.length > 0 ? modifiedObjects.join(\" | \") : \"void\"}>>, ActionError>>;`);\n }\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"Actions.ts\"), await formatTs(`\n import type { ObjectSet, LocalDate, Timestamp, Attachment, Edits, ActionExecutionOptions, ActionError, Result, ActionResponseFromOptions } from \"@osdk/legacy-client\";\n ${Array.from(importedObjects).map(importedObject => `import type { ${importedObject} } from \"../objects/${importedObject}${importExt}\";`).join(\"\\n\")}\n export interface Actions {\n ${actionSignatures.join(\"\\n\")}\n }\n `));\n}\nexport function getTypeScriptTypeFromDataType(actionParameter, importedObjects) {\n switch (actionParameter.type) {\n case \"objectSet\":\n {\n const objectType = actionParameter.objectTypeApiName;\n importedObjects.add(objectType);\n return `ObjectSet<${objectType}>`;\n }\n case \"object\":\n {\n const objectType = actionParameter.objectTypeApiName;\n importedObjects.add(objectType);\n return `${objectType} | ${objectType}[\"__primaryKey\"]`;\n }\n case \"array\":\n return `Array<${getTypeScriptTypeFromDataType(actionParameter.subType, importedObjects)}>`;\n case \"string\":\n return `string`;\n case \"boolean\":\n return `boolean`;\n case \"attachment\":\n return `Attachment`;\n case \"date\":\n return `LocalDate`;\n case \"double\":\n case \"integer\":\n case \"long\":\n return `number`;\n case \"timestamp\":\n return `Timestamp`;\n case \"marking\":\n return \"string\";\n default:\n const _ = actionParameter;\n throw new Error(`Unsupported action parameter type: ${actionParameter}`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function reexportConsts(typesToExport) {\n return `\n import { ${typesToExport.map(q => `${q} as OG_${q}`).join(\", \")}} from \"@osdk/legacy-client\";\n \n ${typesToExport.map(q => `\n /** @deprecated submodule imports aren't public api **/\n export const ${q} = OG_${q};\n `).join(\"\\n\\n\")}\n `;\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nexport async function generateConfidentialClientDir(fs, oauthDistDir, importExt = \"\") {\n const confidentialClientDistDir = path.join(oauthDistDir, \"ConfidentialClient\");\n await fs.mkdir(confidentialClientDistDir, {\n recursive: true\n });\n await fs.writeFile(path.join(confidentialClientDistDir, \"index.ts\"), await formatTs(`\n export * from \"./ConfidentialClientAuth${importExt}\";\n `));\n await fs.writeFile(path.join(confidentialClientDistDir, \"ConfidentialClientAuth.ts\"), await formatTs(`\n ${reexportConsts([\"ConfidentialClientAuth\"])}\n `));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nexport async function generatePublicClientDir(fs, oauthDistDir, importExt = \"\") {\n const publicClientDistDir = path.join(oauthDistDir, \"PublicClient\");\n await fs.mkdir(publicClientDistDir, {\n recursive: true\n });\n await fs.writeFile(path.join(publicClientDistDir, \"index.ts\"), await formatTs(`\n export * from \"./PublicClientAuth${importExt}\";\n `));\n await fs.writeFile(path.join(publicClientDistDir, \"PublicClientAuth.ts\"), await formatTs(`\n ${reexportConsts([\"PublicClientAuth\"])}\n `));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nexport async function generateUserTokenDir(fs, oauthDistDir, importExt = \"\") {\n const userTokenDistDir = path.join(oauthDistDir, \"UserToken\");\n await fs.mkdir(userTokenDistDir, {\n recursive: true\n });\n await fs.writeFile(path.join(userTokenDistDir, \"index.ts\"), await formatTs(`\n export * from \"./UserTokenAuth${importExt}\";\n `));\n await fs.writeFile(path.join(userTokenDistDir, \"UserTokenAuth.ts\"), await formatTs(`\n ${reexportConsts([\"UserTokenAuth\"])}\n `));\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function reexportTypes(typesToExport, genericArgsLeft = \"\", genericArgsRight = cleanup(genericArgsLeft)) {\n return `\n import type { ${typesToExport.map(q => `${q} as OG_${q}`).join(\", \")}} from \"@osdk/legacy-client\";\n \n ${typesToExport.map(q => `\n /** @deprecated submodule imports aren't public api **/\n export type ${q}${genericArgsLeft} = OG_${q}${genericArgsRight};\n `).join(\"\\n\\n\")}\n `;\n}\nconst captureInBracketsRegex = /<(.*?)>/;\nconst captureGenericParamNameRegex = /^\\s?(.+?)( extends .*?)?( = .*?)?\\s?$/;\nfunction cleanup(s) {\n if (s.length === 0) return \"\";\n const genericParameterNames = captureInBracketsRegex.exec(s)?.[1]?.split(\",\")?.map(a => {\n return captureGenericParamNameRegex.exec(a)?.[1] ?? a;\n });\n return `<${genericParameterNames?.join(\",\")}>`;\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../util/test/formatTs.js\";\nimport { generateConfidentialClientDir } from \"./internal-foundry-oauth-dist/generateConfidentialClientDir.js\";\nimport { generatePublicClientDir } from \"./internal-foundry-oauth-dist/generatePublicClientDir.js\";\nimport { generateUserTokenDir } from \"./internal-foundry-oauth-dist/generateUserTokenDir.js\";\nimport { reexportConsts } from \"./util/reexportConsts.js\";\nimport { reexportTypes } from \"./util/reexportTypes.js\";\nexport async function generateOAuthClientDistDir(outDir, fs, importExt = \"\") {\n const oauthDistDir = path.join(outDir, \"internal\", \"@foundry\", \"oauth-client\", \"dist\");\n await fs.mkdir(oauthDistDir, {\n recursive: true\n });\n await fs.writeFile(path.join(oauthDistDir, \"index.ts\"), await formatTs(`\n export * from \"./Auth${importExt}\";\n export * from \"./ConfidentialClient/index${importExt}\";\n export * from \"./OAuthClient${importExt}\";\n export * from \"./PublicClient/index${importExt}\";\n export * from \"./Token${importExt}\";\n export * from \"./UserToken/index${importExt}\";\n`));\n await fs.writeFile(path.join(oauthDistDir, \"Auth.ts\"), await formatTs(reexportTypes([\"Auth\"])));\n await fs.writeFile(path.join(oauthDistDir, \"Token.ts\"), await formatTs(reexportTypes([\"Token\", \"TokenValue\"])));\n await fs.writeFile(path.join(oauthDistDir, \"OAuthClient.ts\"), await formatTs(reexportTypes([\"AuthSubscription\", \"UnsubscribeFunction\", \"SignInResponse\", \"RefreshResponse\", \"SignOutResponse\"])));\n await fs.writeFile(path.join(oauthDistDir, \"OAuthToken.ts\"), await formatTs(reexportConsts([\"OAuthToken\"])));\n await fs.writeFile(path.join(oauthDistDir, \"Auth.ts\"), await formatTs(reexportTypes([\"Auth\"])));\n await generateConfidentialClientDir(fs, oauthDistDir, importExt);\n await generatePublicClientDir(fs, oauthDistDir, importExt);\n await generateUserTokenDir(fs, oauthDistDir, importExt);\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../../util/reexportConsts.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateAggregationsAggregations(fs, aggregationsDir) {\n await fs.writeFile(path.join(aggregationsDir, \"Aggregations.ts\"), await formatTs(`\n import { LocalDate, Timestamp } from \"@osdk/legacy-client\";\n ` + reexportTypes([\"Double\", \"Rangeable\", \"MetricValue\", \"Date\", \"BucketKey\", \"BucketValue\", \"TimeUnit\", \"BucketGroup\", \"Metrics\", \"AggregatableProperties\", \"AggregationClause\"]) + reexportTypes([\"Range\"], \"<T extends Rangeable>\", \"<T>\") + reexportTypes([\"BaseGroupBy\"], \"<_T extends BucketValue = BucketValue>\") + reexportTypes([\"Duration\"], \"<_T extends Timestamp | LocalDate = Timestamp | LocalDate>\") + reexportTypes([\"AggregatableProperty\", \"MultipleAggregationsOperations\"], \"<_T extends MetricValue = MetricValue>\") + reexportTypes([\"AggregationGroup\"], \"<TMetrics extends Metrics | MetricValue, TBucketGroup extends BucketGroup>\") + reexportTypes([\"Bucketing\"], \"<_T extends string , _X extends BucketValue>\") + reexportTypes([\"AggregationResult\"], \"<TBucketGroup extends BucketGroup, TMetrics extends Metrics | MetricValue>\") + reexportTypes([\"BaseBucketing\"], \"<TBucketKey extends BucketKey, TBucketValue extends BucketValue, Kind extends string>\") + reexportTypes([\"ExactValueBucketing\", \"InternalBucketing\"], `<TBucketKey extends BucketKey, TBucketValue extends BucketValue>`) + reexportTypes([\"RangeBucketing\", \"FixedWidthBucketing\"], `<TBucketKey extends BucketKey, TBucketValue extends Range<Rangeable>>`) + reexportTypes([\"DurationBucketing\"], `<TBucketKey extends BucketKey, TBucketValue extends Date>`) + reexportTypes([\"InternalBucketingVisitor\"], \"<TBucketKey extends BucketKey, T extends BucketValue, R>\") + reexportTypes([\"AggregationBuilderResult\"], \"<T, TMultipleAggregationProperties>\") + reexportTypes([\"AggregatablePropertiesForResult\", \"AggregatablePropertyNamesForResult\"], \"<TAggregatableProperties, TResult extends MetricValue>\") + reexportConsts([\"assertBucketingInternal\", \"visitInternalBucketing\"]) + reexportTypes([\"AggregatableObjectSetStep\"], \"<TAggregatableProperties, TMultipleAggregationProperties, TBucketableProperties, TBucketGroup extends BucketGroup = {}>\") + reexportTypes([\"GroupedTerminalAggregationOperations\"], \"<TAggregatableProperties, TMultipleAggregationProperties, TBucketGroup extends BucketGroup = {}>\")));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../../util/reexportConsts.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateGroupBy(fs, aggregationsDir, importExt = \"\") {\n await fs.mkdir(path.join(aggregationsDir, \"groupBy\"), {\n recursive: true\n });\n const groupBys = [\"BooleanGroupBy\", \"LocalDateGroupBy\", \"NumericGroupBy\", \"StringGroupBy\", \"TimestampGroupBy\"];\n const reexportFiles = [...groupBys, \"GroupKeyType\"];\n for (const key of reexportFiles) {\n await fs.writeFile(path.join(aggregationsDir, \"groupBy\", `${key}.ts`), await formatTs(`export {${key}} from \"./index${importExt}\";`));\n }\n await fs.writeFile(path.join(aggregationsDir, \"groupBy\", \"index.ts\"), await formatTs(`import { Bucketing, BucketKey, Duration, Range, Rangeable } from \"../Aggregations${importExt}\";` + reexportConsts(groupBys) + reexportTypes(groupBys, \"<T extends BucketKey>\") + `export {GroupKeyType} from \"@osdk/legacy-client\";\n `));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../../util/reexportConsts.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateMetrics(fs, aggregationsDir, importExt = \"\") {\n const metricsDir = path.join(aggregationsDir, \"metrics\");\n await fs.mkdir(metricsDir, {\n recursive: true\n });\n await fs.writeFile(path.join(metricsDir, \"metrics.ts\"), await formatTs(`export {MetricValueType} from \"@osdk/legacy-client\";`));\n await fs.writeFile(path.join(metricsDir, \"ApproximateDistinctCountAggregatableProperty.ts\"), await formatTs(reexportConsts([\"ApproximateDistinctCountAggregatableProperty\"]) + reexportTypes([\"ApproximateDistinctCountAggregatableProperty\"])));\n await fs.writeFile(path.join(metricsDir, \"MultipleAggregatableProperty.ts\"), await formatTs(`\n import { Double, MetricValue, MultipleAggregationsOperations } from \"../Aggregations${importExt}\";\n import { MetricValueType } from \"./metrics/index${importExt}\";\n ` + reexportConsts([\"MultipleAggregatableProperty\"]) + reexportTypes([\"MultipleAggregatableProperty\"], \"<TResult extends MetricValue = Double>\")));\n for (const typeName of [\"DefaultAggregatableProperty\", \"LocalDatePropertyMetric\", \"NumericPropertyMetric\", \"TimestampPropertyMetric\"]) {\n await fs.writeFile(path.join(metricsDir, `${typeName}.ts`), await formatTs(`\n import { MultipleAggregatableProperty } from \"./MultipleAggregatableProperty${importExt}\";\n ` + reexportConsts([typeName])));\n }\n await fs.writeFile(path.join(metricsDir, \"index.ts\"), await formatTs(`\n export * from \"./ApproximateDistinctCountAggregatableProperty${importExt}\";\n export * from \"./DefaultAggregatableProperty${importExt}\";\n export * from \"./LocalDatePropertyMetric${importExt}\";\n export * from \"./metrics${importExt}\";\n export * from \"./MultipleAggregatableProperty${importExt}\";\n export * from \"./NumericPropertyMetric${importExt}\";\n export * from \"./TimestampPropertyMetric${importExt}\";\n `));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nimport { reexportTypes } from \"../util/reexportTypes.js\";\nimport { generateAggregationsAggregations } from \"./aggregations/generateAggregationsAggregations.js\";\nimport { generateGroupBy } from \"./aggregations/generateGroupBy.js\";\nimport { generateMetrics } from \"./aggregations/generateMetrics.js\";\nexport async function generateAggregationsDir(fs, runtimeDistDir, importExt = \"\") {\n const aggregationsDir = path.join(runtimeDistDir, \"aggregations\");\n await fs.mkdir(aggregationsDir, {\n recursive: true\n });\n await generateGroupBy(fs, aggregationsDir, importExt);\n await generateAggregationsAggregations(fs, aggregationsDir);\n await generateMetrics(fs, aggregationsDir, importExt);\n await fs.writeFile(path.join(aggregationsDir, \"index.ts\"), await formatTs(`\n ${\"\" // Skipping this one, its hard to imagine it being used\n // export * from \"./AggregatableObjectSet${importExt}\";\n }\n ${\"\" // Skipping this one, its hard to imagine it being used\n // export * from \"./aggregationConverters${importExt}\";\n }\n \n export * from \"./Aggregations${importExt}\";\n export * from \"./ComputeStep${importExt}\";\n export * from \"./CountOperation${importExt}\";\n export * from \"./groupBy/index${importExt}\";\n export * from \"./internalAggregationRequest${importExt}\";\n export * from \"./metrics/index${importExt}\";\n `));\n await fs.writeFile(path.join(aggregationsDir, \"ComputeStep.ts\"), await formatTs(`\n import { ObjectSetDefinition } from \"../baseTypes/index${importExt}\";\n import { FoundryClientOptions } from \"../client/${importExt}\";\n import { AggregateObjectsError, OntologyMetadata, Result } from \"../ontologyProvider/index${importExt}\";\n import { AggregationClause, AggregationResult, BucketGroup, BucketValue, InternalBucketing, Metrics, MetricValue } from \"./Aggregations${importExt}\";\n ` + reexportConsts([\"ComputeStep\"]) + reexportTypes([\"ComputeStep\"], \"<TBucketGroup extends BucketGroup, TMetrics extends Metrics | MetricValue> \") + reexportTypes([\"AggregationComputeStep\"], \"<TBucketGroup extends BucketGroup, TMetrics extends Metrics | MetricValue>\") + `\n \n `));\n await fs.writeFile(path.join(aggregationsDir, \"CountOperation.ts\"), await formatTs(`` + reexportConsts([\"CountOperation\", \"isCountOperation\"]) + reexportTypes([\"CountOperation\"])));\n await fs.writeFile(path.join(aggregationsDir, \"internalAggregationRequest.ts\"), await formatTs(reexportTypes([\"InternalAggregationRequest\"])));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateAttachmentsDir(attachmentsDir, fs, importExt = \"\") {\n await fs.mkdir(attachmentsDir, {\n recursive: true\n });\n await fs.writeFile(path.join(attachmentsDir, \"index.ts\"), await formatTs(`export * from \"./Attachment${importExt}\";\n export * from \"./Attachments${importExt}\";\n `));\n await fs.writeFile(path.join(attachmentsDir, \"Attachment.ts\"), await formatTs(reexportTypes([\"Attachment\", \"AttachmentMetadata\"])));\n await fs.writeFile(path.join(attachmentsDir, \"Attachments.ts\"), await formatTs(reexportTypes([\"Attachments\"])));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../../util/reexportConsts.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateGeoshapesDir(runtimeDistDir, fs, importExt = \"\") {\n await fs.mkdir(runtimeDistDir, {\n recursive: true\n });\n await fs.writeFile(path.join(runtimeDistDir, \"index.ts\"), await formatTs(`export * from \"./Distance${importExt}\";\n export * from \"./GeoJson${importExt}\";\n export * from \"./GeometryCollection${importExt}\";\n export * from \"./GeoPoint${importExt}\";\n export * from \"./GeoShape${importExt}\";\n export * from \"./LineString${importExt}\";\n export * from \"./MultiGeoPoint${importExt}\";\n export * from \"./MultiLineString${importExt}\";\n export * from \"./MultiPolygon${importExt}\";\n export * from \"./Polygon${importExt}\";`));\n await fs.writeFile(path.join(runtimeDistDir, \"Distance.ts\"), await formatTs(`` + reexportConsts([\"Distance\", \"DistanceUnit\"]) + reexportTypes([\"Distance\", \"DistanceUnit\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"GeoJson.ts\"), await formatTs(reexportTypes([\"GeoJsonPoint\", \"GeoJsonPolygon\", \"GeoJsonLineString\", \"GeoJsonMultiPoint\", \"GeoJsonMultiPolygon\", \"GeoJsonMultiLineString\", \"GeoJsonGeometryCollection\", \"GeoJsonGeometry\", \"GeoJson\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"GeometryCollection.ts\"), await formatTs(reexportConsts([\"GeometryCollection\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"GeoPoint.ts\"), await formatTs(`` + reexportConsts([\"isGeoPoint\", \"GeoPoint\", \"mapCoordinatesToGeoPoint\"]) + reexportTypes([\"GeoHash\", \"Coordinates\", \"GeoPoint\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"GeoShape.ts\"), await formatTs(reexportConsts([\"GeoShape\"]) + reexportTypes([\"GeoShape\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"LineString.ts\"), await formatTs(reexportConsts([\"LineString\"]) + reexportTypes([\"LineString\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"MultiGeoPoint.ts\"), await formatTs(reexportConsts([\"MultiGeoPoint\"]) + reexportTypes([\"MultiGeoPoint\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"MultiLineString.ts\"), await formatTs(reexportConsts([\"MultiLineString\"]) + reexportTypes([\"MultiLineString\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"MultiPolygon.ts\"), await formatTs(reexportConsts([\"MultiPolygon\"]) + reexportTypes([\"MultiPolygon\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"Polygon.ts\"), await formatTs(reexportConsts([\"Polygon\"]) + reexportTypes([\"LinearRing\", \"Polygon\"])));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateObjectSetDir(objectSetDir, fs, importExt = \"\") {\n await fs.mkdir(objectSetDir, {\n recursive: true\n });\n await fs.writeFile(path.join(objectSetDir, \"index.ts\"), await formatTs(`\n export * from \"./ObjectSetDefinition${importExt}\";\n export * from \"./OntologyObjectSet${importExt}\";\n `));\n await fs.writeFile(path.join(objectSetDir, \"ObjectSetDefinition.ts\"), await formatTs(reexportTypes([\"BaseObjectSetDefinition\", \"ReferenceObjectSetDefinition\", \"StaticObjectSetDefinition\", \"IntersectObjectSetDefinition\", \"SubtractObjectSetDefinition\", \"SearchAroundObjectSetDefinition\", \"FilterObjectSetDefinition\", \"ObjectSetDefinition\"])));\n await fs.writeFile(path.join(objectSetDir, \"OntologyObjectSet.ts\"), await formatTs(reexportTypes([\"OntologyObjectSet\"])));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateSharedObjectCodeDir(sharedObjectCodeDir, fs, importExt = \"\") {\n await fs.mkdir(sharedObjectCodeDir, {\n recursive: true\n });\n await fs.writeFile(path.join(sharedObjectCodeDir, \"index.ts\"), await formatTs(`\n export * from \"./FilteredPropertiesTerminalOperations${importExt}\";\n `));\n await fs.writeFile(path.join(sharedObjectCodeDir, \"FilteredPropertiesTerminalOperations.ts\"), await formatTs(`import { OntologyObject } from \"../OntologyObject${importExt}` + reexportTypes([\"FilteredPropertiesTerminalOperations\", \"FilteredPropertiesTerminalOperationsWithGet\"], \"<T extends OntologyObject, V extends Array<keyof T>>\")));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateTimeSeriesDir(timeseriesDir, fs, importExt = \"\") {\n await fs.mkdir(timeseriesDir, {\n recursive: true\n });\n await fs.writeFile(path.join(timeseriesDir, \"index.ts\"), await formatTs(`\n export * from \"./TimeSeries${importExt}\";\n export * from \"./TimeSeriesDuration${importExt}\";\n export * from \"./TimeSeriesPoint${importExt}\";\n ${\"\" // Internal type\n // export * from \"./TimeSeriesProperty${importExt}\";\n }\n export * from \"./TimeSeriesQuery${importExt}\";\n export * from \"./TimeSeriesTerminalOperations${importExt}\";\n `));\n await fs.writeFile(path.join(timeseriesDir, \"TimeSeries.ts\"), await formatTs(reexportTypes([\"TimeSeries\"], `<T extends number | string>`)));\n await fs.writeFile(path.join(timeseriesDir, \"TimeSeriesDuration.ts\"), await formatTs(reexportTypes([`WhenUnit`, `DurationUnit`, `TimeSeriesDuration`])));\n await fs.writeFile(path.join(timeseriesDir, \"TimeSeriesPoint.ts\"), await formatTs(reexportTypes([\"TimeSeriesPoint\"], `<T extends number | string>`)));\n await fs.writeFile(path.join(timeseriesDir, \"TimeSeriesQuery.ts\"), await formatTs(reexportTypes([\"TimeSeriesQuery\"], `<T extends number | string>`)));\n await fs.writeFile(path.join(timeseriesDir, \"TimeSeriesTerminalOperations.ts\"), await formatTs(reexportTypes([\"TimeSeriesTerminalOperations\", \"TimeSeriesIterator\"], `<T extends number | string>`)));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nimport { reexportTypes } from \"../util/reexportTypes.js\";\nimport { generateAttachmentsDir } from \"./baseTypes/generateAttachmentsDir.js\";\nimport { generateGeoshapesDir } from \"./baseTypes/generateGeoshapesDir.js\";\nimport { generateObjectSetDir } from \"./baseTypes/generateObjectSetDir.js\";\nimport { generateSharedObjectCodeDir } from \"./baseTypes/generateSharedObjectCode.js\";\nimport { generateTimeSeriesDir } from \"./baseTypes/generateTimeSeriesDir.js\";\nexport async function generateBaseTypesDir(runtimeDistDir, fs, importExt = \"\") {\n const baseTypesDir = path.join(runtimeDistDir, \"baseTypes\");\n await fs.mkdir(baseTypesDir, {\n recursive: true\n });\n await fs.writeFile(path.join(baseTypesDir, \"index.ts\"), await formatTs(`export * from \"./ActionType${importExt}\";\n export * from \"./attachments/index${importExt}\";\n export * from \"./geoshapes/index${importExt}\";\n export * from \"./links${importExt}\";\n export * from \"./localDate${importExt}\";\n export * from \"./objectset/index${importExt}\";\n export * from \"./ObjectType${importExt}\";\n export * from \"./OntologyObject${importExt}\";\n export * from \"./Queries${importExt}\";\n export * from \"./timeseries/index${importExt}\";\n export * from \"./timestamp${importExt}\";`));\n const geoshapesDir = path.join(baseTypesDir, \"geoshapes\");\n await generateGeoshapesDir(geoshapesDir, fs, importExt);\n const timeseriesDir = path.join(baseTypesDir, \"timeseries\");\n await generateTimeSeriesDir(timeseriesDir, fs, importExt);\n const attachmentsDir = path.join(baseTypesDir, \"attachments\");\n await generateAttachmentsDir(attachmentsDir, fs, importExt);\n const objectSetDir = path.join(baseTypesDir, \"objectset\");\n await generateObjectSetDir(objectSetDir, fs, importExt);\n const sharedObjectCodeDir = path.join(baseTypesDir, \"sharedObjectCode\");\n await generateSharedObjectCodeDir(sharedObjectCodeDir, fs, importExt);\n await fs.writeFile(path.join(baseTypesDir, \"ActionType.ts\"), await formatTs(`import { OntologyObject } from \"./OntologyObject${importExt}\";\n ` + reexportConsts([\"ActionExecutionMode\", \"ReturnEditsMode\", \"ActionValidationResult\"]) + reexportTypes([\"ActionExecutionOptions\", \"ValidationResponse\", \"BulkEdits\"]) + reexportTypes([\"CreatedObjectEdits\", \"ModifiedObjectEdits\"], \"<T extends OntologyObject>\") + reexportTypes([\"Edits\"], \"<TAddedObjects extends OntologyObject | void, TModifiedObjects extends OntologyObject | void>\") + reexportTypes([\"ActionResponse\"], \"<TEdits extends Edits<any, any> | undefined = undefined>\", \"<TEdits>\") + reexportTypes([\"ActionResponseFromOptions\"], \"<TOptions extends ActionExecutionOptions | undefined = undefined, TEdits extends Edits<any, any> | undefined = undefined>\", \"<TOptions, TEdits>\")));\n await fs.writeFile(path.join(baseTypesDir, \"OntologyObject.ts\"), await formatTs(reexportTypes([\"OntologyObject\"]) + reexportConsts([\"isOntologyObject\"])));\n await fs.writeFile(path.join(baseTypesDir, \"links.ts\"), await formatTs(`import { OntologyObject } from \"./OntologyObject${importExt}` + reexportTypes([\"SingleLink\", \"MultiLink\"], \"<T extends OntologyObject = OntologyObject>\")));\n await fs.writeFile(path.join(baseTypesDir, \"localDate.ts\"), await formatTs(reexportConsts([\"LocalDate\"]) + reexportTypes([\"LocalDate\"])));\n await fs.writeFile(path.join(baseTypesDir, \"timestamp.ts\"), await formatTs(reexportConsts([\"Timestamp\"]) + reexportTypes([\"Timestamp\"])));\n await fs.writeFile(path.join(baseTypesDir, \"Queries.ts\"), await formatTs(`import { BucketValue, Range, Rangeable } from \"../aggregations/index${importExt}\";\n ` + reexportTypes([\"QueryResponse\"], \"<T>\") + reexportTypes([\"BaseBucket\"], \"<K, V>\") + reexportTypes([\"NestedBucket\"], \"<TGroupKey, TSegmentKey, TValue extends BucketValue>\") + reexportTypes([\"TwoDimensionalAggregation\"], \"<TGroupKey extends QueryBucketKey, TValue extends BucketValue = number>\") + reexportTypes([\"ThreeDimensionalAggregation\"], \"<TGroupKey extends QueryBucketKey, TSegmentKey extends QueryBucketKey, TValue extends BucketValue = number>\") + reexportTypes([\"QueryBucketKey\"])));\n await fs.writeFile(path.join(baseTypesDir, \"ObjectType.ts\"), await formatTs(`import { OntologyObject } from \"./OntologyObject${importExt}\";` + reexportTypes([\"BaseType\", \"StringType\", \"IntegerType\", \"DateType\", \"BooleanType\", \"ByteType\", \"DecimalType\", \"FloatType\", \"TimestampType\", \"ShortType\", \"LongType\", \"DoubleType\", \"GeoPointType\", \"GeoShapeType\", \"AttachmentType\", \"ObjectType\", \"StructField\", \"QueryBucketRangeableType\", \"QueryBucketKeyType\", \"QueryBucketValueType\", \"AllValueTypes\", \"OntologyType\", \"ObjectTypeProperties\", \"StructType\"]) + reexportTypes([\"TimeSeriesType\", \"ArrayType\", \"SetType\"], \"<T extends BaseType>\") + reexportTypes([\"Property\"], \"<TType extends OntologyType = OntologyType>\") + reexportTypes([\"BaseObjectType\"], \"<TOntologyObject extends OntologyObject = OntologyObject>\") + reexportTypes([\"ObjectSetType\"], \"<T extends ObjectType>\") + reexportTypes([\"RangeType\"], \"<T extends QueryBucketRangeableType>\") + reexportTypes([\"TwoDimensionalAggregationType\"], \"<TGroupKey extends QueryBucketKeyType, TValue extends QueryBucketValueType>\") + reexportTypes([\"ThreeDimensionalAggregationType\"], \"<TGroupKey extends QueryBucketKeyType, TSegmentKey extends QueryBucketKeyType, TValue extends QueryBucketValueType>\")));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../util/reexportTypes.js\";\nexport async function generateClientDir(runtimeDistDir, fs, importExt = \"\") {\n const pagingDir = path.join(runtimeDistDir, \"client\");\n await fs.mkdir(pagingDir, {\n recursive: true\n });\n await fs.writeFile(path.join(pagingDir, \"index.ts\"), await formatTs(`export * from \"./clientOptions${importExt}\";`));\n await fs.writeFile(path.join(pagingDir, \"clientOptions.ts\"), await formatTs(`import {Auth} from \"@osdk/legacy-client\";` + reexportTypes([\"FoundryClientOptions\"], \"<TAuth extends Auth = Auth>\")));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nimport { reexportTypes } from \"../util/reexportTypes.js\";\nexport async function generateFiltersDir(runtimeDistDir, fs, importExt = \"\") {\n const pagingDir = path.join(runtimeDistDir, \"filters\");\n await fs.mkdir(pagingDir, {\n recursive: true\n });\n await fs.writeFile(path.join(pagingDir, \"index.ts\"), await formatTs(`export * from \"./ArrayFilter${importExt}\";\n export * from \"./AttachmentFilter${importExt}\";\n export * from \"./BooleanFilter${importExt}\";\n export * from \"./DateTimeFilters${importExt}\";\n export * from \"./Filters${importExt}\";\n export * from \"./GeoPointFilter${importExt}\";\n export * from \"./GeoShapeFilter${importExt}\";\n export * from \"./NumericFilter${importExt}\";\n export * from \"./Op${importExt}\";\n export * from \"./OrderByOption${importExt}\";\n export * from \"./StringFilter${importExt}\";`));\n await fs.writeFile(path.join(pagingDir, \"ArrayFilter.ts\"), await formatTs(`import { Attachment, GeoPoint, GeoShape, LocalDate, Timestamp } from \"../baseTypes/index${importExt}\";` + reexportConsts([\"ArrayFilter\"]) + reexportTypes([\"ArrayFilter\"], \"<T extends string | number | Timestamp | LocalDate | boolean | GeoShape | GeoPoint | Attachment>\")));\n await fs.writeFile(path.join(pagingDir, \"AttachmentFilter.ts\"), await formatTs(reexportConsts([\"AttachmentFilter\"]) + reexportTypes([\"AttachmentFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"BooleanFilter.ts\"), await formatTs(reexportConsts([\"BooleanFilter\"]) + reexportTypes([\"BooleanFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"GeoPointFilter.ts\"), await formatTs(reexportConsts([\"GeoPointFilter\"]) + reexportTypes([\"GeoPointFilter\", \"BoundingBox\"])));\n await fs.writeFile(path.join(pagingDir, \"DateTimeFilters.ts\"), await formatTs(reexportConsts([\"TimestampFilter\", \"LocalDateFilter\"]) + reexportTypes([\"TimestampFilter\", \"LocalDateFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"GeoShapeFilter.ts\"), await formatTs(reexportConsts([\"GeoShapeFilter\"]) + reexportTypes([\"GeoShapeFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"NumericFilter.ts\"), await formatTs(reexportConsts([\"NumericFilter\"]) + reexportTypes([\"NumericFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"Op.ts\"), await formatTs(reexportConsts([\"Op\"])));\n await fs.writeFile(path.join(pagingDir, \"OrderByOption.ts\"), await formatTs(reexportConsts([\"OrderByOption\"]) + reexportTypes([\"OrderByOption\"])));\n await fs.writeFile(path.join(pagingDir, \"StringFilter.ts\"), await formatTs(reexportConsts([\"StringFilter\"]) + reexportTypes([\"StringFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"Filters.ts\"), await formatTs(`import { OntologyObject } from \"@osdk/legacy-client\";` + reexportTypes([\"ObjectTypeFilterFunction\", \"ObjectTypeOrderByFunction\"], \"<T extends OntologyObject>\") + reexportTypes([\"BoundingBoxFilter\", \"DistanceOf\", \"SearchClause\", \"LtWhereClause\", \"GtWhereClause\", \"LteWhereClause\", \"GteWhereClause\", \"EqWhereClause\", \"IsNullWhereClause\", \"ContainsWhereClause\", \"StartsWithWhereClause\", \"ContainsAllTermsInOrderWhereClause\", \"ContainsAnyTermWhereClause\", \"ContainsAllTermsWhereClause\", \"WithinDistanceOfWhereClause\", \"WithinBoundingBoxWhereClause\", \"IntersectsBoundingBoxWhereClause\", \"DoesNotIntersectBoundingBoxWhereClause\", \"WithinPolygonWhereClause\", \"IntersectsPolygonWhereClause\", \"DoesNotIntersectPolygonWhereClause\", \"AndWhereClause\", \"OrWhereClause\", \"NotWhereClause\", \"WhereClause\", \"OrderByClause\"]) + reexportTypes([\"FilterType\"], \"<T extends string | number>\")));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateErrors(fs, ontologyProviderDir) {\n await fs.writeFile(path.join(ontologyProviderDir, \"Errors.ts\"), await formatTs(reexportTypes([\"PermissionDenied\", \"Unauthorized\", \"InvalidAggregationRangeValue\", \"MalformedPropertyFilters\", \"PropertiesNotFilterable\", \"ParametersNotFound\", \"ApplyActionFailed\", \"PropertyTypesSearchNotSupported\", \"InvalidParameterValue\", \"QueryTimeExceededLimit\", \"CompositePrimaryKeyNotSupported\", \"PropertyBaseTypeNotSupported\", \"PropertiesNotSearchable\", \"AttachmentNotFound\", \"ObjectTypeNotFound\", \"InvalidGroupId\", \"OntologySyncing\", \"ActionNotFound\", \"ParameterObjectSetRidNotFound\", \"LinkTypeNotFound\", \"InvalidRangeQuery\", \"ActionParameterObjectNotFound\", \"InvalidPropertyValue\", \"PropertiesNotSortable\", \"FunctionExecutionTimedOut\", \"InvalidFields\", \"ActionTypeNotFound\", \"ObjectTypeNotSynced\", \"OntologyEditsExceededLimit\", \"AggregationGroupCountExceededLimit\", \"InvalidContentType\", \"PropertiesNotFound\", \"FunctionInvalidInput\", \"InvalidSortOrder\", \"QueryDepthExceededLimit\", \"InvalidPropertyFiltersCombination\", \"ObjectsExceededLimit\", \"DuplicateOrderBy\", \"FunctionEncounteredUserFacingError\", \"InvalidUserId\", \"QueryNotFound\", \"InvalidAggregationRange\", \"ParameterObjectNotFound\", \"QueryMemoryExceededLimit\", \"InvalidContentLength\", \"OntologyNotFound\", \"ActionParameterObjectTypeNotFound\", \"UnknownParameter\", \"InvalidSortType\", \"PropertyFiltersNotSupported\", \"ActionValidationFailed\", \"MultipleGroupByOnFieldNotSupported\", \"LinkedObjectNotFound\", \"ActionEditedPropertiesNotFound\", \"InvalidPropertyFilterValue\", \"QueryEncounteredUserFacingError\", \"AttachmentSizeExceededLimit\", \"ObjectNotFound\", \"PropertyApiNameNotFound\", \"ParameterTypeNotSupported\", \"InvalidAggregationRangePropertyType\", \"MissingParameter\"])));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateOntologyMetadata(fs, ontologyProviderDir) {\n await fs.writeFile(path.join(ontologyProviderDir, \"OntologyMetadata.ts\"), await formatTs(reexportTypes([\"OntologyMetadata\"])));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../../util/reexportConsts.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateResult(fs, ontologyProviderDir) {\n await fs.writeFile(path.join(ontologyProviderDir, \"Result.ts\"), await formatTs(`import {FoundryApiError} from \"@osdk/legacy-client\";\n ` + reexportTypes([\"Ok\", \"Err\"], \"<T>\") + reexportTypes([\"Result\"], \"<V, E = FoundryApiError>\", \"<V,E>\") + reexportConsts([\"isOk\", \"isErr\", \"visitError\"]) + reexportTypes([\"ErrorVisitor\"], \"<E extends FoundryApiError, R>\", \"<E,R>\") + reexportTypes([\"ExtractKeysWithType\"], \"<T, K extends keyof T>\", \"<T,K>\")));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { generateErrors } from \"./ontologyProvider/generateErrors.js\";\nimport { generateOntologyMetadata } from \"./ontologyProvider/generateOntologyMetadata.js\";\nimport { generateResult } from \"./ontologyProvider/generateResult.js\";\nexport async function generateOntologyProviderDir(fs, runtimeDistDir, importExt = \"\") {\n const ontologyProviderDir = path.join(runtimeDistDir, \"ontologyProvider\");\n await fs.mkdir(ontologyProviderDir, {\n recursive: true\n });\n await generateErrors(fs, ontologyProviderDir);\n await generateOntologyMetadata(fs, ontologyProviderDir);\n await generateResult(fs, ontologyProviderDir);\n await fs.writeFile(path.join(ontologyProviderDir, \"index.ts\"), await formatTs(`\n ${\"\" // Skipping this one, its hard to imagine it being used\n // export * from \"./ErrorHandlers\";\n }\n export * from \"./Errors${importExt}\";\n export * from \"./OntologyMetadata${importExt}\";\n ${\"\" // Skipping this one, its hard to imagine it being used\n // export * from \"./OntologyObjectFactory${importExt}\";\n }\n ${\"\" // Skipping this one, its hard to imagine it being used\n // export * from \"./OntologyProvider${importExt}\";\n }\n // export * from \"./Result${importExt}\";\n `));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../util/reexportTypes.js\";\nexport async function generatePagingDir(runtimeDistDir, fs, importExt = \"\") {\n const pagingDir = path.join(runtimeDistDir, \"paging\");\n await fs.mkdir(pagingDir, {\n recursive: true\n });\n await fs.writeFile(path.join(pagingDir, \"index.ts\"), await formatTs(`export * from \"./Page${importExt}\";`));\n await fs.writeFile(path.join(pagingDir, \"Page.ts\"), await formatTs(reexportTypes([\"Page\"], \"<T>\")));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../util/test/formatTs.js\";\nimport { generateAggregationsDir } from \"./internal-foundry-ontology-runtime-dist/generateAggregationsDir.js\";\nimport { generateBaseTypesDir } from \"./internal-foundry-ontology-runtime-dist/generateBaseTypesDir.js\";\nimport { generateClientDir } from \"./internal-foundry-ontology-runtime-dist/generateClientDir.js\";\nimport { generateFiltersDir } from \"./internal-foundry-ontology-runtime-dist/generateFiltersDir.js\";\nimport { generateOntologyProviderDir } from \"./internal-foundry-ontology-runtime-dist/generateOntologyProviderDir.js\";\nimport { generatePagingDir } from \"./internal-foundry-ontology-runtime-dist/generatePagingDir.js\";\nexport async function generateOntologyRuntimeDistDir(outDir, fs, importExt = \"\") {\n const runtimeDistDir = path.join(outDir, \"internal\", \"@foundry\", \"ontology-runtime\", \"dist\");\n await fs.mkdir(runtimeDistDir, {\n recursive: true\n });\n await generateOntologyProviderDir(fs, runtimeDistDir, importExt);\n await generateAggregationsDir(fs, runtimeDistDir, importExt);\n await generatePagingDir(runtimeDistDir, fs, importExt);\n await generateBaseTypesDir(runtimeDistDir, fs, importExt);\n await generateClientDir(runtimeDistDir, fs, importExt);\n await generateFiltersDir(runtimeDistDir, fs, importExt);\n\n // Nothing exists for this in the new codebase so we skip\n // but I already wrote the code so leaving this for now in case we need it\n // await generateCommonDir(runtimeDistDir, fs);\n\n await fs.writeFile(path.join(runtimeDistDir, \"index.ts\"), await formatTs(`\n export * from \"./aggregations/index${importExt}\";\n export * from \"./baseTypes/index${importExt}\";\n ${\"\"\n // Skipping this one, it doesn't have an equiv now\n // export * from \"./common/index${importExt}\";\n }\n // export * from \"./filters/index${importExt}\";\n ${\"\"\n // Skipping this one, it doesn't have an equiv now\n // export * from \"./iterator/index${importExt}\";\n }\n ${\"\"\n // Skipping this one, its not used\n // export * from \"./models/index${importExt}\";\n }\n \n export * from \"./ontologyProvider/index${importExt}\";\n export * from \"./paging/index${importExt}\";\n`));\n}","/*\n * Copyright 2023 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 { generateOAuthClientDistDir } from \"./backcompat/generateOAuthDistDir.js\";\nimport { generateOntologyRuntimeDistDir } from \"./backcompat/generateOntologyRuntimeDistDir.js\";\nexport async function generateBackCompatDeprecatedExports(fs, outDir, importExt = \"\") {\n await generateOntologyRuntimeDistDir(outDir, fs, importExt);\n await generateOAuthClientDistDir(outDir, fs, importExt);\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getModifiedEntityTypes } from \"../shared/getEditedEntities.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { getTypeScriptTypeFromDataType } from \"./generateActions.js\";\nexport async function generateBatchActions(ontology, fs, outDir, importExt = \"\") {\n const importedObjects = new Set();\n let actionSignatures = [];\n for (const action of Object.values(ontology.actionTypes)) {\n const entries = Object.entries(action.parameters);\n const modifiedEntityTypes = getModifiedEntityTypes(action);\n const addedObjects = Array.from(modifiedEntityTypes.addedObjects);\n const modifiedObjects = Array.from(modifiedEntityTypes.modifiedObjects);\n addedObjects.forEach(importedObjects.add, importedObjects);\n modifiedObjects.forEach(importedObjects.add, importedObjects);\n let jsDocBlock = [\"/**\"];\n if (action.description) {\n jsDocBlock.push(`* ${action.description}`);\n }\n let parameterBlock = \"\";\n if (entries.length > 0) {\n parameterBlock = `params: { \\n`;\n for (const [parameterName, parameterData] of entries) {\n parameterBlock += `\"${parameterName}\"`;\n parameterBlock += parameterData.required ? \": \" : \"?: \";\n const typeScriptType = getTypeScriptTypeFromDataType(parameterData.dataType, importedObjects);\n parameterBlock += `${typeScriptType};\\n`;\n jsDocBlock.push(`* @param {${typeScriptType}} params.${parameterName}`);\n }\n parameterBlock += \"}[], \";\n } else {\n parameterBlock = `params: Record<string,never>[], `;\n }\n jsDocBlock.push(`*/`);\n actionSignatures.push(`\n ${jsDocBlock.join(\"\\n\")}\n ${action.apiName}<O extends BatchActionExecutionOptions>(${parameterBlock}options?: O): \n Promise<Result<BatchActionResponseFromOptions<O, Edits<${addedObjects.length > 0 ? addedObjects.join(\" | \") : \"void\"}, ${modifiedObjects.length > 0 ? modifiedObjects.join(\" | \") : \"void\"}>>, ActionError>>;\n `);\n }\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"BatchActions.ts\"), await formatTs(`\n import type { ObjectSet, LocalDate, Timestamp, Attachment, Edits, ActionExecutionOptions, BatchActionExecutionOptions, ActionError, Result, ActionResponseFromOptions, BatchActionResponseFromOptions } from \"@osdk/legacy-client\";\n ${Array.from(importedObjects).map(importedObject => `import type { ${importedObject} } from \"../objects/${importedObject}${importExt}\";`).join(\"\\n\")}\n export interface BatchActions {\n ${actionSignatures.join(\"\\n\")}\n }\n `));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getModifiedEntityTypes } from \"../shared/getEditedEntities.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { getTypeScriptTypeFromDataType } from \"./generateActions.js\";\nexport async function generateBulkActions(ontology, fs, outDir, importExt = \"\") {\n const importedObjects = new Set();\n let actionSignatures = [];\n for (const action of Object.values(ontology.actionTypes)) {\n const entries = Object.entries(action.parameters);\n const modifiedEntityTypes = getModifiedEntityTypes(action);\n const addedObjects = Array.from(modifiedEntityTypes.addedObjects);\n const modifiedObjects = Array.from(modifiedEntityTypes.modifiedObjects);\n addedObjects.forEach(importedObjects.add, importedObjects);\n modifiedObjects.forEach(importedObjects.add, importedObjects);\n let jsDocBlock = [\"/**\"];\n if (action.description) {\n jsDocBlock.push(`* ${action.description}`);\n }\n let parameterBlock = \"\";\n if (entries.length > 0) {\n parameterBlock = `params: { \\n`;\n for (const [parameterName, parameterData] of entries) {\n parameterBlock += `\"${parameterName}\"`;\n parameterBlock += parameterData.required ? \": \" : \"?: \";\n const typeScriptType = getTypeScriptTypeFromDataType(parameterData.dataType, importedObjects);\n parameterBlock += `${typeScriptType};\\n`;\n jsDocBlock.push(`* @param {${typeScriptType}} params.${parameterName}`);\n }\n parameterBlock += \"}[], \";\n } else {\n parameterBlock = `params: Record<string,never>[], `;\n }\n jsDocBlock.push(`*/`);\n actionSignatures.push(`\n ${jsDocBlock.join(\"\\n\")}\n ${action.apiName}<O extends BulkActionExecutionOptions>(${parameterBlock}options?: O): \n Promise<Result<BulkActionResponseFromOptions<O, Edits<${addedObjects.length > 0 ? addedObjects.join(\" | \") : \"void\"}, ${modifiedObjects.length > 0 ? modifiedObjects.join(\" | \") : \"void\"}>>, ActionError>>;\n `);\n }\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"BulkActions.ts\"), await formatTs(`\n import type { ObjectSet, LocalDate, Timestamp, Attachment, Edits, ActionExecutionOptions, BulkActionExecutionOptions, ActionError, Result, ActionResponseFromOptions, BulkActionResponseFromOptions } from \"@osdk/legacy-client\";\n ${Array.from(importedObjects).map(importedObject => `import type { ${importedObject} } from \"../objects/${importedObject}${importExt}\";`).join(\"\\n\")}\n export interface BulkActions {\n ${actionSignatures.join(\"\\n\")}\n }\n `));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateFoundryClientFile(fs, outDir, importExt = \"\") {\n await fs.writeFile(path.join(outDir, \"FoundryClient.ts\"), await formatTs(`\n import { BaseFoundryClient } from \"@osdk/legacy-client\";\n import type { Auth, FoundryClientOptions } from \"@osdk/legacy-client\";\n import { Ontology } from \"./Ontology${importExt}\";\n\n export class FoundryClient<TAuth extends Auth = Auth> extends BaseFoundryClient<typeof Ontology, TAuth> {\n constructor(options: FoundryClientOptions<TAuth>) {\n super(options, Ontology);\n }\n\n get ontology(): Ontology {\n return super.ontology;\n }\n }`));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateIndexFile(fs, outDir, importExt) {\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`\n export * from \"@osdk/legacy-client\";\n export type { Ontology } from \"./Ontology${importExt}\";\n export { FoundryClient } from \"./FoundryClient${importExt}\";\n `));\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function commaSeparatedIdentifiers(identifiers, alternateNames) {\n return identifiers.map(i => {\n const alt = alternateNames?.get(i);\n if (alt) {\n return `${i}: ${alt}`;\n }\n return i;\n }).join(\",\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function commaSeparatedTypeIdentifiers(identifiers, altNames) {\n return identifiers.map(i => `${i}: typeof ${altNames?.get(i) ?? i}`).join(\",\");\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { commaSeparatedIdentifiers } from \"../util/commaSeparatedIdentifiers.js\";\nimport { commaSeparatedTypeIdentifiers } from \"../util/commaSeparatedTypeIdentifiers.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateMetadataFile(ontology, userAgent, fs, outDir, importExt = \"\") {\n const objectNames = Object.keys(ontology.objectTypes);\n const actionNames = Object.keys(ontology.actionTypes);\n const queryNames = Object.keys(ontology.queryTypes);\n const actionAltNames = new Map();\n const queryAltNames = new Map();\n const seenIdentifiers = new Set(objectNames);\n for (const actionName of actionNames) {\n if (seenIdentifiers.has(actionName)) {\n actionAltNames.set(actionName, `${actionName}Action`);\n } else {\n seenIdentifiers.add(actionName);\n }\n }\n for (const queryName of queryNames) {\n if (seenIdentifiers.has(queryName)) {\n queryAltNames.set(queryName, `${queryName}Query`);\n }\n }\n const getImportClause = (name, altNames) => {\n const alt = altNames.get(name);\n if (alt) {\n return `${name} as ${alt}`;\n } else {\n return name;\n }\n };\n await fs.writeFile(path.join(outDir, \"Ontology.ts\"), await formatTs(`\n import type { OntologyDefinition } from \"@osdk/api\";\n import type { Ontology as ClientOntology } from \"@osdk/legacy-client\";\n import type { Objects } from \"./ontology/objects/Objects${importExt}\";\n import type { Actions } from \"./ontology/actions/Actions${importExt}\";\n import type { Queries } from \"./ontology/queries/Queries${importExt}\";\n import type { BatchActions } from \"./ontology/actions/BatchActions${importExt}\";\n import type { BulkActions } from \"./ontology/actions/BulkActions${importExt}\";\n ${objectNames.map(name => `import {${name}} from \"./ontology/objects/${name}${importExt}\";`).join(\"\\n\")}\n ${actionNames.map(name => `import {${getImportClause(name, actionAltNames)}} from \"./ontology/actions/${name}${importExt}\";`).join(\"\\n\")}\n ${queryNames.map(name => `import {${getImportClause(name, queryAltNames)}} from \"./ontology/queries/${name}${importExt}\";`).join(\"\\n\")}\n\n export const Ontology : {\n metadata: {\n ontologyRid: \"${ontology.ontology.rid}\",\n ontologyApiName: \"${ontology.ontology.apiName}\",\n userAgent: \"${userAgent}\",\n },\n objects: {\n ${commaSeparatedTypeIdentifiers(objectNames)}\n },\n actions: {\n ${commaSeparatedTypeIdentifiers(actionNames, actionAltNames)}\n },\n queries: {\n ${commaSeparatedTypeIdentifiers(queryNames, queryAltNames)}\n },\n } = {\n metadata: {\n ontologyRid: \"${ontology.ontology.rid}\" as const,\n ontologyApiName: \"${ontology.ontology.apiName}\" as const,\n userAgent: \"${userAgent}\" as const,\n },\n objects: {\n ${commaSeparatedIdentifiers(objectNames)}\n },\n actions: {\n ${commaSeparatedIdentifiers(actionNames, actionAltNames)}\n },\n queries: {\n ${commaSeparatedIdentifiers(queryNames, queryAltNames)}\n }\n } satisfies OntologyDefinition<\n ${stringUnionFrom(objectNames)},\n ${stringUnionFrom(Object.values(ontology.actionTypes).map(actionType => actionType.apiName))},\n ${stringUnionFrom(Object.values(ontology.queryTypes).map(queryType => queryType.apiName))}>;\n \nexport interface Ontology extends ClientOntology<typeof Ontology> {\n objects: Objects;\n actions: Actions;\n /** @deprecated use batchActions */\n bulkActions: BulkActions;\n batchActions: BatchActions;\n queries: Queries;\n}`));\n}\nfunction stringUnionFrom(values) {\n if (values.length === 0) {\n return \"never\";\n }\n return values.map(n => `\"${n}\"`).join(\"|\");\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateObjectsInterfaceFile(ontology, fs, outDir, importExt = \"\") {\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"Objects.ts\"), await formatTs(`\n import { BaseObjectSet } from \"@osdk/legacy-client\";\n ${Array.from(Object.keys(ontology.objectTypes)).map(importedObject => `import type { ${importedObject} } from \"./${importedObject}${importExt}\";`).join(\"\\n\")}\n \n export interface Objects {\n ${Object.keys(ontology.objectTypes).map(apiName => `${apiName} : BaseObjectSet<${apiName}>;`).join(\"\\n\")}\n }\n ;`));\n}","/*\n * Copyright 2023 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 { join } from \"node:path\";\nexport async function generateObjectsInterfaceSupportFiles(ontology, fs, outDir, importExt = \"\") {\n await fs.mkdir(outDir, {\n recursive: true\n });\n for (const {\n objectType: {\n apiName\n }\n } of Object.values(ontology.objectTypes)) {\n const fileName = join(outDir, `${apiName}.ts`);\n const localApiName = `OG_${apiName}`;\n const contents = [];\n contents.push(`import { ObjectSetAggregateArg, ObjectSetFilterArg, ObjectSetGroupByArg, ObjectSetMultipleAggregateArg, ObjectSetOrderByArg } from \"@osdk/legacy-client\";`);\n contents.push(`import { ${apiName} as ${localApiName} } from \"../${apiName}${importExt}\";`);\n contents.push(\"\"); // empty line\n\n contents.push(`/** @deprecated Use ${apiName} from ontology/objects instead */`, `export type ${apiName} = ${localApiName};`);\n contents.push(`/** @deprecated Use ObjectSetFilterArg<${apiName}> instead */`, `export type ${apiName}Filter = ObjectSetFilterArg<${localApiName}>;`);\n contents.push(`/** @deprecated Use ObjectSetOrderByArg<${apiName}> instead */`, `export type ${apiName}OrderBy = ObjectSetOrderByArg<${localApiName}>;`);\n contents.push(`/** @deprecated Use ObjectSetGroupByArg<${apiName}> instead */`, `export type ${apiName}GroupByProperties = ObjectSetGroupByArg<${localApiName}>;`);\n contents.push(`\n /**\n * Aggregation properties for ${apiName}\n * @deprecated Use ObjectSetAggregateArg<${apiName}> instead\n */`, `export type ${apiName}AggregationProperties = ObjectSetAggregateArg<${localApiName}>;`);\n contents.push(`\n /**\n * Multiple aggregation properties for ${apiName}.\n * @deprecated Use ObjectSetMultipleAggregateArg<${apiName}> instead\n */`, `export type ${apiName}MultipleAggregationProperties = ObjectSetMultipleAggregateArg<${localApiName}>;`);\n await fs.writeFile(fileName, contents.join(\"\\n\"));\n }\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateOntologyIndexFile(fs, outDir) {\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`\n export type { ObjectSet } from \"@osdk/legacy-client\";\n `));\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getObjectImports(objects, curApiName, currentFilePath, v2) {\n return Array.from(objects).filter(obj => obj.fullApiName !== curApiName).map(obj => {\n return `import type { ${obj.getDefinitionIdentifier(v2)} as ${obj.getImportedDefinitionIdentifier(v2)} } from \"${obj.getImportPathRelTo(\"./\" + currentFilePath)}\";`;\n }).join(\"\\n\");\n}","/*\n * Copyright 2023 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 { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nexport function wireActionTypeV2ToSdkActionDefinition(input) {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n parameters: Object.fromEntries(Object.entries(input.parameters).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects)\n };\n}\nfunction wireActionParameterV2ToSdkParameterDefinition(value) {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(value.dataType.type === \"array\" ? value.dataType.subType : value.dataType),\n nullable: !value.required,\n description: value.description\n };\n}\nfunction actionPropertyToSdkPropertyDefinition(parameterType) {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"marking\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: parameterType.objectTypeApiName\n };\n case \"object\":\n return {\n type: \"object\",\n object: parameterType.objectTypeApiName\n };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n }\n}\nfunction createModifiedEntities(addedObjects, modifiedObjects) {\n let entities = {};\n for (const key of addedObjects) {\n entities[key] = {\n created: true,\n modified: false\n };\n }\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n } else {\n entities[key] = {\n created: false,\n modified: true\n };\n }\n }\n return entities;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function stringUnionFrom(values) {\n if (values.length === 0) {\n return \"never\";\n } else {\n return values.map(v => `\"${v}\"`).join(\"|\");\n }\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { wireActionTypeV2ToSdkActionDefinition } from \"../shared/wireActionTypeV2ToSdkActionDefinition.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringUnionFrom } from \"../util/stringUnionFrom.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generatePerActionDataFilesV1({\n sanitizedOntology: ontology,\n fs,\n outDir: rootOutDir,\n importExt = \"\",\n ontology: enhancedOntology\n}) {\n const outDir = path.join(rootOutDir, \"ontology\", \"actions\");\n await fs.mkdir(outDir, {\n recursive: true\n });\n await Promise.all(Object.values(enhancedOntology.actionTypes).map(async action => {\n const currentFilePath = `${path.join(\"ontology\", \"actions\", `${action.shortApiName}.ts`)}`;\n const uniqueApiNamesArray = extractReferencedObjectsFromAction(action.og);\n const uniqueApiNames = new Set(uniqueApiNamesArray);\n const uniqueApiNamesString = stringUnionFrom([...uniqueApiNames]);\n const fullActionDef = deleteUndefineds(wireActionTypeV2ToSdkActionDefinition(action.og));\n const {\n parameters,\n ...actionDefSansParameters\n } = fullActionDef;\n function createV1Object() {\n return ` export const ${action.shortApiName} = ${JSON.stringify(fullActionDef, null, 2)} satisfies ActionDefinition<\"${action.shortApiName}\", ${uniqueApiNamesString}>;`;\n }\n const referencedObjectDefs = new Set();\n for (const p of Object.values(action.parameters)) {\n if (p.dataType.type === \"object\" || p.dataType.type === \"objectSet\") {\n if (p.dataType.objectApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.objectApiName));\n }\n if (p.dataType.objectTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.objectTypeApiName));\n }\n }\n if (p.dataType.type === \"array\" && (p.dataType.subType.type === \"object\" || p.dataType.subType.type === \"objectSet\")) {\n if (p.dataType.subType.objectApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.subType.objectApiName));\n }\n if (p.dataType.subType.objectTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.subType.objectTypeApiName));\n }\n }\n }\n const imports = getObjectImports(referencedObjectDefs, undefined, currentFilePath, false);\n await fs.writeFile(path.join(rootOutDir, currentFilePath), await formatTs(`\n import type { ActionDefinition, ObjectActionDataType, ObjectSetActionDataType, VersionBound} from \"@osdk/api\";\n import type { ApplyActionOptions, ApplyBatchActionOptions, ActionReturnTypeForOptions, ActionParam } from '@osdk/client.api';\n import { $osdkMetadata} from \"../../OntologyMetadata${importExt}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${imports}\n\n ${createV1Object()}\n `));\n }));\n const indexFileRelPath = path.join(\"ontology\", \"actions\", `index.ts`);\n await fs.writeFile(path.join(rootOutDir, indexFileRelPath), await formatTs(`\n ${Object.values(enhancedOntology.actionTypes).map(action => {\n const exportConstLine = `export {${action.shortApiName} } from \"${action.getImportPathRelTo(indexFileRelPath)}\";`;\n const exportTypeLine = `export type { ${action.paramsIdentifier} } from \"${action.getImportPathRelTo(indexFileRelPath)}\";`;\n return exportConstLine;\n }).join(\"\\n\")}\n ${Object.keys(ontology.actionTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n}\nfunction extractReferencedObjectsFromAction(actionType) {\n const referencedObjectsInParameters = Object.values(actionType.parameters).flatMap(({\n dataType\n }) => {\n const objectTypeReference = extractReferencedObjectsFromActionParameter(dataType);\n return objectTypeReference ? [objectTypeReference] : [];\n });\n const referenceObjectsInEdits = actionType.operations.flatMap(value => {\n switch (value.type) {\n case \"createObject\":\n return [value.objectTypeApiName];\n case \"modifyObject\":\n return [value.objectTypeApiName];\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n return [];\n }\n });\n return [...referenceObjectsInEdits, ...referencedObjectsInParameters];\n}\nfunction extractReferencedObjectsFromActionParameter(actionParameter) {\n switch (actionParameter.type) {\n case \"objectSet\":\n case \"object\":\n return actionParameter.objectTypeApiName;\n case \"array\":\n return extractReferencedObjectsFromActionParameter(actionParameter.subType);\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"date\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n return undefined;\n }\n}","/*\n * Copyright 2023 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\n/**\n * A function for changing the stringified key/value pairs of an object.\n *\n * @param value The value of the key/value pair.\n * @param defaultValueFormatter The function that would be called if this customizer wasn't used\n * @param key The key of the key/value pair.\n * @param defaultKeyFormatter The function that would be called if this customizer wasn't used\n *\n * @returns A string, a tuple of strings, or undefined.\n * If a string is returned, it will be used as the value of the key/value pair.\n * If a tuple of strings is returned, the first string will be used as the key of the key/value pair\n * and the second string will be used as the value of the key/value pair.\n * If undefined is returned, the pair will be removed\n */\n\nconst defaultCustomizer = (value, defaultValueFormatter, key, defaultKeyFormatter) => {\n return [defaultKeyFormatter(key), defaultValueFormatter(value)];\n};\nexport function stringify(obj, customizer = {}, separator = \",\\n\") {\n const defaultKeyFormatter = key => `${JSON.stringify(key)}`;\n const entries = [];\n const sortedKeys = Object.keys(obj).sort((a, b) => a.localeCompare(b));\n for (const key of sortedKeys) {\n const value = obj[key];\n const res = (customizer[key] ?? customizer[\"*\"] ?? defaultCustomizer)(value, value => JSON.stringify(value, null, 2), key, defaultKeyFormatter);\n if (res) {\n if (typeof res === \"string\") {\n entries.push(`${defaultKeyFormatter(key)}: ${res}`);\n } else {\n entries.push(`${res[0]}: ${res[1]}`);\n }\n }\n }\n return entries.join(separator);\n}","/*\n * Copyright 2023 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 { wireObjectTypeFullMetadataToSdkObjectTypeDefinition } from \"@osdk/generator-converters\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\n\n/** @internal */\nexport function wireObjectTypeV2ToSdkObjectConstV1(wireObject, {\n ontology\n}, currentFilePath) {\n const object = ontology.requireObjectType(wireObject.objectType.apiName, true);\n const uniqueLinkTargetTypes = new Set(wireObject.linkTypes.map(a => ontology.requireObjectType(a.objectTypeApiName, false)));\n const definition = deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectTypeDefinition(object.og, false));\n const objectDefIdentifier = object.getDefinitionIdentifier(false);\n function getV1Types() {\n return `\n export interface ${objectDefIdentifier} extends ObjectTypeDefinition<\"${object.fullApiName}\", ${object.uniqueImportName}> {\n ${stringify(definition, {\n osdkMetadata: () => undefined,\n // not used in v1\n links: _value => `{\n ${stringify(definition.links, {\n \"*\": definition => `ObjectTypeLinkDefinition<${ontology.requireObjectType(definition.targetType).getImportedDefinitionIdentifier(false)}, ${definition.multiplicity}>`\n })}\n }`\n })}\n }\n `;\n }\n const imports = getObjectImports(uniqueLinkTargetTypes, definition.apiName, currentFilePath, false);\n return `${imports}${getV1Types()}\n\n export const ${object.shortApiName}: ${objectDefIdentifier} = {\n ${stringify(definition, {\n osdkMetadata: value => undefined\n })}\n \n };`;\n}","/*\n * Copyright 2023 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\n// This must match the reservedKeywords definition in packages/legacy-client\nconst reservedKeywords = new Set([\"break\", \"case\", \"catch\", \"class\", \"const\", \"continue\", \"debugger\", \"default\", \"delete\", \"do\", \"else\", \"enum\", \"export\", \"extends\", \"false\", \"finally\", \"for\", \"function\", \"if\", \"import\", \"in\", \"instanceof\", \"new\", \"null\", \"return\", \"super\", \"switch\", \"this\", \"throw\", \"true\", \"try\", \"typeof\", \"var\", \"void\", \"while\", \"with\", \"implements\", \"interface\", \"let\", \"package\", \"private\", \"protected\", \"public\", \"static\", \"yield\"]);\nexport function isReservedKeyword(name) {\n return reservedKeywords.has(name);\n}","/*\n * Copyright 2023 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 { isReservedKeyword } from \"../util/reservedKeywords.js\";\nexport function wireObjectTypeV2ToObjectInterfaceStringV1(objectTypeWithLinks, importExt = \"\") {\n const uniqueLinkTargets = new Set(objectTypeWithLinks.linkTypes.map(a => a.objectTypeApiName).filter(a => a !== objectTypeWithLinks.objectType.apiName));\n return `import type { OntologyObject, LocalDate, Timestamp, GeoShape, GeoPoint, Attachment, TimeSeries, MultiLink, SingleLink, StringLong } from \"@osdk/legacy-client\";\n${Array.from(uniqueLinkTargets).map(linkTarget => `import type { ${linkTarget} } from \"./${linkTarget}${importExt}\";`).join(\"\\n\")}\n\n ${getDescriptionIfPresent(objectTypeWithLinks.objectType.description)}\n export interface ${objectTypeWithLinks.objectType.apiName} extends OntologyObject {\n /** \\@deprecated please migrate to \\$apiName instead */\n readonly __apiName: \"${objectTypeWithLinks.objectType.apiName}\" & {${objectTypeWithLinks.linkTypes.map(linkType => {\n return `/** \\@deprecated please migrate to pivotTo(${linkType.apiName}) instead */ searchAround${linkType.apiName.charAt(0).toUpperCase() + linkType.apiName.slice(1)}?: never`;\n })}};\n /** \\@deprecated please migrate to \\$primaryKey instead */\n readonly __primaryKey: ${wirePropertyTypeV2ToTypeScriptType(objectTypeWithLinks.objectType.properties[objectTypeWithLinks.objectType.primaryKey].dataType)};\n readonly \\$apiName: \"${objectTypeWithLinks.objectType.apiName}\";\n readonly \\$primaryKey: ${wirePropertyTypeV2ToTypeScriptType(objectTypeWithLinks.objectType.properties[objectTypeWithLinks.objectType.primaryKey].dataType)};\n${Object.entries(objectTypeWithLinks.objectType.properties).sort((a, b) => a[0].localeCompare(b[0])).flatMap(([propertyName, propertyDefinition]) => {\n const propertyType = wirePropertyTypeV2ToTypeScriptType(propertyDefinition.dataType);\n const entries = [`${getDescriptionIfPresent(propertyDefinition.description, true)}readonly ${propertyName}: ${propertyType} | undefined`];\n if (isReservedKeyword(propertyName)) {\n entries.push(`/** @deprecated please migrate to '${propertyName}' instead */\n readonly ${propertyName}_: ${propertyType} | undefined`);\n }\n return entries;\n }).join(\";\\n\")}\n${objectTypeWithLinks.linkTypes.flatMap(linkType => {\n const entries = [`readonly ${linkType.apiName}: ${linkType.cardinality === \"MANY\" ? \"MultiLink\" : \"SingleLink\"}<${linkType.objectTypeApiName}>`];\n return entries;\n }).join(\";\\n\")}\n}\n `;\n}\nfunction wirePropertyTypeV2ToTypeScriptType(property) {\n switch (property.type) {\n case \"string\":\n return \"string\";\n case \"boolean\":\n return \"boolean\";\n case \"array\":\n return wirePropertyTypeV2ToTypeScriptType(property.subType) + \"[]\";\n case \"integer\":\n return \"number\";\n case \"attachment\":\n return \"Attachment\";\n case \"byte\":\n return \"number\";\n case \"date\":\n return \"LocalDate\";\n case \"decimal\":\n return \"string\";\n case \"double\":\n return \"number\";\n case \"float\":\n return \"number\";\n case \"geopoint\":\n return \"GeoPoint\";\n case \"geoshape\":\n return \"GeoShape\";\n case \"long\":\n return \"StringLong\";\n case \"short\":\n return \"number\";\n case \"timestamp\":\n return \"Timestamp\";\n case \"timeseries\":\n return property.itemType.type === \"string\" ? `TimeSeries<string>` : `TimeSeries<number>`;\n case \"marking\":\n return \"string\";\n default:\n const _ = property;\n throw new Error(`Unknown property type ${property}`);\n }\n}\nexport function getDescriptionIfPresent(description, includeNewline) {\n if (description) {\n return `/**\n * ${description}\n */${includeNewline ? \"\\n\" : \"\"}`;\n }\n return \"\";\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { wireObjectTypeV2ToSdkObjectConstV1 } from \"./wireObjectTypeV2ToSdkObjectConstV1.js\";\nimport { wireObjectTypeV2ToObjectInterfaceStringV1 } from \"./wireObjectTypeV2ToV1ObjectInterfaceString.js\";\nexport async function generatePerObjectInterfaceAndDataFiles(ontology, fs, outDir, importExt = \"\") {\n await fs.mkdir(outDir, {\n recursive: true\n });\n await Promise.all(Object.values(ontology.og.objectTypes).map(async object => {\n const relPath = path.join(\".\", \"ontology\", `objects`, `${object.objectType.apiName}.ts`);\n await fs.writeFile(path.join(outDir, `${object.objectType.apiName}.ts`), await formatTs(`\n import type { ObjectTypeDefinition, ObjectTypeLinkDefinition, PropertyDef } from \"@osdk/api\";\n ${wireObjectTypeV2ToObjectInterfaceStringV1(object, importExt)}\n\n ${wireObjectTypeV2ToSdkObjectConstV1(object, {\n ontology\n }, relPath)}\n `));\n }));\n await fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`\n ${Object.keys(ontology.og.objectTypes).map(apiName => `export * from \"./${apiName}${importExt}\";`).join(\"\\n\")}\n export type { ObjectSet } from \"@osdk/legacy-client\";\\n\n `));\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getObjectTypesFromQueryDataType(dataType, types) {\n switch (dataType.type) {\n case \"array\":\n case \"set\":\n getObjectTypesFromQueryDataType(dataType.subType, types);\n return;\n case \"object\":\n types.add(dataType.objectTypeApiName);\n return;\n case \"objectSet\":\n types.add(dataType.objectTypeApiName);\n return;\n case \"struct\":\n for (const prop of Object.values(dataType.fields)) {\n getObjectTypesFromQueryDataType(prop.fieldType, types);\n }\n return;\n case \"union\":\n for (const type of dataType.unionTypes) {\n getObjectTypesFromQueryDataType(type, types);\n }\n return;\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"null\":\n case \"string\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n case \"unsupported\":\n /* complete no-op */\n return;\n default:\n const _ = dataType;\n throw new Error(`Cannot find object types from unsupported QueryDataType ${dataType.type}`);\n }\n}","/*\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 { getObjectTypesFromQueryDataType } from \"./getObjectTypesFromQueryDataType.js\";\nexport function getObjectTypeApiNamesFromQuery(query) {\n const types = new Set();\n for (const {\n dataType\n } of Object.values(query.parameters)) {\n getObjectTypesFromQueryDataType(dataType, types);\n }\n getObjectTypesFromQueryDataType(query.output, types);\n return Array.from(types);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isNullableQueryDataType(input) {\n if (input.type === \"null\") {\n return true;\n }\n if (input.type === \"union\") {\n return input.unionTypes.some(t => isNullableQueryDataType(t));\n }\n return false;\n}","/*\n * Copyright 2023 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 { isNullableQueryDataType } from \"./isNullableQueryDataType.js\";\nexport function wireQueryDataTypeToQueryDataTypeDefinition(input) {\n switch (input.type) {\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"string\":\n case \"timestamp\":\n return {\n type: input.type,\n nullable: false\n };\n case \"object\":\n return {\n type: \"object\",\n object: input.objectTypeApiName,\n nullable: false\n };\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: input.objectTypeApiName,\n nullable: false\n };\n case \"array\":\n return {\n ...wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n multiplicity: true\n };\n case \"set\":\n return {\n type: \"set\",\n set: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n nullable: false\n };\n case \"union\":\n const allowNulls = isNullableQueryDataType(input);\n\n // special case for a union where one half is nullable to skip the union step and just allow nulls directly\n if (allowNulls && input.unionTypes.length === 2) {\n const nonNull = input.unionTypes.find(t => t.type != null);\n if (nonNull) {\n return {\n ...wireQueryDataTypeToQueryDataTypeDefinition(nonNull),\n nullable: true\n };\n }\n }\n return {\n type: \"union\",\n union: input.unionTypes.reduce((acc, t) => {\n if (t.type === \"null\") {\n return acc;\n }\n acc.push(wireQueryDataTypeToQueryDataTypeDefinition(t));\n return acc;\n }, []),\n nullable: allowNulls\n };\n case \"struct\":\n return {\n type: \"struct\",\n struct: Object.fromEntries(input.fields.map(f => [f.name, wireQueryDataTypeToQueryDataTypeDefinition(f.fieldType)])),\n nullable: false\n };\n case \"twoDimensionalAggregation\":\n return {\n type: \"twoDimensionalAggregation\",\n twoDimensionalAggregation: get2DQueryAggregationProps(input),\n nullable: false\n };\n case \"threeDimensionalAggregation\":\n return {\n type: \"threeDimensionalAggregation\",\n threeDimensionalAggregation: get3DQueryAggregationProps(input),\n nullable: false\n };\n case \"null\":\n case \"unsupported\":\n throw new Error(`Accidentally tried to handle QueryDataType.type ${input.type}`);\n default:\n const _ = input;\n throw new Error(`Unsupported QueryDataType.type ${input.type}`);\n }\n}\nfunction get2DQueryAggregationProps(input) {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: input.valueType.type\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: input.valueType.type\n };\n }\n throw new Error(`Cannot create 2D aggregation with ${input.keyType.type} as its type`);\n }\n}\nfunction get3DQueryAggregationProps(input) {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: get2DQueryAggregationProps(input.valueType)\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: get2DQueryAggregationProps(input.valueType)\n };\n }\n throw new Error(`Cannot create 3D aggregation with ${input.keyType.type} as its type`);\n }\n}\n\n/**\n * Guard against aggregation key types that are allowed by the backend types but are illegal to actually use\n */\nfunction guardInvalidKeyTypes(key) {\n return key.type === \"string\" || key.type === \"boolean\";\n}","/*\n * Copyright 2023 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 { wireQueryDataTypeToQueryDataTypeDefinition } from \"./wireQueryDataTypeToQueryDataTypeDefinition.js\";\nexport function wireQueryTypeV2ToSdkQueryDefinition(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n parameters: Object.fromEntries(Object.entries(input.parameters).map(([name, parameter]) => [name, wireQueryParameterV2ToQueryParameterDefinition(parameter)])),\n output: wireQueryDataTypeToQueryDataTypeDefinition(input.output)\n };\n}\nexport function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version\n };\n}\nexport function wireQueryParameterV2ToQueryParameterDefinition(parameter) {\n return {\n description: parameter.description,\n ...wireQueryDataTypeToQueryDataTypeDefinition(parameter.dataType)\n };\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getObjectTypeApiNamesFromQuery } from \"../shared/getObjectTypeApiNamesFromQuery.js\";\nimport { wireQueryTypeV2ToSdkQueryDefinition } from \"../shared/wireQueryTypeV2ToSdkQueryDefinition.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generatePerQueryDataFiles({\n fs,\n outDir: rootOutDir,\n ontology\n}, v2) {\n const relOutDir = path.join(\".\", \"ontology\", \"queries\");\n const outDir = path.join(rootOutDir, \"ontology\", \"queries\");\n await fs.mkdir(outDir, {\n recursive: true\n });\n await Promise.all(Object.values(ontology.queryTypes).map(async query => {\n await generateV1QueryFile(fs, outDir, query);\n }));\n await fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`\n ${Object.values(ontology.queryTypes).map(query => `export * from \"${query.getImportPathRelTo(path.join(relOutDir, \"index.ts\"))}\";`).join(\"\\n\")}\n ${Object.keys(ontology.queryTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n}\nasync function generateV1QueryFile(fs, outDir, query) {\n const objectTypes = getObjectTypeApiNamesFromQuery(query);\n await fs.writeFile(path.join(outDir, `${query.shortApiName}.ts`), await formatTs(`\n import { QueryDefinition } from \"@osdk/api\";\n\n export const ${query.shortApiName} = ${JSON.stringify(wireQueryTypeV2ToSdkQueryDefinition(query.og))} ${getQueryDefSatisfies(query.fullApiName, objectTypes)}`));\n}\nexport function getQueryDefSatisfies(apiName, objectTypes) {\n return `satisfies QueryDefinition<\"${apiName}\", ${objectTypes.length > 0 ? objectTypes.map(apiNameObj => `\"${apiNameObj}\"`).join(\"|\") : \"never\"}>;`;\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { isNullableQueryDataType } from \"../shared/isNullableQueryDataType.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateQueries(ontology, fs, outDir, importExt = \"\") {\n const importedObjects = new Set();\n const signatures = [];\n for (const query of Object.values(ontology.queryTypes)) {\n const jsDocBlock = [\"/**\"];\n if (query.description) {\n jsDocBlock.push(`* ${query.description}`);\n }\n const outputType = handleQueryDataType(query.output, importedObjects, true);\n const paramEntries = [];\n for (const [name, parameter] of Object.entries(query.parameters)) {\n const nullable = isNullableQueryDataType(parameter.dataType);\n const type = handleQueryDataType(parameter.dataType, importedObjects, false);\n paramEntries.push(`\"${name}\"${nullable ? \"?\" : \"\"}: ${type}`);\n jsDocBlock.push(`* @param {${sanitizeDocTypeName(type)}} params.${name}${parameter.description ? ` - ${parameter.description}` : \"\"}`);\n }\n const param = paramEntries.length === 0 ? \"\" : `params: { ${paramEntries.join(\"; \")} }`;\n jsDocBlock.push(`* @returns ${sanitizeDocTypeName(outputType)}`, \"*/\");\n signatures.push(`\n ${jsDocBlock.join(\"\\n\")}\n ${query.apiName}(${param}): Promise<Result<QueryResponse<${outputType}>, QueryError>>;\n `);\n }\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"Queries.ts\"), await formatTs(`\n import type { QueryResponse, QueryError, Result, Timestamp, LocalDate, Range, Attachment, ObjectSet, TwoDimensionalAggregation, ThreeDimensionalAggregation } from \"@osdk/legacy-client\";\n ${Array.from(importedObjects).map(importedObject => `import type { ${importedObject} } from \"../objects/${importedObject}${importExt}\";`).join(\"\\n\")}\n\n export interface Queries {\n ${signatures.join(\"\\n\")}\n }\n `));\n}\nfunction handleQueryDataType(dataType, importedObjects, isReturnValue) {\n switch (dataType.type) {\n case \"boolean\":\n return \"boolean\";\n case \"string\":\n return \"string\";\n case \"double\":\n case \"float\":\n case \"integer\":\n return \"number\";\n case \"long\":\n return isReturnValue ? \"string\" : \"string | number\";\n case \"date\":\n return \"LocalDate\";\n case \"timestamp\":\n return \"Timestamp\";\n case \"attachment\":\n return \"Attachment\";\n case \"array\":\n return `Array<${handleQueryDataType(dataType.subType, importedObjects, isReturnValue)}>`;\n case \"object\":\n {\n const objectType = dataType.objectTypeApiName;\n importedObjects.add(objectType);\n return isReturnValue ? objectType : `${objectType} | ${objectType}[\"__primaryKey\"]`;\n }\n case \"objectSet\":\n {\n const objectType = dataType.objectTypeApiName;\n importedObjects.add(objectType);\n return `ObjectSet<${objectType}>`;\n }\n case \"set\":\n return `Set<${handleQueryDataType(dataType.subType, importedObjects, isReturnValue)}>`;\n case \"struct\":\n const properties = dataType.fields.map(field => {\n const isNullable = isNullableQueryDataType(field.fieldType);\n return `${field.name}${isNullable ? \"?\" : \"\"}: ${handleQueryDataType(field.fieldType, importedObjects, isReturnValue)}`;\n });\n return `{ ${properties.join(\",\\n\")} }`;\n case \"union\":\n return dataType.unionTypes.map(type => handleQueryDataType(type, importedObjects, isReturnValue)).filter(type => type !== \"null\").join(\"|\");\n case \"twoDimensionalAggregation\":\n dataType.valueType;\n return `TwoDimensionalAggregation<\n ${aggregationKeyToTypescriptType(dataType.keyType)},\n ${aggregationValueToTypescriptType(dataType.valueType)}\n >`;\n case \"threeDimensionalAggregation\":\n return `ThreeDimensionalAggregation<\n ${aggregationKeyToTypescriptType(dataType.keyType)},\n ${aggregationKeyToTypescriptType(dataType.valueType.keyType)},\n ${aggregationValueToTypescriptType(dataType.valueType.valueType)}\n >`;\n case \"null\":\n return \"null\";\n case \"unsupported\":\n throw new Error(\"Cannot generate queries for unsupported type\");\n default:\n const _ = dataType;\n throw new Error(`Cannot generate queries for type ${dataType.type}`);\n }\n}\nfunction aggregationKeyToTypescriptType(keyType) {\n switch (keyType.type) {\n case \"boolean\":\n return \"boolean\";\n case \"double\":\n case \"integer\":\n return \"number\";\n case \"string\":\n return \"string\";\n case \"date\":\n return \"LocalDate\";\n case \"timestamp\":\n return \"Timestamp\";\n case \"range\":\n return `Range<${aggregationRangeToTypescriptType(keyType.subType)}>`;\n default:\n const _ = keyType;\n throw new Error(`Unknown TwoDimensionalAggregation keyType ${keyType.type}`);\n }\n}\nfunction aggregationRangeToTypescriptType(subType) {\n switch (subType.type) {\n case \"date\":\n return \"LocalDate\";\n case \"double\":\n case \"integer\":\n return \"number\";\n case \"timestamp\":\n return \"Timestamp\";\n default:\n const _ = subType;\n throw new Error(`Unsupported QueryAggregationRangeSubType ${subType.type}`);\n }\n}\nfunction aggregationValueToTypescriptType(valueType) {\n switch (valueType.type) {\n case \"date\":\n return \"LocalDate\";\n case \"double\":\n return \"number\";\n case \"timestamp\":\n return \"Timestamp\";\n default:\n const _ = valueType;\n throw new Error(`Unsupported QueryAggregationValueType ${valueType.type}`);\n }\n}\nfunction sanitizeDocTypeName(type) {\n return type.replace(/\\s/g, \"\");\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { sanitizeMetadata } from \"../shared/sanitizeMetadata.js\";\nimport { verifyOutDir } from \"../util/verifyOutDir.js\";\nimport { generateActions } from \"./generateActions.js\";\nimport { generateBackCompatDeprecatedExports } from \"./generateBackCompatDeprecatedExports.js\";\nimport { generateBatchActions } from \"./generateBatchActions.js\";\nimport { generateBulkActions } from \"./generateBulkActions.js\";\nimport { generateFoundryClientFile } from \"./generateFoundryClientFile.js\";\nimport { generateIndexFile } from \"./generateIndexFile.js\";\nimport { generateMetadataFile } from \"./generateMetadataFile.js\";\nimport { generateObjectsInterfaceFile } from \"./generateObjectsInterfaceFile.js\";\nimport { generateObjectsInterfaceSupportFiles } from \"./generateObjectsInterfaceSupportFiles.js\";\nimport { generateOntologyIndexFile } from \"./generateOntologyIndexFile.js\";\nimport { generatePerActionDataFilesV1 } from \"./generatePerActionDataFilesV1.js\";\nimport { generatePerObjectInterfaceAndDataFiles } from \"./generatePerObjectInterfaceAndDataFiles.js\";\nimport { generatePerQueryDataFiles } from \"./generatePerQueryDataFiles.js\";\nimport { generateQueries } from \"./generateQueries.js\";\nexport async function generateClientSdkVersionOneDotOne(ontology, userAgent, fs, outDir, packageType = \"commonjs\") {\n const importExt = packageType === \"module\" ? \".js\" : \"\";\n const objectsDir = path.join(outDir, \"ontology\", \"objects\");\n const actionsDir = path.join(outDir, \"ontology\", \"actions\");\n const queriesDir = path.join(outDir, \"ontology\", \"queries\");\n await verifyOutDir(outDir, fs);\n await fs.mkdir(outDir, {\n recursive: true\n });\n const sanitizedOntology = sanitizeMetadata(ontology);\n const enhancedOntology = enhanceOntology(sanitizedOntology, undefined, new Map(), importExt);\n await generateFoundryClientFile(fs, outDir, importExt);\n await generateMetadataFile(sanitizedOntology, userAgent, fs, outDir, importExt);\n await generateOntologyIndexFile(fs, path.join(outDir, \"ontology\"));\n await generateObjectsInterfaceFile(sanitizedOntology, fs, objectsDir, importExt);\n await generateObjectsInterfaceSupportFiles(sanitizedOntology, fs, path.join(objectsDir, \"objects-api\"), importExt);\n await generatePerObjectInterfaceAndDataFiles(enhancedOntology, fs, objectsDir, importExt);\n const common = {\n sanitizedOntology,\n fs,\n outDir,\n ontology: enhancedOntology\n };\n await generateActions(sanitizedOntology, fs, actionsDir, importExt);\n await generateBatchActions(sanitizedOntology, fs, actionsDir, importExt);\n await generateBulkActions(sanitizedOntology, fs, actionsDir, importExt);\n await generatePerActionDataFilesV1(common);\n await generateQueries(sanitizedOntology, fs, queriesDir, importExt);\n await generatePerQueryDataFiles(common, false);\n await generateIndexFile(fs, outDir, importExt);\n await generateBackCompatDeprecatedExports(fs, outDir, importExt);\n}","/*\n * Copyright 2023 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 path from \"path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst ExpectedOsdkVersion = \"0.22.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nexport async function generateOntologyMetadataFile({\n fs,\n outDir,\n ontology,\n ontologyApiNamespace\n}, userAgent) {\n fs.writeFile(path.join(outDir, \"OntologyMetadata.ts\"), await formatTs(`\n export type $ExpectedClientVersion = \"${ExpectedOsdkVersion}\";\n export const $osdkMetadata = { extraUserAgent: \"${userAgent}\" };\n ${ontologyApiNamespace == null ? `\n export const $ontologyRid = \"${ontology.ontology.rid}\";\n ` : \"\"}\n `));\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function propertyJsdoc(property, {\n isInherited,\n apiName\n}) {\n let ret = `/**\\n`;\n const renderDisplayName = property.displayName && property.displayName !== apiName;\n if (isInherited || renderDisplayName || property.description) {\n if (isInherited) {\n ret += ` * (inherited from parent)\\n`;\n }\n if (renderDisplayName) {\n ret += ` * display name: '${property.displayName}'${property.description ? \",\" : \"\"}\\n`;\n }\n if (property.description) {\n ret += ` * description: ${property.description}\\n`;\n }\n } else {\n ret += ` * (no ontology metadata)\\n`;\n }\n ret += ` */\\n`;\n return ret;\n}","/*\n * Copyright 2023 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 { wireObjectTypeFullMetadataToSdkObjectTypeDefinition } from \"@osdk/generator-converters\";\nimport { EnhancedObjectType } from \"../GenerateContext/EnhancedObjectType.js\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { propertyJsdoc } from \"../shared/propertyJsdoc.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nexport function getObjectDefIdentifier(name, v2) {\n return v2 ? name : `${name}Def`;\n}\n\n/** @internal */\nexport function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {\n ontology\n}, currentFilePath) {\n const object = ontology.requireObjectType(wireObject.objectType.apiName, true);\n const uniqueLinkTargetTypes = new Set(wireObject.linkTypes.map(a => ontology.requireObjectType(a.objectTypeApiName, false)));\n const definition = deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectTypeDefinition(object.og, true));\n const objectDefIdentifier = object.getDefinitionIdentifier(true);\n const objectSetIdentifier = `${object.shortApiName}.ObjectSet`;\n const propertyKeysIdentifier = `${object.shortApiName}.PropertyKeys`;\n // const osdkObjectPropsIdentifier = `OsdkObjectProps$${objectDefIdentifier}`;\n const osdkObjectPropsIdentifier = `${object.shortApiName}.Props`;\n const osdkObjectStrictPropsIdentifier = `${object.shortApiName}.StrictProps`;\n const osdkObjectLinksIdentifier = `${object.shortApiName}.Links`;\n const osdkObjectIdentifier = `${object.shortApiName}.OsdkObject`;\n const identifiers = {\n objectDefIdentifier: `${object.shortApiName}.Definition`,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier\n };\n function getV2Types() {\n return `import type {\n AggregateOpts as $AggregateOpts,\n AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as $AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy,\n AggregationsResults as $AggregationsResults, \n Augments as $Augments,\n ConvertProps as $ConvertProps,\n DefaultToFalse as $DefaultToFalse,\n FetchPageArgs as $FetchPageArgs,\n FetchPageResult as $FetchPageResult,\n LinkedType as $LinkedType,\n LinkNames as $LinkNames,\n NullabilityAdherence as $NullabilityAdherence,\n NullabilityAdherenceDefault as $NullabilityAdherenceDefault,\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n OsdkObjectLinksEntry as $OsdkObjectLinksEntry,\n OsdkObjectLinksObject as $OsdkObjectLinksObject,\n OsdkObjectPropertyType as $OsdkObjectPropertyType,\n PageResult as $PageResult,\n PropertyValueClientToWire as $PropertyValueClientToWire,\n PropertyValueWireToClient as $PropType,\n Result as $Result,\n SelectArg as $SelectArg, \n SingleLinkAccessor as $SingleLinkAccessor,\n SingleLinkAccessor as $SingleLinkAccessor\n SingleOsdkResult as $SingleOsdkResult,\n ValidToFrom as $ValidToFrom,\n WhereClause as $WhereClause,\n } from \"@osdk/client.api\";\n import type * as $clientApi from \"@osdk/client.api\";\n import type {\n ObjectOrInterfacePropertyKeysFrom2 as $ObjectOrInterfacePropertyKeysFrom2, \n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectTypeLinkDefinition as $ObjectTypeLinkDefinition,\n } from \"@osdk/api\";\n\n export namespace ${object.shortApiName} {\n\n ${createPropertyKeys(object)}\n\n\n ${createLinks(ontology, object, \"Links\")}\n\n ${createProps(object, \"Props\", false)}\n ${createProps(object, \"StrictProps\", true)}\n\n ${createObjectSet(object, identifiers)}\n\n ${createDefinition(object, ontology, \"Definition\", identifiers)}\n ${createOsdkObject(object, \"OsdkObject\", identifiers)}\n } \n\n\n\n\n /** @deprecated use ${object.shortApiName}.Definition **/\n export type ${objectDefIdentifier} = ${object.shortApiName}.Definition;\n\n\n `;\n }\n const imports = getObjectImports(uniqueLinkTargetTypes, definition.apiName, currentFilePath, true);\n return `${imports}${getV2Types()}\n\n export const ${object.shortApiName}: ${objectDefIdentifier} & $VersionBound<$ExpectedClientVersion>\n = {\n osdkMetadata: $osdkMetadata,\n objectSet: undefined as any,\n props: undefined as any,\n strictProps: undefined as any,\n ${stringify(definition, {\n osdkMetadata: value => undefined\n })}\n \n };`;\n}\nexport function createOsdkObject(object, identifier, {\n osdkObjectPropsIdentifier,\n objectDefIdentifier,\n osdkObjectStrictPropsIdentifier,\n osdkObjectLinksIdentifier\n}) {\n const definition = object.getCleanedUpDefinition(true);\n return `\n export type ${identifier}<\n OPTIONS extends \"$strict\" | \"$notStrict\" | \"$rid\" = \"$strict\",\n K extends keyof ${osdkObjectPropsIdentifier}= keyof ${osdkObjectPropsIdentifier},\n\n > \n = $Osdk<\n ${objectDefIdentifier}, \n K | OPTIONS\n > & Pick<\n OPTIONS extends \"$notStrict\" ? ${osdkObjectPropsIdentifier} : ${osdkObjectStrictPropsIdentifier}\n , K\n> & {\n readonly $link: ${osdkObjectLinksIdentifier};\n readonly $title: string | undefined; // FIXME\n readonly $primaryKey: ${\"primaryKeyApiName\" in definition ? `\n $OsdkObjectPropertyType<${JSON.stringify(definition.properties[definition.primaryKeyApiName])},${true}>` : \"string | number\"}\n ;\n \n readonly $as: <NEW_Q extends $ValidToFrom<${objectDefIdentifier}>>(type: NEW_Q | string) => $Osdk<\n NEW_Q,\n $ConvertProps<${objectDefIdentifier}, NEW_Q, K>\n>;\n} & $OsdkObject<\"${object.fullApiName}\">;`;\n}\nexport function createObjectSet(object, {\n objectDefIdentifier,\n objectSetIdentifier,\n propertyKeysIdentifier,\n osdkObjectIdentifier\n}) {\n return `\nexport interface ObjectSet extends \n$ObjectSet<${objectDefIdentifier},\n\n${objectSetIdentifier}\n>\n{\nreadonly aggregate: <AO extends $AggregateOpts<${objectDefIdentifier}>>(\n req: $AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<${objectDefIdentifier}, AO>,\n) => Promise<$AggregationsResults<${objectDefIdentifier}, AO>>;\n\n\nreadonly pivotTo: <L extends $LinkNames<${objectDefIdentifier}>>(type: L) => $LinkedType<${objectDefIdentifier}, L>[\"objectSet\"];\n ${object instanceof EnhancedObjectType ? ` \nreadonly fetchOne: <\n L extends ${propertyKeysIdentifier},\n R extends boolean,\n S extends false | \"throw\" = $NullabilityAdherenceDefault,\n >(\n primaryKey: $PropertyValueClientToWire[${objectDefIdentifier}[\"primaryKeyType\"]],\n options?: $SelectArg<${objectDefIdentifier}, L, R, S>,\n ) => Promise<\n ${osdkObjectIdentifier}<\n (S extends false ? \"$notStrict\" : \"$strict\") | ($DefaultToFalse<R> extends false? never: \"$rid\" ),\n L\n >>\n ;\n\nreadonly fetchOneWithErrors: <\n L extends ${propertyKeysIdentifier},\n R extends boolean,\n S extends false | \"throw\" = $NullabilityAdherenceDefault,\n >(\n primaryKey: $PropertyValueClientToWire[${objectDefIdentifier}[\"primaryKeyType\"]],\n options?: $SelectArg<${objectDefIdentifier}, L, R, S>,\n ) => Promise<$Result<\n ${osdkObjectIdentifier}<\n (S extends false ? \"$notStrict\" : \"$strict\") | ($DefaultToFalse<R> extends false?never: \"$rid\"),\n L\n >\n >> \n \n;\n\n` : \"\"}\n\nreadonly fetchPage: <\n L extends ${propertyKeysIdentifier},\n R extends boolean,\n const A extends $Augments,\n S extends $NullabilityAdherence = $NullabilityAdherenceDefault,\n>(\n args?: $FetchPageArgs<${objectDefIdentifier}, L, R, A, S>,\n) => Promise<\n $PageResult<${osdkObjectIdentifier}<\n (S extends false ? \"$notStrict\" : \"$strict\") | ($DefaultToFalse<R> extends false? never: \"$rid\"),\n L\n >>\n>;\n\nreadonly fetchPageWithErrors: <\n L extends ${propertyKeysIdentifier},\n R extends boolean,\n const A extends $Augments,\n S extends $NullabilityAdherence = $NullabilityAdherenceDefault,\n>(\n args?: $FetchPageArgs<${objectDefIdentifier}, L, R, A, S>,\n) => Promise<$Result<\n $PageResult<${osdkObjectIdentifier}<\n (S extends false ? \"$notStrict\" : \"$strict\") | ($DefaultToFalse<R> extends false? never : \"$rid\"),\n L>>\n >>;\n\nreadonly asyncIter: () => AsyncIterableIterator<${osdkObjectIdentifier}>;\n}\n`;\n}\nfunction maybeStripNamespace(type, q) {\n if (type.apiNamespace && q.startsWith(`${type.apiNamespace}.`)) {\n return q.slice(type.apiNamespace.length + 1);\n } else {\n return q;\n }\n}\nexport function createProps(type, identifier, strict) {\n const definition = type.getCleanedUpDefinition(true);\n return `export interface ${identifier} {\n${stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => {\n return [`readonly \"${maybeStripNamespace(type, apiName)}\"${\n // after we convert everything over we can do this:\n // !strict || propertyDefinition.nullable ? \"?\" : \"\"\n \"\"}`, `$PropType[${JSON.stringify(propertyDefinition.type)}]${propertyDefinition.multiplicity ? \"[]\" : \"\"}${propertyDefinition.nullable || !strict ? `| undefined` : \"\"}`];\n }\n })}\n }`;\n}\nexport function createDefinition(object, ontology, identifier, {\n objectDefIdentifier,\n objectSetIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier\n}) {\n const definition = object.getCleanedUpDefinition(true);\n return `\n export interface ${identifier} extends ${object instanceof EnhancedObjectType ? `$ObjectTypeDefinition` : `$InterfaceDefinition`}<\"${object.fullApiName}\", ${objectDefIdentifier}>, $VersionBound<$ExpectedClientVersion> {\n osdkMetadata: typeof $osdkMetadata;\n objectSet: ${objectSetIdentifier};\n props: ${osdkObjectPropsIdentifier};\n strictProps: ${osdkObjectStrictPropsIdentifier};\n ${stringify(definition, {\n osdkMetadata: () => undefined,\n // we are going to reference another object instead\n type: () => undefined,\n apiName: () => undefined,\n links: _value => `{\n ${stringify(definition.links, {\n \"*\": definition => `$ObjectTypeLinkDefinition<${ontology.requireObjectType(definition.targetType).getImportedDefinitionIdentifier(true)}, ${definition.multiplicity}>`\n })}\n }`,\n properties: _value => `{\n ${stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => [`${propertyJsdoc(propertyDefinition, {\n apiName\n })}\"${maybeStripNamespace(object, apiName)}\"`, `$PropertyDef<\"${propertyDefinition.type}\", \"${propertyDefinition.nullable ? \"nullable\" : \"non-nullable\"}\", \"${propertyDefinition.multiplicity ? \"array\" : \"single\"}\">`]\n })}\n }`\n })}\n}\n `;\n}\nexport function createLinks(ontology, object, identifier) {\n const definition = object.getCleanedUpDefinition(true);\n return `\n ${Object.keys(definition.links).length === 0 ? `export type ${identifier} = never;` : `\n export interface ${identifier} {\n${stringify(definition.links, {\n \"*\": (definition, _, key) => {\n const linkTarget = ontology.requireObjectType(definition.targetType).getImportedDefinitionIdentifier(true);\n return [`readonly ${key}`, `${definition.multiplicity ? `${linkTarget}.ObjectSet` : `$SingleLinkAccessor<${linkTarget}.Definition>`}\n `];\n }\n })}\n }\n `}`;\n}\nexport function createPropertyKeys(type) {\n return `export type PropertyKeys = ${Object.keys(type.getCleanedUpDefinition(true).properties).map(a => maybeStripNamespace(type, a)).map(a => `\"${a}\"`).join(\"|\")};`;\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { wireActionTypeV2ToSdkActionDefinition } from \"../shared/wireActionTypeV2ToSdkActionDefinition.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { stringUnionFrom } from \"../util/stringUnionFrom.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { getDescriptionIfPresent } from \"../v1.1/wireObjectTypeV2ToV1ObjectInterfaceString.js\";\nimport { getObjectDefIdentifier } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\nexport async function generatePerActionDataFiles({\n sanitizedOntology: ontology,\n fs,\n outDir: rootOutDir,\n importExt = \"\",\n ontology: enhancedOntology\n}) {\n const outDir = path.join(rootOutDir, \"ontology\", \"actions\");\n await fs.mkdir(outDir, {\n recursive: true\n });\n await Promise.all(Object.values(enhancedOntology.actionTypes).map(async action => {\n const currentFilePath = `${path.join(\"ontology\", \"actions\", `${action.shortApiName}.ts`)}`;\n const uniqueApiNamesArray = extractReferencedObjectsFromAction(action.og);\n const uniqueApiNames = new Set(uniqueApiNamesArray);\n const uniqueApiNamesString = stringUnionFrom([...uniqueApiNames]);\n const fullActionDef = deleteUndefineds(wireActionTypeV2ToSdkActionDefinition(action.og));\n const {\n parameters,\n ...actionDefSansParameters\n } = fullActionDef;\n function createParamsDef() {\n const entries = Object.entries(parameters);\n entries.sort((a, b) => a[0].localeCompare(b[0]));\n if (entries.length === 0) {\n return `// Represents the definition of the parameters for the action\n export type ParamsDefinition = Record<string, never>;`;\n }\n return `// Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n ${entries.map(([key, value]) => {\n return `\"${key}\": {\n ${stringify(value, {\n description: (value, d) => value ? d(value) : undefined,\n // trick to remove undefineds\n type: type => {\n if (typeof type === \"string\") {\n return JSON.stringify(type);\n } else if (type.type === \"object\") {\n const obj = enhancedOntology.requireObjectType(type.object);\n return `ObjectActionDataType<\"${obj.fullApiName}\", ${obj.getImportedDefinitionIdentifier(true)}>`;\n } else if (type.type === \"objectSet\") {\n return `ObjectSetActionDataType<\"${type.objectSet}\", ${getObjectDefIdentifier(type.objectSet, true)}>`;\n }\n return undefined;\n }\n })}\n }`;\n }).join(\";\\n\")}\n }`;\n }\n function getActionParamType(input) {\n if (typeof input === \"string\") {\n return `ActionParam.PrimitiveType<${JSON.stringify(input)}>`;\n } else if (input.type === \"object\") {\n return `ActionParam.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;\n } else if (input.type === \"objectSet\") {\n return `ActionParam.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}>`;\n }\n }\n function createV2Types() {\n const oldParamsIdentifier = `${action.shortApiName}$Params`;\n // the params must be a `type` to align properly with the `ActionDefinition` interface\n // this way we can generate a strict type for the function itself and reference it from the Action Definition\n return `\n \n export namespace ${action.shortApiName}{\n ${createParamsDef()}\n\n ${getDescriptionIfPresent(action.description)}\n export interface Parameters {\n ${stringify(parameters, {\n \"*\": (ogValue, _, ogKey) => {\n const key = `${getDescriptionIfPresent(ogValue.description)}\n readonly \"${ogKey}\"${ogValue.nullable ? \"?\" : \"\"}`;\n const value = ogValue.multiplicity ? `ReadonlyArray<${getActionParamType(ogValue.type)}>` : `${getActionParamType(ogValue.type)}`;\n return [key, value];\n }\n })}\n }\n\n\n // Represents the definition of the action\n export interface Definition extends ActionDefinition<\"${action.shortApiName}\", ${uniqueApiNamesString}, ${action.shortApiName}>, VersionBound<$ExpectedClientVersion> {\n ${Object.entries(actionDefSansParameters).sort((a, b) => a[0].localeCompare(b[0])).map(([key, value]) => {\n return `${key}: ${JSON.stringify(value)};`;\n }).join(\"\\n\")}\n parameters: ${action.definitionParamsIdentifier};\n osdkMetadata: typeof $osdkMetadata;\n }\n\n // Represents a fqn of the action\n export interface Signature {\n ${getDescriptionIfPresent(action.description)}\n <P extends ${action.paramsIdentifier} | ReadonlyArray<${action.paramsIdentifier}>, OP extends (P extends ReadonlyArray<${action.paramsIdentifier}> ? ApplyBatchActionOptions: ApplyActionOptions)>(args: P, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;\n }\n \n }\n\n /**\n * @deprecated Use \\`${action.paramsIdentifier}\\`\n */\n export type ${oldParamsIdentifier} = ${action.paramsIdentifier} | ReadonlyArray<${action.paramsIdentifier}>;\n\n /** @deprecated Use \\`${action.definitionIdentifier}\\` **/\n export type ${action.shortApiName} = ${action.shortApiName}.Signature;\n `;\n }\n function createV2Object() {\n return ` export const ${action.shortApiName}: ${action.definitionIdentifier} = \n {\n ${stringify(fullActionDef)},\n osdkMetadata: $osdkMetadata\n }\n `;\n }\n const referencedObjectDefs = new Set();\n for (const p of Object.values(action.parameters)) {\n if (p.dataType.type === \"object\" || p.dataType.type === \"objectSet\") {\n if (p.dataType.objectApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.objectApiName));\n }\n if (p.dataType.objectTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.objectTypeApiName));\n }\n }\n if (p.dataType.type === \"array\" && (p.dataType.subType.type === \"object\" || p.dataType.subType.type === \"objectSet\")) {\n if (p.dataType.subType.objectApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.subType.objectApiName));\n }\n if (p.dataType.subType.objectTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.subType.objectTypeApiName));\n }\n }\n }\n const imports = getObjectImports(referencedObjectDefs, undefined, currentFilePath, true);\n await fs.writeFile(path.join(rootOutDir, currentFilePath), await formatTs(`\n import type { ActionDefinition, ObjectActionDataType, ObjectSetActionDataType, VersionBound} from \"@osdk/api\";\n import type { ApplyActionOptions, ApplyBatchActionOptions, ActionReturnTypeForOptions, ActionParam } from '@osdk/client.api';\n import { $osdkMetadata} from \"../../OntologyMetadata${importExt}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${imports}\n\n \n ${createV2Types()}\n\n ${createV2Object()}\n `));\n }));\n const indexFileRelPath = path.join(\"ontology\", \"actions.ts\");\n await fs.writeFile(path.join(rootOutDir, indexFileRelPath), await formatTs(`\n ${Object.values(enhancedOntology.actionTypes).map(action => {\n const exportConstLine = `export {${action.shortApiName} } from \"${action.getImportPathRelTo(indexFileRelPath)}\";`;\n return exportConstLine;\n }).join(\"\\n\")}\n ${Object.keys(ontology.actionTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n}\nfunction extractReferencedObjectsFromAction(actionType) {\n const referencedObjectsInParameters = Object.values(actionType.parameters).flatMap(({\n dataType\n }) => {\n const objectTypeReference = extractReferencedObjectsFromActionParameter(dataType);\n return objectTypeReference ? [objectTypeReference] : [];\n });\n const referenceObjectsInEdits = actionType.operations.flatMap(value => {\n switch (value.type) {\n case \"createObject\":\n return [value.objectTypeApiName];\n case \"modifyObject\":\n return [value.objectTypeApiName];\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n return [];\n }\n });\n return [...referenceObjectsInEdits, ...referencedObjectsInParameters];\n}\nfunction extractReferencedObjectsFromActionParameter(actionParameter) {\n switch (actionParameter.type) {\n case \"objectSet\":\n case \"object\":\n return actionParameter.objectTypeApiName;\n case \"array\":\n return extractReferencedObjectsFromActionParameter(actionParameter.subType);\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"date\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n return undefined;\n }\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getObjectTypeApiNamesFromQuery } from \"../shared/getObjectTypeApiNamesFromQuery.js\";\nimport { wireQueryDataTypeToQueryDataTypeDefinition } from \"../shared/wireQueryDataTypeToQueryDataTypeDefinition.js\";\nimport { wireQueryParameterV2ToQueryParameterDefinition as paramToDef, wireQueryTypeV2ToSdkQueryDefinitionNoParams } from \"../shared/wireQueryTypeV2ToSdkQueryDefinition.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { getDescriptionIfPresent } from \"../v1.1/wireObjectTypeV2ToV1ObjectInterfaceString.js\";\nexport async function generatePerQueryDataFilesV2({\n fs,\n outDir: rootOutDir,\n ontology,\n importExt = \"\"\n}, v2) {\n const relOutDir = path.join(\".\", \"ontology\", \"queries\");\n const outDir = path.join(rootOutDir, \"ontology\", \"queries\");\n await fs.mkdir(outDir, {\n recursive: true\n });\n await Promise.all(Object.values(ontology.queryTypes).map(async query => {\n await generateV2QueryFile(fs, outDir, relOutDir, query, importExt, ontology);\n }));\n const indexFilePath = `${outDir}.ts`;\n await fs.writeFile(indexFilePath, await formatTs(`\n ${Object.values(ontology.queryTypes).map(query => `export * from \"${query.getImportPathRelTo(relOutDir)}\";`).join(\"\\n\")}\n ${Object.keys(ontology.queryTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n}\nasync function generateV2QueryFile(fs, outDir, relOutDir, query, importExt, ontology) {\n const relFilePath = path.join(relOutDir, `${query.shortApiName}.ts`);\n const objectTypes = getObjectTypeApiNamesFromQuery(query);\n const importObjects = getObjectImports(ontology, objectTypes, relFilePath);\n const baseProps = deleteUndefineds(wireQueryTypeV2ToSdkQueryDefinitionNoParams(query.og));\n const outputBase = deleteUndefineds(wireQueryDataTypeToQueryDataTypeDefinition(query.output));\n const referencedObjectTypes = objectTypes.length > 0 ? objectTypes.map(apiNameObj => `\"${apiNameObj}\"`).join(\"|\") : \"never\";\n await fs.writeFile(path.join(outDir, `${query.shortApiName}.ts`), await formatTs(`\n import type { QueryDefinition , VersionBound} from \"@osdk/api\";\n import type { QueryParam, QueryResult } from \"@osdk/client.api\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${importObjects}\n\n export namespace ${query.shortApiName} {\n export interface Signature {\n ${getDescriptionIfPresent(query.description)}\n (${Object.keys(query.parameters).length > 0 ? `query: ${query.paramsIdentifier}` : \"\"}): Promise<${getQueryParamType(ontology, paramToDef({\n dataType: query.output\n }), \"Result\")}>\n }\n\n ${Object.keys(query.parameters).length > 0 ? `\n export interface Parameters {\n ${stringify(query.parameters, {\n \"*\": (parameter, formatter, apiName) => {\n const q = paramToDef(parameter);\n return [`\n ${queryParamJsDoc(paramToDef(parameter), {\n apiName\n })}readonly \"${apiName}\"${q.nullable ? \"?\" : \"\"}`, `${getQueryParamType(ontology, q, \"Param\")}`];\n }\n })}\n }\n \n ` : \"\"}\n\n export interface Definition extends QueryDefinition<\n \"${query.fullApiName}\", \n ${referencedObjectTypes},\n ${query.shortApiName}.Signature\n >, VersionBound<$ExpectedClientVersion>{\n ${stringify(baseProps)},\n parameters: {\n ${parameterDefsForType(ontology, query)}\n };\n output: {\n ${stringify(outputBase)},\n ${getLineFor__OsdkTargetType(ontology, query.output)}\n };\n }\n\n }\n\n /** @deprecated use \\`${query.shortApiName}.Signature\\' instead */\n export type ${query.shortApiName} = ${query.shortApiName}.Signature;\n\n\n\n\n\n export const ${query.shortApiName}: ${query.definitionIdentifier} = {\n ${stringify(baseProps)},\n parameters: {\n ${parametersForConst(query)}\n },\n output: {\n ${stringify(outputBase)},\n }\n };\n `));\n}\nfunction parametersForConst(query) {\n return stringify(query.parameters, {\n \"*\": (parameter, formatter) => formatter(deleteUndefineds(paramToDef(parameter)))\n });\n}\nfunction parameterDefsForType(ontology, query) {\n return stringify(query.parameters, {\n \"*\": (parameter, valueFormatter, apiName) => [`${queryParamJsDoc(paramToDef(parameter), {\n apiName\n })} ${apiName}`, ` {\n ${stringify(deleteUndefineds(paramToDef(parameter)))},\n ${getLineFor__OsdkTargetType(ontology, parameter.dataType)}\n }`]\n });\n}\nfunction getLineFor__OsdkTargetType(ontology, qdt) {\n if (qdt.type === \"object\" || qdt.type === \"objectSet\") {\n return `__OsdkTargetType?: ${ontology.requireObjectType(qdt.objectTypeApiName).getImportedDefinitionIdentifier(true)}`;\n }\n return \"\";\n}\nexport function queryParamJsDoc(param, {\n apiName\n}) {\n let ret = `/**\\n`;\n if (param.description) {\n if (param.description) {\n ret += ` * description: ${param.description}\\n`;\n }\n } else {\n ret += ` * (no ontology metadata)\\n`;\n }\n ret += ` */\\n`;\n return ret;\n}\nfunction getObjectImports(enhancedOntology, objectTypes, filePath) {\n let ret = \"\";\n for (const fqObjectApiName of objectTypes) {\n const obj = enhancedOntology.requireObjectType(fqObjectApiName);\n ret += `import type { ${obj.getDefinitionIdentifier(true)} as ${obj.getImportedDefinitionIdentifier(true)} } from \"${obj.getImportPathRelTo(filePath)}\";\\n`;\n }\n return ret;\n}\nexport function getQueryParamType(enhancedOntology, input, type) {\n let inner = `unknown /* ${input.type} */`;\n switch (input.type) {\n case \"date\":\n inner = `Query${type}.PrimitiveType<${JSON.stringify(\"datetime\")}>`;\n break;\n case \"attachment\":\n case \"boolean\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"string\":\n case \"struct\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n inner = `Query${type}.PrimitiveType<${JSON.stringify(input.type)}>`;\n break;\n case \"object\":\n inner = `Query${type}.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"objectSet\":\n inner = `Query${type}.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"set\":\n inner = `${type === \"Param\" ? \"Readonly\" : \"\"}Set<${getQueryParamType(enhancedOntology, input.set, type)}>`;\n break;\n case \"union\":\n inner = input.union.map(u => getQueryParamType(enhancedOntology, u, type)).join(\" | \");\n break;\n }\n if (input.multiplicity && type === \"Param\") {\n return `ReadonlyArray<${inner}>`;\n } else if (input.multiplicity) {\n return `Array<${inner}>`;\n }\n return inner;\n}","/*\n * Copyright 2023 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 { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport fastDeepEqual from \"fast-deep-equal\";\nimport invariant from \"tiny-invariant\";\nimport { propertyJsdoc } from \"../shared/propertyJsdoc.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { createDefinition, createObjectSet, createOsdkObject, createPropertyKeys, createProps } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\n\n/** @internal */\nexport function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology, v2 = false) {\n const definition = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceDef.og, v2));\n const objectDefIdentifier = interfaceDef.getDefinitionIdentifier(v2);\n const parents = definition.implements?.map(p => {\n !(ontology.interfaceTypes[p] != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected to find a parent interface named ${p} in the ontology and did not.`) : invariant(false) : void 0;\n const it = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(ontology.requireInterfaceType(p, true).og, v2));\n return it;\n }) ?? [];\n const mergedProperties = {\n ...definition.properties\n };\n for (const parent of parents) {\n for (const apiName of Object.keys(parent.properties)) {\n if (definition.properties[apiName] != null) {\n !fastDeepEqual(definition.properties[apiName], parent.properties[apiName]) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface ${definition.apiName} redefines property '${apiName}' from parent '${parent.apiName}' but the properties do not match`) : invariant(false) : void 0;\n } else if (mergedProperties[apiName] != null) {\n !fastDeepEqual(mergedProperties[apiName], parent.properties[apiName]) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Some interface defines a conflicting property '${apiName}' that does not match property from parent '${parent.apiName}'`) : invariant(false) : void 0;\n }\n mergedProperties[apiName] = parent.properties[apiName];\n }\n }\n const ogProperties = definition.properties;\n definition.properties = mergedProperties;\n function localPropertyJsdoc(apiName) {\n const property = definition.properties[apiName];\n const isInherited = ogProperties[apiName] == null;\n return propertyJsdoc(property, {\n isInherited,\n apiName\n });\n }\n function maybeStripNamespace(q) {\n if (interfaceDef.apiNamespace && q.startsWith(`${interfaceDef.apiNamespace}.`)) {\n return q.slice(interfaceDef.apiNamespace.length + 1);\n } else {\n return q;\n }\n }\n const objectSetIdentifier = `${interfaceDef.shortApiName}.ObjectSet`;\n const propertyKeysIdentifier = `${interfaceDef.shortApiName}.PropertyKeys`;\n // const osdkObjectPropsIdentifier = `OsdkObjectProps$${objectDefIdentifier}`;\n const osdkObjectPropsIdentifier = `${interfaceDef.shortApiName}.Props`;\n const osdkObjectStrictPropsIdentifier = `${interfaceDef.shortApiName}.StrictProps`;\n const osdkObjectLinksIdentifier = `OsdkObjectLinks$${objectDefIdentifier}`;\n const osdkObjectIdentifier = `${interfaceDef.shortApiName}.OsdkObject`;\n const ids = {\n objectDefIdentifier: `${interfaceDef.shortApiName}.Definition`,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier\n };\n function getV2Types() {\n return `import type {\n AggregateOpts as $AggregateOpts,\n AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as $AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy,\n AggregationsResults as $AggregationsResults, \n Augments as $Augments,\n ConvertProps as $ConvertProps,\n DefaultToFalse as $DefaultToFalse,\n FetchPageArgs as $FetchPageArgs,\n FetchPageResult as $FetchPageResult,\n LinkedType as $LinkedType,\n LinkNames as $LinkNames,\n NullabilityAdherence as $NullabilityAdherence,\n NullabilityAdherenceDefault as $NullabilityAdherenceDefault,\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n OsdkObjectLinksEntry as $OsdkObjectLinksEntry,\n OsdkObjectLinksObject as $OsdkObjectLinksObject,\n OsdkObjectPropertyType as $OsdkObjectPropertyType,\n PageResult as $PageResult,\n PropertyValueClientToWire as $PropertyValueClientToWire,\n PropertyValueWireToClient as $PropType,\n Result as $Result,\n SelectArg as $SelectArg, \n SingleLinkAccessor as $SingleLinkAccessor,\n SingleOsdkResult as $SingleOsdkResult,\n ValidToFrom as $ValidToFrom,\n WhereClause as $WhereClause,\n } from \"@osdk/client.api\";\n import type * as $clientApi from \"@osdk/client.api\";\n import type {\n ObjectOrInterfacePropertyKeysFrom2 as $ObjectOrInterfacePropertyKeysFrom2, \n ObjectTypeLinkDefinition as $ObjectTypeLinkDefinition,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n InterfaceDefinition as $InterfaceDefinition,\n } from \"@osdk/api\";\n\n \n\n ${Object.keys(definition.links).length === 0 ? `export type ${osdkObjectLinksIdentifier} = never;` : `\n export interface ${osdkObjectLinksIdentifier} {\n${stringify(definition.links, {\n \"*\": definition => {\n const linkTarget = ontology.requireObjectType(definition.targetType).getImportedDefinitionIdentifier(v2);\n return `${definition.multiplicity ? `${linkTarget}[\"objectSet\"]` : `SingleLinkAccessor<${linkTarget}>`}\n `;\n }\n })}\n }\n `}\n\n export namespace ${interfaceDef.shortApiName} {\n\n ${createPropertyKeys(interfaceDef)}\n\n\n ${createProps(interfaceDef, \"Props\", false)}\n ${createProps(interfaceDef, \"StrictProps\", true)}\n\n\n ${createObjectSet(interfaceDef, ids)}\n\n ${createDefinition(interfaceDef, ontology, \"Definition\", ids)}\n\n ${createOsdkObject(interfaceDef, \"OsdkObject\", ids)}\n \n } \n\n\n\n\n /** @deprecated use ${interfaceDef.shortApiName}.Definition **/\n export type ${objectDefIdentifier} = ${interfaceDef.shortApiName}.Definition;\n\n\n\n\n`;\n }\n\n // FIXME: We need to fill in the imports\n // if we want links to work\n const imports = [];\n return `${imports.join(\"\\n\")}\n ${v2 ? getV2Types() : \"\"}\n\n export const ${interfaceDef.shortApiName}: ${interfaceDef.shortApiName}.Definition = {\n osdkMetadata: $osdkMetadata,\n objectSet: undefined as any,\n props: undefined as any,\n strictProps: undefined as any,\n ${stringify(definition, {\n osdkMetadata: () => undefined,\n properties: properties => `{\n ${stringify(properties, {\n \"*\": (propertyDefinition, _, key) => [`\"${maybeStripNamespace(key)}\"`, _(propertyDefinition)]\n })}\n }`\n })}\n \n };`;\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { sanitizeMetadata } from \"../shared/sanitizeMetadata.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { verifyOutDir } from \"../util/verifyOutDir.js\";\nimport { generateOntologyMetadataFile } from \"./generateMetadata.js\";\nimport { generatePerActionDataFiles } from \"./generatePerActionDataFiles.js\";\nimport { generatePerQueryDataFilesV2 } from \"./generatePerQueryDataFiles.js\";\nimport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst } from \"./UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js\";\nimport { wireObjectTypeV2ToSdkObjectConstV2 } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\nasync function generateRootIndexTsFile({\n fs,\n outDir,\n importExt,\n ontologyApiNamespace\n}) {\n fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`${ontologyApiNamespace == null ? `export { $ontologyRid } from \"./OntologyMetadata${importExt}\";` : ``}\n export * from \"./ontology/actions${importExt}\";\n export * from \"./ontology/objects${importExt}\";\n export * from \"./ontology/interfaces${importExt}\";\n export * from \"./ontology/queries${importExt}\";\n `));\n}\nasync function generateEachObjectFile(ctx) {\n const {\n fs,\n outDir,\n ontology,\n importExt\n } = ctx;\n await fs.mkdir(path.join(outDir, \"ontology\", \"objects\"), {\n recursive: true\n });\n for (const obj of Object.values(ontology.objectTypes)) {\n const relPath = path.join(\".\", \"ontology\", `objects`, `${obj.shortApiName}.ts`);\n const outFilePath = path.join(outDir, relPath);\n await fs.writeFile(outFilePath, await formatTs(`\n import type { VersionBound as $VersionBound, PropertyDef as $PropertyDef } from \"@osdk/api\";\n import type { Osdk } from \"@osdk/client.api\";\n import { $osdkMetadata } from \"../../OntologyMetadata${importExt}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${wireObjectTypeV2ToSdkObjectConstV2(obj.og, ctx, relPath)}\n `));\n }\n}\nexport async function generateClientSdkVersionTwoPointZero(ontology, userAgent, fs, outDir, packageType = \"commonjs\", ontologyApiNamespace, apiNamespacePackageMap = new Map()) {\n const importExt = packageType === \"module\" ? \".js\" : \"\";\n await verifyOutDir(outDir, fs);\n const sanitizedOntology = sanitizeMetadata(ontology);\n await fs.mkdir(outDir, {\n recursive: true\n });\n const enhancedOntology = enhanceOntology(sanitizedOntology, ontologyApiNamespace, apiNamespacePackageMap, importExt);\n const ctx = {\n sanitizedOntology,\n ontology: enhancedOntology,\n importExt,\n fs,\n outDir,\n ontologyApiNamespace,\n apiNamespacePackageMap\n };\n await generateRootIndexTsFile(ctx);\n await generateOntologyMetadataFile(ctx, userAgent);\n await generateEachObjectFile(ctx);\n await generateOntologyInterfaces(ctx);\n const actionsDir = path.join(outDir, \"ontology\", \"actions\");\n await fs.mkdir(actionsDir, {\n recursive: true\n });\n await generatePerActionDataFiles(ctx);\n await fs.writeFile(path.join(outDir, \"ontology\", \"objects.ts\"), await formatTs(`\n ${Object.values(enhancedOntology.objectTypes).map(objType => `export * from \"./objects/${objType.shortApiName}${importExt}\";`).join(\"\\n\")}\n ${Object.keys(ontology.objectTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n await generatePerQueryDataFilesV2(ctx, true);\n}\n\n/** @internal */\nasync function generateOntologyInterfaces({\n fs,\n outDir,\n ontology,\n importExt\n}) {\n const interfacesDir = path.join(outDir, \"ontology\", \"interfaces\");\n await fs.mkdir(interfacesDir, {\n recursive: true\n });\n for (const obj of Object.values(ontology.interfaceTypes)) {\n await fs.writeFile(path.join(interfacesDir, `${obj.shortApiName}.ts`), await formatTs(`\n \n import type { PropertyDef as $PropertyDef, VersionBound as $VersionBound } from \"@osdk/api\";\n import { $osdkMetadata, $expectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(obj, ontology, true)}\n `));\n }\n await fs.writeFile(interfacesDir + \".ts\", await formatTs(`\n ${Object.values(ontology.interfaceTypes).map(interfaceType => `export * from \"./interfaces/${interfaceType.shortApiName}${importExt}\";`).join(\"\\n\")}\n ${Object.keys(ontology.interfaceTypes).length === 0 ? \"export {}\" : \"\"}\n `));\n}","/*\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 * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { generateClientSdkVersionOneDotOne } from \"./v1.1/generateClientSdkVersionOneDotOne.js\";\nimport { generateClientSdkVersionTwoPointZero } from \"./v2.0/generateClientSdkVersionTwoPointZero.js\";\nexport async function generateClientSdkPackage(packageName, packageVersion, sdkVersion, baseOutDir, ontology, minimalFs, dependencyVersions, cliVersion, ontologyApiNamespace, apiNamespacePackageMap) {\n if (!packageName) throw new Error(\"Package name is require\");\n for (const packageType of [\"module\", \"commonjs\"]) {\n const outDir = path.join(baseOutDir, \"dist\", packageType);\n await (sdkVersion === \"1.1\" ? generateClientSdkVersionOneDotOne : sdkVersion === \"2.0\" ? generateClientSdkVersionTwoPointZero : undefined)(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType, ontologyApiNamespace, apiNamespacePackageMap);\n await fs.promises.mkdir(outDir, {\n recursive: true\n });\n await writeJson(minimalFs, path.join(outDir, \"package.json\"), {\n type: packageType\n });\n await writeJson(minimalFs, path.join(outDir, `tsconfig.json`), {\n compilerOptions: getTsCompilerOptions(packageType)\n });\n }\n await writeJson(minimalFs, path.join(baseOutDir, \"package.json\"), await getPackageJsonContents(packageName, packageVersion, sdkVersion, dependencyVersions));\n\n // we need to shim for the node10 resolver\n await minimalFs.mkdir(path.join(baseOutDir, \"ontology\"), {\n recursive: true\n });\n await minimalFs.writeFile(path.join(baseOutDir, \"ontology\", \"objects.js\"), `module.exports = require(\"../../dist/module/ontology/objects\")`);\n await minimalFs.writeFile(path.join(baseOutDir, \"ontology\", \"objects.d.ts\"), `export * from \"../dist/module/ontology/objects\"`);\n}\nfunction getTsCompilerOptions(packageType) {\n const commonTsconfig = {\n importHelpers: true,\n declaration: true,\n isolatedModules: true,\n esModuleInterop: true,\n forceConsistentCasingInFileNames: true,\n strict: true,\n skipLibCheck: true\n };\n const compilerOptions = packageType === \"commonjs\" ? {\n ...commonTsconfig,\n module: \"commonjs\",\n target: \"es2018\"\n } : {\n ...commonTsconfig,\n module: \"NodeNext\",\n target: \"ES2020\"\n };\n return compilerOptions;\n}\nexport function getExpectedDependencies(sdkVersion, {\n osdkApiVersion,\n osdkClientVersion,\n osdkClientApiVersion,\n osdkLegacyClientVersion\n}) {\n return {\n devDependencies: {\n \"@osdk/api\": osdkApiVersion,\n ...(sdkVersion === \"2.0\" ? {\n \"@osdk/client.api\": osdkClientApiVersion\n } : {\n \"@osdk/legacy-client\": osdkLegacyClientVersion\n })\n },\n peerDependencies: {\n \"@osdk/api\": osdkApiVersion,\n ...(sdkVersion === \"2.0\" ? {\n \"@osdk/client.api\": osdkClientApiVersion,\n \"@osdk/client\": osdkClientVersion\n } : {\n \"@osdk/legacy-client\": osdkLegacyClientVersion\n })\n }\n };\n}\nfunction getExpectedDependenciesFull(sdkVersion, dependencyVersions) {\n const {\n typescriptVersion,\n tslibVersion,\n areTheTypesWrongVersion\n } = dependencyVersions;\n const base = getExpectedDependencies(sdkVersion, dependencyVersions);\n return {\n devDependencies: {\n ...base.devDependencies,\n \"typescript\": typescriptVersion,\n \"tslib\": tslibVersion,\n \"@arethetypeswrong/cli\": areTheTypesWrongVersion\n },\n peerDependencies: {\n ...base.peerDependencies\n }\n };\n}\nexport function getPackageJsonContents(name, version, sdkVersion, dependencyVersions) {\n const esmPrefix = \"./dist/module\";\n const commonjsPrefix = \"./dist/commonjs\";\n return {\n name,\n version,\n main: `${commonjsPrefix}/index.js`,\n module: `${esmPrefix}/index.js`,\n exports: {\n \".\": {\n import: `${esmPrefix}/index.js`,\n require: `${commonjsPrefix}/index.js`\n },\n \"./ontology/objects\": {\n import: `${esmPrefix}/ontology/objects${sdkVersion === \"2.0\" ? \"\" : \"/index\"}.js`,\n require: `${commonjsPrefix}/ontology/objects${sdkVersion === \"2.0\" ? \"\" : \"/index\"}.js`\n }\n },\n scripts: {\n prepack: `tsc -p ${esmPrefix}/tsconfig.json && tsc -p ${commonjsPrefix}/tsconfig.json`,\n check: \"npm exec attw $(npm pack)\"\n },\n ...getExpectedDependenciesFull(sdkVersion, dependencyVersions),\n files: [\"**/*.js\", \"**/*.d.ts\", \"dist/**/package.json\"]\n };\n}\nasync function writeJson(minimalFs, filePath, body) {\n // consola.info(`Writing ${filePath}`);\n // consola.debug(`Writing ${filePath} with body`, body);\n return await minimalFs.writeFile(filePath, JSON.stringify(body, undefined, 2) + \"\\n\");\n}"]}
1
+ {"version":3,"sources":["../../src/GenerateContext/EnhancedBase.ts","../../src/GenerateContext/EnhancedAction.ts","../../src/util/deleteUndefineds.ts","../../src/GenerateContext/EnhancedInterfaceType.ts","../../src/GenerateContext/EnhancedObjectType.ts","../../src/GenerateContext/EnhancedQuery.ts","../../src/GenerateContext/EnhancedSharedPropertyType.ts","../../src/GenerateContext/ForeignType.ts","../../src/GenerateContext/EnhancedOntologyDefinition.ts","../../src/GenerateContext/enhanceOntology.ts","../../src/shared/sanitizeMetadata.ts","../../src/util/verifyOutDir.ts","../../src/shared/getEditedEntities.ts","../../src/util/test/formatTs.ts","../../src/v1.1/generateActions.ts","../../src/v1.1/backcompat/util/reexportConsts.ts","../../src/v1.1/backcompat/internal-foundry-oauth-dist/generateConfidentialClientDir.ts","../../src/v1.1/backcompat/internal-foundry-oauth-dist/generatePublicClientDir.ts","../../src/v1.1/backcompat/internal-foundry-oauth-dist/generateUserTokenDir.ts","../../src/v1.1/backcompat/util/reexportTypes.ts","../../src/v1.1/backcompat/generateOAuthDistDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/aggregations/generateAggregationsAggregations.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/aggregations/generateGroupBy.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/aggregations/generateMetrics.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateAggregationsDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateAttachmentsDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateGeoshapesDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateObjectSetDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateSharedObjectCode.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateTimeSeriesDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateBaseTypesDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateClientDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateFiltersDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/ontologyProvider/generateErrors.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/ontologyProvider/generateOntologyMetadata.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/ontologyProvider/generateResult.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateOntologyProviderDir.ts","../../src/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generatePagingDir.ts","../../src/v1.1/backcompat/generateOntologyRuntimeDistDir.ts","../../src/v1.1/generateBackCompatDeprecatedExports.ts","../../src/v1.1/generateBatchActions.ts","../../src/v1.1/generateBulkActions.ts","../../src/v1.1/generateFoundryClientFile.ts","../../src/v1.1/generateIndexFile.ts","../../src/util/commaSeparatedIdentifiers.ts","../../src/util/commaSeparatedTypeIdentifiers.ts","../../src/v1.1/generateMetadataFile.ts","../../src/v1.1/generateObjectsInterfaceFile.ts","../../src/v1.1/generateObjectsInterfaceSupportFiles.ts","../../src/v1.1/generateOntologyIndexFile.ts","../../src/shared/getObjectImports.ts","../../src/shared/wireActionTypeV2ToSdkActionDefinition.ts","../../src/util/stringUnionFrom.ts","../../src/v1.1/generatePerActionDataFilesV1.ts","../../src/util/stringify.ts","../../src/v1.1/wireObjectTypeV2ToSdkObjectConstV1.ts","../../src/util/reservedKeywords.ts","../../src/v1.1/wireObjectTypeV2ToV1ObjectInterfaceString.ts","../../src/v1.1/generatePerObjectInterfaceAndDataFiles.ts","../../src/shared/getObjectTypesFromQueryDataType.ts","../../src/shared/getObjectTypeApiNamesFromQuery.ts","../../src/shared/isNullableQueryDataType.ts","../../src/shared/wireQueryDataTypeToQueryDataTypeDefinition.ts","../../src/shared/wireQueryTypeV2ToSdkQueryDefinition.ts","../../src/v1.1/generatePerQueryDataFiles.ts","../../src/v1.1/generateQueries.ts","../../src/v1.1/generateClientSdkVersionOneDotOne.ts","../../src/v2.0/generateMetadata.ts","../../src/shared/propertyJsdoc.ts","../../src/v2.0/wireObjectTypeV2ToSdkObjectConstV2.ts","../../src/v2.0/generatePerActionDataFiles.ts","../../src/v2.0/generatePerQueryDataFiles.ts","../../src/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.ts","../../src/v2.0/generateClientSdkVersionTwoPointZero.ts","../../src/generateClientSdkPackage.ts"],"names":["path","fs","path6","path7","path8","path9","path10","path12","path15","path19","path20","path21","path22","path23","path24","path28","join","path31","stringUnionFrom","value","wireObjectTypeFullMetadataToSdkObjectTypeDefinition","definition","path36","extractReferencedObjectsFromAction","extractRefer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AA,IACA,IAAA,EAAM,GAAG,cAAc,CAAA,SAAA,CAAA;AAAA,IACvB,MAAA,EAAQ,GAAG,SAAS,CAAA,SAAA,CAAA;AAAA,IACpB,OAAS,EAAA;AAAA,MACP,GAAK,EAAA;AAAA,QACH,MAAA,EAAQ,GAAG,SAAS,CAAA,SAAA,CAAA;AAAA,QACpB,OAAA,EAAS,GAAG,cAAc,CAAA,SAAA,CAAA;AAAA,OAC5B;AAAA,MACA,oBAAsB,EAAA;AAAA,QACpB,QAAQ,CAAG,EAAA,SAAS,oBAAoB,UAAe,KAAA,KAAA,GAAQ,KAAK,QAAQ,CAAA,GAAA,CAAA;AAAA,QAC5E,SAAS,CAAG,EAAA,cAAc,oBAAoB,UAAe,KAAA,KAAA,GAAQ,KAAK,QAAQ,CAAA,GAAA,CAAA;AAAA,OACpF;AAAA,KACF;AAAA,IACA,OAAS,EAAA;AAAA,MACP,OAAS,EAAA,CAAA,OAAA,EAAU,SAAS,CAAA,yBAAA,EAA4B,cAAc,CAAA,cAAA,CAAA;AAAA,MACtE,KAAO,EAAA,2BAAA;AAAA,KACT;AAAA,IACA,GAAG,2BAA4B,CAAA,UAAA,EAAY,kBAAkB,CAAA;AAAA,IAC7D,KAAO,EAAA,CAAC,SAAW,EAAA,WAAA,EAAa,sBAAsB,CAAA;AAAA,GACxD,CAAA;AACF,CAAA;AACA,eAAe,SAAA,CAAU,SAAW,EAAA,QAAA,EAAU,IAAM,EAAA;AAGlD,EAAO,OAAA,MAAM,SAAU,CAAA,SAAA,CAAU,QAAU,EAAA,IAAA,CAAK,UAAU,IAAM,EAAA,KAAA,CAAA,EAAW,CAAC,CAAA,GAAI,IAAI,CAAA,CAAA;AACtF","file":"index.js","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 * as path from \"node:path\";\nexport class AbstractImportable {\n /**\n * Either a path relative to the ourDir (e.g. \"./ontology/objects/foo.js\") or a normal\n * module import (e.g. \"@something/foo\")/\n */\n\n constructor(common, fullApiName, basePath) {\n this._common = common;\n this.fullApiName = fullApiName;\n [this.apiNamespace, this.shortApiName] = extractNamespace(this.fullApiName);\n const {\n ontologyApiNamespace,\n apiNamespacePackageMap,\n importExt\n } = common;\n this.isLocal = ontologyApiNamespace === this.apiNamespace;\n this.sourcePackage = this.apiNamespace && !this.isLocal ? apiNamespacePackageMap.get(this.apiNamespace) : undefined;\n this.importPath = this.isLocal ? `${basePath}/${this.shortApiName}${importExt}` : this.sourcePackage;\n this.uniqueImportName = this.shortApiName;\n }\n getImportPathRelTo = filePath => {\n if (this.importPath.startsWith(\".\")) {\n const result = path.relative(path.dirname(filePath), this.importPath);\n if (result.startsWith(\".\")) {\n return result;\n } else {\n return `./${result}`;\n }\n } else {\n return this.importPath;\n }\n };\n}\nexport class EnhancedBase extends AbstractImportable {\n constructor(common, og, fullApiName, basePath) {\n super(common, fullApiName, basePath);\n this.og = og;\n if (!this.isLocal && !this.sourcePackage) {\n throw new Error(`Expected { ns:'${this.apiNamespace}', shortName: '${this.shortApiName}'} to be in namespace '${common.ontologyApiNamespace}' or in a provided package mapping`);\n }\n }\n}\nexport function extractNamespace(fqApiName) {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1) return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}","/*\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 { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedAction extends EnhancedBase {\n constructor(common, og) {\n super(common, og, og.apiName, \"./ontology/actions\");\n this.og = og;\n }\n get description() {\n return this.og.description;\n }\n get parameters() {\n return this.og.parameters;\n }\n get operations() {\n return this.og.operations;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Parameters`;\n }\n get definitionIdentifier() {\n return `${this.shortApiName}.Definition`;\n }\n get definitionParamsIdentifier() {\n return `${this.shortApiName}.ParamsDefinition`;\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function deleteUndefineds(obj) {\n return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));\n}","/*\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 { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedInterfaceType extends EnhancedBase {\n constructor(common, og) {\n super(common, og, og.apiName, \"./ontology/interfaces\");\n this.og = og;\n }\n getDefinitionIdentifier(v2) {\n return v2 ? this.shortApiName : `${this.shortApiName}Def`;\n }\n getImportedDefinitionIdentifier(v2) {\n return this.getDefinitionIdentifier(v2);\n }\n get properties() {\n return this.og.properties;\n }\n getCleanedUpDefinition(v2) {\n return deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(this.og, v2));\n }\n}","/*\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 { wireObjectTypeFullMetadataToSdkObjectTypeDefinition } from \"@osdk/generator-converters\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedObjectType extends EnhancedBase {\n constructor(common, og) {\n super(common, og, og.objectType.apiName, \"./ontology/objects\");\n this.og = og;\n }\n getDefinitionIdentifier(v2) {\n return v2 ? `${this.shortApiName}` : `${this.shortApiName}Def`;\n }\n getImportedDefinitionIdentifier(v2) {\n return this.getDefinitionIdentifier(v2);\n }\n getCleanedUpDefinition(v2) {\n return deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectTypeDefinition(this.og, v2));\n }\n}","/*\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 { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedQuery extends EnhancedBase {\n constructor(common, og) {\n super(common, og, og.apiName, \"./ontology/queries\");\n this.og = og;\n }\n get description() {\n return this.og.description;\n }\n get parameters() {\n return this.og.parameters;\n }\n get output() {\n return this.og.output;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Parameters`;\n }\n get definitionIdentifier() {\n return `${this.shortApiName}.Definition`;\n }\n get definitionParamsIdentifier() {\n return `${this.definitionIdentifier}$Params`;\n }\n}","/*\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 { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedSharedPropertyType extends EnhancedBase {\n constructor(common, og) {\n super(common, og, og.apiName, \"./ontology/interfaces\");\n this.og = og;\n }\n}","/*\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 { AbstractImportable } from \"./EnhancedBase.js\";\nexport class ForeignType extends AbstractImportable {\n constructor(_common, type, apiNamespace, shortApiName) {\n super(_common, `${apiNamespace}.${shortApiName}`, _common.apiNamespacePackageMap.get(apiNamespace));\n this._common = _common;\n this.type = type;\n }\n getImportedDefinitionIdentifier(v2) {\n return `$Imported$${this.type}$${this.apiNamespace.replace(/\\./g, \"$\")}$${this.shortApiName}`;\n }\n getDefinitionIdentifier(v2) {\n if (this.type === \"objectTypes\") {\n return v2 ? this.uniqueImportName : `${this.uniqueImportName}Def`;\n } else {\n return this.uniqueImportName;\n }\n }\n}","/*\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 { EnhancedAction } from \"./EnhancedAction.js\";\nimport { extractNamespace } from \"./EnhancedBase.js\";\nimport { EnhancedInterfaceType } from \"./EnhancedInterfaceType.js\";\nimport { EnhancedObjectType } from \"./EnhancedObjectType.js\";\nimport { EnhancedQuery } from \"./EnhancedQuery.js\";\nimport { EnhancedSharedPropertyType } from \"./EnhancedSharedPropertyType.js\";\nimport { ForeignType } from \"./ForeignType.js\";\nexport class EnhancedOntologyDefinition {\n constructor(original, ontologyApiNamespace, apiNamespacePackageMap, importExt) {\n this.common = {\n apiNamespacePackageMap,\n enhancedOntology: this,\n importExt,\n ontologyApiNamespace\n };\n this.og = original;\n this.ontology = original.ontology;\n this.objectTypes = remap(original.objectTypes, this.common, EnhancedObjectType);\n this.actionTypes = remap(original.actionTypes, this.common, EnhancedAction);\n this.queryTypes = remap(original.queryTypes, this.common, EnhancedQuery);\n this.interfaceTypes = remap(original.interfaceTypes, this.common, EnhancedInterfaceType);\n this.sharedPropertyTypes = remap(original.sharedPropertyTypes, this.common, EnhancedSharedPropertyType);\n }\n #createRequireType = type => {\n return (fullApiName, localOnly) => {\n const ret = this[type][fullApiName];\n if (!ret) {\n const [apiNamespace, shortApiName] = extractNamespace(fullApiName);\n if (localOnly || !apiNamespace) {\n throw new Error(`Unable to find ${type}: No entry for '${fullApiName}`);\n }\n if (!this.common.apiNamespacePackageMap.has(apiNamespace)) {\n throw new Error(`Unable to find ${type}: Unknown namespace '${apiNamespace}'`);\n }\n return new ForeignType(this.common, type, apiNamespace, shortApiName);\n }\n return ret;\n };\n };\n requireObjectType = this.#createRequireType(\"objectTypes\");\n requireInterfaceType = this.#createRequireType(\"interfaceTypes\");\n requireActionType = this.#createRequireType(\"actionTypes\");\n requireQueryType = this.#createRequireType(\"queryTypes\");\n requireSharedPropertyType = this.#createRequireType(\"sharedPropertyTypes\");\n}\nfunction remap(r, common, Constructor) {\n return Object.fromEntries(Object.entries(r ?? {}).map(([fullApiName, v]) => {\n return [fullApiName, new Constructor(common, v)];\n }).sort((a, b) => a[0].localeCompare(b[0])));\n}","/*\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 { EnhancedOntologyDefinition } from \"./EnhancedOntologyDefinition.js\";\nexport function enhanceOntology(sanitized, ontologyApiNamespace, apiNamespacePackageMap, importExt) {\n return new EnhancedOntologyDefinition(sanitized, ontologyApiNamespace, apiNamespacePackageMap, importExt);\n}","/*\n * Copyright 2023 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\n/**\n * @internal\n */\n\n/**\n * @internal\n */\n\n/**\n * @internal\n */\nexport function sanitizeMetadata(ontology) {\n return {\n ...ontology,\n actionTypes: Object.fromEntries(Object.values(ontology.actionTypes).map(actionType => {\n return [camelize(actionType.apiName), {\n ...actionType,\n apiName: camelize(actionType.apiName)\n }];\n }))\n };\n}\nfunction camelize(name) {\n return name.replace(/-./g, segment => segment[1].toUpperCase());\n}","/*\n * Copyright 2023 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\n/**\n * Verify that the target outDir does not yet exist OR is empty.\n *\n * Re-generating an ontology on top of itself is not supported and may leave old\n * files around or refuse to update files with new contents in some cases.\n */\nexport async function verifyOutDir(outDir, fs) {\n // if outDir exists and is not empty, we cannot proceed with the generation\n try {\n const contents = await fs.readdir(outDir);\n if (contents.length !== 0) {\n throw new Error(`outDir ${outDir} is not empty, please delete its contents and try again`);\n }\n } catch (e) {\n if (e.code === \"ENOENT\") {\n // acceptable, we'll create the directory ourselves\n } else {\n throw e;\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getModifiedEntityTypes(action) {\n const addedObjects = new Set();\n const modifiedObjects = new Set();\n for (const operation of action.operations) {\n switch (operation.type) {\n case \"createObject\":\n addedObjects.add(operation.objectTypeApiName);\n break;\n case \"modifyObject\":\n modifiedObjects.add(operation.objectTypeApiName);\n break;\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n break;\n default:\n const _ = operation;\n }\n }\n return {\n addedObjects,\n modifiedObjects\n };\n}","/*\n * Copyright 2023 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 { format } from \"prettier\";\n// @ts-ignore the plugin doesn't have types but we need to import the actual plugin\n// so we can bundle it rather than trying to resolve it at runtime\nimport organizeImports from \"prettier-plugin-organize-imports\";\nexport function formatTs(contents) {\n try {\n return format(contents, {\n parser: \"typescript\",\n singleQuote: true,\n trailingComma: \"all\",\n plugins: [organizeImports],\n tabWidth: 2,\n printWidth: 120\n });\n } catch (e) {\n console.error(\"Failed to format file\", e);\n console.log(contents);\n return contents;\n }\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getModifiedEntityTypes } from \"../shared/getEditedEntities.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateActions(ontology, fs, outDir, importExt = \"\") {\n const importedObjects = new Set();\n let actionSignatures = [];\n for (const action of Object.values(ontology.actionTypes)) {\n const entries = Object.entries(action.parameters);\n const modifiedEntityTypes = getModifiedEntityTypes(action);\n const addedObjects = Array.from(modifiedEntityTypes.addedObjects);\n const modifiedObjects = Array.from(modifiedEntityTypes.modifiedObjects);\n addedObjects.forEach(importedObjects.add, importedObjects);\n modifiedObjects.forEach(importedObjects.add, importedObjects);\n let jsDocBlock = [\"/**\"];\n if (action.description) {\n jsDocBlock.push(`* ${action.description}`);\n }\n let parameterBlock = \"\";\n if (entries.length > 0) {\n parameterBlock = `params: { \\n`;\n for (const [parameterName, parameterData] of entries) {\n parameterBlock += `\"${parameterName}\"`;\n parameterBlock += parameterData.required ? \": \" : \"?: \";\n const typeScriptType = getTypeScriptTypeFromDataType(parameterData.dataType, importedObjects);\n parameterBlock += `${typeScriptType};\\n`;\n jsDocBlock.push(`* @param {${typeScriptType}} params.${parameterName}`);\n }\n parameterBlock += \"}, \";\n }\n jsDocBlock.push(`*/`);\n actionSignatures.push(`\n ${jsDocBlock.join(\"\\n\")}\n ${action.apiName}<O extends ActionExecutionOptions>(${parameterBlock}options?: O): \n Promise<Result<ActionResponseFromOptions<O, Edits<${addedObjects.length > 0 ? addedObjects.join(\" | \") : \"void\"}, ${modifiedObjects.length > 0 ? modifiedObjects.join(\" | \") : \"void\"}>>, ActionError>>;`);\n }\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"Actions.ts\"), await formatTs(`\n import type { ObjectSet, LocalDate, Timestamp, Attachment, Edits, ActionExecutionOptions, ActionError, Result, ActionResponseFromOptions } from \"@osdk/legacy-client\";\n ${Array.from(importedObjects).map(importedObject => `import type { ${importedObject} } from \"../objects/${importedObject}${importExt}\";`).join(\"\\n\")}\n export interface Actions {\n ${actionSignatures.join(\"\\n\")}\n }\n `));\n}\nexport function getTypeScriptTypeFromDataType(actionParameter, importedObjects) {\n switch (actionParameter.type) {\n case \"objectSet\":\n {\n const objectType = actionParameter.objectTypeApiName;\n importedObjects.add(objectType);\n return `ObjectSet<${objectType}>`;\n }\n case \"object\":\n {\n const objectType = actionParameter.objectTypeApiName;\n importedObjects.add(objectType);\n return `${objectType} | ${objectType}[\"__primaryKey\"]`;\n }\n case \"array\":\n return `Array<${getTypeScriptTypeFromDataType(actionParameter.subType, importedObjects)}>`;\n case \"string\":\n return `string`;\n case \"boolean\":\n return `boolean`;\n case \"attachment\":\n return `Attachment`;\n case \"date\":\n return `LocalDate`;\n case \"double\":\n case \"integer\":\n case \"long\":\n return `number`;\n case \"timestamp\":\n return `Timestamp`;\n case \"marking\":\n return \"string\";\n default:\n const _ = actionParameter;\n throw new Error(`Unsupported action parameter type: ${actionParameter}`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function reexportConsts(typesToExport) {\n return `\n import { ${typesToExport.map(q => `${q} as OG_${q}`).join(\", \")}} from \"@osdk/legacy-client\";\n \n ${typesToExport.map(q => `\n /** @deprecated submodule imports aren't public api **/\n export const ${q} = OG_${q};\n `).join(\"\\n\\n\")}\n `;\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nexport async function generateConfidentialClientDir(fs, oauthDistDir, importExt = \"\") {\n const confidentialClientDistDir = path.join(oauthDistDir, \"ConfidentialClient\");\n await fs.mkdir(confidentialClientDistDir, {\n recursive: true\n });\n await fs.writeFile(path.join(confidentialClientDistDir, \"index.ts\"), await formatTs(`\n export * from \"./ConfidentialClientAuth${importExt}\";\n `));\n await fs.writeFile(path.join(confidentialClientDistDir, \"ConfidentialClientAuth.ts\"), await formatTs(`\n ${reexportConsts([\"ConfidentialClientAuth\"])}\n `));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nexport async function generatePublicClientDir(fs, oauthDistDir, importExt = \"\") {\n const publicClientDistDir = path.join(oauthDistDir, \"PublicClient\");\n await fs.mkdir(publicClientDistDir, {\n recursive: true\n });\n await fs.writeFile(path.join(publicClientDistDir, \"index.ts\"), await formatTs(`\n export * from \"./PublicClientAuth${importExt}\";\n `));\n await fs.writeFile(path.join(publicClientDistDir, \"PublicClientAuth.ts\"), await formatTs(`\n ${reexportConsts([\"PublicClientAuth\"])}\n `));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nexport async function generateUserTokenDir(fs, oauthDistDir, importExt = \"\") {\n const userTokenDistDir = path.join(oauthDistDir, \"UserToken\");\n await fs.mkdir(userTokenDistDir, {\n recursive: true\n });\n await fs.writeFile(path.join(userTokenDistDir, \"index.ts\"), await formatTs(`\n export * from \"./UserTokenAuth${importExt}\";\n `));\n await fs.writeFile(path.join(userTokenDistDir, \"UserTokenAuth.ts\"), await formatTs(`\n ${reexportConsts([\"UserTokenAuth\"])}\n `));\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function reexportTypes(typesToExport, genericArgsLeft = \"\", genericArgsRight = cleanup(genericArgsLeft)) {\n return `\n import type { ${typesToExport.map(q => `${q} as OG_${q}`).join(\", \")}} from \"@osdk/legacy-client\";\n \n ${typesToExport.map(q => `\n /** @deprecated submodule imports aren't public api **/\n export type ${q}${genericArgsLeft} = OG_${q}${genericArgsRight};\n `).join(\"\\n\\n\")}\n `;\n}\nconst captureInBracketsRegex = /<(.*?)>/;\nconst captureGenericParamNameRegex = /^\\s?(.+?)( extends .*?)?( = .*?)?\\s?$/;\nfunction cleanup(s) {\n if (s.length === 0) return \"\";\n const genericParameterNames = captureInBracketsRegex.exec(s)?.[1]?.split(\",\")?.map(a => {\n return captureGenericParamNameRegex.exec(a)?.[1] ?? a;\n });\n return `<${genericParameterNames?.join(\",\")}>`;\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../util/test/formatTs.js\";\nimport { generateConfidentialClientDir } from \"./internal-foundry-oauth-dist/generateConfidentialClientDir.js\";\nimport { generatePublicClientDir } from \"./internal-foundry-oauth-dist/generatePublicClientDir.js\";\nimport { generateUserTokenDir } from \"./internal-foundry-oauth-dist/generateUserTokenDir.js\";\nimport { reexportConsts } from \"./util/reexportConsts.js\";\nimport { reexportTypes } from \"./util/reexportTypes.js\";\nexport async function generateOAuthClientDistDir(outDir, fs, importExt = \"\") {\n const oauthDistDir = path.join(outDir, \"internal\", \"@foundry\", \"oauth-client\", \"dist\");\n await fs.mkdir(oauthDistDir, {\n recursive: true\n });\n await fs.writeFile(path.join(oauthDistDir, \"index.ts\"), await formatTs(`\n export * from \"./Auth${importExt}\";\n export * from \"./ConfidentialClient/index${importExt}\";\n export * from \"./OAuthClient${importExt}\";\n export * from \"./PublicClient/index${importExt}\";\n export * from \"./Token${importExt}\";\n export * from \"./UserToken/index${importExt}\";\n`));\n await fs.writeFile(path.join(oauthDistDir, \"Auth.ts\"), await formatTs(reexportTypes([\"Auth\"])));\n await fs.writeFile(path.join(oauthDistDir, \"Token.ts\"), await formatTs(reexportTypes([\"Token\", \"TokenValue\"])));\n await fs.writeFile(path.join(oauthDistDir, \"OAuthClient.ts\"), await formatTs(reexportTypes([\"AuthSubscription\", \"UnsubscribeFunction\", \"SignInResponse\", \"RefreshResponse\", \"SignOutResponse\"])));\n await fs.writeFile(path.join(oauthDistDir, \"OAuthToken.ts\"), await formatTs(reexportConsts([\"OAuthToken\"])));\n await fs.writeFile(path.join(oauthDistDir, \"Auth.ts\"), await formatTs(reexportTypes([\"Auth\"])));\n await generateConfidentialClientDir(fs, oauthDistDir, importExt);\n await generatePublicClientDir(fs, oauthDistDir, importExt);\n await generateUserTokenDir(fs, oauthDistDir, importExt);\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../../util/reexportConsts.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateAggregationsAggregations(fs, aggregationsDir) {\n await fs.writeFile(path.join(aggregationsDir, \"Aggregations.ts\"), await formatTs(`\n import { LocalDate, Timestamp } from \"@osdk/legacy-client\";\n ` + reexportTypes([\"Double\", \"Rangeable\", \"MetricValue\", \"Date\", \"BucketKey\", \"BucketValue\", \"TimeUnit\", \"BucketGroup\", \"Metrics\", \"AggregatableProperties\", \"AggregationClause\"]) + reexportTypes([\"Range\"], \"<T extends Rangeable>\", \"<T>\") + reexportTypes([\"BaseGroupBy\"], \"<_T extends BucketValue = BucketValue>\") + reexportTypes([\"Duration\"], \"<_T extends Timestamp | LocalDate = Timestamp | LocalDate>\") + reexportTypes([\"AggregatableProperty\", \"MultipleAggregationsOperations\"], \"<_T extends MetricValue = MetricValue>\") + reexportTypes([\"AggregationGroup\"], \"<TMetrics extends Metrics | MetricValue, TBucketGroup extends BucketGroup>\") + reexportTypes([\"Bucketing\"], \"<_T extends string , _X extends BucketValue>\") + reexportTypes([\"AggregationResult\"], \"<TBucketGroup extends BucketGroup, TMetrics extends Metrics | MetricValue>\") + reexportTypes([\"BaseBucketing\"], \"<TBucketKey extends BucketKey, TBucketValue extends BucketValue, Kind extends string>\") + reexportTypes([\"ExactValueBucketing\", \"InternalBucketing\"], `<TBucketKey extends BucketKey, TBucketValue extends BucketValue>`) + reexportTypes([\"RangeBucketing\", \"FixedWidthBucketing\"], `<TBucketKey extends BucketKey, TBucketValue extends Range<Rangeable>>`) + reexportTypes([\"DurationBucketing\"], `<TBucketKey extends BucketKey, TBucketValue extends Date>`) + reexportTypes([\"InternalBucketingVisitor\"], \"<TBucketKey extends BucketKey, T extends BucketValue, R>\") + reexportTypes([\"AggregationBuilderResult\"], \"<T, TMultipleAggregationProperties>\") + reexportTypes([\"AggregatablePropertiesForResult\", \"AggregatablePropertyNamesForResult\"], \"<TAggregatableProperties, TResult extends MetricValue>\") + reexportConsts([\"assertBucketingInternal\", \"visitInternalBucketing\"]) + reexportTypes([\"AggregatableObjectSetStep\"], \"<TAggregatableProperties, TMultipleAggregationProperties, TBucketableProperties, TBucketGroup extends BucketGroup = {}>\") + reexportTypes([\"GroupedTerminalAggregationOperations\"], \"<TAggregatableProperties, TMultipleAggregationProperties, TBucketGroup extends BucketGroup = {}>\")));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../../util/reexportConsts.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateGroupBy(fs, aggregationsDir, importExt = \"\") {\n await fs.mkdir(path.join(aggregationsDir, \"groupBy\"), {\n recursive: true\n });\n const groupBys = [\"BooleanGroupBy\", \"LocalDateGroupBy\", \"NumericGroupBy\", \"StringGroupBy\", \"TimestampGroupBy\"];\n const reexportFiles = [...groupBys, \"GroupKeyType\"];\n for (const key of reexportFiles) {\n await fs.writeFile(path.join(aggregationsDir, \"groupBy\", `${key}.ts`), await formatTs(`export {${key}} from \"./index${importExt}\";`));\n }\n await fs.writeFile(path.join(aggregationsDir, \"groupBy\", \"index.ts\"), await formatTs(`import { Bucketing, BucketKey, Duration, Range, Rangeable } from \"../Aggregations${importExt}\";` + reexportConsts(groupBys) + reexportTypes(groupBys, \"<T extends BucketKey>\") + `export {GroupKeyType} from \"@osdk/legacy-client\";\n `));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../../util/reexportConsts.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateMetrics(fs, aggregationsDir, importExt = \"\") {\n const metricsDir = path.join(aggregationsDir, \"metrics\");\n await fs.mkdir(metricsDir, {\n recursive: true\n });\n await fs.writeFile(path.join(metricsDir, \"metrics.ts\"), await formatTs(`export {MetricValueType} from \"@osdk/legacy-client\";`));\n await fs.writeFile(path.join(metricsDir, \"ApproximateDistinctCountAggregatableProperty.ts\"), await formatTs(reexportConsts([\"ApproximateDistinctCountAggregatableProperty\"]) + reexportTypes([\"ApproximateDistinctCountAggregatableProperty\"])));\n await fs.writeFile(path.join(metricsDir, \"MultipleAggregatableProperty.ts\"), await formatTs(`\n import { Double, MetricValue, MultipleAggregationsOperations } from \"../Aggregations${importExt}\";\n import { MetricValueType } from \"./metrics/index${importExt}\";\n ` + reexportConsts([\"MultipleAggregatableProperty\"]) + reexportTypes([\"MultipleAggregatableProperty\"], \"<TResult extends MetricValue = Double>\")));\n for (const typeName of [\"DefaultAggregatableProperty\", \"LocalDatePropertyMetric\", \"NumericPropertyMetric\", \"TimestampPropertyMetric\"]) {\n await fs.writeFile(path.join(metricsDir, `${typeName}.ts`), await formatTs(`\n import { MultipleAggregatableProperty } from \"./MultipleAggregatableProperty${importExt}\";\n ` + reexportConsts([typeName])));\n }\n await fs.writeFile(path.join(metricsDir, \"index.ts\"), await formatTs(`\n export * from \"./ApproximateDistinctCountAggregatableProperty${importExt}\";\n export * from \"./DefaultAggregatableProperty${importExt}\";\n export * from \"./LocalDatePropertyMetric${importExt}\";\n export * from \"./metrics${importExt}\";\n export * from \"./MultipleAggregatableProperty${importExt}\";\n export * from \"./NumericPropertyMetric${importExt}\";\n export * from \"./TimestampPropertyMetric${importExt}\";\n `));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nimport { reexportTypes } from \"../util/reexportTypes.js\";\nimport { generateAggregationsAggregations } from \"./aggregations/generateAggregationsAggregations.js\";\nimport { generateGroupBy } from \"./aggregations/generateGroupBy.js\";\nimport { generateMetrics } from \"./aggregations/generateMetrics.js\";\nexport async function generateAggregationsDir(fs, runtimeDistDir, importExt = \"\") {\n const aggregationsDir = path.join(runtimeDistDir, \"aggregations\");\n await fs.mkdir(aggregationsDir, {\n recursive: true\n });\n await generateGroupBy(fs, aggregationsDir, importExt);\n await generateAggregationsAggregations(fs, aggregationsDir);\n await generateMetrics(fs, aggregationsDir, importExt);\n await fs.writeFile(path.join(aggregationsDir, \"index.ts\"), await formatTs(`\n ${\"\" // Skipping this one, its hard to imagine it being used\n // export * from \"./AggregatableObjectSet${importExt}\";\n }\n ${\"\" // Skipping this one, its hard to imagine it being used\n // export * from \"./aggregationConverters${importExt}\";\n }\n \n export * from \"./Aggregations${importExt}\";\n export * from \"./ComputeStep${importExt}\";\n export * from \"./CountOperation${importExt}\";\n export * from \"./groupBy/index${importExt}\";\n export * from \"./internalAggregationRequest${importExt}\";\n export * from \"./metrics/index${importExt}\";\n `));\n await fs.writeFile(path.join(aggregationsDir, \"ComputeStep.ts\"), await formatTs(`\n import { ObjectSetDefinition } from \"../baseTypes/index${importExt}\";\n import { FoundryClientOptions } from \"../client/${importExt}\";\n import { AggregateObjectsError, OntologyMetadata, Result } from \"../ontologyProvider/index${importExt}\";\n import { AggregationClause, AggregationResult, BucketGroup, BucketValue, InternalBucketing, Metrics, MetricValue } from \"./Aggregations${importExt}\";\n ` + reexportConsts([\"ComputeStep\"]) + reexportTypes([\"ComputeStep\"], \"<TBucketGroup extends BucketGroup, TMetrics extends Metrics | MetricValue> \") + reexportTypes([\"AggregationComputeStep\"], \"<TBucketGroup extends BucketGroup, TMetrics extends Metrics | MetricValue>\") + `\n \n `));\n await fs.writeFile(path.join(aggregationsDir, \"CountOperation.ts\"), await formatTs(`` + reexportConsts([\"CountOperation\", \"isCountOperation\"]) + reexportTypes([\"CountOperation\"])));\n await fs.writeFile(path.join(aggregationsDir, \"internalAggregationRequest.ts\"), await formatTs(reexportTypes([\"InternalAggregationRequest\"])));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateAttachmentsDir(attachmentsDir, fs, importExt = \"\") {\n await fs.mkdir(attachmentsDir, {\n recursive: true\n });\n await fs.writeFile(path.join(attachmentsDir, \"index.ts\"), await formatTs(`export * from \"./Attachment${importExt}\";\n export * from \"./Attachments${importExt}\";\n `));\n await fs.writeFile(path.join(attachmentsDir, \"Attachment.ts\"), await formatTs(reexportTypes([\"Attachment\", \"AttachmentMetadata\"])));\n await fs.writeFile(path.join(attachmentsDir, \"Attachments.ts\"), await formatTs(reexportTypes([\"Attachments\"])));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../../util/reexportConsts.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateGeoshapesDir(runtimeDistDir, fs, importExt = \"\") {\n await fs.mkdir(runtimeDistDir, {\n recursive: true\n });\n await fs.writeFile(path.join(runtimeDistDir, \"index.ts\"), await formatTs(`export * from \"./Distance${importExt}\";\n export * from \"./GeoJson${importExt}\";\n export * from \"./GeometryCollection${importExt}\";\n export * from \"./GeoPoint${importExt}\";\n export * from \"./GeoShape${importExt}\";\n export * from \"./LineString${importExt}\";\n export * from \"./MultiGeoPoint${importExt}\";\n export * from \"./MultiLineString${importExt}\";\n export * from \"./MultiPolygon${importExt}\";\n export * from \"./Polygon${importExt}\";`));\n await fs.writeFile(path.join(runtimeDistDir, \"Distance.ts\"), await formatTs(`` + reexportConsts([\"Distance\", \"DistanceUnit\"]) + reexportTypes([\"Distance\", \"DistanceUnit\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"GeoJson.ts\"), await formatTs(reexportTypes([\"GeoJsonPoint\", \"GeoJsonPolygon\", \"GeoJsonLineString\", \"GeoJsonMultiPoint\", \"GeoJsonMultiPolygon\", \"GeoJsonMultiLineString\", \"GeoJsonGeometryCollection\", \"GeoJsonGeometry\", \"GeoJson\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"GeometryCollection.ts\"), await formatTs(reexportConsts([\"GeometryCollection\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"GeoPoint.ts\"), await formatTs(`` + reexportConsts([\"isGeoPoint\", \"GeoPoint\", \"mapCoordinatesToGeoPoint\"]) + reexportTypes([\"GeoHash\", \"Coordinates\", \"GeoPoint\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"GeoShape.ts\"), await formatTs(reexportConsts([\"GeoShape\"]) + reexportTypes([\"GeoShape\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"LineString.ts\"), await formatTs(reexportConsts([\"LineString\"]) + reexportTypes([\"LineString\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"MultiGeoPoint.ts\"), await formatTs(reexportConsts([\"MultiGeoPoint\"]) + reexportTypes([\"MultiGeoPoint\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"MultiLineString.ts\"), await formatTs(reexportConsts([\"MultiLineString\"]) + reexportTypes([\"MultiLineString\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"MultiPolygon.ts\"), await formatTs(reexportConsts([\"MultiPolygon\"]) + reexportTypes([\"MultiPolygon\"])));\n await fs.writeFile(path.join(runtimeDistDir, \"Polygon.ts\"), await formatTs(reexportConsts([\"Polygon\"]) + reexportTypes([\"LinearRing\", \"Polygon\"])));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateObjectSetDir(objectSetDir, fs, importExt = \"\") {\n await fs.mkdir(objectSetDir, {\n recursive: true\n });\n await fs.writeFile(path.join(objectSetDir, \"index.ts\"), await formatTs(`\n export * from \"./ObjectSetDefinition${importExt}\";\n export * from \"./OntologyObjectSet${importExt}\";\n `));\n await fs.writeFile(path.join(objectSetDir, \"ObjectSetDefinition.ts\"), await formatTs(reexportTypes([\"BaseObjectSetDefinition\", \"ReferenceObjectSetDefinition\", \"StaticObjectSetDefinition\", \"IntersectObjectSetDefinition\", \"SubtractObjectSetDefinition\", \"SearchAroundObjectSetDefinition\", \"FilterObjectSetDefinition\", \"ObjectSetDefinition\"])));\n await fs.writeFile(path.join(objectSetDir, \"OntologyObjectSet.ts\"), await formatTs(reexportTypes([\"OntologyObjectSet\"])));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateSharedObjectCodeDir(sharedObjectCodeDir, fs, importExt = \"\") {\n await fs.mkdir(sharedObjectCodeDir, {\n recursive: true\n });\n await fs.writeFile(path.join(sharedObjectCodeDir, \"index.ts\"), await formatTs(`\n export * from \"./FilteredPropertiesTerminalOperations${importExt}\";\n `));\n await fs.writeFile(path.join(sharedObjectCodeDir, \"FilteredPropertiesTerminalOperations.ts\"), await formatTs(`import { OntologyObject } from \"../OntologyObject${importExt}` + reexportTypes([\"FilteredPropertiesTerminalOperations\", \"FilteredPropertiesTerminalOperationsWithGet\"], \"<T extends OntologyObject, V extends Array<keyof T>>\")));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateTimeSeriesDir(timeseriesDir, fs, importExt = \"\") {\n await fs.mkdir(timeseriesDir, {\n recursive: true\n });\n await fs.writeFile(path.join(timeseriesDir, \"index.ts\"), await formatTs(`\n export * from \"./TimeSeries${importExt}\";\n export * from \"./TimeSeriesDuration${importExt}\";\n export * from \"./TimeSeriesPoint${importExt}\";\n ${\"\" // Internal type\n // export * from \"./TimeSeriesProperty${importExt}\";\n }\n export * from \"./TimeSeriesQuery${importExt}\";\n export * from \"./TimeSeriesTerminalOperations${importExt}\";\n `));\n await fs.writeFile(path.join(timeseriesDir, \"TimeSeries.ts\"), await formatTs(reexportTypes([\"TimeSeries\"], `<T extends number | string>`)));\n await fs.writeFile(path.join(timeseriesDir, \"TimeSeriesDuration.ts\"), await formatTs(reexportTypes([`WhenUnit`, `DurationUnit`, `TimeSeriesDuration`])));\n await fs.writeFile(path.join(timeseriesDir, \"TimeSeriesPoint.ts\"), await formatTs(reexportTypes([\"TimeSeriesPoint\"], `<T extends number | string>`)));\n await fs.writeFile(path.join(timeseriesDir, \"TimeSeriesQuery.ts\"), await formatTs(reexportTypes([\"TimeSeriesQuery\"], `<T extends number | string>`)));\n await fs.writeFile(path.join(timeseriesDir, \"TimeSeriesTerminalOperations.ts\"), await formatTs(reexportTypes([\"TimeSeriesTerminalOperations\", \"TimeSeriesIterator\"], `<T extends number | string>`)));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nimport { reexportTypes } from \"../util/reexportTypes.js\";\nimport { generateAttachmentsDir } from \"./baseTypes/generateAttachmentsDir.js\";\nimport { generateGeoshapesDir } from \"./baseTypes/generateGeoshapesDir.js\";\nimport { generateObjectSetDir } from \"./baseTypes/generateObjectSetDir.js\";\nimport { generateSharedObjectCodeDir } from \"./baseTypes/generateSharedObjectCode.js\";\nimport { generateTimeSeriesDir } from \"./baseTypes/generateTimeSeriesDir.js\";\nexport async function generateBaseTypesDir(runtimeDistDir, fs, importExt = \"\") {\n const baseTypesDir = path.join(runtimeDistDir, \"baseTypes\");\n await fs.mkdir(baseTypesDir, {\n recursive: true\n });\n await fs.writeFile(path.join(baseTypesDir, \"index.ts\"), await formatTs(`export * from \"./ActionType${importExt}\";\n export * from \"./attachments/index${importExt}\";\n export * from \"./geoshapes/index${importExt}\";\n export * from \"./links${importExt}\";\n export * from \"./localDate${importExt}\";\n export * from \"./objectset/index${importExt}\";\n export * from \"./ObjectType${importExt}\";\n export * from \"./OntologyObject${importExt}\";\n export * from \"./Queries${importExt}\";\n export * from \"./timeseries/index${importExt}\";\n export * from \"./timestamp${importExt}\";`));\n const geoshapesDir = path.join(baseTypesDir, \"geoshapes\");\n await generateGeoshapesDir(geoshapesDir, fs, importExt);\n const timeseriesDir = path.join(baseTypesDir, \"timeseries\");\n await generateTimeSeriesDir(timeseriesDir, fs, importExt);\n const attachmentsDir = path.join(baseTypesDir, \"attachments\");\n await generateAttachmentsDir(attachmentsDir, fs, importExt);\n const objectSetDir = path.join(baseTypesDir, \"objectset\");\n await generateObjectSetDir(objectSetDir, fs, importExt);\n const sharedObjectCodeDir = path.join(baseTypesDir, \"sharedObjectCode\");\n await generateSharedObjectCodeDir(sharedObjectCodeDir, fs, importExt);\n await fs.writeFile(path.join(baseTypesDir, \"ActionType.ts\"), await formatTs(`import { OntologyObject } from \"./OntologyObject${importExt}\";\n ` + reexportConsts([\"ActionExecutionMode\", \"ReturnEditsMode\", \"ActionValidationResult\"]) + reexportTypes([\"ActionExecutionOptions\", \"ValidationResponse\", \"BulkEdits\"]) + reexportTypes([\"CreatedObjectEdits\", \"ModifiedObjectEdits\"], \"<T extends OntologyObject>\") + reexportTypes([\"Edits\"], \"<TAddedObjects extends OntologyObject | void, TModifiedObjects extends OntologyObject | void>\") + reexportTypes([\"ActionResponse\"], \"<TEdits extends Edits<any, any> | undefined = undefined>\", \"<TEdits>\") + reexportTypes([\"ActionResponseFromOptions\"], \"<TOptions extends ActionExecutionOptions | undefined = undefined, TEdits extends Edits<any, any> | undefined = undefined>\", \"<TOptions, TEdits>\")));\n await fs.writeFile(path.join(baseTypesDir, \"OntologyObject.ts\"), await formatTs(reexportTypes([\"OntologyObject\"]) + reexportConsts([\"isOntologyObject\"])));\n await fs.writeFile(path.join(baseTypesDir, \"links.ts\"), await formatTs(`import { OntologyObject } from \"./OntologyObject${importExt}` + reexportTypes([\"SingleLink\", \"MultiLink\"], \"<T extends OntologyObject = OntologyObject>\")));\n await fs.writeFile(path.join(baseTypesDir, \"localDate.ts\"), await formatTs(reexportConsts([\"LocalDate\"]) + reexportTypes([\"LocalDate\"])));\n await fs.writeFile(path.join(baseTypesDir, \"timestamp.ts\"), await formatTs(reexportConsts([\"Timestamp\"]) + reexportTypes([\"Timestamp\"])));\n await fs.writeFile(path.join(baseTypesDir, \"Queries.ts\"), await formatTs(`import { BucketValue, Range, Rangeable } from \"../aggregations/index${importExt}\";\n ` + reexportTypes([\"QueryResponse\"], \"<T>\") + reexportTypes([\"BaseBucket\"], \"<K, V>\") + reexportTypes([\"NestedBucket\"], \"<TGroupKey, TSegmentKey, TValue extends BucketValue>\") + reexportTypes([\"TwoDimensionalAggregation\"], \"<TGroupKey extends QueryBucketKey, TValue extends BucketValue = number>\") + reexportTypes([\"ThreeDimensionalAggregation\"], \"<TGroupKey extends QueryBucketKey, TSegmentKey extends QueryBucketKey, TValue extends BucketValue = number>\") + reexportTypes([\"QueryBucketKey\"])));\n await fs.writeFile(path.join(baseTypesDir, \"ObjectType.ts\"), await formatTs(`import { OntologyObject } from \"./OntologyObject${importExt}\";` + reexportTypes([\"BaseType\", \"StringType\", \"IntegerType\", \"DateType\", \"BooleanType\", \"ByteType\", \"DecimalType\", \"FloatType\", \"TimestampType\", \"ShortType\", \"LongType\", \"DoubleType\", \"GeoPointType\", \"GeoShapeType\", \"AttachmentType\", \"ObjectType\", \"StructField\", \"QueryBucketRangeableType\", \"QueryBucketKeyType\", \"QueryBucketValueType\", \"AllValueTypes\", \"OntologyType\", \"ObjectTypeProperties\", \"StructType\"]) + reexportTypes([\"TimeSeriesType\", \"ArrayType\", \"SetType\"], \"<T extends BaseType>\") + reexportTypes([\"Property\"], \"<TType extends OntologyType = OntologyType>\") + reexportTypes([\"BaseObjectType\"], \"<TOntologyObject extends OntologyObject = OntologyObject>\") + reexportTypes([\"ObjectSetType\"], \"<T extends ObjectType>\") + reexportTypes([\"RangeType\"], \"<T extends QueryBucketRangeableType>\") + reexportTypes([\"TwoDimensionalAggregationType\"], \"<TGroupKey extends QueryBucketKeyType, TValue extends QueryBucketValueType>\") + reexportTypes([\"ThreeDimensionalAggregationType\"], \"<TGroupKey extends QueryBucketKeyType, TSegmentKey extends QueryBucketKeyType, TValue extends QueryBucketValueType>\")));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../util/reexportTypes.js\";\nexport async function generateClientDir(runtimeDistDir, fs, importExt = \"\") {\n const pagingDir = path.join(runtimeDistDir, \"client\");\n await fs.mkdir(pagingDir, {\n recursive: true\n });\n await fs.writeFile(path.join(pagingDir, \"index.ts\"), await formatTs(`export * from \"./clientOptions${importExt}\";`));\n await fs.writeFile(path.join(pagingDir, \"clientOptions.ts\"), await formatTs(`import {Auth} from \"@osdk/legacy-client\";` + reexportTypes([\"FoundryClientOptions\"], \"<TAuth extends Auth = Auth>\")));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../util/reexportConsts.js\";\nimport { reexportTypes } from \"../util/reexportTypes.js\";\nexport async function generateFiltersDir(runtimeDistDir, fs, importExt = \"\") {\n const pagingDir = path.join(runtimeDistDir, \"filters\");\n await fs.mkdir(pagingDir, {\n recursive: true\n });\n await fs.writeFile(path.join(pagingDir, \"index.ts\"), await formatTs(`export * from \"./ArrayFilter${importExt}\";\n export * from \"./AttachmentFilter${importExt}\";\n export * from \"./BooleanFilter${importExt}\";\n export * from \"./DateTimeFilters${importExt}\";\n export * from \"./Filters${importExt}\";\n export * from \"./GeoPointFilter${importExt}\";\n export * from \"./GeoShapeFilter${importExt}\";\n export * from \"./NumericFilter${importExt}\";\n export * from \"./Op${importExt}\";\n export * from \"./OrderByOption${importExt}\";\n export * from \"./StringFilter${importExt}\";`));\n await fs.writeFile(path.join(pagingDir, \"ArrayFilter.ts\"), await formatTs(`import { Attachment, GeoPoint, GeoShape, LocalDate, Timestamp } from \"../baseTypes/index${importExt}\";` + reexportConsts([\"ArrayFilter\"]) + reexportTypes([\"ArrayFilter\"], \"<T extends string | number | Timestamp | LocalDate | boolean | GeoShape | GeoPoint | Attachment>\")));\n await fs.writeFile(path.join(pagingDir, \"AttachmentFilter.ts\"), await formatTs(reexportConsts([\"AttachmentFilter\"]) + reexportTypes([\"AttachmentFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"BooleanFilter.ts\"), await formatTs(reexportConsts([\"BooleanFilter\"]) + reexportTypes([\"BooleanFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"GeoPointFilter.ts\"), await formatTs(reexportConsts([\"GeoPointFilter\"]) + reexportTypes([\"GeoPointFilter\", \"BoundingBox\"])));\n await fs.writeFile(path.join(pagingDir, \"DateTimeFilters.ts\"), await formatTs(reexportConsts([\"TimestampFilter\", \"LocalDateFilter\"]) + reexportTypes([\"TimestampFilter\", \"LocalDateFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"GeoShapeFilter.ts\"), await formatTs(reexportConsts([\"GeoShapeFilter\"]) + reexportTypes([\"GeoShapeFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"NumericFilter.ts\"), await formatTs(reexportConsts([\"NumericFilter\"]) + reexportTypes([\"NumericFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"Op.ts\"), await formatTs(reexportConsts([\"Op\"])));\n await fs.writeFile(path.join(pagingDir, \"OrderByOption.ts\"), await formatTs(reexportConsts([\"OrderByOption\"]) + reexportTypes([\"OrderByOption\"])));\n await fs.writeFile(path.join(pagingDir, \"StringFilter.ts\"), await formatTs(reexportConsts([\"StringFilter\"]) + reexportTypes([\"StringFilter\"])));\n await fs.writeFile(path.join(pagingDir, \"Filters.ts\"), await formatTs(`import { OntologyObject } from \"@osdk/legacy-client\";` + reexportTypes([\"ObjectTypeFilterFunction\", \"ObjectTypeOrderByFunction\"], \"<T extends OntologyObject>\") + reexportTypes([\"BoundingBoxFilter\", \"DistanceOf\", \"SearchClause\", \"LtWhereClause\", \"GtWhereClause\", \"LteWhereClause\", \"GteWhereClause\", \"EqWhereClause\", \"IsNullWhereClause\", \"ContainsWhereClause\", \"StartsWithWhereClause\", \"ContainsAllTermsInOrderWhereClause\", \"ContainsAnyTermWhereClause\", \"ContainsAllTermsWhereClause\", \"WithinDistanceOfWhereClause\", \"WithinBoundingBoxWhereClause\", \"IntersectsBoundingBoxWhereClause\", \"DoesNotIntersectBoundingBoxWhereClause\", \"WithinPolygonWhereClause\", \"IntersectsPolygonWhereClause\", \"DoesNotIntersectPolygonWhereClause\", \"AndWhereClause\", \"OrWhereClause\", \"NotWhereClause\", \"WhereClause\", \"OrderByClause\"]) + reexportTypes([\"FilterType\"], \"<T extends string | number>\")));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateErrors(fs, ontologyProviderDir) {\n await fs.writeFile(path.join(ontologyProviderDir, \"Errors.ts\"), await formatTs(reexportTypes([\"PermissionDenied\", \"Unauthorized\", \"InvalidAggregationRangeValue\", \"MalformedPropertyFilters\", \"PropertiesNotFilterable\", \"ParametersNotFound\", \"ApplyActionFailed\", \"PropertyTypesSearchNotSupported\", \"InvalidParameterValue\", \"QueryTimeExceededLimit\", \"CompositePrimaryKeyNotSupported\", \"PropertyBaseTypeNotSupported\", \"PropertiesNotSearchable\", \"AttachmentNotFound\", \"ObjectTypeNotFound\", \"InvalidGroupId\", \"OntologySyncing\", \"ActionNotFound\", \"ParameterObjectSetRidNotFound\", \"LinkTypeNotFound\", \"InvalidRangeQuery\", \"ActionParameterObjectNotFound\", \"InvalidPropertyValue\", \"PropertiesNotSortable\", \"FunctionExecutionTimedOut\", \"InvalidFields\", \"ActionTypeNotFound\", \"ObjectTypeNotSynced\", \"OntologyEditsExceededLimit\", \"AggregationGroupCountExceededLimit\", \"InvalidContentType\", \"PropertiesNotFound\", \"FunctionInvalidInput\", \"InvalidSortOrder\", \"QueryDepthExceededLimit\", \"InvalidPropertyFiltersCombination\", \"ObjectsExceededLimit\", \"DuplicateOrderBy\", \"FunctionEncounteredUserFacingError\", \"InvalidUserId\", \"QueryNotFound\", \"InvalidAggregationRange\", \"ParameterObjectNotFound\", \"QueryMemoryExceededLimit\", \"InvalidContentLength\", \"OntologyNotFound\", \"ActionParameterObjectTypeNotFound\", \"UnknownParameter\", \"InvalidSortType\", \"PropertyFiltersNotSupported\", \"ActionValidationFailed\", \"MultipleGroupByOnFieldNotSupported\", \"LinkedObjectNotFound\", \"ActionEditedPropertiesNotFound\", \"InvalidPropertyFilterValue\", \"QueryEncounteredUserFacingError\", \"AttachmentSizeExceededLimit\", \"ObjectNotFound\", \"PropertyApiNameNotFound\", \"ParameterTypeNotSupported\", \"InvalidAggregationRangePropertyType\", \"MissingParameter\"])));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateOntologyMetadata(fs, ontologyProviderDir) {\n await fs.writeFile(path.join(ontologyProviderDir, \"OntologyMetadata.ts\"), await formatTs(reexportTypes([\"OntologyMetadata\"])));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../../util/test/formatTs.js\";\nimport { reexportConsts } from \"../../util/reexportConsts.js\";\nimport { reexportTypes } from \"../../util/reexportTypes.js\";\nexport async function generateResult(fs, ontologyProviderDir) {\n await fs.writeFile(path.join(ontologyProviderDir, \"Result.ts\"), await formatTs(`import {FoundryApiError} from \"@osdk/legacy-client\";\n ` + reexportTypes([\"Ok\", \"Err\"], \"<T>\") + reexportTypes([\"Result\"], \"<V, E = FoundryApiError>\", \"<V,E>\") + reexportConsts([\"isOk\", \"isErr\", \"visitError\"]) + reexportTypes([\"ErrorVisitor\"], \"<E extends FoundryApiError, R>\", \"<E,R>\") + reexportTypes([\"ExtractKeysWithType\"], \"<T, K extends keyof T>\", \"<T,K>\")));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { generateErrors } from \"./ontologyProvider/generateErrors.js\";\nimport { generateOntologyMetadata } from \"./ontologyProvider/generateOntologyMetadata.js\";\nimport { generateResult } from \"./ontologyProvider/generateResult.js\";\nexport async function generateOntologyProviderDir(fs, runtimeDistDir, importExt = \"\") {\n const ontologyProviderDir = path.join(runtimeDistDir, \"ontologyProvider\");\n await fs.mkdir(ontologyProviderDir, {\n recursive: true\n });\n await generateErrors(fs, ontologyProviderDir);\n await generateOntologyMetadata(fs, ontologyProviderDir);\n await generateResult(fs, ontologyProviderDir);\n await fs.writeFile(path.join(ontologyProviderDir, \"index.ts\"), await formatTs(`\n ${\"\" // Skipping this one, its hard to imagine it being used\n // export * from \"./ErrorHandlers\";\n }\n export * from \"./Errors${importExt}\";\n export * from \"./OntologyMetadata${importExt}\";\n ${\"\" // Skipping this one, its hard to imagine it being used\n // export * from \"./OntologyObjectFactory${importExt}\";\n }\n ${\"\" // Skipping this one, its hard to imagine it being used\n // export * from \"./OntologyProvider${importExt}\";\n }\n // export * from \"./Result${importExt}\";\n `));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../../util/test/formatTs.js\";\nimport { reexportTypes } from \"../util/reexportTypes.js\";\nexport async function generatePagingDir(runtimeDistDir, fs, importExt = \"\") {\n const pagingDir = path.join(runtimeDistDir, \"paging\");\n await fs.mkdir(pagingDir, {\n recursive: true\n });\n await fs.writeFile(path.join(pagingDir, \"index.ts\"), await formatTs(`export * from \"./Page${importExt}\";`));\n await fs.writeFile(path.join(pagingDir, \"Page.ts\"), await formatTs(reexportTypes([\"Page\"], \"<T>\")));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../../util/test/formatTs.js\";\nimport { generateAggregationsDir } from \"./internal-foundry-ontology-runtime-dist/generateAggregationsDir.js\";\nimport { generateBaseTypesDir } from \"./internal-foundry-ontology-runtime-dist/generateBaseTypesDir.js\";\nimport { generateClientDir } from \"./internal-foundry-ontology-runtime-dist/generateClientDir.js\";\nimport { generateFiltersDir } from \"./internal-foundry-ontology-runtime-dist/generateFiltersDir.js\";\nimport { generateOntologyProviderDir } from \"./internal-foundry-ontology-runtime-dist/generateOntologyProviderDir.js\";\nimport { generatePagingDir } from \"./internal-foundry-ontology-runtime-dist/generatePagingDir.js\";\nexport async function generateOntologyRuntimeDistDir(outDir, fs, importExt = \"\") {\n const runtimeDistDir = path.join(outDir, \"internal\", \"@foundry\", \"ontology-runtime\", \"dist\");\n await fs.mkdir(runtimeDistDir, {\n recursive: true\n });\n await generateOntologyProviderDir(fs, runtimeDistDir, importExt);\n await generateAggregationsDir(fs, runtimeDistDir, importExt);\n await generatePagingDir(runtimeDistDir, fs, importExt);\n await generateBaseTypesDir(runtimeDistDir, fs, importExt);\n await generateClientDir(runtimeDistDir, fs, importExt);\n await generateFiltersDir(runtimeDistDir, fs, importExt);\n\n // Nothing exists for this in the new codebase so we skip\n // but I already wrote the code so leaving this for now in case we need it\n // await generateCommonDir(runtimeDistDir, fs);\n\n await fs.writeFile(path.join(runtimeDistDir, \"index.ts\"), await formatTs(`\n export * from \"./aggregations/index${importExt}\";\n export * from \"./baseTypes/index${importExt}\";\n ${\"\"\n // Skipping this one, it doesn't have an equiv now\n // export * from \"./common/index${importExt}\";\n }\n // export * from \"./filters/index${importExt}\";\n ${\"\"\n // Skipping this one, it doesn't have an equiv now\n // export * from \"./iterator/index${importExt}\";\n }\n ${\"\"\n // Skipping this one, its not used\n // export * from \"./models/index${importExt}\";\n }\n \n export * from \"./ontologyProvider/index${importExt}\";\n export * from \"./paging/index${importExt}\";\n`));\n}","/*\n * Copyright 2023 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 { generateOAuthClientDistDir } from \"./backcompat/generateOAuthDistDir.js\";\nimport { generateOntologyRuntimeDistDir } from \"./backcompat/generateOntologyRuntimeDistDir.js\";\nexport async function generateBackCompatDeprecatedExports(fs, outDir, importExt = \"\") {\n await generateOntologyRuntimeDistDir(outDir, fs, importExt);\n await generateOAuthClientDistDir(outDir, fs, importExt);\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getModifiedEntityTypes } from \"../shared/getEditedEntities.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { getTypeScriptTypeFromDataType } from \"./generateActions.js\";\nexport async function generateBatchActions(ontology, fs, outDir, importExt = \"\") {\n const importedObjects = new Set();\n let actionSignatures = [];\n for (const action of Object.values(ontology.actionTypes)) {\n const entries = Object.entries(action.parameters);\n const modifiedEntityTypes = getModifiedEntityTypes(action);\n const addedObjects = Array.from(modifiedEntityTypes.addedObjects);\n const modifiedObjects = Array.from(modifiedEntityTypes.modifiedObjects);\n addedObjects.forEach(importedObjects.add, importedObjects);\n modifiedObjects.forEach(importedObjects.add, importedObjects);\n let jsDocBlock = [\"/**\"];\n if (action.description) {\n jsDocBlock.push(`* ${action.description}`);\n }\n let parameterBlock = \"\";\n if (entries.length > 0) {\n parameterBlock = `params: { \\n`;\n for (const [parameterName, parameterData] of entries) {\n parameterBlock += `\"${parameterName}\"`;\n parameterBlock += parameterData.required ? \": \" : \"?: \";\n const typeScriptType = getTypeScriptTypeFromDataType(parameterData.dataType, importedObjects);\n parameterBlock += `${typeScriptType};\\n`;\n jsDocBlock.push(`* @param {${typeScriptType}} params.${parameterName}`);\n }\n parameterBlock += \"}[], \";\n } else {\n parameterBlock = `params: Record<string,never>[], `;\n }\n jsDocBlock.push(`*/`);\n actionSignatures.push(`\n ${jsDocBlock.join(\"\\n\")}\n ${action.apiName}<O extends BatchActionExecutionOptions>(${parameterBlock}options?: O): \n Promise<Result<BatchActionResponseFromOptions<O, Edits<${addedObjects.length > 0 ? addedObjects.join(\" | \") : \"void\"}, ${modifiedObjects.length > 0 ? modifiedObjects.join(\" | \") : \"void\"}>>, ActionError>>;\n `);\n }\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"BatchActions.ts\"), await formatTs(`\n import type { ObjectSet, LocalDate, Timestamp, Attachment, Edits, ActionExecutionOptions, BatchActionExecutionOptions, ActionError, Result, ActionResponseFromOptions, BatchActionResponseFromOptions } from \"@osdk/legacy-client\";\n ${Array.from(importedObjects).map(importedObject => `import type { ${importedObject} } from \"../objects/${importedObject}${importExt}\";`).join(\"\\n\")}\n export interface BatchActions {\n ${actionSignatures.join(\"\\n\")}\n }\n `));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getModifiedEntityTypes } from \"../shared/getEditedEntities.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { getTypeScriptTypeFromDataType } from \"./generateActions.js\";\nexport async function generateBulkActions(ontology, fs, outDir, importExt = \"\") {\n const importedObjects = new Set();\n let actionSignatures = [];\n for (const action of Object.values(ontology.actionTypes)) {\n const entries = Object.entries(action.parameters);\n const modifiedEntityTypes = getModifiedEntityTypes(action);\n const addedObjects = Array.from(modifiedEntityTypes.addedObjects);\n const modifiedObjects = Array.from(modifiedEntityTypes.modifiedObjects);\n addedObjects.forEach(importedObjects.add, importedObjects);\n modifiedObjects.forEach(importedObjects.add, importedObjects);\n let jsDocBlock = [\"/**\"];\n if (action.description) {\n jsDocBlock.push(`* ${action.description}`);\n }\n let parameterBlock = \"\";\n if (entries.length > 0) {\n parameterBlock = `params: { \\n`;\n for (const [parameterName, parameterData] of entries) {\n parameterBlock += `\"${parameterName}\"`;\n parameterBlock += parameterData.required ? \": \" : \"?: \";\n const typeScriptType = getTypeScriptTypeFromDataType(parameterData.dataType, importedObjects);\n parameterBlock += `${typeScriptType};\\n`;\n jsDocBlock.push(`* @param {${typeScriptType}} params.${parameterName}`);\n }\n parameterBlock += \"}[], \";\n } else {\n parameterBlock = `params: Record<string,never>[], `;\n }\n jsDocBlock.push(`*/`);\n actionSignatures.push(`\n ${jsDocBlock.join(\"\\n\")}\n ${action.apiName}<O extends BulkActionExecutionOptions>(${parameterBlock}options?: O): \n Promise<Result<BulkActionResponseFromOptions<O, Edits<${addedObjects.length > 0 ? addedObjects.join(\" | \") : \"void\"}, ${modifiedObjects.length > 0 ? modifiedObjects.join(\" | \") : \"void\"}>>, ActionError>>;\n `);\n }\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"BulkActions.ts\"), await formatTs(`\n import type { ObjectSet, LocalDate, Timestamp, Attachment, Edits, ActionExecutionOptions, BulkActionExecutionOptions, ActionError, Result, ActionResponseFromOptions, BulkActionResponseFromOptions } from \"@osdk/legacy-client\";\n ${Array.from(importedObjects).map(importedObject => `import type { ${importedObject} } from \"../objects/${importedObject}${importExt}\";`).join(\"\\n\")}\n export interface BulkActions {\n ${actionSignatures.join(\"\\n\")}\n }\n `));\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateFoundryClientFile(fs, outDir, importExt = \"\") {\n await fs.writeFile(path.join(outDir, \"FoundryClient.ts\"), await formatTs(`\n import { BaseFoundryClient } from \"@osdk/legacy-client\";\n import type { Auth, FoundryClientOptions } from \"@osdk/legacy-client\";\n import { Ontology } from \"./Ontology${importExt}\";\n\n export class FoundryClient<TAuth extends Auth = Auth> extends BaseFoundryClient<typeof Ontology, TAuth> {\n constructor(options: FoundryClientOptions<TAuth>) {\n super(options, Ontology);\n }\n\n get ontology(): Ontology {\n return super.ontology;\n }\n }`));\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateIndexFile(fs, outDir, importExt) {\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`\n export * from \"@osdk/legacy-client\";\n export type { Ontology } from \"./Ontology${importExt}\";\n export { FoundryClient } from \"./FoundryClient${importExt}\";\n `));\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function commaSeparatedIdentifiers(identifiers, alternateNames) {\n return identifiers.map(i => {\n const alt = alternateNames?.get(i);\n if (alt) {\n return `${i}: ${alt}`;\n }\n return i;\n }).join(\",\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function commaSeparatedTypeIdentifiers(identifiers, altNames) {\n return identifiers.map(i => `${i}: typeof ${altNames?.get(i) ?? i}`).join(\",\");\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { commaSeparatedIdentifiers } from \"../util/commaSeparatedIdentifiers.js\";\nimport { commaSeparatedTypeIdentifiers } from \"../util/commaSeparatedTypeIdentifiers.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateMetadataFile(ontology, userAgent, fs, outDir, importExt = \"\") {\n const objectNames = Object.keys(ontology.objectTypes);\n const actionNames = Object.keys(ontology.actionTypes);\n const queryNames = Object.keys(ontology.queryTypes);\n const actionAltNames = new Map();\n const queryAltNames = new Map();\n const seenIdentifiers = new Set(objectNames);\n for (const actionName of actionNames) {\n if (seenIdentifiers.has(actionName)) {\n actionAltNames.set(actionName, `${actionName}Action`);\n } else {\n seenIdentifiers.add(actionName);\n }\n }\n for (const queryName of queryNames) {\n if (seenIdentifiers.has(queryName)) {\n queryAltNames.set(queryName, `${queryName}Query`);\n }\n }\n const getImportClause = (name, altNames) => {\n const alt = altNames.get(name);\n if (alt) {\n return `${name} as ${alt}`;\n } else {\n return name;\n }\n };\n await fs.writeFile(path.join(outDir, \"Ontology.ts\"), await formatTs(`\n import type { OntologyDefinition } from \"@osdk/api\";\n import type { Ontology as ClientOntology } from \"@osdk/legacy-client\";\n import type { Objects } from \"./ontology/objects/Objects${importExt}\";\n import type { Actions } from \"./ontology/actions/Actions${importExt}\";\n import type { Queries } from \"./ontology/queries/Queries${importExt}\";\n import type { BatchActions } from \"./ontology/actions/BatchActions${importExt}\";\n import type { BulkActions } from \"./ontology/actions/BulkActions${importExt}\";\n ${objectNames.map(name => `import {${name}} from \"./ontology/objects/${name}${importExt}\";`).join(\"\\n\")}\n ${actionNames.map(name => `import {${getImportClause(name, actionAltNames)}} from \"./ontology/actions/${name}${importExt}\";`).join(\"\\n\")}\n ${queryNames.map(name => `import {${getImportClause(name, queryAltNames)}} from \"./ontology/queries/${name}${importExt}\";`).join(\"\\n\")}\n\n export const Ontology : {\n metadata: {\n ontologyRid: \"${ontology.ontology.rid}\",\n ontologyApiName: \"${ontology.ontology.apiName}\",\n userAgent: \"${userAgent}\",\n },\n objects: {\n ${commaSeparatedTypeIdentifiers(objectNames)}\n },\n actions: {\n ${commaSeparatedTypeIdentifiers(actionNames, actionAltNames)}\n },\n queries: {\n ${commaSeparatedTypeIdentifiers(queryNames, queryAltNames)}\n },\n } = {\n metadata: {\n ontologyRid: \"${ontology.ontology.rid}\" as const,\n ontologyApiName: \"${ontology.ontology.apiName}\" as const,\n userAgent: \"${userAgent}\" as const,\n },\n objects: {\n ${commaSeparatedIdentifiers(objectNames)}\n },\n actions: {\n ${commaSeparatedIdentifiers(actionNames, actionAltNames)}\n },\n queries: {\n ${commaSeparatedIdentifiers(queryNames, queryAltNames)}\n }\n } satisfies OntologyDefinition<\n ${stringUnionFrom(objectNames)},\n ${stringUnionFrom(Object.values(ontology.actionTypes).map(actionType => actionType.apiName))},\n ${stringUnionFrom(Object.values(ontology.queryTypes).map(queryType => queryType.apiName))}>;\n \nexport interface Ontology extends ClientOntology<typeof Ontology> {\n objects: Objects;\n actions: Actions;\n /** @deprecated use batchActions */\n bulkActions: BulkActions;\n batchActions: BatchActions;\n queries: Queries;\n}`));\n}\nfunction stringUnionFrom(values) {\n if (values.length === 0) {\n return \"never\";\n }\n return values.map(n => `\"${n}\"`).join(\"|\");\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateObjectsInterfaceFile(ontology, fs, outDir, importExt = \"\") {\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"Objects.ts\"), await formatTs(`\n import { BaseObjectSet } from \"@osdk/legacy-client\";\n ${Array.from(Object.keys(ontology.objectTypes)).map(importedObject => `import type { ${importedObject} } from \"./${importedObject}${importExt}\";`).join(\"\\n\")}\n \n export interface Objects {\n ${Object.keys(ontology.objectTypes).map(apiName => `${apiName} : BaseObjectSet<${apiName}>;`).join(\"\\n\")}\n }\n ;`));\n}","/*\n * Copyright 2023 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 { join } from \"node:path\";\nexport async function generateObjectsInterfaceSupportFiles(ontology, fs, outDir, importExt = \"\") {\n await fs.mkdir(outDir, {\n recursive: true\n });\n for (const {\n objectType: {\n apiName\n }\n } of Object.values(ontology.objectTypes)) {\n const fileName = join(outDir, `${apiName}.ts`);\n const localApiName = `OG_${apiName}`;\n const contents = [];\n contents.push(`import { ObjectSetAggregateArg, ObjectSetFilterArg, ObjectSetGroupByArg, ObjectSetMultipleAggregateArg, ObjectSetOrderByArg } from \"@osdk/legacy-client\";`);\n contents.push(`import { ${apiName} as ${localApiName} } from \"../${apiName}${importExt}\";`);\n contents.push(\"\"); // empty line\n\n contents.push(`/** @deprecated Use ${apiName} from ontology/objects instead */`, `export type ${apiName} = ${localApiName};`);\n contents.push(`/** @deprecated Use ObjectSetFilterArg<${apiName}> instead */`, `export type ${apiName}Filter = ObjectSetFilterArg<${localApiName}>;`);\n contents.push(`/** @deprecated Use ObjectSetOrderByArg<${apiName}> instead */`, `export type ${apiName}OrderBy = ObjectSetOrderByArg<${localApiName}>;`);\n contents.push(`/** @deprecated Use ObjectSetGroupByArg<${apiName}> instead */`, `export type ${apiName}GroupByProperties = ObjectSetGroupByArg<${localApiName}>;`);\n contents.push(`\n /**\n * Aggregation properties for ${apiName}\n * @deprecated Use ObjectSetAggregateArg<${apiName}> instead\n */`, `export type ${apiName}AggregationProperties = ObjectSetAggregateArg<${localApiName}>;`);\n contents.push(`\n /**\n * Multiple aggregation properties for ${apiName}.\n * @deprecated Use ObjectSetMultipleAggregateArg<${apiName}> instead\n */`, `export type ${apiName}MultipleAggregationProperties = ObjectSetMultipleAggregateArg<${localApiName}>;`);\n await fs.writeFile(fileName, contents.join(\"\\n\"));\n }\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateOntologyIndexFile(fs, outDir) {\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`\n export type { ObjectSet } from \"@osdk/legacy-client\";\n `));\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getObjectImports(objects, curApiName, currentFilePath, v2) {\n return Array.from(objects).filter(obj => obj.fullApiName !== curApiName).map(obj => {\n return `import type { ${obj.getDefinitionIdentifier(v2)} as ${obj.getImportedDefinitionIdentifier(v2)} } from \"${obj.getImportPathRelTo(\"./\" + currentFilePath)}\";`;\n }).join(\"\\n\");\n}","/*\n * Copyright 2023 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 { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nexport function wireActionTypeV2ToSdkActionDefinition(input) {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n parameters: Object.fromEntries(Object.entries(input.parameters).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects)\n };\n}\nfunction wireActionParameterV2ToSdkParameterDefinition(value) {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(value.dataType.type === \"array\" ? value.dataType.subType : value.dataType),\n nullable: !value.required,\n description: value.description\n };\n}\nfunction actionPropertyToSdkPropertyDefinition(parameterType) {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"marking\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: parameterType.objectTypeApiName\n };\n case \"object\":\n return {\n type: \"object\",\n object: parameterType.objectTypeApiName\n };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n }\n}\nfunction createModifiedEntities(addedObjects, modifiedObjects) {\n let entities = {};\n for (const key of addedObjects) {\n entities[key] = {\n created: true,\n modified: false\n };\n }\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n } else {\n entities[key] = {\n created: false,\n modified: true\n };\n }\n }\n return entities;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function stringUnionFrom(values) {\n if (values.length === 0) {\n return \"never\";\n } else {\n return values.map(v => `\"${v}\"`).join(\"|\");\n }\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { wireActionTypeV2ToSdkActionDefinition } from \"../shared/wireActionTypeV2ToSdkActionDefinition.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringUnionFrom } from \"../util/stringUnionFrom.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generatePerActionDataFilesV1({\n sanitizedOntology: ontology,\n fs,\n outDir: rootOutDir,\n importExt = \"\",\n ontology: enhancedOntology\n}) {\n const outDir = path.join(rootOutDir, \"ontology\", \"actions\");\n await fs.mkdir(outDir, {\n recursive: true\n });\n await Promise.all(Object.values(enhancedOntology.actionTypes).map(async action => {\n const currentFilePath = `${path.join(\"ontology\", \"actions\", `${action.shortApiName}.ts`)}`;\n const uniqueApiNamesArray = extractReferencedObjectsFromAction(action.og);\n const uniqueApiNames = new Set(uniqueApiNamesArray);\n const uniqueApiNamesString = stringUnionFrom([...uniqueApiNames]);\n const fullActionDef = deleteUndefineds(wireActionTypeV2ToSdkActionDefinition(action.og));\n const {\n parameters,\n ...actionDefSansParameters\n } = fullActionDef;\n function createV1Object() {\n return ` export const ${action.shortApiName} = ${JSON.stringify(fullActionDef, null, 2)} satisfies ActionDefinition<\"${action.shortApiName}\", ${uniqueApiNamesString}>;`;\n }\n const referencedObjectDefs = new Set();\n for (const p of Object.values(action.parameters)) {\n if (p.dataType.type === \"object\" || p.dataType.type === \"objectSet\") {\n if (p.dataType.objectApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.objectApiName));\n }\n if (p.dataType.objectTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.objectTypeApiName));\n }\n }\n if (p.dataType.type === \"array\" && (p.dataType.subType.type === \"object\" || p.dataType.subType.type === \"objectSet\")) {\n if (p.dataType.subType.objectApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.subType.objectApiName));\n }\n if (p.dataType.subType.objectTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.subType.objectTypeApiName));\n }\n }\n }\n const imports = getObjectImports(referencedObjectDefs, undefined, currentFilePath, false);\n await fs.writeFile(path.join(rootOutDir, currentFilePath), await formatTs(`\n import type { ActionDefinition, ObjectActionDataType, ObjectSetActionDataType, VersionBound} from \"@osdk/api\";\n import type { ApplyActionOptions, ApplyBatchActionOptions, ActionReturnTypeForOptions, ActionParam } from '@osdk/client.api';\n import { $osdkMetadata} from \"../../OntologyMetadata${importExt}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${imports}\n\n ${createV1Object()}\n `));\n }));\n const indexFileRelPath = path.join(\"ontology\", \"actions\", `index.ts`);\n await fs.writeFile(path.join(rootOutDir, indexFileRelPath), await formatTs(`\n ${Object.values(enhancedOntology.actionTypes).map(action => {\n const exportConstLine = `export {${action.shortApiName} } from \"${action.getImportPathRelTo(indexFileRelPath)}\";`;\n const exportTypeLine = `export type { ${action.paramsIdentifier} } from \"${action.getImportPathRelTo(indexFileRelPath)}\";`;\n return exportConstLine;\n }).join(\"\\n\")}\n ${Object.keys(ontology.actionTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n}\nfunction extractReferencedObjectsFromAction(actionType) {\n const referencedObjectsInParameters = Object.values(actionType.parameters).flatMap(({\n dataType\n }) => {\n const objectTypeReference = extractReferencedObjectsFromActionParameter(dataType);\n return objectTypeReference ? [objectTypeReference] : [];\n });\n const referenceObjectsInEdits = actionType.operations.flatMap(value => {\n switch (value.type) {\n case \"createObject\":\n return [value.objectTypeApiName];\n case \"modifyObject\":\n return [value.objectTypeApiName];\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n return [];\n }\n });\n return [...referenceObjectsInEdits, ...referencedObjectsInParameters];\n}\nfunction extractReferencedObjectsFromActionParameter(actionParameter) {\n switch (actionParameter.type) {\n case \"objectSet\":\n case \"object\":\n return actionParameter.objectTypeApiName;\n case \"array\":\n return extractReferencedObjectsFromActionParameter(actionParameter.subType);\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"date\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n return undefined;\n }\n}","/*\n * Copyright 2023 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\n/**\n * A function for changing the stringified key/value pairs of an object.\n *\n * @param value The value of the key/value pair.\n * @param defaultValueFormatter The function that would be called if this customizer wasn't used\n * @param key The key of the key/value pair.\n * @param defaultKeyFormatter The function that would be called if this customizer wasn't used\n *\n * @returns A string, a tuple of strings, or undefined.\n * If a string is returned, it will be used as the value of the key/value pair.\n * If a tuple of strings is returned, the first string will be used as the key of the key/value pair\n * and the second string will be used as the value of the key/value pair.\n * If undefined is returned, the pair will be removed\n */\n\nconst defaultCustomizer = (value, defaultValueFormatter, key, defaultKeyFormatter) => {\n return [defaultKeyFormatter(key), defaultValueFormatter(value)];\n};\nexport function stringify(obj, customizer = {}, separator = \",\\n\") {\n const defaultKeyFormatter = key => `${JSON.stringify(key)}`;\n const entries = [];\n const sortedKeys = Object.keys(obj).sort((a, b) => a.localeCompare(b));\n for (const key of sortedKeys) {\n const value = obj[key];\n const res = (customizer[key] ?? customizer[\"*\"] ?? defaultCustomizer)(value, value => JSON.stringify(value, null, 2), key, defaultKeyFormatter);\n if (res) {\n if (typeof res === \"string\") {\n entries.push(`${defaultKeyFormatter(key)}: ${res}`);\n } else {\n entries.push(`${res[0]}: ${res[1]}`);\n }\n }\n }\n return entries.join(separator);\n}","/*\n * Copyright 2023 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 { wireObjectTypeFullMetadataToSdkObjectTypeDefinition } from \"@osdk/generator-converters\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\n\n/** @internal */\nexport function wireObjectTypeV2ToSdkObjectConstV1(wireObject, {\n ontology\n}, currentFilePath) {\n const object = ontology.requireObjectType(wireObject.objectType.apiName, true);\n const uniqueLinkTargetTypes = new Set(wireObject.linkTypes.map(a => ontology.requireObjectType(a.objectTypeApiName, false)));\n const definition = deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectTypeDefinition(object.og, false));\n const objectDefIdentifier = object.getDefinitionIdentifier(false);\n function getV1Types() {\n return `\n export interface ${objectDefIdentifier} extends ObjectTypeDefinition<\"${object.fullApiName}\", ${object.uniqueImportName}> {\n ${stringify(definition, {\n osdkMetadata: () => undefined,\n // not used in v1\n links: _value => `{\n ${stringify(definition.links, {\n \"*\": definition => `ObjectTypeLinkDefinition<${ontology.requireObjectType(definition.targetType).getImportedDefinitionIdentifier(false)}, ${definition.multiplicity}>`\n })}\n }`\n })}\n }\n `;\n }\n const imports = getObjectImports(uniqueLinkTargetTypes, definition.apiName, currentFilePath, false);\n return `${imports}${getV1Types()}\n\n export const ${object.shortApiName}: ${objectDefIdentifier} = {\n ${stringify(definition, {\n osdkMetadata: value => undefined\n })}\n \n };`;\n}","/*\n * Copyright 2023 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\n// This must match the reservedKeywords definition in packages/legacy-client\nconst reservedKeywords = new Set([\"break\", \"case\", \"catch\", \"class\", \"const\", \"continue\", \"debugger\", \"default\", \"delete\", \"do\", \"else\", \"enum\", \"export\", \"extends\", \"false\", \"finally\", \"for\", \"function\", \"if\", \"import\", \"in\", \"instanceof\", \"new\", \"null\", \"return\", \"super\", \"switch\", \"this\", \"throw\", \"true\", \"try\", \"typeof\", \"var\", \"void\", \"while\", \"with\", \"implements\", \"interface\", \"let\", \"package\", \"private\", \"protected\", \"public\", \"static\", \"yield\"]);\nexport function isReservedKeyword(name) {\n return reservedKeywords.has(name);\n}","/*\n * Copyright 2023 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 { isReservedKeyword } from \"../util/reservedKeywords.js\";\nexport function wireObjectTypeV2ToObjectInterfaceStringV1(objectTypeWithLinks, importExt = \"\") {\n const uniqueLinkTargets = new Set(objectTypeWithLinks.linkTypes.map(a => a.objectTypeApiName).filter(a => a !== objectTypeWithLinks.objectType.apiName));\n return `import type { OntologyObject, LocalDate, Timestamp, GeoShape, GeoPoint, Attachment, TimeSeries, MultiLink, SingleLink, StringLong } from \"@osdk/legacy-client\";\n${Array.from(uniqueLinkTargets).map(linkTarget => `import type { ${linkTarget} } from \"./${linkTarget}${importExt}\";`).join(\"\\n\")}\n\n ${getDescriptionIfPresent(objectTypeWithLinks.objectType.description)}\n export interface ${objectTypeWithLinks.objectType.apiName} extends OntologyObject {\n /** \\@deprecated please migrate to \\$apiName instead */\n readonly __apiName: \"${objectTypeWithLinks.objectType.apiName}\" & {${objectTypeWithLinks.linkTypes.map(linkType => {\n return `/** \\@deprecated please migrate to pivotTo(${linkType.apiName}) instead */ searchAround${linkType.apiName.charAt(0).toUpperCase() + linkType.apiName.slice(1)}?: never`;\n })}};\n /** \\@deprecated please migrate to \\$primaryKey instead */\n readonly __primaryKey: ${wirePropertyTypeV2ToTypeScriptType(objectTypeWithLinks.objectType.properties[objectTypeWithLinks.objectType.primaryKey].dataType)};\n readonly \\$apiName: \"${objectTypeWithLinks.objectType.apiName}\";\n readonly \\$primaryKey: ${wirePropertyTypeV2ToTypeScriptType(objectTypeWithLinks.objectType.properties[objectTypeWithLinks.objectType.primaryKey].dataType)};\n${Object.entries(objectTypeWithLinks.objectType.properties).sort((a, b) => a[0].localeCompare(b[0])).flatMap(([propertyName, propertyDefinition]) => {\n const propertyType = wirePropertyTypeV2ToTypeScriptType(propertyDefinition.dataType);\n const entries = [`${getDescriptionIfPresent(propertyDefinition.description, true)}readonly ${propertyName}: ${propertyType} | undefined`];\n if (isReservedKeyword(propertyName)) {\n entries.push(`/** @deprecated please migrate to '${propertyName}' instead */\n readonly ${propertyName}_: ${propertyType} | undefined`);\n }\n return entries;\n }).join(\";\\n\")}\n${objectTypeWithLinks.linkTypes.flatMap(linkType => {\n const entries = [`readonly ${linkType.apiName}: ${linkType.cardinality === \"MANY\" ? \"MultiLink\" : \"SingleLink\"}<${linkType.objectTypeApiName}>`];\n return entries;\n }).join(\";\\n\")}\n}\n `;\n}\nfunction wirePropertyTypeV2ToTypeScriptType(property) {\n switch (property.type) {\n case \"string\":\n return \"string\";\n case \"boolean\":\n return \"boolean\";\n case \"array\":\n return wirePropertyTypeV2ToTypeScriptType(property.subType) + \"[]\";\n case \"integer\":\n return \"number\";\n case \"attachment\":\n return \"Attachment\";\n case \"byte\":\n return \"number\";\n case \"date\":\n return \"LocalDate\";\n case \"decimal\":\n return \"string\";\n case \"double\":\n return \"number\";\n case \"float\":\n return \"number\";\n case \"geopoint\":\n return \"GeoPoint\";\n case \"geoshape\":\n return \"GeoShape\";\n case \"long\":\n return \"StringLong\";\n case \"short\":\n return \"number\";\n case \"timestamp\":\n return \"Timestamp\";\n case \"timeseries\":\n return property.itemType.type === \"string\" ? `TimeSeries<string>` : `TimeSeries<number>`;\n case \"marking\":\n return \"string\";\n default:\n const _ = property;\n throw new Error(`Unknown property type ${property}`);\n }\n}\nexport function getDescriptionIfPresent(description, includeNewline) {\n if (description) {\n return `/**\n * ${description}\n */${includeNewline ? \"\\n\" : \"\"}`;\n }\n return \"\";\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { wireObjectTypeV2ToSdkObjectConstV1 } from \"./wireObjectTypeV2ToSdkObjectConstV1.js\";\nimport { wireObjectTypeV2ToObjectInterfaceStringV1 } from \"./wireObjectTypeV2ToV1ObjectInterfaceString.js\";\nexport async function generatePerObjectInterfaceAndDataFiles(ontology, fs, outDir, importExt = \"\") {\n await fs.mkdir(outDir, {\n recursive: true\n });\n await Promise.all(Object.values(ontology.og.objectTypes).map(async object => {\n const relPath = path.join(\".\", \"ontology\", `objects`, `${object.objectType.apiName}.ts`);\n await fs.writeFile(path.join(outDir, `${object.objectType.apiName}.ts`), await formatTs(`\n import type { ObjectTypeDefinition, ObjectTypeLinkDefinition, PropertyDef } from \"@osdk/api\";\n ${wireObjectTypeV2ToObjectInterfaceStringV1(object, importExt)}\n\n ${wireObjectTypeV2ToSdkObjectConstV1(object, {\n ontology\n }, relPath)}\n `));\n }));\n await fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`\n ${Object.keys(ontology.og.objectTypes).map(apiName => `export * from \"./${apiName}${importExt}\";`).join(\"\\n\")}\n export type { ObjectSet } from \"@osdk/legacy-client\";\\n\n `));\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getObjectTypesFromQueryDataType(dataType, types) {\n switch (dataType.type) {\n case \"array\":\n case \"set\":\n getObjectTypesFromQueryDataType(dataType.subType, types);\n return;\n case \"object\":\n types.add(dataType.objectTypeApiName);\n return;\n case \"objectSet\":\n types.add(dataType.objectTypeApiName);\n return;\n case \"struct\":\n for (const prop of Object.values(dataType.fields)) {\n getObjectTypesFromQueryDataType(prop.fieldType, types);\n }\n return;\n case \"union\":\n for (const type of dataType.unionTypes) {\n getObjectTypesFromQueryDataType(type, types);\n }\n return;\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"null\":\n case \"string\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n case \"unsupported\":\n /* complete no-op */\n return;\n default:\n const _ = dataType;\n throw new Error(`Cannot find object types from unsupported QueryDataType ${dataType.type}`);\n }\n}","/*\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 { getObjectTypesFromQueryDataType } from \"./getObjectTypesFromQueryDataType.js\";\nexport function getObjectTypeApiNamesFromQuery(query) {\n const types = new Set();\n for (const {\n dataType\n } of Object.values(query.parameters)) {\n getObjectTypesFromQueryDataType(dataType, types);\n }\n getObjectTypesFromQueryDataType(query.output, types);\n return Array.from(types);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isNullableQueryDataType(input) {\n if (input.type === \"null\") {\n return true;\n }\n if (input.type === \"union\") {\n return input.unionTypes.some(t => isNullableQueryDataType(t));\n }\n return false;\n}","/*\n * Copyright 2023 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 { isNullableQueryDataType } from \"./isNullableQueryDataType.js\";\nexport function wireQueryDataTypeToQueryDataTypeDefinition(input) {\n switch (input.type) {\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"string\":\n case \"timestamp\":\n return {\n type: input.type,\n nullable: false\n };\n case \"object\":\n return {\n type: \"object\",\n object: input.objectTypeApiName,\n nullable: false\n };\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: input.objectTypeApiName,\n nullable: false\n };\n case \"array\":\n return {\n ...wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n multiplicity: true\n };\n case \"set\":\n return {\n type: \"set\",\n set: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n nullable: false\n };\n case \"union\":\n const allowNulls = isNullableQueryDataType(input);\n\n // special case for a union where one half is nullable to skip the union step and just allow nulls directly\n if (allowNulls && input.unionTypes.length === 2) {\n const nonNull = input.unionTypes.find(t => t.type != null);\n if (nonNull) {\n return {\n ...wireQueryDataTypeToQueryDataTypeDefinition(nonNull),\n nullable: true\n };\n }\n }\n return {\n type: \"union\",\n union: input.unionTypes.reduce((acc, t) => {\n if (t.type === \"null\") {\n return acc;\n }\n acc.push(wireQueryDataTypeToQueryDataTypeDefinition(t));\n return acc;\n }, []),\n nullable: allowNulls\n };\n case \"struct\":\n return {\n type: \"struct\",\n struct: Object.fromEntries(input.fields.map(f => [f.name, wireQueryDataTypeToQueryDataTypeDefinition(f.fieldType)])),\n nullable: false\n };\n case \"twoDimensionalAggregation\":\n return {\n type: \"twoDimensionalAggregation\",\n twoDimensionalAggregation: get2DQueryAggregationProps(input),\n nullable: false\n };\n case \"threeDimensionalAggregation\":\n return {\n type: \"threeDimensionalAggregation\",\n threeDimensionalAggregation: get3DQueryAggregationProps(input),\n nullable: false\n };\n case \"null\":\n case \"unsupported\":\n throw new Error(`Accidentally tried to handle QueryDataType.type ${input.type}`);\n default:\n const _ = input;\n throw new Error(`Unsupported QueryDataType.type ${input.type}`);\n }\n}\nfunction get2DQueryAggregationProps(input) {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: input.valueType.type\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: input.valueType.type\n };\n }\n throw new Error(`Cannot create 2D aggregation with ${input.keyType.type} as its type`);\n }\n}\nfunction get3DQueryAggregationProps(input) {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: get2DQueryAggregationProps(input.valueType)\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: get2DQueryAggregationProps(input.valueType)\n };\n }\n throw new Error(`Cannot create 3D aggregation with ${input.keyType.type} as its type`);\n }\n}\n\n/**\n * Guard against aggregation key types that are allowed by the backend types but are illegal to actually use\n */\nfunction guardInvalidKeyTypes(key) {\n return key.type === \"string\" || key.type === \"boolean\";\n}","/*\n * Copyright 2023 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 { wireQueryDataTypeToQueryDataTypeDefinition } from \"./wireQueryDataTypeToQueryDataTypeDefinition.js\";\nexport function wireQueryTypeV2ToSdkQueryDefinition(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n parameters: Object.fromEntries(Object.entries(input.parameters).map(([name, parameter]) => [name, wireQueryParameterV2ToQueryParameterDefinition(parameter)])),\n output: wireQueryDataTypeToQueryDataTypeDefinition(input.output)\n };\n}\nexport function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version\n };\n}\nexport function wireQueryParameterV2ToQueryParameterDefinition(parameter) {\n return {\n description: parameter.description,\n ...wireQueryDataTypeToQueryDataTypeDefinition(parameter.dataType)\n };\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getObjectTypeApiNamesFromQuery } from \"../shared/getObjectTypeApiNamesFromQuery.js\";\nimport { wireQueryTypeV2ToSdkQueryDefinition } from \"../shared/wireQueryTypeV2ToSdkQueryDefinition.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generatePerQueryDataFiles({\n fs,\n outDir: rootOutDir,\n ontology\n}, v2) {\n const relOutDir = path.join(\".\", \"ontology\", \"queries\");\n const outDir = path.join(rootOutDir, \"ontology\", \"queries\");\n await fs.mkdir(outDir, {\n recursive: true\n });\n await Promise.all(Object.values(ontology.queryTypes).map(async query => {\n await generateV1QueryFile(fs, outDir, query);\n }));\n await fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`\n ${Object.values(ontology.queryTypes).map(query => `export * from \"${query.getImportPathRelTo(path.join(relOutDir, \"index.ts\"))}\";`).join(\"\\n\")}\n ${Object.keys(ontology.queryTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n}\nasync function generateV1QueryFile(fs, outDir, query) {\n const objectTypes = getObjectTypeApiNamesFromQuery(query);\n await fs.writeFile(path.join(outDir, `${query.shortApiName}.ts`), await formatTs(`\n import { QueryDefinition } from \"@osdk/api\";\n\n export const ${query.shortApiName} = ${JSON.stringify(wireQueryTypeV2ToSdkQueryDefinition(query.og))} ${getQueryDefSatisfies(query.fullApiName, objectTypes)}`));\n}\nexport function getQueryDefSatisfies(apiName, objectTypes) {\n return `satisfies QueryDefinition<\"${apiName}\", ${objectTypes.length > 0 ? objectTypes.map(apiNameObj => `\"${apiNameObj}\"`).join(\"|\") : \"never\"}>;`;\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { isNullableQueryDataType } from \"../shared/isNullableQueryDataType.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateQueries(ontology, fs, outDir, importExt = \"\") {\n const importedObjects = new Set();\n const signatures = [];\n for (const query of Object.values(ontology.queryTypes)) {\n const jsDocBlock = [\"/**\"];\n if (query.description) {\n jsDocBlock.push(`* ${query.description}`);\n }\n const outputType = handleQueryDataType(query.output, importedObjects, true);\n const paramEntries = [];\n for (const [name, parameter] of Object.entries(query.parameters)) {\n const nullable = isNullableQueryDataType(parameter.dataType);\n const type = handleQueryDataType(parameter.dataType, importedObjects, false);\n paramEntries.push(`\"${name}\"${nullable ? \"?\" : \"\"}: ${type}`);\n jsDocBlock.push(`* @param {${sanitizeDocTypeName(type)}} params.${name}${parameter.description ? ` - ${parameter.description}` : \"\"}`);\n }\n const param = paramEntries.length === 0 ? \"\" : `params: { ${paramEntries.join(\"; \")} }`;\n jsDocBlock.push(`* @returns ${sanitizeDocTypeName(outputType)}`, \"*/\");\n signatures.push(`\n ${jsDocBlock.join(\"\\n\")}\n ${query.apiName}(${param}): Promise<Result<QueryResponse<${outputType}>, QueryError>>;\n `);\n }\n await fs.mkdir(outDir, {\n recursive: true\n });\n await fs.writeFile(path.join(outDir, \"Queries.ts\"), await formatTs(`\n import type { QueryResponse, QueryError, Result, Timestamp, LocalDate, Range, Attachment, ObjectSet, TwoDimensionalAggregation, ThreeDimensionalAggregation } from \"@osdk/legacy-client\";\n ${Array.from(importedObjects).map(importedObject => `import type { ${importedObject} } from \"../objects/${importedObject}${importExt}\";`).join(\"\\n\")}\n\n export interface Queries {\n ${signatures.join(\"\\n\")}\n }\n `));\n}\nfunction handleQueryDataType(dataType, importedObjects, isReturnValue) {\n switch (dataType.type) {\n case \"boolean\":\n return \"boolean\";\n case \"string\":\n return \"string\";\n case \"double\":\n case \"float\":\n case \"integer\":\n return \"number\";\n case \"long\":\n return isReturnValue ? \"string\" : \"string | number\";\n case \"date\":\n return \"LocalDate\";\n case \"timestamp\":\n return \"Timestamp\";\n case \"attachment\":\n return \"Attachment\";\n case \"array\":\n return `Array<${handleQueryDataType(dataType.subType, importedObjects, isReturnValue)}>`;\n case \"object\":\n {\n const objectType = dataType.objectTypeApiName;\n importedObjects.add(objectType);\n return isReturnValue ? objectType : `${objectType} | ${objectType}[\"__primaryKey\"]`;\n }\n case \"objectSet\":\n {\n const objectType = dataType.objectTypeApiName;\n importedObjects.add(objectType);\n return `ObjectSet<${objectType}>`;\n }\n case \"set\":\n return `Set<${handleQueryDataType(dataType.subType, importedObjects, isReturnValue)}>`;\n case \"struct\":\n const properties = dataType.fields.map(field => {\n const isNullable = isNullableQueryDataType(field.fieldType);\n return `${field.name}${isNullable ? \"?\" : \"\"}: ${handleQueryDataType(field.fieldType, importedObjects, isReturnValue)}`;\n });\n return `{ ${properties.join(\",\\n\")} }`;\n case \"union\":\n return dataType.unionTypes.map(type => handleQueryDataType(type, importedObjects, isReturnValue)).filter(type => type !== \"null\").join(\"|\");\n case \"twoDimensionalAggregation\":\n dataType.valueType;\n return `TwoDimensionalAggregation<\n ${aggregationKeyToTypescriptType(dataType.keyType)},\n ${aggregationValueToTypescriptType(dataType.valueType)}\n >`;\n case \"threeDimensionalAggregation\":\n return `ThreeDimensionalAggregation<\n ${aggregationKeyToTypescriptType(dataType.keyType)},\n ${aggregationKeyToTypescriptType(dataType.valueType.keyType)},\n ${aggregationValueToTypescriptType(dataType.valueType.valueType)}\n >`;\n case \"null\":\n return \"null\";\n case \"unsupported\":\n throw new Error(\"Cannot generate queries for unsupported type\");\n default:\n const _ = dataType;\n throw new Error(`Cannot generate queries for type ${dataType.type}`);\n }\n}\nfunction aggregationKeyToTypescriptType(keyType) {\n switch (keyType.type) {\n case \"boolean\":\n return \"boolean\";\n case \"double\":\n case \"integer\":\n return \"number\";\n case \"string\":\n return \"string\";\n case \"date\":\n return \"LocalDate\";\n case \"timestamp\":\n return \"Timestamp\";\n case \"range\":\n return `Range<${aggregationRangeToTypescriptType(keyType.subType)}>`;\n default:\n const _ = keyType;\n throw new Error(`Unknown TwoDimensionalAggregation keyType ${keyType.type}`);\n }\n}\nfunction aggregationRangeToTypescriptType(subType) {\n switch (subType.type) {\n case \"date\":\n return \"LocalDate\";\n case \"double\":\n case \"integer\":\n return \"number\";\n case \"timestamp\":\n return \"Timestamp\";\n default:\n const _ = subType;\n throw new Error(`Unsupported QueryAggregationRangeSubType ${subType.type}`);\n }\n}\nfunction aggregationValueToTypescriptType(valueType) {\n switch (valueType.type) {\n case \"date\":\n return \"LocalDate\";\n case \"double\":\n return \"number\";\n case \"timestamp\":\n return \"Timestamp\";\n default:\n const _ = valueType;\n throw new Error(`Unsupported QueryAggregationValueType ${valueType.type}`);\n }\n}\nfunction sanitizeDocTypeName(type) {\n return type.replace(/\\s/g, \"\");\n}","/*\n * Copyright 2023 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 * as path from \"node:path\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { sanitizeMetadata } from \"../shared/sanitizeMetadata.js\";\nimport { verifyOutDir } from \"../util/verifyOutDir.js\";\nimport { generateActions } from \"./generateActions.js\";\nimport { generateBackCompatDeprecatedExports } from \"./generateBackCompatDeprecatedExports.js\";\nimport { generateBatchActions } from \"./generateBatchActions.js\";\nimport { generateBulkActions } from \"./generateBulkActions.js\";\nimport { generateFoundryClientFile } from \"./generateFoundryClientFile.js\";\nimport { generateIndexFile } from \"./generateIndexFile.js\";\nimport { generateMetadataFile } from \"./generateMetadataFile.js\";\nimport { generateObjectsInterfaceFile } from \"./generateObjectsInterfaceFile.js\";\nimport { generateObjectsInterfaceSupportFiles } from \"./generateObjectsInterfaceSupportFiles.js\";\nimport { generateOntologyIndexFile } from \"./generateOntologyIndexFile.js\";\nimport { generatePerActionDataFilesV1 } from \"./generatePerActionDataFilesV1.js\";\nimport { generatePerObjectInterfaceAndDataFiles } from \"./generatePerObjectInterfaceAndDataFiles.js\";\nimport { generatePerQueryDataFiles } from \"./generatePerQueryDataFiles.js\";\nimport { generateQueries } from \"./generateQueries.js\";\nexport async function generateClientSdkVersionOneDotOne(ontology, userAgent, fs, outDir, packageType = \"commonjs\") {\n const importExt = packageType === \"module\" ? \".js\" : \"\";\n const objectsDir = path.join(outDir, \"ontology\", \"objects\");\n const actionsDir = path.join(outDir, \"ontology\", \"actions\");\n const queriesDir = path.join(outDir, \"ontology\", \"queries\");\n await verifyOutDir(outDir, fs);\n await fs.mkdir(outDir, {\n recursive: true\n });\n const sanitizedOntology = sanitizeMetadata(ontology);\n const enhancedOntology = enhanceOntology(sanitizedOntology, undefined, new Map(), importExt);\n await generateFoundryClientFile(fs, outDir, importExt);\n await generateMetadataFile(sanitizedOntology, userAgent, fs, outDir, importExt);\n await generateOntologyIndexFile(fs, path.join(outDir, \"ontology\"));\n await generateObjectsInterfaceFile(sanitizedOntology, fs, objectsDir, importExt);\n await generateObjectsInterfaceSupportFiles(sanitizedOntology, fs, path.join(objectsDir, \"objects-api\"), importExt);\n await generatePerObjectInterfaceAndDataFiles(enhancedOntology, fs, objectsDir, importExt);\n const common = {\n sanitizedOntology,\n fs,\n outDir,\n ontology: enhancedOntology\n };\n await generateActions(sanitizedOntology, fs, actionsDir, importExt);\n await generateBatchActions(sanitizedOntology, fs, actionsDir, importExt);\n await generateBulkActions(sanitizedOntology, fs, actionsDir, importExt);\n await generatePerActionDataFilesV1(common);\n await generateQueries(sanitizedOntology, fs, queriesDir, importExt);\n await generatePerQueryDataFiles(common, false);\n await generateIndexFile(fs, outDir, importExt);\n await generateBackCompatDeprecatedExports(fs, outDir, importExt);\n}","/*\n * Copyright 2023 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 path from \"path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst ExpectedOsdkVersion = \"0.22.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nexport async function generateOntologyMetadataFile({\n fs,\n outDir,\n ontology,\n ontologyApiNamespace\n}, userAgent) {\n fs.writeFile(path.join(outDir, \"OntologyMetadata.ts\"), await formatTs(`\n export type $ExpectedClientVersion = \"${ExpectedOsdkVersion}\";\n export const $osdkMetadata = { extraUserAgent: \"${userAgent}\" };\n ${ontologyApiNamespace == null ? `\n export const $ontologyRid = \"${ontology.ontology.rid}\";\n ` : \"\"}\n `));\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function propertyJsdoc(property, {\n isInherited,\n apiName\n}) {\n let ret = `/**\\n`;\n const renderDisplayName = property.displayName && property.displayName !== apiName;\n if (isInherited || renderDisplayName || property.description) {\n if (isInherited) {\n ret += ` * (inherited from parent)\\n`;\n }\n if (renderDisplayName) {\n ret += ` * display name: '${property.displayName}'${property.description ? \",\" : \"\"}\\n`;\n }\n if (property.description) {\n ret += ` * description: ${property.description}\\n`;\n }\n } else {\n ret += ` * (no ontology metadata)\\n`;\n }\n ret += ` */\\n`;\n return ret;\n}","/*\n * Copyright 2023 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 { wireObjectTypeFullMetadataToSdkObjectTypeDefinition } from \"@osdk/generator-converters\";\nimport { EnhancedObjectType } from \"../GenerateContext/EnhancedObjectType.js\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { propertyJsdoc } from \"../shared/propertyJsdoc.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nexport function getObjectDefIdentifier(name, v2) {\n return v2 ? name : `${name}Def`;\n}\n\n/** @internal */\nexport function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {\n ontology\n}, currentFilePath) {\n const object = ontology.requireObjectType(wireObject.objectType.apiName, true);\n const uniqueLinkTargetTypes = new Set(wireObject.linkTypes.map(a => ontology.requireObjectType(a.objectTypeApiName, false)));\n const definition = deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectTypeDefinition(object.og, true));\n const objectDefIdentifier = object.getDefinitionIdentifier(true);\n const objectSetIdentifier = `${object.shortApiName}.ObjectSet`;\n const propertyKeysIdentifier = `${object.shortApiName}.PropertyKeys`;\n // const osdkObjectPropsIdentifier = `OsdkObjectProps$${objectDefIdentifier}`;\n const osdkObjectPropsIdentifier = `${object.shortApiName}.Props`;\n const osdkObjectStrictPropsIdentifier = `${object.shortApiName}.StrictProps`;\n const osdkObjectLinksIdentifier = `${object.shortApiName}.Links`;\n const osdkObjectIdentifier = `${object.shortApiName}.OsdkObject`;\n const identifiers = {\n objectDefIdentifier: `${object.shortApiName}.Definition`,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier\n };\n function getV2Types() {\n return `import type {\n AggregateOpts as $AggregateOpts,\n AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as $AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy,\n AggregationsResults as $AggregationsResults, \n Augments as $Augments,\n ConvertProps as $ConvertProps,\n DefaultToFalse as $DefaultToFalse,\n FetchPageArgs as $FetchPageArgs,\n FetchPageResult as $FetchPageResult,\n LinkedType as $LinkedType,\n LinkNames as $LinkNames,\n NullabilityAdherence as $NullabilityAdherence,\n NullabilityAdherenceDefault as $NullabilityAdherenceDefault,\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n OsdkObjectLinksEntry as $OsdkObjectLinksEntry,\n OsdkObjectLinksObject as $OsdkObjectLinksObject,\n OsdkObjectPropertyType as $OsdkObjectPropertyType,\n PageResult as $PageResult,\n PropertyValueClientToWire as $PropertyValueClientToWire,\n PropertyValueWireToClient as $PropType,\n Result as $Result,\n SelectArg as $SelectArg, \n SingleLinkAccessor as $SingleLinkAccessor,\n SingleLinkAccessor as $SingleLinkAccessor\n SingleOsdkResult as $SingleOsdkResult,\n ValidToFrom as $ValidToFrom,\n WhereClause as $WhereClause,\n } from \"@osdk/client.api\";\n import type * as $clientApi from \"@osdk/client.api\";\n import type {\n ObjectOrInterfacePropertyKeysFrom2 as $ObjectOrInterfacePropertyKeysFrom2, \n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectTypeLinkDefinition as $ObjectTypeLinkDefinition,\n } from \"@osdk/api\";\n\n export namespace ${object.shortApiName} {\n\n ${createPropertyKeys(object)}\n\n\n ${createLinks(ontology, object, \"Links\")}\n\n ${createProps(object, \"Props\", false)}\n ${createProps(object, \"StrictProps\", true)}\n\n ${createObjectSet(object, identifiers)}\n\n ${createDefinition(object, ontology, \"Definition\", identifiers)}\n ${createOsdkObject(object, \"OsdkObject\", identifiers)}\n } \n\n\n\n\n /** @deprecated use ${object.shortApiName}.Definition **/\n export type ${objectDefIdentifier} = ${object.shortApiName}.Definition;\n\n\n `;\n }\n const imports = getObjectImports(uniqueLinkTargetTypes, definition.apiName, currentFilePath, true);\n return `${imports}${getV2Types()}\n\n export const ${object.shortApiName}: ${objectDefIdentifier} & $VersionBound<$ExpectedClientVersion>\n = {\n osdkMetadata: $osdkMetadata,\n objectSet: undefined as any,\n props: undefined as any,\n strictProps: undefined as any,\n ${stringify(definition, {\n osdkMetadata: value => undefined\n })}\n \n };`;\n}\nexport function createOsdkObject(object, identifier, {\n osdkObjectPropsIdentifier,\n objectDefIdentifier,\n osdkObjectStrictPropsIdentifier,\n osdkObjectLinksIdentifier\n}) {\n const definition = object.getCleanedUpDefinition(true);\n return `\n export type ${identifier}<\n OPTIONS extends never | \"$notStrict\" | \"$rid\" = never,\n K extends keyof ${osdkObjectPropsIdentifier}= keyof ${osdkObjectPropsIdentifier},\n\n > \n = $Osdk<\n ${objectDefIdentifier}, \n K | OPTIONS\n > & Pick<\n [OPTIONS] extends [never]\n ? ${osdkObjectStrictPropsIdentifier} :\n OPTIONS extends \"$notStrict\" ? ${osdkObjectPropsIdentifier} : ${osdkObjectStrictPropsIdentifier}\n , K\n> & {\n readonly $link: ${osdkObjectLinksIdentifier};\n readonly $title: string | undefined; // FIXME\n readonly $primaryKey: ${\"primaryKeyApiName\" in definition ? `\n $OsdkObjectPropertyType<${JSON.stringify(definition.properties[definition.primaryKeyApiName])},${true}>` : \"string | number\"}\n ;\n \n readonly $as: <NEW_Q extends $ValidToFrom<${objectDefIdentifier}>>(type: NEW_Q | string) => $Osdk<\n NEW_Q,\n $ConvertProps<${objectDefIdentifier}, NEW_Q, K>\n>;\n} & $OsdkObject<\"${object.fullApiName}\">;`;\n}\nexport function createObjectSet(object, {\n objectDefIdentifier,\n objectSetIdentifier,\n propertyKeysIdentifier,\n osdkObjectIdentifier\n}) {\n return `\nexport interface ObjectSet extends \n$ObjectSet<${objectDefIdentifier},\n\n${objectSetIdentifier}\n>\n{\nreadonly aggregate: <AO extends $AggregateOpts<${objectDefIdentifier}>>(\n req: $AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<${objectDefIdentifier}, AO>,\n) => Promise<$AggregationsResults<${objectDefIdentifier}, AO>>;\n\n\nreadonly pivotTo: <L extends $LinkNames<${objectDefIdentifier}>>(type: L) => $LinkedType<${objectDefIdentifier}, L>[\"objectSet\"];\n ${object instanceof EnhancedObjectType ? ` \nreadonly fetchOne: <\n L extends ${propertyKeysIdentifier},\n R extends boolean,\n S extends false | \"throw\" = $NullabilityAdherenceDefault,\n >(\n primaryKey: $PropertyValueClientToWire[${objectDefIdentifier}[\"primaryKeyType\"]],\n options?: $SelectArg<${objectDefIdentifier}, L, R, S>,\n ) => Promise<\n ${osdkObjectIdentifier}<\n (S extends false ? \"$notStrict\" : never) | ($DefaultToFalse<R> extends false? never: \"$rid\" ),\n L\n >>\n ;\n\nreadonly fetchOneWithErrors: <\n L extends ${propertyKeysIdentifier},\n R extends boolean,\n S extends false | \"throw\" = $NullabilityAdherenceDefault,\n >(\n primaryKey: $PropertyValueClientToWire[${objectDefIdentifier}[\"primaryKeyType\"]],\n options?: $SelectArg<${objectDefIdentifier}, L, R, S>,\n ) => Promise<$Result<\n ${osdkObjectIdentifier}<\n (S extends false ? \"$notStrict\" : never) | ($DefaultToFalse<R> extends false?never: \"$rid\"),\n L\n >\n >> \n \n;\n\n` : \"\"}\n\nreadonly fetchPage: <\n L extends ${propertyKeysIdentifier},\n R extends boolean,\n const A extends $Augments,\n S extends $NullabilityAdherence = $NullabilityAdherenceDefault,\n>(\n args?: $FetchPageArgs<${objectDefIdentifier}, L, R, A, S>,\n) => Promise<\n $PageResult<${osdkObjectIdentifier}<\n (S extends false ? \"$notStrict\" : never) | ($DefaultToFalse<R> extends false? never: \"$rid\"),\n L\n >>\n>;\n\nreadonly fetchPageWithErrors: <\n L extends ${propertyKeysIdentifier},\n R extends boolean,\n const A extends $Augments,\n S extends $NullabilityAdherence = $NullabilityAdherenceDefault,\n>(\n args?: $FetchPageArgs<${objectDefIdentifier}, L, R, A, S>,\n) => Promise<$Result<\n $PageResult<${osdkObjectIdentifier}<\n (S extends false ? \"$notStrict\" : never) | ($DefaultToFalse<R> extends false? never : \"$rid\"),\n L>>\n >>;\n\nreadonly asyncIter: () => AsyncIterableIterator<${osdkObjectIdentifier}>;\n}\n`;\n}\nfunction maybeStripNamespace(type, q) {\n if (type.apiNamespace && q.startsWith(`${type.apiNamespace}.`)) {\n return q.slice(type.apiNamespace.length + 1);\n } else {\n return q;\n }\n}\nexport function createProps(type, identifier, strict) {\n const definition = type.getCleanedUpDefinition(true);\n return `export interface ${identifier} {\n${stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => {\n return [`readonly \"${maybeStripNamespace(type, apiName)}\"${\n // after we convert everything over we can do this:\n // !strict || propertyDefinition.nullable ? \"?\" : \"\"\n \"\"}`, `$PropType[${JSON.stringify(propertyDefinition.type)}]${propertyDefinition.multiplicity ? \"[]\" : \"\"}${propertyDefinition.nullable || !strict ? `| undefined` : \"\"}`];\n }\n })}\n }`;\n}\nexport function createDefinition(object, ontology, identifier, {\n objectDefIdentifier,\n objectSetIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier\n}) {\n const definition = object.getCleanedUpDefinition(true);\n return `\n export interface ${identifier} extends ${object instanceof EnhancedObjectType ? `$ObjectTypeDefinition` : `$InterfaceDefinition`}<\"${object.fullApiName}\", ${objectDefIdentifier}>, $VersionBound<$ExpectedClientVersion> {\n osdkMetadata: typeof $osdkMetadata;\n objectSet: ${objectSetIdentifier};\n props: ${osdkObjectPropsIdentifier};\n strictProps: ${osdkObjectStrictPropsIdentifier};\n ${stringify(definition, {\n osdkMetadata: () => undefined,\n // we are going to reference another object instead\n type: () => undefined,\n apiName: () => undefined,\n links: _value => `{\n ${stringify(definition.links, {\n \"*\": definition => `$ObjectTypeLinkDefinition<${ontology.requireObjectType(definition.targetType).getImportedDefinitionIdentifier(true)}, ${definition.multiplicity}>`\n })}\n }`,\n properties: _value => `{\n ${stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => [`${propertyJsdoc(propertyDefinition, {\n apiName\n })}\"${maybeStripNamespace(object, apiName)}\"`, `$PropertyDef<\"${propertyDefinition.type}\", \"${propertyDefinition.nullable ? \"nullable\" : \"non-nullable\"}\", \"${propertyDefinition.multiplicity ? \"array\" : \"single\"}\">`]\n })}\n }`\n })}\n}\n `;\n}\nexport function createLinks(ontology, object, identifier) {\n const definition = object.getCleanedUpDefinition(true);\n return `\n ${Object.keys(definition.links).length === 0 ? `export type ${identifier} = never;` : `\n export interface ${identifier} {\n${stringify(definition.links, {\n \"*\": (definition, _, key) => {\n const linkTarget = ontology.requireObjectType(definition.targetType).getImportedDefinitionIdentifier(true);\n return [`readonly ${key}`, `${definition.multiplicity ? `${linkTarget}.ObjectSet` : `$SingleLinkAccessor<${linkTarget}.Definition>`}\n `];\n }\n })}\n }\n `}`;\n}\nexport function createPropertyKeys(type) {\n return `export type PropertyKeys = ${Object.keys(type.getCleanedUpDefinition(true).properties).map(a => maybeStripNamespace(type, a)).map(a => `\"${a}\"`).join(\"|\")};`;\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { wireActionTypeV2ToSdkActionDefinition } from \"../shared/wireActionTypeV2ToSdkActionDefinition.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { stringUnionFrom } from \"../util/stringUnionFrom.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { getDescriptionIfPresent } from \"../v1.1/wireObjectTypeV2ToV1ObjectInterfaceString.js\";\nimport { getObjectDefIdentifier } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\nexport async function generatePerActionDataFiles({\n sanitizedOntology: ontology,\n fs,\n outDir: rootOutDir,\n importExt = \"\",\n ontology: enhancedOntology\n}) {\n const outDir = path.join(rootOutDir, \"ontology\", \"actions\");\n await fs.mkdir(outDir, {\n recursive: true\n });\n await Promise.all(Object.values(enhancedOntology.actionTypes).map(async action => {\n const currentFilePath = `${path.join(\"ontology\", \"actions\", `${action.shortApiName}.ts`)}`;\n const uniqueApiNamesArray = extractReferencedObjectsFromAction(action.og);\n const uniqueApiNames = new Set(uniqueApiNamesArray);\n const uniqueApiNamesString = stringUnionFrom([...uniqueApiNames]);\n const fullActionDef = deleteUndefineds(wireActionTypeV2ToSdkActionDefinition(action.og));\n const {\n parameters,\n ...actionDefSansParameters\n } = fullActionDef;\n function createParamsDef() {\n const entries = Object.entries(parameters);\n entries.sort((a, b) => a[0].localeCompare(b[0]));\n if (entries.length === 0) {\n return `// Represents the definition of the parameters for the action\n export type ParamsDefinition = Record<string, never>;`;\n }\n return `// Represents the definition of the parameters for the action\n export type ParamsDefinition = {\n ${entries.map(([key, value]) => {\n return `\"${key}\": {\n ${stringify(value, {\n description: (value, d) => value ? d(value) : undefined,\n // trick to remove undefineds\n type: type => {\n if (typeof type === \"string\") {\n return JSON.stringify(type);\n } else if (type.type === \"object\") {\n const obj = enhancedOntology.requireObjectType(type.object);\n return `ObjectActionDataType<\"${obj.fullApiName}\", ${obj.getImportedDefinitionIdentifier(true)}>`;\n } else if (type.type === \"objectSet\") {\n return `ObjectSetActionDataType<\"${type.objectSet}\", ${getObjectDefIdentifier(type.objectSet, true)}>`;\n }\n return undefined;\n }\n })}\n }`;\n }).join(\";\\n\")}\n }`;\n }\n function getActionParamType(input) {\n if (typeof input === \"string\") {\n return `ActionParam.PrimitiveType<${JSON.stringify(input)}>`;\n } else if (input.type === \"object\") {\n return `ActionParam.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;\n } else if (input.type === \"objectSet\") {\n return `ActionParam.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}>`;\n }\n }\n function createV2Types() {\n const oldParamsIdentifier = `${action.shortApiName}$Params`;\n // the params must be a `type` to align properly with the `ActionDefinition` interface\n // this way we can generate a strict type for the function itself and reference it from the Action Definition\n return `\n \n export namespace ${action.shortApiName}{\n ${createParamsDef()}\n\n ${getDescriptionIfPresent(action.description)}\n export interface Parameters {\n ${stringify(parameters, {\n \"*\": (ogValue, _, ogKey) => {\n const key = `${getDescriptionIfPresent(ogValue.description)}\n readonly \"${ogKey}\"${ogValue.nullable ? \"?\" : \"\"}`;\n const value = ogValue.multiplicity ? `ReadonlyArray<${getActionParamType(ogValue.type)}>` : `${getActionParamType(ogValue.type)}`;\n return [key, value];\n }\n })}\n }\n\n\n // Represents the definition of the action\n export interface Definition extends ActionDefinition<\"${action.shortApiName}\", ${uniqueApiNamesString}, ${action.shortApiName}>, VersionBound<$ExpectedClientVersion> {\n ${Object.entries(actionDefSansParameters).sort((a, b) => a[0].localeCompare(b[0])).map(([key, value]) => {\n return `${key}: ${JSON.stringify(value)};`;\n }).join(\"\\n\")}\n parameters: ${action.definitionParamsIdentifier};\n osdkMetadata: typeof $osdkMetadata;\n }\n\n // Represents a fqn of the action\n export interface Signature {\n ${getDescriptionIfPresent(action.description)}\n <P extends ${action.paramsIdentifier} | ReadonlyArray<${action.paramsIdentifier}>, OP extends (P extends ReadonlyArray<${action.paramsIdentifier}> ? ApplyBatchActionOptions: ApplyActionOptions)>(args: P, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;\n }\n \n }\n\n /**\n * @deprecated Use \\`${action.paramsIdentifier}\\`\n */\n export type ${oldParamsIdentifier} = ${action.paramsIdentifier} | ReadonlyArray<${action.paramsIdentifier}>;\n\n /** @deprecated Use \\`${action.definitionIdentifier}\\` **/\n export type ${action.shortApiName} = ${action.shortApiName}.Signature;\n `;\n }\n function createV2Object() {\n return ` export const ${action.shortApiName}: ${action.definitionIdentifier} = \n {\n ${stringify(fullActionDef)},\n osdkMetadata: $osdkMetadata\n }\n `;\n }\n const referencedObjectDefs = new Set();\n for (const p of Object.values(action.parameters)) {\n if (p.dataType.type === \"object\" || p.dataType.type === \"objectSet\") {\n if (p.dataType.objectApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.objectApiName));\n }\n if (p.dataType.objectTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.objectTypeApiName));\n }\n }\n if (p.dataType.type === \"array\" && (p.dataType.subType.type === \"object\" || p.dataType.subType.type === \"objectSet\")) {\n if (p.dataType.subType.objectApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.subType.objectApiName));\n }\n if (p.dataType.subType.objectTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireObjectType(p.dataType.subType.objectTypeApiName));\n }\n }\n }\n const imports = getObjectImports(referencedObjectDefs, undefined, currentFilePath, true);\n await fs.writeFile(path.join(rootOutDir, currentFilePath), await formatTs(`\n import type { ActionDefinition, ObjectActionDataType, ObjectSetActionDataType, VersionBound} from \"@osdk/api\";\n import type { ApplyActionOptions, ApplyBatchActionOptions, ActionReturnTypeForOptions, ActionParam } from '@osdk/client.api';\n import { $osdkMetadata} from \"../../OntologyMetadata${importExt}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${imports}\n\n \n ${createV2Types()}\n\n ${createV2Object()}\n `));\n }));\n const indexFileRelPath = path.join(\"ontology\", \"actions.ts\");\n await fs.writeFile(path.join(rootOutDir, indexFileRelPath), await formatTs(`\n ${Object.values(enhancedOntology.actionTypes).map(action => {\n const exportConstLine = `export {${action.shortApiName} } from \"${action.getImportPathRelTo(indexFileRelPath)}\";`;\n return exportConstLine;\n }).join(\"\\n\")}\n ${Object.keys(ontology.actionTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n}\nfunction extractReferencedObjectsFromAction(actionType) {\n const referencedObjectsInParameters = Object.values(actionType.parameters).flatMap(({\n dataType\n }) => {\n const objectTypeReference = extractReferencedObjectsFromActionParameter(dataType);\n return objectTypeReference ? [objectTypeReference] : [];\n });\n const referenceObjectsInEdits = actionType.operations.flatMap(value => {\n switch (value.type) {\n case \"createObject\":\n return [value.objectTypeApiName];\n case \"modifyObject\":\n return [value.objectTypeApiName];\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n return [];\n }\n });\n return [...referenceObjectsInEdits, ...referencedObjectsInParameters];\n}\nfunction extractReferencedObjectsFromActionParameter(actionParameter) {\n switch (actionParameter.type) {\n case \"objectSet\":\n case \"object\":\n return actionParameter.objectTypeApiName;\n case \"array\":\n return extractReferencedObjectsFromActionParameter(actionParameter.subType);\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"date\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n return undefined;\n }\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { getObjectTypeApiNamesFromQuery } from \"../shared/getObjectTypeApiNamesFromQuery.js\";\nimport { wireQueryDataTypeToQueryDataTypeDefinition } from \"../shared/wireQueryDataTypeToQueryDataTypeDefinition.js\";\nimport { wireQueryParameterV2ToQueryParameterDefinition as paramToDef, wireQueryTypeV2ToSdkQueryDefinitionNoParams } from \"../shared/wireQueryTypeV2ToSdkQueryDefinition.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { getDescriptionIfPresent } from \"../v1.1/wireObjectTypeV2ToV1ObjectInterfaceString.js\";\nexport async function generatePerQueryDataFilesV2({\n fs,\n outDir: rootOutDir,\n ontology,\n importExt = \"\"\n}, v2) {\n const relOutDir = path.join(\".\", \"ontology\", \"queries\");\n const outDir = path.join(rootOutDir, \"ontology\", \"queries\");\n await fs.mkdir(outDir, {\n recursive: true\n });\n await Promise.all(Object.values(ontology.queryTypes).map(async query => {\n await generateV2QueryFile(fs, outDir, relOutDir, query, importExt, ontology);\n }));\n const indexFilePath = `${outDir}.ts`;\n await fs.writeFile(indexFilePath, await formatTs(`\n ${Object.values(ontology.queryTypes).map(query => `export * from \"${query.getImportPathRelTo(relOutDir)}\";`).join(\"\\n\")}\n ${Object.keys(ontology.queryTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n}\nasync function generateV2QueryFile(fs, outDir, relOutDir, query, importExt, ontology) {\n const relFilePath = path.join(relOutDir, `${query.shortApiName}.ts`);\n const objectTypes = getObjectTypeApiNamesFromQuery(query);\n const importObjects = getObjectImports(ontology, objectTypes, relFilePath);\n const baseProps = deleteUndefineds(wireQueryTypeV2ToSdkQueryDefinitionNoParams(query.og));\n const outputBase = deleteUndefineds(wireQueryDataTypeToQueryDataTypeDefinition(query.output));\n const referencedObjectTypes = objectTypes.length > 0 ? objectTypes.map(apiNameObj => `\"${apiNameObj}\"`).join(\"|\") : \"never\";\n await fs.writeFile(path.join(outDir, `${query.shortApiName}.ts`), await formatTs(`\n import type { QueryDefinition , VersionBound} from \"@osdk/api\";\n import type { QueryParam, QueryResult } from \"@osdk/client.api\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${importObjects}\n\n export namespace ${query.shortApiName} {\n export interface Signature {\n ${getDescriptionIfPresent(query.description)}\n (${Object.keys(query.parameters).length > 0 ? `query: ${query.paramsIdentifier}` : \"\"}): Promise<${getQueryParamType(ontology, paramToDef({\n dataType: query.output\n }), \"Result\")}>\n }\n\n ${Object.keys(query.parameters).length > 0 ? `\n export interface Parameters {\n ${stringify(query.parameters, {\n \"*\": (parameter, formatter, apiName) => {\n const q = paramToDef(parameter);\n return [`\n ${queryParamJsDoc(paramToDef(parameter), {\n apiName\n })}readonly \"${apiName}\"${q.nullable ? \"?\" : \"\"}`, `${getQueryParamType(ontology, q, \"Param\")}`];\n }\n })}\n }\n \n ` : \"\"}\n\n export interface Definition extends QueryDefinition<\n \"${query.fullApiName}\", \n ${referencedObjectTypes},\n ${query.shortApiName}.Signature\n >, VersionBound<$ExpectedClientVersion>{\n ${stringify(baseProps)},\n parameters: {\n ${parameterDefsForType(ontology, query)}\n };\n output: {\n ${stringify(outputBase)},\n ${getLineFor__OsdkTargetType(ontology, query.output)}\n };\n }\n\n }\n\n /** @deprecated use \\`${query.shortApiName}.Signature\\' instead */\n export type ${query.shortApiName} = ${query.shortApiName}.Signature;\n\n\n\n\n\n export const ${query.shortApiName}: ${query.definitionIdentifier} = {\n ${stringify(baseProps)},\n parameters: {\n ${parametersForConst(query)}\n },\n output: {\n ${stringify(outputBase)},\n }\n };\n `));\n}\nfunction parametersForConst(query) {\n return stringify(query.parameters, {\n \"*\": (parameter, formatter) => formatter(deleteUndefineds(paramToDef(parameter)))\n });\n}\nfunction parameterDefsForType(ontology, query) {\n return stringify(query.parameters, {\n \"*\": (parameter, valueFormatter, apiName) => [`${queryParamJsDoc(paramToDef(parameter), {\n apiName\n })} ${apiName}`, ` {\n ${stringify(deleteUndefineds(paramToDef(parameter)))},\n ${getLineFor__OsdkTargetType(ontology, parameter.dataType)}\n }`]\n });\n}\nfunction getLineFor__OsdkTargetType(ontology, qdt) {\n if (qdt.type === \"object\" || qdt.type === \"objectSet\") {\n return `__OsdkTargetType?: ${ontology.requireObjectType(qdt.objectTypeApiName).getImportedDefinitionIdentifier(true)}`;\n }\n return \"\";\n}\nexport function queryParamJsDoc(param, {\n apiName\n}) {\n let ret = `/**\\n`;\n if (param.description) {\n if (param.description) {\n ret += ` * description: ${param.description}\\n`;\n }\n } else {\n ret += ` * (no ontology metadata)\\n`;\n }\n ret += ` */\\n`;\n return ret;\n}\nfunction getObjectImports(enhancedOntology, objectTypes, filePath) {\n let ret = \"\";\n for (const fqObjectApiName of objectTypes) {\n const obj = enhancedOntology.requireObjectType(fqObjectApiName);\n ret += `import type { ${obj.getDefinitionIdentifier(true)} as ${obj.getImportedDefinitionIdentifier(true)} } from \"${obj.getImportPathRelTo(filePath)}\";\\n`;\n }\n return ret;\n}\nexport function getQueryParamType(enhancedOntology, input, type) {\n let inner = `unknown /* ${input.type} */`;\n switch (input.type) {\n case \"date\":\n inner = `Query${type}.PrimitiveType<${JSON.stringify(\"datetime\")}>`;\n break;\n case \"attachment\":\n case \"boolean\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"string\":\n case \"struct\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n inner = `Query${type}.PrimitiveType<${JSON.stringify(input.type)}>`;\n break;\n case \"object\":\n inner = `Query${type}.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"objectSet\":\n inner = `Query${type}.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"set\":\n inner = `${type === \"Param\" ? \"Readonly\" : \"\"}Set<${getQueryParamType(enhancedOntology, input.set, type)}>`;\n break;\n case \"union\":\n inner = input.union.map(u => getQueryParamType(enhancedOntology, u, type)).join(\" | \");\n break;\n }\n if (input.multiplicity && type === \"Param\") {\n return `ReadonlyArray<${inner}>`;\n } else if (input.multiplicity) {\n return `Array<${inner}>`;\n }\n return inner;\n}","/*\n * Copyright 2023 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 { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport fastDeepEqual from \"fast-deep-equal\";\nimport invariant from \"tiny-invariant\";\nimport { propertyJsdoc } from \"../shared/propertyJsdoc.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { createDefinition, createObjectSet, createOsdkObject, createPropertyKeys, createProps } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\n\n/** @internal */\nexport function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology, v2 = false) {\n const definition = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceDef.og, v2));\n const objectDefIdentifier = interfaceDef.getDefinitionIdentifier(v2);\n const parents = definition.implements?.map(p => {\n !(ontology.interfaceTypes[p] != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected to find a parent interface named ${p} in the ontology and did not.`) : invariant(false) : void 0;\n const it = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(ontology.requireInterfaceType(p, true).og, v2));\n return it;\n }) ?? [];\n const mergedProperties = {\n ...definition.properties\n };\n for (const parent of parents) {\n for (const apiName of Object.keys(parent.properties)) {\n if (definition.properties[apiName] != null) {\n !fastDeepEqual(definition.properties[apiName], parent.properties[apiName]) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface ${definition.apiName} redefines property '${apiName}' from parent '${parent.apiName}' but the properties do not match`) : invariant(false) : void 0;\n } else if (mergedProperties[apiName] != null) {\n !fastDeepEqual(mergedProperties[apiName], parent.properties[apiName]) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Some interface defines a conflicting property '${apiName}' that does not match property from parent '${parent.apiName}'`) : invariant(false) : void 0;\n }\n mergedProperties[apiName] = parent.properties[apiName];\n }\n }\n const ogProperties = definition.properties;\n definition.properties = mergedProperties;\n function localPropertyJsdoc(apiName) {\n const property = definition.properties[apiName];\n const isInherited = ogProperties[apiName] == null;\n return propertyJsdoc(property, {\n isInherited,\n apiName\n });\n }\n function maybeStripNamespace(q) {\n if (interfaceDef.apiNamespace && q.startsWith(`${interfaceDef.apiNamespace}.`)) {\n return q.slice(interfaceDef.apiNamespace.length + 1);\n } else {\n return q;\n }\n }\n const objectSetIdentifier = `${interfaceDef.shortApiName}.ObjectSet`;\n const propertyKeysIdentifier = `${interfaceDef.shortApiName}.PropertyKeys`;\n // const osdkObjectPropsIdentifier = `OsdkObjectProps$${objectDefIdentifier}`;\n const osdkObjectPropsIdentifier = `${interfaceDef.shortApiName}.Props`;\n const osdkObjectStrictPropsIdentifier = `${interfaceDef.shortApiName}.StrictProps`;\n const osdkObjectLinksIdentifier = `OsdkObjectLinks$${objectDefIdentifier}`;\n const osdkObjectIdentifier = `${interfaceDef.shortApiName}.OsdkObject`;\n const ids = {\n objectDefIdentifier: `${interfaceDef.shortApiName}.Definition`,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier\n };\n function getV2Types() {\n return `import type {\n AggregateOpts as $AggregateOpts,\n AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy as $AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy,\n AggregationsResults as $AggregationsResults, \n Augments as $Augments,\n ConvertProps as $ConvertProps,\n DefaultToFalse as $DefaultToFalse,\n FetchPageArgs as $FetchPageArgs,\n FetchPageResult as $FetchPageResult,\n LinkedType as $LinkedType,\n LinkNames as $LinkNames,\n NullabilityAdherence as $NullabilityAdherence,\n NullabilityAdherenceDefault as $NullabilityAdherenceDefault,\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n OsdkObjectLinksEntry as $OsdkObjectLinksEntry,\n OsdkObjectLinksObject as $OsdkObjectLinksObject,\n OsdkObjectPropertyType as $OsdkObjectPropertyType,\n PageResult as $PageResult,\n PropertyValueClientToWire as $PropertyValueClientToWire,\n PropertyValueWireToClient as $PropType,\n Result as $Result,\n SelectArg as $SelectArg, \n SingleLinkAccessor as $SingleLinkAccessor,\n SingleOsdkResult as $SingleOsdkResult,\n ValidToFrom as $ValidToFrom,\n WhereClause as $WhereClause,\n } from \"@osdk/client.api\";\n import type * as $clientApi from \"@osdk/client.api\";\n import type {\n ObjectOrInterfacePropertyKeysFrom2 as $ObjectOrInterfacePropertyKeysFrom2, \n ObjectTypeLinkDefinition as $ObjectTypeLinkDefinition,\n ObjectTypeDefinition as $ObjectTypeDefinition,\n InterfaceDefinition as $InterfaceDefinition,\n } from \"@osdk/api\";\n\n \n\n ${Object.keys(definition.links).length === 0 ? `export type ${osdkObjectLinksIdentifier} = never;` : `\n export interface ${osdkObjectLinksIdentifier} {\n${stringify(definition.links, {\n \"*\": definition => {\n const linkTarget = ontology.requireObjectType(definition.targetType).getImportedDefinitionIdentifier(v2);\n return `${definition.multiplicity ? `${linkTarget}[\"objectSet\"]` : `SingleLinkAccessor<${linkTarget}>`}\n `;\n }\n })}\n }\n `}\n\n export namespace ${interfaceDef.shortApiName} {\n\n ${createPropertyKeys(interfaceDef)}\n\n\n ${createProps(interfaceDef, \"Props\", false)}\n ${createProps(interfaceDef, \"StrictProps\", true)}\n\n\n ${createObjectSet(interfaceDef, ids)}\n\n ${createDefinition(interfaceDef, ontology, \"Definition\", ids)}\n\n ${createOsdkObject(interfaceDef, \"OsdkObject\", ids)}\n \n } \n\n\n\n\n /** @deprecated use ${interfaceDef.shortApiName}.Definition **/\n export type ${objectDefIdentifier} = ${interfaceDef.shortApiName}.Definition;\n\n\n\n\n`;\n }\n\n // FIXME: We need to fill in the imports\n // if we want links to work\n const imports = [];\n return `${imports.join(\"\\n\")}\n ${v2 ? getV2Types() : \"\"}\n\n export const ${interfaceDef.shortApiName}: ${interfaceDef.shortApiName}.Definition = {\n osdkMetadata: $osdkMetadata,\n objectSet: undefined as any,\n props: undefined as any,\n strictProps: undefined as any,\n ${stringify(definition, {\n osdkMetadata: () => undefined,\n properties: properties => `{\n ${stringify(properties, {\n \"*\": (propertyDefinition, _, key) => [`\"${maybeStripNamespace(key)}\"`, _(propertyDefinition)]\n })}\n }`\n })}\n \n };`;\n}","/*\n * Copyright 2023 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 path from \"node:path\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { sanitizeMetadata } from \"../shared/sanitizeMetadata.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { verifyOutDir } from \"../util/verifyOutDir.js\";\nimport { generateOntologyMetadataFile } from \"./generateMetadata.js\";\nimport { generatePerActionDataFiles } from \"./generatePerActionDataFiles.js\";\nimport { generatePerQueryDataFilesV2 } from \"./generatePerQueryDataFiles.js\";\nimport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst } from \"./UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js\";\nimport { wireObjectTypeV2ToSdkObjectConstV2 } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\nasync function generateRootIndexTsFile({\n fs,\n outDir,\n importExt,\n ontologyApiNamespace\n}) {\n fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`${ontologyApiNamespace == null ? `export { $ontologyRid } from \"./OntologyMetadata${importExt}\";` : ``}\n export * from \"./ontology/actions${importExt}\";\n export * from \"./ontology/objects${importExt}\";\n export * from \"./ontology/interfaces${importExt}\";\n export * from \"./ontology/queries${importExt}\";\n `));\n}\nasync function generateEachObjectFile(ctx) {\n const {\n fs,\n outDir,\n ontology,\n importExt\n } = ctx;\n await fs.mkdir(path.join(outDir, \"ontology\", \"objects\"), {\n recursive: true\n });\n for (const obj of Object.values(ontology.objectTypes)) {\n const relPath = path.join(\".\", \"ontology\", `objects`, `${obj.shortApiName}.ts`);\n const outFilePath = path.join(outDir, relPath);\n await fs.writeFile(outFilePath, await formatTs(`\n import type { VersionBound as $VersionBound, PropertyDef as $PropertyDef } from \"@osdk/api\";\n import type { Osdk } from \"@osdk/client.api\";\n import { $osdkMetadata } from \"../../OntologyMetadata${importExt}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${wireObjectTypeV2ToSdkObjectConstV2(obj.og, ctx, relPath)}\n `));\n }\n}\nexport async function generateClientSdkVersionTwoPointZero(ontology, userAgent, fs, outDir, packageType = \"commonjs\", ontologyApiNamespace, apiNamespacePackageMap = new Map()) {\n const importExt = packageType === \"module\" ? \".js\" : \"\";\n await verifyOutDir(outDir, fs);\n const sanitizedOntology = sanitizeMetadata(ontology);\n await fs.mkdir(outDir, {\n recursive: true\n });\n const enhancedOntology = enhanceOntology(sanitizedOntology, ontologyApiNamespace, apiNamespacePackageMap, importExt);\n const ctx = {\n sanitizedOntology,\n ontology: enhancedOntology,\n importExt,\n fs,\n outDir,\n ontologyApiNamespace,\n apiNamespacePackageMap\n };\n await generateRootIndexTsFile(ctx);\n await generateOntologyMetadataFile(ctx, userAgent);\n await generateEachObjectFile(ctx);\n await generateOntologyInterfaces(ctx);\n const actionsDir = path.join(outDir, \"ontology\", \"actions\");\n await fs.mkdir(actionsDir, {\n recursive: true\n });\n await generatePerActionDataFiles(ctx);\n await fs.writeFile(path.join(outDir, \"ontology\", \"objects.ts\"), await formatTs(`\n ${Object.values(enhancedOntology.objectTypes).map(objType => `export * from \"./objects/${objType.shortApiName}${importExt}\";`).join(\"\\n\")}\n ${Object.keys(ontology.objectTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n await generatePerQueryDataFilesV2(ctx, true);\n}\n\n/** @internal */\nasync function generateOntologyInterfaces({\n fs,\n outDir,\n ontology,\n importExt\n}) {\n const interfacesDir = path.join(outDir, \"ontology\", \"interfaces\");\n await fs.mkdir(interfacesDir, {\n recursive: true\n });\n for (const obj of Object.values(ontology.interfaceTypes)) {\n await fs.writeFile(path.join(interfacesDir, `${obj.shortApiName}.ts`), await formatTs(`\n \n import type { PropertyDef as $PropertyDef, VersionBound as $VersionBound } from \"@osdk/api\";\n import { $osdkMetadata, $expectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(obj, ontology, true)}\n `));\n }\n await fs.writeFile(interfacesDir + \".ts\", await formatTs(`\n ${Object.values(ontology.interfaceTypes).map(interfaceType => `export * from \"./interfaces/${interfaceType.shortApiName}${importExt}\";`).join(\"\\n\")}\n ${Object.keys(ontology.interfaceTypes).length === 0 ? \"export {}\" : \"\"}\n `));\n}","/*\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 * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { generateClientSdkVersionOneDotOne } from \"./v1.1/generateClientSdkVersionOneDotOne.js\";\nimport { generateClientSdkVersionTwoPointZero } from \"./v2.0/generateClientSdkVersionTwoPointZero.js\";\nexport async function generateClientSdkPackage(packageName, packageVersion, sdkVersion, baseOutDir, ontology, minimalFs, dependencyVersions, cliVersion, ontologyApiNamespace, apiNamespacePackageMap) {\n if (!packageName) throw new Error(\"Package name is require\");\n for (const packageType of [\"module\", \"commonjs\"]) {\n const outDir = path.join(baseOutDir, \"dist\", packageType);\n await (sdkVersion === \"1.1\" ? generateClientSdkVersionOneDotOne : sdkVersion === \"2.0\" ? generateClientSdkVersionTwoPointZero : undefined)(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType, ontologyApiNamespace, apiNamespacePackageMap);\n await fs.promises.mkdir(outDir, {\n recursive: true\n });\n await writeJson(minimalFs, path.join(outDir, \"package.json\"), {\n type: packageType\n });\n await writeJson(minimalFs, path.join(outDir, `tsconfig.json`), {\n compilerOptions: getTsCompilerOptions(packageType)\n });\n }\n await writeJson(minimalFs, path.join(baseOutDir, \"package.json\"), await getPackageJsonContents(packageName, packageVersion, sdkVersion, dependencyVersions));\n\n // we need to shim for the node10 resolver\n await minimalFs.mkdir(path.join(baseOutDir, \"ontology\"), {\n recursive: true\n });\n await minimalFs.writeFile(path.join(baseOutDir, \"ontology\", \"objects.js\"), `module.exports = require(\"../../dist/module/ontology/objects\")`);\n await minimalFs.writeFile(path.join(baseOutDir, \"ontology\", \"objects.d.ts\"), `export * from \"../dist/module/ontology/objects\"`);\n}\nfunction getTsCompilerOptions(packageType) {\n const commonTsconfig = {\n importHelpers: true,\n declaration: true,\n isolatedModules: true,\n esModuleInterop: true,\n forceConsistentCasingInFileNames: true,\n strict: true,\n skipLibCheck: true\n };\n const compilerOptions = packageType === \"commonjs\" ? {\n ...commonTsconfig,\n module: \"commonjs\",\n target: \"es2018\"\n } : {\n ...commonTsconfig,\n module: \"NodeNext\",\n target: \"ES2020\"\n };\n return compilerOptions;\n}\nexport function getExpectedDependencies(sdkVersion, {\n osdkApiVersion,\n osdkClientVersion,\n osdkClientApiVersion,\n osdkLegacyClientVersion\n}) {\n return {\n devDependencies: {\n \"@osdk/api\": osdkApiVersion,\n ...(sdkVersion === \"2.0\" ? {\n \"@osdk/client.api\": osdkClientApiVersion\n } : {\n \"@osdk/legacy-client\": osdkLegacyClientVersion\n })\n },\n peerDependencies: {\n \"@osdk/api\": osdkApiVersion,\n ...(sdkVersion === \"2.0\" ? {\n \"@osdk/client.api\": osdkClientApiVersion,\n \"@osdk/client\": osdkClientVersion\n } : {\n \"@osdk/legacy-client\": osdkLegacyClientVersion\n })\n }\n };\n}\nfunction getExpectedDependenciesFull(sdkVersion, dependencyVersions) {\n const {\n typescriptVersion,\n tslibVersion,\n areTheTypesWrongVersion\n } = dependencyVersions;\n const base = getExpectedDependencies(sdkVersion, dependencyVersions);\n return {\n devDependencies: {\n ...base.devDependencies,\n \"typescript\": typescriptVersion,\n \"tslib\": tslibVersion,\n \"@arethetypeswrong/cli\": areTheTypesWrongVersion\n },\n peerDependencies: {\n ...base.peerDependencies\n }\n };\n}\nexport function getPackageJsonContents(name, version, sdkVersion, dependencyVersions) {\n const esmPrefix = \"./dist/module\";\n const commonjsPrefix = \"./dist/commonjs\";\n return {\n name,\n version,\n main: `${commonjsPrefix}/index.js`,\n module: `${esmPrefix}/index.js`,\n exports: {\n \".\": {\n import: `${esmPrefix}/index.js`,\n require: `${commonjsPrefix}/index.js`\n },\n \"./ontology/objects\": {\n import: `${esmPrefix}/ontology/objects${sdkVersion === \"2.0\" ? \"\" : \"/index\"}.js`,\n require: `${commonjsPrefix}/ontology/objects${sdkVersion === \"2.0\" ? \"\" : \"/index\"}.js`\n }\n },\n scripts: {\n prepack: `tsc -p ${esmPrefix}/tsconfig.json && tsc -p ${commonjsPrefix}/tsconfig.json`,\n check: \"npm exec attw $(npm pack)\"\n },\n ...getExpectedDependenciesFull(sdkVersion, dependencyVersions),\n files: [\"**/*.js\", \"**/*.d.ts\", \"dist/**/package.json\"]\n };\n}\nasync function writeJson(minimalFs, filePath, body) {\n // consola.info(`Writing ${filePath}`);\n // consola.debug(`Writing ${filePath} with body`, body);\n return await minimalFs.writeFile(filePath, JSON.stringify(body, undefined, 2) + \"\\n\");\n}"]}