diff --git a/cmd/scw/testdata/test-all-usage-tem-email-list-usage.golden b/cmd/scw/testdata/test-all-usage-tem-email-list-usage.golden index 07769d3e4..4102a8596 100644 --- a/cmd/scw/testdata/test-all-usage-tem-email-list-usage.golden +++ b/cmd/scw/testdata/test-all-usage-tem-email-list-usage.golden @@ -1,13 +1,6 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ Retrieve the list of emails sent from a specific domain or for a specific Project or Organization. You must specify the `region`. -You can filter your emails in ascending or descending order using: - - created_at - - updated_at - - status - - mail_from - - mail_rcpt - - subject. USAGE: scw tem email list [arg=value ...] @@ -22,6 +15,7 @@ ARGS: [mail-rcpt] (Optional) List emails sent to this recipient's email address [statuses.{index}] (Optional) List emails with any of these statuses (unknown | new | sending | sent | failed | canceled) [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) [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | all) diff --git a/docs/commands/tem.md b/docs/commands/tem.md index 62e89a910..0cb4b036b 100644 --- a/docs/commands/tem.md +++ b/docs/commands/tem.md @@ -233,13 +233,6 @@ scw tem email get-statistics [arg=value ...] ### List emails Retrieve the list of emails sent from a specific domain or for a specific Project or Organization. You must specify the `region`. -You can filter your emails in ascending or descending order using: - - created_at - - updated_at - - status - - mail_from - - mail_rcpt - - subject. **Usage:** @@ -262,6 +255,7 @@ scw tem email list [arg=value ...] | mail-rcpt | | (Optional) List emails sent to this recipient's email address | | statuses.{index} | One of: `unknown`, `new`, `sending`, `sent`, `failed`, `canceled` | (Optional) List emails with any of these statuses | | 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 | | region | Default: `fr-par`
One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config | diff --git a/internal/namespaces/tem/v1alpha1/tem_cli.go b/internal/namespaces/tem/v1alpha1/tem_cli.go index e511dea49..002254137 100644 --- a/internal/namespaces/tem/v1alpha1/tem_cli.go +++ b/internal/namespaces/tem/v1alpha1/tem_cli.go @@ -221,15 +221,8 @@ func temEmailGet() *core.Command { func temEmailList() *core.Command { return &core.Command{ - Short: `List emails`, - Long: `Retrieve the list of emails sent from a specific domain or for a specific Project or Organization. You must specify the ` + "`" + `region` + "`" + `. -You can filter your emails in ascending or descending order using: - - created_at - - updated_at - - status - - mail_from - - mail_rcpt - - subject.`, + Short: `List emails`, + Long: `Retrieve the list of emails sent from a specific domain or for a specific Project or Organization. You must specify the ` + "`" + `region` + "`" + `.`, Namespace: "tem", Resource: "email", Verb: "list", @@ -307,6 +300,13 @@ You can filter your emails in ascending or descending order using: Deprecated: false, Positional: false, }, + { + Name: "search", + Short: `(Optional) List emails by searching to all fields`, + Required: false, + Deprecated: false, + Positional: false, + }, { Name: "order-by", Short: `(Optional) List emails corresponding to specific criteria`,