agentmail 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +13 -8
  4. package/dist/cjs/api/resources/domains/types/RecordStatus.d.ts +2 -1
  5. package/dist/cjs/api/resources/domains/types/RecordStatus.js +2 -1
  6. package/dist/cjs/api/resources/domains/types/VerificationStatus.d.ts +4 -1
  7. package/dist/cjs/api/resources/domains/types/VerificationStatus.js +4 -1
  8. package/dist/cjs/api/resources/index.d.ts +2 -0
  9. package/dist/cjs/api/resources/index.js +3 -1
  10. package/dist/cjs/api/resources/organizations/client/Client.d.ts +24 -0
  11. package/dist/cjs/api/resources/organizations/client/Client.js +121 -0
  12. package/dist/cjs/api/resources/organizations/client/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/organizations/client/index.js +2 -0
  14. package/dist/cjs/api/resources/organizations/index.d.ts +2 -0
  15. package/dist/cjs/api/resources/organizations/index.js +18 -0
  16. package/dist/cjs/api/resources/organizations/types/Organization.d.ts +19 -0
  17. package/dist/cjs/api/resources/organizations/types/Organization.js +3 -0
  18. package/dist/cjs/api/resources/organizations/types/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/organizations/types/index.js +17 -0
  20. package/dist/cjs/serialization/resources/domains/types/RecordStatus.d.ts +1 -1
  21. package/dist/cjs/serialization/resources/domains/types/RecordStatus.js +1 -1
  22. package/dist/cjs/serialization/resources/domains/types/VerificationStatus.d.ts +1 -1
  23. package/dist/cjs/serialization/resources/domains/types/VerificationStatus.js +1 -1
  24. package/dist/cjs/serialization/resources/index.d.ts +2 -0
  25. package/dist/cjs/serialization/resources/index.js +3 -1
  26. package/dist/cjs/serialization/resources/organizations/index.d.ts +1 -0
  27. package/dist/cjs/serialization/resources/organizations/index.js +17 -0
  28. package/dist/cjs/serialization/resources/organizations/types/Organization.d.ts +16 -0
  29. package/dist/cjs/serialization/resources/organizations/types/Organization.js +48 -0
  30. package/dist/cjs/serialization/resources/organizations/types/index.d.ts +1 -0
  31. package/dist/cjs/serialization/resources/organizations/types/index.js +17 -0
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/BaseClient.mjs +2 -2
  35. package/dist/esm/Client.d.mts +3 -0
  36. package/dist/esm/Client.mjs +5 -0
  37. package/dist/esm/api/resources/domains/types/RecordStatus.d.mts +2 -1
  38. package/dist/esm/api/resources/domains/types/RecordStatus.mjs +2 -1
  39. package/dist/esm/api/resources/domains/types/VerificationStatus.d.mts +4 -1
  40. package/dist/esm/api/resources/domains/types/VerificationStatus.mjs +4 -1
  41. package/dist/esm/api/resources/index.d.mts +2 -0
  42. package/dist/esm/api/resources/index.mjs +2 -0
  43. package/dist/esm/api/resources/organizations/client/Client.d.mts +24 -0
  44. package/dist/esm/api/resources/organizations/client/Client.mjs +84 -0
  45. package/dist/esm/api/resources/organizations/client/index.d.mts +1 -0
  46. package/dist/esm/api/resources/organizations/client/index.mjs +1 -0
  47. package/dist/esm/api/resources/organizations/index.d.mts +2 -0
  48. package/dist/esm/api/resources/organizations/index.mjs +2 -0
  49. package/dist/esm/api/resources/organizations/types/Organization.d.mts +19 -0
  50. package/dist/esm/api/resources/organizations/types/Organization.mjs +2 -0
  51. package/dist/esm/api/resources/organizations/types/index.d.mts +1 -0
  52. package/dist/esm/api/resources/organizations/types/index.mjs +1 -0
  53. package/dist/esm/serialization/resources/domains/types/RecordStatus.d.mts +1 -1
  54. package/dist/esm/serialization/resources/domains/types/RecordStatus.mjs +1 -1
  55. package/dist/esm/serialization/resources/domains/types/VerificationStatus.d.mts +1 -1
  56. package/dist/esm/serialization/resources/domains/types/VerificationStatus.mjs +1 -1
  57. package/dist/esm/serialization/resources/index.d.mts +2 -0
  58. package/dist/esm/serialization/resources/index.mjs +2 -0
  59. package/dist/esm/serialization/resources/organizations/index.d.mts +1 -0
  60. package/dist/esm/serialization/resources/organizations/index.mjs +1 -0
  61. package/dist/esm/serialization/resources/organizations/types/Organization.d.mts +16 -0
  62. package/dist/esm/serialization/resources/organizations/types/Organization.mjs +12 -0
  63. package/dist/esm/serialization/resources/organizations/types/index.d.mts +1 -0
  64. package/dist/esm/serialization/resources/organizations/types/index.mjs +1 -0
  65. package/dist/esm/version.d.mts +1 -1
  66. package/dist/esm/version.mjs +1 -1
  67. package/dist/llms-full.txt +87 -51
  68. package/package.json +1 -1
  69. package/reference.md +56 -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.1.14",
47
- "User-Agent": "agentmail/0.1.14",
46
+ "X-Fern-SDK-Version": "0.1.16",
47
+ "User-Agent": "agentmail/0.1.16",
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);
@@ -3,6 +3,7 @@ import { DomainsClient } from "./api/resources/domains/client/Client.js";
3
3
  import { DraftsClient } from "./api/resources/drafts/client/Client.js";
4
4
  import { InboxesClient } from "./api/resources/inboxes/client/Client.js";
5
5
  import { MetricsClient } from "./api/resources/metrics/client/Client.js";
6
+ import { OrganizationsClient } from "./api/resources/organizations/client/Client.js";
6
7
  import { PodsClient } from "./api/resources/pods/client/Client.js";
7
8
  import { ThreadsClient } from "./api/resources/threads/client/Client.js";
8
9
  import { WebhooksClient } from "./api/resources/webhooks/client/Client.js";
@@ -24,6 +25,7 @@ export declare class AgentMailClient {
24
25
  protected _domains: DomainsClient | undefined;
25
26
  protected _drafts: DraftsClient | undefined;
26
27
  protected _metrics: MetricsClient | undefined;
28
+ protected _organizations: OrganizationsClient | undefined;
27
29
  protected _threads: ThreadsClient | undefined;
28
30
  protected _websockets: WebsocketsClient | undefined;
29
31
  constructor(options?: AgentMailClient.Options);
@@ -34,6 +36,7 @@ export declare class AgentMailClient {
34
36
  get domains(): DomainsClient;
35
37
  get drafts(): DraftsClient;
36
38
  get metrics(): MetricsClient;
39
+ get organizations(): OrganizationsClient;
37
40
  get threads(): ThreadsClient;
38
41
  get websockets(): WebsocketsClient;
39
42
  }
@@ -7,10 +7,11 @@ const Client_js_2 = require("./api/resources/domains/client/Client.js");
7
7
  const Client_js_3 = require("./api/resources/drafts/client/Client.js");
8
8
  const Client_js_4 = require("./api/resources/inboxes/client/Client.js");
9
9
  const Client_js_5 = require("./api/resources/metrics/client/Client.js");
10
- const Client_js_6 = require("./api/resources/pods/client/Client.js");
11
- const Client_js_7 = require("./api/resources/threads/client/Client.js");
12
- const Client_js_8 = require("./api/resources/webhooks/client/Client.js");
13
- const Client_js_9 = require("./api/resources/websockets/client/Client.js");
10
+ const Client_js_6 = require("./api/resources/organizations/client/Client.js");
11
+ const Client_js_7 = require("./api/resources/pods/client/Client.js");
12
+ const Client_js_8 = require("./api/resources/threads/client/Client.js");
13
+ const Client_js_9 = require("./api/resources/webhooks/client/Client.js");
14
+ const Client_js_10 = require("./api/resources/websockets/client/Client.js");
14
15
  const BaseClient_js_1 = require("./BaseClient.js");
15
16
  class AgentMailClient {
16
17
  constructor(options = {}) {
@@ -22,11 +23,11 @@ class AgentMailClient {
22
23
  }
23
24
  get pods() {
24
25
  var _a;
25
- return ((_a = this._pods) !== null && _a !== void 0 ? _a : (this._pods = new Client_js_6.PodsClient(this._options)));
26
+ return ((_a = this._pods) !== null && _a !== void 0 ? _a : (this._pods = new Client_js_7.PodsClient(this._options)));
26
27
  }
27
28
  get webhooks() {
28
29
  var _a;
29
- return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_8.WebhooksClient(this._options)));
30
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_9.WebhooksClient(this._options)));
30
31
  }
31
32
  get apiKeys() {
32
33
  var _a;
@@ -44,13 +45,17 @@ class AgentMailClient {
44
45
  var _a;
45
46
  return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new Client_js_5.MetricsClient(this._options)));
46
47
  }
48
+ get organizations() {
49
+ var _a;
50
+ return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_js_6.OrganizationsClient(this._options)));
51
+ }
47
52
  get threads() {
48
53
  var _a;
49
- return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new Client_js_7.ThreadsClient(this._options)));
54
+ return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new Client_js_8.ThreadsClient(this._options)));
50
55
  }
51
56
  get websockets() {
52
57
  var _a;
53
- return ((_a = this._websockets) !== null && _a !== void 0 ? _a : (this._websockets = new Client_js_9.WebsocketsClient(this._options)));
58
+ return ((_a = this._websockets) !== null && _a !== void 0 ? _a : (this._websockets = new Client_js_10.WebsocketsClient(this._options)));
54
59
  }
55
60
  }
56
61
  exports.AgentMailClient = AgentMailClient;
@@ -1,5 +1,6 @@
1
1
  export declare const RecordStatus: {
2
2
  readonly Missing: "MISSING";
3
- readonly Verified: "VERIFIED";
3
+ readonly Invalid: "INVALID";
4
+ readonly Valid: "VALID";
4
5
  };
5
6
  export type RecordStatus = (typeof RecordStatus)[keyof typeof RecordStatus];
@@ -4,5 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.RecordStatus = void 0;
5
5
  exports.RecordStatus = {
6
6
  Missing: "MISSING",
7
- Verified: "VERIFIED",
7
+ Invalid: "INVALID",
8
+ Valid: "VALID",
8
9
  };
@@ -1,6 +1,9 @@
1
1
  export declare const VerificationStatus: {
2
+ readonly NotStarted: "NOT_STARTED";
2
3
  readonly Pending: "PENDING";
4
+ readonly Invalid: "INVALID";
5
+ readonly Failed: "FAILED";
3
6
  readonly Verifying: "VERIFYING";
4
- readonly Ready: "READY";
7
+ readonly Verified: "VERIFIED";
5
8
  };
6
9
  export type VerificationStatus = (typeof VerificationStatus)[keyof typeof VerificationStatus];
@@ -3,7 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.VerificationStatus = void 0;
5
5
  exports.VerificationStatus = {
6
+ NotStarted: "NOT_STARTED",
6
7
  Pending: "PENDING",
8
+ Invalid: "INVALID",
9
+ Failed: "FAILED",
7
10
  Verifying: "VERIFYING",
8
- Ready: "READY",
11
+ Verified: "VERIFIED",
9
12
  };
@@ -18,6 +18,8 @@ export * from "./messages/types/index.js";
18
18
  export * from "./metrics/client/requests/index.js";
19
19
  export * as metrics from "./metrics/index.js";
20
20
  export * from "./metrics/types/index.js";
21
+ export * as organizations from "./organizations/index.js";
22
+ export * from "./organizations/types/index.js";
21
23
  export * as pods from "./pods/index.js";
22
24
  export * from "./threads/client/requests/index.js";
23
25
  export * as threads from "./threads/index.js";
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.websockets = exports.webhooks = exports.threads = exports.pods = exports.metrics = exports.messages = exports.inboxes = exports.events = exports.drafts = exports.domains = exports.attachments = exports.apiKeys = void 0;
39
+ exports.websockets = exports.webhooks = exports.threads = exports.pods = exports.organizations = exports.metrics = exports.messages = exports.inboxes = exports.events = exports.drafts = exports.domains = exports.attachments = exports.apiKeys = void 0;
40
40
  __exportStar(require("./apiKeys/client/requests/index.js"), exports);
41
41
  exports.apiKeys = __importStar(require("./apiKeys/index.js"));
42
42
  __exportStar(require("./apiKeys/types/index.js"), exports);
@@ -57,6 +57,8 @@ __exportStar(require("./messages/types/index.js"), exports);
57
57
  __exportStar(require("./metrics/client/requests/index.js"), exports);
58
58
  exports.metrics = __importStar(require("./metrics/index.js"));
59
59
  __exportStar(require("./metrics/types/index.js"), exports);
60
+ exports.organizations = __importStar(require("./organizations/index.js"));
61
+ __exportStar(require("./organizations/types/index.js"), exports);
60
62
  exports.pods = __importStar(require("./pods/index.js"));
61
63
  __exportStar(require("./threads/client/requests/index.js"), exports);
62
64
  exports.threads = __importStar(require("./threads/index.js"));
@@ -0,0 +1,24 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import type * as AgentMail from "../../../index.js";
5
+ export declare namespace OrganizationsClient {
6
+ interface Options extends BaseClientOptions {
7
+ }
8
+ interface RequestOptions extends BaseRequestOptions {
9
+ }
10
+ }
11
+ export declare class OrganizationsClient {
12
+ protected readonly _options: NormalizedClientOptionsWithAuth<OrganizationsClient.Options>;
13
+ constructor(options?: OrganizationsClient.Options);
14
+ /**
15
+ * Get the current organization.
16
+ *
17
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @example
20
+ * await client.organizations.get()
21
+ */
22
+ get(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Organization>;
23
+ private __get;
24
+ }
@@ -0,0 +1,121 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.OrganizationsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../environments.js"));
51
+ const errors = __importStar(require("../../../../errors/index.js"));
52
+ const serializers = __importStar(require("../../../../serialization/index.js"));
53
+ class OrganizationsClient {
54
+ constructor(options = {}) {
55
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
56
+ }
57
+ /**
58
+ * Get the current organization.
59
+ *
60
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
61
+ *
62
+ * @example
63
+ * await client.organizations.get()
64
+ */
65
+ get(requestOptions) {
66
+ return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
67
+ }
68
+ __get(requestOptions) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
71
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
72
+ 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);
73
+ const _response = yield core.fetcher({
74
+ 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/organizations"),
75
+ method: "GET",
76
+ headers: _headers,
77
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
78
+ 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,
79
+ 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,
80
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
82
+ logging: this._options.logging,
83
+ });
84
+ if (_response.ok) {
85
+ return {
86
+ data: serializers.Organization.parseOrThrow(_response.body, {
87
+ unrecognizedObjectKeys: "passthrough",
88
+ allowUnrecognizedUnionMembers: true,
89
+ allowUnrecognizedEnumValues: true,
90
+ skipValidation: true,
91
+ breadcrumbsPrefix: ["response"],
92
+ }),
93
+ rawResponse: _response.rawResponse,
94
+ };
95
+ }
96
+ if (_response.error.reason === "status-code") {
97
+ throw new errors.AgentMailError({
98
+ statusCode: _response.error.statusCode,
99
+ body: _response.error.body,
100
+ rawResponse: _response.rawResponse,
101
+ });
102
+ }
103
+ switch (_response.error.reason) {
104
+ case "non-json":
105
+ throw new errors.AgentMailError({
106
+ statusCode: _response.error.statusCode,
107
+ body: _response.error.rawBody,
108
+ rawResponse: _response.rawResponse,
109
+ });
110
+ case "timeout":
111
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/organizations.");
112
+ case "unknown":
113
+ throw new errors.AgentMailError({
114
+ message: _response.error.errorMessage,
115
+ rawResponse: _response.rawResponse,
116
+ });
117
+ }
118
+ });
119
+ }
120
+ }
121
+ exports.OrganizationsClient = OrganizationsClient;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -0,0 +1,18 @@
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("./client/index.js"), exports);
18
+ __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,19 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ /**
3
+ * Organization details with usage limits and counts.
4
+ */
5
+ export interface Organization {
6
+ organizationId: AgentMail.OrganizationId;
7
+ /** Current number of inboxes. */
8
+ inboxCount: number;
9
+ /** Current number of domains. */
10
+ domainCount: number;
11
+ /** Maximum number of inboxes allowed. */
12
+ inboxLimit?: number;
13
+ /** Maximum number of domains allowed. */
14
+ domainLimit?: number;
15
+ /** Time at which organization was last updated. */
16
+ updatedAt: Date;
17
+ /** Time at which organization was created. */
18
+ createdAt: Date;
19
+ }
@@ -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 });
@@ -0,0 +1 @@
1
+ export * from "./Organization.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("./Organization.js"), exports);
@@ -3,5 +3,5 @@ import * as core from "../../../../core/index.js";
3
3
  import type * as serializers from "../../../index.js";
4
4
  export declare const RecordStatus: core.serialization.Schema<serializers.RecordStatus.Raw, AgentMail.RecordStatus>;
5
5
  export declare namespace RecordStatus {
6
- type Raw = "MISSING" | "VERIFIED";
6
+ type Raw = "MISSING" | "INVALID" | "VALID";
7
7
  }
@@ -36,4 +36,4 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.RecordStatus = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
- exports.RecordStatus = core.serialization.enum_(["MISSING", "VERIFIED"]);
39
+ exports.RecordStatus = core.serialization.enum_(["MISSING", "INVALID", "VALID"]);
@@ -3,5 +3,5 @@ import * as core from "../../../../core/index.js";
3
3
  import type * as serializers from "../../../index.js";
4
4
  export declare const VerificationStatus: core.serialization.Schema<serializers.VerificationStatus.Raw, AgentMail.VerificationStatus>;
5
5
  export declare namespace VerificationStatus {
6
- type Raw = "PENDING" | "VERIFYING" | "READY";
6
+ type Raw = "NOT_STARTED" | "PENDING" | "INVALID" | "FAILED" | "VERIFYING" | "VERIFIED";
7
7
  }
@@ -36,4 +36,4 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.VerificationStatus = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
- exports.VerificationStatus = core.serialization.enum_(["PENDING", "VERIFYING", "READY"]);
39
+ exports.VerificationStatus = core.serialization.enum_(["NOT_STARTED", "PENDING", "INVALID", "FAILED", "VERIFYING", "VERIFIED"]);
@@ -13,6 +13,8 @@ export * as messages from "./messages/index.js";
13
13
  export * from "./messages/types/index.js";
14
14
  export * as metrics from "./metrics/index.js";
15
15
  export * from "./metrics/types/index.js";
16
+ export * as organizations from "./organizations/index.js";
17
+ export * from "./organizations/types/index.js";
16
18
  export * as pods from "./pods/index.js";
17
19
  export * as threads from "./threads/index.js";
18
20
  export * from "./threads/types/index.js";
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.websockets = exports.webhooks = exports.threads = exports.pods = exports.metrics = exports.messages = exports.inboxes = exports.events = exports.drafts = exports.domains = exports.attachments = exports.apiKeys = void 0;
39
+ exports.websockets = exports.webhooks = exports.threads = exports.pods = exports.organizations = exports.metrics = exports.messages = exports.inboxes = exports.events = exports.drafts = exports.domains = exports.attachments = exports.apiKeys = void 0;
40
40
  exports.apiKeys = __importStar(require("./apiKeys/index.js"));
41
41
  __exportStar(require("./apiKeys/types/index.js"), exports);
42
42
  exports.attachments = __importStar(require("./attachments/index.js"));
@@ -52,6 +52,8 @@ exports.messages = __importStar(require("./messages/index.js"));
52
52
  __exportStar(require("./messages/types/index.js"), exports);
53
53
  exports.metrics = __importStar(require("./metrics/index.js"));
54
54
  __exportStar(require("./metrics/types/index.js"), exports);
55
+ exports.organizations = __importStar(require("./organizations/index.js"));
56
+ __exportStar(require("./organizations/types/index.js"), exports);
55
57
  exports.pods = __importStar(require("./pods/index.js"));
56
58
  exports.threads = __importStar(require("./threads/index.js"));
57
59
  __exportStar(require("./threads/types/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./types/index.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("./types/index.js"), exports);
@@ -0,0 +1,16 @@
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
+ import { OrganizationId } from "../../../types/OrganizationId.js";
5
+ export declare const Organization: core.serialization.ObjectSchema<serializers.Organization.Raw, AgentMail.Organization>;
6
+ export declare namespace Organization {
7
+ interface Raw {
8
+ organization_id: OrganizationId.Raw;
9
+ inbox_count: number;
10
+ domain_count: number;
11
+ inbox_limit?: number | null;
12
+ domain_limit?: number | null;
13
+ updated_at: string;
14
+ created_at: string;
15
+ }
16
+ }
@@ -0,0 +1,48 @@
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.Organization = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ const OrganizationId_js_1 = require("../../../types/OrganizationId.js");
40
+ exports.Organization = core.serialization.object({
41
+ organizationId: core.serialization.property("organization_id", OrganizationId_js_1.OrganizationId),
42
+ inboxCount: core.serialization.property("inbox_count", core.serialization.number()),
43
+ domainCount: core.serialization.property("domain_count", core.serialization.number()),
44
+ inboxLimit: core.serialization.property("inbox_limit", core.serialization.number().optional()),
45
+ domainLimit: core.serialization.property("domain_limit", core.serialization.number().optional()),
46
+ updatedAt: core.serialization.property("updated_at", core.serialization.date()),
47
+ createdAt: core.serialization.property("created_at", core.serialization.date()),
48
+ });
@@ -0,0 +1 @@
1
+ export * from "./Organization.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("./Organization.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.14";
1
+ export declare const SDK_VERSION = "0.1.16";
@@ -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.14";
4
+ exports.SDK_VERSION = "0.1.16";
@@ -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.1.14",
10
- "User-Agent": "agentmail/0.1.14",
9
+ "X-Fern-SDK-Version": "0.1.16",
10
+ "User-Agent": "agentmail/0.1.16",
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);
@@ -3,6 +3,7 @@ import { DomainsClient } from "./api/resources/domains/client/Client.mjs";
3
3
  import { DraftsClient } from "./api/resources/drafts/client/Client.mjs";
4
4
  import { InboxesClient } from "./api/resources/inboxes/client/Client.mjs";
5
5
  import { MetricsClient } from "./api/resources/metrics/client/Client.mjs";
6
+ import { OrganizationsClient } from "./api/resources/organizations/client/Client.mjs";
6
7
  import { PodsClient } from "./api/resources/pods/client/Client.mjs";
7
8
  import { ThreadsClient } from "./api/resources/threads/client/Client.mjs";
8
9
  import { WebhooksClient } from "./api/resources/webhooks/client/Client.mjs";
@@ -24,6 +25,7 @@ export declare class AgentMailClient {
24
25
  protected _domains: DomainsClient | undefined;
25
26
  protected _drafts: DraftsClient | undefined;
26
27
  protected _metrics: MetricsClient | undefined;
28
+ protected _organizations: OrganizationsClient | undefined;
27
29
  protected _threads: ThreadsClient | undefined;
28
30
  protected _websockets: WebsocketsClient | undefined;
29
31
  constructor(options?: AgentMailClient.Options);
@@ -34,6 +36,7 @@ export declare class AgentMailClient {
34
36
  get domains(): DomainsClient;
35
37
  get drafts(): DraftsClient;
36
38
  get metrics(): MetricsClient;
39
+ get organizations(): OrganizationsClient;
37
40
  get threads(): ThreadsClient;
38
41
  get websockets(): WebsocketsClient;
39
42
  }
@@ -4,6 +4,7 @@ import { DomainsClient } from "./api/resources/domains/client/Client.mjs";
4
4
  import { DraftsClient } from "./api/resources/drafts/client/Client.mjs";
5
5
  import { InboxesClient } from "./api/resources/inboxes/client/Client.mjs";
6
6
  import { MetricsClient } from "./api/resources/metrics/client/Client.mjs";
7
+ import { OrganizationsClient } from "./api/resources/organizations/client/Client.mjs";
7
8
  import { PodsClient } from "./api/resources/pods/client/Client.mjs";
8
9
  import { ThreadsClient } from "./api/resources/threads/client/Client.mjs";
9
10
  import { WebhooksClient } from "./api/resources/webhooks/client/Client.mjs";
@@ -41,6 +42,10 @@ export class AgentMailClient {
41
42
  var _a;
42
43
  return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new MetricsClient(this._options)));
43
44
  }
45
+ get organizations() {
46
+ var _a;
47
+ return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new OrganizationsClient(this._options)));
48
+ }
44
49
  get threads() {
45
50
  var _a;
46
51
  return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new ThreadsClient(this._options)));