@contrail/cli 3.4.0-alpha → 3.4.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.
Files changed (61) 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/setup-template.d.ts +0 -2
  19. package/dist/helpers/app/setup-template.js +1 -2
  20. package/dist/helpers/config/config.js +3 -3
  21. package/dist/helpers/file-helpers.d.ts +0 -1
  22. package/dist/helpers/file-helpers.js +1 -19
  23. package/dist/helpers/types/type-uploader.d.ts +3 -1
  24. package/dist/helpers/types/type-uploader.js +55 -37
  25. package/dist/helpers/types/type-uploader.spec.js +506 -0
  26. package/dist/interfaces.d.ts +1 -0
  27. package/dist/templates/typescript/README.md +3 -1
  28. package/dist/templates/typescript/app.yml +1 -1
  29. package/dist/templates/typescript/assets/sample.json +1 -1
  30. package/dist/templates/typescript/eslintrc.json +1 -4
  31. package/dist/templates/typescript/tsconfig.json +5 -21
  32. package/oclif.manifest.json +9 -361
  33. package/package.json +5 -6
  34. package/dist/commands/entities/create.d.ts +0 -37
  35. package/dist/commands/entities/create.js +0 -555
  36. package/dist/commands/entities/create.spec.d.ts +0 -1
  37. package/dist/commands/entities/create.spec.js +0 -514
  38. package/dist/commands/entities/delete.d.ts +0 -16
  39. package/dist/commands/entities/delete.js +0 -118
  40. package/dist/commands/entities/get.d.ts +0 -20
  41. package/dist/commands/entities/get.js +0 -204
  42. package/dist/commands/entities/update.d.ts +0 -18
  43. package/dist/commands/entities/update.js +0 -116
  44. package/dist/helpers/entities/assortment-items.d.ts +0 -10
  45. package/dist/helpers/entities/assortment-items.js +0 -84
  46. package/dist/helpers/entities/batchFetch.d.ts +0 -8
  47. package/dist/helpers/entities/batchFetch.js +0 -41
  48. package/dist/helpers/entities/index.d.ts +0 -3
  49. package/dist/helpers/entities/index.js +0 -6
  50. package/dist/helpers/entities/items.d.ts +0 -10
  51. package/dist/helpers/entities/items.js +0 -102
  52. package/dist/helpers/entities/project-items.d.ts +0 -3
  53. package/dist/helpers/entities/project-items.js +0 -65
  54. package/dist/helpers/propertySpecifications/dateRanges.d.ts +0 -38
  55. package/dist/helpers/propertySpecifications/dateRanges.js +0 -89
  56. package/dist/helpers/propertySpecifications/dateRanges.spec.d.ts +0 -1
  57. package/dist/helpers/propertySpecifications/dateRanges.spec.js +0 -95
  58. package/dist/helpers/propertySpecifications/propertySpecifications.d.ts +0 -27
  59. package/dist/helpers/propertySpecifications/propertySpecifications.js +0 -70
  60. package/dist/helpers/propertySpecifications/propertySpecifications.spec.d.ts +0 -1
  61. package/dist/helpers/propertySpecifications/propertySpecifications.spec.js +0 -266
package/README.md CHANGED
@@ -17,7 +17,7 @@ $ npm install -g @contrail/cli
17
17
  $ contrail COMMAND
18
18
  running command...
19
19
  $ contrail (--version)
20
- @contrail/cli/3.4.0-alpha darwin-arm64 node-v22.19.0
20
+ @contrail/cli/3.4.0 darwin-arm64 node-v20.9.0
21
21
  $ contrail --help [COMMAND]
22
22
  USAGE
23
23
  $ contrail COMMAND
@@ -51,10 +51,6 @@ To get instructions on how to set up autocomplete for your shell, run `contrail
51
51
  * [`contrail config list`](#contrail-config-list)
52
52
  * [`contrail config set`](#contrail-config-set)
53
53
  * [`contrail config use [NAME]`](#contrail-config-use-name)
54
- * [`contrail entities create PATH`](#contrail-entities-create-path)
55
- * [`contrail entities delete ENTITYNAME`](#contrail-entities-delete-entityname)
56
- * [`contrail entities get TYPEPATH`](#contrail-entities-get-typepath)
57
- * [`contrail entities update ENTITYNAME ID`](#contrail-entities-update-entityname-id)
58
54
  * [`contrail file upload FILELOCATION CONTENTTYPE`](#contrail-file-upload-filelocation-contenttype)
59
55
  * [`contrail groups export`](#contrail-groups-export)
60
56
  * [`contrail groups import GROUPSFILE`](#contrail-groups-import-groupsfile)
@@ -539,151 +535,6 @@ EXAMPLES
539
535
  $ contrail config use demo-org
540
536
  ```
541
537
 
542
- ## `contrail entities create PATH`
543
-
544
- (BETA) Create entities
545
-
546
- ```
547
- USAGE
548
- $ contrail entities create PATH [-l error|warn|info|debug] [-e true|false] [-n <value>] [-d] [-i <value>] [-o
549
- <value>] [-p] [-r] [-s]
550
-
551
- ARGUMENTS
552
- PATH Path of the entity type to create
553
-
554
- FLAGS
555
- -d, --dryRun If true, does not create the entity but simulates the creation
556
- -e, --alwaysConfirmEnv=<option> [default: true] The Environment variables
557
- <options: true|false>
558
- -i, --inputFile=<value> A file with a JSON array of objects where each object is one entity to create. Cannot
559
- be used with --count. Unless --precise is specified, any missing values will be
560
- populated with random values.
561
- -l, --logLevel=<option> The Log Level
562
- <options: error|warn|info|debug>
563
- -n, --count=<value> Number of random entities to create
564
- -o, --outputFile=<value> File to save the output (optional)
565
- -p, --preciseProperties If true, does not generate random values for properties. All values must be
566
- specified.
567
- -r, --readableIds If true, uses readable IDs for the created entities
568
- -s, --skipHydrateRelationships If true, does not hydrate relationships for the created entities
569
-
570
- DESCRIPTION
571
- (BETA) Create entities
572
-
573
- EXAMPLES
574
- $ contrail entities create color -n=10 # creates 10 random colors
575
-
576
- $ contrail entities create color # creates one item
577
-
578
- $ contrail entities create custom-entities:franchise
579
-
580
- $ contrail entities create project-item -n=1 -- projectId=abc # creates 10 project items within project ABC
581
-
582
- $ contrail entities create color -r # creates a random color with a human readable ID
583
-
584
- $ contrail entities create color -d # simulates the creation of a random color without actually creating it
585
-
586
- $ contrail entities create custom-entity:franchise -s # creates a random color and the response does not contain hydrating relationships
587
-
588
- $ contrail entities create color -p -- name=Electric Blue green=1 red=2 blue=3 # creates a color with specified properties
589
-
590
- $ contrail entities create color -o /tmp/colors.json # creates a random color and saves the output to /tmp/colors.json
591
- ```
592
-
593
- ## `contrail entities delete ENTITYNAME`
594
-
595
- (BETA) Delete an entity
596
-
597
- ```
598
- USAGE
599
- $ contrail entities delete ENTITYNAME [-l error|warn|info|debug] [-e true|false] [-d] [-i <value>] [--id <value>]
600
-
601
- ARGUMENTS
602
- ENTITYNAME The name of the entity type to delete
603
-
604
- FLAGS
605
- -d, --dryRun If true, does not delete the entity but simulates the deletion
606
- -e, --alwaysConfirmEnv=<option> [default: true] The Environment variables
607
- <options: true|false>
608
- -i, --input=<value> A JSON array of objects where each object is one entity to create. Cannot be used
609
- with --count. Unless --precise is specified, any missing values will be populated
610
- with random values.
611
- -l, --logLevel=<option> The Log Level
612
- <options: error|warn|info|debug>
613
- --id=<value> The unique identifier of the entity
614
-
615
- DESCRIPTION
616
- (BETA) Delete an entity
617
-
618
- EXAMPLES
619
- $ contrail entities delete color 123
620
- ```
621
-
622
- ## `contrail entities get TYPEPATH`
623
-
624
- (BETA) Get an entity
625
-
626
- ```
627
- USAGE
628
- $ contrail entities get TYPEPATH [-l error|warn|info|debug] [-e true|false] [-o <value>] [-s] [-r <value>] [-p
629
- <value>] [-P] [-t <value>]
630
-
631
- ARGUMENTS
632
- TYPEPATH The name of the entity type to fetch
633
-
634
- FLAGS
635
- -P, --paginated If true, fetches all entities in a paginated manner
636
- -e, --alwaysConfirmEnv=<option> [default: true] The Environment variables
637
- <options: true|false>
638
- -l, --logLevel=<option> The Log Level
639
- <options: error|warn|info|debug>
640
- -o, --outputFile=<value> File to save the output (optional)
641
- -p, --propertySlugs=<value> Comma-separated list of property slugs to include in the output
642
- -r, --relations=<value> Comma-separated list of relations to include in the output
643
- -s, --skipHydrateRelationships Skip hydrating relationships when fetching the entity
644
- -t, --take=<value> [default: 1000] Number of entities to fetch in a single request (default is 100)
645
-
646
- DESCRIPTION
647
- (BETA) Get an entity
648
-
649
- EXAMPLES
650
- $ contrail entities get color -- id=123
651
-
652
- $ contrail entities get loader-processes -- createdOn=2025-09-15..2025-09-16
653
-
654
- $ contrail entities get orders -- updatedAt=2025-09-15T04:00:00Z..
655
-
656
- $ contrail entities get events -- timestamp=..2025-09-16T23:59:59Z
657
- ```
658
-
659
- ## `contrail entities update ENTITYNAME ID`
660
-
661
- (BETA) Update an entity
662
-
663
- ```
664
- USAGE
665
- $ contrail entities update ENTITYNAME ID [-l error|warn|info|debug] [-e true|false] [-s] [-d] [-i <value>]
666
-
667
- ARGUMENTS
668
- ENTITYNAME The name of the entity type to update
669
- ID The unique identifier of the entity
670
-
671
- FLAGS
672
- -d, --dryRun If true, does not create the entity but simulates the creation
673
- -e, --alwaysConfirmEnv=<option> [default: true] The Environment variables
674
- <options: true|false>
675
- -i, --inputFile=<value> File containing properties to update the entity (optional)
676
- -l, --logLevel=<option> The Log Level
677
- <options: error|warn|info|debug>
678
- -s, --skipHydrateRelationships Skip hydrating relationships when updating the entity
679
-
680
- DESCRIPTION
681
- (BETA) Update an entity
682
-
683
- EXAMPLES
684
- $ contrail entities update color 123 -- name=obsidian hex=000000
685
- ```
686
-
687
538
  ## `contrail file upload FILELOCATION CONTENTTYPE`
688
539
 
689
540
  Uploads a file to the VibeIQ platform
@@ -1507,7 +1358,7 @@ Upload Types Org. OptionSets are loaded from .yml files in the types directory.
1507
1358
 
1508
1359
  ```
1509
1360
  USAGE
1510
- $ contrail types uploadTypes [-l error|warn|info|debug] [-e true|false] [-d <value>]
1361
+ $ contrail types uploadTypes [-l error|warn|info|debug] [-e true|false] [-d <value>] [-m]
1511
1362
 
1512
1363
  FLAGS
1513
1364
  -d, --dir=<value> [default: .] The directory from which to export the option set data. Defaults to the
@@ -1516,6 +1367,8 @@ FLAGS
1516
1367
  <options: true|false>
1517
1368
  -l, --logLevel=<option> The Log Level
1518
1369
  <options: error|warn|info|debug>
1370
+ -m, --merge Merge types and type properties without deleting missing ones. Only adds/updates
1371
+ those present in the source files.
1519
1372
 
1520
1373
  DESCRIPTION
1521
1374
  Upload Types Org. OptionSets are loaded from .yml files in the types directory.
@@ -0,0 +1,123 @@
1
+ export declare const BASE_MINIMAL_TYPE: {
2
+ pk: number;
3
+ id: string;
4
+ createdOn: string;
5
+ updatedOn: string;
6
+ createdById: string;
7
+ updatedById: string;
8
+ isArchived: boolean;
9
+ orgId: string;
10
+ slug: string;
11
+ label: string;
12
+ typePath: string;
13
+ typeRootId: string;
14
+ parentId: any;
15
+ typeProperties: any[];
16
+ };
17
+ export declare const BASE_TYPE_WITH_PROPERTIES: {
18
+ pk: number;
19
+ id: string;
20
+ createdOn: string;
21
+ updatedOn: string;
22
+ createdById: string;
23
+ updatedById: string;
24
+ isArchived: boolean;
25
+ orgId: string;
26
+ slug: string;
27
+ label: string;
28
+ typePath: string;
29
+ typeRootId: string;
30
+ parentId: any;
31
+ typePolicyIds: any[];
32
+ typePolicies: any[];
33
+ typeProperties: {
34
+ pk: number;
35
+ id: string;
36
+ createdOn: string;
37
+ updatedOn: string;
38
+ createdById: string;
39
+ updatedById: string;
40
+ isArchived: boolean;
41
+ orgId: string;
42
+ propertyType: string;
43
+ slug: string;
44
+ label: string;
45
+ editable: boolean;
46
+ core: boolean;
47
+ typePropertyOptionSetId: any;
48
+ typePropertyUserListId: any;
49
+ carryOverBehavior: any;
50
+ carryOverDefault: any;
51
+ copyBehavior: any;
52
+ copyDefault: any;
53
+ formula: any;
54
+ numberFormat: any;
55
+ referencedTypeRootSlug: any;
56
+ referencedTypeRole: any;
57
+ referencedTypeFilterProperties: any;
58
+ referencedTypeId: any;
59
+ referencedTypePath: any;
60
+ defaultValue: any;
61
+ propertyLevel: any;
62
+ formulaFunction: any;
63
+ validationFunction: any;
64
+ description: any;
65
+ apiDetails: any;
66
+ notes: any;
67
+ searchable: boolean;
68
+ isFederationProperty: boolean;
69
+ isUniqueProperty: boolean;
70
+ isUniquePropertyInFamily: boolean;
71
+ required: boolean;
72
+ sequenceSeedValue: number;
73
+ optionsSet: any;
74
+ inherited: boolean;
75
+ used: boolean;
76
+ overriddenPropertySlugs: any[];
77
+ typePropertyPolicyIds: any[];
78
+ }[];
79
+ typePropertyPolicies: any[];
80
+ typeRuleSets: any[];
81
+ typeOptionSetHierarchyLinks: any[];
82
+ relations: {
83
+ org: {
84
+ name: string;
85
+ entityType: string;
86
+ cardinality: string;
87
+ };
88
+ content: {
89
+ name: string;
90
+ entityType: string;
91
+ cardinality: string;
92
+ };
93
+ comments: {
94
+ name: string;
95
+ entityType: string;
96
+ cardinality: string;
97
+ };
98
+ createdBy: {
99
+ name: string;
100
+ entityType: string;
101
+ cardinality: string;
102
+ };
103
+ updatedBy: {
104
+ name: string;
105
+ entityType: string;
106
+ cardinality: string;
107
+ };
108
+ workspace: {
109
+ name: string;
110
+ entityType: string;
111
+ cardinality: string;
112
+ };
113
+ primaryViewable: {
114
+ name: string;
115
+ entityType: string;
116
+ cardinality: string;
117
+ };
118
+ };
119
+ typeInterfaces: {
120
+ slug: string;
121
+ label: string;
122
+ }[];
123
+ };