cas-parser-node 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/LICENSE +201 -0
- package/README.md +360 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +199 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +199 -0
- package/client.d.ts.map +1 -0
- package/client.js +474 -0
- package/client.js.map +1 -0
- package/client.mjs +470 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +86 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +80 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +138 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/cas-generator.d.mts +56 -0
- package/resources/cas-generator.d.mts.map +1 -0
- package/resources/cas-generator.d.ts +56 -0
- package/resources/cas-generator.d.ts.map +1 -0
- package/resources/cas-generator.js +27 -0
- package/resources/cas-generator.js.map +1 -0
- package/resources/cas-generator.mjs +23 -0
- package/resources/cas-generator.mjs.map +1 -0
- package/resources/cas-parser.d.mts +587 -0
- package/resources/cas-parser.d.mts.map +1 -0
- package/resources/cas-parser.d.ts +587 -0
- package/resources/cas-parser.d.ts.map +1 -0
- package/resources/cas-parser.js +43 -0
- package/resources/cas-parser.js.map +1 -0
- package/resources/cas-parser.mjs +39 -0
- package/resources/cas-parser.mjs.map +1 -0
- package/resources/index.d.mts +3 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +9 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +779 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +127 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/cas-generator.ts +75 -0
- package/src/resources/cas-parser.ts +752 -0
- package/src/resources/index.ts +15 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,752 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { maybeMultipartFormRequestOptions } from '../internal/uploads';
|
|
7
|
+
|
|
8
|
+
export class CasParserResource extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* This endpoint specifically parses CAMS/KFintech CAS (Consolidated Account
|
|
11
|
+
* Statement) PDF files and returns data in a unified format. Use this endpoint
|
|
12
|
+
* when you know the PDF is from CAMS or KFintech.
|
|
13
|
+
*/
|
|
14
|
+
camsKfintech(body: CasParserCamsKfintechParams, options?: RequestOptions): APIPromise<UnifiedResponse> {
|
|
15
|
+
return this._client.post(
|
|
16
|
+
'/v4/cams_kfintech/parse',
|
|
17
|
+
maybeMultipartFormRequestOptions({ body, ...options }, this._client),
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* This endpoint specifically parses CDSL CAS (Consolidated Account Statement) PDF
|
|
23
|
+
* files and returns data in a unified format. Use this endpoint when you know the
|
|
24
|
+
* PDF is from CDSL.
|
|
25
|
+
*/
|
|
26
|
+
cdsl(body: CasParserCdslParams, options?: RequestOptions): APIPromise<UnifiedResponse> {
|
|
27
|
+
return this._client.post(
|
|
28
|
+
'/v4/cdsl/parse',
|
|
29
|
+
maybeMultipartFormRequestOptions({ body, ...options }, this._client),
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* This endpoint specifically parses NSDL CAS (Consolidated Account Statement) PDF
|
|
35
|
+
* files and returns data in a unified format. Use this endpoint when you know the
|
|
36
|
+
* PDF is from NSDL.
|
|
37
|
+
*/
|
|
38
|
+
nsdl(body: CasParserNsdlParams, options?: RequestOptions): APIPromise<UnifiedResponse> {
|
|
39
|
+
return this._client.post(
|
|
40
|
+
'/v4/nsdl/parse',
|
|
41
|
+
maybeMultipartFormRequestOptions({ body, ...options }, this._client),
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* This endpoint parses CAS (Consolidated Account Statement) PDF files from NSDL,
|
|
47
|
+
* CDSL, or CAMS/KFintech and returns data in a unified format. It auto-detects the
|
|
48
|
+
* CAS type and transforms the data into a consistent structure regardless of the
|
|
49
|
+
* source.
|
|
50
|
+
*/
|
|
51
|
+
smartParse(body: CasParserSmartParseParams, options?: RequestOptions): APIPromise<UnifiedResponse> {
|
|
52
|
+
return this._client.post(
|
|
53
|
+
'/v4/smart/parse',
|
|
54
|
+
maybeMultipartFormRequestOptions({ body, ...options }, this._client),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface UnifiedResponse {
|
|
60
|
+
demat_accounts?: Array<UnifiedResponse.DematAccount>;
|
|
61
|
+
|
|
62
|
+
insurance?: UnifiedResponse.Insurance;
|
|
63
|
+
|
|
64
|
+
investor?: UnifiedResponse.Investor;
|
|
65
|
+
|
|
66
|
+
meta?: UnifiedResponse.Meta;
|
|
67
|
+
|
|
68
|
+
mutual_funds?: Array<UnifiedResponse.MutualFund>;
|
|
69
|
+
|
|
70
|
+
summary?: UnifiedResponse.Summary;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export namespace UnifiedResponse {
|
|
74
|
+
export interface DematAccount {
|
|
75
|
+
/**
|
|
76
|
+
* Additional information specific to the demat account type
|
|
77
|
+
*/
|
|
78
|
+
additional_info?: DematAccount.AdditionalInfo;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Beneficiary Owner ID (primarily for CDSL)
|
|
82
|
+
*/
|
|
83
|
+
bo_id?: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Client ID
|
|
87
|
+
*/
|
|
88
|
+
client_id?: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Type of demat account
|
|
92
|
+
*/
|
|
93
|
+
demat_type?: 'NSDL' | 'CDSL';
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Depository Participant ID
|
|
97
|
+
*/
|
|
98
|
+
dp_id?: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Depository Participant name
|
|
102
|
+
*/
|
|
103
|
+
dp_name?: string;
|
|
104
|
+
|
|
105
|
+
holdings?: DematAccount.Holdings;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Total value of the demat account
|
|
109
|
+
*/
|
|
110
|
+
value?: number;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export namespace DematAccount {
|
|
114
|
+
/**
|
|
115
|
+
* Additional information specific to the demat account type
|
|
116
|
+
*/
|
|
117
|
+
export interface AdditionalInfo {
|
|
118
|
+
/**
|
|
119
|
+
* Beneficiary Owner status (CDSL)
|
|
120
|
+
*/
|
|
121
|
+
bo_status?: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Beneficiary Owner sub-status (CDSL)
|
|
125
|
+
*/
|
|
126
|
+
bo_sub_status?: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Beneficiary Owner type (CDSL)
|
|
130
|
+
*/
|
|
131
|
+
bo_type?: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Basic Services Demat Account status (CDSL)
|
|
135
|
+
*/
|
|
136
|
+
bsda?: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Email associated with the demat account (CDSL)
|
|
140
|
+
*/
|
|
141
|
+
email?: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* List of linked PAN numbers (NSDL)
|
|
145
|
+
*/
|
|
146
|
+
linked_pans?: Array<string>;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Nominee details (CDSL)
|
|
150
|
+
*/
|
|
151
|
+
nominee?: string;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Account status (CDSL)
|
|
155
|
+
*/
|
|
156
|
+
status?: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface Holdings {
|
|
160
|
+
aifs?: Array<Holdings.Aif>;
|
|
161
|
+
|
|
162
|
+
corporate_bonds?: Array<Holdings.CorporateBond>;
|
|
163
|
+
|
|
164
|
+
demat_mutual_funds?: Array<Holdings.DematMutualFund>;
|
|
165
|
+
|
|
166
|
+
equities?: Array<Holdings.Equity>;
|
|
167
|
+
|
|
168
|
+
government_securities?: Array<Holdings.GovernmentSecurity>;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export namespace Holdings {
|
|
172
|
+
export interface Aif {
|
|
173
|
+
/**
|
|
174
|
+
* Additional information specific to the AIF
|
|
175
|
+
*/
|
|
176
|
+
additional_info?: unknown;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* ISIN code of the AIF
|
|
180
|
+
*/
|
|
181
|
+
isin?: string;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Name of the AIF
|
|
185
|
+
*/
|
|
186
|
+
name?: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Number of units held
|
|
190
|
+
*/
|
|
191
|
+
units?: number;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Current market value of the holding
|
|
195
|
+
*/
|
|
196
|
+
value?: number;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface CorporateBond {
|
|
200
|
+
/**
|
|
201
|
+
* Additional information specific to the corporate bond
|
|
202
|
+
*/
|
|
203
|
+
additional_info?: unknown;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* ISIN code of the corporate bond
|
|
207
|
+
*/
|
|
208
|
+
isin?: string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Name of the corporate bond
|
|
212
|
+
*/
|
|
213
|
+
name?: string;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Number of units held
|
|
217
|
+
*/
|
|
218
|
+
units?: number;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Current market value of the holding
|
|
222
|
+
*/
|
|
223
|
+
value?: number;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface DematMutualFund {
|
|
227
|
+
/**
|
|
228
|
+
* Additional information specific to the mutual fund
|
|
229
|
+
*/
|
|
230
|
+
additional_info?: unknown;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* ISIN code of the mutual fund
|
|
234
|
+
*/
|
|
235
|
+
isin?: string;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Name of the mutual fund
|
|
239
|
+
*/
|
|
240
|
+
name?: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Number of units held
|
|
244
|
+
*/
|
|
245
|
+
units?: number;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Current market value of the holding
|
|
249
|
+
*/
|
|
250
|
+
value?: number;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface Equity {
|
|
254
|
+
/**
|
|
255
|
+
* Additional information specific to the equity
|
|
256
|
+
*/
|
|
257
|
+
additional_info?: unknown;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* ISIN code of the equity
|
|
261
|
+
*/
|
|
262
|
+
isin?: string;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Name of the equity
|
|
266
|
+
*/
|
|
267
|
+
name?: string;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Number of units held
|
|
271
|
+
*/
|
|
272
|
+
units?: number;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Current market value of the holding
|
|
276
|
+
*/
|
|
277
|
+
value?: number;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export interface GovernmentSecurity {
|
|
281
|
+
/**
|
|
282
|
+
* Additional information specific to the government security
|
|
283
|
+
*/
|
|
284
|
+
additional_info?: unknown;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* ISIN code of the government security
|
|
288
|
+
*/
|
|
289
|
+
isin?: string;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Name of the government security
|
|
293
|
+
*/
|
|
294
|
+
name?: string;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Number of units held
|
|
298
|
+
*/
|
|
299
|
+
units?: number;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Current market value of the holding
|
|
303
|
+
*/
|
|
304
|
+
value?: number;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export interface Insurance {
|
|
310
|
+
life_insurance_policies?: Array<Insurance.LifeInsurancePolicy>;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export namespace Insurance {
|
|
314
|
+
export interface LifeInsurancePolicy {
|
|
315
|
+
/**
|
|
316
|
+
* Additional information specific to the policy
|
|
317
|
+
*/
|
|
318
|
+
additional_info?: unknown;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Name of the life assured
|
|
322
|
+
*/
|
|
323
|
+
life_assured?: string;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Name of the insurance policy
|
|
327
|
+
*/
|
|
328
|
+
policy_name?: string;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Insurance policy number
|
|
332
|
+
*/
|
|
333
|
+
policy_number?: string;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Premium amount
|
|
337
|
+
*/
|
|
338
|
+
premium_amount?: number;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Frequency of premium payment (e.g., Annual, Monthly)
|
|
342
|
+
*/
|
|
343
|
+
premium_frequency?: string;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Insurance company name
|
|
347
|
+
*/
|
|
348
|
+
provider?: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Status of the policy (e.g., Active, Lapsed)
|
|
352
|
+
*/
|
|
353
|
+
status?: string;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Sum assured amount
|
|
357
|
+
*/
|
|
358
|
+
sum_assured?: number;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export interface Investor {
|
|
363
|
+
/**
|
|
364
|
+
* Address of the investor
|
|
365
|
+
*/
|
|
366
|
+
address?: string;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* CAS ID of the investor (only for NSDL and CDSL)
|
|
370
|
+
*/
|
|
371
|
+
cas_id?: string;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Email address of the investor
|
|
375
|
+
*/
|
|
376
|
+
email?: string;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Mobile number of the investor
|
|
380
|
+
*/
|
|
381
|
+
mobile?: string;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Name of the investor
|
|
385
|
+
*/
|
|
386
|
+
name?: string;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* PAN (Permanent Account Number) of the investor
|
|
390
|
+
*/
|
|
391
|
+
pan?: string;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Postal code of the investor's address
|
|
395
|
+
*/
|
|
396
|
+
pincode?: string;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export interface Meta {
|
|
400
|
+
/**
|
|
401
|
+
* Type of CAS detected and processed
|
|
402
|
+
*/
|
|
403
|
+
cas_type?: 'NSDL' | 'CDSL' | 'CAMS_KFINTECH';
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Timestamp when the response was generated
|
|
407
|
+
*/
|
|
408
|
+
generated_at?: string;
|
|
409
|
+
|
|
410
|
+
statement_period?: Meta.StatementPeriod;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export namespace Meta {
|
|
414
|
+
export interface StatementPeriod {
|
|
415
|
+
/**
|
|
416
|
+
* Start date of the statement period
|
|
417
|
+
*/
|
|
418
|
+
from?: string;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* End date of the statement period
|
|
422
|
+
*/
|
|
423
|
+
to?: string;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export interface MutualFund {
|
|
428
|
+
/**
|
|
429
|
+
* Additional folio information
|
|
430
|
+
*/
|
|
431
|
+
additional_info?: MutualFund.AdditionalInfo;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Asset Management Company name
|
|
435
|
+
*/
|
|
436
|
+
amc?: string;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Folio number
|
|
440
|
+
*/
|
|
441
|
+
folio_number?: string;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Registrar and Transfer Agent name
|
|
445
|
+
*/
|
|
446
|
+
registrar?: string;
|
|
447
|
+
|
|
448
|
+
schemes?: Array<MutualFund.Scheme>;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Total value of the folio
|
|
452
|
+
*/
|
|
453
|
+
value?: number;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export namespace MutualFund {
|
|
457
|
+
/**
|
|
458
|
+
* Additional folio information
|
|
459
|
+
*/
|
|
460
|
+
export interface AdditionalInfo {
|
|
461
|
+
/**
|
|
462
|
+
* KYC status of the folio
|
|
463
|
+
*/
|
|
464
|
+
kyc?: string;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* PAN associated with the folio
|
|
468
|
+
*/
|
|
469
|
+
pan?: string;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* PAN KYC status
|
|
473
|
+
*/
|
|
474
|
+
pankyc?: string;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export interface Scheme {
|
|
478
|
+
/**
|
|
479
|
+
* Additional information specific to the scheme
|
|
480
|
+
*/
|
|
481
|
+
additional_info?: Scheme.AdditionalInfo;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Cost of investment
|
|
485
|
+
*/
|
|
486
|
+
cost?: number;
|
|
487
|
+
|
|
488
|
+
gain?: Scheme.Gain;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* ISIN code of the scheme
|
|
492
|
+
*/
|
|
493
|
+
isin?: string;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Scheme name
|
|
497
|
+
*/
|
|
498
|
+
name?: string;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Net Asset Value per unit
|
|
502
|
+
*/
|
|
503
|
+
nav?: number;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* List of nominees
|
|
507
|
+
*/
|
|
508
|
+
nominees?: Array<string>;
|
|
509
|
+
|
|
510
|
+
transactions?: Array<Scheme.Transaction>;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Type of mutual fund scheme
|
|
514
|
+
*/
|
|
515
|
+
type?: 'Equity' | 'Debt' | 'Hybrid' | 'Other';
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Number of units held
|
|
519
|
+
*/
|
|
520
|
+
units?: number;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Current market value of the holding
|
|
524
|
+
*/
|
|
525
|
+
value?: number;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export namespace Scheme {
|
|
529
|
+
/**
|
|
530
|
+
* Additional information specific to the scheme
|
|
531
|
+
*/
|
|
532
|
+
export interface AdditionalInfo {
|
|
533
|
+
/**
|
|
534
|
+
* Financial advisor name (CAMS/KFintech)
|
|
535
|
+
*/
|
|
536
|
+
advisor?: string;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* AMFI code for the scheme (CAMS/KFintech)
|
|
540
|
+
*/
|
|
541
|
+
amfi?: string;
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Closing balance units (CAMS/KFintech)
|
|
545
|
+
*/
|
|
546
|
+
close_units?: number;
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Opening balance units (CAMS/KFintech)
|
|
550
|
+
*/
|
|
551
|
+
open_units?: number;
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* RTA code for the scheme (CAMS/KFintech)
|
|
555
|
+
*/
|
|
556
|
+
rta_code?: string;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
export interface Gain {
|
|
560
|
+
/**
|
|
561
|
+
* Absolute gain or loss
|
|
562
|
+
*/
|
|
563
|
+
absolute?: number;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Percentage gain or loss
|
|
567
|
+
*/
|
|
568
|
+
percentage?: number;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
export interface Transaction {
|
|
572
|
+
/**
|
|
573
|
+
* Transaction amount
|
|
574
|
+
*/
|
|
575
|
+
amount?: number;
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Balance units after transaction
|
|
579
|
+
*/
|
|
580
|
+
balance?: number;
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Transaction date
|
|
584
|
+
*/
|
|
585
|
+
date?: string;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Transaction description
|
|
589
|
+
*/
|
|
590
|
+
description?: string;
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Dividend rate (for dividend transactions)
|
|
594
|
+
*/
|
|
595
|
+
dividend_rate?: number;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* NAV on transaction date
|
|
599
|
+
*/
|
|
600
|
+
nav?: number;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Transaction type detected based on description. Possible values are
|
|
604
|
+
* PURCHASE,PURCHASE_SIP,REDEMPTION,SWITCH_IN,SWITCH_IN_MERGER,SWITCH_OUT,SWITCH_OUT_MERGER,DIVIDEND_PAYOUT,DIVIDEND_REINVESTMENT,SEGREGATION,STAMP_DUTY_TAX,TDS_TAX,STT_TAX,MISC.
|
|
605
|
+
* If dividend_rate is present, then possible values are dividend_rate is
|
|
606
|
+
* applicable only for DIVIDEND_PAYOUT and DIVIDEND_REINVESTMENT.
|
|
607
|
+
*/
|
|
608
|
+
type?: string;
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Number of units involved
|
|
612
|
+
*/
|
|
613
|
+
units?: number;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
export interface Summary {
|
|
619
|
+
accounts?: Summary.Accounts;
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Total portfolio value across all accounts
|
|
623
|
+
*/
|
|
624
|
+
total_value?: number;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
export namespace Summary {
|
|
628
|
+
export interface Accounts {
|
|
629
|
+
demat?: Accounts.Demat;
|
|
630
|
+
|
|
631
|
+
insurance?: Accounts.Insurance;
|
|
632
|
+
|
|
633
|
+
mutual_funds?: Accounts.MutualFunds;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
export namespace Accounts {
|
|
637
|
+
export interface Demat {
|
|
638
|
+
/**
|
|
639
|
+
* Number of demat accounts
|
|
640
|
+
*/
|
|
641
|
+
count?: number;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Total value of demat accounts
|
|
645
|
+
*/
|
|
646
|
+
total_value?: number;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
export interface Insurance {
|
|
650
|
+
/**
|
|
651
|
+
* Number of insurance policies
|
|
652
|
+
*/
|
|
653
|
+
count?: number;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Total value of insurance policies
|
|
657
|
+
*/
|
|
658
|
+
total_value?: number;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export interface MutualFunds {
|
|
662
|
+
/**
|
|
663
|
+
* Number of mutual fund folios
|
|
664
|
+
*/
|
|
665
|
+
count?: number;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Total value of mutual funds
|
|
669
|
+
*/
|
|
670
|
+
total_value?: number;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
export interface CasParserCamsKfintechParams {
|
|
677
|
+
/**
|
|
678
|
+
* Password for the PDF file (if required)
|
|
679
|
+
*/
|
|
680
|
+
password?: string;
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Base64 encoded CAS PDF file
|
|
684
|
+
*/
|
|
685
|
+
pdf_file?: string;
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* URL to the CAS PDF file
|
|
689
|
+
*/
|
|
690
|
+
pdf_url?: string;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export interface CasParserCdslParams {
|
|
694
|
+
/**
|
|
695
|
+
* Password for the PDF file (if required)
|
|
696
|
+
*/
|
|
697
|
+
password?: string;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Base64 encoded CAS PDF file
|
|
701
|
+
*/
|
|
702
|
+
pdf_file?: string;
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* URL to the CAS PDF file
|
|
706
|
+
*/
|
|
707
|
+
pdf_url?: string;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
export interface CasParserNsdlParams {
|
|
711
|
+
/**
|
|
712
|
+
* Password for the PDF file (if required)
|
|
713
|
+
*/
|
|
714
|
+
password?: string;
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* Base64 encoded CAS PDF file
|
|
718
|
+
*/
|
|
719
|
+
pdf_file?: string;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* URL to the CAS PDF file
|
|
723
|
+
*/
|
|
724
|
+
pdf_url?: string;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export interface CasParserSmartParseParams {
|
|
728
|
+
/**
|
|
729
|
+
* Password for the PDF file (if required)
|
|
730
|
+
*/
|
|
731
|
+
password?: string;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Base64 encoded CAS PDF file
|
|
735
|
+
*/
|
|
736
|
+
pdf_file?: string;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* URL to the CAS PDF file
|
|
740
|
+
*/
|
|
741
|
+
pdf_url?: string;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
export declare namespace CasParserResource {
|
|
745
|
+
export {
|
|
746
|
+
type UnifiedResponse as UnifiedResponse,
|
|
747
|
+
type CasParserCamsKfintechParams as CasParserCamsKfintechParams,
|
|
748
|
+
type CasParserCdslParams as CasParserCdslParams,
|
|
749
|
+
type CasParserNsdlParams as CasParserNsdlParams,
|
|
750
|
+
type CasParserSmartParseParams as CasParserSmartParseParams,
|
|
751
|
+
};
|
|
752
|
+
}
|