agentmail 0.1.3 → 0.1.5

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 (82) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/apiKeys/client/Client.js +3 -1
  3. package/dist/cjs/api/resources/domains/client/Client.js +3 -1
  4. package/dist/cjs/api/resources/domains/types/{DomainSummary.d.ts → DomainItem.d.ts} +1 -1
  5. package/dist/cjs/api/resources/domains/types/ListDomainsResponse.d.ts +2 -1
  6. package/dist/cjs/api/resources/domains/types/index.d.ts +1 -1
  7. package/dist/cjs/api/resources/domains/types/index.js +1 -1
  8. package/dist/cjs/api/resources/drafts/client/Client.js +6 -1
  9. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +14 -0
  10. package/dist/cjs/api/resources/inboxes/client/Client.js +86 -1
  11. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +15 -4
  12. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +15 -4
  13. package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.js +3 -1
  14. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +6 -1
  15. package/dist/cjs/api/resources/inboxes/types/UpdateInboxRequest.d.ts +4 -0
  16. package/dist/cjs/api/resources/inboxes/types/UpdateInboxRequest.js +3 -0
  17. package/dist/cjs/api/resources/inboxes/types/index.d.ts +1 -0
  18. package/dist/cjs/api/resources/inboxes/types/index.js +1 -0
  19. package/dist/cjs/api/resources/metrics/client/Client.js +3 -1
  20. package/dist/cjs/api/resources/pods/client/Client.js +3 -1
  21. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +9 -2
  22. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +6 -1
  23. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +9 -2
  24. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +6 -1
  25. package/dist/cjs/api/resources/threads/client/Client.js +6 -1
  26. package/dist/cjs/api/resources/webhooks/client/Client.js +3 -1
  27. package/dist/cjs/serialization/resources/domains/types/{DomainSummary.d.ts → DomainItem.d.ts} +2 -2
  28. package/dist/cjs/serialization/resources/domains/types/{DomainSummary.js → DomainItem.js} +2 -2
  29. package/dist/cjs/serialization/resources/domains/types/ListDomainsResponse.d.ts +4 -2
  30. package/dist/cjs/serialization/resources/domains/types/ListDomainsResponse.js +4 -2
  31. package/dist/cjs/serialization/resources/domains/types/index.d.ts +1 -1
  32. package/dist/cjs/serialization/resources/domains/types/index.js +1 -1
  33. package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.d.ts +10 -0
  34. package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.js +42 -0
  35. package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +1 -0
  36. package/dist/cjs/serialization/resources/inboxes/types/index.js +1 -0
  37. package/dist/cjs/version.d.ts +1 -1
  38. package/dist/cjs/version.js +1 -1
  39. package/dist/esm/Client.mjs +2 -2
  40. package/dist/esm/api/resources/apiKeys/client/Client.mjs +3 -1
  41. package/dist/esm/api/resources/domains/client/Client.mjs +3 -1
  42. package/dist/esm/api/resources/domains/types/{DomainSummary.d.mts → DomainItem.d.mts} +1 -1
  43. package/dist/esm/api/resources/domains/types/ListDomainsResponse.d.mts +2 -1
  44. package/dist/esm/api/resources/domains/types/index.d.mts +1 -1
  45. package/dist/esm/api/resources/domains/types/index.mjs +1 -1
  46. package/dist/esm/api/resources/drafts/client/Client.mjs +6 -1
  47. package/dist/esm/api/resources/inboxes/client/Client.d.mts +14 -0
  48. package/dist/esm/api/resources/inboxes/client/Client.mjs +86 -1
  49. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +15 -4
  50. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +15 -4
  51. package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.mjs +3 -1
  52. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +6 -1
  53. package/dist/esm/api/resources/inboxes/types/UpdateInboxRequest.d.mts +4 -0
  54. package/dist/esm/api/resources/inboxes/types/UpdateInboxRequest.mjs +2 -0
  55. package/dist/esm/api/resources/inboxes/types/index.d.mts +1 -0
  56. package/dist/esm/api/resources/inboxes/types/index.mjs +1 -0
  57. package/dist/esm/api/resources/metrics/client/Client.mjs +3 -1
  58. package/dist/esm/api/resources/pods/client/Client.mjs +3 -1
  59. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +9 -2
  60. package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +6 -1
  61. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +9 -2
  62. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +6 -1
  63. package/dist/esm/api/resources/threads/client/Client.mjs +6 -1
  64. package/dist/esm/api/resources/webhooks/client/Client.mjs +3 -1
  65. package/dist/esm/serialization/resources/domains/types/{DomainSummary.d.mts → DomainItem.d.mts} +2 -2
  66. package/dist/esm/serialization/resources/domains/types/{DomainSummary.mjs → DomainItem.mjs} +1 -1
  67. package/dist/esm/serialization/resources/domains/types/ListDomainsResponse.d.mts +4 -2
  68. package/dist/esm/serialization/resources/domains/types/ListDomainsResponse.mjs +4 -2
  69. package/dist/esm/serialization/resources/domains/types/index.d.mts +1 -1
  70. package/dist/esm/serialization/resources/domains/types/index.mjs +1 -1
  71. package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.d.mts +10 -0
  72. package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.mjs +6 -0
  73. package/dist/esm/serialization/resources/inboxes/types/index.d.mts +1 -0
  74. package/dist/esm/serialization/resources/inboxes/types/index.mjs +1 -0
  75. package/dist/esm/version.d.mts +1 -1
  76. package/dist/esm/version.mjs +1 -1
  77. package/dist/llms-full.txt +297 -57
  78. package/dist/llms.txt +1 -0
  79. package/package.json +1 -1
  80. package/reference.md +59 -0
  81. /package/dist/cjs/api/resources/domains/types/{DomainSummary.js → DomainItem.js} +0 -0
  82. /package/dist/esm/api/resources/domains/types/{DomainSummary.mjs → DomainItem.mjs} +0 -0
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.UpdateInboxRequest = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ const DisplayName_js_1 = require("./DisplayName.js");
40
+ exports.UpdateInboxRequest = core.serialization.object({
41
+ displayName: core.serialization.property("display_name", DisplayName_js_1.DisplayName),
42
+ });
@@ -4,3 +4,4 @@ export * from "./DisplayName.js";
4
4
  export * from "./Inbox.js";
5
5
  export * from "./InboxId.js";
6
6
  export * from "./ListInboxesResponse.js";
7
+ export * from "./UpdateInboxRequest.js";
@@ -20,3 +20,4 @@ __exportStar(require("./DisplayName.js"), exports);
20
20
  __exportStar(require("./Inbox.js"), exports);
21
21
  __exportStar(require("./InboxId.js"), exports);
22
22
  __exportStar(require("./ListInboxesResponse.js"), exports);
23
+ __exportStar(require("./UpdateInboxRequest.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.3";
1
+ export declare const SDK_VERSION = "0.1.5";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.1.3";
4
+ exports.SDK_VERSION = "0.1.5";
@@ -15,8 +15,8 @@ export class AgentMailClient {
15
15
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
16
16
  "X-Fern-Language": "JavaScript",
17
17
  "X-Fern-SDK-Name": "agentmail",
18
- "X-Fern-SDK-Version": "0.1.3",
19
- "User-Agent": "agentmail/0.1.3",
18
+ "X-Fern-SDK-Version": "0.1.5",
19
+ "User-Agent": "agentmail/0.1.5",
20
20
  "X-Fern-Runtime": core.RUNTIME.type,
21
21
  "X-Fern-Runtime-Version": core.RUNTIME.version,
22
22
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -111,7 +111,9 @@ export class ApiKeys {
111
111
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
112
112
  requestType: "json",
113
113
  body: serializers.CreateApiKeyRequest.jsonOrThrow(request, {
114
- unrecognizedObjectKeys: "strip",
114
+ unrecognizedObjectKeys: "passthrough",
115
+ allowUnrecognizedUnionMembers: true,
116
+ allowUnrecognizedEnumValues: true,
115
117
  omitUndefined: true,
116
118
  }),
117
119
  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,
@@ -242,7 +242,9 @@ export class Domains {
242
242
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
243
243
  requestType: "json",
244
244
  body: serializers.CreateDomainRequest.jsonOrThrow(request, {
245
- unrecognizedObjectKeys: "strip",
245
+ unrecognizedObjectKeys: "passthrough",
246
+ allowUnrecognizedUnionMembers: true,
247
+ allowUnrecognizedEnumValues: true,
246
248
  omitUndefined: true,
247
249
  }),
248
250
  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,
@@ -1,5 +1,5 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
- export interface DomainSummary {
2
+ export interface DomainItem {
3
3
  domainId: AgentMail.DomainId;
4
4
  feedbackEnabled: AgentMail.FeedbackEnabled;
5
5
  clientId?: AgentMail.ClientId;
@@ -1,7 +1,8 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
2
  export interface ListDomainsResponse {
3
3
  count: AgentMail.Count;
4
+ limit?: AgentMail.Limit;
4
5
  nextPageToken?: AgentMail.PageToken;
5
6
  /** Ordered by `created_at` descending. */
6
- domains: AgentMail.DomainSummary[];
7
+ domains: AgentMail.DomainItem[];
7
8
  }
@@ -2,8 +2,8 @@ export * from "./ClientId.mjs";
2
2
  export * from "./CreateDomainRequest.mjs";
3
3
  export * from "./Domain.mjs";
4
4
  export * from "./DomainId.mjs";
5
+ export * from "./DomainItem.mjs";
5
6
  export * from "./DomainName.mjs";
6
- export * from "./DomainSummary.mjs";
7
7
  export * from "./FeedbackEnabled.mjs";
8
8
  export * from "./ListDomainsResponse.mjs";
9
9
  export * from "./RecordStatus.mjs";
@@ -2,8 +2,8 @@ export * from "./ClientId.mjs";
2
2
  export * from "./CreateDomainRequest.mjs";
3
3
  export * from "./Domain.mjs";
4
4
  export * from "./DomainId.mjs";
5
+ export * from "./DomainItem.mjs";
5
6
  export * from "./DomainName.mjs";
6
- export * from "./DomainSummary.mjs";
7
7
  export * from "./FeedbackEnabled.mjs";
8
8
  export * from "./ListDomainsResponse.mjs";
9
9
  export * from "./RecordStatus.mjs";
@@ -43,7 +43,12 @@ export class Drafts {
43
43
  _queryParams.page_token = pageToken;
44
44
  }
45
45
  if (labels != null) {
46
- _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip", omitUndefined: true }));
46
+ _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, {
47
+ unrecognizedObjectKeys: "passthrough",
48
+ allowUnrecognizedUnionMembers: true,
49
+ allowUnrecognizedEnumValues: true,
50
+ omitUndefined: true,
51
+ }));
47
52
  }
48
53
  if (before != null) {
49
54
  _queryParams.before = before.toISOString();
@@ -53,6 +53,20 @@ export declare class Inboxes {
53
53
  */
54
54
  create(request: AgentMail.inboxes.CreateInboxRequest, requestOptions?: Inboxes.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
55
55
  private __create;
56
+ /**
57
+ * @param {AgentMail.inboxes.InboxId} inboxId
58
+ * @param {AgentMail.inboxes.UpdateInboxRequest} request
59
+ * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
60
+ *
61
+ * @throws {@link AgentMail.NotFoundError}
62
+ *
63
+ * @example
64
+ * await client.inboxes.update("inbox_id", {
65
+ * displayName: "display_name"
66
+ * })
67
+ */
68
+ update(inboxId: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.UpdateInboxRequest, requestOptions?: Inboxes.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
69
+ private __update;
56
70
  /**
57
71
  * @param {AgentMail.inboxes.InboxId} inboxId
58
72
  * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
@@ -201,7 +201,9 @@ export class Inboxes {
201
201
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
202
202
  requestType: "json",
203
203
  body: serializers.inboxes.CreateInboxRequest.jsonOrThrow(request, {
204
- unrecognizedObjectKeys: "strip",
204
+ unrecognizedObjectKeys: "passthrough",
205
+ allowUnrecognizedUnionMembers: true,
206
+ allowUnrecognizedEnumValues: true,
205
207
  omitUndefined: true,
206
208
  }),
207
209
  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,
@@ -255,6 +257,89 @@ export class Inboxes {
255
257
  }
256
258
  });
257
259
  }
260
+ /**
261
+ * @param {AgentMail.inboxes.InboxId} inboxId
262
+ * @param {AgentMail.inboxes.UpdateInboxRequest} request
263
+ * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
264
+ *
265
+ * @throws {@link AgentMail.NotFoundError}
266
+ *
267
+ * @example
268
+ * await client.inboxes.update("inbox_id", {
269
+ * displayName: "display_name"
270
+ * })
271
+ */
272
+ update(inboxId, request, requestOptions) {
273
+ return core.HttpResponsePromise.fromPromise(this.__update(inboxId, request, requestOptions));
274
+ }
275
+ __update(inboxId, request, requestOptions) {
276
+ return __awaiter(this, void 0, void 0, function* () {
277
+ var _a, _b, _c, _d, _e, _f, _g, _h;
278
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
279
+ const _response = yield core.fetcher({
280
+ 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.Production).http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}`),
281
+ method: "PATCH",
282
+ headers: _headers,
283
+ contentType: "application/json",
284
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
285
+ requestType: "json",
286
+ body: serializers.inboxes.UpdateInboxRequest.jsonOrThrow(request, {
287
+ unrecognizedObjectKeys: "passthrough",
288
+ allowUnrecognizedUnionMembers: true,
289
+ allowUnrecognizedEnumValues: true,
290
+ omitUndefined: true,
291
+ }),
292
+ 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,
293
+ 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,
294
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
295
+ });
296
+ if (_response.ok) {
297
+ return {
298
+ data: serializers.inboxes.Inbox.parseOrThrow(_response.body, {
299
+ unrecognizedObjectKeys: "passthrough",
300
+ allowUnrecognizedUnionMembers: true,
301
+ allowUnrecognizedEnumValues: true,
302
+ skipValidation: true,
303
+ breadcrumbsPrefix: ["response"],
304
+ }),
305
+ rawResponse: _response.rawResponse,
306
+ };
307
+ }
308
+ if (_response.error.reason === "status-code") {
309
+ switch (_response.error.statusCode) {
310
+ case 404:
311
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
312
+ unrecognizedObjectKeys: "passthrough",
313
+ allowUnrecognizedUnionMembers: true,
314
+ allowUnrecognizedEnumValues: true,
315
+ skipValidation: true,
316
+ breadcrumbsPrefix: ["response"],
317
+ }), _response.rawResponse);
318
+ default:
319
+ throw new errors.AgentMailError({
320
+ statusCode: _response.error.statusCode,
321
+ body: _response.error.body,
322
+ rawResponse: _response.rawResponse,
323
+ });
324
+ }
325
+ }
326
+ switch (_response.error.reason) {
327
+ case "non-json":
328
+ throw new errors.AgentMailError({
329
+ statusCode: _response.error.statusCode,
330
+ body: _response.error.rawBody,
331
+ rawResponse: _response.rawResponse,
332
+ });
333
+ case "timeout":
334
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling PATCH /v0/inboxes/{inbox_id}.");
335
+ case "unknown":
336
+ throw new errors.AgentMailError({
337
+ message: _response.error.errorMessage,
338
+ rawResponse: _response.rawResponse,
339
+ });
340
+ }
341
+ });
342
+ }
258
343
  /**
259
344
  * @param {AgentMail.inboxes.InboxId} inboxId
260
345
  * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
@@ -44,7 +44,12 @@ export class Drafts {
44
44
  _queryParams.page_token = pageToken;
45
45
  }
46
46
  if (labels != null) {
47
- _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip", omitUndefined: true }));
47
+ _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, {
48
+ unrecognizedObjectKeys: "passthrough",
49
+ allowUnrecognizedUnionMembers: true,
50
+ allowUnrecognizedEnumValues: true,
51
+ omitUndefined: true,
52
+ }));
48
53
  }
49
54
  if (before != null) {
50
55
  _queryParams.before = before.toISOString();
@@ -210,7 +215,9 @@ export class Drafts {
210
215
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
211
216
  requestType: "json",
212
217
  body: serializers.CreateDraftRequest.jsonOrThrow(request, {
213
- unrecognizedObjectKeys: "strip",
218
+ unrecognizedObjectKeys: "passthrough",
219
+ allowUnrecognizedUnionMembers: true,
220
+ allowUnrecognizedEnumValues: true,
214
221
  omitUndefined: true,
215
222
  }),
216
223
  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,
@@ -290,7 +297,9 @@ export class Drafts {
290
297
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
291
298
  requestType: "json",
292
299
  body: serializers.UpdateDraftRequest.jsonOrThrow(request, {
293
- unrecognizedObjectKeys: "strip",
300
+ unrecognizedObjectKeys: "passthrough",
301
+ allowUnrecognizedUnionMembers: true,
302
+ allowUnrecognizedEnumValues: true,
294
303
  omitUndefined: true,
295
304
  }),
296
305
  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,
@@ -372,7 +381,9 @@ export class Drafts {
372
381
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
373
382
  requestType: "json",
374
383
  body: serializers.UpdateMessageRequest.jsonOrThrow(request, {
375
- unrecognizedObjectKeys: "strip",
384
+ unrecognizedObjectKeys: "passthrough",
385
+ allowUnrecognizedUnionMembers: true,
386
+ allowUnrecognizedEnumValues: true,
376
387
  omitUndefined: true,
377
388
  }),
378
389
  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,
@@ -44,7 +44,12 @@ export class Messages {
44
44
  _queryParams.page_token = pageToken;
45
45
  }
46
46
  if (labels != null) {
47
- _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip", omitUndefined: true }));
47
+ _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, {
48
+ unrecognizedObjectKeys: "passthrough",
49
+ allowUnrecognizedUnionMembers: true,
50
+ allowUnrecognizedEnumValues: true,
51
+ omitUndefined: true,
52
+ }));
48
53
  }
49
54
  if (before != null) {
50
55
  _queryParams.before = before.toISOString();
@@ -328,7 +333,9 @@ export class Messages {
328
333
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
329
334
  requestType: "json",
330
335
  body: serializers.SendMessageRequest.jsonOrThrow(request, {
331
- unrecognizedObjectKeys: "strip",
336
+ unrecognizedObjectKeys: "passthrough",
337
+ allowUnrecognizedUnionMembers: true,
338
+ allowUnrecognizedEnumValues: true,
332
339
  omitUndefined: true,
333
340
  }),
334
341
  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,
@@ -426,7 +433,9 @@ export class Messages {
426
433
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
427
434
  requestType: "json",
428
435
  body: serializers.ReplyToMessageRequest.jsonOrThrow(request, {
429
- unrecognizedObjectKeys: "strip",
436
+ unrecognizedObjectKeys: "passthrough",
437
+ allowUnrecognizedUnionMembers: true,
438
+ allowUnrecognizedEnumValues: true,
430
439
  omitUndefined: true,
431
440
  }),
432
441
  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,
@@ -523,7 +532,9 @@ export class Messages {
523
532
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
524
533
  requestType: "json",
525
534
  body: serializers.UpdateMessageRequest.jsonOrThrow(request, {
526
- unrecognizedObjectKeys: "strip",
535
+ unrecognizedObjectKeys: "passthrough",
536
+ allowUnrecognizedUnionMembers: true,
537
+ allowUnrecognizedEnumValues: true,
527
538
  omitUndefined: true,
528
539
  }),
529
540
  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,
@@ -43,7 +43,9 @@ export class Metrics {
43
43
  const _queryParams = {};
44
44
  if (eventTypes != null) {
45
45
  _queryParams.event_types = toJson(serializers.MetricEventTypes.jsonOrThrow(eventTypes, {
46
- unrecognizedObjectKeys: "strip",
46
+ unrecognizedObjectKeys: "passthrough",
47
+ allowUnrecognizedUnionMembers: true,
48
+ allowUnrecognizedEnumValues: true,
47
49
  omitUndefined: true,
48
50
  }));
49
51
  }
@@ -44,7 +44,12 @@ export class Threads {
44
44
  _queryParams.page_token = pageToken;
45
45
  }
46
46
  if (labels != null) {
47
- _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip", omitUndefined: true }));
47
+ _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, {
48
+ unrecognizedObjectKeys: "passthrough",
49
+ allowUnrecognizedUnionMembers: true,
50
+ allowUnrecognizedEnumValues: true,
51
+ omitUndefined: true,
52
+ }));
48
53
  }
49
54
  if (before != null) {
50
55
  _queryParams.before = before.toISOString();
@@ -0,0 +1,4 @@
1
+ import type * as AgentMail from "../../../index.mjs";
2
+ export interface UpdateInboxRequest {
3
+ displayName: AgentMail.inboxes.DisplayName;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -4,3 +4,4 @@ export * from "./DisplayName.mjs";
4
4
  export * from "./Inbox.mjs";
5
5
  export * from "./InboxId.mjs";
6
6
  export * from "./ListInboxesResponse.mjs";
7
+ export * from "./UpdateInboxRequest.mjs";
@@ -4,3 +4,4 @@ export * from "./DisplayName.mjs";
4
4
  export * from "./Inbox.mjs";
5
5
  export * from "./InboxId.mjs";
6
6
  export * from "./ListInboxesResponse.mjs";
7
+ export * from "./UpdateInboxRequest.mjs";
@@ -41,7 +41,9 @@ export class Metrics {
41
41
  const _queryParams = {};
42
42
  if (eventTypes != null) {
43
43
  _queryParams.event_types = toJson(serializers.MetricEventTypes.jsonOrThrow(eventTypes, {
44
- unrecognizedObjectKeys: "strip",
44
+ unrecognizedObjectKeys: "passthrough",
45
+ allowUnrecognizedUnionMembers: true,
46
+ allowUnrecognizedEnumValues: true,
45
47
  omitUndefined: true,
46
48
  }));
47
49
  }
@@ -201,7 +201,9 @@ export class Pods {
201
201
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
202
202
  requestType: "json",
203
203
  body: serializers.pods.CreatePodRequest.jsonOrThrow(request, {
204
- unrecognizedObjectKeys: "strip",
204
+ unrecognizedObjectKeys: "passthrough",
205
+ allowUnrecognizedUnionMembers: true,
206
+ allowUnrecognizedEnumValues: true,
205
207
  omitUndefined: true,
206
208
  }),
207
209
  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,
@@ -44,7 +44,12 @@ export class Domains {
44
44
  _queryParams.page_token = pageToken;
45
45
  }
46
46
  if (labels != null) {
47
- _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip", omitUndefined: true }));
47
+ _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, {
48
+ unrecognizedObjectKeys: "passthrough",
49
+ allowUnrecognizedUnionMembers: true,
50
+ allowUnrecognizedEnumValues: true,
51
+ omitUndefined: true,
52
+ }));
48
53
  }
49
54
  if (before != null) {
50
55
  _queryParams.before = before.toISOString();
@@ -140,7 +145,9 @@ export class Domains {
140
145
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
141
146
  requestType: "json",
142
147
  body: serializers.CreateDomainRequest.jsonOrThrow(request, {
143
- unrecognizedObjectKeys: "strip",
148
+ unrecognizedObjectKeys: "passthrough",
149
+ allowUnrecognizedUnionMembers: true,
150
+ allowUnrecognizedEnumValues: true,
144
151
  omitUndefined: true,
145
152
  }),
146
153
  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,
@@ -44,7 +44,12 @@ export class Drafts {
44
44
  _queryParams.page_token = pageToken;
45
45
  }
46
46
  if (labels != null) {
47
- _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip", omitUndefined: true }));
47
+ _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, {
48
+ unrecognizedObjectKeys: "passthrough",
49
+ allowUnrecognizedUnionMembers: true,
50
+ allowUnrecognizedEnumValues: true,
51
+ omitUndefined: true,
52
+ }));
48
53
  }
49
54
  if (before != null) {
50
55
  _queryParams.before = before.toISOString();
@@ -44,7 +44,12 @@ export class Inboxes {
44
44
  _queryParams.page_token = pageToken;
45
45
  }
46
46
  if (labels != null) {
47
- _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip", omitUndefined: true }));
47
+ _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, {
48
+ unrecognizedObjectKeys: "passthrough",
49
+ allowUnrecognizedUnionMembers: true,
50
+ allowUnrecognizedEnumValues: true,
51
+ omitUndefined: true,
52
+ }));
48
53
  }
49
54
  if (before != null) {
50
55
  _queryParams.before = before.toISOString();
@@ -210,7 +215,9 @@ export class Inboxes {
210
215
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
211
216
  requestType: "json",
212
217
  body: serializers.inboxes.CreateInboxRequest.jsonOrThrow(request, {
213
- unrecognizedObjectKeys: "strip",
218
+ unrecognizedObjectKeys: "passthrough",
219
+ allowUnrecognizedUnionMembers: true,
220
+ allowUnrecognizedEnumValues: true,
214
221
  omitUndefined: true,
215
222
  }),
216
223
  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,
@@ -44,7 +44,12 @@ export class Threads {
44
44
  _queryParams.page_token = pageToken;
45
45
  }
46
46
  if (labels != null) {
47
- _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip", omitUndefined: true }));
47
+ _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, {
48
+ unrecognizedObjectKeys: "passthrough",
49
+ allowUnrecognizedUnionMembers: true,
50
+ allowUnrecognizedEnumValues: true,
51
+ omitUndefined: true,
52
+ }));
48
53
  }
49
54
  if (before != null) {
50
55
  _queryParams.before = before.toISOString();
@@ -43,7 +43,12 @@ export class Threads {
43
43
  _queryParams.page_token = pageToken;
44
44
  }
45
45
  if (labels != null) {
46
- _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip", omitUndefined: true }));
46
+ _queryParams.labels = toJson(serializers.Labels.jsonOrThrow(labels, {
47
+ unrecognizedObjectKeys: "passthrough",
48
+ allowUnrecognizedUnionMembers: true,
49
+ allowUnrecognizedEnumValues: true,
50
+ omitUndefined: true,
51
+ }));
47
52
  }
48
53
  if (before != null) {
49
54
  _queryParams.before = before.toISOString();
@@ -184,7 +184,9 @@ export class Webhooks {
184
184
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
185
185
  requestType: "json",
186
186
  body: serializers.webhooks.CreateWebhookRequest.jsonOrThrow(request, {
187
- unrecognizedObjectKeys: "strip",
187
+ unrecognizedObjectKeys: "passthrough",
188
+ allowUnrecognizedUnionMembers: true,
189
+ allowUnrecognizedEnumValues: true,
188
190
  omitUndefined: true,
189
191
  }),
190
192
  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,
@@ -4,8 +4,8 @@ import type * as serializers from "../../../index.mjs";
4
4
  import { ClientId } from "./ClientId.mjs";
5
5
  import { DomainId } from "./DomainId.mjs";
6
6
  import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
7
- export declare const DomainSummary: core.serialization.ObjectSchema<serializers.DomainSummary.Raw, AgentMail.DomainSummary>;
8
- export declare namespace DomainSummary {
7
+ export declare const DomainItem: core.serialization.ObjectSchema<serializers.DomainItem.Raw, AgentMail.DomainItem>;
8
+ export declare namespace DomainItem {
9
9
  interface Raw {
10
10
  domain_id: DomainId.Raw;
11
11
  feedback_enabled: FeedbackEnabled.Raw;
@@ -3,7 +3,7 @@ import * as core from "../../../../core/index.mjs";
3
3
  import { ClientId } from "./ClientId.mjs";
4
4
  import { DomainId } from "./DomainId.mjs";
5
5
  import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
6
- export const DomainSummary = core.serialization.object({
6
+ export const DomainItem = core.serialization.object({
7
7
  domainId: core.serialization.property("domain_id", DomainId),
8
8
  feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled),
9
9
  clientId: core.serialization.property("client_id", ClientId.optional()),
@@ -2,13 +2,15 @@ import type * as AgentMail from "../../../../api/index.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  import { Count } from "../../../types/Count.mjs";
5
+ import { Limit } from "../../../types/Limit.mjs";
5
6
  import { PageToken } from "../../../types/PageToken.mjs";
6
- import { DomainSummary } from "./DomainSummary.mjs";
7
+ import { DomainItem } from "./DomainItem.mjs";
7
8
  export declare const ListDomainsResponse: core.serialization.ObjectSchema<serializers.ListDomainsResponse.Raw, AgentMail.ListDomainsResponse>;
8
9
  export declare namespace ListDomainsResponse {
9
10
  interface Raw {
10
11
  count: Count.Raw;
12
+ limit?: Limit.Raw | null;
11
13
  next_page_token?: PageToken.Raw | null;
12
- domains: DomainSummary.Raw[];
14
+ domains: DomainItem.Raw[];
13
15
  }
14
16
  }
@@ -1,10 +1,12 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import { Count } from "../../../types/Count.mjs";
4
+ import { Limit } from "../../../types/Limit.mjs";
4
5
  import { PageToken } from "../../../types/PageToken.mjs";
5
- import { DomainSummary } from "./DomainSummary.mjs";
6
+ import { DomainItem } from "./DomainItem.mjs";
6
7
  export const ListDomainsResponse = core.serialization.object({
7
8
  count: Count,
9
+ limit: Limit.optional(),
8
10
  nextPageToken: core.serialization.property("next_page_token", PageToken.optional()),
9
- domains: core.serialization.list(DomainSummary),
11
+ domains: core.serialization.list(DomainItem),
10
12
  });