@contrail/cli 3.6.0-alpha-8-alpha.694fd70 → 3.6.0-alpha.693d785
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 +45 -151
- package/dist/api/feature-flags.d.ts +3 -0
- package/dist/api/feature-flags.js +29 -0
- package/dist/api/types.d.ts +0 -35
- package/dist/api/types.js +1 -49
- package/dist/api/users.d.ts +1 -0
- package/dist/api/users.js +10 -1
- package/dist/auth/login.d.ts +4 -0
- package/dist/auth/login.js +167 -93
- package/dist/auth/login.spec.js +305 -0
- package/dist/auth/sso.d.ts +36 -0
- package/dist/auth/sso.js +168 -0
- package/dist/auth/sso.spec.js +138 -0
- package/dist/basecommand.d.ts +1 -3
- package/dist/basecommand.js +2 -2
- package/dist/commands/app/getApiKey.js +2 -2
- package/dist/commands/config/set.js +1 -1
- package/dist/commands/feature-flags/export.d.ts +19 -0
- package/dist/commands/feature-flags/export.js +66 -0
- package/dist/commands/feature-flags/export.spec.js +109 -0
- package/dist/commands/feature-flags/import.d.ts +42 -0
- package/dist/commands/feature-flags/import.js +191 -0
- package/dist/commands/feature-flags/import.spec.js +194 -0
- package/dist/commands/instance/export.d.ts +9 -0
- package/dist/commands/instance/export.js +18 -3
- package/dist/commands/instance/export.spec.js +32 -0
- package/dist/commands/instance/import.d.ts +3 -0
- package/dist/commands/instance/import.js +5 -0
- package/dist/commands/instance/import.spec.js +4 -0
- package/dist/commands/login.d.ts +12 -0
- package/dist/commands/login.js +25 -0
- package/dist/common.d.ts +1 -3
- package/dist/common.js +1 -13
- package/dist/helpers/config/config.d.ts +5 -4
- package/dist/helpers/config/config.js +10 -12
- package/dist/helpers/file-helpers.d.ts +0 -1
- package/dist/helpers/file-helpers.js +1 -18
- package/dist/logger.js +1 -4
- package/node_modules/@contrail/entity-compare/package.json +3 -6
- package/node_modules/@contrail/loader/lib/common/conditional-columns.js +1 -1
- package/node_modules/@contrail/loader/lib/constants.d.ts +8 -0
- package/node_modules/@contrail/loader/lib/constants.js +9 -1
- package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.d.ts +4 -0
- package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.js +57 -0
- package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.spec.js +492 -34
- package/node_modules/@contrail/loader/lib/pipeline/validate.js +2 -52
- package/node_modules/@contrail/loader/lib/pipeline/validate.spec.js +0 -85
- package/node_modules/@contrail/loader/package.json +2 -2
- package/node_modules/@contrail/sdk/.github/workflows/publish-to-npm.yml +4 -1
- package/node_modules/@contrail/sdk/lib/auth/login.js +1 -1
- package/node_modules/@contrail/sdk/lib/config/config.d.ts +0 -3
- package/node_modules/@contrail/sdk/lib/config/config.js +7 -13
- package/node_modules/@contrail/sdk/lib/core/request.js +2 -6
- package/node_modules/@contrail/sdk/lib/entities/entities.client.d.ts +0 -2
- package/node_modules/@contrail/sdk/lib/entities/entities.client.js +1 -3
- package/node_modules/@contrail/sdk/lib/entities/entity.resource.registry.js +0 -1
- package/node_modules/@contrail/sdk/package.json +1 -1
- package/oclif.manifest.json +75 -365
- package/package.json +15 -5
- package/dist/commands/entities/create.d.ts +0 -48
- package/dist/commands/entities/create.js +0 -639
- package/dist/commands/entities/create.spec.js +0 -541
- package/dist/commands/entities/delete.d.ts +0 -19
- package/dist/commands/entities/delete.js +0 -134
- package/dist/commands/entities/get.d.ts +0 -24
- package/dist/commands/entities/get.js +0 -273
- package/dist/commands/entities/grammar.spec.js +0 -80
- package/dist/commands/entities/output.spec.js +0 -72
- package/dist/commands/entities/update.d.ts +0 -31
- package/dist/commands/entities/update.js +0 -157
- package/dist/helpers/entities/assortment-items.d.ts +0 -10
- package/dist/helpers/entities/assortment-items.js +0 -84
- package/dist/helpers/entities/batchFetch.d.ts +0 -8
- package/dist/helpers/entities/batchFetch.js +0 -49
- package/dist/helpers/entities/index.d.ts +0 -3
- package/dist/helpers/entities/index.js +0 -6
- package/dist/helpers/entities/items.d.ts +0 -10
- package/dist/helpers/entities/items.js +0 -102
- package/dist/helpers/entities/project-items.d.ts +0 -3
- package/dist/helpers/entities/project-items.js +0 -65
- package/dist/helpers/propertySpecifications/dateRanges.d.ts +0 -38
- package/dist/helpers/propertySpecifications/dateRanges.js +0 -89
- package/dist/helpers/propertySpecifications/dateRanges.spec.js +0 -95
- package/dist/helpers/propertySpecifications/propertySpecifications.d.ts +0 -40
- package/dist/helpers/propertySpecifications/propertySpecifications.js +0 -109
- package/dist/helpers/propertySpecifications/propertySpecifications.spec.d.ts +0 -1
- package/dist/helpers/propertySpecifications/propertySpecifications.spec.js +0 -373
- package/dist/logger.spec.d.ts +0 -1
- package/dist/logger.spec.js +0 -12
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/.github/pull_request_template.md +0 -31
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/.github/workflows/check-code-formatting.yml +0 -34
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/.github/workflows/empty.yml +0 -10
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/.github/workflows/generate-sdk-docs.yml +0 -32
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/.github/workflows/publish-to-npm.yml +0 -117
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/.github/workflows/sdk-lib.yml +0 -27
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/.prettierrc.yaml +0 -2
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/README.md +0 -72
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/home-hero.svg +0 -11
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/assets/assets.d.ts +0 -9
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/assets/assets.js +0 -54
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/assets/index.d.ts +0 -1
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/assets/index.js +0 -17
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/auth/auth.d.ts +0 -10
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/auth/auth.js +0 -6
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/auth/index.d.ts +0 -2
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/auth/index.js +0 -18
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/auth/login.d.ts +0 -10
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/auth/login.js +0 -209
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/config/config.d.ts +0 -48
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/config/config.js +0 -42
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/config/index.d.ts +0 -1
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/config/index.js +0 -17
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/content/content.d.ts +0 -12
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/content/content.js +0 -70
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/content/index.d.ts +0 -1
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/content/index.js +0 -17
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/core/index.d.ts +0 -1
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/core/index.js +0 -17
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/core/request.d.ts +0 -15
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/core/request.js +0 -241
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/entities/entities.client.d.ts +0 -101
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/entities/entities.client.js +0 -306
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/entities/entity-reference-expander.d.ts +0 -9
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/entities/entity-reference-expander.js +0 -86
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/entities/entity-reference.d.ts +0 -6
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/entities/entity-reference.js +0 -19
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/entities/entity.resource.registry.d.ts +0 -5
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/entities/entity.resource.registry.js +0 -59
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/entities/index.d.ts +0 -3
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/entities/index.js +0 -19
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/files/file-type-helper.d.ts +0 -3
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/files/file-type-helper.js +0 -24
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/files/files.d.ts +0 -19
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/files/files.js +0 -151
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/files/index.d.ts +0 -1
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/files/index.js +0 -17
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/index.d.ts +0 -10
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/index.js +0 -26
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/notifications/index.d.ts +0 -1
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/notifications/index.js +0 -17
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/notifications/notifications-dispatcher.d.ts +0 -16
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/notifications/notifications-dispatcher.js +0 -37
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/policies/index.d.ts +0 -1
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/policies/index.js +0 -17
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/policies/policies-cache.d.ts +0 -12
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/policies/policies-cache.js +0 -55
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/policies/policies.client.d.ts +0 -9
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/policies/policies.client.js +0 -74
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/types/index.d.ts +0 -2
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/types/index.js +0 -18
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/types/sub-types-helper.d.ts +0 -18
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/types/sub-types-helper.js +0 -98
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/types/types-cache.d.ts +0 -19
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/types/types-cache.js +0 -73
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/types/types.client.d.ts +0 -42
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/types/types.client.js +0 -217
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/package.json +0 -64
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/scripts/replicate-bug.js +0 -69
- package/node_modules/@contrail/sdk/scripts/replicate-bug.js +0 -69
- /package/dist/{commands/entities/create.spec.d.ts → auth/sso.spec.d.ts} +0 -0
- /package/dist/commands/{entities/grammar.spec.d.ts → feature-flags/export.spec.d.ts} +0 -0
- /package/dist/commands/{entities/output.spec.d.ts → feature-flags/import.spec.d.ts} +0 -0
- /package/dist/{helpers/propertySpecifications/dateRanges.spec.d.ts → commands/instance/export.spec.d.ts} +0 -0
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.6.0-alpha
|
|
20
|
+
@contrail/cli/3.6.0-alpha.693d785 linux-x64 node-v24.22.1
|
|
21
21
|
$ contrail --help [COMMAND]
|
|
22
22
|
USAGE
|
|
23
23
|
$ contrail COMMAND
|
|
@@ -51,10 +51,8 @@ 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
|
|
55
|
-
* [`contrail
|
|
56
|
-
* [`contrail entities get TYPEPATH [IDS]`](#contrail-entities-get-typepath-ids)
|
|
57
|
-
* [`contrail entities update ENTITYNAME [IDS]`](#contrail-entities-update-entityname-ids)
|
|
54
|
+
* [`contrail feature-flags export`](#contrail-feature-flags-export)
|
|
55
|
+
* [`contrail feature-flags import`](#contrail-feature-flags-import)
|
|
58
56
|
* [`contrail file upload FILELOCATION CONTENTTYPE`](#contrail-file-upload-filelocation-contenttype)
|
|
59
57
|
* [`contrail groups export`](#contrail-groups-export)
|
|
60
58
|
* [`contrail groups import GROUPSFILE`](#contrail-groups-import-groupsfile)
|
|
@@ -65,6 +63,7 @@ To get instructions on how to set up autocomplete for your shell, run `contrail
|
|
|
65
63
|
* [`contrail load custom-entity DATAFILE CONFIGFILE`](#contrail-load-custom-entity-datafile-configfile)
|
|
66
64
|
* [`contrail load line-sheet DATAFILE CONFIGFILE`](#contrail-load-line-sheet-datafile-configfile)
|
|
67
65
|
* [`contrail load upload-and-load INCOMINGFILE CONFIGFILENAME`](#contrail-load-upload-and-load-incomingfile-configfilename)
|
|
66
|
+
* [`contrail login`](#contrail-login)
|
|
68
67
|
* [`contrail org-config export`](#contrail-org-config-export)
|
|
69
68
|
* [`contrail org-config import`](#contrail-org-config-import)
|
|
70
69
|
* [`contrail projects export PROJECTNAME`](#contrail-projects-export-projectname)
|
|
@@ -497,7 +496,7 @@ Set a variable in the configuration
|
|
|
497
496
|
```
|
|
498
497
|
USAGE
|
|
499
498
|
$ contrail config set [-l error|warn|info|debug] [-e true|false] [--orgSlug <value>] [--environment
|
|
500
|
-
dev|development|prod|production
|
|
499
|
+
dev|development|prod|production] [--apiUserToken <value>] [--config <value>]
|
|
501
500
|
|
|
502
501
|
FLAGS
|
|
503
502
|
-e, --alwaysConfirmEnv=<option> [default: true] The Environment variables
|
|
@@ -507,7 +506,7 @@ FLAGS
|
|
|
507
506
|
--apiUserToken=<value> The API User Token
|
|
508
507
|
--config=<value> The config name
|
|
509
508
|
--environment=<option> The Environment
|
|
510
|
-
<options: dev|development|prod|production
|
|
509
|
+
<options: dev|development|prod|production>
|
|
511
510
|
--orgSlug=<value> The org slug
|
|
512
511
|
|
|
513
512
|
DESCRIPTION
|
|
@@ -541,180 +540,51 @@ EXAMPLES
|
|
|
541
540
|
$ contrail config use demo-org
|
|
542
541
|
```
|
|
543
542
|
|
|
544
|
-
## `contrail
|
|
543
|
+
## `contrail feature-flags export`
|
|
545
544
|
|
|
546
|
-
|
|
545
|
+
Export the enabled feature flags for your Org
|
|
547
546
|
|
|
548
547
|
```
|
|
549
548
|
USAGE
|
|
550
|
-
$ contrail
|
|
551
|
-
<value>] [-g] [-r] [-S] [--suffix <value>] [--apiVersion 1|2]
|
|
552
|
-
|
|
553
|
-
ARGUMENTS
|
|
554
|
-
PATH Path of the entity type to create
|
|
555
|
-
|
|
556
|
-
FLAGS
|
|
557
|
-
-S, --skipHydrateRelationships If true, does not hydrate relationships for the created entities
|
|
558
|
-
-d, --dryRun If true, does not create the entity but simulates the creation
|
|
559
|
-
-e, --alwaysConfirmEnv=<option> [default: true] The Environment variables
|
|
560
|
-
<options: true|false>
|
|
561
|
-
-g, --generateValues If true, generates random values for properties that are not specified. By default,
|
|
562
|
-
only specified properties are used.
|
|
563
|
-
-i, --inputFile=<value> A file with a JSON array of objects where each object is one entity to create. Cannot
|
|
564
|
-
be used with --count. Unless --generate-values is specified, only the properties in
|
|
565
|
-
the file will be used.
|
|
566
|
-
-l, --logLevel=<option> The Log Level
|
|
567
|
-
<options: error|warn|info|debug>
|
|
568
|
-
-n, --count=<value> Number of random entities to create
|
|
569
|
-
-o, --outputFile=<value> File to save the output (optional)
|
|
570
|
-
-r, --readableIds If true, uses readable IDs for the created entities
|
|
571
|
-
--apiVersion=<option> Api-Version header to send; selects the V1 or V2 variant of the endpoint
|
|
572
|
-
<options: 1|2>
|
|
573
|
-
--suffix=<value> Append a sub-route to the entity endpoint (e.g. --suffix=synchronous targets
|
|
574
|
-
/<entities>/synchronous)
|
|
575
|
-
|
|
576
|
-
DESCRIPTION
|
|
577
|
-
Create entities
|
|
578
|
-
|
|
579
|
-
EXAMPLES
|
|
580
|
-
$ contrail entities create color -g -n=10 # creates 10 random colors
|
|
581
|
-
|
|
582
|
-
$ contrail entities create color -- name="Electric Blue" green=1 red=2 blue=3 # creates one color with specified properties only
|
|
583
|
-
|
|
584
|
-
$ contrail entities create custom-entities:franchise
|
|
585
|
-
|
|
586
|
-
$ contrail entities create project-item -n=1 -- projectId=abc # creates 10 project items within project ABC
|
|
587
|
-
|
|
588
|
-
$ contrail entities create color -g -r # creates a random color with a human readable ID
|
|
589
|
-
|
|
590
|
-
$ contrail entities create color -d -- name=test # simulates the creation of a color without actually creating it
|
|
591
|
-
|
|
592
|
-
$ contrail entities create custom-entity:franchise -s # creates an entity and the response does not contain hydrating relationships
|
|
593
|
-
|
|
594
|
-
$ contrail entities create color -g -- name=Electric Blue # creates a color with the name specified and other properties auto-generated
|
|
595
|
-
|
|
596
|
-
$ contrail entities create color -o /tmp/colors.json -- name=Blue green=1 red=2 blue=3 # creates a color and saves the output to /tmp/colors.json
|
|
597
|
-
```
|
|
598
|
-
|
|
599
|
-
## `contrail entities delete ENTITYNAME [IDS]`
|
|
600
|
-
|
|
601
|
-
Delete entities by id
|
|
602
|
-
|
|
603
|
-
```
|
|
604
|
-
USAGE
|
|
605
|
-
$ contrail entities delete ENTITYNAME [IDS] [-l error|warn|info|debug] [-e true|false] [-d] [-i <value>] [--suffix
|
|
606
|
-
<value>] [--apiVersion 1|2]
|
|
607
|
-
|
|
608
|
-
ARGUMENTS
|
|
609
|
-
ENTITYNAME The name of the entity type to delete
|
|
610
|
-
IDS One or more entity ids to delete
|
|
611
|
-
|
|
612
|
-
FLAGS
|
|
613
|
-
-d, --dryRun If true, does not delete the entities but simulates the deletion
|
|
614
|
-
-e, --alwaysConfirmEnv=<option> [default: true] The Environment variables
|
|
615
|
-
<options: true|false>
|
|
616
|
-
-i, --inputFile=<value> A file with a JSON array of objects; only each object's id is used. Deletes every
|
|
617
|
-
entity in the file.
|
|
618
|
-
-l, --logLevel=<option> The Log Level
|
|
619
|
-
<options: error|warn|info|debug>
|
|
620
|
-
--apiVersion=<option> Api-Version header to send; selects the V1 or V2 variant of the endpoint
|
|
621
|
-
<options: 1|2>
|
|
622
|
-
--suffix=<value> Append a sub-route to the entity endpoint (e.g. --suffix=synchronous targets
|
|
623
|
-
/<entities>/synchronous)
|
|
624
|
-
|
|
625
|
-
DESCRIPTION
|
|
626
|
-
Delete entities by id
|
|
627
|
-
|
|
628
|
-
EXAMPLES
|
|
629
|
-
$ contrail entities delete color 123
|
|
630
|
-
|
|
631
|
-
$ contrail entities delete color id1 id2 id3
|
|
632
|
-
|
|
633
|
-
$ contrail entities delete item -i ids.json
|
|
634
|
-
```
|
|
635
|
-
|
|
636
|
-
## `contrail entities get TYPEPATH [IDS]`
|
|
637
|
-
|
|
638
|
-
Get an entity
|
|
639
|
-
|
|
640
|
-
```
|
|
641
|
-
USAGE
|
|
642
|
-
$ contrail entities get TYPEPATH [IDS] [-l error|warn|info|debug] [-e true|false] [-o <value>] [-p <value>] [-P]
|
|
643
|
-
[-s <value>] [-S] [-t <value>] [-r <value>] [--suffix <value>] [--apiVersion 1|2]
|
|
644
|
-
|
|
645
|
-
ARGUMENTS
|
|
646
|
-
TYPEPATH The name of the entity type to fetch
|
|
647
|
-
IDS One or more entity ids; shorthand for the id/ids criteria
|
|
549
|
+
$ contrail feature-flags export [-l error|warn|info|debug] [-e true|false] [-d <value>] [-f]
|
|
648
550
|
|
|
649
551
|
FLAGS
|
|
650
|
-
-
|
|
651
|
-
|
|
552
|
+
-d, --outDir=<value> [default: .] The directory to which to export the feature flags. Defaults to the
|
|
553
|
+
current directory
|
|
652
554
|
-e, --alwaysConfirmEnv=<option> [default: true] The Environment variables
|
|
653
555
|
<options: true|false>
|
|
556
|
+
-f, --overwrite Replaces any existing export files in outDir
|
|
654
557
|
-l, --logLevel=<option> The Log Level
|
|
655
558
|
<options: error|warn|info|debug>
|
|
656
|
-
-o, --outputFile=<value> File to save the output (optional)
|
|
657
|
-
-p, --propertySlugs=<value> Comma-separated list of property slugs to include in the output
|
|
658
|
-
-r, --relations=<value> Comma-separated list of relations to include in the output
|
|
659
|
-
-s, --skip=<value> Number of entities to skip (used with paginated fetch)
|
|
660
|
-
-t, --take=<value> Number of entities to fetch in a single request (default is 100)
|
|
661
|
-
--apiVersion=<option> Api-Version header to send; selects the V1 or V2 variant of the endpoint
|
|
662
|
-
<options: 1|2>
|
|
663
|
-
--suffix=<value> Append a sub-route to the entity endpoint (e.g. --suffix=synchronous targets
|
|
664
|
-
/<entities>/synchronous)
|
|
665
559
|
|
|
666
560
|
DESCRIPTION
|
|
667
|
-
|
|
561
|
+
Export the enabled feature flags for your Org
|
|
668
562
|
|
|
669
563
|
EXAMPLES
|
|
670
|
-
$ contrail
|
|
671
|
-
|
|
672
|
-
$ contrail entities get color id1 id2 id3
|
|
673
|
-
|
|
674
|
-
$ contrail entities get color -- id=123
|
|
675
|
-
|
|
676
|
-
$ contrail entities get loader-processes -- createdOn=2025-09-15..2025-09-16
|
|
677
|
-
|
|
678
|
-
$ contrail entities get orders -- updatedAt=2025-09-15T04:00:00Z..
|
|
679
|
-
|
|
680
|
-
$ contrail entities get events -- timestamp=..2025-09-16T23:59:59Z
|
|
564
|
+
$ contrail feature-flags export
|
|
681
565
|
```
|
|
682
566
|
|
|
683
|
-
## `contrail
|
|
567
|
+
## `contrail feature-flags import`
|
|
684
568
|
|
|
685
|
-
|
|
569
|
+
Upload an extracted set of feature flags
|
|
686
570
|
|
|
687
571
|
```
|
|
688
572
|
USAGE
|
|
689
|
-
$ contrail
|
|
690
|
-
[--suffix <value>] [--apiVersion 1|2]
|
|
691
|
-
|
|
692
|
-
ARGUMENTS
|
|
693
|
-
ENTITYNAME The name of the entity type to update
|
|
694
|
-
IDS One or more entity ids to update
|
|
573
|
+
$ contrail feature-flags import [-l error|warn|info|debug] [-e true|false] [-d <value>]
|
|
695
574
|
|
|
696
575
|
FLAGS
|
|
697
|
-
-
|
|
698
|
-
|
|
576
|
+
-d, --dir=<value> [default: .] The directory from which to import the feature flags. Defaults to the
|
|
577
|
+
current directory. The feature flags will be loaded from $dir/feature-flags.yml
|
|
699
578
|
-e, --alwaysConfirmEnv=<option> [default: true] The Environment variables
|
|
700
579
|
<options: true|false>
|
|
701
|
-
-i, --inputFile=<value> A file with a JSON array of {id, ...} objects; each object is one entity to update.
|
|
702
580
|
-l, --logLevel=<option> The Log Level
|
|
703
581
|
<options: error|warn|info|debug>
|
|
704
|
-
--apiVersion=<option> Api-Version header to send; selects the V1 or V2 variant of the endpoint
|
|
705
|
-
<options: 1|2>
|
|
706
|
-
--suffix=<value> Append a sub-route to the entity endpoint (e.g. --suffix=synchronous targets
|
|
707
|
-
/<entities>/synchronous)
|
|
708
582
|
|
|
709
583
|
DESCRIPTION
|
|
710
|
-
|
|
584
|
+
Upload an extracted set of feature flags
|
|
711
585
|
|
|
712
586
|
EXAMPLES
|
|
713
|
-
$ contrail
|
|
714
|
-
|
|
715
|
-
$ contrail entities update item id1 id2 id3 -- status=archived # apply the same change to several entities
|
|
716
|
-
|
|
717
|
-
$ contrail entities update color 123 -- description= notes='""' # Unset description, set notes to empty string
|
|
587
|
+
$ contrail feature-flags import
|
|
718
588
|
```
|
|
719
589
|
|
|
720
590
|
## `contrail file upload FILELOCATION CONTENTTYPE`
|
|
@@ -959,6 +829,30 @@ EXAMPLES
|
|
|
959
829
|
$ contrail load-processor upload-and-load <File Path> <Config Path>
|
|
960
830
|
```
|
|
961
831
|
|
|
832
|
+
## `contrail login`
|
|
833
|
+
|
|
834
|
+
Sign in to VibeIQ with SSO or your email and password
|
|
835
|
+
|
|
836
|
+
```
|
|
837
|
+
USAGE
|
|
838
|
+
$ contrail login [-l error|warn|info|debug] [-e true|false] [--browser]
|
|
839
|
+
|
|
840
|
+
FLAGS
|
|
841
|
+
-e, --alwaysConfirmEnv=<option> [default: true] The Environment variables
|
|
842
|
+
<options: true|false>
|
|
843
|
+
-l, --logLevel=<option> The Log Level
|
|
844
|
+
<options: error|warn|info|debug>
|
|
845
|
+
--[no-]browser Open a browser for SSO. Use --no-browser to paste a sign-in code instead.
|
|
846
|
+
|
|
847
|
+
DESCRIPTION
|
|
848
|
+
Sign in to VibeIQ with SSO or your email and password
|
|
849
|
+
|
|
850
|
+
EXAMPLES
|
|
851
|
+
$ contrail login
|
|
852
|
+
|
|
853
|
+
$ contrail login --no-browser
|
|
854
|
+
```
|
|
855
|
+
|
|
962
856
|
## `contrail org-config export`
|
|
963
857
|
|
|
964
858
|
Export the org config for your Org
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteFeatureFlag = exports.createFeatureFlag = exports.getFeatureFlags = void 0;
|
|
4
|
+
const sdk_1 = require("@contrail/sdk");
|
|
5
|
+
// a feature flag record exists only for features that are turned ON for the org,
|
|
6
|
+
// and carries no configuration beyond its featureName
|
|
7
|
+
async function getFeatureFlags(options) {
|
|
8
|
+
return new sdk_1.Entities().get({
|
|
9
|
+
entityName: 'feature-flag',
|
|
10
|
+
...options,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
exports.getFeatureFlags = getFeatureFlags;
|
|
14
|
+
// the API treats create as an upsert on featureName, so creating an already
|
|
15
|
+
// enabled flag returns the existing record instead of failing
|
|
16
|
+
async function createFeatureFlag(featureName) {
|
|
17
|
+
return new sdk_1.Entities().create({
|
|
18
|
+
entityName: 'feature-flag',
|
|
19
|
+
object: { featureName },
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
exports.createFeatureFlag = createFeatureFlag;
|
|
23
|
+
async function deleteFeatureFlag(id) {
|
|
24
|
+
return new sdk_1.Entities().delete({
|
|
25
|
+
entityName: 'feature-flag',
|
|
26
|
+
id,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
exports.deleteFeatureFlag = deleteFeatureFlag;
|
package/dist/api/types.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { TypeProperty as SDKTypeProperty } from '@contrail/types';
|
|
2
|
-
import { PropertyLevel, PropertyType, Type } from '@contrail/types';
|
|
3
1
|
export declare function getOptionSets(): Promise<any[]>;
|
|
4
2
|
export declare function getUserLists(): Promise<any[]>;
|
|
5
3
|
export declare function getOptionSetHierarchies(): Promise<any[]>;
|
|
@@ -8,36 +6,3 @@ export declare function getTypePropertyPolicies(): Promise<any[]>;
|
|
|
8
6
|
export declare function getTypePolicies(): Promise<any[]>;
|
|
9
7
|
export declare function getTypeOverrideCopies(): Promise<any[]>;
|
|
10
8
|
export declare function uploadTypeOverrideObjects(reducedOverrides: any): Promise<void>;
|
|
11
|
-
type ColonDelimitedHelper<S extends string> = S extends `${infer Head}:${infer Tail}` ? `${Head}:${ColonDelimitedHelper<Tail>}` : S;
|
|
12
|
-
export type ColonDelimited = ColonDelimitedHelper<string>;
|
|
13
|
-
export type TypeWithProperties = Type & {
|
|
14
|
-
typeProperties: TypeProperty[];
|
|
15
|
-
};
|
|
16
|
-
export interface Option {
|
|
17
|
-
value: string;
|
|
18
|
-
display: string;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface TypeProperty extends SDKTypeProperty {
|
|
22
|
-
propertyType?: PropertyType;
|
|
23
|
-
referencedTypePath?: string;
|
|
24
|
-
referencedTypeRootSlug?: string;
|
|
25
|
-
propertyLevel?: PropertyLevel;
|
|
26
|
-
}
|
|
27
|
-
export interface TypePropertyOptionSet {
|
|
28
|
-
id?: string;
|
|
29
|
-
orgId?: string;
|
|
30
|
-
name: string;
|
|
31
|
-
slug: string;
|
|
32
|
-
optionSet: Option[];
|
|
33
|
-
isArchived?: boolean;
|
|
34
|
-
}
|
|
35
|
-
export type TypeReferencesCacheByPath = Map<string, TypeWithProperties>;
|
|
36
|
-
export declare function getTypeByPath(path: ColonDelimited): Promise<TypeWithProperties>;
|
|
37
|
-
export declare function buildLocalTypesCache(paths: ColonDelimited[]): Promise<TypeReferencesCacheByPath>;
|
|
38
|
-
export declare function parseTypePath(path: ColonDelimited): {
|
|
39
|
-
root: string;
|
|
40
|
-
path: string;
|
|
41
|
-
};
|
|
42
|
-
export declare function getReferencedTypePaths(type: TypeWithProperties): ColonDelimited[];
|
|
43
|
-
export {};
|
package/dist/api/types.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.uploadTypeOverrideObjects = exports.getTypeOverrideCopies = exports.getTypePolicies = exports.getTypePropertyPolicies = exports.getRuleSets = exports.getOptionSetHierarchies = exports.getUserLists = exports.getOptionSets = void 0;
|
|
4
4
|
const sdk_1 = require("@contrail/sdk");
|
|
5
|
-
const types_1 = require("@contrail/types");
|
|
6
5
|
async function getOptionSets() {
|
|
7
6
|
return await new sdk_1.Entities().get({
|
|
8
7
|
entityName: 'type-property-option-set',
|
|
@@ -59,50 +58,3 @@ async function uploadTypeOverrideObjects(reducedOverrides) {
|
|
|
59
58
|
});
|
|
60
59
|
}
|
|
61
60
|
exports.uploadTypeOverrideObjects = uploadTypeOverrideObjects;
|
|
62
|
-
const TYPES_CACHE_BY_PATH = new Map();
|
|
63
|
-
async function fetchTypeByPath(path) {
|
|
64
|
-
const { root } = parseTypePath(path);
|
|
65
|
-
const client = new sdk_1.Entities();
|
|
66
|
-
const type = await client.get({
|
|
67
|
-
entityName: 'type',
|
|
68
|
-
suffix: `roots/${root}/path/${path}`,
|
|
69
|
-
relations: ['typeProperties'],
|
|
70
|
-
});
|
|
71
|
-
return type;
|
|
72
|
-
}
|
|
73
|
-
async function getTypeByPath(path) {
|
|
74
|
-
if (TYPES_CACHE_BY_PATH.has(path)) {
|
|
75
|
-
return TYPES_CACHE_BY_PATH.get(path);
|
|
76
|
-
}
|
|
77
|
-
const type = await fetchTypeByPath(path);
|
|
78
|
-
TYPES_CACHE_BY_PATH.set(path, type);
|
|
79
|
-
return type;
|
|
80
|
-
}
|
|
81
|
-
exports.getTypeByPath = getTypeByPath;
|
|
82
|
-
async function buildLocalTypesCache(paths) {
|
|
83
|
-
const types = await Promise.all(paths.map((path) => getTypeByPath(path)));
|
|
84
|
-
const newCache = types.reduce((acc, type) => {
|
|
85
|
-
if (!type)
|
|
86
|
-
return acc;
|
|
87
|
-
acc.set(type.typePath, type);
|
|
88
|
-
return acc;
|
|
89
|
-
}, new Map());
|
|
90
|
-
return newCache;
|
|
91
|
-
}
|
|
92
|
-
exports.buildLocalTypesCache = buildLocalTypesCache;
|
|
93
|
-
function parseTypePath(path) {
|
|
94
|
-
const parts = path.split(':').filter(Boolean);
|
|
95
|
-
if (parts.length === 0) {
|
|
96
|
-
throw new Error('Path cannot be empty');
|
|
97
|
-
}
|
|
98
|
-
const root = parts[0];
|
|
99
|
-
return { root, path };
|
|
100
|
-
}
|
|
101
|
-
exports.parseTypePath = parseTypePath;
|
|
102
|
-
function getReferencedTypePaths(type) {
|
|
103
|
-
const properties = type.typeProperties || [];
|
|
104
|
-
return properties
|
|
105
|
-
.filter((prop) => prop.propertyType === types_1.PropertyType.TypeReference)
|
|
106
|
-
.map(({ referencedTypePath }) => referencedTypePath);
|
|
107
|
-
}
|
|
108
|
-
exports.getReferencedTypePaths = getReferencedTypePaths;
|
package/dist/api/users.d.ts
CHANGED
package/dist/api/users.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getGroups = exports.getUserOrgs = void 0;
|
|
3
|
+
exports.getCurrentUserWithPlatformRoles = exports.getGroups = exports.getUserOrgs = void 0;
|
|
4
4
|
const sdk_1 = require("@contrail/sdk");
|
|
5
5
|
async function getUserOrgs(options) {
|
|
6
6
|
return new sdk_1.Entities().get({
|
|
@@ -16,3 +16,12 @@ async function getGroups(options) {
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
exports.getGroups = getGroups;
|
|
19
|
+
// GET /users/current only populates platformRoles when it is asked for as a relation
|
|
20
|
+
async function getCurrentUserWithPlatformRoles() {
|
|
21
|
+
return new sdk_1.Entities().get({
|
|
22
|
+
entityName: 'user',
|
|
23
|
+
id: 'current',
|
|
24
|
+
relations: ['platformRoles'],
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
exports.getCurrentUserWithPlatformRoles = getCurrentUserWithPlatformRoles;
|
package/dist/auth/login.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { AuthContext } from '@contrail/sdk';
|
|
2
|
+
export interface SignInOptions {
|
|
3
|
+
openBrowser: boolean;
|
|
4
|
+
}
|
|
2
5
|
export declare function authUser(): Promise<AuthContext>;
|
|
6
|
+
export declare function signIn(options: SignInOptions): Promise<AuthContext>;
|
|
3
7
|
export declare function getVersionFromPackageJson(): string;
|