agentmail 0.5.14 → 0.5.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/drafts/types/CreateDraftRequest.d.ts +17 -0
  3. package/dist/cjs/api/resources/drafts/types/UpdateDraftRequest.d.ts +22 -8
  4. package/dist/cjs/api/resources/drafts/types/index.d.ts +0 -3
  5. package/dist/cjs/api/resources/drafts/types/index.js +0 -3
  6. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +13 -0
  7. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +37 -0
  8. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +0 -69
  9. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +0 -264
  10. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +2 -3
  11. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +6 -11
  12. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/index.d.ts +0 -1
  13. package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +2 -3
  14. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +6 -11
  15. package/dist/cjs/api/resources/pods/resources/threads/client/requests/index.d.ts +0 -1
  16. package/dist/cjs/api/resources/threads/client/Client.d.ts +2 -3
  17. package/dist/cjs/api/resources/threads/client/Client.js +6 -11
  18. package/dist/cjs/api/resources/threads/client/requests/index.d.ts +0 -1
  19. package/dist/cjs/api/types/ErrorCode.d.ts +4 -0
  20. package/dist/cjs/api/types/ErrorDocs.d.ts +4 -0
  21. package/dist/cjs/api/types/ErrorFix.d.ts +4 -0
  22. package/dist/cjs/api/types/ErrorResponse.d.ts +3 -0
  23. package/dist/cjs/api/types/ValidationErrorResponse.d.ts +5 -1
  24. package/dist/cjs/api/types/index.d.ts +3 -0
  25. package/dist/cjs/api/types/index.js +3 -0
  26. package/dist/cjs/serialization/resources/drafts/types/CreateDraftRequest.d.ts +4 -0
  27. package/dist/cjs/serialization/resources/drafts/types/CreateDraftRequest.js +4 -0
  28. package/dist/cjs/serialization/resources/drafts/types/UpdateDraftRequest.d.ts +15 -8
  29. package/dist/cjs/serialization/resources/drafts/types/UpdateDraftRequest.js +15 -8
  30. package/dist/cjs/serialization/resources/drafts/types/index.d.ts +0 -3
  31. package/dist/cjs/serialization/resources/drafts/types/index.js +0 -3
  32. package/dist/cjs/serialization/types/ErrorCode.d.ts +7 -0
  33. package/dist/cjs/serialization/{resources/drafts/types/CreateDraftReplyAllRequest.js → types/ErrorCode.js} +3 -20
  34. package/dist/cjs/serialization/types/ErrorDocs.d.ts +7 -0
  35. package/dist/cjs/serialization/{resources/drafts/types/CreateDraftForwardRequest.js → types/ErrorDocs.js} +3 -26
  36. package/dist/cjs/serialization/types/ErrorFix.d.ts +7 -0
  37. package/dist/cjs/serialization/types/ErrorFix.js +39 -0
  38. package/dist/cjs/serialization/types/ErrorResponse.d.ts +6 -0
  39. package/dist/cjs/serialization/types/ErrorResponse.js +6 -0
  40. package/dist/cjs/serialization/types/ValidationErrorResponse.d.ts +8 -0
  41. package/dist/cjs/serialization/types/ValidationErrorResponse.js +8 -0
  42. package/dist/cjs/serialization/types/index.d.ts +3 -0
  43. package/dist/cjs/serialization/types/index.js +3 -0
  44. package/dist/cjs/version.d.ts +1 -1
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/esm/BaseClient.mjs +2 -2
  47. package/dist/esm/api/resources/drafts/types/CreateDraftRequest.d.mts +17 -0
  48. package/dist/esm/api/resources/drafts/types/UpdateDraftRequest.d.mts +22 -8
  49. package/dist/esm/api/resources/drafts/types/index.d.mts +0 -3
  50. package/dist/esm/api/resources/drafts/types/index.mjs +0 -3
  51. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +13 -0
  52. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +37 -0
  53. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +0 -69
  54. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +0 -264
  55. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +2 -3
  56. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +6 -11
  57. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/index.d.mts +0 -1
  58. package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +2 -3
  59. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +6 -11
  60. package/dist/esm/api/resources/pods/resources/threads/client/requests/index.d.mts +0 -1
  61. package/dist/esm/api/resources/threads/client/Client.d.mts +2 -3
  62. package/dist/esm/api/resources/threads/client/Client.mjs +6 -11
  63. package/dist/esm/api/resources/threads/client/requests/index.d.mts +0 -1
  64. package/dist/esm/api/types/ErrorCode.d.mts +4 -0
  65. package/dist/esm/api/types/ErrorDocs.d.mts +4 -0
  66. package/dist/esm/api/types/ErrorFix.d.mts +4 -0
  67. package/dist/esm/api/types/ErrorResponse.d.mts +3 -0
  68. package/dist/esm/api/types/ValidationErrorResponse.d.mts +5 -1
  69. package/dist/esm/api/types/index.d.mts +3 -0
  70. package/dist/esm/api/types/index.mjs +3 -0
  71. package/dist/esm/serialization/resources/drafts/types/CreateDraftRequest.d.mts +4 -0
  72. package/dist/esm/serialization/resources/drafts/types/CreateDraftRequest.mjs +4 -0
  73. package/dist/esm/serialization/resources/drafts/types/UpdateDraftRequest.d.mts +15 -8
  74. package/dist/esm/serialization/resources/drafts/types/UpdateDraftRequest.mjs +15 -8
  75. package/dist/esm/serialization/resources/drafts/types/index.d.mts +0 -3
  76. package/dist/esm/serialization/resources/drafts/types/index.mjs +0 -3
  77. package/dist/esm/serialization/types/ErrorCode.d.mts +7 -0
  78. package/dist/esm/serialization/types/ErrorCode.mjs +3 -0
  79. package/dist/esm/serialization/types/ErrorDocs.d.mts +7 -0
  80. package/dist/esm/serialization/types/ErrorDocs.mjs +3 -0
  81. package/dist/esm/serialization/types/ErrorFix.d.mts +7 -0
  82. package/dist/esm/serialization/types/ErrorFix.mjs +3 -0
  83. package/dist/esm/serialization/types/ErrorResponse.d.mts +6 -0
  84. package/dist/esm/serialization/types/ErrorResponse.mjs +6 -0
  85. package/dist/esm/serialization/types/ValidationErrorResponse.d.mts +8 -0
  86. package/dist/esm/serialization/types/ValidationErrorResponse.mjs +8 -0
  87. package/dist/esm/serialization/types/index.d.mts +3 -0
  88. package/dist/esm/serialization/types/index.mjs +3 -0
  89. package/dist/esm/version.d.mts +1 -1
  90. package/dist/esm/version.mjs +1 -1
  91. package/dist/llms.txt +2 -4
  92. package/package.json +1 -1
  93. package/reference.md +16 -288
  94. package/dist/cjs/api/resources/drafts/types/CreateDraftForwardRequest.d.ts +0 -21
  95. package/dist/cjs/api/resources/drafts/types/CreateDraftReplyAllRequest.d.ts +0 -17
  96. package/dist/cjs/api/resources/drafts/types/CreateDraftReplyRequest.d.ts +0 -22
  97. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/DeleteThreadRequest.d.ts +0 -8
  98. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/DeleteThreadRequest.js +0 -3
  99. package/dist/cjs/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.d.ts +0 -8
  100. package/dist/cjs/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.js +0 -3
  101. package/dist/cjs/api/resources/threads/client/requests/DeleteThreadRequest.d.ts +0 -8
  102. package/dist/cjs/api/resources/threads/client/requests/DeleteThreadRequest.js +0 -3
  103. package/dist/cjs/serialization/resources/drafts/types/CreateDraftForwardRequest.d.ts +0 -30
  104. package/dist/cjs/serialization/resources/drafts/types/CreateDraftReplyAllRequest.d.ts +0 -24
  105. package/dist/cjs/serialization/resources/drafts/types/CreateDraftReplyRequest.d.ts +0 -32
  106. package/dist/cjs/serialization/resources/drafts/types/CreateDraftReplyRequest.js +0 -64
  107. package/dist/esm/api/resources/drafts/types/CreateDraftForwardRequest.d.mts +0 -21
  108. package/dist/esm/api/resources/drafts/types/CreateDraftReplyAllRequest.d.mts +0 -17
  109. package/dist/esm/api/resources/drafts/types/CreateDraftReplyRequest.d.mts +0 -22
  110. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/DeleteThreadRequest.d.mts +0 -8
  111. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/DeleteThreadRequest.mjs +0 -2
  112. package/dist/esm/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.d.mts +0 -8
  113. package/dist/esm/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.mjs +0 -2
  114. package/dist/esm/api/resources/threads/client/requests/DeleteThreadRequest.d.mts +0 -8
  115. package/dist/esm/api/resources/threads/client/requests/DeleteThreadRequest.mjs +0 -2
  116. package/dist/esm/serialization/resources/drafts/types/CreateDraftForwardRequest.d.mts +0 -30
  117. package/dist/esm/serialization/resources/drafts/types/CreateDraftForwardRequest.mjs +0 -26
  118. package/dist/esm/serialization/resources/drafts/types/CreateDraftReplyAllRequest.d.mts +0 -24
  119. package/dist/esm/serialization/resources/drafts/types/CreateDraftReplyAllRequest.mjs +0 -20
  120. package/dist/esm/serialization/resources/drafts/types/CreateDraftReplyRequest.d.mts +0 -32
  121. package/dist/esm/serialization/resources/drafts/types/CreateDraftReplyRequest.mjs +0 -28
  122. /package/dist/cjs/api/{resources/drafts/types/CreateDraftForwardRequest.js → types/ErrorCode.js} +0 -0
  123. /package/dist/cjs/api/{resources/drafts/types/CreateDraftReplyAllRequest.js → types/ErrorDocs.js} +0 -0
  124. /package/dist/cjs/api/{resources/drafts/types/CreateDraftReplyRequest.js → types/ErrorFix.js} +0 -0
  125. /package/dist/esm/api/{resources/drafts/types/CreateDraftForwardRequest.mjs → types/ErrorCode.mjs} +0 -0
  126. /package/dist/esm/api/{resources/drafts/types/CreateDraftReplyAllRequest.mjs → types/ErrorDocs.mjs} +0 -0
  127. /package/dist/esm/api/{resources/drafts/types/CreateDraftReplyRequest.mjs → types/ErrorFix.mjs} +0 -0
@@ -1,4 +1,19 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
+ /**
3
+ * Body for creating a draft. Supports plain, reply, reply-all, and forward
4
+ * drafts:
5
+ *
6
+ * - **Plain draft:** supply `to`, `subject`, `text`, etc.
7
+ * - **Reply:** set `in_reply_to` to a message ID. Recipients, subject, and
8
+ * threading are derived from that message. Set `reply_all` to address the
9
+ * whole thread (you then cannot also pass `to`, `cc`, or `bcc`).
10
+ * - **Forward:** set `forward_of` to a message ID. The subject and threading
11
+ * are derived from the source message, whose body and attachments are
12
+ * merged in at send time.
13
+ *
14
+ * `in_reply_to` and `forward_of` are mutually exclusive, and reading the
15
+ * referenced message requires `message_read` permission.
16
+ */
2
17
  export interface CreateDraftRequest {
3
18
  labels?: AgentMail.DraftLabels;
4
19
  replyTo?: AgentMail.DraftReplyTo;
@@ -11,6 +26,8 @@ export interface CreateDraftRequest {
11
26
  /** Attachments to include in draft. */
12
27
  attachments?: AgentMail.SendAttachment[];
13
28
  inReplyTo?: AgentMail.DraftInReplyTo;
29
+ forwardOf?: AgentMail.DraftForwardOf;
30
+ replyAll?: AgentMail.DraftReplyAll;
14
31
  sendAt?: AgentMail.DraftSendAt;
15
32
  clientId?: AgentMail.DraftClientId;
16
33
  }
@@ -1,11 +1,25 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
+ /**
3
+ * Edit fields on an existing draft. A draft's kind (plain, reply, or forward)
4
+ * is fixed at creation and cannot be changed here. Omitting a field leaves it
5
+ * unchanged; passing `null` (or `[]` for a recipient field) clears it. Pass
6
+ * `send_at` to schedule or reschedule the draft, or `null` to un-schedule it.
7
+ */
2
8
  export interface UpdateDraftRequest {
3
- replyTo?: AgentMail.DraftReplyTo;
4
- to?: AgentMail.DraftTo;
5
- cc?: AgentMail.DraftCc;
6
- bcc?: AgentMail.DraftBcc;
7
- subject?: AgentMail.DraftSubject;
8
- text?: AgentMail.DraftText;
9
- html?: AgentMail.DraftHtml;
10
- sendAt?: AgentMail.DraftSendAt;
9
+ replyTo?: AgentMail.DraftReplyTo | null;
10
+ to?: AgentMail.DraftTo | null;
11
+ cc?: AgentMail.DraftCc | null;
12
+ bcc?: AgentMail.DraftBcc | null;
13
+ subject?: AgentMail.DraftSubject | null;
14
+ text?: AgentMail.DraftText | null;
15
+ html?: AgentMail.DraftHtml | null;
16
+ /** Attachments to add to the draft. */
17
+ addAttachments?: AgentMail.SendAttachment[];
18
+ /** IDs of attachments to remove from the draft. */
19
+ removeAttachments?: AgentMail.AttachmentId[];
20
+ /** Label or labels to add to the draft. */
21
+ addLabels?: AgentMail.DraftLabels;
22
+ /** Label or labels to remove from the draft. */
23
+ removeLabels?: AgentMail.DraftLabels;
24
+ sendAt?: AgentMail.DraftSendAt | null;
11
25
  }
@@ -1,6 +1,3 @@
1
- export * from "./CreateDraftForwardRequest.mjs";
2
- export * from "./CreateDraftReplyAllRequest.mjs";
3
- export * from "./CreateDraftReplyRequest.mjs";
4
1
  export * from "./CreateDraftRequest.mjs";
5
2
  export * from "./Draft.mjs";
6
3
  export * from "./DraftAttachments.mjs";
@@ -1,6 +1,3 @@
1
- export * from "./CreateDraftForwardRequest.mjs";
2
- export * from "./CreateDraftReplyAllRequest.mjs";
3
- export * from "./CreateDraftReplyRequest.mjs";
4
1
  export * from "./CreateDraftRequest.mjs";
5
2
  export * from "./Draft.mjs";
6
3
  export * from "./DraftAttachments.mjs";
@@ -65,6 +65,12 @@ export declare class DraftsClient {
65
65
  getAttachment(inbox_id: AgentMail.inboxes.InboxId, draft_id: AgentMail.DraftId, attachment_id: AgentMail.AttachmentId, requestOptions?: DraftsClient.RequestOptions): core.HttpResponsePromise<AgentMail.AttachmentResponse>;
66
66
  private __getAttachment;
67
67
  /**
68
+ * Create a draft. Supply `in_reply_to` to create a reply draft (with
69
+ * `reply_all` to address the whole thread), whose recipients, subject, and
70
+ * threading are derived from the referenced message, or `forward_of` to
71
+ * create a forward draft, which derives the subject, threading, and
72
+ * forwarded content from the source but keeps recipients caller-supplied.
73
+ *
68
74
  * **CLI:**
69
75
  * ```bash
70
76
  * agentmail inboxes:drafts create --inbox-id <inbox_id> --to recipient@example.com --subject "Draft subject" --text "Draft body"
@@ -74,6 +80,7 @@ export declare class DraftsClient {
74
80
  * @param {AgentMail.CreateDraftRequest} request
75
81
  * @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
76
82
  *
83
+ * @throws {@link AgentMail.ValidationError}
77
84
  * @throws {@link AgentMail.NotFoundError}
78
85
  *
79
86
  * @example
@@ -82,6 +89,10 @@ export declare class DraftsClient {
82
89
  create(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.CreateDraftRequest, requestOptions?: DraftsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Draft>;
83
90
  private __create;
84
91
  /**
92
+ * Edit fields on an existing draft. Passing `null` clears a field (or `[]`
93
+ * for a recipient field); `send_at: null` un-schedules a scheduled draft.
94
+ * A draft that is already being sent cannot be edited.
95
+ *
85
96
  * **CLI:**
86
97
  * ```bash
87
98
  * agentmail inboxes:drafts update --inbox-id <inbox_id> --draft-id <draft_id> --subject "Updated subject"
@@ -92,7 +103,9 @@ export declare class DraftsClient {
92
103
  * @param {AgentMail.UpdateDraftRequest} request
93
104
  * @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
94
105
  *
106
+ * @throws {@link AgentMail.ValidationError}
95
107
  * @throws {@link AgentMail.NotFoundError}
108
+ * @throws {@link AgentMail.ConflictError}
96
109
  *
97
110
  * @example
98
111
  * await client.inboxes.drafts.update("inbox_id", "draft_id", {})
@@ -245,6 +245,12 @@ export class DraftsClient {
245
245
  });
246
246
  }
247
247
  /**
248
+ * Create a draft. Supply `in_reply_to` to create a reply draft (with
249
+ * `reply_all` to address the whole thread), whose recipients, subject, and
250
+ * threading are derived from the referenced message, or `forward_of` to
251
+ * create a forward draft, which derives the subject, threading, and
252
+ * forwarded content from the source but keeps recipients caller-supplied.
253
+ *
248
254
  * **CLI:**
249
255
  * ```bash
250
256
  * agentmail inboxes:drafts create --inbox-id <inbox_id> --to recipient@example.com --subject "Draft subject" --text "Draft body"
@@ -254,6 +260,7 @@ export class DraftsClient {
254
260
  * @param {AgentMail.CreateDraftRequest} request
255
261
  * @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
256
262
  *
263
+ * @throws {@link AgentMail.ValidationError}
257
264
  * @throws {@link AgentMail.NotFoundError}
258
265
  *
259
266
  * @example
@@ -299,6 +306,14 @@ export class DraftsClient {
299
306
  }
300
307
  if (_response.error.reason === "status-code") {
301
308
  switch (_response.error.statusCode) {
309
+ case 400:
310
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
311
+ unrecognizedObjectKeys: "passthrough",
312
+ allowUnrecognizedUnionMembers: true,
313
+ allowUnrecognizedEnumValues: true,
314
+ skipValidation: true,
315
+ breadcrumbsPrefix: ["response"],
316
+ }), _response.rawResponse);
302
317
  case 404:
303
318
  throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
304
319
  unrecognizedObjectKeys: "passthrough",
@@ -319,6 +334,10 @@ export class DraftsClient {
319
334
  });
320
335
  }
321
336
  /**
337
+ * Edit fields on an existing draft. Passing `null` clears a field (or `[]`
338
+ * for a recipient field); `send_at: null` un-schedules a scheduled draft.
339
+ * A draft that is already being sent cannot be edited.
340
+ *
322
341
  * **CLI:**
323
342
  * ```bash
324
343
  * agentmail inboxes:drafts update --inbox-id <inbox_id> --draft-id <draft_id> --subject "Updated subject"
@@ -329,7 +348,9 @@ export class DraftsClient {
329
348
  * @param {AgentMail.UpdateDraftRequest} request
330
349
  * @param {DraftsClient.RequestOptions} requestOptions - Request-specific configuration.
331
350
  *
351
+ * @throws {@link AgentMail.ValidationError}
332
352
  * @throws {@link AgentMail.NotFoundError}
353
+ * @throws {@link AgentMail.ConflictError}
333
354
  *
334
355
  * @example
335
356
  * await client.inboxes.drafts.update("inbox_id", "draft_id", {})
@@ -374,6 +395,14 @@ export class DraftsClient {
374
395
  }
375
396
  if (_response.error.reason === "status-code") {
376
397
  switch (_response.error.statusCode) {
398
+ case 400:
399
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
400
+ unrecognizedObjectKeys: "passthrough",
401
+ allowUnrecognizedUnionMembers: true,
402
+ allowUnrecognizedEnumValues: true,
403
+ skipValidation: true,
404
+ breadcrumbsPrefix: ["response"],
405
+ }), _response.rawResponse);
377
406
  case 404:
378
407
  throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
379
408
  unrecognizedObjectKeys: "passthrough",
@@ -382,6 +411,14 @@ export class DraftsClient {
382
411
  skipValidation: true,
383
412
  breadcrumbsPrefix: ["response"],
384
413
  }), _response.rawResponse);
414
+ case 409:
415
+ throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
416
+ unrecognizedObjectKeys: "passthrough",
417
+ allowUnrecognizedUnionMembers: true,
418
+ allowUnrecognizedEnumValues: true,
419
+ skipValidation: true,
420
+ breadcrumbsPrefix: ["response"],
421
+ }), _response.rawResponse);
385
422
  default:
386
423
  throw new errors.AgentMailError({
387
424
  statusCode: _response.error.statusCode,
@@ -277,73 +277,4 @@ export declare class MessagesClient {
277
277
  */
278
278
  forward(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, request: AgentMail.SendMessageRequest, requestOptions?: MessagesClient.IdempotentRequestOptions): core.HttpResponsePromise<AgentMail.SendMessageResponse>;
279
279
  private __forward;
280
- /**
281
- * Create a draft that replies to a message instead of sending it. The
282
- * recipients, subject, and threading are derived from the source message.
283
- * Send it later with `Send Draft`.
284
- *
285
- * **CLI:**
286
- * ```bash
287
- * agentmail inboxes:messages draft-reply --inbox-id <inbox_id> --message-id <message_id> --text "Reply text"
288
- * ```
289
- *
290
- * @param {AgentMail.inboxes.InboxId} inbox_id
291
- * @param {AgentMail.MessageId} message_id
292
- * @param {AgentMail.CreateDraftReplyRequest} request
293
- * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
294
- *
295
- * @throws {@link AgentMail.ValidationError}
296
- * @throws {@link AgentMail.NotFoundError}
297
- *
298
- * @example
299
- * await client.inboxes.messages.draftReply("inbox_id", "message_id", {})
300
- */
301
- draftReply(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, request: AgentMail.CreateDraftReplyRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.Draft>;
302
- private __draftReply;
303
- /**
304
- * Create a draft that replies to every recipient of a message instead of
305
- * sending it. Recipients, subject, and threading are derived from the
306
- * source message. Send it later with `Send Draft`.
307
- *
308
- * **CLI:**
309
- * ```bash
310
- * agentmail inboxes:messages draft-reply-all --inbox-id <inbox_id> --message-id <message_id> --text "Reply text"
311
- * ```
312
- *
313
- * @param {AgentMail.inboxes.InboxId} inbox_id
314
- * @param {AgentMail.MessageId} message_id
315
- * @param {AgentMail.CreateDraftReplyAllRequest} request
316
- * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
317
- *
318
- * @throws {@link AgentMail.ValidationError}
319
- * @throws {@link AgentMail.NotFoundError}
320
- *
321
- * @example
322
- * await client.inboxes.messages.draftReplyAll("inbox_id", "message_id", {})
323
- */
324
- draftReplyAll(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, request: AgentMail.CreateDraftReplyAllRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.Draft>;
325
- private __draftReplyAll;
326
- /**
327
- * Create a draft that forwards a message instead of sending it. The subject
328
- * and threading are derived from the source message, whose body and
329
- * attachments are merged in at send time. Send it later with `Send Draft`.
330
- *
331
- * **CLI:**
332
- * ```bash
333
- * agentmail inboxes:messages draft-forward --inbox-id <inbox_id> --message-id <message_id> --to recipient@example.com
334
- * ```
335
- *
336
- * @param {AgentMail.inboxes.InboxId} inbox_id
337
- * @param {AgentMail.MessageId} message_id
338
- * @param {AgentMail.CreateDraftForwardRequest} request
339
- * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
340
- *
341
- * @throws {@link AgentMail.ValidationError}
342
- * @throws {@link AgentMail.NotFoundError}
343
- *
344
- * @example
345
- * await client.inboxes.messages.draftForward("inbox_id", "message_id", {})
346
- */
347
- draftForward(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, request: AgentMail.CreateDraftForwardRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.Draft>;
348
- private __draftForward;
349
280
  }
@@ -1131,268 +1131,4 @@ export class MessagesClient {
1131
1131
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/inboxes/{inbox_id}/messages/{message_id}/forward");
1132
1132
  });
1133
1133
  }
1134
- /**
1135
- * Create a draft that replies to a message instead of sending it. The
1136
- * recipients, subject, and threading are derived from the source message.
1137
- * Send it later with `Send Draft`.
1138
- *
1139
- * **CLI:**
1140
- * ```bash
1141
- * agentmail inboxes:messages draft-reply --inbox-id <inbox_id> --message-id <message_id> --text "Reply text"
1142
- * ```
1143
- *
1144
- * @param {AgentMail.inboxes.InboxId} inbox_id
1145
- * @param {AgentMail.MessageId} message_id
1146
- * @param {AgentMail.CreateDraftReplyRequest} request
1147
- * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
1148
- *
1149
- * @throws {@link AgentMail.ValidationError}
1150
- * @throws {@link AgentMail.NotFoundError}
1151
- *
1152
- * @example
1153
- * await client.inboxes.messages.draftReply("inbox_id", "message_id", {})
1154
- */
1155
- draftReply(inbox_id, message_id, request, requestOptions) {
1156
- return core.HttpResponsePromise.fromPromise(this.__draftReply(inbox_id, message_id, request, requestOptions));
1157
- }
1158
- __draftReply(inbox_id, message_id, request, requestOptions) {
1159
- return __awaiter(this, void 0, void 0, function* () {
1160
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1161
- const _authRequest = yield this._options.authProvider.getAuthRequest();
1162
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1163
- const _response = yield core.fetcher({
1164
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
1165
- .http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/messages/${core.url.encodePathParam(serializers.MessageId.jsonOrThrow(message_id, { omitUndefined: true }))}/draft-reply`),
1166
- method: "POST",
1167
- headers: _headers,
1168
- contentType: "application/json",
1169
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1170
- requestType: "json",
1171
- body: serializers.CreateDraftReplyRequest.jsonOrThrow(request, {
1172
- unrecognizedObjectKeys: "strip",
1173
- omitUndefined: true,
1174
- }),
1175
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1176
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1177
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1178
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1179
- logging: this._options.logging,
1180
- });
1181
- if (_response.ok) {
1182
- return {
1183
- data: serializers.Draft.parseOrThrow(_response.body, {
1184
- unrecognizedObjectKeys: "passthrough",
1185
- allowUnrecognizedUnionMembers: true,
1186
- allowUnrecognizedEnumValues: true,
1187
- skipValidation: true,
1188
- breadcrumbsPrefix: ["response"],
1189
- }),
1190
- rawResponse: _response.rawResponse,
1191
- };
1192
- }
1193
- if (_response.error.reason === "status-code") {
1194
- switch (_response.error.statusCode) {
1195
- case 400:
1196
- throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
1197
- unrecognizedObjectKeys: "passthrough",
1198
- allowUnrecognizedUnionMembers: true,
1199
- allowUnrecognizedEnumValues: true,
1200
- skipValidation: true,
1201
- breadcrumbsPrefix: ["response"],
1202
- }), _response.rawResponse);
1203
- case 404:
1204
- throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
1205
- unrecognizedObjectKeys: "passthrough",
1206
- allowUnrecognizedUnionMembers: true,
1207
- allowUnrecognizedEnumValues: true,
1208
- skipValidation: true,
1209
- breadcrumbsPrefix: ["response"],
1210
- }), _response.rawResponse);
1211
- default:
1212
- throw new errors.AgentMailError({
1213
- statusCode: _response.error.statusCode,
1214
- body: _response.error.body,
1215
- rawResponse: _response.rawResponse,
1216
- });
1217
- }
1218
- }
1219
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/inboxes/{inbox_id}/messages/{message_id}/draft-reply");
1220
- });
1221
- }
1222
- /**
1223
- * Create a draft that replies to every recipient of a message instead of
1224
- * sending it. Recipients, subject, and threading are derived from the
1225
- * source message. Send it later with `Send Draft`.
1226
- *
1227
- * **CLI:**
1228
- * ```bash
1229
- * agentmail inboxes:messages draft-reply-all --inbox-id <inbox_id> --message-id <message_id> --text "Reply text"
1230
- * ```
1231
- *
1232
- * @param {AgentMail.inboxes.InboxId} inbox_id
1233
- * @param {AgentMail.MessageId} message_id
1234
- * @param {AgentMail.CreateDraftReplyAllRequest} request
1235
- * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
1236
- *
1237
- * @throws {@link AgentMail.ValidationError}
1238
- * @throws {@link AgentMail.NotFoundError}
1239
- *
1240
- * @example
1241
- * await client.inboxes.messages.draftReplyAll("inbox_id", "message_id", {})
1242
- */
1243
- draftReplyAll(inbox_id, message_id, request, requestOptions) {
1244
- return core.HttpResponsePromise.fromPromise(this.__draftReplyAll(inbox_id, message_id, request, requestOptions));
1245
- }
1246
- __draftReplyAll(inbox_id, message_id, request, requestOptions) {
1247
- return __awaiter(this, void 0, void 0, function* () {
1248
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1249
- const _authRequest = yield this._options.authProvider.getAuthRequest();
1250
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1251
- const _response = yield core.fetcher({
1252
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
1253
- .http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/messages/${core.url.encodePathParam(serializers.MessageId.jsonOrThrow(message_id, { omitUndefined: true }))}/draft-reply-all`),
1254
- method: "POST",
1255
- headers: _headers,
1256
- contentType: "application/json",
1257
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1258
- requestType: "json",
1259
- body: serializers.CreateDraftReplyAllRequest.jsonOrThrow(request, {
1260
- unrecognizedObjectKeys: "strip",
1261
- omitUndefined: true,
1262
- }),
1263
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1264
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1265
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1266
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1267
- logging: this._options.logging,
1268
- });
1269
- if (_response.ok) {
1270
- return {
1271
- data: serializers.Draft.parseOrThrow(_response.body, {
1272
- unrecognizedObjectKeys: "passthrough",
1273
- allowUnrecognizedUnionMembers: true,
1274
- allowUnrecognizedEnumValues: true,
1275
- skipValidation: true,
1276
- breadcrumbsPrefix: ["response"],
1277
- }),
1278
- rawResponse: _response.rawResponse,
1279
- };
1280
- }
1281
- if (_response.error.reason === "status-code") {
1282
- switch (_response.error.statusCode) {
1283
- case 400:
1284
- throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
1285
- unrecognizedObjectKeys: "passthrough",
1286
- allowUnrecognizedUnionMembers: true,
1287
- allowUnrecognizedEnumValues: true,
1288
- skipValidation: true,
1289
- breadcrumbsPrefix: ["response"],
1290
- }), _response.rawResponse);
1291
- case 404:
1292
- throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
1293
- unrecognizedObjectKeys: "passthrough",
1294
- allowUnrecognizedUnionMembers: true,
1295
- allowUnrecognizedEnumValues: true,
1296
- skipValidation: true,
1297
- breadcrumbsPrefix: ["response"],
1298
- }), _response.rawResponse);
1299
- default:
1300
- throw new errors.AgentMailError({
1301
- statusCode: _response.error.statusCode,
1302
- body: _response.error.body,
1303
- rawResponse: _response.rawResponse,
1304
- });
1305
- }
1306
- }
1307
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/inboxes/{inbox_id}/messages/{message_id}/draft-reply-all");
1308
- });
1309
- }
1310
- /**
1311
- * Create a draft that forwards a message instead of sending it. The subject
1312
- * and threading are derived from the source message, whose body and
1313
- * attachments are merged in at send time. Send it later with `Send Draft`.
1314
- *
1315
- * **CLI:**
1316
- * ```bash
1317
- * agentmail inboxes:messages draft-forward --inbox-id <inbox_id> --message-id <message_id> --to recipient@example.com
1318
- * ```
1319
- *
1320
- * @param {AgentMail.inboxes.InboxId} inbox_id
1321
- * @param {AgentMail.MessageId} message_id
1322
- * @param {AgentMail.CreateDraftForwardRequest} request
1323
- * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
1324
- *
1325
- * @throws {@link AgentMail.ValidationError}
1326
- * @throws {@link AgentMail.NotFoundError}
1327
- *
1328
- * @example
1329
- * await client.inboxes.messages.draftForward("inbox_id", "message_id", {})
1330
- */
1331
- draftForward(inbox_id, message_id, request, requestOptions) {
1332
- return core.HttpResponsePromise.fromPromise(this.__draftForward(inbox_id, message_id, request, requestOptions));
1333
- }
1334
- __draftForward(inbox_id, message_id, request, requestOptions) {
1335
- return __awaiter(this, void 0, void 0, function* () {
1336
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1337
- const _authRequest = yield this._options.authProvider.getAuthRequest();
1338
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1339
- const _response = yield core.fetcher({
1340
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
1341
- .http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/messages/${core.url.encodePathParam(serializers.MessageId.jsonOrThrow(message_id, { omitUndefined: true }))}/draft-forward`),
1342
- method: "POST",
1343
- headers: _headers,
1344
- contentType: "application/json",
1345
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1346
- requestType: "json",
1347
- body: serializers.CreateDraftForwardRequest.jsonOrThrow(request, {
1348
- unrecognizedObjectKeys: "strip",
1349
- omitUndefined: true,
1350
- }),
1351
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
1352
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
1353
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1354
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
1355
- logging: this._options.logging,
1356
- });
1357
- if (_response.ok) {
1358
- return {
1359
- data: serializers.Draft.parseOrThrow(_response.body, {
1360
- unrecognizedObjectKeys: "passthrough",
1361
- allowUnrecognizedUnionMembers: true,
1362
- allowUnrecognizedEnumValues: true,
1363
- skipValidation: true,
1364
- breadcrumbsPrefix: ["response"],
1365
- }),
1366
- rawResponse: _response.rawResponse,
1367
- };
1368
- }
1369
- if (_response.error.reason === "status-code") {
1370
- switch (_response.error.statusCode) {
1371
- case 400:
1372
- throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
1373
- unrecognizedObjectKeys: "passthrough",
1374
- allowUnrecognizedUnionMembers: true,
1375
- allowUnrecognizedEnumValues: true,
1376
- skipValidation: true,
1377
- breadcrumbsPrefix: ["response"],
1378
- }), _response.rawResponse);
1379
- case 404:
1380
- throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
1381
- unrecognizedObjectKeys: "passthrough",
1382
- allowUnrecognizedUnionMembers: true,
1383
- allowUnrecognizedEnumValues: true,
1384
- skipValidation: true,
1385
- breadcrumbsPrefix: ["response"],
1386
- }), _response.rawResponse);
1387
- default:
1388
- throw new errors.AgentMailError({
1389
- statusCode: _response.error.statusCode,
1390
- body: _response.error.body,
1391
- rawResponse: _response.rawResponse,
1392
- });
1393
- }
1394
- }
1395
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/inboxes/{inbox_id}/messages/{message_id}/draft-forward");
1396
- });
1397
- }
1398
1134
  }
@@ -105,7 +105,7 @@ export declare class ThreadsClient {
105
105
  update(inbox_id: AgentMail.inboxes.InboxId, thread_id: AgentMail.ThreadId, request: AgentMail.UpdateThreadRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.UpdateThreadResponse>;
106
106
  private __update;
107
107
  /**
108
- * Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion.
108
+ * Permanently deletes a thread and all of its messages.
109
109
  *
110
110
  * **CLI:**
111
111
  * ```bash
@@ -114,7 +114,6 @@ export declare class ThreadsClient {
114
114
  *
115
115
  * @param {AgentMail.inboxes.InboxId} inbox_id
116
116
  * @param {AgentMail.ThreadId} thread_id
117
- * @param {AgentMail.inboxes.DeleteThreadRequest} request
118
117
  * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
119
118
  *
120
119
  * @throws {@link AgentMail.NotFoundError}
@@ -122,6 +121,6 @@ export declare class ThreadsClient {
122
121
  * @example
123
122
  * await client.inboxes.threads.delete("inbox_id", "thread_id")
124
123
  */
125
- delete(inbox_id: AgentMail.inboxes.InboxId, thread_id: AgentMail.ThreadId, request?: AgentMail.inboxes.DeleteThreadRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<void>;
124
+ delete(inbox_id: AgentMail.inboxes.InboxId, thread_id: AgentMail.ThreadId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<void>;
126
125
  private __delete;
127
126
  }
@@ -438,7 +438,7 @@ export class ThreadsClient {
438
438
  });
439
439
  }
440
440
  /**
441
- * Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion.
441
+ * Permanently deletes a thread and all of its messages.
442
442
  *
443
443
  * **CLI:**
444
444
  * ```bash
@@ -447,7 +447,6 @@ export class ThreadsClient {
447
447
  *
448
448
  * @param {AgentMail.inboxes.InboxId} inbox_id
449
449
  * @param {AgentMail.ThreadId} thread_id
450
- * @param {AgentMail.inboxes.DeleteThreadRequest} request
451
450
  * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
452
451
  *
453
452
  * @throws {@link AgentMail.NotFoundError}
@@ -455,16 +454,12 @@ export class ThreadsClient {
455
454
  * @example
456
455
  * await client.inboxes.threads.delete("inbox_id", "thread_id")
457
456
  */
458
- delete(inbox_id, thread_id, request = {}, requestOptions) {
459
- return core.HttpResponsePromise.fromPromise(this.__delete(inbox_id, thread_id, request, requestOptions));
457
+ delete(inbox_id, thread_id, requestOptions) {
458
+ return core.HttpResponsePromise.fromPromise(this.__delete(inbox_id, thread_id, requestOptions));
460
459
  }
461
- __delete(inbox_id_1, thread_id_1) {
462
- return __awaiter(this, arguments, void 0, function* (inbox_id, thread_id, request = {}, requestOptions) {
460
+ __delete(inbox_id, thread_id, requestOptions) {
461
+ return __awaiter(this, void 0, void 0, function* () {
463
462
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
464
- const { permanent } = request;
465
- const _queryParams = {
466
- permanent,
467
- };
468
463
  const _authRequest = yield this._options.authProvider.getAuthRequest();
469
464
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
470
465
  const _response = yield core.fetcher({
@@ -472,7 +467,7 @@ export class ThreadsClient {
472
467
  .http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/threads/${core.url.encodePathParam(serializers.ThreadId.jsonOrThrow(thread_id, { omitUndefined: true }))}`),
473
468
  method: "DELETE",
474
469
  headers: _headers,
475
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
470
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
476
471
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
477
472
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
478
473
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -1,3 +1,2 @@
1
- export type { DeleteThreadRequest } from "./DeleteThreadRequest.mjs";
2
1
  export type { ListThreadsRequest } from "./ListThreadsRequest.mjs";
3
2
  export type { SearchThreadsRequest } from "./SearchThreadsRequest.mjs";
@@ -105,7 +105,7 @@ export declare class ThreadsClient {
105
105
  update(pod_id: AgentMail.pods.PodId, thread_id: AgentMail.ThreadId, request: AgentMail.UpdateThreadRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.UpdateThreadResponse>;
106
106
  private __update;
107
107
  /**
108
- * Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion.
108
+ * Permanently deletes a thread and all of its messages.
109
109
  *
110
110
  * **CLI:**
111
111
  * ```bash
@@ -114,7 +114,6 @@ export declare class ThreadsClient {
114
114
  *
115
115
  * @param {AgentMail.pods.PodId} pod_id
116
116
  * @param {AgentMail.ThreadId} thread_id
117
- * @param {AgentMail.pods.DeleteThreadRequest} request
118
117
  * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
119
118
  *
120
119
  * @throws {@link AgentMail.NotFoundError}
@@ -122,6 +121,6 @@ export declare class ThreadsClient {
122
121
  * @example
123
122
  * await client.pods.threads.delete("pod_id", "thread_id")
124
123
  */
125
- delete(pod_id: AgentMail.pods.PodId, thread_id: AgentMail.ThreadId, request?: AgentMail.pods.DeleteThreadRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<void>;
124
+ delete(pod_id: AgentMail.pods.PodId, thread_id: AgentMail.ThreadId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<void>;
126
125
  private __delete;
127
126
  }