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/.stats.yml b/.stats.yml index 93de6b1..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-26d0931f3488af784c16303683cbf24225c727615fd32ee071144974e7c59670.yml -openapi_spec_hash: 242a5f4d982645a25e0d66ef088940a5 +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/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/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 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 a1315ef..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" @@ -158,11 +168,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", "zoho". + 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 +190,15 @@ 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" + InboxConnectEmailResponseProviderZoho InboxConnectEmailResponseProvider = "zoho" +) + type InboxDisconnectEmailResponse struct { Msg string `json:"msg"` Status string `json:"status"` @@ -222,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"` @@ -273,6 +297,20 @@ 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: `@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 unrecognised value is treated as `gmail`. The resolved provider is returned + // in the response. + // + // Any of "gmail", "outlook", "zoho". + Provider InboxConnectEmailParamsProvider `json:"provider,omitzero"` paramObj } @@ -284,6 +322,25 @@ func (r *InboxConnectEmailParams) UnmarshalJSON(data []byte) error { return apijson.UnmarshalRoot(data, r) } +// Mail provider to connect. Defaults to `gmail`. +// +// - `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 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 { 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 { 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