@osdk/maker-experimental 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/build/browser/api/importObjectType.js +53 -0
- package/build/browser/api/importObjectType.js.map +1 -0
- package/build/browser/api/overall.test.js +597 -0
- package/build/browser/api/overall.test.js.map +1 -0
- package/build/browser/api/types.js +2 -0
- package/build/browser/api/types.js.map +1 -0
- package/build/browser/index.js +18 -0
- package/build/browser/index.js.map +1 -0
- package/build/cjs/chunk-HKURHHWY.cjs +17 -0
- package/build/cjs/chunk-HKURHHWY.cjs.map +1 -0
- package/build/cjs/index.cjs +2425 -0
- package/build/cjs/index.cjs.map +1 -0
- package/build/cjs/index.d.cts +19 -0
- package/build/cjs/prompt-CVWBIE7L.cjs +955 -0
- package/build/cjs/prompt-CVWBIE7L.cjs.map +1 -0
- package/build/esm/api/importObjectType.js +53 -0
- package/build/esm/api/importObjectType.js.map +1 -0
- package/build/esm/api/overall.test.js +597 -0
- package/build/esm/api/overall.test.js.map +1 -0
- package/build/esm/api/types.js +2 -0
- package/build/esm/api/types.js.map +1 -0
- package/build/esm/index.js +18 -0
- package/build/esm/index.js.map +1 -0
- package/build/types/api/importObjectType.d.ts +3 -0
- package/build/types/api/importObjectType.d.ts.map +1 -0
- package/build/types/api/overall.test.d.ts +1 -0
- package/build/types/api/overall.test.d.ts.map +1 -0
- package/build/types/api/types.d.ts +13 -0
- package/build/types/api/types.d.ts.map +1 -0
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -0
- package/package.json +71 -0
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
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 { convertToDisplayName, convertToPluralDisplayName, convertType, importOntologyEntity, OntologyEntityTypeEnum } from "@osdk/maker";
|
|
18
|
+
/*
|
|
19
|
+
* Takes in the minimal object definition to create an input shape.
|
|
20
|
+
* First converts it to fake block data to call importOntologyEntity,
|
|
21
|
+
* then converts it to an OntologyIrImportedObjectType that is safe to use elsewhere.
|
|
22
|
+
*/
|
|
23
|
+
export function defineImportObject(objectDef) {
|
|
24
|
+
const properties = Object.entries(objectDef.properties ?? {}).map(([apiName, type]) => ({
|
|
25
|
+
apiName: apiName,
|
|
26
|
+
displayName: convertToDisplayName(apiName),
|
|
27
|
+
type: type.type
|
|
28
|
+
}));
|
|
29
|
+
const finalObject = {
|
|
30
|
+
apiName: objectDef.apiName,
|
|
31
|
+
properties: properties,
|
|
32
|
+
__type: OntologyEntityTypeEnum.OBJECT_TYPE,
|
|
33
|
+
// the rest don't matter for now
|
|
34
|
+
displayName: objectDef.displayName ?? convertToDisplayName(objectDef.apiName),
|
|
35
|
+
pluralDisplayName: convertToPluralDisplayName(objectDef.apiName),
|
|
36
|
+
primaryKeyPropertyApiName: properties[0]?.apiName,
|
|
37
|
+
titlePropertyApiName: properties[0]?.apiName
|
|
38
|
+
};
|
|
39
|
+
importOntologyEntity(finalObject);
|
|
40
|
+
const importPropertyTypes = Object.entries(objectDef.properties).map(([apiName, importedPt]) => ({
|
|
41
|
+
...importedPt,
|
|
42
|
+
apiName: apiName,
|
|
43
|
+
displayName: importedPt.displayName ?? convertToDisplayName(apiName),
|
|
44
|
+
type: convertType(importedPt.type)
|
|
45
|
+
}));
|
|
46
|
+
const ontologyImportObject = {
|
|
47
|
+
...objectDef,
|
|
48
|
+
displayName: objectDef.displayName ?? convertToDisplayName(objectDef.apiName),
|
|
49
|
+
propertyTypes: importPropertyTypes
|
|
50
|
+
};
|
|
51
|
+
return ontologyImportObject;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=importObjectType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importObjectType.js","names":["convertToDisplayName","convertToPluralDisplayName","convertType","importOntologyEntity","OntologyEntityTypeEnum","defineImportObject","objectDef","properties","Object","entries","map","apiName","type","displayName","finalObject","__type","OBJECT_TYPE","pluralDisplayName","primaryKeyPropertyApiName","titlePropertyApiName","importPropertyTypes","importedPt","ontologyImportObject","propertyTypes"],"sources":["importObjectType.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n OntologyIrImportedObjectType,\n OntologyIrImportedPropertyType,\n} from \"@osdk/client.unstable\";\nimport {\n convertToDisplayName,\n convertToPluralDisplayName,\n convertType,\n importOntologyEntity,\n type ObjectPropertyType,\n type ObjectType,\n OntologyEntityTypeEnum,\n} from \"@osdk/maker\";\nimport type { ImportObjectDefinition } from \"./types.js\";\n\n/*\n * Takes in the minimal object definition to create an input shape.\n * First converts it to fake block data to call importOntologyEntity,\n * then converts it to an OntologyIrImportedObjectType that is safe to use elsewhere.\n */\nexport function defineImportObject(\n objectDef: ImportObjectDefinition,\n): OntologyIrImportedObjectType {\n const properties: Array<ObjectPropertyType> = Object.entries(\n objectDef.properties ?? {},\n ).map(([apiName, type]) => ({\n apiName: apiName,\n displayName: convertToDisplayName(apiName),\n type: type.type,\n }));\n const finalObject: ObjectType = {\n apiName: objectDef.apiName,\n properties: properties,\n __type: OntologyEntityTypeEnum.OBJECT_TYPE,\n\n // the rest don't matter for now\n displayName: objectDef.displayName\n ?? convertToDisplayName(objectDef.apiName),\n pluralDisplayName: convertToPluralDisplayName(objectDef.apiName),\n primaryKeyPropertyApiName: properties[0]?.apiName,\n titlePropertyApiName: properties[0]?.apiName,\n };\n importOntologyEntity(finalObject);\n\n const importPropertyTypes: Array<OntologyIrImportedPropertyType> = Object\n .entries(objectDef.properties).map(([apiName, importedPt]) => ({\n ...importedPt,\n apiName: apiName,\n displayName: importedPt.displayName ?? convertToDisplayName(apiName),\n type: convertType(importedPt.type),\n }));\n const ontologyImportObject: OntologyIrImportedObjectType = {\n ...objectDef,\n displayName: objectDef.displayName\n ?? convertToDisplayName(objectDef.apiName),\n propertyTypes: importPropertyTypes,\n };\n return ontologyImportObject;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,SACEA,oBAAoB,EACpBC,0BAA0B,EAC1BC,WAAW,EACXC,oBAAoB,EAGpBC,sBAAsB,QACjB,aAAa;AAGpB;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAChCC,SAAiC,EACH;EAC9B,MAAMC,UAAqC,GAAGC,MAAM,CAACC,OAAO,CAC1DH,SAAS,CAACC,UAAU,IAAI,CAAC,CAC3B,CAAC,CAACG,GAAG,CAAC,CAAC,CAACC,OAAO,EAAEC,IAAI,CAAC,MAAM;IAC1BD,OAAO,EAAEA,OAAO;IAChBE,WAAW,EAAEb,oBAAoB,CAACW,OAAO,CAAC;IAC1CC,IAAI,EAAEA,IAAI,CAACA;EACb,CAAC,CAAC,CAAC;EACH,MAAME,WAAuB,GAAG;IAC9BH,OAAO,EAAEL,SAAS,CAACK,OAAO;IAC1BJ,UAAU,EAAEA,UAAU;IACtBQ,MAAM,EAAEX,sBAAsB,CAACY,WAAW;IAE1C;IACAH,WAAW,EAAEP,SAAS,CAACO,WAAW,IAC7Bb,oBAAoB,CAACM,SAAS,CAACK,OAAO,CAAC;IAC5CM,iBAAiB,EAAEhB,0BAA0B,CAACK,SAAS,CAACK,OAAO,CAAC;IAChEO,yBAAyB,EAAEX,UAAU,CAAC,CAAC,CAAC,EAAEI,OAAO;IACjDQ,oBAAoB,EAAEZ,UAAU,CAAC,CAAC,CAAC,EAAEI;EACvC,CAAC;EACDR,oBAAoB,CAACW,WAAW,CAAC;EAEjC,MAAMM,mBAA0D,GAAGZ,MAAM,CACtEC,OAAO,CAACH,SAAS,CAACC,UAAU,CAAC,CAACG,GAAG,CAAC,CAAC,CAACC,OAAO,EAAEU,UAAU,CAAC,MAAM;IAC7D,GAAGA,UAAU;IACbV,OAAO,EAAEA,OAAO;IAChBE,WAAW,EAAEQ,UAAU,CAACR,WAAW,IAAIb,oBAAoB,CAACW,OAAO,CAAC;IACpEC,IAAI,EAAEV,WAAW,CAACmB,UAAU,CAACT,IAAI;EACnC,CAAC,CAAC,CAAC;EACL,MAAMU,oBAAkD,GAAG;IACzD,GAAGhB,SAAS;IACZO,WAAW,EAAEP,SAAS,CAACO,WAAW,IAC7Bb,oBAAoB,CAACM,SAAS,CAACK,OAAO,CAAC;IAC5CY,aAAa,EAAEH;EACjB,CAAC;EACD,OAAOE,oBAAoB;AAC7B","ignoreList":[]}
|
|
@@ -0,0 +1,597 @@
|
|
|
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 { defineCreateObjectAction, defineObject, defineOntology, dumpOntologyFullMetadata } from "@osdk/maker";
|
|
18
|
+
import { beforeEach, describe, expect, it } from "vitest";
|
|
19
|
+
import { defineImportObject } from "./importObjectType.js";
|
|
20
|
+
describe("Experimental Test Suite", () => {
|
|
21
|
+
beforeEach(async () => {
|
|
22
|
+
await defineOntology("com.palantir.", () => {}, "/tmp/");
|
|
23
|
+
});
|
|
24
|
+
describe("Imports", () => {
|
|
25
|
+
it("Imported object types as action parameters are properly defined", () => {
|
|
26
|
+
const importedObject = defineImportObject({
|
|
27
|
+
apiName: "myImport",
|
|
28
|
+
properties: {
|
|
29
|
+
id: {
|
|
30
|
+
type: "string"
|
|
31
|
+
},
|
|
32
|
+
name: {
|
|
33
|
+
type: "string"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const foo = defineObject({
|
|
38
|
+
apiName: "foo",
|
|
39
|
+
displayName: "Foo",
|
|
40
|
+
pluralDisplayName: "Foos",
|
|
41
|
+
titlePropertyApiName: "id",
|
|
42
|
+
primaryKeyPropertyApiName: "id",
|
|
43
|
+
properties: {
|
|
44
|
+
"id": {
|
|
45
|
+
type: "string"
|
|
46
|
+
},
|
|
47
|
+
"date": {
|
|
48
|
+
type: "date"
|
|
49
|
+
},
|
|
50
|
+
"team": {
|
|
51
|
+
type: "string"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
defineCreateObjectAction({
|
|
56
|
+
objectType: foo,
|
|
57
|
+
parameterOrdering: ["ref", "team", "id", "date"],
|
|
58
|
+
parameterConfiguration: {
|
|
59
|
+
"ref": {
|
|
60
|
+
customParameterType: {
|
|
61
|
+
type: "objectReference",
|
|
62
|
+
objectReference: {
|
|
63
|
+
objectTypeId: importedObject.apiName
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"team": {
|
|
68
|
+
defaultValue: {
|
|
69
|
+
type: "objectParameterPropertyValue",
|
|
70
|
+
objectParameterPropertyValue: {
|
|
71
|
+
parameterId: "ref",
|
|
72
|
+
propertyTypeId: "foo"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
expect(dumpOntologyFullMetadata().blockData).toMatchInlineSnapshot(`
|
|
79
|
+
{
|
|
80
|
+
"actionTypes": {
|
|
81
|
+
"com.palantir.create-object-foo": {
|
|
82
|
+
"actionType": {
|
|
83
|
+
"actionTypeLogic": {
|
|
84
|
+
"logic": {
|
|
85
|
+
"rules": [
|
|
86
|
+
{
|
|
87
|
+
"addObjectRule": {
|
|
88
|
+
"objectTypeId": "com.palantir.foo",
|
|
89
|
+
"propertyValues": {
|
|
90
|
+
"date": {
|
|
91
|
+
"parameterId": "date",
|
|
92
|
+
"type": "parameterId",
|
|
93
|
+
},
|
|
94
|
+
"id": {
|
|
95
|
+
"parameterId": "id",
|
|
96
|
+
"type": "parameterId",
|
|
97
|
+
},
|
|
98
|
+
"team": {
|
|
99
|
+
"parameterId": "team",
|
|
100
|
+
"type": "parameterId",
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
"structFieldValues": {},
|
|
104
|
+
},
|
|
105
|
+
"type": "addObjectRule",
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
"validation": {
|
|
110
|
+
"actionTypeLevelValidation": {
|
|
111
|
+
"rules": {
|
|
112
|
+
"0": {
|
|
113
|
+
"condition": {
|
|
114
|
+
"true": {},
|
|
115
|
+
"type": "true",
|
|
116
|
+
},
|
|
117
|
+
"displayMetadata": {
|
|
118
|
+
"failureMessage": "",
|
|
119
|
+
"typeClasses": [],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
"parameterValidations": {
|
|
125
|
+
"date": {
|
|
126
|
+
"conditionalOverrides": [],
|
|
127
|
+
"defaultValidation": {
|
|
128
|
+
"display": {
|
|
129
|
+
"renderHint": {
|
|
130
|
+
"dateTimePicker": {},
|
|
131
|
+
"type": "dateTimePicker",
|
|
132
|
+
},
|
|
133
|
+
"visibility": {
|
|
134
|
+
"editable": {},
|
|
135
|
+
"type": "editable",
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
"validation": {
|
|
139
|
+
"allowedValues": {
|
|
140
|
+
"datetime": {
|
|
141
|
+
"datetime": {
|
|
142
|
+
"maximum": undefined,
|
|
143
|
+
"minimum": undefined,
|
|
144
|
+
},
|
|
145
|
+
"type": "datetime",
|
|
146
|
+
},
|
|
147
|
+
"type": "datetime",
|
|
148
|
+
},
|
|
149
|
+
"required": {
|
|
150
|
+
"required": {},
|
|
151
|
+
"type": "required",
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
"id": {
|
|
157
|
+
"conditionalOverrides": [],
|
|
158
|
+
"defaultValidation": {
|
|
159
|
+
"display": {
|
|
160
|
+
"renderHint": {
|
|
161
|
+
"textInput": {},
|
|
162
|
+
"type": "textInput",
|
|
163
|
+
},
|
|
164
|
+
"visibility": {
|
|
165
|
+
"editable": {},
|
|
166
|
+
"type": "editable",
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
"validation": {
|
|
170
|
+
"allowedValues": {
|
|
171
|
+
"text": {
|
|
172
|
+
"text": {},
|
|
173
|
+
"type": "text",
|
|
174
|
+
},
|
|
175
|
+
"type": "text",
|
|
176
|
+
},
|
|
177
|
+
"required": {
|
|
178
|
+
"required": {},
|
|
179
|
+
"type": "required",
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
"ref": {
|
|
185
|
+
"conditionalOverrides": [],
|
|
186
|
+
"defaultValidation": {
|
|
187
|
+
"display": {
|
|
188
|
+
"renderHint": {
|
|
189
|
+
"dropdown": {},
|
|
190
|
+
"type": "dropdown",
|
|
191
|
+
},
|
|
192
|
+
"visibility": {
|
|
193
|
+
"editable": {},
|
|
194
|
+
"type": "editable",
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
"validation": {
|
|
198
|
+
"allowedValues": {
|
|
199
|
+
"objectQuery": {
|
|
200
|
+
"objectQuery": {},
|
|
201
|
+
"type": "objectQuery",
|
|
202
|
+
},
|
|
203
|
+
"type": "objectQuery",
|
|
204
|
+
},
|
|
205
|
+
"required": {
|
|
206
|
+
"required": {},
|
|
207
|
+
"type": "required",
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
"team": {
|
|
213
|
+
"conditionalOverrides": [],
|
|
214
|
+
"defaultValidation": {
|
|
215
|
+
"display": {
|
|
216
|
+
"prefill": {
|
|
217
|
+
"objectParameterPropertyValue": {
|
|
218
|
+
"parameterId": "ref",
|
|
219
|
+
"propertyTypeId": "foo",
|
|
220
|
+
},
|
|
221
|
+
"type": "objectParameterPropertyValue",
|
|
222
|
+
},
|
|
223
|
+
"renderHint": {
|
|
224
|
+
"textInput": {},
|
|
225
|
+
"type": "textInput",
|
|
226
|
+
},
|
|
227
|
+
"visibility": {
|
|
228
|
+
"editable": {},
|
|
229
|
+
"type": "editable",
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
"validation": {
|
|
233
|
+
"allowedValues": {
|
|
234
|
+
"text": {
|
|
235
|
+
"text": {},
|
|
236
|
+
"type": "text",
|
|
237
|
+
},
|
|
238
|
+
"type": "text",
|
|
239
|
+
},
|
|
240
|
+
"required": {
|
|
241
|
+
"required": {},
|
|
242
|
+
"type": "required",
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
"sectionValidations": {},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
"metadata": {
|
|
252
|
+
"apiName": "com.palantir.create-object-foo",
|
|
253
|
+
"displayMetadata": {
|
|
254
|
+
"configuration": {
|
|
255
|
+
"defaultLayout": "FORM",
|
|
256
|
+
"displayAndFormat": {
|
|
257
|
+
"table": {
|
|
258
|
+
"columnWidthByParameterRid": {},
|
|
259
|
+
"enableFileImport": true,
|
|
260
|
+
"fitHorizontally": false,
|
|
261
|
+
"frozenColumnCount": 0,
|
|
262
|
+
"rowHeightInLines": 1,
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
"enableLayoutUserSwitch": false,
|
|
266
|
+
},
|
|
267
|
+
"description": "",
|
|
268
|
+
"displayName": "Create Foo",
|
|
269
|
+
"icon": {
|
|
270
|
+
"blueprint": {
|
|
271
|
+
"color": "#000000",
|
|
272
|
+
"locator": "edit",
|
|
273
|
+
},
|
|
274
|
+
"type": "blueprint",
|
|
275
|
+
},
|
|
276
|
+
"successMessage": [],
|
|
277
|
+
"typeClasses": [],
|
|
278
|
+
},
|
|
279
|
+
"entities": {
|
|
280
|
+
"affectedInterfaceTypes": [],
|
|
281
|
+
"affectedLinkTypes": [],
|
|
282
|
+
"affectedObjectTypes": [
|
|
283
|
+
"com.palantir.foo",
|
|
284
|
+
],
|
|
285
|
+
"typeGroups": [],
|
|
286
|
+
},
|
|
287
|
+
"formContentOrdering": [],
|
|
288
|
+
"parameterOrdering": [
|
|
289
|
+
"ref",
|
|
290
|
+
"team",
|
|
291
|
+
"id",
|
|
292
|
+
"date",
|
|
293
|
+
],
|
|
294
|
+
"parameters": {
|
|
295
|
+
"date": {
|
|
296
|
+
"displayMetadata": {
|
|
297
|
+
"description": "",
|
|
298
|
+
"displayName": "Date",
|
|
299
|
+
"typeClasses": [],
|
|
300
|
+
},
|
|
301
|
+
"id": "date",
|
|
302
|
+
"type": {
|
|
303
|
+
"date": {},
|
|
304
|
+
"type": "date",
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
"id": {
|
|
308
|
+
"displayMetadata": {
|
|
309
|
+
"description": "",
|
|
310
|
+
"displayName": "Id",
|
|
311
|
+
"typeClasses": [],
|
|
312
|
+
},
|
|
313
|
+
"id": "id",
|
|
314
|
+
"type": {
|
|
315
|
+
"string": {},
|
|
316
|
+
"type": "string",
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
"ref": {
|
|
320
|
+
"displayMetadata": {
|
|
321
|
+
"description": "",
|
|
322
|
+
"displayName": "Ref",
|
|
323
|
+
"typeClasses": [],
|
|
324
|
+
},
|
|
325
|
+
"id": "ref",
|
|
326
|
+
"type": {
|
|
327
|
+
"objectReference": {
|
|
328
|
+
"objectTypeId": "myImport",
|
|
329
|
+
},
|
|
330
|
+
"type": "objectReference",
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
"team": {
|
|
334
|
+
"displayMetadata": {
|
|
335
|
+
"description": "",
|
|
336
|
+
"displayName": "Team",
|
|
337
|
+
"typeClasses": [],
|
|
338
|
+
},
|
|
339
|
+
"id": "team",
|
|
340
|
+
"type": {
|
|
341
|
+
"string": {},
|
|
342
|
+
"type": "string",
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
"sections": {},
|
|
347
|
+
"status": {
|
|
348
|
+
"active": {},
|
|
349
|
+
"type": "active",
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
"blockPermissionInformation": {
|
|
356
|
+
"actionTypes": {},
|
|
357
|
+
"linkTypes": {},
|
|
358
|
+
"objectTypes": {},
|
|
359
|
+
},
|
|
360
|
+
"interfaceTypes": {},
|
|
361
|
+
"linkTypes": {},
|
|
362
|
+
"objectTypes": {
|
|
363
|
+
"com.palantir.foo": {
|
|
364
|
+
"datasources": [
|
|
365
|
+
{
|
|
366
|
+
"datasource": {
|
|
367
|
+
"datasetV2": {
|
|
368
|
+
"datasetRid": "com.palantir.foo",
|
|
369
|
+
"propertyMapping": {
|
|
370
|
+
"date": {
|
|
371
|
+
"column": "date",
|
|
372
|
+
"type": "column",
|
|
373
|
+
},
|
|
374
|
+
"id": {
|
|
375
|
+
"column": "id",
|
|
376
|
+
"type": "column",
|
|
377
|
+
},
|
|
378
|
+
"team": {
|
|
379
|
+
"column": "team",
|
|
380
|
+
"type": "column",
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
"type": "datasetV2",
|
|
385
|
+
},
|
|
386
|
+
"editsConfiguration": {
|
|
387
|
+
"onlyAllowPrivilegedEdits": false,
|
|
388
|
+
},
|
|
389
|
+
"redacted": false,
|
|
390
|
+
"rid": "ri.ontology.main.datasource.com.palantir.foo",
|
|
391
|
+
},
|
|
392
|
+
],
|
|
393
|
+
"entityMetadata": {
|
|
394
|
+
"arePatchesEnabled": false,
|
|
395
|
+
},
|
|
396
|
+
"objectType": {
|
|
397
|
+
"allImplementsInterfaces": {},
|
|
398
|
+
"apiName": "com.palantir.foo",
|
|
399
|
+
"displayMetadata": {
|
|
400
|
+
"description": undefined,
|
|
401
|
+
"displayName": "Foo",
|
|
402
|
+
"groupDisplayName": undefined,
|
|
403
|
+
"icon": {
|
|
404
|
+
"blueprint": {
|
|
405
|
+
"color": "#2D72D2",
|
|
406
|
+
"locator": "cube",
|
|
407
|
+
},
|
|
408
|
+
"type": "blueprint",
|
|
409
|
+
},
|
|
410
|
+
"pluralDisplayName": "Foos",
|
|
411
|
+
"visibility": "NORMAL",
|
|
412
|
+
},
|
|
413
|
+
"implementsInterfaces2": [],
|
|
414
|
+
"primaryKeys": [
|
|
415
|
+
"id",
|
|
416
|
+
],
|
|
417
|
+
"propertyTypes": {
|
|
418
|
+
"date": {
|
|
419
|
+
"apiName": "date",
|
|
420
|
+
"baseFormatter": undefined,
|
|
421
|
+
"dataConstraints": undefined,
|
|
422
|
+
"displayMetadata": {
|
|
423
|
+
"description": undefined,
|
|
424
|
+
"displayName": "Date",
|
|
425
|
+
"visibility": "NORMAL",
|
|
426
|
+
},
|
|
427
|
+
"indexedForSearch": true,
|
|
428
|
+
"inlineAction": undefined,
|
|
429
|
+
"ruleSetBinding": undefined,
|
|
430
|
+
"sharedPropertyTypeApiName": undefined,
|
|
431
|
+
"sharedPropertyTypeRid": undefined,
|
|
432
|
+
"status": {
|
|
433
|
+
"active": {},
|
|
434
|
+
"type": "active",
|
|
435
|
+
},
|
|
436
|
+
"type": {
|
|
437
|
+
"date": {},
|
|
438
|
+
"type": "date",
|
|
439
|
+
},
|
|
440
|
+
"typeClasses": [
|
|
441
|
+
{
|
|
442
|
+
"kind": "render_hint",
|
|
443
|
+
"name": "SELECTABLE",
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"kind": "render_hint",
|
|
447
|
+
"name": "SORTABLE",
|
|
448
|
+
},
|
|
449
|
+
],
|
|
450
|
+
"valueType": undefined,
|
|
451
|
+
},
|
|
452
|
+
"id": {
|
|
453
|
+
"apiName": "id",
|
|
454
|
+
"baseFormatter": undefined,
|
|
455
|
+
"dataConstraints": undefined,
|
|
456
|
+
"displayMetadata": {
|
|
457
|
+
"description": undefined,
|
|
458
|
+
"displayName": "Id",
|
|
459
|
+
"visibility": "NORMAL",
|
|
460
|
+
},
|
|
461
|
+
"indexedForSearch": true,
|
|
462
|
+
"inlineAction": undefined,
|
|
463
|
+
"ruleSetBinding": undefined,
|
|
464
|
+
"sharedPropertyTypeApiName": undefined,
|
|
465
|
+
"sharedPropertyTypeRid": undefined,
|
|
466
|
+
"status": {
|
|
467
|
+
"active": {},
|
|
468
|
+
"type": "active",
|
|
469
|
+
},
|
|
470
|
+
"type": {
|
|
471
|
+
"string": {
|
|
472
|
+
"analyzerOverride": undefined,
|
|
473
|
+
"enableAsciiFolding": undefined,
|
|
474
|
+
"isLongText": false,
|
|
475
|
+
"supportsEfficientLeadingWildcard": false,
|
|
476
|
+
"supportsExactMatching": true,
|
|
477
|
+
},
|
|
478
|
+
"type": "string",
|
|
479
|
+
},
|
|
480
|
+
"typeClasses": [
|
|
481
|
+
{
|
|
482
|
+
"kind": "render_hint",
|
|
483
|
+
"name": "SELECTABLE",
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"kind": "render_hint",
|
|
487
|
+
"name": "SORTABLE",
|
|
488
|
+
},
|
|
489
|
+
],
|
|
490
|
+
"valueType": undefined,
|
|
491
|
+
},
|
|
492
|
+
"team": {
|
|
493
|
+
"apiName": "team",
|
|
494
|
+
"baseFormatter": undefined,
|
|
495
|
+
"dataConstraints": undefined,
|
|
496
|
+
"displayMetadata": {
|
|
497
|
+
"description": undefined,
|
|
498
|
+
"displayName": "Team",
|
|
499
|
+
"visibility": "NORMAL",
|
|
500
|
+
},
|
|
501
|
+
"indexedForSearch": true,
|
|
502
|
+
"inlineAction": undefined,
|
|
503
|
+
"ruleSetBinding": undefined,
|
|
504
|
+
"sharedPropertyTypeApiName": undefined,
|
|
505
|
+
"sharedPropertyTypeRid": undefined,
|
|
506
|
+
"status": {
|
|
507
|
+
"active": {},
|
|
508
|
+
"type": "active",
|
|
509
|
+
},
|
|
510
|
+
"type": {
|
|
511
|
+
"string": {
|
|
512
|
+
"analyzerOverride": undefined,
|
|
513
|
+
"enableAsciiFolding": undefined,
|
|
514
|
+
"isLongText": false,
|
|
515
|
+
"supportsEfficientLeadingWildcard": false,
|
|
516
|
+
"supportsExactMatching": true,
|
|
517
|
+
},
|
|
518
|
+
"type": "string",
|
|
519
|
+
},
|
|
520
|
+
"typeClasses": [
|
|
521
|
+
{
|
|
522
|
+
"kind": "render_hint",
|
|
523
|
+
"name": "SELECTABLE",
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"kind": "render_hint",
|
|
527
|
+
"name": "SORTABLE",
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
"valueType": undefined,
|
|
531
|
+
},
|
|
532
|
+
},
|
|
533
|
+
"redacted": false,
|
|
534
|
+
"status": {
|
|
535
|
+
"active": {},
|
|
536
|
+
"type": "active",
|
|
537
|
+
},
|
|
538
|
+
"titlePropertyTypeRid": "id",
|
|
539
|
+
},
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
"sharedPropertyTypes": {},
|
|
543
|
+
}
|
|
544
|
+
`);
|
|
545
|
+
expect(dumpOntologyFullMetadata().importedTypes).toMatchInlineSnapshot(`
|
|
546
|
+
{
|
|
547
|
+
"actionTypes": [],
|
|
548
|
+
"interfaceTypes": [],
|
|
549
|
+
"linkTypes": [],
|
|
550
|
+
"objectTypes": [
|
|
551
|
+
{
|
|
552
|
+
"apiName": "myImport",
|
|
553
|
+
"description": undefined,
|
|
554
|
+
"displayName": "MyImport",
|
|
555
|
+
"propertyTypes": [
|
|
556
|
+
{
|
|
557
|
+
"apiName": "id",
|
|
558
|
+
"description": undefined,
|
|
559
|
+
"displayName": "Id",
|
|
560
|
+
"sharedPropertyType": undefined,
|
|
561
|
+
"type": {
|
|
562
|
+
"string": {
|
|
563
|
+
"analyzerOverride": undefined,
|
|
564
|
+
"enableAsciiFolding": undefined,
|
|
565
|
+
"isLongText": false,
|
|
566
|
+
"supportsEfficientLeadingWildcard": false,
|
|
567
|
+
"supportsExactMatching": true,
|
|
568
|
+
},
|
|
569
|
+
"type": "string",
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"apiName": "name",
|
|
574
|
+
"description": undefined,
|
|
575
|
+
"displayName": "Name",
|
|
576
|
+
"sharedPropertyType": undefined,
|
|
577
|
+
"type": {
|
|
578
|
+
"string": {
|
|
579
|
+
"analyzerOverride": undefined,
|
|
580
|
+
"enableAsciiFolding": undefined,
|
|
581
|
+
"isLongText": false,
|
|
582
|
+
"supportsEfficientLeadingWildcard": false,
|
|
583
|
+
"supportsExactMatching": true,
|
|
584
|
+
},
|
|
585
|
+
"type": "string",
|
|
586
|
+
},
|
|
587
|
+
},
|
|
588
|
+
],
|
|
589
|
+
},
|
|
590
|
+
],
|
|
591
|
+
"sharedPropertyTypes": [],
|
|
592
|
+
}
|
|
593
|
+
`);
|
|
594
|
+
});
|
|
595
|
+
});
|
|
596
|
+
});
|
|
597
|
+
//# sourceMappingURL=overall.test.js.map
|