agentmail 0.5.26 → 0.5.27

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 (28) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +4 -3
  3. package/dist/cjs/api/resources/inboxes/client/Client.js +4 -3
  4. package/dist/cjs/api/resources/inboxes/types/AuthorizeInboxResponse.d.ts +11 -0
  5. package/dist/cjs/api/resources/inboxes/types/AuthorizeInboxResponse.js +3 -0
  6. package/dist/cjs/api/resources/inboxes/types/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/inboxes/types/index.js +1 -0
  8. package/dist/cjs/serialization/resources/inboxes/types/AuthorizeInboxResponse.d.ts +11 -0
  9. package/dist/cjs/serialization/resources/inboxes/types/AuthorizeInboxResponse.js +43 -0
  10. package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +1 -0
  11. package/dist/cjs/serialization/resources/inboxes/types/index.js +1 -0
  12. package/dist/cjs/version.d.ts +1 -1
  13. package/dist/cjs/version.js +1 -1
  14. package/dist/esm/BaseClient.mjs +2 -2
  15. package/dist/esm/api/resources/inboxes/client/Client.d.mts +4 -3
  16. package/dist/esm/api/resources/inboxes/client/Client.mjs +4 -3
  17. package/dist/esm/api/resources/inboxes/types/AuthorizeInboxResponse.d.mts +11 -0
  18. package/dist/esm/api/resources/inboxes/types/AuthorizeInboxResponse.mjs +2 -0
  19. package/dist/esm/api/resources/inboxes/types/index.d.mts +1 -0
  20. package/dist/esm/api/resources/inboxes/types/index.mjs +1 -0
  21. package/dist/esm/serialization/resources/inboxes/types/AuthorizeInboxResponse.d.mts +11 -0
  22. package/dist/esm/serialization/resources/inboxes/types/AuthorizeInboxResponse.mjs +7 -0
  23. package/dist/esm/serialization/resources/inboxes/types/index.d.mts +1 -0
  24. package/dist/esm/serialization/resources/inboxes/types/index.mjs +1 -0
  25. package/dist/esm/version.d.mts +1 -1
  26. package/dist/esm/version.mjs +1 -1
  27. package/package.json +1 -1
  28. package/reference.md +4 -3
@@ -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.26",
47
- "User-Agent": "agentmail/0.5.26",
46
+ "X-Fern-SDK-Version": "0.5.27",
47
+ "User-Agent": "agentmail/0.5.27",
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);
@@ -137,8 +137,9 @@ export declare class InboxesClient {
137
137
  private __delete;
138
138
  /**
139
139
  * Authorizes the AgentID sign-in a client is already waiting in, for the
140
- * inbox in the path, and returns the pending public key it will activate. A
141
- * repeat for the same token, inbox, and bearer returns the same key.
140
+ * inbox in the path, and returns the ID of the pending public key it will
141
+ * activate. Read the key with Get API Key. A repeat for the same token,
142
+ * inbox, and bearer returns the same key ID.
142
143
  *
143
144
  * @param {AgentMail.inboxes.InboxId} inbox_id
144
145
  * @param {AgentMail.inboxes.AuthorizeInboxRequest} request
@@ -152,6 +153,6 @@ export declare class InboxesClient {
152
153
  * authToken: "blackcurrant.........."
153
154
  * })
154
155
  */
155
- authorize(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.AuthorizeInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.PublicKeyCredential>;
156
+ authorize(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.AuthorizeInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.AuthorizeInboxResponse>;
156
157
  private __authorize;
157
158
  }
@@ -525,8 +525,9 @@ class InboxesClient {
525
525
  }
526
526
  /**
527
527
  * Authorizes the AgentID sign-in a client is already waiting in, for the
528
- * inbox in the path, and returns the pending public key it will activate. A
529
- * repeat for the same token, inbox, and bearer returns the same key.
528
+ * inbox in the path, and returns the ID of the pending public key it will
529
+ * activate. Read the key with Get API Key. A repeat for the same token,
530
+ * inbox, and bearer returns the same key ID.
530
531
  *
531
532
  * @param {AgentMail.inboxes.InboxId} inbox_id
532
533
  * @param {AgentMail.inboxes.AuthorizeInboxRequest} request
@@ -568,7 +569,7 @@ class InboxesClient {
568
569
  });
569
570
  if (_response.ok) {
570
571
  return {
571
- data: serializers.PublicKeyCredential.parseOrThrow(_response.body, {
572
+ data: serializers.inboxes.AuthorizeInboxResponse.parseOrThrow(_response.body, {
572
573
  unrecognizedObjectKeys: "passthrough",
573
574
  allowUnrecognizedUnionMembers: true,
574
575
  allowUnrecognizedEnumValues: true,
@@ -0,0 +1,11 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ /**
3
+ * The authorized sign-in's key ID plus the agent's next step. The key itself
4
+ * is read with Get API Key.
5
+ */
6
+ export interface AuthorizeInboxResponse {
7
+ /** ID of the public key the client will activate. */
8
+ apiKeyId: AgentMail.ApiKeyId;
9
+ /** The agent's next step. Nothing further is required from the agent. */
10
+ instructions: "Authorization complete. Return to browser.";
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,4 +1,5 @@
1
1
  export * from "./AuthorizeInboxRequest.js";
2
+ export * from "./AuthorizeInboxResponse.js";
2
3
  export * from "./ClientId.js";
3
4
  export * from "./CreateInboxRequest.js";
4
5
  export * from "./DisplayName.js";
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./AuthorizeInboxRequest.js"), exports);
18
+ __exportStar(require("./AuthorizeInboxResponse.js"), exports);
18
19
  __exportStar(require("./ClientId.js"), exports);
19
20
  __exportStar(require("./CreateInboxRequest.js"), exports);
20
21
  __exportStar(require("./DisplayName.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
+ import { ApiKeyId } from "../../apiKeys/types/ApiKeyId.js";
5
+ export declare const AuthorizeInboxResponse: core.serialization.ObjectSchema<serializers.inboxes.AuthorizeInboxResponse.Raw, AgentMail.inboxes.AuthorizeInboxResponse>;
6
+ export declare namespace AuthorizeInboxResponse {
7
+ interface Raw {
8
+ api_key_id: ApiKeyId.Raw;
9
+ instructions: "Authorization complete. Return to browser.";
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.AuthorizeInboxResponse = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ const ApiKeyId_js_1 = require("../../apiKeys/types/ApiKeyId.js");
40
+ exports.AuthorizeInboxResponse = core.serialization.object({
41
+ apiKeyId: core.serialization.property("api_key_id", ApiKeyId_js_1.ApiKeyId),
42
+ instructions: core.serialization.stringLiteral("Authorization complete. Return to browser."),
43
+ });
@@ -1,4 +1,5 @@
1
1
  export * from "./AuthorizeInboxRequest.js";
2
+ export * from "./AuthorizeInboxResponse.js";
2
3
  export * from "./ClientId.js";
3
4
  export * from "./CreateInboxRequest.js";
4
5
  export * from "./DisplayName.js";
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./AuthorizeInboxRequest.js"), exports);
18
+ __exportStar(require("./AuthorizeInboxResponse.js"), exports);
18
19
  __exportStar(require("./ClientId.js"), exports);
19
20
  __exportStar(require("./CreateInboxRequest.js"), exports);
20
21
  __exportStar(require("./DisplayName.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.5.26";
1
+ export declare const SDK_VERSION = "0.5.27";
@@ -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.26";
4
+ exports.SDK_VERSION = "0.5.27";
@@ -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.26",
10
- "User-Agent": "agentmail/0.5.26",
9
+ "X-Fern-SDK-Version": "0.5.27",
10
+ "User-Agent": "agentmail/0.5.27",
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);
@@ -137,8 +137,9 @@ export declare class InboxesClient {
137
137
  private __delete;
138
138
  /**
139
139
  * Authorizes the AgentID sign-in a client is already waiting in, for the
140
- * inbox in the path, and returns the pending public key it will activate. A
141
- * repeat for the same token, inbox, and bearer returns the same key.
140
+ * inbox in the path, and returns the ID of the pending public key it will
141
+ * activate. Read the key with Get API Key. A repeat for the same token,
142
+ * inbox, and bearer returns the same key ID.
142
143
  *
143
144
  * @param {AgentMail.inboxes.InboxId} inbox_id
144
145
  * @param {AgentMail.inboxes.AuthorizeInboxRequest} request
@@ -152,6 +153,6 @@ export declare class InboxesClient {
152
153
  * authToken: "blackcurrant.........."
153
154
  * })
154
155
  */
155
- authorize(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.AuthorizeInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.PublicKeyCredential>;
156
+ authorize(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.AuthorizeInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.AuthorizeInboxResponse>;
156
157
  private __authorize;
157
158
  }
@@ -489,8 +489,9 @@ export class InboxesClient {
489
489
  }
490
490
  /**
491
491
  * Authorizes the AgentID sign-in a client is already waiting in, for the
492
- * inbox in the path, and returns the pending public key it will activate. A
493
- * repeat for the same token, inbox, and bearer returns the same key.
492
+ * inbox in the path, and returns the ID of the pending public key it will
493
+ * activate. Read the key with Get API Key. A repeat for the same token,
494
+ * inbox, and bearer returns the same key ID.
494
495
  *
495
496
  * @param {AgentMail.inboxes.InboxId} inbox_id
496
497
  * @param {AgentMail.inboxes.AuthorizeInboxRequest} request
@@ -532,7 +533,7 @@ export class InboxesClient {
532
533
  });
533
534
  if (_response.ok) {
534
535
  return {
535
- data: serializers.PublicKeyCredential.parseOrThrow(_response.body, {
536
+ data: serializers.inboxes.AuthorizeInboxResponse.parseOrThrow(_response.body, {
536
537
  unrecognizedObjectKeys: "passthrough",
537
538
  allowUnrecognizedUnionMembers: true,
538
539
  allowUnrecognizedEnumValues: true,
@@ -0,0 +1,11 @@
1
+ import type * as AgentMail from "../../../index.mjs";
2
+ /**
3
+ * The authorized sign-in's key ID plus the agent's next step. The key itself
4
+ * is read with Get API Key.
5
+ */
6
+ export interface AuthorizeInboxResponse {
7
+ /** ID of the public key the client will activate. */
8
+ apiKeyId: AgentMail.ApiKeyId;
9
+ /** The agent's next step. Nothing further is required from the agent. */
10
+ instructions: "Authorization complete. Return to browser.";
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,4 +1,5 @@
1
1
  export * from "./AuthorizeInboxRequest.mjs";
2
+ export * from "./AuthorizeInboxResponse.mjs";
2
3
  export * from "./ClientId.mjs";
3
4
  export * from "./CreateInboxRequest.mjs";
4
5
  export * from "./DisplayName.mjs";
@@ -1,4 +1,5 @@
1
1
  export * from "./AuthorizeInboxRequest.mjs";
2
+ export * from "./AuthorizeInboxResponse.mjs";
2
3
  export * from "./ClientId.mjs";
3
4
  export * from "./CreateInboxRequest.mjs";
4
5
  export * from "./DisplayName.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
+ import { ApiKeyId } from "../../apiKeys/types/ApiKeyId.mjs";
5
+ export declare const AuthorizeInboxResponse: core.serialization.ObjectSchema<serializers.inboxes.AuthorizeInboxResponse.Raw, AgentMail.inboxes.AuthorizeInboxResponse>;
6
+ export declare namespace AuthorizeInboxResponse {
7
+ interface Raw {
8
+ api_key_id: ApiKeyId.Raw;
9
+ instructions: "Authorization complete. Return to browser.";
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
+ import { ApiKeyId } from "../../apiKeys/types/ApiKeyId.mjs";
4
+ export const AuthorizeInboxResponse = core.serialization.object({
5
+ apiKeyId: core.serialization.property("api_key_id", ApiKeyId),
6
+ instructions: core.serialization.stringLiteral("Authorization complete. Return to browser."),
7
+ });
@@ -1,4 +1,5 @@
1
1
  export * from "./AuthorizeInboxRequest.mjs";
2
+ export * from "./AuthorizeInboxResponse.mjs";
2
3
  export * from "./ClientId.mjs";
3
4
  export * from "./CreateInboxRequest.mjs";
4
5
  export * from "./DisplayName.mjs";
@@ -1,4 +1,5 @@
1
1
  export * from "./AuthorizeInboxRequest.mjs";
2
+ export * from "./AuthorizeInboxResponse.mjs";
2
3
  export * from "./ClientId.mjs";
3
4
  export * from "./CreateInboxRequest.mjs";
4
5
  export * from "./DisplayName.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.5.26";
1
+ export declare const SDK_VERSION = "0.5.27";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.5.26";
1
+ export const SDK_VERSION = "0.5.27";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmail",
3
- "version": "0.5.26",
3
+ "version": "0.5.27",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -408,7 +408,7 @@ await client.inboxes.delete("inbox_id");
408
408
  </dl>
409
409
  </details>
410
410
 
411
- <details><summary><code>client.inboxes.<a href="/src/api/resources/inboxes/client/Client.ts">authorize</a>(inbox_id, { ...params }) -> AgentMail.PublicKeyCredential</code></summary>
411
+ <details><summary><code>client.inboxes.<a href="/src/api/resources/inboxes/client/Client.ts">authorize</a>(inbox_id, { ...params }) -> AgentMail.AuthorizeInboxResponse</code></summary>
412
412
  <dl>
413
413
  <dd>
414
414
 
@@ -421,8 +421,9 @@ await client.inboxes.delete("inbox_id");
421
421
  <dd>
422
422
 
423
423
  Authorizes the AgentID sign-in a client is already waiting in, for the
424
- inbox in the path, and returns the pending public key it will activate. A
425
- repeat for the same token, inbox, and bearer returns the same key.
424
+ inbox in the path, and returns the ID of the pending public key it will
425
+ activate. Read the key with Get API Key. A repeat for the same token,
426
+ inbox, and bearer returns the same key ID.
426
427
  </dd>
427
428
  </dl>
428
429
  </dd>