@osdk/generator 2.3.0-beta.1 → 2.3.0-beta.10
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 +78 -0
- package/build/browser/GenerateContext/EnhancedInterfaceType.js +1 -2
- package/build/browser/GenerateContext/EnhancedInterfaceType.js.map +1 -1
- package/build/browser/GenerateContext/EnhancedObjectType.js +1 -2
- package/build/browser/GenerateContext/EnhancedObjectType.js.map +1 -1
- package/build/browser/shared/propertyJsdoc.js +26 -9
- package/build/browser/shared/propertyJsdoc.js.map +1 -1
- package/build/browser/util/stringify.js +3 -1
- package/build/browser/util/stringify.js.map +1 -1
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +9 -0
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +23 -0
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/build/browser/v2.0/generateMetadata.js +1 -1
- package/build/browser/v2.0/generateMetadata.js.map +1 -1
- package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +5 -4
- package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
- package/build/cjs/index.cjs +53 -28
- package/build/cjs/index.cjs.map +1 -1
- package/build/esm/GenerateContext/EnhancedInterfaceType.js +1 -2
- package/build/esm/GenerateContext/EnhancedInterfaceType.js.map +1 -1
- package/build/esm/GenerateContext/EnhancedObjectType.js +1 -2
- package/build/esm/GenerateContext/EnhancedObjectType.js.map +1 -1
- package/build/esm/shared/propertyJsdoc.js +26 -9
- package/build/esm/shared/propertyJsdoc.js.map +1 -1
- package/build/esm/util/stringify.js +3 -1
- package/build/esm/util/stringify.js.map +1 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +9 -0
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +23 -0
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/build/esm/v2.0/generateMetadata.js +1 -1
- package/build/esm/v2.0/generateMetadata.js.map +1 -1
- package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +5 -4
- package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
- package/build/types/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -1
- package/build/types/GenerateContext/EnhancedObjectType.d.ts.map +1 -1
- package/build/types/shared/propertyJsdoc.d.ts +2 -1
- package/build/types/shared/propertyJsdoc.d.ts.map +1 -1
- package/build/types/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -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.
|
|
21
|
+
const ExpectedOsdkVersion = "2.3.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"],"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.
|
|
1
|
+
{"version":3,"file":"generateMetadata.js","names":["path","formatTs","ExpectedOsdkVersion","generateOntologyMetadataFile","fs","outDir","ontology","ontologyApiNamespace","userAgent","writeFile","join","rid"],"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.3.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 ),\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,OAEI,CACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -20,7 +20,6 @@ import { EnhancedObjectType } from "../GenerateContext/EnhancedObjectType.js";
|
|
|
20
20
|
import { ForeignType } from "../GenerateContext/ForeignType.js";
|
|
21
21
|
import { getObjectImports } from "../shared/getObjectImports.js";
|
|
22
22
|
import { propertyJsdoc } from "../shared/propertyJsdoc.js";
|
|
23
|
-
import { deleteUndefineds } from "../util/deleteUndefineds.js";
|
|
24
23
|
import { stringify } from "../util/stringify.js";
|
|
25
24
|
|
|
26
25
|
/** @internal */
|
|
@@ -33,7 +32,7 @@ export function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {
|
|
|
33
32
|
throw new Error("Should not be generating types for an external type");
|
|
34
33
|
}
|
|
35
34
|
const uniqueLinkTargetTypes = new Set(wireObject.linkTypes.map(a => ontology.requireObjectType(a.objectTypeApiName, false)));
|
|
36
|
-
const definition =
|
|
35
|
+
const definition = wireObjectTypeFullMetadataToSdkObjectMetadata(object.raw, true, consola);
|
|
37
36
|
const objectDefIdentifier = object.getDefinitionIdentifier(true);
|
|
38
37
|
const objectSetIdentifier = `${object.shortApiName}.ObjectSet`;
|
|
39
38
|
const propertyKeysIdentifier = `${object.shortApiName}.PropertyKeys`;
|
|
@@ -151,10 +150,11 @@ export function createProps(type, identifier, strict) {
|
|
|
151
150
|
return `export type StrictProps = Props`;
|
|
152
151
|
}
|
|
153
152
|
const definition = type.getCleanedUpDefinition(true);
|
|
153
|
+
const propertyMetadata = type instanceof EnhancedObjectType ? type.raw.objectType.properties : undefined;
|
|
154
154
|
return `export interface ${identifier} {
|
|
155
155
|
${stringify(definition.properties, {
|
|
156
156
|
"*": (propertyDefinition, _, apiName) => {
|
|
157
|
-
return [`${propertyJsdoc(propertyDefinition, {
|
|
157
|
+
return [`${propertyJsdoc(propertyDefinition, propertyMetadata?.[apiName], {
|
|
158
158
|
apiName
|
|
159
159
|
})}readonly "${maybeStripNamespace(type, apiName)}"`, (typeof propertyDefinition.type === "object" ? remapStructType(propertyDefinition.type) : `$PropType[${JSON.stringify(propertyDefinition.type)}]`) + `${propertyDefinition.multiplicity ? "[]" : ""}${propertyDefinition.nullable || !strict && !(definition.type === "object" && definition.primaryKeyApiName === apiName) ? `| undefined` : ""}`];
|
|
160
160
|
}
|
|
@@ -169,6 +169,7 @@ export function createDefinition(object, ontology, identifier, {
|
|
|
169
169
|
osdkObjectLinksIdentifier
|
|
170
170
|
}) {
|
|
171
171
|
const definition = object.getCleanedUpDefinition(true);
|
|
172
|
+
const propertyMetadata = object instanceof EnhancedObjectType ? object.raw.objectType.properties : undefined;
|
|
172
173
|
return `
|
|
173
174
|
export interface ${identifier} extends ${object instanceof EnhancedObjectType ? `$ObjectTypeDefinition` : `$InterfaceDefinition`} {
|
|
174
175
|
osdkMetadata: typeof $osdkMetadata;
|
|
@@ -187,7 +188,7 @@ export function createDefinition(object, ontology, identifier, {
|
|
|
187
188
|
}`,
|
|
188
189
|
properties: () => `{
|
|
189
190
|
${stringify(definition.properties, {
|
|
190
|
-
"*": (propertyDefinition, _, apiName) => [`${propertyJsdoc(propertyDefinition, {
|
|
191
|
+
"*": (propertyDefinition, _, apiName) => [`${propertyJsdoc(propertyDefinition, propertyMetadata?.[apiName], {
|
|
191
192
|
apiName
|
|
192
193
|
})}"${maybeStripNamespace(object, apiName)}"`, `$PropertyDef<${JSON.stringify(propertyDefinition.type)}, "${propertyDefinition.nullable ? "nullable" : "non-nullable"}", "${propertyDefinition.multiplicity ? "array" : "single"}">`]
|
|
193
194
|
})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wireObjectTypeV2ToSdkObjectConstV2.js","names":["wireObjectTypeFullMetadataToSdkObjectMetadata","consola","EnhancedObjectType","ForeignType","getObjectImports","propertyJsdoc","deleteUndefineds","stringify","wireObjectTypeV2ToSdkObjectConstV2","wireObject","ontology","forInternalUse","currentFilePath","object","requireObjectType","objectType","apiName","Error","uniqueLinkTargetTypes","Set","linkTypes","map","a","objectTypeApiName","definition","raw","objectDefIdentifier","getDefinitionIdentifier","objectSetIdentifier","shortApiName","propertyKeysIdentifier","osdkObjectPropsIdentifier","osdkObjectStrictPropsIdentifier","osdkObjectLinksIdentifier","osdkObjectIdentifier","identifiers","imports","createPropertyKeys","createLinks","createProps","createObjectSet","createOsdkObject","createDefinition","fullApiName","identifier","getCleanedUpDefinition","maybeStripNamespace","type","q","apiNamespace","startsWith","slice","length","strict","properties","*","propertyDefinition","_","remapStructType","JSON","multiplicity","nullable","primaryKeyApiName","links","targetType","getImportedDefinitionIdentifier","Object","keys","key","linkTarget","join","structType","output","entries","value"],"sources":["wireObjectTypeV2ToSdkObjectConstV2.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 type { ObjectTypeFullMetadata } from \"@osdk/foundry.ontologies\";\nimport { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport consola from \"consola\";\nimport type { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { EnhancedObjectType } from \"../GenerateContext/EnhancedObjectType.js\";\nimport type { EnhancedOntologyDefinition } from \"../GenerateContext/EnhancedOntologyDefinition.js\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.js\";\nimport type { GenerateContext } from \"../GenerateContext/GenerateContext.js\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { propertyJsdoc } from \"../shared/propertyJsdoc.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\n\n/** @internal */\nexport function wireObjectTypeV2ToSdkObjectConstV2(\n wireObject: ObjectTypeFullMetadata,\n { ontology, forInternalUse }: Pick<\n GenerateContext,\n \"ontology\" | \"forInternalUse\"\n >,\n currentFilePath: string,\n) {\n const object = ontology.requireObjectType(\n wireObject.objectType.apiName,\n true,\n );\n if (object instanceof ForeignType) {\n throw new Error(\"Should not be generating types for an external type\");\n }\n const uniqueLinkTargetTypes = new Set(\n wireObject.linkTypes.map(a =>\n ontology.requireObjectType(a.objectTypeApiName, false)\n ),\n );\n\n const definition = deleteUndefineds(\n wireObjectTypeFullMetadataToSdkObjectMetadata(\n object.raw,\n true,\n consola,\n ),\n );\n\n const objectDefIdentifier = object.getDefinitionIdentifier(true);\n\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\n const identifiers: Identifiers = {\n objectDefIdentifier: object.shortApiName,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier,\n };\n\n function getV2Types(\n object: EnhancedObjectType,\n forInternalUse: boolean = false,\n ) {\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)}\n ${createProps(object, \"StrictProps\", true)}\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\n const imports = getObjectImports(\n uniqueLinkTargetTypes,\n definition.apiName,\n currentFilePath,\n true,\n );\n\n return `${imports}${getV2Types(object, forInternalUse)}\n\n export const ${object.shortApiName}: ${objectDefIdentifier}\n = {\n type: \"${object instanceof EnhancedObjectType ? \"object\" : \"interface\"}\",\n apiName: \"${object.fullApiName}\",\n osdkMetadata: $osdkMetadata, \n };`;\n}\n\nexport interface Identifiers extends\n Record<\n | \"osdkObjectIdentifier\"\n | \"propertyKeysIdentifier\"\n | \"osdkObjectPropsIdentifier\"\n | \"objectDefIdentifier\"\n | \"osdkObjectLinksIdentifier\"\n | \"osdkObjectStrictPropsIdentifier\"\n | \"objectSetIdentifier\",\n string\n >\n{}\n\nexport function createOsdkObject(\n object: EnhancedObjectType | EnhancedInterfaceType,\n identifier: string,\n {\n osdkObjectPropsIdentifier,\n objectDefIdentifier,\n osdkObjectStrictPropsIdentifier,\n osdkObjectLinksIdentifier,\n }: Identifiers,\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}\n\nexport function createObjectSet(\n object: EnhancedObjectType | EnhancedInterfaceType,\n {\n objectDefIdentifier,\n objectSetIdentifier,\n propertyKeysIdentifier,\n osdkObjectIdentifier,\n }: Identifiers,\n) {\n return `\nexport interface ObjectSet extends \n$ObjectSet<${objectDefIdentifier},\n\n${objectSetIdentifier}\n>\n{\n\n}\n`;\n}\n\nfunction maybeStripNamespace(\n type: EnhancedInterfaceType | EnhancedObjectType,\n q: string,\n) {\n if (\n type.apiNamespace && q.startsWith(`${type.apiNamespace}.`)\n ) {\n return q.slice(type.apiNamespace.length + 1);\n } else {\n return q;\n }\n}\n\nexport function createProps(\n type: EnhancedInterfaceType | EnhancedObjectType,\n identifier: string,\n strict: boolean,\n): string {\n if (identifier === \"StrictProps\") {\n return `export type StrictProps = Props`;\n }\n const definition = type.getCleanedUpDefinition(true);\n return `export interface ${identifier} {\n${\n stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => {\n return [\n `${propertyJsdoc(propertyDefinition, { apiName })}readonly \"${\n maybeStripNamespace(type, apiName)\n }\"`,\n (typeof propertyDefinition.type === \"object\"\n ? remapStructType(propertyDefinition.type)\n : `$PropType[${JSON.stringify(propertyDefinition.type)}]`)\n + `${propertyDefinition.multiplicity ? \"[]\" : \"\"}${\n propertyDefinition.nullable\n || (!strict\n && !(definition.type === \"object\"\n && definition.primaryKeyApiName === apiName))\n ? `| undefined`\n : \"\"\n }`,\n ] as [string, string];\n },\n })\n }\n }`;\n}\n\nexport function createDefinition(\n object: EnhancedObjectType | EnhancedInterfaceType,\n ontology: EnhancedOntologyDefinition,\n identifier: string,\n {\n objectDefIdentifier,\n objectSetIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n osdkObjectLinksIdentifier,\n }: Identifiers,\n) {\n const definition = object.getCleanedUpDefinition(true);\n return `\n export interface ${identifier} extends ${\n object instanceof EnhancedObjectType\n ? `$ObjectTypeDefinition`\n : `$InterfaceDefinition`\n } {\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 ${\n stringify(definition, {\n links: (_value) =>\n `{\n ${\n stringify(definition.links, {\n \"*\": (definition) =>\n `$ObjectMetadata.Link<${\n ontology.requireObjectType(definition.targetType)\n .getImportedDefinitionIdentifier(true)\n }, ${definition.multiplicity}>`,\n })\n }\n }`,\n properties: (_value) => (`{\n ${\n stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) =>\n [\n `${propertyJsdoc(propertyDefinition, { apiName })}\"${\n maybeStripNamespace(object, apiName)\n }\"`,\n `$PropertyDef<${JSON.stringify(propertyDefinition.type)}, \"${\n propertyDefinition.nullable ? \"nullable\" : \"non-nullable\"\n }\", \"${propertyDefinition.multiplicity ? \"array\" : \"single\"}\">`,\n ] as [string, string],\n })\n }\n }`),\n })\n }\n } \n}\n `;\n}\n\nexport function createLinks(\n ontology: EnhancedOntologyDefinition,\n object: EnhancedObjectType | EnhancedInterfaceType,\n identifier: string,\n) {\n const definition = object.getCleanedUpDefinition(true);\n\n return `\n ${\n Object.keys(definition.links).length === 0\n ? `export type ${identifier} = {};`\n : `\n export interface ${identifier} {\n${\n stringify(definition.links, {\n \"*\": (definition, _, key) => {\n const linkTarget = ontology.requireObjectType(\n definition.targetType,\n )\n .getImportedDefinitionIdentifier(true);\n\n return [\n `readonly ${key}`,\n `${\n definition.multiplicity\n ? `${linkTarget}.ObjectSet`\n : `$SingleLinkAccessor<${linkTarget}>`\n }\n `,\n ];\n },\n })\n }\n }\n `\n }`;\n}\n\nexport function createPropertyKeys(\n type: EnhancedObjectType | EnhancedInterfaceType,\n) {\n const properties = Object.keys(type.getCleanedUpDefinition(true).properties);\n return `export type PropertyKeys = ${\n properties.length === 0\n ? \"never\"\n : properties.map(\n (a) => maybeStripNamespace(type, a),\n ).map(a => `\"${a}\"`).join(\"|\")\n };`;\n}\n\nfunction remapStructType(structType: Record<string, any>): string {\n let output = `{`;\n Object.entries(structType).map(([key, value]) =>\n output += `${key}:$PropType[${JSON.stringify(value)}]|undefined;`\n );\n output += \"}\";\n return output;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,6CAA6C,QAAQ,4BAA4B;AAC1F,OAAOC,OAAO,MAAM,SAAS;AAE7B,SAASC,kBAAkB,QAAQ,0CAA0C;AAE7E,SAASC,WAAW,QAAQ,mCAAmC;AAE/D,SAASC,gBAAgB,QAAQ,+BAA+B;AAChE,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,SAAS,QAAQ,sBAAsB;;AAEhD;AACA,OAAO,SAASC,kCAAkCA,CAChDC,UAAkC,EAClC;EAAEC,QAAQ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ACxD,WACW,CACE;IACH;EACF,CAAC,CAAC;AACV;AACA,KACK,EACD;AACJ;AAEA,OAAO,SAAShC,kBAAkBA,CAChCU,IAAgD,EAChD;EACA,MAAMO,UAAU,GAAGY,MAAM,CAACC,IAAI,CAACpB,IAAI,CAACF,sBAAsB,CAAC,IAAI,CAAC,CAACS,UAAU,CAAC;EAC5E,OAAO,8BACLA,UAAU,CAACF,MAAM,KAAK,CAAC,GACnB,OAAO,GACPE,UAAU,CAACjC,GAAG,CACbC,CAAC,IAAKwB,mBAAmB,CAACC,IAAI,EAAEzB,CAAC,CACpC,CAAC,CAACD,GAAG,CAACC,CAAC,IAAI,IAAIA,CAAC,GAAG,CAAC,CAACgD,IAAI,CAAC,GAAG,CAAC,GAC/B;AACL;AAEA,SAASZ,eAAeA,CAACa,UAA+B,EAAU;EAChE,IAAIC,MAAM,GAAG,GAAG;EAChBN,MAAM,CAACO,OAAO,CAACF,UAAU,CAAC,CAAClD,GAAG,CAAC,CAAC,CAAC+C,GAAG,EAAEM,KAAK,CAAC,KAC1CF,MAAM,IAAI,GAAGJ,GAAG,cAAcT,IAAI,CAACpD,SAAS,CAACmE,KAAK,CAAC,cACrD,CAAC;EACDF,MAAM,IAAI,GAAG;EACb,OAAOA,MAAM;AACf","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"wireObjectTypeV2ToSdkObjectConstV2.js","names":["wireObjectTypeFullMetadataToSdkObjectMetadata","consola","EnhancedObjectType","ForeignType","getObjectImports","propertyJsdoc","stringify","wireObjectTypeV2ToSdkObjectConstV2","wireObject","ontology","forInternalUse","currentFilePath","object","requireObjectType","objectType","apiName","Error","uniqueLinkTargetTypes","Set","linkTypes","map","a","objectTypeApiName","definition","raw","objectDefIdentifier","getDefinitionIdentifier","objectSetIdentifier","shortApiName","propertyKeysIdentifier","osdkObjectPropsIdentifier","osdkObjectStrictPropsIdentifier","osdkObjectLinksIdentifier","osdkObjectIdentifier","identifiers","imports","createPropertyKeys","createLinks","createProps","createObjectSet","createOsdkObject","createDefinition","fullApiName","identifier","getCleanedUpDefinition","maybeStripNamespace","type","q","apiNamespace","startsWith","slice","length","strict","propertyMetadata","properties","undefined","*","propertyDefinition","_","remapStructType","JSON","multiplicity","nullable","primaryKeyApiName","links","targetType","getImportedDefinitionIdentifier","Object","keys","key","linkTarget","join","structType","output","entries","value"],"sources":["wireObjectTypeV2ToSdkObjectConstV2.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 type { ObjectTypeFullMetadata } from \"@osdk/foundry.ontologies\";\nimport { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport consola from \"consola\";\nimport type { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { EnhancedObjectType } from \"../GenerateContext/EnhancedObjectType.js\";\nimport type { EnhancedOntologyDefinition } from \"../GenerateContext/EnhancedOntologyDefinition.js\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.js\";\nimport type { GenerateContext } from \"../GenerateContext/GenerateContext.js\";\nimport { getObjectImports } from \"../shared/getObjectImports.js\";\nimport { propertyJsdoc } from \"../shared/propertyJsdoc.js\";\nimport { stringify } from \"../util/stringify.js\";\n\n/** @internal */\nexport function wireObjectTypeV2ToSdkObjectConstV2(\n wireObject: ObjectTypeFullMetadata,\n { ontology, forInternalUse }: Pick<\n GenerateContext,\n \"ontology\" | \"forInternalUse\"\n >,\n currentFilePath: string,\n) {\n const object = ontology.requireObjectType(\n wireObject.objectType.apiName,\n true,\n );\n if (object instanceof ForeignType) {\n throw new Error(\"Should not be generating types for an external type\");\n }\n const uniqueLinkTargetTypes = new Set(\n wireObject.linkTypes.map(a =>\n ontology.requireObjectType(a.objectTypeApiName, false)\n ),\n );\n\n const definition = wireObjectTypeFullMetadataToSdkObjectMetadata(\n object.raw,\n true,\n consola,\n );\n\n const objectDefIdentifier = object.getDefinitionIdentifier(true);\n\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\n const identifiers: Identifiers = {\n objectDefIdentifier: object.shortApiName,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier,\n };\n\n function getV2Types(\n object: EnhancedObjectType,\n forInternalUse: boolean = false,\n ) {\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)}\n ${createProps(object, \"StrictProps\", true)}\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\n const imports = getObjectImports(\n uniqueLinkTargetTypes,\n definition.apiName,\n currentFilePath,\n true,\n );\n\n return `${imports}${getV2Types(object, forInternalUse)}\n\n export const ${object.shortApiName}: ${objectDefIdentifier}\n = {\n type: \"${object instanceof EnhancedObjectType ? \"object\" : \"interface\"}\",\n apiName: \"${object.fullApiName}\",\n osdkMetadata: $osdkMetadata, \n };`;\n}\n\nexport interface Identifiers extends\n Record<\n | \"osdkObjectIdentifier\"\n | \"propertyKeysIdentifier\"\n | \"osdkObjectPropsIdentifier\"\n | \"objectDefIdentifier\"\n | \"osdkObjectLinksIdentifier\"\n | \"osdkObjectStrictPropsIdentifier\"\n | \"objectSetIdentifier\",\n string\n >\n{}\n\nexport function createOsdkObject(\n object: EnhancedObjectType | EnhancedInterfaceType,\n identifier: string,\n {\n osdkObjectPropsIdentifier,\n objectDefIdentifier,\n osdkObjectStrictPropsIdentifier,\n osdkObjectLinksIdentifier,\n }: Identifiers,\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}\n\nexport function createObjectSet(\n object: EnhancedObjectType | EnhancedInterfaceType,\n {\n objectDefIdentifier,\n objectSetIdentifier,\n propertyKeysIdentifier,\n osdkObjectIdentifier,\n }: Identifiers,\n) {\n return `\nexport interface ObjectSet extends \n$ObjectSet<${objectDefIdentifier},\n\n${objectSetIdentifier}\n>\n{\n\n}\n`;\n}\n\nfunction maybeStripNamespace(\n type: EnhancedInterfaceType | EnhancedObjectType,\n q: string,\n) {\n if (\n type.apiNamespace && q.startsWith(`${type.apiNamespace}.`)\n ) {\n return q.slice(type.apiNamespace.length + 1);\n } else {\n return q;\n }\n}\n\nexport function createProps(\n type: EnhancedInterfaceType | EnhancedObjectType,\n identifier: string,\n strict: boolean,\n): string {\n if (identifier === \"StrictProps\") {\n return `export type StrictProps = Props`;\n }\n const definition = type.getCleanedUpDefinition(true);\n const propertyMetadata = type instanceof EnhancedObjectType\n ? type.raw.objectType.properties\n : undefined;\n return `export interface ${identifier} {\n${\n stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) => {\n return [\n `${\n propertyJsdoc(propertyDefinition, propertyMetadata?.[apiName], {\n apiName,\n })\n }readonly \"${maybeStripNamespace(type, apiName)}\"`,\n (typeof propertyDefinition.type === \"object\"\n ? remapStructType(propertyDefinition.type)\n : `$PropType[${JSON.stringify(propertyDefinition.type)}]`)\n + `${propertyDefinition.multiplicity ? \"[]\" : \"\"}${\n propertyDefinition.nullable\n || (!strict\n && !(definition.type === \"object\"\n && definition.primaryKeyApiName === apiName))\n ? `| undefined`\n : \"\"\n }`,\n ] as [string, string];\n },\n })\n }\n }`;\n}\n\nexport function createDefinition(\n object: EnhancedObjectType | EnhancedInterfaceType,\n ontology: EnhancedOntologyDefinition,\n identifier: string,\n {\n objectDefIdentifier,\n objectSetIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n osdkObjectLinksIdentifier,\n }: Identifiers,\n) {\n const definition = object.getCleanedUpDefinition(true);\n const propertyMetadata = object instanceof EnhancedObjectType\n ? object.raw.objectType.properties\n : undefined;\n return `\n export interface ${identifier} extends ${\n object instanceof EnhancedObjectType\n ? `$ObjectTypeDefinition`\n : `$InterfaceDefinition`\n } {\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 ${\n stringify(definition, {\n links: (_value) =>\n `{\n ${\n stringify(definition.links, {\n \"*\": (definition) =>\n `$ObjectMetadata.Link<${\n ontology.requireObjectType(definition.targetType)\n .getImportedDefinitionIdentifier(true)\n }, ${definition.multiplicity}>`,\n })\n }\n }`,\n properties: (_value) => (`{\n ${\n stringify(definition.properties, {\n \"*\": (propertyDefinition, _, apiName) =>\n [\n `${\n propertyJsdoc(propertyDefinition, propertyMetadata?.[apiName], {\n apiName,\n })\n }\"${maybeStripNamespace(object, apiName)}\"`,\n `$PropertyDef<${JSON.stringify(propertyDefinition.type)}, \"${\n propertyDefinition.nullable ? \"nullable\" : \"non-nullable\"\n }\", \"${propertyDefinition.multiplicity ? \"array\" : \"single\"}\">`,\n ] as [string, string],\n })\n }\n }`),\n })\n }\n } \n}\n `;\n}\n\nexport function createLinks(\n ontology: EnhancedOntologyDefinition,\n object: EnhancedObjectType | EnhancedInterfaceType,\n identifier: string,\n) {\n const definition = object.getCleanedUpDefinition(true);\n\n return `\n ${\n Object.keys(definition.links).length === 0\n ? `export type ${identifier} = {};`\n : `\n export interface ${identifier} {\n${\n stringify(definition.links, {\n \"*\": (definition, _, key) => {\n const linkTarget = ontology.requireObjectType(\n definition.targetType,\n )\n .getImportedDefinitionIdentifier(true);\n\n return [\n `readonly ${key}`,\n `${\n definition.multiplicity\n ? `${linkTarget}.ObjectSet`\n : `$SingleLinkAccessor<${linkTarget}>`\n }\n `,\n ];\n },\n })\n }\n }\n `\n }`;\n}\n\nexport function createPropertyKeys(\n type: EnhancedObjectType | EnhancedInterfaceType,\n) {\n const properties = Object.keys(type.getCleanedUpDefinition(true).properties);\n return `export type PropertyKeys = ${\n properties.length === 0\n ? \"never\"\n : properties.map(\n (a) => maybeStripNamespace(type, a),\n ).map(a => `\"${a}\"`).join(\"|\")\n };`;\n}\n\nfunction remapStructType(structType: Record<string, any>): string {\n let output = `{`;\n Object.entries(structType).map(([key, value]) =>\n output += `${key}:$PropType[${JSON.stringify(value)}]|undefined;`\n );\n output += \"}\";\n return output;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,6CAA6C,QAAQ,4BAA4B;AAC1F,OAAOC,OAAO,MAAM,SAAS;AAE7B,SAASC,kBAAkB,QAAQ,0CAA0C;AAE7E,SAASC,WAAW,QAAQ,mCAAmC;AAE/D,SAASC,gBAAgB,QAAQ,+BAA+B;AAChE,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,SAAS,QAAQ,sBAAsB;;AAEhD;AACA,OAAO,SAASC,kCAAkCA,CAChDC,UAAkC,EAClC;EAAEC,QAAQ;EAAEC;AAGZ,CAAC,EACDC,eAAuB,EACvB;EACA,MAAMC,MAAM,GAAGH,QAAQ,CAACI,iBAAiB,CACvCL,UAAU,CAACM,UAAU,CAACC,OAAO,EAC7B,IACF,CAAC;EACD,IAAIH,MAAM,YAAYT,WAAW,EAAE;IACjC,MAAM,IAAIa,KAAK,CAAC,qDAAqD,CAAC;EACxE;EACA,MAAMC,qBAAqB,GAAG,IAAIC,GAAG,CACnCV,UAAU,CAACW,SAAS,CAACC,GAAG,CAACC,CAAC,IACxBZ,QAAQ,CAACI,iBAAiB,CAACQ,CAAC,CAACC,iBAAiB,EAAE,KAAK,CACvD,CACF,CAAC;EAED,MAAMC,UAAU,GAAGvB,6CAA6C,CAC9DY,MAAM,CAACY,GAAG,EACV,IAAI,EACJvB,OACF,CAAC;EAED,MAAMwB,mBAAmB,GAAGb,MAAM,CAACc,uBAAuB,CAAC,IAAI,CAAC;EAEhE,MAAMC,mBAAmB,GAAG,GAAGf,MAAM,CAACgB,YAAY,YAAY;EAC9D,MAAMC,sBAAsB,GAAG,GAAGjB,MAAM,CAACgB,YAAY,eAAe;EACpE;E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AAG,CAAC,CAACkD,IAAI,CAAC,GAAG,CAAC,GAC/B;AACL;AAEA,SAASZ,eAAeA,CAACa,UAA+B,EAAU;EAChE,IAAIC,MAAM,GAAG,GAAG;EAChBN,MAAM,CAACO,OAAO,CAACF,UAAU,CAAC,CAACpD,GAAG,CAAC,CAAC,CAACiD,GAAG,EAAEM,KAAK,CAAC,KAC1CF,MAAM,IAAI,GAAGJ,GAAG,cAAcT,IAAI,CAACtD,SAAS,CAACqE,KAAK,CAAC,cACrD,CAAC;EACDF,MAAM,IAAI,GAAG;EACb,OAAOA,MAAM;AACf","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,yBAAyB,WAAY;AACnD,cAAc,qBAAqB,0BAA2B;
|
|
1
|
+
{"mappings":"AAgBA,cAAc,yBAAyB,WAAY;AACnD,cAAc,qBAAqB,0BAA2B;AAE9D,cAAc,qBAAqB,oBAAqB;AACxD,SAAS,oBAAoB,mBAAoB;AAEjD,OAAO,cAAM,8BAA8B,aAAa,eAAe;CAClC,KAAY;CAA/C,YAAYA,QAAQ,eAAsBC,KAAK;CAI/C,wBAAwBC;CAIxB,gCAAgCA;CAIhC,IAAI,cAAc,cAAc;CAIhC,uBAAuBA,cAAc;AAMtC","names":["common: EnhanceCommon","raw: InterfaceType","v2: boolean"],"sources":["../../../src/GenerateContext/EnhancedInterfaceType.ts"],"version":3,"file":"EnhancedInterfaceType.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,sBAAsB,WAAY;AAChD,cAAc,8BAA8B,0BAA2B;
|
|
1
|
+
{"mappings":"AAgBA,cAAc,sBAAsB,WAAY;AAChD,cAAc,8BAA8B,0BAA2B;AAEvE,cAAc,qBAAqB,oBAAqB;AACxD,SAAS,oBAAoB,mBAAoB;AAEjD,OAAO,cAAM,2BAA2B,aAAa,wBAAwB;CACxC,KAAY;CAA/C,YAAYA,QAAQ,eAAsBC,KAAK;CAI/C,wBAAwBC;CAIxB,gCAAgCA;CAIhC,uBAAuBA,cAAc;AAMtC","names":["common: EnhanceCommon","raw: ObjectTypeFullMetadata","v2: boolean"],"sources":["../../../src/GenerateContext/EnhancedObjectType.ts"],"version":3,"file":"EnhancedObjectType.d.ts"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ObjectMetadata } from "@osdk/api";
|
|
2
|
-
|
|
2
|
+
import type { PropertyV2 } from "@osdk/foundry.ontologies";
|
|
3
|
+
export declare function propertyJsdoc(property: ObjectMetadata.Property, rawPropertyMetadata: PropertyV2 | undefined, { isInherited, apiName }: {
|
|
3
4
|
isInherited?: boolean
|
|
4
5
|
apiName: string
|
|
5
6
|
}): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,sBAAsB,WAAY;
|
|
1
|
+
{"mappings":"AAgBA,cAAc,sBAAsB,WAAY;AAChD,cAAc,kBAAkB,0BAA2B;AAE3D,OAAO,iBAAS,cACdA,UAAU,eAAe,UACzBC,qBAAqB,wBACrB,EAAE,aAAa,SAAqD,EAA1C;CAAE;CAAuB;AAAiB","names":["property: ObjectMetadata.Property","rawPropertyMetadata: PropertyV2 | undefined"],"sources":["../../../src/shared/propertyJsdoc.ts"],"version":3,"file":"propertyJsdoc.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAmBA,cAAc,6BAA6B,6CAA8C;AACzF,SAAS,0BAA0B,0CAA2C;AAC9E,cAAc,kCAAkC,kDAAmD;
|
|
1
|
+
{"mappings":"AAmBA,cAAc,6BAA6B,6CAA8C;AACzF,SAAS,0BAA0B,0CAA2C;AAC9E,cAAc,kCAAkC,kDAAmD;AA+GnG,iBAAiB,oBACf,OACI,yBACA,2BACA,8BACA,wBACA,8BACA,oCACA,+BAGN,CAAE;AAEF,OAAO,iBAAS,iBACdA,QAAQ,qBAAqB,uBAC7BC,oBACA,EACE,2BACA,qBACA,iCACA,2BACY,EAAX;AAwBL,OAAO,iBAAS,gBACdD,QAAQ,qBAAqB,uBAC7B,EACE,qBACA,qBACA,wBACA,sBACY,EAAX;AA2BL,OAAO,iBAAS,YACdE,MAAM,wBAAwB,oBAC9BD,oBACAE;AAqCF,OAAO,iBAAS,iBACdH,QAAQ,qBAAqB,uBAC7BI,UAAU,4BACVH,oBACA,EACE,qBACA,qBACA,2BACA,iCACA,2BACY,EAAX;AA0DL,OAAO,iBAAS,YACdG,UAAU,4BACVJ,QAAQ,qBAAqB,uBAC7BC;AAmCF,OAAO,iBAAS,mBACdI,MAAM,qBAAqB","names":["object: EnhancedObjectType | EnhancedInterfaceType","identifier: string","type: EnhancedInterfaceType | EnhancedObjectType","strict: boolean","ontology: EnhancedOntologyDefinition","type: EnhancedObjectType | EnhancedInterfaceType"],"sources":["../../../src/v2.0/wireObjectTypeV2ToSdkObjectConstV2.ts"],"version":3,"file":"wireObjectTypeV2ToSdkObjectConstV2.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/generator",
|
|
3
|
-
"version": "2.3.0-beta.
|
|
3
|
+
"version": "2.3.0-beta.10",
|
|
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.
|
|
32
|
+
"@osdk/foundry.ontologies": "2.24.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.0.3",
|
|
37
37
|
"tiny-invariant": "^1.3.1",
|
|
38
|
-
"@osdk/api": "~2.3.0-beta.
|
|
39
|
-
"@osdk/generator-converters": "~2.3.0-beta.
|
|
38
|
+
"@osdk/api": "~2.3.0-beta.10",
|
|
39
|
+
"@osdk/generator-converters": "~2.3.0-beta.10"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^18.0.0",
|