@osdk/maker 0.13.0-beta.12 → 0.13.0-beta.14

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 (45) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +49 -13
  3. package/build/browser/api/defineAction.js +30 -30
  4. package/build/browser/api/defineAction.js.map +1 -1
  5. package/build/browser/api/defineLink.js +30 -9
  6. package/build/browser/api/defineLink.js.map +1 -1
  7. package/build/browser/api/defineOntology.js +1 -1
  8. package/build/browser/api/defineOntology.js.map +1 -1
  9. package/build/browser/api/links/LinkType.js.map +1 -1
  10. package/build/browser/api/overall.test.js +1798 -695
  11. package/build/browser/api/overall.test.js.map +1 -1
  12. package/build/browser/cli/main.js +10 -1
  13. package/build/browser/cli/main.js.map +1 -1
  14. package/build/browser/conversion/toMarketplace/convertLink.js +14 -1
  15. package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -1
  16. package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +2 -2
  17. package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -1
  18. package/build/cjs/index.cjs +87 -44
  19. package/build/cjs/index.cjs.map +1 -1
  20. package/build/cjs/index.d.cts +38 -3
  21. package/build/esm/api/defineAction.js +30 -30
  22. package/build/esm/api/defineAction.js.map +1 -1
  23. package/build/esm/api/defineLink.js +30 -9
  24. package/build/esm/api/defineLink.js.map +1 -1
  25. package/build/esm/api/defineOntology.js +1 -1
  26. package/build/esm/api/defineOntology.js.map +1 -1
  27. package/build/esm/api/links/LinkType.js.map +1 -1
  28. package/build/esm/api/overall.test.js +1798 -695
  29. package/build/esm/api/overall.test.js.map +1 -1
  30. package/build/esm/cli/main.js +10 -1
  31. package/build/esm/cli/main.js.map +1 -1
  32. package/build/esm/conversion/toMarketplace/convertLink.js +14 -1
  33. package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -1
  34. package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +2 -2
  35. package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -1
  36. package/build/types/api/defineAction.d.ts +8 -2
  37. package/build/types/api/defineAction.d.ts.map +1 -1
  38. package/build/types/api/defineLink.d.ts.map +1 -1
  39. package/build/types/api/defineOntology.d.ts +1 -1
  40. package/build/types/api/defineOntology.d.ts.map +1 -1
  41. package/build/types/api/links/LinkType.d.ts +29 -0
  42. package/build/types/api/links/LinkType.d.ts.map +1 -1
  43. package/build/types/cli/main.d.ts.map +1 -1
  44. package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts.map +1 -1
  45. package/package.json +6 -5
@@ -1377,11 +1377,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1377
1377
  },
1378
1378
  "type": "datasetV2",
1379
1379
  },
1380
+ "datasourceName": "com.palantir.foo",
1380
1381
  "editsConfiguration": {
1381
1382
  "onlyAllowPrivilegedEdits": false,
1382
1383
  },
1383
1384
  "redacted": false,
1384
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
1385
1385
  },
1386
1386
  ],
1387
1387
  "entityMetadata": {
@@ -1618,7 +1618,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1618
1618
  },
1619
1619
  "interfaceTypes": {},
1620
1620
  "linkTypes": {
1621
- "fizzToFoo": {
1621
+ "fizz-to-foo": {
1622
1622
  "datasources": [],
1623
1623
  "entityMetadata": {
1624
1624
  "arePatchesEnabled": false,
@@ -1693,11 +1693,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1693
1693
  },
1694
1694
  "type": "datasetV2",
1695
1695
  },
1696
+ "datasourceName": "com.palantir.fizz",
1696
1697
  "editsConfiguration": {
1697
1698
  "onlyAllowPrivilegedEdits": false,
1698
1699
  },
1699
1700
  "redacted": false,
1700
- "rid": "ri.ontology.main.datasource.com.palantir.fizz",
1701
1701
  },
1702
1702
  ],
1703
1703
  "entityMetadata": {
@@ -1829,11 +1829,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1829
1829
  },
1830
1830
  "type": "datasetV2",
1831
1831
  },
1832
+ "datasourceName": "com.palantir.foo",
1832
1833
  "editsConfiguration": {
1833
1834
  "onlyAllowPrivilegedEdits": false,
1834
1835
  },
1835
1836
  "redacted": false,
1836
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
1837
1837
  },
1838
1838
  ],
1839
1839
  "entityMetadata": {
@@ -1923,7 +1923,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1923
1923
  },
1924
1924
  "interfaceTypes": {},
1925
1925
  "linkTypes": {
1926
- "fizzToFoo": {
1926
+ "fizz-to-foo": {
1927
1927
  "datasources": [
1928
1928
  {
1929
1929
  "datasource": {
@@ -1951,11 +1951,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
1951
1951
  },
1952
1952
  "type": "dataset",
1953
1953
  },
1954
+ "datasourceName": "fizzToFoo",
1954
1955
  "editsConfiguration": {
1955
1956
  "onlyAllowPrivilegedEdits": false,
1956
1957
  },
1957
1958
  "redacted": undefined,
1958
- "rid": "ri.ontology.main.datasource.link-fizzToFoo",
1959
1959
  },
1960
1960
  ],
1961
1961
  "entityMetadata": {
@@ -2043,11 +2043,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2043
2043
  },
2044
2044
  "type": "datasetV2",
2045
2045
  },
2046
+ "datasourceName": "com.palantir.fizz",
2046
2047
  "editsConfiguration": {
2047
2048
  "onlyAllowPrivilegedEdits": false,
2048
2049
  },
2049
2050
  "redacted": false,
2050
- "rid": "ri.ontology.main.datasource.com.palantir.fizz",
2051
2051
  },
2052
2052
  ],
2053
2053
  "entityMetadata": {
@@ -2179,11 +2179,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2179
2179
  },
2180
2180
  "type": "datasetV2",
2181
2181
  },
2182
+ "datasourceName": "com.palantir.foo",
2182
2183
  "editsConfiguration": {
2183
2184
  "onlyAllowPrivilegedEdits": false,
2184
2185
  },
2185
2186
  "redacted": false,
2186
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
2187
2187
  },
2188
2188
  ],
2189
2189
  "entityMetadata": {
@@ -2263,7 +2263,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2263
2263
  },
2264
2264
  "sharedPropertyTypes": {},
2265
2265
  }
2266
- `);});it("Minimal link definitions are properly defined",()=>{const object=defineObject({titlePropertyApiName:"bar",displayName:"Foo",pluralDisplayName:"Foo",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}}});const otherObject=defineObject({titlePropertyApiName:"fizz",displayName:"Fizz",pluralDisplayName:"Fizz",apiName:"fizz",primaryKeyPropertyApiName:"fizz",properties:{"fizz":{type:"string"},"bar":{type:"string"}}});defineLink({apiName:"fizzToFoo",one:{object:object,metadata:{apiName:"fizzes"}},toMany:{object:otherObject,metadata:{apiName:"foos"}},manyForeignKeyProperty:"bar"});expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
2266
+ `);});it("Intermediary link types are properly defined",()=>{const bar=defineObject({titlePropertyApiName:"bar",displayName:"Bar",pluralDisplayName:"Bar",apiName:"barObject",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}}});const fizz=defineObject({titlePropertyApiName:"fizz",displayName:"Fizz",pluralDisplayName:"Fizz",apiName:"fizzObject",primaryKeyPropertyApiName:"fizz",properties:{"fizz":{type:"string"}}});const intermediaryObject=defineObject({titlePropertyApiName:"buzz",displayName:"Buzz",pluralDisplayName:"Buzz",apiName:"buzzObject",primaryKeyPropertyApiName:"buzz",properties:{"buzz":{type:"string"},"barBuzz":{type:"string"},"fizzBuzz":{type:"string"}}});const barToBuzz=defineLink({apiName:"barToBuzz",manyForeignKeyProperty:"barBuzz",one:{object:bar,metadata:{displayName:"Buzz",pluralDisplayName:"Buzz",apiName:"buzz1"}},toMany:{object:intermediaryObject,metadata:{displayName:"Bar",pluralDisplayName:"Bars",apiName:"bars"}}});const fizzToBuzz=defineLink({apiName:"fizzToBuzz",manyForeignKeyProperty:"fizzBuzz",one:{object:fizz,metadata:{displayName:"Buzz",pluralDisplayName:"Buzz",apiName:"buzz2"}},toMany:{object:intermediaryObject,metadata:{displayName:"Fizz",pluralDisplayName:"Fizzes",apiName:"fizzes"}}});defineLink({apiName:"fizzToBar",many:{object:bar,metadata:{displayName:"Fizz",pluralDisplayName:"Fizzes",apiName:"fizzes1"},linkToIntermediary:barToBuzz},toMany:{object:fizz,metadata:{displayName:"Bar",pluralDisplayName:"Bars",apiName:"bars1"},linkToIntermediary:fizzToBuzz},intermediaryObjectType:intermediaryObject});expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
2267
2267
  {
2268
2268
  "actionTypes": {},
2269
2269
  "blockPermissionInformation": {
@@ -2273,7 +2273,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2273
2273
  },
2274
2274
  "interfaceTypes": {},
2275
2275
  "linkTypes": {
2276
- "fizzToFoo": {
2276
+ "bar-to-buzz": {
2277
2277
  "datasources": [],
2278
2278
  "entityMetadata": {
2279
2279
  "arePatchesEnabled": false,
@@ -2283,43 +2283,141 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2283
2283
  "oneToMany": {
2284
2284
  "cardinalityHint": "ONE_TO_MANY",
2285
2285
  "manyToOneLinkMetadata": {
2286
- "apiName": "foos",
2286
+ "apiName": "bars",
2287
2287
  "displayMetadata": {
2288
- "displayName": "Foos",
2288
+ "displayName": "Bar",
2289
2289
  "groupDisplayName": "",
2290
- "pluralDisplayName": "Foos",
2290
+ "pluralDisplayName": "Bars",
2291
2291
  "visibility": "NORMAL",
2292
2292
  },
2293
2293
  "typeClasses": [],
2294
2294
  },
2295
- "objectTypeRidManySide": "com.palantir.fizz",
2296
- "objectTypeRidOneSide": "com.palantir.foo",
2295
+ "objectTypeRidManySide": "com.palantir.buzzObject",
2296
+ "objectTypeRidOneSide": "com.palantir.barObject",
2297
2297
  "oneSidePrimaryKeyToManySidePropertyMapping": [
2298
2298
  {
2299
2299
  "from": {
2300
2300
  "apiName": "bar",
2301
- "object": "com.palantir.foo",
2301
+ "object": "com.palantir.barObject",
2302
2302
  },
2303
2303
  "to": {
2304
- "apiName": "bar",
2305
- "object": "com.palantir.fizz",
2304
+ "apiName": "barBuzz",
2305
+ "object": "com.palantir.buzzObject",
2306
2306
  },
2307
2307
  },
2308
2308
  ],
2309
2309
  "oneToManyLinkMetadata": {
2310
+ "apiName": "buzz1",
2311
+ "displayMetadata": {
2312
+ "displayName": "Buzz",
2313
+ "groupDisplayName": "",
2314
+ "pluralDisplayName": "Buzz",
2315
+ "visibility": "NORMAL",
2316
+ },
2317
+ "typeClasses": [],
2318
+ },
2319
+ },
2320
+ "type": "oneToMany",
2321
+ },
2322
+ "id": "bar-to-buzz",
2323
+ "redacted": false,
2324
+ "status": {
2325
+ "active": {},
2326
+ "type": "active",
2327
+ },
2328
+ },
2329
+ },
2330
+ "fizz-to-bar": {
2331
+ "datasources": [],
2332
+ "entityMetadata": {
2333
+ "arePatchesEnabled": false,
2334
+ },
2335
+ "linkType": {
2336
+ "definition": {
2337
+ "intermediary": {
2338
+ "aToIntermediaryLinkTypeRid": "bar-to-buzz",
2339
+ "intermediaryObjectTypeRid": "com.palantir.buzzObject",
2340
+ "intermediaryToBLinkTypeRid": "fizz-to-buzz",
2341
+ "objectTypeAToBLinkMetadata": {
2342
+ "apiName": "fizzes1",
2343
+ "displayMetadata": {
2344
+ "displayName": "Fizz",
2345
+ "groupDisplayName": "",
2346
+ "pluralDisplayName": "Fizzes",
2347
+ "visibility": "NORMAL",
2348
+ },
2349
+ "typeClasses": [],
2350
+ },
2351
+ "objectTypeBToALinkMetadata": {
2352
+ "apiName": "bars1",
2353
+ "displayMetadata": {
2354
+ "displayName": "Bar",
2355
+ "groupDisplayName": "",
2356
+ "pluralDisplayName": "Bars",
2357
+ "visibility": "NORMAL",
2358
+ },
2359
+ "typeClasses": [],
2360
+ },
2361
+ "objectTypeRidA": "com.palantir.barObject",
2362
+ "objectTypeRidB": "com.palantir.fizzObject",
2363
+ },
2364
+ "type": "intermediary",
2365
+ },
2366
+ "id": "fizz-to-bar",
2367
+ "redacted": false,
2368
+ "status": {
2369
+ "active": {},
2370
+ "type": "active",
2371
+ },
2372
+ },
2373
+ },
2374
+ "fizz-to-buzz": {
2375
+ "datasources": [],
2376
+ "entityMetadata": {
2377
+ "arePatchesEnabled": false,
2378
+ },
2379
+ "linkType": {
2380
+ "definition": {
2381
+ "oneToMany": {
2382
+ "cardinalityHint": "ONE_TO_MANY",
2383
+ "manyToOneLinkMetadata": {
2310
2384
  "apiName": "fizzes",
2311
2385
  "displayMetadata": {
2312
- "displayName": "Fizzes",
2386
+ "displayName": "Fizz",
2313
2387
  "groupDisplayName": "",
2314
2388
  "pluralDisplayName": "Fizzes",
2315
2389
  "visibility": "NORMAL",
2316
2390
  },
2317
2391
  "typeClasses": [],
2318
2392
  },
2393
+ "objectTypeRidManySide": "com.palantir.buzzObject",
2394
+ "objectTypeRidOneSide": "com.palantir.fizzObject",
2395
+ "oneSidePrimaryKeyToManySidePropertyMapping": [
2396
+ {
2397
+ "from": {
2398
+ "apiName": "fizz",
2399
+ "object": "com.palantir.fizzObject",
2400
+ },
2401
+ "to": {
2402
+ "apiName": "fizzBuzz",
2403
+ "object": "com.palantir.buzzObject",
2404
+ },
2405
+ },
2406
+ ],
2407
+ "oneToManyLinkMetadata": {
2408
+ "apiName": "buzz2",
2409
+ "displayMetadata": {
2410
+ "displayName": "Buzz",
2411
+ "groupDisplayName": "",
2412
+ "pluralDisplayName": "Buzz",
2413
+ "visibility": "NORMAL",
2414
+ },
2415
+ "typeClasses": [],
2416
+ },
2319
2417
  },
2320
2418
  "type": "oneToMany",
2321
2419
  },
2322
- "id": "fizz-to-foo",
2420
+ "id": "fizz-to-buzz",
2323
2421
  "redacted": false,
2324
2422
  "status": {
2325
2423
  "active": {},
@@ -2329,30 +2427,26 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2329
2427
  },
2330
2428
  },
2331
2429
  "objectTypes": {
2332
- "com.palantir.fizz": {
2430
+ "com.palantir.barObject": {
2333
2431
  "datasources": [
2334
2432
  {
2335
2433
  "datasource": {
2336
2434
  "datasetV2": {
2337
- "datasetRid": "com.palantir.fizz",
2435
+ "datasetRid": "com.palantir.barObject",
2338
2436
  "propertyMapping": {
2339
2437
  "bar": {
2340
2438
  "column": "bar",
2341
2439
  "type": "column",
2342
2440
  },
2343
- "fizz": {
2344
- "column": "fizz",
2345
- "type": "column",
2346
- },
2347
2441
  },
2348
2442
  },
2349
2443
  "type": "datasetV2",
2350
2444
  },
2445
+ "datasourceName": "com.palantir.barObject",
2351
2446
  "editsConfiguration": {
2352
2447
  "onlyAllowPrivilegedEdits": false,
2353
2448
  },
2354
2449
  "redacted": false,
2355
- "rid": "ri.ontology.main.datasource.com.palantir.fizz",
2356
2450
  },
2357
2451
  ],
2358
2452
  "entityMetadata": {
@@ -2360,10 +2454,10 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2360
2454
  },
2361
2455
  "objectType": {
2362
2456
  "allImplementsInterfaces": {},
2363
- "apiName": "com.palantir.fizz",
2457
+ "apiName": "com.palantir.barObject",
2364
2458
  "displayMetadata": {
2365
2459
  "description": undefined,
2366
- "displayName": "Fizz",
2460
+ "displayName": "Bar",
2367
2461
  "groupDisplayName": undefined,
2368
2462
  "icon": {
2369
2463
  "blueprint": {
@@ -2372,12 +2466,12 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2372
2466
  },
2373
2467
  "type": "blueprint",
2374
2468
  },
2375
- "pluralDisplayName": "Fizz",
2469
+ "pluralDisplayName": "Bar",
2376
2470
  "visibility": "NORMAL",
2377
2471
  },
2378
2472
  "implementsInterfaces2": [],
2379
2473
  "primaryKeys": [
2380
- "fizz",
2474
+ "bar",
2381
2475
  ],
2382
2476
  "propertyTypes": {
2383
2477
  "bar": {
@@ -2420,13 +2514,157 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2420
2514
  ],
2421
2515
  "valueType": undefined,
2422
2516
  },
2423
- "fizz": {
2424
- "apiName": "fizz",
2517
+ },
2518
+ "redacted": false,
2519
+ "status": {
2520
+ "active": {},
2521
+ "type": "active",
2522
+ },
2523
+ "titlePropertyTypeRid": "bar",
2524
+ },
2525
+ },
2526
+ "com.palantir.buzzObject": {
2527
+ "datasources": [
2528
+ {
2529
+ "datasource": {
2530
+ "datasetV2": {
2531
+ "datasetRid": "com.palantir.buzzObject",
2532
+ "propertyMapping": {
2533
+ "barBuzz": {
2534
+ "column": "barBuzz",
2535
+ "type": "column",
2536
+ },
2537
+ "buzz": {
2538
+ "column": "buzz",
2539
+ "type": "column",
2540
+ },
2541
+ "fizzBuzz": {
2542
+ "column": "fizzBuzz",
2543
+ "type": "column",
2544
+ },
2545
+ },
2546
+ },
2547
+ "type": "datasetV2",
2548
+ },
2549
+ "datasourceName": "com.palantir.buzzObject",
2550
+ "editsConfiguration": {
2551
+ "onlyAllowPrivilegedEdits": false,
2552
+ },
2553
+ "redacted": false,
2554
+ },
2555
+ ],
2556
+ "entityMetadata": {
2557
+ "arePatchesEnabled": false,
2558
+ },
2559
+ "objectType": {
2560
+ "allImplementsInterfaces": {},
2561
+ "apiName": "com.palantir.buzzObject",
2562
+ "displayMetadata": {
2563
+ "description": undefined,
2564
+ "displayName": "Buzz",
2565
+ "groupDisplayName": undefined,
2566
+ "icon": {
2567
+ "blueprint": {
2568
+ "color": "#2D72D2",
2569
+ "locator": "cube",
2570
+ },
2571
+ "type": "blueprint",
2572
+ },
2573
+ "pluralDisplayName": "Buzz",
2574
+ "visibility": "NORMAL",
2575
+ },
2576
+ "implementsInterfaces2": [],
2577
+ "primaryKeys": [
2578
+ "buzz",
2579
+ ],
2580
+ "propertyTypes": {
2581
+ "barBuzz": {
2582
+ "apiName": "barBuzz",
2425
2583
  "baseFormatter": undefined,
2426
2584
  "dataConstraints": undefined,
2427
2585
  "displayMetadata": {
2428
2586
  "description": undefined,
2429
- "displayName": "Fizz",
2587
+ "displayName": "BarBuzz",
2588
+ "visibility": "NORMAL",
2589
+ },
2590
+ "indexedForSearch": true,
2591
+ "inlineAction": undefined,
2592
+ "ruleSetBinding": undefined,
2593
+ "sharedPropertyTypeApiName": undefined,
2594
+ "sharedPropertyTypeRid": undefined,
2595
+ "status": {
2596
+ "active": {},
2597
+ "type": "active",
2598
+ },
2599
+ "type": {
2600
+ "string": {
2601
+ "analyzerOverride": undefined,
2602
+ "enableAsciiFolding": undefined,
2603
+ "isLongText": false,
2604
+ "supportsEfficientLeadingWildcard": false,
2605
+ "supportsExactMatching": true,
2606
+ },
2607
+ "type": "string",
2608
+ },
2609
+ "typeClasses": [
2610
+ {
2611
+ "kind": "render_hint",
2612
+ "name": "SELECTABLE",
2613
+ },
2614
+ {
2615
+ "kind": "render_hint",
2616
+ "name": "SORTABLE",
2617
+ },
2618
+ ],
2619
+ "valueType": undefined,
2620
+ },
2621
+ "buzz": {
2622
+ "apiName": "buzz",
2623
+ "baseFormatter": undefined,
2624
+ "dataConstraints": undefined,
2625
+ "displayMetadata": {
2626
+ "description": undefined,
2627
+ "displayName": "Buzz",
2628
+ "visibility": "NORMAL",
2629
+ },
2630
+ "indexedForSearch": true,
2631
+ "inlineAction": undefined,
2632
+ "ruleSetBinding": undefined,
2633
+ "sharedPropertyTypeApiName": undefined,
2634
+ "sharedPropertyTypeRid": undefined,
2635
+ "status": {
2636
+ "active": {},
2637
+ "type": "active",
2638
+ },
2639
+ "type": {
2640
+ "string": {
2641
+ "analyzerOverride": undefined,
2642
+ "enableAsciiFolding": undefined,
2643
+ "isLongText": false,
2644
+ "supportsEfficientLeadingWildcard": false,
2645
+ "supportsExactMatching": true,
2646
+ },
2647
+ "type": "string",
2648
+ },
2649
+ "typeClasses": [
2650
+ {
2651
+ "kind": "render_hint",
2652
+ "name": "SELECTABLE",
2653
+ },
2654
+ {
2655
+ "kind": "render_hint",
2656
+ "name": "SORTABLE",
2657
+ },
2658
+ ],
2659
+ "valueType": undefined,
2660
+ },
2661
+ "fizzBuzz": {
2662
+ "apiName": "fizzBuzz",
2663
+ "baseFormatter": undefined,
2664
+ "dataConstraints": undefined,
2665
+ "displayMetadata": {
2666
+ "description": undefined,
2667
+ "displayName": "FizzBuzz",
2430
2668
  "visibility": "NORMAL",
2431
2669
  },
2432
2670
  "indexedForSearch": true,
@@ -2466,29 +2704,29 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2466
2704
  "active": {},
2467
2705
  "type": "active",
2468
2706
  },
2469
- "titlePropertyTypeRid": "fizz",
2707
+ "titlePropertyTypeRid": "buzz",
2470
2708
  },
2471
2709
  },
2472
- "com.palantir.foo": {
2710
+ "com.palantir.fizzObject": {
2473
2711
  "datasources": [
2474
2712
  {
2475
2713
  "datasource": {
2476
2714
  "datasetV2": {
2477
- "datasetRid": "com.palantir.foo",
2715
+ "datasetRid": "com.palantir.fizzObject",
2478
2716
  "propertyMapping": {
2479
- "bar": {
2480
- "column": "bar",
2717
+ "fizz": {
2718
+ "column": "fizz",
2481
2719
  "type": "column",
2482
2720
  },
2483
2721
  },
2484
2722
  },
2485
2723
  "type": "datasetV2",
2486
2724
  },
2725
+ "datasourceName": "com.palantir.fizzObject",
2487
2726
  "editsConfiguration": {
2488
2727
  "onlyAllowPrivilegedEdits": false,
2489
2728
  },
2490
2729
  "redacted": false,
2491
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
2492
2730
  },
2493
2731
  ],
2494
2732
  "entityMetadata": {
@@ -2496,10 +2734,10 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2496
2734
  },
2497
2735
  "objectType": {
2498
2736
  "allImplementsInterfaces": {},
2499
- "apiName": "com.palantir.foo",
2737
+ "apiName": "com.palantir.fizzObject",
2500
2738
  "displayMetadata": {
2501
2739
  "description": undefined,
2502
- "displayName": "Foo",
2740
+ "displayName": "Fizz",
2503
2741
  "groupDisplayName": undefined,
2504
2742
  "icon": {
2505
2743
  "blueprint": {
@@ -2508,21 +2746,21 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2508
2746
  },
2509
2747
  "type": "blueprint",
2510
2748
  },
2511
- "pluralDisplayName": "Foo",
2749
+ "pluralDisplayName": "Fizz",
2512
2750
  "visibility": "NORMAL",
2513
2751
  },
2514
2752
  "implementsInterfaces2": [],
2515
2753
  "primaryKeys": [
2516
- "bar",
2754
+ "fizz",
2517
2755
  ],
2518
2756
  "propertyTypes": {
2519
- "bar": {
2520
- "apiName": "bar",
2757
+ "fizz": {
2758
+ "apiName": "fizz",
2521
2759
  "baseFormatter": undefined,
2522
2760
  "dataConstraints": undefined,
2523
2761
  "displayMetadata": {
2524
2762
  "description": undefined,
2525
- "displayName": "Bar",
2763
+ "displayName": "Fizz",
2526
2764
  "visibility": "NORMAL",
2527
2765
  },
2528
2766
  "indexedForSearch": true,
@@ -2562,13 +2800,13 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2562
2800
  "active": {},
2563
2801
  "type": "active",
2564
2802
  },
2565
- "titlePropertyTypeRid": "bar",
2803
+ "titlePropertyTypeRid": "fizz",
2566
2804
  },
2567
2805
  },
2568
2806
  },
2569
2807
  "sharedPropertyTypes": {},
2570
2808
  }
2571
- `);});it("Explicit datasource definitions are properly defined",()=>{defineObject({titlePropertyApiName:"bar",displayName:"datasetBackedObject",pluralDisplayName:"datasetBackedObject",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}},datasource:{type:"dataset"}});defineObject({titlePropertyApiName:"fizz",displayName:"streamBackedObjectNoRetention",pluralDisplayName:"streamBackedObjectNoRetention",apiName:"fizz",primaryKeyPropertyApiName:"fizz",properties:{"fizz":{type:"string"},"bar":{type:"string"}},datasource:{type:"stream"}});defineObject({titlePropertyApiName:"buzz",displayName:"streamBackedObjectWithRetention",pluralDisplayName:"streamBackedObjectWithRetention",apiName:"buzz",primaryKeyPropertyApiName:"buzz",properties:{"buzz":{type:"string"}},datasource:{type:"stream",retentionPeriod:"PT1H"}});expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
2809
+ `);});it("Minimal link definitions are properly defined",()=>{const object=defineObject({titlePropertyApiName:"bar",displayName:"Foo",pluralDisplayName:"Foo",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}}});const otherObject=defineObject({titlePropertyApiName:"fizz",displayName:"Fizz",pluralDisplayName:"Fizz",apiName:"fizz",primaryKeyPropertyApiName:"fizz",properties:{"fizz":{type:"string"},"bar":{type:"string"}}});defineLink({apiName:"fizzToFoo",one:{object:object,metadata:{apiName:"fizzes"}},toMany:{object:otherObject,metadata:{apiName:"foos"}},manyForeignKeyProperty:"bar"});expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
2572
2810
  {
2573
2811
  "actionTypes": {},
2574
2812
  "blockPermissionInformation": {
@@ -2577,131 +2815,87 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2577
2815
  "objectTypes": {},
2578
2816
  },
2579
2817
  "interfaceTypes": {},
2580
- "linkTypes": {},
2581
- "objectTypes": {
2582
- "com.palantir.buzz": {
2583
- "datasources": [
2584
- {
2585
- "datasource": {
2586
- "streamV2": {
2587
- "propertyMapping": {
2588
- "buzz": "buzz",
2589
- },
2590
- "propertySecurityGroups": undefined,
2591
- "retentionPolicy": {
2592
- "time": {
2593
- "window": "PT1H",
2594
- },
2595
- "type": "time",
2596
- },
2597
- "streamLocator": "com.palantir.buzz",
2598
- },
2599
- "type": "streamV2",
2600
- },
2601
- "editsConfiguration": {
2602
- "onlyAllowPrivilegedEdits": false,
2603
- },
2604
- "redacted": false,
2605
- "rid": "ri.ontology.main.datasource.com.palantir.buzz",
2606
- },
2607
- ],
2818
+ "linkTypes": {
2819
+ "fizz-to-foo": {
2820
+ "datasources": [],
2608
2821
  "entityMetadata": {
2609
2822
  "arePatchesEnabled": false,
2610
2823
  },
2611
- "objectType": {
2612
- "allImplementsInterfaces": {},
2613
- "apiName": "com.palantir.buzz",
2614
- "displayMetadata": {
2615
- "description": undefined,
2616
- "displayName": "streamBackedObjectWithRetention",
2617
- "groupDisplayName": undefined,
2618
- "icon": {
2619
- "blueprint": {
2620
- "color": "#2D72D2",
2621
- "locator": "cube",
2622
- },
2623
- "type": "blueprint",
2624
- },
2625
- "pluralDisplayName": "streamBackedObjectWithRetention",
2626
- "visibility": "NORMAL",
2627
- },
2628
- "implementsInterfaces2": [],
2629
- "primaryKeys": [
2630
- "buzz",
2631
- ],
2632
- "propertyTypes": {
2633
- "buzz": {
2634
- "apiName": "buzz",
2635
- "baseFormatter": undefined,
2636
- "dataConstraints": undefined,
2637
- "displayMetadata": {
2638
- "description": undefined,
2639
- "displayName": "Buzz",
2640
- "visibility": "NORMAL",
2641
- },
2642
- "indexedForSearch": true,
2643
- "inlineAction": undefined,
2644
- "ruleSetBinding": undefined,
2645
- "sharedPropertyTypeApiName": undefined,
2646
- "sharedPropertyTypeRid": undefined,
2647
- "status": {
2648
- "active": {},
2649
- "type": "active",
2650
- },
2651
- "type": {
2652
- "string": {
2653
- "analyzerOverride": undefined,
2654
- "enableAsciiFolding": undefined,
2655
- "isLongText": false,
2656
- "supportsEfficientLeadingWildcard": false,
2657
- "supportsExactMatching": true,
2824
+ "linkType": {
2825
+ "definition": {
2826
+ "oneToMany": {
2827
+ "cardinalityHint": "ONE_TO_MANY",
2828
+ "manyToOneLinkMetadata": {
2829
+ "apiName": "foos",
2830
+ "displayMetadata": {
2831
+ "displayName": "Foos",
2832
+ "groupDisplayName": "",
2833
+ "pluralDisplayName": "Foos",
2834
+ "visibility": "NORMAL",
2658
2835
  },
2659
- "type": "string",
2836
+ "typeClasses": [],
2660
2837
  },
2661
- "typeClasses": [
2662
- {
2663
- "kind": "render_hint",
2664
- "name": "SELECTABLE",
2665
- },
2838
+ "objectTypeRidManySide": "com.palantir.fizz",
2839
+ "objectTypeRidOneSide": "com.palantir.foo",
2840
+ "oneSidePrimaryKeyToManySidePropertyMapping": [
2666
2841
  {
2667
- "kind": "render_hint",
2668
- "name": "SORTABLE",
2842
+ "from": {
2843
+ "apiName": "bar",
2844
+ "object": "com.palantir.foo",
2845
+ },
2846
+ "to": {
2847
+ "apiName": "bar",
2848
+ "object": "com.palantir.fizz",
2849
+ },
2669
2850
  },
2670
2851
  ],
2671
- "valueType": undefined,
2852
+ "oneToManyLinkMetadata": {
2853
+ "apiName": "fizzes",
2854
+ "displayMetadata": {
2855
+ "displayName": "Fizzes",
2856
+ "groupDisplayName": "",
2857
+ "pluralDisplayName": "Fizzes",
2858
+ "visibility": "NORMAL",
2859
+ },
2860
+ "typeClasses": [],
2861
+ },
2672
2862
  },
2863
+ "type": "oneToMany",
2673
2864
  },
2865
+ "id": "fizz-to-foo",
2674
2866
  "redacted": false,
2675
2867
  "status": {
2676
2868
  "active": {},
2677
2869
  "type": "active",
2678
2870
  },
2679
- "titlePropertyTypeRid": "buzz",
2680
2871
  },
2681
2872
  },
2873
+ },
2874
+ "objectTypes": {
2682
2875
  "com.palantir.fizz": {
2683
2876
  "datasources": [
2684
2877
  {
2685
2878
  "datasource": {
2686
- "streamV2": {
2879
+ "datasetV2": {
2880
+ "datasetRid": "com.palantir.fizz",
2687
2881
  "propertyMapping": {
2688
- "bar": "bar",
2689
- "fizz": "fizz",
2690
- },
2691
- "propertySecurityGroups": undefined,
2692
- "retentionPolicy": {
2693
- "none": {},
2694
- "type": "none",
2882
+ "bar": {
2883
+ "column": "bar",
2884
+ "type": "column",
2885
+ },
2886
+ "fizz": {
2887
+ "column": "fizz",
2888
+ "type": "column",
2889
+ },
2695
2890
  },
2696
- "streamLocator": "com.palantir.fizz",
2697
2891
  },
2698
- "type": "streamV2",
2892
+ "type": "datasetV2",
2699
2893
  },
2894
+ "datasourceName": "com.palantir.fizz",
2700
2895
  "editsConfiguration": {
2701
2896
  "onlyAllowPrivilegedEdits": false,
2702
2897
  },
2703
2898
  "redacted": false,
2704
- "rid": "ri.ontology.main.datasource.com.palantir.fizz",
2705
2899
  },
2706
2900
  ],
2707
2901
  "entityMetadata": {
@@ -2712,7 +2906,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2712
2906
  "apiName": "com.palantir.fizz",
2713
2907
  "displayMetadata": {
2714
2908
  "description": undefined,
2715
- "displayName": "streamBackedObjectNoRetention",
2909
+ "displayName": "Fizz",
2716
2910
  "groupDisplayName": undefined,
2717
2911
  "icon": {
2718
2912
  "blueprint": {
@@ -2721,7 +2915,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2721
2915
  },
2722
2916
  "type": "blueprint",
2723
2917
  },
2724
- "pluralDisplayName": "streamBackedObjectNoRetention",
2918
+ "pluralDisplayName": "Fizz",
2725
2919
  "visibility": "NORMAL",
2726
2920
  },
2727
2921
  "implementsInterfaces2": [],
@@ -2833,11 +3027,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2833
3027
  },
2834
3028
  "type": "datasetV2",
2835
3029
  },
3030
+ "datasourceName": "com.palantir.foo",
2836
3031
  "editsConfiguration": {
2837
3032
  "onlyAllowPrivilegedEdits": false,
2838
3033
  },
2839
3034
  "redacted": false,
2840
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
2841
3035
  },
2842
3036
  ],
2843
3037
  "entityMetadata": {
@@ -2848,7 +3042,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2848
3042
  "apiName": "com.palantir.foo",
2849
3043
  "displayMetadata": {
2850
3044
  "description": undefined,
2851
- "displayName": "datasetBackedObject",
3045
+ "displayName": "Foo",
2852
3046
  "groupDisplayName": undefined,
2853
3047
  "icon": {
2854
3048
  "blueprint": {
@@ -2857,7 +3051,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2857
3051
  },
2858
3052
  "type": "blueprint",
2859
3053
  },
2860
- "pluralDisplayName": "datasetBackedObject",
3054
+ "pluralDisplayName": "Foo",
2861
3055
  "visibility": "NORMAL",
2862
3056
  },
2863
3057
  "implementsInterfaces2": [],
@@ -2917,82 +3111,431 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
2917
3111
  },
2918
3112
  "sharedPropertyTypes": {},
2919
3113
  }
2920
- `);});it("Restricted view datasources are properly defined",()=>{defineObject({titlePropertyApiName:"bar",displayName:"Foo",pluralDisplayName:"Foo",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}},datasource:{type:"restrictedView"}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
3114
+ `);});it("Explicit datasource definitions are properly defined",()=>{defineObject({titlePropertyApiName:"bar",displayName:"datasetBackedObject",pluralDisplayName:"datasetBackedObject",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}},datasource:{type:"dataset"}});defineObject({titlePropertyApiName:"fizz",displayName:"streamBackedObjectNoRetention",pluralDisplayName:"streamBackedObjectNoRetention",apiName:"fizz",primaryKeyPropertyApiName:"fizz",properties:{"fizz":{type:"string"},"bar":{type:"string"}},datasource:{type:"stream"}});defineObject({titlePropertyApiName:"buzz",displayName:"streamBackedObjectWithRetention",pluralDisplayName:"streamBackedObjectWithRetention",apiName:"buzz",primaryKeyPropertyApiName:"buzz",properties:{"buzz":{type:"string"}},datasource:{type:"stream",retentionPeriod:"PT1H"}});expect(dumpOntologyFullMetadata().ontology).toMatchInlineSnapshot(`
2921
3115
  {
2922
- "importedOntology": {
3116
+ "actionTypes": {},
3117
+ "blockPermissionInformation": {
2923
3118
  "actionTypes": {},
2924
- "blockPermissionInformation": {
2925
- "actionTypes": {},
2926
- "linkTypes": {},
2927
- "objectTypes": {},
2928
- },
2929
- "interfaceTypes": {},
2930
3119
  "linkTypes": {},
2931
3120
  "objectTypes": {},
2932
- "sharedPropertyTypes": {},
2933
3121
  },
2934
- "importedValueTypes": {
2935
- "valueTypes": [],
2936
- },
2937
- "ontology": {
2938
- "actionTypes": {},
2939
- "blockPermissionInformation": {
2940
- "actionTypes": {},
2941
- "linkTypes": {},
2942
- "objectTypes": {},
2943
- },
2944
- "interfaceTypes": {},
2945
- "linkTypes": {},
2946
- "objectTypes": {
2947
- "com.palantir.foo": {
2948
- "datasources": [
2949
- {
2950
- "datasource": {
2951
- "restrictedViewV2": {
2952
- "propertyMapping": {
2953
- "bar": {
2954
- "column": "bar",
2955
- "type": "column",
2956
- },
3122
+ "interfaceTypes": {},
3123
+ "linkTypes": {},
3124
+ "objectTypes": {
3125
+ "com.palantir.buzz": {
3126
+ "datasources": [
3127
+ {
3128
+ "datasource": {
3129
+ "streamV2": {
3130
+ "propertyMapping": {
3131
+ "buzz": "buzz",
3132
+ },
3133
+ "propertySecurityGroups": undefined,
3134
+ "retentionPolicy": {
3135
+ "time": {
3136
+ "window": "PT1H",
2957
3137
  },
2958
- "restrictedViewRid": "com.palantir.foo",
3138
+ "type": "time",
2959
3139
  },
2960
- "type": "restrictedViewV2",
2961
- },
2962
- "editsConfiguration": {
2963
- "onlyAllowPrivilegedEdits": false,
3140
+ "streamLocator": "com.palantir.buzz",
2964
3141
  },
2965
- "redacted": false,
2966
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
3142
+ "type": "streamV2",
2967
3143
  },
2968
- ],
2969
- "entityMetadata": {
2970
- "arePatchesEnabled": false,
3144
+ "datasourceName": "com.palantir.buzz",
3145
+ "editsConfiguration": {
3146
+ "onlyAllowPrivilegedEdits": false,
3147
+ },
3148
+ "redacted": false,
2971
3149
  },
2972
- "objectType": {
2973
- "allImplementsInterfaces": {},
2974
- "apiName": "com.palantir.foo",
2975
- "displayMetadata": {
2976
- "description": undefined,
2977
- "displayName": "Foo",
2978
- "groupDisplayName": undefined,
2979
- "icon": {
2980
- "blueprint": {
2981
- "color": "#2D72D2",
2982
- "locator": "cube",
2983
- },
2984
- "type": "blueprint",
3150
+ ],
3151
+ "entityMetadata": {
3152
+ "arePatchesEnabled": false,
3153
+ },
3154
+ "objectType": {
3155
+ "allImplementsInterfaces": {},
3156
+ "apiName": "com.palantir.buzz",
3157
+ "displayMetadata": {
3158
+ "description": undefined,
3159
+ "displayName": "streamBackedObjectWithRetention",
3160
+ "groupDisplayName": undefined,
3161
+ "icon": {
3162
+ "blueprint": {
3163
+ "color": "#2D72D2",
3164
+ "locator": "cube",
2985
3165
  },
2986
- "pluralDisplayName": "Foo",
2987
- "visibility": "NORMAL",
3166
+ "type": "blueprint",
2988
3167
  },
2989
- "implementsInterfaces2": [],
2990
- "primaryKeys": [
2991
- "bar",
2992
- ],
2993
- "propertyTypes": {
2994
- "bar": {
2995
- "apiName": "bar",
3168
+ "pluralDisplayName": "streamBackedObjectWithRetention",
3169
+ "visibility": "NORMAL",
3170
+ },
3171
+ "implementsInterfaces2": [],
3172
+ "primaryKeys": [
3173
+ "buzz",
3174
+ ],
3175
+ "propertyTypes": {
3176
+ "buzz": {
3177
+ "apiName": "buzz",
3178
+ "baseFormatter": undefined,
3179
+ "dataConstraints": undefined,
3180
+ "displayMetadata": {
3181
+ "description": undefined,
3182
+ "displayName": "Buzz",
3183
+ "visibility": "NORMAL",
3184
+ },
3185
+ "indexedForSearch": true,
3186
+ "inlineAction": undefined,
3187
+ "ruleSetBinding": undefined,
3188
+ "sharedPropertyTypeApiName": undefined,
3189
+ "sharedPropertyTypeRid": undefined,
3190
+ "status": {
3191
+ "active": {},
3192
+ "type": "active",
3193
+ },
3194
+ "type": {
3195
+ "string": {
3196
+ "analyzerOverride": undefined,
3197
+ "enableAsciiFolding": undefined,
3198
+ "isLongText": false,
3199
+ "supportsEfficientLeadingWildcard": false,
3200
+ "supportsExactMatching": true,
3201
+ },
3202
+ "type": "string",
3203
+ },
3204
+ "typeClasses": [
3205
+ {
3206
+ "kind": "render_hint",
3207
+ "name": "SELECTABLE",
3208
+ },
3209
+ {
3210
+ "kind": "render_hint",
3211
+ "name": "SORTABLE",
3212
+ },
3213
+ ],
3214
+ "valueType": undefined,
3215
+ },
3216
+ },
3217
+ "redacted": false,
3218
+ "status": {
3219
+ "active": {},
3220
+ "type": "active",
3221
+ },
3222
+ "titlePropertyTypeRid": "buzz",
3223
+ },
3224
+ },
3225
+ "com.palantir.fizz": {
3226
+ "datasources": [
3227
+ {
3228
+ "datasource": {
3229
+ "streamV2": {
3230
+ "propertyMapping": {
3231
+ "bar": "bar",
3232
+ "fizz": "fizz",
3233
+ },
3234
+ "propertySecurityGroups": undefined,
3235
+ "retentionPolicy": {
3236
+ "none": {},
3237
+ "type": "none",
3238
+ },
3239
+ "streamLocator": "com.palantir.fizz",
3240
+ },
3241
+ "type": "streamV2",
3242
+ },
3243
+ "datasourceName": "com.palantir.fizz",
3244
+ "editsConfiguration": {
3245
+ "onlyAllowPrivilegedEdits": false,
3246
+ },
3247
+ "redacted": false,
3248
+ },
3249
+ ],
3250
+ "entityMetadata": {
3251
+ "arePatchesEnabled": false,
3252
+ },
3253
+ "objectType": {
3254
+ "allImplementsInterfaces": {},
3255
+ "apiName": "com.palantir.fizz",
3256
+ "displayMetadata": {
3257
+ "description": undefined,
3258
+ "displayName": "streamBackedObjectNoRetention",
3259
+ "groupDisplayName": undefined,
3260
+ "icon": {
3261
+ "blueprint": {
3262
+ "color": "#2D72D2",
3263
+ "locator": "cube",
3264
+ },
3265
+ "type": "blueprint",
3266
+ },
3267
+ "pluralDisplayName": "streamBackedObjectNoRetention",
3268
+ "visibility": "NORMAL",
3269
+ },
3270
+ "implementsInterfaces2": [],
3271
+ "primaryKeys": [
3272
+ "fizz",
3273
+ ],
3274
+ "propertyTypes": {
3275
+ "bar": {
3276
+ "apiName": "bar",
3277
+ "baseFormatter": undefined,
3278
+ "dataConstraints": undefined,
3279
+ "displayMetadata": {
3280
+ "description": undefined,
3281
+ "displayName": "Bar",
3282
+ "visibility": "NORMAL",
3283
+ },
3284
+ "indexedForSearch": true,
3285
+ "inlineAction": undefined,
3286
+ "ruleSetBinding": undefined,
3287
+ "sharedPropertyTypeApiName": undefined,
3288
+ "sharedPropertyTypeRid": undefined,
3289
+ "status": {
3290
+ "active": {},
3291
+ "type": "active",
3292
+ },
3293
+ "type": {
3294
+ "string": {
3295
+ "analyzerOverride": undefined,
3296
+ "enableAsciiFolding": undefined,
3297
+ "isLongText": false,
3298
+ "supportsEfficientLeadingWildcard": false,
3299
+ "supportsExactMatching": true,
3300
+ },
3301
+ "type": "string",
3302
+ },
3303
+ "typeClasses": [
3304
+ {
3305
+ "kind": "render_hint",
3306
+ "name": "SELECTABLE",
3307
+ },
3308
+ {
3309
+ "kind": "render_hint",
3310
+ "name": "SORTABLE",
3311
+ },
3312
+ ],
3313
+ "valueType": undefined,
3314
+ },
3315
+ "fizz": {
3316
+ "apiName": "fizz",
3317
+ "baseFormatter": undefined,
3318
+ "dataConstraints": undefined,
3319
+ "displayMetadata": {
3320
+ "description": undefined,
3321
+ "displayName": "Fizz",
3322
+ "visibility": "NORMAL",
3323
+ },
3324
+ "indexedForSearch": true,
3325
+ "inlineAction": undefined,
3326
+ "ruleSetBinding": undefined,
3327
+ "sharedPropertyTypeApiName": undefined,
3328
+ "sharedPropertyTypeRid": undefined,
3329
+ "status": {
3330
+ "active": {},
3331
+ "type": "active",
3332
+ },
3333
+ "type": {
3334
+ "string": {
3335
+ "analyzerOverride": undefined,
3336
+ "enableAsciiFolding": undefined,
3337
+ "isLongText": false,
3338
+ "supportsEfficientLeadingWildcard": false,
3339
+ "supportsExactMatching": true,
3340
+ },
3341
+ "type": "string",
3342
+ },
3343
+ "typeClasses": [
3344
+ {
3345
+ "kind": "render_hint",
3346
+ "name": "SELECTABLE",
3347
+ },
3348
+ {
3349
+ "kind": "render_hint",
3350
+ "name": "SORTABLE",
3351
+ },
3352
+ ],
3353
+ "valueType": undefined,
3354
+ },
3355
+ },
3356
+ "redacted": false,
3357
+ "status": {
3358
+ "active": {},
3359
+ "type": "active",
3360
+ },
3361
+ "titlePropertyTypeRid": "fizz",
3362
+ },
3363
+ },
3364
+ "com.palantir.foo": {
3365
+ "datasources": [
3366
+ {
3367
+ "datasource": {
3368
+ "datasetV2": {
3369
+ "datasetRid": "com.palantir.foo",
3370
+ "propertyMapping": {
3371
+ "bar": {
3372
+ "column": "bar",
3373
+ "type": "column",
3374
+ },
3375
+ },
3376
+ },
3377
+ "type": "datasetV2",
3378
+ },
3379
+ "datasourceName": "com.palantir.foo",
3380
+ "editsConfiguration": {
3381
+ "onlyAllowPrivilegedEdits": false,
3382
+ },
3383
+ "redacted": false,
3384
+ },
3385
+ ],
3386
+ "entityMetadata": {
3387
+ "arePatchesEnabled": false,
3388
+ },
3389
+ "objectType": {
3390
+ "allImplementsInterfaces": {},
3391
+ "apiName": "com.palantir.foo",
3392
+ "displayMetadata": {
3393
+ "description": undefined,
3394
+ "displayName": "datasetBackedObject",
3395
+ "groupDisplayName": undefined,
3396
+ "icon": {
3397
+ "blueprint": {
3398
+ "color": "#2D72D2",
3399
+ "locator": "cube",
3400
+ },
3401
+ "type": "blueprint",
3402
+ },
3403
+ "pluralDisplayName": "datasetBackedObject",
3404
+ "visibility": "NORMAL",
3405
+ },
3406
+ "implementsInterfaces2": [],
3407
+ "primaryKeys": [
3408
+ "bar",
3409
+ ],
3410
+ "propertyTypes": {
3411
+ "bar": {
3412
+ "apiName": "bar",
3413
+ "baseFormatter": undefined,
3414
+ "dataConstraints": undefined,
3415
+ "displayMetadata": {
3416
+ "description": undefined,
3417
+ "displayName": "Bar",
3418
+ "visibility": "NORMAL",
3419
+ },
3420
+ "indexedForSearch": true,
3421
+ "inlineAction": undefined,
3422
+ "ruleSetBinding": undefined,
3423
+ "sharedPropertyTypeApiName": undefined,
3424
+ "sharedPropertyTypeRid": undefined,
3425
+ "status": {
3426
+ "active": {},
3427
+ "type": "active",
3428
+ },
3429
+ "type": {
3430
+ "string": {
3431
+ "analyzerOverride": undefined,
3432
+ "enableAsciiFolding": undefined,
3433
+ "isLongText": false,
3434
+ "supportsEfficientLeadingWildcard": false,
3435
+ "supportsExactMatching": true,
3436
+ },
3437
+ "type": "string",
3438
+ },
3439
+ "typeClasses": [
3440
+ {
3441
+ "kind": "render_hint",
3442
+ "name": "SELECTABLE",
3443
+ },
3444
+ {
3445
+ "kind": "render_hint",
3446
+ "name": "SORTABLE",
3447
+ },
3448
+ ],
3449
+ "valueType": undefined,
3450
+ },
3451
+ },
3452
+ "redacted": false,
3453
+ "status": {
3454
+ "active": {},
3455
+ "type": "active",
3456
+ },
3457
+ "titlePropertyTypeRid": "bar",
3458
+ },
3459
+ },
3460
+ },
3461
+ "sharedPropertyTypes": {},
3462
+ }
3463
+ `);});it("Restricted view datasources are properly defined",()=>{defineObject({titlePropertyApiName:"bar",displayName:"Foo",pluralDisplayName:"Foo",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"}},datasource:{type:"restrictedView"}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
3464
+ {
3465
+ "importedOntology": {
3466
+ "actionTypes": {},
3467
+ "blockPermissionInformation": {
3468
+ "actionTypes": {},
3469
+ "linkTypes": {},
3470
+ "objectTypes": {},
3471
+ },
3472
+ "interfaceTypes": {},
3473
+ "linkTypes": {},
3474
+ "objectTypes": {},
3475
+ "sharedPropertyTypes": {},
3476
+ },
3477
+ "importedValueTypes": {
3478
+ "valueTypes": [],
3479
+ },
3480
+ "ontology": {
3481
+ "actionTypes": {},
3482
+ "blockPermissionInformation": {
3483
+ "actionTypes": {},
3484
+ "linkTypes": {},
3485
+ "objectTypes": {},
3486
+ },
3487
+ "interfaceTypes": {},
3488
+ "linkTypes": {},
3489
+ "objectTypes": {
3490
+ "com.palantir.foo": {
3491
+ "datasources": [
3492
+ {
3493
+ "datasource": {
3494
+ "restrictedViewV2": {
3495
+ "propertyMapping": {
3496
+ "bar": {
3497
+ "column": "bar",
3498
+ "type": "column",
3499
+ },
3500
+ },
3501
+ "restrictedViewRid": "com.palantir.foo",
3502
+ },
3503
+ "type": "restrictedViewV2",
3504
+ },
3505
+ "datasourceName": "com.palantir.foo",
3506
+ "editsConfiguration": {
3507
+ "onlyAllowPrivilegedEdits": false,
3508
+ },
3509
+ "redacted": false,
3510
+ },
3511
+ ],
3512
+ "entityMetadata": {
3513
+ "arePatchesEnabled": false,
3514
+ },
3515
+ "objectType": {
3516
+ "allImplementsInterfaces": {},
3517
+ "apiName": "com.palantir.foo",
3518
+ "displayMetadata": {
3519
+ "description": undefined,
3520
+ "displayName": "Foo",
3521
+ "groupDisplayName": undefined,
3522
+ "icon": {
3523
+ "blueprint": {
3524
+ "color": "#2D72D2",
3525
+ "locator": "cube",
3526
+ },
3527
+ "type": "blueprint",
3528
+ },
3529
+ "pluralDisplayName": "Foo",
3530
+ "visibility": "NORMAL",
3531
+ },
3532
+ "implementsInterfaces2": [],
3533
+ "primaryKeys": [
3534
+ "bar",
3535
+ ],
3536
+ "propertyTypes": {
3537
+ "bar": {
3538
+ "apiName": "bar",
2996
3539
  "baseFormatter": undefined,
2997
3540
  "dataConstraints": undefined,
2998
3541
  "displayMetadata": {
@@ -3093,11 +3636,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
3093
3636
  },
3094
3637
  "type": "datasetV2",
3095
3638
  },
3639
+ "datasourceName": "com.palantir.foo",
3096
3640
  "editsConfiguration": {
3097
3641
  "onlyAllowPrivilegedEdits": false,
3098
3642
  },
3099
3643
  "redacted": false,
3100
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
3101
3644
  },
3102
3645
  ],
3103
3646
  "entityMetadata": {
@@ -3261,11 +3804,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
3261
3804
  },
3262
3805
  "type": "mediaSetView",
3263
3806
  },
3807
+ "datasourceName": "fizz",
3264
3808
  "editsConfiguration": {
3265
3809
  "onlyAllowPrivilegedEdits": false,
3266
3810
  },
3267
3811
  "redacted": false,
3268
- "rid": "ri.ontology.main.datasource.fizz",
3269
3812
  },
3270
3813
  {
3271
3814
  "datasource": {
@@ -3283,11 +3826,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
3283
3826
  },
3284
3827
  "type": "streamV2",
3285
3828
  },
3829
+ "datasourceName": "com.palantir.fizz",
3286
3830
  "editsConfiguration": {
3287
3831
  "onlyAllowPrivilegedEdits": false,
3288
3832
  },
3289
3833
  "redacted": false,
3290
- "rid": "ri.ontology.main.datasource.com.palantir.fizz",
3291
3834
  },
3292
3835
  ],
3293
3836
  "entityMetadata": {
@@ -3580,7 +4123,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
3580
4123
  "valueTypes": [],
3581
4124
  },
3582
4125
  }
3583
- `);});it("Simple interface actions (with object types) are properly defined",()=>{const exampleStructPropertyType=defineSharedPropertyType({apiName:"property2",type:{type:"struct",structDefinition:{simpleProperty:"string"}}});const mySpt=defineSharedPropertyType({apiName:"mySpt",type:"string"});const exampleInterface=defineInterface({apiName:"exampleInterface",icon:{color:"#c7cdd6ff",locator:"globe"},properties:{mySpt,property1:"string",property2:exampleStructPropertyType}});const exampleObjectType=defineObject({titlePropertyApiName:"bar",displayName:"exampleObjectType",pluralDisplayName:"exampleObjectTypes",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"},"property1":{type:"string"},"property2":{type:{type:"struct",structDefinition:{simpleProperty:"string"}}}},implementsInterfaces:[{implements:exampleInterface,propertyMapping:[{interfaceProperty:"com.palantir.mySpt",mapsTo:"bar"},{interfaceProperty:"com.palantir.property1",mapsTo:"property1"},{interfaceProperty:"com.palantir.property2",mapsTo:"property2"}]}]});defineCreateInterfaceObjectAction(exampleInterface,exampleObjectType);defineModifyInterfaceObjectAction(exampleInterface,exampleObjectType);expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
4126
+ `);});it("Simple interface actions (with object types) are properly defined",()=>{const exampleStructPropertyType=defineSharedPropertyType({apiName:"property2",type:{type:"struct",structDefinition:{simpleProperty:"string"}}});const mySpt=defineSharedPropertyType({apiName:"mySpt",type:"string"});const exampleInterface=defineInterface({apiName:"exampleInterface",icon:{color:"#c7cdd6ff",locator:"globe"},properties:{mySpt,property1:"string",property2:exampleStructPropertyType}});const exampleObjectType=defineObject({titlePropertyApiName:"bar",displayName:"exampleObjectType",pluralDisplayName:"exampleObjectTypes",apiName:"foo",primaryKeyPropertyApiName:"bar",properties:{"bar":{type:"string"},"property1":{type:"string"},"property2":{type:{type:"struct",structDefinition:{simpleProperty:"string"}}}},implementsInterfaces:[{implements:exampleInterface,propertyMapping:[{interfaceProperty:"com.palantir.mySpt",mapsTo:"bar"},{interfaceProperty:"com.palantir.property1",mapsTo:"property1"},{interfaceProperty:"com.palantir.property2",mapsTo:"property2"}]}]});defineCreateInterfaceObjectAction({interfaceType:exampleInterface,objectType:exampleObjectType});defineModifyInterfaceObjectAction({interfaceType:exampleInterface,objectType:exampleObjectType});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
3584
4127
  {
3585
4128
  "importedOntology": {
3586
4129
  "actionTypes": {},
@@ -4252,11 +4795,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
4252
4795
  },
4253
4796
  "type": "datasetV2",
4254
4797
  },
4798
+ "datasourceName": "com.palantir.foo",
4255
4799
  "editsConfiguration": {
4256
4800
  "onlyAllowPrivilegedEdits": false,
4257
4801
  },
4258
4802
  "redacted": false,
4259
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
4260
4803
  },
4261
4804
  ],
4262
4805
  "entityMetadata": {
@@ -5694,11 +6237,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
5694
6237
  },
5695
6238
  "type": "datasetV2",
5696
6239
  },
6240
+ "datasourceName": "com.palantir.foo",
5697
6241
  "editsConfiguration": {
5698
6242
  "onlyAllowPrivilegedEdits": false,
5699
6243
  },
5700
6244
  "redacted": false,
5701
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
5702
6245
  },
5703
6246
  ],
5704
6247
  "entityMetadata": {
@@ -7061,11 +7604,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7061
7604
  },
7062
7605
  "type": "datasetV2",
7063
7606
  },
7607
+ "datasourceName": "com.palantir.foo",
7064
7608
  "editsConfiguration": {
7065
7609
  "onlyAllowPrivilegedEdits": false,
7066
7610
  },
7067
7611
  "redacted": false,
7068
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
7069
7612
  },
7070
7613
  ],
7071
7614
  "entityMetadata": {
@@ -7734,11 +8277,11 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7734
8277
  },
7735
8278
  "type": "datasetV2",
7736
8279
  },
8280
+ "datasourceName": "com.palantir.foo",
7737
8281
  "editsConfiguration": {
7738
8282
  "onlyAllowPrivilegedEdits": false,
7739
8283
  },
7740
8284
  "redacted": false,
7741
- "rid": "ri.ontology.main.datasource.com.palantir.foo",
7742
8285
  },
7743
8286
  ],
7744
8287
  "entityMetadata": {
@@ -7921,8 +8464,237 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7921
8464
  "logic": {
7922
8465
  "rules": [
7923
8466
  {
7924
- "addOrModifyObjectRuleV2": {
7925
- "objectToModify": "objectToCreateOrModifyParameter",
8467
+ "addOrModifyObjectRuleV2": {
8468
+ "objectToModify": "objectToCreateOrModifyParameter",
8469
+ "propertyValues": {
8470
+ "managedBy": {
8471
+ "parameterId": "managedBy",
8472
+ "type": "parameterId",
8473
+ },
8474
+ },
8475
+ "structFieldValues": {},
8476
+ },
8477
+ "type": "addOrModifyObjectRuleV2",
8478
+ },
8479
+ ],
8480
+ },
8481
+ "validation": {
8482
+ "actionTypeLevelValidation": {
8483
+ "rules": {
8484
+ "0": {
8485
+ "condition": {
8486
+ "true": {},
8487
+ "type": "true",
8488
+ },
8489
+ "displayMetadata": {
8490
+ "failureMessage": "",
8491
+ "typeClasses": [],
8492
+ },
8493
+ },
8494
+ },
8495
+ },
8496
+ "parameterValidations": {
8497
+ "managedBy": {
8498
+ "conditionalOverrides": [],
8499
+ "defaultValidation": {
8500
+ "display": {
8501
+ "prefill": {
8502
+ "objectParameterPropertyValue": {
8503
+ "parameterId": "objectToCreateOrModifyParameter",
8504
+ "propertyTypeId": "managedBy",
8505
+ },
8506
+ "type": "objectParameterPropertyValue",
8507
+ },
8508
+ "renderHint": {
8509
+ "textInput": {},
8510
+ "type": "textInput",
8511
+ },
8512
+ "visibility": {
8513
+ "editable": {},
8514
+ "type": "editable",
8515
+ },
8516
+ },
8517
+ "validation": {
8518
+ "allowedValues": {
8519
+ "text": {
8520
+ "text": {},
8521
+ "type": "text",
8522
+ },
8523
+ "type": "text",
8524
+ },
8525
+ "required": {
8526
+ "notRequired": {},
8527
+ "type": "notRequired",
8528
+ },
8529
+ },
8530
+ },
8531
+ },
8532
+ "objectToCreateOrModifyParameter": {
8533
+ "conditionalOverrides": [
8534
+ {
8535
+ "condition": {
8536
+ "comparison": {
8537
+ "left": {
8538
+ "type": "userProperty",
8539
+ "userProperty": {
8540
+ "propertyValue": {
8541
+ "groupIds": {},
8542
+ "type": "groupIds",
8543
+ },
8544
+ "userId": {
8545
+ "currentUser": {},
8546
+ "type": "currentUser",
8547
+ },
8548
+ },
8549
+ },
8550
+ "operator": "INTERSECTS",
8551
+ "right": {
8552
+ "staticValue": {
8553
+ "stringList": {
8554
+ "strings": [
8555
+ "supervisors",
8556
+ ],
8557
+ },
8558
+ "type": "stringList",
8559
+ },
8560
+ "type": "staticValue",
8561
+ },
8562
+ },
8563
+ "type": "comparison",
8564
+ },
8565
+ "parameterBlockOverrides": [
8566
+ {
8567
+ "type": "visibility",
8568
+ "visibility": {
8569
+ "visibility": {
8570
+ "editable": {},
8571
+ "type": "editable",
8572
+ },
8573
+ },
8574
+ },
8575
+ ],
8576
+ },
8577
+ ],
8578
+ "defaultValidation": {
8579
+ "display": {
8580
+ "renderHint": {
8581
+ "dropdown": {},
8582
+ "type": "dropdown",
8583
+ },
8584
+ "visibility": {
8585
+ "editable": {},
8586
+ "type": "editable",
8587
+ },
8588
+ },
8589
+ "validation": {
8590
+ "allowedValues": {
8591
+ "objectQuery": {
8592
+ "objectQuery": {},
8593
+ "type": "objectQuery",
8594
+ },
8595
+ "type": "objectQuery",
8596
+ },
8597
+ "required": {
8598
+ "required": {},
8599
+ "type": "required",
8600
+ },
8601
+ },
8602
+ },
8603
+ },
8604
+ },
8605
+ "sectionValidations": {},
8606
+ },
8607
+ },
8608
+ "metadata": {
8609
+ "apiName": "com.palantir.create-or-modify-employee",
8610
+ "displayMetadata": {
8611
+ "configuration": {
8612
+ "defaultLayout": "FORM",
8613
+ "displayAndFormat": {
8614
+ "table": {
8615
+ "columnWidthByParameterRid": {},
8616
+ "enableFileImport": true,
8617
+ "fitHorizontally": false,
8618
+ "frozenColumnCount": 0,
8619
+ "rowHeightInLines": 1,
8620
+ },
8621
+ },
8622
+ "enableLayoutUserSwitch": false,
8623
+ },
8624
+ "description": "",
8625
+ "displayName": "Create or Modify Employee",
8626
+ "icon": {
8627
+ "blueprint": {
8628
+ "color": "#000000",
8629
+ "locator": "edit",
8630
+ },
8631
+ "type": "blueprint",
8632
+ },
8633
+ "successMessage": [],
8634
+ "typeClasses": [],
8635
+ },
8636
+ "entities": {
8637
+ "affectedInterfaceTypes": [],
8638
+ "affectedLinkTypes": [],
8639
+ "affectedObjectTypes": [
8640
+ "com.palantir.employee",
8641
+ ],
8642
+ "typeGroups": [],
8643
+ },
8644
+ "formContentOrdering": [],
8645
+ "parameterOrdering": [
8646
+ "objectToCreateOrModifyParameter",
8647
+ "objectToCreateOrModifyParameter",
8648
+ "managedBy",
8649
+ ],
8650
+ "parameters": {
8651
+ "managedBy": {
8652
+ "displayMetadata": {
8653
+ "description": "",
8654
+ "displayName": "ManagedBy",
8655
+ "typeClasses": [],
8656
+ },
8657
+ "id": "managedBy",
8658
+ "type": {
8659
+ "string": {},
8660
+ "type": "string",
8661
+ },
8662
+ },
8663
+ "objectToCreateOrModifyParameter": {
8664
+ "displayMetadata": {
8665
+ "description": "Description",
8666
+ "displayName": "Chose a manager to modify or create a new one",
8667
+ "typeClasses": [],
8668
+ },
8669
+ "id": "objectToCreateOrModifyParameter",
8670
+ "type": {
8671
+ "objectReference": {
8672
+ "maybeCreateObjectOption": {
8673
+ "autoGenerated": {},
8674
+ "type": "autoGenerated",
8675
+ },
8676
+ "objectTypeId": "com.palantir.employee",
8677
+ },
8678
+ "type": "objectReference",
8679
+ },
8680
+ },
8681
+ },
8682
+ "sections": {},
8683
+ "status": {
8684
+ "active": {},
8685
+ "type": "active",
8686
+ },
8687
+ },
8688
+ },
8689
+ },
8690
+ "com.palantir.modify-object-employee": {
8691
+ "actionType": {
8692
+ "actionTypeLogic": {
8693
+ "logic": {
8694
+ "rules": [
8695
+ {
8696
+ "modifyObjectRule": {
8697
+ "objectToModify": "objectToModifyParameter",
7926
8698
  "propertyValues": {
7927
8699
  "managedBy": {
7928
8700
  "parameterId": "managedBy",
@@ -7931,7 +8703,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7931
8703
  },
7932
8704
  "structFieldValues": {},
7933
8705
  },
7934
- "type": "addOrModifyObjectRuleV2",
8706
+ "type": "modifyObjectRule",
7935
8707
  },
7936
8708
  ],
7937
8709
  },
@@ -7957,7 +8729,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7957
8729
  "display": {
7958
8730
  "prefill": {
7959
8731
  "objectParameterPropertyValue": {
7960
- "parameterId": "objectToCreateOrModifyParameter",
8732
+ "parameterId": "objectToModifyParameter",
7961
8733
  "propertyTypeId": "managedBy",
7962
8734
  },
7963
8735
  "type": "objectParameterPropertyValue",
@@ -7986,7 +8758,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
7986
8758
  },
7987
8759
  },
7988
8760
  },
7989
- "objectToCreateOrModifyParameter": {
8761
+ "objectToModifyParameter": {
7990
8762
  "conditionalOverrides": [
7991
8763
  {
7992
8764
  "condition": {
@@ -8063,7 +8835,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8063
8835
  },
8064
8836
  },
8065
8837
  "metadata": {
8066
- "apiName": "com.palantir.create-or-modify-employee",
8838
+ "apiName": "com.palantir.modify-object-employee",
8067
8839
  "displayMetadata": {
8068
8840
  "configuration": {
8069
8841
  "defaultLayout": "FORM",
@@ -8079,7 +8851,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8079
8851
  "enableLayoutUserSwitch": false,
8080
8852
  },
8081
8853
  "description": "",
8082
- "displayName": "Create or Modify Employee",
8854
+ "displayName": "Modify Employee",
8083
8855
  "icon": {
8084
8856
  "blueprint": {
8085
8857
  "color": "#000000",
@@ -8100,8 +8872,8 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8100
8872
  },
8101
8873
  "formContentOrdering": [],
8102
8874
  "parameterOrdering": [
8103
- "objectToCreateOrModifyParameter",
8104
- "objectToCreateOrModifyParameter",
8875
+ "objectToModifyParameter",
8876
+ "objectToModifyParameter",
8105
8877
  "managedBy",
8106
8878
  ],
8107
8879
  "parameters": {
@@ -8117,19 +8889,15 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8117
8889
  "type": "string",
8118
8890
  },
8119
8891
  },
8120
- "objectToCreateOrModifyParameter": {
8892
+ "objectToModifyParameter": {
8121
8893
  "displayMetadata": {
8122
8894
  "description": "Description",
8123
- "displayName": "Chose a manager to modify or create a new one",
8895
+ "displayName": "Chose a manager to modify",
8124
8896
  "typeClasses": [],
8125
8897
  },
8126
- "id": "objectToCreateOrModifyParameter",
8898
+ "id": "objectToModifyParameter",
8127
8899
  "type": {
8128
8900
  "objectReference": {
8129
- "maybeCreateObjectOption": {
8130
- "autoGenerated": {},
8131
- "type": "autoGenerated",
8132
- },
8133
8901
  "objectTypeId": "com.palantir.employee",
8134
8902
  },
8135
8903
  "type": "objectReference",
@@ -8144,15 +8912,198 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8144
8912
  },
8145
8913
  },
8146
8914
  },
8147
- "com.palantir.modify-object-employee": {
8915
+ },
8916
+ "blockPermissionInformation": {
8917
+ "actionTypes": {},
8918
+ "linkTypes": {},
8919
+ "objectTypes": {},
8920
+ },
8921
+ "interfaceTypes": {},
8922
+ "linkTypes": {},
8923
+ "objectTypes": {
8924
+ "com.palantir.employee": {
8925
+ "datasources": [
8926
+ {
8927
+ "datasource": {
8928
+ "datasetV2": {
8929
+ "datasetRid": "com.palantir.employee",
8930
+ "propertyMapping": {
8931
+ "id": {
8932
+ "column": "id",
8933
+ "type": "column",
8934
+ },
8935
+ "managedBy": {
8936
+ "column": "managedBy",
8937
+ "type": "column",
8938
+ },
8939
+ },
8940
+ },
8941
+ "type": "datasetV2",
8942
+ },
8943
+ "datasourceName": "com.palantir.employee",
8944
+ "editsConfiguration": {
8945
+ "onlyAllowPrivilegedEdits": false,
8946
+ },
8947
+ "redacted": false,
8948
+ },
8949
+ ],
8950
+ "entityMetadata": {
8951
+ "arePatchesEnabled": false,
8952
+ },
8953
+ "objectType": {
8954
+ "allImplementsInterfaces": {},
8955
+ "apiName": "com.palantir.employee",
8956
+ "displayMetadata": {
8957
+ "description": undefined,
8958
+ "displayName": "Employee",
8959
+ "groupDisplayName": undefined,
8960
+ "icon": {
8961
+ "blueprint": {
8962
+ "color": "#2D72D2",
8963
+ "locator": "cube",
8964
+ },
8965
+ "type": "blueprint",
8966
+ },
8967
+ "pluralDisplayName": "Employees",
8968
+ "visibility": "NORMAL",
8969
+ },
8970
+ "implementsInterfaces2": [],
8971
+ "primaryKeys": [
8972
+ "id",
8973
+ ],
8974
+ "propertyTypes": {
8975
+ "id": {
8976
+ "apiName": "id",
8977
+ "baseFormatter": undefined,
8978
+ "dataConstraints": undefined,
8979
+ "displayMetadata": {
8980
+ "description": "dummy",
8981
+ "displayName": "ID",
8982
+ "visibility": "NORMAL",
8983
+ },
8984
+ "indexedForSearch": true,
8985
+ "inlineAction": undefined,
8986
+ "ruleSetBinding": undefined,
8987
+ "sharedPropertyTypeApiName": undefined,
8988
+ "sharedPropertyTypeRid": undefined,
8989
+ "status": {
8990
+ "active": {},
8991
+ "type": "active",
8992
+ },
8993
+ "type": {
8994
+ "string": {
8995
+ "analyzerOverride": undefined,
8996
+ "enableAsciiFolding": undefined,
8997
+ "isLongText": false,
8998
+ "supportsEfficientLeadingWildcard": false,
8999
+ "supportsExactMatching": true,
9000
+ },
9001
+ "type": "string",
9002
+ },
9003
+ "typeClasses": [
9004
+ {
9005
+ "kind": "render_hint",
9006
+ "name": "SELECTABLE",
9007
+ },
9008
+ {
9009
+ "kind": "render_hint",
9010
+ "name": "SORTABLE",
9011
+ },
9012
+ ],
9013
+ "valueType": undefined,
9014
+ },
9015
+ "managedBy": {
9016
+ "apiName": "managedBy",
9017
+ "baseFormatter": undefined,
9018
+ "dataConstraints": undefined,
9019
+ "displayMetadata": {
9020
+ "description": undefined,
9021
+ "displayName": "ManagedBy",
9022
+ "visibility": "NORMAL",
9023
+ },
9024
+ "indexedForSearch": true,
9025
+ "inlineAction": undefined,
9026
+ "ruleSetBinding": undefined,
9027
+ "sharedPropertyTypeApiName": undefined,
9028
+ "sharedPropertyTypeRid": undefined,
9029
+ "status": {
9030
+ "active": {},
9031
+ "type": "active",
9032
+ },
9033
+ "type": {
9034
+ "string": {
9035
+ "analyzerOverride": undefined,
9036
+ "enableAsciiFolding": undefined,
9037
+ "isLongText": false,
9038
+ "supportsEfficientLeadingWildcard": false,
9039
+ "supportsExactMatching": true,
9040
+ },
9041
+ "type": "string",
9042
+ },
9043
+ "typeClasses": [
9044
+ {
9045
+ "kind": "render_hint",
9046
+ "name": "SELECTABLE",
9047
+ },
9048
+ {
9049
+ "kind": "render_hint",
9050
+ "name": "SORTABLE",
9051
+ },
9052
+ ],
9053
+ "valueType": undefined,
9054
+ },
9055
+ },
9056
+ "redacted": false,
9057
+ "status": {
9058
+ "active": {},
9059
+ "type": "active",
9060
+ },
9061
+ "titlePropertyTypeRid": "id",
9062
+ },
9063
+ },
9064
+ },
9065
+ "sharedPropertyTypes": {},
9066
+ },
9067
+ "valueTypes": {
9068
+ "valueTypes": [],
9069
+ },
9070
+ }
9071
+ `);});it("OAC defined object references as parameters are properly defined",()=>{// This test defines an action that creates an OAC-defined employee object type and also adds an additional parameter
9072
+ // for an objectReference to a manager object type that is also defined in OAC. The action shows how you can use this
9073
+ // objectReference parameter elsewhere in the action - in this case we are prefilling the managedBy property to be the
9074
+ // id of the selected manager object type.
9075
+ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",pluralDisplayName:"Employees",titlePropertyApiName:"id",primaryKeyPropertyApiName:"id",properties:{"id":{type:"string",displayName:"ID",description:"dummy"},"managedBy":{type:"string"}}});const managerObject=defineObject({apiName:"manager",displayName:"Manager",pluralDisplayName:"Managers",titlePropertyApiName:"id",primaryKeyPropertyApiName:"id",properties:{"id":{type:"string",displayName:"ID",description:"dummy"}},editsEnabled:true});defineCreateObjectAction({objectType:employeeObject,parameterOrdering:["myManager","id","managedBy"],parameterConfiguration:{"myManager":{customParameterType:{type:"objectReference",objectReference:{objectTypeId:managerObject.apiName}}},"managedBy":{defaultValue:{type:"objectParameterPropertyValue",objectParameterPropertyValue:{parameterId:"myManager",propertyTypeId:"id"}}}}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
9076
+ {
9077
+ "importedOntology": {
9078
+ "actionTypes": {},
9079
+ "blockPermissionInformation": {
9080
+ "actionTypes": {},
9081
+ "linkTypes": {},
9082
+ "objectTypes": {},
9083
+ },
9084
+ "interfaceTypes": {},
9085
+ "linkTypes": {},
9086
+ "objectTypes": {},
9087
+ "sharedPropertyTypes": {},
9088
+ },
9089
+ "importedValueTypes": {
9090
+ "valueTypes": [],
9091
+ },
9092
+ "ontology": {
9093
+ "actionTypes": {
9094
+ "com.palantir.create-object-employee": {
8148
9095
  "actionType": {
8149
9096
  "actionTypeLogic": {
8150
9097
  "logic": {
8151
9098
  "rules": [
8152
9099
  {
8153
- "modifyObjectRule": {
8154
- "objectToModify": "objectToModifyParameter",
9100
+ "addObjectRule": {
9101
+ "objectTypeId": "com.palantir.employee",
8155
9102
  "propertyValues": {
9103
+ "id": {
9104
+ "parameterId": "id",
9105
+ "type": "parameterId",
9106
+ },
8156
9107
  "managedBy": {
8157
9108
  "parameterId": "managedBy",
8158
9109
  "type": "parameterId",
@@ -8160,7 +9111,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8160
9111
  },
8161
9112
  "structFieldValues": {},
8162
9113
  },
8163
- "type": "modifyObjectRule",
9114
+ "type": "addObjectRule",
8164
9115
  },
8165
9116
  ],
8166
9117
  },
@@ -8172,22 +9123,50 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8172
9123
  "true": {},
8173
9124
  "type": "true",
8174
9125
  },
8175
- "displayMetadata": {
8176
- "failureMessage": "",
8177
- "typeClasses": [],
9126
+ "displayMetadata": {
9127
+ "failureMessage": "",
9128
+ "typeClasses": [],
9129
+ },
9130
+ },
9131
+ },
9132
+ },
9133
+ "parameterValidations": {
9134
+ "id": {
9135
+ "conditionalOverrides": [],
9136
+ "defaultValidation": {
9137
+ "display": {
9138
+ "renderHint": {
9139
+ "textInput": {},
9140
+ "type": "textInput",
9141
+ },
9142
+ "visibility": {
9143
+ "editable": {},
9144
+ "type": "editable",
9145
+ },
9146
+ },
9147
+ "validation": {
9148
+ "allowedValues": {
9149
+ "text": {
9150
+ "text": {},
9151
+ "type": "text",
9152
+ },
9153
+ "type": "text",
9154
+ },
9155
+ "required": {
9156
+ "notRequired": {},
9157
+ "type": "notRequired",
9158
+ },
8178
9159
  },
8179
9160
  },
8180
9161
  },
8181
- },
8182
- "parameterValidations": {
8183
9162
  "managedBy": {
8184
9163
  "conditionalOverrides": [],
8185
9164
  "defaultValidation": {
8186
9165
  "display": {
8187
9166
  "prefill": {
8188
9167
  "objectParameterPropertyValue": {
8189
- "parameterId": "objectToModifyParameter",
8190
- "propertyTypeId": "managedBy",
9168
+ "parameterId": "myManager",
9169
+ "propertyTypeId": "id",
8191
9170
  },
8192
9171
  "type": "objectParameterPropertyValue",
8193
9172
  },
@@ -8215,52 +9194,8 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8215
9194
  },
8216
9195
  },
8217
9196
  },
8218
- "objectToModifyParameter": {
8219
- "conditionalOverrides": [
8220
- {
8221
- "condition": {
8222
- "comparison": {
8223
- "left": {
8224
- "type": "userProperty",
8225
- "userProperty": {
8226
- "propertyValue": {
8227
- "groupIds": {},
8228
- "type": "groupIds",
8229
- },
8230
- "userId": {
8231
- "currentUser": {},
8232
- "type": "currentUser",
8233
- },
8234
- },
8235
- },
8236
- "operator": "INTERSECTS",
8237
- "right": {
8238
- "staticValue": {
8239
- "stringList": {
8240
- "strings": [
8241
- "supervisors",
8242
- ],
8243
- },
8244
- "type": "stringList",
8245
- },
8246
- "type": "staticValue",
8247
- },
8248
- },
8249
- "type": "comparison",
8250
- },
8251
- "parameterBlockOverrides": [
8252
- {
8253
- "type": "visibility",
8254
- "visibility": {
8255
- "visibility": {
8256
- "editable": {},
8257
- "type": "editable",
8258
- },
8259
- },
8260
- },
8261
- ],
8262
- },
8263
- ],
9197
+ "myManager": {
9198
+ "conditionalOverrides": [],
8264
9199
  "defaultValidation": {
8265
9200
  "display": {
8266
9201
  "renderHint": {
@@ -8281,8 +9216,8 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8281
9216
  "type": "objectQuery",
8282
9217
  },
8283
9218
  "required": {
8284
- "required": {},
8285
- "type": "required",
9219
+ "notRequired": {},
9220
+ "type": "notRequired",
8286
9221
  },
8287
9222
  },
8288
9223
  },
@@ -8292,7 +9227,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8292
9227
  },
8293
9228
  },
8294
9229
  "metadata": {
8295
- "apiName": "com.palantir.modify-object-employee",
9230
+ "apiName": "com.palantir.create-object-employee",
8296
9231
  "displayMetadata": {
8297
9232
  "configuration": {
8298
9233
  "defaultLayout": "FORM",
@@ -8308,7 +9243,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8308
9243
  "enableLayoutUserSwitch": false,
8309
9244
  },
8310
9245
  "description": "",
8311
- "displayName": "Modify Employee",
9246
+ "displayName": "Create Employee",
8312
9247
  "icon": {
8313
9248
  "blueprint": {
8314
9249
  "color": "#000000",
@@ -8329,11 +9264,23 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8329
9264
  },
8330
9265
  "formContentOrdering": [],
8331
9266
  "parameterOrdering": [
8332
- "objectToModifyParameter",
8333
- "objectToModifyParameter",
9267
+ "myManager",
9268
+ "id",
8334
9269
  "managedBy",
8335
9270
  ],
8336
9271
  "parameters": {
9272
+ "id": {
9273
+ "displayMetadata": {
9274
+ "description": "",
9275
+ "displayName": "ID",
9276
+ "typeClasses": [],
9277
+ },
9278
+ "id": "id",
9279
+ "type": {
9280
+ "string": {},
9281
+ "type": "string",
9282
+ },
9283
+ },
8337
9284
  "managedBy": {
8338
9285
  "displayMetadata": {
8339
9286
  "description": "",
@@ -8346,73 +9293,209 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8346
9293
  "type": "string",
8347
9294
  },
8348
9295
  },
8349
- "objectToModifyParameter": {
9296
+ "myManager": {
8350
9297
  "displayMetadata": {
8351
- "description": "Description",
8352
- "displayName": "Chose a manager to modify",
9298
+ "description": "",
9299
+ "displayName": "MyManager",
8353
9300
  "typeClasses": [],
8354
9301
  },
8355
- "id": "objectToModifyParameter",
9302
+ "id": "myManager",
8356
9303
  "type": {
8357
9304
  "objectReference": {
8358
- "objectTypeId": "com.palantir.employee",
9305
+ "objectTypeId": "com.palantir.manager",
8359
9306
  },
8360
9307
  "type": "objectReference",
8361
9308
  },
8362
- },
8363
- },
8364
- "sections": {},
8365
- "status": {
8366
- "active": {},
8367
- "type": "active",
9309
+ },
9310
+ },
9311
+ "sections": {},
9312
+ "status": {
9313
+ "active": {},
9314
+ "type": "active",
9315
+ },
9316
+ },
9317
+ },
9318
+ },
9319
+ },
9320
+ "blockPermissionInformation": {
9321
+ "actionTypes": {},
9322
+ "linkTypes": {},
9323
+ "objectTypes": {},
9324
+ },
9325
+ "interfaceTypes": {},
9326
+ "linkTypes": {},
9327
+ "objectTypes": {
9328
+ "com.palantir.employee": {
9329
+ "datasources": [
9330
+ {
9331
+ "datasource": {
9332
+ "datasetV2": {
9333
+ "datasetRid": "com.palantir.employee",
9334
+ "propertyMapping": {
9335
+ "id": {
9336
+ "column": "id",
9337
+ "type": "column",
9338
+ },
9339
+ "managedBy": {
9340
+ "column": "managedBy",
9341
+ "type": "column",
9342
+ },
9343
+ },
9344
+ },
9345
+ "type": "datasetV2",
9346
+ },
9347
+ "datasourceName": "com.palantir.employee",
9348
+ "editsConfiguration": {
9349
+ "onlyAllowPrivilegedEdits": false,
9350
+ },
9351
+ "redacted": false,
9352
+ },
9353
+ ],
9354
+ "entityMetadata": {
9355
+ "arePatchesEnabled": false,
9356
+ },
9357
+ "objectType": {
9358
+ "allImplementsInterfaces": {},
9359
+ "apiName": "com.palantir.employee",
9360
+ "displayMetadata": {
9361
+ "description": undefined,
9362
+ "displayName": "Employee",
9363
+ "groupDisplayName": undefined,
9364
+ "icon": {
9365
+ "blueprint": {
9366
+ "color": "#2D72D2",
9367
+ "locator": "cube",
9368
+ },
9369
+ "type": "blueprint",
9370
+ },
9371
+ "pluralDisplayName": "Employees",
9372
+ "visibility": "NORMAL",
9373
+ },
9374
+ "implementsInterfaces2": [],
9375
+ "primaryKeys": [
9376
+ "id",
9377
+ ],
9378
+ "propertyTypes": {
9379
+ "id": {
9380
+ "apiName": "id",
9381
+ "baseFormatter": undefined,
9382
+ "dataConstraints": undefined,
9383
+ "displayMetadata": {
9384
+ "description": "dummy",
9385
+ "displayName": "ID",
9386
+ "visibility": "NORMAL",
9387
+ },
9388
+ "indexedForSearch": true,
9389
+ "inlineAction": undefined,
9390
+ "ruleSetBinding": undefined,
9391
+ "sharedPropertyTypeApiName": undefined,
9392
+ "sharedPropertyTypeRid": undefined,
9393
+ "status": {
9394
+ "active": {},
9395
+ "type": "active",
9396
+ },
9397
+ "type": {
9398
+ "string": {
9399
+ "analyzerOverride": undefined,
9400
+ "enableAsciiFolding": undefined,
9401
+ "isLongText": false,
9402
+ "supportsEfficientLeadingWildcard": false,
9403
+ "supportsExactMatching": true,
9404
+ },
9405
+ "type": "string",
9406
+ },
9407
+ "typeClasses": [
9408
+ {
9409
+ "kind": "render_hint",
9410
+ "name": "SELECTABLE",
9411
+ },
9412
+ {
9413
+ "kind": "render_hint",
9414
+ "name": "SORTABLE",
9415
+ },
9416
+ ],
9417
+ "valueType": undefined,
9418
+ },
9419
+ "managedBy": {
9420
+ "apiName": "managedBy",
9421
+ "baseFormatter": undefined,
9422
+ "dataConstraints": undefined,
9423
+ "displayMetadata": {
9424
+ "description": undefined,
9425
+ "displayName": "ManagedBy",
9426
+ "visibility": "NORMAL",
9427
+ },
9428
+ "indexedForSearch": true,
9429
+ "inlineAction": undefined,
9430
+ "ruleSetBinding": undefined,
9431
+ "sharedPropertyTypeApiName": undefined,
9432
+ "sharedPropertyTypeRid": undefined,
9433
+ "status": {
9434
+ "active": {},
9435
+ "type": "active",
9436
+ },
9437
+ "type": {
9438
+ "string": {
9439
+ "analyzerOverride": undefined,
9440
+ "enableAsciiFolding": undefined,
9441
+ "isLongText": false,
9442
+ "supportsEfficientLeadingWildcard": false,
9443
+ "supportsExactMatching": true,
9444
+ },
9445
+ "type": "string",
9446
+ },
9447
+ "typeClasses": [
9448
+ {
9449
+ "kind": "render_hint",
9450
+ "name": "SELECTABLE",
9451
+ },
9452
+ {
9453
+ "kind": "render_hint",
9454
+ "name": "SORTABLE",
9455
+ },
9456
+ ],
9457
+ "valueType": undefined,
8368
9458
  },
8369
9459
  },
9460
+ "redacted": false,
9461
+ "status": {
9462
+ "active": {},
9463
+ "type": "active",
9464
+ },
9465
+ "titlePropertyTypeRid": "id",
8370
9466
  },
8371
9467
  },
8372
- },
8373
- "blockPermissionInformation": {
8374
- "actionTypes": {},
8375
- "linkTypes": {},
8376
- "objectTypes": {},
8377
- },
8378
- "interfaceTypes": {},
8379
- "linkTypes": {},
8380
- "objectTypes": {
8381
- "com.palantir.employee": {
9468
+ "com.palantir.manager": {
8382
9469
  "datasources": [
8383
9470
  {
8384
9471
  "datasource": {
8385
9472
  "datasetV2": {
8386
- "datasetRid": "com.palantir.employee",
9473
+ "datasetRid": "com.palantir.manager",
8387
9474
  "propertyMapping": {
8388
9475
  "id": {
8389
9476
  "column": "id",
8390
9477
  "type": "column",
8391
9478
  },
8392
- "managedBy": {
8393
- "column": "managedBy",
8394
- "type": "column",
8395
- },
8396
9479
  },
8397
9480
  },
8398
9481
  "type": "datasetV2",
8399
9482
  },
9483
+ "datasourceName": "com.palantir.manager",
8400
9484
  "editsConfiguration": {
8401
9485
  "onlyAllowPrivilegedEdits": false,
8402
9486
  },
8403
9487
  "redacted": false,
8404
- "rid": "ri.ontology.main.datasource.com.palantir.employee",
8405
9488
  },
8406
9489
  ],
8407
9490
  "entityMetadata": {
8408
- "arePatchesEnabled": false,
9491
+ "arePatchesEnabled": true,
8409
9492
  },
8410
9493
  "objectType": {
8411
9494
  "allImplementsInterfaces": {},
8412
- "apiName": "com.palantir.employee",
9495
+ "apiName": "com.palantir.manager",
8413
9496
  "displayMetadata": {
8414
9497
  "description": undefined,
8415
- "displayName": "Employee",
9498
+ "displayName": "Manager",
8416
9499
  "groupDisplayName": undefined,
8417
9500
  "icon": {
8418
9501
  "blueprint": {
@@ -8421,7 +9504,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8421
9504
  },
8422
9505
  "type": "blueprint",
8423
9506
  },
8424
- "pluralDisplayName": "Employees",
9507
+ "pluralDisplayName": "Managers",
8425
9508
  "visibility": "NORMAL",
8426
9509
  },
8427
9510
  "implementsInterfaces2": [],
@@ -8469,46 +9552,6 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8469
9552
  ],
8470
9553
  "valueType": undefined,
8471
9554
  },
8472
- "managedBy": {
8473
- "apiName": "managedBy",
8474
- "baseFormatter": undefined,
8475
- "dataConstraints": undefined,
8476
- "displayMetadata": {
8477
- "description": undefined,
8478
- "displayName": "ManagedBy",
8479
- "visibility": "NORMAL",
8480
- },
8481
- "indexedForSearch": true,
8482
- "inlineAction": undefined,
8483
- "ruleSetBinding": undefined,
8484
- "sharedPropertyTypeApiName": undefined,
8485
- "sharedPropertyTypeRid": undefined,
8486
- "status": {
8487
- "active": {},
8488
- "type": "active",
8489
- },
8490
- "type": {
8491
- "string": {
8492
- "analyzerOverride": undefined,
8493
- "enableAsciiFolding": undefined,
8494
- "isLongText": false,
8495
- "supportsEfficientLeadingWildcard": false,
8496
- "supportsExactMatching": true,
8497
- },
8498
- "type": "string",
8499
- },
8500
- "typeClasses": [
8501
- {
8502
- "kind": "render_hint",
8503
- "name": "SELECTABLE",
8504
- },
8505
- {
8506
- "kind": "render_hint",
8507
- "name": "SORTABLE",
8508
- },
8509
- ],
8510
- "valueType": undefined,
8511
- },
8512
9555
  },
8513
9556
  "redacted": false,
8514
9557
  "status": {
@@ -8525,11 +9568,7 @@ defineOntology("com.palantir.",()=>{},"/tmp/");});describe("Interfaces",()=>{it(
8525
9568
  "valueTypes": [],
8526
9569
  },
8527
9570
  }
8528
- `);});it("OAC defined object references as parameters are properly defined",()=>{// This test defines an action that creates an OAC-defined employee object type and also adds an additional parameter
8529
- // for an objectReference to a manager object type that is also defined in OAC. The action shows how you can use this
8530
- // objectReference parameter elsewhere in the action - in this case we are prefilling the managedBy property to be the
8531
- // id of the selected manager object type.
8532
- const employeeObject=defineObject({apiName:"employee",displayName:"Employee",pluralDisplayName:"Employees",titlePropertyApiName:"id",primaryKeyPropertyApiName:"id",properties:{"id":{type:"string",displayName:"ID",description:"dummy"},"managedBy":{type:"string"}}});const managerObject=defineObject({apiName:"manager",displayName:"Manager",pluralDisplayName:"Managers",titlePropertyApiName:"id",primaryKeyPropertyApiName:"id",properties:{"id":{type:"string",displayName:"ID",description:"dummy"}},editsEnabled:true});defineCreateObjectAction({objectType:employeeObject,parameterOrdering:["myManager","id","managedBy"],parameterConfiguration:{"myManager":{customParameterType:{type:"objectReference",objectReference:{objectTypeId:managerObject.apiName}}},"managedBy":{defaultValue:{type:"objectParameterPropertyValue",objectParameterPropertyValue:{parameterId:"myManager",propertyTypeId:"id"}}}}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
9571
+ `);});it("Simple interface actions (without object types) are properly defined",()=>{const exampleInterface=defineInterface({apiName:"exampleInterface",properties:{property1:"string"}});defineCreateInterfaceObjectAction({interfaceType:exampleInterface});defineModifyInterfaceObjectAction({interfaceType:exampleInterface});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
8533
9572
  {
8534
9573
  "importedOntology": {
8535
9574
  "actionTypes": {},
@@ -8548,27 +9587,23 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8548
9587
  },
8549
9588
  "ontology": {
8550
9589
  "actionTypes": {
8551
- "com.palantir.create-object-employee": {
9590
+ "com.palantir.create-example-interface": {
8552
9591
  "actionType": {
8553
9592
  "actionTypeLogic": {
8554
9593
  "logic": {
8555
9594
  "rules": [
8556
9595
  {
8557
- "addObjectRule": {
8558
- "objectTypeId": "com.palantir.employee",
8559
- "propertyValues": {
8560
- "id": {
8561
- "parameterId": "id",
8562
- "type": "parameterId",
8563
- },
8564
- "managedBy": {
8565
- "parameterId": "managedBy",
9596
+ "addInterfaceRule": {
9597
+ "interfaceApiName": "com.palantir.exampleInterface",
9598
+ "objectTypeParameter": "objectTypeParameter",
9599
+ "sharedPropertyValues": {
9600
+ "com.palantir.property1": {
9601
+ "parameterId": "com.palantir.property1",
8566
9602
  "type": "parameterId",
8567
9603
  },
8568
9604
  },
8569
- "structFieldValues": {},
8570
9605
  },
8571
- "type": "addObjectRule",
9606
+ "type": "addInterfaceRule",
8572
9607
  },
8573
9608
  ],
8574
9609
  },
@@ -8588,7 +9623,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8588
9623
  },
8589
9624
  },
8590
9625
  "parameterValidations": {
8591
- "id": {
9626
+ "com.palantir.property1": {
8592
9627
  "conditionalOverrides": [],
8593
9628
  "defaultValidation": {
8594
9629
  "display": {
@@ -8610,23 +9645,166 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8610
9645
  "type": "text",
8611
9646
  },
8612
9647
  "required": {
8613
- "notRequired": {},
8614
- "type": "notRequired",
9648
+ "required": {},
9649
+ "type": "required",
9650
+ },
9651
+ },
9652
+ },
9653
+ },
9654
+ "objectTypeParameter": {
9655
+ "conditionalOverrides": [],
9656
+ "defaultValidation": {
9657
+ "display": {
9658
+ "renderHint": {
9659
+ "dropdown": {},
9660
+ "type": "dropdown",
9661
+ },
9662
+ "visibility": {
9663
+ "editable": {},
9664
+ "type": "editable",
9665
+ },
9666
+ },
9667
+ "validation": {
9668
+ "allowedValues": {
9669
+ "objectTypeReference": {
9670
+ "objectTypeReference": {
9671
+ "interfaceTypeRids": [
9672
+ "com.palantir.exampleInterface",
9673
+ ],
9674
+ },
9675
+ "type": "objectTypeReference",
9676
+ },
9677
+ "type": "objectTypeReference",
9678
+ },
9679
+ "required": {
9680
+ "required": {},
9681
+ "type": "required",
9682
+ },
9683
+ },
9684
+ },
9685
+ },
9686
+ },
9687
+ "sectionValidations": {},
9688
+ },
9689
+ },
9690
+ "metadata": {
9691
+ "apiName": "com.palantir.create-example-interface",
9692
+ "displayMetadata": {
9693
+ "configuration": {
9694
+ "defaultLayout": "FORM",
9695
+ "displayAndFormat": {
9696
+ "table": {
9697
+ "columnWidthByParameterRid": {},
9698
+ "enableFileImport": true,
9699
+ "fitHorizontally": false,
9700
+ "frozenColumnCount": 0,
9701
+ "rowHeightInLines": 1,
9702
+ },
9703
+ },
9704
+ "enableLayoutUserSwitch": false,
9705
+ },
9706
+ "description": "",
9707
+ "displayName": "Create exampleInterface",
9708
+ "icon": {
9709
+ "blueprint": {
9710
+ "color": "#000000",
9711
+ "locator": "edit",
9712
+ },
9713
+ "type": "blueprint",
9714
+ },
9715
+ "successMessage": [],
9716
+ "typeClasses": [],
9717
+ },
9718
+ "entities": {
9719
+ "affectedInterfaceTypes": [
9720
+ "com.palantir.exampleInterface",
9721
+ ],
9722
+ "affectedLinkTypes": [],
9723
+ "affectedObjectTypes": [],
9724
+ "typeGroups": [],
9725
+ },
9726
+ "formContentOrdering": [],
9727
+ "parameterOrdering": [
9728
+ "objectTypeParameter",
9729
+ "com.palantir.property1",
9730
+ ],
9731
+ "parameters": {
9732
+ "com.palantir.property1": {
9733
+ "displayMetadata": {
9734
+ "description": "",
9735
+ "displayName": "property1",
9736
+ "typeClasses": [],
9737
+ },
9738
+ "id": "com.palantir.property1",
9739
+ "type": {
9740
+ "string": {},
9741
+ "type": "string",
9742
+ },
9743
+ },
9744
+ "objectTypeParameter": {
9745
+ "displayMetadata": {
9746
+ "description": "",
9747
+ "displayName": "Object type to create",
9748
+ "typeClasses": [],
9749
+ },
9750
+ "id": "objectTypeParameter",
9751
+ "type": {
9752
+ "objectTypeReference": {
9753
+ "interfaceTypeRids": [
9754
+ "com.palantir.exampleInterface",
9755
+ ],
9756
+ },
9757
+ "type": "objectTypeReference",
9758
+ },
9759
+ },
9760
+ },
9761
+ "sections": {},
9762
+ "status": {
9763
+ "active": {},
9764
+ "type": "active",
9765
+ },
9766
+ },
9767
+ },
9768
+ },
9769
+ "com.palantir.modify-example-interface": {
9770
+ "actionType": {
9771
+ "actionTypeLogic": {
9772
+ "logic": {
9773
+ "rules": [
9774
+ {
9775
+ "modifyInterfaceRule": {
9776
+ "interfaceObjectToModifyParameter": "interfaceObjectToModifyParameter",
9777
+ "sharedPropertyValues": {
9778
+ "com.palantir.property1": {
9779
+ "parameterId": "com.palantir.property1",
9780
+ "type": "parameterId",
8615
9781
  },
8616
9782
  },
8617
9783
  },
9784
+ "type": "modifyInterfaceRule",
9785
+ },
9786
+ ],
9787
+ },
9788
+ "validation": {
9789
+ "actionTypeLevelValidation": {
9790
+ "rules": {
9791
+ "0": {
9792
+ "condition": {
9793
+ "true": {},
9794
+ "type": "true",
9795
+ },
9796
+ "displayMetadata": {
9797
+ "failureMessage": "",
9798
+ "typeClasses": [],
9799
+ },
9800
+ },
8618
9801
  },
8619
- "managedBy": {
9802
+ },
9803
+ "parameterValidations": {
9804
+ "com.palantir.property1": {
8620
9805
  "conditionalOverrides": [],
8621
9806
  "defaultValidation": {
8622
9807
  "display": {
8623
- "prefill": {
8624
- "objectParameterPropertyValue": {
8625
- "parameterId": "myManager",
8626
- "propertyTypeId": "id",
8627
- },
8628
- "type": "objectParameterPropertyValue",
8629
- },
8630
9808
  "renderHint": {
8631
9809
  "textInput": {},
8632
9810
  "type": "textInput",
@@ -8645,13 +9823,13 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8645
9823
  "type": "text",
8646
9824
  },
8647
9825
  "required": {
8648
- "notRequired": {},
8649
- "type": "notRequired",
9826
+ "required": {},
9827
+ "type": "required",
8650
9828
  },
8651
9829
  },
8652
9830
  },
8653
9831
  },
8654
- "myManager": {
9832
+ "interfaceObjectToModifyParameter": {
8655
9833
  "conditionalOverrides": [],
8656
9834
  "defaultValidation": {
8657
9835
  "display": {
@@ -8666,15 +9844,15 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8666
9844
  },
8667
9845
  "validation": {
8668
9846
  "allowedValues": {
8669
- "objectQuery": {
8670
- "objectQuery": {},
8671
- "type": "objectQuery",
9847
+ "interfaceObjectQuery": {
9848
+ "interfaceObjectQuery": {},
9849
+ "type": "interfaceObjectQuery",
8672
9850
  },
8673
- "type": "objectQuery",
9851
+ "type": "interfaceObjectQuery",
8674
9852
  },
8675
9853
  "required": {
8676
- "notRequired": {},
8677
- "type": "notRequired",
9854
+ "required": {},
9855
+ "type": "required",
8678
9856
  },
8679
9857
  },
8680
9858
  },
@@ -8684,7 +9862,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8684
9862
  },
8685
9863
  },
8686
9864
  "metadata": {
8687
- "apiName": "com.palantir.create-object-employee",
9865
+ "apiName": "com.palantir.modify-example-interface",
8688
9866
  "displayMetadata": {
8689
9867
  "configuration": {
8690
9868
  "defaultLayout": "FORM",
@@ -8700,7 +9878,7 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8700
9878
  "enableLayoutUserSwitch": false,
8701
9879
  },
8702
9880
  "description": "",
8703
- "displayName": "Create Employee",
9881
+ "displayName": "Modify exampleInterface",
8704
9882
  "icon": {
8705
9883
  "blueprint": {
8706
9884
  "color": "#000000",
@@ -8712,320 +9890,172 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
8712
9890
  "typeClasses": [],
8713
9891
  },
8714
9892
  "entities": {
8715
- "affectedInterfaceTypes": [],
8716
- "affectedLinkTypes": [],
8717
- "affectedObjectTypes": [
8718
- "com.palantir.employee",
9893
+ "affectedInterfaceTypes": [
9894
+ "com.palantir.exampleInterface",
8719
9895
  ],
9896
+ "affectedLinkTypes": [],
9897
+ "affectedObjectTypes": [],
8720
9898
  "typeGroups": [],
8721
9899
  },
8722
9900
  "formContentOrdering": [],
8723
9901
  "parameterOrdering": [
8724
- "myManager",
8725
- "id",
8726
- "managedBy",
9902
+ "interfaceObjectToModifyParameter",
9903
+ "com.palantir.property1",
8727
9904
  ],
8728
9905
  "parameters": {
8729
- "id": {
8730
- "displayMetadata": {
8731
- "description": "",
8732
- "displayName": "ID",
8733
- "typeClasses": [],
8734
- },
8735
- "id": "id",
8736
- "type": {
8737
- "string": {},
8738
- "type": "string",
8739
- },
8740
- },
8741
- "managedBy": {
8742
- "displayMetadata": {
8743
- "description": "",
8744
- "displayName": "ManagedBy",
8745
- "typeClasses": [],
8746
- },
8747
- "id": "managedBy",
8748
- "type": {
8749
- "string": {},
8750
- "type": "string",
8751
- },
8752
- },
8753
- "myManager": {
8754
- "displayMetadata": {
8755
- "description": "",
8756
- "displayName": "MyManager",
8757
- "typeClasses": [],
8758
- },
8759
- "id": "myManager",
8760
- "type": {
8761
- "objectReference": {
8762
- "objectTypeId": "com.palantir.manager",
8763
- },
8764
- "type": "objectReference",
8765
- },
8766
- },
8767
- },
8768
- "sections": {},
8769
- "status": {
8770
- "active": {},
8771
- "type": "active",
8772
- },
8773
- },
8774
- },
8775
- },
8776
- },
8777
- "blockPermissionInformation": {
8778
- "actionTypes": {},
8779
- "linkTypes": {},
8780
- "objectTypes": {},
8781
- },
8782
- "interfaceTypes": {},
8783
- "linkTypes": {},
8784
- "objectTypes": {
8785
- "com.palantir.employee": {
8786
- "datasources": [
8787
- {
8788
- "datasource": {
8789
- "datasetV2": {
8790
- "datasetRid": "com.palantir.employee",
8791
- "propertyMapping": {
8792
- "id": {
8793
- "column": "id",
8794
- "type": "column",
8795
- },
8796
- "managedBy": {
8797
- "column": "managedBy",
8798
- "type": "column",
8799
- },
8800
- },
8801
- },
8802
- "type": "datasetV2",
8803
- },
8804
- "editsConfiguration": {
8805
- "onlyAllowPrivilegedEdits": false,
8806
- },
8807
- "redacted": false,
8808
- "rid": "ri.ontology.main.datasource.com.palantir.employee",
8809
- },
8810
- ],
8811
- "entityMetadata": {
8812
- "arePatchesEnabled": false,
8813
- },
8814
- "objectType": {
8815
- "allImplementsInterfaces": {},
8816
- "apiName": "com.palantir.employee",
8817
- "displayMetadata": {
8818
- "description": undefined,
8819
- "displayName": "Employee",
8820
- "groupDisplayName": undefined,
8821
- "icon": {
8822
- "blueprint": {
8823
- "color": "#2D72D2",
8824
- "locator": "cube",
8825
- },
8826
- "type": "blueprint",
8827
- },
8828
- "pluralDisplayName": "Employees",
8829
- "visibility": "NORMAL",
8830
- },
8831
- "implementsInterfaces2": [],
8832
- "primaryKeys": [
8833
- "id",
8834
- ],
8835
- "propertyTypes": {
8836
- "id": {
8837
- "apiName": "id",
8838
- "baseFormatter": undefined,
8839
- "dataConstraints": undefined,
8840
- "displayMetadata": {
8841
- "description": "dummy",
8842
- "displayName": "ID",
8843
- "visibility": "NORMAL",
8844
- },
8845
- "indexedForSearch": true,
8846
- "inlineAction": undefined,
8847
- "ruleSetBinding": undefined,
8848
- "sharedPropertyTypeApiName": undefined,
8849
- "sharedPropertyTypeRid": undefined,
8850
- "status": {
8851
- "active": {},
8852
- "type": "active",
8853
- },
8854
- "type": {
8855
- "string": {
8856
- "analyzerOverride": undefined,
8857
- "enableAsciiFolding": undefined,
8858
- "isLongText": false,
8859
- "supportsEfficientLeadingWildcard": false,
8860
- "supportsExactMatching": true,
8861
- },
8862
- "type": "string",
8863
- },
8864
- "typeClasses": [
8865
- {
8866
- "kind": "render_hint",
8867
- "name": "SELECTABLE",
8868
- },
8869
- {
8870
- "kind": "render_hint",
8871
- "name": "SORTABLE",
8872
- },
8873
- ],
8874
- "valueType": undefined,
8875
- },
8876
- "managedBy": {
8877
- "apiName": "managedBy",
8878
- "baseFormatter": undefined,
8879
- "dataConstraints": undefined,
8880
- "displayMetadata": {
8881
- "description": undefined,
8882
- "displayName": "ManagedBy",
8883
- "visibility": "NORMAL",
8884
- },
8885
- "indexedForSearch": true,
8886
- "inlineAction": undefined,
8887
- "ruleSetBinding": undefined,
8888
- "sharedPropertyTypeApiName": undefined,
8889
- "sharedPropertyTypeRid": undefined,
8890
- "status": {
8891
- "active": {},
8892
- "type": "active",
8893
- },
8894
- "type": {
8895
- "string": {
8896
- "analyzerOverride": undefined,
8897
- "enableAsciiFolding": undefined,
8898
- "isLongText": false,
8899
- "supportsEfficientLeadingWildcard": false,
8900
- "supportsExactMatching": true,
8901
- },
8902
- "type": "string",
8903
- },
8904
- "typeClasses": [
8905
- {
8906
- "kind": "render_hint",
8907
- "name": "SELECTABLE",
8908
- },
8909
- {
8910
- "kind": "render_hint",
8911
- "name": "SORTABLE",
8912
- },
8913
- ],
8914
- "valueType": undefined,
8915
- },
8916
- },
8917
- "redacted": false,
8918
- "status": {
8919
- "active": {},
8920
- "type": "active",
8921
- },
8922
- "titlePropertyTypeRid": "id",
8923
- },
8924
- },
8925
- "com.palantir.manager": {
8926
- "datasources": [
8927
- {
8928
- "datasource": {
8929
- "datasetV2": {
8930
- "datasetRid": "com.palantir.manager",
8931
- "propertyMapping": {
8932
- "id": {
8933
- "column": "id",
8934
- "type": "column",
9906
+ "com.palantir.property1": {
9907
+ "displayMetadata": {
9908
+ "description": "",
9909
+ "displayName": "property1",
9910
+ "typeClasses": [],
9911
+ },
9912
+ "id": "com.palantir.property1",
9913
+ "type": {
9914
+ "string": {},
9915
+ "type": "string",
9916
+ },
9917
+ },
9918
+ "interfaceObjectToModifyParameter": {
9919
+ "displayMetadata": {
9920
+ "description": "",
9921
+ "displayName": "Object type to modify",
9922
+ "typeClasses": [],
9923
+ },
9924
+ "id": "interfaceObjectToModifyParameter",
9925
+ "type": {
9926
+ "interfaceReference": {
9927
+ "interfaceTypeRid": "com.palantir.exampleInterface",
8935
9928
  },
9929
+ "type": "interfaceReference",
8936
9930
  },
8937
9931
  },
8938
- "type": "datasetV2",
8939
9932
  },
8940
- "editsConfiguration": {
8941
- "onlyAllowPrivilegedEdits": false,
9933
+ "sections": {},
9934
+ "status": {
9935
+ "active": {},
9936
+ "type": "active",
8942
9937
  },
8943
- "redacted": false,
8944
- "rid": "ri.ontology.main.datasource.com.palantir.manager",
8945
9938
  },
8946
- ],
8947
- "entityMetadata": {
8948
- "arePatchesEnabled": true,
8949
9939
  },
8950
- "objectType": {
8951
- "allImplementsInterfaces": {},
8952
- "apiName": "com.palantir.manager",
9940
+ },
9941
+ },
9942
+ "blockPermissionInformation": {
9943
+ "actionTypes": {},
9944
+ "linkTypes": {},
9945
+ "objectTypes": {},
9946
+ },
9947
+ "interfaceTypes": {
9948
+ "com.palantir.exampleInterface": {
9949
+ "interfaceType": {
9950
+ "apiName": "com.palantir.exampleInterface",
8953
9951
  "displayMetadata": {
8954
- "description": undefined,
8955
- "displayName": "Manager",
8956
- "groupDisplayName": undefined,
9952
+ "description": "exampleInterface",
9953
+ "displayName": "exampleInterface",
8957
9954
  "icon": {
8958
9955
  "blueprint": {
8959
- "color": "#2D72D2",
8960
- "locator": "cube",
9956
+ "color": "#4C90F0",
9957
+ "locator": "layout-hierarchy",
8961
9958
  },
8962
9959
  "type": "blueprint",
8963
9960
  },
8964
- "pluralDisplayName": "Managers",
8965
- "visibility": "NORMAL",
8966
9961
  },
8967
- "implementsInterfaces2": [],
8968
- "primaryKeys": [
8969
- "id",
8970
- ],
8971
- "propertyTypes": {
8972
- "id": {
8973
- "apiName": "id",
8974
- "baseFormatter": undefined,
8975
- "dataConstraints": undefined,
8976
- "displayMetadata": {
8977
- "description": "dummy",
8978
- "displayName": "ID",
8979
- "visibility": "NORMAL",
8980
- },
8981
- "indexedForSearch": true,
8982
- "inlineAction": undefined,
8983
- "ruleSetBinding": undefined,
8984
- "sharedPropertyTypeApiName": undefined,
8985
- "sharedPropertyTypeRid": undefined,
8986
- "status": {
8987
- "active": {},
8988
- "type": "active",
8989
- },
8990
- "type": {
8991
- "string": {
8992
- "analyzerOverride": undefined,
8993
- "enableAsciiFolding": undefined,
8994
- "isLongText": false,
8995
- "supportsEfficientLeadingWildcard": false,
8996
- "supportsExactMatching": true,
8997
- },
8998
- "type": "string",
8999
- },
9000
- "typeClasses": [
9001
- {
9002
- "kind": "render_hint",
9003
- "name": "SELECTABLE",
9962
+ "extendsInterfaces": [],
9963
+ "links": [],
9964
+ "properties": [],
9965
+ "propertiesV2": {
9966
+ "com.palantir.property1": {
9967
+ "required": true,
9968
+ "sharedPropertyType": {
9969
+ "aliases": [],
9970
+ "apiName": "com.palantir.property1",
9971
+ "baseFormatter": undefined,
9972
+ "dataConstraints": undefined,
9973
+ "displayMetadata": {
9974
+ "description": undefined,
9975
+ "displayName": "property1",
9976
+ "visibility": "NORMAL",
9004
9977
  },
9005
- {
9006
- "kind": "render_hint",
9007
- "name": "SORTABLE",
9978
+ "gothamMapping": undefined,
9979
+ "indexedForSearch": true,
9980
+ "type": {
9981
+ "string": {
9982
+ "analyzerOverride": undefined,
9983
+ "enableAsciiFolding": undefined,
9984
+ "isLongText": false,
9985
+ "supportsEfficientLeadingWildcard": false,
9986
+ "supportsExactMatching": true,
9987
+ },
9988
+ "type": "string",
9008
9989
  },
9009
- ],
9010
- "valueType": undefined,
9990
+ "typeClasses": [
9991
+ {
9992
+ "kind": "render_hint",
9993
+ "name": "SELECTABLE",
9994
+ },
9995
+ {
9996
+ "kind": "render_hint",
9997
+ "name": "SORTABLE",
9998
+ },
9999
+ ],
10000
+ "valueType": undefined,
10001
+ },
9011
10002
  },
9012
10003
  },
9013
- "redacted": false,
10004
+ "propertiesV3": {},
10005
+ "searchable": true,
9014
10006
  "status": {
9015
10007
  "active": {},
9016
10008
  "type": "active",
9017
10009
  },
9018
- "titlePropertyTypeRid": "id",
9019
10010
  },
9020
10011
  },
9021
10012
  },
9022
- "sharedPropertyTypes": {},
10013
+ "linkTypes": {},
10014
+ "objectTypes": {},
10015
+ "sharedPropertyTypes": {
10016
+ "com.palantir.property1": {
10017
+ "sharedPropertyType": {
10018
+ "aliases": [],
10019
+ "apiName": "com.palantir.property1",
10020
+ "baseFormatter": undefined,
10021
+ "dataConstraints": undefined,
10022
+ "displayMetadata": {
10023
+ "description": undefined,
10024
+ "displayName": "property1",
10025
+ "visibility": "NORMAL",
10026
+ },
10027
+ "gothamMapping": undefined,
10028
+ "indexedForSearch": true,
10029
+ "type": {
10030
+ "string": {
10031
+ "analyzerOverride": undefined,
10032
+ "enableAsciiFolding": undefined,
10033
+ "isLongText": false,
10034
+ "supportsEfficientLeadingWildcard": false,
10035
+ "supportsExactMatching": true,
10036
+ },
10037
+ "type": "string",
10038
+ },
10039
+ "typeClasses": [
10040
+ {
10041
+ "kind": "render_hint",
10042
+ "name": "SELECTABLE",
10043
+ },
10044
+ {
10045
+ "kind": "render_hint",
10046
+ "name": "SORTABLE",
10047
+ },
10048
+ ],
10049
+ "valueType": undefined,
10050
+ },
10051
+ },
10052
+ },
9023
10053
  },
9024
10054
  "valueTypes": {
9025
10055
  "valueTypes": [],
9026
10056
  },
9027
10057
  }
9028
- `);});it("Simple interface actions (without object types) are properly defined",()=>{const exampleInterface=defineInterface({apiName:"exampleInterface",properties:{property1:"string"}});defineCreateInterfaceObjectAction(exampleInterface);defineModifyInterfaceObjectAction(exampleInterface);expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
10058
+ `);});it("Interface actions with customizations are properly defined",()=>{const exampleInterface=defineInterface({apiName:"exampleInterface",properties:{property1:"string",property2:"string"}});defineCreateInterfaceObjectAction({interfaceType:exampleInterface,excludedProperties:["property2"]});defineModifyInterfaceObjectAction({interfaceType:exampleInterface,excludedProperties:["property2"]});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
9029
10059
  {
9030
10060
  "importedOntology": {
9031
10061
  "actionTypes": {},
@@ -9457,6 +10487,43 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
9457
10487
  "valueType": undefined,
9458
10488
  },
9459
10489
  },
10490
+ "com.palantir.property2": {
10491
+ "required": true,
10492
+ "sharedPropertyType": {
10493
+ "aliases": [],
10494
+ "apiName": "com.palantir.property2",
10495
+ "baseFormatter": undefined,
10496
+ "dataConstraints": undefined,
10497
+ "displayMetadata": {
10498
+ "description": undefined,
10499
+ "displayName": "property2",
10500
+ "visibility": "NORMAL",
10501
+ },
10502
+ "gothamMapping": undefined,
10503
+ "indexedForSearch": true,
10504
+ "type": {
10505
+ "string": {
10506
+ "analyzerOverride": undefined,
10507
+ "enableAsciiFolding": undefined,
10508
+ "isLongText": false,
10509
+ "supportsEfficientLeadingWildcard": false,
10510
+ "supportsExactMatching": true,
10511
+ },
10512
+ "type": "string",
10513
+ },
10514
+ "typeClasses": [
10515
+ {
10516
+ "kind": "render_hint",
10517
+ "name": "SELECTABLE",
10518
+ },
10519
+ {
10520
+ "kind": "render_hint",
10521
+ "name": "SORTABLE",
10522
+ },
10523
+ ],
10524
+ "valueType": undefined,
10525
+ },
10526
+ },
9460
10527
  },
9461
10528
  "propertiesV3": {},
9462
10529
  "searchable": true,
@@ -9506,6 +10573,42 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
9506
10573
  "valueType": undefined,
9507
10574
  },
9508
10575
  },
10576
+ "com.palantir.property2": {
10577
+ "sharedPropertyType": {
10578
+ "aliases": [],
10579
+ "apiName": "com.palantir.property2",
10580
+ "baseFormatter": undefined,
10581
+ "dataConstraints": undefined,
10582
+ "displayMetadata": {
10583
+ "description": undefined,
10584
+ "displayName": "property2",
10585
+ "visibility": "NORMAL",
10586
+ },
10587
+ "gothamMapping": undefined,
10588
+ "indexedForSearch": true,
10589
+ "type": {
10590
+ "string": {
10591
+ "analyzerOverride": undefined,
10592
+ "enableAsciiFolding": undefined,
10593
+ "isLongText": false,
10594
+ "supportsEfficientLeadingWildcard": false,
10595
+ "supportsExactMatching": true,
10596
+ },
10597
+ "type": "string",
10598
+ },
10599
+ "typeClasses": [
10600
+ {
10601
+ "kind": "render_hint",
10602
+ "name": "SELECTABLE",
10603
+ },
10604
+ {
10605
+ "kind": "render_hint",
10606
+ "name": "SORTABLE",
10607
+ },
10608
+ ],
10609
+ "valueType": undefined,
10610
+ },
10611
+ },
9509
10612
  },
9510
10613
  },
9511
10614
  "valueTypes": {
@@ -9768,11 +10871,11 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
9768
10871
  },
9769
10872
  "type": "datasetV2",
9770
10873
  },
10874
+ "datasourceName": "com.palantir.sampleObject",
9771
10875
  "editsConfiguration": {
9772
10876
  "onlyAllowPrivilegedEdits": false,
9773
10877
  },
9774
10878
  "redacted": false,
9775
- "rid": "ri.ontology.main.datasource.com.palantir.sampleObject",
9776
10879
  },
9777
10880
  ],
9778
10881
  "entityMetadata": {
@@ -10152,11 +11255,11 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
10152
11255
  },
10153
11256
  "type": "datasetV2",
10154
11257
  },
11258
+ "datasourceName": "com.palantir.sampleObject",
10155
11259
  "editsConfiguration": {
10156
11260
  "onlyAllowPrivilegedEdits": false,
10157
11261
  },
10158
11262
  "redacted": false,
10159
- "rid": "ri.ontology.main.datasource.com.palantir.sampleObject",
10160
11263
  },
10161
11264
  ],
10162
11265
  "entityMetadata": {
@@ -10896,11 +11999,11 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
10896
11999
  },
10897
12000
  "type": "datasetV2",
10898
12001
  },
12002
+ "datasourceName": "com.palantir.objectWithArrays",
10899
12003
  "editsConfiguration": {
10900
12004
  "onlyAllowPrivilegedEdits": false,
10901
12005
  },
10902
12006
  "redacted": false,
10903
- "rid": "ri.ontology.main.datasource.com.palantir.objectWithArrays",
10904
12007
  },
10905
12008
  ],
10906
12009
  "entityMetadata": {
@@ -11410,11 +12513,11 @@ const employeeObject=defineObject({apiName:"employee",displayName:"Employee",plu
11410
12513
  },
11411
12514
  "type": "datasetV2",
11412
12515
  },
12516
+ "datasourceName": "com.palantir.sampleObject",
11413
12517
  "editsConfiguration": {
11414
12518
  "onlyAllowPrivilegedEdits": false,
11415
12519
  },
11416
12520
  "redacted": false,
11417
- "rid": "ri.ontology.main.datasource.com.palantir.sampleObject",
11418
12521
  },
11419
12522
  ],
11420
12523
  "entityMetadata": {
@@ -11845,11 +12948,11 @@ parameterOrdering:["foo","id"]});}).toThrowErrorMatchingInlineSnapshot(`[Error:
11845
12948
  },
11846
12949
  "type": "datasetV2",
11847
12950
  },
12951
+ "datasourceName": "com.palantir.sampleObject",
11848
12952
  "editsConfiguration": {
11849
12953
  "onlyAllowPrivilegedEdits": false,
11850
12954
  },
11851
12955
  "redacted": false,
11852
- "rid": "ri.ontology.main.datasource.com.palantir.sampleObject",
11853
12956
  },
11854
12957
  ],
11855
12958
  "entityMetadata": {
@@ -12013,7 +13116,7 @@ parameterOrdering:["foo","id"]});}).toThrowErrorMatchingInlineSnapshot(`[Error:
12013
13116
  "valueTypes": [],
12014
13117
  },
12015
13118
  }
12016
- `);});it("Interface actions validate SPT existence",()=>{const spt=defineSharedPropertyType({apiName:"spt",type:"string"});const importedInterface={"apiName":"com.palantir.other.ontology.event.Event","displayMetadata":{"displayName":"Event","description":"Event","icon":{"type":"blueprint","blueprint":{"color":"#4C90F0","locator":"timeline-events"}}},"extendsInterfaces":[],"links":[],"status":{"type":"active","active":{}},"propertiesV2":{"com.palantir.other.ontology.types.id":{"required":true,"sharedPropertyType":{"displayName":"Id","apiName":"com.palantir.other.ontology.types.id","type":"string","nonNameSpacedApiName":"id","typeClasses":[{"kind":"render_hint","name":"SELECTABLE"},{"kind":"render_hint","name":"SORTABLE"}],"__type":"SHARED_PROPERTY_TYPE"}}},"searchable":false,"__type":"INTERFACE_TYPE"};importOntologyEntity(importedInterface);const interfaceType=defineInterface({apiName:"interfaceType",properties:{spt},extends:importedInterface});expect(()=>defineAction({apiName:"action",displayName:"action",status:"active",parameters:[{id:"interfaceObjectToModifyParameter",displayName:"Interface object to modify",type:{type:"interfaceReference",interfaceReference:{interfaceTypeRid:interfaceType.apiName}},validation:{required:true,allowedValues:{type:"interfaceObjectQuery"}}},{id:"sptParameter",displayName:"SPT",type:"string",validation:{required:true,allowedValues:{type:"text"}}},{id:"otherParameter",displayName:"Other parameter",type:"string",validation:{required:true,allowedValues:{type:"text"}}}],rules:[{type:"modifyInterfaceRule",modifyInterfaceRule:{interfaceObjectToModifyParameter:"interfaceObjectToModifyParameter",sharedPropertyValues:{spt:{type:"parameterId",parameterId:"sptParameter"},"com.palantir.other.invalid.spt":{type:"staticValue",staticValue:{type:"double",double:4}},other:{type:"parameterId",parameterId:"otherParameter"}}}}]})).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Shared property type com.palantir.other.invalid.spt does not exist in interface type com.palantir.interfaceType]`);expect(()=>defineCreateInterfaceObjectAction(interfaceType)).not.toThrow();});it("Interface actions validate SPT existence on the interface",()=>{expect(()=>{const spt=defineSharedPropertyType({apiName:"spt",type:"string"});const pulseRepetitionIntervalSecs={"apiName":"com.palantir.other.ontology.pulseRepetitionIntervalSecs","displayName":"Pulse Repetition Interval (s)","description":"Pulse Repetition Interval in seconds.","type":"double","nonNameSpacedApiName":"pulseRepetitionIntervalSecs","typeClasses":[],"__type":OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE};importOntologyEntity(pulseRepetitionIntervalSecs);const interfaceType=defineInterface({apiName:"interfaceType",properties:{spt}});defineAction({apiName:"action",displayName:"action",status:"active",parameters:[{id:"interfaceObjectToModifyParameter",displayName:"Interface object to modify",type:{type:"interfaceReference",interfaceReference:{interfaceTypeRid:interfaceType.apiName}},validation:{required:true,allowedValues:{type:"interfaceObjectQuery"}}},{id:"sptParameter",displayName:"SPT",type:"string",validation:{required:true,allowedValues:{type:"text"}}}],rules:[{type:"modifyInterfaceRule",modifyInterfaceRule:{interfaceObjectToModifyParameter:"interfaceObjectToModifyParameter",sharedPropertyValues:{spt:{type:"parameterId",parameterId:"sptParameter"},[pulseRepetitionIntervalSecs.apiName]:{type:"staticValue",staticValue:{type:"double",double:4}}}}}]});}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Shared property type com.palantir.other.ontology.pulseRepetitionIntervalSecs does not exist in interface type com.palantir.interfaceType]`);});});describe("Imports",()=>{it("Legacy importing works",()=>{const id=importSharedPropertyType({apiName:"id",packageName:"com.palantir.core.ontology.types",typeHint:"string"});defineInterface({apiName:"myInterface",properties:{id}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
13119
+ `);});it("Interface actions validate SPT existence",()=>{const spt=defineSharedPropertyType({apiName:"spt",type:"string"});const importedInterface={"apiName":"com.palantir.other.ontology.event.Event","displayMetadata":{"displayName":"Event","description":"Event","icon":{"type":"blueprint","blueprint":{"color":"#4C90F0","locator":"timeline-events"}}},"extendsInterfaces":[],"links":[],"status":{"type":"active","active":{}},"propertiesV2":{"com.palantir.other.ontology.types.id":{"required":true,"sharedPropertyType":{"displayName":"Id","apiName":"com.palantir.other.ontology.types.id","type":"string","nonNameSpacedApiName":"id","typeClasses":[{"kind":"render_hint","name":"SELECTABLE"},{"kind":"render_hint","name":"SORTABLE"}],"__type":"SHARED_PROPERTY_TYPE"}}},"searchable":false,"__type":"INTERFACE_TYPE"};importOntologyEntity(importedInterface);const interfaceType=defineInterface({apiName:"interfaceType",properties:{spt},extends:importedInterface});expect(()=>defineAction({apiName:"action",displayName:"action",status:"active",parameters:[{id:"interfaceObjectToModifyParameter",displayName:"Interface object to modify",type:{type:"interfaceReference",interfaceReference:{interfaceTypeRid:interfaceType.apiName}},validation:{required:true,allowedValues:{type:"interfaceObjectQuery"}}},{id:"sptParameter",displayName:"SPT",type:"string",validation:{required:true,allowedValues:{type:"text"}}},{id:"otherParameter",displayName:"Other parameter",type:"string",validation:{required:true,allowedValues:{type:"text"}}}],rules:[{type:"modifyInterfaceRule",modifyInterfaceRule:{interfaceObjectToModifyParameter:"interfaceObjectToModifyParameter",sharedPropertyValues:{spt:{type:"parameterId",parameterId:"sptParameter"},"com.palantir.other.invalid.spt":{type:"staticValue",staticValue:{type:"double",double:4}},other:{type:"parameterId",parameterId:"otherParameter"}}}}]})).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Shared property type com.palantir.other.invalid.spt does not exist in interface type com.palantir.interfaceType]`);expect(()=>defineCreateInterfaceObjectAction({interfaceType:interfaceType})).not.toThrow();});it("Interface actions validate SPT existence on the interface",()=>{expect(()=>{const spt=defineSharedPropertyType({apiName:"spt",type:"string"});const pulseRepetitionIntervalSecs={"apiName":"com.palantir.other.ontology.pulseRepetitionIntervalSecs","displayName":"Pulse Repetition Interval (s)","description":"Pulse Repetition Interval in seconds.","type":"double","nonNameSpacedApiName":"pulseRepetitionIntervalSecs","typeClasses":[],"__type":OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE};importOntologyEntity(pulseRepetitionIntervalSecs);const interfaceType=defineInterface({apiName:"interfaceType",properties:{spt}});defineAction({apiName:"action",displayName:"action",status:"active",parameters:[{id:"interfaceObjectToModifyParameter",displayName:"Interface object to modify",type:{type:"interfaceReference",interfaceReference:{interfaceTypeRid:interfaceType.apiName}},validation:{required:true,allowedValues:{type:"interfaceObjectQuery"}}},{id:"sptParameter",displayName:"SPT",type:"string",validation:{required:true,allowedValues:{type:"text"}}}],rules:[{type:"modifyInterfaceRule",modifyInterfaceRule:{interfaceObjectToModifyParameter:"interfaceObjectToModifyParameter",sharedPropertyValues:{spt:{type:"parameterId",parameterId:"sptParameter"},[pulseRepetitionIntervalSecs.apiName]:{type:"staticValue",staticValue:{type:"double",double:4}}}}}]});}).toThrowErrorMatchingInlineSnapshot(`[Error: Invariant failed: Shared property type com.palantir.other.ontology.pulseRepetitionIntervalSecs does not exist in interface type com.palantir.interfaceType]`);});});describe("Imports",()=>{it("Legacy importing works",()=>{const id=importSharedPropertyType({apiName:"id",packageName:"com.palantir.core.ontology.types",typeHint:"string"});defineInterface({apiName:"myInterface",properties:{id}});expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
12017
13120
  {
12018
13121
  "importedOntology": {
12019
13122
  "actionTypes": {},
@@ -12650,11 +13753,11 @@ const spt={apiName:"com.other.package.spt",nonNameSpacedApiName:"spt",type:"stri
12650
13753
  },
12651
13754
  "type": "datasetV2",
12652
13755
  },
13756
+ "datasourceName": "com.palantir.objectDef",
12653
13757
  "editsConfiguration": {
12654
13758
  "onlyAllowPrivilegedEdits": false,
12655
13759
  },
12656
13760
  "redacted": false,
12657
- "rid": "ri.ontology.main.datasource.com.palantir.objectDef",
12658
13761
  },
12659
13762
  ],
12660
13763
  "entityMetadata": {