agentmail 0.5.31 → 0.5.33

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 (225) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -3
  3. package/dist/cjs/Client.js +21 -21
  4. package/dist/cjs/api/resources/accounts/client/Client.d.ts +6 -6
  5. package/dist/cjs/api/resources/accounts/client/Client.js +6 -6
  6. package/dist/cjs/api/resources/accounts/types/Account.d.ts +7 -7
  7. package/dist/cjs/api/resources/accounts/types/UpdateAccountStatus.d.ts +1 -1
  8. package/dist/cjs/api/resources/accounts/types/UpdateAccountStatus.js +1 -1
  9. package/dist/cjs/api/resources/accounts/types/index.d.ts +0 -1
  10. package/dist/cjs/api/resources/accounts/types/index.js +0 -1
  11. package/dist/cjs/api/resources/apiKeys/types/AcceptDisclosure.d.ts +1 -1
  12. package/dist/cjs/api/resources/apiKeys/types/ApiKeyPermissions.d.ts +2 -0
  13. package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyResponse.d.ts +1 -0
  14. package/dist/cjs/api/resources/apiKeys/types/CreateBearerApiKeyRequest.d.ts +8 -0
  15. package/dist/cjs/api/resources/apps/client/Client.d.ts +92 -0
  16. package/dist/cjs/api/resources/{providers → apps}/client/Client.js +67 -51
  17. package/dist/cjs/api/resources/{providers/client/requests/ListProviderAccountsRequest.d.ts → apps/client/requests/ListAppAccountsRequest.d.ts} +1 -1
  18. package/dist/cjs/api/resources/{providers/client/requests/ListProvidersRequest.d.ts → apps/client/requests/ListAppsRequest.d.ts} +1 -1
  19. package/dist/cjs/api/resources/{providers/client/requests/SearchProvidersRequest.d.ts → apps/client/requests/SearchAppsRequest.d.ts} +1 -1
  20. package/dist/cjs/api/resources/apps/client/requests/index.d.ts +3 -0
  21. package/dist/cjs/api/resources/apps/errors/AppSignupLimitError.d.ts +6 -0
  22. package/dist/cjs/api/resources/apps/errors/AppSignupLimitError.js +54 -0
  23. package/dist/cjs/api/resources/apps/errors/index.d.ts +1 -0
  24. package/dist/cjs/api/resources/apps/errors/index.js +17 -0
  25. package/dist/cjs/api/resources/apps/exports.d.ts +2 -0
  26. package/dist/cjs/api/resources/{providers → apps}/exports.js +2 -2
  27. package/dist/cjs/{serialization/resources/providers → api/resources/apps}/index.d.ts +1 -0
  28. package/dist/cjs/{serialization/resources/providers → api/resources/apps}/index.js +1 -0
  29. package/dist/cjs/api/resources/apps/types/App.d.ts +16 -0
  30. package/dist/cjs/api/resources/apps/types/AppId.d.ts +4 -0
  31. package/dist/cjs/api/resources/{providers/types/ConnectProviderBody.d.ts → apps/types/ConnectAppBody.d.ts} +1 -1
  32. package/dist/cjs/api/resources/{providers/types/ListProviderAccountsResponse.d.ts → apps/types/ListAppAccountsResponse.d.ts} +2 -2
  33. package/dist/cjs/api/resources/{providers/types/ListProvidersResponse.d.ts → apps/types/ListAppsResponse.d.ts} +2 -2
  34. package/dist/cjs/api/resources/{providers/types/SearchProvidersResponse.d.ts → apps/types/SearchAppsResponse.d.ts} +2 -2
  35. package/dist/cjs/api/resources/apps/types/index.d.ts +9 -0
  36. package/dist/cjs/{serialization/resources/providers → api/resources/apps}/types/index.js +6 -5
  37. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +3 -1
  38. package/dist/cjs/api/resources/inboxes/client/Client.js +11 -1
  39. package/dist/cjs/api/resources/inboxes/resources/accounts/client/Client.d.ts +1 -1
  40. package/dist/cjs/api/resources/inboxes/resources/accounts/client/Client.js +1 -1
  41. package/dist/cjs/api/resources/index.d.ts +4 -3
  42. package/dist/cjs/api/resources/index.js +5 -4
  43. package/dist/cjs/api/resources/pods/resources/accounts/client/Client.d.ts +1 -1
  44. package/dist/cjs/api/resources/pods/resources/accounts/client/Client.js +1 -1
  45. package/dist/cjs/serialization/resources/accounts/types/Account.d.ts +3 -3
  46. package/dist/cjs/serialization/resources/accounts/types/Account.js +3 -3
  47. package/dist/cjs/serialization/resources/accounts/types/index.d.ts +0 -1
  48. package/dist/cjs/serialization/resources/accounts/types/index.js +0 -1
  49. package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyPermissions.d.ts +1 -0
  50. package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyPermissions.js +1 -0
  51. package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.ts +2 -0
  52. package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.js +2 -0
  53. package/dist/cjs/serialization/resources/apiKeys/types/CreateBearerApiKeyRequest.d.ts +2 -0
  54. package/dist/cjs/serialization/resources/apiKeys/types/CreateBearerApiKeyRequest.js +6 -1
  55. package/dist/cjs/serialization/resources/{providers → apps}/client/connect.d.ts +3 -3
  56. package/dist/cjs/serialization/resources/{providers → apps}/client/connect.js +2 -2
  57. package/dist/cjs/serialization/resources/{providers/types/Provider.d.ts → apps/types/App.d.ts} +4 -4
  58. package/dist/cjs/serialization/resources/{providers/types/Provider.js → apps/types/App.js} +4 -4
  59. package/dist/cjs/serialization/resources/{accounts/types/ProviderId.d.ts → apps/types/AppId.d.ts} +2 -2
  60. package/dist/cjs/serialization/resources/{accounts/types/ProviderId.js → apps/types/AppId.js} +2 -2
  61. package/dist/cjs/serialization/resources/{providers/types/ConnectProviderBody.d.ts → apps/types/ConnectAppBody.d.ts} +2 -2
  62. package/dist/cjs/serialization/resources/{providers/types/ConnectProviderBody.js → apps/types/ConnectAppBody.js} +2 -2
  63. package/dist/cjs/serialization/resources/{providers/types/ListProviderAccountsResponse.d.ts → apps/types/ListAppAccountsResponse.d.ts} +4 -4
  64. package/dist/cjs/serialization/resources/{providers/types/ListProviderAccountsResponse.js → apps/types/ListAppAccountsResponse.js} +4 -4
  65. package/dist/cjs/serialization/resources/{providers/types/ListProvidersResponse.d.ts → apps/types/ListAppsResponse.d.ts} +4 -4
  66. package/dist/cjs/serialization/resources/{providers/types/ListProvidersResponse.js → apps/types/ListAppsResponse.js} +4 -4
  67. package/dist/cjs/serialization/resources/{providers/types/SearchProvidersResponse.d.ts → apps/types/SearchAppsResponse.d.ts} +4 -4
  68. package/dist/cjs/serialization/resources/{providers/types/SearchProvidersResponse.js → apps/types/SearchAppsResponse.js} +4 -4
  69. package/dist/cjs/serialization/resources/apps/types/index.d.ts +9 -0
  70. package/dist/cjs/{api/resources/providers → serialization/resources/apps}/types/index.js +6 -5
  71. package/dist/cjs/serialization/resources/index.d.ts +2 -2
  72. package/dist/cjs/serialization/resources/index.js +3 -3
  73. package/dist/cjs/version.d.ts +1 -1
  74. package/dist/cjs/version.js +1 -1
  75. package/dist/esm/BaseClient.mjs +2 -2
  76. package/dist/esm/Client.d.mts +3 -3
  77. package/dist/esm/Client.mjs +5 -5
  78. package/dist/esm/api/resources/accounts/client/Client.d.mts +6 -6
  79. package/dist/esm/api/resources/accounts/client/Client.mjs +6 -6
  80. package/dist/esm/api/resources/accounts/types/Account.d.mts +7 -7
  81. package/dist/esm/api/resources/accounts/types/UpdateAccountStatus.d.mts +1 -1
  82. package/dist/esm/api/resources/accounts/types/UpdateAccountStatus.mjs +1 -1
  83. package/dist/esm/api/resources/accounts/types/index.d.mts +0 -1
  84. package/dist/esm/api/resources/accounts/types/index.mjs +0 -1
  85. package/dist/esm/api/resources/apiKeys/types/AcceptDisclosure.d.mts +1 -1
  86. package/dist/esm/api/resources/apiKeys/types/ApiKeyPermissions.d.mts +2 -0
  87. package/dist/esm/api/resources/apiKeys/types/CreateApiKeyResponse.d.mts +1 -0
  88. package/dist/esm/api/resources/apiKeys/types/CreateBearerApiKeyRequest.d.mts +8 -0
  89. package/dist/esm/api/resources/apps/client/Client.d.mts +92 -0
  90. package/dist/esm/api/resources/{providers → apps}/client/Client.mjs +65 -49
  91. package/dist/esm/api/resources/{providers/client/requests/ListProviderAccountsRequest.d.mts → apps/client/requests/ListAppAccountsRequest.d.mts} +1 -1
  92. package/dist/esm/api/resources/{providers/client/requests/ListProvidersRequest.d.mts → apps/client/requests/ListAppsRequest.d.mts} +1 -1
  93. package/dist/esm/api/resources/{providers/client/requests/SearchProvidersRequest.d.mts → apps/client/requests/SearchAppsRequest.d.mts} +1 -1
  94. package/dist/esm/api/resources/apps/client/requests/index.d.mts +3 -0
  95. package/dist/esm/api/resources/apps/errors/AppSignupLimitError.d.mts +6 -0
  96. package/dist/esm/api/resources/apps/errors/AppSignupLimitError.mjs +17 -0
  97. package/dist/esm/api/resources/apps/errors/index.d.mts +1 -0
  98. package/dist/esm/api/resources/apps/errors/index.mjs +1 -0
  99. package/dist/esm/api/resources/apps/exports.d.mts +2 -0
  100. package/dist/esm/api/resources/{providers → apps}/exports.mjs +1 -1
  101. package/dist/esm/{serialization/resources/providers → api/resources/apps}/index.d.mts +1 -0
  102. package/dist/esm/{serialization/resources/providers → api/resources/apps}/index.mjs +1 -0
  103. package/dist/esm/api/resources/apps/types/App.d.mts +16 -0
  104. package/dist/esm/api/resources/apps/types/AppId.d.mts +4 -0
  105. package/dist/esm/api/resources/{providers/types/ConnectProviderBody.d.mts → apps/types/ConnectAppBody.d.mts} +1 -1
  106. package/dist/esm/api/resources/{providers/types/ListProviderAccountsResponse.d.mts → apps/types/ListAppAccountsResponse.d.mts} +2 -2
  107. package/dist/esm/api/resources/{providers/types/ListProvidersResponse.d.mts → apps/types/ListAppsResponse.d.mts} +2 -2
  108. package/dist/esm/api/resources/{providers/types/SearchProvidersResponse.d.mts → apps/types/SearchAppsResponse.d.mts} +2 -2
  109. package/dist/esm/api/resources/apps/types/index.d.mts +9 -0
  110. package/dist/esm/api/resources/apps/types/index.mjs +9 -0
  111. package/dist/esm/api/resources/inboxes/client/Client.d.mts +3 -1
  112. package/dist/esm/api/resources/inboxes/client/Client.mjs +11 -1
  113. package/dist/esm/api/resources/inboxes/resources/accounts/client/Client.d.mts +1 -1
  114. package/dist/esm/api/resources/inboxes/resources/accounts/client/Client.mjs +1 -1
  115. package/dist/esm/api/resources/index.d.mts +4 -3
  116. package/dist/esm/api/resources/index.mjs +4 -3
  117. package/dist/esm/api/resources/pods/resources/accounts/client/Client.d.mts +1 -1
  118. package/dist/esm/api/resources/pods/resources/accounts/client/Client.mjs +1 -1
  119. package/dist/esm/serialization/resources/accounts/types/Account.d.mts +3 -3
  120. package/dist/esm/serialization/resources/accounts/types/Account.mjs +3 -3
  121. package/dist/esm/serialization/resources/accounts/types/index.d.mts +0 -1
  122. package/dist/esm/serialization/resources/accounts/types/index.mjs +0 -1
  123. package/dist/esm/serialization/resources/apiKeys/types/ApiKeyPermissions.d.mts +1 -0
  124. package/dist/esm/serialization/resources/apiKeys/types/ApiKeyPermissions.mjs +1 -0
  125. package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.mts +2 -0
  126. package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.mjs +2 -0
  127. package/dist/esm/serialization/resources/apiKeys/types/CreateBearerApiKeyRequest.d.mts +2 -0
  128. package/dist/esm/serialization/resources/apiKeys/types/CreateBearerApiKeyRequest.mjs +6 -1
  129. package/dist/esm/serialization/resources/{providers → apps}/client/connect.d.mts +3 -3
  130. package/dist/esm/serialization/resources/apps/client/connect.mjs +3 -0
  131. package/dist/esm/serialization/resources/{providers/types/Provider.d.mts → apps/types/App.d.mts} +4 -4
  132. package/dist/esm/serialization/resources/{providers/types/Provider.mjs → apps/types/App.mjs} +3 -3
  133. package/dist/esm/serialization/resources/{accounts/types/ProviderId.d.mts → apps/types/AppId.d.mts} +2 -2
  134. package/dist/esm/serialization/resources/{accounts/types/ProviderId.mjs → apps/types/AppId.mjs} +1 -1
  135. package/dist/esm/serialization/resources/{providers/types/ConnectProviderBody.d.mts → apps/types/ConnectAppBody.d.mts} +2 -2
  136. package/dist/esm/serialization/resources/{providers/types/ConnectProviderBody.mjs → apps/types/ConnectAppBody.mjs} +1 -1
  137. package/dist/esm/serialization/resources/{providers/types/ListProviderAccountsResponse.d.mts → apps/types/ListAppAccountsResponse.d.mts} +4 -4
  138. package/dist/esm/serialization/resources/{providers/types/ListProviderAccountsResponse.mjs → apps/types/ListAppAccountsResponse.mjs} +3 -3
  139. package/dist/esm/serialization/resources/{providers/types/ListProvidersResponse.d.mts → apps/types/ListAppsResponse.d.mts} +4 -4
  140. package/dist/esm/serialization/resources/{providers/types/ListProvidersResponse.mjs → apps/types/ListAppsResponse.mjs} +3 -3
  141. package/dist/esm/serialization/resources/{providers/types/SearchProvidersResponse.d.mts → apps/types/SearchAppsResponse.d.mts} +4 -4
  142. package/dist/esm/serialization/resources/{providers/types/SearchProvidersResponse.mjs → apps/types/SearchAppsResponse.mjs} +3 -3
  143. package/dist/esm/serialization/resources/apps/types/index.d.mts +9 -0
  144. package/dist/esm/serialization/resources/apps/types/index.mjs +9 -0
  145. package/dist/esm/serialization/resources/index.d.mts +2 -2
  146. package/dist/esm/serialization/resources/index.mjs +2 -2
  147. package/dist/esm/version.d.mts +1 -1
  148. package/dist/esm/version.mjs +1 -1
  149. package/dist/llms.txt +3 -2
  150. package/package.json +13 -13
  151. package/reference.md +1227 -1207
  152. package/dist/cjs/api/resources/accounts/types/ProviderId.d.ts +0 -4
  153. package/dist/cjs/api/resources/providers/client/Client.d.ts +0 -84
  154. package/dist/cjs/api/resources/providers/client/requests/index.d.ts +0 -3
  155. package/dist/cjs/api/resources/providers/exports.d.ts +0 -2
  156. package/dist/cjs/api/resources/providers/types/Provider.d.ts +0 -16
  157. package/dist/cjs/api/resources/providers/types/index.d.ts +0 -8
  158. package/dist/cjs/serialization/resources/providers/types/index.d.ts +0 -8
  159. package/dist/esm/api/resources/accounts/types/ProviderId.d.mts +0 -4
  160. package/dist/esm/api/resources/providers/client/Client.d.mts +0 -84
  161. package/dist/esm/api/resources/providers/client/requests/index.d.mts +0 -3
  162. package/dist/esm/api/resources/providers/exports.d.mts +0 -2
  163. package/dist/esm/api/resources/providers/types/Provider.d.mts +0 -16
  164. package/dist/esm/api/resources/providers/types/index.d.mts +0 -8
  165. package/dist/esm/api/resources/providers/types/index.mjs +0 -8
  166. package/dist/esm/serialization/resources/providers/client/connect.mjs +0 -3
  167. package/dist/esm/serialization/resources/providers/types/index.d.mts +0 -8
  168. package/dist/esm/serialization/resources/providers/types/index.mjs +0 -8
  169. package/dist/llms-full.txt +0 -0
  170. /package/dist/cjs/api/resources/{providers → apps}/client/index.d.ts +0 -0
  171. /package/dist/cjs/api/resources/{providers → apps}/client/index.js +0 -0
  172. /package/dist/cjs/api/resources/{accounts/types/ProviderId.js → apps/client/requests/ListAppAccountsRequest.js} +0 -0
  173. /package/dist/cjs/api/resources/{providers/client/requests/ListProviderAccountsRequest.js → apps/client/requests/ListAppsRequest.js} +0 -0
  174. /package/dist/cjs/api/resources/{providers/client/requests/ListProvidersRequest.js → apps/client/requests/SearchAppsRequest.js} +0 -0
  175. /package/dist/cjs/api/resources/{providers → apps}/client/requests/index.js +0 -0
  176. /package/dist/cjs/api/resources/{providers/client/requests/SearchProvidersRequest.js → apps/types/App.js} +0 -0
  177. /package/dist/cjs/api/resources/{providers/types/ConnectAccepted.js → apps/types/AppId.js} +0 -0
  178. /package/dist/cjs/api/resources/{providers → apps}/types/ConnectAccepted.d.ts +0 -0
  179. /package/dist/cjs/api/resources/{providers/types/ConnectInboxId.js → apps/types/ConnectAccepted.js} +0 -0
  180. /package/dist/cjs/api/resources/{providers/types/ConnectProviderBody.js → apps/types/ConnectAppBody.js} +0 -0
  181. /package/dist/cjs/api/resources/{providers → apps}/types/ConnectInboxId.d.ts +0 -0
  182. /package/dist/cjs/api/resources/{providers/types/ListProviderAccountsResponse.js → apps/types/ConnectInboxId.js} +0 -0
  183. /package/dist/cjs/api/resources/{providers/types/ListProvidersResponse.js → apps/types/ListAppAccountsResponse.js} +0 -0
  184. /package/dist/cjs/api/resources/{providers/types/MagicUrl.js → apps/types/ListAppsResponse.js} +0 -0
  185. /package/dist/cjs/api/resources/{providers → apps}/types/MagicUrl.d.ts +0 -0
  186. /package/dist/cjs/api/resources/{providers/types/Provider.js → apps/types/MagicUrl.js} +0 -0
  187. /package/dist/cjs/api/resources/{providers/types/SearchProvidersResponse.js → apps/types/SearchAppsResponse.js} +0 -0
  188. /package/dist/cjs/serialization/resources/{providers → apps}/client/index.d.ts +0 -0
  189. /package/dist/cjs/serialization/resources/{providers → apps}/client/index.js +0 -0
  190. /package/dist/cjs/{api/resources/providers → serialization/resources/apps}/index.d.ts +0 -0
  191. /package/dist/cjs/{api/resources/providers → serialization/resources/apps}/index.js +0 -0
  192. /package/dist/cjs/serialization/resources/{providers → apps}/types/ConnectAccepted.d.ts +0 -0
  193. /package/dist/cjs/serialization/resources/{providers → apps}/types/ConnectAccepted.js +0 -0
  194. /package/dist/cjs/serialization/resources/{providers → apps}/types/ConnectInboxId.d.ts +0 -0
  195. /package/dist/cjs/serialization/resources/{providers → apps}/types/ConnectInboxId.js +0 -0
  196. /package/dist/cjs/serialization/resources/{providers → apps}/types/MagicUrl.d.ts +0 -0
  197. /package/dist/cjs/serialization/resources/{providers → apps}/types/MagicUrl.js +0 -0
  198. /package/dist/esm/api/resources/{providers → apps}/client/index.d.mts +0 -0
  199. /package/dist/esm/api/resources/{providers → apps}/client/index.mjs +0 -0
  200. /package/dist/esm/api/resources/{accounts/types/ProviderId.mjs → apps/client/requests/ListAppAccountsRequest.mjs} +0 -0
  201. /package/dist/esm/api/resources/{providers/client/requests/ListProviderAccountsRequest.mjs → apps/client/requests/ListAppsRequest.mjs} +0 -0
  202. /package/dist/esm/api/resources/{providers/client/requests/ListProvidersRequest.mjs → apps/client/requests/SearchAppsRequest.mjs} +0 -0
  203. /package/dist/esm/api/resources/{providers → apps}/client/requests/index.mjs +0 -0
  204. /package/dist/esm/api/resources/{providers/client/requests/SearchProvidersRequest.mjs → apps/types/App.mjs} +0 -0
  205. /package/dist/esm/api/resources/{providers/types/ConnectAccepted.mjs → apps/types/AppId.mjs} +0 -0
  206. /package/dist/esm/api/resources/{providers → apps}/types/ConnectAccepted.d.mts +0 -0
  207. /package/dist/esm/api/resources/{providers/types/ConnectInboxId.mjs → apps/types/ConnectAccepted.mjs} +0 -0
  208. /package/dist/esm/api/resources/{providers/types/ConnectProviderBody.mjs → apps/types/ConnectAppBody.mjs} +0 -0
  209. /package/dist/esm/api/resources/{providers → apps}/types/ConnectInboxId.d.mts +0 -0
  210. /package/dist/esm/api/resources/{providers/types/ListProviderAccountsResponse.mjs → apps/types/ConnectInboxId.mjs} +0 -0
  211. /package/dist/esm/api/resources/{providers/types/ListProvidersResponse.mjs → apps/types/ListAppAccountsResponse.mjs} +0 -0
  212. /package/dist/esm/api/resources/{providers/types/MagicUrl.mjs → apps/types/ListAppsResponse.mjs} +0 -0
  213. /package/dist/esm/api/resources/{providers → apps}/types/MagicUrl.d.mts +0 -0
  214. /package/dist/esm/api/resources/{providers/types/Provider.mjs → apps/types/MagicUrl.mjs} +0 -0
  215. /package/dist/esm/api/resources/{providers/types/SearchProvidersResponse.mjs → apps/types/SearchAppsResponse.mjs} +0 -0
  216. /package/dist/esm/serialization/resources/{providers → apps}/client/index.d.mts +0 -0
  217. /package/dist/esm/serialization/resources/{providers → apps}/client/index.mjs +0 -0
  218. /package/dist/esm/{api/resources/providers → serialization/resources/apps}/index.d.mts +0 -0
  219. /package/dist/esm/{api/resources/providers → serialization/resources/apps}/index.mjs +0 -0
  220. /package/dist/esm/serialization/resources/{providers → apps}/types/ConnectAccepted.d.mts +0 -0
  221. /package/dist/esm/serialization/resources/{providers → apps}/types/ConnectAccepted.mjs +0 -0
  222. /package/dist/esm/serialization/resources/{providers → apps}/types/ConnectInboxId.d.mts +0 -0
  223. /package/dist/esm/serialization/resources/{providers → apps}/types/ConnectInboxId.mjs +0 -0
  224. /package/dist/esm/serialization/resources/{providers → apps}/types/MagicUrl.d.mts +0 -0
  225. /package/dist/esm/serialization/resources/{providers → apps}/types/MagicUrl.mjs +0 -0
@@ -11,7 +11,7 @@ export declare class AccountsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<AccountsClient.Options>;
12
12
  constructor(options?: AccountsClient.Options);
13
13
  /**
14
- * Lists accounts across all providers, scoped to the API key: an
14
+ * Lists accounts across all apps, scoped to the API key: an
15
15
  * organization key sees every account, a pod key its pod's, an inbox key
16
16
  * its inbox's. Requires `inbox_read`.
17
17
  *
@@ -41,16 +41,16 @@ export declare class AccountsClient {
41
41
  private __get;
42
42
  /**
43
43
  * Updates one account. Set `status` to `disabled` to stop the inbox from
44
- * signing in at the provider again, or to `enabled` to re-enable it.
44
+ * signing in at the app again, or to `enabled` to re-enable it.
45
45
  * Idempotent: disabling an already disabled account keeps its original
46
46
  * `disabled_at`, and enabling an enabled account is a no-op.
47
47
  *
48
48
  * Find the `account_id` with List Accounts. An account exists only after an
49
- * inbox's first sign-in at a provider, so it cannot be disabled in advance.
50
- * A disable applies to that inbox at that provider whichever sign-in key is
51
- * used: the provider's next authorization ends in `access_denied`, and a code
49
+ * inbox's first sign-in at an app, so it cannot be disabled in advance.
50
+ * A disable applies to that inbox at that app whichever sign-in key is
51
+ * used: the app's next authorization ends in `access_denied`, and a code
52
52
  * issued earlier is refused with `invalid_grant`. Access tokens already
53
- * issued stay valid until they expire, and the provider's own session is
53
+ * issued stay valid until they expire, and the app's own session is
54
54
  * unaffected.
55
55
  *
56
56
  * Requires `account_update`, which sign-in keys (`type: public_key`) cannot
@@ -21,7 +21,7 @@ export class AccountsClient {
21
21
  this._options = normalizeClientOptionsWithAuth(options);
22
22
  }
23
23
  /**
24
- * Lists accounts across all providers, scoped to the API key: an
24
+ * Lists accounts across all apps, scoped to the API key: an
25
25
  * organization key sees every account, a pod key its pod's, an inbox key
26
26
  * its inbox's. Requires `inbox_read`.
27
27
  *
@@ -159,16 +159,16 @@ export class AccountsClient {
159
159
  }
160
160
  /**
161
161
  * Updates one account. Set `status` to `disabled` to stop the inbox from
162
- * signing in at the provider again, or to `enabled` to re-enable it.
162
+ * signing in at the app again, or to `enabled` to re-enable it.
163
163
  * Idempotent: disabling an already disabled account keeps its original
164
164
  * `disabled_at`, and enabling an enabled account is a no-op.
165
165
  *
166
166
  * Find the `account_id` with List Accounts. An account exists only after an
167
- * inbox's first sign-in at a provider, so it cannot be disabled in advance.
168
- * A disable applies to that inbox at that provider whichever sign-in key is
169
- * used: the provider's next authorization ends in `access_denied`, and a code
167
+ * inbox's first sign-in at an app, so it cannot be disabled in advance.
168
+ * A disable applies to that inbox at that app whichever sign-in key is
169
+ * used: the app's next authorization ends in `access_denied`, and a code
170
170
  * issued earlier is refused with `invalid_grant`. Access tokens already
171
- * issued stay valid until they expire, and the provider's own session is
171
+ * issued stay valid until they expire, and the app's own session is
172
172
  * unaffected.
173
173
  *
174
174
  * Requires `account_update`, which sign-in keys (`type: public_key`) cannot
@@ -1,20 +1,20 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
2
  /**
3
- * One inbox signed in at one provider.
3
+ * One inbox signed in at one app.
4
4
  */
5
5
  export interface Account {
6
6
  accountId: AgentMail.AccountId;
7
- providerId: AgentMail.ProviderId;
8
- /** Display name of provider. */
9
- providerName?: string;
7
+ appId: AgentMail.AppId;
8
+ /** Display name of app. */
9
+ appName?: string;
10
10
  inboxId: AgentMail.inboxes.InboxId;
11
11
  podId: AgentMail.pods.PodId;
12
12
  organizationId: AgentMail.OrganizationId;
13
- /** Time of first sign-in at provider. */
13
+ /** Time of first sign-in at app. */
14
14
  firstSignedInAt: Date;
15
- /** Time of most recent sign-in at provider. */
15
+ /** Time of most recent sign-in at app. */
16
16
  lastSignedInAt: Date;
17
- /** Number of sign-ins at provider. */
17
+ /** Number of sign-ins at app. */
18
18
  signInCount: number;
19
19
  /** Present only while the account is disabled. Absent means the inbox may sign in. */
20
20
  status?: AgentMail.AccountStatus;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Status to set. `disabled` stops the inbox from signing in at the
3
- * provider; `enabled` re-enables it. An enabled account reads back with no
3
+ * app; `enabled` re-enables it. An enabled account reads back with no
4
4
  * `status`.
5
5
  */
6
6
  export declare const UpdateAccountStatus: {
@@ -1,7 +1,7 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  /**
3
3
  * Status to set. `disabled` stops the inbox from signing in at the
4
- * provider; `enabled` re-enables it. An enabled account reads back with no
4
+ * app; `enabled` re-enables it. An enabled account reads back with no
5
5
  * `status`.
6
6
  */
7
7
  export const UpdateAccountStatus = {
@@ -2,6 +2,5 @@ export * from "./Account.mjs";
2
2
  export * from "./AccountId.mjs";
3
3
  export * from "./AccountStatus.mjs";
4
4
  export * from "./ListAccountsResponse.mjs";
5
- export * from "./ProviderId.mjs";
6
5
  export * from "./UpdateAccountRequest.mjs";
7
6
  export * from "./UpdateAccountStatus.mjs";
@@ -2,6 +2,5 @@ export * from "./Account.mjs";
2
2
  export * from "./AccountId.mjs";
3
3
  export * from "./AccountStatus.mjs";
4
4
  export * from "./ListAccountsResponse.mjs";
5
- export * from "./ProviderId.mjs";
6
5
  export * from "./UpdateAccountRequest.mjs";
7
6
  export * from "./UpdateAccountStatus.mjs";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Accept the provider's disclosure on the agent's behalf, skipping the
2
+ * Accept the app's disclosure on the agent's behalf, skipping the
3
3
  * first-use disclosure page. Requires `provider_share_owner` when owner
4
4
  * scopes are involved.
5
5
  */
@@ -12,6 +12,8 @@ export interface ApiKeyPermissions {
12
12
  inboxDelete?: boolean;
13
13
  /** Read messages. Also required to read threads. */
14
14
  messageRead?: boolean;
15
+ /** Reply and reply-all when the request is signed with a registered public key. Bearer keys reply with `message_send`. */
16
+ messageReply?: boolean;
15
17
  /** Send messages. */
16
18
  messageSend?: boolean;
17
19
  /** Update message labels. Also required to update threads. */
@@ -9,4 +9,5 @@ export interface CreateApiKeyResponse {
9
9
  inboxId?: AgentMail.InboxScopeId;
10
10
  permissions?: AgentMail.ApiKeyPermissions;
11
11
  createdAt: AgentMail.CreatedAt;
12
+ expiresAt?: AgentMail.ExpiresAt;
12
13
  }
@@ -1,3 +1,11 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
+ /**
3
+ * `expires_at` must be in the future and is immutable once the key exists.
4
+ * Omitted, the new key inherits the authenticating key's expiry, and never
5
+ * expires only when that key never does. A key cannot create one that
6
+ * outlives it: an `expires_at` later than the authenticating key's own
7
+ * returns `403`.
8
+ */
2
9
  export interface CreateBearerApiKeyRequest extends AgentMail.ApiKeyMutableFields {
10
+ expiresAt?: AgentMail.ExpiresAt;
3
11
  }
@@ -0,0 +1,92 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
+ import * as core from "../../../../core/index.mjs";
4
+ import * as AgentMail from "../../../index.mjs";
5
+ export declare namespace AppsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class AppsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<AppsClient.Options>;
12
+ constructor(options?: AppsClient.Options);
13
+ /**
14
+ * Lists apps, most popular first.
15
+ *
16
+ * @param {AgentMail.ListAppsRequest} request
17
+ * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link AgentMail.ValidationError}
20
+ *
21
+ * @example
22
+ * await client.apps.list()
23
+ */
24
+ list(request?: AgentMail.ListAppsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListAppsResponse>;
25
+ private __list;
26
+ /**
27
+ * Searches apps by name prefix.
28
+ *
29
+ * @param {AgentMail.SearchAppsRequest} request
30
+ * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
31
+ *
32
+ * @throws {@link AgentMail.ValidationError}
33
+ *
34
+ * @example
35
+ * await client.apps.search({
36
+ * q: "q"
37
+ * })
38
+ */
39
+ search(request: AgentMail.SearchAppsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.SearchAppsResponse>;
40
+ private __search;
41
+ /**
42
+ * Gets one app by ID. An app in the catalog returns its full entry.
43
+ * A registered app that the catalog does not list returns its ID and
44
+ * name only, without `updated_at`, so anyone holding its ID can still look
45
+ * it up. List Apps and Search Apps show catalog entries only.
46
+ *
47
+ * @param {AgentMail.AppId} app_id
48
+ * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
49
+ *
50
+ * @throws {@link AgentMail.NotFoundError}
51
+ *
52
+ * @example
53
+ * await client.apps.get("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
54
+ */
55
+ get(app_id: AgentMail.AppId, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.App>;
56
+ private __get;
57
+ /**
58
+ * Lists accounts at one app, most recent sign-in first.
59
+ *
60
+ * @param {AgentMail.AppId} app_id
61
+ * @param {AgentMail.ListAppAccountsRequest} request
62
+ * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link AgentMail.ValidationError}
65
+ *
66
+ * @example
67
+ * await client.apps.listAccounts("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
68
+ */
69
+ listAccounts(app_id: AgentMail.AppId, request?: AgentMail.ListAppAccountsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListAppAccountsResponse>;
70
+ private __listAccounts;
71
+ /**
72
+ * Starts signing an inbox in to an app. Returns a single-use `magic_url`,
73
+ * valid for five minutes, to open in the client that will hold the sign-in;
74
+ * the client enrolls as the inbox and continues to the app.
75
+ * A `404` names the missing resource: `App` or `Inbox`.
76
+ * A `403` `AppSignupLimitError` means the app accepts no more sign-ups from
77
+ * your organization; sign in with an inbox that already has an account there.
78
+ *
79
+ * @param {AgentMail.AppId} app_id
80
+ * @param {AgentMail.ConnectAppBody} request
81
+ * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
82
+ *
83
+ * @throws {@link AgentMail.ValidationError}
84
+ * @throws {@link AgentMail.NotFoundError}
85
+ * @throws {@link AgentMail.AppSignupLimitError}
86
+ *
87
+ * @example
88
+ * await client.apps.connect("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", undefined)
89
+ */
90
+ connect(app_id: AgentMail.AppId, request?: AgentMail.ConnectAppBody, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ConnectAccepted>;
91
+ private __connect;
92
+ }
@@ -16,20 +16,20 @@ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCode
16
16
  import * as errors from "../../../../errors/index.mjs";
17
17
  import * as serializers from "../../../../serialization/index.mjs";
18
18
  import * as AgentMail from "../../../index.mjs";
19
- export class ProvidersClient {
19
+ export class AppsClient {
20
20
  constructor(options = {}) {
21
21
  this._options = normalizeClientOptionsWithAuth(options);
22
22
  }
23
23
  /**
24
- * Lists providers, most popular first.
24
+ * Lists apps, most popular first.
25
25
  *
26
- * @param {AgentMail.ListProvidersRequest} request
27
- * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.
26
+ * @param {AgentMail.ListAppsRequest} request
27
+ * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
28
28
  *
29
29
  * @throws {@link AgentMail.ValidationError}
30
30
  *
31
31
  * @example
32
- * await client.providers.list()
32
+ * await client.apps.list()
33
33
  */
34
34
  list(request = {}, requestOptions) {
35
35
  return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
@@ -46,7 +46,7 @@ export class ProvidersClient {
46
46
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
47
47
  const _response = yield core.fetcher({
48
48
  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)
49
- .http, "/v0/providers"),
49
+ .http, "/v0/apps"),
50
50
  method: "GET",
51
51
  headers: _headers,
52
52
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -58,7 +58,7 @@ export class ProvidersClient {
58
58
  });
59
59
  if (_response.ok) {
60
60
  return {
61
- data: serializers.ListProvidersResponse.parseOrThrow(_response.body, {
61
+ data: serializers.ListAppsResponse.parseOrThrow(_response.body, {
62
62
  unrecognizedObjectKeys: "passthrough",
63
63
  allowUnrecognizedUnionMembers: true,
64
64
  allowUnrecognizedEnumValues: true,
@@ -86,19 +86,19 @@ export class ProvidersClient {
86
86
  });
87
87
  }
88
88
  }
89
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/providers");
89
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/apps");
90
90
  });
91
91
  }
92
92
  /**
93
- * Searches providers by name prefix.
93
+ * Searches apps by name prefix.
94
94
  *
95
- * @param {AgentMail.SearchProvidersRequest} request
96
- * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.
95
+ * @param {AgentMail.SearchAppsRequest} request
96
+ * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
97
97
  *
98
98
  * @throws {@link AgentMail.ValidationError}
99
99
  *
100
100
  * @example
101
- * await client.providers.search({
101
+ * await client.apps.search({
102
102
  * q: "q"
103
103
  * })
104
104
  */
@@ -117,7 +117,7 @@ export class ProvidersClient {
117
117
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
118
118
  const _response = yield core.fetcher({
119
119
  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)
120
- .http, "/v0/providers/search"),
120
+ .http, "/v0/apps/search"),
121
121
  method: "GET",
122
122
  headers: _headers,
123
123
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -129,7 +129,7 @@ export class ProvidersClient {
129
129
  });
130
130
  if (_response.ok) {
131
131
  return {
132
- data: serializers.SearchProvidersResponse.parseOrThrow(_response.body, {
132
+ data: serializers.SearchAppsResponse.parseOrThrow(_response.body, {
133
133
  unrecognizedObjectKeys: "passthrough",
134
134
  allowUnrecognizedUnionMembers: true,
135
135
  allowUnrecognizedEnumValues: true,
@@ -157,29 +157,34 @@ export class ProvidersClient {
157
157
  });
158
158
  }
159
159
  }
160
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/providers/search");
160
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/apps/search");
161
161
  });
162
162
  }
163
163
  /**
164
- * @param {AgentMail.ProviderId} provider_id
165
- * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.
164
+ * Gets one app by ID. An app in the catalog returns its full entry.
165
+ * A registered app that the catalog does not list returns its ID and
166
+ * name only, without `updated_at`, so anyone holding its ID can still look
167
+ * it up. List Apps and Search Apps show catalog entries only.
168
+ *
169
+ * @param {AgentMail.AppId} app_id
170
+ * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
166
171
  *
167
172
  * @throws {@link AgentMail.NotFoundError}
168
173
  *
169
174
  * @example
170
- * await client.providers.get("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
175
+ * await client.apps.get("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
171
176
  */
172
- get(provider_id, requestOptions) {
173
- return core.HttpResponsePromise.fromPromise(this.__get(provider_id, requestOptions));
177
+ get(app_id, requestOptions) {
178
+ return core.HttpResponsePromise.fromPromise(this.__get(app_id, requestOptions));
174
179
  }
175
- __get(provider_id, requestOptions) {
180
+ __get(app_id, requestOptions) {
176
181
  return __awaiter(this, void 0, void 0, function* () {
177
182
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
178
183
  const _authRequest = yield this._options.authProvider.getAuthRequest();
179
184
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
180
185
  const _response = yield core.fetcher({
181
186
  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)
182
- .http, `/v0/providers/${core.url.encodePathParam(serializers.ProviderId.jsonOrThrow(provider_id, { omitUndefined: true }))}`),
187
+ .http, `/v0/apps/${core.url.encodePathParam(serializers.AppId.jsonOrThrow(app_id, { omitUndefined: true }))}`),
183
188
  method: "GET",
184
189
  headers: _headers,
185
190
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -191,7 +196,7 @@ export class ProvidersClient {
191
196
  });
192
197
  if (_response.ok) {
193
198
  return {
194
- data: serializers.Provider.parseOrThrow(_response.body, {
199
+ data: serializers.App.parseOrThrow(_response.body, {
195
200
  unrecognizedObjectKeys: "passthrough",
196
201
  allowUnrecognizedUnionMembers: true,
197
202
  allowUnrecognizedEnumValues: true,
@@ -219,26 +224,26 @@ export class ProvidersClient {
219
224
  });
220
225
  }
221
226
  }
222
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/providers/{provider_id}");
227
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/apps/{app_id}");
223
228
  });
224
229
  }
225
230
  /**
226
- * Lists accounts at one provider, most recent sign-in first.
231
+ * Lists accounts at one app, most recent sign-in first.
227
232
  *
228
- * @param {AgentMail.ProviderId} provider_id
229
- * @param {AgentMail.ListProviderAccountsRequest} request
230
- * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.
233
+ * @param {AgentMail.AppId} app_id
234
+ * @param {AgentMail.ListAppAccountsRequest} request
235
+ * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
231
236
  *
232
237
  * @throws {@link AgentMail.ValidationError}
233
238
  *
234
239
  * @example
235
- * await client.providers.listAccounts("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
240
+ * await client.apps.listAccounts("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
236
241
  */
237
- listAccounts(provider_id, request = {}, requestOptions) {
238
- return core.HttpResponsePromise.fromPromise(this.__listAccounts(provider_id, request, requestOptions));
242
+ listAccounts(app_id, request = {}, requestOptions) {
243
+ return core.HttpResponsePromise.fromPromise(this.__listAccounts(app_id, request, requestOptions));
239
244
  }
240
- __listAccounts(provider_id_1) {
241
- return __awaiter(this, arguments, void 0, function* (provider_id, request = {}, requestOptions) {
245
+ __listAccounts(app_id_1) {
246
+ return __awaiter(this, arguments, void 0, function* (app_id, request = {}, requestOptions) {
242
247
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
243
248
  const { limit, pageToken } = request;
244
249
  const _queryParams = {
@@ -249,7 +254,7 @@ export class ProvidersClient {
249
254
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
250
255
  const _response = yield core.fetcher({
251
256
  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)
252
- .http, `/v0/providers/${core.url.encodePathParam(serializers.ProviderId.jsonOrThrow(provider_id, { omitUndefined: true }))}/accounts`),
257
+ .http, `/v0/apps/${core.url.encodePathParam(serializers.AppId.jsonOrThrow(app_id, { omitUndefined: true }))}/accounts`),
253
258
  method: "GET",
254
259
  headers: _headers,
255
260
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -261,7 +266,7 @@ export class ProvidersClient {
261
266
  });
262
267
  if (_response.ok) {
263
268
  return {
264
- data: serializers.ListProviderAccountsResponse.parseOrThrow(_response.body, {
269
+ data: serializers.ListAppAccountsResponse.parseOrThrow(_response.body, {
265
270
  unrecognizedObjectKeys: "passthrough",
266
271
  allowUnrecognizedUnionMembers: true,
267
272
  allowUnrecognizedEnumValues: true,
@@ -289,42 +294,45 @@ export class ProvidersClient {
289
294
  });
290
295
  }
291
296
  }
292
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/providers/{provider_id}/accounts");
297
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/apps/{app_id}/accounts");
293
298
  });
294
299
  }
295
300
  /**
296
- * Starts signing an inbox in to a provider. Returns a single-use `magic_url`,
301
+ * Starts signing an inbox in to an app. Returns a single-use `magic_url`,
297
302
  * valid for five minutes, to open in the client that will hold the sign-in;
298
- * the client enrolls as the inbox and continues to the provider. Poll
299
- * [Get API Key](/api-reference/api-keys/get) with `api_key_id` for `status`.
303
+ * the client enrolls as the inbox and continues to the app.
304
+ * A `404` names the missing resource: `App` or `Inbox`.
305
+ * A `403` `AppSignupLimitError` means the app accepts no more sign-ups from
306
+ * your organization; sign in with an inbox that already has an account there.
300
307
  *
301
- * @param {AgentMail.ProviderId} provider_id
302
- * @param {AgentMail.ConnectProviderBody} request
303
- * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.
308
+ * @param {AgentMail.AppId} app_id
309
+ * @param {AgentMail.ConnectAppBody} request
310
+ * @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
304
311
  *
305
312
  * @throws {@link AgentMail.ValidationError}
306
313
  * @throws {@link AgentMail.NotFoundError}
314
+ * @throws {@link AgentMail.AppSignupLimitError}
307
315
  *
308
316
  * @example
309
- * await client.providers.connect("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", undefined)
317
+ * await client.apps.connect("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", undefined)
310
318
  */
311
- connect(provider_id, request, requestOptions) {
312
- return core.HttpResponsePromise.fromPromise(this.__connect(provider_id, request, requestOptions));
319
+ connect(app_id, request, requestOptions) {
320
+ return core.HttpResponsePromise.fromPromise(this.__connect(app_id, request, requestOptions));
313
321
  }
314
- __connect(provider_id, request, requestOptions) {
322
+ __connect(app_id, request, requestOptions) {
315
323
  return __awaiter(this, void 0, void 0, function* () {
316
324
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
317
325
  const _authRequest = yield this._options.authProvider.getAuthRequest();
318
326
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
319
327
  const _response = yield core.fetcher({
320
328
  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)
321
- .http, `/v0/providers/${core.url.encodePathParam(serializers.ProviderId.jsonOrThrow(provider_id, { omitUndefined: true }))}/connect`),
329
+ .http, `/v0/apps/${core.url.encodePathParam(serializers.AppId.jsonOrThrow(app_id, { omitUndefined: true }))}/connect`),
322
330
  method: "POST",
323
331
  headers: _headers,
324
332
  contentType: "application/json",
325
333
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
326
334
  requestType: "json",
327
- body: serializers.providers.connect.Request.jsonOrThrow(request, {
335
+ body: serializers.apps.connect.Request.jsonOrThrow(request, {
328
336
  unrecognizedObjectKeys: "strip",
329
337
  omitUndefined: true,
330
338
  }),
@@ -364,6 +372,14 @@ export class ProvidersClient {
364
372
  skipValidation: true,
365
373
  breadcrumbsPrefix: ["response"],
366
374
  }), _response.rawResponse);
375
+ case 403:
376
+ throw new AgentMail.AppSignupLimitError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
377
+ unrecognizedObjectKeys: "passthrough",
378
+ allowUnrecognizedUnionMembers: true,
379
+ allowUnrecognizedEnumValues: true,
380
+ skipValidation: true,
381
+ breadcrumbsPrefix: ["response"],
382
+ }), _response.rawResponse);
367
383
  default:
368
384
  throw new errors.AgentMailError({
369
385
  statusCode: _response.error.statusCode,
@@ -372,7 +388,7 @@ export class ProvidersClient {
372
388
  });
373
389
  }
374
390
  }
375
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/providers/{provider_id}/connect");
391
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/apps/{app_id}/connect");
376
392
  });
377
393
  }
378
394
  }
@@ -3,7 +3,7 @@ import type * as AgentMail from "../../../../index.mjs";
3
3
  * @example
4
4
  * {}
5
5
  */
6
- export interface ListProviderAccountsRequest {
6
+ export interface ListAppAccountsRequest {
7
7
  limit?: AgentMail.Limit;
8
8
  pageToken?: AgentMail.PageToken;
9
9
  }
@@ -3,7 +3,7 @@ import type * as AgentMail from "../../../../index.mjs";
3
3
  * @example
4
4
  * {}
5
5
  */
6
- export interface ListProvidersRequest {
6
+ export interface ListAppsRequest {
7
7
  limit?: AgentMail.Limit;
8
8
  pageToken?: AgentMail.PageToken;
9
9
  }
@@ -5,7 +5,7 @@ import type * as AgentMail from "../../../../index.mjs";
5
5
  * q: "q"
6
6
  * }
7
7
  */
8
- export interface SearchProvidersRequest {
8
+ export interface SearchAppsRequest {
9
9
  /** Name prefix to search for. */
10
10
  q: string;
11
11
  limit?: AgentMail.Limit;
@@ -0,0 +1,3 @@
1
+ export type { ListAppAccountsRequest } from "./ListAppAccountsRequest.mjs";
2
+ export type { ListAppsRequest } from "./ListAppsRequest.mjs";
3
+ export type { SearchAppsRequest } from "./SearchAppsRequest.mjs";
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../../../core/index.mjs";
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ import type * as AgentMail from "../../../index.mjs";
4
+ export declare class AppSignupLimitError extends errors.AgentMailError {
5
+ constructor(body: AgentMail.ErrorResponse, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export class AppSignupLimitError extends errors.AgentMailError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "AppSignupLimitError",
7
+ statusCode: 403,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
16
+ }
17
+ }
@@ -0,0 +1 @@
1
+ export * from "./AppSignupLimitError.mjs";
@@ -0,0 +1 @@
1
+ export * from "./AppSignupLimitError.mjs";
@@ -0,0 +1,2 @@
1
+ export { AppsClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -1,3 +1,3 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export { ProvidersClient } from "./client/Client.mjs";
2
+ export { AppsClient } from "./client/Client.mjs";
3
3
  export * from "./client/index.mjs";
@@ -1,2 +1,3 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./errors/index.mjs";
2
3
  export * from "./types/index.mjs";
@@ -1,2 +1,3 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./errors/index.mjs";
2
3
  export * from "./types/index.mjs";