From d5497ca0f858ec9b9a6c9dbd342e8dd6c049f0b7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 2 Aug 2026 01:17:57 +0000 Subject: [PATCH 1/4] feat(api): api update --- .stats.yml | 4 ++-- camskfintech.go | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 93de6b1..e7b8198 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 20 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-26d0931f3488af784c16303683cbf24225c727615fd32ee071144974e7c59670.yml -openapi_spec_hash: 242a5f4d982645a25e0d66ef088940a5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-cd8e042a9746bbe9bd180614fccc7597b85f4e8f6a29da6cd2f4cbf831fb2fbe.yml +openapi_spec_hash: e27c0d9cd8cdeb348c88e6c4e8777e39 config_hash: 5509bb7a961ae2e79114b24c381606d4 diff --git a/camskfintech.go b/camskfintech.go index ff05d5d..c529198 100644 --- a/camskfintech.go +++ b/camskfintech.go @@ -832,6 +832,9 @@ type UnifiedResponseMutualFundSchemeAdditionalInfo struct { Amfi string `json:"amfi"` // Closing balance units for the statement period CloseUnits float64 `json:"close_units" api:"nullable"` + // Whether the scheme is held in demat form (CAMS/KFintech). true = Demat, false = + // Non-Demat, null = not specified. + IsDemat bool `json:"is_demat" api:"nullable"` // Opening balance units for the statement period OpenUnits float64 `json:"open_units" api:"nullable"` // RTA code for the scheme (CAMS/KFintech) @@ -841,6 +844,7 @@ type UnifiedResponseMutualFundSchemeAdditionalInfo struct { Advisor respjson.Field Amfi respjson.Field CloseUnits respjson.Field + IsDemat respjson.Field OpenUnits respjson.Field RtaCode respjson.Field ExtraFields map[string]respjson.Field From 2d10ba6ed8dc08ed843fb0ed010b394387620567 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 8 Aug 2026 21:17:40 +0000 Subject: [PATCH 2/4] feat(api): api update --- .stats.yml | 4 ++-- inbox.go | 39 ++++++++++++++++++++++++++++++++++++++- inbox_test.go | 1 + 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index e7b8198..8fb9d77 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 20 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-cd8e042a9746bbe9bd180614fccc7597b85f4e8f6a29da6cd2f4cbf831fb2fbe.yml -openapi_spec_hash: e27c0d9cd8cdeb348c88e6c4e8777e39 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-5c6cdb8b7a2c0ba449927687bc378823ac947b26b7c2e6c379ae14668b73979a.yml +openapi_spec_hash: 6bc024b866f01da53e2cfd6e404157c7 config_hash: 5509bb7a961ae2e79114b24c381606d4 diff --git a/inbox.go b/inbox.go index a1315ef..09e6aca 100644 --- a/inbox.go +++ b/inbox.go @@ -158,11 +158,16 @@ type InboxConnectEmailResponse struct { ExpiresIn int64 `json:"expires_in"` // Redirect user to this URL to start OAuth flow OAuthURL string `json:"oauth_url" format:"uri"` - Status string `json:"status"` + // The provider this OAuth URL was generated for + // + // Any of "gmail", "outlook". + Provider InboxConnectEmailResponseProvider `json:"provider"` + Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ExpiresIn respjson.Field OAuthURL respjson.Field + Provider respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field raw string @@ -175,6 +180,14 @@ func (r *InboxConnectEmailResponse) UnmarshalJSON(data []byte) error { return apijson.UnmarshalRoot(data, r) } +// The provider this OAuth URL was generated for +type InboxConnectEmailResponseProvider string + +const ( + InboxConnectEmailResponseProviderGmail InboxConnectEmailResponseProvider = "gmail" + InboxConnectEmailResponseProviderOutlook InboxConnectEmailResponseProvider = "outlook" +) + type InboxDisconnectEmailResponse struct { Msg string `json:"msg"` Status string `json:"status"` @@ -273,6 +286,16 @@ type InboxConnectEmailParams struct { RedirectUri string `json:"redirect_uri" api:"required" format:"uri"` // State parameter for CSRF protection (returned in redirect) State param.Opt[string] `json:"state,omitzero"` + // Mail provider to connect. Defaults to `gmail`. + // + // - `gmail` - Google accounts + // - `outlook` - Microsoft accounts + // + // Any value other than `outlook` is treated as `gmail`. The resolved provider is + // returned in the response. + // + // Any of "gmail", "outlook". + Provider InboxConnectEmailParamsProvider `json:"provider,omitzero"` paramObj } @@ -284,6 +307,20 @@ func (r *InboxConnectEmailParams) UnmarshalJSON(data []byte) error { return apijson.UnmarshalRoot(data, r) } +// Mail provider to connect. Defaults to `gmail`. +// +// - `gmail` - Google accounts +// - `outlook` - Microsoft accounts +// +// Any value other than `outlook` is treated as `gmail`. The resolved provider is +// returned in the response. +type InboxConnectEmailParamsProvider string + +const ( + InboxConnectEmailParamsProviderGmail InboxConnectEmailParamsProvider = "gmail" + InboxConnectEmailParamsProviderOutlook InboxConnectEmailParamsProvider = "outlook" +) + type InboxDisconnectEmailParams struct { XInboxToken string `header:"x-inbox-token" api:"required" json:"-"` paramObj diff --git a/inbox_test.go b/inbox_test.go index 60b654f..4a2f787 100644 --- a/inbox_test.go +++ b/inbox_test.go @@ -54,6 +54,7 @@ func TestInboxConnectEmailWithOptionalParams(t *testing.T) { ) _, err := client.Inbox.ConnectEmail(context.TODO(), casparser.InboxConnectEmailParams{ RedirectUri: "https://yourapp.com/oauth-callback", + Provider: casparser.InboxConnectEmailParamsProviderOutlook, State: casparser.String("abc123"), }) if err != nil { From 59b6f93aa684c8b6eeda3f569d35eceeff8d0629 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 9 Aug 2026 12:18:00 +0000 Subject: [PATCH 3/4] feat(api): api update --- .stats.yml | 4 ++-- client.go | 9 ++++++++- inbox.go | 46 +++++++++++++++++++++++++++++++++------------- 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8fb9d77..c12f542 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 20 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-5c6cdb8b7a2c0ba449927687bc378823ac947b26b7c2e6c379ae14668b73979a.yml -openapi_spec_hash: 6bc024b866f01da53e2cfd6e404157c7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-4d179917b01ea51a3325e7b37ecbbb60d0ba8f60381fe715ff3ec31284ca8042.yml +openapi_spec_hash: d027d37bd7051aa8c05fe1820c05b316 config_hash: 5509bb7a961ae2e79114b24c381606d4 diff --git a/client.go b/client.go index 6f58047..5ba8101 100644 --- a/client.go +++ b/client.go @@ -43,7 +43,14 @@ type Client struct { ContractNote ContractNoteService // Endpoints for importing CAS files directly from user email inboxes. // - // **Supported Providers:** Gmail (more coming soon) + // **Supported Providers:** + // + // - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains + // - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, + // `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as + // `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered as a + // personal Microsoft account also works, including custom domains. + // - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains // // **How it works:** // diff --git a/inbox.go b/inbox.go index 09e6aca..4d20fe8 100644 --- a/inbox.go +++ b/inbox.go @@ -18,7 +18,14 @@ import ( // Endpoints for importing CAS files directly from user email inboxes. // -// **Supported Providers:** Gmail (more coming soon) +// **Supported Providers:** +// +// - **Gmail** (`gmail`, default) — `@gmail.com` and Google Workspace domains +// - **Microsoft** (`outlook`) — personal Microsoft accounts: `@outlook.com`, +// `@hotmail.com`, `@live.com`, `@msn.com`, and localised variants such as +// `@hotmail.co.uk`, `@live.in`, `@hotmail.fr`. Any other address registered as a +// personal Microsoft account also works, including custom domains. +// - **Zoho Mail** (`zoho`) — Zoho-hosted mailboxes, including custom domains // // **How it works:** // @@ -86,7 +93,10 @@ func (r *InboxService) CheckConnectionStatus(ctx context.Context, body InboxChec // - `state` - Your original state parameter // // **Store the `inbox_token` client-side** and use it for all subsequent inbox API -// calls. +// calls. The token is long-lived (it stores an encrypted refresh token), so a +// single OAuth connect gives ongoing access to both historical and future CAS +// statements in the user's inbox. Reuse the same token until the user revokes +// access via `/v4/inbox/disconnect` or their provider's account settings. func (r *InboxService) ConnectEmail(ctx context.Context, body InboxConnectEmailParams, opts ...option.RequestOption) (res *InboxConnectEmailResponse, err error) { opts = slices.Concat(r.Options, opts) path := "v4/inbox/connect" @@ -160,7 +170,7 @@ type InboxConnectEmailResponse struct { OAuthURL string `json:"oauth_url" format:"uri"` // The provider this OAuth URL was generated for // - // Any of "gmail", "outlook". + // Any of "gmail", "outlook", "zoho". Provider InboxConnectEmailResponseProvider `json:"provider"` Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. @@ -186,6 +196,7 @@ type InboxConnectEmailResponseProvider string const ( InboxConnectEmailResponseProviderGmail InboxConnectEmailResponseProvider = "gmail" InboxConnectEmailResponseProviderOutlook InboxConnectEmailResponseProvider = "outlook" + InboxConnectEmailResponseProviderZoho InboxConnectEmailResponseProvider = "zoho" ) type InboxDisconnectEmailResponse struct { @@ -235,7 +246,7 @@ type InboxListCasFilesResponseFile struct { CasType string `json:"cas_type"` // URL expiration time in seconds. Defaults vary by source: // - // - Gmail Inbox Import: 86400 (24h) + // - Email Inbox Import (Gmail, Outlook, Zoho): 86400 (24h) // - Inbound Email with `callback_url` set: 172800 (48h) // - Inbound Email without `callback_url`: aligned with the session TTL (~30 min) ExpiresIn int64 `json:"expires_in"` @@ -288,13 +299,17 @@ type InboxConnectEmailParams struct { State param.Opt[string] `json:"state,omitzero"` // Mail provider to connect. Defaults to `gmail`. // - // - `gmail` - Google accounts - // - `outlook` - Microsoft accounts + // - `gmail` - Google accounts: `@gmail.com` and Google Workspace domains. + // - `outlook` - personal Microsoft accounts: `@outlook.com`, `@hotmail.com`, + // `@live.com`, `@msn.com` and localised variants (`@hotmail.co.uk`, `@live.in`, + // `@hotmail.fr`). Any other address registered as a personal Microsoft account + // also works, including custom domains. + // - `zoho` - Zoho Mail accounts, including custom domains hosted on Zoho. // - // Any value other than `outlook` is treated as `gmail`. The resolved provider is - // returned in the response. + // Any unrecognised value is treated as `gmail`. The resolved provider is returned + // in the response. // - // Any of "gmail", "outlook". + // Any of "gmail", "outlook", "zoho". Provider InboxConnectEmailParamsProvider `json:"provider,omitzero"` paramObj } @@ -309,16 +324,21 @@ func (r *InboxConnectEmailParams) UnmarshalJSON(data []byte) error { // Mail provider to connect. Defaults to `gmail`. // -// - `gmail` - Google accounts -// - `outlook` - Microsoft accounts +// - `gmail` - Google accounts: `@gmail.com` and Google Workspace domains. +// - `outlook` - personal Microsoft accounts: `@outlook.com`, `@hotmail.com`, +// `@live.com`, `@msn.com` and localised variants (`@hotmail.co.uk`, `@live.in`, +// `@hotmail.fr`). Any other address registered as a personal Microsoft account +// also works, including custom domains. +// - `zoho` - Zoho Mail accounts, including custom domains hosted on Zoho. // -// Any value other than `outlook` is treated as `gmail`. The resolved provider is -// returned in the response. +// Any unrecognised value is treated as `gmail`. The resolved provider is returned +// in the response. type InboxConnectEmailParamsProvider string const ( InboxConnectEmailParamsProviderGmail InboxConnectEmailParamsProvider = "gmail" InboxConnectEmailParamsProviderOutlook InboxConnectEmailParamsProvider = "outlook" + InboxConnectEmailParamsProviderZoho InboxConnectEmailParamsProvider = "zoho" ) type InboxDisconnectEmailParams struct { From cab02a75149f3bf9274e8664db5b0f30ecfe3948 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 9 Aug 2026 12:18:23 +0000 Subject: [PATCH 4/4] release: 0.13.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- internal/version.go | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a713055..d52d2b9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.12.0" + ".": "0.13.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ca96d68..bc78b5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.13.0 (2026-08-09) + +Full Changelog: [v0.12.0...v0.13.0](https://github.com/CASParser/cas-parser-go/compare/v0.12.0...v0.13.0) + +### Features + +* **api:** api update ([59b6f93](https://github.com/CASParser/cas-parser-go/commit/59b6f93aa684c8b6eeda3f569d35eceeff8d0629)) +* **api:** api update ([2d10ba6](https://github.com/CASParser/cas-parser-go/commit/2d10ba6ed8dc08ed843fb0ed010b394387620567)) +* **api:** api update ([d5497ca](https://github.com/CASParser/cas-parser-go/commit/d5497ca0f858ec9b9a6c9dbd342e8dd6c049f0b7)) + ## 0.12.0 (2026-07-26) Full Changelog: [v0.11.0...v0.12.0](https://github.com/CASParser/cas-parser-go/compare/v0.11.0...v0.12.0) diff --git a/README.md b/README.md index 12d1c5b..a5317b1 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Or to pin the version: ```sh -go get -u 'github.com/CASParser/cas-parser-go@v0.12.0' +go get -u 'github.com/CASParser/cas-parser-go@v0.13.0' ``` diff --git a/internal/version.go b/internal/version.go index 71064e9..871f096 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.12.0" // x-release-please-version +const PackageVersion = "0.13.0" // x-release-please-version