Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tem): add support for list email per flag #3292

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ARGS:
[subject] (Optional) List emails with this subject
[search] (Optional) List emails by searching to all fields
[order-by] (Optional) List emails corresponding to specific criteria (created_at_desc | created_at_asc | updated_at_desc | updated_at_asc | status_desc | status_asc | mail_from_desc | mail_from_asc | mail_rcpt_desc | mail_rcpt_asc | subject_desc | subject_asc)
[flags.{index}] (Optional) List emails containing only specific flags (unknown_flag | soft_bounce | hard_bounce)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | all)

DEPRECATED ARGS:
Expand Down
1 change: 1 addition & 0 deletions docs/commands/tem.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ scw tem email list [arg=value ...]
| subject | | (Optional) List emails with this subject |
| search | | (Optional) List emails by searching to all fields |
| order-by | One of: `created_at_desc`, `created_at_asc`, `updated_at_desc`, `updated_at_asc`, `status_desc`, `status_asc`, `mail_from_desc`, `mail_from_asc`, `mail_rcpt_desc`, `mail_rcpt_asc`, `subject_desc`, `subject_asc` | (Optional) List emails corresponding to specific criteria |
| flags.{index} | One of: `unknown_flag`, `soft_bounce`, `hard_bounce` | (Optional) List emails containing only specific flags |
| region | Default: `fr-par`<br />One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config |


Expand Down
8 changes: 8 additions & 0 deletions internal/namespaces/tem/v1alpha1/tem_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,14 @@ func temEmailList() *core.Command {
Positional: false,
EnumValues: []string{"created_at_desc", "created_at_asc", "updated_at_desc", "updated_at_asc", "status_desc", "status_asc", "mail_from_desc", "mail_from_asc", "mail_rcpt_desc", "mail_rcpt_asc", "subject_desc", "subject_asc"},
},
{
Name: "flags.{index}",
Short: `(Optional) List emails containing only specific flags`,
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_flag", "soft_bounce", "hard_bounce"},
},
core.RegionArgSpec(scw.RegionFrPar, scw.Region(core.AllLocalities)),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down
Loading