@osdk/maker 0.16.0-beta.9 → 0.16.0

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 (115) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/build/browser/api/defineFunction.js +6 -5
  3. package/build/browser/api/defineFunction.js.map +1 -1
  4. package/build/browser/api/defineInterface.js +3 -0
  5. package/build/browser/api/defineInterface.js.map +1 -1
  6. package/build/browser/api/defineLink.js +3 -0
  7. package/build/browser/api/defineLink.js.map +1 -1
  8. package/build/browser/api/defineObject.js +9 -2
  9. package/build/browser/api/defineObject.js.map +1 -1
  10. package/build/browser/api/interface/InterfaceType.js.map +1 -1
  11. package/build/browser/api/links/LinkType.js.map +1 -1
  12. package/build/browser/api/object/ObjectType.js.map +1 -1
  13. package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -1
  14. package/build/browser/cli/main.js +4 -4
  15. package/build/browser/cli/main.js.map +1 -1
  16. package/build/browser/conversion/toMarketplace/convertInterface.js +2 -1
  17. package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -1
  18. package/build/browser/conversion/toMarketplace/convertLink.js +9 -4
  19. package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -1
  20. package/build/browser/util/ApiNameValidator.js +26 -0
  21. package/build/browser/util/ApiNameValidator.js.map +1 -0
  22. package/build/cjs/index.cjs +107 -83
  23. package/build/cjs/index.cjs.map +1 -1
  24. package/build/cjs/index.d.cts +5 -1
  25. package/build/esm/api/defineFunction.js +6 -5
  26. package/build/esm/api/defineFunction.js.map +1 -1
  27. package/build/esm/api/defineInterface.js +3 -0
  28. package/build/esm/api/defineInterface.js.map +1 -1
  29. package/build/esm/api/defineLink.js +3 -0
  30. package/build/esm/api/defineLink.js.map +1 -1
  31. package/build/esm/api/defineObject.js +9 -2
  32. package/build/esm/api/defineObject.js.map +1 -1
  33. package/build/esm/api/interface/InterfaceType.js.map +1 -1
  34. package/build/esm/api/links/LinkType.js.map +1 -1
  35. package/build/esm/api/object/ObjectType.js.map +1 -1
  36. package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -1
  37. package/build/esm/cli/main.js +4 -4
  38. package/build/esm/cli/main.js.map +1 -1
  39. package/build/esm/conversion/toMarketplace/convertInterface.js +2 -1
  40. package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -1
  41. package/build/esm/conversion/toMarketplace/convertLink.js +9 -4
  42. package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -1
  43. package/build/esm/util/ApiNameValidator.js +26 -0
  44. package/build/esm/util/ApiNameValidator.js.map +1 -0
  45. package/build/types/api/defineFunction.d.ts.map +1 -1
  46. package/build/types/api/defineInterface.d.ts.map +1 -1
  47. package/build/types/api/defineLink.d.ts.map +1 -1
  48. package/build/types/api/defineObject.d.ts.map +1 -1
  49. package/build/types/api/interface/InterfaceType.d.ts +1 -1
  50. package/build/types/api/interface/InterfaceType.d.ts.map +1 -1
  51. package/build/types/api/links/LinkType.d.ts +2 -0
  52. package/build/types/api/links/LinkType.d.ts.map +1 -1
  53. package/build/types/api/object/ObjectType.d.ts +1 -0
  54. package/build/types/api/object/ObjectType.d.ts.map +1 -1
  55. package/build/types/api/object/ObjectTypeDefinition.d.ts +1 -0
  56. package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -1
  57. package/build/types/cli/main.d.ts.map +1 -1
  58. package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -1
  59. package/build/types/util/ApiNameValidator.d.ts +4 -0
  60. package/build/types/util/ApiNameValidator.d.ts.map +1 -0
  61. package/package.json +6 -6
  62. package/build/browser/api/test/actions.test.js +0 -14402
  63. package/build/browser/api/test/actions.test.js.map +0 -1
  64. package/build/browser/api/test/interfaces.test.js +0 -1189
  65. package/build/browser/api/test/interfaces.test.js.map +0 -1
  66. package/build/browser/api/test/links.test.js +0 -2019
  67. package/build/browser/api/test/links.test.js.map +0 -1
  68. package/build/browser/api/test/markingconstraint.test.js +0 -134
  69. package/build/browser/api/test/markingconstraint.test.js.map +0 -1
  70. package/build/browser/api/test/misc.test.js +0 -1315
  71. package/build/browser/api/test/misc.test.js.map +0 -1
  72. package/build/browser/api/test/objectStatus.test.js +0 -252
  73. package/build/browser/api/test/objectStatus.test.js.map +0 -1
  74. package/build/browser/api/test/objects.test.js +0 -4441
  75. package/build/browser/api/test/objects.test.js.map +0 -1
  76. package/build/browser/api/test/spt.test.js +0 -751
  77. package/build/browser/api/test/spt.test.js.map +0 -1
  78. package/build/browser/api/test/valueTypes.test.js +0 -307
  79. package/build/browser/api/test/valueTypes.test.js.map +0 -1
  80. package/build/esm/api/test/actions.test.js +0 -14402
  81. package/build/esm/api/test/actions.test.js.map +0 -1
  82. package/build/esm/api/test/interfaces.test.js +0 -1189
  83. package/build/esm/api/test/interfaces.test.js.map +0 -1
  84. package/build/esm/api/test/links.test.js +0 -2019
  85. package/build/esm/api/test/links.test.js.map +0 -1
  86. package/build/esm/api/test/markingconstraint.test.js +0 -134
  87. package/build/esm/api/test/markingconstraint.test.js.map +0 -1
  88. package/build/esm/api/test/misc.test.js +0 -1315
  89. package/build/esm/api/test/misc.test.js.map +0 -1
  90. package/build/esm/api/test/objectStatus.test.js +0 -252
  91. package/build/esm/api/test/objectStatus.test.js.map +0 -1
  92. package/build/esm/api/test/objects.test.js +0 -4441
  93. package/build/esm/api/test/objects.test.js.map +0 -1
  94. package/build/esm/api/test/spt.test.js +0 -751
  95. package/build/esm/api/test/spt.test.js.map +0 -1
  96. package/build/esm/api/test/valueTypes.test.js +0 -307
  97. package/build/esm/api/test/valueTypes.test.js.map +0 -1
  98. package/build/types/api/test/actions.test.d.ts +0 -1
  99. package/build/types/api/test/actions.test.d.ts.map +0 -1
  100. package/build/types/api/test/interfaces.test.d.ts +0 -1
  101. package/build/types/api/test/interfaces.test.d.ts.map +0 -1
  102. package/build/types/api/test/links.test.d.ts +0 -1
  103. package/build/types/api/test/links.test.d.ts.map +0 -1
  104. package/build/types/api/test/markingconstraint.test.d.ts +0 -1
  105. package/build/types/api/test/markingconstraint.test.d.ts.map +0 -1
  106. package/build/types/api/test/misc.test.d.ts +0 -1
  107. package/build/types/api/test/misc.test.d.ts.map +0 -1
  108. package/build/types/api/test/objectStatus.test.d.ts +0 -1
  109. package/build/types/api/test/objectStatus.test.d.ts.map +0 -1
  110. package/build/types/api/test/objects.test.d.ts +0 -1
  111. package/build/types/api/test/objects.test.d.ts.map +0 -1
  112. package/build/types/api/test/spt.test.d.ts +0 -1
  113. package/build/types/api/test/spt.test.d.ts.map +0 -1
  114. package/build/types/api/test/valueTypes.test.d.ts +0 -1
  115. package/build/types/api/test/valueTypes.test.d.ts.map +0 -1
@@ -1,4441 +0,0 @@
1
- /*
2
- * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- import { beforeEach, describe, expect, it } from "vitest";
18
- import { defineCreateObjectAction } from "../defineCreateObjectAction.js";
19
- import { defineDeleteObjectAction } from "../defineDeleteObjectAction.js";
20
- import { defineInterface } from "../defineInterface.js";
21
- import { defineLink } from "../defineLink.js";
22
- import { defineObject } from "../defineObject.js";
23
- import { defineOntology, dumpOntologyFullMetadata } from "../defineOntology.js";
24
- import { defineSharedPropertyType } from "../defineSpt.js";
25
- describe("Object Types", () => {
26
- beforeEach(async () => {
27
- await defineOntology("com.palantir.", () => {}, "/tmp/");
28
- });
29
- it("Fails if the api name is invalid", () => {
30
- expect(() => {
31
- defineObject({
32
- titlePropertyApiName: "bar",
33
- displayName: "Foo",
34
- pluralDisplayName: "Foo",
35
- apiName: "foo_with_underscores",
36
- primaryKeyPropertyApiName: "bar",
37
- properties: {
38
- "bar": {
39
- type: "string"
40
- }
41
- }
42
- });
43
- }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Invalid API name foo_with_underscores. API names must match the regex /^([a-zA-Z][a-zA-Z0-9\\\\-]*)$/.]`);
44
- });
45
- it("Fails if any property reference does not exist", () => {
46
- const spt = defineSharedPropertyType({
47
- apiName: "foo",
48
- type: "string"
49
- });
50
- const sample = defineInterface({
51
- apiName: "interface",
52
- properties: {
53
- foo: spt
54
- }
55
- });
56
- expect(() => {
57
- defineObject({
58
- titlePropertyApiName: "fizz",
59
- displayName: "Foo",
60
- pluralDisplayName: "Foo",
61
- apiName: "foo",
62
- primaryKeyPropertyApiName: "bar",
63
- properties: {
64
- "bar": {
65
- type: "string"
66
- }
67
- }
68
- });
69
- }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Title property fizz is not defined on object foo]`);
70
- expect(() => {
71
- defineObject({
72
- titlePropertyApiName: "bar",
73
- displayName: "Foo",
74
- pluralDisplayName: "Foo",
75
- apiName: "foo",
76
- primaryKeyPropertyApiName: "fizz",
77
- properties: {
78
- "bar": {
79
- type: "string"
80
- }
81
- }
82
- });
83
- }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Primary key property fizz does not exist on object foo]`);
84
- expect(() => {
85
- defineObject({
86
- titlePropertyApiName: "bar",
87
- displayName: "Foo",
88
- pluralDisplayName: "Foo",
89
- apiName: "foo",
90
- primaryKeyPropertyApiName: "bar",
91
- properties: {
92
- "bar": {
93
- type: "string"
94
- }
95
- },
96
- implementsInterfaces: [{
97
- implements: sample,
98
- propertyMapping: [{
99
- interfaceProperty: "com.palantir.foo",
100
- mapsTo: "fizz"
101
- }]
102
- }]
103
- });
104
- }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: \nOntology Definition Error: Object property mapped to interface does not exist. Object Property Mapped: fizz\n]`);
105
- expect(() => {
106
- defineObject({
107
- titlePropertyApiName: "bar",
108
- displayName: "Foo",
109
- pluralDisplayName: "Foo",
110
- apiName: "foo",
111
- primaryKeyPropertyApiName: "bar",
112
- properties: {
113
- "bar": {
114
- type: "string"
115
- }
116
- },
117
- implementsInterfaces: [{
118
- implements: sample,
119
- propertyMapping: [{
120
- interfaceProperty: "com.palantir.fizz",
121
- mapsTo: "bar"
122
- }, {
123
- interfaceProperty: "com.palantir.foo",
124
- mapsTo: "bar"
125
- }]
126
- }]
127
- });
128
- }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: \nOntology Definition Error: Interface property com.palantir.fizz referenced in foo object does not exist\n]`);
129
- });
130
- it("Objects properly defined", () => {
131
- const spt = defineSharedPropertyType({
132
- apiName: "foo",
133
- type: "string"
134
- });
135
- const sample = defineInterface({
136
- apiName: "interface",
137
- properties: {
138
- foo: spt
139
- }
140
- });
141
- defineObject({
142
- titlePropertyApiName: "bar",
143
- displayName: "Foo",
144
- pluralDisplayName: "Foo",
145
- apiName: "foo",
146
- primaryKeyPropertyApiName: "bar",
147
- properties: {
148
- "bar": {
149
- type: "string",
150
- displayName: "Bar"
151
- },
152
- "arrayProp": {
153
- type: "string",
154
- array: true,
155
- displayName: "Array Property Test"
156
- },
157
- "geopoint": {
158
- type: {
159
- type: "struct",
160
- structDefinition: {
161
- lat: "double",
162
- lng: "double"
163
- }
164
- },
165
- displayName: "geopoint"
166
- }
167
- },
168
- aliases: ["alias1", "alias2"],
169
- implementsInterfaces: [{
170
- implements: sample,
171
- propertyMapping: [{
172
- interfaceProperty: spt.apiName,
173
- mapsTo: "bar"
174
- }]
175
- }]
176
- });
177
- expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
178
- {
179
- "actionTypes": {},
180
- "blockPermissionInformation": {
181
- "actionTypes": {},
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",
215
- },
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,
239
- },
240
- },
241
- },
242
- "propertiesV3": {
243
- "com.palantir.foo": {
244
- "sharedPropertyBasedPropertyType": {
245
- "requireImplementation": true,
246
- "sharedPropertyType": {
247
- "aliases": [],
248
- "apiName": "com.palantir.foo",
249
- "baseFormatter": undefined,
250
- "dataConstraints": undefined,
251
- "displayMetadata": {
252
- "description": undefined,
253
- "displayName": "foo",
254
- "visibility": "NORMAL",
255
- },
256
- "gothamMapping": undefined,
257
- "indexedForSearch": true,
258
- "type": {
259
- "string": {
260
- "analyzerOverride": undefined,
261
- "enableAsciiFolding": undefined,
262
- "isLongText": false,
263
- "supportsEfficientLeadingWildcard": false,
264
- "supportsExactMatching": true,
265
- },
266
- "type": "string",
267
- },
268
- "typeClasses": [
269
- {
270
- "kind": "render_hint",
271
- "name": "SELECTABLE",
272
- },
273
- {
274
- "kind": "render_hint",
275
- "name": "SORTABLE",
276
- },
277
- ],
278
- "valueType": undefined,
279
- },
280
- },
281
- "type": "sharedPropertyBasedPropertyType",
282
- },
283
- },
284
- "searchable": true,
285
- "status": {
286
- "active": {},
287
- "type": "active",
288
- },
289
- },
290
- },
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": {},
320
- },
321
- },
322
- },
323
- "type": "struct",
324
- },
325
- },
326
- },
327
- "type": "datasetV2",
328
- },
329
- "datasourceName": "com.palantir.foo",
330
- "editsConfiguration": {
331
- "onlyAllowPrivilegedEdits": false,
332
- },
333
- "redacted": false,
334
- },
335
- ],
336
- "entityMetadata": {
337
- "aliases": [
338
- "alias1",
339
- "alias2",
340
- ],
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",
359
- },
360
- "implementsInterfaces2": [
361
- {
362
- "interfaceTypeApiName": "com.palantir.interface",
363
- "linksV2": {},
364
- "properties": {},
365
- "propertiesV2": {
366
- "com.palantir.foo": {
367
- "propertyTypeRid": "bar",
368
- "type": "propertyTypeRid",
369
- },
370
- },
371
- },
372
- ],
373
- "primaryKeys": [
374
- "bar",
375
- ],
376
- "propertyTypes": {
377
- "arrayProp": {
378
- "apiName": "arrayProp",
379
- "baseFormatter": undefined,
380
- "dataConstraints": undefined,
381
- "displayMetadata": {
382
- "description": undefined,
383
- "displayName": "Array Property Test",
384
- "visibility": "NORMAL",
385
- },
386
- "indexedForSearch": true,
387
- "inlineAction": undefined,
388
- "ruleSetBinding": undefined,
389
- "sharedPropertyTypeApiName": undefined,
390
- "sharedPropertyTypeRid": undefined,
391
- "status": {
392
- "active": {},
393
- "type": "active",
394
- },
395
- "type": {
396
- "array": {
397
- "reducers": [],
398
- "subtype": {
399
- "string": {
400
- "analyzerOverride": undefined,
401
- "enableAsciiFolding": undefined,
402
- "isLongText": false,
403
- "supportsEfficientLeadingWildcard": false,
404
- "supportsExactMatching": true,
405
- },
406
- "type": "string",
407
- },
408
- },
409
- "type": "array",
410
- },
411
- "typeClasses": [
412
- {
413
- "kind": "render_hint",
414
- "name": "SELECTABLE",
415
- },
416
- {
417
- "kind": "render_hint",
418
- "name": "SORTABLE",
419
- },
420
- ],
421
- "valueType": undefined,
422
- },
423
- "bar": {
424
- "apiName": "bar",
425
- "baseFormatter": undefined,
426
- "dataConstraints": undefined,
427
- "displayMetadata": {
428
- "description": undefined,
429
- "displayName": "Bar",
430
- "visibility": "NORMAL",
431
- },
432
- "indexedForSearch": true,
433
- "inlineAction": undefined,
434
- "ruleSetBinding": undefined,
435
- "sharedPropertyTypeApiName": undefined,
436
- "sharedPropertyTypeRid": undefined,
437
- "status": {
438
- "active": {},
439
- "type": "active",
440
- },
441
- "type": {
442
- "string": {
443
- "analyzerOverride": undefined,
444
- "enableAsciiFolding": undefined,
445
- "isLongText": false,
446
- "supportsEfficientLeadingWildcard": false,
447
- "supportsExactMatching": true,
448
- },
449
- "type": "string",
450
- },
451
- "typeClasses": [
452
- {
453
- "kind": "render_hint",
454
- "name": "SELECTABLE",
455
- },
456
- {
457
- "kind": "render_hint",
458
- "name": "SORTABLE",
459
- },
460
- ],
461
- "valueType": undefined,
462
- },
463
- "geopoint": {
464
- "apiName": "geopoint",
465
- "baseFormatter": undefined,
466
- "dataConstraints": undefined,
467
- "displayMetadata": {
468
- "description": undefined,
469
- "displayName": "geopoint",
470
- "visibility": "NORMAL",
471
- },
472
- "indexedForSearch": true,
473
- "inlineAction": undefined,
474
- "ruleSetBinding": undefined,
475
- "sharedPropertyTypeApiName": undefined,
476
- "sharedPropertyTypeRid": undefined,
477
- "status": {
478
- "active": {},
479
- "type": "active",
480
- },
481
- "type": {
482
- "struct": {
483
- "mainValue": undefined,
484
- "structFields": [
485
- {
486
- "aliases": [],
487
- "apiName": "lat",
488
- "displayMetadata": {
489
- "description": undefined,
490
- "displayName": "lat",
491
- },
492
- "fieldType": {
493
- "double": {},
494
- "type": "double",
495
- },
496
- "typeClasses": [],
497
- },
498
- {
499
- "aliases": [],
500
- "apiName": "lng",
501
- "displayMetadata": {
502
- "description": undefined,
503
- "displayName": "lng",
504
- },
505
- "fieldType": {
506
- "double": {},
507
- "type": "double",
508
- },
509
- "typeClasses": [],
510
- },
511
- ],
512
- },
513
- "type": "struct",
514
- },
515
- "typeClasses": [],
516
- "valueType": undefined,
517
- },
518
- },
519
- "redacted": false,
520
- "status": {
521
- "active": {},
522
- "type": "active",
523
- },
524
- "titlePropertyTypeRid": "bar",
525
- },
526
- "propertySecurityGroupPackagingVersion": {
527
- "type": "v2",
528
- "v2": {},
529
- },
530
- },
531
- },
532
- "sharedPropertyTypes": {
533
- "com.palantir.foo": {
534
- "sharedPropertyType": {
535
- "aliases": [],
536
- "apiName": "com.palantir.foo",
537
- "baseFormatter": undefined,
538
- "dataConstraints": undefined,
539
- "displayMetadata": {
540
- "description": undefined,
541
- "displayName": "foo",
542
- "visibility": "NORMAL",
543
- },
544
- "gothamMapping": undefined,
545
- "indexedForSearch": true,
546
- "type": {
547
- "string": {
548
- "analyzerOverride": undefined,
549
- "enableAsciiFolding": undefined,
550
- "isLongText": false,
551
- "supportsEfficientLeadingWildcard": false,
552
- "supportsExactMatching": true,
553
- },
554
- "type": "string",
555
- },
556
- "typeClasses": [
557
- {
558
- "kind": "render_hint",
559
- "name": "SELECTABLE",
560
- },
561
- {
562
- "kind": "render_hint",
563
- "name": "SORTABLE",
564
- },
565
- ],
566
- "valueType": undefined,
567
- },
568
- },
569
- },
570
- }
571
- `);
572
- });
573
- it("Explicit datasource definitions are properly defined", () => {
574
- defineObject({
575
- titlePropertyApiName: "bar",
576
- displayName: "datasetBackedObject",
577
- pluralDisplayName: "datasetBackedObject",
578
- apiName: "foo",
579
- primaryKeyPropertyApiName: "bar",
580
- properties: {
581
- "bar": {
582
- type: "string"
583
- }
584
- },
585
- datasources: [{
586
- type: "dataset"
587
- }]
588
- });
589
- defineObject({
590
- titlePropertyApiName: "fizz",
591
- displayName: "streamBackedObjectNoRetention",
592
- pluralDisplayName: "streamBackedObjectNoRetention",
593
- apiName: "fizz",
594
- primaryKeyPropertyApiName: "fizz",
595
- properties: {
596
- "fizz": {
597
- type: "string"
598
- },
599
- "bar": {
600
- type: "string"
601
- }
602
- },
603
- datasources: [{
604
- type: "stream"
605
- }]
606
- });
607
- defineObject({
608
- titlePropertyApiName: "buzz",
609
- displayName: "streamBackedObjectWithRetention",
610
- pluralDisplayName: "streamBackedObjectWithRetention",
611
- apiName: "buzz",
612
- primaryKeyPropertyApiName: "buzz",
613
- properties: {
614
- "buzz": {
615
- type: "string"
616
- }
617
- },
618
- datasources: [{
619
- type: "stream",
620
- retentionPeriod: "PT1H"
621
- }]
622
- });
623
- expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
624
- {
625
- "actionTypes": {},
626
- "blockPermissionInformation": {
627
- "actionTypes": {},
628
- "linkTypes": {},
629
- "objectTypes": {},
630
- },
631
- "interfaceTypes": {},
632
- "linkTypes": {},
633
- "objectTypes": {
634
- "com.palantir.buzz": {
635
- "datasources": [
636
- {
637
- "datasource": {
638
- "streamV2": {
639
- "propertyMapping": {
640
- "buzz": "buzz",
641
- },
642
- "propertySecurityGroups": undefined,
643
- "retentionPolicy": {
644
- "time": {
645
- "window": "PT1H",
646
- },
647
- "type": "time",
648
- },
649
- "streamLocator": "com.palantir.buzz",
650
- },
651
- "type": "streamV2",
652
- },
653
- "datasourceName": "com.palantir.buzz",
654
- "editsConfiguration": {
655
- "onlyAllowPrivilegedEdits": false,
656
- },
657
- "redacted": false,
658
- },
659
- ],
660
- "entityMetadata": {
661
- "aliases": [],
662
- "arePatchesEnabled": false,
663
- },
664
- "objectType": {
665
- "allImplementsInterfaces": {},
666
- "apiName": "com.palantir.buzz",
667
- "displayMetadata": {
668
- "description": undefined,
669
- "displayName": "streamBackedObjectWithRetention",
670
- "groupDisplayName": undefined,
671
- "icon": {
672
- "blueprint": {
673
- "color": "#2D72D2",
674
- "locator": "cube",
675
- },
676
- "type": "blueprint",
677
- },
678
- "pluralDisplayName": "streamBackedObjectWithRetention",
679
- "visibility": "NORMAL",
680
- },
681
- "implementsInterfaces2": [],
682
- "primaryKeys": [
683
- "buzz",
684
- ],
685
- "propertyTypes": {
686
- "buzz": {
687
- "apiName": "buzz",
688
- "baseFormatter": undefined,
689
- "dataConstraints": undefined,
690
- "displayMetadata": {
691
- "description": undefined,
692
- "displayName": "Buzz",
693
- "visibility": "NORMAL",
694
- },
695
- "indexedForSearch": true,
696
- "inlineAction": undefined,
697
- "ruleSetBinding": undefined,
698
- "sharedPropertyTypeApiName": undefined,
699
- "sharedPropertyTypeRid": undefined,
700
- "status": {
701
- "active": {},
702
- "type": "active",
703
- },
704
- "type": {
705
- "string": {
706
- "analyzerOverride": undefined,
707
- "enableAsciiFolding": undefined,
708
- "isLongText": false,
709
- "supportsEfficientLeadingWildcard": false,
710
- "supportsExactMatching": true,
711
- },
712
- "type": "string",
713
- },
714
- "typeClasses": [
715
- {
716
- "kind": "render_hint",
717
- "name": "SELECTABLE",
718
- },
719
- {
720
- "kind": "render_hint",
721
- "name": "SORTABLE",
722
- },
723
- ],
724
- "valueType": undefined,
725
- },
726
- },
727
- "redacted": false,
728
- "status": {
729
- "active": {},
730
- "type": "active",
731
- },
732
- "titlePropertyTypeRid": "buzz",
733
- },
734
- "propertySecurityGroupPackagingVersion": {
735
- "type": "v2",
736
- "v2": {},
737
- },
738
- },
739
- "com.palantir.fizz": {
740
- "datasources": [
741
- {
742
- "datasource": {
743
- "streamV2": {
744
- "propertyMapping": {
745
- "bar": "bar",
746
- "fizz": "fizz",
747
- },
748
- "propertySecurityGroups": undefined,
749
- "retentionPolicy": {
750
- "none": {},
751
- "type": "none",
752
- },
753
- "streamLocator": "com.palantir.fizz",
754
- },
755
- "type": "streamV2",
756
- },
757
- "datasourceName": "com.palantir.fizz",
758
- "editsConfiguration": {
759
- "onlyAllowPrivilegedEdits": false,
760
- },
761
- "redacted": false,
762
- },
763
- ],
764
- "entityMetadata": {
765
- "aliases": [],
766
- "arePatchesEnabled": false,
767
- },
768
- "objectType": {
769
- "allImplementsInterfaces": {},
770
- "apiName": "com.palantir.fizz",
771
- "displayMetadata": {
772
- "description": undefined,
773
- "displayName": "streamBackedObjectNoRetention",
774
- "groupDisplayName": undefined,
775
- "icon": {
776
- "blueprint": {
777
- "color": "#2D72D2",
778
- "locator": "cube",
779
- },
780
- "type": "blueprint",
781
- },
782
- "pluralDisplayName": "streamBackedObjectNoRetention",
783
- "visibility": "NORMAL",
784
- },
785
- "implementsInterfaces2": [],
786
- "primaryKeys": [
787
- "fizz",
788
- ],
789
- "propertyTypes": {
790
- "bar": {
791
- "apiName": "bar",
792
- "baseFormatter": undefined,
793
- "dataConstraints": undefined,
794
- "displayMetadata": {
795
- "description": undefined,
796
- "displayName": "Bar",
797
- "visibility": "NORMAL",
798
- },
799
- "indexedForSearch": true,
800
- "inlineAction": undefined,
801
- "ruleSetBinding": undefined,
802
- "sharedPropertyTypeApiName": undefined,
803
- "sharedPropertyTypeRid": undefined,
804
- "status": {
805
- "active": {},
806
- "type": "active",
807
- },
808
- "type": {
809
- "string": {
810
- "analyzerOverride": undefined,
811
- "enableAsciiFolding": undefined,
812
- "isLongText": false,
813
- "supportsEfficientLeadingWildcard": false,
814
- "supportsExactMatching": true,
815
- },
816
- "type": "string",
817
- },
818
- "typeClasses": [
819
- {
820
- "kind": "render_hint",
821
- "name": "SELECTABLE",
822
- },
823
- {
824
- "kind": "render_hint",
825
- "name": "SORTABLE",
826
- },
827
- ],
828
- "valueType": undefined,
829
- },
830
- "fizz": {
831
- "apiName": "fizz",
832
- "baseFormatter": undefined,
833
- "dataConstraints": undefined,
834
- "displayMetadata": {
835
- "description": undefined,
836
- "displayName": "Fizz",
837
- "visibility": "NORMAL",
838
- },
839
- "indexedForSearch": true,
840
- "inlineAction": undefined,
841
- "ruleSetBinding": undefined,
842
- "sharedPropertyTypeApiName": undefined,
843
- "sharedPropertyTypeRid": undefined,
844
- "status": {
845
- "active": {},
846
- "type": "active",
847
- },
848
- "type": {
849
- "string": {
850
- "analyzerOverride": undefined,
851
- "enableAsciiFolding": undefined,
852
- "isLongText": false,
853
- "supportsEfficientLeadingWildcard": false,
854
- "supportsExactMatching": true,
855
- },
856
- "type": "string",
857
- },
858
- "typeClasses": [
859
- {
860
- "kind": "render_hint",
861
- "name": "SELECTABLE",
862
- },
863
- {
864
- "kind": "render_hint",
865
- "name": "SORTABLE",
866
- },
867
- ],
868
- "valueType": undefined,
869
- },
870
- },
871
- "redacted": false,
872
- "status": {
873
- "active": {},
874
- "type": "active",
875
- },
876
- "titlePropertyTypeRid": "fizz",
877
- },
878
- "propertySecurityGroupPackagingVersion": {
879
- "type": "v2",
880
- "v2": {},
881
- },
882
- },
883
- "com.palantir.foo": {
884
- "datasources": [
885
- {
886
- "datasource": {
887
- "datasetV2": {
888
- "datasetRid": "com.palantir.foo",
889
- "propertyMapping": {
890
- "bar": {
891
- "column": "bar",
892
- "type": "column",
893
- },
894
- },
895
- },
896
- "type": "datasetV2",
897
- },
898
- "datasourceName": "com.palantir.foo",
899
- "editsConfiguration": {
900
- "onlyAllowPrivilegedEdits": false,
901
- },
902
- "redacted": false,
903
- },
904
- ],
905
- "entityMetadata": {
906
- "aliases": [],
907
- "arePatchesEnabled": false,
908
- },
909
- "objectType": {
910
- "allImplementsInterfaces": {},
911
- "apiName": "com.palantir.foo",
912
- "displayMetadata": {
913
- "description": undefined,
914
- "displayName": "datasetBackedObject",
915
- "groupDisplayName": undefined,
916
- "icon": {
917
- "blueprint": {
918
- "color": "#2D72D2",
919
- "locator": "cube",
920
- },
921
- "type": "blueprint",
922
- },
923
- "pluralDisplayName": "datasetBackedObject",
924
- "visibility": "NORMAL",
925
- },
926
- "implementsInterfaces2": [],
927
- "primaryKeys": [
928
- "bar",
929
- ],
930
- "propertyTypes": {
931
- "bar": {
932
- "apiName": "bar",
933
- "baseFormatter": undefined,
934
- "dataConstraints": undefined,
935
- "displayMetadata": {
936
- "description": undefined,
937
- "displayName": "Bar",
938
- "visibility": "NORMAL",
939
- },
940
- "indexedForSearch": true,
941
- "inlineAction": undefined,
942
- "ruleSetBinding": undefined,
943
- "sharedPropertyTypeApiName": undefined,
944
- "sharedPropertyTypeRid": undefined,
945
- "status": {
946
- "active": {},
947
- "type": "active",
948
- },
949
- "type": {
950
- "string": {
951
- "analyzerOverride": undefined,
952
- "enableAsciiFolding": undefined,
953
- "isLongText": false,
954
- "supportsEfficientLeadingWildcard": false,
955
- "supportsExactMatching": true,
956
- },
957
- "type": "string",
958
- },
959
- "typeClasses": [
960
- {
961
- "kind": "render_hint",
962
- "name": "SELECTABLE",
963
- },
964
- {
965
- "kind": "render_hint",
966
- "name": "SORTABLE",
967
- },
968
- ],
969
- "valueType": undefined,
970
- },
971
- },
972
- "redacted": false,
973
- "status": {
974
- "active": {},
975
- "type": "active",
976
- },
977
- "titlePropertyTypeRid": "bar",
978
- },
979
- "propertySecurityGroupPackagingVersion": {
980
- "type": "v2",
981
- "v2": {},
982
- },
983
- },
984
- },
985
- "sharedPropertyTypes": {},
986
- }
987
- `);
988
- });
989
- it("Restricted view datasources are properly defined", () => {
990
- defineObject({
991
- titlePropertyApiName: "bar",
992
- displayName: "Foo",
993
- pluralDisplayName: "Foo",
994
- apiName: "foo",
995
- primaryKeyPropertyApiName: "bar",
996
- properties: {
997
- "bar": {
998
- type: "string"
999
- }
1000
- },
1001
- datasources: [{
1002
- type: "restrictedView"
1003
- }]
1004
- });
1005
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1006
- {
1007
- "importedOntology": {
1008
- "actionTypes": {},
1009
- "blockPermissionInformation": {
1010
- "actionTypes": {},
1011
- "linkTypes": {},
1012
- "objectTypes": {},
1013
- },
1014
- "interfaceTypes": {},
1015
- "linkTypes": {},
1016
- "objectTypes": {},
1017
- "sharedPropertyTypes": {},
1018
- },
1019
- "importedValueTypes": {
1020
- "valueTypes": [],
1021
- },
1022
- "ontology": {
1023
- "actionTypes": {},
1024
- "blockPermissionInformation": {
1025
- "actionTypes": {},
1026
- "linkTypes": {},
1027
- "objectTypes": {},
1028
- },
1029
- "interfaceTypes": {},
1030
- "linkTypes": {},
1031
- "objectTypes": {
1032
- "com.palantir.foo": {
1033
- "datasources": [
1034
- {
1035
- "datasource": {
1036
- "restrictedViewV2": {
1037
- "propertyMapping": {
1038
- "bar": {
1039
- "column": "bar",
1040
- "type": "column",
1041
- },
1042
- },
1043
- "restrictedViewRid": "com.palantir.foo",
1044
- },
1045
- "type": "restrictedViewV2",
1046
- },
1047
- "datasourceName": "com.palantir.foo",
1048
- "editsConfiguration": {
1049
- "onlyAllowPrivilegedEdits": false,
1050
- },
1051
- "redacted": false,
1052
- },
1053
- ],
1054
- "entityMetadata": {
1055
- "aliases": [],
1056
- "arePatchesEnabled": false,
1057
- },
1058
- "objectType": {
1059
- "allImplementsInterfaces": {},
1060
- "apiName": "com.palantir.foo",
1061
- "displayMetadata": {
1062
- "description": undefined,
1063
- "displayName": "Foo",
1064
- "groupDisplayName": undefined,
1065
- "icon": {
1066
- "blueprint": {
1067
- "color": "#2D72D2",
1068
- "locator": "cube",
1069
- },
1070
- "type": "blueprint",
1071
- },
1072
- "pluralDisplayName": "Foo",
1073
- "visibility": "NORMAL",
1074
- },
1075
- "implementsInterfaces2": [],
1076
- "primaryKeys": [
1077
- "bar",
1078
- ],
1079
- "propertyTypes": {
1080
- "bar": {
1081
- "apiName": "bar",
1082
- "baseFormatter": undefined,
1083
- "dataConstraints": undefined,
1084
- "displayMetadata": {
1085
- "description": undefined,
1086
- "displayName": "Bar",
1087
- "visibility": "NORMAL",
1088
- },
1089
- "indexedForSearch": true,
1090
- "inlineAction": undefined,
1091
- "ruleSetBinding": undefined,
1092
- "sharedPropertyTypeApiName": undefined,
1093
- "sharedPropertyTypeRid": undefined,
1094
- "status": {
1095
- "active": {},
1096
- "type": "active",
1097
- },
1098
- "type": {
1099
- "string": {
1100
- "analyzerOverride": undefined,
1101
- "enableAsciiFolding": undefined,
1102
- "isLongText": false,
1103
- "supportsEfficientLeadingWildcard": false,
1104
- "supportsExactMatching": true,
1105
- },
1106
- "type": "string",
1107
- },
1108
- "typeClasses": [
1109
- {
1110
- "kind": "render_hint",
1111
- "name": "SELECTABLE",
1112
- },
1113
- {
1114
- "kind": "render_hint",
1115
- "name": "SORTABLE",
1116
- },
1117
- ],
1118
- "valueType": undefined,
1119
- },
1120
- },
1121
- "redacted": false,
1122
- "status": {
1123
- "active": {},
1124
- "type": "active",
1125
- },
1126
- "titlePropertyTypeRid": "bar",
1127
- },
1128
- "propertySecurityGroupPackagingVersion": {
1129
- "type": "v2",
1130
- "v2": {},
1131
- },
1132
- },
1133
- },
1134
- "sharedPropertyTypes": {},
1135
- },
1136
- "randomnessKey": undefined,
1137
- "valueTypes": {
1138
- "valueTypes": [],
1139
- },
1140
- }
1141
- `);
1142
- });
1143
- it("Edit only properties are properly defined", () => {
1144
- defineObject({
1145
- titlePropertyApiName: "bar",
1146
- displayName: "Foo",
1147
- pluralDisplayName: "Foo",
1148
- apiName: "foo",
1149
- primaryKeyPropertyApiName: "fizz",
1150
- properties: {
1151
- "bar": {
1152
- type: "string",
1153
- editOnly: true
1154
- },
1155
- "fizz": {
1156
- type: "string"
1157
- }
1158
- }
1159
- });
1160
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1161
- {
1162
- "importedOntology": {
1163
- "actionTypes": {},
1164
- "blockPermissionInformation": {
1165
- "actionTypes": {},
1166
- "linkTypes": {},
1167
- "objectTypes": {},
1168
- },
1169
- "interfaceTypes": {},
1170
- "linkTypes": {},
1171
- "objectTypes": {},
1172
- "sharedPropertyTypes": {},
1173
- },
1174
- "importedValueTypes": {
1175
- "valueTypes": [],
1176
- },
1177
- "ontology": {
1178
- "actionTypes": {},
1179
- "blockPermissionInformation": {
1180
- "actionTypes": {},
1181
- "linkTypes": {},
1182
- "objectTypes": {},
1183
- },
1184
- "interfaceTypes": {},
1185
- "linkTypes": {},
1186
- "objectTypes": {
1187
- "com.palantir.foo": {
1188
- "datasources": [
1189
- {
1190
- "datasource": {
1191
- "datasetV2": {
1192
- "datasetRid": "com.palantir.foo",
1193
- "propertyMapping": {
1194
- "bar": {
1195
- "editOnly": {},
1196
- "type": "editOnly",
1197
- },
1198
- "fizz": {
1199
- "column": "fizz",
1200
- "type": "column",
1201
- },
1202
- },
1203
- },
1204
- "type": "datasetV2",
1205
- },
1206
- "datasourceName": "com.palantir.foo",
1207
- "editsConfiguration": {
1208
- "onlyAllowPrivilegedEdits": false,
1209
- },
1210
- "redacted": false,
1211
- },
1212
- ],
1213
- "entityMetadata": {
1214
- "aliases": [],
1215
- "arePatchesEnabled": false,
1216
- },
1217
- "objectType": {
1218
- "allImplementsInterfaces": {},
1219
- "apiName": "com.palantir.foo",
1220
- "displayMetadata": {
1221
- "description": undefined,
1222
- "displayName": "Foo",
1223
- "groupDisplayName": undefined,
1224
- "icon": {
1225
- "blueprint": {
1226
- "color": "#2D72D2",
1227
- "locator": "cube",
1228
- },
1229
- "type": "blueprint",
1230
- },
1231
- "pluralDisplayName": "Foo",
1232
- "visibility": "NORMAL",
1233
- },
1234
- "implementsInterfaces2": [],
1235
- "primaryKeys": [
1236
- "fizz",
1237
- ],
1238
- "propertyTypes": {
1239
- "bar": {
1240
- "apiName": "bar",
1241
- "baseFormatter": undefined,
1242
- "dataConstraints": undefined,
1243
- "displayMetadata": {
1244
- "description": undefined,
1245
- "displayName": "Bar",
1246
- "visibility": "NORMAL",
1247
- },
1248
- "indexedForSearch": true,
1249
- "inlineAction": undefined,
1250
- "ruleSetBinding": undefined,
1251
- "sharedPropertyTypeApiName": undefined,
1252
- "sharedPropertyTypeRid": undefined,
1253
- "status": {
1254
- "active": {},
1255
- "type": "active",
1256
- },
1257
- "type": {
1258
- "string": {
1259
- "analyzerOverride": undefined,
1260
- "enableAsciiFolding": undefined,
1261
- "isLongText": false,
1262
- "supportsEfficientLeadingWildcard": false,
1263
- "supportsExactMatching": true,
1264
- },
1265
- "type": "string",
1266
- },
1267
- "typeClasses": [
1268
- {
1269
- "kind": "render_hint",
1270
- "name": "SELECTABLE",
1271
- },
1272
- {
1273
- "kind": "render_hint",
1274
- "name": "SORTABLE",
1275
- },
1276
- ],
1277
- "valueType": undefined,
1278
- },
1279
- "fizz": {
1280
- "apiName": "fizz",
1281
- "baseFormatter": undefined,
1282
- "dataConstraints": undefined,
1283
- "displayMetadata": {
1284
- "description": undefined,
1285
- "displayName": "Fizz",
1286
- "visibility": "NORMAL",
1287
- },
1288
- "indexedForSearch": true,
1289
- "inlineAction": undefined,
1290
- "ruleSetBinding": undefined,
1291
- "sharedPropertyTypeApiName": undefined,
1292
- "sharedPropertyTypeRid": undefined,
1293
- "status": {
1294
- "active": {},
1295
- "type": "active",
1296
- },
1297
- "type": {
1298
- "string": {
1299
- "analyzerOverride": undefined,
1300
- "enableAsciiFolding": undefined,
1301
- "isLongText": false,
1302
- "supportsEfficientLeadingWildcard": false,
1303
- "supportsExactMatching": true,
1304
- },
1305
- "type": "string",
1306
- },
1307
- "typeClasses": [
1308
- {
1309
- "kind": "render_hint",
1310
- "name": "SELECTABLE",
1311
- },
1312
- {
1313
- "kind": "render_hint",
1314
- "name": "SORTABLE",
1315
- },
1316
- ],
1317
- "valueType": undefined,
1318
- },
1319
- },
1320
- "redacted": false,
1321
- "status": {
1322
- "active": {},
1323
- "type": "active",
1324
- },
1325
- "titlePropertyTypeRid": "bar",
1326
- },
1327
- "propertySecurityGroupPackagingVersion": {
1328
- "type": "v2",
1329
- "v2": {},
1330
- },
1331
- },
1332
- },
1333
- "sharedPropertyTypes": {},
1334
- },
1335
- "randomnessKey": undefined,
1336
- "valueTypes": {
1337
- "valueTypes": [],
1338
- },
1339
- }
1340
- `);
1341
- });
1342
- it("Fails if edit only property is primary key", () => {
1343
- expect(() => {
1344
- defineObject({
1345
- titlePropertyApiName: "bar",
1346
- displayName: "Foo",
1347
- pluralDisplayName: "Foo",
1348
- apiName: "foo",
1349
- primaryKeyPropertyApiName: "bar",
1350
- properties: {
1351
- "bar": {
1352
- type: "string",
1353
- editOnly: true
1354
- }
1355
- }
1356
- });
1357
- }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Primary key property bar on object foo cannot be edit-only]`);
1358
- });
1359
- it("Fail if stream retention period is not ISO 8601 compliant", () => {
1360
- expect(() => defineObject({
1361
- titlePropertyApiName: "buzz",
1362
- displayName: "streamBackedObjectWithRetention",
1363
- pluralDisplayName: "streamBackedObjectWithRetention",
1364
- apiName: "buzz",
1365
- primaryKeyPropertyApiName: "buzz",
1366
- properties: {
1367
- "buzz": {
1368
- type: "string"
1369
- }
1370
- },
1371
- datasources: [{
1372
- type: "stream",
1373
- retentionPeriod: "bad retention period string"
1374
- }]
1375
- })).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Retention period "bad retention period string" on object "buzz" is not a valid ISO 8601 duration string]`);
1376
- });
1377
- it("Property-level datasources are properly defined", () => {
1378
- defineObject({
1379
- titlePropertyApiName: "bar",
1380
- displayName: "exampleObject",
1381
- pluralDisplayName: "exampleObject",
1382
- apiName: "fizz",
1383
- primaryKeyPropertyApiName: "bar",
1384
- properties: {
1385
- "fizz": {
1386
- type: "mediaReference"
1387
- },
1388
- "bar": {
1389
- type: "string"
1390
- }
1391
- },
1392
- datasources: [{
1393
- type: "stream"
1394
- }]
1395
- });
1396
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1397
- {
1398
- "importedOntology": {
1399
- "actionTypes": {},
1400
- "blockPermissionInformation": {
1401
- "actionTypes": {},
1402
- "linkTypes": {},
1403
- "objectTypes": {},
1404
- },
1405
- "interfaceTypes": {},
1406
- "linkTypes": {},
1407
- "objectTypes": {},
1408
- "sharedPropertyTypes": {},
1409
- },
1410
- "importedValueTypes": {
1411
- "valueTypes": [],
1412
- },
1413
- "ontology": {
1414
- "actionTypes": {},
1415
- "blockPermissionInformation": {
1416
- "actionTypes": {},
1417
- "linkTypes": {},
1418
- "objectTypes": {},
1419
- },
1420
- "interfaceTypes": {},
1421
- "linkTypes": {},
1422
- "objectTypes": {
1423
- "com.palantir.fizz": {
1424
- "datasources": [
1425
- {
1426
- "datasource": {
1427
- "mediaSetView": {
1428
- "assumedMarkings": [],
1429
- "mediaSetViewLocator": "com.palantir.fizz.fizz",
1430
- "properties": [
1431
- "fizz",
1432
- ],
1433
- "uploadProperties": [],
1434
- },
1435
- "type": "mediaSetView",
1436
- },
1437
- "datasourceName": "fizz",
1438
- "editsConfiguration": {
1439
- "onlyAllowPrivilegedEdits": false,
1440
- },
1441
- "redacted": false,
1442
- },
1443
- {
1444
- "datasource": {
1445
- "streamV2": {
1446
- "propertyMapping": {
1447
- "bar": "bar",
1448
- "fizz": "fizz",
1449
- },
1450
- "propertySecurityGroups": undefined,
1451
- "retentionPolicy": {
1452
- "none": {},
1453
- "type": "none",
1454
- },
1455
- "streamLocator": "com.palantir.fizz",
1456
- },
1457
- "type": "streamV2",
1458
- },
1459
- "datasourceName": "com.palantir.fizz",
1460
- "editsConfiguration": {
1461
- "onlyAllowPrivilegedEdits": false,
1462
- },
1463
- "redacted": false,
1464
- },
1465
- ],
1466
- "entityMetadata": {
1467
- "aliases": [],
1468
- "arePatchesEnabled": false,
1469
- },
1470
- "objectType": {
1471
- "allImplementsInterfaces": {},
1472
- "apiName": "com.palantir.fizz",
1473
- "displayMetadata": {
1474
- "description": undefined,
1475
- "displayName": "exampleObject",
1476
- "groupDisplayName": undefined,
1477
- "icon": {
1478
- "blueprint": {
1479
- "color": "#2D72D2",
1480
- "locator": "cube",
1481
- },
1482
- "type": "blueprint",
1483
- },
1484
- "pluralDisplayName": "exampleObject",
1485
- "visibility": "NORMAL",
1486
- },
1487
- "implementsInterfaces2": [],
1488
- "primaryKeys": [
1489
- "bar",
1490
- ],
1491
- "propertyTypes": {
1492
- "bar": {
1493
- "apiName": "bar",
1494
- "baseFormatter": undefined,
1495
- "dataConstraints": undefined,
1496
- "displayMetadata": {
1497
- "description": undefined,
1498
- "displayName": "Bar",
1499
- "visibility": "NORMAL",
1500
- },
1501
- "indexedForSearch": true,
1502
- "inlineAction": undefined,
1503
- "ruleSetBinding": undefined,
1504
- "sharedPropertyTypeApiName": undefined,
1505
- "sharedPropertyTypeRid": undefined,
1506
- "status": {
1507
- "active": {},
1508
- "type": "active",
1509
- },
1510
- "type": {
1511
- "string": {
1512
- "analyzerOverride": undefined,
1513
- "enableAsciiFolding": undefined,
1514
- "isLongText": false,
1515
- "supportsEfficientLeadingWildcard": false,
1516
- "supportsExactMatching": true,
1517
- },
1518
- "type": "string",
1519
- },
1520
- "typeClasses": [
1521
- {
1522
- "kind": "render_hint",
1523
- "name": "SELECTABLE",
1524
- },
1525
- {
1526
- "kind": "render_hint",
1527
- "name": "SORTABLE",
1528
- },
1529
- ],
1530
- "valueType": undefined,
1531
- },
1532
- "fizz": {
1533
- "apiName": "fizz",
1534
- "baseFormatter": undefined,
1535
- "dataConstraints": undefined,
1536
- "displayMetadata": {
1537
- "description": undefined,
1538
- "displayName": "Fizz",
1539
- "visibility": "NORMAL",
1540
- },
1541
- "indexedForSearch": true,
1542
- "inlineAction": undefined,
1543
- "ruleSetBinding": undefined,
1544
- "sharedPropertyTypeApiName": undefined,
1545
- "sharedPropertyTypeRid": undefined,
1546
- "status": {
1547
- "active": {},
1548
- "type": "active",
1549
- },
1550
- "type": {
1551
- "mediaReference": {},
1552
- "type": "mediaReference",
1553
- },
1554
- "typeClasses": [],
1555
- "valueType": undefined,
1556
- },
1557
- },
1558
- "redacted": false,
1559
- "status": {
1560
- "active": {},
1561
- "type": "active",
1562
- },
1563
- "titlePropertyTypeRid": "bar",
1564
- },
1565
- "propertySecurityGroupPackagingVersion": {
1566
- "type": "v2",
1567
- "v2": {},
1568
- },
1569
- },
1570
- },
1571
- "sharedPropertyTypes": {},
1572
- },
1573
- "randomnessKey": undefined,
1574
- "valueTypes": {
1575
- "valueTypes": [],
1576
- },
1577
- }
1578
- `);
1579
- });
1580
- it("Derived datasources are properly defined", () => {
1581
- const passenger = defineObject({
1582
- displayName: "Passenger",
1583
- pluralDisplayName: "Passengers",
1584
- apiName: "passenger",
1585
- primaryKeyPropertyApiName: "name",
1586
- titlePropertyApiName: "name",
1587
- editsEnabled: true,
1588
- properties: {
1589
- "name": {
1590
- type: "string",
1591
- displayName: "Name"
1592
- },
1593
- "flight_id": {
1594
- type: "string",
1595
- displayName: "Flight ID"
1596
- }
1597
- }
1598
- });
1599
- const flightToPassengers = defineLink({
1600
- apiName: "flightToPassengersLink",
1601
- one: {
1602
- object: "com.palantir.flight",
1603
- metadata: {
1604
- apiName: "flightFromPassengers"
1605
- }
1606
- },
1607
- toMany: {
1608
- object: passenger.apiName,
1609
- metadata: {
1610
- apiName: "passengersFromFlight"
1611
- }
1612
- },
1613
- manyForeignKeyProperty: "flight_id"
1614
- });
1615
- expect(() => {
1616
- defineObject({
1617
- displayName: "Flight",
1618
- pluralDisplayName: "Flights",
1619
- apiName: "flight",
1620
- primaryKeyPropertyApiName: "id",
1621
- titlePropertyApiName: "id",
1622
- properties: {
1623
- id: {
1624
- type: "string",
1625
- displayName: "ID"
1626
- },
1627
- numPassengers: {
1628
- type: "string",
1629
- displayName: "Passengers"
1630
- }
1631
- },
1632
- datasources: [{
1633
- type: "dataset"
1634
- }, {
1635
- type: "derived",
1636
- linkDefinition: [{
1637
- linkType: flightToPassengers
1638
- }],
1639
- propertyMapping: {
1640
- numPassengers: {
1641
- type: "collectList",
1642
- property: "name",
1643
- limit: 100
1644
- }
1645
- }
1646
- }]
1647
- });
1648
- }).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Property 'numPassengers' on object 'flight' is not collectible]`);
1649
- const flight = defineObject({
1650
- displayName: "Flight",
1651
- pluralDisplayName: "Flights",
1652
- apiName: "flight",
1653
- primaryKeyPropertyApiName: "id",
1654
- titlePropertyApiName: "id",
1655
- editsEnabled: true,
1656
- properties: {
1657
- id: {
1658
- type: "string",
1659
- displayName: "ID"
1660
- },
1661
- passengersList: {
1662
- type: "string",
1663
- array: true,
1664
- displayName: "Passengers"
1665
- }
1666
- },
1667
- datasources: [{
1668
- type: "dataset"
1669
- }, {
1670
- type: "derived",
1671
- linkDefinition: [{
1672
- linkType: flightToPassengers
1673
- }],
1674
- propertyMapping: {
1675
- passengersList: {
1676
- type: "collectList",
1677
- property: "name",
1678
- limit: 100
1679
- }
1680
- }
1681
- }]
1682
- });
1683
- defineCreateObjectAction({
1684
- displayName: "Create flight",
1685
- objectType: flight
1686
- });
1687
- defineDeleteObjectAction({
1688
- displayName: "Delete flight",
1689
- objectType: flight
1690
- });
1691
- defineCreateObjectAction({
1692
- displayName: "Create passenger",
1693
- objectType: passenger
1694
- });
1695
- defineDeleteObjectAction({
1696
- displayName: "Delete passenger",
1697
- objectType: passenger
1698
- });
1699
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
1700
- {
1701
- "importedOntology": {
1702
- "actionTypes": {},
1703
- "blockPermissionInformation": {
1704
- "actionTypes": {},
1705
- "linkTypes": {},
1706
- "objectTypes": {},
1707
- },
1708
- "interfaceTypes": {},
1709
- "linkTypes": {},
1710
- "objectTypes": {},
1711
- "sharedPropertyTypes": {},
1712
- },
1713
- "importedValueTypes": {
1714
- "valueTypes": [],
1715
- },
1716
- "ontology": {
1717
- "actionTypes": {
1718
- "com.palantir.create-object-flight": {
1719
- "actionType": {
1720
- "actionTypeLogic": {
1721
- "logic": {
1722
- "rules": [
1723
- {
1724
- "addObjectRule": {
1725
- "objectTypeId": "com.palantir.flight",
1726
- "propertyValues": {
1727
- "id": {
1728
- "parameterId": "id",
1729
- "type": "parameterId",
1730
- },
1731
- },
1732
- "structFieldValues": {},
1733
- },
1734
- "type": "addObjectRule",
1735
- },
1736
- ],
1737
- },
1738
- "validation": {
1739
- "actionTypeLevelValidation": {
1740
- "rules": {
1741
- "0": {
1742
- "condition": {
1743
- "true": {},
1744
- "type": "true",
1745
- },
1746
- "displayMetadata": {
1747
- "failureMessage": "",
1748
- "typeClasses": [],
1749
- },
1750
- },
1751
- },
1752
- },
1753
- "parameterValidations": {
1754
- "id": {
1755
- "conditionalOverrides": [],
1756
- "defaultValidation": {
1757
- "display": {
1758
- "renderHint": {
1759
- "textInput": {},
1760
- "type": "textInput",
1761
- },
1762
- "visibility": {
1763
- "editable": {},
1764
- "type": "editable",
1765
- },
1766
- },
1767
- "validation": {
1768
- "allowedValues": {
1769
- "text": {
1770
- "text": {},
1771
- "type": "text",
1772
- },
1773
- "type": "text",
1774
- },
1775
- "required": {
1776
- "notRequired": {},
1777
- "type": "notRequired",
1778
- },
1779
- },
1780
- },
1781
- },
1782
- },
1783
- "sectionValidations": {},
1784
- },
1785
- },
1786
- "metadata": {
1787
- "apiName": "com.palantir.create-object-flight",
1788
- "displayMetadata": {
1789
- "configuration": {
1790
- "defaultLayout": "FORM",
1791
- "displayAndFormat": {
1792
- "table": {
1793
- "columnWidthByParameterRid": {},
1794
- "enableFileImport": true,
1795
- "fitHorizontally": false,
1796
- "frozenColumnCount": 0,
1797
- "rowHeightInLines": 1,
1798
- },
1799
- },
1800
- "enableLayoutUserSwitch": false,
1801
- },
1802
- "description": "",
1803
- "displayName": "Create flight",
1804
- "icon": {
1805
- "blueprint": {
1806
- "color": "#000000",
1807
- "locator": "edit",
1808
- },
1809
- "type": "blueprint",
1810
- },
1811
- "successMessage": [],
1812
- "typeClasses": [],
1813
- },
1814
- "entities": {
1815
- "affectedInterfaceTypes": [],
1816
- "affectedLinkTypes": [],
1817
- "affectedObjectTypes": [
1818
- "com.palantir.flight",
1819
- ],
1820
- "typeGroups": [],
1821
- },
1822
- "formContentOrdering": [],
1823
- "parameterOrdering": [
1824
- "id",
1825
- ],
1826
- "parameters": {
1827
- "id": {
1828
- "displayMetadata": {
1829
- "description": "",
1830
- "displayName": "ID",
1831
- "typeClasses": [],
1832
- },
1833
- "id": "id",
1834
- "type": {
1835
- "string": {},
1836
- "type": "string",
1837
- },
1838
- },
1839
- },
1840
- "sections": {},
1841
- "status": {
1842
- "active": {},
1843
- "type": "active",
1844
- },
1845
- },
1846
- },
1847
- },
1848
- "com.palantir.create-object-passenger": {
1849
- "actionType": {
1850
- "actionTypeLogic": {
1851
- "logic": {
1852
- "rules": [
1853
- {
1854
- "addObjectRule": {
1855
- "objectTypeId": "com.palantir.passenger",
1856
- "propertyValues": {
1857
- "flight_id": {
1858
- "parameterId": "flight_id",
1859
- "type": "parameterId",
1860
- },
1861
- "name": {
1862
- "parameterId": "name",
1863
- "type": "parameterId",
1864
- },
1865
- },
1866
- "structFieldValues": {},
1867
- },
1868
- "type": "addObjectRule",
1869
- },
1870
- ],
1871
- },
1872
- "validation": {
1873
- "actionTypeLevelValidation": {
1874
- "rules": {
1875
- "0": {
1876
- "condition": {
1877
- "true": {},
1878
- "type": "true",
1879
- },
1880
- "displayMetadata": {
1881
- "failureMessage": "",
1882
- "typeClasses": [],
1883
- },
1884
- },
1885
- },
1886
- },
1887
- "parameterValidations": {
1888
- "flight_id": {
1889
- "conditionalOverrides": [],
1890
- "defaultValidation": {
1891
- "display": {
1892
- "renderHint": {
1893
- "textInput": {},
1894
- "type": "textInput",
1895
- },
1896
- "visibility": {
1897
- "editable": {},
1898
- "type": "editable",
1899
- },
1900
- },
1901
- "validation": {
1902
- "allowedValues": {
1903
- "text": {
1904
- "text": {},
1905
- "type": "text",
1906
- },
1907
- "type": "text",
1908
- },
1909
- "required": {
1910
- "notRequired": {},
1911
- "type": "notRequired",
1912
- },
1913
- },
1914
- },
1915
- },
1916
- "name": {
1917
- "conditionalOverrides": [],
1918
- "defaultValidation": {
1919
- "display": {
1920
- "renderHint": {
1921
- "textInput": {},
1922
- "type": "textInput",
1923
- },
1924
- "visibility": {
1925
- "editable": {},
1926
- "type": "editable",
1927
- },
1928
- },
1929
- "validation": {
1930
- "allowedValues": {
1931
- "text": {
1932
- "text": {},
1933
- "type": "text",
1934
- },
1935
- "type": "text",
1936
- },
1937
- "required": {
1938
- "notRequired": {},
1939
- "type": "notRequired",
1940
- },
1941
- },
1942
- },
1943
- },
1944
- },
1945
- "sectionValidations": {},
1946
- },
1947
- },
1948
- "metadata": {
1949
- "apiName": "com.palantir.create-object-passenger",
1950
- "displayMetadata": {
1951
- "configuration": {
1952
- "defaultLayout": "FORM",
1953
- "displayAndFormat": {
1954
- "table": {
1955
- "columnWidthByParameterRid": {},
1956
- "enableFileImport": true,
1957
- "fitHorizontally": false,
1958
- "frozenColumnCount": 0,
1959
- "rowHeightInLines": 1,
1960
- },
1961
- },
1962
- "enableLayoutUserSwitch": false,
1963
- },
1964
- "description": "",
1965
- "displayName": "Create passenger",
1966
- "icon": {
1967
- "blueprint": {
1968
- "color": "#000000",
1969
- "locator": "edit",
1970
- },
1971
- "type": "blueprint",
1972
- },
1973
- "successMessage": [],
1974
- "typeClasses": [],
1975
- },
1976
- "entities": {
1977
- "affectedInterfaceTypes": [],
1978
- "affectedLinkTypes": [],
1979
- "affectedObjectTypes": [
1980
- "com.palantir.passenger",
1981
- ],
1982
- "typeGroups": [],
1983
- },
1984
- "formContentOrdering": [],
1985
- "parameterOrdering": [
1986
- "name",
1987
- "flight_id",
1988
- ],
1989
- "parameters": {
1990
- "flight_id": {
1991
- "displayMetadata": {
1992
- "description": "",
1993
- "displayName": "Flight ID",
1994
- "typeClasses": [],
1995
- },
1996
- "id": "flight_id",
1997
- "type": {
1998
- "string": {},
1999
- "type": "string",
2000
- },
2001
- },
2002
- "name": {
2003
- "displayMetadata": {
2004
- "description": "",
2005
- "displayName": "Name",
2006
- "typeClasses": [],
2007
- },
2008
- "id": "name",
2009
- "type": {
2010
- "string": {},
2011
- "type": "string",
2012
- },
2013
- },
2014
- },
2015
- "sections": {},
2016
- "status": {
2017
- "active": {},
2018
- "type": "active",
2019
- },
2020
- },
2021
- },
2022
- },
2023
- "com.palantir.delete-object-flight": {
2024
- "actionType": {
2025
- "actionTypeLogic": {
2026
- "logic": {
2027
- "rules": [
2028
- {
2029
- "deleteObjectRule": {
2030
- "objectToDelete": "objectToDeleteParameter",
2031
- },
2032
- "type": "deleteObjectRule",
2033
- },
2034
- ],
2035
- },
2036
- "validation": {
2037
- "actionTypeLevelValidation": {
2038
- "rules": {
2039
- "0": {
2040
- "condition": {
2041
- "true": {},
2042
- "type": "true",
2043
- },
2044
- "displayMetadata": {
2045
- "failureMessage": "",
2046
- "typeClasses": [],
2047
- },
2048
- },
2049
- },
2050
- },
2051
- "parameterValidations": {
2052
- "objectToDeleteParameter": {
2053
- "conditionalOverrides": [],
2054
- "defaultValidation": {
2055
- "display": {
2056
- "renderHint": {
2057
- "dropdown": {},
2058
- "type": "dropdown",
2059
- },
2060
- "visibility": {
2061
- "editable": {},
2062
- "type": "editable",
2063
- },
2064
- },
2065
- "validation": {
2066
- "allowedValues": {
2067
- "objectQuery": {
2068
- "objectQuery": {},
2069
- "type": "objectQuery",
2070
- },
2071
- "type": "objectQuery",
2072
- },
2073
- "required": {
2074
- "required": {},
2075
- "type": "required",
2076
- },
2077
- },
2078
- },
2079
- },
2080
- },
2081
- "sectionValidations": {},
2082
- },
2083
- },
2084
- "metadata": {
2085
- "apiName": "com.palantir.delete-object-flight",
2086
- "displayMetadata": {
2087
- "configuration": {
2088
- "defaultLayout": "FORM",
2089
- "displayAndFormat": {
2090
- "table": {
2091
- "columnWidthByParameterRid": {},
2092
- "enableFileImport": true,
2093
- "fitHorizontally": false,
2094
- "frozenColumnCount": 0,
2095
- "rowHeightInLines": 1,
2096
- },
2097
- },
2098
- "enableLayoutUserSwitch": false,
2099
- },
2100
- "description": "",
2101
- "displayName": "Delete flight",
2102
- "icon": {
2103
- "blueprint": {
2104
- "color": "#000000",
2105
- "locator": "edit",
2106
- },
2107
- "type": "blueprint",
2108
- },
2109
- "successMessage": [],
2110
- "typeClasses": [],
2111
- },
2112
- "entities": {
2113
- "affectedInterfaceTypes": [],
2114
- "affectedLinkTypes": [],
2115
- "affectedObjectTypes": [
2116
- "com.palantir.flight",
2117
- ],
2118
- "typeGroups": [],
2119
- },
2120
- "formContentOrdering": [],
2121
- "parameterOrdering": [
2122
- "objectToDeleteParameter",
2123
- ],
2124
- "parameters": {
2125
- "objectToDeleteParameter": {
2126
- "displayMetadata": {
2127
- "description": "",
2128
- "displayName": "Delete object",
2129
- "typeClasses": [],
2130
- },
2131
- "id": "objectToDeleteParameter",
2132
- "type": {
2133
- "objectReference": {
2134
- "objectTypeId": "com.palantir.flight",
2135
- },
2136
- "type": "objectReference",
2137
- },
2138
- },
2139
- },
2140
- "sections": {},
2141
- "status": {
2142
- "active": {},
2143
- "type": "active",
2144
- },
2145
- },
2146
- },
2147
- },
2148
- "com.palantir.delete-object-passenger": {
2149
- "actionType": {
2150
- "actionTypeLogic": {
2151
- "logic": {
2152
- "rules": [
2153
- {
2154
- "deleteObjectRule": {
2155
- "objectToDelete": "objectToDeleteParameter",
2156
- },
2157
- "type": "deleteObjectRule",
2158
- },
2159
- ],
2160
- },
2161
- "validation": {
2162
- "actionTypeLevelValidation": {
2163
- "rules": {
2164
- "0": {
2165
- "condition": {
2166
- "true": {},
2167
- "type": "true",
2168
- },
2169
- "displayMetadata": {
2170
- "failureMessage": "",
2171
- "typeClasses": [],
2172
- },
2173
- },
2174
- },
2175
- },
2176
- "parameterValidations": {
2177
- "objectToDeleteParameter": {
2178
- "conditionalOverrides": [],
2179
- "defaultValidation": {
2180
- "display": {
2181
- "renderHint": {
2182
- "dropdown": {},
2183
- "type": "dropdown",
2184
- },
2185
- "visibility": {
2186
- "editable": {},
2187
- "type": "editable",
2188
- },
2189
- },
2190
- "validation": {
2191
- "allowedValues": {
2192
- "objectQuery": {
2193
- "objectQuery": {},
2194
- "type": "objectQuery",
2195
- },
2196
- "type": "objectQuery",
2197
- },
2198
- "required": {
2199
- "required": {},
2200
- "type": "required",
2201
- },
2202
- },
2203
- },
2204
- },
2205
- },
2206
- "sectionValidations": {},
2207
- },
2208
- },
2209
- "metadata": {
2210
- "apiName": "com.palantir.delete-object-passenger",
2211
- "displayMetadata": {
2212
- "configuration": {
2213
- "defaultLayout": "FORM",
2214
- "displayAndFormat": {
2215
- "table": {
2216
- "columnWidthByParameterRid": {},
2217
- "enableFileImport": true,
2218
- "fitHorizontally": false,
2219
- "frozenColumnCount": 0,
2220
- "rowHeightInLines": 1,
2221
- },
2222
- },
2223
- "enableLayoutUserSwitch": false,
2224
- },
2225
- "description": "",
2226
- "displayName": "Delete passenger",
2227
- "icon": {
2228
- "blueprint": {
2229
- "color": "#000000",
2230
- "locator": "edit",
2231
- },
2232
- "type": "blueprint",
2233
- },
2234
- "successMessage": [],
2235
- "typeClasses": [],
2236
- },
2237
- "entities": {
2238
- "affectedInterfaceTypes": [],
2239
- "affectedLinkTypes": [],
2240
- "affectedObjectTypes": [
2241
- "com.palantir.passenger",
2242
- ],
2243
- "typeGroups": [],
2244
- },
2245
- "formContentOrdering": [],
2246
- "parameterOrdering": [
2247
- "objectToDeleteParameter",
2248
- ],
2249
- "parameters": {
2250
- "objectToDeleteParameter": {
2251
- "displayMetadata": {
2252
- "description": "",
2253
- "displayName": "Delete object",
2254
- "typeClasses": [],
2255
- },
2256
- "id": "objectToDeleteParameter",
2257
- "type": {
2258
- "objectReference": {
2259
- "objectTypeId": "com.palantir.passenger",
2260
- },
2261
- "type": "objectReference",
2262
- },
2263
- },
2264
- },
2265
- "sections": {},
2266
- "status": {
2267
- "active": {},
2268
- "type": "active",
2269
- },
2270
- },
2271
- },
2272
- },
2273
- },
2274
- "blockPermissionInformation": {
2275
- "actionTypes": {},
2276
- "linkTypes": {},
2277
- "objectTypes": {},
2278
- },
2279
- "interfaceTypes": {},
2280
- "linkTypes": {
2281
- "flight-to-passengers-link": {
2282
- "datasources": [],
2283
- "entityMetadata": {
2284
- "arePatchesEnabled": false,
2285
- },
2286
- "linkType": {
2287
- "definition": {
2288
- "oneToMany": {
2289
- "cardinalityHint": "ONE_TO_MANY",
2290
- "manyToOneLinkMetadata": {
2291
- "apiName": "passengersFromFlight",
2292
- "displayMetadata": {
2293
- "displayName": "PassengersFromFlight",
2294
- "groupDisplayName": "",
2295
- "pluralDisplayName": "PassengersFromFlights",
2296
- "visibility": "NORMAL",
2297
- },
2298
- "typeClasses": [],
2299
- },
2300
- "objectTypeRidManySide": "com.palantir.passenger",
2301
- "objectTypeRidOneSide": "com.palantir.flight",
2302
- "oneSidePrimaryKeyToManySidePropertyMapping": [
2303
- {
2304
- "from": {
2305
- "apiName": "id",
2306
- "object": "com.palantir.flight",
2307
- },
2308
- "to": {
2309
- "apiName": "flight_id",
2310
- "object": "com.palantir.passenger",
2311
- },
2312
- },
2313
- ],
2314
- "oneToManyLinkMetadata": {
2315
- "apiName": "flightFromPassengers",
2316
- "displayMetadata": {
2317
- "displayName": "FlightFromPassengers",
2318
- "groupDisplayName": "",
2319
- "pluralDisplayName": "FlightFromPassengers",
2320
- "visibility": "NORMAL",
2321
- },
2322
- "typeClasses": [],
2323
- },
2324
- },
2325
- "type": "oneToMany",
2326
- },
2327
- "id": "flight-to-passengers-link",
2328
- "redacted": false,
2329
- "status": {
2330
- "active": {},
2331
- "type": "active",
2332
- },
2333
- },
2334
- },
2335
- },
2336
- "objectTypes": {
2337
- "com.palantir.flight": {
2338
- "datasources": [
2339
- {
2340
- "datasource": {
2341
- "derived": {
2342
- "definition": {
2343
- "aggregatedProperties": {
2344
- "linkDefinition": {
2345
- "multiHopLink": {
2346
- "steps": [
2347
- {
2348
- "searchAround": {
2349
- "linkTypeIdentifier": {
2350
- "linkType": "flight-to-passengers-link",
2351
- "type": "linkType",
2352
- },
2353
- "linkTypeSide": "SOURCE",
2354
- },
2355
- "type": "searchAround",
2356
- },
2357
- ],
2358
- },
2359
- "type": "multiHopLink",
2360
- },
2361
- "propertyTypeMapping": {
2362
- "passengersList": {
2363
- "collectList": {
2364
- "limit": 100,
2365
- "linkedProperty": {
2366
- "propertyType": "name",
2367
- "type": "propertyType",
2368
- },
2369
- },
2370
- "type": "collectList",
2371
- },
2372
- },
2373
- },
2374
- "type": "aggregatedProperties",
2375
- },
2376
- },
2377
- "type": "derived",
2378
- },
2379
- "datasourceName": "com.palantir.flight.derived.0",
2380
- "editsConfiguration": {
2381
- "onlyAllowPrivilegedEdits": false,
2382
- },
2383
- "redacted": false,
2384
- },
2385
- {
2386
- "datasource": {
2387
- "datasetV2": {
2388
- "datasetRid": "com.palantir.flight",
2389
- "propertyMapping": {
2390
- "id": {
2391
- "column": "id",
2392
- "type": "column",
2393
- },
2394
- },
2395
- },
2396
- "type": "datasetV2",
2397
- },
2398
- "datasourceName": "com.palantir.flight",
2399
- "editsConfiguration": {
2400
- "onlyAllowPrivilegedEdits": false,
2401
- },
2402
- "redacted": false,
2403
- },
2404
- ],
2405
- "entityMetadata": {
2406
- "aliases": [],
2407
- "arePatchesEnabled": true,
2408
- },
2409
- "objectType": {
2410
- "allImplementsInterfaces": {},
2411
- "apiName": "com.palantir.flight",
2412
- "displayMetadata": {
2413
- "description": undefined,
2414
- "displayName": "Flight",
2415
- "groupDisplayName": undefined,
2416
- "icon": {
2417
- "blueprint": {
2418
- "color": "#2D72D2",
2419
- "locator": "cube",
2420
- },
2421
- "type": "blueprint",
2422
- },
2423
- "pluralDisplayName": "Flights",
2424
- "visibility": "NORMAL",
2425
- },
2426
- "implementsInterfaces2": [],
2427
- "primaryKeys": [
2428
- "id",
2429
- ],
2430
- "propertyTypes": {
2431
- "id": {
2432
- "apiName": "id",
2433
- "baseFormatter": undefined,
2434
- "dataConstraints": undefined,
2435
- "displayMetadata": {
2436
- "description": undefined,
2437
- "displayName": "ID",
2438
- "visibility": "NORMAL",
2439
- },
2440
- "indexedForSearch": true,
2441
- "inlineAction": undefined,
2442
- "ruleSetBinding": undefined,
2443
- "sharedPropertyTypeApiName": undefined,
2444
- "sharedPropertyTypeRid": undefined,
2445
- "status": {
2446
- "active": {},
2447
- "type": "active",
2448
- },
2449
- "type": {
2450
- "string": {
2451
- "analyzerOverride": undefined,
2452
- "enableAsciiFolding": undefined,
2453
- "isLongText": false,
2454
- "supportsEfficientLeadingWildcard": false,
2455
- "supportsExactMatching": true,
2456
- },
2457
- "type": "string",
2458
- },
2459
- "typeClasses": [
2460
- {
2461
- "kind": "render_hint",
2462
- "name": "SELECTABLE",
2463
- },
2464
- {
2465
- "kind": "render_hint",
2466
- "name": "SORTABLE",
2467
- },
2468
- ],
2469
- "valueType": undefined,
2470
- },
2471
- "passengersList": {
2472
- "apiName": "passengersList",
2473
- "baseFormatter": undefined,
2474
- "dataConstraints": undefined,
2475
- "displayMetadata": {
2476
- "description": undefined,
2477
- "displayName": "Passengers",
2478
- "visibility": "NORMAL",
2479
- },
2480
- "indexedForSearch": true,
2481
- "inlineAction": undefined,
2482
- "ruleSetBinding": undefined,
2483
- "sharedPropertyTypeApiName": undefined,
2484
- "sharedPropertyTypeRid": undefined,
2485
- "status": {
2486
- "active": {},
2487
- "type": "active",
2488
- },
2489
- "type": {
2490
- "array": {
2491
- "reducers": [],
2492
- "subtype": {
2493
- "string": {
2494
- "analyzerOverride": undefined,
2495
- "enableAsciiFolding": undefined,
2496
- "isLongText": false,
2497
- "supportsEfficientLeadingWildcard": false,
2498
- "supportsExactMatching": true,
2499
- },
2500
- "type": "string",
2501
- },
2502
- },
2503
- "type": "array",
2504
- },
2505
- "typeClasses": [
2506
- {
2507
- "kind": "render_hint",
2508
- "name": "SELECTABLE",
2509
- },
2510
- {
2511
- "kind": "render_hint",
2512
- "name": "SORTABLE",
2513
- },
2514
- ],
2515
- "valueType": undefined,
2516
- },
2517
- },
2518
- "redacted": false,
2519
- "status": {
2520
- "active": {},
2521
- "type": "active",
2522
- },
2523
- "titlePropertyTypeRid": "id",
2524
- },
2525
- "propertySecurityGroupPackagingVersion": {
2526
- "type": "v2",
2527
- "v2": {},
2528
- },
2529
- },
2530
- "com.palantir.passenger": {
2531
- "datasources": [
2532
- {
2533
- "datasource": {
2534
- "datasetV2": {
2535
- "datasetRid": "com.palantir.passenger",
2536
- "propertyMapping": {
2537
- "flight_id": {
2538
- "column": "flight_id",
2539
- "type": "column",
2540
- },
2541
- "name": {
2542
- "column": "name",
2543
- "type": "column",
2544
- },
2545
- },
2546
- },
2547
- "type": "datasetV2",
2548
- },
2549
- "datasourceName": "com.palantir.passenger",
2550
- "editsConfiguration": {
2551
- "onlyAllowPrivilegedEdits": false,
2552
- },
2553
- "redacted": false,
2554
- },
2555
- ],
2556
- "entityMetadata": {
2557
- "aliases": [],
2558
- "arePatchesEnabled": true,
2559
- },
2560
- "objectType": {
2561
- "allImplementsInterfaces": {},
2562
- "apiName": "com.palantir.passenger",
2563
- "displayMetadata": {
2564
- "description": undefined,
2565
- "displayName": "Passenger",
2566
- "groupDisplayName": undefined,
2567
- "icon": {
2568
- "blueprint": {
2569
- "color": "#2D72D2",
2570
- "locator": "cube",
2571
- },
2572
- "type": "blueprint",
2573
- },
2574
- "pluralDisplayName": "Passengers",
2575
- "visibility": "NORMAL",
2576
- },
2577
- "implementsInterfaces2": [],
2578
- "primaryKeys": [
2579
- "name",
2580
- ],
2581
- "propertyTypes": {
2582
- "flight_id": {
2583
- "apiName": "flight_id",
2584
- "baseFormatter": undefined,
2585
- "dataConstraints": undefined,
2586
- "displayMetadata": {
2587
- "description": undefined,
2588
- "displayName": "Flight ID",
2589
- "visibility": "NORMAL",
2590
- },
2591
- "indexedForSearch": true,
2592
- "inlineAction": undefined,
2593
- "ruleSetBinding": undefined,
2594
- "sharedPropertyTypeApiName": undefined,
2595
- "sharedPropertyTypeRid": undefined,
2596
- "status": {
2597
- "active": {},
2598
- "type": "active",
2599
- },
2600
- "type": {
2601
- "string": {
2602
- "analyzerOverride": undefined,
2603
- "enableAsciiFolding": undefined,
2604
- "isLongText": false,
2605
- "supportsEfficientLeadingWildcard": false,
2606
- "supportsExactMatching": true,
2607
- },
2608
- "type": "string",
2609
- },
2610
- "typeClasses": [
2611
- {
2612
- "kind": "render_hint",
2613
- "name": "SELECTABLE",
2614
- },
2615
- {
2616
- "kind": "render_hint",
2617
- "name": "SORTABLE",
2618
- },
2619
- ],
2620
- "valueType": undefined,
2621
- },
2622
- "name": {
2623
- "apiName": "name",
2624
- "baseFormatter": undefined,
2625
- "dataConstraints": undefined,
2626
- "displayMetadata": {
2627
- "description": undefined,
2628
- "displayName": "Name",
2629
- "visibility": "NORMAL",
2630
- },
2631
- "indexedForSearch": true,
2632
- "inlineAction": undefined,
2633
- "ruleSetBinding": undefined,
2634
- "sharedPropertyTypeApiName": undefined,
2635
- "sharedPropertyTypeRid": undefined,
2636
- "status": {
2637
- "active": {},
2638
- "type": "active",
2639
- },
2640
- "type": {
2641
- "string": {
2642
- "analyzerOverride": undefined,
2643
- "enableAsciiFolding": undefined,
2644
- "isLongText": false,
2645
- "supportsEfficientLeadingWildcard": false,
2646
- "supportsExactMatching": true,
2647
- },
2648
- "type": "string",
2649
- },
2650
- "typeClasses": [
2651
- {
2652
- "kind": "render_hint",
2653
- "name": "SELECTABLE",
2654
- },
2655
- {
2656
- "kind": "render_hint",
2657
- "name": "SORTABLE",
2658
- },
2659
- ],
2660
- "valueType": undefined,
2661
- },
2662
- },
2663
- "redacted": false,
2664
- "status": {
2665
- "active": {},
2666
- "type": "active",
2667
- },
2668
- "titlePropertyTypeRid": "name",
2669
- },
2670
- "propertySecurityGroupPackagingVersion": {
2671
- "type": "v2",
2672
- "v2": {},
2673
- },
2674
- },
2675
- },
2676
- "sharedPropertyTypes": {},
2677
- },
2678
- "randomnessKey": undefined,
2679
- "valueTypes": {
2680
- "valueTypes": [],
2681
- },
2682
- }
2683
- `);
2684
- });
2685
- it("Self-referential links on derived datasources work", () => {
2686
- const link_person_to_parent = defineLink({
2687
- apiName: "person-to-parent",
2688
- manyForeignKeyProperty: "parentFk",
2689
- one: {
2690
- object: "com.palantir.person",
2691
- metadata: {
2692
- apiName: "parent",
2693
- displayName: "Parent",
2694
- pluralDisplayName: "Parents",
2695
- visibility: "NORMAL"
2696
- }
2697
- },
2698
- toMany: {
2699
- object: "com.palantir.person",
2700
- metadata: {
2701
- apiName: "child",
2702
- displayName: "Child",
2703
- pluralDisplayName: "Children",
2704
- visibility: "NORMAL"
2705
- }
2706
- }
2707
- });
2708
- defineObject({
2709
- displayName: "Person",
2710
- pluralDisplayName: "Persons",
2711
- description: "person",
2712
- apiName: "person",
2713
- titlePropertyApiName: "pk",
2714
- primaryKeyPropertyApiName: "pk",
2715
- properties: {
2716
- "pk": {
2717
- displayName: "pk",
2718
- type: "string",
2719
- status: "experimental"
2720
- },
2721
- "parentFk": {
2722
- displayName: "Parent FK",
2723
- type: "string",
2724
- status: "experimental"
2725
- },
2726
- "siblingIds": {
2727
- displayName: "Sibling IDs",
2728
- type: "string",
2729
- array: true,
2730
- status: "experimental"
2731
- }
2732
- },
2733
- datasources: [{
2734
- type: "dataset"
2735
- }, {
2736
- type: "derived",
2737
- linkDefinition: [{
2738
- linkType: link_person_to_parent,
2739
- side: "TARGET"
2740
- }, {
2741
- linkType: link_person_to_parent,
2742
- side: "SOURCE"
2743
- }],
2744
- propertyMapping: {
2745
- siblingIds: {
2746
- type: "collectList",
2747
- property: "pk",
2748
- limit: 100
2749
- }
2750
- }
2751
- }]
2752
- });
2753
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
2754
- {
2755
- "importedOntology": {
2756
- "actionTypes": {},
2757
- "blockPermissionInformation": {
2758
- "actionTypes": {},
2759
- "linkTypes": {},
2760
- "objectTypes": {},
2761
- },
2762
- "interfaceTypes": {},
2763
- "linkTypes": {},
2764
- "objectTypes": {},
2765
- "sharedPropertyTypes": {},
2766
- },
2767
- "importedValueTypes": {
2768
- "valueTypes": [],
2769
- },
2770
- "ontology": {
2771
- "actionTypes": {},
2772
- "blockPermissionInformation": {
2773
- "actionTypes": {},
2774
- "linkTypes": {},
2775
- "objectTypes": {},
2776
- },
2777
- "interfaceTypes": {},
2778
- "linkTypes": {
2779
- "person-to-parent": {
2780
- "datasources": [],
2781
- "entityMetadata": {
2782
- "arePatchesEnabled": false,
2783
- },
2784
- "linkType": {
2785
- "definition": {
2786
- "oneToMany": {
2787
- "cardinalityHint": "ONE_TO_MANY",
2788
- "manyToOneLinkMetadata": {
2789
- "apiName": "child",
2790
- "displayMetadata": {
2791
- "displayName": "Child",
2792
- "groupDisplayName": "",
2793
- "pluralDisplayName": "Children",
2794
- "visibility": "NORMAL",
2795
- },
2796
- "typeClasses": [],
2797
- },
2798
- "objectTypeRidManySide": "com.palantir.person",
2799
- "objectTypeRidOneSide": "com.palantir.person",
2800
- "oneSidePrimaryKeyToManySidePropertyMapping": [
2801
- {
2802
- "from": {
2803
- "apiName": "pk",
2804
- "object": "com.palantir.person",
2805
- },
2806
- "to": {
2807
- "apiName": "parentFk",
2808
- "object": "com.palantir.person",
2809
- },
2810
- },
2811
- ],
2812
- "oneToManyLinkMetadata": {
2813
- "apiName": "parent",
2814
- "displayMetadata": {
2815
- "displayName": "Parent",
2816
- "groupDisplayName": "",
2817
- "pluralDisplayName": "Parents",
2818
- "visibility": "NORMAL",
2819
- },
2820
- "typeClasses": [],
2821
- },
2822
- },
2823
- "type": "oneToMany",
2824
- },
2825
- "id": "person-to-parent",
2826
- "redacted": false,
2827
- "status": {
2828
- "active": {},
2829
- "type": "active",
2830
- },
2831
- },
2832
- },
2833
- },
2834
- "objectTypes": {
2835
- "com.palantir.person": {
2836
- "datasources": [
2837
- {
2838
- "datasource": {
2839
- "derived": {
2840
- "definition": {
2841
- "aggregatedProperties": {
2842
- "linkDefinition": {
2843
- "multiHopLink": {
2844
- "steps": [
2845
- {
2846
- "searchAround": {
2847
- "linkTypeIdentifier": {
2848
- "linkType": "person-to-parent",
2849
- "type": "linkType",
2850
- },
2851
- "linkTypeSide": "TARGET",
2852
- },
2853
- "type": "searchAround",
2854
- },
2855
- {
2856
- "searchAround": {
2857
- "linkTypeIdentifier": {
2858
- "linkType": "person-to-parent",
2859
- "type": "linkType",
2860
- },
2861
- "linkTypeSide": "SOURCE",
2862
- },
2863
- "type": "searchAround",
2864
- },
2865
- ],
2866
- },
2867
- "type": "multiHopLink",
2868
- },
2869
- "propertyTypeMapping": {
2870
- "siblingIds": {
2871
- "collectList": {
2872
- "limit": 100,
2873
- "linkedProperty": {
2874
- "propertyType": "pk",
2875
- "type": "propertyType",
2876
- },
2877
- },
2878
- "type": "collectList",
2879
- },
2880
- },
2881
- },
2882
- "type": "aggregatedProperties",
2883
- },
2884
- },
2885
- "type": "derived",
2886
- },
2887
- "datasourceName": "com.palantir.person.derived.0",
2888
- "editsConfiguration": {
2889
- "onlyAllowPrivilegedEdits": false,
2890
- },
2891
- "redacted": false,
2892
- },
2893
- {
2894
- "datasource": {
2895
- "datasetV2": {
2896
- "datasetRid": "com.palantir.person",
2897
- "propertyMapping": {
2898
- "parentFk": {
2899
- "column": "parentFk",
2900
- "type": "column",
2901
- },
2902
- "pk": {
2903
- "column": "pk",
2904
- "type": "column",
2905
- },
2906
- },
2907
- },
2908
- "type": "datasetV2",
2909
- },
2910
- "datasourceName": "com.palantir.person",
2911
- "editsConfiguration": {
2912
- "onlyAllowPrivilegedEdits": false,
2913
- },
2914
- "redacted": false,
2915
- },
2916
- ],
2917
- "entityMetadata": {
2918
- "aliases": [],
2919
- "arePatchesEnabled": false,
2920
- },
2921
- "objectType": {
2922
- "allImplementsInterfaces": {},
2923
- "apiName": "com.palantir.person",
2924
- "displayMetadata": {
2925
- "description": "person",
2926
- "displayName": "Person",
2927
- "groupDisplayName": undefined,
2928
- "icon": {
2929
- "blueprint": {
2930
- "color": "#2D72D2",
2931
- "locator": "cube",
2932
- },
2933
- "type": "blueprint",
2934
- },
2935
- "pluralDisplayName": "Persons",
2936
- "visibility": "NORMAL",
2937
- },
2938
- "implementsInterfaces2": [],
2939
- "primaryKeys": [
2940
- "pk",
2941
- ],
2942
- "propertyTypes": {
2943
- "parentFk": {
2944
- "apiName": "parentFk",
2945
- "baseFormatter": undefined,
2946
- "dataConstraints": undefined,
2947
- "displayMetadata": {
2948
- "description": undefined,
2949
- "displayName": "Parent FK",
2950
- "visibility": "NORMAL",
2951
- },
2952
- "indexedForSearch": true,
2953
- "inlineAction": undefined,
2954
- "ruleSetBinding": undefined,
2955
- "sharedPropertyTypeApiName": undefined,
2956
- "sharedPropertyTypeRid": undefined,
2957
- "status": {
2958
- "experimental": {},
2959
- "type": "experimental",
2960
- },
2961
- "type": {
2962
- "string": {
2963
- "analyzerOverride": undefined,
2964
- "enableAsciiFolding": undefined,
2965
- "isLongText": false,
2966
- "supportsEfficientLeadingWildcard": false,
2967
- "supportsExactMatching": true,
2968
- },
2969
- "type": "string",
2970
- },
2971
- "typeClasses": [
2972
- {
2973
- "kind": "render_hint",
2974
- "name": "SELECTABLE",
2975
- },
2976
- {
2977
- "kind": "render_hint",
2978
- "name": "SORTABLE",
2979
- },
2980
- ],
2981
- "valueType": undefined,
2982
- },
2983
- "pk": {
2984
- "apiName": "pk",
2985
- "baseFormatter": undefined,
2986
- "dataConstraints": undefined,
2987
- "displayMetadata": {
2988
- "description": undefined,
2989
- "displayName": "pk",
2990
- "visibility": "NORMAL",
2991
- },
2992
- "indexedForSearch": true,
2993
- "inlineAction": undefined,
2994
- "ruleSetBinding": undefined,
2995
- "sharedPropertyTypeApiName": undefined,
2996
- "sharedPropertyTypeRid": undefined,
2997
- "status": {
2998
- "experimental": {},
2999
- "type": "experimental",
3000
- },
3001
- "type": {
3002
- "string": {
3003
- "analyzerOverride": undefined,
3004
- "enableAsciiFolding": undefined,
3005
- "isLongText": false,
3006
- "supportsEfficientLeadingWildcard": false,
3007
- "supportsExactMatching": true,
3008
- },
3009
- "type": "string",
3010
- },
3011
- "typeClasses": [
3012
- {
3013
- "kind": "render_hint",
3014
- "name": "SELECTABLE",
3015
- },
3016
- {
3017
- "kind": "render_hint",
3018
- "name": "SORTABLE",
3019
- },
3020
- ],
3021
- "valueType": undefined,
3022
- },
3023
- "siblingIds": {
3024
- "apiName": "siblingIds",
3025
- "baseFormatter": undefined,
3026
- "dataConstraints": undefined,
3027
- "displayMetadata": {
3028
- "description": undefined,
3029
- "displayName": "Sibling IDs",
3030
- "visibility": "NORMAL",
3031
- },
3032
- "indexedForSearch": true,
3033
- "inlineAction": undefined,
3034
- "ruleSetBinding": undefined,
3035
- "sharedPropertyTypeApiName": undefined,
3036
- "sharedPropertyTypeRid": undefined,
3037
- "status": {
3038
- "experimental": {},
3039
- "type": "experimental",
3040
- },
3041
- "type": {
3042
- "array": {
3043
- "reducers": [],
3044
- "subtype": {
3045
- "string": {
3046
- "analyzerOverride": undefined,
3047
- "enableAsciiFolding": undefined,
3048
- "isLongText": false,
3049
- "supportsEfficientLeadingWildcard": false,
3050
- "supportsExactMatching": true,
3051
- },
3052
- "type": "string",
3053
- },
3054
- },
3055
- "type": "array",
3056
- },
3057
- "typeClasses": [
3058
- {
3059
- "kind": "render_hint",
3060
- "name": "SELECTABLE",
3061
- },
3062
- {
3063
- "kind": "render_hint",
3064
- "name": "SORTABLE",
3065
- },
3066
- ],
3067
- "valueType": undefined,
3068
- },
3069
- },
3070
- "redacted": false,
3071
- "status": {
3072
- "active": {},
3073
- "type": "active",
3074
- },
3075
- "titlePropertyTypeRid": "pk",
3076
- },
3077
- "propertySecurityGroupPackagingVersion": {
3078
- "type": "v2",
3079
- "v2": {},
3080
- },
3081
- },
3082
- },
3083
- "sharedPropertyTypes": {},
3084
- },
3085
- "randomnessKey": undefined,
3086
- "valueTypes": {
3087
- "valueTypes": [],
3088
- },
3089
- }
3090
- `);
3091
- });
3092
- it("Default PSGs configurations are defined correctly", () => {
3093
- defineObject({
3094
- displayName: "Person",
3095
- pluralDisplayName: "Persons",
3096
- description: "person",
3097
- apiName: "person",
3098
- titlePropertyApiName: "pk",
3099
- primaryKeyPropertyApiName: "pk",
3100
- properties: {
3101
- "pk": {
3102
- displayName: "pk",
3103
- type: "string"
3104
- },
3105
- "normalProperty": {
3106
- displayName: "Normal Property",
3107
- type: "string"
3108
- },
3109
- "SSN": {
3110
- displayName: "SSN",
3111
- type: "string"
3112
- }
3113
- },
3114
- datasources: [{
3115
- type: "dataset",
3116
- propertySecurityGroups: [{
3117
- name: "invalidProperty",
3118
- properties: ["SSN"]
3119
- }]
3120
- }]
3121
- });
3122
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
3123
- {
3124
- "importedOntology": {
3125
- "actionTypes": {},
3126
- "blockPermissionInformation": {
3127
- "actionTypes": {},
3128
- "linkTypes": {},
3129
- "objectTypes": {},
3130
- },
3131
- "interfaceTypes": {},
3132
- "linkTypes": {},
3133
- "objectTypes": {},
3134
- "sharedPropertyTypes": {},
3135
- },
3136
- "importedValueTypes": {
3137
- "valueTypes": [],
3138
- },
3139
- "ontology": {
3140
- "actionTypes": {},
3141
- "blockPermissionInformation": {
3142
- "actionTypes": {},
3143
- "linkTypes": {},
3144
- "objectTypes": {},
3145
- },
3146
- "interfaceTypes": {},
3147
- "linkTypes": {},
3148
- "objectTypes": {
3149
- "com.palantir.person": {
3150
- "datasources": [
3151
- {
3152
- "datasource": {
3153
- "datasetV3": {
3154
- "branchId": "master",
3155
- "datasetRid": "com.palantir.person",
3156
- "propertyMapping": {
3157
- "SSN": {
3158
- "column": "SSN",
3159
- "type": "column",
3160
- },
3161
- "normalProperty": {
3162
- "column": "normalProperty",
3163
- "type": "column",
3164
- },
3165
- "pk": {
3166
- "column": "pk",
3167
- "type": "column",
3168
- },
3169
- },
3170
- "propertySecurityGroups": {
3171
- "groups": [
3172
- {
3173
- "properties": [
3174
- "pk",
3175
- "normalProperty",
3176
- ],
3177
- "rid": "defaultObjectSecurityPolicy",
3178
- "security": {
3179
- "granular": {
3180
- "viewPolicy": {
3181
- "additionalMandatory": {
3182
- "assumedMarkings": [],
3183
- "assumedMarkingsV2": {},
3184
- "markings": {},
3185
- },
3186
- "granularPolicyCondition": {
3187
- "and": {
3188
- "conditions": [],
3189
- },
3190
- "type": "and",
3191
- },
3192
- },
3193
- },
3194
- "type": "granular",
3195
- },
3196
- "type": {
3197
- "primaryKey": {},
3198
- "type": "primaryKey",
3199
- },
3200
- },
3201
- {
3202
- "properties": [
3203
- "SSN",
3204
- ],
3205
- "rid": "invalidProperty",
3206
- "security": {
3207
- "granular": {
3208
- "viewPolicy": {
3209
- "additionalMandatory": {
3210
- "assumedMarkings": [],
3211
- "assumedMarkingsV2": {},
3212
- "markings": {},
3213
- },
3214
- "granularPolicyCondition": {
3215
- "and": {
3216
- "conditions": [],
3217
- },
3218
- "type": "and",
3219
- },
3220
- },
3221
- },
3222
- "type": "granular",
3223
- },
3224
- "type": {
3225
- "property": {
3226
- "name": "invalidProperty",
3227
- },
3228
- "type": "property",
3229
- },
3230
- },
3231
- ],
3232
- },
3233
- },
3234
- "type": "datasetV3",
3235
- },
3236
- "datasourceName": "com.palantir.person",
3237
- "editsConfiguration": {
3238
- "onlyAllowPrivilegedEdits": false,
3239
- },
3240
- "redacted": false,
3241
- },
3242
- ],
3243
- "entityMetadata": {
3244
- "aliases": [],
3245
- "arePatchesEnabled": false,
3246
- },
3247
- "objectType": {
3248
- "allImplementsInterfaces": {},
3249
- "apiName": "com.palantir.person",
3250
- "displayMetadata": {
3251
- "description": "person",
3252
- "displayName": "Person",
3253
- "groupDisplayName": undefined,
3254
- "icon": {
3255
- "blueprint": {
3256
- "color": "#2D72D2",
3257
- "locator": "cube",
3258
- },
3259
- "type": "blueprint",
3260
- },
3261
- "pluralDisplayName": "Persons",
3262
- "visibility": "NORMAL",
3263
- },
3264
- "implementsInterfaces2": [],
3265
- "primaryKeys": [
3266
- "pk",
3267
- ],
3268
- "propertyTypes": {
3269
- "SSN": {
3270
- "apiName": "SSN",
3271
- "baseFormatter": undefined,
3272
- "dataConstraints": undefined,
3273
- "displayMetadata": {
3274
- "description": undefined,
3275
- "displayName": "SSN",
3276
- "visibility": "NORMAL",
3277
- },
3278
- "indexedForSearch": true,
3279
- "inlineAction": undefined,
3280
- "ruleSetBinding": undefined,
3281
- "sharedPropertyTypeApiName": undefined,
3282
- "sharedPropertyTypeRid": undefined,
3283
- "status": {
3284
- "active": {},
3285
- "type": "active",
3286
- },
3287
- "type": {
3288
- "string": {
3289
- "analyzerOverride": undefined,
3290
- "enableAsciiFolding": undefined,
3291
- "isLongText": false,
3292
- "supportsEfficientLeadingWildcard": false,
3293
- "supportsExactMatching": true,
3294
- },
3295
- "type": "string",
3296
- },
3297
- "typeClasses": [
3298
- {
3299
- "kind": "render_hint",
3300
- "name": "SELECTABLE",
3301
- },
3302
- {
3303
- "kind": "render_hint",
3304
- "name": "SORTABLE",
3305
- },
3306
- ],
3307
- "valueType": undefined,
3308
- },
3309
- "normalProperty": {
3310
- "apiName": "normalProperty",
3311
- "baseFormatter": undefined,
3312
- "dataConstraints": undefined,
3313
- "displayMetadata": {
3314
- "description": undefined,
3315
- "displayName": "Normal Property",
3316
- "visibility": "NORMAL",
3317
- },
3318
- "indexedForSearch": true,
3319
- "inlineAction": undefined,
3320
- "ruleSetBinding": undefined,
3321
- "sharedPropertyTypeApiName": undefined,
3322
- "sharedPropertyTypeRid": undefined,
3323
- "status": {
3324
- "active": {},
3325
- "type": "active",
3326
- },
3327
- "type": {
3328
- "string": {
3329
- "analyzerOverride": undefined,
3330
- "enableAsciiFolding": undefined,
3331
- "isLongText": false,
3332
- "supportsEfficientLeadingWildcard": false,
3333
- "supportsExactMatching": true,
3334
- },
3335
- "type": "string",
3336
- },
3337
- "typeClasses": [
3338
- {
3339
- "kind": "render_hint",
3340
- "name": "SELECTABLE",
3341
- },
3342
- {
3343
- "kind": "render_hint",
3344
- "name": "SORTABLE",
3345
- },
3346
- ],
3347
- "valueType": undefined,
3348
- },
3349
- "pk": {
3350
- "apiName": "pk",
3351
- "baseFormatter": undefined,
3352
- "dataConstraints": undefined,
3353
- "displayMetadata": {
3354
- "description": undefined,
3355
- "displayName": "pk",
3356
- "visibility": "NORMAL",
3357
- },
3358
- "indexedForSearch": true,
3359
- "inlineAction": undefined,
3360
- "ruleSetBinding": undefined,
3361
- "sharedPropertyTypeApiName": undefined,
3362
- "sharedPropertyTypeRid": undefined,
3363
- "status": {
3364
- "active": {},
3365
- "type": "active",
3366
- },
3367
- "type": {
3368
- "string": {
3369
- "analyzerOverride": undefined,
3370
- "enableAsciiFolding": undefined,
3371
- "isLongText": false,
3372
- "supportsEfficientLeadingWildcard": false,
3373
- "supportsExactMatching": true,
3374
- },
3375
- "type": "string",
3376
- },
3377
- "typeClasses": [
3378
- {
3379
- "kind": "render_hint",
3380
- "name": "SELECTABLE",
3381
- },
3382
- {
3383
- "kind": "render_hint",
3384
- "name": "SORTABLE",
3385
- },
3386
- ],
3387
- "valueType": undefined,
3388
- },
3389
- },
3390
- "redacted": false,
3391
- "status": {
3392
- "active": {},
3393
- "type": "active",
3394
- },
3395
- "titlePropertyTypeRid": "pk",
3396
- },
3397
- "propertySecurityGroupPackagingVersion": {
3398
- "type": "v2",
3399
- "v2": {},
3400
- },
3401
- },
3402
- },
3403
- "sharedPropertyTypes": {},
3404
- },
3405
- "randomnessKey": undefined,
3406
- "valueTypes": {
3407
- "valueTypes": [],
3408
- },
3409
- }
3410
- `);
3411
- });
3412
- it("Complex PSGs configurations are defined correctly", () => {
3413
- defineObject({
3414
- displayName: "Person",
3415
- pluralDisplayName: "Persons",
3416
- description: "person",
3417
- apiName: "person",
3418
- titlePropertyApiName: "pk",
3419
- primaryKeyPropertyApiName: "pk",
3420
- properties: {
3421
- "pk": {
3422
- displayName: "pk",
3423
- type: "string"
3424
- },
3425
- "group": {
3426
- displayName: "Group Property",
3427
- type: "string"
3428
- },
3429
- "mandatory": {
3430
- type: {
3431
- type: "marking",
3432
- markingType: "MANDATORY",
3433
- markingInputGroupName: "myMarking"
3434
- },
3435
- displayName: "mandatory"
3436
- },
3437
- "SSN": {
3438
- displayName: "SSN",
3439
- type: "string"
3440
- }
3441
- },
3442
- datasources: [{
3443
- type: "dataset",
3444
- objectSecurityPolicy: {
3445
- name: "customObjectLevelPolicy",
3446
- granularPolicy: {
3447
- type: "group",
3448
- name: "objectLevelGroup"
3449
- },
3450
- appliedMarkings: {
3451
- "objectLevelMarking": "CBAC"
3452
- }
3453
- },
3454
- propertySecurityGroups: [{
3455
- name: "customPsg",
3456
- properties: ["SSN"],
3457
- granularPolicy: {
3458
- type: "and",
3459
- conditions: [{
3460
- type: "groupProperty",
3461
- property: "group"
3462
- }, {
3463
- type: "markingProperty",
3464
- property: "mandatory"
3465
- }]
3466
- },
3467
- appliedMarkings: {
3468
- "propertyLevelMarking": "MANDATORY"
3469
- },
3470
- assumedMarkings: {
3471
- "propertyLevelAssumedMarking": "MANDATORY"
3472
- }
3473
- }]
3474
- }]
3475
- });
3476
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
3477
- {
3478
- "importedOntology": {
3479
- "actionTypes": {},
3480
- "blockPermissionInformation": {
3481
- "actionTypes": {},
3482
- "linkTypes": {},
3483
- "objectTypes": {},
3484
- },
3485
- "interfaceTypes": {},
3486
- "linkTypes": {},
3487
- "objectTypes": {},
3488
- "sharedPropertyTypes": {},
3489
- },
3490
- "importedValueTypes": {
3491
- "valueTypes": [],
3492
- },
3493
- "ontology": {
3494
- "actionTypes": {},
3495
- "blockPermissionInformation": {
3496
- "actionTypes": {},
3497
- "linkTypes": {},
3498
- "objectTypes": {},
3499
- },
3500
- "interfaceTypes": {},
3501
- "linkTypes": {},
3502
- "objectTypes": {
3503
- "com.palantir.person": {
3504
- "datasources": [
3505
- {
3506
- "dataSecurity": {
3507
- "classificationConstraint": undefined,
3508
- "markingConstraint": {
3509
- "markingGroupName": "myMarking",
3510
- },
3511
- },
3512
- "datasource": {
3513
- "datasetV3": {
3514
- "branchId": "master",
3515
- "datasetRid": "com.palantir.person",
3516
- "propertyMapping": {
3517
- "SSN": {
3518
- "column": "SSN",
3519
- "type": "column",
3520
- },
3521
- "group": {
3522
- "column": "group",
3523
- "type": "column",
3524
- },
3525
- "mandatory": {
3526
- "column": "mandatory",
3527
- "type": "column",
3528
- },
3529
- "pk": {
3530
- "column": "pk",
3531
- "type": "column",
3532
- },
3533
- },
3534
- "propertySecurityGroups": {
3535
- "groups": [
3536
- {
3537
- "properties": [
3538
- "pk",
3539
- "group",
3540
- "mandatory",
3541
- ],
3542
- "rid": "customObjectLevelPolicy",
3543
- "security": {
3544
- "granular": {
3545
- "viewPolicy": {
3546
- "additionalMandatory": {
3547
- "assumedMarkings": [],
3548
- "assumedMarkingsV2": {},
3549
- "markings": {
3550
- "objectLevelMarking": "CBAC",
3551
- },
3552
- },
3553
- "granularPolicyCondition": {
3554
- "comparison": {
3555
- "left": {
3556
- "type": "userProperty",
3557
- "userProperty": {
3558
- "groupIds": {},
3559
- "type": "groupIds",
3560
- },
3561
- },
3562
- "operator": "INTERSECTS",
3563
- "right": {
3564
- "constant": {
3565
- "strings": [
3566
- "objectLevelGroup",
3567
- ],
3568
- "type": "strings",
3569
- },
3570
- "type": "constant",
3571
- },
3572
- },
3573
- "type": "comparison",
3574
- },
3575
- },
3576
- },
3577
- "type": "granular",
3578
- },
3579
- "type": {
3580
- "primaryKey": {},
3581
- "type": "primaryKey",
3582
- },
3583
- },
3584
- {
3585
- "properties": [
3586
- "SSN",
3587
- ],
3588
- "rid": "customPsg",
3589
- "security": {
3590
- "granular": {
3591
- "viewPolicy": {
3592
- "additionalMandatory": {
3593
- "assumedMarkings": [],
3594
- "assumedMarkingsV2": {
3595
- "propertyLevelAssumedMarking": "MANDATORY",
3596
- },
3597
- "markings": {
3598
- "propertyLevelMarking": "MANDATORY",
3599
- },
3600
- },
3601
- "granularPolicyCondition": {
3602
- "and": {
3603
- "conditions": [
3604
- {
3605
- "comparison": {
3606
- "left": {
3607
- "type": "userProperty",
3608
- "userProperty": {
3609
- "groupIds": {},
3610
- "type": "groupIds",
3611
- },
3612
- },
3613
- "operator": "INTERSECTS",
3614
- "right": {
3615
- "property": "group",
3616
- "type": "property",
3617
- },
3618
- },
3619
- "type": "comparison",
3620
- },
3621
- {
3622
- "markings": {
3623
- "property": "mandatory",
3624
- },
3625
- "type": "markings",
3626
- },
3627
- ],
3628
- },
3629
- "type": "and",
3630
- },
3631
- },
3632
- },
3633
- "type": "granular",
3634
- },
3635
- "type": {
3636
- "property": {
3637
- "name": "customPsg",
3638
- },
3639
- "type": "property",
3640
- },
3641
- },
3642
- ],
3643
- },
3644
- },
3645
- "type": "datasetV3",
3646
- },
3647
- "datasourceName": "com.palantir.person",
3648
- "editsConfiguration": {
3649
- "onlyAllowPrivilegedEdits": false,
3650
- },
3651
- "redacted": false,
3652
- },
3653
- ],
3654
- "entityMetadata": {
3655
- "aliases": [],
3656
- "arePatchesEnabled": false,
3657
- },
3658
- "objectType": {
3659
- "allImplementsInterfaces": {},
3660
- "apiName": "com.palantir.person",
3661
- "displayMetadata": {
3662
- "description": "person",
3663
- "displayName": "Person",
3664
- "groupDisplayName": undefined,
3665
- "icon": {
3666
- "blueprint": {
3667
- "color": "#2D72D2",
3668
- "locator": "cube",
3669
- },
3670
- "type": "blueprint",
3671
- },
3672
- "pluralDisplayName": "Persons",
3673
- "visibility": "NORMAL",
3674
- },
3675
- "implementsInterfaces2": [],
3676
- "primaryKeys": [
3677
- "pk",
3678
- ],
3679
- "propertyTypes": {
3680
- "SSN": {
3681
- "apiName": "SSN",
3682
- "baseFormatter": undefined,
3683
- "dataConstraints": undefined,
3684
- "displayMetadata": {
3685
- "description": undefined,
3686
- "displayName": "SSN",
3687
- "visibility": "NORMAL",
3688
- },
3689
- "indexedForSearch": true,
3690
- "inlineAction": undefined,
3691
- "ruleSetBinding": undefined,
3692
- "sharedPropertyTypeApiName": undefined,
3693
- "sharedPropertyTypeRid": undefined,
3694
- "status": {
3695
- "active": {},
3696
- "type": "active",
3697
- },
3698
- "type": {
3699
- "string": {
3700
- "analyzerOverride": undefined,
3701
- "enableAsciiFolding": undefined,
3702
- "isLongText": false,
3703
- "supportsEfficientLeadingWildcard": false,
3704
- "supportsExactMatching": true,
3705
- },
3706
- "type": "string",
3707
- },
3708
- "typeClasses": [
3709
- {
3710
- "kind": "render_hint",
3711
- "name": "SELECTABLE",
3712
- },
3713
- {
3714
- "kind": "render_hint",
3715
- "name": "SORTABLE",
3716
- },
3717
- ],
3718
- "valueType": undefined,
3719
- },
3720
- "group": {
3721
- "apiName": "group",
3722
- "baseFormatter": undefined,
3723
- "dataConstraints": undefined,
3724
- "displayMetadata": {
3725
- "description": undefined,
3726
- "displayName": "Group Property",
3727
- "visibility": "NORMAL",
3728
- },
3729
- "indexedForSearch": true,
3730
- "inlineAction": undefined,
3731
- "ruleSetBinding": undefined,
3732
- "sharedPropertyTypeApiName": undefined,
3733
- "sharedPropertyTypeRid": undefined,
3734
- "status": {
3735
- "active": {},
3736
- "type": "active",
3737
- },
3738
- "type": {
3739
- "string": {
3740
- "analyzerOverride": undefined,
3741
- "enableAsciiFolding": undefined,
3742
- "isLongText": false,
3743
- "supportsEfficientLeadingWildcard": false,
3744
- "supportsExactMatching": true,
3745
- },
3746
- "type": "string",
3747
- },
3748
- "typeClasses": [
3749
- {
3750
- "kind": "render_hint",
3751
- "name": "SELECTABLE",
3752
- },
3753
- {
3754
- "kind": "render_hint",
3755
- "name": "SORTABLE",
3756
- },
3757
- ],
3758
- "valueType": undefined,
3759
- },
3760
- "mandatory": {
3761
- "apiName": "mandatory",
3762
- "baseFormatter": undefined,
3763
- "dataConstraints": {
3764
- "nullability": undefined,
3765
- "nullabilityV2": {
3766
- "noNulls": true,
3767
- },
3768
- "propertyTypeConstraints": [],
3769
- },
3770
- "displayMetadata": {
3771
- "description": undefined,
3772
- "displayName": "mandatory",
3773
- "visibility": "NORMAL",
3774
- },
3775
- "indexedForSearch": true,
3776
- "inlineAction": undefined,
3777
- "ruleSetBinding": undefined,
3778
- "sharedPropertyTypeApiName": undefined,
3779
- "sharedPropertyTypeRid": undefined,
3780
- "status": {
3781
- "active": {},
3782
- "type": "active",
3783
- },
3784
- "type": {
3785
- "marking": {
3786
- "markingType": "MANDATORY",
3787
- },
3788
- "type": "marking",
3789
- },
3790
- "typeClasses": [
3791
- {
3792
- "kind": "render_hint",
3793
- "name": "SELECTABLE",
3794
- },
3795
- {
3796
- "kind": "render_hint",
3797
- "name": "SORTABLE",
3798
- },
3799
- ],
3800
- "valueType": undefined,
3801
- },
3802
- "pk": {
3803
- "apiName": "pk",
3804
- "baseFormatter": undefined,
3805
- "dataConstraints": undefined,
3806
- "displayMetadata": {
3807
- "description": undefined,
3808
- "displayName": "pk",
3809
- "visibility": "NORMAL",
3810
- },
3811
- "indexedForSearch": true,
3812
- "inlineAction": undefined,
3813
- "ruleSetBinding": undefined,
3814
- "sharedPropertyTypeApiName": undefined,
3815
- "sharedPropertyTypeRid": undefined,
3816
- "status": {
3817
- "active": {},
3818
- "type": "active",
3819
- },
3820
- "type": {
3821
- "string": {
3822
- "analyzerOverride": undefined,
3823
- "enableAsciiFolding": undefined,
3824
- "isLongText": false,
3825
- "supportsEfficientLeadingWildcard": false,
3826
- "supportsExactMatching": true,
3827
- },
3828
- "type": "string",
3829
- },
3830
- "typeClasses": [
3831
- {
3832
- "kind": "render_hint",
3833
- "name": "SELECTABLE",
3834
- },
3835
- {
3836
- "kind": "render_hint",
3837
- "name": "SORTABLE",
3838
- },
3839
- ],
3840
- "valueType": undefined,
3841
- },
3842
- },
3843
- "redacted": false,
3844
- "status": {
3845
- "active": {},
3846
- "type": "active",
3847
- },
3848
- "titlePropertyTypeRid": "pk",
3849
- },
3850
- "propertySecurityGroupPackagingVersion": {
3851
- "type": "v2",
3852
- "v2": {},
3853
- },
3854
- },
3855
- },
3856
- "sharedPropertyTypes": {},
3857
- },
3858
- "randomnessKey": undefined,
3859
- "valueTypes": {
3860
- "valueTypes": [],
3861
- },
3862
- }
3863
- `);
3864
- });
3865
- it("Reducers and struct main properties are defined correctly", () => {
3866
- const spt = defineSharedPropertyType({
3867
- apiName: "spt",
3868
- displayName: "Struct Array SPT",
3869
- type: {
3870
- type: "struct",
3871
- structDefinition: {
3872
- prop1: "string",
3873
- prop2: "string"
3874
- },
3875
- mainValue: {
3876
- fields: "prop1",
3877
- type: "string"
3878
- }
3879
- },
3880
- array: true,
3881
- reducers: [{
3882
- direction: "descending",
3883
- structField: "prop1"
3884
- }, {
3885
- direction: "ascending",
3886
- structField: "prop2"
3887
- }]
3888
- });
3889
- defineObject({
3890
- titlePropertyApiName: "bar",
3891
- displayName: "Foo",
3892
- pluralDisplayName: "Foo",
3893
- apiName: "foo",
3894
- primaryKeyPropertyApiName: "bar",
3895
- properties: {
3896
- "bar": {
3897
- type: "string"
3898
- },
3899
- "spt": {
3900
- sharedPropertyType: spt,
3901
- type: {
3902
- type: "struct",
3903
- structDefinition: {
3904
- prop1: "string",
3905
- prop2: "string"
3906
- }
3907
- },
3908
- array: true
3909
- },
3910
- "prop": {
3911
- type: {
3912
- type: "struct",
3913
- structDefinition: {
3914
- field1: "string",
3915
- field2: "string"
3916
- },
3917
- mainValue: {
3918
- fields: ["field1", "field2"],
3919
- type: {
3920
- type: "struct",
3921
- structDefinition: {
3922
- field1: "string",
3923
- field2: "string"
3924
- }
3925
- }
3926
- }
3927
- },
3928
- array: true,
3929
- reducers: [{
3930
- direction: "descending",
3931
- structField: "field1"
3932
- }, {
3933
- direction: "ascending",
3934
- structField: "field2"
3935
- }]
3936
- }
3937
- }
3938
- });
3939
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
3940
- {
3941
- "importedOntology": {
3942
- "actionTypes": {},
3943
- "blockPermissionInformation": {
3944
- "actionTypes": {},
3945
- "linkTypes": {},
3946
- "objectTypes": {},
3947
- },
3948
- "interfaceTypes": {},
3949
- "linkTypes": {},
3950
- "objectTypes": {},
3951
- "sharedPropertyTypes": {},
3952
- },
3953
- "importedValueTypes": {
3954
- "valueTypes": [],
3955
- },
3956
- "ontology": {
3957
- "actionTypes": {},
3958
- "blockPermissionInformation": {
3959
- "actionTypes": {},
3960
- "linkTypes": {},
3961
- "objectTypes": {},
3962
- },
3963
- "interfaceTypes": {},
3964
- "linkTypes": {},
3965
- "objectTypes": {
3966
- "com.palantir.foo": {
3967
- "datasources": [
3968
- {
3969
- "datasource": {
3970
- "datasetV2": {
3971
- "datasetRid": "com.palantir.foo",
3972
- "propertyMapping": {
3973
- "bar": {
3974
- "column": "bar",
3975
- "type": "column",
3976
- },
3977
- "prop": {
3978
- "struct": {
3979
- "column": "prop",
3980
- "mapping": {
3981
- "field1": {
3982
- "apiName": "field1",
3983
- "mappings": {},
3984
- },
3985
- "field2": {
3986
- "apiName": "field2",
3987
- "mappings": {},
3988
- },
3989
- },
3990
- },
3991
- "type": "struct",
3992
- },
3993
- "spt": {
3994
- "struct": {
3995
- "column": "spt",
3996
- "mapping": {
3997
- "prop1": {
3998
- "apiName": "prop1",
3999
- "mappings": {},
4000
- },
4001
- "prop2": {
4002
- "apiName": "prop2",
4003
- "mappings": {},
4004
- },
4005
- },
4006
- },
4007
- "type": "struct",
4008
- },
4009
- },
4010
- },
4011
- "type": "datasetV2",
4012
- },
4013
- "datasourceName": "com.palantir.foo",
4014
- "editsConfiguration": {
4015
- "onlyAllowPrivilegedEdits": false,
4016
- },
4017
- "redacted": false,
4018
- },
4019
- ],
4020
- "entityMetadata": {
4021
- "aliases": [],
4022
- "arePatchesEnabled": false,
4023
- },
4024
- "objectType": {
4025
- "allImplementsInterfaces": {},
4026
- "apiName": "com.palantir.foo",
4027
- "displayMetadata": {
4028
- "description": undefined,
4029
- "displayName": "Foo",
4030
- "groupDisplayName": undefined,
4031
- "icon": {
4032
- "blueprint": {
4033
- "color": "#2D72D2",
4034
- "locator": "cube",
4035
- },
4036
- "type": "blueprint",
4037
- },
4038
- "pluralDisplayName": "Foo",
4039
- "visibility": "NORMAL",
4040
- },
4041
- "implementsInterfaces2": [],
4042
- "primaryKeys": [
4043
- "bar",
4044
- ],
4045
- "propertyTypes": {
4046
- "bar": {
4047
- "apiName": "bar",
4048
- "baseFormatter": undefined,
4049
- "dataConstraints": undefined,
4050
- "displayMetadata": {
4051
- "description": undefined,
4052
- "displayName": "Bar",
4053
- "visibility": "NORMAL",
4054
- },
4055
- "indexedForSearch": true,
4056
- "inlineAction": undefined,
4057
- "ruleSetBinding": undefined,
4058
- "sharedPropertyTypeApiName": undefined,
4059
- "sharedPropertyTypeRid": undefined,
4060
- "status": {
4061
- "active": {},
4062
- "type": "active",
4063
- },
4064
- "type": {
4065
- "string": {
4066
- "analyzerOverride": undefined,
4067
- "enableAsciiFolding": undefined,
4068
- "isLongText": false,
4069
- "supportsEfficientLeadingWildcard": false,
4070
- "supportsExactMatching": true,
4071
- },
4072
- "type": "string",
4073
- },
4074
- "typeClasses": [
4075
- {
4076
- "kind": "render_hint",
4077
- "name": "SELECTABLE",
4078
- },
4079
- {
4080
- "kind": "render_hint",
4081
- "name": "SORTABLE",
4082
- },
4083
- ],
4084
- "valueType": undefined,
4085
- },
4086
- "prop": {
4087
- "apiName": "prop",
4088
- "baseFormatter": undefined,
4089
- "dataConstraints": undefined,
4090
- "displayMetadata": {
4091
- "description": undefined,
4092
- "displayName": "Prop",
4093
- "visibility": "NORMAL",
4094
- },
4095
- "indexedForSearch": true,
4096
- "inlineAction": undefined,
4097
- "ruleSetBinding": undefined,
4098
- "sharedPropertyTypeApiName": undefined,
4099
- "sharedPropertyTypeRid": undefined,
4100
- "status": {
4101
- "active": {},
4102
- "type": "active",
4103
- },
4104
- "type": {
4105
- "array": {
4106
- "reducers": [
4107
- {
4108
- "direction": "DESCENDING_NULLS_LAST",
4109
- "fieldApiName": "field1",
4110
- "structApiName": "prop",
4111
- },
4112
- {
4113
- "direction": "ASCENDING_NULLS_LAST",
4114
- "fieldApiName": "field2",
4115
- "structApiName": "prop",
4116
- },
4117
- ],
4118
- "subtype": {
4119
- "struct": {
4120
- "mainValue": {
4121
- "fieldApiNames": [
4122
- "field1",
4123
- "field2",
4124
- ],
4125
- "structApiName": "prop",
4126
- "type": {
4127
- "struct": {
4128
- "mainValue": undefined,
4129
- "structFields": [
4130
- {
4131
- "aliases": [],
4132
- "apiName": "field1",
4133
- "displayMetadata": {
4134
- "description": undefined,
4135
- "displayName": "field1",
4136
- },
4137
- "fieldType": {
4138
- "string": {
4139
- "analyzerOverride": undefined,
4140
- "enableAsciiFolding": undefined,
4141
- "isLongText": false,
4142
- "supportsEfficientLeadingWildcard": false,
4143
- "supportsExactMatching": true,
4144
- },
4145
- "type": "string",
4146
- },
4147
- "typeClasses": [],
4148
- },
4149
- {
4150
- "aliases": [],
4151
- "apiName": "field2",
4152
- "displayMetadata": {
4153
- "description": undefined,
4154
- "displayName": "field2",
4155
- },
4156
- "fieldType": {
4157
- "string": {
4158
- "analyzerOverride": undefined,
4159
- "enableAsciiFolding": undefined,
4160
- "isLongText": false,
4161
- "supportsEfficientLeadingWildcard": false,
4162
- "supportsExactMatching": true,
4163
- },
4164
- "type": "string",
4165
- },
4166
- "typeClasses": [],
4167
- },
4168
- ],
4169
- },
4170
- "type": "struct",
4171
- },
4172
- },
4173
- "structFields": [
4174
- {
4175
- "aliases": [],
4176
- "apiName": "field1",
4177
- "displayMetadata": {
4178
- "description": undefined,
4179
- "displayName": "field1",
4180
- },
4181
- "fieldType": {
4182
- "string": {
4183
- "analyzerOverride": undefined,
4184
- "enableAsciiFolding": undefined,
4185
- "isLongText": false,
4186
- "supportsEfficientLeadingWildcard": false,
4187
- "supportsExactMatching": true,
4188
- },
4189
- "type": "string",
4190
- },
4191
- "typeClasses": [],
4192
- },
4193
- {
4194
- "aliases": [],
4195
- "apiName": "field2",
4196
- "displayMetadata": {
4197
- "description": undefined,
4198
- "displayName": "field2",
4199
- },
4200
- "fieldType": {
4201
- "string": {
4202
- "analyzerOverride": undefined,
4203
- "enableAsciiFolding": undefined,
4204
- "isLongText": false,
4205
- "supportsEfficientLeadingWildcard": false,
4206
- "supportsExactMatching": true,
4207
- },
4208
- "type": "string",
4209
- },
4210
- "typeClasses": [],
4211
- },
4212
- ],
4213
- },
4214
- "type": "struct",
4215
- },
4216
- },
4217
- "type": "array",
4218
- },
4219
- "typeClasses": [],
4220
- "valueType": undefined,
4221
- },
4222
- "spt": {
4223
- "apiName": "spt",
4224
- "baseFormatter": undefined,
4225
- "dataConstraints": undefined,
4226
- "displayMetadata": {
4227
- "description": undefined,
4228
- "displayName": "Spt",
4229
- "visibility": "NORMAL",
4230
- },
4231
- "indexedForSearch": true,
4232
- "inlineAction": undefined,
4233
- "ruleSetBinding": undefined,
4234
- "sharedPropertyTypeApiName": "com.palantir.spt",
4235
- "sharedPropertyTypeRid": "com.palantir.spt",
4236
- "status": {
4237
- "active": {},
4238
- "type": "active",
4239
- },
4240
- "type": {
4241
- "array": {
4242
- "reducers": [
4243
- {
4244
- "direction": "DESCENDING_NULLS_LAST",
4245
- "fieldApiName": "prop1",
4246
- "structApiName": "com.palantir.spt",
4247
- },
4248
- {
4249
- "direction": "ASCENDING_NULLS_LAST",
4250
- "fieldApiName": "prop2",
4251
- "structApiName": "com.palantir.spt",
4252
- },
4253
- ],
4254
- "subtype": {
4255
- "struct": {
4256
- "mainValue": {
4257
- "fieldApiNames": [
4258
- "prop1",
4259
- ],
4260
- "structApiName": "com.palantir.spt",
4261
- "type": {
4262
- "string": {
4263
- "analyzerOverride": undefined,
4264
- "enableAsciiFolding": undefined,
4265
- "isLongText": false,
4266
- "supportsEfficientLeadingWildcard": false,
4267
- "supportsExactMatching": true,
4268
- },
4269
- "type": "string",
4270
- },
4271
- },
4272
- "structFields": [
4273
- {
4274
- "aliases": [],
4275
- "apiName": "prop1",
4276
- "displayMetadata": {
4277
- "description": undefined,
4278
- "displayName": "prop1",
4279
- },
4280
- "fieldType": {
4281
- "string": {
4282
- "analyzerOverride": undefined,
4283
- "enableAsciiFolding": undefined,
4284
- "isLongText": false,
4285
- "supportsEfficientLeadingWildcard": false,
4286
- "supportsExactMatching": true,
4287
- },
4288
- "type": "string",
4289
- },
4290
- "typeClasses": [],
4291
- },
4292
- {
4293
- "aliases": [],
4294
- "apiName": "prop2",
4295
- "displayMetadata": {
4296
- "description": undefined,
4297
- "displayName": "prop2",
4298
- },
4299
- "fieldType": {
4300
- "string": {
4301
- "analyzerOverride": undefined,
4302
- "enableAsciiFolding": undefined,
4303
- "isLongText": false,
4304
- "supportsEfficientLeadingWildcard": false,
4305
- "supportsExactMatching": true,
4306
- },
4307
- "type": "string",
4308
- },
4309
- "typeClasses": [],
4310
- },
4311
- ],
4312
- },
4313
- "type": "struct",
4314
- },
4315
- },
4316
- "type": "array",
4317
- },
4318
- "typeClasses": [],
4319
- "valueType": undefined,
4320
- },
4321
- },
4322
- "redacted": false,
4323
- "status": {
4324
- "active": {},
4325
- "type": "active",
4326
- },
4327
- "titlePropertyTypeRid": "bar",
4328
- },
4329
- "propertySecurityGroupPackagingVersion": {
4330
- "type": "v2",
4331
- "v2": {},
4332
- },
4333
- },
4334
- },
4335
- "sharedPropertyTypes": {
4336
- "com.palantir.spt": {
4337
- "sharedPropertyType": {
4338
- "aliases": [],
4339
- "apiName": "com.palantir.spt",
4340
- "baseFormatter": undefined,
4341
- "dataConstraints": undefined,
4342
- "displayMetadata": {
4343
- "description": undefined,
4344
- "displayName": "Struct Array SPT",
4345
- "visibility": "NORMAL",
4346
- },
4347
- "gothamMapping": undefined,
4348
- "indexedForSearch": true,
4349
- "type": {
4350
- "array": {
4351
- "reducers": [
4352
- {
4353
- "direction": "DESCENDING_NULLS_LAST",
4354
- "fieldApiName": "prop1",
4355
- "structApiName": "com.palantir.spt",
4356
- },
4357
- {
4358
- "direction": "ASCENDING_NULLS_LAST",
4359
- "fieldApiName": "prop2",
4360
- "structApiName": "com.palantir.spt",
4361
- },
4362
- ],
4363
- "subtype": {
4364
- "struct": {
4365
- "mainValue": {
4366
- "fieldApiNames": [
4367
- "prop1",
4368
- ],
4369
- "structApiName": "com.palantir.spt",
4370
- "type": {
4371
- "string": {
4372
- "analyzerOverride": undefined,
4373
- "enableAsciiFolding": undefined,
4374
- "isLongText": false,
4375
- "supportsEfficientLeadingWildcard": false,
4376
- "supportsExactMatching": true,
4377
- },
4378
- "type": "string",
4379
- },
4380
- },
4381
- "structFields": [
4382
- {
4383
- "aliases": [],
4384
- "apiName": "prop1",
4385
- "displayMetadata": {
4386
- "description": undefined,
4387
- "displayName": "prop1",
4388
- },
4389
- "fieldType": {
4390
- "string": {
4391
- "analyzerOverride": undefined,
4392
- "enableAsciiFolding": undefined,
4393
- "isLongText": false,
4394
- "supportsEfficientLeadingWildcard": false,
4395
- "supportsExactMatching": true,
4396
- },
4397
- "type": "string",
4398
- },
4399
- "typeClasses": [],
4400
- },
4401
- {
4402
- "aliases": [],
4403
- "apiName": "prop2",
4404
- "displayMetadata": {
4405
- "description": undefined,
4406
- "displayName": "prop2",
4407
- },
4408
- "fieldType": {
4409
- "string": {
4410
- "analyzerOverride": undefined,
4411
- "enableAsciiFolding": undefined,
4412
- "isLongText": false,
4413
- "supportsEfficientLeadingWildcard": false,
4414
- "supportsExactMatching": true,
4415
- },
4416
- "type": "string",
4417
- },
4418
- "typeClasses": [],
4419
- },
4420
- ],
4421
- },
4422
- "type": "struct",
4423
- },
4424
- },
4425
- "type": "array",
4426
- },
4427
- "typeClasses": [],
4428
- "valueType": undefined,
4429
- },
4430
- },
4431
- },
4432
- },
4433
- "randomnessKey": undefined,
4434
- "valueTypes": {
4435
- "valueTypes": [],
4436
- },
4437
- }
4438
- `);
4439
- });
4440
- });
4441
- //# sourceMappingURL=objects.test.js.map