-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmart.ts
More file actions
49 lines (43 loc) · 1.43 KB
/
smart.ts
File metadata and controls
49 lines (43 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../core/resource';
import * as CamsKfintechAPI from './cams-kfintech';
import { APIPromise } from '../core/api-promise';
import { RequestOptions } from '../internal/request-options';
import { maybeMultipartFormRequestOptions } from '../internal/uploads';
/**
* Endpoints for parsing CAS PDF files from different sources.
*/
export class Smart extends APIResource {
/**
* This endpoint parses CAS (Consolidated Account Statement) PDF files from NSDL,
* CDSL, or CAMS/KFintech and returns data in a unified format. It auto-detects the
* CAS type and transforms the data into a consistent structure regardless of the
* source.
*/
parseCasPdf(
body: SmartParseCasPdfParams,
options?: RequestOptions,
): APIPromise<CamsKfintechAPI.UnifiedResponse> {
return this._client.post(
'/v4/smart/parse',
maybeMultipartFormRequestOptions({ body, ...options }, this._client),
);
}
}
export interface SmartParseCasPdfParams {
/**
* Password for the PDF file (if required)
*/
password?: string;
/**
* Base64 encoded CAS PDF file (required if pdf_url not provided)
*/
pdf_file?: string;
/**
* URL to the CAS PDF file (required if pdf_file not provided)
*/
pdf_url?: string;
}
export declare namespace Smart {
export { type SmartParseCasPdfParams as SmartParseCasPdfParams };
}