@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.
Files changed (155) hide show
  1. package/dist/models/Client.d.ts.map +1 -1
  2. package/dist/models/Client.js +21 -3
  3. package/dist/models/ReportItem.d.ts +2 -2
  4. package/dist/models/ReportItem.d.ts.map +1 -1
  5. package/dist/models/ReportItem.js +4 -4
  6. package/dist/models/mex/MexReportItem.js +1 -1
  7. package/dist/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.js +1 -1
  8. package/dist/models/mex/actividad-vulnerable/avi/MexAVIReportItem.js +1 -1
  9. package/dist/models/mex/actividad-vulnerable/jys/MexJYSReportItem.js +1 -1
  10. package/dist/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.js +1 -1
  11. package/dist/resources/addresses.d.ts +3 -3
  12. package/dist/resources/addresses.d.ts.map +1 -1
  13. package/dist/resources/bank-accounts.d.ts +3 -3
  14. package/dist/resources/bank-accounts.d.ts.map +1 -1
  15. package/dist/resources/base.d.ts +7 -6
  16. package/dist/resources/base.d.ts.map +1 -1
  17. package/dist/resources/base.js +3 -0
  18. package/dist/resources/clients.d.ts +3 -3
  19. package/dist/resources/clients.d.ts.map +1 -1
  20. package/dist/resources/contact-methods.d.ts +3 -3
  21. package/dist/resources/contact-methods.d.ts.map +1 -1
  22. package/dist/resources/documents.d.ts +94 -7
  23. package/dist/resources/documents.d.ts.map +1 -1
  24. package/dist/resources/documents.js +107 -0
  25. package/dist/resources/index.d.ts +1 -1
  26. package/dist/resources/index.d.ts.map +1 -1
  27. package/dist/resources/index.js +1 -1
  28. package/dist/resources/mex/actividad-vulnerable/avi/clients.d.ts +9 -3
  29. package/dist/resources/mex/actividad-vulnerable/avi/clients.d.ts.map +1 -1
  30. package/dist/resources/mex/actividad-vulnerable/avi/clients.js +14 -1
  31. package/dist/resources/mex/actividad-vulnerable/avi/reports.d.ts +39 -21
  32. package/dist/resources/mex/actividad-vulnerable/avi/reports.d.ts.map +1 -1
  33. package/dist/resources/mex/actividad-vulnerable/avi/reports.js +88 -20
  34. package/dist/resources/mex/actividad-vulnerable/avi/transactions.d.ts +9 -3
  35. package/dist/resources/mex/actividad-vulnerable/avi/transactions.d.ts.map +1 -1
  36. package/dist/resources/mex/actividad-vulnerable/avi/transactions.js +14 -1
  37. package/dist/resources/mex/actividad-vulnerable/jys/clients.d.ts +10 -3
  38. package/dist/resources/mex/actividad-vulnerable/jys/clients.d.ts.map +1 -1
  39. package/dist/resources/mex/actividad-vulnerable/jys/clients.js +14 -1
  40. package/dist/resources/mex/actividad-vulnerable/jys/reports.d.ts +33 -11
  41. package/dist/resources/mex/actividad-vulnerable/jys/reports.d.ts.map +1 -1
  42. package/dist/resources/mex/actividad-vulnerable/jys/reports.js +82 -10
  43. package/dist/resources/mex/actividad-vulnerable/jys/transactions.d.ts +10 -3
  44. package/dist/resources/mex/actividad-vulnerable/jys/transactions.d.ts.map +1 -1
  45. package/dist/resources/mex/actividad-vulnerable/jys/transactions.js +14 -1
  46. package/dist/resources/mex/actividad-vulnerable/tsc/clients.d.ts +10 -3
  47. package/dist/resources/mex/actividad-vulnerable/tsc/clients.d.ts.map +1 -1
  48. package/dist/resources/mex/actividad-vulnerable/tsc/clients.js +14 -1
  49. package/dist/resources/mex/actividad-vulnerable/tsc/reports.d.ts +33 -11
  50. package/dist/resources/mex/actividad-vulnerable/tsc/reports.d.ts.map +1 -1
  51. package/dist/resources/mex/actividad-vulnerable/tsc/reports.js +82 -10
  52. package/dist/resources/mex/actividad-vulnerable/tsc/transactions.d.ts +10 -3
  53. package/dist/resources/mex/actividad-vulnerable/tsc/transactions.d.ts.map +1 -1
  54. package/dist/resources/mex/actividad-vulnerable/tsc/transactions.js +14 -1
  55. package/dist/resources/mex/addresses.d.ts +11 -3
  56. package/dist/resources/mex/addresses.d.ts.map +1 -1
  57. package/dist/resources/mex/addresses.js +16 -1
  58. package/dist/resources/mex/bank-accounts.d.ts +11 -3
  59. package/dist/resources/mex/bank-accounts.d.ts.map +1 -1
  60. package/dist/resources/mex/bank-accounts.js +16 -0
  61. package/dist/resources/mex/clients.d.ts +12 -3
  62. package/dist/resources/mex/clients.d.ts.map +1 -1
  63. package/dist/resources/mex/clients.js +17 -1
  64. package/dist/resources/mex/reports.d.ts +41 -19
  65. package/dist/resources/mex/reports.d.ts.map +1 -1
  66. package/dist/resources/mex/reports.js +55 -19
  67. package/dist/resources/mex/transactions.d.ts +11 -3
  68. package/dist/resources/mex/transactions.d.ts.map +1 -1
  69. package/dist/resources/mex/transactions.js +16 -1
  70. package/dist/resources/reports.d.ts +33 -39
  71. package/dist/resources/reports.d.ts.map +1 -1
  72. package/dist/resources/reports.js +34 -36
  73. package/dist/resources/transactions.d.ts +3 -3
  74. package/dist/resources/transactions.d.ts.map +1 -1
  75. package/dist/sdk/ComplianceSDK.d.ts +2 -0
  76. package/dist/sdk/ComplianceSDK.d.ts.map +1 -1
  77. package/dist/sdk/ComplianceSDK.js +17 -9
  78. package/dist/sdk/mex/ComplianceSDK.d.ts.map +1 -1
  79. package/dist/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.d.ts.map +1 -1
  80. package/dist/sdk/mex/actividad-vulnerable/avi/types.d.ts +2 -2
  81. package/dist/sdk/mex/actividad-vulnerable/avi/types.d.ts.map +1 -1
  82. package/dist/sdk/mex/actividad-vulnerable/avi/types.js +1 -0
  83. package/dist/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.d.ts.map +1 -1
  84. package/dist/sdk/mex/actividad-vulnerable/jys/types.d.ts +2 -2
  85. package/dist/sdk/mex/actividad-vulnerable/jys/types.d.ts.map +1 -1
  86. package/dist/sdk/mex/actividad-vulnerable/jys/types.js +1 -0
  87. package/dist/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.d.ts.map +1 -1
  88. package/dist/sdk/mex/actividad-vulnerable/tsc/types.d.ts +2 -2
  89. package/dist/sdk/mex/actividad-vulnerable/tsc/types.d.ts.map +1 -1
  90. package/dist/sdk/mex/actividad-vulnerable/tsc/types.js +1 -0
  91. package/dist/sdk/mex/types.d.ts +2 -2
  92. package/dist/sdk/mex/types.d.ts.map +1 -1
  93. package/dist/sdk/types.d.ts +24 -1
  94. package/dist/sdk/types.d.ts.map +1 -1
  95. package/dist/utils/environment.d.ts +24 -0
  96. package/dist/utils/environment.d.ts.map +1 -1
  97. package/dist/utils/environment.js +38 -0
  98. package/dist/utils/index.d.ts +2 -0
  99. package/dist/utils/index.d.ts.map +1 -1
  100. package/dist/utils/index.js +4 -0
  101. package/dist/utils/session.d.ts +20 -2
  102. package/dist/utils/session.d.ts.map +1 -1
  103. package/dist/utils/session.js +9 -1
  104. package/dist/utils/trpc-client.d.ts +370 -200
  105. package/dist/utils/trpc-client.d.ts.map +1 -1
  106. package/dist/utils/trpc-client.js +2 -1
  107. package/dist/utils/upload.d.ts +81 -0
  108. package/dist/utils/upload.d.ts.map +1 -0
  109. package/dist/utils/upload.js +261 -0
  110. package/package.json +9 -8
  111. package/src/models/Client.ts +23 -3
  112. package/src/models/ReportItem.ts +4 -4
  113. package/src/models/mex/MexReportItem.ts +1 -1
  114. package/src/models/mex/actividad-vulnerable/MexActividadVulnerableReportItem.ts +1 -1
  115. package/src/models/mex/actividad-vulnerable/avi/MexAVIReportItem.ts +1 -1
  116. package/src/models/mex/actividad-vulnerable/jys/MexJYSReportItem.ts +1 -1
  117. package/src/models/mex/actividad-vulnerable/tsc/MexTSCReportItem.ts +1 -1
  118. package/src/resources/addresses.ts +8 -4
  119. package/src/resources/bank-accounts.ts +8 -4
  120. package/src/resources/base.ts +9 -4
  121. package/src/resources/clients.ts +10 -4
  122. package/src/resources/contact-methods.ts +4 -2
  123. package/src/resources/documents.ts +185 -5
  124. package/src/resources/index.ts +6 -1
  125. package/src/resources/mex/actividad-vulnerable/avi/clients.ts +30 -8
  126. package/src/resources/mex/actividad-vulnerable/avi/reports.ts +122 -26
  127. package/src/resources/mex/actividad-vulnerable/avi/transactions.ts +20 -2
  128. package/src/resources/mex/actividad-vulnerable/jys/clients.ts +20 -2
  129. package/src/resources/mex/actividad-vulnerable/jys/reports.ts +118 -16
  130. package/src/resources/mex/actividad-vulnerable/jys/transactions.ts +20 -2
  131. package/src/resources/mex/actividad-vulnerable/tsc/clients.ts +20 -2
  132. package/src/resources/mex/actividad-vulnerable/tsc/reports.ts +118 -16
  133. package/src/resources/mex/actividad-vulnerable/tsc/transactions.ts +20 -2
  134. package/src/resources/mex/addresses.ts +24 -2
  135. package/src/resources/mex/bank-accounts.ts +26 -2
  136. package/src/resources/mex/clients.ts +25 -2
  137. package/src/resources/mex/reports.ts +94 -26
  138. package/src/resources/mex/transactions.ts +24 -2
  139. package/src/resources/reports.ts +65 -43
  140. package/src/resources/transactions.ts +8 -4
  141. package/src/sdk/ComplianceSDK.ts +23 -8
  142. package/src/sdk/mex/ComplianceSDK.ts +7 -0
  143. package/src/sdk/mex/actividad-vulnerable/avi/ComplianceSDK.ts +4 -0
  144. package/src/sdk/mex/actividad-vulnerable/avi/types.ts +22 -8
  145. package/src/sdk/mex/actividad-vulnerable/jys/ComplianceSDK.ts +3 -0
  146. package/src/sdk/mex/actividad-vulnerable/jys/types.ts +22 -8
  147. package/src/sdk/mex/actividad-vulnerable/tsc/ComplianceSDK.ts +3 -0
  148. package/src/sdk/mex/actividad-vulnerable/tsc/types.ts +22 -8
  149. package/src/sdk/mex/types.ts +6 -2
  150. package/src/sdk/types.ts +31 -2
  151. package/src/utils/environment.ts +42 -0
  152. package/src/utils/index.ts +19 -0
  153. package/src/utils/session.ts +33 -3
  154. package/src/utils/trpc-client.ts +10 -1
  155. 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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AED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,eAAe,CAAC,SAAS,CAAC,CAErC;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,GAChC,MAAM,GAAG,SAAS,CAIpB"}
@@ -38,7 +38,7 @@ export const DEFAULT_TIMEOUT = 30000;
38
38
  * ```
39
39
  */
40
40
  export function createAPIClient(config) {
41
- const { mode: rawMode, 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,k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
+ /**
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.2.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": "./src/exports/index.ts",
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": "./src/exports/index.ts",
24
+ "types": "./dist/exports/index.d.ts",
24
25
  "import": "./dist/exports/index.js"
25
26
  },
26
27
  "./mexico": {
27
- "types": "./src/exports/mexico/index.ts",
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": "./src/exports/mexico/actividad-vulnerable/avi.ts",
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": "./src/exports/mexico/actividad-vulnerable/jys.ts",
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": "./src/exports/mexico/actividad-vulnerable/tsc.ts",
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.2.0"
60
+ "@artu-ai/shared": "0.4.0"
60
61
  },
61
62
  "devDependencies": {
62
63
  "@trpc/client": "^11.7.2",
@@ -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 ? new Date(raw) : undefined;
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 ? new Date(raw) : undefined;
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 ? new Date(raw) : undefined;
201
+ return raw ? parseDateString(raw) : undefined;
182
202
  }
183
203
 
184
204
  // ─────────────────────────────────────────────────────────────────
@@ -95,10 +95,10 @@ export class ReportItem extends BaseModel<ReportItemData> {
95
95
  // ─────────────────────────────────────────────────────────────────
96
96
 
97
97
  /**
98
- * Client name (denormalized for display)
98
+ * Client names (denormalized for display)
99
99
  */
100
- get clientName(): string | undefined {
101
- return this._data.clientName;
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.clientName ?? "Unknown"})`;
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.clientName ?? "Unknown"})`;
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.clientName ?? "Unknown"})`;
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.clientName ?? "Unknown"}, Alert: ${this.alertType ?? "N/A"})`;
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.clientName ?? "Unknown"}, Alert: ${this.alertType ?? "N/A"})`;
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.clientName ?? "Unknown"}, Alert: ${this.alertType ?? "N/A"})`;
88
+ return `MexTSCReportItem(${this.id}, ${this.clientNames?.join(", ") ?? "Unknown"}, Alert: ${this.alertType ?? "N/A"})`;
89
89
  }
90
90
  }
91
91