@@ -53,28 +53,97 @@ interface CasParserClientAsync {
5353 */
5454 fun withOptions (modifier : Consumer <ClientOptions .Builder >): CasParserClientAsync
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 (): CreditServiceAsync
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 (): LogServiceAsync
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 (): AccessTokenServiceAsync
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 (): VerifyTokenServiceAsync
6381
82+ /* * Endpoints for parsing CAS PDF files from different sources. */
6483 fun camsKfintech (): CamsKfintechServiceAsync
6584
85+ /* * Endpoints for parsing CAS PDF files from different sources. */
6686 fun cdsl (): CdslServiceAsync
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 (): ContractNoteServiceAsync
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 (): InboxServiceAsync
71112
113+ /* * Endpoints for generating new CAS documents via email mailback (KFintech). */
72114 fun kfintech (): KfintechServiceAsync
73115
116+ /* * Endpoints for parsing CAS PDF files from different sources. */
74117 fun nsdl (): NsdlServiceAsync
75118
119+ /* * Endpoints for parsing CAS PDF files from different sources. */
76120 fun smart (): SmartServiceAsync
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 (): InboundEmailServiceAsync
79148
80149 /* *
@@ -104,28 +173,97 @@ interface CasParserClientAsync {
104173 modifier : Consumer <ClientOptions .Builder >
105174 ): CasParserClientAsync .WithRawResponse
106175
176+ /* *
177+ * Endpoints for checking API quota and credits usage. These endpoints help you monitor your
178+ * API usage and remaining quota.
179+ */
107180 fun credits (): CreditServiceAsync .WithRawResponse
108181
182+ /* *
183+ * Endpoints for checking API quota and credits usage. These endpoints help you monitor your
184+ * API usage and remaining quota.
185+ */
109186 fun logs (): LogServiceAsync .WithRawResponse
110187
188+ /* *
189+ * Endpoints for managing access tokens for the Portfolio Connect SDK. Use these to generate
190+ * short-lived `at_` prefixed tokens that can be safely passed to frontend applications.
191+ * Access tokens can be used in place of API keys on all v4 endpoints.
192+ */
111193 fun accessToken (): AccessTokenServiceAsync .WithRawResponse
112194
195+ /* *
196+ * Endpoints for managing access tokens for the Portfolio Connect SDK. Use these to generate
197+ * short-lived `at_` prefixed tokens that can be safely passed to frontend applications.
198+ * Access tokens can be used in place of API keys on all v4 endpoints.
199+ */
113200 fun verifyToken (): VerifyTokenServiceAsync .WithRawResponse
114201
202+ /* * Endpoints for parsing CAS PDF files from different sources. */
115203 fun camsKfintech (): CamsKfintechServiceAsync .WithRawResponse
116204
205+ /* * Endpoints for parsing CAS PDF files from different sources. */
117206 fun cdsl (): CdslServiceAsync .WithRawResponse
118207
208+ /* *
209+ * Endpoints for parsing Contract Note PDF files from various SEBI brokers like Zerodha,
210+ * Groww, Upstox, ICICI etc.
211+ */
119212 fun contractNote (): ContractNoteServiceAsync .WithRawResponse
120213
214+ /* *
215+ * Endpoints for importing CAS files directly from user email inboxes.
216+ *
217+ * **Supported Providers:** Gmail (more coming soon)
218+ *
219+ * **How it works:**
220+ * 1. Call `POST /v4/inbox/connect` to get an OAuth URL
221+ * 2. Redirect user to the OAuth URL for consent
222+ * 3. User is redirected back to your `redirect_uri` with an encrypted `inbox_token`
223+ * 4. Use the token to list/fetch CAS files from their inbox (`/v4/inbox/cas`)
224+ * 5. Files are uploaded to temporary cloud storage (URLs expire in 24 hours)
225+ *
226+ * **Security:**
227+ * - Read-only access (we cannot send emails)
228+ * - Tokens are encrypted with server-side secret
229+ * - User can revoke access anytime via `/v4/inbox/disconnect`
230+ */
121231 fun inbox (): InboxServiceAsync .WithRawResponse
122232
233+ /* * Endpoints for generating new CAS documents via email mailback (KFintech). */
123234 fun kfintech (): KfintechServiceAsync .WithRawResponse
124235
236+ /* * Endpoints for parsing CAS PDF files from different sources. */
125237 fun nsdl (): NsdlServiceAsync .WithRawResponse
126238
239+ /* * Endpoints for parsing CAS PDF files from different sources. */
127240 fun smart (): SmartServiceAsync .WithRawResponse
128241
242+ /* *
243+ * Create dedicated inbound email addresses for investors to forward their CAS statements.
244+ *
245+ * **Use Case:** Your app wants to collect CAS statements from users without requiring OAuth
246+ * or file upload.
247+ *
248+ * **How it works:**
249+ * 1. Call `POST /v4/inbound-email` to create a unique inbound email address
250+ * 2. Display this email to your user: "Forward your CAS statement to
251+ * ie_xxx@import.casparser.in"
252+ * 3. When user forwards a CAS email, we verify sender authenticity (SPF/DKIM) and call your
253+ * webhook
254+ * 4. Your webhook receives email metadata + attachment download URLs
255+ *
256+ * **Sender Validation:**
257+ * - Only emails from verified CAS authorities are processed:
258+ * - CDSL: `eCAS@cdslstatement.com`
259+ * - NSDL: `NSDL-CAS@nsdl.co.in`
260+ * - CAMS: `donotreply@camsonline.com`
261+ * - KFintech: `samfS@kfintech.com`
262+ * - Emails failing SPF/DKIM/DMARC are rejected
263+ * - Forwarded emails must contain the original sender in headers
264+ *
265+ * **Billing:** 0.2 credits per successfully processed valid email
266+ */
129267 fun inboundEmail (): InboundEmailServiceAsync .WithRawResponse
130268 }
131269}
0 commit comments