@corsa-labs/sdk 3.13.0 → 3.14.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.
Files changed (42) hide show
  1. package/dist/core/EncryptedFetchHttpRequest.d.ts +19 -0
  2. package/dist/core/EncryptedFetchHttpRequest.js +48 -0
  3. package/dist/core/EncryptedFetchHttpRequest.js.map +1 -0
  4. package/dist/core/EncryptionMiddleware.d.ts +46 -0
  5. package/dist/core/EncryptionMiddleware.js +68 -0
  6. package/dist/core/EncryptionMiddleware.js.map +1 -0
  7. package/dist/extensions/EncryptedComplianceClient.d.ts +90 -0
  8. package/dist/extensions/EncryptedComplianceClient.js +146 -0
  9. package/dist/extensions/EncryptedComplianceClient.js.map +1 -0
  10. package/dist/extensions/EncryptedFieldAdapter.d.ts +25 -0
  11. package/dist/extensions/EncryptedFieldAdapter.js +53 -0
  12. package/dist/extensions/EncryptedFieldAdapter.js.map +1 -0
  13. package/dist/index.d.ts +2 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/main.d.ts +2 -0
  16. package/dist/main.js +3 -2
  17. package/dist/main.js.map +1 -1
  18. package/dist/models/AlertSourceDto.d.ts +1 -0
  19. package/dist/models/AlertSourceDto.js +1 -0
  20. package/dist/models/AlertSourceDto.js.map +1 -1
  21. package/dist/models/CreateIndividualClientDto.d.ts +5 -0
  22. package/dist/models/CreateIndividualClientDto.js.map +1 -1
  23. package/dist/models/CreateTransactionDto.d.ts +5 -0
  24. package/dist/models/IndividualClientDto.d.ts +5 -0
  25. package/dist/models/IndividualClientDto.js.map +1 -1
  26. package/dist/models/IndividualClientIntegrationsDto.d.ts +6 -0
  27. package/dist/models/IndividualClientIntegrationsDto.js +3 -0
  28. package/dist/models/IndividualClientIntegrationsDto.js.map +1 -0
  29. package/dist/models/TransactionDto.d.ts +5 -0
  30. package/dist/models/TransactionDto.js.map +1 -1
  31. package/dist/models/TransactionIntegrationsDto.d.ts +6 -0
  32. package/dist/models/TransactionIntegrationsDto.js +3 -0
  33. package/dist/models/TransactionIntegrationsDto.js.map +1 -0
  34. package/dist/models/UpdateIndividualClientDto.d.ts +5 -0
  35. package/dist/models/UpdateIndividualClientDto.js.map +1 -1
  36. package/dist/services/ClientsService.d.ts +2 -1
  37. package/dist/services/ClientsService.js +5 -1
  38. package/dist/services/ClientsService.js.map +1 -1
  39. package/dist/services/TransactionsService.d.ts +8 -0
  40. package/dist/services/TransactionsService.js +18 -0
  41. package/dist/services/TransactionsService.js.map +1 -1
  42. package/package.json +2 -1
@@ -0,0 +1,19 @@
1
+ import type { ApiRequestOptions } from "./ApiRequestOptions";
2
+ import { CancelablePromise } from "./CancelablePromise";
3
+ import type { EncryptionMiddleware } from "./EncryptionMiddleware";
4
+ import { FetchHttpRequest } from "./FetchHttpRequest";
5
+ import type { OpenAPIConfig } from "./OpenAPI";
6
+ /**
7
+ * HTTP Request class with field-level encryption support
8
+ */
9
+ export declare class EncryptedFetchHttpRequest extends FetchHttpRequest {
10
+ private encryptionMiddleware?;
11
+ constructor(config: OpenAPIConfig, encryptionMiddleware?: EncryptionMiddleware);
12
+ /**
13
+ * Request method with encryption middleware
14
+ * @param options The request options from the service
15
+ * @returns CancelablePromise<T>
16
+ * @throws ApiError
17
+ */
18
+ request<T>(options: ApiRequestOptions): CancelablePromise<T>;
19
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EncryptedFetchHttpRequest = void 0;
4
+ const CancelablePromise_1 = require("./CancelablePromise");
5
+ const FetchHttpRequest_1 = require("./FetchHttpRequest");
6
+ const request_1 = require("./request");
7
+ /**
8
+ * HTTP Request class with field-level encryption support
9
+ */
10
+ class EncryptedFetchHttpRequest extends FetchHttpRequest_1.FetchHttpRequest {
11
+ encryptionMiddleware;
12
+ constructor(config, encryptionMiddleware) {
13
+ super(config);
14
+ this.encryptionMiddleware = encryptionMiddleware;
15
+ }
16
+ /**
17
+ * Request method with encryption middleware
18
+ * @param options The request options from the service
19
+ * @returns CancelablePromise<T>
20
+ * @throws ApiError
21
+ */
22
+ request(options) {
23
+ // If no middleware is configured, use the default request implementation
24
+ if (!this.encryptionMiddleware) {
25
+ return super.request(options);
26
+ }
27
+ // With middleware, process the request through it first
28
+ const middleware = this.encryptionMiddleware;
29
+ return new CancelablePromise_1.CancelablePromise(async (resolve, reject, onCancel) => {
30
+ try {
31
+ // Apply encryption middleware
32
+ const processedOptions = await middleware.processRequest(options);
33
+ // Call the parent request implementation with processed options
34
+ const promise = (0, request_1.request)(this.config, processedOptions);
35
+ // Handle cancellation
36
+ onCancel(() => promise.cancel());
37
+ // Resolve or reject the promise
38
+ const result = await promise;
39
+ resolve(result);
40
+ }
41
+ catch (error) {
42
+ reject(error);
43
+ }
44
+ });
45
+ }
46
+ }
47
+ exports.EncryptedFetchHttpRequest = EncryptedFetchHttpRequest;
48
+ //# sourceMappingURL=EncryptedFetchHttpRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EncryptedFetchHttpRequest.js","sourceRoot":"","sources":["../../core/EncryptedFetchHttpRequest.ts"],"names":[],"mappings":";;;AACA,2DAAwD;AAExD,yDAAsD;AAEtD,uCAAiD;AAEjD;;GAEG;AACH,MAAa,yBAA0B,SAAQ,mCAAgB;IACrD,oBAAoB,CAAwB;IAEpD,YACE,MAAqB,EACrB,oBAA2C;QAE3C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACa,OAAO,CAAI,OAA0B;QACnD,yEAAyE;QACzE,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAC,OAAO,CAAI,OAAO,CAAC,CAAC;QACnC,CAAC;QAED,wDAAwD;QACxD,MAAM,UAAU,GAAG,IAAI,CAAC,oBAAoB,CAAC;QAE7C,OAAO,IAAI,qCAAiB,CAAI,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;YAClE,IAAI,CAAC;gBACH,8BAA8B;gBAC9B,MAAM,gBAAgB,GAAG,MAAM,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;gBAElE,gEAAgE;gBAChE,MAAM,OAAO,GAAG,IAAA,iBAAS,EAAI,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;gBAE5D,sBAAsB;gBACtB,QAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;gBAEjC,gCAAgC;gBAChC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC;gBAC7B,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,KAAK,CAAC,CAAC;YAChB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA7CD,8DA6CC"}
@@ -0,0 +1,46 @@
1
+ import { EncryptedFieldSchema } from "@corsa-labs/encryption-node";
2
+ import type { ApiRequestOptions } from "./ApiRequestOptions";
3
+ /**
4
+ * Interface for the encryption service that will handle actual encryption
5
+ */
6
+ export interface EncryptionService {
7
+ /**
8
+ * Encrypts a string value
9
+ * @param value Value to encrypt
10
+ * @returns Encrypted value
11
+ */
12
+ encrypt(value: string): Promise<string>;
13
+ /**
14
+ * Decrypts a string value
15
+ * @param value Value to decrypt
16
+ * @returns Decrypted value
17
+ */
18
+ decrypt(value: string): Promise<string>;
19
+ }
20
+ /**
21
+ * Class that handles field-level encryption based on a unified schema
22
+ */
23
+ export declare class EncryptionMiddleware {
24
+ private schema;
25
+ private encryptionService;
26
+ private salt?;
27
+ /**
28
+ * Create a new encryption middleware
29
+ * @param schema Unified field encryption schema
30
+ * @param encryptionService Service that handles actual encryption
31
+ * @param salt Optional salt for hash generation
32
+ */
33
+ constructor(schema: EncryptedFieldSchema, encryptionService: EncryptionService, salt?: string);
34
+ /**
35
+ * Process an API request, encrypting fields as specified in the schema
36
+ * @param options API request options
37
+ * @returns Modified API request options with encrypted fields
38
+ */
39
+ processRequest(options: ApiRequestOptions): Promise<ApiRequestOptions>;
40
+ /**
41
+ * Extract an operation identifier from the request options
42
+ * @param options API request options
43
+ * @returns Operation identifier (usually the URL path)
44
+ */
45
+ private getOperationIdentifier;
46
+ }
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EncryptionMiddleware = void 0;
4
+ /* istanbul ignore file */
5
+ /* tslint:disable */
6
+ /* eslint-disable */
7
+ const encryption_node_1 = require("@corsa-labs/encryption-node");
8
+ /**
9
+ * Class that handles field-level encryption based on a unified schema
10
+ */
11
+ class EncryptionMiddleware {
12
+ schema;
13
+ encryptionService;
14
+ salt;
15
+ /**
16
+ * Create a new encryption middleware
17
+ * @param schema Unified field encryption schema
18
+ * @param encryptionService Service that handles actual encryption
19
+ * @param salt Optional salt for hash generation
20
+ */
21
+ constructor(schema, encryptionService, salt) {
22
+ this.schema = schema;
23
+ this.encryptionService = encryptionService;
24
+ this.salt = salt;
25
+ }
26
+ /**
27
+ * Process an API request, encrypting fields as specified in the schema
28
+ * @param options API request options
29
+ * @returns Modified API request options with encrypted fields
30
+ */
31
+ async processRequest(options) {
32
+ // Only process POST and PUT requests that may contain a body
33
+ if (options.body &&
34
+ (options.method === "POST" || options.method === "PUT")) {
35
+ const operationPath = this.getOperationIdentifier(options);
36
+ const cryptoOps = new encryption_node_1.NodeCryptoOps();
37
+ const processor = new encryption_node_1.EncryptedFieldProcessor(cryptoOps);
38
+ const result = await processor.processFields(options.body, this.schema, {
39
+ operation: encryption_node_1.FieldOperation.ENCRYPT,
40
+ encryptionService: this.encryptionService,
41
+ operationPath,
42
+ salt: this.salt,
43
+ });
44
+ if (!result.success) {
45
+ throw new Error(`Field encryption failed: ${result.errors
46
+ ?.map((e) => `${e.path}: ${e.message}`)
47
+ .join(", ")}`);
48
+ }
49
+ return {
50
+ ...options,
51
+ body: result.data,
52
+ };
53
+ }
54
+ return options;
55
+ }
56
+ /**
57
+ * Extract an operation identifier from the request options
58
+ * @param options API request options
59
+ * @returns Operation identifier (usually the URL path)
60
+ */
61
+ getOperationIdentifier(options) {
62
+ // We'll use the URL as the operation identifier
63
+ // This could be expanded to include the HTTP method if needed
64
+ return options.url || null;
65
+ }
66
+ }
67
+ exports.EncryptionMiddleware = EncryptionMiddleware;
68
+ //# sourceMappingURL=EncryptionMiddleware.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EncryptionMiddleware.js","sourceRoot":"","sources":["../../core/EncryptionMiddleware.ts"],"names":[],"mappings":";;;AAAA,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB;AACpB,iEAKqC;AAsBrC;;GAEG;AACH,MAAa,oBAAoB;IACvB,MAAM,CAAuB;IAC7B,iBAAiB,CAAoB;IACrC,IAAI,CAAU;IAEtB;;;;;OAKG;IACH,YACE,MAA4B,EAC5B,iBAAoC,EACpC,IAAa;QAEb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,cAAc,CACzB,OAA0B;QAE1B,6DAA6D;QAC7D,IACE,OAAO,CAAC,IAAI;YACZ,CAAC,OAAO,CAAC,MAAM,KAAK,MAAM,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC,EACvD,CAAC;YACD,MAAM,aAAa,GAAG,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;YAC3D,MAAM,SAAS,GAAG,IAAI,+BAAa,EAAE,CAAC;YACtC,MAAM,SAAS,GAAG,IAAI,yCAAuB,CAAC,SAAS,CAAC,CAAC;YACzD,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;gBACtE,SAAS,EAAE,gCAAc,CAAC,OAAO;gBACjC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;gBACzC,aAAa;gBACb,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAC,CAAC;YAEH,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CACb,4BAA4B,MAAM,CAAC,MAAM;oBACvC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;qBACtC,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,GAAG,OAAO;gBACV,IAAI,EAAE,MAAM,CAAC,IAAI;aAClB,CAAC;QACJ,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACK,sBAAsB,CAAC,OAA0B;QACvD,gDAAgD;QAChD,8DAA8D;QAC9D,OAAO,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC;IAC7B,CAAC;CACF;AAvED,oDAuEC"}
@@ -0,0 +1,90 @@
1
+ import { ComplianceClient } from "../ComplianceClient";
2
+ import { EncryptionMiddleware } from "../core/EncryptionMiddleware";
3
+ import { FetchHttpRequest } from "../core/FetchHttpRequest";
4
+ import type { OpenAPIConfig } from "../core/OpenAPI";
5
+ import { EncryptedFieldSchema } from "@corsa-labs/encryption-node";
6
+ /**
7
+ * Configuration for encrypted data encryption setup
8
+ */
9
+ export interface EncryptedClientConfig {
10
+ /** Base URL for the compliance API */
11
+ baseUrl: string;
12
+ /** API key for authentication */
13
+ apiKey: string;
14
+ /** Optional: Custom encryption service URL (defaults to production) */
15
+ encryptionServiceUrl?: string;
16
+ /** Optional: Platform ID for encryption (defaults to 'corsa') */
17
+ platformId?: string;
18
+ /** Optional: API secret for encryption service auth */
19
+ apiSecret?: string;
20
+ /** Optional: Pass the compliance API authorization header to encryption service requests */
21
+ passAuthToEncryption?: boolean;
22
+ }
23
+ /**
24
+ * Compliance client with field-level encryption capabilities
25
+ *
26
+ * This client automatically encrypts fields (like emails, phone numbers,
27
+ * personal IDs, etc.) before sending data to the API, based on a configurable mapping.
28
+ *
29
+ * The encryption is handled transparently - the client interface remains the same,
30
+ * but specified fields are encrypted using the built-in encryption system.
31
+ */
32
+ export declare class EncryptedComplianceClient extends ComplianceClient {
33
+ /**
34
+ * Create a compliance client with field-level encryption
35
+ *
36
+ * @param config Client configuration including API credentials and encryption settings
37
+ * @param schema Unified field encryption schema
38
+ * @returns ComplianceClient instance with field encryption enabled
39
+ *
40
+ * @example
41
+ * ```typescript
42
+ * import { EncryptedComplianceClient } from '@corsa-labs/compliance-sdk';
43
+ *
44
+ * // Configure which fields to encrypt using unified schema
45
+ * const encryptionSchema = {
46
+ * fields: {
47
+ * emailAddress: { type: 'string', encrypt: true, validate: true },
48
+ * phoneNumber: { type: 'string', encrypt: true },
49
+ * personalId: { type: 'string', encrypt: true, generateHash: true }
50
+ * },
51
+ * operations: {
52
+ * '/v1/clients/individuals': {
53
+ * 'contact': ['emailAddress', 'phoneNumber'],
54
+ * 'general': ['personalId']
55
+ * }
56
+ * }
57
+ * };
58
+ *
59
+ * // Create client with field encryption - encryption manager is created automatically
60
+ * const client = EncryptedComplianceClient.withEncryptedFields({
61
+ * baseUrl: 'https://api-compliance.corsa.finance',
62
+ * apiKey: 'your-api-key',
63
+ * apiSecret: 'your-encryption-api-secret', // Required for encryption service
64
+ * passAuthToEncryption: true // Optional: pass the API key as Authorization header to encryption service
65
+ * }, encryptionSchema);
66
+ *
67
+ * // Use normally - specified fields will be automatically encrypted
68
+ * const individual = await client.clients.createIndividualClient({
69
+ * referenceId: 'ref-123',
70
+ * contact: {
71
+ * emailAddress: 'user@example.com', // Automatically encrypted
72
+ * phoneNumber: '+1234567890', // Automatically encrypted
73
+ * },
74
+ * general: {
75
+ * firstName: 'John',
76
+ * lastName: 'Doe',
77
+ * personalId: '123-45-6789', // Automatically encrypted
78
+ * }
79
+ * });
80
+ * ```
81
+ */
82
+ static withEncryptedFields(config: EncryptedClientConfig, schema: EncryptedFieldSchema): EncryptedComplianceClient;
83
+ /**
84
+ * Constructor for EncryptedComplianceClient
85
+ *
86
+ * Note: In most cases, you should use the static `withEncryptedFields()` method instead
87
+ * of calling this constructor directly.
88
+ */
89
+ constructor(config?: Partial<OpenAPIConfig>, HttpRequestConstructor?: typeof FetchHttpRequest, encryptionMiddleware?: EncryptionMiddleware);
90
+ }
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EncryptedComplianceClient = void 0;
7
+ const ComplianceClient_1 = require("../ComplianceClient");
8
+ const EncryptedFetchHttpRequest_1 = require("../core/EncryptedFetchHttpRequest");
9
+ const EncryptionMiddleware_1 = require("../core/EncryptionMiddleware");
10
+ const FetchHttpRequest_1 = require("../core/FetchHttpRequest");
11
+ const EncryptedFieldAdapter_1 = require("./EncryptedFieldAdapter");
12
+ const encryption_node_1 = require("@corsa-labs/encryption-node");
13
+ /**
14
+ * Compliance client with field-level encryption capabilities
15
+ *
16
+ * This client automatically encrypts fields (like emails, phone numbers,
17
+ * personal IDs, etc.) before sending data to the API, based on a configurable mapping.
18
+ *
19
+ * The encryption is handled transparently - the client interface remains the same,
20
+ * but specified fields are encrypted using the built-in encryption system.
21
+ */
22
+ class EncryptedComplianceClient extends ComplianceClient_1.ComplianceClient {
23
+ /**
24
+ * Create a compliance client with field-level encryption
25
+ *
26
+ * @param config Client configuration including API credentials and encryption settings
27
+ * @param schema Unified field encryption schema
28
+ * @returns ComplianceClient instance with field encryption enabled
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * import { EncryptedComplianceClient } from '@corsa-labs/compliance-sdk';
33
+ *
34
+ * // Configure which fields to encrypt using unified schema
35
+ * const encryptionSchema = {
36
+ * fields: {
37
+ * emailAddress: { type: 'string', encrypt: true, validate: true },
38
+ * phoneNumber: { type: 'string', encrypt: true },
39
+ * personalId: { type: 'string', encrypt: true, generateHash: true }
40
+ * },
41
+ * operations: {
42
+ * '/v1/clients/individuals': {
43
+ * 'contact': ['emailAddress', 'phoneNumber'],
44
+ * 'general': ['personalId']
45
+ * }
46
+ * }
47
+ * };
48
+ *
49
+ * // Create client with field encryption - encryption manager is created automatically
50
+ * const client = EncryptedComplianceClient.withEncryptedFields({
51
+ * baseUrl: 'https://api-compliance.corsa.finance',
52
+ * apiKey: 'your-api-key',
53
+ * apiSecret: 'your-encryption-api-secret', // Required for encryption service
54
+ * passAuthToEncryption: true // Optional: pass the API key as Authorization header to encryption service
55
+ * }, encryptionSchema);
56
+ *
57
+ * // Use normally - specified fields will be automatically encrypted
58
+ * const individual = await client.clients.createIndividualClient({
59
+ * referenceId: 'ref-123',
60
+ * contact: {
61
+ * emailAddress: 'user@example.com', // Automatically encrypted
62
+ * phoneNumber: '+1234567890', // Automatically encrypted
63
+ * },
64
+ * general: {
65
+ * firstName: 'John',
66
+ * lastName: 'Doe',
67
+ * personalId: '123-45-6789', // Automatically encrypted
68
+ * }
69
+ * });
70
+ * ```
71
+ */
72
+ static withEncryptedFields(config, schema) {
73
+ // Validate required parameters
74
+ if (!config) {
75
+ throw new Error("EncryptedClientConfig is required for field encryption.");
76
+ }
77
+ if (!schema) {
78
+ throw new Error("EncryptedFieldSchema is required for field encryption. Provide a unified schema mapping fields to encryption settings.");
79
+ }
80
+ // Create the encryption manager internally using wire-format
81
+ // Note: Always use WIRE_FORMAT for compliance API to ensure encrypted fields
82
+ // are sent as "__enc__<base64>" format. This is not configurable by users to
83
+ // prevent format inconsistencies.
84
+ const encryptionManager = (0, encryption_node_1.createNodeEncryptionClient)({
85
+ serviceUrl: config.encryptionServiceUrl || "https://encryption.corsa.finance",
86
+ apiSecret: config.apiSecret,
87
+ platformId: config.platformId || "corsa",
88
+ wireFormat: encryption_node_1.WireFormat.PREFIXED, // Always use prefixed format for compliance API
89
+ ...(config.passAuthToEncryption && {
90
+ authorizationHeader: `Bearer ${config.apiKey}`,
91
+ }),
92
+ });
93
+ // Create the field encryption adapter
94
+ const encryptedFieldAdapter = new EncryptedFieldAdapter_1.EncryptedFieldAdapter(encryptionManager);
95
+ // Create the encryption middleware with the unified schema
96
+ const middleware = new EncryptionMiddleware_1.EncryptionMiddleware(schema, encryptedFieldAdapter);
97
+ // Create OpenAPI config from the provided config
98
+ const openApiConfig = {
99
+ BASE: config.baseUrl,
100
+ HEADERS: {
101
+ Authorization: `Bearer ${config.apiKey}`,
102
+ },
103
+ };
104
+ // Create the client with the encrypted HTTP request handler
105
+ const client = new EncryptedComplianceClient(openApiConfig, FetchHttpRequest_1.FetchHttpRequest, middleware);
106
+ return client;
107
+ }
108
+ /**
109
+ * Constructor for EncryptedComplianceClient
110
+ *
111
+ * Note: In most cases, you should use the static `withEncryptedFields()` method instead
112
+ * of calling this constructor directly.
113
+ */
114
+ constructor(config, HttpRequestConstructor = FetchHttpRequest_1.FetchHttpRequest, encryptionMiddleware) {
115
+ // If encryption middleware is provided, use EncryptedFetchHttpRequest
116
+ if (encryptionMiddleware) {
117
+ const openApiConfig = {
118
+ BASE: config?.BASE ?? "",
119
+ VERSION: config?.VERSION ?? "1.0",
120
+ WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
121
+ CREDENTIALS: config?.CREDENTIALS ?? "include",
122
+ TOKEN: config?.TOKEN,
123
+ USERNAME: config?.USERNAME,
124
+ PASSWORD: config?.PASSWORD,
125
+ HEADERS: config?.HEADERS,
126
+ ENCODE_PATH: config?.ENCODE_PATH,
127
+ };
128
+ // Create the encrypted HTTP request with middleware
129
+ const encryptedRequest = new EncryptedFetchHttpRequest_1.EncryptedFetchHttpRequest(openApiConfig, encryptionMiddleware);
130
+ // Call parent constructor with our custom request handler
131
+ // We need to pass it as if it were a constructor, so we create a wrapper
132
+ super(config, class extends FetchHttpRequest_1.FetchHttpRequest {
133
+ request = encryptedRequest.request.bind(encryptedRequest);
134
+ constructor(cfg) {
135
+ super(cfg);
136
+ }
137
+ });
138
+ }
139
+ else {
140
+ // No encryption middleware, use standard client
141
+ super(config, HttpRequestConstructor);
142
+ }
143
+ }
144
+ }
145
+ exports.EncryptedComplianceClient = EncryptedComplianceClient;
146
+ //# sourceMappingURL=EncryptedComplianceClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EncryptedComplianceClient.js","sourceRoot":"","sources":["../../extensions/EncryptedComplianceClient.ts"],"names":[],"mappings":";AAAA,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB;;;AAEpB,0DAAuD;AACvD,iFAA8E;AAC9E,uEAAoE;AACpE,+DAA4D;AAE5D,mEAAgE;AAEhE,iEAIqC;AAoBrC;;;;;;;;GAQG;AACH,MAAa,yBAA0B,SAAQ,mCAAgB;IAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgDG;IACI,MAAM,CAAC,mBAAmB,CAC/B,MAA6B,EAC7B,MAA4B;QAE5B,+BAA+B;QAC/B,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,yDAAyD,CAC1D,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,wHAAwH,CACzH,CAAC;QACJ,CAAC;QAED,6DAA6D;QAC7D,6EAA6E;QAC7E,6EAA6E;QAC7E,kCAAkC;QAClC,MAAM,iBAAiB,GAAG,IAAA,4CAA0B,EAAC;YACnD,UAAU,EACR,MAAM,CAAC,oBAAoB,IAAI,kCAAkC;YACnE,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,OAAO;YACxC,UAAU,EAAE,4BAAU,CAAC,QAAQ,EAAE,gDAAgD;YACjF,GAAG,CAAC,MAAM,CAAC,oBAAo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YAC1D,yEAAyE;YACzE,KAAK,CACH,MAAM,EACN,KAAM,SAAQ,mCAAgB;gBAC5B,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;gBAC1D,YAAY,GAAQ;oBAClB,KAAK,CAAC,GAAG,CAAC,CAAC;gBACb,CAAC;aACF,CACF,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,gDAAgD;YAChD,KAAK,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;CACF;AAzJD,8DAyJC"}
@@ -0,0 +1,25 @@
1
+ import type { NodeEncryptionClient } from "@corsa-labs/encryption-node";
2
+ import type { EncryptionService } from "../core/EncryptionMiddleware";
3
+ /**
4
+ * Adapter that integrates the encryption-sdk's NodeEncryptionClient
5
+ * with the compliance-sdk's EncryptionService interface
6
+ *
7
+ * This adapter assumes the NodeEncryptionClient is configured with PREFIXED
8
+ * wire format, which returns "__enc__<base64>" strings ready for API transmission.
9
+ */
10
+ export declare class EncryptedFieldAdapter implements EncryptionService {
11
+ private encryptionManager;
12
+ constructor(encryptionManager: NodeEncryptionClient);
13
+ /**
14
+ * Encrypts a value using the encryption-sdk
15
+ * @param value The plaintext value to encrypt
16
+ * @returns Wire-format encrypted string ("__enc__<base64>")
17
+ */
18
+ encrypt(value: string): Promise<string>;
19
+ /**
20
+ * Decrypts a wire-format encrypted value using the encryption-sdk
21
+ * @param value Wire-format encrypted string ("__enc__<base64>")
22
+ * @returns Decrypted plaintext value
23
+ */
24
+ decrypt(value: string): Promise<string>;
25
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EncryptedFieldAdapter = void 0;
4
+ /**
5
+ * Adapter that integrates the encryption-sdk's NodeEncryptionClient
6
+ * with the compliance-sdk's EncryptionService interface
7
+ *
8
+ * This adapter assumes the NodeEncryptionClient is configured with PREFIXED
9
+ * wire format, which returns "__enc__<base64>" strings ready for API transmission.
10
+ */
11
+ class EncryptedFieldAdapter {
12
+ encryptionManager;
13
+ constructor(encryptionManager) {
14
+ this.encryptionManager = encryptionManager;
15
+ }
16
+ /**
17
+ * Encrypts a value using the encryption-sdk
18
+ * @param value The plaintext value to encrypt
19
+ * @returns Wire-format encrypted string ("__enc__<base64>")
20
+ */
21
+ async encrypt(value) {
22
+ try {
23
+ const result = await this.encryptionManager.encrypt(value);
24
+ if (typeof result === "string") {
25
+ return result;
26
+ }
27
+ throw new Error("The encryption manager returned an unexpected value. Please check the encryption manager configuration.");
28
+ }
29
+ catch (error) {
30
+ throw new Error(`Failed to encrypt field: ${error instanceof Error ? error.message : "Unknown error"}`);
31
+ }
32
+ }
33
+ /**
34
+ * Decrypts a wire-format encrypted value using the encryption-sdk
35
+ * @param value Wire-format encrypted string ("__enc__<base64>")
36
+ * @returns Decrypted plaintext value
37
+ */
38
+ async decrypt(value) {
39
+ try {
40
+ // Validate wire format
41
+ if (typeof value !== "string" || !value.startsWith("__enc__")) {
42
+ throw new Error('Invalid encrypted value format. Expected "__enc__<base64>" string.');
43
+ }
44
+ // NodeEncryptionClient.decrypt accepts string when in PREFIXED wire format mode
45
+ return await this.encryptionManager.decrypt(value);
46
+ }
47
+ catch (error) {
48
+ throw new Error(`Failed to decrypt field: ${error instanceof Error ? error.message : "Unknown error"}`);
49
+ }
50
+ }
51
+ }
52
+ exports.EncryptedFieldAdapter = EncryptedFieldAdapter;
53
+ //# sourceMappingURL=EncryptedFieldAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EncryptedFieldAdapter.js","sourceRoot":"","sources":["../../extensions/EncryptedFieldAdapter.ts"],"names":[],"mappings":";;;AAMA;;;;;;GAMG;AACH,MAAa,qBAAqB;IACZ;IAApB,YAAoB,iBAAuC;QAAvC,sBAAiB,GAAjB,iBAAiB,CAAsB;IAAG,CAAC;IAE/D;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,KAAa;QACzB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAE3D,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;gBAC/B,OAAO,MAAM,CAAC;YAChB,CAAC;YAED,MAAM,IAAI,KAAK,CACb,yGAAyG,CAC1G,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,4BACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAC3C,EAAE,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,KAAa;QACzB,IAAI,CAAC;YACH,uBAAuB;YACvB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC9D,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAC;YACJ,CAAC;YAED,gFAAgF;YAChF,OAAO,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACrD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,4BACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAC3C,EAAE,CACH,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AApDD,sDAoDC"}
package/dist/index.d.ts CHANGED
@@ -58,6 +58,7 @@ export { IndividualClientCustomFieldDataDto } from './models/IndividualClientCus
58
58
  export { IndividualClientDto } from './models/IndividualClientDto';
59
59
  export type { IndividualClientFinancialInformationDto } from './models/IndividualClientFinancialInformationDto';
60
60
  export { IndividualClientGeneralInformationDto } from './models/IndividualClientGeneralInformationDto';
61
+ export type { IndividualClientIntegrationsDto } from './models/IndividualClientIntegrationsDto';
61
62
  export type { IndividualClientWorkInformationDto } from './models/IndividualClientWorkInformationDto';
62
63
  export { IndividualMemberDto } from './models/IndividualMemberDto';
63
64
  export type { OperationInitiatorDto } from './models/OperationInitiatorDto';
@@ -69,6 +70,7 @@ export { TradeOperationDto } from './models/TradeOperationDto';
69
70
  export type { TransactionAmountDto } from './models/TransactionAmountDto';
70
71
  export type { TransactionCustomFieldDto } from './models/TransactionCustomFieldDto';
71
72
  export { TransactionDto } from './models/TransactionDto';
73
+ export type { TransactionIntegrationsDto } from './models/TransactionIntegrationsDto';
72
74
  export type { TransactionSourceOrDestinationClientDto } from './models/TransactionSourceOrDestinationClientDto';
73
75
  export type { TransactionSourceOrDestinationDto } from './models/TransactionSourceOrDestinationDto';
74
76
  export { TransactionStatusDto } from './models/TransactionStatusDto';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;AAAA,+DAA+D;AAC/D,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB;AACpB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AAEzB,4CAA2C;AAAlC,oGAAA,QAAQ,OAAA;AACjB,0DAAyD;AAAhD,kHAAA,eAAe,OAAA;AACxB,8DAA0E;AAAjE,sHAAA,iBAAiB,OAAA;AAAE,gHAAA,WAAW,OAAA;AACvC,0CAAyC;AAAhC,kGAAA,OAAO,OAAA;AAOhB,8CAA6C;AAApC,oGAAA,QAAQ,OAAA;AACjB,0DAAyD;AAAhD,gHAAA,cAAc,OAAA;AACvB,4DAA2D;AAAlD,kHAAA,eAAe,OAAA;AAUxB,4CAA2C;AAAlC,kGAAA,OAAO,OAAA;AAEhB,0DAAyD;AAAhD,gHAAA,cAAc,OAAA;AAGvB,wDAAuD;AAA9C,8GAAA,aAAa,OAAA;AAKtB,gGAA+F;AAAtF,sJAAA,iCAAiC,OAAA;AAC1C,kEAAiE;AAAxD,wHAAA,kBAAkB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AAqE;AAA5D,0HAAA,mBAAmB,OAAA;AAC5B,gFAA+E;AAAtE,oIAAA,wBAAwB,OAAA;AACjC,wDAAuD;AAA9C,4GAAA,YAAY,OAAA;AACrB,4DAA2D;AAAlD,gHAAA,cAAc,OAAA;AACvB,8DAA6D;AAApD,kHAAA,eAAe,OAAA;AACxB,0DAAyD;AAAhD,8GAAA,aAAa,OAAA;AACtB,4DAA2D;AAAlD,gHAAA,cAAc,OAAA;AACvB,8DAA6D;AAApD,kHAAA,eAAe,OAAA;AACxB,0DAAyD;AAAhD,8GAAA,aAAa,OAAA;AACtB,sEAAqE;AAA5D,0HAAA,mBAAmB,OAAA;AAC5B,oEAAmE;AAA1D,wHAAA,kBAAkB,OAAA"}
package/dist/main.d.ts CHANGED
@@ -1,2 +1,4 @@
1
+ export { type EncryptedFieldSchema } from "@corsa-labs/encryption-core";
2
+ export { EncryptedComplianceClient } from "./extensions/EncryptedComplianceClient";
1
3
  export * from "./index";
2
4
  export * from "./webhooks";
package/dist/main.js CHANGED
@@ -14,8 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- // export { type EncryptedFieldSchema } from "@corsa-labs/encryption-core";
18
- // export { EncryptedComplianceClient } from "./extensions/EncryptedComplianceClient";
17
+ exports.EncryptedComplianceClient = void 0;
18
+ var EncryptedComplianceClient_1 = require("./extensions/EncryptedComplianceClient");
19
+ Object.defineProperty(exports, "EncryptedComplianceClient", { enumerable: true, get: function () { return EncryptedComplianceClient_1.EncryptedComplianceClient; } });
19
20
  __exportStar(require("./index"), exports);
20
21
  __exportStar(require("./webhooks"), exports);
21
22
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2EAA2E;AAC3E,sFAAsF;AACtF,0CAAwB;AACxB,6CAA2B"}
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,oFAAmF;AAA1E,sIAAA,yBAAyB,OAAA;AAClC,0CAAwB;AACxB,6CAA2B"}
@@ -26,6 +26,7 @@ export declare namespace AlertSourceDto {
26
26
  */
27
27
  enum alertSource {
28
28
  CHAINALYSIS = "CHAINALYSIS",
29
+ SARDINE = "SARDINE",
29
30
  MANUAL = "MANUAL",
30
31
  API = "API"
31
32
  }
@@ -9,6 +9,7 @@ var AlertSourceDto;
9
9
  let alertSource;
10
10
  (function (alertSource) {
11
11
  alertSource["CHAINALYSIS"] = "CHAINALYSIS";
12
+ alertSource["SARDINE"] = "SARDINE";
12
13
  alertSource["MANUAL"] = "MANUAL";
13
14
  alertSource["API"] = "API";
14
15
  })(alertSource = AlertSourceDto.alertSource || (AlertSourceDto.alertSource = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"AlertSourceDto.js","sourceRoot":"","sources":["../../models/AlertSourceDto.ts"],"names":[],"mappings":";;;AA0BA,IAAiB,cAAc,CAS9B;AATD,WAAiB,cAAc;IAC3B;;OAEG;IACH,IAAY,WAIX;IAJD,WAAY,WAAW;QACnB,0CAA2B,CAAA;QAC3B,gCAAiB,CAAA;QACjB,0BAAW,CAAA;IACf,CAAC,EAJW,WAAW,GAAX,0BAAW,KAAX,0BAAW,QAItB;AACL,CAAC,EATgB,cAAc,8BAAd,cAAc,QAS9B"}
1
+ {"version":3,"file":"AlertSourceDto.js","sourceRoot":"","sources":["../../models/AlertSourceDto.ts"],"names":[],"mappings":";;;AA0BA,IAAiB,cAAc,CAU9B;AAVD,WAAiB,cAAc;IAC3B;;OAEG;IACH,IAAY,WAKX;IALD,WAAY,WAAW;QACnB,0CAA2B,CAAA;QAC3B,kCAAmB,CAAA;QACnB,gCAAiB,CAAA;QACjB,0BAAW,CAAA;IACf,CAAC,EALW,WAAW,GAAX,0BAAW,KAAX,0BAAW,QAKtB;AACL,CAAC,EAVgB,cAAc,8BAAd,cAAc,QAU9B"}
@@ -6,6 +6,7 @@ import type { IndividualClientContactInformationDto } from './IndividualClientCo
6
6
  import type { IndividualClientCustomFieldDataDto } from './IndividualClientCustomFieldDataDto';
7
7
  import type { IndividualClientFinancialInformationDto } from './IndividualClientFinancialInformationDto';
8
8
  import type { IndividualClientGeneralInformationDto } from './IndividualClientGeneralInformationDto';
9
+ import type { IndividualClientIntegrationsDto } from './IndividualClientIntegrationsDto';
9
10
  import type { IndividualClientWorkInformationDto } from './IndividualClientWorkInformationDto';
10
11
  import type { PoliticalExposureDto } from './PoliticalExposureDto';
11
12
  import type { SanctionsDto } from './SanctionsDto';
@@ -74,6 +75,10 @@ export type CreateIndividualClientDto = {
74
75
  * Work information of the individual client
75
76
  */
76
77
  work?: IndividualClientWorkInformationDto;
78
+ /**
79
+ * Integrations
80
+ */
81
+ integrations?: IndividualClientIntegrationsDto;
77
82
  };
78
83
  export declare namespace CreateIndividualClientDto {
79
84
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"CreateIndividualClientDto.js","sourceRoot":"","sources":["../../models/CreateIndividualClientDto.ts"],"names":[],"mappings":";;;AAiFA,IAAiB,yBAAyB,CAqBzC;AArBD,WAAiB,yBAAyB;IACtC;;OAEG;IACH,IAAY,cAGX;IAHD,WAAY,cAAc;QACtB,mCAAiB,CAAA;QACjB,2CAAyB,CAAA;IAC7B,CAAC,EAHW,cAAc,GAAd,wCAAc,KAAd,wCAAc,QAGzB;IACD;;OAEG;IACH,IAAY,aASX;IATD,WAAY,aAAa;QACrB,sCAAqB,CAAA;QACrB,0DAAyC,CAAA;QACzC,wCAAuB,CAAA;QACvB,sCAAqB,CAAA;QACrB,4CAA2B,CAAA;QAC3B,kCAAiB,CAAA;QACjB,wDAAuC,CAAA;QACvC,sDAAqC,CAAA;IACzC,CAAC,EATW,aAAa,GAAb,uCAAa,KAAb,uCAAa,QASxB;AACL,CAAC,EArBgB,yBAAyB,yCAAzB,yBAAyB,QAqBzC"}
1
+ {"version":3,"file":"CreateIndividualClientDto.js","sourceRoot":"","sources":["../../models/CreateIndividualClientDto.ts"],"names":[],"mappings":";;;AAsFA,IAAiB,yBAAyB,CAqBzC;AArBD,WAAiB,yBAAyB;IACtC;;OAEG;IACH,IAAY,cAGX;IAHD,WAAY,cAAc;QACtB,mCAAiB,CAAA;QACjB,2CAAyB,CAAA;IAC7B,CAAC,EAHW,cAAc,GAAd,wCAAc,KAAd,wCAAc,QAGzB;IACD;;OAEG;IACH,IAAY,aASX;IATD,WAAY,aAAa;QACrB,sCAAqB,CAAA;QACrB,0DAAyC,CAAA;QACzC,wCAAuB,CAAA;QACvB,sCAAqB,CAAA;QACrB,4CAA2B,CAAA;QAC3B,kCAAiB,CAAA;QACjB,wDAAuC,CAAA;QACvC,sDAAqC,CAAA;IACzC,CAAC,EATW,aAAa,GAAb,uCAAa,KAAb,uCAAa,QASxB;AACL,CAAC,EArBgB,yBAAyB,yCAAzB,yBAAyB,QAqBzC"}
@@ -1,6 +1,7 @@
1
1
  import type { CreateTransactionSourceOrDestinationClientDto } from './CreateTransactionSourceOrDestinationClientDto';
2
2
  import type { TransactionAmountDto } from './TransactionAmountDto';
3
3
  import type { TransactionCustomFieldDto } from './TransactionCustomFieldDto';
4
+ import type { TransactionIntegrationsDto } from './TransactionIntegrationsDto';
4
5
  import type { TransactionStatusDto } from './TransactionStatusDto';
5
6
  export type CreateTransactionDto = {
6
7
  /**
@@ -47,4 +48,8 @@ export type CreateTransactionDto = {
47
48
  * Custom fields data for the client
48
49
  */
49
50
  customFields?: Record<string, TransactionCustomFieldDto>;
51
+ /**
52
+ * Integrations data for the transaction
53
+ */
54
+ integrations?: TransactionIntegrationsDto;
50
55
  };
@@ -6,6 +6,7 @@ import type { IndividualClientContactInformationDto } from './IndividualClientCo
6
6
  import type { IndividualClientCustomFieldDataDto } from './IndividualClientCustomFieldDataDto';
7
7
  import type { IndividualClientFinancialInformationDto } from './IndividualClientFinancialInformationDto';
8
8
  import type { IndividualClientGeneralInformationDto } from './IndividualClientGeneralInformationDto';
9
+ import type { IndividualClientIntegrationsDto } from './IndividualClientIntegrationsDto';
9
10
  import type { IndividualClientWorkInformationDto } from './IndividualClientWorkInformationDto';
10
11
  import type { PoliticalExposureDto } from './PoliticalExposureDto';
11
12
  import type { SanctionsDto } from './SanctionsDto';
@@ -102,6 +103,10 @@ export type IndividualClientDto = {
102
103
  * Work-related information
103
104
  */
104
105
  work?: IndividualClientWorkInformationDto;
106
+ /**
107
+ * Integrations
108
+ */
109
+ integrations?: IndividualClientIntegrationsDto;
105
110
  };
106
111
  export declare namespace IndividualClientDto {
107
112
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"IndividualClientDto.js","sourceRoot":"","sources":["../../models/IndividualClientDto.ts"],"names":[],"mappings":";;;AA6GA,IAAiB,mBAAmB,CAqBnC;AArBD,WAAiB,mBAAmB;IAChC;;OAEG;IACH,IAAY,aASX;IATD,WAAY,aAAa;QACrB,sCAAqB,CAAA;QACrB,0DAAyC,CAAA;QACzC,wCAAuB,CAAA;QACvB,sCAAqB,CAAA;QACrB,4CAA2B,CAAA;QAC3B,kCAAiB,CAAA;QACjB,wDAAuC,CAAA;QACvC,sDAAqC,CAAA;IACzC,CAAC,EATW,aAAa,GAAb,iCAAa,KAAb,iCAAa,QASxB;IACD;;OAEG;IACH,IAAY,cAGX;IAHD,WAAY,cAAc;QACtB,mCAAiB,CAAA;QACjB,2CAAyB,CAAA;IAC7B,CAAC,EAHW,cAAc,GAAd,kCAAc,KAAd,kCAAc,QAGzB;AACL,CAAC,EArBgB,mBAAmB,mCAAnB,mBAAmB,QAqBnC"}
1
+ {"version":3,"file":"IndividualClientDto.js","sourceRoot":"","sources":["../../models/IndividualClientDto.ts"],"names":[],"mappings":";;;AAkHA,IAAiB,mBAAmB,CAqBnC;AArBD,WAAiB,mBAAmB;IAChC;;OAEG;IACH,IAAY,aASX;IATD,WAAY,aAAa;QACrB,sCAAqB,CAAA;QACrB,0DAAyC,CAAA;QACzC,wCAAuB,CAAA;QACvB,sCAAqB,CAAA;QACrB,4CAA2B,CAAA;QAC3B,kCAAiB,CAAA;QACjB,wDAAuC,CAAA;QACvC,sDAAqC,CAAA;IACzC,CAAC,EATW,aAAa,GAAb,iCAAa,KAAb,iCAAa,QASxB;IACD;;OAEG;IACH,IAAY,cAGX;IAHD,WAAY,cAAc;QACtB,mCAAiB,CAAA;QACjB,2CAAyB,CAAA;IAC7B,CAAC,EAHW,cAAc,GAAd,kCAAc,KAAd,kCAAc,QAGzB;AACL,CAAC,EArBgB,mBAAmB,mCAAnB,mBAAmB,QAqBnC"}
@@ -0,0 +1,6 @@
1
+ export type IndividualClientIntegrationsDto = {
2
+ /**
3
+ * Sardine customer ID for the individual client
4
+ */
5
+ sardineCustomerId?: string;
6
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IndividualClientIntegrationsDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndividualClientIntegrationsDto.js","sourceRoot":"","sources":["../../models/IndividualClientIntegrationsDto.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  import type { TransactionAmountDto } from './TransactionAmountDto';
2
+ import type { TransactionIntegrationsDto } from './TransactionIntegrationsDto';
2
3
  import type { TransactionSourceOrDestinationDto } from './TransactionSourceOrDestinationDto';
3
4
  import type { TransactionStatusDto } from './TransactionStatusDto';
4
5
  export type TransactionDto = {
@@ -62,6 +63,10 @@ export type TransactionDto = {
62
63
  * Blockchain transaction hash
63
64
  */
64
65
  txHash?: string;
66
+ /**
67
+ * Integrations data for the transaction
68
+ */
69
+ integrations?: TransactionIntegrationsDto;
65
70
  };
66
71
  export declare namespace TransactionDto {
67
72
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionDto.js","sourceRoot":"","sources":["../../models/TransactionDto.ts"],"names":[],"mappings":";;;AAqEA,IAAiB,cAAc,CAgB9B;AAhBD,WAAiB,cAAc;IAC3B;;OAEG;IACH,IAAY,IAIX;IAJD,WAAY,IAAI;QACZ,2BAAmB,CAAA;QACnB,6BAAqB,CAAA;QACrB,uBAAe,CAAA;IACnB,CAAC,EAJW,IAAI,GAAJ,mBAAI,KAAJ,mBAAI,QAIf;IACD;;OAEG;IACH,IAAY,WAGX;IAHD,WAAY,WAAW;QACnB,0BAAW,CAAA;QACX,4BAAa,CAAA;IACjB,CAAC,EAHW,WAAW,GAAX,0BAAW,KAAX,0BAAW,QAGtB;AACL,CAAC,EAhBgB,cAAc,8BAAd,cAAc,QAgB9B"}
1
+ {"version":3,"file":"TransactionDto.js","sourceRoot":"","sources":["../../models/TransactionDto.ts"],"names":[],"mappings":";;;AA0EA,IAAiB,cAAc,CAgB9B;AAhBD,WAAiB,cAAc;IAC3B;;OAEG;IACH,IAAY,IAIX;IAJD,WAAY,IAAI;QACZ,2BAAmB,CAAA;QACnB,6BAAqB,CAAA;QACrB,uBAAe,CAAA;IACnB,CAAC,EAJW,IAAI,GAAJ,mBAAI,KAAJ,mBAAI,QAIf;IACD;;OAEG;IACH,IAAY,WAGX;IAHD,WAAY,WAAW;QACnB,0BAAW,CAAA;QACX,4BAAa,CAAA;IACjB,CAAC,EAHW,WAAW,GAAX,0BAAW,KAAX,0BAAW,QAGtB;AACL,CAAC,EAhBgB,cAAc,8BAAd,cAAc,QAgB9B"}
@@ -0,0 +1,6 @@
1
+ export type TransactionIntegrationsDto = {
2
+ /**
3
+ * Sardine transaction ID
4
+ */
5
+ sardineTransactionId?: string;
6
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TransactionIntegrationsDto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransactionIntegrationsDto.js","sourceRoot":"","sources":["../../models/TransactionIntegrationsDto.ts"],"names":[],"mappings":""}
@@ -6,6 +6,7 @@ import type { IndividualClientContactInformationDto } from './IndividualClientCo
6
6
  import type { IndividualClientCustomFieldDataDto } from './IndividualClientCustomFieldDataDto';
7
7
  import type { IndividualClientFinancialInformationDto } from './IndividualClientFinancialInformationDto';
8
8
  import type { IndividualClientGeneralInformationDto } from './IndividualClientGeneralInformationDto';
9
+ import type { IndividualClientIntegrationsDto } from './IndividualClientIntegrationsDto';
9
10
  import type { IndividualClientWorkInformationDto } from './IndividualClientWorkInformationDto';
10
11
  import type { PoliticalExposureDto } from './PoliticalExposureDto';
11
12
  import type { SanctionsDto } from './SanctionsDto';
@@ -82,6 +83,10 @@ export type UpdateIndividualClientDto = {
82
83
  * Onboarding risk assessment of the individual client
83
84
  */
84
85
  onboardingRisk?: CreateOrUpdateRiskDto;
86
+ /**
87
+ * Integrations
88
+ */
89
+ integrations?: IndividualClientIntegrationsDto;
85
90
  };
86
91
  export declare namespace UpdateIndividualClientDto {
87
92
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateIndividualClientDto.js","sourceRoot":"","sources":["../../models/UpdateIndividualClientDto.ts"],"names":[],"mappings":";;;AAyFA,IAAiB,yBAAyB,CAqBzC;AArBD,WAAiB,yBAAyB;IACtC;;OAEG;IACH,IAAY,cAGX;IAHD,WAAY,cAAc;QACtB,mCAAiB,CAAA;QACjB,2CAAyB,CAAA;IAC7B,CAAC,EAHW,cAAc,GAAd,wCAAc,KAAd,wCAAc,QAGzB;IACD;;OAEG;IACH,IAAY,aASX;IATD,WAAY,aAAa;QACrB,sCAAqB,CAAA;QACrB,0DAAyC,CAAA;QACzC,wCAAuB,CAAA;QACvB,sCAAqB,CAAA;QACrB,4CAA2B,CAAA;QAC3B,kCAAiB,CAAA;QACjB,wDAAuC,CAAA;QACvC,sDAAqC,CAAA;IACzC,CAAC,EATW,aAAa,GAAb,uCAAa,KAAb,uCAAa,QASxB;AACL,CAAC,EArBgB,yBAAyB,yCAAzB,yBAAyB,QAqBzC"}
1
+ {"version":3,"file":"UpdateIndividualClientDto.js","sourceRoot":"","sources":["../../models/UpdateIndividualClientDto.ts"],"names":[],"mappings":";;;AA8FA,IAAiB,yBAAyB,CAqBzC;AArBD,WAAiB,yBAAyB;IACtC;;OAEG;IACH,IAAY,cAGX;IAHD,WAAY,cAAc;QACtB,mCAAiB,CAAA;QACjB,2CAAyB,CAAA;IAC7B,CAAC,EAHW,cAAc,GAAd,wCAAc,KAAd,wCAAc,QAGzB;IACD;;OAEG;IACH,IAAY,aASX;IATD,WAAY,aAAa;QACrB,sCAAqB,CAAA;QACrB,0DAAyC,CAAA;QACzC,wCAAuB,CAAA;QACvB,sCAAqB,CAAA;QACrB,4CAA2B,CAAA;QAC3B,kCAAiB,CAAA;QACjB,wDAAuC,CAAA;QACvC,sDAAqC,CAAA;IACzC,CAAC,EATW,aAAa,GAAb,uCAAa,KAAb,uCAAa,QASxB;AACL,CAAC,EArBgB,yBAAyB,yCAAzB,yBAAyB,QAqBzC"}
@@ -49,8 +49,9 @@ export declare class ClientsService {
49
49
  /**
50
50
  * Get an individual client by ID
51
51
  * @param clientId
52
+ * @param integrationId Integration type to filter by (SARDINE or CHAINALYSIS) - if this is provided, the client is expected to be the id in the integrated vendor
52
53
  * @returns IndividualClientDto
53
54
  * @throws ApiError
54
55
  */
55
- getIndividualClient(clientId: string): CancelablePromise<IndividualClientDto>;
56
+ getIndividualClient(clientId: string, integrationId?: 'SARDINE' | 'CHAINALYSIS'): CancelablePromise<IndividualClientDto>;
56
57
  }
@@ -88,16 +88,20 @@ class ClientsService {
88
88
  /**
89
89
  * Get an individual client by ID
90
90
  * @param clientId
91
+ * @param integrationId Integration type to filter by (SARDINE or CHAINALYSIS) - if this is provided, the client is expected to be the id in the integrated vendor
91
92
  * @returns IndividualClientDto
92
93
  * @throws ApiError
93
94
  */
94
- getIndividualClient(clientId) {
95
+ getIndividualClient(clientId, integrationId) {
95
96
  return this.httpRequest.request({
96
97
  method: 'GET',
97
98
  url: '/v1/clients/individuals/{clientId}',
98
99
  path: {
99
100
  'clientId': clientId,
100
101
  },
102
+ query: {
103
+ 'integrationId': integrationId,
104
+ },
101
105
  });
102
106
  }
103
107
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ClientsService.js","sourceRoot":"","sources":["../../services/ClientsService.ts"],"names":[],"mappings":";;;AAYA,MAAa,cAAc;IACK;IAA5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;OAKG;IACI,qBAAqB,CACxB,WAAqC;QAErC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,wBAAwB;YAC7B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,qBAAqB,CACxB,QAAgB,EAChB,WAAqC;QAErC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mCAAmC;YACxC,IAAI,EAAE;gBACF,UAAU,EAAE,QAAQ;aACvB;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;OAKG;IACI,kBAAkB,CACrB,QAAgB;QAEhB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mCAAmC;YACxC,IAAI,EAAE;gBACF,UAAU,EAAE,QAAQ;aACvB;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;OAKG;IACI,sBAAsB,CACzB,WAAsC;QAEtC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,yBAAyB;YAC9B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,sBAAsB,CACzB,QAAgB,EAChB,WAAsC;QAEtC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oCAAoC;YACzC,IAAI,EAAE;gBACF,UAAU,EAAE,QAAQ;aACvB;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;OAKG;IACI,mBAAmB,CACtB,QAAgB;QAEhB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oCAAoC;YACzC,IAAI,EAAE;gBACF,UAAU,EAAE,QAAQ;aACvB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AA9GD,wCA8GC"}
1
+ {"version":3,"file":"ClientsService.js","sourceRoot":"","sources":["../../services/ClientsService.ts"],"names":[],"mappings":";;;AAYA,MAAa,cAAc;IACK;IAA5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;OAKG;IACI,qBAAqB,CACxB,WAAqC;QAErC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,wBAAwB;YAC7B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,qBAAqB,CACxB,QAAgB,EAChB,WAAqC;QAErC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mCAAmC;YACxC,IAAI,EAAE;gBACF,UAAU,EAAE,QAAQ;aACvB;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;OAKG;IACI,kBAAkB,CACrB,QAAgB;QAEhB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mCAAmC;YACxC,IAAI,EAAE;gBACF,UAAU,EAAE,QAAQ;aACvB;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;OAKG;IACI,sBAAsB,CACzB,WAAsC;QAEtC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,yBAAyB;YAC9B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,sBAAsB,CACzB,QAAgB,EAChB,WAAsC;QAEtC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oCAAoC;YACzC,IAAI,EAAE;gBACF,UAAU,EAAE,QAAQ;aACvB;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,mBAAmB,CACtB,QAAgB,EAChB,aAAyC;QAEzC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oCAAoC;YACzC,IAAI,EAAE;gBACF,UAAU,EAAE,QAAQ;aACvB;YACD,KAAK,EAAE;gBACH,eAAe,EAAE,aAAa;aACjC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AAnHD,wCAmHC"}
@@ -1,3 +1,4 @@
1
+ import type { TransactionDto } from '../models/TransactionDto';
1
2
  import type { TransactionStatusDto } from '../models/TransactionStatusDto';
2
3
  import type { CancelablePromise } from '../core/CancelablePromise';
3
4
  import type { BaseHttpRequest } from '../core/BaseHttpRequest';
@@ -11,4 +12,11 @@ export declare class TransactionsService {
11
12
  * @throws ApiError
12
13
  */
13
14
  transactionsControllerUpdateTransactionStatus(id: string, requestBody: TransactionStatusDto): CancelablePromise<any>;
15
+ /**
16
+ * @param id
17
+ * @param integrationId
18
+ * @returns TransactionDto
19
+ * @throws ApiError
20
+ */
21
+ transactionsControllerGetTransactionById(id: string, integrationId: string): CancelablePromise<TransactionDto>;
14
22
  }
@@ -23,6 +23,24 @@ class TransactionsService {
23
23
  mediaType: 'application/json',
24
24
  });
25
25
  }
26
+ /**
27
+ * @param id
28
+ * @param integrationId
29
+ * @returns TransactionDto
30
+ * @throws ApiError
31
+ */
32
+ transactionsControllerGetTransactionById(id, integrationId) {
33
+ return this.httpRequest.request({
34
+ method: 'GET',
35
+ url: '/v1/transactions/{id}',
36
+ path: {
37
+ 'id': id,
38
+ },
39
+ query: {
40
+ 'integrationId': integrationId,
41
+ },
42
+ });
43
+ }
26
44
  }
27
45
  exports.TransactionsService = TransactionsService;
28
46
  //# sourceMappingURL=TransactionsService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionsService.js","sourceRoot":"","sources":["../../services/TransactionsService.ts"],"names":[],"mappings":";;;AAOA,MAAa,mBAAmB;IACA;IAA5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;OAKG;IACI,6CAA6C,CAChD,EAAU,EACV,WAAiC;QAEjC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oCAAoC;YACzC,IAAI,EAAE;gBACF,IAAI,EAAE,EAAE;aACX;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;CACJ;AAtBD,kDAsBC"}
1
+ {"version":3,"file":"TransactionsService.js","sourceRoot":"","sources":["../../services/TransactionsService.ts"],"names":[],"mappings":";;;AAQA,MAAa,mBAAmB;IACA;IAA5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;OAKG;IACI,6CAA6C,CAChD,EAAU,EACV,WAAiC;QAEjC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oCAAoC;YACzC,IAAI,EAAE;gBACF,IAAI,EAAE,EAAE;aACX;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;OAKG;IACI,wCAAwC,CAC3C,EAAU,EACV,aAAqB;QAErB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,uBAAuB;YAC5B,IAAI,EAAE;gBACF,IAAI,EAAE,EAAE;aACX;YACD,KAAK,EAAE;gBACH,eAAe,EAAE,aAAa;aACjC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AA3CD,kDA2CC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corsa-labs/sdk",
3
- "version": "3.13.0",
3
+ "version": "3.14.0",
4
4
  "description": "SDK for Corsa API",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",
@@ -16,6 +16,7 @@
16
16
  },
17
17
  "license": "MIT",
18
18
  "dependencies": {
19
+ "@corsa-labs/encryption-node": "^1.0.8",
19
20
  "axios": "^0.30.0",
20
21
  "uuid": "^11.1.0"
21
22
  },