Skip to content

Commit fc2389b

Browse files
feat(api): api update
1 parent 0b5a0a6 commit fc2389b

12 files changed

Lines changed: 152 additions & 39 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 20
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-5c6cdb8b7a2c0ba449927687bc378823ac947b26b7c2e6c379ae14668b73979a.yml
3-
openapi_spec_hash: 6bc024b866f01da53e2cfd6e404157c7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-4d179917b01ea51a3325e7b37ecbbb60d0ba8f60381fe715ff3ec31284ca8042.yml
3+
openapi_spec_hash: d027d37bd7051aa8c05fe1820c05b316
44
config_hash: 5509bb7a961ae2e79114b24c381606d4

cas-parser-java-core/src/main/kotlin/com/cas_parser/api/client/CasParserClient.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,13 @@ interface CasParserClient {
9494
/**
9595
* Endpoints for importing CAS files directly from user email inboxes.
9696
*
97-
* **Supported Providers:** Gmail (more coming soon)
97+
* **Supported Providers:**
98+
* - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains
99+
* - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, `@hotmail.com`,
100+
* `@live.com`, `@msn.com`, and localised variants such as `@hotmail.co.uk`, `@live.in`,
101+
* `@hotmail.fr`. Any other address registered as a personal Microsoft account also works,
102+
* including custom domains.
103+
* - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains
98104
*
99105
* **How it works:**
100106
* 1. Call `POST /v4/inbox/connect` to get an OAuth URL
@@ -209,7 +215,13 @@ interface CasParserClient {
209215
/**
210216
* Endpoints for importing CAS files directly from user email inboxes.
211217
*
212-
* **Supported Providers:** Gmail (more coming soon)
218+
* **Supported Providers:**
219+
* - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains
220+
* - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`,
221+
* `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as
222+
* `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered as a personal
223+
* Microsoft account also works, including custom domains.
224+
* - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains
213225
*
214226
* **How it works:**
215227
* 1. Call `POST /v4/inbox/connect` to get an OAuth URL

cas-parser-java-core/src/main/kotlin/com/cas_parser/api/client/CasParserClientAsync.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,13 @@ interface CasParserClientAsync {
9494
/**
9595
* Endpoints for importing CAS files directly from user email inboxes.
9696
*
97-
* **Supported Providers:** Gmail (more coming soon)
97+
* **Supported Providers:**
98+
* - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains
99+
* - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, `@hotmail.com`,
100+
* `@live.com`, `@msn.com`, and localised variants such as `@hotmail.co.uk`, `@live.in`,
101+
* `@hotmail.fr`. Any other address registered as a personal Microsoft account also works,
102+
* including custom domains.
103+
* - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains
98104
*
99105
* **How it works:**
100106
* 1. Call `POST /v4/inbox/connect` to get an OAuth URL
@@ -213,7 +219,13 @@ interface CasParserClientAsync {
213219
/**
214220
* Endpoints for importing CAS files directly from user email inboxes.
215221
*
216-
* **Supported Providers:** Gmail (more coming soon)
222+
* **Supported Providers:**
223+
* - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains
224+
* - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`,
225+
* `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as
226+
* `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered as a personal
227+
* Microsoft account also works, including custom domains.
228+
* - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains
217229
*
218230
* **How it works:**
219231
* 1. Call `POST /v4/inbox/connect` to get an OAuth URL

cas-parser-java-core/src/main/kotlin/com/cas_parser/api/client/CasParserClientAsyncImpl.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ class CasParserClientAsyncImpl(private val clientOptions: ClientOptions) : CasPa
137137
/**
138138
* Endpoints for importing CAS files directly from user email inboxes.
139139
*
140-
* **Supported Providers:** Gmail (more coming soon)
140+
* **Supported Providers:**
141+
* - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains
142+
* - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, `@hotmail.com`,
143+
* `@live.com`, `@msn.com`, and localised variants such as `@hotmail.co.uk`, `@live.in`,
144+
* `@hotmail.fr`. Any other address registered as a personal Microsoft account also works,
145+
* including custom domains.
146+
* - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains
141147
*
142148
* **How it works:**
143149
* 1. Call `POST /v4/inbox/connect` to get an OAuth URL
@@ -289,7 +295,13 @@ class CasParserClientAsyncImpl(private val clientOptions: ClientOptions) : CasPa
289295
/**
290296
* Endpoints for importing CAS files directly from user email inboxes.
291297
*
292-
* **Supported Providers:** Gmail (more coming soon)
298+
* **Supported Providers:**
299+
* - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains
300+
* - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`,
301+
* `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as
302+
* `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered as a personal
303+
* Microsoft account also works, including custom domains.
304+
* - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains
293305
*
294306
* **How it works:**
295307
* 1. Call `POST /v4/inbox/connect` to get an OAuth URL

cas-parser-java-core/src/main/kotlin/com/cas_parser/api/client/CasParserClientImpl.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,13 @@ class CasParserClientImpl(private val clientOptions: ClientOptions) : CasParserC
131131
/**
132132
* Endpoints for importing CAS files directly from user email inboxes.
133133
*
134-
* **Supported Providers:** Gmail (more coming soon)
134+
* **Supported Providers:**
135+
* - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains
136+
* - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, `@hotmail.com`,
137+
* `@live.com`, `@msn.com`, and localised variants such as `@hotmail.co.uk`, `@live.in`,
138+
* `@hotmail.fr`. Any other address registered as a personal Microsoft account also works,
139+
* including custom domains.
140+
* - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains
135141
*
136142
* **How it works:**
137143
* 1. Call `POST /v4/inbox/connect` to get an OAuth URL
@@ -283,7 +289,13 @@ class CasParserClientImpl(private val clientOptions: ClientOptions) : CasParserC
283289
/**
284290
* Endpoints for importing CAS files directly from user email inboxes.
285291
*
286-
* **Supported Providers:** Gmail (more coming soon)
292+
* **Supported Providers:**
293+
* - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains
294+
* - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`,
295+
* `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as
296+
* `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered as a personal
297+
* Microsoft account also works, including custom domains.
298+
* - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains
287299
*
288300
* **How it works:**
289301
* 1. Call `POST /v4/inbox/connect` to get an OAuth URL

cas-parser-java-core/src/main/kotlin/com/cas_parser/api/models/inbox/InboxConnectEmailParams.kt

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -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
*/
4144
class InboxConnectEmailParams
4245
private 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

cas-parser-java-core/src/main/kotlin/com/cas_parser/api/models/inbox/InboxConnectEmailResponse.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,16 @@ private constructor(
270270

271271
@JvmField val OUTLOOK = of("outlook")
272272

273+
@JvmField val ZOHO = of("zoho")
274+
273275
@JvmStatic fun of(value: String) = Provider(JsonField.of(value))
274276
}
275277

276278
/** An enum containing [Provider]'s known values. */
277279
enum class Known {
278280
GMAIL,
279281
OUTLOOK,
282+
ZOHO,
280283
}
281284

282285
/**
@@ -291,6 +294,7 @@ private constructor(
291294
enum class Value {
292295
GMAIL,
293296
OUTLOOK,
297+
ZOHO,
294298
/** An enum member indicating that [Provider] was instantiated with an unknown value. */
295299
_UNKNOWN,
296300
}
@@ -306,6 +310,7 @@ private constructor(
306310
when (this) {
307311
GMAIL -> Value.GMAIL
308312
OUTLOOK -> Value.OUTLOOK
313+
ZOHO -> Value.ZOHO
309314
else -> Value._UNKNOWN
310315
}
311316

@@ -322,6 +327,7 @@ private constructor(
322327
when (this) {
323328
GMAIL -> Known.GMAIL
324329
OUTLOOK -> Known.OUTLOOK
330+
ZOHO -> Known.ZOHO
325331
else -> throw CasParserInvalidDataException("Unknown Provider: $value")
326332
}
327333

cas-parser-java-core/src/main/kotlin/com/cas_parser/api/models/inbox/InboxListCasFilesResponse.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ private constructor(
294294

295295
/**
296296
* URL expiration time in seconds. Defaults vary by source:
297-
* - Gmail Inbox Import: 86400 (24h)
297+
* - Email Inbox Import (Gmail, Outlook, Zoho): 86400 (24h)
298298
* - Inbound Email with `callback_url` set: 172800 (48h)
299299
* - Inbound Email without `callback_url`: aligned with the session TTL (~30 min)
300300
*
@@ -490,7 +490,7 @@ private constructor(
490490

491491
/**
492492
* URL expiration time in seconds. Defaults vary by source:
493-
* - Gmail Inbox Import: 86400 (24h)
493+
* - Email Inbox Import (Gmail, Outlook, Zoho): 86400 (24h)
494494
* - Inbound Email with `callback_url` set: 172800 (48h)
495495
* - Inbound Email without `callback_url`: aligned with the session TTL (~30 min)
496496
*/

cas-parser-java-core/src/main/kotlin/com/cas_parser/api/services/async/InboxServiceAsync.kt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ import java.util.function.Consumer
1919
/**
2020
* Endpoints for importing CAS files directly from user email inboxes.
2121
*
22-
* **Supported Providers:** Gmail (more coming soon)
22+
* **Supported Providers:**
23+
* - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains
24+
* - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, `@hotmail.com`,
25+
* `@live.com`, `@msn.com`, and localised variants such as `@hotmail.co.uk`, `@live.in`,
26+
* `@hotmail.fr`. Any other address registered as a personal Microsoft account also works,
27+
* including custom domains.
28+
* - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains
2329
*
2430
* **How it works:**
2531
* 1. Call `POST /v4/inbox/connect` to get an OAuth URL
@@ -79,7 +85,11 @@ interface InboxServiceAsync {
7985
* - `error` - Error code (e.g., `access_denied`, `token_exchange_failed`)
8086
* - `state` - Your original state parameter
8187
*
82-
* **Store the `inbox_token` client-side** and use it for all subsequent inbox API calls.
88+
* **Store the `inbox_token` client-side** and use it for all subsequent inbox API calls. The
89+
* token is long-lived (it stores an encrypted refresh token), so a single OAuth connect gives
90+
* ongoing access to both historical and future CAS statements in the user's inbox. Reuse the
91+
* same token until the user revokes access via `/v4/inbox/disconnect` or their provider's
92+
* account settings.
8393
*/
8494
fun connectEmail(
8595
params: InboxConnectEmailParams

cas-parser-java-core/src/main/kotlin/com/cas_parser/api/services/async/InboxServiceAsyncImpl.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ import java.util.function.Consumer
2929
/**
3030
* Endpoints for importing CAS files directly from user email inboxes.
3131
*
32-
* **Supported Providers:** Gmail (more coming soon)
32+
* **Supported Providers:**
33+
* - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains
34+
* - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, `@hotmail.com`,
35+
* `@live.com`, `@msn.com`, and localised variants such as `@hotmail.co.uk`, `@live.in`,
36+
* `@hotmail.fr`. Any other address registered as a personal Microsoft account also works,
37+
* including custom domains.
38+
* - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains
3339
*
3440
* **How it works:**
3541
* 1. Call `POST /v4/inbox/connect` to get an OAuth URL

0 commit comments

Comments
 (0)