@osdk/generator 1.12.0 → 1.12.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 +7 -0
- package/build/browser/index.js +6 -5
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +6 -5
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.cts +1 -4
- package/build/cjs/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +1 -1
- package/build/cjs/shared/generatePerActionDataFiles.d.ts.map +1 -1
- package/build/cjs/shared/sanitizeMetadata.d.cts +1 -9
- package/build/cjs/shared/sanitizeMetadata.d.ts.map +1 -1
- package/build/cjs/shared/wireObjectTypeV2ToSdkObjectConst.d.cts +0 -3
- package/build/cjs/shared/wireObjectTypeV2ToSdkObjectConst.d.ts.map +1 -1
- package/build/esm/index.js +6 -5
- package/build/esm/index.js.map +1 -1
- package/build/esm/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +1 -4
- package/build/esm/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +1 -1
- package/build/esm/shared/generatePerActionDataFiles.d.ts.map +1 -1
- package/build/esm/shared/sanitizeMetadata.d.ts +1 -9
- package/build/esm/shared/sanitizeMetadata.d.ts.map +1 -1
- package/build/esm/shared/wireObjectTypeV2ToSdkObjectConst.d.ts +0 -3
- package/build/esm/shared/wireObjectTypeV2ToSdkObjectConst.d.ts.map +1 -1
- package/package.json +4 -4
package/build/cjs/index.cjs
CHANGED
|
@@ -82,7 +82,7 @@ function isReservedKeyword(name) {
|
|
|
82
82
|
// src/v1.1/wireObjectTypeV2ToV1ObjectInterfaceString.ts
|
|
83
83
|
function wireObjectTypeV2ToObjectInterfaceStringV1(objectTypeWithLinks, importExt = "") {
|
|
84
84
|
const uniqueLinkTargets = new Set(objectTypeWithLinks.linkTypes.map((a) => a.objectTypeApiName).filter((a) => a !== objectTypeWithLinks.objectType.apiName));
|
|
85
|
-
return `import type { OntologyObject, LocalDate, Timestamp, GeoShape, GeoPoint, Attachment, TimeSeries, MultiLink, SingleLink } from "@osdk/legacy-client";
|
|
85
|
+
return `import type { OntologyObject, LocalDate, Timestamp, GeoShape, GeoPoint, Attachment, TimeSeries, MultiLink, SingleLink, StringLong } from "@osdk/legacy-client";
|
|
86
86
|
${Array.from(uniqueLinkTargets).map((linkTarget) => `import type { ${linkTarget} } from "./${linkTarget}${importExt}";`).join("\n")}
|
|
87
87
|
|
|
88
88
|
${getDescriptionIfPresent(objectTypeWithLinks.objectType.description)}
|
|
@@ -138,7 +138,7 @@ function wirePropertyTypeV2ToTypeScriptType(property) {
|
|
|
138
138
|
case "geoshape":
|
|
139
139
|
return "GeoShape";
|
|
140
140
|
case "long":
|
|
141
|
-
return "
|
|
141
|
+
return "StringLong";
|
|
142
142
|
case "short":
|
|
143
143
|
return "number";
|
|
144
144
|
case "timestamp":
|
|
@@ -405,7 +405,7 @@ async function generatePerActionDataFiles(ontology, fs2, outDir, importExt, v2)
|
|
|
405
405
|
|
|
406
406
|
|
|
407
407
|
// Represents the definition of the action
|
|
408
|
-
export interface ${actionDefIdentifier} extends ActionDefinition<"${action.apiName}", ${uniqueApiNamesString}, ${action.apiName}>{
|
|
408
|
+
export interface ${actionDefIdentifier} extends ActionDefinition<"${action.apiName}", ${uniqueApiNamesString}, ${action.apiName}>, VersionBound<$ExpectedClientVersion> {
|
|
409
409
|
${Object.entries(actionDefSansParameters).sort((a, b) => a[0].localeCompare(b[0])).map(([key, value]) => {
|
|
410
410
|
return `${key}: ${JSON.stringify(value)};`;
|
|
411
411
|
}).join("\n")}
|
|
@@ -437,9 +437,10 @@ async function generatePerActionDataFiles(ontology, fs2, outDir, importExt, v2)
|
|
|
437
437
|
}
|
|
438
438
|
const importObjects = referencedObjectDefs.size > 0 ? `import type {${[...referencedObjectDefs].join(",")}} from "../objects${importExt}";` : "";
|
|
439
439
|
await fs2.writeFile(path16__namespace.default.join(outDir, `${action.apiName}.ts`), await formatTs(`
|
|
440
|
-
import type { ActionDefinition, ObjectActionDataType, ObjectSetActionDataType } from "@osdk/api";
|
|
440
|
+
import type { ActionDefinition, ObjectActionDataType, ObjectSetActionDataType, VersionBound} from "@osdk/api";
|
|
441
441
|
import type { ActionSignature, ApplyActionOptions, ApplyBatchActionOptions, OsdkActionParameters,ActionReturnTypeForOptions, NOOP } from '@osdk/client.api';
|
|
442
442
|
import { $osdkMetadata} from "../../OntologyMetadata${importExt}";
|
|
443
|
+
import type { $ExpectedClientVersion } from "../../OntologyMetadata${importExt}";
|
|
443
444
|
${importObjects}
|
|
444
445
|
|
|
445
446
|
|
|
@@ -2058,5 +2059,5 @@ exports.__UNSTABLE_generateClientSdkPackage = generateClientSdkPackage;
|
|
|
2058
2059
|
exports.generateClientSdkVersionOneDotOne = generateClientSdkVersionOneDotOne;
|
|
2059
2060
|
exports.generateClientSdkVersionTwoPointZero = generateClientSdkVersionTwoPointZero;
|
|
2060
2061
|
exports.getExpectedDependencies = getExpectedDependencies;
|
|
2061
|
-
//# sourceMappingURL=
|
|
2062
|
+
//# sourceMappingURL=index.cjs.map
|
|
2062
2063
|
//# sourceMappingURL=index.cjs.map
|