Skip to content
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
@@ -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 ...]
Expand All @@ -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)

Expand Down
8 changes: 1 addition & 7 deletions docs/commands/tem.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**

Expand All @@ -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`<br />One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config |

Expand Down
18 changes: 9 additions & 9 deletions internal/namespaces/tem/v1alpha1/tem_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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`,
Expand Down