@osdk/generator 2.1.0-beta.21 → 2.1.0-beta.23

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 (108) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/build/browser/GenerateContext/EnhancedAction.d.ts +3 -3
  3. package/build/browser/GenerateContext/EnhancedAction.d.ts.map +1 -1
  4. package/build/browser/GenerateContext/EnhancedBase.d.ts.map +1 -1
  5. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts +1 -1
  6. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -1
  7. package/build/browser/GenerateContext/EnhancedObjectType.d.ts.map +1 -1
  8. package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts +7 -5
  9. package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts.map +1 -1
  10. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js.map +1 -1
  11. package/build/browser/GenerateContext/EnhancedQuery.d.ts +3 -3
  12. package/build/browser/GenerateContext/EnhancedQuery.d.ts.map +1 -1
  13. package/build/browser/GenerateContext/ForeignType.d.ts.map +1 -1
  14. package/build/browser/generateClientSdkPackage.d.ts +4 -17
  15. package/build/browser/generateClientSdkPackage.d.ts.map +1 -1
  16. package/build/browser/generateClientSdkPackage.js +3 -3
  17. package/build/browser/generateClientSdkPackage.js.map +1 -1
  18. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +1 -1
  19. package/build/browser/shared/getObjectImports.d.ts.map +1 -1
  20. package/build/browser/shared/getObjectTypeApiNamesFromQuery.d.ts.map +1 -1
  21. package/build/browser/shared/getObjectTypesFromQueryDataType.d.ts.map +1 -1
  22. package/build/browser/shared/propertyJsdoc.d.ts.map +1 -1
  23. package/build/browser/util/commaSeparatedIdentifiers.d.ts.map +1 -1
  24. package/build/browser/util/commaSeparatedTypeIdentifiers.d.ts.map +1 -1
  25. package/build/browser/util/reservedKeywords.d.ts.map +1 -1
  26. package/build/browser/util/stringUnionFrom.d.ts.map +1 -1
  27. package/build/browser/util/stringify.d.ts.map +1 -1
  28. package/build/browser/util/test/TodoWireOntology.d.ts +2 -221
  29. package/build/browser/util/test/TodoWireOntology.d.ts.map +1 -1
  30. package/build/browser/util/test/TodoWireOntology.js +14 -1
  31. package/build/browser/util/test/TodoWireOntology.js.map +1 -1
  32. package/build/browser/util/test/compileThis.d.ts.map +1 -1
  33. package/build/browser/util/test/createMockMinimalFiles.d.ts.map +1 -1
  34. package/build/browser/util/test/formatTs.d.ts.map +1 -1
  35. package/build/browser/util/verifyOutDir.d.ts.map +1 -1
  36. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +4 -1
  37. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  38. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +1 -1
  39. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +20 -3
  40. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  41. package/build/browser/v2.0/generateMetadata.d.ts.map +1 -1
  42. package/build/browser/v2.0/generateMetadata.js +1 -1
  43. package/build/browser/v2.0/generateMetadata.js.map +1 -1
  44. package/build/browser/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
  45. package/build/browser/v2.0/generatePerActionDataFiles.js +7 -3
  46. package/build/browser/v2.0/generatePerActionDataFiles.js.map +1 -1
  47. package/build/browser/v2.0/generatePerObjectDataFiles.d.ts.map +1 -1
  48. package/build/browser/v2.0/generatePerQueryDataFiles.d.ts.map +1 -1
  49. package/build/browser/v2.0/generateRootIndexTsFile.d.ts.map +1 -1
  50. package/build/browser/v2.0/generateRootIndexTsFile.js +2 -1
  51. package/build/browser/v2.0/generateRootIndexTsFile.js.map +1 -1
  52. package/build/browser/v2.0/getDescriptionIfPresent.d.ts.map +1 -1
  53. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
  54. package/build/browser/validateWireOntologyAssumptions.d.ts.map +1 -1
  55. package/build/esm/GenerateContext/EnhancedAction.d.ts +3 -3
  56. package/build/esm/GenerateContext/EnhancedAction.d.ts.map +1 -1
  57. package/build/esm/GenerateContext/EnhancedBase.d.ts.map +1 -1
  58. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts +1 -1
  59. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -1
  60. package/build/esm/GenerateContext/EnhancedObjectType.d.ts.map +1 -1
  61. package/build/esm/GenerateContext/EnhancedOntologyDefinition.d.ts +7 -5
  62. package/build/esm/GenerateContext/EnhancedOntologyDefinition.d.ts.map +1 -1
  63. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js.map +1 -1
  64. package/build/esm/GenerateContext/EnhancedQuery.d.ts +3 -3
  65. package/build/esm/GenerateContext/EnhancedQuery.d.ts.map +1 -1
  66. package/build/esm/GenerateContext/ForeignType.d.ts.map +1 -1
  67. package/build/esm/generateClientSdkPackage.d.ts +4 -17
  68. package/build/esm/generateClientSdkPackage.d.ts.map +1 -1
  69. package/build/esm/generateClientSdkPackage.js +3 -3
  70. package/build/esm/generateClientSdkPackage.js.map +1 -1
  71. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +1 -1
  72. package/build/esm/shared/getObjectImports.d.ts.map +1 -1
  73. package/build/esm/shared/getObjectTypeApiNamesFromQuery.d.ts.map +1 -1
  74. package/build/esm/shared/getObjectTypesFromQueryDataType.d.ts.map +1 -1
  75. package/build/esm/shared/propertyJsdoc.d.ts.map +1 -1
  76. package/build/esm/util/commaSeparatedIdentifiers.d.ts.map +1 -1
  77. package/build/esm/util/commaSeparatedTypeIdentifiers.d.ts.map +1 -1
  78. package/build/esm/util/reservedKeywords.d.ts.map +1 -1
  79. package/build/esm/util/stringUnionFrom.d.ts.map +1 -1
  80. package/build/esm/util/stringify.d.ts.map +1 -1
  81. package/build/esm/util/test/TodoWireOntology.d.ts +2 -221
  82. package/build/esm/util/test/TodoWireOntology.d.ts.map +1 -1
  83. package/build/esm/util/test/TodoWireOntology.js +14 -1
  84. package/build/esm/util/test/TodoWireOntology.js.map +1 -1
  85. package/build/esm/util/test/compileThis.d.ts.map +1 -1
  86. package/build/esm/util/test/createMockMinimalFiles.d.ts.map +1 -1
  87. package/build/esm/util/test/formatTs.d.ts.map +1 -1
  88. package/build/esm/util/verifyOutDir.d.ts.map +1 -1
  89. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +4 -1
  90. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
  91. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +1 -1
  92. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +20 -3
  93. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
  94. package/build/esm/v2.0/generateMetadata.d.ts.map +1 -1
  95. package/build/esm/v2.0/generateMetadata.js +1 -1
  96. package/build/esm/v2.0/generateMetadata.js.map +1 -1
  97. package/build/esm/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
  98. package/build/esm/v2.0/generatePerActionDataFiles.js +7 -3
  99. package/build/esm/v2.0/generatePerActionDataFiles.js.map +1 -1
  100. package/build/esm/v2.0/generatePerObjectDataFiles.d.ts.map +1 -1
  101. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts.map +1 -1
  102. package/build/esm/v2.0/generateRootIndexTsFile.d.ts.map +1 -1
  103. package/build/esm/v2.0/generateRootIndexTsFile.js +2 -1
  104. package/build/esm/v2.0/generateRootIndexTsFile.js.map +1 -1
  105. package/build/esm/v2.0/getDescriptionIfPresent.d.ts.map +1 -1
  106. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
  107. package/build/esm/validateWireOntologyAssumptions.d.ts.map +1 -1
  108. package/package.json +7 -7
@@ -1,222 +1,3 @@
1
- export declare const TodoWireOntology: {
2
- ontology: {
3
- rid: string;
4
- apiName: string;
5
- displayName: string;
6
- description: string;
7
- };
8
- actionTypes: {
9
- markTodoCompleted: {
10
- apiName: string;
11
- description: string;
12
- parameters: {
13
- object: {
14
- description: string;
15
- dataType: {
16
- type: "object";
17
- objectApiName: string;
18
- objectTypeApiName: string;
19
- };
20
- required: false;
21
- };
22
- };
23
- rid: string;
24
- operations: {
25
- type: "modifyObject";
26
- objectTypeApiName: string;
27
- }[];
28
- status: "ACTIVE";
29
- };
30
- deleteTodos: {
31
- apiName: string;
32
- description: string;
33
- parameters: {
34
- object: {
35
- description: string;
36
- dataType: {
37
- type: "array";
38
- subType: {
39
- type: "object";
40
- objectApiName: string;
41
- objectTypeApiName: string;
42
- };
43
- };
44
- required: false;
45
- };
46
- };
47
- rid: string;
48
- operations: {
49
- type: "deleteObject";
50
- objectTypeApiName: string;
51
- }[];
52
- status: "ACTIVE";
53
- };
54
- };
55
- objectTypes: {
56
- Todo: {
57
- objectType: {
58
- apiName: string;
59
- primaryKey: string;
60
- displayName: string;
61
- pluralDisplayName: string;
62
- icon: {
63
- type: "blueprint";
64
- name: string;
65
- color: string;
66
- };
67
- description: string;
68
- titleProperty: string;
69
- properties: {
70
- id: {
71
- dataType: {
72
- type: "integer";
73
- };
74
- rid: string;
75
- };
76
- body: {
77
- dataType: {
78
- type: "string";
79
- };
80
- description: string;
81
- displayName: string;
82
- rid: string;
83
- };
84
- complete: {
85
- dataType: {
86
- type: "boolean";
87
- };
88
- rid: string;
89
- };
90
- };
91
- status: "ACTIVE";
92
- rid: string;
93
- };
94
- linkTypes: {
95
- apiName: string;
96
- cardinality: "ONE";
97
- displayName: string;
98
- objectTypeApiName: string;
99
- status: "ACTIVE";
100
- foreignKeyPropertyApiName: string;
101
- linkTypeRid: string;
102
- }[];
103
- implementsInterfaces: string[];
104
- implementsInterfaces2: {
105
- SomeInterface: {
106
- properties: {
107
- SomeProperty: string;
108
- };
109
- };
110
- };
111
- sharedPropertyTypeMapping: {};
112
- };
113
- Person: {
114
- objectType: {
115
- apiName: string;
116
- primaryKey: string;
117
- displayName: string;
118
- pluralDisplayName: string;
119
- icon: {
120
- type: "blueprint";
121
- name: string;
122
- color: string;
123
- };
124
- description: string;
125
- titleProperty: string;
126
- properties: {
127
- email: {
128
- dataType: {
129
- type: "string";
130
- };
131
- rid: string;
132
- };
133
- };
134
- rid: string;
135
- status: "ACTIVE";
136
- };
137
- linkTypes: {
138
- apiName: string;
139
- cardinality: "MANY";
140
- displayName: string;
141
- objectTypeApiName: string;
142
- status: "ACTIVE";
143
- foreignKeyPropertyApiName: string;
144
- linkTypeRid: string;
145
- }[];
146
- implementsInterfaces: never[];
147
- implementsInterfaces2: {};
148
- sharedPropertyTypeMapping: {};
149
- };
150
- };
151
- queryTypes: {
152
- getCount: {
153
- apiName: string;
154
- output: {
155
- type: "integer";
156
- };
157
- parameters: {
158
- completed: {
159
- dataType: {
160
- type: "boolean";
161
- };
162
- };
163
- };
164
- rid: string;
165
- version: string;
166
- };
167
- returnsTodo: {
168
- apiName: string;
169
- output: {
170
- type: "object";
171
- objectApiName: string;
172
- objectTypeApiName: string;
173
- };
174
- parameters: {
175
- someTodo: {
176
- description: string;
177
- dataType: {
178
- type: "object";
179
- objectApiName: string;
180
- objectTypeApiName: string;
181
- };
182
- };
183
- };
184
- rid: string;
185
- version: string;
186
- };
187
- };
188
- interfaceTypes: {
189
- SomeInterface: {
190
- apiName: string;
191
- description: string;
192
- properties: {
193
- SomeProperty: {
194
- apiName: string;
195
- description: string;
196
- displayName: string;
197
- dataType: {
198
- type: "string";
199
- };
200
- rid: string;
201
- };
202
- };
203
- rid: string;
204
- displayName: string;
205
- extendsInterfaces: never[];
206
- links: {};
207
- implementedByObjectTypes: never[];
208
- };
209
- };
210
- sharedPropertyTypes: {
211
- SomeProperty: {
212
- apiName: string;
213
- description: string;
214
- displayName: string;
215
- dataType: {
216
- type: "string";
217
- };
218
- rid: string;
219
- };
220
- };
221
- };
1
+ import type { WireOntologyDefinition } from "../../WireOntologyDefinition.js";
2
+ export declare const TodoWireOntology: WireOntologyDefinition;
222
3
  //# sourceMappingURL=TodoWireOntology.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TodoWireOntology.d.ts","sourceRoot":"","sources":["../../../../src/util/test/TodoWireOntology.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkNK,CAAC"}
1
+ {"version":3,"file":"TodoWireOntology.d.ts","sourceRoot":"","sources":["../../../../src/util/test/TodoWireOntology.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAE9E,eAAO,MAAM,gBAAgB,EAAE,sBA+NY,CAAC"}
@@ -219,7 +219,20 @@ export const TodoWireOntology = {
219
219
  displayName: "Sum Interface",
220
220
  extendsInterfaces: [],
221
221
  links: {},
222
- implementedByObjectTypes: []
222
+ implementedByObjectTypes: [],
223
+ allProperties: {
224
+ "SomeProperty": {
225
+ apiName: "SomeProperty",
226
+ description: "Some property",
227
+ displayName: "Sum Property",
228
+ dataType: {
229
+ type: "string"
230
+ },
231
+ rid: "idk2"
232
+ }
233
+ },
234
+ allExtendsInterfaces: [],
235
+ allLinks: {}
223
236
  }
224
237
  },
225
238
  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","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;UAC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AwB,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":[]}
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","allProperties","allExtendsInterfaces","allLinks","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 allProperties: {\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 allExtendsInterfaces: [],\n allLinks: {},\n },\n },\n sharedPropertyTypes: {\n SomeProperty: {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \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I,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,CAAC;MACTC,wBAAwB,EAAE,EAAE;MAC5BC,aAAa,EAAE;QACX,cAAc,EAAE;UACZ7C,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;MACD+C,oBAAoB,EAAE,EAAE;MACxBC,QAAQ,EAAE,CAAC;IACf;EACJ,CAAC;EACDC,mBAAmB,EAAE;IACjBC,YAAY,EAAE;MACVjD,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 +1 @@
1
- {"version":3,"file":"compileThis.d.ts","sourceRoot":"","sources":["../../../../src/util/test/compileThis.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,4BA0B1E"}
1
+ {"version":3,"file":"compileThis.d.ts","sourceRoot":"","sources":["../../../../src/util/test/compileThis.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,QAAQ,EAAE,MAAM,GACf,SAAS,EAAE,CAAC,UAAU,EAAE,CA0B1B"}
@@ -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;;mBAYR,WAAW;;iBAEf,SAAS;;;;;;EAWlC"}
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,IAAI;IACxC,YAAY,EAAE;QACZ,SAAS,EAAE,WAAW,CAAC;QACvB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,EAAE,SAAS,CAAC;KACpB,CAAC;IACF,QAAQ,EAAE,MAAM;QACd,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACrB,CAAC;IACF,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAChC,CAyBA"}
@@ -1 +1 @@
1
- {"version":3,"file":"formatTs.d.ts","sourceRoot":"","sources":["../../../../src/util/test/formatTs.ts"],"names":[],"mappings":"AAkBA,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,4BAcxC"}
1
+ {"version":3,"file":"formatTs.d.ts","sourceRoot":"","sources":["../../../../src/util/test/formatTs.ts"],"names":[],"mappings":"AAkBA,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAcnE"}
@@ -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,CAChC,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,SAAS,GACZ,OAAO,CAAC,IAAI,CAAC,CAgBf"}
@@ -40,7 +40,10 @@ function simpleInterface(apiName, spts, parents, metadataLevel = 2) {
40
40
  extendsInterfaces: parents,
41
41
  links: {},
42
42
  properties,
43
- implementedByObjectTypes: []
43
+ implementedByObjectTypes: [],
44
+ allExtendsInterfaces: parents,
45
+ allLinks: {},
46
+ allProperties: properties
44
47
  };
45
48
  }
46
49
  function simpleOntology(apiName, interfaces) {
@@ -1 +1 @@
1
- {"version":3,"file":"UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js","names":["format","describe","expect","it","EnhancedInterfaceType","enhanceOntology","ForeignType","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst","simpleSpt","apiName","metadataLevel","dataType","type","rid","displayName","description","undefined","simpleInterface","spts","parents","properties","Object","fromEntries","map","spt","extendsInterfaces","links","implementedByObjectTypes","simpleOntology","interfaces","interfaceTypes","i","sharedPropertyTypes","flatMap","entries","actionTypes","objectTypes","ontology","queryTypes","sanitized","importExt","Bar","toBe","Error","formattedCode","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 { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.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 implementedByObjectTypes: [],\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({\n sanitized: simpleOntology(\"ontology\", [\n simpleInterface(\"Bar\", [simpleSpt(\"bar\", 0)], [], 0),\n ]),\n importExt: \"\",\n });\n expect(ontology.interfaceTypes.Bar instanceof EnhancedInterfaceType).toBe(true);\n // type guard for below\n if (ontology.interfaceTypes.Bar instanceof ForeignType) {\n throw new Error(\"Expected Bar to be an EnhancedInterfaceType\");\n }\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Bar, ontology, true, 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 type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Bar, Bar.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Bar.Props = keyof Bar.Props,\n > = $Osdk.Instance<Bar, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Bar.Props = keyof Bar.Props,\n > = OsdkInstance<OPTIONS, K>;\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({\n sanitized: simpleOntology(\"ontology\", [\n simpleInterface(\"Foo\", [fooSpt], [\"Parent\"]),\n simpleInterface(\"Parent\", [barSpt], []),\n ]),\n importExt: \"\",\n });\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true, 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 type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = $Osdk.Instance<Foo, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = OsdkInstance<OPTIONS, K>;\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({\n sanitized: simpleOntology(\"ontology\", [\n simpleInterface(\"Foo\", [fooSpt, barSpt], [\"Parent\"]),\n simpleInterface(\"Parent\", [barSpt], []),\n ]),\n importExt: \"\",\n });\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true, 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 type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = $Osdk.Instance<Foo, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = OsdkInstance<OPTIONS, K>;\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: 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,qBAAqB,QAAQ,6CAA6C;AACnF,SAASC,eAAe,QAAQ,uCAAuC;AACvE,SAASC,WAAW,QAAQ,mCAAmC;AAC/D,SAASC,8CAA8C,QAAQ,mDAAmD;AAClH,SAASC,SAASA,CAACC,OAAO,EAAEC,aAAa,GAAG,CAAC,EAAE;EAC3C,OAAO;IACHD,OAAO;IACPE,QAAQ,EAAE;MACNC,IAAI,EAAE;IACV,CAAC;IACDC,GAAG,EAAE,GAAGJ,OAAO,KAAK;IACpBK,WA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AAQ,GAAGhC,eAAe,CAAC;MAC7BkC,SAAS,EAAEX,cAAc,CAAC,UAAU,EAAE,CAClCX,eAAe,CAAC,KAAK,EAAE,CAAC+B,MAAM,EAAEC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EACpDhC,eAAe,CAAC,QAAQ,EAAE,CAACgC,MAAM,CAAC,EAAE,EAAE,CAAC,CAC1C,CAAC;MACFT,SAAS,EAAE;IACf,CAAC,CAAC;IACF,MAAMI,aAAa,GAAG,MAAM5C,MAAM,CAACO,8CAA8C,CAAC8B,QAAQ,CAACP,cAAc,CAACoB,GAAG,EAAEb,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE;MAClIQ,MAAM,EAAE;IACZ,CAAC,CAAC;IACF3C,MAAM,CAAC0C,aAAa,CAAC,CAACG,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;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","EnhancedInterfaceType","enhanceOntology","ForeignType","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst","simpleSpt","apiName","metadataLevel","dataType","type","rid","displayName","description","undefined","simpleInterface","spts","parents","properties","Object","fromEntries","map","spt","extendsInterfaces","links","implementedByObjectTypes","allExtendsInterfaces","allLinks","allProperties","simpleOntology","interfaces","interfaceTypes","i","sharedPropertyTypes","flatMap","entries","actionTypes","objectTypes","ontology","queryTypes","sanitized","importExt","Bar","toBe","Error","formattedCode","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 { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { ForeignType } from \"../GenerateContext/ForeignType.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 implementedByObjectTypes: [],\n allExtendsInterfaces: parents,\n allLinks: {},\n allProperties: 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({\n sanitized: simpleOntology(\"ontology\", [\n simpleInterface(\"Bar\", [simpleSpt(\"bar\", 0)], [], 0),\n ]),\n importExt: \"\",\n });\n expect(ontology.interfaceTypes.Bar instanceof EnhancedInterfaceType).toBe(true);\n // type guard for below\n if (ontology.interfaceTypes.Bar instanceof ForeignType) {\n throw new Error(\"Expected Bar to be an EnhancedInterfaceType\");\n }\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Bar, ontology, true, 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 type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Bar, Bar.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Bar.Props = keyof Bar.Props,\n > = $Osdk.Instance<Bar, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Bar.Props = keyof Bar.Props,\n > = OsdkInstance<OPTIONS, K>;\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({\n sanitized: simpleOntology(\"ontology\", [\n simpleInterface(\"Foo\", [fooSpt], [\"Parent\"]),\n simpleInterface(\"Parent\", [barSpt], []),\n ]),\n importExt: \"\",\n });\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true, 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 type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = $Osdk.Instance<Foo, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = OsdkInstance<OPTIONS, K>;\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({\n sanitized: simpleOntology(\"ontology\", [\n simpleInterface(\"Foo\", [fooSpt, barSpt], [\"Parent\"]),\n simpleInterface(\"Parent\", [barSpt], []),\n ]),\n importExt: \"\",\n });\n const formattedCode = await format(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(ontology.interfaceTypes.Foo, ontology, true, 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 type StrictProps = Props;\n\n export interface ObjectSet extends $ObjectSet<Foo, Foo.ObjectSet> {}\n\n export type OsdkInstance<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = $Osdk.Instance<Foo, OPTIONS, K>;\n\n /** @deprecated use OsdkInstance */\n export type OsdkObject<\n OPTIONS extends never | \"$rid\" = never,\n K extends keyof Foo.Props = keyof Foo.Props,\n > = OsdkInstance<OPTIONS, K>;\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: 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,qBAAqB,QAAQ,6CAA6C;AACnF,SAASC,eAAe,QAAQ,uCAAuC;AACvE,SAASC,WAAW,QAAQ,mCAAmC;AAC/D,SAASC,8CAA8C,QAAQ,mDAAmD;AAClH,SAASC,SAASA,CAACC,OAAO,EAAEC,aAAa,GAAG,CAAC,EAAE;EAC3C,OAAO;IACHD,OAAO;IACPE,QAAQ,EAAE;MACNC,IAAI,EAAE;IACV,CAAC;IACDC,GA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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,KAAK,CAAC;EACF,CAAC,CAAC;EACF/C,EAAE,CAAC,yCAAyC,EAAE,YAAY;IACtD,MAAMgD,MAAM,GAAG3C,SAAS,CAAC,KAAK,CAAC;IAC/B,MAAM4C,MAAM,GAAG5C,SAAS,CAAC,KAAK,CAAC;IAC/B,MAAMgC,QAAQ,GAAGnC,eAAe,CAAC;MAC7BqC,SAAS,EAAEX,cAAc,CAAC,UAAU,EAAE,CAClCd,eAAe,CAAC,KAAK,EAAE,CAACkC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAC5ClC,eAAe,CAAC,QAAQ,EAAE,CAACmC,MAAM,CAAC,EAAE,EAAE,CAAC,CAC1C,CAAC;MACFT,SAAS,EAAE;IACf,CAAC,CAAC;IACF,MAAMI,aAAa,GAAG,MAAM/C,MAAM,CAACO,8CAA8C,CAACiC,QAAQ,CAACP,cAAc,CAACoB,GAAG,EAAEb,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE;MAClIQ,MAAM,EAAE;IACZ,CAAC,CAAC;IACF9C,MAAM,CAAC6C,aAAa,CAAC,CAACG,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,KAAK,CAAC;EACF,CAAC,CAAC;EACF/C,EAAE,CAAC,kCAAkC,EAAE,YAAY;IAC/C,MAAMgD,MAAM,GAAG3C,SAAS,CAAC,KAAK,CAAC;IAC/B,MAAM4C,MAAM,GAAG5C,SAAS,CAAC,KAAK,CAAC;IAC/B,MAAMgC,QAAQ,GAAGnC,eAAe,CAAC;MAC7BqC,SAAS,EAAEX,cAAc,CAAC,UAAU,EAAE,CAClCd,eAAe,CAAC,KAAK,EAAE,CAACkC,MAAM,EAAEC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EACpDnC,eAAe,CAAC,QAAQ,EAAE,CAACmC,MAAM,CAAC,EAAE,EAAE,CAAC,CAC1C,CAAC;MACFT,SAAS,EAAE;IACf,CAAC,CAAC;IACF,MAAMI,aAAa,GAAG,MAAM/C,MAAM,CAACO,8CAA8C,CAACiC,QAAQ,CAACP,cAAc,CAACoB,GAAG,EAAEb,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE;MAClIQ,MAAM,EAAE;IACZ,CAAC,CAAC;IACF9C,MAAM,CAAC6C,aAAa,CAAC,CAACG,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;AACA;AACA;AACA,KAAK,CAAC;EACF,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"generateClientSdkVersionTwoPointZero.d.ts","sourceRoot":"","sources":["../../../src/v2.0/generateClientSdkVersionTwoPointZero.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAQ3E,wBAAsB,oCAAoC,CACxD,QAAQ,EAAE,sBAAsB,EAChC,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,QAAQ,GAAG,UAAuB,EAC/C,eAAe,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAa,EAChD,kBAAkB,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAa,EACnD,YAAY,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAa,EAC7C,cAAc,GAAE,OAAe,iBAmChC"}
1
+ {"version":3,"file":"generateClientSdkVersionTwoPointZero.d.ts","sourceRoot":"","sources":["../../../src/v2.0/generateClientSdkVersionTwoPointZero.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAQ3E,wBAAsB,oCAAoC,CACxD,QAAQ,EAAE,sBAAsB,EAChC,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,QAAQ,GAAG,UAAuB,EAC/C,eAAe,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAa,EAChD,kBAAkB,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAa,EACnD,YAAY,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAa,EAC7C,cAAc,GAAE,OAAe,GAC9B,OAAO,CAAC,IAAI,CAAC,CAkCf"}
@@ -194,7 +194,19 @@ const referencedOntology = {
194
194
  }
195
195
  },
196
196
  implementedByObjectTypes: [],
197
- links: {}
197
+ links: {},
198
+ allExtendsInterfaces: [],
199
+ allLinks: {},
200
+ allProperties: {
201
+ "com.example.dep.spt": {
202
+ apiName: "com.example.dep.spt",
203
+ dataType: {
204
+ type: "string"
205
+ },
206
+ displayName: "Some Property",
207
+ rid: "idk"
208
+ }
209
+ }
198
210
  }
199
211
  },
200
212
  "sharedPropertyTypes": {
@@ -368,7 +380,9 @@ describe("generator", () => {
368
380
  beforeEach(async () => {
369
381
  helper = createMockMinimalFiles();
370
382
  });
371
- test("should be able to generate a project", async () => {
383
+ test("should be able to generate a project", {
384
+ timeout: 20_000
385
+ }, async () => {
372
386
  await generateClientSdkVersionTwoPointZero(TodoWireOntology, "typescript-sdk/0.0.0 osdk-cli/0.0.0", helper.minimalFiles, BASE_PATH);
373
387
  const files = helper.getFiles();
374
388
  expect(files).toMatchObject({
@@ -378,7 +392,7 @@ describe("generator", () => {
378
392
  });
379
393
  const diagnostics = compileThis(helper.getFiles(), BASE_PATH);
380
394
  for (const q of diagnostics) {
381
- console.error(`${q.file?.fileName}:${q.file?.getLineStarts()} ${q.messageText}`);
395
+ console.error(`${q.file?.fileName}:${q.file?.getLineStarts()}`, q.messageText);
382
396
  }
383
397
  // TODO: Certain errors are expected since we can't resolve the static code, but we should fix them.
384
398
  const errors = diagnostics.filter(q => q.code !== 2792);
@@ -398,6 +412,7 @@ describe("generator", () => {
398
412
  export * as $Objects from './ontology/objects';
399
413
  export { getCount, returnsTodo } from './ontology/queries';
400
414
  export * as $Queries from './ontology/queries';
415
+ export { $osdkMetadata } from './OntologyMetadata';
401
416
  export { $ontologyRid } from './OntologyMetadata';
402
417
  ",
403
418
  "/foo/ontology/actions.ts": "export { deleteTodos } from './actions/deleteTodos';
@@ -978,6 +993,7 @@ describe("generator", () => {
978
993
  export * as $Objects from './ontology/objects.js';
979
994
  export { getCount, returnsTodo } from './ontology/queries.js';
980
995
  export * as $Queries from './ontology/queries.js';
996
+ export { $osdkMetadata } from './OntologyMetadata.js';
981
997
  export { $ontologyRid } from './OntologyMetadata.js';
982
998
  ",
983
999
  "/foo/ontology/actions.ts": "export { deleteTodos } from './actions/deleteTodos.js';
@@ -1830,6 +1846,7 @@ describe("generator", () => {
1830
1846
  export * as $Objects from './ontology/objects.js';
1831
1847
  export {} from './ontology/queries.js';
1832
1848
  export * as $Queries from './ontology/queries.js';
1849
+ export { $osdkMetadata } from './OntologyMetadata.js';
1833
1850
  export { $ontologyRid } from './OntologyMetadata.js';
1834
1851
  ",
1835
1852
  "/foo/ontology/actions.ts": "export {};