@artu-ai/compliance-sdk 0.2.0 → 0.4.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/dist/models/Client.d.ts.map +1 -1
- package/dist/models/Client.js +21 -3
- package/dist/models/ReportItem.d.ts +2 -2
- package/dist/models/ReportItem.d.ts.map +1 -1
- package/dist/models/ReportItem.js +4 -4
- package/dist/models/mex/MexReportItem.js +1 -1
- package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.js +1 -1
- package/dist/models/mex/actividad-vulnerable/avi/MexAVIReportItem.js +1 -1
- package/dist/models/mex/actividad-vulnerable/jys/MexJYSReportItem.js +1 -1
- package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.js +1 -1
- package/dist/resources/addresses.d.ts +3 -3
- package/dist/resources/addresses.d.ts.map +1 -1
- package/dist/resources/bank-accounts.d.ts +3 -3
- package/dist/resources/bank-accounts.d.ts.map +1 -1
- package/dist/resources/base.d.ts +7 -6
- package/dist/resources/base.d.ts.map +1 -1
- package/dist/resources/base.js +3 -0
- package/dist/resources/clients.d.ts +3 -3
- package/dist/resources/clients.d.ts.map +1 -1
- package/dist/resources/contact-methods.d.ts +3 -3
- package/dist/resources/contact-methods.d.ts.map +1 -1
- package/dist/resources/documents.d.ts +94 -7
- package/dist/resources/documents.d.ts.map +1 -1
- package/dist/resources/documents.js +107 -0
- package/dist/resources/index.d.ts +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +1 -1
- package/dist/resources/mex/actividad-vulnerable/avi/clients.d.ts +9 -3
- package/dist/resources/mex/actividad-vulnerable/avi/clients.d.ts.map +1 -1
- package/dist/resources/mex/actividad-vulnerable/avi/clients.js +14 -1
- package/dist/resources/mex/actividad-vulnerable/avi/reports.d.ts +39 -21
- package/dist/resources/mex/actividad-vulnerable/avi/reports.d.ts.map +1 -1
- package/dist/resources/mex/actividad-vulnerable/avi/reports.js +88 -20
- package/dist/resources/mex/actividad-vulnerable/avi/transactions.d.ts +9 -3
- package/dist/resources/mex/actividad-vulnerable/avi/transactions.d.ts.map +1 -1
- package/dist/resources/mex/actividad-vulnerable/avi/transactions.js +14 -1
- package/dist/resources/mex/actividad-vulnerable/jys/clients.d.ts +10 -3
- package/dist/resources/mex/actividad-vulnerable/jys/clients.d.ts.map +1 -1
- package/dist/resources/mex/actividad-vulnerable/jys/clients.js +14 -1
- package/dist/resources/mex/actividad-vulnerable/jys/reports.d.ts +33 -11
- package/dist/resources/mex/actividad-vulnerable/jys/reports.d.ts.map +1 -1
- package/dist/resources/mex/actividad-vulnerable/jys/reports.js +82 -10
- package/dist/resources/mex/actividad-vulnerable/jys/transactions.d.ts +10 -3
- package/dist/resources/mex/actividad-vulnerable/jys/transactions.d.ts.map +1 -1
- package/dist/resources/mex/actividad-vulnerable/jys/transactions.js +14 -1
- package/dist/resources/mex/actividad-vulnerable/tsc/clients.d.ts +10 -3
- package/dist/resources/mex/actividad-vulnerable/tsc/clients.d.ts.map +1 -1
- package/dist/resources/mex/actividad-vulnerable/tsc/clients.js +14 -1
- package/dist/resources/mex/actividad-vulnerable/tsc/reports.d.ts +33 -11
- package/dist/resources/mex/actividad-vulnerable/tsc/reports.d.ts.map +1 -1
- package/dist/resources/mex/actividad-vulnerable/tsc/reports.js +82 -10
- package/dist/resources/mex/actividad-vulnerable/tsc/transactions.d.ts +10 -3
- package/dist/resources/mex/actividad-vulnerable/tsc/transactions.d.ts.map +1 -1
- package/dist/resources/mex/actividad-vulnerable/tsc/transactions.js +14 -1
- package/dist/resources/mex/addresses.d.ts +11 -3
- package/dist/resources/mex/addresses.d.ts.map +1 -1
- package/dist/resources/mex/addresses.js +16 -1
- package/dist/resources/mex/bank-accounts.d.ts +11 -3
- package/dist/resources/mex/bank-accounts.d.ts.map +1 -1
- package/dist/resources/mex/bank-accounts.js +16 -0
- package/dist/resources/mex/clients.d.ts +12 -3
- package/dist/resources/mex/clients.d.ts.map +1 -1
- package/dist/resources/mex/clients.js +17 -1
- package/dist/resources/mex/reports.d.ts +41 -19
- package/dist/resources/mex/reports.d.ts.map +1 -1
- package/dist/resources/mex/reports.js +55 -19
- package/dist/resources/mex/transactions.d.ts +11 -3
- package/dist/resources/mex/transactions.d.ts.map +1 -1
- package/dist/resources/mex/transactions.js +16 -1
- package/dist/resources/reports.d.ts +33 -39
- package/dist/resources/reports.d.ts.map +1 -1
- package/dist/resources/reports.js +34 -36
- package/dist/resources/transactions.d.ts +3 -3
- package/dist/resources/transactions.d.ts.map +1 -1
- package/dist/sdk/ComplianceSDK.d.ts +2 -0
- package/dist/sdk/ComplianceSDK.d.ts.map +1 -1
- package/dist/sdk/ComplianceSDK.js +17 -9
- package/dist/sdk/mex/ComplianceSDK.d.ts.map +1 -1
- package/dist/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.d.ts.map +1 -1
- package/dist/sdk/mex/actividad-vulnerable/avi/types.d.ts +2 -2
- package/dist/sdk/mex/actividad-vulnerable/avi/types.d.ts.map +1 -1
- package/dist/sdk/mex/actividad-vulnerable/avi/types.js +1 -0
- package/dist/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.d.ts.map +1 -1
- package/dist/sdk/mex/actividad-vulnerable/jys/types.d.ts +2 -2
- package/dist/sdk/mex/actividad-vulnerable/jys/types.d.ts.map +1 -1
- package/dist/sdk/mex/actividad-vulnerable/jys/types.js +1 -0
- package/dist/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.d.ts.map +1 -1
- package/dist/sdk/mex/actividad-vulnerable/tsc/types.d.ts +2 -2
- package/dist/sdk/mex/actividad-vulnerable/tsc/types.d.ts.map +1 -1
- package/dist/sdk/mex/actividad-vulnerable/tsc/types.js +1 -0
- package/dist/sdk/mex/types.d.ts +2 -2
- package/dist/sdk/mex/types.d.ts.map +1 -1
- package/dist/sdk/types.d.ts +24 -1
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/utils/environment.d.ts +24 -0
- package/dist/utils/environment.d.ts.map +1 -1
- package/dist/utils/environment.js +38 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +4 -0
- package/dist/utils/session.d.ts +20 -2
- package/dist/utils/session.d.ts.map +1 -1
- package/dist/utils/session.js +9 -1
- package/dist/utils/trpc-client.d.ts +370 -200
- package/dist/utils/trpc-client.d.ts.map +1 -1
- package/dist/utils/trpc-client.js +2 -1
- package/dist/utils/upload.d.ts +81 -0
- package/dist/utils/upload.d.ts.map +1 -0
- package/dist/utils/upload.js +261 -0
- package/package.json +9 -8
- package/src/models/Client.ts +23 -3
- package/src/models/ReportItem.ts +4 -4
- package/src/models/mex/MexReportItem.ts +1 -1
- package/src/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.ts +1 -1
- package/src/models/mex/actividad-vulnerable/avi/MexAVIReportItem.ts +1 -1
- package/src/models/mex/actividad-vulnerable/jys/MexJYSReportItem.ts +1 -1
- package/src/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.ts +1 -1
- package/src/resources/addresses.ts +8 -4
- package/src/resources/bank-accounts.ts +8 -4
- package/src/resources/base.ts +9 -4
- package/src/resources/clients.ts +10 -4
- package/src/resources/contact-methods.ts +4 -2
- package/src/resources/documents.ts +185 -5
- package/src/resources/index.ts +6 -1
- package/src/resources/mex/actividad-vulnerable/avi/clients.ts +30 -8
- package/src/resources/mex/actividad-vulnerable/avi/reports.ts +122 -26
- package/src/resources/mex/actividad-vulnerable/avi/transactions.ts +20 -2
- package/src/resources/mex/actividad-vulnerable/jys/clients.ts +20 -2
- package/src/resources/mex/actividad-vulnerable/jys/reports.ts +118 -16
- package/src/resources/mex/actividad-vulnerable/jys/transactions.ts +20 -2
- package/src/resources/mex/actividad-vulnerable/tsc/clients.ts +20 -2
- package/src/resources/mex/actividad-vulnerable/tsc/reports.ts +118 -16
- package/src/resources/mex/actividad-vulnerable/tsc/transactions.ts +20 -2
- package/src/resources/mex/addresses.ts +24 -2
- package/src/resources/mex/bank-accounts.ts +26 -2
- package/src/resources/mex/clients.ts +25 -2
- package/src/resources/mex/reports.ts +94 -26
- package/src/resources/mex/transactions.ts +24 -2
- package/src/resources/reports.ts +65 -43
- package/src/resources/transactions.ts +8 -4
- package/src/sdk/ComplianceSDK.ts +23 -8
- package/src/sdk/mex/ComplianceSDK.ts +7 -0
- package/src/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.ts +4 -0
- package/src/sdk/mex/actividad-vulnerable/avi/types.ts +22 -8
- package/src/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.ts +3 -0
- package/src/sdk/mex/actividad-vulnerable/jys/types.ts +22 -8
- package/src/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.ts +3 -0
- package/src/sdk/mex/actividad-vulnerable/tsc/types.ts +22 -8
- package/src/sdk/mex/types.ts +6 -2
- package/src/sdk/types.ts +31 -2
- package/src/utils/environment.ts +42 -0
- package/src/utils/index.ts +19 -0
- package/src/utils/session.ts +33 -3
- package/src/utils/trpc-client.ts +10 -1
- package/src/utils/upload.ts +388 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trpc-client.d.ts","sourceRoot":"","sources":["../../src/utils/trpc-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAiB,eAAe,EAAE,MAAM,cAAc,CAAC;AAGhF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAMrC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC;AAE9B;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/C,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE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Mode, baseUrl, environment, apiVersion = LATEST_API_VERSION, timeout = DEFAULT_TIMEOUT, } = config;
|
|
41
|
+
const { mode: rawMode, baseUrl, environment, apiVersion = LATEST_API_VERSION, timeout = DEFAULT_TIMEOUT, organizationId, } = config;
|
|
42
42
|
const mode = rawMode ?? "apiKey";
|
|
43
43
|
let authHeaders = {};
|
|
44
44
|
let resolvedCredentials;
|
|
@@ -60,6 +60,7 @@ export function createAPIClient(config) {
|
|
|
60
60
|
...authHeaders,
|
|
61
61
|
"X-Environment": environment,
|
|
62
62
|
"X-Request-ID": generateRequestId(),
|
|
63
|
+
...(organizationId ? { "X-Organization-ID": organizationId } : {}),
|
|
63
64
|
};
|
|
64
65
|
// Normalize baseUrl (remove trailing slash)
|
|
65
66
|
const normalizedBaseUrl = baseUrl.replace(/\/$/, "");
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document Upload Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides browser and Node.js compatible file upload with progress tracking.
|
|
5
|
+
* Handles the complete upload flow: presigned URL → S3 upload → confirmation.
|
|
6
|
+
*/
|
|
7
|
+
import type { PresignedUploadUrl } from "@artu-ai/shared";
|
|
8
|
+
/**
|
|
9
|
+
* Maximum file size in bytes (25 MB).
|
|
10
|
+
* Must match the server-side limit.
|
|
11
|
+
*/
|
|
12
|
+
export declare const MAX_FILE_SIZE_BYTES: number;
|
|
13
|
+
/**
|
|
14
|
+
* Default upload timeout in milliseconds (5 minutes).
|
|
15
|
+
*/
|
|
16
|
+
export declare const DEFAULT_UPLOAD_TIMEOUT_MS: number;
|
|
17
|
+
/**
|
|
18
|
+
* File-like object that can be uploaded.
|
|
19
|
+
* Compatible with browser File, Blob, and Node.js Buffer.
|
|
20
|
+
*/
|
|
21
|
+
export interface UploadableFile {
|
|
22
|
+
/** File name */
|
|
23
|
+
name: string;
|
|
24
|
+
/** MIME type */
|
|
25
|
+
type: string;
|
|
26
|
+
/** File size in bytes */
|
|
27
|
+
size: number;
|
|
28
|
+
/** For browser: the file/blob itself. For Node: Buffer or stream. */
|
|
29
|
+
data: Blob | Buffer | ArrayBuffer;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Progress callback function.
|
|
33
|
+
* @param progress - Upload progress from 0 to 1
|
|
34
|
+
*/
|
|
35
|
+
export type ProgressCallback = (progress: number) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Options for uploading a file to S3.
|
|
38
|
+
*/
|
|
39
|
+
export interface UploadToS3Options {
|
|
40
|
+
/** Progress callback (0-1) */
|
|
41
|
+
onProgress?: ProgressCallback;
|
|
42
|
+
/** AbortSignal for cancellation */
|
|
43
|
+
signal?: AbortSignal;
|
|
44
|
+
/** Timeout in milliseconds */
|
|
45
|
+
timeout?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Result of a successful S3 upload.
|
|
49
|
+
*/
|
|
50
|
+
export interface UploadToS3Result {
|
|
51
|
+
/** Whether the upload was successful */
|
|
52
|
+
success: true;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Normalizes a file input to an UploadableFile.
|
|
56
|
+
* Accepts browser File/Blob or Node.js Buffer with metadata.
|
|
57
|
+
*/
|
|
58
|
+
export declare function normalizeFile(file: File | Blob | UploadableFile | {
|
|
59
|
+
buffer: Buffer;
|
|
60
|
+
name: string;
|
|
61
|
+
type: string;
|
|
62
|
+
}): UploadableFile;
|
|
63
|
+
/**
|
|
64
|
+
* Validates file size before upload.
|
|
65
|
+
* @throws FileTooLargeError if file exceeds limit
|
|
66
|
+
*/
|
|
67
|
+
export declare function validateFileSize(size: number): void;
|
|
68
|
+
/**
|
|
69
|
+
* Uploads a file to S3 using a presigned POST URL.
|
|
70
|
+
*
|
|
71
|
+
* Uses XMLHttpRequest in browsers for progress tracking,
|
|
72
|
+
* falls back to fetch in Node.js (no progress).
|
|
73
|
+
*
|
|
74
|
+
* @param file - The file to upload
|
|
75
|
+
* @param presigned - Presigned URL info from the API
|
|
76
|
+
* @param options - Upload options
|
|
77
|
+
* @returns Upload result
|
|
78
|
+
* @throws UploadError on failure
|
|
79
|
+
*/
|
|
80
|
+
export declare function uploadToS3(file: UploadableFile, presigned: PresignedUploadUrl, options?: UploadToS3Options): Promise<UploadToS3Result>;
|
|
81
|
+
//# sourceMappingURL=upload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/utils/upload.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAY1D;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAAmB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAgB,CAAC;AAMvD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,WAAW,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,mCAAmC;IACnC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,OAAO,EAAE,IAAI,CAAC;CACf;AAoBD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EACA,IAAI,GACJ,IAAI,GACJ,cAAc,GACd;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjD,cAAc,CA4ChB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAInD;AAMD;;;;;;;;;;;GAWG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,kBAAkB,EAC7B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,gBAAgB,CAAC,CAc3B"}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document Upload Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides browser and Node.js compatible file upload with progress tracking.
|
|
5
|
+
* Handles the complete upload flow: presigned URL → S3 upload → confirmation.
|
|
6
|
+
*/
|
|
7
|
+
import { UploadError, UploadAbortedError, UploadTimeoutError, FileTooLargeError, } from "../errors/upload";
|
|
8
|
+
// ─────────────────────────────────────────────────────────────────
|
|
9
|
+
// Constants
|
|
10
|
+
// ─────────────────────────────────────────────────────────────────
|
|
11
|
+
/**
|
|
12
|
+
* Maximum file size in bytes (25 MB).
|
|
13
|
+
* Must match the server-side limit.
|
|
14
|
+
*/
|
|
15
|
+
export const MAX_FILE_SIZE_BYTES = 25 * 1024 * 1024;
|
|
16
|
+
/**
|
|
17
|
+
* Default upload timeout in milliseconds (5 minutes).
|
|
18
|
+
*/
|
|
19
|
+
export const DEFAULT_UPLOAD_TIMEOUT_MS = 5 * 60 * 1000;
|
|
20
|
+
// ─────────────────────────────────────────────────────────────────
|
|
21
|
+
// Environment Detection
|
|
22
|
+
// ─────────────────────────────────────────────────────────────────
|
|
23
|
+
/**
|
|
24
|
+
* Detects if we're running in a browser environment.
|
|
25
|
+
*/
|
|
26
|
+
function isBrowser() {
|
|
27
|
+
return (typeof window !== "undefined" &&
|
|
28
|
+
typeof window.XMLHttpRequest !== "undefined");
|
|
29
|
+
}
|
|
30
|
+
// ─────────────────────────────────────────────────────────────────
|
|
31
|
+
// File Normalization
|
|
32
|
+
// ─────────────────────────────────────────────────────────────────
|
|
33
|
+
/**
|
|
34
|
+
* Normalizes a file input to an UploadableFile.
|
|
35
|
+
* Accepts browser File/Blob or Node.js Buffer with metadata.
|
|
36
|
+
*/
|
|
37
|
+
export function normalizeFile(file) {
|
|
38
|
+
// Browser File
|
|
39
|
+
if (typeof File !== "undefined" && file instanceof File) {
|
|
40
|
+
return {
|
|
41
|
+
name: file.name,
|
|
42
|
+
type: file.type,
|
|
43
|
+
size: file.size,
|
|
44
|
+
data: file,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
// Browser Blob (no name)
|
|
48
|
+
if (typeof Blob !== "undefined" &&
|
|
49
|
+
file instanceof Blob &&
|
|
50
|
+
!("name" in file)) {
|
|
51
|
+
return {
|
|
52
|
+
name: "upload",
|
|
53
|
+
type: file.type || "application/octet-stream",
|
|
54
|
+
size: file.size,
|
|
55
|
+
data: file,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
// Node.js Buffer with metadata
|
|
59
|
+
if ("buffer" in file && Buffer.isBuffer(file.buffer)) {
|
|
60
|
+
return {
|
|
61
|
+
name: file.name,
|
|
62
|
+
type: file.type,
|
|
63
|
+
size: file.buffer.length,
|
|
64
|
+
data: file.buffer,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
// Already normalized
|
|
68
|
+
if ("data" in file && "name" in file && "type" in file && "size" in file) {
|
|
69
|
+
return file;
|
|
70
|
+
}
|
|
71
|
+
throw new UploadError("Invalid file input. Expected File, Blob, or UploadableFile.", "request");
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Validates file size before upload.
|
|
75
|
+
* @throws FileTooLargeError if file exceeds limit
|
|
76
|
+
*/
|
|
77
|
+
export function validateFileSize(size) {
|
|
78
|
+
if (size > MAX_FILE_SIZE_BYTES) {
|
|
79
|
+
throw new FileTooLargeError(size, MAX_FILE_SIZE_BYTES);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// ─────────────────────────────────────────────────────────────────
|
|
83
|
+
// S3 Upload Implementation
|
|
84
|
+
// ─────────────────────────────────────────────────────────────────
|
|
85
|
+
/**
|
|
86
|
+
* Uploads a file to S3 using a presigned POST URL.
|
|
87
|
+
*
|
|
88
|
+
* Uses XMLHttpRequest in browsers for progress tracking,
|
|
89
|
+
* falls back to fetch in Node.js (no progress).
|
|
90
|
+
*
|
|
91
|
+
* @param file - The file to upload
|
|
92
|
+
* @param presigned - Presigned URL info from the API
|
|
93
|
+
* @param options - Upload options
|
|
94
|
+
* @returns Upload result
|
|
95
|
+
* @throws UploadError on failure
|
|
96
|
+
*/
|
|
97
|
+
export async function uploadToS3(file, presigned, options = {}) {
|
|
98
|
+
const { onProgress, signal, timeout = DEFAULT_UPLOAD_TIMEOUT_MS } = options;
|
|
99
|
+
// Check if already aborted
|
|
100
|
+
if (signal?.aborted) {
|
|
101
|
+
throw new UploadAbortedError();
|
|
102
|
+
}
|
|
103
|
+
// Use XHR in browser for progress, fetch in Node.js
|
|
104
|
+
if (isBrowser() && onProgress) {
|
|
105
|
+
return uploadWithXHR(file, presigned, { onProgress, signal, timeout });
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
return uploadWithFetch(file, presigned, { signal, timeout });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Uploads using XMLHttpRequest (browser only).
|
|
113
|
+
* Provides progress tracking.
|
|
114
|
+
*/
|
|
115
|
+
async function uploadWithXHR(file, presigned, options) {
|
|
116
|
+
const { onProgress, signal, timeout } = options;
|
|
117
|
+
return new Promise((resolve, reject) => {
|
|
118
|
+
const xhr = new XMLHttpRequest();
|
|
119
|
+
// Build FormData
|
|
120
|
+
const formData = new FormData();
|
|
121
|
+
// Add presigned fields first (order matters for S3)
|
|
122
|
+
for (const [key, value] of Object.entries(presigned.fields)) {
|
|
123
|
+
formData.append(key, value);
|
|
124
|
+
}
|
|
125
|
+
// Add content-type and file last
|
|
126
|
+
formData.append("Content-Type", file.type);
|
|
127
|
+
formData.append("file", file.data, file.name);
|
|
128
|
+
// Manual timeout (XHR timeout doesn't include upload time)
|
|
129
|
+
const timeoutId = setTimeout(() => {
|
|
130
|
+
xhr.abort();
|
|
131
|
+
reject(new UploadTimeoutError(timeout));
|
|
132
|
+
}, timeout);
|
|
133
|
+
// Progress tracking
|
|
134
|
+
xhr.upload.onprogress = (event) => {
|
|
135
|
+
if (event.lengthComputable) {
|
|
136
|
+
onProgress(event.loaded / event.total);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
// Success handler
|
|
140
|
+
xhr.onload = () => {
|
|
141
|
+
clearTimeout(timeoutId);
|
|
142
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
143
|
+
onProgress(1); // Ensure we report 100%
|
|
144
|
+
resolve({ success: true });
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
reject(new UploadError(`S3 upload failed with status ${xhr.status}: ${xhr.statusText}`, "upload"));
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
// Error handler
|
|
151
|
+
xhr.onerror = () => {
|
|
152
|
+
clearTimeout(timeoutId);
|
|
153
|
+
reject(new UploadError("Network error during upload", "upload"));
|
|
154
|
+
};
|
|
155
|
+
// Abort handler
|
|
156
|
+
xhr.onabort = () => {
|
|
157
|
+
clearTimeout(timeoutId);
|
|
158
|
+
reject(new UploadAbortedError());
|
|
159
|
+
};
|
|
160
|
+
// Timeout handler
|
|
161
|
+
xhr.ontimeout = () => {
|
|
162
|
+
clearTimeout(timeoutId);
|
|
163
|
+
reject(new UploadTimeoutError(timeout));
|
|
164
|
+
};
|
|
165
|
+
// AbortSignal support
|
|
166
|
+
if (signal) {
|
|
167
|
+
signal.addEventListener("abort", () => {
|
|
168
|
+
xhr.abort();
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
// Configure and send
|
|
172
|
+
xhr.open("POST", presigned.url);
|
|
173
|
+
xhr.timeout = timeout;
|
|
174
|
+
xhr.send(formData);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Uploads using fetch (Node.js compatible).
|
|
179
|
+
* No progress tracking available.
|
|
180
|
+
*/
|
|
181
|
+
async function uploadWithFetch(file, presigned, options) {
|
|
182
|
+
const { signal, timeout } = options;
|
|
183
|
+
// Create timeout signal
|
|
184
|
+
const timeoutController = new AbortController();
|
|
185
|
+
const timeoutId = setTimeout(() => timeoutController.abort(), timeout);
|
|
186
|
+
// Combine with user signal if provided
|
|
187
|
+
const combinedSignal = signal
|
|
188
|
+
? anySignal([signal, timeoutController.signal])
|
|
189
|
+
: timeoutController.signal;
|
|
190
|
+
try {
|
|
191
|
+
// Build FormData
|
|
192
|
+
// In Node.js 18+, FormData is available globally
|
|
193
|
+
const formData = new FormData();
|
|
194
|
+
// Add presigned fields first
|
|
195
|
+
for (const [key, value] of Object.entries(presigned.fields)) {
|
|
196
|
+
formData.append(key, value);
|
|
197
|
+
}
|
|
198
|
+
// Add content-type and file
|
|
199
|
+
formData.append("Content-Type", file.type);
|
|
200
|
+
// Handle different data types - convert to Blob for FormData compatibility
|
|
201
|
+
let blob;
|
|
202
|
+
if (file.data instanceof Blob) {
|
|
203
|
+
blob = file.data;
|
|
204
|
+
}
|
|
205
|
+
else if (file.data instanceof ArrayBuffer) {
|
|
206
|
+
blob = new Blob([file.data], { type: file.type });
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
// Buffer - convert to Uint8Array first for cross-platform compatibility
|
|
210
|
+
const uint8 = new Uint8Array(file.data);
|
|
211
|
+
blob = new Blob([uint8], { type: file.type });
|
|
212
|
+
}
|
|
213
|
+
formData.append("file", blob, file.name);
|
|
214
|
+
const response = await fetch(presigned.url, {
|
|
215
|
+
method: "POST",
|
|
216
|
+
body: formData,
|
|
217
|
+
signal: combinedSignal,
|
|
218
|
+
});
|
|
219
|
+
if (!response.ok) {
|
|
220
|
+
const text = await response.text().catch(() => "");
|
|
221
|
+
throw new UploadError(`S3 upload failed with status ${response.status}: ${text}`, "upload");
|
|
222
|
+
}
|
|
223
|
+
return { success: true };
|
|
224
|
+
}
|
|
225
|
+
catch (error) {
|
|
226
|
+
if (error instanceof UploadError) {
|
|
227
|
+
throw error;
|
|
228
|
+
}
|
|
229
|
+
if (error instanceof Error) {
|
|
230
|
+
if (error.name === "AbortError") {
|
|
231
|
+
// Check which signal caused the abort
|
|
232
|
+
if (signal?.aborted) {
|
|
233
|
+
throw new UploadAbortedError();
|
|
234
|
+
}
|
|
235
|
+
throw new UploadTimeoutError(timeout);
|
|
236
|
+
}
|
|
237
|
+
throw new UploadError(error.message, "upload");
|
|
238
|
+
}
|
|
239
|
+
throw new UploadError("Unknown upload error", "upload");
|
|
240
|
+
}
|
|
241
|
+
finally {
|
|
242
|
+
clearTimeout(timeoutId);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Combines multiple AbortSignals into one.
|
|
247
|
+
* Aborts when any of the input signals abort.
|
|
248
|
+
*/
|
|
249
|
+
function anySignal(signals) {
|
|
250
|
+
const controller = new AbortController();
|
|
251
|
+
for (const signal of signals) {
|
|
252
|
+
if (signal.aborted) {
|
|
253
|
+
controller.abort(signal.reason);
|
|
254
|
+
return controller.signal;
|
|
255
|
+
}
|
|
256
|
+
signal.addEventListener("abort", () => controller.abort(signal.reason), {
|
|
257
|
+
once: true,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
return controller.signal;
|
|
261
|
+
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artu-ai/compliance-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "TypeScript SDK for the Artu Compliance API",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/exports/index.js",
|
|
8
|
-
"types": "./
|
|
8
|
+
"types": "./dist/exports/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc",
|
|
11
11
|
"dev": "tsc --watch",
|
|
12
12
|
"lint": "eslint",
|
|
13
13
|
"lint:fix": "eslint --fix",
|
|
14
14
|
"check-types": "tsc --noEmit",
|
|
15
|
+
"check-types:test": "tsc --noEmit -p tsconfig.test.json",
|
|
15
16
|
"check-circular": "dpdm -T --no-warning --no-tree --exit-code circular:1 \"./src/**/*.ts\"",
|
|
16
17
|
"test": "vitest run --passWithNoTests",
|
|
17
18
|
"test:watch": "vitest",
|
|
@@ -20,23 +21,23 @@
|
|
|
20
21
|
},
|
|
21
22
|
"exports": {
|
|
22
23
|
".": {
|
|
23
|
-
"types": "./
|
|
24
|
+
"types": "./dist/exports/index.d.ts",
|
|
24
25
|
"import": "./dist/exports/index.js"
|
|
25
26
|
},
|
|
26
27
|
"./mexico": {
|
|
27
|
-
"types": "./
|
|
28
|
+
"types": "./dist/exports/mexico/index.d.ts",
|
|
28
29
|
"import": "./dist/exports/mexico/index.js"
|
|
29
30
|
},
|
|
30
31
|
"./mexico/actividad-vulnerable/avi": {
|
|
31
|
-
"types": "./
|
|
32
|
+
"types": "./dist/exports/mexico/actividad-vulnerable/avi.d.ts",
|
|
32
33
|
"import": "./dist/exports/mexico/actividad-vulnerable/avi.js"
|
|
33
34
|
},
|
|
34
35
|
"./mexico/actividad-vulnerable/jys": {
|
|
35
|
-
"types": "./
|
|
36
|
+
"types": "./dist/exports/mexico/actividad-vulnerable/jys.d.ts",
|
|
36
37
|
"import": "./dist/exports/mexico/actividad-vulnerable/jys.js"
|
|
37
38
|
},
|
|
38
39
|
"./mexico/actividad-vulnerable/tsc": {
|
|
39
|
-
"types": "./
|
|
40
|
+
"types": "./dist/exports/mexico/actividad-vulnerable/tsc.d.ts",
|
|
40
41
|
"import": "./dist/exports/mexico/actividad-vulnerable/tsc.js"
|
|
41
42
|
}
|
|
42
43
|
},
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
},
|
|
57
58
|
"license": "UNLICENSED",
|
|
58
59
|
"dependencies": {
|
|
59
|
-
"@artu-ai/shared": "0.
|
|
60
|
+
"@artu-ai/shared": "0.4.0"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@trpc/client": "^11.7.2",
|
package/src/models/Client.ts
CHANGED
|
@@ -22,6 +22,26 @@ import { ContactMethod } from "./ContactMethod";
|
|
|
22
22
|
import { BankAccount } from "./BankAccount";
|
|
23
23
|
import { Document } from "./Document";
|
|
24
24
|
|
|
25
|
+
// ===========================
|
|
26
|
+
// Utilities
|
|
27
|
+
// ===========================
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Parse a date string, handling date-only strings (YYYY-MM-DD) as local time
|
|
31
|
+
* to avoid timezone conversion issues.
|
|
32
|
+
*/
|
|
33
|
+
function parseDateString(value: string): Date {
|
|
34
|
+
// For date-only strings (yyyy-MM-dd), parse as local time to avoid timezone issues
|
|
35
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(value)) {
|
|
36
|
+
const parts = value.split("-").map(Number);
|
|
37
|
+
const year = parts[0] ?? 0;
|
|
38
|
+
const month = parts[1] ?? 1;
|
|
39
|
+
const day = parts[2] ?? 1;
|
|
40
|
+
return new Date(year, month - 1, day);
|
|
41
|
+
}
|
|
42
|
+
return new Date(value);
|
|
43
|
+
}
|
|
44
|
+
|
|
25
45
|
// ===========================
|
|
26
46
|
// Types
|
|
27
47
|
// ===========================
|
|
@@ -129,7 +149,7 @@ export class Client extends BaseModel<ClientData> {
|
|
|
129
149
|
const raw = (this._data as Record<string, unknown>).birthDate as
|
|
130
150
|
| string
|
|
131
151
|
| undefined;
|
|
132
|
-
return raw ?
|
|
152
|
+
return raw ? parseDateString(raw) : undefined;
|
|
133
153
|
}
|
|
134
154
|
|
|
135
155
|
/**
|
|
@@ -163,7 +183,7 @@ export class Client extends BaseModel<ClientData> {
|
|
|
163
183
|
const raw = (this._data as Record<string, unknown>).incorporationDate as
|
|
164
184
|
| string
|
|
165
185
|
| undefined;
|
|
166
|
-
return raw ?
|
|
186
|
+
return raw ? parseDateString(raw) : undefined;
|
|
167
187
|
}
|
|
168
188
|
|
|
169
189
|
// ─────────────────────────────────────────────────────────────────
|
|
@@ -178,7 +198,7 @@ export class Client extends BaseModel<ClientData> {
|
|
|
178
198
|
const raw = (this._data as Record<string, unknown>).formationDate as
|
|
179
199
|
| string
|
|
180
200
|
| undefined;
|
|
181
|
-
return raw ?
|
|
201
|
+
return raw ? parseDateString(raw) : undefined;
|
|
182
202
|
}
|
|
183
203
|
|
|
184
204
|
// ─────────────────────────────────────────────────────────────────
|
package/src/models/ReportItem.ts
CHANGED
|
@@ -95,10 +95,10 @@ export class ReportItem extends BaseModel<ReportItemData> {
|
|
|
95
95
|
// ─────────────────────────────────────────────────────────────────
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
|
-
* Client
|
|
98
|
+
* Client names (denormalized for display)
|
|
99
99
|
*/
|
|
100
|
-
get
|
|
101
|
-
return this._data.
|
|
100
|
+
get clientNames(): string[] | undefined {
|
|
101
|
+
return this._data.clientNames;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
/**
|
|
@@ -195,7 +195,7 @@ export class ReportItem extends BaseModel<ReportItemData> {
|
|
|
195
195
|
// ─────────────────────────────────────────────────────────────────
|
|
196
196
|
|
|
197
197
|
override toString(): string {
|
|
198
|
-
return `ReportItem(${this.id}, ${this.
|
|
198
|
+
return `ReportItem(${this.id}, ${this.clientNames?.join(", ") ?? "Unknown"})`;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
|
|
@@ -61,7 +61,7 @@ export class MexReportItem extends ReportItem {
|
|
|
61
61
|
// ─────────────────────────────────────────────────────────────────
|
|
62
62
|
|
|
63
63
|
override toString(): string {
|
|
64
|
-
return `MexReportItem(${this.id}, ${this.
|
|
64
|
+
return `MexReportItem(${this.id}, ${this.clientNames?.join(", ") ?? "Unknown"})`;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -54,7 +54,7 @@ export class MexActividadVulnerableReportItem extends MexReportItem {
|
|
|
54
54
|
// ─────────────────────────────────────────────────────────────────
|
|
55
55
|
|
|
56
56
|
override toString(): string {
|
|
57
|
-
return `MexActividadVulnerableReportItem(${this.id}, ${this.
|
|
57
|
+
return `MexActividadVulnerableReportItem(${this.id}, ${this.clientNames?.join(", ") ?? "Unknown"})`;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -85,7 +85,7 @@ export class MexAVIReportItem extends MexActividadVulnerableReportItem {
|
|
|
85
85
|
// ─────────────────────────────────────────────────────────────────
|
|
86
86
|
|
|
87
87
|
override toString(): string {
|
|
88
|
-
return `MexAVIReportItem(${this.id}, ${this.
|
|
88
|
+
return `MexAVIReportItem(${this.id}, ${this.clientNames?.join(", ") ?? "Unknown"}, Alert: ${this.alertType ?? "N/A"})`;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -85,7 +85,7 @@ export class MexJYSReportItem extends MexActividadVulnerableReportItem {
|
|
|
85
85
|
// ─────────────────────────────────────────────────────────────────
|
|
86
86
|
|
|
87
87
|
override toString(): string {
|
|
88
|
-
return `MexJYSReportItem(${this.id}, ${this.
|
|
88
|
+
return `MexJYSReportItem(${this.id}, ${this.clientNames?.join(", ") ?? "Unknown"}, Alert: ${this.alertType ?? "N/A"})`;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -85,7 +85,7 @@ export class MexTSCReportItem extends MexActividadVulnerableReportItem {
|
|
|
85
85
|
// ─────────────────────────────────────────────────────────────────
|
|
86
86
|
|
|
87
87
|
override toString(): string {
|
|
88
|
-
return `MexTSCReportItem(${this.id}, ${this.
|
|
88
|
+
return `MexTSCReportItem(${this.id}, ${this.clientNames?.join(", ") ?? "Unknown"}, Alert: ${this.alertType ?? "N/A"})`;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|