@osdk/generator 2.0.0-beta.14 → 2.0.0-beta.15

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 (22) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts +1 -1
  3. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -1
  4. package/build/browser/GenerateContext/EnhancedObjectType.d.ts +1 -1
  5. package/build/browser/GenerateContext/EnhancedObjectType.d.ts.map +1 -1
  6. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +3 -3
  7. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  8. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +9 -9
  9. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  10. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +1 -1
  11. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
  12. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts +1 -1
  13. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -1
  14. package/build/esm/GenerateContext/EnhancedObjectType.d.ts +1 -1
  15. package/build/esm/GenerateContext/EnhancedObjectType.d.ts.map +1 -1
  16. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +3 -3
  17. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  18. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +9 -9
  19. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  20. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +1 -1
  21. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
  22. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @osdk/generator
2
2
 
3
+ ## 2.0.0-beta.15
4
+
5
+ ### Minor Changes
6
+
7
+ - dc25fb4: Simplified types
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [dc25fb4]
12
+ - @osdk/generator-converters@2.0.0-beta.15
13
+ - @osdk/api@2.0.0-beta.15
14
+
3
15
  ## 2.0.0-beta.14
4
16
 
5
17
  ### Minor Changes
@@ -8,6 +8,6 @@ export declare class EnhancedInterfaceType extends EnhancedBase<InterfaceType> {
8
8
  getDefinitionIdentifier(v2: boolean): string;
9
9
  getImportedDefinitionIdentifier(v2: boolean): string;
10
10
  get properties(): Record<import("@osdk/internal.foundry.core").SharedPropertyTypeApiName, import("@osdk/internal.foundry.core").SharedPropertyType>;
11
- getCleanedUpDefinition(v2: boolean): InterfaceMetadata<any, any>;
11
+ getCleanedUpDefinition(v2: boolean): InterfaceMetadata;
12
12
  }
13
13
  //# sourceMappingURL=EnhancedInterfaceType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedInterfaceType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedInterfaceType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,qBAAsB,SAAQ,YAAY,CAAC,aAAa,CAAC;IAC1B,GAAG,EAAE,aAAa;gBAAhD,MAAM,EAAE,aAAa,EAAS,GAAG,EAAE,aAAa;IAI5D,uBAAuB,CAAC,EAAE,EAAE,OAAO;IAInC,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAI3C,IAAI,UAAU,sIAEb;IAED,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC;CAQjE"}
1
+ {"version":3,"file":"EnhancedInterfaceType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedInterfaceType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,qBAAsB,SAAQ,YAAY,CAAC,aAAa,CAAC;IAC1B,GAAG,EAAE,aAAa;gBAAhD,MAAM,EAAE,aAAa,EAAS,GAAG,EAAE,aAAa;IAI5D,uBAAuB,CAAC,EAAE,EAAE,OAAO;IAInC,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAI3C,IAAI,UAAU,sIAEb;IAED,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,iBAAiB;CAQvD"}
@@ -7,6 +7,6 @@ export declare class EnhancedObjectType extends EnhancedBase<ObjectTypeFullMetad
7
7
  constructor(common: EnhanceCommon, raw: ObjectTypeFullMetadata);
8
8
  getDefinitionIdentifier(v2: boolean): string;
9
9
  getImportedDefinitionIdentifier(v2: boolean): string;
10
- getCleanedUpDefinition(v2: boolean): ObjectMetadata<any>;
10
+ getCleanedUpDefinition(v2: boolean): ObjectMetadata;
11
11
  }
12
12
  //# sourceMappingURL=EnhancedObjectType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EnhancedObjectType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedObjectType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,kBAAmB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IAChC,GAAG,EAAE,sBAAsB;gBAAzD,MAAM,EAAE,aAAa,EAAS,GAAG,EAAE,sBAAsB;IAIrE,uBAAuB,CAAC,EAAE,EAAE,OAAO;IAInC,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAI3C,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC;CAQzD"}
1
+ {"version":3,"file":"EnhancedObjectType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/EnhancedObjectType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,kBAAmB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IAChC,GAAG,EAAE,sBAAsB;gBAAzD,MAAM,EAAE,aAAa,EAAS,GAAG,EAAE,sBAAsB;IAIrE,uBAAuB,CAAC,EAAE,EAAE,OAAO;IAInC,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAI3C,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,cAAc;CAQpD"}
@@ -92,7 +92,7 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
92
92
  > = $Osdk<Bar, K | OPTIONS>;
93
93
  }
94
94
 
95
- export interface Bar extends $InterfaceDefinition<"Bar", Bar> {
95
+ export interface Bar extends $InterfaceDefinition {
96
96
  osdkMetadata: typeof $osdkMetadata;
97
97
  type: "interface";
98
98
  apiName: "Bar";
@@ -159,7 +159,7 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
159
159
  > = $Osdk<Foo, K | OPTIONS>;
160
160
  }
161
161
 
162
- export interface Foo extends $InterfaceDefinition<"Foo", Foo> {
162
+ export interface Foo extends $InterfaceDefinition {
163
163
  osdkMetadata: typeof $osdkMetadata;
164
164
  type: "interface";
165
165
  apiName: "Foo";
@@ -230,7 +230,7 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
230
230
  > = $Osdk<Foo, K | OPTIONS>;
231
231
  }
232
232
 
233
- export interface Foo extends $InterfaceDefinition<"Foo", Foo> {
233
+ export interface Foo extends $InterfaceDefinition {
234
234
  osdkMetadata: typeof $osdkMetadata;
235
235
  type: "interface";
236
236
  apiName: "Foo";
@@ -1 +1 @@
1
- {"version":3,"file":"UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js","names":["format","describe","expect","it","enhanceOntology","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst","simpleSpt","apiName","metadataLevel","dataType","type","rid","displayName","description","undefined","simpleInterface","spts","parents","properties","Object","fromEntries","map","spt","extendsInterfaces","links","simpleOntology","interfaces","interfaceTypes","i","sharedPropertyTypes","flatMap","entries","actionTypes","objectTypes","ontology","queryTypes","Map","formattedCode","Bar","parser","printWidth","toMatchInlineSnapshot","fooSpt","barSpt","Foo"],"sources":["UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { format } from \"prettier\";\nimport { describe, expect, it } from \"vitest\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst } from \"./UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js\";\nfunction simpleSpt(apiName, metadataLevel = 2) {\n return {\n apiName,\n dataType: {\n type: \"integer\",\n },\n rid: `${apiName}Rid`,\n displayName: metadataLevel >= 1 ? `${apiName} property dn` : apiName,\n description: metadataLevel >= 2 ? `${apiName} property desc` : undefined,\n };\n}\nfunction simpleInterface(apiName, spts, parents, metadataLevel = 2) {\n const properties = Object.fromEntries(spts.map(spt => [spt.apiName, spt]));\n return {\n apiName,\n rid: `${apiName}Rid`,\n displayName: metadataLevel >= 1 ? `${apiName} interface dn` : apiName,\n description: metadataLevel >= 2 ? `${apiName} interface desc` : undefined,\n extendsInterfaces: parents,\n links: {},\n properties,\n };\n}\nfunction simpleOntology(apiName, interfaces) {\n const interfaceTypes = Object\n .fromEntries(interfaces.map(i => [i.apiName, i]));\n const sharedPropertyTypes = Object\n .fromEntries(interfaces.flatMap(i => Object.entries(i.properties)));\n return {\n actionTypes: {},\n interfaceTypes,\n objectTypes: {},\n ontology: {\n apiName,\n description: `${apiName} ontology desc`,\n displayName: `${apiName} ontology dn`,\n rid: `${apiName} ontology rid`,\n },\n queryTypes: {},\n sharedPropertyTypes,\n };\n}\ndescribe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {\n it(\"Does not say (inherited) on properties locally defined\", async () => {\n const ontology = enhanceOntology(simpleOntology(\"ontology\", [\n simpleInterface(\"Bar\", [simpleSpt(\"bar\", 0)], [], 0),\n ]), undefined, new Map(), \"\");\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Bar, ontology, true), {\n parser: \"typescript\",\n printWidth: 100,\n });\n expect(formattedCode).toMatchInlineSnapshot(`\n \"import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"@osdk/api\";\n\n export type OsdkObjectLinks$Bar = {};\n\n export namespace Bar {\n export type PropertyKeys = \"bar\";\n\n export interface Props {\n readonly bar: $PropType[\"integer\"] | undefined;\n }\n export interface StrictProps {\n readonly bar: $PropType[\"integer\"] | undefined;\n }\n\n export interface ObjectSet extends $ObjectSet<Bar, Bar.ObjectSet> {}\n\n export type OsdkObject<\n OPTIONS extends never | \"$notStrict\" | \"$rid\" = never,\n K extends keyof Bar.Props = keyof Bar.Props,\n > = $Osdk<Bar, K | OPTIONS>;\n }\n\n export interface Bar extends $InterfaceDefinition<\"Bar\", Bar> {\n osdkMetadata: typeof $osdkMetadata;\n type: \"interface\";\n apiName: \"Bar\";\n __DefinitionMetadata?: {\n objectSet: Bar.ObjectSet;\n props: Bar.Props;\n linksType: OsdkObjectLinks$Bar;\n strictProps: Bar.StrictProps;\n apiName: \"Bar\";\n displayName: \"Bar\";\n implements: [];\n links: {};\n properties: {\n /**\n * (no ontology metadata)\n */\n bar: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n };\n rid: \"BarRid\";\n type: \"interface\";\n };\n }\n\n export const Bar: Bar = {\n type: \"interface\",\n apiName: \"Bar\",\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n it(\"Generates properties for inherited SPTs\", async () => {\n const fooSpt = simpleSpt(\"foo\");\n const barSpt = simpleSpt(\"bar\");\n const ontology = enhanceOntology(simpleOntology(\"ontology\", [\n simpleInterface(\"Foo\", [fooSpt], [\"Parent\"]),\n simpleInterface(\"Parent\", [barSpt], []),\n ]), undefined, new Map(), \"\");\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true), {\n parser: \"typescript\",\n });\n expect(formattedCode).toMatchInlineSnapshot(`\n \"import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"@osdk/api\";\n\n export type OsdkObjectLinks$Foo = {};\n\n export namespace Foo {\n export type PropertyKeys = \"foo\";\n\n export interface Props {\n readonly foo: $PropType[\"integer\"] | undefined;\n }\n export interface StrictProps {\n readonly foo: $PropType[\"integer\"] | undefined;\n }\n\n export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}\n\n export type OsdkObject<\n OPTIONS extends never | \"$notStrict\" | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = $Osdk<Foo, K | OPTIONS>;\n }\n\n export interface Foo extends $InterfaceDefinition<\"Foo\", Foo> {\n osdkMetadata: typeof $osdkMetadata;\n type: \"interface\";\n apiName: \"Foo\";\n __DefinitionMetadata?: {\n objectSet: Foo.ObjectSet;\n props: Foo.Props;\n linksType: OsdkObjectLinks$Foo;\n strictProps: Foo.StrictProps;\n apiName: \"Foo\";\n description: \"Foo interface desc\";\n displayName: \"Foo interface dn\";\n implements: [\"Parent\"];\n links: {};\n properties: {\n /**\n * display name: 'foo property dn',\n * description: foo property desc\n */\n foo: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n };\n rid: \"FooRid\";\n type: \"interface\";\n };\n }\n\n export const Foo: Foo = {\n type: \"interface\",\n apiName: \"Foo\",\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n it(\"allows for SPT reuse if the same\", async () => {\n const fooSpt = simpleSpt(\"foo\");\n const barSpt = simpleSpt(\"bar\");\n const ontology = enhanceOntology(simpleOntology(\"ontology\", [\n simpleInterface(\"Foo\", [fooSpt, barSpt], [\"Parent\"]),\n simpleInterface(\"Parent\", [barSpt], []),\n ]), undefined, new Map(), \"\");\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true), {\n parser: \"typescript\",\n });\n expect(formattedCode).toMatchInlineSnapshot(`\n \"import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"@osdk/api\";\n\n export type OsdkObjectLinks$Foo = {};\n\n export namespace Foo {\n export type PropertyKeys = \"foo\" | \"bar\";\n\n export interface Props {\n readonly bar: $PropType[\"integer\"] | undefined;\n readonly foo: $PropType[\"integer\"] | undefined;\n }\n export interface StrictProps {\n readonly bar: $PropType[\"integer\"] | undefined;\n readonly foo: $PropType[\"integer\"] | undefined;\n }\n\n export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}\n\n export type OsdkObject<\n OPTIONS extends never | \"$notStrict\" | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = $Osdk<Foo, K | OPTIONS>;\n }\n\n export interface Foo extends $InterfaceDefinition<\"Foo\", Foo> {\n osdkMetadata: typeof $osdkMetadata;\n type: \"interface\";\n apiName: \"Foo\";\n __DefinitionMetadata?: {\n objectSet: Foo.ObjectSet;\n props: Foo.Props;\n linksType: OsdkObjectLinks$Foo;\n strictProps: Foo.StrictProps;\n apiName: \"Foo\";\n description: \"Foo interface desc\";\n displayName: \"Foo interface dn\";\n implements: [\"Parent\"];\n links: {};\n properties: {\n /**\n * display name: 'bar property dn',\n * description: bar property desc\n */\n bar: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n /**\n * display name: 'foo property dn',\n * description: foo property desc\n */\n foo: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n };\n rid: \"FooRid\";\n type: \"interface\";\n };\n }\n\n export const Foo: Foo = {\n type: \"interface\",\n apiName: \"Foo\",\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,UAAU;AACjC,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,e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,CAAC,KAAK,EAAE,CAAC2B,MAAM,EAAEC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EACpD5B,eAAe,CAAC,QAAQ,EAAE,CAAC4B,MAAM,CAAC,EAAE,EAAE,CAAC,CAC1C,CAAC,EAAE7B,SAAS,EAAE,IAAIsB,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;IAC7B,MAAMC,aAAa,GAAG,MAAMrC,MAAM,CAACK,8CAA8C,CAAC6B,QAAQ,CAACP,cAAc,CAACiB,GAAG,EAAEV,QAAQ,EAAE,IAAI,CAAC,EAAE;MAC5HK,MAAM,EAAE;IACZ,CAAC,CAAC;IACFrC,MAAM,CAACmC,aAAa,CAAC,CAACI,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js","names":["format","describe","expect","it","enhanceOntology","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst","simpleSpt","apiName","metadataLevel","dataType","type","rid","displayName","description","undefined","simpleInterface","spts","parents","properties","Object","fromEntries","map","spt","extendsInterfaces","links","simpleOntology","interfaces","interfaceTypes","i","sharedPropertyTypes","flatMap","entries","actionTypes","objectTypes","ontology","queryTypes","Map","formattedCode","Bar","parser","printWidth","toMatchInlineSnapshot","fooSpt","barSpt","Foo"],"sources":["UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { format } from \"prettier\";\nimport { describe, expect, it } from \"vitest\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst } from \"./UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js\";\nfunction simpleSpt(apiName, metadataLevel = 2) {\n return {\n apiName,\n dataType: {\n type: \"integer\",\n },\n rid: `${apiName}Rid`,\n displayName: metadataLevel >= 1 ? `${apiName} property dn` : apiName,\n description: metadataLevel >= 2 ? `${apiName} property desc` : undefined,\n };\n}\nfunction simpleInterface(apiName, spts, parents, metadataLevel = 2) {\n const properties = Object.fromEntries(spts.map(spt => [spt.apiName, spt]));\n return {\n apiName,\n rid: `${apiName}Rid`,\n displayName: metadataLevel >= 1 ? `${apiName} interface dn` : apiName,\n description: metadataLevel >= 2 ? `${apiName} interface desc` : undefined,\n extendsInterfaces: parents,\n links: {},\n properties,\n };\n}\nfunction simpleOntology(apiName, interfaces) {\n const interfaceTypes = Object\n .fromEntries(interfaces.map(i => [i.apiName, i]));\n const sharedPropertyTypes = Object\n .fromEntries(interfaces.flatMap(i => Object.entries(i.properties)));\n return {\n actionTypes: {},\n interfaceTypes,\n objectTypes: {},\n ontology: {\n apiName,\n description: `${apiName} ontology desc`,\n displayName: `${apiName} ontology dn`,\n rid: `${apiName} ontology rid`,\n },\n queryTypes: {},\n sharedPropertyTypes,\n };\n}\ndescribe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {\n it(\"Does not say (inherited) on properties locally defined\", async () => {\n const ontology = enhanceOntology(simpleOntology(\"ontology\", [\n simpleInterface(\"Bar\", [simpleSpt(\"bar\", 0)], [], 0),\n ]), undefined, new Map(), \"\");\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Bar, ontology, true), {\n parser: \"typescript\",\n printWidth: 100,\n });\n expect(formattedCode).toMatchInlineSnapshot(`\n \"import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"@osdk/api\";\n\n export type OsdkObjectLinks$Bar = {};\n\n export namespace Bar {\n export type PropertyKeys = \"bar\";\n\n export interface Props {\n readonly bar: $PropType[\"integer\"] | undefined;\n }\n export interface StrictProps {\n readonly bar: $PropType[\"integer\"] | undefined;\n }\n\n export interface ObjectSet extends $ObjectSet<Bar, Bar.ObjectSet> {}\n\n export type OsdkObject<\n OPTIONS extends never | \"$notStrict\" | \"$rid\" = never,\n K extends keyof Bar.Props = keyof Bar.Props,\n > = $Osdk<Bar, K | OPTIONS>;\n }\n\n export interface Bar extends $InterfaceDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: \"interface\";\n apiName: \"Bar\";\n __DefinitionMetadata?: {\n objectSet: Bar.ObjectSet;\n props: Bar.Props;\n linksType: OsdkObjectLinks$Bar;\n strictProps: Bar.StrictProps;\n apiName: \"Bar\";\n displayName: \"Bar\";\n implements: [];\n links: {};\n properties: {\n /**\n * (no ontology metadata)\n */\n bar: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n };\n rid: \"BarRid\";\n type: \"interface\";\n };\n }\n\n export const Bar: Bar = {\n type: \"interface\",\n apiName: \"Bar\",\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n it(\"Generates properties for inherited SPTs\", async () => {\n const fooSpt = simpleSpt(\"foo\");\n const barSpt = simpleSpt(\"bar\");\n const ontology = enhanceOntology(simpleOntology(\"ontology\", [\n simpleInterface(\"Foo\", [fooSpt], [\"Parent\"]),\n simpleInterface(\"Parent\", [barSpt], []),\n ]), undefined, new Map(), \"\");\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true), {\n parser: \"typescript\",\n });\n expect(formattedCode).toMatchInlineSnapshot(`\n \"import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"@osdk/api\";\n\n export type OsdkObjectLinks$Foo = {};\n\n export namespace Foo {\n export type PropertyKeys = \"foo\";\n\n export interface Props {\n readonly foo: $PropType[\"integer\"] | undefined;\n }\n export interface StrictProps {\n readonly foo: $PropType[\"integer\"] | undefined;\n }\n\n export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}\n\n export type OsdkObject<\n OPTIONS extends never | \"$notStrict\" | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = $Osdk<Foo, K | OPTIONS>;\n }\n\n export interface Foo extends $InterfaceDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: \"interface\";\n apiName: \"Foo\";\n __DefinitionMetadata?: {\n objectSet: Foo.ObjectSet;\n props: Foo.Props;\n linksType: OsdkObjectLinks$Foo;\n strictProps: Foo.StrictProps;\n apiName: \"Foo\";\n description: \"Foo interface desc\";\n displayName: \"Foo interface dn\";\n implements: [\"Parent\"];\n links: {};\n properties: {\n /**\n * display name: 'foo property dn',\n * description: foo property desc\n */\n foo: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n };\n rid: \"FooRid\";\n type: \"interface\";\n };\n }\n\n export const Foo: Foo = {\n type: \"interface\",\n apiName: \"Foo\",\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n it(\"allows for SPT reuse if the same\", async () => {\n const fooSpt = simpleSpt(\"foo\");\n const barSpt = simpleSpt(\"bar\");\n const ontology = enhanceOntology(simpleOntology(\"ontology\", [\n simpleInterface(\"Foo\", [fooSpt, barSpt], [\"Parent\"]),\n simpleInterface(\"Parent\", [barSpt], []),\n ]), undefined, new Map(), \"\");\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true), {\n parser: \"typescript\",\n });\n expect(formattedCode).toMatchInlineSnapshot(`\n \"import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet,\n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"@osdk/api\";\n\n export type OsdkObjectLinks$Foo = {};\n\n export namespace Foo {\n export type PropertyKeys = \"foo\" | \"bar\";\n\n export interface Props {\n readonly bar: $PropType[\"integer\"] | undefined;\n readonly foo: $PropType[\"integer\"] | undefined;\n }\n export interface StrictProps {\n readonly bar: $PropType[\"integer\"] | undefined;\n readonly foo: $PropType[\"integer\"] | undefined;\n }\n\n export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}\n\n export type OsdkObject<\n OPTIONS extends never | \"$notStrict\" | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = $Osdk<Foo, K | OPTIONS>;\n }\n\n export interface Foo extends $InterfaceDefinition {\n osdkMetadata: typeof $osdkMetadata;\n type: \"interface\";\n apiName: \"Foo\";\n __DefinitionMetadata?: {\n objectSet: Foo.ObjectSet;\n props: Foo.Props;\n linksType: OsdkObjectLinks$Foo;\n strictProps: Foo.StrictProps;\n apiName: \"Foo\";\n description: \"Foo interface desc\";\n displayName: \"Foo interface dn\";\n implements: [\"Parent\"];\n links: {};\n properties: {\n /**\n * display name: 'bar property dn',\n * description: bar property desc\n */\n bar: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n /**\n * display name: 'foo property dn',\n * description: foo property desc\n */\n foo: $PropertyDef<\"integer\", \"nullable\", \"single\">;\n };\n rid: \"FooRid\";\n type: \"interface\";\n };\n }\n\n export const Foo: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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;EACFtC,EAAE,CAAC,yCAAyC,EAAE,YAAY;IACtD,MAAMuC,MAAM,GAAGpC,SAAS,CAAC,KAAK,CAAC;IAC/B,MAAMqC,MAAM,GAAGrC,SAAS,CAAC,KAAK,CAAC;IAC/B,MAAM4B,QAAQ,GAAG9B,eAAe,CAACqB,cAAc,CAAC,UAAU,EAAE,CACxDV,eAAe,CAAC,KAAK,EAAE,CAAC2B,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAC5C3B,eAAe,CAAC,QAAQ,EAAE,CAAC4B,MAAM,CAAC,EAAE,EAAE,CAAC,CAC1C,CAAC,EAAE7B,SAAS,EAAE,IAAIsB,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;IAC7B,MAAMC,aAAa,GAAG,MAAMrC,MAAM,CAACK,8CAA8C,CAAC6B,QAAQ,CAACP,cAAc,CAACiB,GAAG,EAAEV,QAAQ,EAAE,IAAI,CAAC,EAAE;MAC5HK,MAAM,EAAE;IACZ,CAAC,CAAC;IACFrC,MAAM,CAACmC,aAAa,CAAC,CAACI,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;EACFtC,EAAE,CAAC,kCAAkC,EAAE,YAAY;IAC/C,MAAMuC,MAAM,GAAGpC,SAAS,CAAC,KAAK,CAAC;IAC/B,MAAMqC,MAAM,GAAGrC,SAAS,CAAC,KAAK,CAAC;IAC/B,MAAM4B,QAAQ,GAAG9B,eAAe,CAACqB,cAAc,CAAC,UAAU,EAAE,CACxDV,eAAe,CAAC,KAAK,EAAE,CAAC2B,MAAM,EAAEC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EACpD5B,eAAe,CAAC,QAAQ,EAAE,CAAC4B,MAAM,CAAC,EAAE,EAAE,CAAC,CAC1C,CAAC,EAAE7B,SAAS,EAAE,IAAIsB,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;IAC7B,MAAMC,aAAa,GAAG,MAAMrC,MAAM,CAACK,8CAA8C,CAAC6B,QAAQ,CAACP,cAAc,CAACiB,GAAG,EAAEV,QAAQ,EAAE,IAAI,CAAC,EAAE;MAC5HK,MAAM,EAAE;IACZ,CAAC,CAAC;IACFrC,MAAM,CAACmC,aAAa,CAAC,CAACI,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -572,7 +572,7 @@ describe("generator", () => {
572
572
  > = $Osdk<SomeInterface, K | OPTIONS>;
573
573
  }
574
574
 
575
- export interface SomeInterface extends $InterfaceDefinition<'SomeInterface', SomeInterface> {
575
+ export interface SomeInterface extends $InterfaceDefinition {
576
576
  osdkMetadata: typeof $osdkMetadata;
577
577
  type: 'interface';
578
578
  apiName: 'SomeInterface';
@@ -646,7 +646,7 @@ describe("generator", () => {
646
646
  > = $Osdk<Person, K | OPTIONS>;
647
647
  }
648
648
 
649
- export interface Person extends $ObjectTypeDefinition<'Person', Person> {
649
+ export interface Person extends $ObjectTypeDefinition {
650
650
  osdkMetadata: typeof $osdkMetadata;
651
651
  type: 'object';
652
652
  apiName: 'Person';
@@ -734,7 +734,7 @@ describe("generator", () => {
734
734
  > = $Osdk<Todo, K | OPTIONS>;
735
735
  }
736
736
 
737
- export interface Todo extends $ObjectTypeDefinition<'Todo', Todo> {
737
+ export interface Todo extends $ObjectTypeDefinition {
738
738
  osdkMetadata: typeof $osdkMetadata;
739
739
  type: 'object';
740
740
  apiName: 'Todo';
@@ -1137,7 +1137,7 @@ describe("generator", () => {
1137
1137
  > = $Osdk<SomeInterface, K | OPTIONS>;
1138
1138
  }
1139
1139
 
1140
- export interface SomeInterface extends $InterfaceDefinition<'foo.bar.SomeInterface', SomeInterface> {
1140
+ export interface SomeInterface extends $InterfaceDefinition {
1141
1141
  osdkMetadata: typeof $osdkMetadata;
1142
1142
  type: 'interface';
1143
1143
  apiName: 'foo.bar.SomeInterface';
@@ -1211,7 +1211,7 @@ describe("generator", () => {
1211
1211
  > = $Osdk<Person, K | OPTIONS>;
1212
1212
  }
1213
1213
 
1214
- export interface Person extends $ObjectTypeDefinition<'foo.bar.Person', Person> {
1214
+ export interface Person extends $ObjectTypeDefinition {
1215
1215
  osdkMetadata: typeof $osdkMetadata;
1216
1216
  type: 'object';
1217
1217
  apiName: 'foo.bar.Person';
@@ -1299,7 +1299,7 @@ describe("generator", () => {
1299
1299
  > = $Osdk<Todo, K | OPTIONS>;
1300
1300
  }
1301
1301
 
1302
- export interface Todo extends $ObjectTypeDefinition<'foo.bar.Todo', Todo> {
1302
+ export interface Todo extends $ObjectTypeDefinition {
1303
1303
  osdkMetadata: typeof $osdkMetadata;
1304
1304
  type: 'object';
1305
1305
  apiName: 'foo.bar.Todo';
@@ -1631,7 +1631,7 @@ describe("generator", () => {
1631
1631
  > = $Osdk<UsesForeignSpt, K | OPTIONS>;
1632
1632
  }
1633
1633
 
1634
- export interface UsesForeignSpt extends $ObjectTypeDefinition<'UsesForeignSpt', UsesForeignSpt> {
1634
+ export interface UsesForeignSpt extends $ObjectTypeDefinition {
1635
1635
  osdkMetadata: typeof $osdkMetadata;
1636
1636
  type: 'object';
1637
1637
  apiName: 'UsesForeignSpt';
@@ -1817,7 +1817,7 @@ describe("generator", () => {
1817
1817
  > = $Osdk<SomeInterface, K | OPTIONS>;
1818
1818
  }
1819
1819
 
1820
- export interface SomeInterface extends $InterfaceDefinition<'com.example.dep.SomeInterface', SomeInterface> {
1820
+ export interface SomeInterface extends $InterfaceDefinition {
1821
1821
  osdkMetadata: typeof $osdkMetadata;
1822
1822
  type: 'interface';
1823
1823
  apiName: 'com.example.dep.SomeInterface';
@@ -1887,7 +1887,7 @@ describe("generator", () => {
1887
1887
  > = $Osdk<Task, K | OPTIONS>;
1888
1888
  }
1889
1889
 
1890
- export interface Task extends $ObjectTypeDefinition<'com.example.dep.Task', Task> {
1890
+ export interface Task extends $ObjectTypeDefinition {
1891
1891
  osdkMetadata: typeof $osdkMetadata;
1892
1892
  type: 'object';
1893
1893
  apiName: 'com.example.dep.Task';