agentmail 0.5.15 → 0.5.17

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 (157) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +94 -0
  3. package/dist/cjs/api/resources/apiKeys/client/Client.js +372 -0
  4. package/dist/cjs/api/resources/apiKeys/client/requests/ListPublicKeysRequest.d.ts +10 -0
  5. package/dist/cjs/api/resources/apiKeys/client/requests/RevokeAllAgentIdSignInKeysRequest.d.ts +10 -0
  6. package/dist/cjs/api/resources/apiKeys/client/requests/index.d.ts +2 -0
  7. package/dist/cjs/api/resources/apiKeys/types/ApiKeyPermissions.d.ts +2 -0
  8. package/dist/cjs/api/resources/apiKeys/types/CreatePublicKeyRequest.d.ts +21 -0
  9. package/dist/cjs/api/resources/apiKeys/types/InboxPublicKeyScope.d.ts +7 -0
  10. package/dist/cjs/api/resources/apiKeys/types/InboxPublicKeyScope.js +3 -0
  11. package/dist/cjs/api/resources/apiKeys/types/ListPublicKeysResponse.d.ts +7 -0
  12. package/dist/cjs/api/resources/apiKeys/types/ListPublicKeysResponse.js +3 -0
  13. package/dist/cjs/api/resources/apiKeys/types/OrganizationPublicKeyScope.d.ts +4 -0
  14. package/dist/cjs/api/resources/apiKeys/types/OrganizationPublicKeyScope.js +3 -0
  15. package/dist/cjs/api/resources/apiKeys/types/PodPublicKeyScope.d.ts +7 -0
  16. package/dist/cjs/api/resources/apiKeys/types/PodPublicKeyScope.js +3 -0
  17. package/dist/cjs/api/resources/apiKeys/types/PublicJwk.d.ts +13 -0
  18. package/dist/cjs/api/resources/apiKeys/types/PublicJwk.js +3 -0
  19. package/dist/cjs/api/resources/apiKeys/types/PublicJwkCoordinate.d.ts +4 -0
  20. package/dist/cjs/api/resources/apiKeys/types/PublicJwkCoordinate.js +3 -0
  21. package/dist/cjs/api/resources/apiKeys/types/PublicKeyCredential.d.ts +22 -0
  22. package/dist/cjs/api/resources/apiKeys/types/PublicKeyCredential.js +3 -0
  23. package/dist/cjs/api/resources/apiKeys/types/PublicKeyMaterial.d.ts +9 -0
  24. package/dist/cjs/api/resources/apiKeys/types/PublicKeyMaterial.js +3 -0
  25. package/dist/cjs/api/resources/apiKeys/types/PublicKeyScope.d.ts +16 -0
  26. package/dist/cjs/api/resources/apiKeys/types/PublicKeyScope.js +3 -0
  27. package/dist/cjs/api/resources/apiKeys/types/RevokeAllAgentIdSignInKeysResponse.d.ts +8 -0
  28. package/dist/cjs/api/resources/apiKeys/types/RevokeAllAgentIdSignInKeysResponse.js +3 -0
  29. package/dist/cjs/api/resources/apiKeys/types/UpdatePublicKeyNameRequest.d.ts +7 -0
  30. package/dist/cjs/api/resources/apiKeys/types/UpdatePublicKeyNameRequest.js +3 -0
  31. package/dist/cjs/api/resources/apiKeys/types/index.d.ts +12 -0
  32. package/dist/cjs/api/resources/apiKeys/types/index.js +12 -0
  33. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +2 -3
  34. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +6 -11
  35. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/index.d.ts +0 -1
  36. package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +2 -3
  37. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +6 -11
  38. package/dist/cjs/api/resources/pods/resources/threads/client/requests/index.d.ts +0 -1
  39. package/dist/cjs/api/resources/threads/client/Client.d.ts +2 -3
  40. package/dist/cjs/api/resources/threads/client/Client.js +6 -11
  41. package/dist/cjs/api/resources/threads/client/requests/index.d.ts +0 -1
  42. package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyPermissions.d.ts +1 -0
  43. package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyPermissions.js +1 -0
  44. package/dist/cjs/serialization/resources/apiKeys/types/CreatePublicKeyRequest.d.ts +14 -0
  45. package/dist/cjs/serialization/resources/apiKeys/types/CreatePublicKeyRequest.js +46 -0
  46. package/dist/cjs/serialization/resources/apiKeys/types/InboxPublicKeyScope.d.ts +9 -0
  47. package/dist/cjs/serialization/resources/apiKeys/types/InboxPublicKeyScope.js +41 -0
  48. package/dist/cjs/serialization/resources/apiKeys/types/ListPublicKeysResponse.d.ts +14 -0
  49. package/dist/cjs/serialization/resources/apiKeys/types/ListPublicKeysResponse.js +46 -0
  50. package/dist/cjs/serialization/resources/apiKeys/types/OrganizationPublicKeyScope.d.ts +7 -0
  51. package/dist/cjs/serialization/resources/apiKeys/types/OrganizationPublicKeyScope.js +39 -0
  52. package/dist/cjs/serialization/resources/apiKeys/types/PodPublicKeyScope.d.ts +9 -0
  53. package/dist/cjs/serialization/resources/apiKeys/types/PodPublicKeyScope.js +41 -0
  54. package/dist/cjs/serialization/resources/apiKeys/types/PublicJwk.d.ts +13 -0
  55. package/dist/cjs/serialization/resources/apiKeys/types/PublicJwk.js +45 -0
  56. package/dist/cjs/serialization/resources/apiKeys/types/PublicJwkCoordinate.d.ts +7 -0
  57. package/dist/cjs/serialization/resources/apiKeys/types/PublicJwkCoordinate.js +39 -0
  58. package/dist/cjs/serialization/resources/apiKeys/types/PublicKeyCredential.d.ts +20 -0
  59. package/dist/cjs/serialization/resources/apiKeys/types/PublicKeyCredential.js +52 -0
  60. package/dist/cjs/serialization/resources/apiKeys/types/PublicKeyMaterial.d.ts +11 -0
  61. package/dist/cjs/serialization/resources/apiKeys/types/PublicKeyMaterial.js +43 -0
  62. package/dist/cjs/serialization/resources/apiKeys/types/PublicKeyScope.d.ts +19 -0
  63. package/dist/cjs/serialization/resources/apiKeys/types/PublicKeyScope.js +51 -0
  64. package/dist/cjs/serialization/resources/apiKeys/types/RevokeAllAgentIdSignInKeysResponse.d.ts +11 -0
  65. package/dist/cjs/serialization/resources/apiKeys/types/RevokeAllAgentIdSignInKeysResponse.js +43 -0
  66. package/dist/cjs/serialization/resources/apiKeys/types/UpdatePublicKeyNameRequest.d.ts +9 -0
  67. package/dist/cjs/serialization/resources/apiKeys/types/UpdatePublicKeyNameRequest.js +41 -0
  68. package/dist/cjs/serialization/resources/apiKeys/types/index.d.ts +12 -0
  69. package/dist/cjs/serialization/resources/apiKeys/types/index.js +12 -0
  70. package/dist/cjs/version.d.ts +1 -1
  71. package/dist/cjs/version.js +1 -1
  72. package/dist/esm/BaseClient.mjs +2 -2
  73. package/dist/esm/api/resources/apiKeys/client/Client.d.mts +94 -0
  74. package/dist/esm/api/resources/apiKeys/client/Client.mjs +373 -1
  75. package/dist/esm/api/resources/apiKeys/client/requests/ListPublicKeysRequest.d.mts +10 -0
  76. package/dist/esm/api/resources/apiKeys/client/requests/RevokeAllAgentIdSignInKeysRequest.d.mts +10 -0
  77. package/dist/esm/api/resources/apiKeys/client/requests/index.d.mts +2 -0
  78. package/dist/esm/api/resources/apiKeys/types/ApiKeyPermissions.d.mts +2 -0
  79. package/dist/esm/api/resources/apiKeys/types/CreatePublicKeyRequest.d.mts +21 -0
  80. package/dist/esm/api/resources/apiKeys/types/InboxPublicKeyScope.d.mts +7 -0
  81. package/dist/esm/api/resources/apiKeys/types/InboxPublicKeyScope.mjs +2 -0
  82. package/dist/esm/api/resources/apiKeys/types/ListPublicKeysResponse.d.mts +7 -0
  83. package/dist/esm/api/resources/apiKeys/types/ListPublicKeysResponse.mjs +2 -0
  84. package/dist/esm/api/resources/apiKeys/types/OrganizationPublicKeyScope.d.mts +4 -0
  85. package/dist/esm/api/resources/apiKeys/types/OrganizationPublicKeyScope.mjs +2 -0
  86. package/dist/esm/api/resources/apiKeys/types/PodPublicKeyScope.d.mts +7 -0
  87. package/dist/esm/api/resources/apiKeys/types/PodPublicKeyScope.mjs +2 -0
  88. package/dist/esm/api/resources/apiKeys/types/PublicJwk.d.mts +13 -0
  89. package/dist/esm/api/resources/apiKeys/types/PublicJwk.mjs +2 -0
  90. package/dist/esm/api/resources/apiKeys/types/PublicJwkCoordinate.d.mts +4 -0
  91. package/dist/esm/api/resources/apiKeys/types/PublicJwkCoordinate.mjs +2 -0
  92. package/dist/esm/api/resources/apiKeys/types/PublicKeyCredential.d.mts +22 -0
  93. package/dist/esm/api/resources/apiKeys/types/PublicKeyCredential.mjs +2 -0
  94. package/dist/esm/api/resources/apiKeys/types/PublicKeyMaterial.d.mts +9 -0
  95. package/dist/esm/api/resources/apiKeys/types/PublicKeyMaterial.mjs +2 -0
  96. package/dist/esm/api/resources/apiKeys/types/PublicKeyScope.d.mts +16 -0
  97. package/dist/esm/api/resources/apiKeys/types/PublicKeyScope.mjs +2 -0
  98. package/dist/esm/api/resources/apiKeys/types/RevokeAllAgentIdSignInKeysResponse.d.mts +8 -0
  99. package/dist/esm/api/resources/apiKeys/types/RevokeAllAgentIdSignInKeysResponse.mjs +2 -0
  100. package/dist/esm/api/resources/apiKeys/types/UpdatePublicKeyNameRequest.d.mts +7 -0
  101. package/dist/esm/api/resources/apiKeys/types/UpdatePublicKeyNameRequest.mjs +2 -0
  102. package/dist/esm/api/resources/apiKeys/types/index.d.mts +12 -0
  103. package/dist/esm/api/resources/apiKeys/types/index.mjs +12 -0
  104. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +2 -3
  105. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +6 -11
  106. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/index.d.mts +0 -1
  107. package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +2 -3
  108. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +6 -11
  109. package/dist/esm/api/resources/pods/resources/threads/client/requests/index.d.mts +0 -1
  110. package/dist/esm/api/resources/threads/client/Client.d.mts +2 -3
  111. package/dist/esm/api/resources/threads/client/Client.mjs +6 -11
  112. package/dist/esm/api/resources/threads/client/requests/index.d.mts +0 -1
  113. package/dist/esm/serialization/resources/apiKeys/types/ApiKeyPermissions.d.mts +1 -0
  114. package/dist/esm/serialization/resources/apiKeys/types/ApiKeyPermissions.mjs +1 -0
  115. package/dist/esm/serialization/resources/apiKeys/types/CreatePublicKeyRequest.d.mts +14 -0
  116. package/dist/esm/serialization/resources/apiKeys/types/CreatePublicKeyRequest.mjs +10 -0
  117. package/dist/esm/serialization/resources/apiKeys/types/InboxPublicKeyScope.d.mts +9 -0
  118. package/dist/esm/serialization/resources/apiKeys/types/InboxPublicKeyScope.mjs +5 -0
  119. package/dist/esm/serialization/resources/apiKeys/types/ListPublicKeysResponse.d.mts +14 -0
  120. package/dist/esm/serialization/resources/apiKeys/types/ListPublicKeysResponse.mjs +10 -0
  121. package/dist/esm/serialization/resources/apiKeys/types/OrganizationPublicKeyScope.d.mts +7 -0
  122. package/dist/esm/serialization/resources/apiKeys/types/OrganizationPublicKeyScope.mjs +3 -0
  123. package/dist/esm/serialization/resources/apiKeys/types/PodPublicKeyScope.d.mts +9 -0
  124. package/dist/esm/serialization/resources/apiKeys/types/PodPublicKeyScope.mjs +5 -0
  125. package/dist/esm/serialization/resources/apiKeys/types/PublicJwk.d.mts +13 -0
  126. package/dist/esm/serialization/resources/apiKeys/types/PublicJwk.mjs +9 -0
  127. package/dist/esm/serialization/resources/apiKeys/types/PublicJwkCoordinate.d.mts +7 -0
  128. package/dist/esm/serialization/resources/apiKeys/types/PublicJwkCoordinate.mjs +3 -0
  129. package/dist/esm/serialization/resources/apiKeys/types/PublicKeyCredential.d.mts +20 -0
  130. package/dist/esm/serialization/resources/apiKeys/types/PublicKeyCredential.mjs +16 -0
  131. package/dist/esm/serialization/resources/apiKeys/types/PublicKeyMaterial.d.mts +11 -0
  132. package/dist/esm/serialization/resources/apiKeys/types/PublicKeyMaterial.mjs +7 -0
  133. package/dist/esm/serialization/resources/apiKeys/types/PublicKeyScope.d.mts +19 -0
  134. package/dist/esm/serialization/resources/apiKeys/types/PublicKeyScope.mjs +15 -0
  135. package/dist/esm/serialization/resources/apiKeys/types/RevokeAllAgentIdSignInKeysResponse.d.mts +11 -0
  136. package/dist/esm/serialization/resources/apiKeys/types/RevokeAllAgentIdSignInKeysResponse.mjs +7 -0
  137. package/dist/esm/serialization/resources/apiKeys/types/UpdatePublicKeyNameRequest.d.mts +9 -0
  138. package/dist/esm/serialization/resources/apiKeys/types/UpdatePublicKeyNameRequest.mjs +5 -0
  139. package/dist/esm/serialization/resources/apiKeys/types/index.d.mts +12 -0
  140. package/dist/esm/serialization/resources/apiKeys/types/index.mjs +12 -0
  141. package/dist/esm/version.d.mts +1 -1
  142. package/dist/esm/version.mjs +1 -1
  143. package/dist/llms.txt +2 -4
  144. package/package.json +1 -1
  145. package/reference.md +356 -30
  146. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/DeleteThreadRequest.d.ts +0 -8
  147. package/dist/cjs/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.d.ts +0 -8
  148. package/dist/cjs/api/resources/threads/client/requests/DeleteThreadRequest.d.ts +0 -8
  149. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/DeleteThreadRequest.d.mts +0 -8
  150. package/dist/esm/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.d.mts +0 -8
  151. package/dist/esm/api/resources/threads/client/requests/DeleteThreadRequest.d.mts +0 -8
  152. /package/dist/cjs/api/resources/{inboxes/resources/threads/client/requests/DeleteThreadRequest.js → apiKeys/client/requests/ListPublicKeysRequest.js} +0 -0
  153. /package/dist/cjs/api/resources/{pods/resources/threads/client/requests/DeleteThreadRequest.js → apiKeys/client/requests/RevokeAllAgentIdSignInKeysRequest.js} +0 -0
  154. /package/dist/cjs/api/resources/{threads/client/requests/DeleteThreadRequest.js → apiKeys/types/CreatePublicKeyRequest.js} +0 -0
  155. /package/dist/esm/api/resources/{inboxes/resources/threads/client/requests/DeleteThreadRequest.mjs → apiKeys/client/requests/ListPublicKeysRequest.mjs} +0 -0
  156. /package/dist/esm/api/resources/{pods/resources/threads/client/requests/DeleteThreadRequest.mjs → apiKeys/client/requests/RevokeAllAgentIdSignInKeysRequest.mjs} +0 -0
  157. /package/dist/esm/api/resources/{threads/client/requests/DeleteThreadRequest.mjs → apiKeys/types/CreatePublicKeyRequest.mjs} +0 -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.15",
47
- "User-Agent": "agentmail/0.5.15",
46
+ "X-Fern-SDK-Version": "0.5.17",
47
+ "User-Agent": "agentmail/0.5.17",
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);
@@ -56,4 +56,98 @@ export declare class ApiKeysClient {
56
56
  */
57
57
  delete(api_key_id: AgentMail.ApiKeyId, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<void>;
58
58
  private __delete;
59
+ /**
60
+ * List only public-key credentials visible to the bearer caller's scope.
61
+ * Bearer credentials are never returned, even though both credential types
62
+ * share storage and pagination indexes. Requires `api_key_read`.
63
+ *
64
+ * @param {AgentMail.ListPublicKeysRequest} request
65
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @example
68
+ * await client.apiKeys.listPublicKeys()
69
+ */
70
+ listPublicKeys(request?: AgentMail.ListPublicKeysRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListPublicKeysResponse>;
71
+ private __listPublicKeys;
72
+ /**
73
+ * Register a public P-256 JWK using an existing AgentMail bearer API key
74
+ * with `api_key_create`. Re-registering the same JWK creates a new
75
+ * credential ID; it does not replace or recover an earlier credential.
76
+ * The private key must never be sent to AgentMail.
77
+ *
78
+ * @param {AgentMail.CreatePublicKeyRequest} request
79
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
80
+ *
81
+ * @throws {@link AgentMail.ValidationError}
82
+ * @throws {@link AgentMail.ConflictError}
83
+ *
84
+ * @example
85
+ * await client.apiKeys.createPublicKey({
86
+ * publicKey: {
87
+ * kty: "EC",
88
+ * crv: "P-256",
89
+ * x: "blackcurrant...............................",
90
+ * y: "blackcurrant..............................."
91
+ * }
92
+ * })
93
+ */
94
+ createPublicKey(request: AgentMail.CreatePublicKeyRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<AgentMail.PublicKeyCredential>;
95
+ private __createPublicKey;
96
+ /**
97
+ * Rename the credential. All security-relevant fields are immutable.
98
+ * Requires `api_key_update`.
99
+ *
100
+ * @param {string} api_key_id - Public-key credential ID returned by registration.
101
+ * @param {AgentMail.UpdatePublicKeyNameRequest} request
102
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
103
+ *
104
+ * @throws {@link AgentMail.ValidationError}
105
+ * @throws {@link AgentMail.NotFoundError}
106
+ *
107
+ * @example
108
+ * await client.apiKeys.updatePublicKeyName("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", {
109
+ * name: "x"
110
+ * })
111
+ */
112
+ updatePublicKeyName(api_key_id: string, request: AgentMail.UpdatePublicKeyNameRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<AgentMail.PublicKeyCredential>;
113
+ private __updatePublicKeyName;
114
+ /**
115
+ * Permanently revoke one public-key credential. This hard-deletes the
116
+ * credential; repeating the request returns not found. Requires
117
+ * `api_key_delete`.
118
+ *
119
+ * @param {string} api_key_id - Public-key credential ID returned by registration.
120
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
121
+ *
122
+ * @throws {@link AgentMail.NotFoundError}
123
+ *
124
+ * @example
125
+ * await client.apiKeys.revokePublicKey("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
126
+ */
127
+ revokePublicKey(api_key_id: string, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<void>;
128
+ private __revokePublicKey;
129
+ /**
130
+ * Invalidate every current public-key credential in the caller's
131
+ * organization by advancing its AgentID key generation. The caller must be
132
+ * organization-scoped and either have `api_key_delete` or, for a verified
133
+ * self-serve agent organization, use an unrestricted unmanaged bearer
134
+ * credential. No request body is accepted.
135
+ *
136
+ * `Idempotency-Key` is required and must be a UUID. Reusing the same UUID
137
+ * returns the original permanent receipt without advancing the generation
138
+ * again. A new UUID performs a new generation advance.
139
+ *
140
+ * @param {AgentMail.RevokeAllAgentIdSignInKeysRequest} request
141
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
142
+ *
143
+ * @throws {@link AgentMail.ValidationError}
144
+ * @throws {@link AgentMail.ConflictError}
145
+ *
146
+ * @example
147
+ * await client.apiKeys.revokeAllAgentIdSignInKeys({
148
+ * idempotencyKey: "Idempotency-Key"
149
+ * })
150
+ */
151
+ revokeAllAgentIdSignInKeys(request: AgentMail.RevokeAllAgentIdSignInKeysRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<AgentMail.RevokeAllAgentIdSignInKeysResponse>;
152
+ private __revokeAllAgentIdSignInKeys;
59
153
  }
@@ -247,5 +247,377 @@ class ApiKeysClient {
247
247
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v0/api-keys/{api_key_id}");
248
248
  });
249
249
  }
250
+ /**
251
+ * List only public-key credentials visible to the bearer caller's scope.
252
+ * Bearer credentials are never returned, even though both credential types
253
+ * share storage and pagination indexes. Requires `api_key_read`.
254
+ *
255
+ * @param {AgentMail.ListPublicKeysRequest} request
256
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
257
+ *
258
+ * @example
259
+ * await client.apiKeys.listPublicKeys()
260
+ */
261
+ listPublicKeys(request = {}, requestOptions) {
262
+ return core.HttpResponsePromise.fromPromise(this.__listPublicKeys(request, requestOptions));
263
+ }
264
+ __listPublicKeys() {
265
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
266
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
267
+ const { limit, pageToken, ascending } = request;
268
+ const _queryParams = {
269
+ limit,
270
+ page_token: pageToken,
271
+ ascending,
272
+ };
273
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
274
+ 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);
275
+ const _response = yield core.fetcher({
276
+ 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)
277
+ .http, "/v0/api-keys/public-keys"),
278
+ method: "GET",
279
+ headers: _headers,
280
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
281
+ 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,
282
+ 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,
283
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
284
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
285
+ logging: this._options.logging,
286
+ });
287
+ if (_response.ok) {
288
+ return {
289
+ data: serializers.ListPublicKeysResponse.parseOrThrow(_response.body, {
290
+ unrecognizedObjectKeys: "passthrough",
291
+ allowUnrecognizedUnionMembers: true,
292
+ allowUnrecognizedEnumValues: true,
293
+ skipValidation: true,
294
+ breadcrumbsPrefix: ["response"],
295
+ }),
296
+ rawResponse: _response.rawResponse,
297
+ };
298
+ }
299
+ if (_response.error.reason === "status-code") {
300
+ throw new errors.AgentMailError({
301
+ statusCode: _response.error.statusCode,
302
+ body: _response.error.body,
303
+ rawResponse: _response.rawResponse,
304
+ });
305
+ }
306
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/api-keys/public-keys");
307
+ });
308
+ }
309
+ /**
310
+ * Register a public P-256 JWK using an existing AgentMail bearer API key
311
+ * with `api_key_create`. Re-registering the same JWK creates a new
312
+ * credential ID; it does not replace or recover an earlier credential.
313
+ * The private key must never be sent to AgentMail.
314
+ *
315
+ * @param {AgentMail.CreatePublicKeyRequest} request
316
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
317
+ *
318
+ * @throws {@link AgentMail.ValidationError}
319
+ * @throws {@link AgentMail.ConflictError}
320
+ *
321
+ * @example
322
+ * await client.apiKeys.createPublicKey({
323
+ * publicKey: {
324
+ * kty: "EC",
325
+ * crv: "P-256",
326
+ * x: "blackcurrant...............................",
327
+ * y: "blackcurrant..............................."
328
+ * }
329
+ * })
330
+ */
331
+ createPublicKey(request, requestOptions) {
332
+ return core.HttpResponsePromise.fromPromise(this.__createPublicKey(request, requestOptions));
333
+ }
334
+ __createPublicKey(request, requestOptions) {
335
+ return __awaiter(this, void 0, void 0, function* () {
336
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
337
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
338
+ 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);
339
+ const _response = yield core.fetcher({
340
+ 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)
341
+ .http, "/v0/api-keys/public-keys"),
342
+ method: "POST",
343
+ headers: _headers,
344
+ contentType: "application/json",
345
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
346
+ requestType: "json",
347
+ body: serializers.CreatePublicKeyRequest.jsonOrThrow(request, {
348
+ unrecognizedObjectKeys: "strip",
349
+ omitUndefined: true,
350
+ }),
351
+ 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,
352
+ 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,
353
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
354
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
355
+ logging: this._options.logging,
356
+ });
357
+ if (_response.ok) {
358
+ return {
359
+ data: serializers.PublicKeyCredential.parseOrThrow(_response.body, {
360
+ unrecognizedObjectKeys: "passthrough",
361
+ allowUnrecognizedUnionMembers: true,
362
+ allowUnrecognizedEnumValues: true,
363
+ skipValidation: true,
364
+ breadcrumbsPrefix: ["response"],
365
+ }),
366
+ rawResponse: _response.rawResponse,
367
+ };
368
+ }
369
+ if (_response.error.reason === "status-code") {
370
+ switch (_response.error.statusCode) {
371
+ case 400:
372
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
373
+ unrecognizedObjectKeys: "passthrough",
374
+ allowUnrecognizedUnionMembers: true,
375
+ allowUnrecognizedEnumValues: true,
376
+ skipValidation: true,
377
+ breadcrumbsPrefix: ["response"],
378
+ }), _response.rawResponse);
379
+ case 409:
380
+ throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
381
+ unrecognizedObjectKeys: "passthrough",
382
+ allowUnrecognizedUnionMembers: true,
383
+ allowUnrecognizedEnumValues: true,
384
+ skipValidation: true,
385
+ breadcrumbsPrefix: ["response"],
386
+ }), _response.rawResponse);
387
+ default:
388
+ throw new errors.AgentMailError({
389
+ statusCode: _response.error.statusCode,
390
+ body: _response.error.body,
391
+ rawResponse: _response.rawResponse,
392
+ });
393
+ }
394
+ }
395
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/api-keys/public-keys");
396
+ });
397
+ }
398
+ /**
399
+ * Rename the credential. All security-relevant fields are immutable.
400
+ * Requires `api_key_update`.
401
+ *
402
+ * @param {string} api_key_id - Public-key credential ID returned by registration.
403
+ * @param {AgentMail.UpdatePublicKeyNameRequest} request
404
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
405
+ *
406
+ * @throws {@link AgentMail.ValidationError}
407
+ * @throws {@link AgentMail.NotFoundError}
408
+ *
409
+ * @example
410
+ * await client.apiKeys.updatePublicKeyName("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", {
411
+ * name: "x"
412
+ * })
413
+ */
414
+ updatePublicKeyName(api_key_id, request, requestOptions) {
415
+ return core.HttpResponsePromise.fromPromise(this.__updatePublicKeyName(api_key_id, request, requestOptions));
416
+ }
417
+ __updatePublicKeyName(api_key_id, request, requestOptions) {
418
+ return __awaiter(this, void 0, void 0, function* () {
419
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
420
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
421
+ 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);
422
+ const _response = yield core.fetcher({
423
+ 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)
424
+ .http, `/v0/api-keys/public-keys/${core.url.encodePathParam(api_key_id)}`),
425
+ method: "PATCH",
426
+ headers: _headers,
427
+ contentType: "application/json",
428
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
429
+ requestType: "json",
430
+ body: serializers.UpdatePublicKeyNameRequest.jsonOrThrow(request, {
431
+ unrecognizedObjectKeys: "strip",
432
+ omitUndefined: true,
433
+ }),
434
+ 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,
435
+ 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,
436
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
437
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
438
+ logging: this._options.logging,
439
+ });
440
+ if (_response.ok) {
441
+ return {
442
+ data: serializers.PublicKeyCredential.parseOrThrow(_response.body, {
443
+ unrecognizedObjectKeys: "passthrough",
444
+ allowUnrecognizedUnionMembers: true,
445
+ allowUnrecognizedEnumValues: true,
446
+ skipValidation: true,
447
+ breadcrumbsPrefix: ["response"],
448
+ }),
449
+ rawResponse: _response.rawResponse,
450
+ };
451
+ }
452
+ if (_response.error.reason === "status-code") {
453
+ switch (_response.error.statusCode) {
454
+ case 400:
455
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
456
+ unrecognizedObjectKeys: "passthrough",
457
+ allowUnrecognizedUnionMembers: true,
458
+ allowUnrecognizedEnumValues: true,
459
+ skipValidation: true,
460
+ breadcrumbsPrefix: ["response"],
461
+ }), _response.rawResponse);
462
+ case 404:
463
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
464
+ unrecognizedObjectKeys: "passthrough",
465
+ allowUnrecognizedUnionMembers: true,
466
+ allowUnrecognizedEnumValues: true,
467
+ skipValidation: true,
468
+ breadcrumbsPrefix: ["response"],
469
+ }), _response.rawResponse);
470
+ default:
471
+ throw new errors.AgentMailError({
472
+ statusCode: _response.error.statusCode,
473
+ body: _response.error.body,
474
+ rawResponse: _response.rawResponse,
475
+ });
476
+ }
477
+ }
478
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v0/api-keys/public-keys/{api_key_id}");
479
+ });
480
+ }
481
+ /**
482
+ * Permanently revoke one public-key credential. This hard-deletes the
483
+ * credential; repeating the request returns not found. Requires
484
+ * `api_key_delete`.
485
+ *
486
+ * @param {string} api_key_id - Public-key credential ID returned by registration.
487
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
488
+ *
489
+ * @throws {@link AgentMail.NotFoundError}
490
+ *
491
+ * @example
492
+ * await client.apiKeys.revokePublicKey("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
493
+ */
494
+ revokePublicKey(api_key_id, requestOptions) {
495
+ return core.HttpResponsePromise.fromPromise(this.__revokePublicKey(api_key_id, requestOptions));
496
+ }
497
+ __revokePublicKey(api_key_id, requestOptions) {
498
+ return __awaiter(this, void 0, void 0, function* () {
499
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
500
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
501
+ 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);
502
+ const _response = yield core.fetcher({
503
+ 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)
504
+ .http, `/v0/api-keys/public-keys/${core.url.encodePathParam(api_key_id)}`),
505
+ method: "DELETE",
506
+ headers: _headers,
507
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
508
+ 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,
509
+ 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,
510
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
511
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
512
+ logging: this._options.logging,
513
+ });
514
+ if (_response.ok) {
515
+ return { data: undefined, rawResponse: _response.rawResponse };
516
+ }
517
+ if (_response.error.reason === "status-code") {
518
+ switch (_response.error.statusCode) {
519
+ case 404:
520
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
521
+ unrecognizedObjectKeys: "passthrough",
522
+ allowUnrecognizedUnionMembers: true,
523
+ allowUnrecognizedEnumValues: true,
524
+ skipValidation: true,
525
+ breadcrumbsPrefix: ["response"],
526
+ }), _response.rawResponse);
527
+ default:
528
+ throw new errors.AgentMailError({
529
+ statusCode: _response.error.statusCode,
530
+ body: _response.error.body,
531
+ rawResponse: _response.rawResponse,
532
+ });
533
+ }
534
+ }
535
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v0/api-keys/public-keys/{api_key_id}");
536
+ });
537
+ }
538
+ /**
539
+ * Invalidate every current public-key credential in the caller's
540
+ * organization by advancing its AgentID key generation. The caller must be
541
+ * organization-scoped and either have `api_key_delete` or, for a verified
542
+ * self-serve agent organization, use an unrestricted unmanaged bearer
543
+ * credential. No request body is accepted.
544
+ *
545
+ * `Idempotency-Key` is required and must be a UUID. Reusing the same UUID
546
+ * returns the original permanent receipt without advancing the generation
547
+ * again. A new UUID performs a new generation advance.
548
+ *
549
+ * @param {AgentMail.RevokeAllAgentIdSignInKeysRequest} request
550
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
551
+ *
552
+ * @throws {@link AgentMail.ValidationError}
553
+ * @throws {@link AgentMail.ConflictError}
554
+ *
555
+ * @example
556
+ * await client.apiKeys.revokeAllAgentIdSignInKeys({
557
+ * idempotencyKey: "Idempotency-Key"
558
+ * })
559
+ */
560
+ revokeAllAgentIdSignInKeys(request, requestOptions) {
561
+ return core.HttpResponsePromise.fromPromise(this.__revokeAllAgentIdSignInKeys(request, requestOptions));
562
+ }
563
+ __revokeAllAgentIdSignInKeys(request, requestOptions) {
564
+ return __awaiter(this, void 0, void 0, function* () {
565
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
566
+ const { idempotencyKey } = request;
567
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
568
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
569
+ const _response = yield core.fetcher({
570
+ 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)
571
+ .http, "/v0/api-keys/public-keys/agentid-sign-in/revoke-all"),
572
+ method: "POST",
573
+ headers: _headers,
574
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
575
+ 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,
576
+ 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,
577
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
578
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
579
+ logging: this._options.logging,
580
+ });
581
+ if (_response.ok) {
582
+ return {
583
+ data: serializers.RevokeAllAgentIdSignInKeysResponse.parseOrThrow(_response.body, {
584
+ unrecognizedObjectKeys: "passthrough",
585
+ allowUnrecognizedUnionMembers: true,
586
+ allowUnrecognizedEnumValues: true,
587
+ skipValidation: true,
588
+ breadcrumbsPrefix: ["response"],
589
+ }),
590
+ rawResponse: _response.rawResponse,
591
+ };
592
+ }
593
+ if (_response.error.reason === "status-code") {
594
+ switch (_response.error.statusCode) {
595
+ case 400:
596
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
597
+ unrecognizedObjectKeys: "passthrough",
598
+ allowUnrecognizedUnionMembers: true,
599
+ allowUnrecognizedEnumValues: true,
600
+ skipValidation: true,
601
+ breadcrumbsPrefix: ["response"],
602
+ }), _response.rawResponse);
603
+ case 409:
604
+ throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
605
+ unrecognizedObjectKeys: "passthrough",
606
+ allowUnrecognizedUnionMembers: true,
607
+ allowUnrecognizedEnumValues: true,
608
+ skipValidation: true,
609
+ breadcrumbsPrefix: ["response"],
610
+ }), _response.rawResponse);
611
+ default:
612
+ throw new errors.AgentMailError({
613
+ statusCode: _response.error.statusCode,
614
+ body: _response.error.body,
615
+ rawResponse: _response.rawResponse,
616
+ });
617
+ }
618
+ }
619
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/api-keys/public-keys/agentid-sign-in/revoke-all");
620
+ });
621
+ }
250
622
  }
251
623
  exports.ApiKeysClient = ApiKeysClient;
@@ -0,0 +1,10 @@
1
+ import type * as AgentMail from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface ListPublicKeysRequest {
7
+ limit?: AgentMail.Limit;
8
+ pageToken?: AgentMail.PageToken;
9
+ ascending?: AgentMail.Ascending;
10
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * idempotencyKey: "Idempotency-Key"
5
+ * }
6
+ */
7
+ export interface RevokeAllAgentIdSignInKeysRequest {
8
+ /** Required UUID identifying this revoke-all operation permanently. */
9
+ idempotencyKey: string;
10
+ }
@@ -1 +1,3 @@
1
1
  export type { ListApiKeysRequest } from "./ListApiKeysRequest.js";
2
+ export type { ListPublicKeysRequest } from "./ListPublicKeysRequest.js";
3
+ export type { RevokeAllAgentIdSignInKeysRequest } from "./RevokeAllAgentIdSignInKeysRequest.js";
@@ -64,6 +64,8 @@ export interface ApiKeyPermissions {
64
64
  apiKeyRead?: boolean;
65
65
  /** Create API keys. */
66
66
  apiKeyCreate?: boolean;
67
+ /** Update API keys. */
68
+ apiKeyUpdate?: boolean;
67
69
  /** Delete API keys. */
68
70
  apiKeyDelete?: boolean;
69
71
  /** Read pods. */
@@ -0,0 +1,21 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ /**
3
+ * Register only a public P-256 JWK. Credential type, `api_key_id`, sign-in
4
+ * eligibility, permissions, and generation are server-owned and are not
5
+ * request properties.
6
+ */
7
+ export interface CreatePublicKeyRequest {
8
+ publicKey: AgentMail.PublicJwk;
9
+ /** Defaults to `AgentID key {first eight fingerprint characters}`. */
10
+ name?: string;
11
+ /**
12
+ * Omit to inherit the registering bearer key's exact scope. An explicit
13
+ * scope must be the caller's scope or a live descendant.
14
+ */
15
+ scope?: AgentMail.PublicKeyScope;
16
+ /**
17
+ * Future absolute expiry. Omit to inherit the registering bearer key's
18
+ * expiry. A child credential cannot outlive its creator.
19
+ */
20
+ expiresAt?: Date;
21
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Authority over one live inbox incarnation.
3
+ */
4
+ export interface InboxPublicKeyScope {
5
+ /** ID of the inbox. */
6
+ id: string;
7
+ }
@@ -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,7 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ export interface ListPublicKeysResponse {
3
+ count: AgentMail.Count;
4
+ nextPageToken?: AgentMail.PageToken;
5
+ /** Public-key credentials only, ordered by creation time descending by default. */
6
+ publicKeys: AgentMail.PublicKeyCredential[];
7
+ }
@@ -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,4 @@
1
+ /**
2
+ * Organization-wide authority.
3
+ */
4
+ export type OrganizationPublicKeyScope = {};
@@ -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,7 @@
1
+ /**
2
+ * Authority over one live pod and its inboxes.
3
+ */
4
+ export interface PodPublicKeyScope {
5
+ /** ID of the pod. */
6
+ id: string;
7
+ }
@@ -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,13 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ /**
3
+ * A public P-256 JWK. The object accepts exactly `kty`, `crv`, `x`, and `y`.
4
+ * Private key material such as `d`, embedded key IDs, and all other members
5
+ * are rejected. The server also rejects coordinates that are not a point on
6
+ * P-256.
7
+ */
8
+ export interface PublicJwk {
9
+ kty: "EC";
10
+ crv: "P-256";
11
+ x: AgentMail.PublicJwkCoordinate;
12
+ y: AgentMail.PublicJwkCoordinate;
13
+ }
@@ -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,4 @@
1
+ /**
2
+ * A 32-byte P-256 coordinate encoded as unpadded base64url.
3
+ */
4
+ export type PublicJwkCoordinate = string;
@@ -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 });