@osdk/generator 1.12.0-main-20240530094422 → 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.
Files changed (56) hide show
  1. package/CHANGELOG.md +63 -6
  2. package/build/browser/index.js +150 -44
  3. package/build/browser/index.js.map +1 -1
  4. package/build/cjs/index.cjs +152 -44
  5. package/build/cjs/index.cjs.map +1 -1
  6. package/build/cjs/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.cts +1 -3
  7. package/build/cjs/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +1 -1
  8. package/build/cjs/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.cts +2 -0
  9. package/build/cjs/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +1 -0
  10. package/build/cjs/shared/generatePerActionDataFiles.d.ts.map +1 -1
  11. package/build/cjs/shared/propertyJsdoc.d.cts +6 -0
  12. package/build/cjs/shared/propertyJsdoc.d.ts.map +1 -0
  13. package/build/cjs/shared/sanitizeMetadata.d.cts +1 -9
  14. package/build/cjs/shared/sanitizeMetadata.d.ts.map +1 -1
  15. package/build/cjs/shared/wireObjectTypeV2ToSdkObjectConst.d.cts +0 -3
  16. package/build/cjs/shared/wireObjectTypeV2ToSdkObjectConst.d.ts.map +1 -1
  17. package/build/cjs/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.cts +1 -1
  18. package/build/cjs/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.ts.map +1 -1
  19. package/build/cjs/shared/wireQueryTypeV2ToSdkQueryDefinition.d.cts +10 -2
  20. package/build/cjs/shared/wireQueryTypeV2ToSdkQueryDefinition.d.ts.map +1 -1
  21. package/build/cjs/util/stringify.d.cts +3 -3
  22. package/build/cjs/util/stringify.d.ts.map +1 -1
  23. package/build/cjs/util/test/createMockMinimalFiles.d.ts.map +1 -1
  24. package/build/cjs/util/{verifyOutdir.d.cts → verifyOutDir.d.cts} +2 -2
  25. package/build/cjs/util/{verifyOutdir.d.ts.map → verifyOutDir.d.ts.map} +1 -1
  26. package/build/cjs/v1.1/backcompat/generateOntologyRuntimeDistDir.d.ts.map +1 -1
  27. package/build/cjs/v1.1/generatePerQueryDataFiles.d.cts +1 -1
  28. package/build/cjs/v1.1/generatePerQueryDataFiles.d.ts.map +1 -1
  29. package/build/cjs/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +1 -1
  30. package/build/esm/index.js +150 -44
  31. package/build/esm/index.js.map +1 -1
  32. package/build/esm/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +1 -3
  33. package/build/esm/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +1 -1
  34. package/build/esm/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +2 -0
  35. package/build/esm/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +1 -0
  36. package/build/esm/shared/generatePerActionDataFiles.d.ts.map +1 -1
  37. package/build/esm/shared/propertyJsdoc.d.ts +6 -0
  38. package/build/esm/shared/propertyJsdoc.d.ts.map +1 -0
  39. package/build/esm/shared/sanitizeMetadata.d.ts +1 -9
  40. package/build/esm/shared/sanitizeMetadata.d.ts.map +1 -1
  41. package/build/esm/shared/wireObjectTypeV2ToSdkObjectConst.d.ts +0 -3
  42. package/build/esm/shared/wireObjectTypeV2ToSdkObjectConst.d.ts.map +1 -1
  43. package/build/esm/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.ts +1 -1
  44. package/build/esm/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.ts.map +1 -1
  45. package/build/esm/shared/wireQueryTypeV2ToSdkQueryDefinition.d.ts +10 -2
  46. package/build/esm/shared/wireQueryTypeV2ToSdkQueryDefinition.d.ts.map +1 -1
  47. package/build/esm/util/stringify.d.ts +3 -3
  48. package/build/esm/util/stringify.d.ts.map +1 -1
  49. package/build/esm/util/test/createMockMinimalFiles.d.ts.map +1 -1
  50. package/build/esm/util/{verifyOutdir.d.ts → verifyOutDir.d.ts} +2 -2
  51. package/build/esm/util/{verifyOutdir.d.ts.map → verifyOutDir.d.ts.map} +1 -1
  52. package/build/esm/v1.1/backcompat/generateOntologyRuntimeDistDir.d.ts.map +1 -1
  53. package/build/esm/v1.1/generatePerQueryDataFiles.d.ts +1 -1
  54. package/build/esm/v1.1/generatePerQueryDataFiles.d.ts.map +1 -1
  55. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +1 -1
  56. package/package.json +18 -13
@@ -1,4 +1,2 @@
1
- import type { InterfaceType } from "@osdk/gateway/types";
2
- /** @internal */
3
- export declare function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef: InterfaceType, v2?: boolean): string;
1
+ export {};
4
2
  //# sourceMappingURL=UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts","sourceRoot":"","sources":["../../../src/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOzD,gBAAgB;AAChB,wBAAgB,8CAA8C,CAC5D,YAAY,EAAE,aAAa,EAC3B,EAAE,GAAE,OAAe,UAoEpB"}
1
+ {"version":3,"file":"UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts","sourceRoot":"","sources":["../../../src/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts","sourceRoot":"","sources":["../../../src/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"generatePerActionDataFiles.d.ts","sourceRoot":"","sources":["../../../src/shared/generatePerActionDataFiles.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAI3E,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,sBAAsB,EAChC,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,OAAO,iBA0KZ"}
1
+ {"version":3,"file":"generatePerActionDataFiles.d.ts","sourceRoot":"","sources":["../../../src/shared/generatePerActionDataFiles.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAKjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAI3E,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,sBAAsB,EAChC,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,OAAO,iBA2KZ"}
@@ -0,0 +1,6 @@
1
+ import type { ObjectTypePropertyDefinition } from "@osdk/api";
2
+ export declare function propertyJsdoc(property: ObjectTypePropertyDefinition, { isInherited, apiName }: {
3
+ isInherited?: boolean;
4
+ apiName: string;
5
+ }): string;
6
+ //# sourceMappingURL=propertyJsdoc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propertyJsdoc.d.ts","sourceRoot":"","sources":["../../../src/shared/propertyJsdoc.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AAE9D,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,4BAA4B,EACtC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,UAyBrE"}
@@ -1,10 +1,2 @@
1
- import type { WireOntologyDefinition } from "../WireOntologyDefinition.cjs";
2
- /**
3
- * @internal
4
- */
5
- export declare function sanitizeMetadata(ontology: WireOntologyDefinition): WireOntologyDefinition;
6
- /**
7
- * @internal
8
- */
9
- export declare function sanitizeMetadata(ontology: WireOntologyDefinition): WireOntologyDefinition;
1
+ export {};
10
2
  //# sourceMappingURL=sanitizeMetadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sanitizeMetadata.d.ts","sourceRoot":"","sources":["../../../src/shared/sanitizeMetadata.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,sBAAsB,GAC/B,sBAAsB,CAAC;AAC1B;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,sBAAsB,GAC/B,sBAAsB,CAAC"}
1
+ {"version":3,"file":"sanitizeMetadata.d.ts","sourceRoot":"","sources":["../../../src/shared/sanitizeMetadata.ts"],"names":[],"mappings":""}
@@ -1,5 +1,2 @@
1
- import type { ObjectTypeFullMetadata } from "@osdk/gateway/types";
2
1
  export declare function getObjectDefIdentifier(name: string, v2: boolean): string;
3
- /** @internal */
4
- export declare function wireObjectTypeV2ToSdkObjectConst(object: ObjectTypeFullMetadata, importExt: string, v2?: boolean): string;
5
2
  //# sourceMappingURL=wireObjectTypeV2ToSdkObjectConst.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wireObjectTypeV2ToSdkObjectConst.d.ts","sourceRoot":"","sources":["../../../src/shared/wireObjectTypeV2ToSdkObjectConst.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAKlE,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,UAE/D;AAED,gBAAgB;AAChB,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,sBAAsB,EAC9B,SAAS,EAAE,MAAM,EACjB,EAAE,GAAE,OAAe,UAoGpB"}
1
+ {"version":3,"file":"wireObjectTypeV2ToSdkObjectConst.d.ts","sourceRoot":"","sources":["../../../src/shared/wireObjectTypeV2ToSdkObjectConst.ts"],"names":[],"mappings":"AAsBA,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,UAE/D"}
@@ -1,4 +1,4 @@
1
1
  import type { QueryDataTypeDefinition } from "@osdk/api";
2
2
  import type { QueryDataType } from "@osdk/gateway/types";
3
- export declare function wireQueryDataTypeToQueryDataTypeDefinition<K extends string>(input: QueryDataType): QueryDataTypeDefinition<K>;
3
+ export declare function wireQueryDataTypeToQueryDataTypeDefinition<K extends string>(input: QueryDataType): QueryDataTypeDefinition<K, any>;
4
4
  //# sourceMappingURL=wireQueryDataTypeToQueryDataTypeDefinition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wireQueryDataTypeToQueryDataTypeDefinition.d.ts","sourceRoot":"","sources":["../../../src/shared/wireQueryDataTypeToQueryDataTypeDefinition.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,uBAAuB,EAGxB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAIV,aAAa,EAGd,MAAM,qBAAqB,CAAC;AAG7B,wBAAgB,0CAA0C,CAAC,CAAC,SAAS,MAAM,EACzE,KAAK,EAAE,aAAa,GACnB,uBAAuB,CAAC,CAAC,CAAC,CAqG5B"}
1
+ {"version":3,"file":"wireQueryDataTypeToQueryDataTypeDefinition.d.ts","sourceRoot":"","sources":["../../../src/shared/wireQueryDataTypeToQueryDataTypeDefinition.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,uBAAuB,EAGxB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAIV,aAAa,EAGd,MAAM,qBAAqB,CAAC;AAI7B,wBAAgB,0CAA0C,CACxD,CAAC,SAAS,MAAM,EAEhB,KAAK,EAAE,aAAa,GACnB,uBAAuB,CAAC,CAAC,EAAE,GAAG,CAAC,CAuGjC"}
@@ -1,4 +1,12 @@
1
- import type { QueryDefinition } from "@osdk/api";
2
- import type { QueryTypeV2 } from "@osdk/gateway/types";
1
+ import type { QueryDefinition, QueryParameterDefinition } from "@osdk/api";
2
+ import type { QueryParameterV2, QueryTypeV2 } from "@osdk/gateway/types";
3
3
  export declare function wireQueryTypeV2ToSdkQueryDefinition(input: QueryTypeV2): QueryDefinition<any, any>;
4
+ export declare function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input: QueryTypeV2): {
5
+ type: string;
6
+ apiName: string;
7
+ description: string | undefined;
8
+ displayName: string | undefined;
9
+ version: string;
10
+ };
11
+ export declare function wireQueryParameterV2ToQueryParameterDefinition(parameter: QueryParameterV2): QueryParameterDefinition<any>;
4
12
  //# sourceMappingURL=wireQueryTypeV2ToSdkQueryDefinition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wireQueryTypeV2ToSdkQueryDefinition.d.ts","sourceRoot":"","sources":["../../../src/shared/wireQueryTypeV2ToSdkQueryDefinition.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAA4B,MAAM,WAAW,CAAC;AAC3E,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGzE,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,WAAW,GACjB,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,CAc3B"}
1
+ {"version":3,"file":"wireQueryTypeV2ToSdkQueryDefinition.d.ts","sourceRoot":"","sources":["../../../src/shared/wireQueryTypeV2ToSdkQueryDefinition.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAKzE,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,WAAW,GACjB,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,CAc3B;AAED,wBAAgB,2CAA2C,CACzD,KAAK,EAAE,WAAW;;;;;;EASnB;AAED,wBAAgB,8CAA8C,CAC5D,SAAS,EAAE,gBAAgB,GAC1B,wBAAwB,CAAC,GAAG,CAAC,CAK/B"}
@@ -2,9 +2,9 @@
2
2
  * A function for changing the stringified key/value pairs of an object.
3
3
  *
4
4
  * @param value The value of the key/value pair.
5
- * @param defaultValueFormatter The function that would be called if this customizer wasnt used
5
+ * @param defaultValueFormatter The function that would be called if this customizer wasn't used
6
6
  * @param key The key of the key/value pair.
7
- * @param defaultKeyFormatter The function that would be called if this customizer wasnt used
7
+ * @param defaultKeyFormatter The function that would be called if this customizer wasn't used
8
8
  *
9
9
  * @returns A string, a tuple of strings, or undefined.
10
10
  * If a string is returned, it will be used as the value of the key/value pair.
@@ -12,7 +12,7 @@
12
12
  * and the second string will be used as the value of the key/value pair.
13
13
  * If undefined is returned, the pair will be removed
14
14
  */
15
- type Customizer<K, V extends {}> = (value: V, defaultValueFormatter: (value: any) => string, key: K, defaultKeyFormatter: (key: string) => string) => [string, string] | string | undefined;
15
+ type Customizer<K extends string | symbol | number, V extends {}> = (value: V, defaultValueFormatter: (value: any) => string, key: K extends "*" ? string : K, defaultKeyFormatter: (key: string) => string) => [string, string] | string | undefined;
16
16
  export declare function stringify<T extends Record<string, any>>(obj: T, customizer?: {
17
17
  [K in keyof T | "*"]?: Customizer<K, T[K]>;
18
18
  }, separator?: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../../src/util/stringify.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CACjC,KAAK,EAAE,CAAC,EACR,qBAAqB,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,EAC7C,GAAG,EAAE,CAAC,EACN,mBAAmB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACzC,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;AAU3C,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrD,GAAG,EAAE,CAAC,EACN,UAAU,GAAE;KACT,CAAC,IAAI,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CACtC,EACN,SAAS,SAAQ,UA0BlB"}
1
+ {"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../../src/util/stringify.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,EAAE,IAAI,CAClE,KAAK,EAAE,CAAC,EACR,qBAAqB,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,EAC7C,GAAG,EAAE,CAAC,SAAS,GAAG,GAAG,MAAM,GAAG,CAAC,EAC/B,mBAAmB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACzC,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;AAU3C,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACrD,GAAG,EAAE,CAAC,EACN,UAAU,GAAE;KACT,CAAC,IAAI,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CACtC,EACN,SAAS,SAAQ,UA0BlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"createMockMinimalFiles.d.ts","sourceRoot":"","sources":["../../../../src/util/test/createMockMinimalFiles.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjE,wBAAgB,sBAAsB;;;;;;;;;;EA0BrC"}
1
+ {"version":3,"file":"createMockMinimalFiles.d.ts","sourceRoot":"","sources":["../../../../src/util/test/createMockMinimalFiles.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjE,wBAAgB,sBAAsB;;mBAaR,WAAW;;iBAEf,SAAS;;;;;;EAWlC"}
@@ -5,5 +5,5 @@ import type { MinimalFs } from "../MinimalFs.cjs";
5
5
  * Re-generating an ontology on top of itself is not supported and may leave old
6
6
  * files around or refuse to update files with new contents in some cases.
7
7
  */
8
- export declare function verifyOutdir(outDir: string, fs: MinimalFs): Promise<void>;
9
- //# sourceMappingURL=verifyOutdir.d.ts.map
8
+ export declare function verifyOutDir(outDir: string, fs: MinimalFs): Promise<void>;
9
+ //# sourceMappingURL=verifyOutDir.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verifyOutdir.d.ts","sourceRoot":"","sources":["../../../src/util/verifyOutdir.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,iBAgB/D"}
1
+ {"version":3,"file":"verifyOutDir.d.ts","sourceRoot":"","sources":["../../../src/util/verifyOutDir.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,iBAgB/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"generateOntologyRuntimeDistDir.d.ts","sourceRoot":"","sources":["../../../../src/v1.1/backcompat/generateOntologyRuntimeDistDir.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AASpD,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,SAAS,EACb,SAAS,SAAK,iBA8Cf"}
1
+ {"version":3,"file":"generateOntologyRuntimeDistDir.d.ts","sourceRoot":"","sources":["../../../../src/v1.1/backcompat/generateOntologyRuntimeDistDir.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AASpD,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,SAAS,EACb,SAAS,SAAK,iBA6Cf"}
@@ -1,4 +1,4 @@
1
1
  import type { MinimalFs } from "../MinimalFs.cjs";
2
2
  import type { WireOntologyDefinition } from "../WireOntologyDefinition.cjs";
3
- export declare function generatePerQueryDataFiles(ontology: WireOntologyDefinition, fs: MinimalFs, outDir: string, importExt?: string): Promise<void>;
3
+ export declare function generatePerQueryDataFiles(ontology: WireOntologyDefinition, fs: MinimalFs, outDir: string, importExt?: string, v2?: boolean): Promise<void>;
4
4
  //# sourceMappingURL=generatePerQueryDataFiles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generatePerQueryDataFiles.d.ts","sourceRoot":"","sources":["../../../src/v1.1/generatePerQueryDataFiles.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,sBAAsB,EAChC,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,EACd,SAAS,GAAE,MAAW,iBAiCvB"}
1
+ {"version":3,"file":"generatePerQueryDataFiles.d.ts","sourceRoot":"","sources":["../../../src/v1.1/generatePerQueryDataFiles.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAWjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,sBAAsB,EAChC,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,EACd,SAAS,GAAE,MAAW,EACtB,EAAE,GAAE,OAAe,iBAqFpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"generateClientSdkVersionTwoPointZero.d.ts","sourceRoot":"","sources":["../../../src/v2.0/generateClientSdkVersionTwoPointZero.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AASjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAG3E,wBAAsB,oCAAoC,CACxD,QAAQ,EAAE,sBAAsB,EAChC,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,QAAQ,GAAG,UAAuB,iBA4JhD"}
1
+ {"version":3,"file":"generateClientSdkVersionTwoPointZero.d.ts","sourceRoot":"","sources":["../../../src/v2.0/generateClientSdkVersionTwoPointZero.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAUjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAG3E,wBAAsB,oCAAoC,CACxD,QAAQ,EAAE,sBAAsB,EAChC,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,QAAQ,GAAG,UAAuB,iBAgLhD"}
@@ -4,6 +4,8 @@ import path16__default, { join } from 'path';
4
4
  import { format } from 'prettier';
5
5
  import organizeImports from 'prettier-plugin-organize-imports';
6
6
  import { wireObjectTypeFullMetadataToSdkObjectTypeDefinition, __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from '@osdk/generator-converters';
7
+ import fastDeepEqual from 'fast-deep-equal';
8
+ import invariant from 'tiny-invariant';
7
9
 
8
10
  // src/generateClientSdkPackage.ts
9
11
 
@@ -53,7 +55,7 @@ function isReservedKeyword(name) {
53
55
  // src/v1.1/wireObjectTypeV2ToV1ObjectInterfaceString.ts
54
56
  function wireObjectTypeV2ToObjectInterfaceStringV1(objectTypeWithLinks, importExt = "") {
55
57
  const uniqueLinkTargets = new Set(objectTypeWithLinks.linkTypes.map((a) => a.objectTypeApiName).filter((a) => a !== objectTypeWithLinks.objectType.apiName));
56
- 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";
57
59
  ${Array.from(uniqueLinkTargets).map((linkTarget) => `import type { ${linkTarget} } from "./${linkTarget}${importExt}";`).join("\n")}
58
60
 
59
61
  ${getDescriptionIfPresent(objectTypeWithLinks.objectType.description)}
@@ -109,7 +111,7 @@ function wirePropertyTypeV2ToTypeScriptType(property) {
109
111
  case "geoshape":
110
112
  return "GeoShape";
111
113
  case "long":
112
- return "string";
114
+ return "StringLong";
113
115
  case "short":
114
116
  return "number";
115
117
  case "timestamp":
@@ -218,6 +220,38 @@ function createModifiedEntities(addedObjects, modifiedObjects) {
218
220
  }
219
221
  return entities;
220
222
  }
223
+
224
+ // src/shared/propertyJsdoc.ts
225
+ function propertyJsdoc(property, {
226
+ isInherited,
227
+ apiName
228
+ }) {
229
+ let ret = `/**
230
+ `;
231
+ const renderDisplayName = property.displayName && property.displayName !== apiName;
232
+ if (isInherited || renderDisplayName || property.description) {
233
+ if (isInherited) {
234
+ ret += ` * (inherited from parent)
235
+ `;
236
+ }
237
+ if (renderDisplayName) {
238
+ ret += ` * display name: '${property.displayName}'${property.description ? "," : ""}
239
+ `;
240
+ }
241
+ if (property.description) {
242
+ ret += ` * description: ${property.description}
243
+ `;
244
+ }
245
+ } else {
246
+ ret += ` * (no ontology metadata)
247
+ `;
248
+ }
249
+ ret += ` */
250
+ `;
251
+ return ret;
252
+ }
253
+
254
+ // src/shared/wireObjectTypeV2ToSdkObjectConst.ts
221
255
  function getObjectDefIdentifier(name, v2) {
222
256
  return v2 ? name : `${name}Def`;
223
257
  }
@@ -256,7 +290,9 @@ function wireObjectTypeV2ToSdkObjectConst(object, importExt, v2 = false) {
256
290
  }`,
257
291
  properties: (_value) => `{
258
292
  ${stringify(definition.properties, {
259
- "*": (propertyDefinition) => `PropertyDef<"${propertyDefinition.type}", "${propertyDefinition.nullable ? "nullable" : "non-nullable"}", "${propertyDefinition.multiplicity ? "array" : "single"}">`
293
+ "*": (propertyDefinition, _, apiName) => [`${propertyJsdoc(propertyDefinition, {
294
+ apiName
295
+ })}${apiName}`, `PropertyDef<"${propertyDefinition.type}", "${propertyDefinition.nullable ? "nullable" : "non-nullable"}", "${propertyDefinition.multiplicity ? "array" : "single"}">`]
260
296
  })}
261
297
  }`
262
298
  })}
@@ -331,18 +367,18 @@ async function generatePerActionDataFiles(ontology, fs2, outDir, importExt, v2)
331
367
 
332
368
 
333
369
  // Represents the runtime arguments for the action
334
- export type ${paramsIdentifier} = NOOP<OsdkActionParameters<${paramsDefIdentifier}>>;
370
+ export type ${paramsIdentifier} = NOOP<OsdkActionParameters<${paramsDefIdentifier}>> | NOOP<OsdkActionParameters<${paramsDefIdentifier}>>[];
335
371
 
336
372
 
337
373
  // Represents a fqn of the action
338
374
  export interface ${action.apiName} {
339
375
  ${getDescriptionIfPresent(action.description)}
340
- <OP extends ApplyActionOptions>(args: ${paramsIdentifier}, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
376
+ <P extends ${paramsIdentifier}, OP extends P extends NOOP<OsdkActionParameters<${paramsDefIdentifier}>>[]? ApplyBatchActionOptions: ApplyActionOptions>(args: P, options?: OP): Promise<ActionReturnTypeForOptions<OP>>;
341
377
  }
342
378
 
343
379
 
344
380
  // Represents the definition of the action
345
- export interface ${actionDefIdentifier} extends ActionDefinition<"${action.apiName}", ${uniqueApiNamesString}, ${action.apiName}>{
381
+ export interface ${actionDefIdentifier} extends ActionDefinition<"${action.apiName}", ${uniqueApiNamesString}, ${action.apiName}>, VersionBound<$ExpectedClientVersion> {
346
382
  ${Object.entries(actionDefSansParameters).sort((a, b) => a[0].localeCompare(b[0])).map(([key, value]) => {
347
383
  return `${key}: ${JSON.stringify(value)};`;
348
384
  }).join("\n")}
@@ -374,9 +410,10 @@ async function generatePerActionDataFiles(ontology, fs2, outDir, importExt, v2)
374
410
  }
375
411
  const importObjects = referencedObjectDefs.size > 0 ? `import type {${[...referencedObjectDefs].join(",")}} from "../objects${importExt}";` : "";
376
412
  await fs2.writeFile(path16__default.join(outDir, `${action.apiName}.ts`), await formatTs(`
377
- import type { ActionDefinition, ObjectActionDataType, ObjectSetActionDataType } from "@osdk/api";
378
- import type { ActionSignature, ApplyActionOptions, OsdkActionParameters,ActionReturnTypeForOptions, NOOP } from '@osdk/client.api';
413
+ import type { ActionDefinition, ObjectActionDataType, ObjectSetActionDataType, VersionBound} from "@osdk/api";
414
+ import type { ActionSignature, ApplyActionOptions, ApplyBatchActionOptions, OsdkActionParameters,ActionReturnTypeForOptions, NOOP } from '@osdk/client.api';
379
415
  import { $osdkMetadata} from "../../OntologyMetadata${importExt}";
416
+ import type { $ExpectedClientVersion } from "../../OntologyMetadata${importExt}";
380
417
  ${importObjects}
381
418
 
382
419
 
@@ -446,8 +483,8 @@ function camelize(name) {
446
483
  return name.replace(/-./g, (segment) => segment[1].toUpperCase());
447
484
  }
448
485
 
449
- // src/util/verifyOutdir.ts
450
- async function verifyOutdir(outDir, fs2) {
486
+ // src/util/verifyOutDir.ts
487
+ async function verifyOutDir(outDir, fs2) {
451
488
  try {
452
489
  const contents = await fs2.readdir(outDir);
453
490
  if (contents.length !== 0) {
@@ -545,7 +582,7 @@ function reexportConsts(typesToExport) {
545
582
  import { ${typesToExport.map((q) => `${q} as OG_${q}`).join(", ")}} from "@osdk/legacy-client";
546
583
 
547
584
  ${typesToExport.map((q) => `
548
- /** @deprecated submodule imports arent public api **/
585
+ /** @deprecated submodule imports aren't public api **/
549
586
  export const ${q} = OG_${q};
550
587
  `).join("\n\n")}
551
588
  `;
@@ -595,7 +632,7 @@ function reexportTypes(typesToExport, genericArgsLeft = "", genericArgsRight = c
595
632
  import type { ${typesToExport.map((q) => `${q} as OG_${q}`).join(", ")}} from "@osdk/legacy-client";
596
633
 
597
634
  ${typesToExport.map((q) => `
598
- /** @deprecated submodule imports arent public api **/
635
+ /** @deprecated submodule imports aren't public api **/
599
636
  export type ${q}${genericArgsLeft} = OG_${q}${genericArgsRight};
600
637
  `).join("\n\n")}
601
638
  `;
@@ -603,8 +640,7 @@ function reexportTypes(typesToExport, genericArgsLeft = "", genericArgsRight = c
603
640
  var captureInBracketsRegex = /<(.*?)>/;
604
641
  var captureGenericParamNameRegex = /^\s?(.+?)( extends .*?)?( = .*?)?\s?$/;
605
642
  function cleanup(s) {
606
- if (s.length === 0)
607
- return "";
643
+ if (s.length === 0) return "";
608
644
  const genericParameterNames = captureInBracketsRegex.exec(s)?.[1]?.split(",")?.map((a) => {
609
645
  return captureGenericParamNameRegex.exec(a)?.[1] ?? a;
610
646
  });
@@ -906,10 +942,7 @@ async function generateOntologyRuntimeDistDir(outDir, fs2, importExt = "") {
906
942
  await generateBaseTypesDir(runtimeDistDir, fs2, importExt);
907
943
  await generateClientDir(runtimeDistDir, fs2, importExt);
908
944
  await generateFiltersDir(runtimeDistDir, fs2, importExt);
909
- await fs2.writeFile(
910
- path16.join(runtimeDistDir, "index.ts"),
911
- // TRASHFIXME
912
- await formatTs(`
945
+ await fs2.writeFile(path16.join(runtimeDistDir, "index.ts"), await formatTs(`
913
946
  export * from "./aggregations/index${importExt}";
914
947
  export * from "./baseTypes/index${importExt}";
915
948
  ${""}
@@ -919,8 +952,7 @@ async function generateOntologyRuntimeDistDir(outDir, fs2, importExt = "") {
919
952
 
920
953
  export * from "./ontologyProvider/index${importExt}";
921
954
  export * from "./paging/index${importExt}";
922
- `)
923
- );
955
+ `));
924
956
  }
925
957
 
926
958
  // src/v1.1/generateBackCompatDeprecatedExports.ts
@@ -1283,10 +1315,10 @@ function wireQueryDataTypeToQueryDataTypeDefinition(input) {
1283
1315
  case "union":
1284
1316
  const allowNulls = isNullableQueryDataType(input);
1285
1317
  if (allowNulls && input.unionTypes.length === 2) {
1286
- const nonnull = input.unionTypes.find((t) => t.type != null);
1287
- if (nonnull) {
1318
+ const nonNull = input.unionTypes.find((t) => t.type != null);
1319
+ if (nonNull) {
1288
1320
  return {
1289
- ...wireQueryDataTypeToQueryDataTypeDefinition(nonnull),
1321
+ ...wireQueryDataTypeToQueryDataTypeDefinition(nonNull),
1290
1322
  nullable: true
1291
1323
  };
1292
1324
  }
@@ -1311,12 +1343,14 @@ function wireQueryDataTypeToQueryDataTypeDefinition(input) {
1311
1343
  case "twoDimensionalAggregation":
1312
1344
  return {
1313
1345
  type: "twoDimensionalAggregation",
1314
- twoDimensionalAggregation: get2DQueryAggregationProps(input)
1346
+ twoDimensionalAggregation: get2DQueryAggregationProps(input),
1347
+ nullable: false
1315
1348
  };
1316
1349
  case "threeDimensionalAggregation":
1317
1350
  return {
1318
1351
  type: "threeDimensionalAggregation",
1319
- threeDimensionalAggregation: get3DQueryAggregationProps(input)
1352
+ threeDimensionalAggregation: get3DQueryAggregationProps(input),
1353
+ nullable: false
1320
1354
  };
1321
1355
  case "null":
1322
1356
  case "unsupported":
@@ -1375,6 +1409,15 @@ function wireQueryTypeV2ToSdkQueryDefinition(input) {
1375
1409
  output: wireQueryDataTypeToQueryDataTypeDefinition(input.output)
1376
1410
  };
1377
1411
  }
1412
+ function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input) {
1413
+ return {
1414
+ type: "query",
1415
+ apiName: input.apiName,
1416
+ description: input.description,
1417
+ displayName: input.displayName,
1418
+ version: input.version
1419
+ };
1420
+ }
1378
1421
  function wireQueryParameterV2ToQueryParameterDefinition(parameter) {
1379
1422
  return {
1380
1423
  description: parameter.description,
@@ -1383,19 +1426,36 @@ function wireQueryParameterV2ToQueryParameterDefinition(parameter) {
1383
1426
  }
1384
1427
 
1385
1428
  // src/v1.1/generatePerQueryDataFiles.ts
1386
- async function generatePerQueryDataFiles(ontology, fs2, outDir, importExt = "") {
1429
+ async function generatePerQueryDataFiles(ontology, fs2, outDir, importExt = "", v2 = false) {
1387
1430
  await fs2.mkdir(outDir, {
1388
1431
  recursive: true
1389
1432
  });
1390
1433
  await Promise.all(Object.values(ontology.queryTypes).map(async (query) => {
1391
1434
  const objectTypes = getObjectTypesFromQuery(query);
1392
- await fs2.writeFile(path16__default.join(outDir, `${query.apiName}.ts`), await formatTs(`
1393
- import { QueryDefinition } from "@osdk/api";
1394
-
1395
- export const ${query.apiName} = ${JSON.stringify(wireQueryTypeV2ToSdkQueryDefinition(query))} satisfies QueryDefinition<"${query.apiName}", ${objectTypes.length > 0 ? objectTypes.map((apiName) => `"${apiName}"`).join("|") : "never"}>;`));
1435
+ const importObjects = objectTypes.length > 0 ? `import {${[...objectTypes].join(",")}} from "../objects${importExt}";` : "";
1436
+ if (v2) {
1437
+ await fs2.writeFile(path16__default.join(outDir, `${query.apiName}.ts`), await formatTs(`
1438
+ import { QueryDefinition } from "@osdk/api";
1439
+ ${importObjects}
1440
+ export const ${query.apiName} = {
1441
+ ${stringify(deleteUndefineds(wireQueryTypeV2ToSdkQueryDefinitionNoParams(query)))},
1442
+ parameters: {${Object.entries(query.parameters).map(([name, parameter]) => {
1443
+ return `${name} : {${stringify(deleteUndefineds(wireQueryParameterV2ToQueryParameterDefinition(parameter)))},
1444
+ ${parameter.dataType.type === "object" || parameter.dataType.type === "objectSet" ? getOsdkTargetTypeIfPresent(parameter.dataType.objectTypeApiName, v2) : ``}}`;
1445
+ })}},
1446
+ output: {${stringify(deleteUndefineds(wireQueryDataTypeToQueryDataTypeDefinition(query.output)))},
1447
+ ${query.output.type === "object" || query.output.type === "objectSet" ? getOsdkTargetTypeIfPresent(query.output.objectTypeApiName, v2) : ``}}
1448
+ } ${getQueryDefSatisfies(query.apiName, objectTypes)}`));
1449
+ } else {
1450
+ await fs2.writeFile(path16__default.join(outDir, `${query.apiName}.ts`), await formatTs(`
1451
+ import { QueryDefinition } from "@osdk/api";
1452
+
1453
+ export const ${query.apiName} = ${JSON.stringify(wireQueryTypeV2ToSdkQueryDefinition(query))} ${getQueryDefSatisfies(query.apiName, objectTypes)}`));
1454
+ }
1396
1455
  }));
1397
1456
  await fs2.writeFile(path16__default.join(outDir, "index.ts"), await formatTs(`
1398
1457
  ${Object.values(ontology.queryTypes).map((query) => `export * from "./${query.apiName}${importExt}";`).join("\n")}
1458
+ ${Object.keys(ontology.queryTypes).length === 0 ? "export {};" : ""}
1399
1459
  `));
1400
1460
  }
1401
1461
  function getObjectTypesFromQuery(query) {
@@ -1448,6 +1508,14 @@ function getObjectTypesFromDataType(dataType, types) {
1448
1508
  throw new Error(`Cannot find object types from unsupported QueryDataType ${dataType.type}`);
1449
1509
  }
1450
1510
  }
1511
+ function getQueryDefSatisfies(apiName, objectTypes) {
1512
+ return `satisfies QueryDefinition<"${apiName}", ${objectTypes.length > 0 ? objectTypes.map((apiNameObj) => `"${apiNameObj}"`).join("|") : "never"}>;`;
1513
+ }
1514
+ function getOsdkTargetTypeIfPresent(objectTypeApiName, v2) {
1515
+ return `
1516
+ __OsdkTargetType: ${getObjectDefIdentifier(objectTypeApiName, v2)}
1517
+ `;
1518
+ }
1451
1519
  async function generateQueries(ontology, fs2, outDir, importExt = "") {
1452
1520
  const importedObjects = /* @__PURE__ */ new Set();
1453
1521
  const signatures = [];
@@ -1597,7 +1665,7 @@ async function generateClientSdkVersionOneDotOne(ontology, userAgent, fs2, outDi
1597
1665
  const objectsDir = path16.join(outDir, "ontology", "objects");
1598
1666
  const actionsDir = path16.join(outDir, "ontology", "actions");
1599
1667
  const queriesDir = path16.join(outDir, "ontology", "queries");
1600
- await verifyOutdir(outDir, fs2);
1668
+ await verifyOutDir(outDir, fs2);
1601
1669
  await fs2.mkdir(outDir, {
1602
1670
  recursive: true
1603
1671
  });
@@ -1617,9 +1685,37 @@ async function generateClientSdkVersionOneDotOne(ontology, userAgent, fs2, outDi
1617
1685
  await generateIndexFile(fs2, outDir, importExt);
1618
1686
  await generateBackCompatDeprecatedExports(fs2, outDir, importExt);
1619
1687
  }
1620
- function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, v2 = false) {
1688
+ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology, v2 = false) {
1621
1689
  const definition = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceDef, v2));
1622
1690
  const objectDefIdentifier = getObjectDefIdentifier(interfaceDef.apiName, v2);
1691
+ const parents = definition.implements?.map((p) => {
1692
+ !(ontology.interfaceTypes[p] != null) ? process.env.NODE_ENV !== "production" ? invariant(false, `Expected to find a parent interface named ${p} in the ontology and did not.`) : invariant(false) : void 0;
1693
+ const it = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(ontology.interfaceTypes[p], v2));
1694
+ return it;
1695
+ }) ?? [];
1696
+ const mergedProperties = {
1697
+ ...definition.properties
1698
+ };
1699
+ for (const parent of parents) {
1700
+ for (const apiName of Object.keys(parent.properties)) {
1701
+ if (definition.properties[apiName] != null) {
1702
+ !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;
1703
+ } else if (mergedProperties[apiName] != null) {
1704
+ !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;
1705
+ }
1706
+ mergedProperties[apiName] = parent.properties[apiName];
1707
+ }
1708
+ }
1709
+ const ogProperties = definition.properties;
1710
+ definition.properties = mergedProperties;
1711
+ function localPropertyJsdoc(apiName) {
1712
+ const property = definition.properties[apiName];
1713
+ const isInherited = ogProperties[apiName] == null;
1714
+ return propertyJsdoc(property, {
1715
+ isInherited,
1716
+ apiName
1717
+ });
1718
+ }
1623
1719
  function getV2Types() {
1624
1720
  return `
1625
1721
  export interface ${objectDefIdentifier} extends InterfaceDefinition<"${interfaceDef.apiName}", ${interfaceDef.apiName}>, VersionBound<$ExpectedClientVersion> {
@@ -1633,9 +1729,9 @@ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, v2 = false
1633
1729
  "*": (definition2) => `ObjectTypeLinkDefinition<${getObjectDefIdentifier(definition2.targetType, v2)}, ${definition2.multiplicity}>`
1634
1730
  })}
1635
1731
  }`,
1636
- properties: (_value) => `{
1637
- ${stringify(definition.properties, {
1638
- "*": (propertyDefinition) => `PropertyDef<"${propertyDefinition.type}", "${propertyDefinition.nullable ? "nullable" : "non-nullable"}", "${propertyDefinition.multiplicity ? "array" : "single"}">`
1732
+ properties: (properties) => `{
1733
+ ${stringify(properties, {
1734
+ "*": (propertyDefinition, _, key) => [`${localPropertyJsdoc(key)}${key}`, `PropertyDef<"${propertyDefinition.type}", "${propertyDefinition.nullable ? "nullable" : "non-nullable"}", "${propertyDefinition.multiplicity ? "array" : "single"}">`]
1639
1735
  })}
1640
1736
  }`
1641
1737
  })}
@@ -1656,7 +1752,7 @@ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, v2 = false
1656
1752
 
1657
1753
  };`;
1658
1754
  }
1659
- var ExpectedOsdkVersion = "0.19.1";
1755
+ var ExpectedOsdkVersion = "0.20.0";
1660
1756
  async function generateOntologyMetadataFile(ontology, userAgent, fs2, outDir) {
1661
1757
  fs2.writeFile(path16__default.join(outDir, "OntologyMetadata.ts"), await formatTs(`
1662
1758
  import { OntologyMetadata as OM } from "@osdk/api";
@@ -1677,11 +1773,11 @@ async function generateOntologyMetadataFile(ontology, userAgent, fs2, outDir) {
1677
1773
 
1678
1774
  // src/v2.0/generateClientSdkVersionTwoPointZero.ts
1679
1775
  async function generateClientSdkVersionTwoPointZero(ontology, userAgent, fs2, outDir, packageType = "commonjs") {
1680
- await verifyOutdir(outDir, fs2);
1776
+ await verifyOutDir(outDir, fs2);
1681
1777
  const sanitizedOntology = sanitizeMetadata(ontology);
1682
1778
  const objectNames = Object.keys(sanitizedOntology.objectTypes).sort((a, b) => a.localeCompare(b));
1683
1779
  const actionNames = Object.keys(sanitizedOntology.actionTypes).sort((a, b) => a.localeCompare(b));
1684
- Object.keys(sanitizedOntology.queryTypes).sort((a, b) => a.localeCompare(b));
1780
+ const queryNames = Object.keys(sanitizedOntology.queryTypes).sort((a, b) => a.localeCompare(b));
1685
1781
  const interfaceNames = Object.keys(sanitizedOntology.interfaceTypes ?? {}).sort((a, b) => a.localeCompare(b));
1686
1782
  const importExt = packageType === "module" ? ".js" : "";
1687
1783
  await fs2.mkdir(outDir, {
@@ -1692,6 +1788,7 @@ async function generateClientSdkVersionTwoPointZero(ontology, userAgent, fs2, ou
1692
1788
  export * from "./ontology/actions/index${importExt}";
1693
1789
  export * from "./ontology/objects${importExt}";
1694
1790
  export * from "./ontology/interfaces${importExt}";
1791
+ export * from "./ontology/queries/index${importExt}";
1695
1792
  `));
1696
1793
  await generateOntologyMetadataFile(sanitizedOntology, userAgent, fs2, outDir);
1697
1794
  await fs2.writeFile(path16__default.join(outDir, "Ontology.ts"), await formatTs(`
@@ -1699,6 +1796,7 @@ async function generateClientSdkVersionTwoPointZero(ontology, userAgent, fs2, ou
1699
1796
  import * as Actions from "./ontology/actions/index${importExt}";
1700
1797
  import * as Objects from "./ontology/objects${importExt}";
1701
1798
  import * as Interfaces from "./ontology/interfaces${importExt}";
1799
+ import * as Queries from "./ontology/queries/index${importExt}";
1702
1800
  import { OntologyMetadata } from "./OntologyMetadata${importExt}";
1703
1801
 
1704
1802
  export interface Ontology extends OntologyDefinition<${stringUnionFrom2(objectNames)}> {
@@ -1714,7 +1812,9 @@ async function generateClientSdkVersionTwoPointZero(ontology, userAgent, fs2, ou
1714
1812
  }).join(",\n")}
1715
1813
  },
1716
1814
  queries: {
1717
- // TODO
1815
+ ${queryNames.map((queryName) => {
1816
+ return `${queryName}: typeof Queries.${queryName}`;
1817
+ }).join(",\n")}
1718
1818
  },
1719
1819
  interfaces: {
1720
1820
  ${interfaceNames.map((objectName) => {
@@ -1737,7 +1837,9 @@ async function generateClientSdkVersionTwoPointZero(ontology, userAgent, fs2, ou
1737
1837
  }).join(",\n")}
1738
1838
  },
1739
1839
  queries: {
1740
- // TODO
1840
+ ${queryNames.map((queryName) => {
1841
+ return `${queryName}: Queries.${queryName}`;
1842
+ }).join(",\n")}
1741
1843
  },
1742
1844
  interfaces: {
1743
1845
  ${interfaceNames.map((objectName) => {
@@ -1772,6 +1874,11 @@ async function generateClientSdkVersionTwoPointZero(ontology, userAgent, fs2, ou
1772
1874
  ${Object.keys(ontology.objectTypes).sort((a, b) => a.localeCompare(b)).map((apiName) => `export * from "./objects/${apiName}${importExt}";`).join("\n")}
1773
1875
  ${Object.keys(ontology.objectTypes).length === 0 ? "export {};" : ""}
1774
1876
  `));
1877
+ const queriesDir = path16__default.join(outDir, "ontology", "queries");
1878
+ await fs2.mkdir(queriesDir, {
1879
+ recursive: true
1880
+ });
1881
+ await generatePerQueryDataFiles(sanitizedOntology, fs2, queriesDir, importExt, true);
1775
1882
  }
1776
1883
  function stringUnionFrom2(values) {
1777
1884
  if (values.length === 0) {
@@ -1793,7 +1900,7 @@ async function generateOntologyInterfaces(fs2, outDir, interfaceNames, ontology,
1793
1900
  import { $osdkMetadata, $expectedClientVersion } from "../../OntologyMetadata${importExt}";
1794
1901
  import type { $ExpectedClientVersion } from "../../OntologyMetadata${importExt}";
1795
1902
 
1796
- ${__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(obj, true)}
1903
+ ${__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(obj, ontology, true)}
1797
1904
  `));
1798
1905
  }
1799
1906
  await fs2.writeFile(interfacesDir + ".ts", await formatTs(`
@@ -1804,8 +1911,7 @@ async function generateOntologyInterfaces(fs2, outDir, interfaceNames, ontology,
1804
1911
 
1805
1912
  // src/generateClientSdkPackage.ts
1806
1913
  async function generateClientSdkPackage(packageName, packageVersion, sdkVersion, baseOutDir, ontology, minimalFs, dependencyVersions, cliVersion) {
1807
- if (!packageName)
1808
- throw new Error("Package name is require");
1914
+ if (!packageName) throw new Error("Package name is require");
1809
1915
  for (const packageType of ["module", "commonjs"]) {
1810
1916
  const outDir = path16.join(baseOutDir, "dist", packageType);
1811
1917
  await (sdkVersion === "1.1" ? generateClientSdkVersionOneDotOne : sdkVersion === "2.0" ? generateClientSdkVersionTwoPointZero : void 0)(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType);
@@ -1923,5 +2029,5 @@ async function writeJson(minimalFs, filePath, body) {
1923
2029
  }
1924
2030
 
1925
2031
  export { generateClientSdkPackage as __UNSTABLE_generateClientSdkPackage, generateClientSdkVersionOneDotOne, generateClientSdkVersionTwoPointZero, getExpectedDependencies };
1926
- //# sourceMappingURL=out.js.map
2032
+ //# sourceMappingURL=index.js.map
1927
2033
  //# sourceMappingURL=index.js.map