Skip to content

Commit

Permalink
Webhook / Product preferences / Invitations commands, custom scan ali…
Browse files Browse the repository at this point in the history
…as patterns (#24)

* Webhook / Product preferences / Invitations commands, custom scan alias patterns

* Update reference docs

* Fixup tests

* Update integ.ps1

* Update integ.ps1

* Update Webhook.cs

* Update integ.ps1

* Fixup custom alias matcher

* Print current patterns in verbose log
  • Loading branch information
z4kn4fein authored May 23, 2024
1 parent f72341f commit 9d21747
Show file tree
Hide file tree
Showing 50 changed files with 1,541 additions and 42 deletions.
18 changes: 18 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ This is the complete list of the available commands provided by the CLI.
| [configcat product create](configcat-product-create.md) | Create a new Product in a specified Organization identified by the `--organization-id` option |
| [configcat product rm](configcat-product-rm.md) | Remove a Product identified by the `--product-id` option |
| [configcat product update](configcat-product-update.md) | Update a Product identified by the `--product-id` option |
| [configcat product preferences](configcat-product-preferences.md) | Manage Product preferences |
| [configcat product preferences show](configcat-product-preferences-show.md) | Show a Product's preferences |
| [configcat product preferences update](configcat-product-preferences-update.md) | Update a Product's preferences |
| [configcat product preferences update env](configcat-product-preferences-update-env.md) | Update per-environment required reason |
### configcat config
| Command | Description |
| ------ | ----------- |
Expand All @@ -35,6 +39,18 @@ This is the complete list of the available commands provided by the CLI.
| [configcat config create](configcat-config-create.md) | Create a new Config in a specified Product identified by the `--product-id` option |
| [configcat config rm](configcat-config-rm.md) | Remove a Config identified by the `--config-id` option |
| [configcat config update](configcat-config-update.md) | Update a Config identified by the `--config-id` option |
### configcat webhook
| Command | Description |
| ------ | ----------- |
| [configcat webhook](configcat-webhook.md) | Manage Webhooks |
| [configcat webhook ls](configcat-webhook-ls.md) | List all Webhooks that belongs to the configured user |
| [configcat webhook show](configcat-webhook-show.md) | Print a Webhook identified by the `--webhook-id` option |
| [configcat webhook create](configcat-webhook-create.md) | Create a new Webhook |
| [configcat webhook rm](configcat-webhook-rm.md) | Remove a Webhook identified by the `--webhook-id` option |
| [configcat webhook update](configcat-webhook-update.md) | Update a Webhook identified by the `--webhook-id` option |
| [configcat webhook headers](configcat-webhook-headers.md) | Manage Webhook headers |
| [configcat webhook headers add](configcat-webhook-headers-add.md) | Add new header |
| [configcat webhook headers rm](configcat-webhook-headers-rm.md) | Remove header |
### configcat environment
| Command | Description |
| ------ | ----------- |
Expand Down Expand Up @@ -119,6 +135,8 @@ This is the complete list of the available commands provided by the CLI.
| Command | Description |
| ------ | ----------- |
| [configcat member](configcat-member.md) | Manage Members |
| [configcat member lsio](configcat-member-lsio.md) | List all pending Invitations that belongs to an Organization |
| [configcat member lsip](configcat-member-lsip.md) | List all pending Invitations that belongs to a Product |
| [configcat member lso](configcat-member-lso.md) | List all Members that belongs to an Organization |
| [configcat member lsp](configcat-member-lsp.md) | List all Members that belongs to a Product |
| [configcat member rm](configcat-member-rm.md) | Remove Member from an Organization |
Expand Down
22 changes: 22 additions & 0 deletions docs/configcat-member-lsio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# configcat member lsio
List all pending Invitations that belongs to an Organization
## Usage
```
configcat member lsio [options]
```
## Example
```
configcat member lsio -o <organization-id>
```
## Options
| Option | Description |
| ------ | ----------- |
| `--organization-id`, `-o` | Show only an Organization's Members |
| `--json` | Format the output in JSON |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat member](configcat-member.md) | Manage Members |
22 changes: 22 additions & 0 deletions docs/configcat-member-lsip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# configcat member lsip
List all pending Invitations that belongs to a Product
## Usage
```
configcat member lsip [options]
```
## Example
```
configcat member lsip -p <product-id>
```
## Options
| Option | Description |
| ------ | ----------- |
| `--product-id`, `-p` | Show only a Product's Members |
| `--json` | Format the output in JSON |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat member](configcat-member.md) | Manage Members |
2 changes: 2 additions & 0 deletions docs/configcat-member.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ configcat member [command]
## Subcommands
| Command | Description |
| ------ | ----------- |
| [configcat member lsio](configcat-member-lsio.md) | List all pending Invitations that belongs to an Organization |
| [configcat member lsip](configcat-member-lsip.md) | List all pending Invitations that belongs to a Product |
| [configcat member lso](configcat-member-lso.md) | List all Members that belongs to an Organization |
| [configcat member lsp](configcat-member-lsp.md) | List all Members that belongs to a Product |
| [configcat member rm](configcat-member-rm.md) | Remove Member from an Organization |
Expand Down
24 changes: 24 additions & 0 deletions docs/configcat-product-preferences-show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# configcat product preferences show
Show a Product's preferences
## Aliases
`sh`, `print`
## Usage
```
configcat product preferences show [options]
```
## Example
```
configcat product preferences show -i <product-id>
```
## Options
| Option | Description |
| ------ | ----------- |
| `--product-id`, `-i` | ID of the Product |
| `--json` | Format the output in JSON |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat product preferences](configcat-product-preferences.md) | Manage Product preferences |
24 changes: 24 additions & 0 deletions docs/configcat-product-preferences-update-env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# configcat product preferences update env
Update per-environment required reason
## Aliases
`e`
## Usage
```
configcat product preferences update env [options]
```
## Example
```
configcat product preferences update env -i <product-id> -ei <environment-id>:true
```
## Options
| Option | Description |
| ------ | ----------- |
| `--product-id`, `-i` | ID of the Product |
| `--environments`, `-ei` | Format: `<environment-id>:<reason-required>`. |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat product preferences update](configcat-product-preferences-update.md) | Update a Product's preferences |
31 changes: 31 additions & 0 deletions docs/configcat-product-preferences-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# configcat product preferences update
Update a Product's preferences
## Aliases
`up`
## Usage
```
configcat product preferences update [command] [options]
```
## Example
```
configcat product preferences update -i <product-id> --reason-required true
```
## Options
| Option | Description |
| ------ | ----------- |
| `--product-id`, `-i` | ID of the Product |
| `--reason-required`, `-rr` | Indicates that a mandatory note is required for saving and publishing |
| `--key-gen-mode`, `-kg` | Determines the Feature Flag key generation mode<br/><br/>*Possible values*: `camelCase`, `kebabCase`, `lowerCase`, `pascalCase`, `upperCase` |
| `--show-variation-id`, `-vi` | Indicates whether a variation ID's must be shown on the ConfigCat Dashboard |
| `--mandatory-setting-hint`, `-msh` | Indicates whether Feature flags and Settings must have a hint |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat product preferences](configcat-product-preferences.md) | Manage Product preferences |
## Subcommands
| Command | Description |
| ------ | ----------- |
| [configcat product preferences update env](configcat-product-preferences-update-env.md) | Update per-environment required reason |
23 changes: 23 additions & 0 deletions docs/configcat-product-preferences.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# configcat product preferences
Manage Product preferences
## Aliases
`pr`
## Usage
```
configcat product preferences [command]
```
## Options
| Option | Description |
| ------ | ----------- |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat product](configcat-product.md) | Manage Products |
## Subcommands
| Command | Description |
| ------ | ----------- |
| [configcat product preferences show](configcat-product-preferences-show.md) | Show a Product's preferences |
| [configcat product preferences update](configcat-product-preferences-update.md) | Update a Product's preferences |
1 change: 1 addition & 0 deletions docs/configcat-product.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ configcat product [command]
| [configcat product create](configcat-product-create.md) | Create a new Product in a specified Organization identified by the `--organization-id` option |
| [configcat product rm](configcat-product-rm.md) | Remove a Product identified by the `--product-id` option |
| [configcat product update](configcat-product-update.md) | Update a Product identified by the `--product-id` option |
| [configcat product preferences](configcat-product-preferences.md) | Manage Product preferences |
1 change: 1 addition & 0 deletions docs/configcat-scan.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ configcat scan ./dir -c <config-id> -l 5 --print
| `--commit-url-template`, `-ct` | Template url used to generate VCS commit links. Available template parameters: `commitHash`. Example: https://github.com/my/repo/commit/{commitHash} |
| `--runner`, `-ru` | Overrides the default `ConfigCat CLI {version}` executor label on the ConfigCat dashboard |
| `--exclude-flag-keys`, `-ex` | Exclude the given Feature Flag keys from scanning. E.g.: `-ex flag1 flag2` or `-ex 'flag1,flag2'` |
| `--alias-patterns`, `-ap` | List of custom regex patterns used to search for additional aliases |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
Expand Down
27 changes: 27 additions & 0 deletions docs/configcat-webhook-create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# configcat webhook create
Create a new Webhook
## Aliases
`cr`
## Usage
```
configcat webhook create [options]
```
## Example
```
configcat webhook create -c <config-id> -e <environment-id> -u "https://example.com/hook" -m get
```
## Options
| Option | Description |
| ------ | ----------- |
| `--config-id`, `-c` | ID of the Config |
| `--environment-id`, `-e` | ID of the Environment |
| `--url`, `-u` | The Webhook's URL |
| `--http-method`, `-m` | The Webhook's HTTP method<br/><br/>*Possible values*: `get`, `post` |
| `--content`, `-co` | The Webhook's HTTP body |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat webhook](configcat-webhook.md) | Manage Webhooks |
26 changes: 26 additions & 0 deletions docs/configcat-webhook-headers-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# configcat webhook headers add
Add new header
## Aliases
`a`
## Usage
```
configcat webhook headers add [options]
```
## Example
```
configcat webhook headers add -i <webhook-id> -k Authorization -val "Bearer ..." --secure
```
## Options
| Option | Description |
| ------ | ----------- |
| `--webhook-id`, `-i` | ID of the Webhook to update |
| `--key`, `-k` | The Webhook header's key |
| `--value`, `-val` | The Webhook header's value |
| `--secure`, `-s` | If it's true, the Webhook header's value will kept as a secret |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat webhook headers](configcat-webhook-headers.md) | Manage Webhook headers |
22 changes: 22 additions & 0 deletions docs/configcat-webhook-headers-rm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# configcat webhook headers rm
Remove header
## Usage
```
configcat webhook headers rm [options]
```
## Example
```
configcat webhook headers rm -i <webhook-id> -k Authorization
```
## Options
| Option | Description |
| ------ | ----------- |
| `--webhook-id`, `-i` | ID of the Webhook to update |
| `--key`, `-k` | The Webhook header's key |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat webhook headers](configcat-webhook-headers.md) | Manage Webhook headers |
23 changes: 23 additions & 0 deletions docs/configcat-webhook-headers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# configcat webhook headers
Manage Webhook headers
## Aliases
`he`
## Usage
```
configcat webhook headers [command]
```
## Options
| Option | Description |
| ------ | ----------- |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat webhook](configcat-webhook.md) | Manage Webhooks |
## Subcommands
| Command | Description |
| ------ | ----------- |
| [configcat webhook headers add](configcat-webhook-headers-add.md) | Add new header |
| [configcat webhook headers rm](configcat-webhook-headers-rm.md) | Remove header |
22 changes: 22 additions & 0 deletions docs/configcat-webhook-ls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# configcat webhook ls
List all Webhooks that belongs to the configured user
## Usage
```
configcat webhook ls [options]
```
## Example
```
configcat webhook ls
```
## Options
| Option | Description |
| ------ | ----------- |
| `--product-id`, `-p` | Show only a Product's Webhooks |
| `--json` | Format the output in JSON |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat webhook](configcat-webhook.md) | Manage Webhooks |
21 changes: 21 additions & 0 deletions docs/configcat-webhook-rm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# configcat webhook rm
Remove a Webhook identified by the `--webhook-id` option
## Usage
```
configcat webhook rm [options]
```
## Example
```
configcat webhook rm -i <webhook-id>
```
## Options
| Option | Description |
| ------ | ----------- |
| `--webhook-id`, `-i` | ID of the Webhook to delete |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat webhook](configcat-webhook.md) | Manage Webhooks |
23 changes: 23 additions & 0 deletions docs/configcat-webhook-show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# configcat webhook show
Print a Webhook identified by the `--webhook-id` option
## Aliases
`sh`, `print`
## Usage
```
configcat webhook show [options]
```
## Example
```
configcat webhook sh -i <webhook-id>
```
## Options
| Option | Description |
| ------ | ----------- |
| `--webhook-id`, `-i` | ID of the Webhook |
| `--verbose`, `-v`, `/v` | Print detailed execution information |
| `--non-interactive`, `-ni` | Turn off progress rendering and interactive features |
| `-h`, `/h`, `--help`, `-?`, `/?` | Show help and usage information |
## Parent Command
| Command | Description |
| ------ | ----------- |
| [configcat webhook](configcat-webhook.md) | Manage Webhooks |
Loading

0 comments on commit 9d21747

Please sign in to comment.