cas-parser-node 1.4.1 → 1.7.1
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 +128 -0
- package/LICENSE +1 -1
- package/README.md +30 -32
- package/client.d.mts +51 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +51 -7
- package/client.d.ts.map +1 -1
- package/client.js +56 -12
- package/client.js.map +1 -1
- package/client.mjs +56 -12
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/internal/tslib.js +17 -17
- package/package.json +9 -10
- package/resources/access-token.d.mts +48 -0
- package/resources/access-token.d.mts.map +1 -0
- package/resources/access-token.d.ts +48 -0
- package/resources/access-token.d.ts.map +1 -0
- package/resources/access-token.js +30 -0
- package/resources/access-token.js.map +1 -0
- package/resources/access-token.mjs +26 -0
- package/resources/access-token.mjs.map +1 -0
- package/resources/{cas-parser.d.mts → cams-kfintech.d.mts} +282 -105
- package/resources/cams-kfintech.d.mts.map +1 -0
- package/resources/{cas-parser.d.ts → cams-kfintech.d.ts} +282 -105
- package/resources/cams-kfintech.d.ts.map +1 -0
- package/resources/cams-kfintech.js +18 -0
- package/resources/cams-kfintech.js.map +1 -0
- package/resources/cams-kfintech.mjs +14 -0
- package/resources/cams-kfintech.mjs.map +1 -0
- package/resources/cdsl/cdsl.d.mts +39 -0
- package/resources/cdsl/cdsl.d.mts.map +1 -0
- package/resources/cdsl/cdsl.d.ts +39 -0
- package/resources/cdsl/cdsl.d.ts.map +1 -0
- package/resources/cdsl/cdsl.js +31 -0
- package/resources/cdsl/cdsl.js.map +1 -0
- package/resources/cdsl/cdsl.mjs +26 -0
- package/resources/cdsl/cdsl.mjs.map +1 -0
- package/resources/cdsl/fetch.d.mts +91 -0
- package/resources/cdsl/fetch.d.mts.map +1 -0
- package/resources/cdsl/fetch.d.ts +91 -0
- package/resources/cdsl/fetch.d.ts.map +1 -0
- package/resources/cdsl/fetch.js +50 -0
- package/resources/cdsl/fetch.js.map +1 -0
- package/resources/cdsl/fetch.mjs +46 -0
- package/resources/cdsl/fetch.mjs.map +1 -0
- package/resources/cdsl/index.d.mts +3 -0
- package/resources/cdsl/index.d.mts.map +1 -0
- package/resources/cdsl/index.d.ts +3 -0
- package/resources/cdsl/index.d.ts.map +1 -0
- package/resources/cdsl/index.js +9 -0
- package/resources/cdsl/index.js.map +1 -0
- package/resources/cdsl/index.mjs +4 -0
- package/resources/cdsl/index.mjs.map +1 -0
- package/resources/cdsl.d.mts +2 -0
- package/resources/cdsl.d.mts.map +1 -0
- package/resources/cdsl.d.ts +2 -0
- package/resources/cdsl.d.ts.map +1 -0
- package/resources/cdsl.js +6 -0
- package/resources/cdsl.js.map +1 -0
- package/resources/cdsl.mjs +3 -0
- package/resources/cdsl.mjs.map +1 -0
- package/resources/contract-note.d.mts +323 -0
- package/resources/contract-note.d.mts.map +1 -0
- package/resources/contract-note.d.ts +323 -0
- package/resources/contract-note.d.ts.map +1 -0
- package/resources/contract-note.js +49 -0
- package/resources/contract-note.js.map +1 -0
- package/resources/contract-note.mjs +45 -0
- package/resources/contract-note.mjs.map +1 -0
- package/resources/credits.d.mts +47 -0
- package/resources/credits.d.mts.map +1 -0
- package/resources/credits.d.ts +47 -0
- package/resources/credits.d.ts.map +1 -0
- package/resources/credits.js +23 -0
- package/resources/credits.js.map +1 -0
- package/resources/credits.mjs +19 -0
- package/resources/credits.mjs.map +1 -0
- package/resources/inbox.d.mts +206 -0
- package/resources/inbox.d.mts.map +1 -0
- package/resources/inbox.d.ts +206 -0
- package/resources/inbox.d.ts.map +1 -0
- package/resources/inbox.js +109 -0
- package/resources/inbox.js.map +1 -0
- package/resources/inbox.mjs +105 -0
- package/resources/inbox.mjs.map +1 -0
- package/resources/index.d.mts +11 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +23 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +11 -2
- package/resources/index.mjs.map +1 -1
- package/resources/kfintech.d.mts +53 -0
- package/resources/kfintech.d.mts.map +1 -0
- package/resources/kfintech.d.ts +53 -0
- package/resources/kfintech.d.ts.map +1 -0
- package/resources/kfintech.js +29 -0
- package/resources/kfintech.js.map +1 -0
- package/resources/kfintech.mjs +25 -0
- package/resources/kfintech.mjs.map +1 -0
- package/resources/logs.d.mts +129 -0
- package/resources/logs.d.mts.map +1 -0
- package/resources/logs.d.ts +129 -0
- package/resources/logs.d.ts.map +1 -0
- package/resources/logs.js +37 -0
- package/resources/logs.js.map +1 -0
- package/resources/logs.mjs +33 -0
- package/resources/logs.mjs.map +1 -0
- package/resources/nsdl.d.mts +30 -0
- package/resources/nsdl.d.mts.map +1 -0
- package/resources/nsdl.d.ts +30 -0
- package/resources/nsdl.d.ts.map +1 -0
- package/resources/nsdl.js +18 -0
- package/resources/nsdl.js.map +1 -0
- package/resources/nsdl.mjs +14 -0
- package/resources/nsdl.mjs.map +1 -0
- package/resources/smart.d.mts +31 -0
- package/resources/smart.d.mts.map +1 -0
- package/resources/smart.d.ts +31 -0
- package/resources/smart.d.ts.map +1 -0
- package/resources/smart.js +19 -0
- package/resources/smart.js.map +1 -0
- package/resources/smart.mjs +15 -0
- package/resources/smart.mjs.map +1 -0
- package/resources/verify-token.d.mts +28 -0
- package/resources/verify-token.d.mts.map +1 -0
- package/resources/verify-token.d.ts +28 -0
- package/resources/verify-token.d.ts.map +1 -0
- package/resources/verify-token.js +16 -0
- package/resources/verify-token.js.map +1 -0
- package/resources/verify-token.mjs +12 -0
- package/resources/verify-token.mjs.map +1 -0
- package/src/client.ts +143 -31
- package/src/internal/parse.ts +6 -0
- package/src/internal/to-file.ts +1 -1
- package/src/resources/access-token.ts +63 -0
- package/src/resources/{cas-parser.ts → cams-kfintech.ts} +340 -130
- package/src/resources/cdsl/cdsl.ts +67 -0
- package/src/resources/cdsl/fetch.ts +122 -0
- package/src/resources/cdsl/index.ts +10 -0
- package/src/resources/cdsl.ts +3 -0
- package/src/resources/contract-note.ts +402 -0
- package/src/resources/credits.ts +58 -0
- package/src/resources/inbox.ts +283 -0
- package/src/resources/index.ts +31 -11
- package/src/resources/kfintech.ts +71 -0
- package/src/resources/logs.ts +170 -0
- package/src/resources/nsdl.ts +42 -0
- package/src/resources/smart.ts +46 -0
- package/src/resources/verify-token.ts +36 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/cas-generator.d.mts +0 -56
- package/resources/cas-generator.d.mts.map +0 -1
- package/resources/cas-generator.d.ts +0 -56
- package/resources/cas-generator.d.ts.map +0 -1
- package/resources/cas-generator.js +0 -27
- package/resources/cas-generator.js.map +0 -1
- package/resources/cas-generator.mjs +0 -23
- package/resources/cas-generator.mjs.map +0 -1
- package/resources/cas-parser.d.mts.map +0 -1
- package/resources/cas-parser.d.ts.map +0 -1
- package/resources/cas-parser.js +0 -43
- package/resources/cas-parser.js.map +0 -1
- package/resources/cas-parser.mjs +0 -39
- package/resources/cas-parser.mjs.map +0 -1
- package/src/resources/cas-generator.ts +0 -75
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../src/resources/inbox.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;OAYG;IACH,qBAAqB,CACnB,MAAM,EAAE,gCAAgC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kC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uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Inbox = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
class Inbox extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Verify if an `inbox_token` is still valid and check connection status.
|
|
10
|
+
*
|
|
11
|
+
* Use this to check if the user needs to re-authenticate (e.g., if they revoked
|
|
12
|
+
* access in their email provider settings).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response = await client.inbox.checkConnectionStatus({
|
|
17
|
+
* 'x-inbox-token': 'x-inbox-token',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
checkConnectionStatus(params, options) {
|
|
22
|
+
const { 'x-inbox-token': xInboxToken } = params;
|
|
23
|
+
return this._client.post('/v4/inbox/status', {
|
|
24
|
+
...options,
|
|
25
|
+
headers: (0, headers_1.buildHeaders)([{ 'x-inbox-token': xInboxToken }, options?.headers]),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Initiate OAuth flow to connect user's email inbox.
|
|
30
|
+
*
|
|
31
|
+
* Returns an `oauth_url` that you should redirect the user to. After
|
|
32
|
+
* authorization, they are redirected back to your `redirect_uri` with the
|
|
33
|
+
* following query parameters:
|
|
34
|
+
*
|
|
35
|
+
* **On success:**
|
|
36
|
+
*
|
|
37
|
+
* - `inbox_token` - Encrypted token to store client-side
|
|
38
|
+
* - `email` - Email address of the connected account
|
|
39
|
+
* - `state` - Your original state parameter (for CSRF verification)
|
|
40
|
+
*
|
|
41
|
+
* **On error:**
|
|
42
|
+
*
|
|
43
|
+
* - `error` - Error code (e.g., `access_denied`, `token_exchange_failed`)
|
|
44
|
+
* - `state` - Your original state parameter
|
|
45
|
+
*
|
|
46
|
+
* **Store the `inbox_token` client-side** and use it for all subsequent inbox API
|
|
47
|
+
* calls.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const response = await client.inbox.connectEmail({
|
|
52
|
+
* redirect_uri: 'https://yourapp.com/oauth-callback',
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
connectEmail(body, options) {
|
|
57
|
+
return this._client.post('/v4/inbox/connect', { body, ...options });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Revoke email access and invalidate the token.
|
|
61
|
+
*
|
|
62
|
+
* This calls the provider's token revocation API (e.g., Google's revoke endpoint)
|
|
63
|
+
* to ensure the user's consent is properly removed.
|
|
64
|
+
*
|
|
65
|
+
* After calling this, the `inbox_token` becomes unusable.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const response = await client.inbox.disconnectEmail({
|
|
70
|
+
* 'x-inbox-token': 'x-inbox-token',
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
disconnectEmail(params, options) {
|
|
75
|
+
const { 'x-inbox-token': xInboxToken } = params;
|
|
76
|
+
return this._client.post('/v4/inbox/disconnect', {
|
|
77
|
+
...options,
|
|
78
|
+
headers: (0, headers_1.buildHeaders)([{ 'x-inbox-token': xInboxToken }, options?.headers]),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Search the user's email inbox for CAS files from known senders (CAMS, KFintech,
|
|
83
|
+
* CDSL, NSDL).
|
|
84
|
+
*
|
|
85
|
+
* Files are uploaded to temporary cloud storage. **URLs expire in 24 hours.**
|
|
86
|
+
*
|
|
87
|
+
* Optionally filter by CAS provider and date range.
|
|
88
|
+
*
|
|
89
|
+
* **Billing:** 0.2 credits per request (charged regardless of success or number of
|
|
90
|
+
* files found).
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* const response = await client.inbox.listCasFiles({
|
|
95
|
+
* 'x-inbox-token': 'x-inbox-token',
|
|
96
|
+
* });
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
listCasFiles(params, options) {
|
|
100
|
+
const { 'x-inbox-token': xInboxToken, ...body } = params;
|
|
101
|
+
return this._client.post('/v4/inbox/cas', {
|
|
102
|
+
body,
|
|
103
|
+
...options,
|
|
104
|
+
headers: (0, headers_1.buildHeaders)([{ 'x-inbox-token': xInboxToken }, options?.headers]),
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.Inbox = Inbox;
|
|
109
|
+
//# sourceMappingURL=inbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox.js","sourceRoot":"","sources":["../src/resources/inbox.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAGnD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;;OAYG;IACH,qBAAqB,CACnB,MAAwC,EACxC,OAAwB;QAExB,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE;YAC3C,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC5E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,YAAY,CACV,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,eAAe,CACb,MAAkC,EAClC,OAAwB;QAExB,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC5E,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CACV,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE;YACxC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC5E,CAAC,CAAC;IACL,CAAC;CACF;AAnHD,sBAmHC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
export class Inbox extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Verify if an `inbox_token` is still valid and check connection status.
|
|
7
|
+
*
|
|
8
|
+
* Use this to check if the user needs to re-authenticate (e.g., if they revoked
|
|
9
|
+
* access in their email provider settings).
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response = await client.inbox.checkConnectionStatus({
|
|
14
|
+
* 'x-inbox-token': 'x-inbox-token',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
checkConnectionStatus(params, options) {
|
|
19
|
+
const { 'x-inbox-token': xInboxToken } = params;
|
|
20
|
+
return this._client.post('/v4/inbox/status', {
|
|
21
|
+
...options,
|
|
22
|
+
headers: buildHeaders([{ 'x-inbox-token': xInboxToken }, options?.headers]),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Initiate OAuth flow to connect user's email inbox.
|
|
27
|
+
*
|
|
28
|
+
* Returns an `oauth_url` that you should redirect the user to. After
|
|
29
|
+
* authorization, they are redirected back to your `redirect_uri` with the
|
|
30
|
+
* following query parameters:
|
|
31
|
+
*
|
|
32
|
+
* **On success:**
|
|
33
|
+
*
|
|
34
|
+
* - `inbox_token` - Encrypted token to store client-side
|
|
35
|
+
* - `email` - Email address of the connected account
|
|
36
|
+
* - `state` - Your original state parameter (for CSRF verification)
|
|
37
|
+
*
|
|
38
|
+
* **On error:**
|
|
39
|
+
*
|
|
40
|
+
* - `error` - Error code (e.g., `access_denied`, `token_exchange_failed`)
|
|
41
|
+
* - `state` - Your original state parameter
|
|
42
|
+
*
|
|
43
|
+
* **Store the `inbox_token` client-side** and use it for all subsequent inbox API
|
|
44
|
+
* calls.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const response = await client.inbox.connectEmail({
|
|
49
|
+
* redirect_uri: 'https://yourapp.com/oauth-callback',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
connectEmail(body, options) {
|
|
54
|
+
return this._client.post('/v4/inbox/connect', { body, ...options });
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Revoke email access and invalidate the token.
|
|
58
|
+
*
|
|
59
|
+
* This calls the provider's token revocation API (e.g., Google's revoke endpoint)
|
|
60
|
+
* to ensure the user's consent is properly removed.
|
|
61
|
+
*
|
|
62
|
+
* After calling this, the `inbox_token` becomes unusable.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const response = await client.inbox.disconnectEmail({
|
|
67
|
+
* 'x-inbox-token': 'x-inbox-token',
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
disconnectEmail(params, options) {
|
|
72
|
+
const { 'x-inbox-token': xInboxToken } = params;
|
|
73
|
+
return this._client.post('/v4/inbox/disconnect', {
|
|
74
|
+
...options,
|
|
75
|
+
headers: buildHeaders([{ 'x-inbox-token': xInboxToken }, options?.headers]),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Search the user's email inbox for CAS files from known senders (CAMS, KFintech,
|
|
80
|
+
* CDSL, NSDL).
|
|
81
|
+
*
|
|
82
|
+
* Files are uploaded to temporary cloud storage. **URLs expire in 24 hours.**
|
|
83
|
+
*
|
|
84
|
+
* Optionally filter by CAS provider and date range.
|
|
85
|
+
*
|
|
86
|
+
* **Billing:** 0.2 credits per request (charged regardless of success or number of
|
|
87
|
+
* files found).
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const response = await client.inbox.listCasFiles({
|
|
92
|
+
* 'x-inbox-token': 'x-inbox-token',
|
|
93
|
+
* });
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
listCasFiles(params, options) {
|
|
97
|
+
const { 'x-inbox-token': xInboxToken, ...body } = params;
|
|
98
|
+
return this._client.post('/v4/inbox/cas', {
|
|
99
|
+
body,
|
|
100
|
+
...options,
|
|
101
|
+
headers: buildHeaders([{ 'x-inbox-token': xInboxToken }, options?.headers]),
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=inbox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox.mjs","sourceRoot":"","sources":["../src/resources/inbox.ts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YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC5E,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { AccessToken, type AccessTokenCreateResponse, type AccessTokenCreateParams } from "./access-token.mjs";
|
|
2
|
+
export { CamsKfintech, type LinkedHolder, type Transaction, type UnifiedResponse, type CamsKfintechParseParams, } from "./cams-kfintech.mjs";
|
|
3
|
+
export { Cdsl, type CdslParsePdfParams } from "./cdsl/cdsl.mjs";
|
|
4
|
+
export { ContractNote, type ContractNoteParseResponse, type ContractNoteParseParams } from "./contract-note.mjs";
|
|
5
|
+
export { Credits, type CreditCheckResponse } from "./credits.mjs";
|
|
6
|
+
export { Inbox, type InboxCheckConnectionStatusResponse, type InboxConnectEmailResponse, type InboxDisconnectEmailResponse, type InboxListCasFilesResponse, type InboxCheckConnectionStatusParams, type InboxConnectEmailParams, type InboxDisconnectEmailParams, type InboxListCasFilesParams, } from "./inbox.mjs";
|
|
7
|
+
export { Kfintech, type KfintechGenerateCasResponse, type KfintechGenerateCasParams } from "./kfintech.mjs";
|
|
8
|
+
export { Logs, type LogCreateResponse, type LogGetSummaryResponse, type LogCreateParams, type LogGetSummaryParams, } from "./logs.mjs";
|
|
9
|
+
export { Nsdl, type NsdlParseParams } from "./nsdl.mjs";
|
|
10
|
+
export { Smart, type SmartParseCasPdfParams } from "./smart.mjs";
|
|
11
|
+
export { VerifyToken, type VerifyTokenVerifyResponse } from "./verify-token.mjs";
|
|
3
12
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC7E,EACL,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,uBAAuB,GAC7B;OACM,EAAE,IAAI,EAAE,KAAK,kBAAkB,EAAE;OACjC,EAAE,YAAY,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC9E,EAAE,OAAO,EAAE,KAAK,mBAAmB,EAAE;OACrC,EACL,KAAK,EACL,KAAK,kCAAkC,EACvC,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,GAC7B;OACM,EAAE,QAAQ,EAAE,KAAK,2BAA2B,EAAE,KAAK,yBAAyB,EAAE;OAC9E,EACL,IAAI,EACJ,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB;OACM,EAAE,IAAI,EAAE,KAAK,eAAe,EAAE;OAC9B,EAAE,KAAK,EAAE,KAAK,sBAAsB,EAAE;OACtC,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { AccessToken, type AccessTokenCreateResponse, type AccessTokenCreateParams } from "./access-token.js";
|
|
2
|
+
export { CamsKfintech, type LinkedHolder, type Transaction, type UnifiedResponse, type CamsKfintechParseParams, } from "./cams-kfintech.js";
|
|
3
|
+
export { Cdsl, type CdslParsePdfParams } from "./cdsl/cdsl.js";
|
|
4
|
+
export { ContractNote, type ContractNoteParseResponse, type ContractNoteParseParams } from "./contract-note.js";
|
|
5
|
+
export { Credits, type CreditCheckResponse } from "./credits.js";
|
|
6
|
+
export { Inbox, type InboxCheckConnectionStatusResponse, type InboxConnectEmailResponse, type InboxDisconnectEmailResponse, type InboxListCasFilesResponse, type InboxCheckConnectionStatusParams, type InboxConnectEmailParams, type InboxDisconnectEmailParams, type InboxListCasFilesParams, } from "./inbox.js";
|
|
7
|
+
export { Kfintech, type KfintechGenerateCasResponse, type KfintechGenerateCasParams } from "./kfintech.js";
|
|
8
|
+
export { Logs, type LogCreateResponse, type LogGetSummaryResponse, type LogCreateParams, type LogGetSummaryParams, } from "./logs.js";
|
|
9
|
+
export { Nsdl, type NsdlParseParams } from "./nsdl.js";
|
|
10
|
+
export { Smart, type SmartParseCasPdfParams } from "./smart.js";
|
|
11
|
+
export { VerifyToken, type VerifyTokenVerifyResponse } from "./verify-token.js";
|
|
3
12
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC7E,EACL,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,uBAAuB,GAC7B;OACM,EAAE,IAAI,EAAE,KAAK,kBAAkB,EAAE;OACjC,EAAE,YAAY,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE;OAC9E,EAAE,OAAO,EAAE,KAAK,mBAAmB,EAAE;OACrC,EACL,KAAK,EACL,KAAK,kCAAkC,EACvC,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,GAC7B;OACM,EAAE,QAAQ,EAAE,KAAK,2BAA2B,EAAE,KAAK,yBAAyB,EAAE;OAC9E,EACL,IAAI,EACJ,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB;OACM,EAAE,IAAI,EAAE,KAAK,eAAe,EAAE;OAC9B,EAAE,KAAK,EAAE,KAAK,sBAAsB,EAAE;OACtC,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE"}
|
package/resources/index.js
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
var
|
|
6
|
-
Object.defineProperty(exports, "
|
|
7
|
-
var
|
|
8
|
-
Object.defineProperty(exports, "
|
|
4
|
+
exports.VerifyToken = exports.Smart = exports.Nsdl = exports.Logs = exports.Kfintech = exports.Inbox = exports.Credits = exports.ContractNote = exports.Cdsl = exports.CamsKfintech = exports.AccessToken = void 0;
|
|
5
|
+
var access_token_1 = require("./access-token.js");
|
|
6
|
+
Object.defineProperty(exports, "AccessToken", { enumerable: true, get: function () { return access_token_1.AccessToken; } });
|
|
7
|
+
var cams_kfintech_1 = require("./cams-kfintech.js");
|
|
8
|
+
Object.defineProperty(exports, "CamsKfintech", { enumerable: true, get: function () { return cams_kfintech_1.CamsKfintech; } });
|
|
9
|
+
var cdsl_1 = require("./cdsl/cdsl.js");
|
|
10
|
+
Object.defineProperty(exports, "Cdsl", { enumerable: true, get: function () { return cdsl_1.Cdsl; } });
|
|
11
|
+
var contract_note_1 = require("./contract-note.js");
|
|
12
|
+
Object.defineProperty(exports, "ContractNote", { enumerable: true, get: function () { return contract_note_1.ContractNote; } });
|
|
13
|
+
var credits_1 = require("./credits.js");
|
|
14
|
+
Object.defineProperty(exports, "Credits", { enumerable: true, get: function () { return credits_1.Credits; } });
|
|
15
|
+
var inbox_1 = require("./inbox.js");
|
|
16
|
+
Object.defineProperty(exports, "Inbox", { enumerable: true, get: function () { return inbox_1.Inbox; } });
|
|
17
|
+
var kfintech_1 = require("./kfintech.js");
|
|
18
|
+
Object.defineProperty(exports, "Kfintech", { enumerable: true, get: function () { return kfintech_1.Kfintech; } });
|
|
19
|
+
var logs_1 = require("./logs.js");
|
|
20
|
+
Object.defineProperty(exports, "Logs", { enumerable: true, get: function () { return logs_1.Logs; } });
|
|
21
|
+
var nsdl_1 = require("./nsdl.js");
|
|
22
|
+
Object.defineProperty(exports, "Nsdl", { enumerable: true, get: function () { return nsdl_1.Nsdl; } });
|
|
23
|
+
var smart_1 = require("./smart.js");
|
|
24
|
+
Object.defineProperty(exports, "Smart", { enumerable: true, get: function () { return smart_1.Smart; } });
|
|
25
|
+
var verify_token_1 = require("./verify-token.js");
|
|
26
|
+
Object.defineProperty(exports, "VerifyToken", { enumerable: true, get: function () { return verify_token_1.VerifyToken; } });
|
|
9
27
|
//# sourceMappingURL=index.js.map
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA2G;AAAlG,2GAAA,WAAW,OAAA;AACpB,oDAMyB;AALvB,6GAAA,YAAY,OAAA;AAMd,uCAA4D;AAAnD,4FAAA,IAAI,OAAA;AACb,oDAA6G;AAApG,6GAAA,YAAY,OAAA;AACrB,wCAA8D;AAArD,kGAAA,OAAO,OAAA;AAChB,oCAUiB;AATf,8FAAA,KAAK,OAAA;AAUP,0CAAwG;AAA/F,oGAAA,QAAQ,OAAA;AACjB,kCAMgB;AALd,4FAAA,IAAI,OAAA;AAMN,kCAAoD;AAA3C,4FAAA,IAAI,OAAA;AACb,oCAA6D;AAApD,8FAAA,KAAK,OAAA;AACd,kDAA6E;AAApE,2GAAA,WAAW,OAAA"}
|
package/resources/index.mjs
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { AccessToken } from "./access-token.mjs";
|
|
3
|
+
export { CamsKfintech, } from "./cams-kfintech.mjs";
|
|
4
|
+
export { Cdsl } from "./cdsl/cdsl.mjs";
|
|
5
|
+
export { ContractNote } from "./contract-note.mjs";
|
|
6
|
+
export { Credits } from "./credits.mjs";
|
|
7
|
+
export { Inbox, } from "./inbox.mjs";
|
|
8
|
+
export { Kfintech } from "./kfintech.mjs";
|
|
9
|
+
export { Logs, } from "./logs.mjs";
|
|
10
|
+
export { Nsdl } from "./nsdl.mjs";
|
|
11
|
+
export { Smart } from "./smart.mjs";
|
|
12
|
+
export { VerifyToken } from "./verify-token.mjs";
|
|
4
13
|
//# sourceMappingURL=index.mjs.map
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,YAAY,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAgE;OAC7E,EACL,YAAY,GAKb;OACM,EAAE,IAAI,EAA2B;OACjC,EAAE,YAAY,EAAgE;OAC9E,EAAE,OAAO,EAA4B;OACrC,EACL,KAAK,GASN;OACM,EAAE,QAAQ,EAAoE;OAC9E,EACL,IAAI,GAKL;OACM,EAAE,IAAI,EAAwB;OAC9B,EAAE,KAAK,EAA+B;OACtC,EAAE,WAAW,EAAkC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class Kfintech extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Generate CAS via KFintech mailback. The CAS PDF will be sent to the investor's
|
|
7
|
+
* email.
|
|
8
|
+
*
|
|
9
|
+
* This is an async operation - the investor receives the CAS via email within a
|
|
10
|
+
* few minutes. For instant CAS retrieval, use CDSL Fetch (`/v4/cdsl/fetch`).
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response = await client.kfintech.generateCas({
|
|
15
|
+
* email: 'user@example.com',
|
|
16
|
+
* from_date: '2023-01-01',
|
|
17
|
+
* password: 'Abcdefghi12$',
|
|
18
|
+
* to_date: '2023-12-31',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
generateCas(body: KfintechGenerateCasParams, options?: RequestOptions): APIPromise<KfintechGenerateCasResponse>;
|
|
23
|
+
}
|
|
24
|
+
export interface KfintechGenerateCasResponse {
|
|
25
|
+
msg?: string;
|
|
26
|
+
status?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface KfintechGenerateCasParams {
|
|
29
|
+
/**
|
|
30
|
+
* Email address to receive the CAS document
|
|
31
|
+
*/
|
|
32
|
+
email: string;
|
|
33
|
+
/**
|
|
34
|
+
* Start date (YYYY-MM-DD)
|
|
35
|
+
*/
|
|
36
|
+
from_date: string;
|
|
37
|
+
/**
|
|
38
|
+
* Password for the PDF
|
|
39
|
+
*/
|
|
40
|
+
password: string;
|
|
41
|
+
/**
|
|
42
|
+
* End date (YYYY-MM-DD)
|
|
43
|
+
*/
|
|
44
|
+
to_date: string;
|
|
45
|
+
/**
|
|
46
|
+
* PAN number (optional)
|
|
47
|
+
*/
|
|
48
|
+
pan_no?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare namespace Kfintech {
|
|
51
|
+
export { type KfintechGenerateCasResponse as KfintechGenerateCasResponse, type KfintechGenerateCasParams as KfintechGenerateCasParams, };
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=kfintech.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kfintech.d.mts","sourceRoot":"","sources":["../src/resources/kfintech.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,CACT,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;CAG3C;AAED,MAAM,WAAW,2BAA2B;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class Kfintech extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Generate CAS via KFintech mailback. The CAS PDF will be sent to the investor's
|
|
7
|
+
* email.
|
|
8
|
+
*
|
|
9
|
+
* This is an async operation - the investor receives the CAS via email within a
|
|
10
|
+
* few minutes. For instant CAS retrieval, use CDSL Fetch (`/v4/cdsl/fetch`).
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response = await client.kfintech.generateCas({
|
|
15
|
+
* email: 'user@example.com',
|
|
16
|
+
* from_date: '2023-01-01',
|
|
17
|
+
* password: 'Abcdefghi12$',
|
|
18
|
+
* to_date: '2023-12-31',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
generateCas(body: KfintechGenerateCasParams, options?: RequestOptions): APIPromise<KfintechGenerateCasResponse>;
|
|
23
|
+
}
|
|
24
|
+
export interface KfintechGenerateCasResponse {
|
|
25
|
+
msg?: string;
|
|
26
|
+
status?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface KfintechGenerateCasParams {
|
|
29
|
+
/**
|
|
30
|
+
* Email address to receive the CAS document
|
|
31
|
+
*/
|
|
32
|
+
email: string;
|
|
33
|
+
/**
|
|
34
|
+
* Start date (YYYY-MM-DD)
|
|
35
|
+
*/
|
|
36
|
+
from_date: string;
|
|
37
|
+
/**
|
|
38
|
+
* Password for the PDF
|
|
39
|
+
*/
|
|
40
|
+
password: string;
|
|
41
|
+
/**
|
|
42
|
+
* End date (YYYY-MM-DD)
|
|
43
|
+
*/
|
|
44
|
+
to_date: string;
|
|
45
|
+
/**
|
|
46
|
+
* PAN number (optional)
|
|
47
|
+
*/
|
|
48
|
+
pan_no?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare namespace Kfintech {
|
|
51
|
+
export { type KfintechGenerateCasResponse as KfintechGenerateCasResponse, type KfintechGenerateCasParams as KfintechGenerateCasParams, };
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=kfintech.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kfintech.d.ts","sourceRoot":"","sources":["../src/resources/kfintech.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,CACT,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;CAG3C;AAED,MAAM,WAAW,2BAA2B;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Kfintech = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class Kfintech extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Generate CAS via KFintech mailback. The CAS PDF will be sent to the investor's
|
|
9
|
+
* email.
|
|
10
|
+
*
|
|
11
|
+
* This is an async operation - the investor receives the CAS via email within a
|
|
12
|
+
* few minutes. For instant CAS retrieval, use CDSL Fetch (`/v4/cdsl/fetch`).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response = await client.kfintech.generateCas({
|
|
17
|
+
* email: 'user@example.com',
|
|
18
|
+
* from_date: '2023-01-01',
|
|
19
|
+
* password: 'Abcdefghi12$',
|
|
20
|
+
* to_date: '2023-12-31',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
generateCas(body, options) {
|
|
25
|
+
return this._client.post('/v4/kfintech/generate', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Kfintech = Kfintech;
|
|
29
|
+
//# sourceMappingURL=kfintech.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kfintech.js","sourceRoot":"","sources":["../src/resources/kfintech.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,CACT,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF;AAxBD,4BAwBC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
export class Kfintech extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Generate CAS via KFintech mailback. The CAS PDF will be sent to the investor's
|
|
6
|
+
* email.
|
|
7
|
+
*
|
|
8
|
+
* This is an async operation - the investor receives the CAS via email within a
|
|
9
|
+
* few minutes. For instant CAS retrieval, use CDSL Fetch (`/v4/cdsl/fetch`).
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const response = await client.kfintech.generateCas({
|
|
14
|
+
* email: 'user@example.com',
|
|
15
|
+
* from_date: '2023-01-01',
|
|
16
|
+
* password: 'Abcdefghi12$',
|
|
17
|
+
* to_date: '2023-12-31',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
generateCas(body, options) {
|
|
22
|
+
return this._client.post('/v4/kfintech/generate', { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=kfintech.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kfintech.mjs","sourceRoot":"","sources":["../src/resources/kfintech.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,CACT,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
export declare class Logs extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve detailed API usage logs for your account.
|
|
7
|
+
*
|
|
8
|
+
* Returns a list of API calls with timestamps, features used, status codes, and
|
|
9
|
+
* credits consumed. Useful for monitoring usage patterns and debugging.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const log = await client.logs.create();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
create(body?: LogCreateParams | null | undefined, options?: RequestOptions): APIPromise<LogCreateResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Get aggregated usage statistics grouped by feature.
|
|
19
|
+
*
|
|
20
|
+
* Useful for understanding which API features are being used most and tracking
|
|
21
|
+
* usage trends.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const response = await client.logs.getSummary();
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
getSummary(body?: LogGetSummaryParams | null | undefined, options?: RequestOptions): APIPromise<LogGetSummaryResponse>;
|
|
29
|
+
}
|
|
30
|
+
export interface LogCreateResponse {
|
|
31
|
+
/**
|
|
32
|
+
* Number of logs returned
|
|
33
|
+
*/
|
|
34
|
+
count?: number;
|
|
35
|
+
logs?: Array<LogCreateResponse.Log>;
|
|
36
|
+
status?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare namespace LogCreateResponse {
|
|
39
|
+
interface Log {
|
|
40
|
+
/**
|
|
41
|
+
* Credits consumed for this request
|
|
42
|
+
*/
|
|
43
|
+
credits?: number;
|
|
44
|
+
/**
|
|
45
|
+
* API feature used
|
|
46
|
+
*/
|
|
47
|
+
feature?: string;
|
|
48
|
+
/**
|
|
49
|
+
* API endpoint path
|
|
50
|
+
*/
|
|
51
|
+
path?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Unique request identifier
|
|
54
|
+
*/
|
|
55
|
+
request_id?: string;
|
|
56
|
+
/**
|
|
57
|
+
* HTTP response status code
|
|
58
|
+
*/
|
|
59
|
+
status_code?: number;
|
|
60
|
+
/**
|
|
61
|
+
* When the request was made
|
|
62
|
+
*/
|
|
63
|
+
timestamp?: string;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export interface LogGetSummaryResponse {
|
|
67
|
+
status?: string;
|
|
68
|
+
summary?: LogGetSummaryResponse.Summary;
|
|
69
|
+
}
|
|
70
|
+
export declare namespace LogGetSummaryResponse {
|
|
71
|
+
interface Summary {
|
|
72
|
+
/**
|
|
73
|
+
* Usage breakdown by feature
|
|
74
|
+
*/
|
|
75
|
+
by_feature?: Array<Summary.ByFeature>;
|
|
76
|
+
/**
|
|
77
|
+
* Total credits consumed in the period
|
|
78
|
+
*/
|
|
79
|
+
total_credits?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Total API requests made in the period
|
|
82
|
+
*/
|
|
83
|
+
total_requests?: number;
|
|
84
|
+
}
|
|
85
|
+
namespace Summary {
|
|
86
|
+
interface ByFeature {
|
|
87
|
+
/**
|
|
88
|
+
* Credits consumed by this feature
|
|
89
|
+
*/
|
|
90
|
+
credits?: number;
|
|
91
|
+
/**
|
|
92
|
+
* API feature name
|
|
93
|
+
*/
|
|
94
|
+
feature?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Number of requests for this feature
|
|
97
|
+
*/
|
|
98
|
+
requests?: number;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export interface LogCreateParams {
|
|
103
|
+
/**
|
|
104
|
+
* End time filter (ISO 8601). Defaults to now.
|
|
105
|
+
*/
|
|
106
|
+
end_time?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Maximum number of logs to return
|
|
109
|
+
*/
|
|
110
|
+
limit?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Start time filter (ISO 8601). Defaults to 30 days ago.
|
|
113
|
+
*/
|
|
114
|
+
start_time?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface LogGetSummaryParams {
|
|
117
|
+
/**
|
|
118
|
+
* End time filter (ISO 8601). Defaults to now.
|
|
119
|
+
*/
|
|
120
|
+
end_time?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Start time filter (ISO 8601). Defaults to start of current month.
|
|
123
|
+
*/
|
|
124
|
+
start_time?: string;
|
|
125
|
+
}
|
|
126
|
+
export declare namespace Logs {
|
|
127
|
+
export { type LogCreateResponse as LogCreateResponse, type LogGetSummaryResponse as LogGetSummaryResponse, type LogCreateParams as LogCreateParams, type LogGetSummaryParams as LogGetSummaryParams, };
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=logs.d.mts.map
|