@@ -53,28 +53,97 @@ interface CasParserClient {
5353 */
5454 fun withOptions (modifier : Consumer <ClientOptions .Builder >): CasParserClient
5555
56+ /* *
57+ * Endpoints for checking API quota and credits usage. These endpoints help you monitor your API
58+ * usage and remaining quota.
59+ */
5660 fun credits (): CreditService
5761
62+ /* *
63+ * Endpoints for checking API quota and credits usage. These endpoints help you monitor your API
64+ * usage and remaining quota.
65+ */
5866 fun logs (): LogService
5967
68+ /* *
69+ * Endpoints for managing access tokens for the Portfolio Connect SDK. Use these to generate
70+ * short-lived `at_` prefixed tokens that can be safely passed to frontend applications. Access
71+ * tokens can be used in place of API keys on all v4 endpoints.
72+ */
6073 fun accessToken (): AccessTokenService
6174
75+ /* *
76+ * Endpoints for managing access tokens for the Portfolio Connect SDK. Use these to generate
77+ * short-lived `at_` prefixed tokens that can be safely passed to frontend applications. Access
78+ * tokens can be used in place of API keys on all v4 endpoints.
79+ */
6280 fun verifyToken (): VerifyTokenService
6381
82+ /* * Endpoints for parsing CAS PDF files from different sources. */
6483 fun camsKfintech (): CamsKfintechService
6584
85+ /* * Endpoints for parsing CAS PDF files from different sources. */
6686 fun cdsl (): CdslService
6787
88+ /* *
89+ * Endpoints for parsing Contract Note PDF files from various SEBI brokers like Zerodha, Groww,
90+ * Upstox, ICICI etc.
91+ */
6892 fun contractNote (): ContractNoteService
6993
94+ /* *
95+ * Endpoints for importing CAS files directly from user email inboxes.
96+ *
97+ * **Supported Providers:** Gmail (more coming soon)
98+ *
99+ * **How it works:**
100+ * 1. Call `POST /v4/inbox/connect` to get an OAuth URL
101+ * 2. Redirect user to the OAuth URL for consent
102+ * 3. User is redirected back to your `redirect_uri` with an encrypted `inbox_token`
103+ * 4. Use the token to list/fetch CAS files from their inbox (`/v4/inbox/cas`)
104+ * 5. Files are uploaded to temporary cloud storage (URLs expire in 24 hours)
105+ *
106+ * **Security:**
107+ * - Read-only access (we cannot send emails)
108+ * - Tokens are encrypted with server-side secret
109+ * - User can revoke access anytime via `/v4/inbox/disconnect`
110+ */
70111 fun inbox (): InboxService
71112
113+ /* * Endpoints for generating new CAS documents via email mailback (KFintech). */
72114 fun kfintech (): KfintechService
73115
116+ /* * Endpoints for parsing CAS PDF files from different sources. */
74117 fun nsdl (): NsdlService
75118
119+ /* * Endpoints for parsing CAS PDF files from different sources. */
76120 fun smart (): SmartService
77121
122+ /* *
123+ * Create dedicated inbound email addresses for investors to forward their CAS statements.
124+ *
125+ * **Use Case:** Your app wants to collect CAS statements from users without requiring OAuth or
126+ * file upload.
127+ *
128+ * **How it works:**
129+ * 1. Call `POST /v4/inbound-email` to create a unique inbound email address
130+ * 2. Display this email to your user: "Forward your CAS statement to
131+ * ie_xxx@import.casparser.in"
132+ * 3. When user forwards a CAS email, we verify sender authenticity (SPF/DKIM) and call your
133+ * webhook
134+ * 4. Your webhook receives email metadata + attachment download URLs
135+ *
136+ * **Sender Validation:**
137+ * - Only emails from verified CAS authorities are processed:
138+ * - CDSL: `eCAS@cdslstatement.com`
139+ * - NSDL: `NSDL-CAS@nsdl.co.in`
140+ * - CAMS: `donotreply@camsonline.com`
141+ * - KFintech: `samfS@kfintech.com`
142+ * - Emails failing SPF/DKIM/DMARC are rejected
143+ * - Forwarded emails must contain the original sender in headers
144+ *
145+ * **Billing:** 0.2 credits per successfully processed valid email
146+ */
78147 fun inboundEmail (): InboundEmailService
79148
80149 /* *
@@ -100,28 +169,97 @@ interface CasParserClient {
100169 */
101170 fun withOptions (modifier : Consumer <ClientOptions .Builder >): CasParserClient .WithRawResponse
102171
172+ /* *
173+ * Endpoints for checking API quota and credits usage. These endpoints help you monitor your
174+ * API usage and remaining quota.
175+ */
103176 fun credits (): CreditService .WithRawResponse
104177
178+ /* *
179+ * Endpoints for checking API quota and credits usage. These endpoints help you monitor your
180+ * API usage and remaining quota.
181+ */
105182 fun logs (): LogService .WithRawResponse
106183
184+ /* *
185+ * Endpoints for managing access tokens for the Portfolio Connect SDK. Use these to generate
186+ * short-lived `at_` prefixed tokens that can be safely passed to frontend applications.
187+ * Access tokens can be used in place of API keys on all v4 endpoints.
188+ */
107189 fun accessToken (): AccessTokenService .WithRawResponse
108190
191+ /* *
192+ * Endpoints for managing access tokens for the Portfolio Connect SDK. Use these to generate
193+ * short-lived `at_` prefixed tokens that can be safely passed to frontend applications.
194+ * Access tokens can be used in place of API keys on all v4 endpoints.
195+ */
109196 fun verifyToken (): VerifyTokenService .WithRawResponse
110197
198+ /* * Endpoints for parsing CAS PDF files from different sources. */
111199 fun camsKfintech (): CamsKfintechService .WithRawResponse
112200
201+ /* * Endpoints for parsing CAS PDF files from different sources. */
113202 fun cdsl (): CdslService .WithRawResponse
114203
204+ /* *
205+ * Endpoints for parsing Contract Note PDF files from various SEBI brokers like Zerodha,
206+ * Groww, Upstox, ICICI etc.
207+ */
115208 fun contractNote (): ContractNoteService .WithRawResponse
116209
210+ /* *
211+ * Endpoints for importing CAS files directly from user email inboxes.
212+ *
213+ * **Supported Providers:** Gmail (more coming soon)
214+ *
215+ * **How it works:**
216+ * 1. Call `POST /v4/inbox/connect` to get an OAuth URL
217+ * 2. Redirect user to the OAuth URL for consent
218+ * 3. User is redirected back to your `redirect_uri` with an encrypted `inbox_token`
219+ * 4. Use the token to list/fetch CAS files from their inbox (`/v4/inbox/cas`)
220+ * 5. Files are uploaded to temporary cloud storage (URLs expire in 24 hours)
221+ *
222+ * **Security:**
223+ * - Read-only access (we cannot send emails)
224+ * - Tokens are encrypted with server-side secret
225+ * - User can revoke access anytime via `/v4/inbox/disconnect`
226+ */
117227 fun inbox (): InboxService .WithRawResponse
118228
229+ /* * Endpoints for generating new CAS documents via email mailback (KFintech). */
119230 fun kfintech (): KfintechService .WithRawResponse
120231
232+ /* * Endpoints for parsing CAS PDF files from different sources. */
121233 fun nsdl (): NsdlService .WithRawResponse
122234
235+ /* * Endpoints for parsing CAS PDF files from different sources. */
123236 fun smart (): SmartService .WithRawResponse
124237
238+ /* *
239+ * Create dedicated inbound email addresses for investors to forward their CAS statements.
240+ *
241+ * **Use Case:** Your app wants to collect CAS statements from users without requiring OAuth
242+ * or file upload.
243+ *
244+ * **How it works:**
245+ * 1. Call `POST /v4/inbound-email` to create a unique inbound email address
246+ * 2. Display this email to your user: "Forward your CAS statement to
247+ * ie_xxx@import.casparser.in"
248+ * 3. When user forwards a CAS email, we verify sender authenticity (SPF/DKIM) and call your
249+ * webhook
250+ * 4. Your webhook receives email metadata + attachment download URLs
251+ *
252+ * **Sender Validation:**
253+ * - Only emails from verified CAS authorities are processed:
254+ * - CDSL: `eCAS@cdslstatement.com`
255+ * - NSDL: `NSDL-CAS@nsdl.co.in`
256+ * - CAMS: `donotreply@camsonline.com`
257+ * - KFintech: `samfS@kfintech.com`
258+ * - Emails failing SPF/DKIM/DMARC are rejected
259+ * - Forwarded emails must contain the original sender in headers
260+ *
261+ * **Billing:** 0.2 credits per successfully processed valid email
262+ */
125263 fun inboundEmail (): InboundEmailService .WithRawResponse
126264 }
127265}
0 commit comments