-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcdsl.ts
More file actions
70 lines (61 loc) · 1.95 KB
/
Copy pathcdsl.ts
File metadata and controls
70 lines (61 loc) · 1.95 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// 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 * as FetchAPI from './fetch';
import {
Fetch,
FetchRequestOtpParams,
FetchRequestOtpResponse,
FetchVerifyOtpParams,
FetchVerifyOtpResponse,
} from './fetch';
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 Cdsl extends APIResource {
fetch: FetchAPI.Fetch = new FetchAPI.Fetch(this._client);
/**
* This endpoint specifically parses CDSL CAS (Consolidated Account Statement) PDF
* files and returns data in a unified format. Use this endpoint when you know the
* PDF is from CDSL.
*
* @example
* ```ts
* const unifiedResponse = await client.cdsl.parsePdf();
* ```
*/
parsePdf(body: CdslParsePdfParams, options?: RequestOptions): APIPromise<CamsKfintechAPI.UnifiedResponse> {
return this._client.post(
'/v4/cdsl/parse',
maybeMultipartFormRequestOptions({ body, ...options }, this._client),
);
}
}
export interface CdslParsePdfParams {
/**
* 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;
}
Cdsl.Fetch = Fetch;
export declare namespace Cdsl {
export { type CdslParsePdfParams as CdslParsePdfParams };
export {
Fetch as Fetch,
type FetchRequestOtpResponse as FetchRequestOtpResponse,
type FetchVerifyOtpResponse as FetchVerifyOtpResponse,
type FetchRequestOtpParams as FetchRequestOtpParams,
type FetchVerifyOtpParams as FetchVerifyOtpParams,
};
}