agentmail 0.4.3 → 0.4.4

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 (102) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/domains/client/Client.d.ts +12 -0
  3. package/dist/cjs/api/resources/domains/client/Client.js +69 -0
  4. package/dist/cjs/api/resources/domains/types/UpdateDomainRequest.d.ts +4 -0
  5. package/dist/cjs/api/resources/domains/types/UpdateDomainRequest.js +3 -0
  6. package/dist/cjs/api/resources/domains/types/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/domains/types/index.js +1 -0
  8. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +9 -9
  9. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +50 -50
  10. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +22 -15
  11. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +71 -56
  12. package/dist/cjs/api/resources/lists/client/Client.d.ts +15 -15
  13. package/dist/cjs/api/resources/lists/client/Client.js +67 -67
  14. package/dist/cjs/api/resources/messages/types/RawMessageResponse.d.ts +14 -0
  15. package/dist/cjs/api/resources/messages/types/RawMessageResponse.js +3 -0
  16. package/dist/cjs/api/resources/messages/types/index.d.ts +1 -0
  17. package/dist/cjs/api/resources/messages/types/index.js +1 -0
  18. package/dist/cjs/api/resources/pods/client/Client.d.ts +4 -4
  19. package/dist/cjs/api/resources/pods/client/Client.js +8 -8
  20. package/dist/cjs/api/resources/pods/resources/apiKeys/client/Client.d.ts +11 -11
  21. package/dist/cjs/api/resources/pods/resources/apiKeys/client/Client.js +42 -42
  22. package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +33 -3
  23. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +178 -6
  24. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +15 -0
  25. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +72 -0
  26. package/dist/cjs/api/resources/pods/resources/lists/client/Client.d.ts +16 -16
  27. package/dist/cjs/api/resources/pods/resources/lists/client/Client.js +67 -67
  28. package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +15 -0
  29. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +61 -0
  30. package/dist/cjs/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.d.ts +8 -0
  31. package/dist/cjs/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.js +3 -0
  32. package/dist/cjs/api/resources/pods/resources/threads/client/requests/index.d.ts +1 -0
  33. package/dist/cjs/api/resources/threads/client/Client.d.ts +14 -0
  34. package/dist/cjs/api/resources/threads/client/Client.js +60 -0
  35. package/dist/cjs/api/resources/threads/client/requests/DeleteThreadRequest.d.ts +8 -0
  36. package/dist/cjs/api/resources/threads/client/requests/DeleteThreadRequest.js +3 -0
  37. package/dist/cjs/api/resources/threads/client/requests/index.d.ts +1 -0
  38. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +13 -13
  39. package/dist/cjs/api/resources/webhooks/client/Client.js +31 -31
  40. package/dist/cjs/serialization/resources/domains/types/UpdateDomainRequest.d.ts +10 -0
  41. package/dist/cjs/serialization/resources/domains/types/UpdateDomainRequest.js +42 -0
  42. package/dist/cjs/serialization/resources/domains/types/index.d.ts +1 -0
  43. package/dist/cjs/serialization/resources/domains/types/index.js +1 -0
  44. package/dist/cjs/serialization/resources/messages/types/RawMessageResponse.d.ts +14 -0
  45. package/dist/cjs/serialization/resources/messages/types/RawMessageResponse.js +46 -0
  46. package/dist/cjs/serialization/resources/messages/types/index.d.ts +1 -0
  47. package/dist/cjs/serialization/resources/messages/types/index.js +1 -0
  48. package/dist/cjs/version.d.ts +1 -1
  49. package/dist/cjs/version.js +1 -1
  50. package/dist/esm/BaseClient.mjs +2 -2
  51. package/dist/esm/api/resources/domains/client/Client.d.mts +12 -0
  52. package/dist/esm/api/resources/domains/client/Client.mjs +69 -0
  53. package/dist/esm/api/resources/domains/types/UpdateDomainRequest.d.mts +4 -0
  54. package/dist/esm/api/resources/domains/types/UpdateDomainRequest.mjs +2 -0
  55. package/dist/esm/api/resources/domains/types/index.d.mts +1 -0
  56. package/dist/esm/api/resources/domains/types/index.mjs +1 -0
  57. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +9 -9
  58. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +50 -50
  59. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +22 -15
  60. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +71 -56
  61. package/dist/esm/api/resources/lists/client/Client.d.mts +15 -15
  62. package/dist/esm/api/resources/lists/client/Client.mjs +67 -67
  63. package/dist/esm/api/resources/messages/types/RawMessageResponse.d.mts +14 -0
  64. package/dist/esm/api/resources/messages/types/RawMessageResponse.mjs +2 -0
  65. package/dist/esm/api/resources/messages/types/index.d.mts +1 -0
  66. package/dist/esm/api/resources/messages/types/index.mjs +1 -0
  67. package/dist/esm/api/resources/pods/client/Client.d.mts +4 -4
  68. package/dist/esm/api/resources/pods/client/Client.mjs +8 -8
  69. package/dist/esm/api/resources/pods/resources/apiKeys/client/Client.d.mts +11 -11
  70. package/dist/esm/api/resources/pods/resources/apiKeys/client/Client.mjs +42 -42
  71. package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +33 -3
  72. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +178 -6
  73. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +15 -0
  74. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +72 -0
  75. package/dist/esm/api/resources/pods/resources/lists/client/Client.d.mts +16 -16
  76. package/dist/esm/api/resources/pods/resources/lists/client/Client.mjs +67 -67
  77. package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +15 -0
  78. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +61 -0
  79. package/dist/esm/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.d.mts +8 -0
  80. package/dist/esm/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.mjs +2 -0
  81. package/dist/esm/api/resources/pods/resources/threads/client/requests/index.d.mts +1 -0
  82. package/dist/esm/api/resources/threads/client/Client.d.mts +14 -0
  83. package/dist/esm/api/resources/threads/client/Client.mjs +60 -0
  84. package/dist/esm/api/resources/threads/client/requests/DeleteThreadRequest.d.mts +8 -0
  85. package/dist/esm/api/resources/threads/client/requests/DeleteThreadRequest.mjs +2 -0
  86. package/dist/esm/api/resources/threads/client/requests/index.d.mts +1 -0
  87. package/dist/esm/api/resources/webhooks/client/Client.d.mts +13 -13
  88. package/dist/esm/api/resources/webhooks/client/Client.mjs +31 -31
  89. package/dist/esm/serialization/resources/domains/types/UpdateDomainRequest.d.mts +10 -0
  90. package/dist/esm/serialization/resources/domains/types/UpdateDomainRequest.mjs +6 -0
  91. package/dist/esm/serialization/resources/domains/types/index.d.mts +1 -0
  92. package/dist/esm/serialization/resources/domains/types/index.mjs +1 -0
  93. package/dist/esm/serialization/resources/messages/types/RawMessageResponse.d.mts +14 -0
  94. package/dist/esm/serialization/resources/messages/types/RawMessageResponse.mjs +10 -0
  95. package/dist/esm/serialization/resources/messages/types/index.d.mts +1 -0
  96. package/dist/esm/serialization/resources/messages/types/index.mjs +1 -0
  97. package/dist/esm/version.d.mts +1 -1
  98. package/dist/esm/version.mjs +1 -1
  99. package/dist/llms-full.txt +16825 -11774
  100. package/dist/llms.txt +94 -25
  101. package/package.json +1 -1
  102. package/reference.md +570 -117
@@ -89,6 +89,117 @@ export class DomainsClient {
89
89
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains");
90
90
  });
91
91
  }
92
+ /**
93
+ * @param {AgentMail.pods.PodId} pod_id
94
+ * @param {AgentMail.DomainId} domain_id
95
+ * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
96
+ *
97
+ * @throws {@link AgentMail.NotFoundError}
98
+ *
99
+ * @example
100
+ * await client.pods.domains.get("pod_id", "domain_id")
101
+ */
102
+ get(pod_id, domain_id, requestOptions) {
103
+ return core.HttpResponsePromise.fromPromise(this.__get(pod_id, domain_id, requestOptions));
104
+ }
105
+ __get(pod_id, domain_id, requestOptions) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
108
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
109
+ 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);
110
+ const _response = yield core.fetcher({
111
+ 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)
112
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/domains/${core.url.encodePathParam(serializers.DomainId.jsonOrThrow(domain_id, { omitUndefined: true }))}`),
113
+ method: "GET",
114
+ headers: _headers,
115
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
116
+ 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,
117
+ 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,
118
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
119
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
120
+ logging: this._options.logging,
121
+ });
122
+ if (_response.ok) {
123
+ return {
124
+ data: serializers.Domain.parseOrThrow(_response.body, {
125
+ unrecognizedObjectKeys: "passthrough",
126
+ allowUnrecognizedUnionMembers: true,
127
+ allowUnrecognizedEnumValues: true,
128
+ skipValidation: true,
129
+ breadcrumbsPrefix: ["response"],
130
+ }),
131
+ rawResponse: _response.rawResponse,
132
+ };
133
+ }
134
+ if (_response.error.reason === "status-code") {
135
+ switch (_response.error.statusCode) {
136
+ case 404:
137
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
138
+ unrecognizedObjectKeys: "passthrough",
139
+ allowUnrecognizedUnionMembers: true,
140
+ allowUnrecognizedEnumValues: true,
141
+ skipValidation: true,
142
+ breadcrumbsPrefix: ["response"],
143
+ }), _response.rawResponse);
144
+ default:
145
+ throw new errors.AgentMailError({
146
+ statusCode: _response.error.statusCode,
147
+ body: _response.error.body,
148
+ rawResponse: _response.rawResponse,
149
+ });
150
+ }
151
+ }
152
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains/{domain_id}");
153
+ });
154
+ }
155
+ /**
156
+ * @throws {@link AgentMail.NotFoundError}
157
+ */
158
+ getZoneFile(pod_id, domain_id, requestOptions) {
159
+ return core.HttpResponsePromise.fromPromise(this.__getZoneFile(pod_id, domain_id, requestOptions));
160
+ }
161
+ __getZoneFile(pod_id, domain_id, requestOptions) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
164
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
165
+ 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);
166
+ const _response = yield core.fetcher({
167
+ 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)
168
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/domains/${core.url.encodePathParam(serializers.DomainId.jsonOrThrow(domain_id, { omitUndefined: true }))}/zone-file`),
169
+ method: "GET",
170
+ headers: _headers,
171
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
172
+ responseType: "binary-response",
173
+ 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,
174
+ 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,
175
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
176
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
177
+ logging: this._options.logging,
178
+ });
179
+ if (_response.ok) {
180
+ return { data: _response.body, rawResponse: _response.rawResponse };
181
+ }
182
+ if (_response.error.reason === "status-code") {
183
+ switch (_response.error.statusCode) {
184
+ case 404:
185
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
186
+ unrecognizedObjectKeys: "passthrough",
187
+ allowUnrecognizedUnionMembers: true,
188
+ allowUnrecognizedEnumValues: true,
189
+ skipValidation: true,
190
+ breadcrumbsPrefix: ["response"],
191
+ }), _response.rawResponse);
192
+ default:
193
+ throw new errors.AgentMailError({
194
+ statusCode: _response.error.statusCode,
195
+ body: _response.error.body,
196
+ rawResponse: _response.rawResponse,
197
+ });
198
+ }
199
+ }
200
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains/{domain_id}/zone-file");
201
+ });
202
+ }
92
203
  /**
93
204
  * @param {AgentMail.pods.PodId} pod_id
94
205
  * @param {AgentMail.CreateDomainRequest} request
@@ -164,17 +275,18 @@ export class DomainsClient {
164
275
  /**
165
276
  * @param {AgentMail.pods.PodId} pod_id
166
277
  * @param {AgentMail.DomainId} domain_id
278
+ * @param {AgentMail.UpdateDomainRequest} request
167
279
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
168
280
  *
169
281
  * @throws {@link AgentMail.NotFoundError}
170
282
  *
171
283
  * @example
172
- * await client.pods.domains.get("pod_id", "domain_id")
284
+ * await client.pods.domains.update("pod_id", "domain_id", {})
173
285
  */
174
- get(pod_id, domain_id, requestOptions) {
175
- return core.HttpResponsePromise.fromPromise(this.__get(pod_id, domain_id, requestOptions));
286
+ update(pod_id, domain_id, request, requestOptions) {
287
+ return core.HttpResponsePromise.fromPromise(this.__update(pod_id, domain_id, request, requestOptions));
176
288
  }
177
- __get(pod_id, domain_id, requestOptions) {
289
+ __update(pod_id, domain_id, request, requestOptions) {
178
290
  return __awaiter(this, void 0, void 0, function* () {
179
291
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
180
292
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -182,9 +294,15 @@ export class DomainsClient {
182
294
  const _response = yield core.fetcher({
183
295
  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)
184
296
  .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/domains/${core.url.encodePathParam(serializers.DomainId.jsonOrThrow(domain_id, { omitUndefined: true }))}`),
185
- method: "GET",
297
+ method: "PATCH",
186
298
  headers: _headers,
299
+ contentType: "application/json",
187
300
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
301
+ requestType: "json",
302
+ body: serializers.UpdateDomainRequest.jsonOrThrow(request, {
303
+ unrecognizedObjectKeys: "strip",
304
+ omitUndefined: true,
305
+ }),
188
306
  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,
189
307
  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,
190
308
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -221,7 +339,7 @@ export class DomainsClient {
221
339
  });
222
340
  }
223
341
  }
224
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains/{domain_id}");
342
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v0/pods/{pod_id}/domains/{domain_id}");
225
343
  });
226
344
  }
227
345
  /**
@@ -278,4 +396,58 @@ export class DomainsClient {
278
396
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/pods/{pod_id}/domains/{domain_id}");
279
397
  });
280
398
  }
399
+ /**
400
+ * @param {AgentMail.pods.PodId} pod_id
401
+ * @param {AgentMail.DomainId} domain_id
402
+ * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
403
+ *
404
+ * @throws {@link AgentMail.NotFoundError}
405
+ *
406
+ * @example
407
+ * await client.pods.domains.verify("pod_id", "domain_id")
408
+ */
409
+ verify(pod_id, domain_id, requestOptions) {
410
+ return core.HttpResponsePromise.fromPromise(this.__verify(pod_id, domain_id, requestOptions));
411
+ }
412
+ __verify(pod_id, domain_id, requestOptions) {
413
+ return __awaiter(this, void 0, void 0, function* () {
414
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
415
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
416
+ 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);
417
+ const _response = yield core.fetcher({
418
+ 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)
419
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/domains/${core.url.encodePathParam(serializers.DomainId.jsonOrThrow(domain_id, { omitUndefined: true }))}/verify`),
420
+ method: "POST",
421
+ headers: _headers,
422
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
423
+ 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,
424
+ 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,
425
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
426
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
427
+ logging: this._options.logging,
428
+ });
429
+ if (_response.ok) {
430
+ return { data: undefined, rawResponse: _response.rawResponse };
431
+ }
432
+ if (_response.error.reason === "status-code") {
433
+ switch (_response.error.statusCode) {
434
+ case 404:
435
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
436
+ unrecognizedObjectKeys: "passthrough",
437
+ allowUnrecognizedUnionMembers: true,
438
+ allowUnrecognizedEnumValues: true,
439
+ skipValidation: true,
440
+ breadcrumbsPrefix: ["response"],
441
+ }), _response.rawResponse);
442
+ default:
443
+ throw new errors.AgentMailError({
444
+ statusCode: _response.error.statusCode,
445
+ body: _response.error.body,
446
+ rawResponse: _response.rawResponse,
447
+ });
448
+ }
449
+ }
450
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/domains/{domain_id}/verify");
451
+ });
452
+ }
281
453
  }
@@ -46,6 +46,21 @@ export declare class InboxesClient {
46
46
  */
47
47
  create(pod_id: AgentMail.pods.PodId, request: AgentMail.inboxes.CreateInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
48
48
  private __create;
49
+ /**
50
+ * @param {AgentMail.pods.PodId} pod_id
51
+ * @param {AgentMail.inboxes.InboxId} inbox_id
52
+ * @param {AgentMail.inboxes.UpdateInboxRequest} request
53
+ * @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @throws {@link AgentMail.NotFoundError}
56
+ *
57
+ * @example
58
+ * await client.pods.inboxes.update("pod_id", "inbox_id", {
59
+ * displayName: "display_name"
60
+ * })
61
+ */
62
+ update(pod_id: AgentMail.pods.PodId, inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.UpdateInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
63
+ private __update;
49
64
  /**
50
65
  * @param {AgentMail.pods.PodId} pod_id
51
66
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -221,6 +221,78 @@ export class InboxesClient {
221
221
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/inboxes");
222
222
  });
223
223
  }
224
+ /**
225
+ * @param {AgentMail.pods.PodId} pod_id
226
+ * @param {AgentMail.inboxes.InboxId} inbox_id
227
+ * @param {AgentMail.inboxes.UpdateInboxRequest} request
228
+ * @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
229
+ *
230
+ * @throws {@link AgentMail.NotFoundError}
231
+ *
232
+ * @example
233
+ * await client.pods.inboxes.update("pod_id", "inbox_id", {
234
+ * displayName: "display_name"
235
+ * })
236
+ */
237
+ update(pod_id, inbox_id, request, requestOptions) {
238
+ return core.HttpResponsePromise.fromPromise(this.__update(pod_id, inbox_id, request, requestOptions));
239
+ }
240
+ __update(pod_id, inbox_id, request, requestOptions) {
241
+ return __awaiter(this, void 0, void 0, function* () {
242
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
243
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
244
+ 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);
245
+ const _response = yield core.fetcher({
246
+ 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)
247
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}`),
248
+ method: "PATCH",
249
+ headers: _headers,
250
+ contentType: "application/json",
251
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
252
+ requestType: "json",
253
+ body: serializers.inboxes.UpdateInboxRequest.jsonOrThrow(request, {
254
+ unrecognizedObjectKeys: "strip",
255
+ omitUndefined: true,
256
+ }),
257
+ 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,
258
+ 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,
259
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
260
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
261
+ logging: this._options.logging,
262
+ });
263
+ if (_response.ok) {
264
+ return {
265
+ data: serializers.inboxes.Inbox.parseOrThrow(_response.body, {
266
+ unrecognizedObjectKeys: "passthrough",
267
+ allowUnrecognizedUnionMembers: true,
268
+ allowUnrecognizedEnumValues: true,
269
+ skipValidation: true,
270
+ breadcrumbsPrefix: ["response"],
271
+ }),
272
+ rawResponse: _response.rawResponse,
273
+ };
274
+ }
275
+ if (_response.error.reason === "status-code") {
276
+ switch (_response.error.statusCode) {
277
+ case 404:
278
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
279
+ unrecognizedObjectKeys: "passthrough",
280
+ allowUnrecognizedUnionMembers: true,
281
+ allowUnrecognizedEnumValues: true,
282
+ skipValidation: true,
283
+ breadcrumbsPrefix: ["response"],
284
+ }), _response.rawResponse);
285
+ default:
286
+ throw new errors.AgentMailError({
287
+ statusCode: _response.error.statusCode,
288
+ body: _response.error.body,
289
+ rawResponse: _response.rawResponse,
290
+ });
291
+ }
292
+ }
293
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v0/pods/{pod_id}/inboxes/{inbox_id}");
294
+ });
295
+ }
224
296
  /**
225
297
  * @param {AgentMail.pods.PodId} pod_id
226
298
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -10,22 +10,6 @@ export declare namespace ListsClient {
10
10
  export declare class ListsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<ListsClient.Options>;
12
12
  constructor(options?: ListsClient.Options);
13
- /**
14
- * @param {AgentMail.pods.PodId} pod_id
15
- * @param {AgentMail.Direction} direction
16
- * @param {AgentMail.ListType} type
17
- * @param {AgentMail.CreateListEntryRequest} request
18
- * @param {ListsClient.RequestOptions} requestOptions - Request-specific configuration.
19
- *
20
- * @throws {@link AgentMail.ValidationError}
21
- *
22
- * @example
23
- * await client.pods.lists.create("pod_id", "send", "allow", {
24
- * entry: "entry"
25
- * })
26
- */
27
- create(pod_id: AgentMail.pods.PodId, direction: AgentMail.Direction, type: AgentMail.ListType, request: AgentMail.CreateListEntryRequest, requestOptions?: ListsClient.RequestOptions): core.HttpResponsePromise<AgentMail.PodListEntry>;
28
- private __create;
29
13
  /**
30
14
  * @param {AgentMail.pods.PodId} pod_id
31
15
  * @param {AgentMail.Direction} direction
@@ -52,6 +36,22 @@ export declare class ListsClient {
52
36
  */
53
37
  get(pod_id: AgentMail.pods.PodId, direction: AgentMail.Direction, type: AgentMail.ListType, entry: string, requestOptions?: ListsClient.RequestOptions): core.HttpResponsePromise<AgentMail.PodListEntry>;
54
38
  private __get;
39
+ /**
40
+ * @param {AgentMail.pods.PodId} pod_id
41
+ * @param {AgentMail.Direction} direction
42
+ * @param {AgentMail.ListType} type
43
+ * @param {AgentMail.CreateListEntryRequest} request
44
+ * @param {ListsClient.RequestOptions} requestOptions - Request-specific configuration.
45
+ *
46
+ * @throws {@link AgentMail.ValidationError}
47
+ *
48
+ * @example
49
+ * await client.pods.lists.create("pod_id", "send", "allow", {
50
+ * entry: "entry"
51
+ * })
52
+ */
53
+ create(pod_id: AgentMail.pods.PodId, direction: AgentMail.Direction, type: AgentMail.ListType, request: AgentMail.CreateListEntryRequest, requestOptions?: ListsClient.RequestOptions): core.HttpResponsePromise<AgentMail.PodListEntry>;
54
+ private __create;
55
55
  /**
56
56
  * @param {AgentMail.pods.PodId} pod_id
57
57
  * @param {AgentMail.Direction} direction
@@ -24,36 +24,31 @@ export class ListsClient {
24
24
  * @param {AgentMail.pods.PodId} pod_id
25
25
  * @param {AgentMail.Direction} direction
26
26
  * @param {AgentMail.ListType} type
27
- * @param {AgentMail.CreateListEntryRequest} request
27
+ * @param {AgentMail.pods.ListListEntriesRequest} request
28
28
  * @param {ListsClient.RequestOptions} requestOptions - Request-specific configuration.
29
29
  *
30
- * @throws {@link AgentMail.ValidationError}
31
- *
32
30
  * @example
33
- * await client.pods.lists.create("pod_id", "send", "allow", {
34
- * entry: "entry"
35
- * })
31
+ * await client.pods.lists.list("pod_id", "send", "allow")
36
32
  */
37
- create(pod_id, direction, type, request, requestOptions) {
38
- return core.HttpResponsePromise.fromPromise(this.__create(pod_id, direction, type, request, requestOptions));
33
+ list(pod_id, direction, type, request = {}, requestOptions) {
34
+ return core.HttpResponsePromise.fromPromise(this.__list(pod_id, direction, type, request, requestOptions));
39
35
  }
40
- __create(pod_id, direction, type, request, requestOptions) {
41
- return __awaiter(this, void 0, void 0, function* () {
36
+ __list(pod_id_1, direction_1, type_1) {
37
+ return __awaiter(this, arguments, void 0, function* (pod_id, direction, type, request = {}, requestOptions) {
42
38
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
+ const { limit, pageToken } = request;
40
+ const _queryParams = {
41
+ limit,
42
+ page_token: pageToken,
43
+ };
43
44
  const _authRequest = yield this._options.authProvider.getAuthRequest();
44
45
  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);
45
46
  const _response = yield core.fetcher({
46
47
  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)
47
48
  .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/lists/${core.url.encodePathParam(serializers.Direction.jsonOrThrow(direction, { omitUndefined: true }))}/${core.url.encodePathParam(serializers.ListType.jsonOrThrow(type, { omitUndefined: true }))}`),
48
- method: "POST",
49
+ method: "GET",
49
50
  headers: _headers,
50
- contentType: "application/json",
51
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
52
- requestType: "json",
53
- body: serializers.CreateListEntryRequest.jsonOrThrow(request, {
54
- unrecognizedObjectKeys: "strip",
55
- omitUndefined: true,
56
- }),
51
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
57
52
  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,
58
53
  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,
59
54
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -62,7 +57,7 @@ export class ListsClient {
62
57
  });
63
58
  if (_response.ok) {
64
59
  return {
65
- data: serializers.PodListEntry.parseOrThrow(_response.body, {
60
+ data: serializers.PodListListEntriesResponse.parseOrThrow(_response.body, {
66
61
  unrecognizedObjectKeys: "passthrough",
67
62
  allowUnrecognizedUnionMembers: true,
68
63
  allowUnrecognizedEnumValues: true,
@@ -73,55 +68,41 @@ export class ListsClient {
73
68
  };
74
69
  }
75
70
  if (_response.error.reason === "status-code") {
76
- switch (_response.error.statusCode) {
77
- case 400:
78
- throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
79
- unrecognizedObjectKeys: "passthrough",
80
- allowUnrecognizedUnionMembers: true,
81
- allowUnrecognizedEnumValues: true,
82
- skipValidation: true,
83
- breadcrumbsPrefix: ["response"],
84
- }), _response.rawResponse);
85
- default:
86
- throw new errors.AgentMailError({
87
- statusCode: _response.error.statusCode,
88
- body: _response.error.body,
89
- rawResponse: _response.rawResponse,
90
- });
91
- }
71
+ throw new errors.AgentMailError({
72
+ statusCode: _response.error.statusCode,
73
+ body: _response.error.body,
74
+ rawResponse: _response.rawResponse,
75
+ });
92
76
  }
93
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/lists/{direction}/{type}");
77
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/lists/{direction}/{type}");
94
78
  });
95
79
  }
96
80
  /**
97
81
  * @param {AgentMail.pods.PodId} pod_id
98
82
  * @param {AgentMail.Direction} direction
99
83
  * @param {AgentMail.ListType} type
100
- * @param {AgentMail.pods.ListListEntriesRequest} request
84
+ * @param {string} entry - Email address or domain.
101
85
  * @param {ListsClient.RequestOptions} requestOptions - Request-specific configuration.
102
86
  *
87
+ * @throws {@link AgentMail.NotFoundError}
88
+ *
103
89
  * @example
104
- * await client.pods.lists.list("pod_id", "send", "allow")
90
+ * await client.pods.lists.get("pod_id", "send", "allow", "entry")
105
91
  */
106
- list(pod_id, direction, type, request = {}, requestOptions) {
107
- return core.HttpResponsePromise.fromPromise(this.__list(pod_id, direction, type, request, requestOptions));
92
+ get(pod_id, direction, type, entry, requestOptions) {
93
+ return core.HttpResponsePromise.fromPromise(this.__get(pod_id, direction, type, entry, requestOptions));
108
94
  }
109
- __list(pod_id_1, direction_1, type_1) {
110
- return __awaiter(this, arguments, void 0, function* (pod_id, direction, type, request = {}, requestOptions) {
95
+ __get(pod_id, direction, type, entry, requestOptions) {
96
+ return __awaiter(this, void 0, void 0, function* () {
111
97
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
112
- const { limit, pageToken } = request;
113
- const _queryParams = {
114
- limit,
115
- page_token: pageToken,
116
- };
117
98
  const _authRequest = yield this._options.authProvider.getAuthRequest();
118
99
  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);
119
100
  const _response = yield core.fetcher({
120
101
  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)
121
- .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/lists/${core.url.encodePathParam(serializers.Direction.jsonOrThrow(direction, { omitUndefined: true }))}/${core.url.encodePathParam(serializers.ListType.jsonOrThrow(type, { omitUndefined: true }))}`),
102
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/lists/${core.url.encodePathParam(serializers.Direction.jsonOrThrow(direction, { omitUndefined: true }))}/${core.url.encodePathParam(serializers.ListType.jsonOrThrow(type, { omitUndefined: true }))}/${core.url.encodePathParam(entry)}`),
122
103
  method: "GET",
123
104
  headers: _headers,
124
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
105
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
125
106
  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,
126
107
  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,
127
108
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -130,7 +111,7 @@ export class ListsClient {
130
111
  });
131
112
  if (_response.ok) {
132
113
  return {
133
- data: serializers.PodListListEntriesResponse.parseOrThrow(_response.body, {
114
+ data: serializers.PodListEntry.parseOrThrow(_response.body, {
134
115
  unrecognizedObjectKeys: "passthrough",
135
116
  allowUnrecognizedUnionMembers: true,
136
117
  allowUnrecognizedEnumValues: true,
@@ -141,41 +122,60 @@ export class ListsClient {
141
122
  };
142
123
  }
143
124
  if (_response.error.reason === "status-code") {
144
- throw new errors.AgentMailError({
145
- statusCode: _response.error.statusCode,
146
- body: _response.error.body,
147
- rawResponse: _response.rawResponse,
148
- });
125
+ switch (_response.error.statusCode) {
126
+ case 404:
127
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
128
+ unrecognizedObjectKeys: "passthrough",
129
+ allowUnrecognizedUnionMembers: true,
130
+ allowUnrecognizedEnumValues: true,
131
+ skipValidation: true,
132
+ breadcrumbsPrefix: ["response"],
133
+ }), _response.rawResponse);
134
+ default:
135
+ throw new errors.AgentMailError({
136
+ statusCode: _response.error.statusCode,
137
+ body: _response.error.body,
138
+ rawResponse: _response.rawResponse,
139
+ });
140
+ }
149
141
  }
150
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/lists/{direction}/{type}");
142
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/lists/{direction}/{type}/{entry}");
151
143
  });
152
144
  }
153
145
  /**
154
146
  * @param {AgentMail.pods.PodId} pod_id
155
147
  * @param {AgentMail.Direction} direction
156
148
  * @param {AgentMail.ListType} type
157
- * @param {string} entry - Email address or domain.
149
+ * @param {AgentMail.CreateListEntryRequest} request
158
150
  * @param {ListsClient.RequestOptions} requestOptions - Request-specific configuration.
159
151
  *
160
- * @throws {@link AgentMail.NotFoundError}
152
+ * @throws {@link AgentMail.ValidationError}
161
153
  *
162
154
  * @example
163
- * await client.pods.lists.get("pod_id", "send", "allow", "entry")
155
+ * await client.pods.lists.create("pod_id", "send", "allow", {
156
+ * entry: "entry"
157
+ * })
164
158
  */
165
- get(pod_id, direction, type, entry, requestOptions) {
166
- return core.HttpResponsePromise.fromPromise(this.__get(pod_id, direction, type, entry, requestOptions));
159
+ create(pod_id, direction, type, request, requestOptions) {
160
+ return core.HttpResponsePromise.fromPromise(this.__create(pod_id, direction, type, request, requestOptions));
167
161
  }
168
- __get(pod_id, direction, type, entry, requestOptions) {
162
+ __create(pod_id, direction, type, request, requestOptions) {
169
163
  return __awaiter(this, void 0, void 0, function* () {
170
164
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
171
165
  const _authRequest = yield this._options.authProvider.getAuthRequest();
172
166
  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);
173
167
  const _response = yield core.fetcher({
174
168
  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)
175
- .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/lists/${core.url.encodePathParam(serializers.Direction.jsonOrThrow(direction, { omitUndefined: true }))}/${core.url.encodePathParam(serializers.ListType.jsonOrThrow(type, { omitUndefined: true }))}/${core.url.encodePathParam(entry)}`),
176
- method: "GET",
169
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/lists/${core.url.encodePathParam(serializers.Direction.jsonOrThrow(direction, { omitUndefined: true }))}/${core.url.encodePathParam(serializers.ListType.jsonOrThrow(type, { omitUndefined: true }))}`),
170
+ method: "POST",
177
171
  headers: _headers,
172
+ contentType: "application/json",
178
173
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
174
+ requestType: "json",
175
+ body: serializers.CreateListEntryRequest.jsonOrThrow(request, {
176
+ unrecognizedObjectKeys: "strip",
177
+ omitUndefined: true,
178
+ }),
179
179
  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,
180
180
  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,
181
181
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -196,8 +196,8 @@ export class ListsClient {
196
196
  }
197
197
  if (_response.error.reason === "status-code") {
198
198
  switch (_response.error.statusCode) {
199
- case 404:
200
- throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
199
+ case 400:
200
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
201
201
  unrecognizedObjectKeys: "passthrough",
202
202
  allowUnrecognizedUnionMembers: true,
203
203
  allowUnrecognizedEnumValues: true,
@@ -212,7 +212,7 @@ export class ListsClient {
212
212
  });
213
213
  }
214
214
  }
215
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/lists/{direction}/{type}/{entry}");
215
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/lists/{direction}/{type}");
216
216
  });
217
217
  }
218
218
  /**
@@ -47,4 +47,19 @@ export declare class ThreadsClient {
47
47
  */
48
48
  getAttachment(pod_id: AgentMail.pods.PodId, thread_id: AgentMail.ThreadId, attachment_id: AgentMail.AttachmentId, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<AgentMail.AttachmentResponse>;
49
49
  private __getAttachment;
50
+ /**
51
+ * 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.
52
+ *
53
+ * @param {AgentMail.pods.PodId} pod_id
54
+ * @param {AgentMail.ThreadId} thread_id
55
+ * @param {AgentMail.pods.DeleteThreadRequest} request
56
+ * @param {ThreadsClient.RequestOptions} requestOptions - Request-specific configuration.
57
+ *
58
+ * @throws {@link AgentMail.NotFoundError}
59
+ *
60
+ * @example
61
+ * await client.pods.threads.delete("pod_id", "thread_id")
62
+ */
63
+ delete(pod_id: AgentMail.pods.PodId, thread_id: AgentMail.ThreadId, request?: AgentMail.pods.DeleteThreadRequest, requestOptions?: ThreadsClient.RequestOptions): core.HttpResponsePromise<void>;
64
+ private __delete;
50
65
  }