@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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @osdk/generator
2
2
 
3
+ ## 1.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8c76c1a: Adds VersionBound to actions
8
+ - e2ab8db: Fix long aggregations in legacy-client
9
+
3
10
  ## 1.12.0
4
11
 
5
12
  ### Minor Changes
@@ -55,7 +55,7 @@ function isReservedKeyword(name) {
55
55
  // src/v1.1/wireObjectTypeV2ToV1ObjectInterfaceString.ts
56
56
  function wireObjectTypeV2ToObjectInterfaceStringV1(objectTypeWithLinks, importExt = "") {
57
57
  const uniqueLinkTargets = new Set(objectTypeWithLinks.linkTypes.map((a) => a.objectTypeApiName).filter((a) => a !== objectTypeWithLinks.objectType.apiName));
58
- return `import type { OntologyObject, LocalDate, Timestamp, GeoShape, GeoPoint, Attachment, TimeSeries, MultiLink, SingleLink } from "@osdk/legacy-client";
58
+ return `import type { OntologyObject, LocalDate, Timestamp, GeoShape, GeoPoint, Attachment, TimeSeries, MultiLink, SingleLink, StringLong } from "@osdk/legacy-client";
59
59
  ${Array.from(uniqueLinkTargets).map((linkTarget) => `import type { ${linkTarget} } from "./${linkTarget}${importExt}";`).join("\n")}
60
60
 
61
61
  ${getDescriptionIfPresent(objectTypeWithLinks.objectType.description)}
@@ -111,7 +111,7 @@ function wirePropertyTypeV2ToTypeScriptType(property) {
111
111
  case "geoshape":
112
112
  return "GeoShape";
113
113
  case "long":
114
- return "string";
114
+ return "StringLong";
115
115
  case "short":
116
116
  return "number";
117
117
  case "timestamp":
@@ -378,7 +378,7 @@ async function generatePerActionDataFiles(ontology, fs2, outDir, importExt, v2)
378
378
 
379
379
 
380
380
  // Represents the definition of the action
381
- export interface ${actionDefIdentifier} extends ActionDefinition<"${action.apiName}", ${uniqueApiNamesString}, ${action.apiName}>{
381
+ export interface ${actionDefIdentifier} extends ActionDefinition<"${action.apiName}", ${uniqueApiNamesString}, ${action.apiName}>, VersionBound<$ExpectedClientVersion> {
382
382
  ${Object.entries(actionDefSansParameters).sort((a, b) => a[0].localeCompare(b[0])).map(([key, value]) => {
383
383
  return `${key}: ${JSON.stringify(value)};`;
384
384
  }).join("\n")}
@@ -410,9 +410,10 @@ async function generatePerActionDataFiles(ontology, fs2, outDir, importExt, v2)
410
410
  }
411
411
  const importObjects = referencedObjectDefs.size > 0 ? `import type {${[...referencedObjectDefs].join(",")}} from "../objects${importExt}";` : "";
412
412
  await fs2.writeFile(path16__default.join(outDir, `${action.apiName}.ts`), await formatTs(`
413
- import type { ActionDefinition, ObjectActionDataType, ObjectSetActionDataType } from "@osdk/api";
413
+ import type { ActionDefinition, ObjectActionDataType, ObjectSetActionDataType, VersionBound} from "@osdk/api";
414
414
  import type { ActionSignature, ApplyActionOptions, ApplyBatchActionOptions, OsdkActionParameters,ActionReturnTypeForOptions, NOOP } from '@osdk/client.api';
415
415
  import { $osdkMetadata} from "../../OntologyMetadata${importExt}";
416
+ import type { $ExpectedClientVersion } from "../../OntologyMetadata${importExt}";
416
417
  ${importObjects}
417
418
 
418
419
 
@@ -2028,5 +2029,5 @@ async function writeJson(minimalFs, filePath, body) {
2028
2029
  }
2029
2030
 
2030
2031
  export { generateClientSdkPackage as __UNSTABLE_generateClientSdkPackage, generateClientSdkVersionOneDotOne, generateClientSdkVersionTwoPointZero, getExpectedDependencies };
2031
- //# sourceMappingURL=out.js.map
2032
+ //# sourceMappingURL=index.js.map
2032
2033
  //# sourceMappingURL=index.js.map