Skip to content

Commit e06cbb1

Browse files
feat(api): api update
1 parent 1f4632f commit e06cbb1

7 files changed

Lines changed: 6 additions & 31 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 91
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/agentmail/agentmail-d9ffb7f4fbfaaa34cc183bd94f1d755b9d9ced80c91cfc2d670c134a650e2e4f.yml
3-
openapi_spec_hash: 72c852308a120747058e8817c41f7384
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/agentmail/agentmail-af6486aae3ab676a9825da6bd60ea7dad5d76a22c1cc8ba80515767ee774c270.yml
3+
openapi_spec_hash: 4eb49916915aeac5a7897470322459d4
44
config_hash: 79c13cf7727d64173933e0d367570632

pkg/cmd/inboxthread.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ var inboxesThreadsList = cli.Command{
9797

9898
var inboxesThreadsDelete = cli.Command{
9999
Name: "delete",
100-
Usage: "Moves the thread to trash by adding a trash label to all messages. If the thread\nis already in trash, it will be permanently deleted. Use `permanent=true` to\nforce permanent deletion.",
100+
Usage: "Permanently deletes a thread and all of its messages.",
101101
Suggest: true,
102102
Flags: []cli.Flag{
103103
&requestflag.Flag[string]{
@@ -112,11 +112,6 @@ var inboxesThreadsDelete = cli.Command{
112112
Required: true,
113113
PathParam: "thread_id",
114114
},
115-
&requestflag.Flag[*bool]{
116-
Name: "permanent",
117-
Usage: "If true, permanently delete the thread instead of moving to trash.",
118-
QueryPath: "permanent",
119-
},
120115
},
121116
Action: handleInboxesThreadsDelete,
122117
HideHelpCommand: true,

pkg/cmd/inboxthread_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ func TestInboxesThreadsDelete(t *testing.T) {
4242
"inboxes:threads", "delete",
4343
"--inbox-id", "inbox_id",
4444
"--thread-id", "thread_id",
45-
"--permanent=true",
4645
)
4746
})
4847
}

pkg/cmd/podthread.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ var podsThreadsList = cli.Command{
9797

9898
var podsThreadsDelete = cli.Command{
9999
Name: "delete",
100-
Usage: "Moves the thread to trash by adding a trash label to all messages. If the thread\nis already in trash, it will be permanently deleted. Use `permanent=true` to\nforce permanent deletion.",
100+
Usage: "Permanently deletes a thread and all of its messages.",
101101
Suggest: true,
102102
Flags: []cli.Flag{
103103
&requestflag.Flag[string]{
@@ -112,11 +112,6 @@ var podsThreadsDelete = cli.Command{
112112
Required: true,
113113
PathParam: "thread_id",
114114
},
115-
&requestflag.Flag[*bool]{
116-
Name: "permanent",
117-
Usage: "If true, permanently delete the thread instead of moving to trash.",
118-
QueryPath: "permanent",
119-
},
120115
},
121116
Action: handlePodsThreadsDelete,
122117
HideHelpCommand: true,

pkg/cmd/podthread_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ func TestPodsThreadsDelete(t *testing.T) {
4242
"pods:threads", "delete",
4343
"--pod-id", "pod_id",
4444
"--thread-id", "thread_id",
45-
"--permanent=true",
4645
)
4746
})
4847
}

pkg/cmd/thread.go

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ var threadsList = cli.Command{
9191

9292
var threadsDelete = cli.Command{
9393
Name: "delete",
94-
Usage: "Moves the thread to trash by adding a trash label to all messages. If the thread\nis already in trash, it will be permanently deleted. Use `permanent=true` to\nforce permanent deletion.",
94+
Usage: "Permanently deletes a thread and all of its messages.",
9595
Suggest: true,
9696
Flags: []cli.Flag{
9797
&requestflag.Flag[string]{
@@ -100,11 +100,6 @@ var threadsDelete = cli.Command{
100100
Required: true,
101101
PathParam: "thread_id",
102102
},
103-
&requestflag.Flag[*bool]{
104-
Name: "permanent",
105-
Usage: "If true, permanently delete the thread instead of moving to trash.",
106-
QueryPath: "permanent",
107-
},
108103
},
109104
Action: handleThreadsDelete,
110105
HideHelpCommand: true,
@@ -211,14 +206,7 @@ func handleThreadsDelete(ctx context.Context, cmd *cli.Command) error {
211206
return err
212207
}
213208

214-
params := agentmail.ThreadDeleteParams{}
215-
216-
return client.Threads.Delete(
217-
ctx,
218-
cmd.Value("thread-id").(string),
219-
params,
220-
options...,
221-
)
209+
return client.Threads.Delete(ctx, cmd.Value("thread-id").(string), options...)
222210
}
223211

224212
func handleThreadsGet(ctx context.Context, cmd *cli.Command) error {

pkg/cmd/thread_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ func TestThreadsDelete(t *testing.T) {
4040
"--api-key", "string",
4141
"threads", "delete",
4242
"--thread-id", "thread_id",
43-
"--permanent=true",
4443
)
4544
})
4645
}

0 commit comments

Comments
 (0)