@osdk/generator 1.0.4 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/build/js/index.cjs +3 -3
- package/build/js/index.cjs.map +1 -1
- package/build/js/index.mjs +3 -3
- package/build/js/index.mjs.map +1 -1
- package/build/types/WireOntologyDefinition.d.ts +0 -6
- package/build/types/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +2 -2
- package/build/types/shared/sanitizeMetadata.d.ts +2 -2
- package/build/types/util/test/TodoWireOntology.d.ts +2 -1
- package/build/types/v2.0/generateClientSdkVersionTwoPointZero.d.ts +2 -2
- package/package.json +5 -5
package/build/js/index.mjs
CHANGED
|
@@ -1492,7 +1492,7 @@ async function generateClientSdkVersionTwoPointZero(ontology, fs, outDir, packag
|
|
|
1492
1492
|
const sanitizedOntology = sanitizeMetadata(ontology);
|
|
1493
1493
|
const objectNames = Object.keys(sanitizedOntology.objectTypes);
|
|
1494
1494
|
const actionNames = Object.keys(sanitizedOntology.actionTypes);
|
|
1495
|
-
const interfaceNames = Object.keys(sanitizedOntology.
|
|
1495
|
+
const interfaceNames = Object.keys(sanitizedOntology.interfaceTypes ?? {});
|
|
1496
1496
|
const importExt = packageType === "module" ? ".js" : "";
|
|
1497
1497
|
await fs.mkdir(outDir, {
|
|
1498
1498
|
recursive: true
|
|
@@ -1578,7 +1578,7 @@ async function generateOntologyInterfaces(fs, outDir, interfaceNames, ontology,
|
|
|
1578
1578
|
recursive: true
|
|
1579
1579
|
});
|
|
1580
1580
|
for (const name of interfaceNames) {
|
|
1581
|
-
const obj = ontology.
|
|
1581
|
+
const obj = ontology.interfaceTypes[name];
|
|
1582
1582
|
await fs.writeFile(path15__default.join(interfacesDir, `${name}.ts`), await formatTs(`
|
|
1583
1583
|
|
|
1584
1584
|
import type { InterfaceDefinition } from "@osdk/api";
|
|
@@ -1587,7 +1587,7 @@ async function generateOntologyInterfaces(fs, outDir, interfaceNames, ontology,
|
|
|
1587
1587
|
`));
|
|
1588
1588
|
}
|
|
1589
1589
|
await fs.writeFile(interfacesDir + ".ts", await formatTs(`
|
|
1590
|
-
${Object.keys(ontology.
|
|
1590
|
+
${Object.keys(ontology.interfaceTypes ?? {}).map((apiName) => `export * from "./interfaces/${apiName}${importExt}";`).join("\n")}
|
|
1591
1591
|
`));
|
|
1592
1592
|
}
|
|
1593
1593
|
|