@@ -36,7 +36,10 @@ import kotlin.jvm.optionals.getOrNull
3636 * - `error` - Error code (e.g., `access_denied`, `token_exchange_failed`)
3737 * - `state` - Your original state parameter
3838 *
39- * **Store the `inbox_token` client-side** and use it for all subsequent inbox API calls.
39+ * **Store the `inbox_token` client-side** and use it for all subsequent inbox API calls. The token
40+ * is long-lived (it stores an encrypted refresh token), so a single OAuth connect gives ongoing
41+ * access to both historical and future CAS statements in the user's inbox. Reuse the same token
42+ * until the user revokes access via `/v4/inbox/disconnect` or their provider's account settings.
4043 */
4144class InboxConnectEmailParams
4245private constructor (
@@ -55,11 +58,14 @@ private constructor(
5558
5659 /* *
5760 * Mail provider to connect. Defaults to `gmail`.
58- * - `gmail` - Google accounts
59- * - `outlook` - Microsoft accounts
61+ * - `gmail` - Google accounts: `@gmail.com` and Google Workspace domains.
62+ * - `outlook` - personal Microsoft accounts: `@outlook.com`, `@hotmail.com`, `@live.com`,
63+ * `@msn.com` and localised variants (`@hotmail.co.uk`, `@live.in`, `@hotmail.fr`). Any other
64+ * address registered as a personal Microsoft account also works, including custom domains.
65+ * - `zoho` - Zoho Mail accounts, including custom domains hosted on Zoho.
6066 *
61- * Any value other than `outlook` is treated as `gmail`. The resolved provider is returned in
62- * the response.
67+ * Any unrecognised value is treated as `gmail`. The resolved provider is returned in the
68+ * response.
6369 *
6470 * @throws CasParserInvalidDataException if the JSON field has an unexpected type (e.g. if the
6571 * server responded with an unexpected value).
@@ -157,11 +163,15 @@ private constructor(
157163
158164 /* *
159165 * Mail provider to connect. Defaults to `gmail`.
160- * - `gmail` - Google accounts
161- * - `outlook` - Microsoft accounts
166+ * - `gmail` - Google accounts: `@gmail.com` and Google Workspace domains.
167+ * - `outlook` - personal Microsoft accounts: `@outlook.com`, `@hotmail.com`, `@live.com`,
168+ * `@msn.com` and localised variants (`@hotmail.co.uk`, `@live.in`, `@hotmail.fr`). Any
169+ * other address registered as a personal Microsoft account also works, including custom
170+ * domains.
171+ * - `zoho` - Zoho Mail accounts, including custom domains hosted on Zoho.
162172 *
163- * Any value other than `outlook` is treated as `gmail`. The resolved provider is returned
164- * in the response.
173+ * Any unrecognised value is treated as `gmail`. The resolved provider is returned in the
174+ * response.
165175 */
166176 fun provider (provider : Provider ) = apply { body.provider(provider) }
167177
@@ -358,11 +368,15 @@ private constructor(
358368
359369 /* *
360370 * Mail provider to connect. Defaults to `gmail`.
361- * - `gmail` - Google accounts
362- * - `outlook` - Microsoft accounts
371+ * - `gmail` - Google accounts: `@gmail.com` and Google Workspace domains.
372+ * - `outlook` - personal Microsoft accounts: `@outlook.com`, `@hotmail.com`, `@live.com`,
373+ * `@msn.com` and localised variants (`@hotmail.co.uk`, `@live.in`, `@hotmail.fr`). Any
374+ * other address registered as a personal Microsoft account also works, including custom
375+ * domains.
376+ * - `zoho` - Zoho Mail accounts, including custom domains hosted on Zoho.
363377 *
364- * Any value other than `outlook` is treated as `gmail`. The resolved provider is returned
365- * in the response.
378+ * Any unrecognised value is treated as `gmail`. The resolved provider is returned in the
379+ * response.
366380 *
367381 * @throws CasParserInvalidDataException if the JSON field has an unexpected type (e.g. if
368382 * the server responded with an unexpected value).
@@ -457,11 +471,15 @@ private constructor(
457471
458472 /* *
459473 * Mail provider to connect. Defaults to `gmail`.
460- * - `gmail` - Google accounts
461- * - `outlook` - Microsoft accounts
474+ * - `gmail` - Google accounts: `@gmail.com` and Google Workspace domains.
475+ * - `outlook` - personal Microsoft accounts: `@outlook.com`, `@hotmail.com`,
476+ * `@live.com`, `@msn.com` and localised variants (`@hotmail.co.uk`, `@live.in`,
477+ * `@hotmail.fr`). Any other address registered as a personal Microsoft account also
478+ * works, including custom domains.
479+ * - `zoho` - Zoho Mail accounts, including custom domains hosted on Zoho.
462480 *
463- * Any value other than `outlook` is treated as `gmail`. The resolved provider is
464- * returned in the response.
481+ * Any unrecognised value is treated as `gmail`. The resolved provider is returned in
482+ * the response.
465483 */
466484 fun provider (provider : Provider ) = provider(JsonField .of(provider))
467485
@@ -592,11 +610,14 @@ private constructor(
592610
593611 /* *
594612 * Mail provider to connect. Defaults to `gmail`.
595- * - `gmail` - Google accounts
596- * - `outlook` - Microsoft accounts
613+ * - `gmail` - Google accounts: `@gmail.com` and Google Workspace domains.
614+ * - `outlook` - personal Microsoft accounts: `@outlook.com`, `@hotmail.com`, `@live.com`,
615+ * `@msn.com` and localised variants (`@hotmail.co.uk`, `@live.in`, `@hotmail.fr`). Any other
616+ * address registered as a personal Microsoft account also works, including custom domains.
617+ * - `zoho` - Zoho Mail accounts, including custom domains hosted on Zoho.
597618 *
598- * Any value other than `outlook` is treated as `gmail`. The resolved provider is returned in
599- * the response.
619+ * Any unrecognised value is treated as `gmail`. The resolved provider is returned in the
620+ * response.
600621 */
601622 class Provider @JsonCreator private constructor(private val value : JsonField <String >) : Enum {
602623
@@ -616,13 +637,16 @@ private constructor(
616637
617638 @JvmField val OUTLOOK = of(" outlook" )
618639
640+ @JvmField val ZOHO = of(" zoho" )
641+
619642 @JvmStatic fun of (value : String ) = Provider (JsonField .of(value))
620643 }
621644
622645 /* * An enum containing [Provider]'s known values. */
623646 enum class Known {
624647 GMAIL ,
625648 OUTLOOK ,
649+ ZOHO ,
626650 }
627651
628652 /* *
@@ -637,6 +661,7 @@ private constructor(
637661 enum class Value {
638662 GMAIL ,
639663 OUTLOOK ,
664+ ZOHO ,
640665 /* * An enum member indicating that [Provider] was instantiated with an unknown value. */
641666 _UNKNOWN ,
642667 }
@@ -652,6 +677,7 @@ private constructor(
652677 when (this ) {
653678 GMAIL -> Value .GMAIL
654679 OUTLOOK -> Value .OUTLOOK
680+ ZOHO -> Value .ZOHO
655681 else -> Value ._UNKNOWN
656682 }
657683
@@ -668,6 +694,7 @@ private constructor(
668694 when (this ) {
669695 GMAIL -> Known .GMAIL
670696 OUTLOOK -> Known .OUTLOOK
697+ ZOHO -> Known .ZOHO
671698 else -> throw CasParserInvalidDataException (" Unknown Provider: $value " )
672699 }
673700
0 commit comments