@osdk/generator 2.1.0-beta.2 → 2.1.0-beta.20

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 (78) hide show
  1. package/CHANGELOG.md +193 -0
  2. package/build/browser/GenerateContext/GenerateContext.d.ts +1 -0
  3. package/build/browser/GenerateContext/GenerateContext.d.ts.map +1 -1
  4. package/build/browser/generateClientSdkPackage.test.js +2 -2
  5. package/build/browser/generateClientSdkPackage.test.js.map +1 -1
  6. package/build/browser/util/test/TodoWireOntology.d.ts +5 -0
  7. package/build/browser/util/test/TodoWireOntology.d.ts.map +1 -1
  8. package/build/browser/util/test/TodoWireOntology.js +10 -5
  9. package/build/browser/util/test/TodoWireOntology.js.map +1 -1
  10. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +6 -6
  11. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
  12. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +14 -20
  13. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  14. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts +1 -1
  15. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +1 -1
  16. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js +3 -2
  17. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
  18. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +74 -87
  19. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  20. package/build/browser/v2.0/generatePerActionDataFiles.d.ts +1 -1
  21. package/build/browser/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
  22. package/build/browser/v2.0/generatePerActionDataFiles.js +3 -2
  23. package/build/browser/v2.0/generatePerActionDataFiles.js.map +1 -1
  24. package/build/browser/v2.0/generatePerInterfaceDataFiles.js +4 -3
  25. package/build/browser/v2.0/generatePerInterfaceDataFiles.js.map +1 -1
  26. package/build/browser/v2.0/generatePerObjectDataFiles.d.ts.map +1 -1
  27. package/build/browser/v2.0/generatePerObjectDataFiles.js +1 -1
  28. package/build/browser/v2.0/generatePerObjectDataFiles.js.map +1 -1
  29. package/build/browser/v2.0/generatePerQueryDataFiles.d.ts +1 -1
  30. package/build/browser/v2.0/generatePerQueryDataFiles.d.ts.map +1 -1
  31. package/build/browser/v2.0/generatePerQueryDataFiles.js +5 -5
  32. package/build/browser/v2.0/generatePerQueryDataFiles.js.map +1 -1
  33. package/build/browser/v2.0/generatePerQueryDataFiles.test.js +7 -8
  34. package/build/browser/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
  35. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
  36. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +21 -10
  37. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
  38. package/build/browser/validateWireOntologyAssumptions.js +2 -2
  39. package/build/browser/validateWireOntologyAssumptions.js.map +1 -1
  40. package/build/esm/GenerateContext/GenerateContext.d.ts +1 -0
  41. package/build/esm/GenerateContext/GenerateContext.d.ts.map +1 -1
  42. package/build/esm/generateClientSdkPackage.test.js +2 -2
  43. package/build/esm/generateClientSdkPackage.test.js.map +1 -1
  44. package/build/esm/util/test/TodoWireOntology.d.ts +5 -0
  45. package/build/esm/util/test/TodoWireOntology.d.ts.map +1 -1
  46. package/build/esm/util/test/TodoWireOntology.js +10 -5
  47. package/build/esm/util/test/TodoWireOntology.js.map +1 -1
  48. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +6 -6
  49. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
  50. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +14 -20
  51. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  52. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.d.ts +1 -1
  53. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +1 -1
  54. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js +3 -2
  55. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
  56. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +74 -87
  57. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  58. package/build/esm/v2.0/generatePerActionDataFiles.d.ts +1 -1
  59. package/build/esm/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
  60. package/build/esm/v2.0/generatePerActionDataFiles.js +3 -2
  61. package/build/esm/v2.0/generatePerActionDataFiles.js.map +1 -1
  62. package/build/esm/v2.0/generatePerInterfaceDataFiles.js +4 -3
  63. package/build/esm/v2.0/generatePerInterfaceDataFiles.js.map +1 -1
  64. package/build/esm/v2.0/generatePerObjectDataFiles.d.ts.map +1 -1
  65. package/build/esm/v2.0/generatePerObjectDataFiles.js +1 -1
  66. package/build/esm/v2.0/generatePerObjectDataFiles.js.map +1 -1
  67. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts +1 -1
  68. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts.map +1 -1
  69. package/build/esm/v2.0/generatePerQueryDataFiles.js +5 -5
  70. package/build/esm/v2.0/generatePerQueryDataFiles.js.map +1 -1
  71. package/build/esm/v2.0/generatePerQueryDataFiles.test.js +7 -8
  72. package/build/esm/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
  73. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
  74. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +21 -10
  75. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
  76. package/build/esm/validateWireOntologyAssumptions.js +2 -2
  77. package/build/esm/validateWireOntologyAssumptions.js.map +1 -1
  78. package/package.json +12 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,198 @@
1
1
  # @osdk/generator
2
2
 
3
+ ## 2.1.0-beta.20
4
+
5
+ ### Minor Changes
6
+
7
+ - 9d35a1f: Remove unused imports
8
+ - abfe4b3: Add support for reading struct properties.
9
+ - bf0e3b4: Ignore unknown property types.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [9d35a1f]
14
+ - Updated dependencies [abfe4b3]
15
+ - Updated dependencies [c537e2d]
16
+ - Updated dependencies [bf0e3b4]
17
+ - @osdk/generator-converters@2.1.0-beta.20
18
+ - @osdk/api@2.1.0-beta.20
19
+
20
+ ## 2.1.0-beta.19
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [cddc196]
25
+ - @osdk/api@2.1.0-beta.19
26
+ - @osdk/generator-converters@2.1.0-beta.19
27
+
28
+ ## 2.1.0-beta.18
29
+
30
+ ### Patch Changes
31
+
32
+ - @osdk/api@2.1.0-beta.18
33
+ - @osdk/generator-converters@2.1.0-beta.18
34
+
35
+ ## 2.1.0-beta.17
36
+
37
+ ### Patch Changes
38
+
39
+ - @osdk/api@2.1.0-beta.17
40
+ - @osdk/generator-converters@2.1.0-beta.17
41
+
42
+ ## 2.1.0-beta.16
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [e5fe7c0]
47
+ - @osdk/api@2.1.0-beta.16
48
+ - @osdk/generator-converters@2.1.0-beta.16
49
+
50
+ ## 2.1.0-beta.15
51
+
52
+ ### Patch Changes
53
+
54
+ - @osdk/api@2.1.0-beta.15
55
+ - @osdk/generator-converters@2.1.0-beta.15
56
+
57
+ ## 2.1.0-beta.14
58
+
59
+ ### Minor Changes
60
+
61
+ - 91cfa3a: Fixing url parsing for client.
62
+ - 6b6c8a1: Updates gateway endpoints and changes fetchContents for attachments to return a response
63
+
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies [0a7c747]
67
+ - Updated dependencies [91cfa3a]
68
+ - Updated dependencies [0c56d21]
69
+ - Updated dependencies [6b6c8a1]
70
+ - @osdk/generator-converters@2.1.0-beta.14
71
+ - @osdk/api@2.1.0-beta.14
72
+
73
+ ## 2.1.0-beta.13
74
+
75
+ ### Patch Changes
76
+
77
+ - @osdk/api@2.1.0-beta.13
78
+ - @osdk/generator-converters@2.1.0-beta.13
79
+
80
+ ## 2.1.0-beta.12
81
+
82
+ ### Patch Changes
83
+
84
+ - @osdk/api@2.1.0-beta.12
85
+ - @osdk/generator-converters@2.1.0-beta.12
86
+
87
+ ## 2.1.0-beta.11
88
+
89
+ ### Minor Changes
90
+
91
+ - bc1761c: Update platform API dependencies.
92
+
93
+ ### Patch Changes
94
+
95
+ - Updated dependencies [bc1761c]
96
+ - Updated dependencies [9298f75]
97
+ - @osdk/generator-converters@2.1.0-beta.11
98
+ - @osdk/api@2.1.0-beta.11
99
+
100
+ ## 2.1.0-beta.10
101
+
102
+ ### Patch Changes
103
+
104
+ - Updated dependencies [11a05cc]
105
+ - Updated dependencies [11088aa]
106
+ - @osdk/api@2.1.0-beta.10
107
+ - @osdk/generator-converters@2.1.0-beta.10
108
+
109
+ ## 2.1.0-beta.9
110
+
111
+ ### Patch Changes
112
+
113
+ - Updated dependencies [acbfab9]
114
+ - @osdk/api@2.1.0-beta.9
115
+ - @osdk/generator-converters@2.1.0-beta.9
116
+
117
+ ## 2.1.0-beta.8
118
+
119
+ ### Minor Changes
120
+
121
+ - 71dfb4c: Now export all api shapes from client, so use that dependency instead.
122
+
123
+ ### Patch Changes
124
+
125
+ - Updated dependencies [9f3807c]
126
+ - @osdk/api@2.1.0-beta.8
127
+ - @osdk/generator-converters@2.1.0-beta.8
128
+
129
+ ## 2.1.0-beta.7
130
+
131
+ ### Minor Changes
132
+
133
+ - 9018dc2: Updating platform api dependencies.
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies [27866a8]
138
+ - Updated dependencies [9018dc2]
139
+ - Updated dependencies [31e7d70]
140
+ - @osdk/api@2.1.0-beta.7
141
+ - @osdk/generator-converters@2.1.0-beta.7
142
+
143
+ ## 2.1.0-beta.6
144
+
145
+ ### Minor Changes
146
+
147
+ - 25fd9f0: Updating package.json to have better entry points to support react native bundlers.
148
+
149
+ ### Patch Changes
150
+
151
+ - Updated dependencies [25fd9f0]
152
+ - Updated dependencies [1a89f23]
153
+ - Updated dependencies [1b2e8c9]
154
+ - @osdk/api@2.1.0-beta.6
155
+ - @osdk/generator-converters@2.1.0-beta.6
156
+
157
+ ## 2.1.0-beta.5
158
+
159
+ ### Minor Changes
160
+
161
+ - 027db73: Fixes generation for interfaces with no properties
162
+
163
+ ### Patch Changes
164
+
165
+ - @osdk/api@2.1.0-beta.5
166
+ - @osdk/generator-converters@2.1.0-beta.5
167
+
168
+ ## 2.1.0-beta.4
169
+
170
+ ### Minor Changes
171
+
172
+ - 0dc40b0: Remove experimental non null for now.
173
+
174
+ ### Patch Changes
175
+
176
+ - Updated dependencies [0dc40b0]
177
+ - Updated dependencies [1dc0228]
178
+ - Updated dependencies [d3b3f35]
179
+ - @osdk/api@2.1.0-beta.4
180
+ - @osdk/generator-converters@2.1.0-beta.4
181
+
182
+ ## 2.1.0-beta.3
183
+
184
+ ### Minor Changes
185
+
186
+ - 09eaf24: Update to latest platform sdks
187
+
188
+ ### Patch Changes
189
+
190
+ - Updated dependencies [05febf4]
191
+ - Updated dependencies [b79becf]
192
+ - Updated dependencies [09eaf24]
193
+ - @osdk/api@2.1.0-beta.3
194
+ - @osdk/generator-converters@2.1.0-beta.3
195
+
3
196
  ## 2.1.0-beta.2
4
197
 
5
198
  ### Patch Changes
@@ -9,5 +9,6 @@ export interface GenerateContext {
9
9
  outDir: string;
10
10
  ontologyApiNamespace?: string | undefined;
11
11
  apiNamespacePackageMap?: Map<string, string>;
12
+ forInternalUse?: boolean;
12
13
  }
13
14
  //# sourceMappingURL=GenerateContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenerateContext.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/GenerateContext.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAElF,MAAM,WAAW,eAAe;IAC9B,iBAAiB,EAAE,sBAAsB,CAAC;IAC1C,QAAQ,EAAE,0BAA0B,CAAC;IAErC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,SAAS,CAAC;IAEd,MAAM,EAAE,MAAM,CAAC;IAEf,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C"}
1
+ {"version":3,"file":"GenerateContext.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/GenerateContext.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAElF,MAAM,WAAW,eAAe;IAC9B,iBAAiB,EAAE,sBAAsB,CAAC;IAC1C,QAAQ,EAAE,0BAA0B,CAAC;IAErC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,SAAS,CAAC;IAEd,MAAM,EAAE,MAAM,CAAC;IAEf,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
@@ -23,7 +23,7 @@ describe("generateClientSdkPackage", () => {
23
23
  osdkClientApiVersion: "^66.6.6",
24
24
  areTheTypesWrongVersion: "^0.15.2",
25
25
  tslibVersion: "^2.6.2",
26
- typescriptVersion: "^5.4.2"
26
+ typescriptVersion: "~5.5.4"
27
27
  };
28
28
  describe("v2", () => {
29
29
  test("returns the package.json contents", async () => {
@@ -33,7 +33,7 @@ describe("generateClientSdkPackage", () => {
33
33
  "@arethetypeswrong/cli": "^0.15.2",
34
34
  "@osdk/api": "^99.9.9",
35
35
  "tslib": "^2.6.2",
36
- "typescript": "^5.4.2",
36
+ "typescript": "~5.5.4",
37
37
  },
38
38
  "exports": {
39
39
  ".": {
@@ -1 +1 @@
1
- {"version":3,"file":"generateClientSdkPackage.test.js","names":["describe","expect","test","getPackageJsonContents","versions","osdkApiVersion","osdkClientVersion","osdkClientApiVersion","areTheTypesWrongVersion","tslibVersion","typescriptVersion","toMatchInlineSnapshot"],"sources":["generateClientSdkPackage.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 { describe, expect, test } from \"vitest\";\nimport { getPackageJsonContents } from \"./generateClientSdkPackage.js\";\ndescribe(\"generateClientSdkPackage\", () => {\n describe(getPackageJsonContents, () => {\n const versions = {\n osdkApiVersion: \"^99.9.9\",\n osdkClientVersion: \"^88.8.8\",\n osdkClientApiVersion: \"^66.6.6\",\n areTheTypesWrongVersion: \"^0.15.2\",\n tslibVersion: \"^2.6.2\",\n typescriptVersion: \"^5.4.2\",\n };\n describe(\"v2\", () => {\n test(\"returns the package.json contents\", async () => {\n expect(getPackageJsonContents(\"foo\", \"1.2.3\", versions))\n .toMatchInlineSnapshot(`\n {\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.15.2\",\n \"@osdk/api\": \"^99.9.9\",\n \"tslib\": \"^2.6.2\",\n \"typescript\": \"^5.4.2\",\n },\n \"exports\": {\n \".\": {\n \"import\": \"./dist/module/index.js\",\n \"require\": \"./dist/commonjs/index.js\",\n },\n },\n \"files\": [\n \"**/*.js\",\n \"**/*.d.ts\",\n \"dist/**/package.json\",\n ],\n \"main\": \"./dist/commonjs/index.js\",\n \"module\": \"./dist/module/index.js\",\n \"name\": \"foo\",\n \"peerDependencies\": {\n \"@osdk/api\": \"^99.9.9\",\n \"@osdk/client\": \"^88.8.8\",\n },\n \"scripts\": {\n \"check\": \"npm exec attw $(npm pack)\",\n \"prepack\": \"tsc -p ./dist/module/tsconfig.json && tsc -p ./dist/commonjs/tsconfig.json\",\n },\n \"version\": \"1.2.3\",\n }\n `);\n });\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAAQ,QAAQ;AAC/C,SAASC,sBAAsB,QAAQ,+BAA+B;AACtEH,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACvCA,QAAQ,CAACG,sBAAsB,EAAE,MAAM;IACnC,MAAMC,QAAQ,GAAG;MACbC,cAAc,EAAE,SAAS;MACzBC,iBAAiB,EAAE,SAAS;MAC5BC,oBAAoB,EAAE,SAAS;MAC/BC,uBAAuB,EAAE,SAAS;MAClCC,YAAY,EAAE,QAAQ;MACtBC,iBAAiB,EAAE;IACvB,CAAC;IACDV,QAAQ,CAAC,IAAI,EAAE,MAAM;MACjBE,IAAI,CAAC,mCAAmC,EAAE,YAAY;QAClDD,MAAM,CAACE,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAEC,QAAQ,CAAC,CAAC,CACnDO,qBAAqB,CAAC;AAC3C;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,WAAW,CAAC;MACA,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"generateClientSdkPackage.test.js","names":["describe","expect","test","getPackageJsonContents","versions","osdkApiVersion","osdkClientVersion","osdkClientApiVersion","areTheTypesWrongVersion","tslibVersion","typescriptVersion","toMatchInlineSnapshot"],"sources":["generateClientSdkPackage.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 { describe, expect, test } from \"vitest\";\nimport { getPackageJsonContents } from \"./generateClientSdkPackage.js\";\ndescribe(\"generateClientSdkPackage\", () => {\n describe(getPackageJsonContents, () => {\n const versions = {\n osdkApiVersion: \"^99.9.9\",\n osdkClientVersion: \"^88.8.8\",\n osdkClientApiVersion: \"^66.6.6\",\n areTheTypesWrongVersion: \"^0.15.2\",\n tslibVersion: \"^2.6.2\",\n typescriptVersion: \"~5.5.4\",\n };\n describe(\"v2\", () => {\n test(\"returns the package.json contents\", async () => {\n expect(getPackageJsonContents(\"foo\", \"1.2.3\", versions))\n .toMatchInlineSnapshot(`\n {\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.15.2\",\n \"@osdk/api\": \"^99.9.9\",\n \"tslib\": \"^2.6.2\",\n \"typescript\": \"~5.5.4\",\n },\n \"exports\": {\n \".\": {\n \"import\": \"./dist/module/index.js\",\n \"require\": \"./dist/commonjs/index.js\",\n },\n },\n \"files\": [\n \"**/*.js\",\n \"**/*.d.ts\",\n \"dist/**/package.json\",\n ],\n \"main\": \"./dist/commonjs/index.js\",\n \"module\": \"./dist/module/index.js\",\n \"name\": \"foo\",\n \"peerDependencies\": {\n \"@osdk/api\": \"^99.9.9\",\n \"@osdk/client\": \"^88.8.8\",\n },\n \"scripts\": {\n \"check\": \"npm exec attw $(npm pack)\",\n \"prepack\": \"tsc -p ./dist/module/tsconfig.json && tsc -p ./dist/commonjs/tsconfig.json\",\n },\n \"version\": \"1.2.3\",\n }\n `);\n });\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAAQ,QAAQ;AAC/C,SAASC,sBAAsB,QAAQ,+BAA+B;AACtEH,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACvCA,QAAQ,CAACG,sBAAsB,EAAE,MAAM;IACnC,MAAMC,QAAQ,GAAG;MACbC,cAAc,EAAE,SAAS;MACzBC,iBAAiB,EAAE,SAAS;MAC5BC,oBAAoB,EAAE,SAAS;MAC/BC,uBAAuB,EAAE,SAAS;MAClCC,YAAY,EAAE,QAAQ;MACtBC,iBAAiB,EAAE;IACvB,CAAC;IACDV,QAAQ,CAAC,IAAI,EAAE,MAAM;MACjBE,IAAI,CAAC,mCAAmC,EAAE,YAAY;QAClDD,MAAM,CAACE,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAEC,QAAQ,CAAC,CAAC,CACnDO,qBAAqB,CAAC;AAC3C;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,WAAW,CAAC;MACA,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -71,6 +71,7 @@ export declare const TodoWireOntology: {
71
71
  dataType: {
72
72
  type: "integer";
73
73
  };
74
+ rid: string;
74
75
  };
75
76
  body: {
76
77
  dataType: {
@@ -78,11 +79,13 @@ export declare const TodoWireOntology: {
78
79
  };
79
80
  description: string;
80
81
  displayName: string;
82
+ rid: string;
81
83
  };
82
84
  complete: {
83
85
  dataType: {
84
86
  type: "boolean";
85
87
  };
88
+ rid: string;
86
89
  };
87
90
  };
88
91
  status: "ACTIVE";
@@ -125,6 +128,7 @@ export declare const TodoWireOntology: {
125
128
  dataType: {
126
129
  type: "string";
127
130
  };
131
+ rid: string;
128
132
  };
129
133
  };
130
134
  rid: string;
@@ -200,6 +204,7 @@ export declare const TodoWireOntology: {
200
204
  displayName: string;
201
205
  extendsInterfaces: never[];
202
206
  links: {};
207
+ implementedByObjectTypes: never[];
203
208
  };
204
209
  };
205
210
  sharedPropertyTypes: {
@@ -1 +1 @@
1
- {"version":3,"file":"TodoWireOntology.d.ts","sourceRoot":"","sources":["../../../../src/util/test/TodoWireOntology.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6MK,CAAC"}
1
+ {"version":3,"file":"TodoWireOntology.d.ts","sourceRoot":"","sources":["../../../../src/util/test/TodoWireOntology.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkNK,CAAC"}
@@ -85,19 +85,22 @@ export const TodoWireOntology = {
85
85
  id: {
86
86
  dataType: {
87
87
  type: "integer"
88
- }
88
+ },
89
+ rid: "rid"
89
90
  },
90
91
  body: {
91
92
  dataType: {
92
93
  type: "string"
93
94
  },
94
95
  description: "The text of the todo",
95
- displayName: "Body"
96
+ displayName: "Body",
97
+ rid: "rid"
96
98
  },
97
99
  complete: {
98
100
  dataType: {
99
101
  type: "boolean"
100
- }
102
+ },
103
+ rid: "rid"
101
104
  }
102
105
  },
103
106
  status: "ACTIVE",
@@ -139,7 +142,8 @@ export const TodoWireOntology = {
139
142
  email: {
140
143
  dataType: {
141
144
  type: "string"
142
- }
145
+ },
146
+ rid: "rid"
143
147
  }
144
148
  },
145
149
  rid: "ridForPerson",
@@ -214,7 +218,8 @@ export const TodoWireOntology = {
214
218
  rid: "idk",
215
219
  displayName: "Sum Interface",
216
220
  extendsInterfaces: [],
217
- links: {}
221
+ links: {},
222
+ implementedByObjectTypes: []
218
223
  }
219
224
  },
220
225
  sharedPropertyTypes: {
@@ -1 +1 @@
1
- {"version":3,"file":"TodoWireOntology.js","names":["TodoWireOntology","ontology","rid","apiName","displayName","description","actionTypes","parameters","object","dataType","type","objectApiName","objectTypeApiName","required","operations","status","objectTypes","Todo","objectType","primaryKey","pluralDisplayName","icon","name","color","titleProperty","properties","id","body","complete","linkTypes","cardinality","foreignKeyPropertyApiName","linkTypeRid","implementsInterfaces","implementsInterfaces2","sharedPropertyTypeMapping","Person","email","queryTypes","output","completed","version","someTodo","interfaceTypes","SomeInterface","extendsInterfaces","links","sharedPropertyTypes","SomeProperty"],"sources":["TodoWireOntology.js"],"sourcesContent":["/*\n * Copyright 2023 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 */\nexport const TodoWireOntology = {\n ontology: {\n rid: \"ridHere\",\n apiName: \"OntologyApiName\",\n displayName: \"\",\n description: \"\",\n },\n actionTypes: {\n \"markTodoCompleted\": {\n apiName: \"markTodoCompleted\",\n description: \"An action which takes different types of parameters\",\n parameters: {\n object: {\n description: \"A Todo to mark completed\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"modifyObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n \"deleteTodos\": {\n apiName: \"deleteTodos\",\n description: \"An action which takes in an array of objects\",\n parameters: {\n object: {\n description: \"Todo(s) to be deleted\",\n \"dataType\": {\n \"type\": \"array\",\n \"subType\": {\n \"type\": \"object\",\n \"objectApiName\": \"Todo\",\n \"objectTypeApiName\": \"Todo\",\n },\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"deleteObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n },\n objectTypes: {\n Todo: {\n objectType: {\n apiName: \"Todo\",\n primaryKey: \"id\",\n displayName: \"AwesomeTodoDisplayname\",\n pluralDisplayName: \"AwesomeTodoDisplayNames\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"Its a todo item.\",\n titleProperty: \"body\",\n properties: {\n id: {\n dataType: {\n type: \"integer\",\n },\n },\n body: {\n dataType: {\n type: \"string\",\n },\n description: \"The text of the todo\",\n displayName: \"Body\",\n },\n complete: {\n dataType: {\n type: \"boolean\",\n },\n },\n },\n status: \"ACTIVE\",\n rid: \"ridForTodo\",\n },\n linkTypes: [{\n apiName: \"Assignee\",\n cardinality: \"ONE\",\n displayName: \"Assignee\",\n objectTypeApiName: \"Person\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"email\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [\"SomeInterface\"],\n implementsInterfaces2: {\n \"SomeInterface\": {\n properties: {\n \"SomeProperty\": \"body\",\n },\n },\n },\n sharedPropertyTypeMapping: {},\n },\n Person: {\n objectType: {\n apiName: \"Person\",\n primaryKey: \"email\",\n displayName: \"Person\",\n pluralDisplayName: \"Persons\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"A person\",\n titleProperty: \"email\",\n properties: {\n email: {\n dataType: {\n type: \"string\",\n },\n },\n },\n rid: \"ridForPerson\",\n status: \"ACTIVE\",\n },\n linkTypes: [{\n apiName: \"Todos\",\n cardinality: \"MANY\",\n displayName: \"Todos\",\n objectTypeApiName: \"Todo\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"id\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [],\n implementsInterfaces2: {},\n sharedPropertyTypeMapping: {},\n },\n },\n queryTypes: {\n \"getCount\": {\n apiName: \"getCount\",\n output: {\n type: \"integer\",\n },\n parameters: {\n completed: { dataType: { type: \"boolean\" } },\n },\n rid: \"rid.query.1\",\n version: \"0\",\n },\n \"returnsTodo\": {\n apiName: \"returnsTodo\",\n output: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n parameters: {\n someTodo: {\n description: \"Random desc so we test jsdoc\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n },\n },\n rid: \"rid.query.2\",\n version: \"0\",\n },\n },\n interfaceTypes: {\n SomeInterface: {\n apiName: \"SomeInterface\",\n description: \"Some interface\",\n properties: {\n \"SomeProperty\": {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n rid: \"idk\",\n displayName: \"Sum Interface\",\n extendsInterfaces: [],\n links: {},\n },\n },\n sharedPropertyTypes: {\n SomeProperty: {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAG;EAC5BC,QAAQ,EAAE;IACNC,GAAG,EAAE,SAAS;IACdC,OAAO,EAAE,iBAAiB;IAC1BC,WAAW,EAAE,EAAE;IACfC,WAAW,EAAE;EACjB,CAAC;EACDC,WAAW,EAAE;IACT,mBAAmB,EAAE;MACjBH,OAAO,EAAE,mBAAmB;MAC5BE,WAAW,EAAE,qDAAqD;MAClEE,UAAU,EAAE;QACRC,MAAM,EAAE;UACJH,WAAW,EAAE,0BAA0B;UACvCI,QAAQ,EAAE;YACNC,IAAI,EAAE,QAAQ;YACdC,aAAa,EAAE,MAAM;YACrBC,iBAAiB,EAAE;UACvB,CAAC;UACDC,QAAQ,EAAE;QACd;MACJ,CAAC;MACDX,GAAG,EAAE,mEAAmE;MACxEY,UAAU,EAAE,CAAC;QACLJ,IAAI,EAAE,cAAc;QACpBE,iBAAiB,EAAE;MACvB,CAAC,CAAC;MACNG,MAAM,EAAE;IACZ,CAAC;IACD,aAAa,EAAE;MACXZ,OAAO,EAAE,aAAa;MACtBE,WAAW,EAAE,8CAA8C;M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QAAE;MAC/C,CAAC;MACDR,GAAG,EAAE,aAAa;MAClBuC,OAAO,EAAE;IACb,CAAC;IACD,aAAa,EAAE;MACXtC,OAAO,EAAE,aAAa;MACtBoC,MAAM,EAAE;QACJ7B,IAAI,EAAE,QAAQ;QACdC,aAAa,EAAE,MAAM;QACrBC,iBAAiB,EAAE;MACvB,CAAC;MACDL,UAAU,EAAE;QACRmC,QAAQ,EAAE;UACNrC,WAAW,EAAE,8BAA8B;UAC3CI,QAAQ,EAAE;YACNC,IAAI,EAAE,QAAQ;YACdC,aAAa,EAAE,MAAM;YACrBC,iBAAiB,EAAE;UACvB;QACJ;MACJ,CAAC;MACDV,GAAG,EAAE,aAAa;MAClBuC,OAAO,EAAE;IACb;EACJ,CAAC;EACDE,cAAc,EAAE;IACZC,aAAa,EAAE;MACXzC,OAAO,EAAE,eAAe;MACxBE,WAAW,EAAE,gBAAgB;MAC7BoB,UAAU,EAAE;QACR,cAAc,EAAE;UACZtB,OAAO,EAAE,cAAc;UACvBE,WAAW,EAAE,eAAe;UAC5BD,WAAW,EAAE,cAAc;UAC3BK,QAAQ,EAAE;YACNC,IAAI,EAAE;UACV,CAAC;UACDR,GAAG,EAAE;QACT;MACJ,CAAC;MACDA,GAAG,EAAE,KAAK;MACVE,WAAW,EAAE,eAAe;MAC5ByC,iBAAiB,EAAE,EAAE;MACrBC,KAAK,EAAE,CAAC;IACZ;EACJ,CAAC;EACDC,mBAAmB,EAAE;IACjBC,YAAY,EAAE;MACV7C,OAAO,EAAE,cAAc;MACvBE,WAAW,EAAE,eAAe;MAC5BD,WAAW,EAAE,cAAc;MAC3BK,QAAQ,EAAE;QACNC,IAAI,EAAE;MACV,CAAC;MACDR,GAAG,EAAE;IACT;EACJ;AACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"TodoWireOntology.js","names":["TodoWireOntology","ontology","rid","apiName","displayName","description","actionTypes","parameters","object","dataType","type","objectApiName","objectTypeApiName","required","operations","status","objectTypes","Todo","objectType","primaryKey","pluralDisplayName","icon","name","color","titleProperty","properties","id","body","complete","linkTypes","cardinality","foreignKeyPropertyApiName","linkTypeRid","implementsInterfaces","implementsInterfaces2","sharedPropertyTypeMapping","Person","email","queryTypes","output","completed","version","someTodo","interfaceTypes","SomeInterface","extendsInterfaces","links","implementedByObjectTypes","sharedPropertyTypes","SomeProperty"],"sources":["TodoWireOntology.js"],"sourcesContent":["/*\n * Copyright 2023 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 */\nexport const TodoWireOntology = {\n ontology: {\n rid: \"ridHere\",\n apiName: \"OntologyApiName\",\n displayName: \"\",\n description: \"\",\n },\n actionTypes: {\n \"markTodoCompleted\": {\n apiName: \"markTodoCompleted\",\n description: \"An action which takes different types of parameters\",\n parameters: {\n object: {\n description: \"A Todo to mark completed\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"modifyObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n \"deleteTodos\": {\n apiName: \"deleteTodos\",\n description: \"An action which takes in an array of objects\",\n parameters: {\n object: {\n description: \"Todo(s) to be deleted\",\n \"dataType\": {\n \"type\": \"array\",\n \"subType\": {\n \"type\": \"object\",\n \"objectApiName\": \"Todo\",\n \"objectTypeApiName\": \"Todo\",\n },\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"deleteObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n },\n objectTypes: {\n Todo: {\n objectType: {\n apiName: \"Todo\",\n primaryKey: \"id\",\n displayName: \"AwesomeTodoDisplayname\",\n pluralDisplayName: \"AwesomeTodoDisplayNames\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"Its a todo item.\",\n titleProperty: \"body\",\n properties: {\n id: {\n dataType: {\n type: \"integer\",\n },\n rid: \"rid\",\n },\n body: {\n dataType: {\n type: \"string\",\n },\n description: \"The text of the todo\",\n displayName: \"Body\",\n rid: \"rid\",\n },\n complete: {\n dataType: {\n type: \"boolean\",\n },\n rid: \"rid\",\n },\n },\n status: \"ACTIVE\",\n rid: \"ridForTodo\",\n },\n linkTypes: [{\n apiName: \"Assignee\",\n cardinality: \"ONE\",\n displayName: \"Assignee\",\n objectTypeApiName: \"Person\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"email\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [\"SomeInterface\"],\n implementsInterfaces2: {\n \"SomeInterface\": {\n properties: {\n \"SomeProperty\": \"body\",\n },\n },\n },\n sharedPropertyTypeMapping: {},\n },\n Person: {\n objectType: {\n apiName: \"Person\",\n primaryKey: \"email\",\n displayName: \"Person\",\n pluralDisplayName: \"Persons\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"A person\",\n titleProperty: \"email\",\n properties: {\n email: {\n dataType: {\n type: \"string\",\n },\n rid: \"rid\",\n },\n },\n rid: \"ridForPerson\",\n status: \"ACTIVE\",\n },\n linkTypes: [{\n apiName: \"Todos\",\n cardinality: \"MANY\",\n displayName: \"Todos\",\n objectTypeApiName: \"Todo\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"id\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [],\n implementsInterfaces2: {},\n sharedPropertyTypeMapping: {},\n },\n },\n queryTypes: {\n \"getCount\": {\n apiName: \"getCount\",\n output: {\n type: \"integer\",\n },\n parameters: {\n completed: { dataType: { type: \"boolean\" } },\n },\n rid: \"rid.query.1\",\n version: \"0\",\n },\n \"returnsTodo\": {\n apiName: \"returnsTodo\",\n output: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n parameters: {\n someTodo: {\n description: \"Random desc so we test jsdoc\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n },\n },\n rid: \"rid.query.2\",\n version: \"0\",\n },\n },\n interfaceTypes: {\n SomeInterface: {\n apiName: \"SomeInterface\",\n description: \"Some interface\",\n properties: {\n \"SomeProperty\": {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n rid: \"idk\",\n displayName: \"Sum Interface\",\n extendsInterfaces: [],\n links: {},\n implementedByObjectTypes: [],\n },\n },\n sharedPropertyTypes: {\n SomeProperty: {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAG;EAC5BC,QAAQ,EAAE;IACNC,GAAG,EAAE,SAAS;IACdC,OAAO,EAAE,iBAAiB;IAC1BC,WAAW,EAAE,EAAE;IACfC,WAAW,EAAE;EACjB,CAAC;EACDC,WAAW,EAAE;IACT,mBAAmB,EAAE;MACjBH,OAAO,EAAE,mBAAmB;MAC5BE,WAAW,EAAE,qDAAqD;MAClEE,UAAU,EAAE;QACRC,MAAM,EAAE;UACJH,WAAW,EAAE,0BAA0B;UACvCI,QAAQ,EAAE;YACNC,IAAI,EAAE,QAAQ;YACdC,aAAa,EAAE,MAAM;YACrBC,iBAAiB,EAAE;UACvB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B,EAAE;IAC9B;EACJ,CAAC;EACDC,mBAAmB,EAAE;IACjBC,YAAY,EAAE;MACV9C,OAAO,EAAE,cAAc;MACvBE,WAAW,EAAE,eAAe;MAC5BD,WAAW,EAAE,cAAc;MAC3BK,QAAQ,EAAE;QACNC,IAAI,EAAE;MACV,CAAC;MACDR,GAAG,EAAE;IACT;EACJ;AACJ,CAAC","ignoreList":[]}
@@ -22,7 +22,7 @@ import { deleteUndefineds } from "../util/deleteUndefineds.js";
22
22
  import { stringify } from "../util/stringify.js";
23
23
  import { createDefinition, createObjectSet, createOsdkObject, createPropertyKeys, createProps } from "./wireObjectTypeV2ToSdkObjectConstV2.js";
24
24
  /** @internal */
25
- export function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology, v2 = false) {
25
+ export function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology, v2 = false, forInternalUse = false) {
26
26
  const definition = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceDef.raw, v2));
27
27
  const objectDefIdentifier = interfaceDef.getDefinitionIdentifier(v2);
28
28
  const parents = definition.implements?.map(p => {
@@ -43,9 +43,9 @@ export function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ont
43
43
  }
44
44
  for (const apiName of Object.keys(parent.properties)) {
45
45
  if (definition.properties[apiName] != null) {
46
- !fastDeepEqual(definition.properties[apiName], parent.properties[apiName]) ? invariant(false, `Interface ${definition.apiName} redefines property '${apiName}' from parent '${parent.apiName}' but the properties do not match`) : void 0;
46
+ !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;
47
47
  } else if (mergedProperties[apiName] != null) {
48
- !fastDeepEqual(mergedProperties[apiName], parent.properties[apiName]) ? invariant(false, `Some interface defines a conflicting property '${apiName}' that does not match property from parent '${parent.apiName}'`) : void 0;
48
+ !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;
49
49
  }
50
50
  mergedProperties[apiName] = parent.properties[apiName];
51
51
  }
@@ -78,13 +78,13 @@ export function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ont
78
78
  // if we want links to work
79
79
 
80
80
  return `${[].join("\n")}
81
- ${v2 ? function () {
81
+ ${v2 ? function (forInternalUse = false) {
82
82
  return `import type {
83
83
  InterfaceDefinition as $InterfaceDefinition,
84
84
  ObjectSet as $ObjectSet,
85
85
  Osdk as $Osdk,
86
86
  PropertyValueWireToClient as $PropType,
87
- } from "@osdk/api";
87
+ } from "${forInternalUse ? "@osdk/api" : "@osdk/client"}";
88
88
 
89
89
  ${Object.keys(definition.links).length === 0 ? `export type ${osdkObjectLinksIdentifier} = {};` : `
90
90
  export interface ${osdkObjectLinksIdentifier} {
@@ -116,7 +116,7 @@ ${stringify(definition.links, {
116
116
  ${createDefinition(interfaceDef, ontology, interfaceDef.shortApiName, ids)}
117
117
 
118
118
  `;
119
- }() : ""}
119
+ }(forInternalUse) : ""}
120
120
 
121
121
  export const ${interfaceDef.shortApiName}: ${interfaceDef.shortApiName} = {
122
122
  type: "interface",
@@ -1 +1 @@
1
- {"version":3,"file":"UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js","names":["__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","fastDeepEqual","invariant","extractNamespace","EnhancedInterfaceType","deleteUndefineds","stringify","createDefinition","createObjectSet","createOsdkObject","createPropertyKeys","createProps","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst","interfaceDef","ontology","v2","definition","raw","objectDefIdentifier","getDefinitionIdentifier","parents","implements","map","p","parent","requireInterfaceType","it","mergedProperties","properties","apiName","Object","keys","objectSetIdentifier","shortApiName","propertyKeysIdentifier","osdkObjectPropsIdentifier","osdkObjectStrictPropsIdentifier","osdkObjectLinksIdentifier","osdkObjectIdentifier","ids","apiNamespace","badProperties","filter","length","Error","fullApiName","join","links","linkTarget","requireObjectType","targetType","getImportedDefinitionIdentifier","multiplicity"],"sources":["UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js"],"sourcesContent":["/*\n * Copyright 2023 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 { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport fastDeepEqual from \"fast-deep-equal\";\nimport invariant from \"tiny-invariant\";\nimport { extractNamespace } from \"../GenerateContext/EnhancedBase.js\";\nimport { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { createDefinition, createObjectSet, createOsdkObject, createPropertyKeys, createProps, } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\n/** @internal */\nexport function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology, v2 = false) {\n const definition = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceDef.raw, v2));\n const objectDefIdentifier = interfaceDef.getDefinitionIdentifier(v2);\n const parents = definition.implements?.map(p => {\n const parent = ontology.requireInterfaceType(p, true);\n if (parent instanceof EnhancedInterfaceType) {\n const it = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(parent.raw, v2));\n return it;\n }\n }) ?? [];\n const mergedProperties = { ...definition.properties };\n for (const parent of parents) {\n if (parent == null) {\n // came from a foreign type and we cannot merge properties yet\n // so if they weren't listed on the interface its over\n continue;\n }\n for (const apiName of Object.keys(parent.properties)) {\n if (definition.properties[apiName] != null) {\n invariant(fastDeepEqual(definition.properties[apiName], parent.properties[apiName]), `Interface ${definition.apiName} redefines property '${apiName}' from parent '${parent.apiName}' but the properties do not match`);\n }\n else if (mergedProperties[apiName] != null) {\n invariant(fastDeepEqual(mergedProperties[apiName], parent.properties[apiName]), `Some interface defines a conflicting property '${apiName}' that does not match property from parent '${parent.apiName}'`);\n }\n mergedProperties[apiName] = parent.properties[apiName];\n }\n }\n definition.properties = mergedProperties;\n const objectSetIdentifier = `${interfaceDef.shortApiName}.ObjectSet`;\n const propertyKeysIdentifier = `${interfaceDef.shortApiName}.PropertyKeys`;\n // const osdkObjectPropsIdentifier = `OsdkObjectProps$${objectDefIdentifier}`;\n const osdkObjectPropsIdentifier = `${interfaceDef.shortApiName}.Props`;\n const osdkObjectStrictPropsIdentifier = `${interfaceDef.shortApiName}.StrictProps`;\n const osdkObjectLinksIdentifier = `OsdkObjectLinks$${objectDefIdentifier}`;\n const osdkObjectIdentifier = `${interfaceDef.shortApiName}.OsdkObject`;\n const ids = {\n objectDefIdentifier: interfaceDef.shortApiName,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier,\n };\n if (interfaceDef.apiNamespace) {\n const badProperties = Object.keys(definition.properties).filter(apiName => extractNamespace(apiName)[0] == null);\n if (badProperties.length > 0) {\n throw new Error(`Interfaces with fully qualified api names MUST NOT have any properties with an unqualified api name. Interface: ${interfaceDef.fullApiName}, properties: ${badProperties.join(\", \")}`);\n }\n }\n function getV2Types() {\n return `import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"@osdk/api\";\n \n ${Object.keys(definition.links).length === 0\n ? `export type ${osdkObjectLinksIdentifier} = {};`\n : `\n export interface ${osdkObjectLinksIdentifier} {\n${stringify(definition.links, {\n \"*\": (definition) => {\n const linkTarget = ontology.requireObjectType(definition.targetType)\n .getImportedDefinitionIdentifier(v2);\n return `${definition.multiplicity\n ? `${linkTarget}[\"objectSet\"]`\n : `SingleLinkAccessor<${linkTarget}>`}\n `;\n },\n })}\n }\n `}\n\n export namespace ${interfaceDef.shortApiName} {\n\n ${createPropertyKeys(interfaceDef)}\n\n\n ${createProps(interfaceDef, \"Props\", false)}\n ${createProps(interfaceDef, \"StrictProps\", true)}\n\n\n ${createObjectSet(interfaceDef, ids)}\n\n ${createOsdkObject(interfaceDef, \"OsdkInstance\", ids)}\n \n } \n\n ${createDefinition(interfaceDef, ontology, interfaceDef.shortApiName, ids)}\n\n`;\n }\n // FIXME: We need to fill in the imports\n // if we want links to work\n const imports = [];\n definition;\n return `${imports.join(\"\\n\")}\n ${v2 ? getV2Types() : \"\"}\n\n export const ${interfaceDef.shortApiName}: ${interfaceDef.shortApiName} = {\n type: \"interface\",\n apiName: \"${interfaceDef.fullApiName}\",\n osdkMetadata: $osdkMetadata,\n };`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,mDAAmD,QAAQ,4BAA4B;AAChG,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,SAAS,MAAM,gBAAgB;AACtC,SAASC,gBAAgB,QAAQ,oCAAoC;AACrE,SAASC,qBAAqB,QAAQ,6CAA6C;AACnF,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,SAAS,QAAQ,sBAAsB;AAChD,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,gBAAgB,EAAEC,kBAAkB,EAAEC,WAAW,QAAS,yCAAyC;AAC/I;AACA,OAAO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BAAkBpB,YAAY,CAACgC,WAAW;AAC1C;AACA,UAAU;AACV","ignoreList":[]}
1
+ {"version":3,"file":"UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js","names":["__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","fastDeepEqual","invariant","extractNamespace","EnhancedInterfaceType","deleteUndefineds","stringify","createDefinition","createObjectSet","createOsdkObject","createPropertyKeys","createProps","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst","interfaceDef","ontology","v2","forInternalUse","definition","raw","objectDefIdentifier","getDefinitionIdentifier","parents","implements","map","p","parent","requireInterfaceType","it","mergedProperties","properties","apiName","Object","keys","process","env","NODE_ENV","objectSetIdentifier","shortApiName","propertyKeysIdentifier","osdkObjectPropsIdentifier","osdkObjectStrictPropsIdentifier","osdkObjectLinksIdentifier","osdkObjectIdentifier","ids","apiNamespace","badProperties","filter","length","Error","fullApiName","join","links","linkTarget","requireObjectType","targetType","getImportedDefinitionIdentifier","multiplicity"],"sources":["UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js"],"sourcesContent":["/*\n * Copyright 2023 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 { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport fastDeepEqual from \"fast-deep-equal\";\nimport invariant from \"tiny-invariant\";\nimport { extractNamespace } from \"../GenerateContext/EnhancedBase.js\";\nimport { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { deleteUndefineds } from \"../util/deleteUndefineds.js\";\nimport { stringify } from \"../util/stringify.js\";\nimport { createDefinition, createObjectSet, createOsdkObject, createPropertyKeys, createProps, } from \"./wireObjectTypeV2ToSdkObjectConstV2.js\";\n/** @internal */\nexport function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology, v2 = false, forInternalUse = false) {\n const definition = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceDef.raw, v2));\n const objectDefIdentifier = interfaceDef.getDefinitionIdentifier(v2);\n const parents = definition.implements?.map(p => {\n const parent = ontology.requireInterfaceType(p, true);\n if (parent instanceof EnhancedInterfaceType) {\n const it = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(parent.raw, v2));\n return it;\n }\n }) ?? [];\n const mergedProperties = { ...definition.properties };\n for (const parent of parents) {\n if (parent == null) {\n // came from a foreign type and we cannot merge properties yet\n // so if they weren't listed on the interface its over\n continue;\n }\n for (const apiName of Object.keys(parent.properties)) {\n if (definition.properties[apiName] != null) {\n invariant(fastDeepEqual(definition.properties[apiName], parent.properties[apiName]), `Interface ${definition.apiName} redefines property '${apiName}' from parent '${parent.apiName}' but the properties do not match`);\n }\n else if (mergedProperties[apiName] != null) {\n invariant(fastDeepEqual(mergedProperties[apiName], parent.properties[apiName]), `Some interface defines a conflicting property '${apiName}' that does not match property from parent '${parent.apiName}'`);\n }\n mergedProperties[apiName] = parent.properties[apiName];\n }\n }\n definition.properties = mergedProperties;\n const objectSetIdentifier = `${interfaceDef.shortApiName}.ObjectSet`;\n const propertyKeysIdentifier = `${interfaceDef.shortApiName}.PropertyKeys`;\n // const osdkObjectPropsIdentifier = `OsdkObjectProps$${objectDefIdentifier}`;\n const osdkObjectPropsIdentifier = `${interfaceDef.shortApiName}.Props`;\n const osdkObjectStrictPropsIdentifier = `${interfaceDef.shortApiName}.StrictProps`;\n const osdkObjectLinksIdentifier = `OsdkObjectLinks$${objectDefIdentifier}`;\n const osdkObjectIdentifier = `${interfaceDef.shortApiName}.OsdkObject`;\n const ids = {\n objectDefIdentifier: interfaceDef.shortApiName,\n osdkObjectLinksIdentifier,\n osdkObjectPropsIdentifier,\n osdkObjectStrictPropsIdentifier,\n objectSetIdentifier,\n osdkObjectIdentifier,\n propertyKeysIdentifier,\n };\n if (interfaceDef.apiNamespace) {\n const badProperties = Object.keys(definition.properties).filter(apiName => extractNamespace(apiName)[0] == null);\n if (badProperties.length > 0) {\n throw new Error(`Interfaces with fully qualified api names MUST NOT have any properties with an unqualified api name. Interface: ${interfaceDef.fullApiName}, properties: ${badProperties.join(\", \")}`);\n }\n }\n function getV2Types(forInternalUse = false) {\n return `import type {\n InterfaceDefinition as $InterfaceDefinition,\n ObjectSet as $ObjectSet, \n Osdk as $Osdk,\n PropertyValueWireToClient as $PropType,\n } from \"${forInternalUse ? \"@osdk/api\" : \"@osdk/client\"}\";\n \n ${Object.keys(definition.links).length === 0\n ? `export type ${osdkObjectLinksIdentifier} = {};`\n : `\n export interface ${osdkObjectLinksIdentifier} {\n${stringify(definition.links, {\n \"*\": (definition) => {\n const linkTarget = ontology.requireObjectType(definition.targetType)\n .getImportedDefinitionIdentifier(v2);\n return `${definition.multiplicity\n ? `${linkTarget}[\"objectSet\"]`\n : `SingleLinkAccessor<${linkTarget}>`}\n `;\n },\n })}\n }\n `}\n\n export namespace ${interfaceDef.shortApiName} {\n\n ${createPropertyKeys(interfaceDef)}\n\n\n ${createProps(interfaceDef, \"Props\", false)}\n ${createProps(interfaceDef, \"StrictProps\", true)}\n\n\n ${createObjectSet(interfaceDef, ids)}\n\n ${createOsdkObject(interfaceDef, \"OsdkInstance\", ids)}\n \n } \n\n ${createDefinition(interfaceDef, ontology, interfaceDef.shortApiName, ids)}\n\n`;\n }\n // FIXME: We need to fill in the imports\n // if we want links to work\n const imports = [];\n definition;\n return `${imports.join(\"\\n\")}\n ${v2 ? getV2Types(forInternalUse) : \"\"}\n\n export const ${interfaceDef.shortApiName}: ${interfaceDef.shortApiName} = {\n type: \"interface\",\n api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AAGJ,UAAU,eAAe,GAC5B,sBAAsBA,UAAU,GAAG;AAC7D,WAAW;MACK;IACJ,CAAC,CAAC;AACd;AACA,KAAK;AACL;AACA,uBAAuBvC,YAAY,CAACwB,YAAY;AAChD;AACA,QAAQ3B,kBAAkB,CAACG,YAAY,CAAC;AACxC;AACA;AACA,QAAQF,WAAW,CAACE,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC;AACjD,QAAQF,WAAW,CAACE,YAAY,EAAE,aAAa,EAAE,IAAI,CAAC;AACtD;AACA;AACA,QAAQL,eAAe,CAACK,YAAY,EAAE8B,GAAG,CAAC;AAC1C;AACA,QAAQlC,gBAAgB,CAACI,YAAY,EAAE,cAAc,EAAE8B,GAAG,CAAC;AAC3D;AACA;AACA;AACA,MAAMpC,gBAAgB,CAACM,YAAY,EAAEC,QAAQ,EAAED,YAAY,CAACwB,YAAY,EAAEM,GAAG,CAAC;AAC9E;AACA,CAAC;EACG,CAAC,CAMiB3B,cAAc,CAAC,GAAG,EAAE;AAC1C;AACA,mBAAmBH,YAAY,CAACwB,YAAY,KAAKxB,YAAY,CAACwB,YAAY;AAC1E;AACA,kBAAkBxB,YAAY,CAACoC,WAAW;AAC1C;AACA,UAAU;AACV","ignoreList":[]}
@@ -39,7 +39,8 @@ function simpleInterface(apiName, spts, parents, metadataLevel = 2) {
39
39
  description: metadataLevel >= 2 ? `${apiName} interface desc` : undefined,
40
40
  extendsInterfaces: parents,
41
41
  links: {},
42
- properties
42
+ properties,
43
+ implementedByObjectTypes: []
43
44
  };
44
45
  }
45
46
  function simpleOntology(apiName, interfaces) {
@@ -70,7 +71,7 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
70
71
  if (ontology.interfaceTypes.Bar instanceof ForeignType) {
71
72
  throw new Error("Expected Bar to be an EnhancedInterfaceType");
72
73
  }
73
- const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Bar, ontology, true), {
74
+ const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Bar, ontology, true, true), {
74
75
  parser: "typescript",
75
76
  printWidth: 100
76
77
  });
@@ -90,20 +91,18 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
90
91
  export interface Props {
91
92
  readonly bar: $PropType["integer"] | undefined;
92
93
  }
93
- export interface StrictProps {
94
- readonly bar: $PropType["integer"] | undefined;
95
- }
94
+ export type StrictProps = Props;
96
95
 
97
96
  export interface ObjectSet extends $ObjectSet<Bar, Bar.ObjectSet> {}
98
97
 
99
98
  export type OsdkInstance<
100
- OPTIONS extends never | "$notStrict" | "$rid" = never,
99
+ OPTIONS extends never | "$rid" = never,
101
100
  K extends keyof Bar.Props = keyof Bar.Props,
102
101
  > = $Osdk.Instance<Bar, OPTIONS, K>;
103
102
 
104
103
  /** @deprecated use OsdkInstance */
105
104
  export type OsdkObject<
106
- OPTIONS extends never | "$notStrict" | "$rid" = never,
105
+ OPTIONS extends never | "$rid" = never,
107
106
  K extends keyof Bar.Props = keyof Bar.Props,
108
107
  > = OsdkInstance<OPTIONS, K>;
109
108
  }
@@ -147,7 +146,7 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
147
146
  sanitized: simpleOntology("ontology", [simpleInterface("Foo", [fooSpt], ["Parent"]), simpleInterface("Parent", [barSpt], [])]),
148
147
  importExt: ""
149
148
  });
150
- const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true), {
149
+ const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true, true), {
151
150
  parser: "typescript"
152
151
  });
153
152
  expect(formattedCode).toMatchInlineSnapshot(`
@@ -166,20 +165,18 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
166
165
  export interface Props {
167
166
  readonly foo: $PropType["integer"] | undefined;
168
167
  }
169
- export interface StrictProps {
170
- readonly foo: $PropType["integer"] | undefined;
171
- }
168
+ export type StrictProps = Props;
172
169
 
173
170
  export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}
174
171
 
175
172
  export type OsdkInstance<
176
- OPTIONS extends never | "$notStrict" | "$rid" = never,
173
+ OPTIONS extends never | "$rid" = never,
177
174
  K extends keyof Foo.Props = keyof Foo.Props,
178
175
  > = $Osdk.Instance<Foo, OPTIONS, K>;
179
176
 
180
177
  /** @deprecated use OsdkInstance */
181
178
  export type OsdkObject<
182
- OPTIONS extends never | "$notStrict" | "$rid" = never,
179
+ OPTIONS extends never | "$rid" = never,
183
180
  K extends keyof Foo.Props = keyof Foo.Props,
184
181
  > = OsdkInstance<OPTIONS, K>;
185
182
  }
@@ -225,7 +222,7 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
225
222
  sanitized: simpleOntology("ontology", [simpleInterface("Foo", [fooSpt, barSpt], ["Parent"]), simpleInterface("Parent", [barSpt], [])]),
226
223
  importExt: ""
227
224
  });
228
- const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true), {
225
+ const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true, true), {
229
226
  parser: "typescript"
230
227
  });
231
228
  expect(formattedCode).toMatchInlineSnapshot(`
@@ -245,21 +242,18 @@ describe(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst, () => {
245
242
  readonly bar: $PropType["integer"] | undefined;
246
243
  readonly foo: $PropType["integer"] | undefined;
247
244
  }
248
- export interface StrictProps {
249
- readonly bar: $PropType["integer"] | undefined;
250
- readonly foo: $PropType["integer"] | undefined;
251
- }
245
+ export type StrictProps = Props;
252
246
 
253
247
  export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}
254
248
 
255
249
  export type OsdkInstance<
256
- OPTIONS extends never | "$notStrict" | "$rid" = never,
250
+ OPTIONS extends never | "$rid" = never,
257
251
  K extends keyof Foo.Props = keyof Foo.Props,
258
252
  > = $Osdk.Instance<Foo, OPTIONS, K>;
259
253
 
260
254
  /** @deprecated use OsdkInstance */
261
255
  export type OsdkObject<
262
- OPTIONS extends never | "$notStrict" | "$rid" = never,
256
+ OPTIONS extends never | "$rid" = never,
263
257
  K extends keyof Foo.Props = keyof Foo.Props,
264
258
  > = OsdkInstance<OPTIONS, K>;
265
259
  }