@osdk/maker 0.15.0-beta.5 → 0.15.0-beta.7

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 (154) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/build/browser/api/action/ActionParameter.js.map +1 -1
  3. package/build/browser/api/action/ActionParameterConfiguration.js.map +1 -1
  4. package/build/browser/api/defineAction.js +65 -22
  5. package/build/browser/api/defineAction.js.map +1 -1
  6. package/build/browser/api/defineCreateInterfaceObjectAction.js +28 -8
  7. package/build/browser/api/defineCreateInterfaceObjectAction.js.map +1 -1
  8. package/build/browser/api/defineInterface.js +40 -34
  9. package/build/browser/api/defineInterface.js.map +1 -1
  10. package/build/browser/api/defineModifyInterfaceObjectAction.js +31 -8
  11. package/build/browser/api/defineModifyInterfaceObjectAction.js.map +1 -1
  12. package/build/browser/api/defineObject.js +53 -14
  13. package/build/browser/api/defineObject.js.map +1 -1
  14. package/build/browser/api/defineSpt.js.map +1 -1
  15. package/build/browser/api/interface/InterfacePropertyType.js +22 -1
  16. package/build/browser/api/interface/InterfacePropertyType.js.map +1 -1
  17. package/build/browser/api/interface/InterfaceType.js.map +1 -1
  18. package/build/browser/api/interface/getFlattenedInterfaceProperties.js +9 -3
  19. package/build/browser/api/interface/getFlattenedInterfaceProperties.js.map +1 -1
  20. package/build/browser/api/object/ObjectType.js.map +1 -1
  21. package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -1
  22. package/build/browser/api/properties/PropertyTypeType.js +1 -1
  23. package/build/browser/api/properties/PropertyTypeType.js.map +1 -1
  24. package/build/browser/api/properties/SharedPropertyType.js.map +1 -1
  25. package/build/browser/api/test/actions.test.js +6105 -5850
  26. package/build/browser/api/test/actions.test.js.map +1 -1
  27. package/build/browser/api/test/interfaces.test.js +723 -470
  28. package/build/browser/api/test/interfaces.test.js.map +1 -1
  29. package/build/browser/api/test/links.test.js +1334 -1325
  30. package/build/browser/api/test/links.test.js.map +1 -1
  31. package/build/browser/api/test/misc.test.js +262 -11
  32. package/build/browser/api/test/misc.test.js.map +1 -1
  33. package/build/browser/api/test/objects.test.js +1872 -1412
  34. package/build/browser/api/test/objects.test.js.map +1 -1
  35. package/build/browser/api/test/spt.test.js +250 -103
  36. package/build/browser/api/test/spt.test.js.map +1 -1
  37. package/build/browser/cli/main.js +1 -1
  38. package/build/browser/conversion/toMarketplace/convertActionValidation.js +1 -1
  39. package/build/browser/conversion/toMarketplace/convertActionValidation.js.map +1 -1
  40. package/build/browser/conversion/toMarketplace/convertInterface.js +2 -2
  41. package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -1
  42. package/build/browser/conversion/toMarketplace/convertInterfacePropertyType.js +66 -0
  43. package/build/browser/conversion/toMarketplace/convertInterfacePropertyType.js.map +1 -0
  44. package/build/browser/conversion/toMarketplace/convertMappingValue.js +35 -0
  45. package/build/browser/conversion/toMarketplace/convertMappingValue.js.map +1 -1
  46. package/build/browser/conversion/toMarketplace/convertObject.js +4 -2
  47. package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -1
  48. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js +2 -1
  49. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -1
  50. package/build/browser/conversion/toMarketplace/convertSpt.js +4 -2
  51. package/build/browser/conversion/toMarketplace/convertSpt.js.map +1 -1
  52. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js +143 -0
  53. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js.map +1 -0
  54. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +4 -0
  55. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -1
  56. package/build/browser/index.js.map +1 -1
  57. package/build/cjs/index.cjs +417 -114
  58. package/build/cjs/index.cjs.map +1 -1
  59. package/build/cjs/index.d.cts +28 -13
  60. package/build/esm/api/action/ActionParameter.js.map +1 -1
  61. package/build/esm/api/action/ActionParameterConfiguration.js.map +1 -1
  62. package/build/esm/api/defineAction.js +65 -22
  63. package/build/esm/api/defineAction.js.map +1 -1
  64. package/build/esm/api/defineCreateInterfaceObjectAction.js +28 -8
  65. package/build/esm/api/defineCreateInterfaceObjectAction.js.map +1 -1
  66. package/build/esm/api/defineInterface.js +40 -34
  67. package/build/esm/api/defineInterface.js.map +1 -1
  68. package/build/esm/api/defineModifyInterfaceObjectAction.js +31 -8
  69. package/build/esm/api/defineModifyInterfaceObjectAction.js.map +1 -1
  70. package/build/esm/api/defineObject.js +53 -14
  71. package/build/esm/api/defineObject.js.map +1 -1
  72. package/build/esm/api/defineSpt.js.map +1 -1
  73. package/build/esm/api/interface/InterfacePropertyType.js +22 -1
  74. package/build/esm/api/interface/InterfacePropertyType.js.map +1 -1
  75. package/build/esm/api/interface/InterfaceType.js.map +1 -1
  76. package/build/esm/api/interface/getFlattenedInterfaceProperties.js +9 -3
  77. package/build/esm/api/interface/getFlattenedInterfaceProperties.js.map +1 -1
  78. package/build/esm/api/object/ObjectType.js.map +1 -1
  79. package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -1
  80. package/build/esm/api/properties/PropertyTypeType.js +1 -1
  81. package/build/esm/api/properties/PropertyTypeType.js.map +1 -1
  82. package/build/esm/api/properties/SharedPropertyType.js.map +1 -1
  83. package/build/esm/api/test/actions.test.js +6105 -5850
  84. package/build/esm/api/test/actions.test.js.map +1 -1
  85. package/build/esm/api/test/interfaces.test.js +723 -470
  86. package/build/esm/api/test/interfaces.test.js.map +1 -1
  87. package/build/esm/api/test/links.test.js +1334 -1325
  88. package/build/esm/api/test/links.test.js.map +1 -1
  89. package/build/esm/api/test/misc.test.js +262 -11
  90. package/build/esm/api/test/misc.test.js.map +1 -1
  91. package/build/esm/api/test/objects.test.js +1872 -1412
  92. package/build/esm/api/test/objects.test.js.map +1 -1
  93. package/build/esm/api/test/spt.test.js +250 -103
  94. package/build/esm/api/test/spt.test.js.map +1 -1
  95. package/build/esm/cli/main.js +1 -1
  96. package/build/esm/conversion/toMarketplace/convertActionValidation.js +1 -1
  97. package/build/esm/conversion/toMarketplace/convertActionValidation.js.map +1 -1
  98. package/build/esm/conversion/toMarketplace/convertInterface.js +2 -2
  99. package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -1
  100. package/build/esm/conversion/toMarketplace/convertInterfacePropertyType.js +66 -0
  101. package/build/esm/conversion/toMarketplace/convertInterfacePropertyType.js.map +1 -0
  102. package/build/esm/conversion/toMarketplace/convertMappingValue.js +35 -0
  103. package/build/esm/conversion/toMarketplace/convertMappingValue.js.map +1 -1
  104. package/build/esm/conversion/toMarketplace/convertObject.js +4 -2
  105. package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -1
  106. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js +2 -1
  107. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -1
  108. package/build/esm/conversion/toMarketplace/convertSpt.js +4 -2
  109. package/build/esm/conversion/toMarketplace/convertSpt.js.map +1 -1
  110. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js +143 -0
  111. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js.map +1 -0
  112. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +4 -0
  113. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -1
  114. package/build/esm/index.js.map +1 -1
  115. package/build/types/api/action/ActionParameter.d.ts +2 -1
  116. package/build/types/api/action/ActionParameter.d.ts.map +1 -1
  117. package/build/types/api/action/ActionParameterConfiguration.d.ts +2 -1
  118. package/build/types/api/action/ActionParameterConfiguration.d.ts.map +1 -1
  119. package/build/types/api/defineAction.d.ts +4 -3
  120. package/build/types/api/defineAction.d.ts.map +1 -1
  121. package/build/types/api/defineCreateInterfaceObjectAction.d.ts.map +1 -1
  122. package/build/types/api/defineInterface.d.ts +5 -5
  123. package/build/types/api/defineInterface.d.ts.map +1 -1
  124. package/build/types/api/defineModifyInterfaceObjectAction.d.ts.map +1 -1
  125. package/build/types/api/defineObject.d.ts.map +1 -1
  126. package/build/types/api/defineSpt.d.ts +3 -0
  127. package/build/types/api/defineSpt.d.ts.map +1 -1
  128. package/build/types/api/interface/InterfacePropertyType.d.ts +12 -2
  129. package/build/types/api/interface/InterfacePropertyType.d.ts.map +1 -1
  130. package/build/types/api/interface/InterfaceType.d.ts +3 -2
  131. package/build/types/api/interface/InterfaceType.d.ts.map +1 -1
  132. package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts +1 -1
  133. package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts.map +1 -1
  134. package/build/types/api/object/ObjectType.d.ts +1 -0
  135. package/build/types/api/object/ObjectType.d.ts.map +1 -1
  136. package/build/types/api/object/ObjectTypeDefinition.d.ts +1 -0
  137. package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -1
  138. package/build/types/api/properties/PropertyTypeType.d.ts +1 -0
  139. package/build/types/api/properties/PropertyTypeType.d.ts.map +1 -1
  140. package/build/types/api/properties/SharedPropertyType.d.ts +1 -0
  141. package/build/types/api/properties/SharedPropertyType.d.ts.map +1 -1
  142. package/build/types/conversion/toMarketplace/convertInterface.d.ts.map +1 -1
  143. package/build/types/conversion/toMarketplace/convertInterfacePropertyType.d.ts +3 -0
  144. package/build/types/conversion/toMarketplace/convertInterfacePropertyType.d.ts.map +1 -0
  145. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts +2 -1
  146. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts.map +1 -1
  147. package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -1
  148. package/build/types/conversion/toMarketplace/convertSpt.d.ts +1 -1
  149. package/build/types/conversion/toMarketplace/convertSpt.d.ts.map +1 -1
  150. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.d.ts +3 -0
  151. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.d.ts.map +1 -0
  152. package/build/types/index.d.ts +1 -0
  153. package/build/types/index.d.ts.map +1 -1
  154. package/package.json +4 -4
@@ -165,43 +165,84 @@ describe("Object Types", () => {
165
165
  displayName: "geopoint"
166
166
  }
167
167
  },
168
+ aliases: ["alias1", "alias2"],
168
169
  implementsInterfaces: [{
169
170
  implements: sample,
170
171
  propertyMapping: [{
171
- interfaceProperty: "foo",
172
+ interfaceProperty: spt.apiName,
172
173
  mapsTo: "bar"
173
174
  }]
174
175
  }]
175
176
  });
176
177
  expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
177
- {
178
+ {
179
+ "actionTypes": {},
180
+ "blockPermissionInformation": {
178
181
  "actionTypes": {},
179
- "blockPermissionInformation": {
180
- "actionTypes": {},
181
- "linkTypes": {},
182
- "objectTypes": {},
183
- },
184
- "interfaceTypes": {
185
- "com.palantir.interface": {
186
- "interfaceType": {
187
- "apiName": "com.palantir.interface",
188
- "displayMetadata": {
189
- "description": "interface",
190
- "displayName": "interface",
191
- "icon": {
192
- "blueprint": {
193
- "color": "#4C90F0",
194
- "locator": "layout-hierarchy",
182
+ "linkTypes": {},
183
+ "objectTypes": {},
184
+ },
185
+ "interfaceTypes": {
186
+ "com.palantir.interface": {
187
+ "interfaceType": {
188
+ "apiName": "com.palantir.interface",
189
+ "displayMetadata": {
190
+ "description": "interface",
191
+ "displayName": "interface",
192
+ "icon": {
193
+ "blueprint": {
194
+ "color": "#4C90F0",
195
+ "locator": "layout-hierarchy",
196
+ },
197
+ "type": "blueprint",
198
+ },
199
+ },
200
+ "extendsInterfaces": [],
201
+ "links": [],
202
+ "properties": [],
203
+ "propertiesV2": {
204
+ "com.palantir.foo": {
205
+ "required": true,
206
+ "sharedPropertyType": {
207
+ "aliases": [],
208
+ "apiName": "com.palantir.foo",
209
+ "baseFormatter": undefined,
210
+ "dataConstraints": undefined,
211
+ "displayMetadata": {
212
+ "description": undefined,
213
+ "displayName": "foo",
214
+ "visibility": "NORMAL",
195
215
  },
196
- "type": "blueprint",
216
+ "gothamMapping": undefined,
217
+ "indexedForSearch": true,
218
+ "type": {
219
+ "string": {
220
+ "analyzerOverride": undefined,
221
+ "enableAsciiFolding": undefined,
222
+ "isLongText": false,
223
+ "supportsEfficientLeadingWildcard": false,
224
+ "supportsExactMatching": true,
225
+ },
226
+ "type": "string",
227
+ },
228
+ "typeClasses": [
229
+ {
230
+ "kind": "render_hint",
231
+ "name": "SELECTABLE",
232
+ },
233
+ {
234
+ "kind": "render_hint",
235
+ "name": "SORTABLE",
236
+ },
237
+ ],
238
+ "valueType": undefined,
197
239
  },
198
240
  },
199
- "extendsInterfaces": [],
200
- "links": [],
201
- "properties": [],
202
- "propertiesV2": {
203
- "com.palantir.foo": {
204
- "required": true,
241
+ },
242
+ "propertiesV3": {
243
+ "com.palantir.foo": {
244
+ "sharedPropertyBasedPropertyType": {
245
+ "requireImplementation": true,
205
246
  "sharedPropertyType": {
206
247
  "aliases": [],
207
248
  "apiName": "com.palantir.foo",
@@ -237,285 +278,291 @@ describe("Object Types", () => {
237
278
  "valueType": undefined,
238
279
  },
239
280
  },
281
+ "type": "sharedPropertyBasedPropertyType",
240
282
  },
241
- "propertiesV3": {},
242
- "searchable": true,
243
- "status": {
244
- "active": {},
245
- "type": "active",
246
- },
283
+ },
284
+ "searchable": true,
285
+ "status": {
286
+ "active": {},
287
+ "type": "active",
247
288
  },
248
289
  },
249
290
  },
250
- "linkTypes": {},
251
- "objectTypes": {
252
- "com.palantir.foo": {
253
- "datasources": [
254
- {
255
- "datasource": {
256
- "datasetV2": {
257
- "datasetRid": "com.palantir.foo",
258
- "propertyMapping": {
259
- "arrayProp": {
260
- "column": "arrayProp",
261
- "type": "column",
262
- },
263
- "bar": {
264
- "column": "bar",
265
- "type": "column",
266
- },
267
- "geopoint": {
268
- "struct": {
269
- "column": "geopoint",
270
- "mapping": {
271
- "lat": {
272
- "apiName": "lat",
273
- "mappings": {},
274
- },
275
- "lng": {
276
- "apiName": "lng",
277
- "mappings": {},
278
- },
291
+ },
292
+ "linkTypes": {},
293
+ "objectTypes": {
294
+ "com.palantir.foo": {
295
+ "datasources": [
296
+ {
297
+ "datasource": {
298
+ "datasetV2": {
299
+ "datasetRid": "com.palantir.foo",
300
+ "propertyMapping": {
301
+ "arrayProp": {
302
+ "column": "arrayProp",
303
+ "type": "column",
304
+ },
305
+ "bar": {
306
+ "column": "bar",
307
+ "type": "column",
308
+ },
309
+ "geopoint": {
310
+ "struct": {
311
+ "column": "geopoint",
312
+ "mapping": {
313
+ "lat": {
314
+ "apiName": "lat",
315
+ "mappings": {},
316
+ },
317
+ "lng": {
318
+ "apiName": "lng",
319
+ "mappings": {},
279
320
  },
280
321
  },
281
- "type": "struct",
282
322
  },
323
+ "type": "struct",
283
324
  },
284
325
  },
285
- "type": "datasetV2",
286
- },
287
- "datasourceName": "com.palantir.foo",
288
- "editsConfiguration": {
289
- "onlyAllowPrivilegedEdits": false,
290
326
  },
291
- "redacted": false,
327
+ "type": "datasetV2",
328
+ },
329
+ "datasourceName": "com.palantir.foo",
330
+ "editsConfiguration": {
331
+ "onlyAllowPrivilegedEdits": false,
292
332
  },
333
+ "redacted": false,
334
+ },
335
+ ],
336
+ "entityMetadata": {
337
+ "aliases": [
338
+ "alias1",
339
+ "alias2",
293
340
  ],
294
- "entityMetadata": {
295
- "arePatchesEnabled": false,
341
+ "arePatchesEnabled": false,
342
+ },
343
+ "objectType": {
344
+ "allImplementsInterfaces": {},
345
+ "apiName": "com.palantir.foo",
346
+ "displayMetadata": {
347
+ "description": undefined,
348
+ "displayName": "Foo",
349
+ "groupDisplayName": undefined,
350
+ "icon": {
351
+ "blueprint": {
352
+ "color": "#2D72D2",
353
+ "locator": "cube",
354
+ },
355
+ "type": "blueprint",
356
+ },
357
+ "pluralDisplayName": "Foo",
358
+ "visibility": "NORMAL",
296
359
  },
297
- "objectType": {
298
- "allImplementsInterfaces": {},
299
- "apiName": "com.palantir.foo",
300
- "displayMetadata": {
301
- "description": undefined,
302
- "displayName": "Foo",
303
- "groupDisplayName": undefined,
304
- "icon": {
305
- "blueprint": {
306
- "color": "#2D72D2",
307
- "locator": "cube",
360
+ "implementsInterfaces2": [
361
+ {
362
+ "interfaceTypeApiName": "com.palantir.interface",
363
+ "linksV2": {},
364
+ "properties": {
365
+ "com.palantir.foo": {
366
+ "propertyTypeRid": "bar",
308
367
  },
309
- "type": "blueprint",
310
368
  },
311
- "pluralDisplayName": "Foo",
312
- "visibility": "NORMAL",
369
+ "propertiesV2": {},
313
370
  },
314
- "implementsInterfaces2": [
315
- {
316
- "interfaceTypeApiName": "com.palantir.interface",
317
- "linksV2": {},
318
- "properties": {
319
- "com.palantir.foo": {
320
- "propertyTypeRid": "bar",
321
- },
322
- },
323
- "propertiesV2": {},
371
+ ],
372
+ "primaryKeys": [
373
+ "bar",
374
+ ],
375
+ "propertyTypes": {
376
+ "arrayProp": {
377
+ "apiName": "arrayProp",
378
+ "baseFormatter": undefined,
379
+ "dataConstraints": undefined,
380
+ "displayMetadata": {
381
+ "description": undefined,
382
+ "displayName": "Array Property Test",
383
+ "visibility": "NORMAL",
324
384
  },
325
- ],
326
- "primaryKeys": [
327
- "bar",
328
- ],
329
- "propertyTypes": {
330
- "arrayProp": {
331
- "apiName": "arrayProp",
332
- "baseFormatter": undefined,
333
- "dataConstraints": undefined,
334
- "displayMetadata": {
335
- "description": undefined,
336
- "displayName": "Array Property Test",
337
- "visibility": "NORMAL",
338
- },
339
- "indexedForSearch": true,
340
- "inlineAction": undefined,
341
- "ruleSetBinding": undefined,
342
- "sharedPropertyTypeApiName": undefined,
343
- "sharedPropertyTypeRid": undefined,
344
- "status": {
345
- "active": {},
346
- "type": "active",
347
- },
348
- "type": {
349
- "array": {
350
- "subtype": {
351
- "string": {
352
- "analyzerOverride": undefined,
353
- "enableAsciiFolding": undefined,
354
- "isLongText": false,
355
- "supportsEfficientLeadingWildcard": false,
356
- "supportsExactMatching": true,
357
- },
358
- "type": "string",
385
+ "indexedForSearch": true,
386
+ "inlineAction": undefined,
387
+ "ruleSetBinding": undefined,
388
+ "sharedPropertyTypeApiName": undefined,
389
+ "sharedPropertyTypeRid": undefined,
390
+ "status": {
391
+ "active": {},
392
+ "type": "active",
393
+ },
394
+ "type": {
395
+ "array": {
396
+ "reducers": [],
397
+ "subtype": {
398
+ "string": {
399
+ "analyzerOverride": undefined,
400
+ "enableAsciiFolding": undefined,
401
+ "isLongText": false,
402
+ "supportsEfficientLeadingWildcard": false,
403
+ "supportsExactMatching": true,
359
404
  },
405
+ "type": "string",
360
406
  },
361
- "type": "array",
362
407
  },
363
- "typeClasses": [
364
- {
365
- "kind": "render_hint",
366
- "name": "SELECTABLE",
367
- },
368
- {
369
- "kind": "render_hint",
370
- "name": "SORTABLE",
371
- },
372
- ],
373
- "valueType": undefined,
408
+ "type": "array",
374
409
  },
375
- "bar": {
376
- "apiName": "bar",
377
- "baseFormatter": undefined,
378
- "dataConstraints": undefined,
379
- "displayMetadata": {
380
- "description": undefined,
381
- "displayName": "Bar",
382
- "visibility": "NORMAL",
410
+ "typeClasses": [
411
+ {
412
+ "kind": "render_hint",
413
+ "name": "SELECTABLE",
383
414
  },
384
- "indexedForSearch": true,
385
- "inlineAction": undefined,
386
- "ruleSetBinding": undefined,
387
- "sharedPropertyTypeApiName": undefined,
388
- "sharedPropertyTypeRid": undefined,
389
- "status": {
390
- "active": {},
391
- "type": "active",
415
+ {
416
+ "kind": "render_hint",
417
+ "name": "SORTABLE",
392
418
  },
393
- "type": {
394
- "string": {
395
- "analyzerOverride": undefined,
396
- "enableAsciiFolding": undefined,
397
- "isLongText": false,
398
- "supportsEfficientLeadingWildcard": false,
399
- "supportsExactMatching": true,
400
- },
401
- "type": "string",
419
+ ],
420
+ "valueType": undefined,
421
+ },
422
+ "bar": {
423
+ "apiName": "bar",
424
+ "baseFormatter": undefined,
425
+ "dataConstraints": undefined,
426
+ "displayMetadata": {
427
+ "description": undefined,
428
+ "displayName": "Bar",
429
+ "visibility": "NORMAL",
430
+ },
431
+ "indexedForSearch": true,
432
+ "inlineAction": undefined,
433
+ "ruleSetBinding": undefined,
434
+ "sharedPropertyTypeApiName": undefined,
435
+ "sharedPropertyTypeRid": undefined,
436
+ "status": {
437
+ "active": {},
438
+ "type": "active",
439
+ },
440
+ "type": {
441
+ "string": {
442
+ "analyzerOverride": undefined,
443
+ "enableAsciiFolding": undefined,
444
+ "isLongText": false,
445
+ "supportsEfficientLeadingWildcard": false,
446
+ "supportsExactMatching": true,
402
447
  },
403
- "typeClasses": [
404
- {
405
- "kind": "render_hint",
406
- "name": "SELECTABLE",
407
- },
408
- {
409
- "kind": "render_hint",
410
- "name": "SORTABLE",
411
- },
412
- ],
413
- "valueType": undefined,
448
+ "type": "string",
414
449
  },
415
- "geopoint": {
416
- "apiName": "geopoint",
417
- "baseFormatter": undefined,
418
- "dataConstraints": undefined,
419
- "displayMetadata": {
420
- "description": undefined,
421
- "displayName": "geopoint",
422
- "visibility": "NORMAL",
450
+ "typeClasses": [
451
+ {
452
+ "kind": "render_hint",
453
+ "name": "SELECTABLE",
423
454
  },
424
- "indexedForSearch": true,
425
- "inlineAction": undefined,
426
- "ruleSetBinding": undefined,
427
- "sharedPropertyTypeApiName": undefined,
428
- "sharedPropertyTypeRid": undefined,
429
- "status": {
430
- "active": {},
431
- "type": "active",
455
+ {
456
+ "kind": "render_hint",
457
+ "name": "SORTABLE",
432
458
  },
433
- "type": {
434
- "struct": {
435
- "structFields": [
436
- {
437
- "aliases": [],
438
- "apiName": "lat",
439
- "displayMetadata": {
440
- "description": undefined,
441
- "displayName": "lat",
442
- },
443
- "fieldType": {
444
- "double": {},
445
- "type": "double",
446
- },
447
- "typeClasses": [],
459
+ ],
460
+ "valueType": undefined,
461
+ },
462
+ "geopoint": {
463
+ "apiName": "geopoint",
464
+ "baseFormatter": undefined,
465
+ "dataConstraints": undefined,
466
+ "displayMetadata": {
467
+ "description": undefined,
468
+ "displayName": "geopoint",
469
+ "visibility": "NORMAL",
470
+ },
471
+ "indexedForSearch": true,
472
+ "inlineAction": undefined,
473
+ "ruleSetBinding": undefined,
474
+ "sharedPropertyTypeApiName": undefined,
475
+ "sharedPropertyTypeRid": undefined,
476
+ "status": {
477
+ "active": {},
478
+ "type": "active",
479
+ },
480
+ "type": {
481
+ "struct": {
482
+ "structFields": [
483
+ {
484
+ "aliases": [],
485
+ "apiName": "lat",
486
+ "displayMetadata": {
487
+ "description": undefined,
488
+ "displayName": "lat",
448
489
  },
449
- {
450
- "aliases": [],
451
- "apiName": "lng",
452
- "displayMetadata": {
453
- "description": undefined,
454
- "displayName": "lng",
455
- },
456
- "fieldType": {
457
- "double": {},
458
- "type": "double",
459
- },
460
- "typeClasses": [],
490
+ "fieldType": {
491
+ "double": {},
492
+ "type": "double",
461
493
  },
462
- ],
463
- },
464
- "type": "struct",
494
+ "typeClasses": [],
495
+ },
496
+ {
497
+ "aliases": [],
498
+ "apiName": "lng",
499
+ "displayMetadata": {
500
+ "description": undefined,
501
+ "displayName": "lng",
502
+ },
503
+ "fieldType": {
504
+ "double": {},
505
+ "type": "double",
506
+ },
507
+ "typeClasses": [],
508
+ },
509
+ ],
465
510
  },
466
- "typeClasses": [],
467
- "valueType": undefined,
511
+ "type": "struct",
468
512
  },
513
+ "typeClasses": [],
514
+ "valueType": undefined,
469
515
  },
470
- "redacted": false,
471
- "status": {
472
- "active": {},
473
- "type": "active",
474
- },
475
- "titlePropertyTypeRid": "bar",
476
516
  },
517
+ "redacted": false,
518
+ "status": {
519
+ "active": {},
520
+ "type": "active",
521
+ },
522
+ "titlePropertyTypeRid": "bar",
477
523
  },
478
524
  },
479
- "sharedPropertyTypes": {
480
- "com.palantir.foo": {
481
- "sharedPropertyType": {
482
- "aliases": [],
483
- "apiName": "com.palantir.foo",
484
- "baseFormatter": undefined,
485
- "dataConstraints": undefined,
486
- "displayMetadata": {
487
- "description": undefined,
488
- "displayName": "foo",
489
- "visibility": "NORMAL",
490
- },
491
- "gothamMapping": undefined,
492
- "indexedForSearch": true,
493
- "type": {
494
- "string": {
495
- "analyzerOverride": undefined,
496
- "enableAsciiFolding": undefined,
497
- "isLongText": false,
498
- "supportsEfficientLeadingWildcard": false,
499
- "supportsExactMatching": true,
500
- },
501
- "type": "string",
525
+ },
526
+ "sharedPropertyTypes": {
527
+ "com.palantir.foo": {
528
+ "sharedPropertyType": {
529
+ "aliases": [],
530
+ "apiName": "com.palantir.foo",
531
+ "baseFormatter": undefined,
532
+ "dataConstraints": undefined,
533
+ "displayMetadata": {
534
+ "description": undefined,
535
+ "displayName": "foo",
536
+ "visibility": "NORMAL",
537
+ },
538
+ "gothamMapping": undefined,
539
+ "indexedForSearch": true,
540
+ "type": {
541
+ "string": {
542
+ "analyzerOverride": undefined,
543
+ "enableAsciiFolding": undefined,
544
+ "isLongText": false,
545
+ "supportsEfficientLeadingWildcard": false,
546
+ "supportsExactMatching": true,
502
547
  },
503
- "typeClasses": [
504
- {
505
- "kind": "render_hint",
506
- "name": "SELECTABLE",
507
- },
508
- {
509
- "kind": "render_hint",
510
- "name": "SORTABLE",
511
- },
512
- ],
513
- "valueType": undefined,
548
+ "type": "string",
514
549
  },
550
+ "typeClasses": [
551
+ {
552
+ "kind": "render_hint",
553
+ "name": "SELECTABLE",
554
+ },
555
+ {
556
+ "kind": "render_hint",
557
+ "name": "SORTABLE",
558
+ },
559
+ ],
560
+ "valueType": undefined,
515
561
  },
516
562
  },
517
- }
518
- `);
563
+ },
564
+ }
565
+ `);
519
566
  });
520
567
  it("Explicit datasource definitions are properly defined", () => {
521
568
  defineObject({
@@ -568,7 +615,393 @@ describe("Object Types", () => {
568
615
  }]
569
616
  });
570
617
  expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
571
- {
618
+ {
619
+ "actionTypes": {},
620
+ "blockPermissionInformation": {
621
+ "actionTypes": {},
622
+ "linkTypes": {},
623
+ "objectTypes": {},
624
+ },
625
+ "interfaceTypes": {},
626
+ "linkTypes": {},
627
+ "objectTypes": {
628
+ "com.palantir.buzz": {
629
+ "datasources": [
630
+ {
631
+ "datasource": {
632
+ "streamV2": {
633
+ "propertyMapping": {
634
+ "buzz": "buzz",
635
+ },
636
+ "propertySecurityGroups": undefined,
637
+ "retentionPolicy": {
638
+ "time": {
639
+ "window": "PT1H",
640
+ },
641
+ "type": "time",
642
+ },
643
+ "streamLocator": "com.palantir.buzz",
644
+ },
645
+ "type": "streamV2",
646
+ },
647
+ "datasourceName": "com.palantir.buzz",
648
+ "editsConfiguration": {
649
+ "onlyAllowPrivilegedEdits": false,
650
+ },
651
+ "redacted": false,
652
+ },
653
+ ],
654
+ "entityMetadata": {
655
+ "aliases": [],
656
+ "arePatchesEnabled": false,
657
+ },
658
+ "objectType": {
659
+ "allImplementsInterfaces": {},
660
+ "apiName": "com.palantir.buzz",
661
+ "displayMetadata": {
662
+ "description": undefined,
663
+ "displayName": "streamBackedObjectWithRetention",
664
+ "groupDisplayName": undefined,
665
+ "icon": {
666
+ "blueprint": {
667
+ "color": "#2D72D2",
668
+ "locator": "cube",
669
+ },
670
+ "type": "blueprint",
671
+ },
672
+ "pluralDisplayName": "streamBackedObjectWithRetention",
673
+ "visibility": "NORMAL",
674
+ },
675
+ "implementsInterfaces2": [],
676
+ "primaryKeys": [
677
+ "buzz",
678
+ ],
679
+ "propertyTypes": {
680
+ "buzz": {
681
+ "apiName": "buzz",
682
+ "baseFormatter": undefined,
683
+ "dataConstraints": undefined,
684
+ "displayMetadata": {
685
+ "description": undefined,
686
+ "displayName": "Buzz",
687
+ "visibility": "NORMAL",
688
+ },
689
+ "indexedForSearch": true,
690
+ "inlineAction": undefined,
691
+ "ruleSetBinding": undefined,
692
+ "sharedPropertyTypeApiName": undefined,
693
+ "sharedPropertyTypeRid": undefined,
694
+ "status": {
695
+ "active": {},
696
+ "type": "active",
697
+ },
698
+ "type": {
699
+ "string": {
700
+ "analyzerOverride": undefined,
701
+ "enableAsciiFolding": undefined,
702
+ "isLongText": false,
703
+ "supportsEfficientLeadingWildcard": false,
704
+ "supportsExactMatching": true,
705
+ },
706
+ "type": "string",
707
+ },
708
+ "typeClasses": [
709
+ {
710
+ "kind": "render_hint",
711
+ "name": "SELECTABLE",
712
+ },
713
+ {
714
+ "kind": "render_hint",
715
+ "name": "SORTABLE",
716
+ },
717
+ ],
718
+ "valueType": undefined,
719
+ },
720
+ },
721
+ "redacted": false,
722
+ "status": {
723
+ "active": {},
724
+ "type": "active",
725
+ },
726
+ "titlePropertyTypeRid": "buzz",
727
+ },
728
+ },
729
+ "com.palantir.fizz": {
730
+ "datasources": [
731
+ {
732
+ "datasource": {
733
+ "streamV2": {
734
+ "propertyMapping": {
735
+ "bar": "bar",
736
+ "fizz": "fizz",
737
+ },
738
+ "propertySecurityGroups": undefined,
739
+ "retentionPolicy": {
740
+ "none": {},
741
+ "type": "none",
742
+ },
743
+ "streamLocator": "com.palantir.fizz",
744
+ },
745
+ "type": "streamV2",
746
+ },
747
+ "datasourceName": "com.palantir.fizz",
748
+ "editsConfiguration": {
749
+ "onlyAllowPrivilegedEdits": false,
750
+ },
751
+ "redacted": false,
752
+ },
753
+ ],
754
+ "entityMetadata": {
755
+ "aliases": [],
756
+ "arePatchesEnabled": false,
757
+ },
758
+ "objectType": {
759
+ "allImplementsInterfaces": {},
760
+ "apiName": "com.palantir.fizz",
761
+ "displayMetadata": {
762
+ "description": undefined,
763
+ "displayName": "streamBackedObjectNoRetention",
764
+ "groupDisplayName": undefined,
765
+ "icon": {
766
+ "blueprint": {
767
+ "color": "#2D72D2",
768
+ "locator": "cube",
769
+ },
770
+ "type": "blueprint",
771
+ },
772
+ "pluralDisplayName": "streamBackedObjectNoRetention",
773
+ "visibility": "NORMAL",
774
+ },
775
+ "implementsInterfaces2": [],
776
+ "primaryKeys": [
777
+ "fizz",
778
+ ],
779
+ "propertyTypes": {
780
+ "bar": {
781
+ "apiName": "bar",
782
+ "baseFormatter": undefined,
783
+ "dataConstraints": undefined,
784
+ "displayMetadata": {
785
+ "description": undefined,
786
+ "displayName": "Bar",
787
+ "visibility": "NORMAL",
788
+ },
789
+ "indexedForSearch": true,
790
+ "inlineAction": undefined,
791
+ "ruleSetBinding": undefined,
792
+ "sharedPropertyTypeApiName": undefined,
793
+ "sharedPropertyTypeRid": undefined,
794
+ "status": {
795
+ "active": {},
796
+ "type": "active",
797
+ },
798
+ "type": {
799
+ "string": {
800
+ "analyzerOverride": undefined,
801
+ "enableAsciiFolding": undefined,
802
+ "isLongText": false,
803
+ "supportsEfficientLeadingWildcard": false,
804
+ "supportsExactMatching": true,
805
+ },
806
+ "type": "string",
807
+ },
808
+ "typeClasses": [
809
+ {
810
+ "kind": "render_hint",
811
+ "name": "SELECTABLE",
812
+ },
813
+ {
814
+ "kind": "render_hint",
815
+ "name": "SORTABLE",
816
+ },
817
+ ],
818
+ "valueType": undefined,
819
+ },
820
+ "fizz": {
821
+ "apiName": "fizz",
822
+ "baseFormatter": undefined,
823
+ "dataConstraints": undefined,
824
+ "displayMetadata": {
825
+ "description": undefined,
826
+ "displayName": "Fizz",
827
+ "visibility": "NORMAL",
828
+ },
829
+ "indexedForSearch": true,
830
+ "inlineAction": undefined,
831
+ "ruleSetBinding": undefined,
832
+ "sharedPropertyTypeApiName": undefined,
833
+ "sharedPropertyTypeRid": undefined,
834
+ "status": {
835
+ "active": {},
836
+ "type": "active",
837
+ },
838
+ "type": {
839
+ "string": {
840
+ "analyzerOverride": undefined,
841
+ "enableAsciiFolding": undefined,
842
+ "isLongText": false,
843
+ "supportsEfficientLeadingWildcard": false,
844
+ "supportsExactMatching": true,
845
+ },
846
+ "type": "string",
847
+ },
848
+ "typeClasses": [
849
+ {
850
+ "kind": "render_hint",
851
+ "name": "SELECTABLE",
852
+ },
853
+ {
854
+ "kind": "render_hint",
855
+ "name": "SORTABLE",
856
+ },
857
+ ],
858
+ "valueType": undefined,
859
+ },
860
+ },
861
+ "redacted": false,
862
+ "status": {
863
+ "active": {},
864
+ "type": "active",
865
+ },
866
+ "titlePropertyTypeRid": "fizz",
867
+ },
868
+ },
869
+ "com.palantir.foo": {
870
+ "datasources": [
871
+ {
872
+ "datasource": {
873
+ "datasetV2": {
874
+ "datasetRid": "com.palantir.foo",
875
+ "propertyMapping": {
876
+ "bar": {
877
+ "column": "bar",
878
+ "type": "column",
879
+ },
880
+ },
881
+ },
882
+ "type": "datasetV2",
883
+ },
884
+ "datasourceName": "com.palantir.foo",
885
+ "editsConfiguration": {
886
+ "onlyAllowPrivilegedEdits": false,
887
+ },
888
+ "redacted": false,
889
+ },
890
+ ],
891
+ "entityMetadata": {
892
+ "aliases": [],
893
+ "arePatchesEnabled": false,
894
+ },
895
+ "objectType": {
896
+ "allImplementsInterfaces": {},
897
+ "apiName": "com.palantir.foo",
898
+ "displayMetadata": {
899
+ "description": undefined,
900
+ "displayName": "datasetBackedObject",
901
+ "groupDisplayName": undefined,
902
+ "icon": {
903
+ "blueprint": {
904
+ "color": "#2D72D2",
905
+ "locator": "cube",
906
+ },
907
+ "type": "blueprint",
908
+ },
909
+ "pluralDisplayName": "datasetBackedObject",
910
+ "visibility": "NORMAL",
911
+ },
912
+ "implementsInterfaces2": [],
913
+ "primaryKeys": [
914
+ "bar",
915
+ ],
916
+ "propertyTypes": {
917
+ "bar": {
918
+ "apiName": "bar",
919
+ "baseFormatter": undefined,
920
+ "dataConstraints": undefined,
921
+ "displayMetadata": {
922
+ "description": undefined,
923
+ "displayName": "Bar",
924
+ "visibility": "NORMAL",
925
+ },
926
+ "indexedForSearch": true,
927
+ "inlineAction": undefined,
928
+ "ruleSetBinding": undefined,
929
+ "sharedPropertyTypeApiName": undefined,
930
+ "sharedPropertyTypeRid": undefined,
931
+ "status": {
932
+ "active": {},
933
+ "type": "active",
934
+ },
935
+ "type": {
936
+ "string": {
937
+ "analyzerOverride": undefined,
938
+ "enableAsciiFolding": undefined,
939
+ "isLongText": false,
940
+ "supportsEfficientLeadingWildcard": false,
941
+ "supportsExactMatching": true,
942
+ },
943
+ "type": "string",
944
+ },
945
+ "typeClasses": [
946
+ {
947
+ "kind": "render_hint",
948
+ "name": "SELECTABLE",
949
+ },
950
+ {
951
+ "kind": "render_hint",
952
+ "name": "SORTABLE",
953
+ },
954
+ ],
955
+ "valueType": undefined,
956
+ },
957
+ },
958
+ "redacted": false,
959
+ "status": {
960
+ "active": {},
961
+ "type": "active",
962
+ },
963
+ "titlePropertyTypeRid": "bar",
964
+ },
965
+ },
966
+ },
967
+ "sharedPropertyTypes": {},
968
+ }
969
+ `);
970
+ });
971
+ it("Restricted view datasources are properly defined", () => {
972
+ defineObject({
973
+ titlePropertyApiName: "bar",
974
+ displayName: "Foo",
975
+ pluralDisplayName: "Foo",
976
+ apiName: "foo",
977
+ primaryKeyPropertyApiName: "bar",
978
+ properties: {
979
+ "bar": {
980
+ type: "string"
981
+ }
982
+ },
983
+ datasources: [{
984
+ type: "restrictedView"
985
+ }]
986
+ });
987
+ expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
988
+ {
989
+ "importedOntology": {
990
+ "actionTypes": {},
991
+ "blockPermissionInformation": {
992
+ "actionTypes": {},
993
+ "linkTypes": {},
994
+ "objectTypes": {},
995
+ },
996
+ "interfaceTypes": {},
997
+ "linkTypes": {},
998
+ "objectTypes": {},
999
+ "sharedPropertyTypes": {},
1000
+ },
1001
+ "importedValueTypes": {
1002
+ "valueTypes": [],
1003
+ },
1004
+ "ontology": {
572
1005
  "actionTypes": {},
573
1006
  "blockPermissionInformation": {
574
1007
  "actionTypes": {},
@@ -578,26 +1011,22 @@ describe("Object Types", () => {
578
1011
  "interfaceTypes": {},
579
1012
  "linkTypes": {},
580
1013
  "objectTypes": {
581
- "com.palantir.buzz": {
1014
+ "com.palantir.foo": {
582
1015
  "datasources": [
583
1016
  {
584
1017
  "datasource": {
585
- "streamV2": {
1018
+ "restrictedViewV2": {
586
1019
  "propertyMapping": {
587
- "buzz": "buzz",
588
- },
589
- "propertySecurityGroups": undefined,
590
- "retentionPolicy": {
591
- "time": {
592
- "window": "PT1H",
1020
+ "bar": {
1021
+ "column": "bar",
1022
+ "type": "column",
593
1023
  },
594
- "type": "time",
595
1024
  },
596
- "streamLocator": "com.palantir.buzz",
1025
+ "restrictedViewRid": "com.palantir.foo",
597
1026
  },
598
- "type": "streamV2",
1027
+ "type": "restrictedViewV2",
599
1028
  },
600
- "datasourceName": "com.palantir.buzz",
1029
+ "datasourceName": "com.palantir.foo",
601
1030
  "editsConfiguration": {
602
1031
  "onlyAllowPrivilegedEdits": false,
603
1032
  },
@@ -605,14 +1034,15 @@ describe("Object Types", () => {
605
1034
  },
606
1035
  ],
607
1036
  "entityMetadata": {
1037
+ "aliases": [],
608
1038
  "arePatchesEnabled": false,
609
1039
  },
610
1040
  "objectType": {
611
1041
  "allImplementsInterfaces": {},
612
- "apiName": "com.palantir.buzz",
1042
+ "apiName": "com.palantir.foo",
613
1043
  "displayMetadata": {
614
1044
  "description": undefined,
615
- "displayName": "streamBackedObjectWithRetention",
1045
+ "displayName": "Foo",
616
1046
  "groupDisplayName": undefined,
617
1047
  "icon": {
618
1048
  "blueprint": {
@@ -621,21 +1051,21 @@ describe("Object Types", () => {
621
1051
  },
622
1052
  "type": "blueprint",
623
1053
  },
624
- "pluralDisplayName": "streamBackedObjectWithRetention",
1054
+ "pluralDisplayName": "Foo",
625
1055
  "visibility": "NORMAL",
626
1056
  },
627
1057
  "implementsInterfaces2": [],
628
1058
  "primaryKeys": [
629
- "buzz",
1059
+ "bar",
630
1060
  ],
631
1061
  "propertyTypes": {
632
- "buzz": {
633
- "apiName": "buzz",
1062
+ "bar": {
1063
+ "apiName": "bar",
634
1064
  "baseFormatter": undefined,
635
1065
  "dataConstraints": undefined,
636
1066
  "displayMetadata": {
637
1067
  "description": undefined,
638
- "displayName": "Buzz",
1068
+ "displayName": "Bar",
639
1069
  "visibility": "NORMAL",
640
1070
  },
641
1071
  "indexedForSearch": true,
@@ -675,28 +1105,83 @@ describe("Object Types", () => {
675
1105
  "active": {},
676
1106
  "type": "active",
677
1107
  },
678
- "titlePropertyTypeRid": "buzz",
1108
+ "titlePropertyTypeRid": "bar",
679
1109
  },
680
1110
  },
681
- "com.palantir.fizz": {
1111
+ },
1112
+ "sharedPropertyTypes": {},
1113
+ },
1114
+ "randomnessKey": undefined,
1115
+ "valueTypes": {
1116
+ "valueTypes": [],
1117
+ },
1118
+ }
1119
+ `);
1120
+ });
1121
+ it("Edit only properties are properly defined", () => {
1122
+ defineObject({
1123
+ titlePropertyApiName: "bar",
1124
+ displayName: "Foo",
1125
+ pluralDisplayName: "Foo",
1126
+ apiName: "foo",
1127
+ primaryKeyPropertyApiName: "fizz",
1128
+ properties: {
1129
+ "bar": {
1130
+ type: "string",
1131
+ editOnly: true
1132
+ },
1133
+ "fizz": {
1134
+ type: "string"
1135
+ }
1136
+ }
1137
+ });
1138
+ expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1139
+ {
1140
+ "importedOntology": {
1141
+ "actionTypes": {},
1142
+ "blockPermissionInformation": {
1143
+ "actionTypes": {},
1144
+ "linkTypes": {},
1145
+ "objectTypes": {},
1146
+ },
1147
+ "interfaceTypes": {},
1148
+ "linkTypes": {},
1149
+ "objectTypes": {},
1150
+ "sharedPropertyTypes": {},
1151
+ },
1152
+ "importedValueTypes": {
1153
+ "valueTypes": [],
1154
+ },
1155
+ "ontology": {
1156
+ "actionTypes": {},
1157
+ "blockPermissionInformation": {
1158
+ "actionTypes": {},
1159
+ "linkTypes": {},
1160
+ "objectTypes": {},
1161
+ },
1162
+ "interfaceTypes": {},
1163
+ "linkTypes": {},
1164
+ "objectTypes": {
1165
+ "com.palantir.foo": {
682
1166
  "datasources": [
683
1167
  {
684
1168
  "datasource": {
685
- "streamV2": {
1169
+ "datasetV2": {
1170
+ "datasetRid": "com.palantir.foo",
686
1171
  "propertyMapping": {
687
- "bar": "bar",
688
- "fizz": "fizz",
689
- },
690
- "propertySecurityGroups": undefined,
691
- "retentionPolicy": {
692
- "none": {},
693
- "type": "none",
1172
+ "bar": {
1173
+ "editOnly": {},
1174
+ "type": "editOnly",
1175
+ },
1176
+ "fizz": {
1177
+ "column": "fizz",
1178
+ "type": "column",
1179
+ },
694
1180
  },
695
- "streamLocator": "com.palantir.fizz",
696
1181
  },
697
- "type": "streamV2",
1182
+ "type": "datasetV2",
698
1183
  },
699
- "datasourceName": "com.palantir.fizz",
1184
+ "datasourceName": "com.palantir.foo",
700
1185
  "editsConfiguration": {
701
1186
  "onlyAllowPrivilegedEdits": false,
702
1187
  },
@@ -704,14 +1189,15 @@ describe("Object Types", () => {
704
1189
  },
705
1190
  ],
706
1191
  "entityMetadata": {
1192
+ "aliases": [],
707
1193
  "arePatchesEnabled": false,
708
1194
  },
709
1195
  "objectType": {
710
1196
  "allImplementsInterfaces": {},
711
- "apiName": "com.palantir.fizz",
1197
+ "apiName": "com.palantir.foo",
712
1198
  "displayMetadata": {
713
1199
  "description": undefined,
714
- "displayName": "streamBackedObjectNoRetention",
1200
+ "displayName": "Foo",
715
1201
  "groupDisplayName": undefined,
716
1202
  "icon": {
717
1203
  "blueprint": {
@@ -720,7 +1206,7 @@ describe("Object Types", () => {
720
1206
  },
721
1207
  "type": "blueprint",
722
1208
  },
723
- "pluralDisplayName": "streamBackedObjectNoRetention",
1209
+ "pluralDisplayName": "Foo",
724
1210
  "visibility": "NORMAL",
725
1211
  },
726
1212
  "implementsInterfaces2": [],
@@ -814,25 +1300,137 @@ describe("Object Types", () => {
814
1300
  "active": {},
815
1301
  "type": "active",
816
1302
  },
817
- "titlePropertyTypeRid": "fizz",
1303
+ "titlePropertyTypeRid": "bar",
818
1304
  },
819
1305
  },
820
- "com.palantir.foo": {
1306
+ },
1307
+ "sharedPropertyTypes": {},
1308
+ },
1309
+ "randomnessKey": undefined,
1310
+ "valueTypes": {
1311
+ "valueTypes": [],
1312
+ },
1313
+ }
1314
+ `);
1315
+ });
1316
+ it("Fails if edit only property is primary key", () => {
1317
+ expect(() => {
1318
+ defineObject({
1319
+ titlePropertyApiName: "bar",
1320
+ displayName: "Foo",
1321
+ pluralDisplayName: "Foo",
1322
+ apiName: "foo",
1323
+ primaryKeyPropertyApiName: "bar",
1324
+ properties: {
1325
+ "bar": {
1326
+ type: "string",
1327
+ editOnly: true
1328
+ }
1329
+ }
1330
+ });
1331
+ }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Primary key property bar on object foo cannot be edit-only]`);
1332
+ });
1333
+ it("Fail if stream retention period is not ISO 8601 compliant", () => {
1334
+ expect(() => defineObject({
1335
+ titlePropertyApiName: "buzz",
1336
+ displayName: "streamBackedObjectWithRetention",
1337
+ pluralDisplayName: "streamBackedObjectWithRetention",
1338
+ apiName: "buzz",
1339
+ primaryKeyPropertyApiName: "buzz",
1340
+ properties: {
1341
+ "buzz": {
1342
+ type: "string"
1343
+ }
1344
+ },
1345
+ datasources: [{
1346
+ type: "stream",
1347
+ retentionPeriod: "bad retention period string"
1348
+ }]
1349
+ })).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Retention period "bad retention period string" on object "buzz" is not a valid ISO 8601 duration string]`);
1350
+ });
1351
+ it("Property-level datasources are properly defined", () => {
1352
+ defineObject({
1353
+ titlePropertyApiName: "bar",
1354
+ displayName: "exampleObject",
1355
+ pluralDisplayName: "exampleObject",
1356
+ apiName: "fizz",
1357
+ primaryKeyPropertyApiName: "bar",
1358
+ properties: {
1359
+ "fizz": {
1360
+ type: "mediaReference"
1361
+ },
1362
+ "bar": {
1363
+ type: "string"
1364
+ }
1365
+ },
1366
+ datasources: [{
1367
+ type: "stream"
1368
+ }]
1369
+ });
1370
+ expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1371
+ {
1372
+ "importedOntology": {
1373
+ "actionTypes": {},
1374
+ "blockPermissionInformation": {
1375
+ "actionTypes": {},
1376
+ "linkTypes": {},
1377
+ "objectTypes": {},
1378
+ },
1379
+ "interfaceTypes": {},
1380
+ "linkTypes": {},
1381
+ "objectTypes": {},
1382
+ "sharedPropertyTypes": {},
1383
+ },
1384
+ "importedValueTypes": {
1385
+ "valueTypes": [],
1386
+ },
1387
+ "ontology": {
1388
+ "actionTypes": {},
1389
+ "blockPermissionInformation": {
1390
+ "actionTypes": {},
1391
+ "linkTypes": {},
1392
+ "objectTypes": {},
1393
+ },
1394
+ "interfaceTypes": {},
1395
+ "linkTypes": {},
1396
+ "objectTypes": {
1397
+ "com.palantir.fizz": {
821
1398
  "datasources": [
822
1399
  {
823
1400
  "datasource": {
824
- "datasetV2": {
825
- "datasetRid": "com.palantir.foo",
1401
+ "mediaSetView": {
1402
+ "assumedMarkings": [],
1403
+ "mediaSetViewLocator": "com.palantir.fizz.fizz",
1404
+ "properties": [
1405
+ "fizz",
1406
+ ],
1407
+ "uploadProperties": [],
1408
+ },
1409
+ "type": "mediaSetView",
1410
+ },
1411
+ "datasourceName": "fizz",
1412
+ "editsConfiguration": {
1413
+ "onlyAllowPrivilegedEdits": false,
1414
+ },
1415
+ "redacted": false,
1416
+ },
1417
+ {
1418
+ "datasource": {
1419
+ "streamV2": {
826
1420
  "propertyMapping": {
827
- "bar": {
828
- "column": "bar",
829
- "type": "column",
830
- },
1421
+ "bar": "bar",
1422
+ "fizz": "fizz",
1423
+ },
1424
+ "propertySecurityGroups": undefined,
1425
+ "retentionPolicy": {
1426
+ "none": {},
1427
+ "type": "none",
831
1428
  },
1429
+ "streamLocator": "com.palantir.fizz",
832
1430
  },
833
- "type": "datasetV2",
1431
+ "type": "streamV2",
834
1432
  },
835
- "datasourceName": "com.palantir.foo",
1433
+ "datasourceName": "com.palantir.fizz",
836
1434
  "editsConfiguration": {
837
1435
  "onlyAllowPrivilegedEdits": false,
838
1436
  },
@@ -840,14 +1438,15 @@ describe("Object Types", () => {
840
1438
  },
841
1439
  ],
842
1440
  "entityMetadata": {
1441
+ "aliases": [],
843
1442
  "arePatchesEnabled": false,
844
1443
  },
845
1444
  "objectType": {
846
1445
  "allImplementsInterfaces": {},
847
- "apiName": "com.palantir.foo",
1446
+ "apiName": "com.palantir.fizz",
848
1447
  "displayMetadata": {
849
1448
  "description": undefined,
850
- "displayName": "datasetBackedObject",
1449
+ "displayName": "exampleObject",
851
1450
  "groupDisplayName": undefined,
852
1451
  "icon": {
853
1452
  "blueprint": {
@@ -856,7 +1455,7 @@ describe("Object Types", () => {
856
1455
  },
857
1456
  "type": "blueprint",
858
1457
  },
859
- "pluralDisplayName": "datasetBackedObject",
1458
+ "pluralDisplayName": "exampleObject",
860
1459
  "visibility": "NORMAL",
861
1460
  },
862
1461
  "implementsInterfaces2": [],
@@ -904,6 +1503,31 @@ describe("Object Types", () => {
904
1503
  ],
905
1504
  "valueType": undefined,
906
1505
  },
1506
+ "fizz": {
1507
+ "apiName": "fizz",
1508
+ "baseFormatter": undefined,
1509
+ "dataConstraints": undefined,
1510
+ "displayMetadata": {
1511
+ "description": undefined,
1512
+ "displayName": "Fizz",
1513
+ "visibility": "NORMAL",
1514
+ },
1515
+ "indexedForSearch": true,
1516
+ "inlineAction": undefined,
1517
+ "ruleSetBinding": undefined,
1518
+ "sharedPropertyTypeApiName": undefined,
1519
+ "sharedPropertyTypeRid": undefined,
1520
+ "status": {
1521
+ "active": {},
1522
+ "type": "active",
1523
+ },
1524
+ "type": {
1525
+ "mediaReference": {},
1526
+ "type": "mediaReference",
1527
+ },
1528
+ "typeClasses": [],
1529
+ "valueType": undefined,
1530
+ },
907
1531
  },
908
1532
  "redacted": false,
909
1533
  "status": {
@@ -915,739 +1539,467 @@ describe("Object Types", () => {
915
1539
  },
916
1540
  },
917
1541
  "sharedPropertyTypes": {},
918
- }
919
- `);
1542
+ },
1543
+ "randomnessKey": undefined,
1544
+ "valueTypes": {
1545
+ "valueTypes": [],
1546
+ },
1547
+ }
1548
+ `);
920
1549
  });
921
- it("Restricted view datasources are properly defined", () => {
922
- defineObject({
923
- titlePropertyApiName: "bar",
924
- displayName: "Foo",
925
- pluralDisplayName: "Foo",
926
- apiName: "foo",
927
- primaryKeyPropertyApiName: "bar",
1550
+ it("Derived datasources are properly defined", () => {
1551
+ const passenger = defineObject({
1552
+ displayName: "Passenger",
1553
+ pluralDisplayName: "Passengers",
1554
+ apiName: "passenger",
1555
+ primaryKeyPropertyApiName: "name",
1556
+ titlePropertyApiName: "name",
1557
+ editsEnabled: true,
928
1558
  properties: {
929
- "bar": {
930
- type: "string"
1559
+ "name": {
1560
+ type: "string",
1561
+ displayName: "Name"
1562
+ },
1563
+ "flight_id": {
1564
+ type: "string",
1565
+ displayName: "Flight ID"
1566
+ }
1567
+ }
1568
+ });
1569
+ const flightToPassengers = defineLink({
1570
+ apiName: "flightToPassengersLink",
1571
+ one: {
1572
+ object: "com.palantir.flight",
1573
+ metadata: {
1574
+ apiName: "flightFromPassengers"
931
1575
  }
932
1576
  },
933
- datasources: [{
934
- type: "restrictedView"
935
- }]
1577
+ toMany: {
1578
+ object: passenger.apiName,
1579
+ metadata: {
1580
+ apiName: "passengersFromFlight"
1581
+ }
1582
+ },
1583
+ manyForeignKeyProperty: "flight_id"
936
1584
  });
937
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
938
- {
939
- "importedOntology": {
940
- "actionTypes": {},
941
- "blockPermissionInformation": {
942
- "actionTypes": {},
943
- "linkTypes": {},
944
- "objectTypes": {},
945
- },
946
- "interfaceTypes": {},
947
- "linkTypes": {},
948
- "objectTypes": {},
949
- "sharedPropertyTypes": {},
950
- },
951
- "importedValueTypes": {
952
- "valueTypes": [],
1585
+ expect(() => {
1586
+ defineObject({
1587
+ displayName: "Flight",
1588
+ pluralDisplayName: "Flights",
1589
+ apiName: "flight",
1590
+ primaryKeyPropertyApiName: "id",
1591
+ titlePropertyApiName: "id",
1592
+ properties: {
1593
+ id: {
1594
+ type: "string",
1595
+ displayName: "ID"
953
1596
  },
954
- "ontology": {
955
- "actionTypes": {},
956
- "blockPermissionInformation": {
957
- "actionTypes": {},
958
- "linkTypes": {},
959
- "objectTypes": {},
960
- },
961
- "interfaceTypes": {},
962
- "linkTypes": {},
963
- "objectTypes": {
964
- "com.palantir.foo": {
965
- "datasources": [
966
- {
967
- "datasource": {
968
- "restrictedViewV2": {
969
- "propertyMapping": {
970
- "bar": {
971
- "column": "bar",
972
- "type": "column",
973
- },
974
- },
975
- "restrictedViewRid": "com.palantir.foo",
976
- },
977
- "type": "restrictedViewV2",
978
- },
979
- "datasourceName": "com.palantir.foo",
980
- "editsConfiguration": {
981
- "onlyAllowPrivilegedEdits": false,
982
- },
983
- "redacted": false,
984
- },
985
- ],
986
- "entityMetadata": {
987
- "arePatchesEnabled": false,
988
- },
989
- "objectType": {
990
- "allImplementsInterfaces": {},
991
- "apiName": "com.palantir.foo",
992
- "displayMetadata": {
993
- "description": undefined,
994
- "displayName": "Foo",
995
- "groupDisplayName": undefined,
996
- "icon": {
997
- "blueprint": {
998
- "color": "#2D72D2",
999
- "locator": "cube",
1000
- },
1001
- "type": "blueprint",
1002
- },
1003
- "pluralDisplayName": "Foo",
1004
- "visibility": "NORMAL",
1005
- },
1006
- "implementsInterfaces2": [],
1007
- "primaryKeys": [
1008
- "bar",
1009
- ],
1010
- "propertyTypes": {
1011
- "bar": {
1012
- "apiName": "bar",
1013
- "baseFormatter": undefined,
1014
- "dataConstraints": undefined,
1015
- "displayMetadata": {
1016
- "description": undefined,
1017
- "displayName": "Bar",
1018
- "visibility": "NORMAL",
1019
- },
1020
- "indexedForSearch": true,
1021
- "inlineAction": undefined,
1022
- "ruleSetBinding": undefined,
1023
- "sharedPropertyTypeApiName": undefined,
1024
- "sharedPropertyTypeRid": undefined,
1025
- "status": {
1026
- "active": {},
1027
- "type": "active",
1028
- },
1029
- "type": {
1030
- "string": {
1031
- "analyzerOverride": undefined,
1032
- "enableAsciiFolding": undefined,
1033
- "isLongText": false,
1034
- "supportsEfficientLeadingWildcard": false,
1035
- "supportsExactMatching": true,
1036
- },
1037
- "type": "string",
1038
- },
1039
- "typeClasses": [
1040
- {
1041
- "kind": "render_hint",
1042
- "name": "SELECTABLE",
1043
- },
1044
- {
1045
- "kind": "render_hint",
1046
- "name": "SORTABLE",
1047
- },
1048
- ],
1049
- "valueType": undefined,
1050
- },
1051
- },
1052
- "redacted": false,
1053
- "status": {
1054
- "active": {},
1055
- "type": "active",
1056
- },
1057
- "titlePropertyTypeRid": "bar",
1058
- },
1059
- },
1060
- },
1061
- "sharedPropertyTypes": {},
1062
- },
1063
- "randomnessKey": undefined,
1064
- "valueTypes": {
1065
- "valueTypes": [],
1066
- },
1067
- }
1068
- `);
1069
- });
1070
- it("Edit only properties are properly defined", () => {
1071
- defineObject({
1072
- titlePropertyApiName: "bar",
1073
- displayName: "Foo",
1074
- pluralDisplayName: "Foo",
1075
- apiName: "foo",
1076
- primaryKeyPropertyApiName: "fizz",
1597
+ numPassengers: {
1598
+ type: "string",
1599
+ displayName: "Passengers"
1600
+ }
1601
+ },
1602
+ datasources: [{
1603
+ type: "dataset"
1604
+ }, {
1605
+ type: "derived",
1606
+ linkDefinition: [{
1607
+ linkType: flightToPassengers
1608
+ }],
1609
+ propertyMapping: {
1610
+ numPassengers: {
1611
+ type: "collectList",
1612
+ property: "name",
1613
+ limit: 100
1614
+ }
1615
+ }
1616
+ }]
1617
+ });
1618
+ }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Property 'numPassengers' on object 'flight' is not collectible]`);
1619
+ const flight = defineObject({
1620
+ displayName: "Flight",
1621
+ pluralDisplayName: "Flights",
1622
+ apiName: "flight",
1623
+ primaryKeyPropertyApiName: "id",
1624
+ titlePropertyApiName: "id",
1625
+ editsEnabled: true,
1077
1626
  properties: {
1078
- "bar": {
1627
+ id: {
1079
1628
  type: "string",
1080
- editOnly: true
1629
+ displayName: "ID"
1081
1630
  },
1082
- "fizz": {
1083
- type: "string"
1631
+ passengersList: {
1632
+ type: "string",
1633
+ array: true,
1634
+ displayName: "Passengers"
1084
1635
  }
1085
- }
1636
+ },
1637
+ datasources: [{
1638
+ type: "dataset"
1639
+ }, {
1640
+ type: "derived",
1641
+ linkDefinition: [{
1642
+ linkType: flightToPassengers
1643
+ }],
1644
+ propertyMapping: {
1645
+ passengersList: {
1646
+ type: "collectList",
1647
+ property: "name",
1648
+ limit: 100
1649
+ }
1650
+ }
1651
+ }]
1652
+ });
1653
+ defineCreateObjectAction({
1654
+ displayName: "Create flight",
1655
+ objectType: flight
1656
+ });
1657
+ defineDeleteObjectAction({
1658
+ displayName: "Delete flight",
1659
+ objectType: flight
1660
+ });
1661
+ defineCreateObjectAction({
1662
+ displayName: "Create passenger",
1663
+ objectType: passenger
1664
+ });
1665
+ defineDeleteObjectAction({
1666
+ displayName: "Delete passenger",
1667
+ objectType: passenger
1086
1668
  });
1087
1669
  expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1088
- {
1089
- "importedOntology": {
1670
+ {
1671
+ "importedOntology": {
1672
+ "actionTypes": {},
1673
+ "blockPermissionInformation": {
1090
1674
  "actionTypes": {},
1091
- "blockPermissionInformation": {
1092
- "actionTypes": {},
1093
- "linkTypes": {},
1094
- "objectTypes": {},
1095
- },
1096
- "interfaceTypes": {},
1097
1675
  "linkTypes": {},
1098
1676
  "objectTypes": {},
1099
- "sharedPropertyTypes": {},
1100
- },
1101
- "importedValueTypes": {
1102
- "valueTypes": [],
1103
1677
  },
1104
- "ontology": {
1105
- "actionTypes": {},
1106
- "blockPermissionInformation": {
1107
- "actionTypes": {},
1108
- "linkTypes": {},
1109
- "objectTypes": {},
1110
- },
1111
- "interfaceTypes": {},
1112
- "linkTypes": {},
1113
- "objectTypes": {
1114
- "com.palantir.foo": {
1115
- "datasources": [
1116
- {
1117
- "datasource": {
1118
- "datasetV2": {
1119
- "datasetRid": "com.palantir.foo",
1120
- "propertyMapping": {
1121
- "bar": {
1122
- "editOnly": {},
1123
- "type": "editOnly",
1678
+ "interfaceTypes": {},
1679
+ "linkTypes": {},
1680
+ "objectTypes": {},
1681
+ "sharedPropertyTypes": {},
1682
+ },
1683
+ "importedValueTypes": {
1684
+ "valueTypes": [],
1685
+ },
1686
+ "ontology": {
1687
+ "actionTypes": {
1688
+ "com.palantir.create-object-flight": {
1689
+ "actionType": {
1690
+ "actionTypeLogic": {
1691
+ "logic": {
1692
+ "rules": [
1693
+ {
1694
+ "addObjectRule": {
1695
+ "objectTypeId": "com.palantir.flight",
1696
+ "propertyValues": {
1697
+ "id": {
1698
+ "parameterId": "id",
1699
+ "type": "parameterId",
1700
+ },
1701
+ },
1702
+ "structFieldValues": {},
1703
+ },
1704
+ "type": "addObjectRule",
1705
+ },
1706
+ ],
1707
+ },
1708
+ "validation": {
1709
+ "actionTypeLevelValidation": {
1710
+ "rules": {
1711
+ "0": {
1712
+ "condition": {
1713
+ "true": {},
1714
+ "type": "true",
1124
1715
  },
1125
- "fizz": {
1126
- "column": "fizz",
1127
- "type": "column",
1716
+ "displayMetadata": {
1717
+ "failureMessage": "",
1718
+ "typeClasses": [],
1128
1719
  },
1129
1720
  },
1130
1721
  },
1131
- "type": "datasetV2",
1132
1722
  },
1133
- "datasourceName": "com.palantir.foo",
1134
- "editsConfiguration": {
1135
- "onlyAllowPrivilegedEdits": false,
1723
+ "parameterValidations": {
1724
+ "id": {
1725
+ "conditionalOverrides": [],
1726
+ "defaultValidation": {
1727
+ "display": {
1728
+ "renderHint": {
1729
+ "textInput": {},
1730
+ "type": "textInput",
1731
+ },
1732
+ "visibility": {
1733
+ "editable": {},
1734
+ "type": "editable",
1735
+ },
1736
+ },
1737
+ "validation": {
1738
+ "allowedValues": {
1739
+ "text": {
1740
+ "text": {},
1741
+ "type": "text",
1742
+ },
1743
+ "type": "text",
1744
+ },
1745
+ "required": {
1746
+ "notRequired": {},
1747
+ "type": "notRequired",
1748
+ },
1749
+ },
1750
+ },
1751
+ },
1136
1752
  },
1137
- "redacted": false,
1753
+ "sectionValidations": {},
1138
1754
  },
1139
- ],
1140
- "entityMetadata": {
1141
- "arePatchesEnabled": false,
1142
1755
  },
1143
- "objectType": {
1144
- "allImplementsInterfaces": {},
1145
- "apiName": "com.palantir.foo",
1756
+ "metadata": {
1757
+ "apiName": "com.palantir.create-object-flight",
1146
1758
  "displayMetadata": {
1147
- "description": undefined,
1148
- "displayName": "Foo",
1149
- "groupDisplayName": undefined,
1759
+ "configuration": {
1760
+ "defaultLayout": "FORM",
1761
+ "displayAndFormat": {
1762
+ "table": {
1763
+ "columnWidthByParameterRid": {},
1764
+ "enableFileImport": true,
1765
+ "fitHorizontally": false,
1766
+ "frozenColumnCount": 0,
1767
+ "rowHeightInLines": 1,
1768
+ },
1769
+ },
1770
+ "enableLayoutUserSwitch": false,
1771
+ },
1772
+ "description": "",
1773
+ "displayName": "Create flight",
1150
1774
  "icon": {
1151
1775
  "blueprint": {
1152
- "color": "#2D72D2",
1153
- "locator": "cube",
1776
+ "color": "#000000",
1777
+ "locator": "edit",
1154
1778
  },
1155
1779
  "type": "blueprint",
1156
1780
  },
1157
- "pluralDisplayName": "Foo",
1158
- "visibility": "NORMAL",
1781
+ "successMessage": [],
1782
+ "typeClasses": [],
1783
+ },
1784
+ "entities": {
1785
+ "affectedInterfaceTypes": [],
1786
+ "affectedLinkTypes": [],
1787
+ "affectedObjectTypes": [
1788
+ "com.palantir.flight",
1789
+ ],
1790
+ "typeGroups": [],
1159
1791
  },
1160
- "implementsInterfaces2": [],
1161
- "primaryKeys": [
1162
- "fizz",
1792
+ "formContentOrdering": [],
1793
+ "parameterOrdering": [
1794
+ "id",
1163
1795
  ],
1164
- "propertyTypes": {
1165
- "bar": {
1166
- "apiName": "bar",
1167
- "baseFormatter": undefined,
1168
- "dataConstraints": undefined,
1796
+ "parameters": {
1797
+ "id": {
1169
1798
  "displayMetadata": {
1170
- "description": undefined,
1171
- "displayName": "Bar",
1172
- "visibility": "NORMAL",
1173
- },
1174
- "indexedForSearch": true,
1175
- "inlineAction": undefined,
1176
- "ruleSetBinding": undefined,
1177
- "sharedPropertyTypeApiName": undefined,
1178
- "sharedPropertyTypeRid": undefined,
1179
- "status": {
1180
- "active": {},
1181
- "type": "active",
1799
+ "description": "",
1800
+ "displayName": "ID",
1801
+ "typeClasses": [],
1182
1802
  },
1803
+ "id": "id",
1183
1804
  "type": {
1184
- "string": {
1185
- "analyzerOverride": undefined,
1186
- "enableAsciiFolding": undefined,
1187
- "isLongText": false,
1188
- "supportsEfficientLeadingWildcard": false,
1189
- "supportsExactMatching": true,
1190
- },
1805
+ "string": {},
1191
1806
  "type": "string",
1192
1807
  },
1193
- "typeClasses": [
1194
- {
1195
- "kind": "render_hint",
1196
- "name": "SELECTABLE",
1197
- },
1198
- {
1199
- "kind": "render_hint",
1200
- "name": "SORTABLE",
1201
- },
1202
- ],
1203
- "valueType": undefined,
1204
- },
1205
- "fizz": {
1206
- "apiName": "fizz",
1207
- "baseFormatter": undefined,
1208
- "dataConstraints": undefined,
1209
- "displayMetadata": {
1210
- "description": undefined,
1211
- "displayName": "Fizz",
1212
- "visibility": "NORMAL",
1213
- },
1214
- "indexedForSearch": true,
1215
- "inlineAction": undefined,
1216
- "ruleSetBinding": undefined,
1217
- "sharedPropertyTypeApiName": undefined,
1218
- "sharedPropertyTypeRid": undefined,
1219
- "status": {
1220
- "active": {},
1221
- "type": "active",
1222
- },
1223
- "type": {
1224
- "string": {
1225
- "analyzerOverride": undefined,
1226
- "enableAsciiFolding": undefined,
1227
- "isLongText": false,
1228
- "supportsEfficientLeadingWildcard": false,
1229
- "supportsExactMatching": true,
1230
- },
1231
- "type": "string",
1232
- },
1233
- "typeClasses": [
1234
- {
1235
- "kind": "render_hint",
1236
- "name": "SELECTABLE",
1237
- },
1238
- {
1239
- "kind": "render_hint",
1240
- "name": "SORTABLE",
1241
- },
1242
- ],
1243
- "valueType": undefined,
1244
1808
  },
1245
1809
  },
1246
- "redacted": false,
1810
+ "sections": {},
1247
1811
  "status": {
1248
1812
  "active": {},
1249
1813
  "type": "active",
1250
1814
  },
1251
- "titlePropertyTypeRid": "bar",
1252
1815
  },
1253
1816
  },
1254
1817
  },
1255
- "sharedPropertyTypes": {},
1256
- },
1257
- "randomnessKey": undefined,
1258
- "valueTypes": {
1259
- "valueTypes": [],
1260
- },
1261
- }
1262
- `);
1263
- });
1264
- it("Fails if edit only property is primary key", () => {
1265
- expect(() => {
1266
- defineObject({
1267
- titlePropertyApiName: "bar",
1268
- displayName: "Foo",
1269
- pluralDisplayName: "Foo",
1270
- apiName: "foo",
1271
- primaryKeyPropertyApiName: "bar",
1272
- properties: {
1273
- "bar": {
1274
- type: "string",
1275
- editOnly: true
1276
- }
1277
- }
1278
- });
1279
- }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Primary key property bar on object foo cannot be edit-only]`);
1280
- });
1281
- it("Fail if stream retention period is not ISO 8601 compliant", () => {
1282
- expect(() => defineObject({
1283
- titlePropertyApiName: "buzz",
1284
- displayName: "streamBackedObjectWithRetention",
1285
- pluralDisplayName: "streamBackedObjectWithRetention",
1286
- apiName: "buzz",
1287
- primaryKeyPropertyApiName: "buzz",
1288
- properties: {
1289
- "buzz": {
1290
- type: "string"
1291
- }
1292
- },
1293
- datasources: [{
1294
- type: "stream",
1295
- retentionPeriod: "bad retention period string"
1296
- }]
1297
- })).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Retention period "bad retention period string" on object "buzz" is not a valid ISO 8601 duration string]`);
1298
- });
1299
- it("Property-level datasources are properly defined", () => {
1300
- defineObject({
1301
- titlePropertyApiName: "bar",
1302
- displayName: "exampleObject",
1303
- pluralDisplayName: "exampleObject",
1304
- apiName: "fizz",
1305
- primaryKeyPropertyApiName: "bar",
1306
- properties: {
1307
- "fizz": {
1308
- type: "mediaReference"
1309
- },
1310
- "bar": {
1311
- type: "string"
1312
- }
1313
- },
1314
- datasources: [{
1315
- type: "stream"
1316
- }]
1317
- });
1318
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1319
- {
1320
- "importedOntology": {
1321
- "actionTypes": {},
1322
- "blockPermissionInformation": {
1323
- "actionTypes": {},
1324
- "linkTypes": {},
1325
- "objectTypes": {},
1326
- },
1327
- "interfaceTypes": {},
1328
- "linkTypes": {},
1329
- "objectTypes": {},
1330
- "sharedPropertyTypes": {},
1331
- },
1332
- "importedValueTypes": {
1333
- "valueTypes": [],
1334
- },
1335
- "ontology": {
1336
- "actionTypes": {},
1337
- "blockPermissionInformation": {
1338
- "actionTypes": {},
1339
- "linkTypes": {},
1340
- "objectTypes": {},
1341
- },
1342
- "interfaceTypes": {},
1343
- "linkTypes": {},
1344
- "objectTypes": {
1345
- "com.palantir.fizz": {
1346
- "datasources": [
1347
- {
1348
- "datasource": {
1349
- "mediaSetView": {
1350
- "assumedMarkings": [],
1351
- "mediaSetViewLocator": "com.palantir.fizz.fizz",
1352
- "properties": [
1353
- "fizz",
1354
- ],
1355
- },
1356
- "type": "mediaSetView",
1357
- },
1358
- "datasourceName": "fizz",
1359
- "editsConfiguration": {
1360
- "onlyAllowPrivilegedEdits": false,
1361
- },
1362
- "redacted": false,
1363
- },
1364
- {
1365
- "datasource": {
1366
- "streamV2": {
1367
- "propertyMapping": {
1368
- "bar": "bar",
1369
- "fizz": "fizz",
1818
+ "com.palantir.create-object-passenger": {
1819
+ "actionType": {
1820
+ "actionTypeLogic": {
1821
+ "logic": {
1822
+ "rules": [
1823
+ {
1824
+ "addObjectRule": {
1825
+ "objectTypeId": "com.palantir.passenger",
1826
+ "propertyValues": {
1827
+ "flight_id": {
1828
+ "parameterId": "flight_id",
1829
+ "type": "parameterId",
1830
+ },
1831
+ "name": {
1832
+ "parameterId": "name",
1833
+ "type": "parameterId",
1834
+ },
1835
+ },
1836
+ "structFieldValues": {},
1370
1837
  },
1371
- "propertySecurityGroups": undefined,
1372
- "retentionPolicy": {
1373
- "none": {},
1374
- "type": "none",
1838
+ "type": "addObjectRule",
1839
+ },
1840
+ ],
1841
+ },
1842
+ "validation": {
1843
+ "actionTypeLevelValidation": {
1844
+ "rules": {
1845
+ "0": {
1846
+ "condition": {
1847
+ "true": {},
1848
+ "type": "true",
1849
+ },
1850
+ "displayMetadata": {
1851
+ "failureMessage": "",
1852
+ "typeClasses": [],
1853
+ },
1375
1854
  },
1376
- "streamLocator": "com.palantir.fizz",
1377
1855
  },
1378
- "type": "streamV2",
1379
1856
  },
1380
- "datasourceName": "com.palantir.fizz",
1381
- "editsConfiguration": {
1382
- "onlyAllowPrivilegedEdits": false,
1857
+ "parameterValidations": {
1858
+ "flight_id": {
1859
+ "conditionalOverrides": [],
1860
+ "defaultValidation": {
1861
+ "display": {
1862
+ "renderHint": {
1863
+ "textInput": {},
1864
+ "type": "textInput",
1865
+ },
1866
+ "visibility": {
1867
+ "editable": {},
1868
+ "type": "editable",
1869
+ },
1870
+ },
1871
+ "validation": {
1872
+ "allowedValues": {
1873
+ "text": {
1874
+ "text": {},
1875
+ "type": "text",
1876
+ },
1877
+ "type": "text",
1878
+ },
1879
+ "required": {
1880
+ "notRequired": {},
1881
+ "type": "notRequired",
1882
+ },
1883
+ },
1884
+ },
1885
+ },
1886
+ "name": {
1887
+ "conditionalOverrides": [],
1888
+ "defaultValidation": {
1889
+ "display": {
1890
+ "renderHint": {
1891
+ "textInput": {},
1892
+ "type": "textInput",
1893
+ },
1894
+ "visibility": {
1895
+ "editable": {},
1896
+ "type": "editable",
1897
+ },
1898
+ },
1899
+ "validation": {
1900
+ "allowedValues": {
1901
+ "text": {
1902
+ "text": {},
1903
+ "type": "text",
1904
+ },
1905
+ "type": "text",
1906
+ },
1907
+ "required": {
1908
+ "notRequired": {},
1909
+ "type": "notRequired",
1910
+ },
1911
+ },
1912
+ },
1913
+ },
1383
1914
  },
1384
- "redacted": false,
1915
+ "sectionValidations": {},
1385
1916
  },
1386
- ],
1387
- "entityMetadata": {
1388
- "arePatchesEnabled": false,
1389
1917
  },
1390
- "objectType": {
1391
- "allImplementsInterfaces": {},
1392
- "apiName": "com.palantir.fizz",
1918
+ "metadata": {
1919
+ "apiName": "com.palantir.create-object-passenger",
1393
1920
  "displayMetadata": {
1394
- "description": undefined,
1395
- "displayName": "exampleObject",
1396
- "groupDisplayName": undefined,
1921
+ "configuration": {
1922
+ "defaultLayout": "FORM",
1923
+ "displayAndFormat": {
1924
+ "table": {
1925
+ "columnWidthByParameterRid": {},
1926
+ "enableFileImport": true,
1927
+ "fitHorizontally": false,
1928
+ "frozenColumnCount": 0,
1929
+ "rowHeightInLines": 1,
1930
+ },
1931
+ },
1932
+ "enableLayoutUserSwitch": false,
1933
+ },
1934
+ "description": "",
1935
+ "displayName": "Create passenger",
1397
1936
  "icon": {
1398
1937
  "blueprint": {
1399
- "color": "#2D72D2",
1400
- "locator": "cube",
1938
+ "color": "#000000",
1939
+ "locator": "edit",
1401
1940
  },
1402
1941
  "type": "blueprint",
1403
1942
  },
1404
- "pluralDisplayName": "exampleObject",
1405
- "visibility": "NORMAL",
1943
+ "successMessage": [],
1944
+ "typeClasses": [],
1406
1945
  },
1407
- "implementsInterfaces2": [],
1408
- "primaryKeys": [
1409
- "bar",
1946
+ "entities": {
1947
+ "affectedInterfaceTypes": [],
1948
+ "affectedLinkTypes": [],
1949
+ "affectedObjectTypes": [
1950
+ "com.palantir.passenger",
1951
+ ],
1952
+ "typeGroups": [],
1953
+ },
1954
+ "formContentOrdering": [],
1955
+ "parameterOrdering": [
1956
+ "name",
1957
+ "flight_id",
1410
1958
  ],
1411
- "propertyTypes": {
1412
- "bar": {
1413
- "apiName": "bar",
1414
- "baseFormatter": undefined,
1415
- "dataConstraints": undefined,
1959
+ "parameters": {
1960
+ "flight_id": {
1416
1961
  "displayMetadata": {
1417
- "description": undefined,
1418
- "displayName": "Bar",
1419
- "visibility": "NORMAL",
1420
- },
1421
- "indexedForSearch": true,
1422
- "inlineAction": undefined,
1423
- "ruleSetBinding": undefined,
1424
- "sharedPropertyTypeApiName": undefined,
1425
- "sharedPropertyTypeRid": undefined,
1426
- "status": {
1427
- "active": {},
1428
- "type": "active",
1962
+ "description": "",
1963
+ "displayName": "Flight ID",
1964
+ "typeClasses": [],
1429
1965
  },
1966
+ "id": "flight_id",
1430
1967
  "type": {
1431
- "string": {
1432
- "analyzerOverride": undefined,
1433
- "enableAsciiFolding": undefined,
1434
- "isLongText": false,
1435
- "supportsEfficientLeadingWildcard": false,
1436
- "supportsExactMatching": true,
1437
- },
1968
+ "string": {},
1438
1969
  "type": "string",
1439
1970
  },
1440
- "typeClasses": [
1441
- {
1442
- "kind": "render_hint",
1443
- "name": "SELECTABLE",
1444
- },
1445
- {
1446
- "kind": "render_hint",
1447
- "name": "SORTABLE",
1448
- },
1449
- ],
1450
- "valueType": undefined,
1451
1971
  },
1452
- "fizz": {
1453
- "apiName": "fizz",
1454
- "baseFormatter": undefined,
1455
- "dataConstraints": undefined,
1972
+ "name": {
1456
1973
  "displayMetadata": {
1457
- "description": undefined,
1458
- "displayName": "Fizz",
1459
- "visibility": "NORMAL",
1460
- },
1461
- "indexedForSearch": true,
1462
- "inlineAction": undefined,
1463
- "ruleSetBinding": undefined,
1464
- "sharedPropertyTypeApiName": undefined,
1465
- "sharedPropertyTypeRid": undefined,
1466
- "status": {
1467
- "active": {},
1468
- "type": "active",
1974
+ "description": "",
1975
+ "displayName": "Name",
1976
+ "typeClasses": [],
1469
1977
  },
1978
+ "id": "name",
1470
1979
  "type": {
1471
- "mediaReference": {},
1472
- "type": "mediaReference",
1980
+ "string": {},
1981
+ "type": "string",
1473
1982
  },
1474
- "typeClasses": [],
1475
- "valueType": undefined,
1476
1983
  },
1477
1984
  },
1478
- "redacted": false,
1985
+ "sections": {},
1479
1986
  "status": {
1480
1987
  "active": {},
1481
1988
  "type": "active",
1482
1989
  },
1483
- "titlePropertyTypeRid": "bar",
1484
1990
  },
1485
1991
  },
1486
1992
  },
1487
- "sharedPropertyTypes": {},
1488
- },
1489
- "randomnessKey": undefined,
1490
- "valueTypes": {
1491
- "valueTypes": [],
1492
- },
1493
- }
1494
- `);
1495
- });
1496
- it("Derived datasources are properly defined", () => {
1497
- const passenger = defineObject({
1498
- displayName: "Passenger",
1499
- pluralDisplayName: "Passengers",
1500
- apiName: "passenger",
1501
- primaryKeyPropertyApiName: "name",
1502
- titlePropertyApiName: "name",
1503
- editsEnabled: true,
1504
- properties: {
1505
- "name": {
1506
- type: "string",
1507
- displayName: "Name"
1508
- },
1509
- "flight_id": {
1510
- type: "string",
1511
- displayName: "Flight ID"
1512
- }
1513
- }
1514
- });
1515
- const flightToPassengers = defineLink({
1516
- apiName: "flightToPassengersLink",
1517
- one: {
1518
- object: "com.palantir.flight",
1519
- metadata: {
1520
- apiName: "flightFromPassengers"
1521
- }
1522
- },
1523
- toMany: {
1524
- object: passenger.apiName,
1525
- metadata: {
1526
- apiName: "passengersFromFlight"
1527
- }
1528
- },
1529
- manyForeignKeyProperty: "flight_id"
1530
- });
1531
- expect(() => {
1532
- defineObject({
1533
- displayName: "Flight",
1534
- pluralDisplayName: "Flights",
1535
- apiName: "flight",
1536
- primaryKeyPropertyApiName: "id",
1537
- titlePropertyApiName: "id",
1538
- properties: {
1539
- id: {
1540
- type: "string",
1541
- displayName: "ID"
1542
- },
1543
- numPassengers: {
1544
- type: "string",
1545
- displayName: "Passengers"
1546
- }
1547
- },
1548
- datasources: [{
1549
- type: "dataset"
1550
- }, {
1551
- type: "derived",
1552
- linkDefinition: [{
1553
- linkType: flightToPassengers
1554
- }],
1555
- propertyMapping: {
1556
- numPassengers: {
1557
- type: "collectList",
1558
- property: "name",
1559
- limit: 100
1560
- }
1561
- }
1562
- }]
1563
- });
1564
- }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Property 'numPassengers' on object 'flight' is not collectible]`);
1565
- const flight = defineObject({
1566
- displayName: "Flight",
1567
- pluralDisplayName: "Flights",
1568
- apiName: "flight",
1569
- primaryKeyPropertyApiName: "id",
1570
- titlePropertyApiName: "id",
1571
- editsEnabled: true,
1572
- properties: {
1573
- id: {
1574
- type: "string",
1575
- displayName: "ID"
1576
- },
1577
- passengersList: {
1578
- type: "string",
1579
- array: true,
1580
- displayName: "Passengers"
1581
- }
1582
- },
1583
- datasources: [{
1584
- type: "dataset"
1585
- }, {
1586
- type: "derived",
1587
- linkDefinition: [{
1588
- linkType: flightToPassengers
1589
- }],
1590
- propertyMapping: {
1591
- passengersList: {
1592
- type: "collectList",
1593
- property: "name",
1594
- limit: 100
1595
- }
1596
- }
1597
- }]
1598
- });
1599
- defineCreateObjectAction({
1600
- displayName: "Create flight",
1601
- objectType: flight
1602
- });
1603
- defineDeleteObjectAction({
1604
- displayName: "Delete flight",
1605
- objectType: flight
1606
- });
1607
- defineCreateObjectAction({
1608
- displayName: "Create passenger",
1609
- objectType: passenger
1610
- });
1611
- defineDeleteObjectAction({
1612
- displayName: "Delete passenger",
1613
- objectType: passenger
1614
- });
1615
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1616
- {
1617
- "importedOntology": {
1618
- "actionTypes": {},
1619
- "blockPermissionInformation": {
1620
- "actionTypes": {},
1621
- "linkTypes": {},
1622
- "objectTypes": {},
1623
- },
1624
- "interfaceTypes": {},
1625
- "linkTypes": {},
1626
- "objectTypes": {},
1627
- "sharedPropertyTypes": {},
1628
- },
1629
- "importedValueTypes": {
1630
- "valueTypes": [],
1631
- },
1632
- "ontology": {
1633
- "actionTypes": {
1634
- "com.palantir.create-object-flight": {
1993
+ "com.palantir.delete-object-flight": {
1635
1994
  "actionType": {
1636
1995
  "actionTypeLogic": {
1637
1996
  "logic": {
1638
1997
  "rules": [
1639
1998
  {
1640
- "addObjectRule": {
1641
- "objectTypeId": "com.palantir.flight",
1642
- "propertyValues": {
1643
- "id": {
1644
- "parameterId": "id",
1645
- "type": "parameterId",
1646
- },
1647
- },
1648
- "structFieldValues": {},
1999
+ "deleteObjectRule": {
2000
+ "objectToDelete": "objectToDeleteParameter",
1649
2001
  },
1650
- "type": "addObjectRule",
2002
+ "type": "deleteObjectRule",
1651
2003
  },
1652
2004
  ],
1653
2005
  },
@@ -1667,13 +2019,13 @@ describe("Object Types", () => {
1667
2019
  },
1668
2020
  },
1669
2021
  "parameterValidations": {
1670
- "id": {
2022
+ "objectToDeleteParameter": {
1671
2023
  "conditionalOverrides": [],
1672
2024
  "defaultValidation": {
1673
2025
  "display": {
1674
2026
  "renderHint": {
1675
- "textInput": {},
1676
- "type": "textInput",
2027
+ "dropdown": {},
2028
+ "type": "dropdown",
1677
2029
  },
1678
2030
  "visibility": {
1679
2031
  "editable": {},
@@ -1682,15 +2034,15 @@ describe("Object Types", () => {
1682
2034
  },
1683
2035
  "validation": {
1684
2036
  "allowedValues": {
1685
- "text": {
1686
- "text": {},
1687
- "type": "text",
2037
+ "objectQuery": {
2038
+ "objectQuery": {},
2039
+ "type": "objectQuery",
1688
2040
  },
1689
- "type": "text",
2041
+ "type": "objectQuery",
1690
2042
  },
1691
2043
  "required": {
1692
- "notRequired": {},
1693
- "type": "notRequired",
2044
+ "required": {},
2045
+ "type": "required",
1694
2046
  },
1695
2047
  },
1696
2048
  },
@@ -1700,7 +2052,7 @@ describe("Object Types", () => {
1700
2052
  },
1701
2053
  },
1702
2054
  "metadata": {
1703
- "apiName": "com.palantir.create-object-flight",
2055
+ "apiName": "com.palantir.delete-object-flight",
1704
2056
  "displayMetadata": {
1705
2057
  "configuration": {
1706
2058
  "defaultLayout": "FORM",
@@ -1716,7 +2068,7 @@ describe("Object Types", () => {
1716
2068
  "enableLayoutUserSwitch": false,
1717
2069
  },
1718
2070
  "description": "",
1719
- "displayName": "Create flight",
2071
+ "displayName": "Delete flight",
1720
2072
  "icon": {
1721
2073
  "blueprint": {
1722
2074
  "color": "#000000",
@@ -1737,19 +2089,21 @@ describe("Object Types", () => {
1737
2089
  },
1738
2090
  "formContentOrdering": [],
1739
2091
  "parameterOrdering": [
1740
- "id",
2092
+ "objectToDeleteParameter",
1741
2093
  ],
1742
2094
  "parameters": {
1743
- "id": {
2095
+ "objectToDeleteParameter": {
1744
2096
  "displayMetadata": {
1745
2097
  "description": "",
1746
- "displayName": "ID",
2098
+ "displayName": "Delete object",
1747
2099
  "typeClasses": [],
1748
2100
  },
1749
- "id": "id",
2101
+ "id": "objectToDeleteParameter",
1750
2102
  "type": {
1751
- "string": {},
1752
- "type": "string",
2103
+ "objectReference": {
2104
+ "objectTypeId": "com.palantir.flight",
2105
+ },
2106
+ "type": "objectReference",
1753
2107
  },
1754
2108
  },
1755
2109
  },
@@ -1761,27 +2115,16 @@ describe("Object Types", () => {
1761
2115
  },
1762
2116
  },
1763
2117
  },
1764
- "com.palantir.create-object-passenger": {
2118
+ "com.palantir.delete-object-passenger": {
1765
2119
  "actionType": {
1766
2120
  "actionTypeLogic": {
1767
2121
  "logic": {
1768
2122
  "rules": [
1769
2123
  {
1770
- "addObjectRule": {
1771
- "objectTypeId": "com.palantir.passenger",
1772
- "propertyValues": {
1773
- "flight_id": {
1774
- "parameterId": "flight_id",
1775
- "type": "parameterId",
1776
- },
1777
- "name": {
1778
- "parameterId": "name",
1779
- "type": "parameterId",
1780
- },
1781
- },
1782
- "structFieldValues": {},
2124
+ "deleteObjectRule": {
2125
+ "objectToDelete": "objectToDeleteParameter",
1783
2126
  },
1784
- "type": "addObjectRule",
2127
+ "type": "deleteObjectRule",
1785
2128
  },
1786
2129
  ],
1787
2130
  },
@@ -1801,13 +2144,13 @@ describe("Object Types", () => {
1801
2144
  },
1802
2145
  },
1803
2146
  "parameterValidations": {
1804
- "flight_id": {
2147
+ "objectToDeleteParameter": {
1805
2148
  "conditionalOverrides": [],
1806
2149
  "defaultValidation": {
1807
2150
  "display": {
1808
2151
  "renderHint": {
1809
- "textInput": {},
1810
- "type": "textInput",
2152
+ "dropdown": {},
2153
+ "type": "dropdown",
1811
2154
  },
1812
2155
  "visibility": {
1813
2156
  "editable": {},
@@ -1816,43 +2159,15 @@ describe("Object Types", () => {
1816
2159
  },
1817
2160
  "validation": {
1818
2161
  "allowedValues": {
1819
- "text": {
1820
- "text": {},
1821
- "type": "text",
2162
+ "objectQuery": {
2163
+ "objectQuery": {},
2164
+ "type": "objectQuery",
1822
2165
  },
1823
- "type": "text",
2166
+ "type": "objectQuery",
1824
2167
  },
1825
2168
  "required": {
1826
- "notRequired": {},
1827
- "type": "notRequired",
1828
- },
1829
- },
1830
- },
1831
- },
1832
- "name": {
1833
- "conditionalOverrides": [],
1834
- "defaultValidation": {
1835
- "display": {
1836
- "renderHint": {
1837
- "textInput": {},
1838
- "type": "textInput",
1839
- },
1840
- "visibility": {
1841
- "editable": {},
1842
- "type": "editable",
1843
- },
1844
- },
1845
- "validation": {
1846
- "allowedValues": {
1847
- "text": {
1848
- "text": {},
1849
- "type": "text",
1850
- },
1851
- "type": "text",
1852
- },
1853
- "required": {
1854
- "notRequired": {},
1855
- "type": "notRequired",
2169
+ "required": {},
2170
+ "type": "required",
1856
2171
  },
1857
2172
  },
1858
2173
  },
@@ -1862,7 +2177,7 @@ describe("Object Types", () => {
1862
2177
  },
1863
2178
  },
1864
2179
  "metadata": {
1865
- "apiName": "com.palantir.create-object-passenger",
2180
+ "apiName": "com.palantir.delete-object-passenger",
1866
2181
  "displayMetadata": {
1867
2182
  "configuration": {
1868
2183
  "defaultLayout": "FORM",
@@ -1878,7 +2193,7 @@ describe("Object Types", () => {
1878
2193
  "enableLayoutUserSwitch": false,
1879
2194
  },
1880
2195
  "description": "",
1881
- "displayName": "Create passenger",
2196
+ "displayName": "Delete passenger",
1882
2197
  "icon": {
1883
2198
  "blueprint": {
1884
2199
  "color": "#000000",
@@ -1899,32 +2214,21 @@ describe("Object Types", () => {
1899
2214
  },
1900
2215
  "formContentOrdering": [],
1901
2216
  "parameterOrdering": [
1902
- "name",
1903
- "flight_id",
2217
+ "objectToDeleteParameter",
1904
2218
  ],
1905
2219
  "parameters": {
1906
- "flight_id": {
1907
- "displayMetadata": {
1908
- "description": "",
1909
- "displayName": "Flight ID",
1910
- "typeClasses": [],
1911
- },
1912
- "id": "flight_id",
1913
- "type": {
1914
- "string": {},
1915
- "type": "string",
1916
- },
1917
- },
1918
- "name": {
2220
+ "objectToDeleteParameter": {
1919
2221
  "displayMetadata": {
1920
2222
  "description": "",
1921
- "displayName": "Name",
2223
+ "displayName": "Delete object",
1922
2224
  "typeClasses": [],
1923
2225
  },
1924
- "id": "name",
2226
+ "id": "objectToDeleteParameter",
1925
2227
  "type": {
1926
- "string": {},
1927
- "type": "string",
2228
+ "objectReference": {
2229
+ "objectTypeId": "com.palantir.passenger",
2230
+ },
2231
+ "type": "objectReference",
1928
2232
  },
1929
2233
  },
1930
2234
  },
@@ -1936,257 +2240,497 @@ describe("Object Types", () => {
1936
2240
  },
1937
2241
  },
1938
2242
  },
1939
- "com.palantir.delete-object-flight": {
1940
- "actionType": {
1941
- "actionTypeLogic": {
1942
- "logic": {
1943
- "rules": [
2243
+ },
2244
+ "blockPermissionInformation": {
2245
+ "actionTypes": {},
2246
+ "linkTypes": {},
2247
+ "objectTypes": {},
2248
+ },
2249
+ "interfaceTypes": {},
2250
+ "linkTypes": {
2251
+ "flight-to-passengers-link": {
2252
+ "datasources": [],
2253
+ "entityMetadata": {
2254
+ "arePatchesEnabled": false,
2255
+ },
2256
+ "linkType": {
2257
+ "definition": {
2258
+ "oneToMany": {
2259
+ "cardinalityHint": "ONE_TO_MANY",
2260
+ "manyToOneLinkMetadata": {
2261
+ "apiName": "passengersFromFlight",
2262
+ "displayMetadata": {
2263
+ "displayName": "PassengersFromFlight",
2264
+ "groupDisplayName": "",
2265
+ "pluralDisplayName": "PassengersFromFlights",
2266
+ "visibility": "NORMAL",
2267
+ },
2268
+ "typeClasses": [],
2269
+ },
2270
+ "objectTypeRidManySide": "com.palantir.passenger",
2271
+ "objectTypeRidOneSide": "com.palantir.flight",
2272
+ "oneSidePrimaryKeyToManySidePropertyMapping": [
1944
2273
  {
1945
- "deleteObjectRule": {
1946
- "objectToDelete": "objectToDeleteParameter",
2274
+ "from": {
2275
+ "apiName": "id",
2276
+ "object": "com.palantir.flight",
2277
+ },
2278
+ "to": {
2279
+ "apiName": "flight_id",
2280
+ "object": "com.palantir.passenger",
1947
2281
  },
1948
- "type": "deleteObjectRule",
1949
2282
  },
1950
2283
  ],
1951
- },
1952
- "validation": {
1953
- "actionTypeLevelValidation": {
1954
- "rules": {
1955
- "0": {
1956
- "condition": {
1957
- "true": {},
1958
- "type": "true",
1959
- },
1960
- "displayMetadata": {
1961
- "failureMessage": "",
1962
- "typeClasses": [],
1963
- },
1964
- },
2284
+ "oneToManyLinkMetadata": {
2285
+ "apiName": "flightFromPassengers",
2286
+ "displayMetadata": {
2287
+ "displayName": "FlightFromPassengers",
2288
+ "groupDisplayName": "",
2289
+ "pluralDisplayName": "FlightFromPassengers",
2290
+ "visibility": "NORMAL",
1965
2291
  },
2292
+ "typeClasses": [],
1966
2293
  },
1967
- "parameterValidations": {
1968
- "objectToDeleteParameter": {
1969
- "conditionalOverrides": [],
1970
- "defaultValidation": {
1971
- "display": {
1972
- "renderHint": {
1973
- "dropdown": {},
1974
- "type": "dropdown",
1975
- },
1976
- "visibility": {
1977
- "editable": {},
1978
- "type": "editable",
2294
+ },
2295
+ "type": "oneToMany",
2296
+ },
2297
+ "id": "flight-to-passengers-link",
2298
+ "redacted": false,
2299
+ "status": {
2300
+ "active": {},
2301
+ "type": "active",
2302
+ },
2303
+ },
2304
+ },
2305
+ },
2306
+ "objectTypes": {
2307
+ "com.palantir.flight": {
2308
+ "datasources": [
2309
+ {
2310
+ "datasource": {
2311
+ "derived": {
2312
+ "definition": {
2313
+ "aggregatedProperties": {
2314
+ "linkDefinition": {
2315
+ "multiHopLink": {
2316
+ "steps": [
2317
+ {
2318
+ "searchAround": {
2319
+ "linkTypeIdentifier": {
2320
+ "linkType": "flight-to-passengers-link",
2321
+ "type": "linkType",
2322
+ },
2323
+ "linkTypeSide": "SOURCE",
2324
+ },
2325
+ "type": "searchAround",
2326
+ },
2327
+ ],
1979
2328
  },
2329
+ "type": "multiHopLink",
1980
2330
  },
1981
- "validation": {
1982
- "allowedValues": {
1983
- "objectQuery": {
1984
- "objectQuery": {},
1985
- "type": "objectQuery",
2331
+ "propertyTypeMapping": {
2332
+ "passengersList": {
2333
+ "collectList": {
2334
+ "limit": 100,
2335
+ "linkedProperty": {
2336
+ "propertyType": "name",
2337
+ "type": "propertyType",
2338
+ },
1986
2339
  },
1987
- "type": "objectQuery",
1988
- },
1989
- "required": {
1990
- "required": {},
1991
- "type": "required",
2340
+ "type": "collectList",
1992
2341
  },
1993
2342
  },
1994
2343
  },
2344
+ "type": "aggregatedProperties",
1995
2345
  },
1996
2346
  },
1997
- "sectionValidations": {},
1998
- },
1999
- },
2000
- "metadata": {
2001
- "apiName": "com.palantir.delete-object-flight",
2002
- "displayMetadata": {
2003
- "configuration": {
2004
- "defaultLayout": "FORM",
2005
- "displayAndFormat": {
2006
- "table": {
2007
- "columnWidthByParameterRid": {},
2008
- "enableFileImport": true,
2009
- "fitHorizontally": false,
2010
- "frozenColumnCount": 0,
2011
- "rowHeightInLines": 1,
2012
- },
2013
- },
2014
- "enableLayoutUserSwitch": false,
2015
- },
2016
- "description": "",
2017
- "displayName": "Delete flight",
2018
- "icon": {
2019
- "blueprint": {
2020
- "color": "#000000",
2021
- "locator": "edit",
2022
- },
2023
- "type": "blueprint",
2024
- },
2025
- "successMessage": [],
2026
- "typeClasses": [],
2347
+ "type": "derived",
2027
2348
  },
2028
- "entities": {
2029
- "affectedInterfaceTypes": [],
2030
- "affectedLinkTypes": [],
2031
- "affectedObjectTypes": [
2032
- "com.palantir.flight",
2033
- ],
2034
- "typeGroups": [],
2349
+ "datasourceName": "com.palantir.flight.derived.0",
2350
+ "editsConfiguration": {
2351
+ "onlyAllowPrivilegedEdits": false,
2035
2352
  },
2036
- "formContentOrdering": [],
2037
- "parameterOrdering": [
2038
- "objectToDeleteParameter",
2039
- ],
2040
- "parameters": {
2041
- "objectToDeleteParameter": {
2042
- "displayMetadata": {
2043
- "description": "",
2044
- "displayName": "Delete object",
2045
- "typeClasses": [],
2046
- },
2047
- "id": "objectToDeleteParameter",
2048
- "type": {
2049
- "objectReference": {
2050
- "objectTypeId": "com.palantir.flight",
2353
+ "redacted": false,
2354
+ },
2355
+ {
2356
+ "datasource": {
2357
+ "datasetV2": {
2358
+ "datasetRid": "com.palantir.flight",
2359
+ "propertyMapping": {
2360
+ "id": {
2361
+ "column": "id",
2362
+ "type": "column",
2051
2363
  },
2052
- "type": "objectReference",
2053
2364
  },
2054
2365
  },
2366
+ "type": "datasetV2",
2055
2367
  },
2056
- "sections": {},
2057
- "status": {
2058
- "active": {},
2059
- "type": "active",
2368
+ "datasourceName": "com.palantir.flight",
2369
+ "editsConfiguration": {
2370
+ "onlyAllowPrivilegedEdits": false,
2060
2371
  },
2372
+ "redacted": false,
2061
2373
  },
2062
- },
2063
- },
2064
- "com.palantir.delete-object-passenger": {
2065
- "actionType": {
2066
- "actionTypeLogic": {
2067
- "logic": {
2068
- "rules": [
2374
+ ],
2375
+ "entityMetadata": {
2376
+ "aliases": [],
2377
+ "arePatchesEnabled": true,
2378
+ },
2379
+ "objectType": {
2380
+ "allImplementsInterfaces": {},
2381
+ "apiName": "com.palantir.flight",
2382
+ "displayMetadata": {
2383
+ "description": undefined,
2384
+ "displayName": "Flight",
2385
+ "groupDisplayName": undefined,
2386
+ "icon": {
2387
+ "blueprint": {
2388
+ "color": "#2D72D2",
2389
+ "locator": "cube",
2390
+ },
2391
+ "type": "blueprint",
2392
+ },
2393
+ "pluralDisplayName": "Flights",
2394
+ "visibility": "NORMAL",
2395
+ },
2396
+ "implementsInterfaces2": [],
2397
+ "primaryKeys": [
2398
+ "id",
2399
+ ],
2400
+ "propertyTypes": {
2401
+ "id": {
2402
+ "apiName": "id",
2403
+ "baseFormatter": undefined,
2404
+ "dataConstraints": undefined,
2405
+ "displayMetadata": {
2406
+ "description": undefined,
2407
+ "displayName": "ID",
2408
+ "visibility": "NORMAL",
2409
+ },
2410
+ "indexedForSearch": true,
2411
+ "inlineAction": undefined,
2412
+ "ruleSetBinding": undefined,
2413
+ "sharedPropertyTypeApiName": undefined,
2414
+ "sharedPropertyTypeRid": undefined,
2415
+ "status": {
2416
+ "active": {},
2417
+ "type": "active",
2418
+ },
2419
+ "type": {
2420
+ "string": {
2421
+ "analyzerOverride": undefined,
2422
+ "enableAsciiFolding": undefined,
2423
+ "isLongText": false,
2424
+ "supportsEfficientLeadingWildcard": false,
2425
+ "supportsExactMatching": true,
2426
+ },
2427
+ "type": "string",
2428
+ },
2429
+ "typeClasses": [
2069
2430
  {
2070
- "deleteObjectRule": {
2071
- "objectToDelete": "objectToDeleteParameter",
2072
- },
2073
- "type": "deleteObjectRule",
2431
+ "kind": "render_hint",
2432
+ "name": "SELECTABLE",
2433
+ },
2434
+ {
2435
+ "kind": "render_hint",
2436
+ "name": "SORTABLE",
2074
2437
  },
2075
2438
  ],
2439
+ "valueType": undefined,
2076
2440
  },
2077
- "validation": {
2078
- "actionTypeLevelValidation": {
2079
- "rules": {
2080
- "0": {
2081
- "condition": {
2082
- "true": {},
2083
- "type": "true",
2084
- },
2085
- "displayMetadata": {
2086
- "failureMessage": "",
2087
- "typeClasses": [],
2088
- },
2089
- },
2090
- },
2441
+ "passengersList": {
2442
+ "apiName": "passengersList",
2443
+ "baseFormatter": undefined,
2444
+ "dataConstraints": undefined,
2445
+ "displayMetadata": {
2446
+ "description": undefined,
2447
+ "displayName": "Passengers",
2448
+ "visibility": "NORMAL",
2091
2449
  },
2092
- "parameterValidations": {
2093
- "objectToDeleteParameter": {
2094
- "conditionalOverrides": [],
2095
- "defaultValidation": {
2096
- "display": {
2097
- "renderHint": {
2098
- "dropdown": {},
2099
- "type": "dropdown",
2100
- },
2101
- "visibility": {
2102
- "editable": {},
2103
- "type": "editable",
2104
- },
2105
- },
2106
- "validation": {
2107
- "allowedValues": {
2108
- "objectQuery": {
2109
- "objectQuery": {},
2110
- "type": "objectQuery",
2111
- },
2112
- "type": "objectQuery",
2113
- },
2114
- "required": {
2115
- "required": {},
2116
- "type": "required",
2117
- },
2450
+ "indexedForSearch": true,
2451
+ "inlineAction": undefined,
2452
+ "ruleSetBinding": undefined,
2453
+ "sharedPropertyTypeApiName": undefined,
2454
+ "sharedPropertyTypeRid": undefined,
2455
+ "status": {
2456
+ "active": {},
2457
+ "type": "active",
2458
+ },
2459
+ "type": {
2460
+ "array": {
2461
+ "reducers": [],
2462
+ "subtype": {
2463
+ "string": {
2464
+ "analyzerOverride": undefined,
2465
+ "enableAsciiFolding": undefined,
2466
+ "isLongText": false,
2467
+ "supportsEfficientLeadingWildcard": false,
2468
+ "supportsExactMatching": true,
2118
2469
  },
2470
+ "type": "string",
2119
2471
  },
2120
2472
  },
2473
+ "type": "array",
2121
2474
  },
2122
- "sectionValidations": {},
2475
+ "typeClasses": [
2476
+ {
2477
+ "kind": "render_hint",
2478
+ "name": "SELECTABLE",
2479
+ },
2480
+ {
2481
+ "kind": "render_hint",
2482
+ "name": "SORTABLE",
2483
+ },
2484
+ ],
2485
+ "valueType": undefined,
2123
2486
  },
2124
2487
  },
2125
- "metadata": {
2126
- "apiName": "com.palantir.delete-object-passenger",
2127
- "displayMetadata": {
2128
- "configuration": {
2129
- "defaultLayout": "FORM",
2130
- "displayAndFormat": {
2131
- "table": {
2132
- "columnWidthByParameterRid": {},
2133
- "enableFileImport": true,
2134
- "fitHorizontally": false,
2135
- "frozenColumnCount": 0,
2136
- "rowHeightInLines": 1,
2488
+ "redacted": false,
2489
+ "status": {
2490
+ "active": {},
2491
+ "type": "active",
2492
+ },
2493
+ "titlePropertyTypeRid": "id",
2494
+ },
2495
+ },
2496
+ "com.palantir.passenger": {
2497
+ "datasources": [
2498
+ {
2499
+ "datasource": {
2500
+ "datasetV2": {
2501
+ "datasetRid": "com.palantir.passenger",
2502
+ "propertyMapping": {
2503
+ "flight_id": {
2504
+ "column": "flight_id",
2505
+ "type": "column",
2506
+ },
2507
+ "name": {
2508
+ "column": "name",
2509
+ "type": "column",
2137
2510
  },
2138
2511
  },
2139
- "enableLayoutUserSwitch": false,
2140
2512
  },
2141
- "description": "",
2142
- "displayName": "Delete passenger",
2143
- "icon": {
2144
- "blueprint": {
2145
- "color": "#000000",
2146
- "locator": "edit",
2147
- },
2148
- "type": "blueprint",
2513
+ "type": "datasetV2",
2514
+ },
2515
+ "datasourceName": "com.palantir.passenger",
2516
+ "editsConfiguration": {
2517
+ "onlyAllowPrivilegedEdits": false,
2518
+ },
2519
+ "redacted": false,
2520
+ },
2521
+ ],
2522
+ "entityMetadata": {
2523
+ "aliases": [],
2524
+ "arePatchesEnabled": true,
2525
+ },
2526
+ "objectType": {
2527
+ "allImplementsInterfaces": {},
2528
+ "apiName": "com.palantir.passenger",
2529
+ "displayMetadata": {
2530
+ "description": undefined,
2531
+ "displayName": "Passenger",
2532
+ "groupDisplayName": undefined,
2533
+ "icon": {
2534
+ "blueprint": {
2535
+ "color": "#2D72D2",
2536
+ "locator": "cube",
2149
2537
  },
2150
- "successMessage": [],
2151
- "typeClasses": [],
2538
+ "type": "blueprint",
2152
2539
  },
2153
- "entities": {
2154
- "affectedInterfaceTypes": [],
2155
- "affectedLinkTypes": [],
2156
- "affectedObjectTypes": [
2157
- "com.palantir.passenger",
2540
+ "pluralDisplayName": "Passengers",
2541
+ "visibility": "NORMAL",
2542
+ },
2543
+ "implementsInterfaces2": [],
2544
+ "primaryKeys": [
2545
+ "name",
2546
+ ],
2547
+ "propertyTypes": {
2548
+ "flight_id": {
2549
+ "apiName": "flight_id",
2550
+ "baseFormatter": undefined,
2551
+ "dataConstraints": undefined,
2552
+ "displayMetadata": {
2553
+ "description": undefined,
2554
+ "displayName": "Flight ID",
2555
+ "visibility": "NORMAL",
2556
+ },
2557
+ "indexedForSearch": true,
2558
+ "inlineAction": undefined,
2559
+ "ruleSetBinding": undefined,
2560
+ "sharedPropertyTypeApiName": undefined,
2561
+ "sharedPropertyTypeRid": undefined,
2562
+ "status": {
2563
+ "active": {},
2564
+ "type": "active",
2565
+ },
2566
+ "type": {
2567
+ "string": {
2568
+ "analyzerOverride": undefined,
2569
+ "enableAsciiFolding": undefined,
2570
+ "isLongText": false,
2571
+ "supportsEfficientLeadingWildcard": false,
2572
+ "supportsExactMatching": true,
2573
+ },
2574
+ "type": "string",
2575
+ },
2576
+ "typeClasses": [
2577
+ {
2578
+ "kind": "render_hint",
2579
+ "name": "SELECTABLE",
2580
+ },
2581
+ {
2582
+ "kind": "render_hint",
2583
+ "name": "SORTABLE",
2584
+ },
2158
2585
  ],
2159
- "typeGroups": [],
2586
+ "valueType": undefined,
2160
2587
  },
2161
- "formContentOrdering": [],
2162
- "parameterOrdering": [
2163
- "objectToDeleteParameter",
2164
- ],
2165
- "parameters": {
2166
- "objectToDeleteParameter": {
2167
- "displayMetadata": {
2168
- "description": "",
2169
- "displayName": "Delete object",
2170
- "typeClasses": [],
2588
+ "name": {
2589
+ "apiName": "name",
2590
+ "baseFormatter": undefined,
2591
+ "dataConstraints": undefined,
2592
+ "displayMetadata": {
2593
+ "description": undefined,
2594
+ "displayName": "Name",
2595
+ "visibility": "NORMAL",
2596
+ },
2597
+ "indexedForSearch": true,
2598
+ "inlineAction": undefined,
2599
+ "ruleSetBinding": undefined,
2600
+ "sharedPropertyTypeApiName": undefined,
2601
+ "sharedPropertyTypeRid": undefined,
2602
+ "status": {
2603
+ "active": {},
2604
+ "type": "active",
2605
+ },
2606
+ "type": {
2607
+ "string": {
2608
+ "analyzerOverride": undefined,
2609
+ "enableAsciiFolding": undefined,
2610
+ "isLongText": false,
2611
+ "supportsEfficientLeadingWildcard": false,
2612
+ "supportsExactMatching": true,
2171
2613
  },
2172
- "id": "objectToDeleteParameter",
2173
- "type": {
2174
- "objectReference": {
2175
- "objectTypeId": "com.palantir.passenger",
2176
- },
2177
- "type": "objectReference",
2614
+ "type": "string",
2615
+ },
2616
+ "typeClasses": [
2617
+ {
2618
+ "kind": "render_hint",
2619
+ "name": "SELECTABLE",
2620
+ },
2621
+ {
2622
+ "kind": "render_hint",
2623
+ "name": "SORTABLE",
2178
2624
  },
2179
- },
2180
- },
2181
- "sections": {},
2182
- "status": {
2183
- "active": {},
2184
- "type": "active",
2625
+ ],
2626
+ "valueType": undefined,
2185
2627
  },
2186
2628
  },
2629
+ "redacted": false,
2630
+ "status": {
2631
+ "active": {},
2632
+ "type": "active",
2633
+ },
2634
+ "titlePropertyTypeRid": "name",
2187
2635
  },
2188
2636
  },
2189
2637
  },
2638
+ "sharedPropertyTypes": {},
2639
+ },
2640
+ "randomnessKey": undefined,
2641
+ "valueTypes": {
2642
+ "valueTypes": [],
2643
+ },
2644
+ }
2645
+ `);
2646
+ });
2647
+ it("Self-referential links on derived datasources work", () => {
2648
+ const link_person_to_parent = defineLink({
2649
+ apiName: "person-to-parent",
2650
+ manyForeignKeyProperty: "parentFk",
2651
+ one: {
2652
+ object: "com.palantir.person",
2653
+ metadata: {
2654
+ apiName: "parent",
2655
+ displayName: "Parent",
2656
+ pluralDisplayName: "Parents",
2657
+ visibility: "NORMAL"
2658
+ }
2659
+ },
2660
+ toMany: {
2661
+ object: "com.palantir.person",
2662
+ metadata: {
2663
+ apiName: "child",
2664
+ displayName: "Child",
2665
+ pluralDisplayName: "Children",
2666
+ visibility: "NORMAL"
2667
+ }
2668
+ }
2669
+ });
2670
+ defineObject({
2671
+ displayName: "Person",
2672
+ pluralDisplayName: "Persons",
2673
+ description: "person",
2674
+ apiName: "person",
2675
+ titlePropertyApiName: "pk",
2676
+ primaryKeyPropertyApiName: "pk",
2677
+ properties: {
2678
+ "pk": {
2679
+ displayName: "pk",
2680
+ type: "string",
2681
+ status: "experimental"
2682
+ },
2683
+ "parentFk": {
2684
+ displayName: "Parent FK",
2685
+ type: "string",
2686
+ status: "experimental"
2687
+ },
2688
+ "siblingIds": {
2689
+ displayName: "Sibling IDs",
2690
+ type: "string",
2691
+ array: true,
2692
+ status: "experimental"
2693
+ }
2694
+ },
2695
+ datasources: [{
2696
+ type: "dataset"
2697
+ }, {
2698
+ type: "derived",
2699
+ linkDefinition: [{
2700
+ linkType: link_person_to_parent,
2701
+ side: "TARGET"
2702
+ }, {
2703
+ linkType: link_person_to_parent,
2704
+ side: "SOURCE"
2705
+ }],
2706
+ propertyMapping: {
2707
+ siblingIds: {
2708
+ type: "collectList",
2709
+ property: "pk",
2710
+ limit: 100
2711
+ }
2712
+ }
2713
+ }]
2714
+ });
2715
+ expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
2716
+ {
2717
+ "importedOntology": {
2718
+ "actionTypes": {},
2719
+ "blockPermissionInformation": {
2720
+ "actionTypes": {},
2721
+ "linkTypes": {},
2722
+ "objectTypes": {},
2723
+ },
2724
+ "interfaceTypes": {},
2725
+ "linkTypes": {},
2726
+ "objectTypes": {},
2727
+ "sharedPropertyTypes": {},
2728
+ },
2729
+ "importedValueTypes": {
2730
+ "valueTypes": [],
2731
+ },
2732
+ "ontology": {
2733
+ "actionTypes": {},
2190
2734
  "blockPermissionInformation": {
2191
2735
  "actionTypes": {},
2192
2736
  "linkTypes": {},
@@ -2194,7 +2738,7 @@ describe("Object Types", () => {
2194
2738
  },
2195
2739
  "interfaceTypes": {},
2196
2740
  "linkTypes": {
2197
- "flight-to-passengers-link": {
2741
+ "person-to-parent": {
2198
2742
  "datasources": [],
2199
2743
  "entityMetadata": {
2200
2744
  "arePatchesEnabled": false,
@@ -2204,35 +2748,35 @@ describe("Object Types", () => {
2204
2748
  "oneToMany": {
2205
2749
  "cardinalityHint": "ONE_TO_MANY",
2206
2750
  "manyToOneLinkMetadata": {
2207
- "apiName": "passengersFromFlight",
2751
+ "apiName": "child",
2208
2752
  "displayMetadata": {
2209
- "displayName": "PassengersFromFlight",
2753
+ "displayName": "Child",
2210
2754
  "groupDisplayName": "",
2211
- "pluralDisplayName": "PassengersFromFlights",
2755
+ "pluralDisplayName": "Children",
2212
2756
  "visibility": "NORMAL",
2213
2757
  },
2214
2758
  "typeClasses": [],
2215
2759
  },
2216
- "objectTypeRidManySide": "com.palantir.passenger",
2217
- "objectTypeRidOneSide": "com.palantir.flight",
2760
+ "objectTypeRidManySide": "com.palantir.person",
2761
+ "objectTypeRidOneSide": "com.palantir.person",
2218
2762
  "oneSidePrimaryKeyToManySidePropertyMapping": [
2219
2763
  {
2220
2764
  "from": {
2221
- "apiName": "id",
2222
- "object": "com.palantir.flight",
2765
+ "apiName": "pk",
2766
+ "object": "com.palantir.person",
2223
2767
  },
2224
2768
  "to": {
2225
- "apiName": "flight_id",
2226
- "object": "com.palantir.passenger",
2769
+ "apiName": "parentFk",
2770
+ "object": "com.palantir.person",
2227
2771
  },
2228
2772
  },
2229
2773
  ],
2230
2774
  "oneToManyLinkMetadata": {
2231
- "apiName": "flightFromPassengers",
2775
+ "apiName": "parent",
2232
2776
  "displayMetadata": {
2233
- "displayName": "FlightFromPassengers",
2777
+ "displayName": "Parent",
2234
2778
  "groupDisplayName": "",
2235
- "pluralDisplayName": "FlightFromPassengers",
2779
+ "pluralDisplayName": "Parents",
2236
2780
  "visibility": "NORMAL",
2237
2781
  },
2238
2782
  "typeClasses": [],
@@ -2240,7 +2784,7 @@ describe("Object Types", () => {
2240
2784
  },
2241
2785
  "type": "oneToMany",
2242
2786
  },
2243
- "id": "flight-to-passengers-link",
2787
+ "id": "person-to-parent",
2244
2788
  "redacted": false,
2245
2789
  "status": {
2246
2790
  "active": {},
@@ -2250,7 +2794,7 @@ describe("Object Types", () => {
2250
2794
  },
2251
2795
  },
2252
2796
  "objectTypes": {
2253
- "com.palantir.flight": {
2797
+ "com.palantir.person": {
2254
2798
  "datasources": [
2255
2799
  {
2256
2800
  "datasource": {
@@ -2263,7 +2807,17 @@ describe("Object Types", () => {
2263
2807
  {
2264
2808
  "searchAround": {
2265
2809
  "linkTypeIdentifier": {
2266
- "linkType": "flight-to-passengers-link",
2810
+ "linkType": "person-to-parent",
2811
+ "type": "linkType",
2812
+ },
2813
+ "linkTypeSide": "TARGET",
2814
+ },
2815
+ "type": "searchAround",
2816
+ },
2817
+ {
2818
+ "searchAround": {
2819
+ "linkTypeIdentifier": {
2820
+ "linkType": "person-to-parent",
2267
2821
  "type": "linkType",
2268
2822
  },
2269
2823
  "linkTypeSide": "SOURCE",
@@ -2275,11 +2829,11 @@ describe("Object Types", () => {
2275
2829
  "type": "multiHopLink",
2276
2830
  },
2277
2831
  "propertyTypeMapping": {
2278
- "passengersList": {
2832
+ "siblingIds": {
2279
2833
  "collectList": {
2280
2834
  "limit": 100,
2281
2835
  "linkedProperty": {
2282
- "propertyType": "name",
2836
+ "propertyType": "pk",
2283
2837
  "type": "propertyType",
2284
2838
  },
2285
2839
  },
@@ -2292,7 +2846,7 @@ describe("Object Types", () => {
2292
2846
  },
2293
2847
  "type": "derived",
2294
2848
  },
2295
- "datasourceName": "com.palantir.flight.derived.0",
2849
+ "datasourceName": "com.palantir.person.derived.0",
2296
2850
  "editsConfiguration": {
2297
2851
  "onlyAllowPrivilegedEdits": false,
2298
2852
  },
@@ -2301,17 +2855,21 @@ describe("Object Types", () => {
2301
2855
  {
2302
2856
  "datasource": {
2303
2857
  "datasetV2": {
2304
- "datasetRid": "com.palantir.flight",
2858
+ "datasetRid": "com.palantir.person",
2305
2859
  "propertyMapping": {
2306
- "id": {
2307
- "column": "id",
2860
+ "parentFk": {
2861
+ "column": "parentFk",
2862
+ "type": "column",
2863
+ },
2864
+ "pk": {
2865
+ "column": "pk",
2308
2866
  "type": "column",
2309
2867
  },
2310
2868
  },
2311
2869
  },
2312
2870
  "type": "datasetV2",
2313
2871
  },
2314
- "datasourceName": "com.palantir.flight",
2872
+ "datasourceName": "com.palantir.person",
2315
2873
  "editsConfiguration": {
2316
2874
  "onlyAllowPrivilegedEdits": false,
2317
2875
  },
@@ -2319,14 +2877,15 @@ describe("Object Types", () => {
2319
2877
  },
2320
2878
  ],
2321
2879
  "entityMetadata": {
2322
- "arePatchesEnabled": true,
2880
+ "aliases": [],
2881
+ "arePatchesEnabled": false,
2323
2882
  },
2324
2883
  "objectType": {
2325
2884
  "allImplementsInterfaces": {},
2326
- "apiName": "com.palantir.flight",
2885
+ "apiName": "com.palantir.person",
2327
2886
  "displayMetadata": {
2328
- "description": undefined,
2329
- "displayName": "Flight",
2887
+ "description": "person",
2888
+ "displayName": "Person",
2330
2889
  "groupDisplayName": undefined,
2331
2890
  "icon": {
2332
2891
  "blueprint": {
@@ -2335,21 +2894,21 @@ describe("Object Types", () => {
2335
2894
  },
2336
2895
  "type": "blueprint",
2337
2896
  },
2338
- "pluralDisplayName": "Flights",
2897
+ "pluralDisplayName": "Persons",
2339
2898
  "visibility": "NORMAL",
2340
2899
  },
2341
2900
  "implementsInterfaces2": [],
2342
2901
  "primaryKeys": [
2343
- "id",
2902
+ "pk",
2344
2903
  ],
2345
2904
  "propertyTypes": {
2346
- "id": {
2347
- "apiName": "id",
2905
+ "parentFk": {
2906
+ "apiName": "parentFk",
2348
2907
  "baseFormatter": undefined,
2349
2908
  "dataConstraints": undefined,
2350
2909
  "displayMetadata": {
2351
2910
  "description": undefined,
2352
- "displayName": "ID",
2911
+ "displayName": "Parent FK",
2353
2912
  "visibility": "NORMAL",
2354
2913
  },
2355
2914
  "indexedForSearch": true,
@@ -2358,8 +2917,8 @@ describe("Object Types", () => {
2358
2917
  "sharedPropertyTypeApiName": undefined,
2359
2918
  "sharedPropertyTypeRid": undefined,
2360
2919
  "status": {
2361
- "active": {},
2362
- "type": "active",
2920
+ "experimental": {},
2921
+ "type": "experimental",
2363
2922
  },
2364
2923
  "type": {
2365
2924
  "string": {
@@ -2383,118 +2942,13 @@ describe("Object Types", () => {
2383
2942
  ],
2384
2943
  "valueType": undefined,
2385
2944
  },
2386
- "passengersList": {
2387
- "apiName": "passengersList",
2388
- "baseFormatter": undefined,
2389
- "dataConstraints": undefined,
2390
- "displayMetadata": {
2391
- "description": undefined,
2392
- "displayName": "Passengers",
2393
- "visibility": "NORMAL",
2394
- },
2395
- "indexedForSearch": true,
2396
- "inlineAction": undefined,
2397
- "ruleSetBinding": undefined,
2398
- "sharedPropertyTypeApiName": undefined,
2399
- "sharedPropertyTypeRid": undefined,
2400
- "status": {
2401
- "active": {},
2402
- "type": "active",
2403
- },
2404
- "type": {
2405
- "array": {
2406
- "subtype": {
2407
- "string": {
2408
- "analyzerOverride": undefined,
2409
- "enableAsciiFolding": undefined,
2410
- "isLongText": false,
2411
- "supportsEfficientLeadingWildcard": false,
2412
- "supportsExactMatching": true,
2413
- },
2414
- "type": "string",
2415
- },
2416
- },
2417
- "type": "array",
2418
- },
2419
- "typeClasses": [
2420
- {
2421
- "kind": "render_hint",
2422
- "name": "SELECTABLE",
2423
- },
2424
- {
2425
- "kind": "render_hint",
2426
- "name": "SORTABLE",
2427
- },
2428
- ],
2429
- "valueType": undefined,
2430
- },
2431
- },
2432
- "redacted": false,
2433
- "status": {
2434
- "active": {},
2435
- "type": "active",
2436
- },
2437
- "titlePropertyTypeRid": "id",
2438
- },
2439
- },
2440
- "com.palantir.passenger": {
2441
- "datasources": [
2442
- {
2443
- "datasource": {
2444
- "datasetV2": {
2445
- "datasetRid": "com.palantir.passenger",
2446
- "propertyMapping": {
2447
- "flight_id": {
2448
- "column": "flight_id",
2449
- "type": "column",
2450
- },
2451
- "name": {
2452
- "column": "name",
2453
- "type": "column",
2454
- },
2455
- },
2456
- },
2457
- "type": "datasetV2",
2458
- },
2459
- "datasourceName": "com.palantir.passenger",
2460
- "editsConfiguration": {
2461
- "onlyAllowPrivilegedEdits": false,
2462
- },
2463
- "redacted": false,
2464
- },
2465
- ],
2466
- "entityMetadata": {
2467
- "arePatchesEnabled": true,
2468
- },
2469
- "objectType": {
2470
- "allImplementsInterfaces": {},
2471
- "apiName": "com.palantir.passenger",
2472
- "displayMetadata": {
2473
- "description": undefined,
2474
- "displayName": "Passenger",
2475
- "groupDisplayName": undefined,
2476
- "icon": {
2477
- "blueprint": {
2478
- "color": "#2D72D2",
2479
- "locator": "cube",
2480
- },
2481
- "type": "blueprint",
2482
- },
2483
- "pluralDisplayName": "Passengers",
2484
- "visibility": "NORMAL",
2485
- },
2486
- "implementsInterfaces2": [],
2487
- "primaryKeys": [
2488
- "name",
2489
- ],
2490
- "propertyTypes": {
2491
- "flight_id": {
2492
- "apiName": "flight_id",
2945
+ "pk": {
2946
+ "apiName": "pk",
2493
2947
  "baseFormatter": undefined,
2494
2948
  "dataConstraints": undefined,
2495
2949
  "displayMetadata": {
2496
2950
  "description": undefined,
2497
- "displayName": "Flight ID",
2951
+ "displayName": "pk",
2498
2952
  "visibility": "NORMAL",
2499
2953
  },
2500
2954
  "indexedForSearch": true,
@@ -2503,8 +2957,8 @@ describe("Object Types", () => {
2503
2957
  "sharedPropertyTypeApiName": undefined,
2504
2958
  "sharedPropertyTypeRid": undefined,
2505
2959
  "status": {
2506
- "active": {},
2507
- "type": "active",
2960
+ "experimental": {},
2961
+ "type": "experimental",
2508
2962
  },
2509
2963
  "type": {
2510
2964
  "string": {
@@ -2528,13 +2982,13 @@ describe("Object Types", () => {
2528
2982
  ],
2529
2983
  "valueType": undefined,
2530
2984
  },
2531
- "name": {
2532
- "apiName": "name",
2985
+ "siblingIds": {
2986
+ "apiName": "siblingIds",
2533
2987
  "baseFormatter": undefined,
2534
2988
  "dataConstraints": undefined,
2535
2989
  "displayMetadata": {
2536
2990
  "description": undefined,
2537
- "displayName": "Name",
2991
+ "displayName": "Sibling IDs",
2538
2992
  "visibility": "NORMAL",
2539
2993
  },
2540
2994
  "indexedForSearch": true,
@@ -2543,18 +2997,24 @@ describe("Object Types", () => {
2543
2997
  "sharedPropertyTypeApiName": undefined,
2544
2998
  "sharedPropertyTypeRid": undefined,
2545
2999
  "status": {
2546
- "active": {},
2547
- "type": "active",
3000
+ "experimental": {},
3001
+ "type": "experimental",
2548
3002
  },
2549
3003
  "type": {
2550
- "string": {
2551
- "analyzerOverride": undefined,
2552
- "enableAsciiFolding": undefined,
2553
- "isLongText": false,
2554
- "supportsEfficientLeadingWildcard": false,
2555
- "supportsExactMatching": true,
3004
+ "array": {
3005
+ "reducers": [],
3006
+ "subtype": {
3007
+ "string": {
3008
+ "analyzerOverride": undefined,
3009
+ "enableAsciiFolding": undefined,
3010
+ "isLongText": false,
3011
+ "supportsEfficientLeadingWildcard": false,
3012
+ "supportsExactMatching": true,
3013
+ },
3014
+ "type": "string",
3015
+ },
2556
3016
  },
2557
- "type": "string",
3017
+ "type": "array",
2558
3018
  },
2559
3019
  "typeClasses": [
2560
3020
  {
@@ -2574,7 +3034,7 @@ describe("Object Types", () => {
2574
3034
  "active": {},
2575
3035
  "type": "active",
2576
3036
  },
2577
- "titlePropertyTypeRid": "name",
3037
+ "titlePropertyTypeRid": "pk",
2578
3038
  },
2579
3039
  },
2580
3040
  },