@osdk/generator 2.6.0-beta.1 → 2.6.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @osdk/generator
2
2
 
3
+ ## 2.6.0-beta.3
4
+
5
+ ### Patch Changes
6
+
7
+ - @osdk/api@2.6.0-beta.3
8
+ - @osdk/generator-converters@2.6.0-beta.3
9
+
10
+ ## 2.6.0-beta.2
11
+
12
+ ### Minor Changes
13
+
14
+ - 84e61fc: Add propertyValueFormatting type to property metadata
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [84e61fc]
19
+ - Updated dependencies [c4f8529]
20
+ - Updated dependencies [f7ae38a]
21
+ - @osdk/generator-converters@2.6.0-beta.2
22
+ - @osdk/api@2.6.0-beta.2
23
+
3
24
  ## 2.5.0-beta.15
4
25
 
5
26
  ### Patch Changes
@@ -18,7 +18,7 @@ import path from "path";
18
18
  import { formatTs } from "../util/test/formatTs.js";
19
19
 
20
20
  // BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.
21
- const ExpectedOsdkVersion = "2.5.0";
21
+ const ExpectedOsdkVersion = "2.6.0";
22
22
  // END: THIS IS GENERATED CODE. DO NOT EDIT.
23
23
 
24
24
  export async function generateOntologyMetadataFile({
@@ -1 +1 @@
1
- {"version":3,"file":"generateMetadata.js","names":["path","formatTs","ExpectedOsdkVersion","generateOntologyMetadataFile","fs","outDir","ontology","ontologyApiNamespace","userAgent","writeFile","join","rid","raw","branch"],"sources":["generateMetadata.ts"],"sourcesContent":["/*\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 type { GenerateContext } from \"../GenerateContext/GenerateContext.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst ExpectedOsdkVersion = \"2.5.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nexport async function generateOntologyMetadataFile(\n { fs, outDir, ontology, ontologyApiNamespace }: GenerateContext,\n userAgent: string,\n): Promise<void> {\n await fs.writeFile(\n path.join(outDir, \"OntologyMetadata.ts\"),\n await formatTs(\n `\n export type $ExpectedClientVersion = \"${ExpectedOsdkVersion}\";\n export const $osdkMetadata = { extraUserAgent: \"${userAgent}\" };\n ${\n ontologyApiNamespace == null\n ? `\n export const $ontologyRid = \"${ontology.ontology.rid}\";\n `\n : \"\"\n }\n ${\n ontology.raw.branch != null\n ? `\n export const $branch = \"${ontology.raw.branch.rid}\";\n `\n : \"\"\n }\n `,\n ),\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,MAAM;AAEvB,SAASC,QAAQ,QAAQ,0BAA0B;;AAEnD;AACA,MAAMC,mBAAmB,GAAG,OAAO;AACnC;;AAEA,OAAO,eAAeC,4BAA4BA,CAChD;EAAEC,EAAE;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAsC,CAAC,EAC/DC,SAAiB,EACF;EACf,MAAMJ,EAAE,CAACK,SAAS,CAChBT,IAAI,CAACU,IAAI,CAACL,MAAM,EAAE,qBAAqB,CAAC,EACxC,MAAMJ,QAAQ,CACZ;AACN,8CAA8CC,mBAAmB;AACjE,wDAAwDM,SAAS;AACjE,QACQD,oBAAoB,IAAI,IAAI,GACxB;AACZ,uCAAuCD,QAAQ,CAACA,QAAQ,CAACK,GAAG;AAC5D,SAAS,GACG,EAAE;AACd,SAEQL,QAAQ,CAACM,GAAG,CAACC,MAAM,IAAI,IAAI,GACvB;AACZ,kCAAkCP,QAAQ,CAACM,GAAG,CAACC,MAAM,CAACF,GAAG;AACzD,SAAS,GACG,EAAE;AACd,OAEI,CACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"generateMetadata.js","names":["path","formatTs","ExpectedOsdkVersion","generateOntologyMetadataFile","fs","outDir","ontology","ontologyApiNamespace","userAgent","writeFile","join","rid","raw","branch"],"sources":["generateMetadata.ts"],"sourcesContent":["/*\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 type { GenerateContext } from \"../GenerateContext/GenerateContext.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst ExpectedOsdkVersion = \"2.6.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nexport async function generateOntologyMetadataFile(\n { fs, outDir, ontology, ontologyApiNamespace }: GenerateContext,\n userAgent: string,\n): Promise<void> {\n await fs.writeFile(\n path.join(outDir, \"OntologyMetadata.ts\"),\n await formatTs(\n `\n export type $ExpectedClientVersion = \"${ExpectedOsdkVersion}\";\n export const $osdkMetadata = { extraUserAgent: \"${userAgent}\" };\n ${\n ontologyApiNamespace == null\n ? `\n export const $ontologyRid = \"${ontology.ontology.rid}\";\n `\n : \"\"\n }\n ${\n ontology.raw.branch != null\n ? `\n export const $branch = \"${ontology.raw.branch.rid}\";\n `\n : \"\"\n }\n `,\n ),\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,MAAM;AAEvB,SAASC,QAAQ,QAAQ,0BAA0B;;AAEnD;AACA,MAAMC,mBAAmB,GAAG,OAAO;AACnC;;AAEA,OAAO,eAAeC,4BAA4BA,CAChD;EAAEC,EAAE;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAsC,CAAC,EAC/DC,SAAiB,EACF;EACf,MAAMJ,EAAE,CAACK,SAAS,CAChBT,IAAI,CAACU,IAAI,CAACL,MAAM,EAAE,qBAAqB,CAAC,EACxC,MAAMJ,QAAQ,CACZ;AACN,8CAA8CC,mBAAmB;AACjE,wDAAwDM,SAAS;AACjE,QACQD,oBAAoB,IAAI,IAAI,GACxB;AACZ,uCAAuCD,QAAQ,CAACA,QAAQ,CAACK,GAAG;AAC5D,SAAS,GACG,EAAE;AACd,SAEQL,QAAQ,CAACM,GAAG,CAACC,MAAM,IAAI,IAAI,GACvB;AACZ,kCAAkCP,QAAQ,CAACM,GAAG,CAACC,MAAM,CAACF,GAAG;AACzD,SAAS,GACG,EAAE;AACd,OAEI,CACF,CAAC;AACH","ignoreList":[]}
@@ -287,7 +287,7 @@ function formatTs(contents) {
287
287
  }
288
288
 
289
289
  // src/v2.0/generateMetadata.ts
290
- var ExpectedOsdkVersion = "2.5.0";
290
+ var ExpectedOsdkVersion = "2.6.0";
291
291
  async function generateOntologyMetadataFile({
292
292
  fs: fs2,
293
293
  outDir,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/GenerateContext/EnhancedBase.ts","../../src/GenerateContext/EnhancedAction.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/util/test/formatTs.ts","../../src/v2.0/generateMetadata.ts","../../src/shared/getObjectImports.ts","../../src/util/deleteUndefineds.ts","../../src/util/stringify.ts","../../src/util/stringUnionFrom.ts","../../src/v2.0/getDescriptionIfPresent.ts","../../src/v2.0/generatePerActionDataFiles.ts","../../src/shared/propertyJsdoc.ts","../../src/v2.0/wireObjectTypeV2ToSdkObjectConstV2.ts","../../src/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.ts","../../src/v2.0/generatePerInterfaceDataFiles.ts","../../src/v2.0/generatePerObjectDataFiles.ts","../../src/shared/getInterfaceTypesFromQueryDataType.ts","../../src/shared/getInterfaceTypeApiNamesFromQuery.ts","../../src/shared/getObjectTypesFromQueryDataType.ts","../../src/shared/getObjectTypeApiNamesFromQuery.ts","../../src/v2.0/generatePerQueryDataFiles.ts","../../src/v2.0/generateRootIndexTsFile.ts","../../src/v2.0/generateClientSdkVersionTwoPointZero.ts","../../src/generateClientSdkPackage.ts"],"names":["path","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","wireObjectTypeFullMetadataToSdkObjectMetadata","fs","format","value","wireActionTypeV2ToSdkActionMetadata","consola","object","forInternalUse","definition","fastDeepEqual","invariant","wireQueryTypeV2ToSdkQueryDefinitionNoParams","wireQueryDataTypeToQueryDataTypeDefinition","paramToDef","x","path8"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBO,IAAM,qBAAN,MAAyB;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9B,WAAY,CAAA,MAAA,EAAQ,WAAa,EAAA,QAAA,EAAU,UAAU,IAAM,EAAA;AACzD,IAAA,IAAA,CAAK,OAAU,GAAA,MAAA;AACf,IAAA,IAAA,CAAK,WAAc,GAAA,WAAA;AACnB,IAAA,CAAC,KAAK,YAAc,EAAA,IAAA,CAAK,YAAY,C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,CAAA,QAAA,EAAU,IAAK,CAAA,SAAA,CAAU,IAAM,EAAA,MAAA,EAAW,CAAC,CAAA,GAAI,IAAI,CAAA;AAC5F","file":"index.cjs","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, isLocal = true) {\n this._common = common;\n this.fullApiName = fullApiName;\n [this.apiNamespace, this.shortApiName] = extractNamespace(this.fullApiName);\n const {\n importExt\n } = common;\n this.importPath = isLocal ? `${basePath}/${this.shortApiName}${importExt}` : basePath;\n this.uniqueImportName = this.shortApiName;\n }\n getImportPathRelTo = filePath => {\n if (this.importPath.startsWith(\".\")) {\n const result = path.relative(path.dirname(filePath), this.importPath).split(path.sep).join(\"/\");\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, raw, fullApiName, basePath) {\n super(common, fullApiName, basePath);\n this.raw = raw;\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, raw) {\n super(common, raw, raw.apiName, \"./ontology/actions\");\n this.raw = raw;\n }\n get description() {\n return this.raw.description;\n }\n get parameters() {\n return this.raw.parameters;\n }\n get operations() {\n return this.raw.operations;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Params`;\n }\n get definitionIdentifier() {\n return `${this.shortApiName}.Definition`;\n }\n get definitionParamsIdentifier() {\n return `${this.shortApiName}.ParamsDefinition`;\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 { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedInterfaceType extends EnhancedBase {\n constructor(common, raw) {\n super(common, raw, raw.apiName, \"./ontology/interfaces\");\n this.raw = raw;\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.raw.properties;\n }\n getCleanedUpDefinition(v2) {\n return __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(this.raw, 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 { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedObjectType extends EnhancedBase {\n constructor(common, raw) {\n super(common, raw, raw.objectType.apiName, \"./ontology/objects\");\n this.raw = raw;\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 wireObjectTypeFullMetadataToSdkObjectMetadata(this.raw, 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, raw) {\n super(common, raw, raw.apiName, \"./ontology/queries\");\n this.raw = raw;\n }\n get description() {\n return this.raw.description;\n }\n get parameters() {\n return this.raw.parameters;\n }\n get output() {\n return this.raw.output;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Parameters`;\n }\n get definitionIdentifier() {\n return this.shortApiName;\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, raw) {\n super(common, raw, raw.apiName, \"./ontology/interfaces\");\n this.raw = raw;\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, apiNamespace, shortApiName, destinationPackage) {\n super(_common, apiNamespace ? `${apiNamespace}.${shortApiName}` : shortApiName, destinationPackage, false);\n this._common = _common;\n }\n getImportedDefinitionIdentifier(v2) {\n return `$Imported$${this.apiNamespace?.replace(/\\./g, \"$\")}$${this.shortApiName}`;\n }\n getDefinitionIdentifier(v2) {\n return this.uniqueImportName;\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 #foreignTypes = {};\n constructor(raw, importExt, externalObjects, externalInterfaces, externalSpts) {\n this.common = {\n enhancedOntology: this,\n importExt\n };\n this.raw = raw;\n this.ontology = raw.ontology;\n this.objectTypes = remap(raw.objectTypes, this.common, EnhancedObjectType, externalObjects);\n this.actionTypes = remap(raw.actionTypes, this.common, EnhancedAction);\n this.queryTypes = remap(raw.queryTypes, this.common, EnhancedQuery);\n this.interfaceTypes = remap(raw.interfaceTypes, this.common, EnhancedInterfaceType, externalInterfaces);\n this.sharedPropertyTypes = remap(raw.sharedPropertyTypes, this.common, EnhancedSharedPropertyType, externalSpts);\n }\n #createRequireType = type => {\n return (fullApiName, localOnly) => {\n const ret = this[type][fullApiName];\n if (!ret) {\n const [apiNamespace, shortApiName] = extractNamespace(fullApiName);\n throw new Error(`Unable to find ${type}: No entry for '${fullApiName}`);\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, externalMap) {\n const entries = [];\n for (const [fullApiName, v] of Object.entries(r ?? {})) {\n if (externalMap?.has(fullApiName)) {\n // skip it, we handle it below\n } else {\n entries.push([fullApiName, new Constructor(common, v)]);\n }\n }\n if (externalMap) {\n for (const [fullApiName, destPackage] of externalMap) {\n const [apiNamespace, shortApiName] = extractNamespace(fullApiName);\n // I think this check should be required but the ontology manager / dev console doesn't enforce it right now\n // if (apiNamespace === undefined) {\n // throw new Error(\n // `Cannot reference an external type (${fullApiName}) that is missing a namespace`,\n // );\n // }\n entries.push([fullApiName, new ForeignType(common, apiNamespace, shortApiName, destPackage)]);\n }\n }\n return Object.fromEntries(entries.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({\n sanitized,\n importExt,\n externalObjects,\n externalInterfaces,\n externalSpts\n}) {\n return new EnhancedOntologyDefinition(sanitized, importExt, externalObjects, externalInterfaces, externalSpts);\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\nimport { format } from \"prettier\";\nexport function formatTs(contents) {\n try {\n return format(contents, {\n parser: \"typescript\",\n singleQuote: true,\n trailingComma: \"all\",\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 \"path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst ExpectedOsdkVersion = \"2.5.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 await 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 ${ontology.raw.branch != null ? `\n export const $branch = \"${ontology.raw.branch.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 getObjectImports(objects, curApiName, currentFilePath, v2) {\n return Array.from(objects).filter(obj => obj.fullApiName !== curApiName).map(obj => {\n const defId = obj.getDefinitionIdentifier(v2);\n const importedId = obj.getImportedDefinitionIdentifier(v2);\n const nameOrAlias = defId === importedId ? defId : `${defId} as ${importedId}`;\n return `import type { ${nameOrAlias} } 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\nexport function deleteUndefineds(obj) {\n return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));\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 } else if (value === undefined) {\n entries.push(`${defaultKeyFormatter(key)}: undefined`);\n }\n }\n return entries.join(separator);\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\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 { wireActionTypeV2ToSdkActionMetadata } from \"@osdk/generator-converters\";\nimport path from \"node:path\";\nimport { getObjectImports } from \"../shared/getObjectImports.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 \"./getDescriptionIfPresent.js\";\nexport async function generatePerActionDataFiles({\n sanitizedOntology: ontology,\n fs,\n outDir: rootOutDir,\n importExt = \"\",\n ontology: enhancedOntology,\n forInternalUse = false\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.raw);\n const uniqueApiNames = new Set(uniqueApiNamesArray);\n const uniqueApiNamesString = stringUnionFrom([...uniqueApiNames]);\n const fullActionDef = deleteUndefineds(wireActionTypeV2ToSdkActionMetadata(action.raw));\n function createParamsDef() {\n const entries = Object.entries(fullActionDef.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 `ActionMetadata.DataType.Object<${obj.getImportedDefinitionIdentifier(true)}>`;\n } else if (type.type === \"objectSet\") {\n const obj = enhancedOntology.requireObjectType(type.objectSet);\n return `ActionMetadata.DataType.ObjectSet<${obj.getImportedDefinitionIdentifier(true)}>`;\n } else if (type.type === \"interface\") {\n const obj = enhancedOntology.requireInterfaceType(type.interface);\n return `ActionMetadata.DataType.Interface<${obj.getImportedDefinitionIdentifier(true)}>`;\n } else if (type.type === \"struct\") {\n return `ActionMetadata.DataType.Struct<${JSON.stringify(type.struct)}>`;\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 } else if (input.type === \"interface\") {\n return `ActionParam.InterfaceType<${enhancedOntology.requireInterfaceType(input.interface).getImportedDefinitionIdentifier(true)}>`;\n } else if (input.type === \"struct\") {\n return `ActionParam.StructType<${JSON.stringify(input.struct)}>`;\n }\n }\n function createV2Types() {\n const oldParamsIdentifier = `${action.shortApiName}$Params`;\n const jsDocBlock = [\"/**\"];\n if (action.description != null) {\n jsDocBlock.push(`* ${action.description}`);\n }\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 Params {\n ${stringify(fullActionDef.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 jsDocBlock.push(`* @param {${getActionParamType(ogValue.type)}} ${ogValue.nullable ? `[${ogKey}]` : ogKey} ${ogValue.description ?? \"\"} `);\n return [key, value];\n }\n })}\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n ${getDescriptionIfPresent(action.description)}\n applyAction<OP extends ApplyActionOptions>(args: ${action.paramsIdentifier}, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;\n \n batchApplyAction<OP extends ApplyBatchActionOptions>(args: ReadonlyArray<${action.paramsIdentifier}>, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;\n }\n \n }\n\n \n ${jsDocBlock.join(\"\\n\")}\n */\n export interface ${action.shortApiName} extends ActionDefinition<${action.shortApiName}.Signatures> {\n __DefinitionMetadata?: {\n ${stringify(fullActionDef, {\n \"parameters\": () => action.definitionParamsIdentifier\n })}\n \n signatures: ${action.shortApiName}.Signatures;\n },\n ${stringify(fullActionDef, {\n \"description\": () => undefined,\n \"displayName\": () => undefined,\n \"modifiedEntities\": () => undefined,\n \"parameters\": () => undefined,\n \"rid\": () => undefined,\n \"status\": () => undefined\n })}\n osdkMetadata: typeof $osdkMetadata;\n }\n `;\n }\n function createV2Object() {\n return ` export const ${action.shortApiName}: ${action.shortApiName} = \n {\n ${stringify(fullActionDef, {\n \"description\": () => undefined,\n \"displayName\": () => undefined,\n \"modifiedEntities\": () => undefined,\n \"parameters\": () => undefined,\n \"rid\": () => undefined,\n \"status\": () => undefined\n })},\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 === \"interfaceObject\") {\n if (p.dataType.interfaceTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireInterfaceType(p.dataType.interfaceTypeApiName));\n }\n }\n if (p.dataType.type === \"array\") {\n if (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 if (p.dataType.subType.type === \"interfaceObject\") {\n if (p.dataType.subType.interfaceTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireInterfaceType(p.dataType.subType.interfaceTypeApiName));\n }\n }\n }\n }\n const imports = getObjectImports(referencedObjectDefs, undefined, currentFilePath, true);\n await fs.writeFile(path.join(rootOutDir, currentFilePath), await formatTs(`\n import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n import { $osdkMetadata} 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 default:\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 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, rawPropertyMetadata, {\n isInherited,\n apiName\n}) {\n const ret = [];\n const renderDisplayName = property.displayName && property.displayName !== apiName;\n const status = rawPropertyMetadata?.status;\n if (isInherited || renderDisplayName || property.description || status) {\n if (status) {\n let deprecationStatus = \"\";\n if (status.type === \"deprecated\") {\n deprecationStatus += ` * @deprecated\\n`;\n deprecationStatus += ` * - ${status.message}\\n`;\n if (status.deadline) {\n deprecationStatus += ` * - deadline: ${status.deadline}\\n`;\n }\n if (status.replacedBy) {\n deprecationStatus += ` * - replaced by: ${status.replacedBy}\\n`;\n }\n ret.push(deprecationStatus);\n } else if (status.type === \"experimental\") {\n ret.push(` * @${status.type}\\n`);\n }\n ret.push(` * property status: ${status.type}\\n`);\n }\n if (isInherited) {\n ret.push(` * (inherited from parent)\\n`);\n }\n if (renderDisplayName) {\n ret.push(` * display name: '${property.displayName}'${property.description ? \",\" : \"\"}\\n`);\n }\n if (property.description) {\n ret.push(` * description: ${property.description}\\n`);\n }\n } else {\n ret.push(` * (no ontology metadata)\\n`);\n }\n return `/**\\n` + ret.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 { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport consola from \"consola\";\nimport { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { EnhancedObjectType } from \"../GenerateContext/EnhancedObjectType.js\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.js\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { propertyJsdoc } from \"../shared/propertyJsdoc.js\";\nimport { stringify } from \"../util/stringify.js\";\n/** @internal */\nexport function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {\n ontology,\n forInternalUse\n}, currentFilePath) {\n const object = ontology.requireObjectType(wireObject.objectType.apiName, true);\n if (object instanceof ForeignType) {\n throw new Error(\"Should not be generating types for an external type\");\n }\n const uniqueLinkTargetTypes = new Set(wireObject.linkTypes.map(a => ontology.requireObjectType(a.objectTypeApiName, false)));\n const definition = wireObjectTypeFullMetadataToSdkObjectMetadata(object.raw, true, consola);\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,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier\n };\n function getV2Types(object, forInternalUse = false) {\n return `import type {\n PropertyKeys as $PropertyKeys, \n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n import type {\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n\n\n export namespace ${object.shortApiName} {\n\n ${createPropertyKeys(object)}\n\n\n ${createLinks(ontology, object, \"Links\")}\n\n ${createProps(object, \"Props\", false, ontology.raw.valueTypes)}\n ${createProps(object, \"StrictProps\", true, ontology.raw.valueTypes)}\n\n ${createObjectSet(object, identifiers)}\n \n ${createOsdkObject(object, \"OsdkInstance\", identifiers)}\n } \n\n\n\n ${createDefinition(object, ontology, object.shortApiName, identifiers)}\n `;\n }\n const imports = getObjectImports(uniqueLinkTargetTypes, definition.apiName, currentFilePath, true);\n return `${imports}${getV2Types(object, forInternalUse)}\n\n export const ${object.shortApiName}\n = {\n type: \"${object instanceof EnhancedObjectType ? \"object\" : \"interface\"}\",\n apiName: \"${object.fullApiName}\",\n osdkMetadata: $osdkMetadata,\n internalDoNotUseMetadata: {\n rid: \"${definition.rid}\",\n },\n } satisfies ${objectDefIdentifier} & { internalDoNotUseMetadata: { rid: string } } as ${objectDefIdentifier};`;\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 | \"$rid\" = never,\n K extends keyof ${osdkObjectPropsIdentifier}= keyof ${osdkObjectPropsIdentifier},\n > \n = $Osdk.Instance<\n ${objectDefIdentifier}, \n OPTIONS,\n K\n >;\n \n\n /** @deprecated use ${identifier} */\n export type OsdkObject<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof ${osdkObjectPropsIdentifier}= keyof ${osdkObjectPropsIdentifier},\n > = ${identifier}<OPTIONS, K>;\n ;\n `;\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{\n\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, valueTypeMetadata) {\n if (identifier === \"StrictProps\") {\n return `export type StrictProps = Props`;\n }\n const definition = type.getCleanedUpDefinition(true);\n const propertyMetadata = type instanceof EnhancedObjectType ? type.raw.objectType.properties : type instanceof EnhancedInterfaceType ? type.raw.properties : undefined;\n return `export interface ${identifier} {\n${stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => {\n const metadata = propertyMetadata ? propertyMetadata[apiName] : undefined;\n return [`${propertyJsdoc(propertyDefinition, metadata, {\n apiName\n })}readonly \"${maybeStripNamespace(type, apiName)}\"`, (typeof propertyDefinition.type === \"object\" ? remapStructType(propertyDefinition.type) : getPropTypeOrValueTypeEnum(propertyDefinition, valueTypeMetadata)) + `${propertyDefinition.multiplicity ? \"[]\" : \"\"}${propertyDefinition.nullable || !strict && !(definition.type === \"object\" && definition.primaryKeyApiName === apiName) ? `| undefined` : \"\"}`];\n }\n })}\n }`;\n}\nexport function createDefinition(object, ontology, identifier, {\n objectDefIdentifier,\n objectSetIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n osdkObjectLinksIdentifier\n}) {\n const definition = object.getCleanedUpDefinition(true);\n const propertyMetadata = object instanceof EnhancedObjectType ? object.raw.objectType.properties : object instanceof EnhancedInterfaceType ? object.raw.properties : undefined;\n return `\n export interface ${identifier} extends ${object instanceof EnhancedObjectType ? `$ObjectTypeDefinition` : `$InterfaceDefinition`} {\n osdkMetadata: typeof $osdkMetadata;\n type: \"${object instanceof EnhancedObjectType ? \"object\" : \"interface\"}\";\n apiName: \"${object.fullApiName}\";\n __DefinitionMetadata?: {\n objectSet: ${objectSetIdentifier};\n props: ${osdkObjectPropsIdentifier};\n linksType: ${osdkObjectLinksIdentifier};\n strictProps: ${osdkObjectStrictPropsIdentifier};\n ${stringify(definition, {\n links: _value => `{\n ${definition.type === \"interface\" ? stringify(definition.links, {\n \"*\": linkDefinition => `$InterfaceMetadata.Link<${linkDefinition.targetType === \"interface\" ? ontology.requireInterfaceType(linkDefinition.targetTypeApiName).getImportedDefinitionIdentifier(true) : ontology.requireObjectType(linkDefinition.targetTypeApiName).getImportedDefinitionIdentifier(true)}, ${linkDefinition.multiplicity}>`\n }) : stringify(definition.links, {\n \"*\": linkDefinition => `$ObjectMetadata.Link<${ontology.requireObjectType(linkDefinition.targetType).getImportedDefinitionIdentifier(true)}, ${linkDefinition.multiplicity}>`\n })}\n }`,\n properties: _value => `{\n ${stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => [`${propertyJsdoc(propertyDefinition, propertyMetadata[apiName], {\n apiName\n })}\"${maybeStripNamespace(object, apiName)}\"`, `$PropertyDef<${JSON.stringify(propertyDefinition.type)}, \"${propertyDefinition.nullable ? \"nullable\" : \"non-nullable\"}\", \"${propertyDefinition.multiplicity ? \"array\" : \"single\"}\">`]\n })}\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} = {};` : `\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}>`}\n `];\n }\n })}\n }\n `}`;\n}\nexport function createPropertyKeys(type) {\n const properties = Object.keys(type.getCleanedUpDefinition(true).properties);\n return `export type PropertyKeys = ${properties.length === 0 ? \"never\" : properties.map(a => maybeStripNamespace(type, a)).map(a => `\"${a}\"`).join(\"|\")};`;\n}\nfunction remapStructType(structType) {\n let output = `{`;\n Object.entries(structType).map(([key, value]) => output += `${key}:$PropType[${JSON.stringify(value)}]|undefined;`);\n output += \"}\";\n return output;\n}\nfunction getPropTypeOrValueTypeEnum(propertyDefinition, valueTypeMetadata) {\n const defaultPropString = `$PropType[${JSON.stringify(propertyDefinition.type)}]`;\n if (!(propertyDefinition.type === \"string\" || propertyDefinition.type === \"boolean\") || !propertyDefinition.valueTypeApiName || valueTypeMetadata[propertyDefinition.valueTypeApiName] == null) {\n return defaultPropString;\n }\n const valueType = valueTypeMetadata[propertyDefinition.valueTypeApiName];\n if (valueType.constraints.length !== 1) {\n throw new Error(`Expected exactly one constraint for value type ${propertyDefinition.valueTypeApiName} but got ${valueType.constraints.length}`);\n }\n let shouldWrapWithParentheses = false;\n let constraint = valueType.constraints[0];\n if (constraint.type === \"array\" && constraint.valueConstraint) {\n constraint = constraint.valueConstraint;\n shouldWrapWithParentheses = true;\n }\n const maybeEnumString = maybeGetEnumString(propertyDefinition, constraint);\n return maybeEnumString ? shouldWrapWithParentheses ? `(${maybeEnumString})` : maybeEnumString : defaultPropString;\n}\nfunction maybeGetEnumString(propertyDefinition, constraint) {\n if (constraint.type !== \"enum\" || constraint.options.length === 0) {\n return undefined;\n }\n if (propertyDefinition.type === \"string\") {\n return constraint.options.map(x => `\"${x}\"`).join(\" | \");\n }\n if (propertyDefinition.type === \"boolean\") {\n return constraint.options.map(value => {\n if (value === true) {\n return true;\n } else if (value === false) {\n return false;\n } else if (value == null) {\n // Always infer nullability from the property definition\n return undefined;\n } else {\n consola.warn(`Unexpected boolean value in enum: ${value}. Ignoring.`);\n }\n }).filter(value => value != null).join(\" | \");\n }\n return undefined;\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 consola from \"consola\";\nimport fastDeepEqual from \"fast-deep-equal\";\nimport invariant from \"tiny-invariant\";\nimport { extractNamespace } from \"../GenerateContext/EnhancedBase.js\";\nimport { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { getObjectImports } from \"../shared/getObjectImports.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, forInternalUse = false, currentFilePath = \"\") {\n const definition = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceDef.raw, v2));\n const uniqueLinkTargetTypes = new Set(definition.links ? Object.values(definition.links).map(a => a.targetType === \"object\" ? ontology.requireObjectType(a.targetTypeApiName) : ontology.requireInterfaceType(a.targetTypeApiName)) : []);\n const objectDefIdentifier = interfaceDef.getDefinitionIdentifier(v2);\n const parents = definition.implements?.map(p => {\n const parent = ontology.requireInterfaceType(p, true);\n if (parent instanceof EnhancedInterfaceType) {\n const it = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(parent.raw, v2, consola));\n return it;\n }\n }) ?? [];\n const mergedProperties = {\n ...definition.properties\n };\n for (const parent of parents) {\n if (parent == null) {\n // came from a foreign type and we cannot merge properties yet\n // so if they weren't listed on the interface its over\n continue;\n }\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 definition.properties = mergedProperties;\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,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier\n };\n if (interfaceDef.apiNamespace) {\n const badProperties = Object.keys(definition.properties).filter(apiName => extractNamespace(apiName)[0] == null);\n if (badProperties.length > 0) {\n throw new Error(`Interfaces with fully qualified api names MUST NOT have any properties with an unqualified api name. Interface: ${interfaceDef.fullApiName}, properties: ${badProperties.join(\", \")}`);\n }\n }\n function getV2Types(forInternalUse = false) {\n return `import type {\n InterfaceDefinition as $InterfaceDefinition,\n InterfaceMetadata as $InterfaceMetadata,\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n \n ${definition.links ? Object.keys(definition.links).length > 0 ? `\n export interface ${osdkObjectLinksIdentifier} {\n${stringify(definition.links, {\n \"*\": definition => {\n const linkTarget = definition.targetType === \"object\" ? ontology.requireObjectType(definition.targetTypeApiName).getImportedDefinitionIdentifier(v2) : ontology.requireInterfaceType(definition.targetTypeApiName).getImportedDefinitionIdentifier(v2);\n return `${definition.multiplicity ? `${linkTarget}.ObjectSet` : `${linkTarget}.ObjectSet`}\n `;\n }\n })}\n }\n ` : `export type ${osdkObjectLinksIdentifier} = {};` : `export type ${osdkObjectLinksIdentifier} = {};`}\n\n export namespace ${interfaceDef.shortApiName} {\n\n ${createPropertyKeys(interfaceDef)}\n\n\n ${createProps(interfaceDef, \"Props\", false, ontology.raw.valueTypes)}\n ${createProps(interfaceDef, \"StrictProps\", true, ontology.raw.valueTypes)}\n\n\n ${createObjectSet(interfaceDef, ids)}\n\n ${createOsdkObject(interfaceDef, \"OsdkInstance\", ids)}\n \n } \n\n ${createDefinition(interfaceDef, ontology, interfaceDef.shortApiName, ids)}\n\n`;\n }\n const imports = getObjectImports(uniqueLinkTargetTypes, definition.apiName, currentFilePath, true);\n definition;\n return `${imports}\n ${v2 ? getV2Types(forInternalUse) : \"\"}\n\n export const ${interfaceDef.shortApiName}: ${interfaceDef.shortApiName} = {\n type: \"interface\",\n apiName: \"${interfaceDef.fullApiName}\",\n osdkMetadata: $osdkMetadata,\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 { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst } from \"./UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js\";\n\n/** @internal */\nexport async function generatePerInterfaceDataFiles({\n fs,\n outDir,\n ontology,\n importExt,\n forInternalUse\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 if (obj instanceof ForeignType) continue;\n const relPath = path.join(\".\", \"ontology\", \"interfaces\", `${obj.shortApiName}.ts`);\n await fs.writeFile(path.join(interfacesDir, `${obj.shortApiName}.ts`), await formatTs(`\n import type { PropertyDef as $PropertyDef } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n import { $osdkMetadata } from \"../../OntologyMetadata${importExt}\";\n ${__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(obj, ontology, true, forInternalUse, relPath)}\n `));\n }\n await fs.writeFile(interfacesDir + \".ts\", await formatTs(`\n ${Object.values(ontology.interfaceTypes).filter(i => i instanceof EnhancedInterfaceType).map(interfaceType => `export {${interfaceType.shortApiName}} from \"./interfaces/${interfaceType.shortApiName}${importExt}\";`).join(\"\\n\")}\n ${Object.keys(ontology.interfaceTypes).length === 0 ? \"export {}\" : \"\"}\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 { EnhancedObjectType } from \"../GenerateContext/EnhancedObjectType.js\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { wireObjectTypeV2ToSdkObjectConstV2 } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\nexport async function generatePerObjectDataFiles(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 if (obj instanceof ForeignType) continue;\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 { PropertyDef as $PropertyDef } from \"${ctx.forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n import { $osdkMetadata } from \"../../OntologyMetadata${importExt}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${wireObjectTypeV2ToSdkObjectConstV2(obj.raw, ctx, relPath)}\n `));\n }\n await fs.writeFile(path.join(outDir, \"ontology\", \"objects.ts\"), await formatTs(`\n ${Object.values(ctx.ontology.objectTypes).filter(o => o instanceof EnhancedObjectType).map(objType => `export {${objType.shortApiName}} from \"./objects/${objType.shortApiName}${importExt}\";`).join(\"\\n\")}\n ${Object.keys(ontology.objectTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getInterfaceTypesFromQueryDataType(dataType, types) {\n switch (dataType.type) {\n case \"array\":\n case \"set\":\n getInterfaceTypesFromQueryDataType(dataType.subType, types);\n return;\n case \"interfaceObject\":\n case \"interfaceObjectSet\":\n types.add(dataType.interfaceTypeApiName);\n return;\n case \"struct\":\n for (const prop of Object.values(dataType.fields)) {\n getInterfaceTypesFromQueryDataType(prop.fieldType, types);\n }\n return;\n case \"union\":\n for (const type of dataType.unionTypes) {\n getInterfaceTypesFromQueryDataType(type, types);\n }\n return;\n case \"entrySet\":\n getInterfaceTypesFromQueryDataType(dataType.keyType, types);\n getInterfaceTypesFromQueryDataType(dataType.valueType, types);\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 \"entrySet\":\n case \"unsupported\":\n case \"object\":\n case \"objectSet\":\n /* complete no-op */\n return;\n default:\n const _ = dataType;\n throw new Error(`Unknown query data type ${dataType.type}`);\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInterfaceTypesFromQueryDataType } from \"./getInterfaceTypesFromQueryDataType.js\";\nexport function getInterfaceTypeApiNamesFromQuery(query) {\n const types = new Set();\n for (const {\n dataType\n } of Object.values(query.parameters)) {\n getInterfaceTypesFromQueryDataType(dataType, types);\n }\n getInterfaceTypesFromQueryDataType(query.output, types);\n return Array.from(types);\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 \"entrySet\":\n getObjectTypesFromQueryDataType(dataType.keyType, types);\n getObjectTypesFromQueryDataType(dataType.valueType, types);\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 \"entrySet\":\n case \"unsupported\":\n case \"interfaceObject\":\n case \"interfaceObjectSet\":\n /* complete no-op */\n return;\n default:\n const _ = dataType;\n throw new Error(`Unknown query data type ${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\nimport { wireQueryDataTypeToQueryDataTypeDefinition, wireQueryParameterV2ToQueryParameterDefinition as paramToDef, wireQueryTypeV2ToSdkQueryDefinitionNoParams } from \"@osdk/generator-converters\";\nimport path from \"node:path\";\nimport { getInterfaceTypeApiNamesFromQuery } from \"../shared/getInterfaceTypeApiNamesFromQuery.js\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { getObjectTypeApiNamesFromQuery } from \"../shared/getObjectTypeApiNamesFromQuery.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { getDescriptionIfPresent } from \"./getDescriptionIfPresent.js\";\nexport async function generatePerQueryDataFilesV2({\n fs,\n outDir: rootOutDir,\n ontology,\n fixedVersionQueryTypes,\n importExt = \"\",\n forInternalUse = false\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, forInternalUse, fixedVersionQueryTypes);\n }));\n const indexFilePath = `${outDir}.ts`;\n await fs.writeFile(indexFilePath, await formatTs(`\n ${Object.values(ontology.queryTypes).map(query => `export {${query.shortApiName}} 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, forInternalUse, fixedVersionQueryTypes) {\n const relFilePath = path.join(relOutDir, `${query.shortApiName}.ts`);\n const objectTypes = getObjectTypeApiNamesFromQuery(query);\n const interfaceTypes = getInterfaceTypeApiNamesFromQuery(query);\n const interfaceAndObjectTypes = new Set([...objectTypes.map(o => ontology.requireObjectType(o)), ...interfaceTypes.map(o => ontology.requireInterfaceType(o))]);\n const importObjects = getObjectImports(interfaceAndObjectTypes, \"\", relFilePath, true);\n const baseProps = deleteUndefineds(wireQueryTypeV2ToSdkQueryDefinitionNoParams(query.raw));\n const outputBase = deleteUndefineds(wireQueryDataTypeToQueryDataTypeDefinition(query.output));\n const isUsingFixedVersion = fixedVersionQueryTypes.includes(query.fullApiName);\n await fs.writeFile(path.join(outDir, `${query.shortApiName}.ts`), await formatTs(`\n import type { ObjectSpecifier, QueryDefinition, QueryParam, QueryResult, VersionBound} from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n import { $osdkMetadata} 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<${query.shortApiName}.ReturnType>\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 ${query.output.type === \"struct\" ? `\n export interface ReturnType \n ${getQueryParamType(ontology, paramToDef({\n dataType: query.output\n }), \"Result\")}\n ` : `\n export type ReturnType = ${getQueryParamType(ontology, paramToDef({\n dataType: query.output\n }), \"Result\")}\n `}\n }\n \n \n export interface ${query.shortApiName} extends QueryDefinition<\n ${query.shortApiName}.Signature\n >, VersionBound<$ExpectedClientVersion>{\n __DefinitionMetadata?: {\n ${stringify(baseProps)}\n isFixedVersion: ${isUsingFixedVersion};\n parameters: {\n ${parameterDefsForType(ontology, query)}\n };\n output: {\n ${stringify(outputBase)},\n ${getLineFor__OsdkTargetType(ontology, query.output)}\n };\n signature: ${query.shortApiName}.Signature;\n }, \n ${stringify(baseProps, {\n \"description\": () => undefined,\n \"displayName\": () => undefined,\n \"rid\": () => undefined\n })}, \n osdkMetadata: typeof $osdkMetadata;\n }\n\n\n export const ${query.shortApiName}: ${query.definitionIdentifier} = {\n ${stringify(baseProps, {\n \"description\": () => undefined,\n \"displayName\": () => undefined,\n \"rid\": () => undefined\n })},\n isFixedVersion: ${isUsingFixedVersion},\n osdkMetadata: $osdkMetadata\n };\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}\nexport function getQueryParamType(enhancedOntology, input, type, isMapKey = false) {\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 \"timestamp\":\n inner = `Query${type}.PrimitiveType<${JSON.stringify(input.type)}>`;\n break;\n case \"struct\":\n inner = `{\n ${stringify(input.struct, {\n \"*\": (p, formatter, apiName) => {\n return [`\n ${type === \"Param\" ? \"readonly \" : \"\"}\"${apiName}\"${p.nullable ? \"?\" : \"\"}`, getQueryParamType(enhancedOntology, p, type)];\n }\n })}\n }`;\n break;\n case \"twoDimensionalAggregation\":\n inner = `Query${type}.TwoDimensionalAggregationType<${input.twoDimensionalAggregation.keyType === \"range\" ? `Query${type}.RangeKey<\"${input.twoDimensionalAggregation.keySubtype}\">` : `\"${input.twoDimensionalAggregation.keyType}\"`}, \"${input.twoDimensionalAggregation.valueType}\">`;\n break;\n case \"threeDimensionalAggregation\":\n inner = `Query${type}.ThreeDimensionalAggregationType<${input.threeDimensionalAggregation.keyType === \"range\" ? `Query${type}.RangeKey<\"${input.threeDimensionalAggregation.keySubtype}\">` : `\"${input.threeDimensionalAggregation.keyType}\"`},${input.threeDimensionalAggregation.valueType.keyType === \"range\" ? `Query${type}.RangeKey<\"${input.threeDimensionalAggregation.valueType.keySubtype}\">` : `\"${input.threeDimensionalAggregation.valueType.keyType}\"`}, \n \"${input.threeDimensionalAggregation.valueType.valueType}\">`;\n break;\n case \"object\":\n if (isMapKey) {\n inner = `ObjectSpecifier<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;\n break;\n }\n inner = `Query${type}.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"interface\":\n inner = `Query${type}.InterfaceType<${enhancedOntology.requireInterfaceType(input.interface).getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"objectSet\":\n inner = `Query${type}.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"interfaceObjectSet\":\n inner = `Query${type}.ObjectSetType<${enhancedOntology.requireInterfaceType(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 case \"map\":\n inner = `Partial<Record<${getQueryParamType(enhancedOntology, input.keyType, type, true)}, ${getQueryParamType(enhancedOntology, input.valueType, type)}>>`;\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 path from \"node:path\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateRootIndexTsFile({\n fs,\n outDir,\n importExt,\n ontologyApiNamespace,\n ontology\n}) {\n await fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`export {${helper(ontology.actionTypes)}} from \"./ontology/actions${importExt}\";\n export * as $Actions from \"./ontology/actions${importExt}\";\n export {${helper(ontology.interfaceTypes)}} from \"./ontology/interfaces${importExt}\";\n export * as $Interfaces from \"./ontology/interfaces${importExt}\";\n export {${helper(ontology.objectTypes)}} from \"./ontology/objects${importExt}\";\n export * as $Objects from \"./ontology/objects${importExt}\";\n export {${helper(ontology.queryTypes)}} from \"./ontology/queries${importExt}\";\n export * as $Queries from \"./ontology/queries${importExt}\";\n export { $osdkMetadata } from \"./OntologyMetadata${importExt}\";\n ${ontologyApiNamespace == null ? `export { $ontologyRid } from \"./OntologyMetadata${importExt}\";` : ``}\n `));\n}\nfunction helper(x) {\n return Object.values(x).filter(x => !(x instanceof ForeignType)).map(a => a.shortApiName).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 { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { sanitizeMetadata } from \"../shared/sanitizeMetadata.js\";\nimport { verifyOutDir } from \"../util/verifyOutDir.js\";\nimport { generateOntologyMetadataFile } from \"./generateMetadata.js\";\nimport { generatePerActionDataFiles } from \"./generatePerActionDataFiles.js\";\nimport { generatePerInterfaceDataFiles } from \"./generatePerInterfaceDataFiles.js\";\nimport { generatePerObjectDataFiles } from \"./generatePerObjectDataFiles.js\";\nimport { generatePerQueryDataFilesV2 } from \"./generatePerQueryDataFiles.js\";\nimport { generateRootIndexTsFile } from \"./generateRootIndexTsFile.js\";\nexport async function generateClientSdkVersionTwoPointZero(ontology, userAgent, fs, outDir, packageType = \"commonjs\", externalObjects = new Map(), externalInterfaces = new Map(), externalSpts = new Map(), forInternalUse = false, fixedVersionQueryTypes = []) {\n const importExt = \".js\"; // turns out you can always use the extension\n\n // Structurally, we need to have multiple ontologies read in\n // with one per package.\n\n await verifyOutDir(outDir, fs);\n const sanitizedOntology = sanitizeMetadata(ontology);\n await fs.mkdir(outDir, {\n recursive: true\n });\n const enhancedOntology = enhanceOntology({\n sanitized: sanitizedOntology,\n importExt,\n externalObjects,\n externalInterfaces,\n externalSpts\n });\n const ctx = {\n sanitizedOntology,\n ontology: enhancedOntology,\n importExt,\n fs,\n outDir,\n forInternalUse,\n fixedVersionQueryTypes\n };\n await generateRootIndexTsFile(ctx);\n await generateOntologyMetadataFile(ctx, userAgent);\n await generatePerObjectDataFiles(ctx);\n await generatePerInterfaceDataFiles(ctx);\n await generatePerActionDataFiles(ctx);\n await generatePerQueryDataFilesV2(ctx, true);\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 { generateClientSdkVersionTwoPointZero } from \"./v2.0/generateClientSdkVersionTwoPointZero.js\";\nexport async function generateClientSdkPackage(packageName, packageVersion, sdkVersion, baseOutDir, ontology, minimalFs, dependencyVersions, cliVersion, externalObjects = new Map(), externalInterfaces = new Map()) {\n if (!packageName) throw new Error(\"Package name is required\");\n if (sdkVersion === \"1.1\") {\n throw new Error(\"This generator version does not support generating v1 sdks\");\n }\n for (const packageType of [\"module\", \"commonjs\"]) {\n const outDir = path.join(baseOutDir, \"dist\", packageType);\n await generateClientSdkVersionTwoPointZero(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType, externalObjects, externalInterfaces);\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\"), getPackageJsonContents(packageName, packageVersion, 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({\n osdkApiVersion,\n osdkClientVersion\n}) {\n return {\n devDependencies: {\n \"@osdk/api\": osdkApiVersion\n },\n peerDependencies: {\n \"@osdk/api\": osdkApiVersion,\n \"@osdk/client\": osdkClientVersion\n }\n };\n}\nfunction getExpectedDependenciesFull(dependencyVersions) {\n const {\n typescriptVersion,\n tslibVersion,\n areTheTypesWrongVersion\n } = dependencyVersions;\n const base = getExpectedDependencies(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, 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 },\n scripts: {\n prepack: `tsc -p ${esmPrefix}/tsconfig.json && tsc -p ${commonjsPrefix}/tsconfig.json`,\n check: \"npm exec attw $(npm pack)\"\n },\n ...getExpectedDependenciesFull(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 void (await minimalFs.writeFile(filePath, JSON.stringify(body, undefined, 2) + \"\\n\"));\n}"]}
1
+ {"version":3,"sources":["../../src/GenerateContext/EnhancedBase.ts","../../src/GenerateContext/EnhancedAction.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/util/test/formatTs.ts","../../src/v2.0/generateMetadata.ts","../../src/shared/getObjectImports.ts","../../src/util/deleteUndefineds.ts","../../src/util/stringify.ts","../../src/util/stringUnionFrom.ts","../../src/v2.0/getDescriptionIfPresent.ts","../../src/v2.0/generatePerActionDataFiles.ts","../../src/shared/propertyJsdoc.ts","../../src/v2.0/wireObjectTypeV2ToSdkObjectConstV2.ts","../../src/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.ts","../../src/v2.0/generatePerInterfaceDataFiles.ts","../../src/v2.0/generatePerObjectDataFiles.ts","../../src/shared/getInterfaceTypesFromQueryDataType.ts","../../src/shared/getInterfaceTypeApiNamesFromQuery.ts","../../src/shared/getObjectTypesFromQueryDataType.ts","../../src/shared/getObjectTypeApiNamesFromQuery.ts","../../src/v2.0/generatePerQueryDataFiles.ts","../../src/v2.0/generateRootIndexTsFile.ts","../../src/v2.0/generateClientSdkVersionTwoPointZero.ts","../../src/generateClientSdkPackage.ts"],"names":["path","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","wireObjectTypeFullMetadataToSdkObjectMetadata","fs","format","value","wireActionTypeV2ToSdkActionMetadata","consola","object","forInternalUse","definition","fastDeepEqual","invariant","wire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A;AAAA;AAC5B,KACF;AAAA,IACA,OAAS,EAAA;AAAA,MACP,OAAS,EAAA,CAAA,OAAA,EAAU,SAAS,CAAA,yBAAA,EAA4B,cAAc,CAAA,cAAA,CAAA;AAAA,MACtE,KAAO,EAAA;AAAA,KACT;AAAA,IACA,GAAG,4BAA4B,kBAAkB,CAAA;AAAA,IACjD,KAAO,EAAA,CAAC,SAAW,EAAA,WAAA,EAAa,sBAAsB;AAAA,GACxD;AACF;AACA,eAAe,SAAA,CAAU,SAAW,EAAA,QAAA,EAAU,IAAM,EAAA;AAGlD,EAAO,OAAA,KAAM,MAAM,SAAA,CAAU,SAAU,CAAA,QAAA,EAAU,IAAK,CAAA,SAAA,CAAU,IAAM,EAAA,MAAA,EAAW,CAAC,CAAA,GAAI,IAAI,CAAA;AAC5F","file":"index.cjs","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, isLocal = true) {\n this._common = common;\n this.fullApiName = fullApiName;\n [this.apiNamespace, this.shortApiName] = extractNamespace(this.fullApiName);\n const {\n importExt\n } = common;\n this.importPath = isLocal ? `${basePath}/${this.shortApiName}${importExt}` : basePath;\n this.uniqueImportName = this.shortApiName;\n }\n getImportPathRelTo = filePath => {\n if (this.importPath.startsWith(\".\")) {\n const result = path.relative(path.dirname(filePath), this.importPath).split(path.sep).join(\"/\");\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, raw, fullApiName, basePath) {\n super(common, fullApiName, basePath);\n this.raw = raw;\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, raw) {\n super(common, raw, raw.apiName, \"./ontology/actions\");\n this.raw = raw;\n }\n get description() {\n return this.raw.description;\n }\n get parameters() {\n return this.raw.parameters;\n }\n get operations() {\n return this.raw.operations;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Params`;\n }\n get definitionIdentifier() {\n return `${this.shortApiName}.Definition`;\n }\n get definitionParamsIdentifier() {\n return `${this.shortApiName}.ParamsDefinition`;\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 { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedInterfaceType extends EnhancedBase {\n constructor(common, raw) {\n super(common, raw, raw.apiName, \"./ontology/interfaces\");\n this.raw = raw;\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.raw.properties;\n }\n getCleanedUpDefinition(v2) {\n return __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(this.raw, 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 { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedObjectType extends EnhancedBase {\n constructor(common, raw) {\n super(common, raw, raw.objectType.apiName, \"./ontology/objects\");\n this.raw = raw;\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 wireObjectTypeFullMetadataToSdkObjectMetadata(this.raw, 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, raw) {\n super(common, raw, raw.apiName, \"./ontology/queries\");\n this.raw = raw;\n }\n get description() {\n return this.raw.description;\n }\n get parameters() {\n return this.raw.parameters;\n }\n get output() {\n return this.raw.output;\n }\n get paramsIdentifier() {\n return `${this.shortApiName}.Parameters`;\n }\n get definitionIdentifier() {\n return this.shortApiName;\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, raw) {\n super(common, raw, raw.apiName, \"./ontology/interfaces\");\n this.raw = raw;\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, apiNamespace, shortApiName, destinationPackage) {\n super(_common, apiNamespace ? `${apiNamespace}.${shortApiName}` : shortApiName, destinationPackage, false);\n this._common = _common;\n }\n getImportedDefinitionIdentifier(v2) {\n return `$Imported$${this.apiNamespace?.replace(/\\./g, \"$\")}$${this.shortApiName}`;\n }\n getDefinitionIdentifier(v2) {\n return this.uniqueImportName;\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 #foreignTypes = {};\n constructor(raw, importExt, externalObjects, externalInterfaces, externalSpts) {\n this.common = {\n enhancedOntology: this,\n importExt\n };\n this.raw = raw;\n this.ontology = raw.ontology;\n this.objectTypes = remap(raw.objectTypes, this.common, EnhancedObjectType, externalObjects);\n this.actionTypes = remap(raw.actionTypes, this.common, EnhancedAction);\n this.queryTypes = remap(raw.queryTypes, this.common, EnhancedQuery);\n this.interfaceTypes = remap(raw.interfaceTypes, this.common, EnhancedInterfaceType, externalInterfaces);\n this.sharedPropertyTypes = remap(raw.sharedPropertyTypes, this.common, EnhancedSharedPropertyType, externalSpts);\n }\n #createRequireType = type => {\n return (fullApiName, localOnly) => {\n const ret = this[type][fullApiName];\n if (!ret) {\n const [apiNamespace, shortApiName] = extractNamespace(fullApiName);\n throw new Error(`Unable to find ${type}: No entry for '${fullApiName}`);\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, externalMap) {\n const entries = [];\n for (const [fullApiName, v] of Object.entries(r ?? {})) {\n if (externalMap?.has(fullApiName)) {\n // skip it, we handle it below\n } else {\n entries.push([fullApiName, new Constructor(common, v)]);\n }\n }\n if (externalMap) {\n for (const [fullApiName, destPackage] of externalMap) {\n const [apiNamespace, shortApiName] = extractNamespace(fullApiName);\n // I think this check should be required but the ontology manager / dev console doesn't enforce it right now\n // if (apiNamespace === undefined) {\n // throw new Error(\n // `Cannot reference an external type (${fullApiName}) that is missing a namespace`,\n // );\n // }\n entries.push([fullApiName, new ForeignType(common, apiNamespace, shortApiName, destPackage)]);\n }\n }\n return Object.fromEntries(entries.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({\n sanitized,\n importExt,\n externalObjects,\n externalInterfaces,\n externalSpts\n}) {\n return new EnhancedOntologyDefinition(sanitized, importExt, externalObjects, externalInterfaces, externalSpts);\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\nimport { format } from \"prettier\";\nexport function formatTs(contents) {\n try {\n return format(contents, {\n parser: \"typescript\",\n singleQuote: true,\n trailingComma: \"all\",\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 \"path\";\nimport { formatTs } from \"../util/test/formatTs.js\";\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst ExpectedOsdkVersion = \"2.6.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 await 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 ${ontology.raw.branch != null ? `\n export const $branch = \"${ontology.raw.branch.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 getObjectImports(objects, curApiName, currentFilePath, v2) {\n return Array.from(objects).filter(obj => obj.fullApiName !== curApiName).map(obj => {\n const defId = obj.getDefinitionIdentifier(v2);\n const importedId = obj.getImportedDefinitionIdentifier(v2);\n const nameOrAlias = defId === importedId ? defId : `${defId} as ${importedId}`;\n return `import type { ${nameOrAlias} } 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\nexport function deleteUndefineds(obj) {\n return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));\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 } else if (value === undefined) {\n entries.push(`${defaultKeyFormatter(key)}: undefined`);\n }\n }\n return entries.join(separator);\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\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 { wireActionTypeV2ToSdkActionMetadata } from \"@osdk/generator-converters\";\nimport path from \"node:path\";\nimport { getObjectImports } from \"../shared/getObjectImports.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 \"./getDescriptionIfPresent.js\";\nexport async function generatePerActionDataFiles({\n sanitizedOntology: ontology,\n fs,\n outDir: rootOutDir,\n importExt = \"\",\n ontology: enhancedOntology,\n forInternalUse = false\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.raw);\n const uniqueApiNames = new Set(uniqueApiNamesArray);\n const uniqueApiNamesString = stringUnionFrom([...uniqueApiNames]);\n const fullActionDef = deleteUndefineds(wireActionTypeV2ToSdkActionMetadata(action.raw));\n function createParamsDef() {\n const entries = Object.entries(fullActionDef.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 `ActionMetadata.DataType.Object<${obj.getImportedDefinitionIdentifier(true)}>`;\n } else if (type.type === \"objectSet\") {\n const obj = enhancedOntology.requireObjectType(type.objectSet);\n return `ActionMetadata.DataType.ObjectSet<${obj.getImportedDefinitionIdentifier(true)}>`;\n } else if (type.type === \"interface\") {\n const obj = enhancedOntology.requireInterfaceType(type.interface);\n return `ActionMetadata.DataType.Interface<${obj.getImportedDefinitionIdentifier(true)}>`;\n } else if (type.type === \"struct\") {\n return `ActionMetadata.DataType.Struct<${JSON.stringify(type.struct)}>`;\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 } else if (input.type === \"interface\") {\n return `ActionParam.InterfaceType<${enhancedOntology.requireInterfaceType(input.interface).getImportedDefinitionIdentifier(true)}>`;\n } else if (input.type === \"struct\") {\n return `ActionParam.StructType<${JSON.stringify(input.struct)}>`;\n }\n }\n function createV2Types() {\n const oldParamsIdentifier = `${action.shortApiName}$Params`;\n const jsDocBlock = [\"/**\"];\n if (action.description != null) {\n jsDocBlock.push(`* ${action.description}`);\n }\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 Params {\n ${stringify(fullActionDef.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 jsDocBlock.push(`* @param {${getActionParamType(ogValue.type)}} ${ogValue.nullable ? `[${ogKey}]` : ogKey} ${ogValue.description ?? \"\"} `);\n return [key, value];\n }\n })}\n }\n\n // Represents a fqn of the action\n export interface Signatures {\n ${getDescriptionIfPresent(action.description)}\n applyAction<OP extends ApplyActionOptions>(args: ${action.paramsIdentifier}, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;\n \n batchApplyAction<OP extends ApplyBatchActionOptions>(args: ReadonlyArray<${action.paramsIdentifier}>, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;\n }\n \n }\n\n \n ${jsDocBlock.join(\"\\n\")}\n */\n export interface ${action.shortApiName} extends ActionDefinition<${action.shortApiName}.Signatures> {\n __DefinitionMetadata?: {\n ${stringify(fullActionDef, {\n \"parameters\": () => action.definitionParamsIdentifier\n })}\n \n signatures: ${action.shortApiName}.Signatures;\n },\n ${stringify(fullActionDef, {\n \"description\": () => undefined,\n \"displayName\": () => undefined,\n \"modifiedEntities\": () => undefined,\n \"parameters\": () => undefined,\n \"rid\": () => undefined,\n \"status\": () => undefined\n })}\n osdkMetadata: typeof $osdkMetadata;\n }\n `;\n }\n function createV2Object() {\n return ` export const ${action.shortApiName}: ${action.shortApiName} = \n {\n ${stringify(fullActionDef, {\n \"description\": () => undefined,\n \"displayName\": () => undefined,\n \"modifiedEntities\": () => undefined,\n \"parameters\": () => undefined,\n \"rid\": () => undefined,\n \"status\": () => undefined\n })},\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 === \"interfaceObject\") {\n if (p.dataType.interfaceTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireInterfaceType(p.dataType.interfaceTypeApiName));\n }\n }\n if (p.dataType.type === \"array\") {\n if (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 if (p.dataType.subType.type === \"interfaceObject\") {\n if (p.dataType.subType.interfaceTypeApiName) {\n referencedObjectDefs.add(enhancedOntology.requireInterfaceType(p.dataType.subType.interfaceTypeApiName));\n }\n }\n }\n }\n const imports = getObjectImports(referencedObjectDefs, undefined, currentFilePath, true);\n await fs.writeFile(path.join(rootOutDir, currentFilePath), await formatTs(`\n import type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n import { $osdkMetadata} 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 default:\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 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, rawPropertyMetadata, {\n isInherited,\n apiName\n}) {\n const ret = [];\n const renderDisplayName = property.displayName && property.displayName !== apiName;\n const status = rawPropertyMetadata?.status;\n if (isInherited || renderDisplayName || property.description || status) {\n if (status) {\n let deprecationStatus = \"\";\n if (status.type === \"deprecated\") {\n deprecationStatus += ` * @deprecated\\n`;\n deprecationStatus += ` * - ${status.message}\\n`;\n if (status.deadline) {\n deprecationStatus += ` * - deadline: ${status.deadline}\\n`;\n }\n if (status.replacedBy) {\n deprecationStatus += ` * - replaced by: ${status.replacedBy}\\n`;\n }\n ret.push(deprecationStatus);\n } else if (status.type === \"experimental\") {\n ret.push(` * @${status.type}\\n`);\n }\n ret.push(` * property status: ${status.type}\\n`);\n }\n if (isInherited) {\n ret.push(` * (inherited from parent)\\n`);\n }\n if (renderDisplayName) {\n ret.push(` * display name: '${property.displayName}'${property.description ? \",\" : \"\"}\\n`);\n }\n if (property.description) {\n ret.push(` * description: ${property.description}\\n`);\n }\n } else {\n ret.push(` * (no ontology metadata)\\n`);\n }\n return `/**\\n` + ret.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 { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport consola from \"consola\";\nimport { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { EnhancedObjectType } from \"../GenerateContext/EnhancedObjectType.js\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.js\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { propertyJsdoc } from \"../shared/propertyJsdoc.js\";\nimport { stringify } from \"../util/stringify.js\";\n/** @internal */\nexport function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {\n ontology,\n forInternalUse\n}, currentFilePath) {\n const object = ontology.requireObjectType(wireObject.objectType.apiName, true);\n if (object instanceof ForeignType) {\n throw new Error(\"Should not be generating types for an external type\");\n }\n const uniqueLinkTargetTypes = new Set(wireObject.linkTypes.map(a => ontology.requireObjectType(a.objectTypeApiName, false)));\n const definition = wireObjectTypeFullMetadataToSdkObjectMetadata(object.raw, true, consola);\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,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier\n };\n function getV2Types(object, forInternalUse = false) {\n return `import type {\n PropertyKeys as $PropertyKeys, \n ObjectTypeDefinition as $ObjectTypeDefinition,\n ObjectMetadata as $ObjectMetadata,\n } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n import type {\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n OsdkObject as $OsdkObject,\n PropertyValueWireToClient as $PropType,\n SingleLinkAccessor as $SingleLinkAccessor,\n } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n\n\n export namespace ${object.shortApiName} {\n\n ${createPropertyKeys(object)}\n\n\n ${createLinks(ontology, object, \"Links\")}\n\n ${createProps(object, \"Props\", false, ontology.raw.valueTypes)}\n ${createProps(object, \"StrictProps\", true, ontology.raw.valueTypes)}\n\n ${createObjectSet(object, identifiers)}\n \n ${createOsdkObject(object, \"OsdkInstance\", identifiers)}\n } \n\n\n\n ${createDefinition(object, ontology, object.shortApiName, identifiers)}\n `;\n }\n const imports = getObjectImports(uniqueLinkTargetTypes, definition.apiName, currentFilePath, true);\n return `${imports}${getV2Types(object, forInternalUse)}\n\n export const ${object.shortApiName}\n = {\n type: \"${object instanceof EnhancedObjectType ? \"object\" : \"interface\"}\",\n apiName: \"${object.fullApiName}\",\n osdkMetadata: $osdkMetadata,\n internalDoNotUseMetadata: {\n rid: \"${definition.rid}\",\n },\n } satisfies ${objectDefIdentifier} & { internalDoNotUseMetadata: { rid: string } } as ${objectDefIdentifier};`;\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 | \"$rid\" = never,\n K extends keyof ${osdkObjectPropsIdentifier}= keyof ${osdkObjectPropsIdentifier},\n > \n = $Osdk.Instance<\n ${objectDefIdentifier}, \n OPTIONS,\n K\n >;\n \n\n /** @deprecated use ${identifier} */\n export type OsdkObject<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof ${osdkObjectPropsIdentifier}= keyof ${osdkObjectPropsIdentifier},\n > = ${identifier}<OPTIONS, K>;\n ;\n `;\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{\n\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, valueTypeMetadata) {\n if (identifier === \"StrictProps\") {\n return `export type StrictProps = Props`;\n }\n const definition = type.getCleanedUpDefinition(true);\n const propertyMetadata = type instanceof EnhancedObjectType ? type.raw.objectType.properties : type instanceof EnhancedInterfaceType ? type.raw.properties : undefined;\n return `export interface ${identifier} {\n${stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => {\n const metadata = propertyMetadata ? propertyMetadata[apiName] : undefined;\n return [`${propertyJsdoc(propertyDefinition, metadata, {\n apiName\n })}readonly \"${maybeStripNamespace(type, apiName)}\"`, (typeof propertyDefinition.type === \"object\" ? remapStructType(propertyDefinition.type) : getPropTypeOrValueTypeEnum(propertyDefinition, valueTypeMetadata)) + `${propertyDefinition.multiplicity ? \"[]\" : \"\"}${propertyDefinition.nullable || !strict && !(definition.type === \"object\" && definition.primaryKeyApiName === apiName) ? `| undefined` : \"\"}`];\n }\n })}\n }`;\n}\nexport function createDefinition(object, ontology, identifier, {\n objectDefIdentifier,\n objectSetIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n osdkObjectLinksIdentifier\n}) {\n const definition = object.getCleanedUpDefinition(true);\n const propertyMetadata = object instanceof EnhancedObjectType ? object.raw.objectType.properties : object instanceof EnhancedInterfaceType ? object.raw.properties : undefined;\n return `\n export interface ${identifier} extends ${object instanceof EnhancedObjectType ? `$ObjectTypeDefinition` : `$InterfaceDefinition`} {\n osdkMetadata: typeof $osdkMetadata;\n type: \"${object instanceof EnhancedObjectType ? \"object\" : \"interface\"}\";\n apiName: \"${object.fullApiName}\";\n __DefinitionMetadata?: {\n objectSet: ${objectSetIdentifier};\n props: ${osdkObjectPropsIdentifier};\n linksType: ${osdkObjectLinksIdentifier};\n strictProps: ${osdkObjectStrictPropsIdentifier};\n ${stringify(definition, {\n links: _value => `{\n ${definition.type === \"interface\" ? stringify(definition.links, {\n \"*\": linkDefinition => `$InterfaceMetadata.Link<${linkDefinition.targetType === \"interface\" ? ontology.requireInterfaceType(linkDefinition.targetTypeApiName).getImportedDefinitionIdentifier(true) : ontology.requireObjectType(linkDefinition.targetTypeApiName).getImportedDefinitionIdentifier(true)}, ${linkDefinition.multiplicity}>`\n }) : stringify(definition.links, {\n \"*\": linkDefinition => `$ObjectMetadata.Link<${ontology.requireObjectType(linkDefinition.targetType).getImportedDefinitionIdentifier(true)}, ${linkDefinition.multiplicity}>`\n })}\n }`,\n properties: _value => `{\n ${stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => [`${propertyJsdoc(propertyDefinition, propertyMetadata[apiName], {\n apiName\n })}\"${maybeStripNamespace(object, apiName)}\"`, `$PropertyDef<${JSON.stringify(propertyDefinition.type)}, \"${propertyDefinition.nullable ? \"nullable\" : \"non-nullable\"}\", \"${propertyDefinition.multiplicity ? \"array\" : \"single\"}\">`]\n })}\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} = {};` : `\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}>`}\n `];\n }\n })}\n }\n `}`;\n}\nexport function createPropertyKeys(type) {\n const properties = Object.keys(type.getCleanedUpDefinition(true).properties);\n return `export type PropertyKeys = ${properties.length === 0 ? \"never\" : properties.map(a => maybeStripNamespace(type, a)).map(a => `\"${a}\"`).join(\"|\")};`;\n}\nfunction remapStructType(structType) {\n let output = `{`;\n Object.entries(structType).map(([key, value]) => output += `${key}:$PropType[${JSON.stringify(value)}]|undefined;`);\n output += \"}\";\n return output;\n}\nfunction getPropTypeOrValueTypeEnum(propertyDefinition, valueTypeMetadata) {\n const defaultPropString = `$PropType[${JSON.stringify(propertyDefinition.type)}]`;\n if (!(propertyDefinition.type === \"string\" || propertyDefinition.type === \"boolean\") || !propertyDefinition.valueTypeApiName || valueTypeMetadata[propertyDefinition.valueTypeApiName] == null) {\n return defaultPropString;\n }\n const valueType = valueTypeMetadata[propertyDefinition.valueTypeApiName];\n if (valueType.constraints.length !== 1) {\n throw new Error(`Expected exactly one constraint for value type ${propertyDefinition.valueTypeApiName} but got ${valueType.constraints.length}`);\n }\n let shouldWrapWithParentheses = false;\n let constraint = valueType.constraints[0];\n if (constraint.type === \"array\" && constraint.valueConstraint) {\n constraint = constraint.valueConstraint;\n shouldWrapWithParentheses = true;\n }\n const maybeEnumString = maybeGetEnumString(propertyDefinition, constraint);\n return maybeEnumString ? shouldWrapWithParentheses ? `(${maybeEnumString})` : maybeEnumString : defaultPropString;\n}\nfunction maybeGetEnumString(propertyDefinition, constraint) {\n if (constraint.type !== \"enum\" || constraint.options.length === 0) {\n return undefined;\n }\n if (propertyDefinition.type === \"string\") {\n return constraint.options.map(x => `\"${x}\"`).join(\" | \");\n }\n if (propertyDefinition.type === \"boolean\") {\n return constraint.options.map(value => {\n if (value === true) {\n return true;\n } else if (value === false) {\n return false;\n } else if (value == null) {\n // Always infer nullability from the property definition\n return undefined;\n } else {\n consola.warn(`Unexpected boolean value in enum: ${value}. Ignoring.`);\n }\n }).filter(value => value != null).join(\" | \");\n }\n return undefined;\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 consola from \"consola\";\nimport fastDeepEqual from \"fast-deep-equal\";\nimport invariant from \"tiny-invariant\";\nimport { extractNamespace } from \"../GenerateContext/EnhancedBase.js\";\nimport { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { getObjectImports } from \"../shared/getObjectImports.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, forInternalUse = false, currentFilePath = \"\") {\n const definition = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceDef.raw, v2));\n const uniqueLinkTargetTypes = new Set(definition.links ? Object.values(definition.links).map(a => a.targetType === \"object\" ? ontology.requireObjectType(a.targetTypeApiName) : ontology.requireInterfaceType(a.targetTypeApiName)) : []);\n const objectDefIdentifier = interfaceDef.getDefinitionIdentifier(v2);\n const parents = definition.implements?.map(p => {\n const parent = ontology.requireInterfaceType(p, true);\n if (parent instanceof EnhancedInterfaceType) {\n const it = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(parent.raw, v2, consola));\n return it;\n }\n }) ?? [];\n const mergedProperties = {\n ...definition.properties\n };\n for (const parent of parents) {\n if (parent == null) {\n // came from a foreign type and we cannot merge properties yet\n // so if they weren't listed on the interface its over\n continue;\n }\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 definition.properties = mergedProperties;\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,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier\n };\n if (interfaceDef.apiNamespace) {\n const badProperties = Object.keys(definition.properties).filter(apiName => extractNamespace(apiName)[0] == null);\n if (badProperties.length > 0) {\n throw new Error(`Interfaces with fully qualified api names MUST NOT have any properties with an unqualified api name. Interface: ${interfaceDef.fullApiName}, properties: ${badProperties.join(\", \")}`);\n }\n }\n function getV2Types(forInternalUse = false) {\n return `import type {\n InterfaceDefinition as $InterfaceDefinition,\n InterfaceMetadata as $InterfaceMetadata,\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n \n ${definition.links ? Object.keys(definition.links).length > 0 ? `\n export interface ${osdkObjectLinksIdentifier} {\n${stringify(definition.links, {\n \"*\": definition => {\n const linkTarget = definition.targetType === \"object\" ? ontology.requireObjectType(definition.targetTypeApiName).getImportedDefinitionIdentifier(v2) : ontology.requireInterfaceType(definition.targetTypeApiName).getImportedDefinitionIdentifier(v2);\n return `${definition.multiplicity ? `${linkTarget}.ObjectSet` : `${linkTarget}.ObjectSet`}\n `;\n }\n })}\n }\n ` : `export type ${osdkObjectLinksIdentifier} = {};` : `export type ${osdkObjectLinksIdentifier} = {};`}\n\n export namespace ${interfaceDef.shortApiName} {\n\n ${createPropertyKeys(interfaceDef)}\n\n\n ${createProps(interfaceDef, \"Props\", false, ontology.raw.valueTypes)}\n ${createProps(interfaceDef, \"StrictProps\", true, ontology.raw.valueTypes)}\n\n\n ${createObjectSet(interfaceDef, ids)}\n\n ${createOsdkObject(interfaceDef, \"OsdkInstance\", ids)}\n \n } \n\n ${createDefinition(interfaceDef, ontology, interfaceDef.shortApiName, ids)}\n\n`;\n }\n const imports = getObjectImports(uniqueLinkTargetTypes, definition.apiName, currentFilePath, true);\n definition;\n return `${imports}\n ${v2 ? getV2Types(forInternalUse) : \"\"}\n\n export const ${interfaceDef.shortApiName}: ${interfaceDef.shortApiName} = {\n type: \"interface\",\n apiName: \"${interfaceDef.fullApiName}\",\n osdkMetadata: $osdkMetadata,\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 { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst } from \"./UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js\";\n\n/** @internal */\nexport async function generatePerInterfaceDataFiles({\n fs,\n outDir,\n ontology,\n importExt,\n forInternalUse\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 if (obj instanceof ForeignType) continue;\n const relPath = path.join(\".\", \"ontology\", \"interfaces\", `${obj.shortApiName}.ts`);\n await fs.writeFile(path.join(interfacesDir, `${obj.shortApiName}.ts`), await formatTs(`\n import type { PropertyDef as $PropertyDef } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n import { $osdkMetadata } from \"../../OntologyMetadata${importExt}\";\n ${__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(obj, ontology, true, forInternalUse, relPath)}\n `));\n }\n await fs.writeFile(interfacesDir + \".ts\", await formatTs(`\n ${Object.values(ontology.interfaceTypes).filter(i => i instanceof EnhancedInterfaceType).map(interfaceType => `export {${interfaceType.shortApiName}} from \"./interfaces/${interfaceType.shortApiName}${importExt}\";`).join(\"\\n\")}\n ${Object.keys(ontology.interfaceTypes).length === 0 ? \"export {}\" : \"\"}\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 { EnhancedObjectType } from \"../GenerateContext/EnhancedObjectType.js\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { wireObjectTypeV2ToSdkObjectConstV2 } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\nexport async function generatePerObjectDataFiles(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 if (obj instanceof ForeignType) continue;\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 { PropertyDef as $PropertyDef } from \"${ctx.forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n import { $osdkMetadata } from \"../../OntologyMetadata${importExt}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n ${wireObjectTypeV2ToSdkObjectConstV2(obj.raw, ctx, relPath)}\n `));\n }\n await fs.writeFile(path.join(outDir, \"ontology\", \"objects.ts\"), await formatTs(`\n ${Object.values(ctx.ontology.objectTypes).filter(o => o instanceof EnhancedObjectType).map(objType => `export {${objType.shortApiName}} from \"./objects/${objType.shortApiName}${importExt}\";`).join(\"\\n\")}\n ${Object.keys(ontology.objectTypes).length === 0 ? \"export {};\" : \"\"}\n `));\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getInterfaceTypesFromQueryDataType(dataType, types) {\n switch (dataType.type) {\n case \"array\":\n case \"set\":\n getInterfaceTypesFromQueryDataType(dataType.subType, types);\n return;\n case \"interfaceObject\":\n case \"interfaceObjectSet\":\n types.add(dataType.interfaceTypeApiName);\n return;\n case \"struct\":\n for (const prop of Object.values(dataType.fields)) {\n getInterfaceTypesFromQueryDataType(prop.fieldType, types);\n }\n return;\n case \"union\":\n for (const type of dataType.unionTypes) {\n getInterfaceTypesFromQueryDataType(type, types);\n }\n return;\n case \"entrySet\":\n getInterfaceTypesFromQueryDataType(dataType.keyType, types);\n getInterfaceTypesFromQueryDataType(dataType.valueType, types);\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 \"entrySet\":\n case \"unsupported\":\n case \"object\":\n case \"objectSet\":\n /* complete no-op */\n return;\n default:\n const _ = dataType;\n throw new Error(`Unknown query data type ${dataType.type}`);\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getInterfaceTypesFromQueryDataType } from \"./getInterfaceTypesFromQueryDataType.js\";\nexport function getInterfaceTypeApiNamesFromQuery(query) {\n const types = new Set();\n for (const {\n dataType\n } of Object.values(query.parameters)) {\n getInterfaceTypesFromQueryDataType(dataType, types);\n }\n getInterfaceTypesFromQueryDataType(query.output, types);\n return Array.from(types);\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 \"entrySet\":\n getObjectTypesFromQueryDataType(dataType.keyType, types);\n getObjectTypesFromQueryDataType(dataType.valueType, types);\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 \"entrySet\":\n case \"unsupported\":\n case \"interfaceObject\":\n case \"interfaceObjectSet\":\n /* complete no-op */\n return;\n default:\n const _ = dataType;\n throw new Error(`Unknown query data type ${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\nimport { wireQueryDataTypeToQueryDataTypeDefinition, wireQueryParameterV2ToQueryParameterDefinition as paramToDef, wireQueryTypeV2ToSdkQueryDefinitionNoParams } from \"@osdk/generator-converters\";\nimport path from \"node:path\";\nimport { getInterfaceTypeApiNamesFromQuery } from \"../shared/getInterfaceTypeApiNamesFromQuery.js\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { getObjectTypeApiNamesFromQuery } from \"../shared/getObjectTypeApiNamesFromQuery.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nimport { getDescriptionIfPresent } from \"./getDescriptionIfPresent.js\";\nexport async function generatePerQueryDataFilesV2({\n fs,\n outDir: rootOutDir,\n ontology,\n fixedVersionQueryTypes,\n importExt = \"\",\n forInternalUse = false\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, forInternalUse, fixedVersionQueryTypes);\n }));\n const indexFilePath = `${outDir}.ts`;\n await fs.writeFile(indexFilePath, await formatTs(`\n ${Object.values(ontology.queryTypes).map(query => `export {${query.shortApiName}} 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, forInternalUse, fixedVersionQueryTypes) {\n const relFilePath = path.join(relOutDir, `${query.shortApiName}.ts`);\n const objectTypes = getObjectTypeApiNamesFromQuery(query);\n const interfaceTypes = getInterfaceTypeApiNamesFromQuery(query);\n const interfaceAndObjectTypes = new Set([...objectTypes.map(o => ontology.requireObjectType(o)), ...interfaceTypes.map(o => ontology.requireInterfaceType(o))]);\n const importObjects = getObjectImports(interfaceAndObjectTypes, \"\", relFilePath, true);\n const baseProps = deleteUndefineds(wireQueryTypeV2ToSdkQueryDefinitionNoParams(query.raw));\n const outputBase = deleteUndefineds(wireQueryDataTypeToQueryDataTypeDefinition(query.output));\n const isUsingFixedVersion = fixedVersionQueryTypes.includes(query.fullApiName);\n await fs.writeFile(path.join(outDir, `${query.shortApiName}.ts`), await formatTs(`\n import type { ObjectSpecifier, QueryDefinition, QueryParam, QueryResult, VersionBound} from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n import type { $ExpectedClientVersion } from \"../../OntologyMetadata${importExt}\";\n import { $osdkMetadata} 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<${query.shortApiName}.ReturnType>\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 ${query.output.type === \"struct\" ? `\n export interface ReturnType \n ${getQueryParamType(ontology, paramToDef({\n dataType: query.output\n }), \"Result\")}\n ` : `\n export type ReturnType = ${getQueryParamType(ontology, paramToDef({\n dataType: query.output\n }), \"Result\")}\n `}\n }\n \n \n export interface ${query.shortApiName} extends QueryDefinition<\n ${query.shortApiName}.Signature\n >, VersionBound<$ExpectedClientVersion>{\n __DefinitionMetadata?: {\n ${stringify(baseProps)}\n isFixedVersion: ${isUsingFixedVersion};\n parameters: {\n ${parameterDefsForType(ontology, query)}\n };\n output: {\n ${stringify(outputBase)},\n ${getLineFor__OsdkTargetType(ontology, query.output)}\n };\n signature: ${query.shortApiName}.Signature;\n }, \n ${stringify(baseProps, {\n \"description\": () => undefined,\n \"displayName\": () => undefined,\n \"rid\": () => undefined\n })}, \n osdkMetadata: typeof $osdkMetadata;\n }\n\n\n export const ${query.shortApiName}: ${query.definitionIdentifier} = {\n ${stringify(baseProps, {\n \"description\": () => undefined,\n \"displayName\": () => undefined,\n \"rid\": () => undefined\n })},\n isFixedVersion: ${isUsingFixedVersion},\n osdkMetadata: $osdkMetadata\n };\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}\nexport function getQueryParamType(enhancedOntology, input, type, isMapKey = false) {\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 \"timestamp\":\n inner = `Query${type}.PrimitiveType<${JSON.stringify(input.type)}>`;\n break;\n case \"struct\":\n inner = `{\n ${stringify(input.struct, {\n \"*\": (p, formatter, apiName) => {\n return [`\n ${type === \"Param\" ? \"readonly \" : \"\"}\"${apiName}\"${p.nullable ? \"?\" : \"\"}`, getQueryParamType(enhancedOntology, p, type)];\n }\n })}\n }`;\n break;\n case \"twoDimensionalAggregation\":\n inner = `Query${type}.TwoDimensionalAggregationType<${input.twoDimensionalAggregation.keyType === \"range\" ? `Query${type}.RangeKey<\"${input.twoDimensionalAggregation.keySubtype}\">` : `\"${input.twoDimensionalAggregation.keyType}\"`}, \"${input.twoDimensionalAggregation.valueType}\">`;\n break;\n case \"threeDimensionalAggregation\":\n inner = `Query${type}.ThreeDimensionalAggregationType<${input.threeDimensionalAggregation.keyType === \"range\" ? `Query${type}.RangeKey<\"${input.threeDimensionalAggregation.keySubtype}\">` : `\"${input.threeDimensionalAggregation.keyType}\"`},${input.threeDimensionalAggregation.valueType.keyType === \"range\" ? `Query${type}.RangeKey<\"${input.threeDimensionalAggregation.valueType.keySubtype}\">` : `\"${input.threeDimensionalAggregation.valueType.keyType}\"`}, \n \"${input.threeDimensionalAggregation.valueType.valueType}\">`;\n break;\n case \"object\":\n if (isMapKey) {\n inner = `ObjectSpecifier<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;\n break;\n }\n inner = `Query${type}.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"interface\":\n inner = `Query${type}.InterfaceType<${enhancedOntology.requireInterfaceType(input.interface).getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"objectSet\":\n inner = `Query${type}.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}>`;\n break;\n case \"interfaceObjectSet\":\n inner = `Query${type}.ObjectSetType<${enhancedOntology.requireInterfaceType(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 case \"map\":\n inner = `Partial<Record<${getQueryParamType(enhancedOntology, input.keyType, type, true)}, ${getQueryParamType(enhancedOntology, input.valueType, type)}>>`;\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 path from \"node:path\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\nexport async function generateRootIndexTsFile({\n fs,\n outDir,\n importExt,\n ontologyApiNamespace,\n ontology\n}) {\n await fs.writeFile(path.join(outDir, \"index.ts\"), await formatTs(`export {${helper(ontology.actionTypes)}} from \"./ontology/actions${importExt}\";\n export * as $Actions from \"./ontology/actions${importExt}\";\n export {${helper(ontology.interfaceTypes)}} from \"./ontology/interfaces${importExt}\";\n export * as $Interfaces from \"./ontology/interfaces${importExt}\";\n export {${helper(ontology.objectTypes)}} from \"./ontology/objects${importExt}\";\n export * as $Objects from \"./ontology/objects${importExt}\";\n export {${helper(ontology.queryTypes)}} from \"./ontology/queries${importExt}\";\n export * as $Queries from \"./ontology/queries${importExt}\";\n export { $osdkMetadata } from \"./OntologyMetadata${importExt}\";\n ${ontologyApiNamespace == null ? `export { $ontologyRid } from \"./OntologyMetadata${importExt}\";` : ``}\n `));\n}\nfunction helper(x) {\n return Object.values(x).filter(x => !(x instanceof ForeignType)).map(a => a.shortApiName).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 { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { sanitizeMetadata } from \"../shared/sanitizeMetadata.js\";\nimport { verifyOutDir } from \"../util/verifyOutDir.js\";\nimport { generateOntologyMetadataFile } from \"./generateMetadata.js\";\nimport { generatePerActionDataFiles } from \"./generatePerActionDataFiles.js\";\nimport { generatePerInterfaceDataFiles } from \"./generatePerInterfaceDataFiles.js\";\nimport { generatePerObjectDataFiles } from \"./generatePerObjectDataFiles.js\";\nimport { generatePerQueryDataFilesV2 } from \"./generatePerQueryDataFiles.js\";\nimport { generateRootIndexTsFile } from \"./generateRootIndexTsFile.js\";\nexport async function generateClientSdkVersionTwoPointZero(ontology, userAgent, fs, outDir, packageType = \"commonjs\", externalObjects = new Map(), externalInterfaces = new Map(), externalSpts = new Map(), forInternalUse = false, fixedVersionQueryTypes = []) {\n const importExt = \".js\"; // turns out you can always use the extension\n\n // Structurally, we need to have multiple ontologies read in\n // with one per package.\n\n await verifyOutDir(outDir, fs);\n const sanitizedOntology = sanitizeMetadata(ontology);\n await fs.mkdir(outDir, {\n recursive: true\n });\n const enhancedOntology = enhanceOntology({\n sanitized: sanitizedOntology,\n importExt,\n externalObjects,\n externalInterfaces,\n externalSpts\n });\n const ctx = {\n sanitizedOntology,\n ontology: enhancedOntology,\n importExt,\n fs,\n outDir,\n forInternalUse,\n fixedVersionQueryTypes\n };\n await generateRootIndexTsFile(ctx);\n await generateOntologyMetadataFile(ctx, userAgent);\n await generatePerObjectDataFiles(ctx);\n await generatePerInterfaceDataFiles(ctx);\n await generatePerActionDataFiles(ctx);\n await generatePerQueryDataFilesV2(ctx, true);\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 { generateClientSdkVersionTwoPointZero } from \"./v2.0/generateClientSdkVersionTwoPointZero.js\";\nexport async function generateClientSdkPackage(packageName, packageVersion, sdkVersion, baseOutDir, ontology, minimalFs, dependencyVersions, cliVersion, externalObjects = new Map(), externalInterfaces = new Map()) {\n if (!packageName) throw new Error(\"Package name is required\");\n if (sdkVersion === \"1.1\") {\n throw new Error(\"This generator version does not support generating v1 sdks\");\n }\n for (const packageType of [\"module\", \"commonjs\"]) {\n const outDir = path.join(baseOutDir, \"dist\", packageType);\n await generateClientSdkVersionTwoPointZero(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType, externalObjects, externalInterfaces);\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\"), getPackageJsonContents(packageName, packageVersion, 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({\n osdkApiVersion,\n osdkClientVersion\n}) {\n return {\n devDependencies: {\n \"@osdk/api\": osdkApiVersion\n },\n peerDependencies: {\n \"@osdk/api\": osdkApiVersion,\n \"@osdk/client\": osdkClientVersion\n }\n };\n}\nfunction getExpectedDependenciesFull(dependencyVersions) {\n const {\n typescriptVersion,\n tslibVersion,\n areTheTypesWrongVersion\n } = dependencyVersions;\n const base = getExpectedDependencies(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, 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 },\n scripts: {\n prepack: `tsc -p ${esmPrefix}/tsconfig.json && tsc -p ${commonjsPrefix}/tsconfig.json`,\n check: \"npm exec attw $(npm pack)\"\n },\n ...getExpectedDependenciesFull(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 void (await minimalFs.writeFile(filePath, JSON.stringify(body, undefined, 2) + \"\\n\"));\n}"]}
@@ -18,7 +18,7 @@ import path from "path";
18
18
  import { formatTs } from "../util/test/formatTs.js";
19
19
 
20
20
  // BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.
21
- const ExpectedOsdkVersion = "2.5.0";
21
+ const ExpectedOsdkVersion = "2.6.0";
22
22
  // END: THIS IS GENERATED CODE. DO NOT EDIT.
23
23
 
24
24
  export async function generateOntologyMetadataFile({
@@ -1 +1 @@
1
- {"version":3,"file":"generateMetadata.js","names":["path","formatTs","ExpectedOsdkVersion","generateOntologyMetadataFile","fs","outDir","ontology","ontologyApiNamespace","userAgent","writeFile","join","rid","raw","branch"],"sources":["generateMetadata.ts"],"sourcesContent":["/*\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 type { GenerateContext } from \"../GenerateContext/GenerateContext.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst ExpectedOsdkVersion = \"2.5.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nexport async function generateOntologyMetadataFile(\n { fs, outDir, ontology, ontologyApiNamespace }: GenerateContext,\n userAgent: string,\n): Promise<void> {\n await fs.writeFile(\n path.join(outDir, \"OntologyMetadata.ts\"),\n await formatTs(\n `\n export type $ExpectedClientVersion = \"${ExpectedOsdkVersion}\";\n export const $osdkMetadata = { extraUserAgent: \"${userAgent}\" };\n ${\n ontologyApiNamespace == null\n ? `\n export const $ontologyRid = \"${ontology.ontology.rid}\";\n `\n : \"\"\n }\n ${\n ontology.raw.branch != null\n ? `\n export const $branch = \"${ontology.raw.branch.rid}\";\n `\n : \"\"\n }\n `,\n ),\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,MAAM;AAEvB,SAASC,QAAQ,QAAQ,0BAA0B;;AAEnD;AACA,MAAMC,mBAAmB,GAAG,OAAO;AACnC;;AAEA,OAAO,eAAeC,4BAA4BA,CAChD;EAAEC,EAAE;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAsC,CAAC,EAC/DC,SAAiB,EACF;EACf,MAAMJ,EAAE,CAACK,SAAS,CAChBT,IAAI,CAACU,IAAI,CAACL,MAAM,EAAE,qBAAqB,CAAC,EACxC,MAAMJ,QAAQ,CACZ;AACN,8CAA8CC,mBAAmB;AACjE,wDAAwDM,SAAS;AACjE,QACQD,oBAAoB,IAAI,IAAI,GACxB;AACZ,uCAAuCD,QAAQ,CAACA,QAAQ,CAACK,GAAG;AAC5D,SAAS,GACG,EAAE;AACd,SAEQL,QAAQ,CAACM,GAAG,CAACC,MAAM,IAAI,IAAI,GACvB;AACZ,kCAAkCP,QAAQ,CAACM,GAAG,CAACC,MAAM,CAACF,GAAG;AACzD,SAAS,GACG,EAAE;AACd,OAEI,CACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"generateMetadata.js","names":["path","formatTs","ExpectedOsdkVersion","generateOntologyMetadataFile","fs","outDir","ontology","ontologyApiNamespace","userAgent","writeFile","join","rid","raw","branch"],"sources":["generateMetadata.ts"],"sourcesContent":["/*\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 type { GenerateContext } from \"../GenerateContext/GenerateContext.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst ExpectedOsdkVersion = \"2.6.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nexport async function generateOntologyMetadataFile(\n { fs, outDir, ontology, ontologyApiNamespace }: GenerateContext,\n userAgent: string,\n): Promise<void> {\n await fs.writeFile(\n path.join(outDir, \"OntologyMetadata.ts\"),\n await formatTs(\n `\n export type $ExpectedClientVersion = \"${ExpectedOsdkVersion}\";\n export const $osdkMetadata = { extraUserAgent: \"${userAgent}\" };\n ${\n ontologyApiNamespace == null\n ? `\n export const $ontologyRid = \"${ontology.ontology.rid}\";\n `\n : \"\"\n }\n ${\n ontology.raw.branch != null\n ? `\n export const $branch = \"${ontology.raw.branch.rid}\";\n `\n : \"\"\n }\n `,\n ),\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,MAAM;AAEvB,SAASC,QAAQ,QAAQ,0BAA0B;;AAEnD;AACA,MAAMC,mBAAmB,GAAG,OAAO;AACnC;;AAEA,OAAO,eAAeC,4BAA4BA,CAChD;EAAEC,EAAE;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAsC,CAAC,EAC/DC,SAAiB,EACF;EACf,MAAMJ,EAAE,CAACK,SAAS,CAChBT,IAAI,CAACU,IAAI,CAACL,MAAM,EAAE,qBAAqB,CAAC,EACxC,MAAMJ,QAAQ,CACZ;AACN,8CAA8CC,mBAAmB;AACjE,wDAAwDM,SAAS;AACjE,QACQD,oBAAoB,IAAI,IAAI,GACxB;AACZ,uCAAuCD,QAAQ,CAACA,QAAQ,CAACK,GAAG;AAC5D,SAAS,GACG,EAAE;AACd,SAEQL,QAAQ,CAACM,GAAG,CAACC,MAAM,IAAI,IAAI,GACvB;AACZ,kCAAkCP,QAAQ,CAACM,GAAG,CAACC,MAAM,CAACF,GAAG;AACzD,SAAS,GACG,EAAE;AACd,OAEI,CACF,CAAC;AACH","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/generator",
3
- "version": "2.6.0-beta.1",
3
+ "version": "2.6.0-beta.3",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -29,14 +29,14 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@osdk/foundry.ontologies": "2.30.0",
32
+ "@osdk/foundry.ontologies": "2.35.0",
33
33
  "consola": "^3.4.2",
34
34
  "fast-deep-equal": "^3.1.3",
35
35
  "fetch-retry": "^6.0.0",
36
36
  "prettier": "^3.6.2",
37
37
  "tiny-invariant": "^1.3.3",
38
- "@osdk/api": "~2.6.0-beta.1",
39
- "@osdk/generator-converters": "~2.6.0-beta.1"
38
+ "@osdk/api": "~2.6.0-beta.3",
39
+ "@osdk/generator-converters": "~2.6.0-beta.3"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "^18.19.124",