@osdk/maker-experimental 0.6.0-beta.4 → 0.6.0-beta.6

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 (60) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/build/browser/api/defineOntologyV2.js +9 -3
  3. package/build/browser/api/defineOntologyV2.js.map +1 -1
  4. package/build/browser/cli/generateBackingDataset.js +250 -0
  5. package/build/browser/cli/generateBackingDataset.js.map +1 -0
  6. package/build/browser/cli/main.js +60 -7
  7. package/build/browser/cli/main.js.map +1 -1
  8. package/build/browser/cli/marketplaceSerialization/BlockGeneratorResult.js.map +1 -1
  9. package/build/browser/conversion/toMarketplace/convertLink.js +9 -4
  10. package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -1
  11. package/build/browser/util/generateRid.js +10 -4
  12. package/build/browser/util/generateRid.js.map +1 -1
  13. package/build/cjs/{ActionTypeShapeExtractor-5IVLHAPH.cjs → ActionTypeShapeExtractor-UWC4CVHX.cjs} +4 -4
  14. package/build/cjs/{ActionTypeShapeExtractor-5IVLHAPH.cjs.map → ActionTypeShapeExtractor-UWC4CVHX.cjs.map} +1 -1
  15. package/build/cjs/{chunk-AWYOBJ25.cjs → chunk-JC573VYW.cjs} +13 -6
  16. package/build/cjs/chunk-JC573VYW.cjs.map +1 -0
  17. package/build/cjs/index.cjs +278 -41
  18. package/build/cjs/index.cjs.map +1 -1
  19. package/build/cjs/index.d.cts +6 -1
  20. package/build/esm/api/defineOntologyV2.js +9 -3
  21. package/build/esm/api/defineOntologyV2.js.map +1 -1
  22. package/build/esm/cli/generateBackingDataset.js +250 -0
  23. package/build/esm/cli/generateBackingDataset.js.map +1 -0
  24. package/build/esm/cli/main.js +60 -7
  25. package/build/esm/cli/main.js.map +1 -1
  26. package/build/esm/cli/marketplaceSerialization/BlockGeneratorResult.js.map +1 -1
  27. package/build/esm/conversion/toMarketplace/convertLink.js +9 -4
  28. package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -1
  29. package/build/esm/util/generateRid.js +10 -4
  30. package/build/esm/util/generateRid.js.map +1 -1
  31. package/build/types/api/defineOntologyV2.d.ts +6 -1
  32. package/build/types/api/defineOntologyV2.d.ts.map +1 -1
  33. package/build/types/cli/generateBackingDataset.d.ts +16 -0
  34. package/build/types/cli/generateBackingDataset.d.ts.map +1 -0
  35. package/build/types/cli/main.d.ts.map +1 -1
  36. package/build/types/cli/marketplaceSerialization/BlockGeneratorResult.d.ts +2 -2
  37. package/build/types/cli/marketplaceSerialization/BlockGeneratorResult.d.ts.map +1 -1
  38. package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -1
  39. package/build/types/util/generateRid.d.ts +4 -2
  40. package/build/types/util/generateRid.d.ts.map +1 -1
  41. package/package.json +4 -4
  42. package/build/browser/api/overall.test.js +0 -713
  43. package/build/browser/api/overall.test.js.map +0 -1
  44. package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js +0 -562
  45. package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js.map +0 -1
  46. package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js +0 -677
  47. package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js.map +0 -1
  48. package/build/cjs/chunk-AWYOBJ25.cjs.map +0 -1
  49. package/build/esm/api/overall.test.js +0 -713
  50. package/build/esm/api/overall.test.js.map +0 -1
  51. package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js +0 -562
  52. package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js.map +0 -1
  53. package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js +0 -677
  54. package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js.map +0 -1
  55. package/build/types/api/overall.test.d.ts +0 -1
  56. package/build/types/api/overall.test.d.ts.map +0 -1
  57. package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.d.ts +0 -1
  58. package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.d.ts.map +0 -1
  59. package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.d.ts +0 -1
  60. package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.d.ts.map +0 -1
@@ -1,713 +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 { 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().ontology).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
- "notRequired": {},
151
- "type": "notRequired",
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
- "notRequired": {},
179
- "type": "notRequired",
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
- "notRequired": {},
207
- "type": "notRequired",
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
- "notRequired": {},
242
- "type": "notRequired",
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
- "datasourceName": "com.palantir.foo",
387
- "editsConfiguration": {
388
- "onlyAllowPrivilegedEdits": false,
389
- },
390
- "redacted": false,
391
- },
392
- ],
393
- "entityMetadata": {
394
- "aliases": [],
395
- "arePatchesEnabled": false,
396
- },
397
- "objectType": {
398
- "allImplementsInterfaces": {},
399
- "apiName": "com.palantir.foo",
400
- "displayMetadata": {
401
- "description": undefined,
402
- "displayName": "Foo",
403
- "groupDisplayName": undefined,
404
- "icon": {
405
- "blueprint": {
406
- "color": "#2D72D2",
407
- "locator": "cube",
408
- },
409
- "type": "blueprint",
410
- },
411
- "pluralDisplayName": "Foos",
412
- "visibility": "NORMAL",
413
- },
414
- "implementsInterfaces2": [],
415
- "primaryKeys": [
416
- "id",
417
- ],
418
- "propertyTypes": {
419
- "date": {
420
- "apiName": "date",
421
- "baseFormatter": undefined,
422
- "dataConstraints": undefined,
423
- "displayMetadata": {
424
- "description": undefined,
425
- "displayName": "Date",
426
- "visibility": "NORMAL",
427
- },
428
- "indexedForSearch": true,
429
- "inlineAction": undefined,
430
- "ruleSetBinding": undefined,
431
- "sharedPropertyTypeApiName": undefined,
432
- "sharedPropertyTypeRid": undefined,
433
- "status": {
434
- "active": {},
435
- "type": "active",
436
- },
437
- "type": {
438
- "date": {},
439
- "type": "date",
440
- },
441
- "typeClasses": [
442
- {
443
- "kind": "render_hint",
444
- "name": "SELECTABLE",
445
- },
446
- {
447
- "kind": "render_hint",
448
- "name": "SORTABLE",
449
- },
450
- ],
451
- "valueType": undefined,
452
- },
453
- "id": {
454
- "apiName": "id",
455
- "baseFormatter": undefined,
456
- "dataConstraints": undefined,
457
- "displayMetadata": {
458
- "description": undefined,
459
- "displayName": "Id",
460
- "visibility": "NORMAL",
461
- },
462
- "indexedForSearch": true,
463
- "inlineAction": undefined,
464
- "ruleSetBinding": undefined,
465
- "sharedPropertyTypeApiName": undefined,
466
- "sharedPropertyTypeRid": undefined,
467
- "status": {
468
- "active": {},
469
- "type": "active",
470
- },
471
- "type": {
472
- "string": {
473
- "analyzerOverride": undefined,
474
- "enableAsciiFolding": undefined,
475
- "isLongText": false,
476
- "supportsEfficientLeadingWildcard": false,
477
- "supportsExactMatching": true,
478
- },
479
- "type": "string",
480
- },
481
- "typeClasses": [
482
- {
483
- "kind": "render_hint",
484
- "name": "SELECTABLE",
485
- },
486
- {
487
- "kind": "render_hint",
488
- "name": "SORTABLE",
489
- },
490
- ],
491
- "valueType": undefined,
492
- },
493
- "team": {
494
- "apiName": "team",
495
- "baseFormatter": undefined,
496
- "dataConstraints": undefined,
497
- "displayMetadata": {
498
- "description": undefined,
499
- "displayName": "Team",
500
- "visibility": "NORMAL",
501
- },
502
- "indexedForSearch": true,
503
- "inlineAction": undefined,
504
- "ruleSetBinding": undefined,
505
- "sharedPropertyTypeApiName": undefined,
506
- "sharedPropertyTypeRid": undefined,
507
- "status": {
508
- "active": {},
509
- "type": "active",
510
- },
511
- "type": {
512
- "string": {
513
- "analyzerOverride": undefined,
514
- "enableAsciiFolding": undefined,
515
- "isLongText": false,
516
- "supportsEfficientLeadingWildcard": false,
517
- "supportsExactMatching": true,
518
- },
519
- "type": "string",
520
- },
521
- "typeClasses": [
522
- {
523
- "kind": "render_hint",
524
- "name": "SELECTABLE",
525
- },
526
- {
527
- "kind": "render_hint",
528
- "name": "SORTABLE",
529
- },
530
- ],
531
- "valueType": undefined,
532
- },
533
- },
534
- "redacted": false,
535
- "status": {
536
- "active": {},
537
- "type": "active",
538
- },
539
- "titlePropertyTypeRid": "id",
540
- },
541
- "propertySecurityGroupPackagingVersion": {
542
- "type": "v2",
543
- "v2": {},
544
- },
545
- },
546
- },
547
- "sharedPropertyTypes": {},
548
- }
549
- `);
550
- expect(dumpOntologyFullMetadata().importedOntology).toMatchInlineSnapshot(`
551
- {
552
- "actionTypes": {},
553
- "blockPermissionInformation": {
554
- "actionTypes": {},
555
- "linkTypes": {},
556
- "objectTypes": {},
557
- },
558
- "interfaceTypes": {},
559
- "linkTypes": {},
560
- "objectTypes": {
561
- "myImport": {
562
- "datasources": [
563
- {
564
- "datasource": {
565
- "datasetV2": {
566
- "datasetRid": "myImport",
567
- "propertyMapping": {
568
- "id": {
569
- "column": "id",
570
- "type": "column",
571
- },
572
- "name": {
573
- "column": "name",
574
- "type": "column",
575
- },
576
- },
577
- },
578
- "type": "datasetV2",
579
- },
580
- "datasourceName": "myImport",
581
- "editsConfiguration": {
582
- "onlyAllowPrivilegedEdits": false,
583
- },
584
- "redacted": false,
585
- },
586
- ],
587
- "entityMetadata": {
588
- "aliases": [],
589
- "arePatchesEnabled": false,
590
- },
591
- "objectType": {
592
- "allImplementsInterfaces": {},
593
- "apiName": "myImport",
594
- "displayMetadata": {
595
- "description": undefined,
596
- "displayName": "MyImport",
597
- "groupDisplayName": undefined,
598
- "icon": {
599
- "blueprint": {
600
- "color": "#2D72D2",
601
- "locator": "cube",
602
- },
603
- "type": "blueprint",
604
- },
605
- "pluralDisplayName": "MyImports",
606
- "visibility": "NORMAL",
607
- },
608
- "implementsInterfaces2": [],
609
- "primaryKeys": [
610
- "id",
611
- ],
612
- "propertyTypes": {
613
- "id": {
614
- "apiName": "id",
615
- "baseFormatter": undefined,
616
- "dataConstraints": undefined,
617
- "displayMetadata": {
618
- "description": undefined,
619
- "displayName": "Id",
620
- "visibility": "NORMAL",
621
- },
622
- "indexedForSearch": true,
623
- "inlineAction": undefined,
624
- "ruleSetBinding": undefined,
625
- "sharedPropertyTypeApiName": undefined,
626
- "sharedPropertyTypeRid": undefined,
627
- "status": {
628
- "active": {},
629
- "type": "active",
630
- },
631
- "type": {
632
- "string": {
633
- "analyzerOverride": undefined,
634
- "enableAsciiFolding": undefined,
635
- "isLongText": false,
636
- "supportsEfficientLeadingWildcard": false,
637
- "supportsExactMatching": true,
638
- },
639
- "type": "string",
640
- },
641
- "typeClasses": [
642
- {
643
- "kind": "render_hint",
644
- "name": "SELECTABLE",
645
- },
646
- {
647
- "kind": "render_hint",
648
- "name": "SORTABLE",
649
- },
650
- ],
651
- "valueType": undefined,
652
- },
653
- "name": {
654
- "apiName": "name",
655
- "baseFormatter": undefined,
656
- "dataConstraints": undefined,
657
- "displayMetadata": {
658
- "description": undefined,
659
- "displayName": "Name",
660
- "visibility": "NORMAL",
661
- },
662
- "indexedForSearch": true,
663
- "inlineAction": undefined,
664
- "ruleSetBinding": undefined,
665
- "sharedPropertyTypeApiName": undefined,
666
- "sharedPropertyTypeRid": undefined,
667
- "status": {
668
- "active": {},
669
- "type": "active",
670
- },
671
- "type": {
672
- "string": {
673
- "analyzerOverride": undefined,
674
- "enableAsciiFolding": undefined,
675
- "isLongText": false,
676
- "supportsEfficientLeadingWildcard": false,
677
- "supportsExactMatching": true,
678
- },
679
- "type": "string",
680
- },
681
- "typeClasses": [
682
- {
683
- "kind": "render_hint",
684
- "name": "SELECTABLE",
685
- },
686
- {
687
- "kind": "render_hint",
688
- "name": "SORTABLE",
689
- },
690
- ],
691
- "valueType": undefined,
692
- },
693
- },
694
- "redacted": false,
695
- "status": {
696
- "active": {},
697
- "type": "active",
698
- },
699
- "titlePropertyTypeRid": "id",
700
- },
701
- "propertySecurityGroupPackagingVersion": {
702
- "type": "v2",
703
- "v2": {},
704
- },
705
- },
706
- },
707
- "sharedPropertyTypes": {},
708
- }
709
- `);
710
- });
711
- });
712
- });
713
- //# sourceMappingURL=overall.test.js.map