@corsa-labs/sdk 3.9.0 → 3.10.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/README.md +7 -7
- package/dist/models/CreateAlertDto.d.ts +1 -1
- package/dist/webhooks/types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/models/CreateIndividualClientResponseDto.d.ts +0 -60
- package/dist/models/CreateIndividualClientResponseDto.js +0 -27
- package/dist/models/CreateIndividualClientResponseDto.js.map +0 -1
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ import { ComplianceClient, OpenAPI } from '@corsa-labs/sdk';
|
|
|
48
48
|
// OpenAPI.TOKEN = 'YOUR_API_KEY'; // Deprecated: Use HEADERS instead
|
|
49
49
|
|
|
50
50
|
// Configure the base URL
|
|
51
|
-
OpenAPI.BASE = 'https://api
|
|
51
|
+
OpenAPI.BASE = 'https://api.corsa.finance';
|
|
52
52
|
|
|
53
53
|
// Configure Headers for Authentication (Recommended)
|
|
54
54
|
OpenAPI.HEADERS = {
|
|
@@ -59,7 +59,7 @@ const client = new ComplianceClient();
|
|
|
59
59
|
|
|
60
60
|
// Or configure directly in the constructor
|
|
61
61
|
const clientWithConfig = new ComplianceClient({
|
|
62
|
-
BASE: "https://api
|
|
62
|
+
BASE: "https://api.corsa.finance",
|
|
63
63
|
HEADERS: {
|
|
64
64
|
"Authorization": `Bearer ${process.env.API_TOKEN}`
|
|
65
65
|
}
|
|
@@ -85,7 +85,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
85
85
|
|
|
86
86
|
async function main() {
|
|
87
87
|
const client = new ComplianceClient({
|
|
88
|
-
BASE: "https://api
|
|
88
|
+
BASE: "https://api.corsa.finance",
|
|
89
89
|
HEADERS: {
|
|
90
90
|
"Authorization": `Bearer ${process.env.API_TOKEN}` // Use Authorization header
|
|
91
91
|
}
|
|
@@ -194,9 +194,9 @@ The SDK provides utilities for handling webhooks sent from the Compliance API.
|
|
|
194
194
|
When receiving webhooks, inspect the following HTTP headers:
|
|
195
195
|
|
|
196
196
|
* `x-hub-signature-256`: The HMAC SHA256 signature of the request payload. Used for verifying the webhook's authenticity. (See Verifying Signatures below).
|
|
197
|
-
* `x-
|
|
198
|
-
* `x-
|
|
199
|
-
* `x-
|
|
197
|
+
* `x-hook-event`: The type of event that triggered the webhook (e.g., `individual_client.created`).
|
|
198
|
+
* `x-hook-id`: The unique identifier of the webhook configuration that sent this request.
|
|
199
|
+
* `x-hook-delivery`: A unique identifier for this specific delivery attempt.
|
|
200
200
|
|
|
201
201
|
### Verifying Signatures
|
|
202
202
|
|
|
@@ -279,4 +279,4 @@ Contributions are welcome! Please follow standard practices for pull requests.
|
|
|
279
279
|
|
|
280
280
|
## License
|
|
281
281
|
|
|
282
|
-
[MIT](LICENSE)
|
|
282
|
+
[MIT](LICENSE)
|
package/dist/webhooks/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IndividualClientDto } from "../models/IndividualClientDto";
|
|
2
2
|
import { CorporateClientDto } from "../models/CorporateClientDto";
|
|
3
3
|
import { AlertDto } from "../models/AlertDto";
|
|
4
4
|
export declare enum WebhookEventType {
|
package/package.json
CHANGED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { ClientRiskDto } from './ClientRiskDto';
|
|
2
|
-
import type { IndividualClientCustomFieldDataDto } from './IndividualClientCustomFieldDataDto';
|
|
3
|
-
export type CreateIndividualClientResponseDto = {
|
|
4
|
-
/**
|
|
5
|
-
* Unique identifier of the client
|
|
6
|
-
*/
|
|
7
|
-
id: string;
|
|
8
|
-
/**
|
|
9
|
-
* External reference ID for the individual client
|
|
10
|
-
*/
|
|
11
|
-
referenceId?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Created at timestamp of the individual client
|
|
14
|
-
*/
|
|
15
|
-
createdAt?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Updated at timestamp of the individual client
|
|
18
|
-
*/
|
|
19
|
-
updatedAt?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Current activity status of the individual client
|
|
22
|
-
*/
|
|
23
|
-
activityStatus?: CreateIndividualClientResponseDto.activityStatus;
|
|
24
|
-
/**
|
|
25
|
-
* Current account status of the individual client
|
|
26
|
-
*/
|
|
27
|
-
accountStatus?: CreateIndividualClientResponseDto.accountStatus;
|
|
28
|
-
/**
|
|
29
|
-
* Custom fields data for the individual client
|
|
30
|
-
*/
|
|
31
|
-
customFields?: Record<string, IndividualClientCustomFieldDataDto>;
|
|
32
|
-
/**
|
|
33
|
-
* Current risk assessment of the individual client
|
|
34
|
-
*/
|
|
35
|
-
currentRisk?: ClientRiskDto;
|
|
36
|
-
/**
|
|
37
|
-
* Risk history of the individual client
|
|
38
|
-
*/
|
|
39
|
-
riskHistory?: Array<ClientRiskDto>;
|
|
40
|
-
};
|
|
41
|
-
export declare namespace CreateIndividualClientResponseDto {
|
|
42
|
-
/**
|
|
43
|
-
* Current activity status of the individual client
|
|
44
|
-
*/
|
|
45
|
-
enum activityStatus {
|
|
46
|
-
ACTIVE = "ACTIVE",
|
|
47
|
-
NOT_ACTIVE = "NOT_ACTIVE"
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Current account status of the individual client
|
|
51
|
-
*/
|
|
52
|
-
enum accountStatus {
|
|
53
|
-
APPROVED = "APPROVED",
|
|
54
|
-
WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW",
|
|
55
|
-
IN_REVIEW = "IN_REVIEW",
|
|
56
|
-
REJECTED = "REJECTED",
|
|
57
|
-
OFF_BOARDED = "OFF_BOARDED",
|
|
58
|
-
FROZEN = "FROZEN"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateIndividualClientResponseDto = void 0;
|
|
4
|
-
var CreateIndividualClientResponseDto;
|
|
5
|
-
(function (CreateIndividualClientResponseDto) {
|
|
6
|
-
/**
|
|
7
|
-
* Current activity status of the individual client
|
|
8
|
-
*/
|
|
9
|
-
let activityStatus;
|
|
10
|
-
(function (activityStatus) {
|
|
11
|
-
activityStatus["ACTIVE"] = "ACTIVE";
|
|
12
|
-
activityStatus["NOT_ACTIVE"] = "NOT_ACTIVE";
|
|
13
|
-
})(activityStatus = CreateIndividualClientResponseDto.activityStatus || (CreateIndividualClientResponseDto.activityStatus = {}));
|
|
14
|
-
/**
|
|
15
|
-
* Current account status of the individual client
|
|
16
|
-
*/
|
|
17
|
-
let accountStatus;
|
|
18
|
-
(function (accountStatus) {
|
|
19
|
-
accountStatus["APPROVED"] = "APPROVED";
|
|
20
|
-
accountStatus["WAITING_FOR_REVIEW"] = "WAITING_FOR_REVIEW";
|
|
21
|
-
accountStatus["IN_REVIEW"] = "IN_REVIEW";
|
|
22
|
-
accountStatus["REJECTED"] = "REJECTED";
|
|
23
|
-
accountStatus["OFF_BOARDED"] = "OFF_BOARDED";
|
|
24
|
-
accountStatus["FROZEN"] = "FROZEN";
|
|
25
|
-
})(accountStatus = CreateIndividualClientResponseDto.accountStatus || (CreateIndividualClientResponseDto.accountStatus = {}));
|
|
26
|
-
})(CreateIndividualClientResponseDto || (exports.CreateIndividualClientResponseDto = CreateIndividualClientResponseDto = {}));
|
|
27
|
-
//# sourceMappingURL=CreateIndividualClientResponseDto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateIndividualClientResponseDto.js","sourceRoot":"","sources":["../../models/CreateIndividualClientResponseDto.ts"],"names":[],"mappings":";;;AA4CA,IAAiB,iCAAiC,CAmBjD;AAnBD,WAAiB,iCAAiC;IAC9C;;OAEG;IACH,IAAY,cAGX;IAHD,WAAY,cAAc;QACtB,mCAAiB,CAAA;QACjB,2CAAyB,CAAA;IAC7B,CAAC,EAHW,cAAc,GAAd,gDAAc,KAAd,gDAAc,QAGzB;IACD;;OAEG;IACH,IAAY,aAOX;IAPD,WAAY,aAAa;QACrB,sCAAqB,CAAA;QACrB,0DAAyC,CAAA;QACzC,wCAAuB,CAAA;QACvB,sCAAqB,CAAA;QACrB,4CAA2B,CAAA;QAC3B,kCAAiB,CAAA;IACrB,CAAC,EAPW,aAAa,GAAb,+CAAa,KAAb,+CAAa,QAOxB;AACL,CAAC,EAnBgB,iCAAiC,iDAAjC,iCAAiC,QAmBjD"}
|