@contrail/cli 3.4.0-alpha → 3.4.1

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 (62) hide show
  1. package/README.md +4 -151
  2. package/dist/__mocks__/@contrail/sdk.d.ts +123 -0
  3. package/dist/__mocks__/@contrail/sdk.js +716 -0
  4. package/dist/api/types.d.ts +0 -35
  5. package/dist/api/types.js +1 -47
  6. package/dist/auth/login.js +8 -0
  7. package/dist/basecommand.d.ts +1 -3
  8. package/dist/basecommand.js +1 -1
  9. package/dist/commands/app/create.js +1 -14
  10. package/dist/commands/app/extension/deploy.js +4 -2
  11. package/dist/commands/app/init.js +0 -14
  12. package/dist/commands/types/uploadTypes.d.ts +2 -1
  13. package/dist/commands/types/uploadTypes.js +9 -3
  14. package/dist/commands/types/uploadUsageInfo.js +16 -2
  15. package/dist/common.d.ts +1 -1
  16. package/dist/helpers/app/app-deployer.js +8 -4
  17. package/dist/helpers/app/extension-package-deployer.js +1 -1
  18. package/dist/helpers/app/extensions-deployer.js +2 -0
  19. package/dist/helpers/app/setup-template.d.ts +0 -2
  20. package/dist/helpers/app/setup-template.js +1 -2
  21. package/dist/helpers/config/config.js +3 -3
  22. package/dist/helpers/file-helpers.d.ts +0 -1
  23. package/dist/helpers/file-helpers.js +1 -19
  24. package/dist/helpers/types/type-uploader.d.ts +3 -1
  25. package/dist/helpers/types/type-uploader.js +55 -37
  26. package/dist/helpers/types/type-uploader.spec.js +506 -0
  27. package/dist/interfaces.d.ts +3 -1
  28. package/dist/templates/typescript/README.md +3 -1
  29. package/dist/templates/typescript/app.yml +1 -1
  30. package/dist/templates/typescript/assets/sample.json +1 -1
  31. package/dist/templates/typescript/eslintrc.json +1 -4
  32. package/dist/templates/typescript/tsconfig.json +5 -21
  33. package/oclif.manifest.json +9 -361
  34. package/package.json +5 -6
  35. package/dist/commands/entities/create.d.ts +0 -37
  36. package/dist/commands/entities/create.js +0 -555
  37. package/dist/commands/entities/create.spec.d.ts +0 -1
  38. package/dist/commands/entities/create.spec.js +0 -514
  39. package/dist/commands/entities/delete.d.ts +0 -16
  40. package/dist/commands/entities/delete.js +0 -118
  41. package/dist/commands/entities/get.d.ts +0 -20
  42. package/dist/commands/entities/get.js +0 -204
  43. package/dist/commands/entities/update.d.ts +0 -18
  44. package/dist/commands/entities/update.js +0 -116
  45. package/dist/helpers/entities/assortment-items.d.ts +0 -10
  46. package/dist/helpers/entities/assortment-items.js +0 -84
  47. package/dist/helpers/entities/batchFetch.d.ts +0 -8
  48. package/dist/helpers/entities/batchFetch.js +0 -41
  49. package/dist/helpers/entities/index.d.ts +0 -3
  50. package/dist/helpers/entities/index.js +0 -6
  51. package/dist/helpers/entities/items.d.ts +0 -10
  52. package/dist/helpers/entities/items.js +0 -102
  53. package/dist/helpers/entities/project-items.d.ts +0 -3
  54. package/dist/helpers/entities/project-items.js +0 -65
  55. package/dist/helpers/propertySpecifications/dateRanges.d.ts +0 -38
  56. package/dist/helpers/propertySpecifications/dateRanges.js +0 -89
  57. package/dist/helpers/propertySpecifications/dateRanges.spec.d.ts +0 -1
  58. package/dist/helpers/propertySpecifications/dateRanges.spec.js +0 -95
  59. package/dist/helpers/propertySpecifications/propertySpecifications.d.ts +0 -27
  60. package/dist/helpers/propertySpecifications/propertySpecifications.js +0 -70
  61. package/dist/helpers/propertySpecifications/propertySpecifications.spec.d.ts +0 -1
  62. package/dist/helpers/propertySpecifications/propertySpecifications.spec.js +0 -266
@@ -0,0 +1,716 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BASE_TYPE_WITH_PROPERTIES = exports.BASE_MINIMAL_TYPE = void 0;
4
+ exports.BASE_MINIMAL_TYPE = {
5
+ pk: 4041,
6
+ id: 'QohixlUJ9Y6GHcl6',
7
+ createdOn: '2023-10-17T13:59:25.629Z',
8
+ updatedOn: '2023-10-17T13:59:25.629Z',
9
+ createdById: 'sHBFOywiM5xIDtLJ',
10
+ updatedById: 'sHBFOywiM5xIDtLJ',
11
+ isArchived: false,
12
+ orgId: '90IOGA_YSY2LNrjh',
13
+ slug: 'color',
14
+ label: 'Color',
15
+ typePath: 'color',
16
+ typeRootId: 'd67efdb0-2e4d-4629-a707-d18eaf14bc88',
17
+ parentId: null,
18
+ typeProperties: [],
19
+ };
20
+ exports.BASE_TYPE_WITH_PROPERTIES = {
21
+ pk: 4041,
22
+ id: 'QohixlUJ9Y6GHcl6',
23
+ createdOn: '2023-10-17T13:59:25.629Z',
24
+ updatedOn: '2023-10-17T13:59:25.629Z',
25
+ createdById: 'sHBFOywiM5xIDtLJ',
26
+ updatedById: 'sHBFOywiM5xIDtLJ',
27
+ isArchived: false,
28
+ orgId: '90IOGA_YSY2LNrjh',
29
+ slug: 'color',
30
+ label: 'Color',
31
+ typePath: 'color',
32
+ typeRootId: 'd67efdb0-2e4d-4629-a707-d18eaf14bc88',
33
+ parentId: null,
34
+ typePolicyIds: [],
35
+ typePolicies: [],
36
+ typeProperties: [
37
+ {
38
+ pk: 8029,
39
+ id: '5PmgsTRZ9YjW4WK4',
40
+ createdOn: '2023-10-17T13:59:25.649Z',
41
+ updatedOn: '2023-10-17T13:59:25.649Z',
42
+ createdById: 'sHBFOywiM5xIDtLJ',
43
+ updatedById: 'sHBFOywiM5xIDtLJ',
44
+ isArchived: false,
45
+ orgId: '90IOGA_YSY2LNrjh',
46
+ propertyType: 'string',
47
+ slug: 'hexCode',
48
+ label: 'Hex Code',
49
+ editable: true,
50
+ core: false,
51
+ typePropertyOptionSetId: null,
52
+ typePropertyUserListId: null,
53
+ carryOverBehavior: null,
54
+ carryOverDefault: null,
55
+ copyBehavior: null,
56
+ copyDefault: null,
57
+ formula: null,
58
+ numberFormat: null,
59
+ referencedTypeRootSlug: null,
60
+ referencedTypeRole: null,
61
+ referencedTypeFilterProperties: null,
62
+ referencedTypeId: null,
63
+ referencedTypePath: null,
64
+ defaultValue: null,
65
+ propertyLevel: null,
66
+ formulaFunction: null,
67
+ validationFunction: null,
68
+ description: null,
69
+ apiDetails: null,
70
+ notes: null,
71
+ searchable: false,
72
+ isFederationProperty: false,
73
+ isUniqueProperty: false,
74
+ isUniquePropertyInFamily: false,
75
+ required: false,
76
+ sequenceSeedValue: null,
77
+ optionsSet: null,
78
+ inherited: false,
79
+ used: true,
80
+ overriddenPropertySlugs: [],
81
+ typePropertyPolicyIds: [],
82
+ },
83
+ {
84
+ pk: 8028,
85
+ id: 'sIKUaUYj4qMmycQx',
86
+ createdOn: '2023-10-17T13:59:25.649Z',
87
+ updatedOn: '2023-10-17T13:59:25.649Z',
88
+ createdById: 'sHBFOywiM5xIDtLJ',
89
+ updatedById: 'sHBFOywiM5xIDtLJ',
90
+ isArchived: false,
91
+ orgId: '90IOGA_YSY2LNrjh',
92
+ propertyType: 'string',
93
+ slug: 'hex',
94
+ label: 'Hex',
95
+ editable: true,
96
+ core: false,
97
+ typePropertyOptionSetId: null,
98
+ typePropertyUserListId: null,
99
+ carryOverBehavior: null,
100
+ carryOverDefault: null,
101
+ copyBehavior: null,
102
+ copyDefault: null,
103
+ formula: null,
104
+ numberFormat: null,
105
+ referencedTypeRootSlug: null,
106
+ referencedTypeRole: null,
107
+ referencedTypeFilterProperties: null,
108
+ referencedTypeId: null,
109
+ referencedTypePath: null,
110
+ defaultValue: null,
111
+ propertyLevel: null,
112
+ formulaFunction: null,
113
+ validationFunction: null,
114
+ description: null,
115
+ apiDetails: null,
116
+ notes: null,
117
+ searchable: false,
118
+ isFederationProperty: false,
119
+ isUniqueProperty: false,
120
+ isUniquePropertyInFamily: false,
121
+ required: false,
122
+ sequenceSeedValue: null,
123
+ optionsSet: null,
124
+ inherited: false,
125
+ used: true,
126
+ overriddenPropertySlugs: [],
127
+ typePropertyPolicyIds: [],
128
+ },
129
+ {
130
+ pk: 8035,
131
+ id: 'OcMldTg3oi4neSkL',
132
+ createdOn: '2023-10-17T13:59:25.648Z',
133
+ updatedOn: '2023-10-17T13:59:25.648Z',
134
+ createdById: 'sHBFOywiM5xIDtLJ',
135
+ updatedById: 'sHBFOywiM5xIDtLJ',
136
+ isArchived: false,
137
+ orgId: '90IOGA_YSY2LNrjh',
138
+ propertyType: 'string',
139
+ slug: 'name',
140
+ label: 'Name',
141
+ editable: true,
142
+ core: false,
143
+ typePropertyOptionSetId: null,
144
+ typePropertyUserListId: null,
145
+ carryOverBehavior: null,
146
+ carryOverDefault: null,
147
+ copyBehavior: null,
148
+ copyDefault: null,
149
+ formula: null,
150
+ numberFormat: null,
151
+ referencedTypeRootSlug: null,
152
+ referencedTypeRole: null,
153
+ referencedTypeFilterProperties: null,
154
+ referencedTypeId: null,
155
+ referencedTypePath: null,
156
+ defaultValue: null,
157
+ propertyLevel: null,
158
+ formulaFunction: null,
159
+ validationFunction: null,
160
+ description: null,
161
+ apiDetails: null,
162
+ notes: null,
163
+ searchable: false,
164
+ isFederationProperty: false,
165
+ isUniqueProperty: false,
166
+ isUniquePropertyInFamily: false,
167
+ required: false,
168
+ sequenceSeedValue: null,
169
+ optionsSet: null,
170
+ inherited: false,
171
+ used: true,
172
+ overriddenPropertySlugs: [],
173
+ typePropertyPolicyIds: [],
174
+ },
175
+ {
176
+ pk: 8030,
177
+ id: 'eDfXqLKN5Eug5uYD',
178
+ createdOn: '2023-10-17T13:59:25.649Z',
179
+ updatedOn: '2023-10-17T13:59:25.649Z',
180
+ createdById: 'sHBFOywiM5xIDtLJ',
181
+ updatedById: 'sHBFOywiM5xIDtLJ',
182
+ isArchived: false,
183
+ orgId: '90IOGA_YSY2LNrjh',
184
+ propertyType: 'number',
185
+ slug: 'red',
186
+ label: 'Red',
187
+ editable: true,
188
+ core: false,
189
+ typePropertyOptionSetId: null,
190
+ typePropertyUserListId: null,
191
+ carryOverBehavior: null,
192
+ carryOverDefault: null,
193
+ copyBehavior: null,
194
+ copyDefault: null,
195
+ formula: null,
196
+ numberFormat: null,
197
+ referencedTypeRootSlug: null,
198
+ referencedTypeRole: null,
199
+ referencedTypeFilterProperties: null,
200
+ referencedTypeId: null,
201
+ referencedTypePath: null,
202
+ defaultValue: null,
203
+ propertyLevel: null,
204
+ formulaFunction: null,
205
+ validationFunction: null,
206
+ description: null,
207
+ apiDetails: null,
208
+ notes: null,
209
+ searchable: false,
210
+ isFederationProperty: false,
211
+ isUniqueProperty: false,
212
+ isUniquePropertyInFamily: false,
213
+ required: false,
214
+ sequenceSeedValue: null,
215
+ optionsSet: null,
216
+ inherited: false,
217
+ used: true,
218
+ overriddenPropertySlugs: [],
219
+ typePropertyPolicyIds: [],
220
+ },
221
+ {
222
+ pk: 8032,
223
+ id: 'yUEGBl9fKOKIAFPG',
224
+ createdOn: '2023-10-17T13:59:25.649Z',
225
+ updatedOn: '2023-10-17T13:59:25.649Z',
226
+ createdById: 'sHBFOywiM5xIDtLJ',
227
+ updatedById: 'sHBFOywiM5xIDtLJ',
228
+ isArchived: false,
229
+ orgId: '90IOGA_YSY2LNrjh',
230
+ propertyType: 'number',
231
+ slug: 'green',
232
+ label: 'Green',
233
+ editable: true,
234
+ core: false,
235
+ typePropertyOptionSetId: null,
236
+ typePropertyUserListId: null,
237
+ carryOverBehavior: null,
238
+ carryOverDefault: null,
239
+ copyBehavior: null,
240
+ copyDefault: null,
241
+ formula: null,
242
+ numberFormat: null,
243
+ referencedTypeRootSlug: null,
244
+ referencedTypeRole: null,
245
+ referencedTypeFilterProperties: null,
246
+ referencedTypeId: null,
247
+ referencedTypePath: null,
248
+ defaultValue: null,
249
+ propertyLevel: null,
250
+ formulaFunction: null,
251
+ validationFunction: null,
252
+ description: null,
253
+ apiDetails: null,
254
+ notes: null,
255
+ searchable: false,
256
+ isFederationProperty: false,
257
+ isUniqueProperty: false,
258
+ isUniquePropertyInFamily: false,
259
+ required: false,
260
+ sequenceSeedValue: null,
261
+ optionsSet: null,
262
+ inherited: false,
263
+ used: true,
264
+ overriddenPropertySlugs: [],
265
+ typePropertyPolicyIds: [],
266
+ },
267
+ {
268
+ pk: 8031,
269
+ id: 'uHgR_EA7LUaZzj-f',
270
+ createdOn: '2023-10-17T13:59:25.649Z',
271
+ updatedOn: '2023-10-17T13:59:25.649Z',
272
+ createdById: 'sHBFOywiM5xIDtLJ',
273
+ updatedById: 'sHBFOywiM5xIDtLJ',
274
+ isArchived: false,
275
+ orgId: '90IOGA_YSY2LNrjh',
276
+ propertyType: 'number',
277
+ slug: 'blue',
278
+ label: 'Blue',
279
+ editable: true,
280
+ core: false,
281
+ typePropertyOptionSetId: null,
282
+ typePropertyUserListId: null,
283
+ carryOverBehavior: null,
284
+ carryOverDefault: null,
285
+ copyBehavior: null,
286
+ copyDefault: null,
287
+ formula: null,
288
+ numberFormat: null,
289
+ referencedTypeRootSlug: null,
290
+ referencedTypeRole: null,
291
+ referencedTypeFilterProperties: null,
292
+ referencedTypeId: null,
293
+ referencedTypePath: null,
294
+ defaultValue: null,
295
+ propertyLevel: null,
296
+ formulaFunction: null,
297
+ validationFunction: null,
298
+ description: null,
299
+ apiDetails: null,
300
+ notes: null,
301
+ searchable: false,
302
+ isFederationProperty: false,
303
+ isUniqueProperty: false,
304
+ isUniquePropertyInFamily: false,
305
+ required: false,
306
+ sequenceSeedValue: null,
307
+ optionsSet: null,
308
+ inherited: false,
309
+ used: true,
310
+ overriddenPropertySlugs: [],
311
+ typePropertyPolicyIds: [],
312
+ },
313
+ {
314
+ pk: 8033,
315
+ id: 'fNpgLXC4Xg35xN6S',
316
+ createdOn: '2023-10-17T13:59:25.649Z',
317
+ updatedOn: '2023-10-17T13:59:25.649Z',
318
+ createdById: 'sHBFOywiM5xIDtLJ',
319
+ updatedById: 'sHBFOywiM5xIDtLJ',
320
+ isArchived: false,
321
+ orgId: '90IOGA_YSY2LNrjh',
322
+ propertyType: 'string',
323
+ slug: 'rgb',
324
+ label: 'RGB',
325
+ editable: true,
326
+ core: false,
327
+ typePropertyOptionSetId: null,
328
+ typePropertyUserListId: null,
329
+ carryOverBehavior: null,
330
+ carryOverDefault: null,
331
+ copyBehavior: null,
332
+ copyDefault: null,
333
+ formula: null,
334
+ numberFormat: null,
335
+ referencedTypeRootSlug: null,
336
+ referencedTypeRole: null,
337
+ referencedTypeFilterProperties: null,
338
+ referencedTypeId: null,
339
+ referencedTypePath: null,
340
+ defaultValue: null,
341
+ propertyLevel: null,
342
+ formulaFunction: null,
343
+ validationFunction: null,
344
+ description: null,
345
+ apiDetails: null,
346
+ notes: null,
347
+ searchable: false,
348
+ isFederationProperty: false,
349
+ isUniqueProperty: false,
350
+ isUniquePropertyInFamily: false,
351
+ required: false,
352
+ sequenceSeedValue: null,
353
+ optionsSet: null,
354
+ inherited: false,
355
+ used: true,
356
+ overriddenPropertySlugs: [],
357
+ typePropertyPolicyIds: [],
358
+ },
359
+ {
360
+ pk: 8034,
361
+ id: 'PTCH2tKHeEQKZCaT',
362
+ createdOn: '2023-10-17T13:59:25.649Z',
363
+ updatedOn: '2023-10-17T13:59:25.649Z',
364
+ createdById: 'sHBFOywiM5xIDtLJ',
365
+ updatedById: 'sHBFOywiM5xIDtLJ',
366
+ isArchived: false,
367
+ orgId: '90IOGA_YSY2LNrjh',
368
+ propertyType: 'string',
369
+ slug: 'rgba',
370
+ label: 'RGBA',
371
+ editable: true,
372
+ core: false,
373
+ typePropertyOptionSetId: null,
374
+ typePropertyUserListId: null,
375
+ carryOverBehavior: null,
376
+ carryOverDefault: null,
377
+ copyBehavior: null,
378
+ copyDefault: null,
379
+ formula: null,
380
+ numberFormat: null,
381
+ referencedTypeRootSlug: null,
382
+ referencedTypeRole: null,
383
+ referencedTypeFilterProperties: null,
384
+ referencedTypeId: null,
385
+ referencedTypePath: null,
386
+ defaultValue: null,
387
+ propertyLevel: null,
388
+ formulaFunction: null,
389
+ validationFunction: null,
390
+ description: null,
391
+ apiDetails: null,
392
+ notes: null,
393
+ searchable: false,
394
+ isFederationProperty: false,
395
+ isUniqueProperty: false,
396
+ isUniquePropertyInFamily: false,
397
+ required: false,
398
+ sequenceSeedValue: null,
399
+ optionsSet: null,
400
+ inherited: false,
401
+ used: true,
402
+ overriddenPropertySlugs: [],
403
+ typePropertyPolicyIds: [],
404
+ },
405
+ {
406
+ pk: 30428,
407
+ id: 'mPw5-LH3WwJAskmV',
408
+ createdOn: '2025-06-05T15:49:39.987Z',
409
+ updatedOn: '2025-06-05T15:49:39.987Z',
410
+ createdById: 'cjyQx_ToJ3VMqUQN',
411
+ updatedById: 'cjyQx_ToJ3VMqUQN',
412
+ isArchived: false,
413
+ orgId: '90IOGA_YSY2LNrjh',
414
+ propertyType: 'boolean',
415
+ slug: 'isArchived',
416
+ label: 'Archived',
417
+ editable: true,
418
+ core: false,
419
+ typePropertyOptionSetId: null,
420
+ typePropertyUserListId: null,
421
+ carryOverBehavior: null,
422
+ carryOverDefault: null,
423
+ copyBehavior: null,
424
+ copyDefault: null,
425
+ formula: null,
426
+ numberFormat: null,
427
+ referencedTypeRootSlug: null,
428
+ referencedTypeRole: null,
429
+ referencedTypeFilterProperties: null,
430
+ referencedTypeId: null,
431
+ referencedTypePath: null,
432
+ defaultValue: null,
433
+ propertyLevel: null,
434
+ formulaFunction: null,
435
+ validationFunction: null,
436
+ description: null,
437
+ apiDetails: null,
438
+ notes: null,
439
+ searchable: false,
440
+ isFederationProperty: false,
441
+ isUniqueProperty: false,
442
+ isUniquePropertyInFamily: false,
443
+ required: false,
444
+ sequenceSeedValue: null,
445
+ optionsSet: null,
446
+ inherited: false,
447
+ used: true,
448
+ overriddenPropertySlugs: [],
449
+ typePropertyPolicyIds: [],
450
+ },
451
+ {
452
+ pk: 33839,
453
+ id: 'Qvay-ZyEjYH3yHcK',
454
+ createdOn: '2025-08-15T16:48:29.603Z',
455
+ updatedOn: '2025-08-15T16:48:29.603Z',
456
+ createdById: 'cjyQx_ToJ3VMqUQN',
457
+ updatedById: 'cjyQx_ToJ3VMqUQN',
458
+ isArchived: false,
459
+ orgId: '90IOGA_YSY2LNrjh',
460
+ propertyType: 'sequence',
461
+ slug: 'federatedId',
462
+ label: 'Federated Id',
463
+ editable: true,
464
+ core: false,
465
+ typePropertyOptionSetId: null,
466
+ typePropertyUserListId: null,
467
+ carryOverBehavior: null,
468
+ carryOverDefault: null,
469
+ copyBehavior: null,
470
+ copyDefault: null,
471
+ formula: null,
472
+ numberFormat: null,
473
+ referencedTypeRootSlug: null,
474
+ referencedTypeRole: null,
475
+ referencedTypeFilterProperties: null,
476
+ referencedTypeId: null,
477
+ referencedTypePath: null,
478
+ defaultValue: null,
479
+ propertyLevel: null,
480
+ formulaFunction: null,
481
+ validationFunction: null,
482
+ description: null,
483
+ apiDetails: null,
484
+ notes: null,
485
+ searchable: false,
486
+ isFederationProperty: false,
487
+ isUniqueProperty: false,
488
+ isUniquePropertyInFamily: false,
489
+ required: false,
490
+ sequenceSeedValue: 1,
491
+ optionsSet: null,
492
+ inherited: false,
493
+ used: true,
494
+ overriddenPropertySlugs: [],
495
+ typePropertyPolicyIds: [],
496
+ },
497
+ {
498
+ pk: 860,
499
+ id: 'abcd',
500
+ createdOn: '2021-01-26T23:53:41.400Z',
501
+ updatedOn: '2021-04-12T16:33:46.034Z',
502
+ createdById: null,
503
+ updatedById: null,
504
+ isArchived: false,
505
+ orgId: '',
506
+ propertyType: 'date',
507
+ slug: 'createdOn',
508
+ label: 'Created On',
509
+ editable: false,
510
+ core: true,
511
+ typePropertyOptionSetId: null,
512
+ typePropertyUserListId: null,
513
+ carryOverBehavior: null,
514
+ carryOverDefault: null,
515
+ copyBehavior: null,
516
+ copyDefault: null,
517
+ formula: null,
518
+ numberFormat: null,
519
+ referencedTypeRootSlug: null,
520
+ referencedTypeRole: null,
521
+ referencedTypeFilterProperties: null,
522
+ referencedTypeId: null,
523
+ referencedTypePath: null,
524
+ defaultValue: null,
525
+ propertyLevel: null,
526
+ formulaFunction: null,
527
+ validationFunction: null,
528
+ description: null,
529
+ apiDetails: null,
530
+ notes: null,
531
+ searchable: false,
532
+ isFederationProperty: false,
533
+ isUniqueProperty: false,
534
+ isUniquePropertyInFamily: false,
535
+ required: false,
536
+ sequenceSeedValue: null,
537
+ optionsSet: null,
538
+ inherited: false,
539
+ used: true,
540
+ overriddenPropertySlugs: [],
541
+ typePropertyPolicyIds: [],
542
+ },
543
+ {
544
+ pk: 862,
545
+ id: 'efgh',
546
+ createdOn: '2021-01-26T23:53:41.400Z',
547
+ updatedOn: '2021-04-12T16:33:46.191Z',
548
+ createdById: null,
549
+ updatedById: null,
550
+ isArchived: false,
551
+ orgId: '',
552
+ propertyType: 'date',
553
+ slug: 'updatedOn',
554
+ label: 'Updated On',
555
+ editable: false,
556
+ core: true,
557
+ typePropertyOptionSetId: null,
558
+ typePropertyUserListId: null,
559
+ carryOverBehavior: null,
560
+ carryOverDefault: null,
561
+ copyBehavior: null,
562
+ copyDefault: null,
563
+ formula: null,
564
+ numberFormat: null,
565
+ referencedTypeRootSlug: null,
566
+ referencedTypeRole: null,
567
+ referencedTypeFilterProperties: null,
568
+ referencedTypeId: null,
569
+ referencedTypePath: null,
570
+ defaultValue: null,
571
+ propertyLevel: null,
572
+ formulaFunction: null,
573
+ validationFunction: null,
574
+ description: null,
575
+ apiDetails: null,
576
+ notes: null,
577
+ searchable: false,
578
+ isFederationProperty: false,
579
+ isUniqueProperty: false,
580
+ isUniquePropertyInFamily: false,
581
+ required: false,
582
+ sequenceSeedValue: null,
583
+ optionsSet: null,
584
+ inherited: false,
585
+ used: true,
586
+ overriddenPropertySlugs: [],
587
+ typePropertyPolicyIds: [],
588
+ },
589
+ ],
590
+ typePropertyPolicies: [],
591
+ typeRuleSets: [],
592
+ typeOptionSetHierarchyLinks: [],
593
+ relations: {
594
+ org: {
595
+ name: 'org',
596
+ entityType: 'org',
597
+ cardinality: '1',
598
+ },
599
+ content: {
600
+ name: 'content',
601
+ entityType: 'content',
602
+ cardinality: 'N',
603
+ },
604
+ comments: {
605
+ name: 'comments',
606
+ entityType: 'comment',
607
+ cardinality: 'N',
608
+ },
609
+ createdBy: {
610
+ name: 'createdBy',
611
+ entityType: 'user',
612
+ cardinality: '0_1',
613
+ },
614
+ updatedBy: {
615
+ name: 'updatedBy',
616
+ entityType: 'user',
617
+ cardinality: '0_1',
618
+ },
619
+ workspace: {
620
+ name: 'workspace',
621
+ entityType: 'workspace',
622
+ cardinality: '1',
623
+ },
624
+ primaryViewable: {
625
+ name: 'primaryViewable',
626
+ entityType: 'content',
627
+ cardinality: '0_1',
628
+ },
629
+ },
630
+ typeInterfaces: [
631
+ {
632
+ slug: 'content_holder',
633
+ label: 'ContentHolder',
634
+ },
635
+ {
636
+ slug: 'comment_holder',
637
+ label: 'CommentHolder',
638
+ },
639
+ {
640
+ slug: 'viewable',
641
+ label: 'Viewable',
642
+ },
643
+ {
644
+ slug: 'base_managed',
645
+ label: 'BaseManaged',
646
+ },
647
+ {
648
+ slug: 'org_managed',
649
+ label: 'OrgManaged',
650
+ },
651
+ {
652
+ slug: 'workspace_managed',
653
+ label: 'WorkspaceManaged',
654
+ },
655
+ {
656
+ slug: 'searchable',
657
+ label: 'Searchable',
658
+ },
659
+ {
660
+ slug: 'referenceable',
661
+ label: 'Referenceable',
662
+ },
663
+ {
664
+ slug: 'change_logged',
665
+ label: 'ChangeLogged',
666
+ },
667
+ {
668
+ slug: 'webhookable',
669
+ label: 'Webhookable',
670
+ },
671
+ {
672
+ slug: 'event_workflow-managed',
673
+ label: 'EventWorkflowManaged',
674
+ },
675
+ {
676
+ slug: 'history_managed',
677
+ label: 'HistoryManaged',
678
+ },
679
+ ],
680
+ };
681
+ class Types {
682
+ getType(options) {
683
+ return exports.BASE_MINIMAL_TYPE;
684
+ }
685
+ }
686
+ class Entities {
687
+ get(options) {
688
+ if (options.entityName === 'type' && !options.id && !options.criteria) {
689
+ return [exports.BASE_MINIMAL_TYPE];
690
+ }
691
+ if (options.entityName === 'type' &&
692
+ options.id === exports.BASE_MINIMAL_TYPE.id &&
693
+ options?.relations?.includes('typeProperties')) {
694
+ return exports.BASE_TYPE_WITH_PROPERTIES;
695
+ }
696
+ if (options.id) {
697
+ return null;
698
+ }
699
+ return [];
700
+ }
701
+ create(options) {
702
+ return options.object ? options.object : {};
703
+ }
704
+ update(options) {
705
+ return options.object ? options.object : {};
706
+ }
707
+ delete({ id }) {
708
+ return { id };
709
+ }
710
+ }
711
+ module.exports = {
712
+ Types,
713
+ Entities,
714
+ BASE_MINIMAL_TYPE: exports.BASE_MINIMAL_TYPE,
715
+ BASE_TYPE_WITH_PROPERTIES: exports.BASE_TYPE_WITH_PROPERTIES,
716
+ };