agentmail 0.5.43 → 0.5.44

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 (45) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/index.d.ts +1 -0
  3. package/dist/cjs/api/resources/index.js +1 -0
  4. package/dist/cjs/api/resources/organizations/client/Client.d.ts +41 -1
  5. package/dist/cjs/api/resources/organizations/client/Client.js +159 -0
  6. package/dist/cjs/api/resources/organizations/errors/OrganizationForbiddenError.d.ts +6 -0
  7. package/dist/cjs/api/resources/organizations/errors/OrganizationForbiddenError.js +54 -0
  8. package/dist/cjs/api/resources/organizations/errors/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/organizations/errors/index.js +17 -0
  10. package/dist/cjs/api/resources/organizations/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/organizations/index.js +1 -0
  12. package/dist/cjs/api/resources/organizations/types/OrganizationLabs.d.ts +11 -0
  13. package/dist/cjs/api/resources/organizations/types/OrganizationLabs.js +3 -0
  14. package/dist/cjs/api/resources/organizations/types/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/organizations/types/index.js +1 -0
  16. package/dist/cjs/serialization/resources/organizations/types/OrganizationLabs.d.ts +11 -0
  17. package/dist/cjs/serialization/resources/organizations/types/OrganizationLabs.js +43 -0
  18. package/dist/cjs/serialization/resources/organizations/types/index.d.ts +1 -0
  19. package/dist/cjs/serialization/resources/organizations/types/index.js +1 -0
  20. package/dist/cjs/version.d.ts +1 -1
  21. package/dist/cjs/version.js +1 -1
  22. package/dist/esm/BaseClient.mjs +2 -2
  23. package/dist/esm/api/resources/index.d.mts +1 -0
  24. package/dist/esm/api/resources/index.mjs +1 -0
  25. package/dist/esm/api/resources/organizations/client/Client.d.mts +41 -1
  26. package/dist/esm/api/resources/organizations/client/Client.mjs +159 -0
  27. package/dist/esm/api/resources/organizations/errors/OrganizationForbiddenError.d.mts +6 -0
  28. package/dist/esm/api/resources/organizations/errors/OrganizationForbiddenError.mjs +17 -0
  29. package/dist/esm/api/resources/organizations/errors/index.d.mts +1 -0
  30. package/dist/esm/api/resources/organizations/errors/index.mjs +1 -0
  31. package/dist/esm/api/resources/organizations/index.d.mts +1 -0
  32. package/dist/esm/api/resources/organizations/index.mjs +1 -0
  33. package/dist/esm/api/resources/organizations/types/OrganizationLabs.d.mts +11 -0
  34. package/dist/esm/api/resources/organizations/types/OrganizationLabs.mjs +2 -0
  35. package/dist/esm/api/resources/organizations/types/index.d.mts +1 -0
  36. package/dist/esm/api/resources/organizations/types/index.mjs +1 -0
  37. package/dist/esm/serialization/resources/organizations/types/OrganizationLabs.d.mts +11 -0
  38. package/dist/esm/serialization/resources/organizations/types/OrganizationLabs.mjs +7 -0
  39. package/dist/esm/serialization/resources/organizations/types/index.d.mts +1 -0
  40. package/dist/esm/serialization/resources/organizations/types/index.mjs +1 -0
  41. package/dist/esm/version.d.mts +1 -1
  42. package/dist/esm/version.mjs +1 -1
  43. package/dist/llms.txt +14 -0
  44. package/package.json +1 -1
  45. package/reference.md +124 -0
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "agentmail",
46
- "X-Fern-SDK-Version": "0.5.43",
47
- "User-Agent": "agentmail/0.5.43",
46
+ "X-Fern-SDK-Version": "0.5.44",
47
+ "User-Agent": "agentmail/0.5.44",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -37,6 +37,7 @@ export * from "./messages/types/index.js";
37
37
  export * from "./metrics/client/requests/index.js";
38
38
  export * as metrics from "./metrics/index.js";
39
39
  export * from "./metrics/types/index.js";
40
+ export * from "./organizations/errors/index.js";
40
41
  export * as organizations from "./organizations/index.js";
41
42
  export * from "./organizations/types/index.js";
42
43
  export * as pods from "./pods/index.js";
@@ -76,6 +76,7 @@ __exportStar(require("./messages/types/index.js"), exports);
76
76
  __exportStar(require("./metrics/client/requests/index.js"), exports);
77
77
  exports.metrics = __importStar(require("./metrics/index.js"));
78
78
  __exportStar(require("./metrics/types/index.js"), exports);
79
+ __exportStar(require("./organizations/errors/index.js"), exports);
79
80
  exports.organizations = __importStar(require("./organizations/index.js"));
80
81
  __exportStar(require("./organizations/types/index.js"), exports);
81
82
  exports.pods = __importStar(require("./pods/index.js"));
@@ -1,7 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
- import type * as AgentMail from "../../../index.js";
4
+ import * as AgentMail from "../../../index.js";
5
5
  export declare namespace OrganizationsClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
@@ -25,4 +25,44 @@ export declare class OrganizationsClient {
25
25
  */
26
26
  get(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Organization>;
27
27
  private __get;
28
+ /**
29
+ * Returns whether the organization is in [AgentMail Labs](https://docs.agentmail.to/calendar), which turns on features that are still in preview, such as calendar. Requires an organization-scoped API key.
30
+ *
31
+ * **CLI:**
32
+ * ```bash
33
+ * agentmail organizations get-labs
34
+ * ```
35
+ *
36
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
37
+ *
38
+ * @throws {@link AgentMail.OrganizationForbiddenError}
39
+ *
40
+ * @example
41
+ * await client.organizations.getLabs()
42
+ */
43
+ getLabs(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<AgentMail.OrganizationLabs>;
44
+ private __getLabs;
45
+ /**
46
+ * Joins AgentMail Labs for the whole organization, which turns on every feature in Labs for every inbox. Joining again has no effect. There is no leave on the API; an organization admin can leave in the console under [Settings, then Labs](https://console.agentmail.to/dashboard/settings/labs).
47
+ *
48
+ * Join only when your organization has decided to. Get Labs reads the same for an organization that never joined and one whose admin left Labs on purpose, so don't join just because `enabled` is `false`.
49
+ *
50
+ * Requires an organization-scoped API key with no permissions restriction, and a verified organization. API keys see the change within five minutes. Where Labs isn't offered (`available` is `false` on Get Labs), joining returns `403`.
51
+ *
52
+ * **CLI:**
53
+ * ```bash
54
+ * agentmail organizations join-labs
55
+ * ```
56
+ *
57
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
58
+ *
59
+ * @throws {@link AgentMail.OrganizationForbiddenError}
60
+ * @throws {@link AgentMail.ValidationError}
61
+ * @throws {@link AgentMail.ConflictError}
62
+ *
63
+ * @example
64
+ * await client.organizations.joinLabs()
65
+ */
66
+ joinLabs(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<AgentMail.OrganizationLabs>;
67
+ private __joinLabs;
28
68
  }
@@ -51,6 +51,7 @@ const environments = __importStar(require("../../../../environments.js"));
51
51
  const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
52
  const errors = __importStar(require("../../../../errors/index.js"));
53
53
  const serializers = __importStar(require("../../../../serialization/index.js"));
54
+ const AgentMail = __importStar(require("../../../index.js"));
54
55
  class OrganizationsClient {
55
56
  constructor(options = {}) {
56
57
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
@@ -110,5 +111,163 @@ class OrganizationsClient {
110
111
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/organizations");
111
112
  });
112
113
  }
114
+ /**
115
+ * Returns whether the organization is in [AgentMail Labs](https://docs.agentmail.to/calendar), which turns on features that are still in preview, such as calendar. Requires an organization-scoped API key.
116
+ *
117
+ * **CLI:**
118
+ * ```bash
119
+ * agentmail organizations get-labs
120
+ * ```
121
+ *
122
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
123
+ *
124
+ * @throws {@link AgentMail.OrganizationForbiddenError}
125
+ *
126
+ * @example
127
+ * await client.organizations.getLabs()
128
+ */
129
+ getLabs(requestOptions) {
130
+ return core.HttpResponsePromise.fromPromise(this.__getLabs(requestOptions));
131
+ }
132
+ __getLabs(requestOptions) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
135
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
136
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
137
+ const _response = yield core.fetcher({
138
+ 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)
139
+ .http, "/v0/organizations/labs"),
140
+ method: "GET",
141
+ headers: _headers,
142
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
143
+ 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,
144
+ 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,
145
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
146
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
147
+ logging: this._options.logging,
148
+ });
149
+ if (_response.ok) {
150
+ return {
151
+ data: serializers.OrganizationLabs.parseOrThrow(_response.body, {
152
+ unrecognizedObjectKeys: "passthrough",
153
+ allowUnrecognizedUnionMembers: true,
154
+ allowUnrecognizedEnumValues: true,
155
+ skipValidation: true,
156
+ breadcrumbsPrefix: ["response"],
157
+ }),
158
+ rawResponse: _response.rawResponse,
159
+ };
160
+ }
161
+ if (_response.error.reason === "status-code") {
162
+ switch (_response.error.statusCode) {
163
+ case 403:
164
+ throw new AgentMail.OrganizationForbiddenError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
165
+ unrecognizedObjectKeys: "passthrough",
166
+ allowUnrecognizedUnionMembers: true,
167
+ allowUnrecognizedEnumValues: true,
168
+ skipValidation: true,
169
+ breadcrumbsPrefix: ["response"],
170
+ }), _response.rawResponse);
171
+ default:
172
+ throw new errors.AgentMailError({
173
+ statusCode: _response.error.statusCode,
174
+ body: _response.error.body,
175
+ rawResponse: _response.rawResponse,
176
+ });
177
+ }
178
+ }
179
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/organizations/labs");
180
+ });
181
+ }
182
+ /**
183
+ * Joins AgentMail Labs for the whole organization, which turns on every feature in Labs for every inbox. Joining again has no effect. There is no leave on the API; an organization admin can leave in the console under [Settings, then Labs](https://console.agentmail.to/dashboard/settings/labs).
184
+ *
185
+ * Join only when your organization has decided to. Get Labs reads the same for an organization that never joined and one whose admin left Labs on purpose, so don't join just because `enabled` is `false`.
186
+ *
187
+ * Requires an organization-scoped API key with no permissions restriction, and a verified organization. API keys see the change within five minutes. Where Labs isn't offered (`available` is `false` on Get Labs), joining returns `403`.
188
+ *
189
+ * **CLI:**
190
+ * ```bash
191
+ * agentmail organizations join-labs
192
+ * ```
193
+ *
194
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
195
+ *
196
+ * @throws {@link AgentMail.OrganizationForbiddenError}
197
+ * @throws {@link AgentMail.ValidationError}
198
+ * @throws {@link AgentMail.ConflictError}
199
+ *
200
+ * @example
201
+ * await client.organizations.joinLabs()
202
+ */
203
+ joinLabs(requestOptions) {
204
+ return core.HttpResponsePromise.fromPromise(this.__joinLabs(requestOptions));
205
+ }
206
+ __joinLabs(requestOptions) {
207
+ return __awaiter(this, void 0, void 0, function* () {
208
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
209
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
210
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
211
+ const _response = yield core.fetcher({
212
+ 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)
213
+ .http, "/v0/organizations/labs"),
214
+ method: "POST",
215
+ headers: _headers,
216
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
217
+ 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,
218
+ 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,
219
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
220
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
221
+ logging: this._options.logging,
222
+ });
223
+ if (_response.ok) {
224
+ return {
225
+ data: serializers.OrganizationLabs.parseOrThrow(_response.body, {
226
+ unrecognizedObjectKeys: "passthrough",
227
+ allowUnrecognizedUnionMembers: true,
228
+ allowUnrecognizedEnumValues: true,
229
+ skipValidation: true,
230
+ breadcrumbsPrefix: ["response"],
231
+ }),
232
+ rawResponse: _response.rawResponse,
233
+ };
234
+ }
235
+ if (_response.error.reason === "status-code") {
236
+ switch (_response.error.statusCode) {
237
+ case 403:
238
+ throw new AgentMail.OrganizationForbiddenError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
239
+ unrecognizedObjectKeys: "passthrough",
240
+ allowUnrecognizedUnionMembers: true,
241
+ allowUnrecognizedEnumValues: true,
242
+ skipValidation: true,
243
+ breadcrumbsPrefix: ["response"],
244
+ }), _response.rawResponse);
245
+ case 400:
246
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
247
+ unrecognizedObjectKeys: "passthrough",
248
+ allowUnrecognizedUnionMembers: true,
249
+ allowUnrecognizedEnumValues: true,
250
+ skipValidation: true,
251
+ breadcrumbsPrefix: ["response"],
252
+ }), _response.rawResponse);
253
+ case 409:
254
+ throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
255
+ unrecognizedObjectKeys: "passthrough",
256
+ allowUnrecognizedUnionMembers: true,
257
+ allowUnrecognizedEnumValues: true,
258
+ skipValidation: true,
259
+ breadcrumbsPrefix: ["response"],
260
+ }), _response.rawResponse);
261
+ default:
262
+ throw new errors.AgentMailError({
263
+ statusCode: _response.error.statusCode,
264
+ body: _response.error.body,
265
+ rawResponse: _response.rawResponse,
266
+ });
267
+ }
268
+ }
269
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/organizations/labs");
270
+ });
271
+ }
113
272
  }
114
273
  exports.OrganizationsClient = OrganizationsClient;
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as errors from "../../../../errors/index.js";
3
+ import type * as AgentMail from "../../../index.js";
4
+ export declare class OrganizationForbiddenError extends errors.AgentMailError {
5
+ constructor(body: AgentMail.ErrorResponse, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,54 @@
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.OrganizationForbiddenError = void 0;
38
+ const errors = __importStar(require("../../../../errors/index.js"));
39
+ class OrganizationForbiddenError extends errors.AgentMailError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "OrganizationForbiddenError",
43
+ statusCode: 403,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.OrganizationForbiddenError = OrganizationForbiddenError;
@@ -0,0 +1 @@
1
+ export * from "./OrganizationForbiddenError.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./OrganizationForbiddenError.js"), exports);
@@ -1,2 +1,3 @@
1
1
  export * from "./client/index.js";
2
+ export * from "./errors/index.js";
2
3
  export * from "./types/index.js";
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./errors/index.js"), exports);
18
19
  __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Whether the organization is in AgentMail Labs, and whether Labs is offered in this deployment.
3
+ */
4
+ export interface OrganizationLabs {
5
+ /** Whether the organization is in AgentMail Labs. */
6
+ enabled: boolean;
7
+ /** Time at which the organization joined Labs. `null` when it is not in Labs. */
8
+ enabledAt: Date | null;
9
+ /** Whether Labs is offered in this deployment. Labs is available in US production (`api.agentmail.to`), not yet in EU production (`api.agentmail.eu`). */
10
+ available: boolean;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
1
  export * from "./Organization.js";
2
+ export * from "./OrganizationLabs.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Organization.js"), exports);
18
+ __exportStar(require("./OrganizationLabs.js"), exports);
@@ -0,0 +1,11 @@
1
+ import type * as AgentMail from "../../../../api/index.js";
2
+ import * as core from "../../../../core/index.js";
3
+ import type * as serializers from "../../../index.js";
4
+ export declare const OrganizationLabs: core.serialization.ObjectSchema<serializers.OrganizationLabs.Raw, AgentMail.OrganizationLabs>;
5
+ export declare namespace OrganizationLabs {
6
+ interface Raw {
7
+ enabled: boolean;
8
+ enabled_at?: string | null;
9
+ available: boolean;
10
+ }
11
+ }
@@ -0,0 +1,43 @@
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.OrganizationLabs = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ exports.OrganizationLabs = core.serialization.object({
40
+ enabled: core.serialization.boolean(),
41
+ enabledAt: core.serialization.property("enabled_at", core.serialization.date().nullable()),
42
+ available: core.serialization.boolean(),
43
+ });
@@ -1 +1,2 @@
1
1
  export * from "./Organization.js";
2
+ export * from "./OrganizationLabs.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Organization.js"), exports);
18
+ __exportStar(require("./OrganizationLabs.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.5.43";
1
+ export declare const SDK_VERSION = "0.5.44";
@@ -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.5.43";
4
+ exports.SDK_VERSION = "0.5.44";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "agentmail",
9
- "X-Fern-SDK-Version": "0.5.43",
10
- "User-Agent": "agentmail/0.5.43",
9
+ "X-Fern-SDK-Version": "0.5.44",
10
+ "User-Agent": "agentmail/0.5.44",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -37,6 +37,7 @@ export * from "./messages/types/index.mjs";
37
37
  export * from "./metrics/client/requests/index.mjs";
38
38
  export * as metrics from "./metrics/index.mjs";
39
39
  export * from "./metrics/types/index.mjs";
40
+ export * from "./organizations/errors/index.mjs";
40
41
  export * as organizations from "./organizations/index.mjs";
41
42
  export * from "./organizations/types/index.mjs";
42
43
  export * as pods from "./pods/index.mjs";
@@ -37,6 +37,7 @@ export * from "./messages/types/index.mjs";
37
37
  export * from "./metrics/client/requests/index.mjs";
38
38
  export * as metrics from "./metrics/index.mjs";
39
39
  export * from "./metrics/types/index.mjs";
40
+ export * from "./organizations/errors/index.mjs";
40
41
  export * as organizations from "./organizations/index.mjs";
41
42
  export * from "./organizations/types/index.mjs";
42
43
  export * as pods from "./pods/index.mjs";
@@ -1,7 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
- import type * as AgentMail from "../../../index.mjs";
4
+ import * as AgentMail from "../../../index.mjs";
5
5
  export declare namespace OrganizationsClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
@@ -25,4 +25,44 @@ export declare class OrganizationsClient {
25
25
  */
26
26
  get(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Organization>;
27
27
  private __get;
28
+ /**
29
+ * Returns whether the organization is in [AgentMail Labs](https://docs.agentmail.to/calendar), which turns on features that are still in preview, such as calendar. Requires an organization-scoped API key.
30
+ *
31
+ * **CLI:**
32
+ * ```bash
33
+ * agentmail organizations get-labs
34
+ * ```
35
+ *
36
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
37
+ *
38
+ * @throws {@link AgentMail.OrganizationForbiddenError}
39
+ *
40
+ * @example
41
+ * await client.organizations.getLabs()
42
+ */
43
+ getLabs(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<AgentMail.OrganizationLabs>;
44
+ private __getLabs;
45
+ /**
46
+ * Joins AgentMail Labs for the whole organization, which turns on every feature in Labs for every inbox. Joining again has no effect. There is no leave on the API; an organization admin can leave in the console under [Settings, then Labs](https://console.agentmail.to/dashboard/settings/labs).
47
+ *
48
+ * Join only when your organization has decided to. Get Labs reads the same for an organization that never joined and one whose admin left Labs on purpose, so don't join just because `enabled` is `false`.
49
+ *
50
+ * Requires an organization-scoped API key with no permissions restriction, and a verified organization. API keys see the change within five minutes. Where Labs isn't offered (`available` is `false` on Get Labs), joining returns `403`.
51
+ *
52
+ * **CLI:**
53
+ * ```bash
54
+ * agentmail organizations join-labs
55
+ * ```
56
+ *
57
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
58
+ *
59
+ * @throws {@link AgentMail.OrganizationForbiddenError}
60
+ * @throws {@link AgentMail.ValidationError}
61
+ * @throws {@link AgentMail.ConflictError}
62
+ *
63
+ * @example
64
+ * await client.organizations.joinLabs()
65
+ */
66
+ joinLabs(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<AgentMail.OrganizationLabs>;
67
+ private __joinLabs;
28
68
  }
@@ -15,6 +15,7 @@ import * as environments from "../../../../environments.mjs";
15
15
  import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
16
  import * as errors from "../../../../errors/index.mjs";
17
17
  import * as serializers from "../../../../serialization/index.mjs";
18
+ import * as AgentMail from "../../../index.mjs";
18
19
  export class OrganizationsClient {
19
20
  constructor(options = {}) {
20
21
  this._options = normalizeClientOptionsWithAuth(options);
@@ -74,4 +75,162 @@ export class OrganizationsClient {
74
75
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/organizations");
75
76
  });
76
77
  }
78
+ /**
79
+ * Returns whether the organization is in [AgentMail Labs](https://docs.agentmail.to/calendar), which turns on features that are still in preview, such as calendar. Requires an organization-scoped API key.
80
+ *
81
+ * **CLI:**
82
+ * ```bash
83
+ * agentmail organizations get-labs
84
+ * ```
85
+ *
86
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
87
+ *
88
+ * @throws {@link AgentMail.OrganizationForbiddenError}
89
+ *
90
+ * @example
91
+ * await client.organizations.getLabs()
92
+ */
93
+ getLabs(requestOptions) {
94
+ return core.HttpResponsePromise.fromPromise(this.__getLabs(requestOptions));
95
+ }
96
+ __getLabs(requestOptions) {
97
+ return __awaiter(this, void 0, void 0, function* () {
98
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
99
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
100
+ 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);
101
+ const _response = yield core.fetcher({
102
+ 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)
103
+ .http, "/v0/organizations/labs"),
104
+ method: "GET",
105
+ headers: _headers,
106
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
107
+ 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,
108
+ 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,
109
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
110
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
111
+ logging: this._options.logging,
112
+ });
113
+ if (_response.ok) {
114
+ return {
115
+ data: serializers.OrganizationLabs.parseOrThrow(_response.body, {
116
+ unrecognizedObjectKeys: "passthrough",
117
+ allowUnrecognizedUnionMembers: true,
118
+ allowUnrecognizedEnumValues: true,
119
+ skipValidation: true,
120
+ breadcrumbsPrefix: ["response"],
121
+ }),
122
+ rawResponse: _response.rawResponse,
123
+ };
124
+ }
125
+ if (_response.error.reason === "status-code") {
126
+ switch (_response.error.statusCode) {
127
+ case 403:
128
+ throw new AgentMail.OrganizationForbiddenError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
129
+ unrecognizedObjectKeys: "passthrough",
130
+ allowUnrecognizedUnionMembers: true,
131
+ allowUnrecognizedEnumValues: true,
132
+ skipValidation: true,
133
+ breadcrumbsPrefix: ["response"],
134
+ }), _response.rawResponse);
135
+ default:
136
+ throw new errors.AgentMailError({
137
+ statusCode: _response.error.statusCode,
138
+ body: _response.error.body,
139
+ rawResponse: _response.rawResponse,
140
+ });
141
+ }
142
+ }
143
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/organizations/labs");
144
+ });
145
+ }
146
+ /**
147
+ * Joins AgentMail Labs for the whole organization, which turns on every feature in Labs for every inbox. Joining again has no effect. There is no leave on the API; an organization admin can leave in the console under [Settings, then Labs](https://console.agentmail.to/dashboard/settings/labs).
148
+ *
149
+ * Join only when your organization has decided to. Get Labs reads the same for an organization that never joined and one whose admin left Labs on purpose, so don't join just because `enabled` is `false`.
150
+ *
151
+ * Requires an organization-scoped API key with no permissions restriction, and a verified organization. API keys see the change within five minutes. Where Labs isn't offered (`available` is `false` on Get Labs), joining returns `403`.
152
+ *
153
+ * **CLI:**
154
+ * ```bash
155
+ * agentmail organizations join-labs
156
+ * ```
157
+ *
158
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
159
+ *
160
+ * @throws {@link AgentMail.OrganizationForbiddenError}
161
+ * @throws {@link AgentMail.ValidationError}
162
+ * @throws {@link AgentMail.ConflictError}
163
+ *
164
+ * @example
165
+ * await client.organizations.joinLabs()
166
+ */
167
+ joinLabs(requestOptions) {
168
+ return core.HttpResponsePromise.fromPromise(this.__joinLabs(requestOptions));
169
+ }
170
+ __joinLabs(requestOptions) {
171
+ return __awaiter(this, void 0, void 0, function* () {
172
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
173
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
174
+ 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);
175
+ const _response = yield core.fetcher({
176
+ 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)
177
+ .http, "/v0/organizations/labs"),
178
+ method: "POST",
179
+ headers: _headers,
180
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
181
+ 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,
182
+ 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,
183
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
184
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
185
+ logging: this._options.logging,
186
+ });
187
+ if (_response.ok) {
188
+ return {
189
+ data: serializers.OrganizationLabs.parseOrThrow(_response.body, {
190
+ unrecognizedObjectKeys: "passthrough",
191
+ allowUnrecognizedUnionMembers: true,
192
+ allowUnrecognizedEnumValues: true,
193
+ skipValidation: true,
194
+ breadcrumbsPrefix: ["response"],
195
+ }),
196
+ rawResponse: _response.rawResponse,
197
+ };
198
+ }
199
+ if (_response.error.reason === "status-code") {
200
+ switch (_response.error.statusCode) {
201
+ case 403:
202
+ throw new AgentMail.OrganizationForbiddenError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
203
+ unrecognizedObjectKeys: "passthrough",
204
+ allowUnrecognizedUnionMembers: true,
205
+ allowUnrecognizedEnumValues: true,
206
+ skipValidation: true,
207
+ breadcrumbsPrefix: ["response"],
208
+ }), _response.rawResponse);
209
+ case 400:
210
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
211
+ unrecognizedObjectKeys: "passthrough",
212
+ allowUnrecognizedUnionMembers: true,
213
+ allowUnrecognizedEnumValues: true,
214
+ skipValidation: true,
215
+ breadcrumbsPrefix: ["response"],
216
+ }), _response.rawResponse);
217
+ case 409:
218
+ throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
219
+ unrecognizedObjectKeys: "passthrough",
220
+ allowUnrecognizedUnionMembers: true,
221
+ allowUnrecognizedEnumValues: true,
222
+ skipValidation: true,
223
+ breadcrumbsPrefix: ["response"],
224
+ }), _response.rawResponse);
225
+ default:
226
+ throw new errors.AgentMailError({
227
+ statusCode: _response.error.statusCode,
228
+ body: _response.error.body,
229
+ rawResponse: _response.rawResponse,
230
+ });
231
+ }
232
+ }
233
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/organizations/labs");
234
+ });
235
+ }
77
236
  }
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../../../core/index.mjs";
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ import type * as AgentMail from "../../../index.mjs";
4
+ export declare class OrganizationForbiddenError extends errors.AgentMailError {
5
+ constructor(body: AgentMail.ErrorResponse, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export class OrganizationForbiddenError extends errors.AgentMailError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "OrganizationForbiddenError",
7
+ statusCode: 403,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
16
+ }
17
+ }
@@ -0,0 +1 @@
1
+ export * from "./OrganizationForbiddenError.mjs";
@@ -0,0 +1 @@
1
+ export * from "./OrganizationForbiddenError.mjs";
@@ -1,2 +1,3 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./errors/index.mjs";
2
3
  export * from "./types/index.mjs";
@@ -1,2 +1,3 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./errors/index.mjs";
2
3
  export * from "./types/index.mjs";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Whether the organization is in AgentMail Labs, and whether Labs is offered in this deployment.
3
+ */
4
+ export interface OrganizationLabs {
5
+ /** Whether the organization is in AgentMail Labs. */
6
+ enabled: boolean;
7
+ /** Time at which the organization joined Labs. `null` when it is not in Labs. */
8
+ enabledAt: Date | null;
9
+ /** Whether Labs is offered in this deployment. Labs is available in US production (`api.agentmail.to`), not yet in EU production (`api.agentmail.eu`). */
10
+ available: boolean;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1 +1,2 @@
1
1
  export * from "./Organization.mjs";
2
+ export * from "./OrganizationLabs.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./Organization.mjs";
2
+ export * from "./OrganizationLabs.mjs";
@@ -0,0 +1,11 @@
1
+ import type * as AgentMail from "../../../../api/index.mjs";
2
+ import * as core from "../../../../core/index.mjs";
3
+ import type * as serializers from "../../../index.mjs";
4
+ export declare const OrganizationLabs: core.serialization.ObjectSchema<serializers.OrganizationLabs.Raw, AgentMail.OrganizationLabs>;
5
+ export declare namespace OrganizationLabs {
6
+ interface Raw {
7
+ enabled: boolean;
8
+ enabled_at?: string | null;
9
+ available: boolean;
10
+ }
11
+ }
@@ -0,0 +1,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../../../core/index.mjs";
3
+ export const OrganizationLabs = core.serialization.object({
4
+ enabled: core.serialization.boolean(),
5
+ enabledAt: core.serialization.property("enabled_at", core.serialization.date().nullable()),
6
+ available: core.serialization.boolean(),
7
+ });
@@ -1 +1,2 @@
1
1
  export * from "./Organization.mjs";
2
+ export * from "./OrganizationLabs.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./Organization.mjs";
2
+ export * from "./OrganizationLabs.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.5.43";
1
+ export declare const SDK_VERSION = "0.5.44";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.5.43";
1
+ export const SDK_VERSION = "0.5.44";
package/dist/llms.txt CHANGED
@@ -31,6 +31,7 @@
31
31
  - [Agent Onboarding](https://docs.agentmail.to/agent-onboarding.md): Resources for AI coding assistants, MCP servers, skills, and agent-friendly documentation.
32
32
  - [Skills](https://docs.agentmail.to/integrations/skills.md): AgentMail's official skill for OpenClaw, Claude Code, Cursor, and other AI assistants
33
33
  - [MCP](https://docs.agentmail.to/integrations/mcp.md): Connect AgentMail to Claude, ChatGPT, Cursor, and other MCP clients
34
+ - [MCP Events](https://docs.agentmail.to/integrations/mcp-events.md): Subscribe ChatGPT and other MCP Events clients to new mail in an AgentMail inbox, with signed push delivery instead of polling.
34
35
  - [CLI](https://docs.agentmail.to/integrations/cli.md): AgentMail's official command-line interface
35
36
  - [Google ADK](https://docs.agentmail.to/integrations/google-adk.md): AgentMail's Google Agent Development Kit (ADK) integration
36
37
  - [LangChain](https://docs.agentmail.to/integrations/langchain.md): AgentMail's LangChain integration
@@ -55,6 +56,7 @@
55
56
  - [Webhooks Overview](https://docs.agentmail.to/webhooks-overview.md): Learn how to use Webhooks to build responsive, event-driven email agents with AgentMail.
56
57
  - [Webhook Events](https://docs.agentmail.to/events.md)
57
58
  - [Webhook Setup Guide](https://docs.agentmail.to/webhook-setup.md): A comprehensive guide to setting up webhooks with ngrok and AgentMail, including account creation, inbox setup, and code examples.
59
+ - [Polling Webhooks](https://docs.agentmail.to/webhook-polling.md): Create a polling webhook and read its events from your agent with the Svix SDK: no public endpoint, tunnel, or persistent connection required.
58
60
  - [Verifying Webhooks](https://docs.agentmail.to/webhook-verification.md): Learn how to verify webhook signatures to secure your webhook endpoints and prevent spoofed requests.
59
61
  - [WebSockets](https://docs.agentmail.to/websockets.md): Learn how to use WebSockets for instant email notifications without webhooks or polling.
60
62
  - [WebSockets Quickstart](https://docs.agentmail.to/websockets/quickstart.md): Get started with real-time email event streaming
@@ -150,6 +152,10 @@
150
152
  - API Reference > Inboxes > Webhooks [Update Webhook](https://docs.agentmail.to/api-reference/inboxes/webhooks/update.md)
151
153
  - API Reference > Inboxes > Webhooks [Update Webhook Headers](https://docs.agentmail.to/api-reference/inboxes/webhooks/update-headers.md)
152
154
  - API Reference > Inboxes > Webhooks [Delete Webhook](https://docs.agentmail.to/api-reference/inboxes/webhooks/delete.md)
155
+ - API Reference > Inboxes > Webhooks > Polling [List Polling Webhooks](https://docs.agentmail.to/api-reference/inboxes/webhooks/polling/list.md)
156
+ - API Reference > Inboxes > Webhooks > Polling [Get Polling Webhook](https://docs.agentmail.to/api-reference/inboxes/webhooks/polling/get.md)
157
+ - API Reference > Inboxes > Webhooks > Polling [Create Polling Webhook](https://docs.agentmail.to/api-reference/inboxes/webhooks/polling/create.md)
158
+ - API Reference > Inboxes > Webhooks > Polling [Delete Polling Webhook](https://docs.agentmail.to/api-reference/inboxes/webhooks/polling/delete.md)
153
159
  - API Reference > Inboxes > Lists [List Entries](https://docs.agentmail.to/api-reference/inboxes/lists/list.md)
154
160
  - API Reference > Inboxes > Lists [Get List Entry](https://docs.agentmail.to/api-reference/inboxes/lists/get.md)
155
161
  - API Reference > Inboxes > Lists [Create List Entry](https://docs.agentmail.to/api-reference/inboxes/lists/create.md)
@@ -204,6 +210,10 @@
204
210
  - API Reference > Webhooks > Events [Calendar Event Responded](https://docs.agentmail.to/api-reference/webhooks/events/calendar-event-responded.md)
205
211
  - API Reference > Webhooks > Events [Calendar Event Starting](https://docs.agentmail.to/api-reference/webhooks/events/calendar-event-starting.md)
206
212
  - API Reference > Webhooks > Events [Calendar Event Ending](https://docs.agentmail.to/api-reference/webhooks/events/calendar-event-ending.md)
213
+ - API Reference > Webhooks > Polling [List Polling Webhooks](https://docs.agentmail.to/api-reference/webhooks/polling/list.md)
214
+ - API Reference > Webhooks > Polling [Get Polling Webhook](https://docs.agentmail.to/api-reference/webhooks/polling/get.md)
215
+ - API Reference > Webhooks > Polling [Create Polling Webhook](https://docs.agentmail.to/api-reference/webhooks/polling/create.md)
216
+ - API Reference > Webhooks > Polling [Delete Polling Webhook](https://docs.agentmail.to/api-reference/webhooks/polling/delete.md)
207
217
  - API Reference > Websockets [Connect](https://docs.agentmail.to/api-reference/websockets/websockets.md)
208
218
  - API Reference > Domains [List Domains](https://docs.agentmail.to/api-reference/domains/list.md)
209
219
  - API Reference > Domains [Get Domain](https://docs.agentmail.to/api-reference/domains/get.md)
@@ -259,6 +269,10 @@
259
269
  - API Reference > Pods > Webhooks [Update Webhook](https://docs.agentmail.to/api-reference/pods/webhooks/update.md)
260
270
  - API Reference > Pods > Webhooks [Update Webhook Headers](https://docs.agentmail.to/api-reference/pods/webhooks/update-headers.md)
261
271
  - API Reference > Pods > Webhooks [Delete Webhook](https://docs.agentmail.to/api-reference/pods/webhooks/delete.md)
272
+ - API Reference > Pods > Webhooks > Polling [List Polling Webhooks](https://docs.agentmail.to/api-reference/pods/webhooks/polling/list.md)
273
+ - API Reference > Pods > Webhooks > Polling [Get Polling Webhook](https://docs.agentmail.to/api-reference/pods/webhooks/polling/get.md)
274
+ - API Reference > Pods > Webhooks > Polling [Create Polling Webhook](https://docs.agentmail.to/api-reference/pods/webhooks/polling/create.md)
275
+ - API Reference > Pods > Webhooks > Polling [Delete Polling Webhook](https://docs.agentmail.to/api-reference/pods/webhooks/polling/delete.md)
262
276
  - API Reference > Pods > Domains [List Domains](https://docs.agentmail.to/api-reference/pods/domains/list.md)
263
277
  - API Reference > Pods > Domains [Get Domain](https://docs.agentmail.to/api-reference/pods/domains/get.md)
264
278
  - API Reference > Pods > Domains [Get Zone File](https://docs.agentmail.to/api-reference/pods/domains/get-zone-file.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmail",
3
- "version": "0.5.43",
3
+ "version": "0.5.44",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -8750,6 +8750,130 @@ await client.organizations.get();
8750
8750
  </dl>
8751
8751
 
8752
8752
 
8753
+ </dd>
8754
+ </dl>
8755
+ </details>
8756
+
8757
+ <details><summary><code>client.organizations.<a href="/src/api/resources/organizations/client/Client.ts">getLabs</a>() -> AgentMail.OrganizationLabs</code></summary>
8758
+ <dl>
8759
+ <dd>
8760
+
8761
+ #### 📝 Description
8762
+
8763
+ <dl>
8764
+ <dd>
8765
+
8766
+ <dl>
8767
+ <dd>
8768
+
8769
+ Returns whether the organization is in [AgentMail Labs](https://docs.agentmail.to/calendar), which turns on features that are still in preview, such as calendar. Requires an organization-scoped API key.
8770
+
8771
+ **CLI:**
8772
+ ```bash
8773
+ agentmail organizations get-labs
8774
+ ```
8775
+ </dd>
8776
+ </dl>
8777
+ </dd>
8778
+ </dl>
8779
+
8780
+ #### 🔌 Usage
8781
+
8782
+ <dl>
8783
+ <dd>
8784
+
8785
+ <dl>
8786
+ <dd>
8787
+
8788
+ ```typescript
8789
+ await client.organizations.getLabs();
8790
+
8791
+ ```
8792
+ </dd>
8793
+ </dl>
8794
+ </dd>
8795
+ </dl>
8796
+
8797
+ #### ⚙️ Parameters
8798
+
8799
+ <dl>
8800
+ <dd>
8801
+
8802
+ <dl>
8803
+ <dd>
8804
+
8805
+ **requestOptions:** `OrganizationsClient.RequestOptions`
8806
+
8807
+ </dd>
8808
+ </dl>
8809
+ </dd>
8810
+ </dl>
8811
+
8812
+
8813
+ </dd>
8814
+ </dl>
8815
+ </details>
8816
+
8817
+ <details><summary><code>client.organizations.<a href="/src/api/resources/organizations/client/Client.ts">joinLabs</a>() -> AgentMail.OrganizationLabs</code></summary>
8818
+ <dl>
8819
+ <dd>
8820
+
8821
+ #### 📝 Description
8822
+
8823
+ <dl>
8824
+ <dd>
8825
+
8826
+ <dl>
8827
+ <dd>
8828
+
8829
+ Joins AgentMail Labs for the whole organization, which turns on every feature in Labs for every inbox. Joining again has no effect. There is no leave on the API; an organization admin can leave in the console under [Settings, then Labs](https://console.agentmail.to/dashboard/settings/labs).
8830
+
8831
+ Join only when your organization has decided to. Get Labs reads the same for an organization that never joined and one whose admin left Labs on purpose, so don't join just because `enabled` is `false`.
8832
+
8833
+ Requires an organization-scoped API key with no permissions restriction, and a verified organization. API keys see the change within five minutes. Where Labs isn't offered (`available` is `false` on Get Labs), joining returns `403`.
8834
+
8835
+ **CLI:**
8836
+ ```bash
8837
+ agentmail organizations join-labs
8838
+ ```
8839
+ </dd>
8840
+ </dl>
8841
+ </dd>
8842
+ </dl>
8843
+
8844
+ #### 🔌 Usage
8845
+
8846
+ <dl>
8847
+ <dd>
8848
+
8849
+ <dl>
8850
+ <dd>
8851
+
8852
+ ```typescript
8853
+ await client.organizations.joinLabs();
8854
+
8855
+ ```
8856
+ </dd>
8857
+ </dl>
8858
+ </dd>
8859
+ </dl>
8860
+
8861
+ #### ⚙️ Parameters
8862
+
8863
+ <dl>
8864
+ <dd>
8865
+
8866
+ <dl>
8867
+ <dd>
8868
+
8869
+ **requestOptions:** `OrganizationsClient.RequestOptions`
8870
+
8871
+ </dd>
8872
+ </dl>
8873
+ </dd>
8874
+ </dl>
8875
+
8876
+
8753
8877
  </dd>
8754
8878
  </dl>
8755
8879
  </details>