@osdk/maker 0.15.0 → 0.16.0-beta.10

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