@expresscsv/sdk 0.1.2 → 0.1.3

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/index.d.mts CHANGED
@@ -1,214 +1,3920 @@
1
- import { ExType, ExRow, ExRowShape, Infer } from '@expresscsv/fields';
2
- export { ExType, Infer, x } from '@expresscsv/fields';
3
- import { WidgetState, WidgetMode } from '@expresscsv/iframe-comm';
4
- export { WidgetMode, WidgetState } from '@expresscsv/iframe-comm';
5
- import { ExBaseDef } from '@expresscsv/fields/src/types';
6
- export { ExBaseDef } from '@expresscsv/fields/src/types';
7
- import { ECSVTheme, ColorModeConfig, ECSVFontSource } from '@expresscsv/theme';
8
- export { ColorModeConfig, ColorModePref, ECSVFontSource, ECSVTheme, TailwindThemeVars } from '@expresscsv/theme';
9
- import { TemplateDownloadConfig, DeepPartial, ExpressCSVLocaleInput, ExpressCSVStep } from '@expresscsv/core';
10
- export { DeepPartial, ExpressCSVLocaleInput, ExpressCSVStep } from '@expresscsv/core';
11
-
12
- /**
13
- * Error thrown when the user cancels the import operation
14
- */
15
- declare class ImportCancelledError extends Error {
16
- constructor(message?: string);
17
- }
18
-
19
- /**
20
- * A chunk of records passed to the onData callback
21
- */
22
- interface RecordsChunk<T> {
23
- /** The records in this chunk */
24
- records: T[];
25
- /** Total number of chunks */
26
- totalChunks: number;
27
- /** Current chunk index (0-based) */
28
- currentChunkIndex: number;
29
- /** Total number of records across all chunks */
30
- totalRecords: number;
31
- }
32
- /**
33
- * Webhook configuration for remote delivery of results
34
- */
35
- interface WebhookConfig {
36
- /** The URL to send webhook requests to */
37
- url: string;
38
- /** Optional HTTP headers to include in the request */
39
- headers?: Record<string, string>;
40
- /** HTTP method to use (default: 'POST') */
41
- method?: 'POST' | 'PUT' | 'PATCH';
42
- /** Request timeout in milliseconds (default: 30000) */
43
- timeout?: number;
44
- /** Number of retry attempts on failure (default: 0) */
45
- retries?: number;
46
- /** Arbitrary developer-provided metadata */
47
- metadata?: Record<string, unknown>;
48
- }
49
- /**
50
- * Type helper that requires at least one of the specified keys to be present
51
- */
52
- type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
53
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
54
- }[Keys];
55
- /**
56
- * Base delivery options - at least one must be provided
57
- */
58
- interface DeliveryOptionsBase<T> {
59
- /** Local callback for processing chunks */
60
- onData?: (chunk: RecordsChunk<T>, next: () => void) => void | Promise<void>;
61
- /** Webhook configuration for remote delivery */
62
- webhook?: WebhookConfig;
63
- }
64
- /**
65
- * Delivery options - requires at least one of onData or webhook
66
- */
67
- type DeliveryOptions<T> = RequireAtLeastOne<DeliveryOptionsBase<T>, 'onData' | 'webhook'>;
68
- /**
69
- * Options for the open() method
70
- * Requires at least one of onData or webhook for delivery
71
- */
72
- type OpenOptions<T> = RequireAtLeastOne<DeliveryOptionsBase<T>, 'onData' | 'webhook'> & {
73
- /** Number of records per chunk (default: 1000) */
74
- chunkSize?: number;
75
- /** Called when all chunks have been processed */
76
- onComplete?: () => void;
77
- /** Called when the user cancels the import */
78
- onCancel?: () => void;
79
- /** Called when an error occurs */
80
- onError?: (error: Error) => void;
81
- /** Called when the widget opens */
82
- onWidgetOpen?: () => void;
83
- /** Called when the step changes in the wizard */
84
- onStepChange?: (stepId: ExpressCSVStep, previousStepId?: ExpressCSVStep) => void;
85
- /** Called when the widget closes */
86
- onWidgetClose?: (reason: 'user_close' | 'cancel' | 'complete' | 'error') => void;
87
- };
88
- type InferCSVImporter<TSchema extends ExType<unknown, ExBaseDef, unknown>> = CSVImporter<TSchema>;
89
-
90
- interface SDKOptions<TSchema extends ExType<unknown, ExBaseDef, unknown>> {
91
- schema: TSchema;
92
- publishableKey: string;
93
- importIdentifier: string;
94
- title?: string;
95
- debug?: boolean;
96
- developerMode?: boolean;
97
- preload?: boolean;
98
- theme?: ECSVTheme;
99
- colorMode?: ColorModeConfig;
100
- customCSS?: string;
101
- fonts?: Record<string, ECSVFontSource>;
102
- stepDisplay?: 'progressBar' | 'segmented' | 'numbered';
103
- previewSchemaBeforeUpload?: boolean;
104
- templateDownload?: TemplateDownloadConfig;
105
- saveSession?: boolean;
106
- locale?: DeepPartial<ExpressCSVLocaleInput>;
107
- }
108
- declare class CSVImporter<TSchema extends ExType<unknown, ExBaseDef, unknown> = ExRow<ExRowShape>> {
109
- private options;
110
- private iframe;
111
- private container;
112
- private connection;
113
- private connectionState;
114
- private debug;
115
- private developerMode;
116
- private importIdentifier;
117
- private sessionId;
118
- private _destroyTimer;
119
- private _beforeUnloadHandler;
120
- private widgetUrl;
121
- private widgetState;
122
- private widgetMode;
123
- private canRestart;
124
- private lastError;
125
- private openOptions;
126
- private cachedSchemaJson;
127
- private initCompletePromise;
128
- private resolveInitComplete;
129
- constructor(options: SDKOptions<TSchema>);
130
- /**
131
- * Enhanced state management
132
- */
133
- private setState;
134
- private updateDerivedState;
135
- private handleError;
136
- private waitForEvent;
137
- /**
138
- * Open the import flow with chunk-based data processing.
139
- * Automatically opens the widget if not already open.
140
- *
141
- * @param options Configuration including onData callback for processing chunks
142
- */
143
- open(options: OpenOptions<Infer<TSchema>>): void;
144
- /**
145
- * Create import session on backend with configuration
146
- * Idempotent: safe to call multiple times with same sessionId
147
- */
148
- private createImportSession;
149
- /**
150
- * Deliver results to webhook endpoint via backend API
151
- * Chunks data using SDK-determined chunk size (independent of customer's chunkSize)
152
- */
153
- private deliverToWebhook;
154
- /**
155
- * Send a single chunk to backend webhook API with retry logic
156
- */
157
- private sendChunkToBackend;
158
- /**
159
- * Process results in chunks, calling onData and/or webhook for each chunk with backpressure control
160
- */
161
- private processResultsInChunks;
162
- /**
163
- * Initialize the iframe and connection.
164
- * @param hidden Whether to create the iframe hidden (for preload) or visible (for normal open)
165
- */
166
- private initializeIframe;
167
- private log;
168
- private error;
169
- /**
170
- * Add beforeunload event listener to warn users about losing progress
171
- */
172
- private addBeforeUnloadListener;
173
- /**
174
- * Remove beforeunload event listener
175
- */
176
- private removeBeforeUnloadListener;
177
- private waitForIframeLoad;
178
- private setupConnectionAndInit;
179
- openWidget(options?: {
180
- reset?: boolean;
181
- }): Promise<void>;
182
- /**
183
- * Makes a hidden container visible for instant display of preloaded iframe
184
- */
185
- private makeContainerVisible;
186
- private setupMessageHandlers;
187
- private createAndAppendIframe;
188
- private destroy;
189
- close(reason?: 'user_close' | 'cancel' | 'complete' | 'error'): Promise<void>;
190
- resetWidget(): Promise<void>;
191
- restart(newOptions?: Partial<SDKOptions<TSchema>>): Promise<void>;
192
- private handleWidgetClosed;
193
- private hideContainer;
194
- getConnectionStatus(): boolean;
195
- getState(): WidgetState;
196
- getMode(): WidgetMode;
197
- getIsReady(): boolean;
198
- getIsOpen(): boolean;
199
- getCanRestart(): boolean;
200
- getLastError(): Error | null;
201
- getStatus(): {
202
- state: WidgetState;
203
- mode: WidgetMode;
204
- isReady: boolean;
205
- isOpen: boolean;
206
- canRestart: boolean;
207
- hasError: boolean;
208
- lastError: Error | null;
209
- connectionStatus: boolean;
210
- };
211
- getVersion(): string;
212
- }
213
-
214
- export { CSVImporter, type DeliveryOptions, ImportCancelledError, type InferCSVImporter, type OpenOptions, type RecordsChunk, type SDKOptions, type WebhookConfig };
1
+ declare interface BICOptions {
2
+ message?: string;
3
+ }
4
+
5
+ declare type BooleanControlType = 'toggle' | 'checkbox' | 'dropdown';
6
+
7
+ /**
8
+ * Color mode configuration
9
+ */
10
+ export declare interface ColorModeConfig {
11
+ default?: ColorModePref;
12
+ persist?: boolean;
13
+ onChange?: (mode: ColorModePref) => void;
14
+ }
15
+
16
+ /**
17
+ * Color mode preference
18
+ */
19
+ export declare type ColorModePref = 'light' | 'dark' | 'system';
20
+
21
+ declare const Countries: readonly [{
22
+ readonly name: "Afghanistan";
23
+ readonly alpha2: "AF";
24
+ readonly alpha3: "AFG";
25
+ readonly aliases: readonly ["Afġānistān", "افغانستان"];
26
+ }, {
27
+ readonly name: "Åland Islands";
28
+ readonly alpha2: "AX";
29
+ readonly alpha3: "ALA";
30
+ readonly aliases: readonly ["Ahvenanmaa", "Åland"];
31
+ }, {
32
+ readonly name: "Albania";
33
+ readonly alpha2: "AL";
34
+ readonly alpha3: "ALB";
35
+ readonly aliases: readonly ["Shqipëri", "Shqipëria"];
36
+ }, {
37
+ readonly name: "Algeria";
38
+ readonly alpha2: "DZ";
39
+ readonly alpha3: "DZA";
40
+ readonly aliases: readonly ["الجزائر", "Algérie"];
41
+ }, {
42
+ readonly name: "American Samoa";
43
+ readonly alpha2: "AS";
44
+ readonly alpha3: "ASM";
45
+ readonly aliases: readonly ["Sāmoa Amelika", "Amelika Sāmoa"];
46
+ }, {
47
+ readonly name: "Andorra";
48
+ readonly alpha2: "AD";
49
+ readonly alpha3: "AND";
50
+ readonly aliases: readonly ["Principat d'Andorra"];
51
+ }, {
52
+ readonly name: "Angola";
53
+ readonly alpha2: "AO";
54
+ readonly alpha3: "AGO";
55
+ readonly aliases: readonly ["República de Angola"];
56
+ }, {
57
+ readonly name: "Anguilla";
58
+ readonly alpha2: "AI";
59
+ readonly alpha3: "AIA";
60
+ readonly aliases: readonly [];
61
+ }, {
62
+ readonly name: "Antigua and Barbuda";
63
+ readonly alpha2: "AG";
64
+ readonly alpha3: "ATG";
65
+ readonly aliases: readonly ["Antigua", "Barbuda"];
66
+ }, {
67
+ readonly name: "Argentina";
68
+ readonly alpha2: "AR";
69
+ readonly alpha3: "ARG";
70
+ readonly aliases: readonly ["República Argentina", "Argentine Republic"];
71
+ }, {
72
+ readonly name: "Armenia";
73
+ readonly alpha2: "AM";
74
+ readonly alpha3: "ARM";
75
+ readonly aliases: readonly ["Հայաստան", "Hayastan", "Republic of Armenia"];
76
+ }, {
77
+ readonly name: "Aruba";
78
+ readonly alpha2: "AW";
79
+ readonly alpha3: "ABW";
80
+ readonly aliases: readonly [];
81
+ }, {
82
+ readonly name: "Australia";
83
+ readonly alpha2: "AU";
84
+ readonly alpha3: "AUS";
85
+ readonly aliases: readonly ["Commonwealth of Australia", "Oz"];
86
+ }, {
87
+ readonly name: "Austria";
88
+ readonly alpha2: "AT";
89
+ readonly alpha3: "AUT";
90
+ readonly aliases: readonly ["Österreich"];
91
+ }, {
92
+ readonly name: "Azerbaijan";
93
+ readonly alpha2: "AZ";
94
+ readonly alpha3: "AZE";
95
+ readonly aliases: readonly ["Azərbaycan", "Republic of Azerbaijan"];
96
+ }, {
97
+ readonly name: "Bahamas";
98
+ readonly alpha2: "BS";
99
+ readonly alpha3: "BHS";
100
+ readonly aliases: readonly ["The Bahamas", "Commonwealth of The Bahamas"];
101
+ }, {
102
+ readonly name: "Bahrain";
103
+ readonly alpha2: "BH";
104
+ readonly alpha3: "BHR";
105
+ readonly aliases: readonly ["البحرين", "Kingdom of Bahrain"];
106
+ }, {
107
+ readonly name: "Bangladesh";
108
+ readonly alpha2: "BD";
109
+ readonly alpha3: "BGD";
110
+ readonly aliases: readonly ["বাংলাদেশ", "People's Republic of Bangladesh"];
111
+ }, {
112
+ readonly name: "Barbados";
113
+ readonly alpha2: "BB";
114
+ readonly alpha3: "BRB";
115
+ readonly aliases: readonly [];
116
+ }, {
117
+ readonly name: "Belarus";
118
+ readonly alpha2: "BY";
119
+ readonly alpha3: "BLR";
120
+ readonly aliases: readonly ["Беларусь", "Republic of Belarus", "Belorussia"];
121
+ }, {
122
+ readonly name: "Belgium";
123
+ readonly alpha2: "BE";
124
+ readonly alpha3: "BEL";
125
+ readonly aliases: readonly ["België", "Belgique", "Belgien"];
126
+ }, {
127
+ readonly name: "Belize";
128
+ readonly alpha2: "BZ";
129
+ readonly alpha3: "BLZ";
130
+ readonly aliases: readonly [];
131
+ }, {
132
+ readonly name: "Benin";
133
+ readonly alpha2: "BJ";
134
+ readonly alpha3: "BEN";
135
+ readonly aliases: readonly ["Republic of Benin", "République du Bénin"];
136
+ }, {
137
+ readonly name: "Bermuda";
138
+ readonly alpha2: "BM";
139
+ readonly alpha3: "BMU";
140
+ readonly aliases: readonly [];
141
+ }, {
142
+ readonly name: "Bhutan";
143
+ readonly alpha2: "BT";
144
+ readonly alpha3: "BTN";
145
+ readonly aliases: readonly ["འབྲུག་ཡུལ་", "Druk Yul", "Kingdom of Bhutan"];
146
+ }, {
147
+ readonly name: "Bolivia";
148
+ readonly alpha2: "BO";
149
+ readonly alpha3: "BOL";
150
+ readonly aliases: readonly ["Bolivia", "Estado Plurinacional de Bolivia"];
151
+ }, {
152
+ readonly name: "Bonaire, Sint Eustatius and Saba";
153
+ readonly alpha2: "BQ";
154
+ readonly alpha3: "BES";
155
+ readonly aliases: readonly ["Caribbean Netherlands"];
156
+ }, {
157
+ readonly name: "Bosnia and Herzegovina";
158
+ readonly alpha2: "BA";
159
+ readonly alpha3: "BIH";
160
+ readonly aliases: readonly ["Bosna i Hercegovina"];
161
+ }, {
162
+ readonly name: "Botswana";
163
+ readonly alpha2: "BW";
164
+ readonly alpha3: "BWA";
165
+ readonly aliases: readonly ["Republic of Botswana"];
166
+ }, {
167
+ readonly name: "Brazil";
168
+ readonly alpha2: "BR";
169
+ readonly alpha3: "BRA";
170
+ readonly aliases: readonly ["Brasil", "Federative Republic of Brazil"];
171
+ }, {
172
+ readonly name: "British Indian Ocean Territory";
173
+ readonly alpha2: "IO";
174
+ readonly alpha3: "IOT";
175
+ readonly aliases: readonly [];
176
+ }, {
177
+ readonly name: "Brunei Darussalam";
178
+ readonly alpha2: "BN";
179
+ readonly alpha3: "BRN";
180
+ readonly aliases: readonly ["Brunei"];
181
+ }, {
182
+ readonly name: "Bulgaria";
183
+ readonly alpha2: "BG";
184
+ readonly alpha3: "BGR";
185
+ readonly aliases: readonly ["България", "Republic of Bulgaria"];
186
+ }, {
187
+ readonly name: "Burkina Faso";
188
+ readonly alpha2: "BF";
189
+ readonly alpha3: "BFA";
190
+ readonly aliases: readonly ["Burkina"];
191
+ }, {
192
+ readonly name: "Burundi";
193
+ readonly alpha2: "BI";
194
+ readonly alpha3: "BDI";
195
+ readonly aliases: readonly ["Republic of Burundi", "Republika y'Uburundi"];
196
+ }, {
197
+ readonly name: "Cabo Verde";
198
+ readonly alpha2: "CV";
199
+ readonly alpha3: "CPV";
200
+ readonly aliases: readonly ["Cape Verde"];
201
+ }, {
202
+ readonly name: "Cambodia";
203
+ readonly alpha2: "KH";
204
+ readonly alpha3: "KHM";
205
+ readonly aliases: readonly ["កម្ពុជា", "Kingdom of Cambodia"];
206
+ }, {
207
+ readonly name: "Cameroon";
208
+ readonly alpha2: "CM";
209
+ readonly alpha3: "CMR";
210
+ readonly aliases: readonly ["Cameroun", "Republic of Cameroon"];
211
+ }, {
212
+ readonly name: "Canada";
213
+ readonly alpha2: "CA";
214
+ readonly alpha3: "CAN";
215
+ readonly aliases: readonly ["Kanada", "Canada (French)"];
216
+ }, {
217
+ readonly name: "Cayman Islands";
218
+ readonly alpha2: "KY";
219
+ readonly alpha3: "CYM";
220
+ readonly aliases: readonly [];
221
+ }, {
222
+ readonly name: "Central African Republic";
223
+ readonly alpha2: "CF";
224
+ readonly alpha3: "CAF";
225
+ readonly aliases: readonly ["République centrafricaine"];
226
+ }, {
227
+ readonly name: "Chad";
228
+ readonly alpha2: "TD";
229
+ readonly alpha3: "TCD";
230
+ readonly aliases: readonly ["Tchad", "جمهورية تشاد"];
231
+ }, {
232
+ readonly name: "Chile";
233
+ readonly alpha2: "CL";
234
+ readonly alpha3: "CHL";
235
+ readonly aliases: readonly ["República de Chile"];
236
+ }, {
237
+ readonly name: "China";
238
+ readonly alpha2: "CN";
239
+ readonly alpha3: "CHN";
240
+ readonly aliases: readonly ["中华人民共和国", "中国", "Zhōngguó", "People's Republic of China", "PRC"];
241
+ }, {
242
+ readonly name: "Christmas Island";
243
+ readonly alpha2: "CX";
244
+ readonly alpha3: "CXR";
245
+ readonly aliases: readonly [];
246
+ }, {
247
+ readonly name: "Cocos (Keeling) Islands";
248
+ readonly alpha2: "CC";
249
+ readonly alpha3: "CCK";
250
+ readonly aliases: readonly [];
251
+ }, {
252
+ readonly name: "Colombia";
253
+ readonly alpha2: "CO";
254
+ readonly alpha3: "COL";
255
+ readonly aliases: readonly ["República de Colombia"];
256
+ }, {
257
+ readonly name: "Comoros";
258
+ readonly alpha2: "KM";
259
+ readonly alpha3: "COM";
260
+ readonly aliases: readonly ["جزر القمر", "Union of the Comoros"];
261
+ }, {
262
+ readonly name: "Congo";
263
+ readonly alpha2: "CG";
264
+ readonly alpha3: "COG";
265
+ readonly aliases: readonly ["Republic of the Congo", "Congo-Brazzaville"];
266
+ }, {
267
+ readonly name: "Democratic Republic of the Congo";
268
+ readonly alpha2: "CD";
269
+ readonly alpha3: "COD";
270
+ readonly aliases: readonly ["Democratic Republic of the Congo", "Congo-Kinshasa", "DR Congo", "DRC"];
271
+ }, {
272
+ readonly name: "Cook Islands";
273
+ readonly alpha2: "CK";
274
+ readonly alpha3: "COK";
275
+ readonly aliases: readonly [];
276
+ }, {
277
+ readonly name: "Costa Rica";
278
+ readonly alpha2: "CR";
279
+ readonly alpha3: "CRI";
280
+ readonly aliases: readonly ["República de Costa Rica"];
281
+ }, {
282
+ readonly name: "Côte d'Ivoire";
283
+ readonly alpha2: "CI";
284
+ readonly alpha3: "CIV";
285
+ readonly aliases: readonly ["Ivory Coast", "République de Côte d'Ivoire"];
286
+ }, {
287
+ readonly name: "Croatia";
288
+ readonly alpha2: "HR";
289
+ readonly alpha3: "HRV";
290
+ readonly aliases: readonly ["Hrvatska", "Republic of Croatia"];
291
+ }, {
292
+ readonly name: "Cuba";
293
+ readonly alpha2: "CU";
294
+ readonly alpha3: "CUB";
295
+ readonly aliases: readonly ["República de Cuba"];
296
+ }, {
297
+ readonly name: "Curaçao";
298
+ readonly alpha2: "CW";
299
+ readonly alpha3: "CUW";
300
+ readonly aliases: readonly [];
301
+ }, {
302
+ readonly name: "Cyprus";
303
+ readonly alpha2: "CY";
304
+ readonly alpha3: "CYP";
305
+ readonly aliases: readonly ["Κύπρος", "Kıbrıs"];
306
+ }, {
307
+ readonly name: "Czechia";
308
+ readonly alpha2: "CZ";
309
+ readonly alpha3: "CZE";
310
+ readonly aliases: readonly ["Czech Republic", "Česko"];
311
+ }, {
312
+ readonly name: "Denmark";
313
+ readonly alpha2: "DK";
314
+ readonly alpha3: "DNK";
315
+ readonly aliases: readonly ["Danmark"];
316
+ }, {
317
+ readonly name: "Djibouti";
318
+ readonly alpha2: "DJ";
319
+ readonly alpha3: "DJI";
320
+ readonly aliases: readonly ["جيبوتي", "Djibouti City-State"];
321
+ }, {
322
+ readonly name: "Dominica";
323
+ readonly alpha2: "DM";
324
+ readonly alpha3: "DMA";
325
+ readonly aliases: readonly [];
326
+ }, {
327
+ readonly name: "Dominican Republic";
328
+ readonly alpha2: "DO";
329
+ readonly alpha3: "DOM";
330
+ readonly aliases: readonly ["República Dominicana"];
331
+ }, {
332
+ readonly name: "Ecuador";
333
+ readonly alpha2: "EC";
334
+ readonly alpha3: "ECU";
335
+ readonly aliases: readonly ["República del Ecuador"];
336
+ }, {
337
+ readonly name: "Egypt";
338
+ readonly alpha2: "EG";
339
+ readonly alpha3: "EGY";
340
+ readonly aliases: readonly ["مصر", "Arab Republic of Egypt"];
341
+ }, {
342
+ readonly name: "El Salvador";
343
+ readonly alpha2: "SV";
344
+ readonly alpha3: "SLV";
345
+ readonly aliases: readonly ["República de El Salvador"];
346
+ }, {
347
+ readonly name: "Equatorial Guinea";
348
+ readonly alpha2: "GQ";
349
+ readonly alpha3: "GNQ";
350
+ readonly aliases: readonly ["República de Guinea Ecuatorial", "République de Guinée équatoriale", "República da Guiné Equatorial"];
351
+ }, {
352
+ readonly name: "Eritrea";
353
+ readonly alpha2: "ER";
354
+ readonly alpha3: "ERI";
355
+ readonly aliases: readonly ["State of Eritrea", "ኤርትራ", "إريتريا"];
356
+ }, {
357
+ readonly name: "Estonia";
358
+ readonly alpha2: "EE";
359
+ readonly alpha3: "EST";
360
+ readonly aliases: readonly ["Eesti"];
361
+ }, {
362
+ readonly name: "Eswatini";
363
+ readonly alpha2: "SZ";
364
+ readonly alpha3: "SWZ";
365
+ readonly aliases: readonly ["Swaziland", "Kingdom of Eswatini"];
366
+ }, {
367
+ readonly name: "Ethiopia";
368
+ readonly alpha2: "ET";
369
+ readonly alpha3: "ETH";
370
+ readonly aliases: readonly ["ኢትዮጵያ", "Federal Democratic Republic of Ethiopia"];
371
+ }, {
372
+ readonly name: "Falkland Islands (Malvinas)";
373
+ readonly alpha2: "FK";
374
+ readonly alpha3: "FLK";
375
+ readonly aliases: readonly ["Islas Malvinas"];
376
+ }, {
377
+ readonly name: "Faroe Islands";
378
+ readonly alpha2: "FO";
379
+ readonly alpha3: "FRO";
380
+ readonly aliases: readonly ["Føroyar"];
381
+ }, {
382
+ readonly name: "Fiji";
383
+ readonly alpha2: "FJ";
384
+ readonly alpha3: "FJI";
385
+ readonly aliases: readonly ["Viti", "Fiji Islands"];
386
+ }, {
387
+ readonly name: "Finland";
388
+ readonly alpha2: "FI";
389
+ readonly alpha3: "FIN";
390
+ readonly aliases: readonly ["Suomi"];
391
+ }, {
392
+ readonly name: "France";
393
+ readonly alpha2: "FR";
394
+ readonly alpha3: "FRA";
395
+ readonly aliases: readonly ["République française"];
396
+ }, {
397
+ readonly name: "French Guiana";
398
+ readonly alpha2: "GF";
399
+ readonly alpha3: "GUF";
400
+ readonly aliases: readonly ["Guyane"];
401
+ }, {
402
+ readonly name: "French Polynesia";
403
+ readonly alpha2: "PF";
404
+ readonly alpha3: "PYF";
405
+ readonly aliases: readonly ["Polynésie française"];
406
+ }, {
407
+ readonly name: "Gabon";
408
+ readonly alpha2: "GA";
409
+ readonly alpha3: "GAB";
410
+ readonly aliases: readonly ["République gabonaise"];
411
+ }, {
412
+ readonly name: "Gambia";
413
+ readonly alpha2: "GM";
414
+ readonly alpha3: "GMB";
415
+ readonly aliases: readonly ["Republic of The Gambia"];
416
+ }, {
417
+ readonly name: "Georgia";
418
+ readonly alpha2: "GE";
419
+ readonly alpha3: "GEO";
420
+ readonly aliases: readonly ["საქართველო", "Sakartvelo"];
421
+ }, {
422
+ readonly name: "Germany";
423
+ readonly alpha2: "DE";
424
+ readonly alpha3: "DEU";
425
+ readonly aliases: readonly ["Deutschland", "Federal Republic of Germany"];
426
+ }, {
427
+ readonly name: "Ghana";
428
+ readonly alpha2: "GH";
429
+ readonly alpha3: "GHA";
430
+ readonly aliases: readonly ["Republic of Ghana"];
431
+ }, {
432
+ readonly name: "Gibraltar";
433
+ readonly alpha2: "GI";
434
+ readonly alpha3: "GIB";
435
+ readonly aliases: readonly [""];
436
+ }, {
437
+ readonly name: "Greece";
438
+ readonly alpha2: "GR";
439
+ readonly alpha3: "GRC";
440
+ readonly aliases: readonly ["Ελλάδα", "Hellas", "Hellenic Republic"];
441
+ }, {
442
+ readonly name: "Greenland";
443
+ readonly alpha2: "GL";
444
+ readonly alpha3: "GRL";
445
+ readonly aliases: readonly ["Kalaallit Nunaat"];
446
+ }, {
447
+ readonly name: "Grenada";
448
+ readonly alpha2: "GD";
449
+ readonly alpha3: "GRD";
450
+ readonly aliases: readonly [];
451
+ }, {
452
+ readonly name: "Guadeloupe";
453
+ readonly alpha2: "GP";
454
+ readonly alpha3: "GLP";
455
+ readonly aliases: readonly [];
456
+ }, {
457
+ readonly name: "Guam";
458
+ readonly alpha2: "GU";
459
+ readonly alpha3: "GUM";
460
+ readonly aliases: readonly ["Guåhån"];
461
+ }, {
462
+ readonly name: "Guatemala";
463
+ readonly alpha2: "GT";
464
+ readonly alpha3: "GTM";
465
+ readonly aliases: readonly ["República de Guatemala"];
466
+ }, {
467
+ readonly name: "Guernsey";
468
+ readonly alpha2: "GG";
469
+ readonly alpha3: "GGY";
470
+ readonly aliases: readonly [];
471
+ }, {
472
+ readonly name: "Guinea";
473
+ readonly alpha2: "GN";
474
+ readonly alpha3: "GIN";
475
+ readonly aliases: readonly ["République de Guinée"];
476
+ }, {
477
+ readonly name: "Guinea-Bissau";
478
+ readonly alpha2: "GW";
479
+ readonly alpha3: "GNB";
480
+ readonly aliases: readonly ["República da Guiné-Bissau"];
481
+ }, {
482
+ readonly name: "Guyana";
483
+ readonly alpha2: "GY";
484
+ readonly alpha3: "GUY";
485
+ readonly aliases: readonly ["Co-operative Republic of Guyana"];
486
+ }, {
487
+ readonly name: "Haiti";
488
+ readonly alpha2: "HT";
489
+ readonly alpha3: "HTI";
490
+ readonly aliases: readonly ["République d'Haïti", "Repiblik d Ayiti"];
491
+ }, {
492
+ readonly name: "Holy See";
493
+ readonly alpha2: "VA";
494
+ readonly alpha3: "VAT";
495
+ readonly aliases: readonly ["Vatican City", "Vatican City State", "Santa Sede"];
496
+ }, {
497
+ readonly name: "Honduras";
498
+ readonly alpha2: "HN";
499
+ readonly alpha3: "HND";
500
+ readonly aliases: readonly ["República de Honduras"];
501
+ }, {
502
+ readonly name: "Hong Kong";
503
+ readonly alpha2: "HK";
504
+ readonly alpha3: "HKG";
505
+ readonly aliases: readonly ["香港", "Xianggang", "Hong Kong SAR"];
506
+ }, {
507
+ readonly name: "Hungary";
508
+ readonly alpha2: "HU";
509
+ readonly alpha3: "HUN";
510
+ readonly aliases: readonly ["Magyarország"];
511
+ }, {
512
+ readonly name: "Iceland";
513
+ readonly alpha2: "IS";
514
+ readonly alpha3: "ISL";
515
+ readonly aliases: readonly ["Ísland"];
516
+ }, {
517
+ readonly name: "India";
518
+ readonly alpha2: "IN";
519
+ readonly alpha3: "IND";
520
+ readonly aliases: readonly ["भारत", "Republic of India", "Bharat"];
521
+ }, {
522
+ readonly name: "Indonesia";
523
+ readonly alpha2: "ID";
524
+ readonly alpha3: "IDN";
525
+ readonly aliases: readonly ["Republik Indonesia"];
526
+ }, {
527
+ readonly name: "Iran, Islamic Republic of";
528
+ readonly alpha2: "IR";
529
+ readonly alpha3: "IRN";
530
+ readonly aliases: readonly ["ایران", "Islamic Republic of Iran"];
531
+ }, {
532
+ readonly name: "Iraq";
533
+ readonly alpha2: "IQ";
534
+ readonly alpha3: "IRQ";
535
+ readonly aliases: readonly ["العراق", "Republic of Iraq"];
536
+ }, {
537
+ readonly name: "Ireland";
538
+ readonly alpha2: "IE";
539
+ readonly alpha3: "IRL";
540
+ readonly aliases: readonly ["Éire", "Republic of Ireland"];
541
+ }, {
542
+ readonly name: "Isle of Man";
543
+ readonly alpha2: "IM";
544
+ readonly alpha3: "IMN";
545
+ readonly aliases: readonly ["Mann", "Ellan Vannin"];
546
+ }, {
547
+ readonly name: "Israel";
548
+ readonly alpha2: "IL";
549
+ readonly alpha3: "ISR";
550
+ readonly aliases: readonly ["יִשְׂרָאֵל", "State of Israel", "Medīnat Yisrā'el"];
551
+ }, {
552
+ readonly name: "Italy";
553
+ readonly alpha2: "IT";
554
+ readonly alpha3: "ITA";
555
+ readonly aliases: readonly ["Italia", "Repubblica Italiana"];
556
+ }, {
557
+ readonly name: "Jamaica";
558
+ readonly alpha2: "JM";
559
+ readonly alpha3: "JAM";
560
+ readonly aliases: readonly [];
561
+ }, {
562
+ readonly name: "Japan";
563
+ readonly alpha2: "JP";
564
+ readonly alpha3: "JPN";
565
+ readonly aliases: readonly ["日本", "Nihon", "Nippon"];
566
+ }, {
567
+ readonly name: "Jersey";
568
+ readonly alpha2: "JE";
569
+ readonly alpha3: "JEY";
570
+ readonly aliases: readonly [];
571
+ }, {
572
+ readonly name: "Jordan";
573
+ readonly alpha2: "JO";
574
+ readonly alpha3: "JOR";
575
+ readonly aliases: readonly ["الأردن", "Hashemite Kingdom of Jordan"];
576
+ }, {
577
+ readonly name: "Kazakhstan";
578
+ readonly alpha2: "KZ";
579
+ readonly alpha3: "KAZ";
580
+ readonly aliases: readonly ["Қазақстан", "Republic of Kazakhstan"];
581
+ }, {
582
+ readonly name: "Kenya";
583
+ readonly alpha2: "KE";
584
+ readonly alpha3: "KEN";
585
+ readonly aliases: readonly ["Republic of Kenya"];
586
+ }, {
587
+ readonly name: "Kiribati";
588
+ readonly alpha2: "KI";
589
+ readonly alpha3: "KIR";
590
+ readonly aliases: readonly [];
591
+ }, {
592
+ readonly name: "North Korea";
593
+ readonly alpha2: "KP";
594
+ readonly alpha3: "PRK";
595
+ readonly aliases: readonly ["North Korea", "조선민주주의인민공화국", "Democratic People's Republic of Korea"];
596
+ }, {
597
+ readonly name: "South Korea";
598
+ readonly alpha2: "KR";
599
+ readonly alpha3: "KOR";
600
+ readonly aliases: readonly ["South Korea", "대한민국", "Republic of Korea"];
601
+ }, {
602
+ readonly name: "Kosovo";
603
+ readonly alpha2: "XK";
604
+ readonly alpha3: "XKS";
605
+ readonly aliases: readonly ["Kosova", "Косово", "Republic of Kosovo", "Republika e Kosovës"];
606
+ }, {
607
+ readonly name: "Kuwait";
608
+ readonly alpha2: "KW";
609
+ readonly alpha3: "KWT";
610
+ readonly aliases: readonly ["الكويت", "State of Kuwait"];
611
+ }, {
612
+ readonly name: "Kyrgyzstan";
613
+ readonly alpha2: "KG";
614
+ readonly alpha3: "KGZ";
615
+ readonly aliases: readonly ["Кыргызстан", "Kyrgyz Republic"];
616
+ }, {
617
+ readonly name: "Lao People's Democratic Republic";
618
+ readonly alpha2: "LA";
619
+ readonly alpha3: "LAO";
620
+ readonly aliases: readonly ["Laos", "ສປປລາວ"];
621
+ }, {
622
+ readonly name: "Latvia";
623
+ readonly alpha2: "LV";
624
+ readonly alpha3: "LVA";
625
+ readonly aliases: readonly ["Latvija"];
626
+ }, {
627
+ readonly name: "Lebanon";
628
+ readonly alpha2: "LB";
629
+ readonly alpha3: "LBN";
630
+ readonly aliases: readonly ["لبنان", "Republic of Lebanon"];
631
+ }, {
632
+ readonly name: "Lesotho";
633
+ readonly alpha2: "LS";
634
+ readonly alpha3: "LSO";
635
+ readonly aliases: readonly ["Kingdom of Lesotho"];
636
+ }, {
637
+ readonly name: "Liberia";
638
+ readonly alpha2: "LR";
639
+ readonly alpha3: "LBR";
640
+ readonly aliases: readonly ["Republic of Liberia"];
641
+ }, {
642
+ readonly name: "Libya";
643
+ readonly alpha2: "LY";
644
+ readonly alpha3: "LBY";
645
+ readonly aliases: readonly ["Libyan Arab Jamahiriya"];
646
+ }, {
647
+ readonly name: "Liechtenstein";
648
+ readonly alpha2: "LI";
649
+ readonly alpha3: "LIE";
650
+ readonly aliases: readonly ["Fürstentum Liechtenstein"];
651
+ }, {
652
+ readonly name: "Lithuania";
653
+ readonly alpha2: "LT";
654
+ readonly alpha3: "LTU";
655
+ readonly aliases: readonly ["Lietuva", "Republic of Lithuania"];
656
+ }, {
657
+ readonly name: "Luxembourg";
658
+ readonly alpha2: "LU";
659
+ readonly alpha3: "LUX";
660
+ readonly aliases: readonly ["Lëtzebuerg", "Luxembourg", "Luxemburg"];
661
+ }, {
662
+ readonly name: "Macao";
663
+ readonly alpha2: "MO";
664
+ readonly alpha3: "MAC";
665
+ readonly aliases: readonly ["澳門", "Macao SAR", "Àomén"];
666
+ }, {
667
+ readonly name: "Madagascar";
668
+ readonly alpha2: "MG";
669
+ readonly alpha3: "MDG";
670
+ readonly aliases: readonly ["Repoblikan'i Madagasikara", "République de Madagascar"];
671
+ }, {
672
+ readonly name: "Malawi";
673
+ readonly alpha2: "MW";
674
+ readonly alpha3: "MWI";
675
+ readonly aliases: readonly ["Republic of Malawi"];
676
+ }, {
677
+ readonly name: "Malaysia";
678
+ readonly alpha2: "MY";
679
+ readonly alpha3: "MYS";
680
+ readonly aliases: readonly ["Malaysia", "ماليزيا"];
681
+ }, {
682
+ readonly name: "Maldives";
683
+ readonly alpha2: "MV";
684
+ readonly alpha3: "MDV";
685
+ readonly aliases: readonly ["ދިވެހިރާއްޖޭގެ", "Dhivehi Raajje", "Republic of Maldives"];
686
+ }, {
687
+ readonly name: "Mali";
688
+ readonly alpha2: "ML";
689
+ readonly alpha3: "MLI";
690
+ readonly aliases: readonly ["République du Mali"];
691
+ }, {
692
+ readonly name: "Malta";
693
+ readonly alpha2: "MT";
694
+ readonly alpha3: "MLT";
695
+ readonly aliases: readonly ["Repubblika ta' Malta", "Republic of Malta"];
696
+ }, {
697
+ readonly name: "Marshall Islands";
698
+ readonly alpha2: "MH";
699
+ readonly alpha3: "MHL";
700
+ readonly aliases: readonly ["Aolepān Aorōkin M̧ajeļ", "Republic of the Marshall Islands"];
701
+ }, {
702
+ readonly name: "Martinique";
703
+ readonly alpha2: "MQ";
704
+ readonly alpha3: "MTQ";
705
+ readonly aliases: readonly [];
706
+ }, {
707
+ readonly name: "Mauritania";
708
+ readonly alpha2: "MR";
709
+ readonly alpha3: "MRT";
710
+ readonly aliases: readonly ["موريتانيا", "Islamic Republic of Mauritania"];
711
+ }, {
712
+ readonly name: "Mauritius";
713
+ readonly alpha2: "MU";
714
+ readonly alpha3: "MUS";
715
+ readonly aliases: readonly ["Republic of Mauritius", "République de Maurice"];
716
+ }, {
717
+ readonly name: "Mayotte";
718
+ readonly alpha2: "YT";
719
+ readonly alpha3: "MYT";
720
+ readonly aliases: readonly [];
721
+ }, {
722
+ readonly name: "Mexico";
723
+ readonly alpha2: "MX";
724
+ readonly alpha3: "MEX";
725
+ readonly aliases: readonly ["México", "Estados Unidos Mexicanos"];
726
+ }, {
727
+ readonly name: "Micronesia, Federated States of";
728
+ readonly alpha2: "FM";
729
+ readonly alpha3: "FSM";
730
+ readonly aliases: readonly ["Micronesia", "Federated States of Micronesia"];
731
+ }, {
732
+ readonly name: "Moldova";
733
+ readonly alpha2: "MD";
734
+ readonly alpha3: "MDA";
735
+ readonly aliases: readonly ["Moldova", "Republica Moldova"];
736
+ }, {
737
+ readonly name: "Monaco";
738
+ readonly alpha2: "MC";
739
+ readonly alpha3: "MCO";
740
+ readonly aliases: readonly ["Principauté de Monaco"];
741
+ }, {
742
+ readonly name: "Mongolia";
743
+ readonly alpha2: "MN";
744
+ readonly alpha3: "MNG";
745
+ readonly aliases: readonly ["Монгол улс", "Mongol Uls"];
746
+ }, {
747
+ readonly name: "Montenegro";
748
+ readonly alpha2: "ME";
749
+ readonly alpha3: "MNE";
750
+ readonly aliases: readonly ["Црна Гора", "Crna Gora"];
751
+ }, {
752
+ readonly name: "Montserrat";
753
+ readonly alpha2: "MS";
754
+ readonly alpha3: "MSR";
755
+ readonly aliases: readonly [];
756
+ }, {
757
+ readonly name: "Morocco";
758
+ readonly alpha2: "MA";
759
+ readonly alpha3: "MAR";
760
+ readonly aliases: readonly ["المغرب", "Maroc", "Kingdom of Morocco"];
761
+ }, {
762
+ readonly name: "Mozambique";
763
+ readonly alpha2: "MZ";
764
+ readonly alpha3: "MOZ";
765
+ readonly aliases: readonly ["Moçambique", "Republic of Mozambique"];
766
+ }, {
767
+ readonly name: "Myanmar";
768
+ readonly alpha2: "MM";
769
+ readonly alpha3: "MMR";
770
+ readonly aliases: readonly ["Burma", "မြန်မာ", "Myanma"];
771
+ }, {
772
+ readonly name: "Namibia";
773
+ readonly alpha2: "NA";
774
+ readonly alpha3: "NAM";
775
+ readonly aliases: readonly ["Republic of Namibia"];
776
+ }, {
777
+ readonly name: "Nauru";
778
+ readonly alpha2: "NR";
779
+ readonly alpha3: "NRU";
780
+ readonly aliases: readonly ["Naoero", "Republic of Nauru"];
781
+ }, {
782
+ readonly name: "Nepal";
783
+ readonly alpha2: "NP";
784
+ readonly alpha3: "NPL";
785
+ readonly aliases: readonly ["नेपाल", "Federal Democratic Republic of Nepal"];
786
+ }, {
787
+ readonly name: "Netherlands";
788
+ readonly alpha2: "NL";
789
+ readonly alpha3: "NLD";
790
+ readonly aliases: readonly ["Nederland", "Holland", "Kingdom of the Netherlands"];
791
+ }, {
792
+ readonly name: "New Caledonia";
793
+ readonly alpha2: "NC";
794
+ readonly alpha3: "NCL";
795
+ readonly aliases: readonly ["Nouvelle-Calédonie"];
796
+ }, {
797
+ readonly name: "New Zealand";
798
+ readonly alpha2: "NZ";
799
+ readonly alpha3: "NZL";
800
+ readonly aliases: readonly ["Aotearoa"];
801
+ }, {
802
+ readonly name: "Nicaragua";
803
+ readonly alpha2: "NI";
804
+ readonly alpha3: "NIC";
805
+ readonly aliases: readonly ["República de Nicaragua"];
806
+ }, {
807
+ readonly name: "Niger";
808
+ readonly alpha2: "NE";
809
+ readonly alpha3: "NER";
810
+ readonly aliases: readonly ["République du Niger"];
811
+ }, {
812
+ readonly name: "Nigeria";
813
+ readonly alpha2: "NG";
814
+ readonly alpha3: "NGA";
815
+ readonly aliases: readonly ["Federal Republic of Nigeria"];
816
+ }, {
817
+ readonly name: "Niue";
818
+ readonly alpha2: "NU";
819
+ readonly alpha3: "NIU";
820
+ readonly aliases: readonly [];
821
+ }, {
822
+ readonly name: "Norfolk Island";
823
+ readonly alpha2: "NF";
824
+ readonly alpha3: "NFK";
825
+ readonly aliases: readonly [];
826
+ }, {
827
+ readonly name: "North Macedonia";
828
+ readonly alpha2: "MK";
829
+ readonly alpha3: "MKD";
830
+ readonly aliases: readonly ["Republic of North Macedonia", "Северна Македонија"];
831
+ }, {
832
+ readonly name: "Northern Mariana Islands";
833
+ readonly alpha2: "MP";
834
+ readonly alpha3: "MNP";
835
+ readonly aliases: readonly ["Saipan", "Commonwealth of the Northern Mariana Islands"];
836
+ }, {
837
+ readonly name: "Norway";
838
+ readonly alpha2: "NO";
839
+ readonly alpha3: "NOR";
840
+ readonly aliases: readonly ["Norge", "Noreg", "Norrige"];
841
+ }, {
842
+ readonly name: "Oman";
843
+ readonly alpha2: "OM";
844
+ readonly alpha3: "OMN";
845
+ readonly aliases: readonly ["عمان", "Sultanate of Oman"];
846
+ }, {
847
+ readonly name: "Pakistan";
848
+ readonly alpha2: "PK";
849
+ readonly alpha3: "PAK";
850
+ readonly aliases: readonly ["پاکستان", "Islamic Republic of Pakistan"];
851
+ }, {
852
+ readonly name: "Palau";
853
+ readonly alpha2: "PW";
854
+ readonly alpha3: "PLW";
855
+ readonly aliases: readonly ["Beluu er a Belau", "Republic of Palau"];
856
+ }, {
857
+ readonly name: "Palestine";
858
+ readonly alpha2: "PS";
859
+ readonly alpha3: "PSE";
860
+ readonly aliases: readonly ["فلسطين", "State of Palestine"];
861
+ }, {
862
+ readonly name: "Panama";
863
+ readonly alpha2: "PA";
864
+ readonly alpha3: "PAN";
865
+ readonly aliases: readonly ["República de Panamá"];
866
+ }, {
867
+ readonly name: "Papua New Guinea";
868
+ readonly alpha2: "PG";
869
+ readonly alpha3: "PNG";
870
+ readonly aliases: readonly ["Papua Niugini"];
871
+ }, {
872
+ readonly name: "Paraguay";
873
+ readonly alpha2: "PY";
874
+ readonly alpha3: "PRY";
875
+ readonly aliases: readonly ["República del Paraguay"];
876
+ }, {
877
+ readonly name: "Peru";
878
+ readonly alpha2: "PE";
879
+ readonly alpha3: "PER";
880
+ readonly aliases: readonly ["República del Perú"];
881
+ }, {
882
+ readonly name: "Philippines";
883
+ readonly alpha2: "PH";
884
+ readonly alpha3: "PHL";
885
+ readonly aliases: readonly ["Pilipinas", "Republika ng Pilipinas"];
886
+ }, {
887
+ readonly name: "Poland";
888
+ readonly alpha2: "PL";
889
+ readonly alpha3: "POL";
890
+ readonly aliases: readonly ["Polska", "Republic of Poland"];
891
+ }, {
892
+ readonly name: "Portugal";
893
+ readonly alpha2: "PT";
894
+ readonly alpha3: "PRT";
895
+ readonly aliases: readonly ["República Portuguesa"];
896
+ }, {
897
+ readonly name: "Puerto Rico";
898
+ readonly alpha2: "PR";
899
+ readonly alpha3: "PRI";
900
+ readonly aliases: readonly [];
901
+ }, {
902
+ readonly name: "Qatar";
903
+ readonly alpha2: "QA";
904
+ readonly alpha3: "QAT";
905
+ readonly aliases: readonly ["قطر", "State of Qatar"];
906
+ }, {
907
+ readonly name: "Réunion";
908
+ readonly alpha2: "RE";
909
+ readonly alpha3: "REU";
910
+ readonly aliases: readonly [];
911
+ }, {
912
+ readonly name: "Romania";
913
+ readonly alpha2: "RO";
914
+ readonly alpha3: "ROU";
915
+ readonly aliases: readonly ["România"];
916
+ }, {
917
+ readonly name: "Russian Federation";
918
+ readonly alpha2: "RU";
919
+ readonly alpha3: "RUS";
920
+ readonly aliases: readonly ["Russia", "Российская Федерация"];
921
+ }, {
922
+ readonly name: "Rwanda";
923
+ readonly alpha2: "RW";
924
+ readonly alpha3: "RWA";
925
+ readonly aliases: readonly ["Repubulika y'u Rwanda", "République du Rwanda"];
926
+ }, {
927
+ readonly name: "Saint Barthélemy";
928
+ readonly alpha2: "BL";
929
+ readonly alpha3: "BLM";
930
+ readonly aliases: readonly ["Saint-Barthélemy"];
931
+ }, {
932
+ readonly name: "Saint Helena, Ascension and Tristan da Cunha";
933
+ readonly alpha2: "SH";
934
+ readonly alpha3: "SHN";
935
+ readonly aliases: readonly [];
936
+ }, {
937
+ readonly name: "Saint Kitts and Nevis";
938
+ readonly alpha2: "KN";
939
+ readonly alpha3: "KNA";
940
+ readonly aliases: readonly [];
941
+ }, {
942
+ readonly name: "Saint Lucia";
943
+ readonly alpha2: "LC";
944
+ readonly alpha3: "LCA";
945
+ readonly aliases: readonly [];
946
+ }, {
947
+ readonly name: "Saint Martin (French part)";
948
+ readonly alpha2: "MF";
949
+ readonly alpha3: "MAF";
950
+ readonly aliases: readonly [];
951
+ }, {
952
+ readonly name: "Saint Pierre and Miquelon";
953
+ readonly alpha2: "PM";
954
+ readonly alpha3: "SPM";
955
+ readonly aliases: readonly [];
956
+ }, {
957
+ readonly name: "Saint Vincent and the Grenadines";
958
+ readonly alpha2: "VC";
959
+ readonly alpha3: "VCT";
960
+ readonly aliases: readonly [];
961
+ }, {
962
+ readonly name: "Samoa";
963
+ readonly alpha2: "WS";
964
+ readonly alpha3: "WSM";
965
+ readonly aliases: readonly ["Sāmoa", "Independent State of Samoa"];
966
+ }, {
967
+ readonly name: "San Marino";
968
+ readonly alpha2: "SM";
969
+ readonly alpha3: "SMR";
970
+ readonly aliases: readonly ["Serenissima Repubblica di San Marino"];
971
+ }, {
972
+ readonly name: "Sao Tome and Principe";
973
+ readonly alpha2: "ST";
974
+ readonly alpha3: "STP";
975
+ readonly aliases: readonly ["São Tomé e Príncipe"];
976
+ }, {
977
+ readonly name: "Saudi Arabia";
978
+ readonly alpha2: "SA";
979
+ readonly alpha3: "SAU";
980
+ readonly aliases: readonly ["المملكة العربية السعودية", "Kingdom of Saudi Arabia", "KSA"];
981
+ }, {
982
+ readonly name: "Senegal";
983
+ readonly alpha2: "SN";
984
+ readonly alpha3: "SEN";
985
+ readonly aliases: readonly ["République du Sénégal"];
986
+ }, {
987
+ readonly name: "Serbia";
988
+ readonly alpha2: "RS";
989
+ readonly alpha3: "SRB";
990
+ readonly aliases: readonly ["Србија", "Srbija", "Republic of Serbia"];
991
+ }, {
992
+ readonly name: "Seychelles";
993
+ readonly alpha2: "SC";
994
+ readonly alpha3: "SYC";
995
+ readonly aliases: readonly ["Repiblik Sesel", "République des Seychelles"];
996
+ }, {
997
+ readonly name: "Sierra Leone";
998
+ readonly alpha2: "SL";
999
+ readonly alpha3: "SLE";
1000
+ readonly aliases: readonly ["Republic of Sierra Leone"];
1001
+ }, {
1002
+ readonly name: "Singapore";
1003
+ readonly alpha2: "SG";
1004
+ readonly alpha3: "SGP";
1005
+ readonly aliases: readonly ["新加坡", "Singapura", "Republic of Singapore"];
1006
+ }, {
1007
+ readonly name: "Sint Maarten (Dutch part)";
1008
+ readonly alpha2: "SX";
1009
+ readonly alpha3: "SXM";
1010
+ readonly aliases: readonly [];
1011
+ }, {
1012
+ readonly name: "Slovakia";
1013
+ readonly alpha2: "SK";
1014
+ readonly alpha3: "SVK";
1015
+ readonly aliases: readonly ["Slovensko", "Slovak Republic"];
1016
+ }, {
1017
+ readonly name: "Slovenia";
1018
+ readonly alpha2: "SI";
1019
+ readonly alpha3: "SVN";
1020
+ readonly aliases: readonly ["Slovenija"];
1021
+ }, {
1022
+ readonly name: "Solomon Islands";
1023
+ readonly alpha2: "SB";
1024
+ readonly alpha3: "SLB";
1025
+ readonly aliases: readonly [];
1026
+ }, {
1027
+ readonly name: "Somalia";
1028
+ readonly alpha2: "SO";
1029
+ readonly alpha3: "SOM";
1030
+ readonly aliases: readonly ["Soomaaliya", "جمهورية الصومال", "Federal Republic of Somalia"];
1031
+ }, {
1032
+ readonly name: "South Africa";
1033
+ readonly alpha2: "ZA";
1034
+ readonly alpha3: "ZAF";
1035
+ readonly aliases: readonly ["RSA", "Republic of South Africa"];
1036
+ }, {
1037
+ readonly name: "South Sudan";
1038
+ readonly alpha2: "SS";
1039
+ readonly alpha3: "SSD";
1040
+ readonly aliases: readonly ["Republic of South Sudan"];
1041
+ }, {
1042
+ readonly name: "Spain";
1043
+ readonly alpha2: "ES";
1044
+ readonly alpha3: "ESP";
1045
+ readonly aliases: readonly ["España", "Reino de España"];
1046
+ }, {
1047
+ readonly name: "Sri Lanka";
1048
+ readonly alpha2: "LK";
1049
+ readonly alpha3: "LKA";
1050
+ readonly aliases: readonly ["ශ්‍රී ලංකාව", "இலங்கை", "Democratic Socialist Republic of Sri Lanka"];
1051
+ }, {
1052
+ readonly name: "Sudan";
1053
+ readonly alpha2: "SD";
1054
+ readonly alpha3: "SDN";
1055
+ readonly aliases: readonly ["السودان", "Republic of the Sudan"];
1056
+ }, {
1057
+ readonly name: "Suriname";
1058
+ readonly alpha2: "SR";
1059
+ readonly alpha3: "SUR";
1060
+ readonly aliases: readonly ["Republiek Suriname"];
1061
+ }, {
1062
+ readonly name: "Svalbard and Jan Mayen";
1063
+ readonly alpha2: "SJ";
1064
+ readonly alpha3: "SJM";
1065
+ readonly aliases: readonly [];
1066
+ }, {
1067
+ readonly name: "Sweden";
1068
+ readonly alpha2: "SE";
1069
+ readonly alpha3: "SWE";
1070
+ readonly aliases: readonly ["Sverige", "Kingdom of Sweden"];
1071
+ }, {
1072
+ readonly name: "Switzerland";
1073
+ readonly alpha2: "CH";
1074
+ readonly alpha3: "CHE";
1075
+ readonly aliases: readonly ["Schweiz", "Suisse", "Svizzera", "Svizra", "Swiss Confederation"];
1076
+ }, {
1077
+ readonly name: "Syrian Arab Republic";
1078
+ readonly alpha2: "SY";
1079
+ readonly alpha3: "SYR";
1080
+ readonly aliases: readonly ["سوريا", "Syria"];
1081
+ }, {
1082
+ readonly name: "Taiwan, Province of China";
1083
+ readonly alpha2: "TW";
1084
+ readonly alpha3: "TWN";
1085
+ readonly aliases: readonly ["台灣", "臺灣", "Taiwan", "Republic of China", "ROC"];
1086
+ }, {
1087
+ readonly name: "Tajikistan";
1088
+ readonly alpha2: "TJ";
1089
+ readonly alpha3: "TJK";
1090
+ readonly aliases: readonly ["Тоҷикистон", "Republic of Tajikistan"];
1091
+ }, {
1092
+ readonly name: "Tanzania, United Republic of";
1093
+ readonly alpha2: "TZ";
1094
+ readonly alpha3: "TZA";
1095
+ readonly aliases: readonly ["Tanzania", "Jamhuri ya Muungano wa Tanzania"];
1096
+ }, {
1097
+ readonly name: "Thailand";
1098
+ readonly alpha2: "TH";
1099
+ readonly alpha3: "THA";
1100
+ readonly aliases: readonly ["ประเทศไทย", "Prathet Thai", "Kingdom of Thailand"];
1101
+ }, {
1102
+ readonly name: "Timor-Leste";
1103
+ readonly alpha2: "TL";
1104
+ readonly alpha3: "TLS";
1105
+ readonly aliases: readonly ["East Timor", "República Democrática de Timor-Leste"];
1106
+ }, {
1107
+ readonly name: "Togo";
1108
+ readonly alpha2: "TG";
1109
+ readonly alpha3: "TGO";
1110
+ readonly aliases: readonly ["République Togolaise"];
1111
+ }, {
1112
+ readonly name: "Tokelau";
1113
+ readonly alpha2: "TK";
1114
+ readonly alpha3: "TKL";
1115
+ readonly aliases: readonly [];
1116
+ }, {
1117
+ readonly name: "Tonga";
1118
+ readonly alpha2: "TO";
1119
+ readonly alpha3: "TON";
1120
+ readonly aliases: readonly ["Puleʻanga Fakatuʻi ʻo Tonga", "Kingdom of Tonga"];
1121
+ }, {
1122
+ readonly name: "Trinidad and Tobago";
1123
+ readonly alpha2: "TT";
1124
+ readonly alpha3: "TTO";
1125
+ readonly aliases: readonly [];
1126
+ }, {
1127
+ readonly name: "Tunisia";
1128
+ readonly alpha2: "TN";
1129
+ readonly alpha3: "TUN";
1130
+ readonly aliases: readonly ["تونس", "Republic of Tunisia"];
1131
+ }, {
1132
+ readonly name: "Türkiye";
1133
+ readonly alpha2: "TR";
1134
+ readonly alpha3: "TUR";
1135
+ readonly aliases: readonly ["Turkey", "Türkiye Cumhuriyeti", "Republic of Türkiye"];
1136
+ }, {
1137
+ readonly name: "Turkmenistan";
1138
+ readonly alpha2: "TM";
1139
+ readonly alpha3: "TKM";
1140
+ readonly aliases: readonly ["Türkmenistan"];
1141
+ }, {
1142
+ readonly name: "Turks and Caicos Islands";
1143
+ readonly alpha2: "TC";
1144
+ readonly alpha3: "TCA";
1145
+ readonly aliases: readonly [];
1146
+ }, {
1147
+ readonly name: "Tuvalu";
1148
+ readonly alpha2: "TV";
1149
+ readonly alpha3: "TUV";
1150
+ readonly aliases: readonly [];
1151
+ }, {
1152
+ readonly name: "Uganda";
1153
+ readonly alpha2: "UG";
1154
+ readonly alpha3: "UGA";
1155
+ readonly aliases: readonly ["Republic of Uganda"];
1156
+ }, {
1157
+ readonly name: "Ukraine";
1158
+ readonly alpha2: "UA";
1159
+ readonly alpha3: "UKR";
1160
+ readonly aliases: readonly ["Україна"];
1161
+ }, {
1162
+ readonly name: "United Arab Emirates";
1163
+ readonly alpha2: "AE";
1164
+ readonly alpha3: "ARE";
1165
+ readonly aliases: readonly ["الإمارات العربية المتحدة", "UAE"];
1166
+ }, {
1167
+ readonly name: "United Kingdom";
1168
+ readonly alpha2: "GB";
1169
+ readonly alpha3: "GBR";
1170
+ readonly aliases: readonly ["United Kingdom", "UK", "Britain", "Great Britain"];
1171
+ }, {
1172
+ readonly name: "United States of America";
1173
+ readonly alpha2: "US";
1174
+ readonly alpha3: "USA";
1175
+ readonly aliases: readonly ["United States", "USA", "America", "US"];
1176
+ }, {
1177
+ readonly name: "Uruguay";
1178
+ readonly alpha2: "UY";
1179
+ readonly alpha3: "URY";
1180
+ readonly aliases: readonly ["República Oriental del Uruguay"];
1181
+ }, {
1182
+ readonly name: "Uzbekistan";
1183
+ readonly alpha2: "UZ";
1184
+ readonly alpha3: "UZB";
1185
+ readonly aliases: readonly ["Oʻzbekiston", "Republic of Uzbekistan"];
1186
+ }, {
1187
+ readonly name: "Vanuatu";
1188
+ readonly alpha2: "VU";
1189
+ readonly alpha3: "VUT";
1190
+ readonly aliases: readonly ["Ripablik blong Vanuatu"];
1191
+ }, {
1192
+ readonly name: "Venezuela";
1193
+ readonly alpha2: "VE";
1194
+ readonly alpha3: "VEN";
1195
+ readonly aliases: readonly ["Venezuela", "República Bolivariana de Venezuela"];
1196
+ }, {
1197
+ readonly name: "Vietnam";
1198
+ readonly alpha2: "VN";
1199
+ readonly alpha3: "VNM";
1200
+ readonly aliases: readonly ["Việt Nam", "Socialist Republic of Vietnam"];
1201
+ }, {
1202
+ readonly name: "Virgin Islands (British)";
1203
+ readonly alpha2: "VG";
1204
+ readonly alpha3: "VGB";
1205
+ readonly aliases: readonly ["British Virgin Islands"];
1206
+ }, {
1207
+ readonly name: "Virgin Islands (U.S.)";
1208
+ readonly alpha2: "VI";
1209
+ readonly alpha3: "VIR";
1210
+ readonly aliases: readonly ["U.S. Virgin Islands"];
1211
+ }, {
1212
+ readonly name: "Wallis and Futuna";
1213
+ readonly alpha2: "WF";
1214
+ readonly alpha3: "WLF";
1215
+ readonly aliases: readonly [];
1216
+ }, {
1217
+ readonly name: "Western Sahara";
1218
+ readonly alpha2: "EH";
1219
+ readonly alpha3: "ESH";
1220
+ readonly aliases: readonly ["الصحراء الغربية", "Sahara Occidental"];
1221
+ }, {
1222
+ readonly name: "Yemen";
1223
+ readonly alpha2: "YE";
1224
+ readonly alpha3: "YEM";
1225
+ readonly aliases: readonly ["اليمن", "Republic of Yemen"];
1226
+ }, {
1227
+ readonly name: "Zambia";
1228
+ readonly alpha2: "ZM";
1229
+ readonly alpha3: "ZMB";
1230
+ readonly aliases: readonly ["Republic of Zambia"];
1231
+ }, {
1232
+ readonly name: "Zimbabwe";
1233
+ readonly alpha2: "ZW";
1234
+ readonly alpha3: "ZWE";
1235
+ readonly aliases: readonly ["Republic of Zimbabwe"];
1236
+ }];
1237
+
1238
+ declare interface CountryOptions {
1239
+ output?: CountryOutput;
1240
+ message?: string;
1241
+ }
1242
+
1243
+ declare type CountryOutput = 'name' | '2-letter' | '3-letter';
1244
+
1245
+ declare type CountryTwoLetterCode = (typeof Countries)[number]['alpha2'];
1246
+
1247
+ export declare class CSVImporter<TSchema extends ExType<unknown, ExBaseDef, unknown> = ExRow<ExRowShape>> {
1248
+ private options;
1249
+ private iframe;
1250
+ private container;
1251
+ private connection;
1252
+ private connectionState;
1253
+ private debug;
1254
+ private developerMode;
1255
+ private importIdentifier;
1256
+ private sessionId;
1257
+ private _destroyTimer;
1258
+ private _beforeUnloadHandler;
1259
+ private widgetUrl;
1260
+ private widgetState;
1261
+ private widgetMode;
1262
+ private canRestart;
1263
+ private lastError;
1264
+ private openOptions;
1265
+ private cachedSchemaJson;
1266
+ private initCompletePromise;
1267
+ private resolveInitComplete;
1268
+ constructor(options: SDKOptions<TSchema>);
1269
+ /**
1270
+ * Enhanced state management
1271
+ */
1272
+ private setState;
1273
+ private updateDerivedState;
1274
+ private handleError;
1275
+ private waitForEvent;
1276
+ /**
1277
+ * Open the import flow with chunk-based data processing.
1278
+ * Automatically opens the widget if not already open.
1279
+ *
1280
+ * @param options Configuration including onData callback for processing chunks
1281
+ */
1282
+ open(options: OpenOptions<Infer<TSchema>>): void;
1283
+ /**
1284
+ * Create import session on backend with configuration
1285
+ * Idempotent: safe to call multiple times with same sessionId
1286
+ */
1287
+ private createImportSession;
1288
+ /**
1289
+ * Deliver results to webhook endpoint via backend API
1290
+ * Chunks data using SDK-determined chunk size (independent of customer's chunkSize)
1291
+ */
1292
+ private deliverToWebhook;
1293
+ /**
1294
+ * Send a single chunk to backend webhook API with retry logic
1295
+ */
1296
+ private sendChunkToBackend;
1297
+ /**
1298
+ * Process results in chunks, calling onData and/or webhook for each chunk with backpressure control
1299
+ */
1300
+ private processResultsInChunks;
1301
+ /**
1302
+ * Initialize the iframe and connection.
1303
+ * @param hidden Whether to create the iframe hidden (for preload) or visible (for normal open)
1304
+ */
1305
+ private initializeIframe;
1306
+ private log;
1307
+ private error;
1308
+ /**
1309
+ * Add beforeunload event listener to warn users about losing progress
1310
+ */
1311
+ private addBeforeUnloadListener;
1312
+ /**
1313
+ * Remove beforeunload event listener
1314
+ */
1315
+ private removeBeforeUnloadListener;
1316
+ private waitForIframeLoad;
1317
+ private setupConnectionAndInit;
1318
+ openWidget(options?: {
1319
+ reset?: boolean;
1320
+ }): Promise<void>;
1321
+ /**
1322
+ * Makes a hidden container visible for instant display of preloaded iframe
1323
+ */
1324
+ private makeContainerVisible;
1325
+ private setupMessageHandlers;
1326
+ private createAndAppendIframe;
1327
+ private destroy;
1328
+ close(reason?: 'user_close' | 'cancel' | 'complete' | 'error'): Promise<void>;
1329
+ resetWidget(): Promise<void>;
1330
+ restart(newOptions?: Partial<SDKOptions<TSchema>>): Promise<void>;
1331
+ private handleWidgetClosed;
1332
+ private hideContainer;
1333
+ getConnectionStatus(): boolean;
1334
+ getState(): WidgetState;
1335
+ getMode(): WidgetMode;
1336
+ getIsReady(): boolean;
1337
+ getIsOpen(): boolean;
1338
+ getCanRestart(): boolean;
1339
+ getLastError(): Error | null;
1340
+ getStatus(): {
1341
+ state: WidgetState;
1342
+ mode: WidgetMode;
1343
+ isReady: boolean;
1344
+ isOpen: boolean;
1345
+ canRestart: boolean;
1346
+ hasError: boolean;
1347
+ lastError: Error | null;
1348
+ connectionStatus: boolean;
1349
+ };
1350
+ getVersion(): string;
1351
+ }
1352
+
1353
+ /**
1354
+ * ISO 4217 Currency Codes
1355
+ *
1356
+ * This file contains the list of all valid currency codes according to ISO 4217 standard.
1357
+ * Each currency has a 3-letter code, a name, and a numeric code.
1358
+ */
1359
+ declare type CurrencyCode = (typeof CurrencyCodes)[number]['code'];
1360
+
1361
+ declare interface CurrencyCodeOptions {
1362
+ allowedCurrencies?: CurrencyCode[];
1363
+ message?: string;
1364
+ }
1365
+
1366
+ declare const CurrencyCodes: readonly [{
1367
+ readonly code: "AED";
1368
+ readonly name: "United Arab Emirates dirham";
1369
+ readonly numeric: "784";
1370
+ }, {
1371
+ readonly code: "AFN";
1372
+ readonly name: "Afghan afghani";
1373
+ readonly numeric: "971";
1374
+ }, {
1375
+ readonly code: "ALL";
1376
+ readonly name: "Albanian lek";
1377
+ readonly numeric: "008";
1378
+ }, {
1379
+ readonly code: "AMD";
1380
+ readonly name: "Armenian dram";
1381
+ readonly numeric: "051";
1382
+ }, {
1383
+ readonly code: "ANG";
1384
+ readonly name: "Netherlands Antillean guilder";
1385
+ readonly numeric: "532";
1386
+ }, {
1387
+ readonly code: "AOA";
1388
+ readonly name: "Angolan kwanza";
1389
+ readonly numeric: "973";
1390
+ }, {
1391
+ readonly code: "ARS";
1392
+ readonly name: "Argentine peso";
1393
+ readonly numeric: "032";
1394
+ }, {
1395
+ readonly code: "AUD";
1396
+ readonly name: "Australian dollar";
1397
+ readonly numeric: "036";
1398
+ }, {
1399
+ readonly code: "AWG";
1400
+ readonly name: "Aruban florin";
1401
+ readonly numeric: "533";
1402
+ }, {
1403
+ readonly code: "AZN";
1404
+ readonly name: "Azerbaijani manat";
1405
+ readonly numeric: "944";
1406
+ }, {
1407
+ readonly code: "BAM";
1408
+ readonly name: "Bosnia and Herzegovina convertible mark";
1409
+ readonly numeric: "977";
1410
+ }, {
1411
+ readonly code: "BBD";
1412
+ readonly name: "Barbados dollar";
1413
+ readonly numeric: "052";
1414
+ }, {
1415
+ readonly code: "BDT";
1416
+ readonly name: "Bangladeshi taka";
1417
+ readonly numeric: "050";
1418
+ }, {
1419
+ readonly code: "BGN";
1420
+ readonly name: "Bulgarian lev";
1421
+ readonly numeric: "975";
1422
+ }, {
1423
+ readonly code: "BHD";
1424
+ readonly name: "Bahraini dinar";
1425
+ readonly numeric: "048";
1426
+ }, {
1427
+ readonly code: "BIF";
1428
+ readonly name: "Burundian franc";
1429
+ readonly numeric: "108";
1430
+ }, {
1431
+ readonly code: "BMD";
1432
+ readonly name: "Bermudian dollar";
1433
+ readonly numeric: "060";
1434
+ }, {
1435
+ readonly code: "BND";
1436
+ readonly name: "Brunei dollar";
1437
+ readonly numeric: "096";
1438
+ }, {
1439
+ readonly code: "BOB";
1440
+ readonly name: "Boliviano";
1441
+ readonly numeric: "068";
1442
+ }, {
1443
+ readonly code: "BRL";
1444
+ readonly name: "Brazilian real";
1445
+ readonly numeric: "986";
1446
+ }, {
1447
+ readonly code: "BSD";
1448
+ readonly name: "Bahamian dollar";
1449
+ readonly numeric: "044";
1450
+ }, {
1451
+ readonly code: "BTN";
1452
+ readonly name: "Bhutanese ngultrum";
1453
+ readonly numeric: "064";
1454
+ }, {
1455
+ readonly code: "BWP";
1456
+ readonly name: "Botswana pula";
1457
+ readonly numeric: "072";
1458
+ }, {
1459
+ readonly code: "BYN";
1460
+ readonly name: "Belarusian ruble";
1461
+ readonly numeric: "933";
1462
+ }, {
1463
+ readonly code: "BZD";
1464
+ readonly name: "Belize dollar";
1465
+ readonly numeric: "084";
1466
+ }, {
1467
+ readonly code: "CAD";
1468
+ readonly name: "Canadian dollar";
1469
+ readonly numeric: "124";
1470
+ }, {
1471
+ readonly code: "CDF";
1472
+ readonly name: "Congolese franc";
1473
+ readonly numeric: "976";
1474
+ }, {
1475
+ readonly code: "CHF";
1476
+ readonly name: "Swiss franc";
1477
+ readonly numeric: "756";
1478
+ }, {
1479
+ readonly code: "CLP";
1480
+ readonly name: "Chilean peso";
1481
+ readonly numeric: "152";
1482
+ }, {
1483
+ readonly code: "CNY";
1484
+ readonly name: "Chinese yuan";
1485
+ readonly numeric: "156";
1486
+ }, {
1487
+ readonly code: "COP";
1488
+ readonly name: "Colombian peso";
1489
+ readonly numeric: "170";
1490
+ }, {
1491
+ readonly code: "CRC";
1492
+ readonly name: "Costa Rican colon";
1493
+ readonly numeric: "188";
1494
+ }, {
1495
+ readonly code: "CUC";
1496
+ readonly name: "Cuban convertible peso";
1497
+ readonly numeric: "931";
1498
+ }, {
1499
+ readonly code: "CUP";
1500
+ readonly name: "Cuban peso";
1501
+ readonly numeric: "192";
1502
+ }, {
1503
+ readonly code: "CVE";
1504
+ readonly name: "Cape Verdean escudo";
1505
+ readonly numeric: "132";
1506
+ }, {
1507
+ readonly code: "CZK";
1508
+ readonly name: "Czech koruna";
1509
+ readonly numeric: "203";
1510
+ }, {
1511
+ readonly code: "DJF";
1512
+ readonly name: "Djiboutian franc";
1513
+ readonly numeric: "262";
1514
+ }, {
1515
+ readonly code: "DKK";
1516
+ readonly name: "Danish krone";
1517
+ readonly numeric: "208";
1518
+ }, {
1519
+ readonly code: "DOP";
1520
+ readonly name: "Dominican peso";
1521
+ readonly numeric: "214";
1522
+ }, {
1523
+ readonly code: "DZD";
1524
+ readonly name: "Algerian dinar";
1525
+ readonly numeric: "012";
1526
+ }, {
1527
+ readonly code: "EGP";
1528
+ readonly name: "Egyptian pound";
1529
+ readonly numeric: "818";
1530
+ }, {
1531
+ readonly code: "ERN";
1532
+ readonly name: "Eritrean nakfa";
1533
+ readonly numeric: "232";
1534
+ }, {
1535
+ readonly code: "ETB";
1536
+ readonly name: "Ethiopian birr";
1537
+ readonly numeric: "230";
1538
+ }, {
1539
+ readonly code: "EUR";
1540
+ readonly name: "Euro";
1541
+ readonly numeric: "978";
1542
+ }, {
1543
+ readonly code: "FJD";
1544
+ readonly name: "Fiji dollar";
1545
+ readonly numeric: "242";
1546
+ }, {
1547
+ readonly code: "FKP";
1548
+ readonly name: "Falkland Islands pound";
1549
+ readonly numeric: "238";
1550
+ }, {
1551
+ readonly code: "GBP";
1552
+ readonly name: "Pound sterling";
1553
+ readonly numeric: "826";
1554
+ }, {
1555
+ readonly code: "GEL";
1556
+ readonly name: "Georgian lari";
1557
+ readonly numeric: "981";
1558
+ }, {
1559
+ readonly code: "GHS";
1560
+ readonly name: "Ghanaian cedi";
1561
+ readonly numeric: "936";
1562
+ }, {
1563
+ readonly code: "GIP";
1564
+ readonly name: "Gibraltar pound";
1565
+ readonly numeric: "292";
1566
+ }, {
1567
+ readonly code: "GMD";
1568
+ readonly name: "Gambian dalasi";
1569
+ readonly numeric: "270";
1570
+ }, {
1571
+ readonly code: "GNF";
1572
+ readonly name: "Guinean franc";
1573
+ readonly numeric: "324";
1574
+ }, {
1575
+ readonly code: "GTQ";
1576
+ readonly name: "Guatemalan quetzal";
1577
+ readonly numeric: "320";
1578
+ }, {
1579
+ readonly code: "GYD";
1580
+ readonly name: "Guyanese dollar";
1581
+ readonly numeric: "328";
1582
+ }, {
1583
+ readonly code: "HKD";
1584
+ readonly name: "Hong Kong dollar";
1585
+ readonly numeric: "344";
1586
+ }, {
1587
+ readonly code: "HNL";
1588
+ readonly name: "Honduran lempira";
1589
+ readonly numeric: "340";
1590
+ }, {
1591
+ readonly code: "HRK";
1592
+ readonly name: "Croatian kuna";
1593
+ readonly numeric: "191";
1594
+ }, {
1595
+ readonly code: "HTG";
1596
+ readonly name: "Haitian gourde";
1597
+ readonly numeric: "332";
1598
+ }, {
1599
+ readonly code: "HUF";
1600
+ readonly name: "Hungarian forint";
1601
+ readonly numeric: "348";
1602
+ }, {
1603
+ readonly code: "IDR";
1604
+ readonly name: "Indonesian rupiah";
1605
+ readonly numeric: "360";
1606
+ }, {
1607
+ readonly code: "ILS";
1608
+ readonly name: "Israeli new shekel";
1609
+ readonly numeric: "376";
1610
+ }, {
1611
+ readonly code: "INR";
1612
+ readonly name: "Indian rupee";
1613
+ readonly numeric: "356";
1614
+ }, {
1615
+ readonly code: "IQD";
1616
+ readonly name: "Iraqi dinar";
1617
+ readonly numeric: "368";
1618
+ }, {
1619
+ readonly code: "IRR";
1620
+ readonly name: "Iranian rial";
1621
+ readonly numeric: "364";
1622
+ }, {
1623
+ readonly code: "ISK";
1624
+ readonly name: "Icelandic króna";
1625
+ readonly numeric: "352";
1626
+ }, {
1627
+ readonly code: "JMD";
1628
+ readonly name: "Jamaican dollar";
1629
+ readonly numeric: "388";
1630
+ }, {
1631
+ readonly code: "JOD";
1632
+ readonly name: "Jordanian dinar";
1633
+ readonly numeric: "400";
1634
+ }, {
1635
+ readonly code: "JPY";
1636
+ readonly name: "Japanese yen";
1637
+ readonly numeric: "392";
1638
+ }, {
1639
+ readonly code: "KES";
1640
+ readonly name: "Kenyan shilling";
1641
+ readonly numeric: "404";
1642
+ }, {
1643
+ readonly code: "KGS";
1644
+ readonly name: "Kyrgyzstani som";
1645
+ readonly numeric: "417";
1646
+ }, {
1647
+ readonly code: "KHR";
1648
+ readonly name: "Cambodian riel";
1649
+ readonly numeric: "116";
1650
+ }, {
1651
+ readonly code: "KMF";
1652
+ readonly name: "Comoro franc";
1653
+ readonly numeric: "174";
1654
+ }, {
1655
+ readonly code: "KPW";
1656
+ readonly name: "North Korean won";
1657
+ readonly numeric: "408";
1658
+ }, {
1659
+ readonly code: "KRW";
1660
+ readonly name: "South Korean won";
1661
+ readonly numeric: "410";
1662
+ }, {
1663
+ readonly code: "KWD";
1664
+ readonly name: "Kuwaiti dinar";
1665
+ readonly numeric: "414";
1666
+ }, {
1667
+ readonly code: "KYD";
1668
+ readonly name: "Cayman Islands dollar";
1669
+ readonly numeric: "136";
1670
+ }, {
1671
+ readonly code: "KZT";
1672
+ readonly name: "Kazakhstani tenge";
1673
+ readonly numeric: "398";
1674
+ }, {
1675
+ readonly code: "LAK";
1676
+ readonly name: "Lao kip";
1677
+ readonly numeric: "418";
1678
+ }, {
1679
+ readonly code: "LBP";
1680
+ readonly name: "Lebanese pound";
1681
+ readonly numeric: "422";
1682
+ }, {
1683
+ readonly code: "LKR";
1684
+ readonly name: "Sri Lankan rupee";
1685
+ readonly numeric: "144";
1686
+ }, {
1687
+ readonly code: "LRD";
1688
+ readonly name: "Liberian dollar";
1689
+ readonly numeric: "430";
1690
+ }, {
1691
+ readonly code: "LSL";
1692
+ readonly name: "Lesotho loti";
1693
+ readonly numeric: "426";
1694
+ }, {
1695
+ readonly code: "LYD";
1696
+ readonly name: "Libyan dinar";
1697
+ readonly numeric: "434";
1698
+ }, {
1699
+ readonly code: "MAD";
1700
+ readonly name: "Moroccan dirham";
1701
+ readonly numeric: "504";
1702
+ }, {
1703
+ readonly code: "MDL";
1704
+ readonly name: "Moldovan leu";
1705
+ readonly numeric: "498";
1706
+ }, {
1707
+ readonly code: "MGA";
1708
+ readonly name: "Malagasy ariary";
1709
+ readonly numeric: "969";
1710
+ }, {
1711
+ readonly code: "MKD";
1712
+ readonly name: "Macedonian denar";
1713
+ readonly numeric: "807";
1714
+ }, {
1715
+ readonly code: "MMK";
1716
+ readonly name: "Myanmar kyat";
1717
+ readonly numeric: "104";
1718
+ }, {
1719
+ readonly code: "MNT";
1720
+ readonly name: "Mongolian tögrög";
1721
+ readonly numeric: "496";
1722
+ }, {
1723
+ readonly code: "MOP";
1724
+ readonly name: "Macanese pataca";
1725
+ readonly numeric: "446";
1726
+ }, {
1727
+ readonly code: "MRU";
1728
+ readonly name: "Mauritanian ouguiya";
1729
+ readonly numeric: "929";
1730
+ }, {
1731
+ readonly code: "MUR";
1732
+ readonly name: "Mauritian rupee";
1733
+ readonly numeric: "480";
1734
+ }, {
1735
+ readonly code: "MVR";
1736
+ readonly name: "Maldivian rufiyaa";
1737
+ readonly numeric: "462";
1738
+ }, {
1739
+ readonly code: "MWK";
1740
+ readonly name: "Malawian kwacha";
1741
+ readonly numeric: "454";
1742
+ }, {
1743
+ readonly code: "MXN";
1744
+ readonly name: "Mexican peso";
1745
+ readonly numeric: "484";
1746
+ }, {
1747
+ readonly code: "MYR";
1748
+ readonly name: "Malaysian ringgit";
1749
+ readonly numeric: "458";
1750
+ }, {
1751
+ readonly code: "MZN";
1752
+ readonly name: "Mozambican metical";
1753
+ readonly numeric: "943";
1754
+ }, {
1755
+ readonly code: "NAD";
1756
+ readonly name: "Namibian dollar";
1757
+ readonly numeric: "516";
1758
+ }, {
1759
+ readonly code: "NGN";
1760
+ readonly name: "Nigerian naira";
1761
+ readonly numeric: "566";
1762
+ }, {
1763
+ readonly code: "NIO";
1764
+ readonly name: "Nicaraguan córdoba";
1765
+ readonly numeric: "558";
1766
+ }, {
1767
+ readonly code: "NOK";
1768
+ readonly name: "Norwegian krone";
1769
+ readonly numeric: "578";
1770
+ }, {
1771
+ readonly code: "NPR";
1772
+ readonly name: "Nepalese rupee";
1773
+ readonly numeric: "524";
1774
+ }, {
1775
+ readonly code: "NZD";
1776
+ readonly name: "New Zealand dollar";
1777
+ readonly numeric: "554";
1778
+ }, {
1779
+ readonly code: "OMR";
1780
+ readonly name: "Omani rial";
1781
+ readonly numeric: "512";
1782
+ }, {
1783
+ readonly code: "PAB";
1784
+ readonly name: "Panamanian balboa";
1785
+ readonly numeric: "590";
1786
+ }, {
1787
+ readonly code: "PEN";
1788
+ readonly name: "Peruvian sol";
1789
+ readonly numeric: "604";
1790
+ }, {
1791
+ readonly code: "PGK";
1792
+ readonly name: "Papua New Guinean kina";
1793
+ readonly numeric: "598";
1794
+ }, {
1795
+ readonly code: "PHP";
1796
+ readonly name: "Philippine peso";
1797
+ readonly numeric: "608";
1798
+ }, {
1799
+ readonly code: "PKR";
1800
+ readonly name: "Pakistani rupee";
1801
+ readonly numeric: "586";
1802
+ }, {
1803
+ readonly code: "PLN";
1804
+ readonly name: "Polish złoty";
1805
+ readonly numeric: "985";
1806
+ }, {
1807
+ readonly code: "PYG";
1808
+ readonly name: "Paraguayan guaraní";
1809
+ readonly numeric: "600";
1810
+ }, {
1811
+ readonly code: "QAR";
1812
+ readonly name: "Qatari riyal";
1813
+ readonly numeric: "634";
1814
+ }, {
1815
+ readonly code: "RON";
1816
+ readonly name: "Romanian leu";
1817
+ readonly numeric: "946";
1818
+ }, {
1819
+ readonly code: "RSD";
1820
+ readonly name: "Serbian dinar";
1821
+ readonly numeric: "941";
1822
+ }, {
1823
+ readonly code: "RUB";
1824
+ readonly name: "Russian ruble";
1825
+ readonly numeric: "643";
1826
+ }, {
1827
+ readonly code: "RWF";
1828
+ readonly name: "Rwandan franc";
1829
+ readonly numeric: "646";
1830
+ }, {
1831
+ readonly code: "SAR";
1832
+ readonly name: "Saudi riyal";
1833
+ readonly numeric: "682";
1834
+ }, {
1835
+ readonly code: "SBD";
1836
+ readonly name: "Solomon Islands dollar";
1837
+ readonly numeric: "090";
1838
+ }, {
1839
+ readonly code: "SCR";
1840
+ readonly name: "Seychelles rupee";
1841
+ readonly numeric: "690";
1842
+ }, {
1843
+ readonly code: "SDG";
1844
+ readonly name: "Sudanese pound";
1845
+ readonly numeric: "938";
1846
+ }, {
1847
+ readonly code: "SEK";
1848
+ readonly name: "Swedish krona";
1849
+ readonly numeric: "752";
1850
+ }, {
1851
+ readonly code: "SGD";
1852
+ readonly name: "Singapore dollar";
1853
+ readonly numeric: "702";
1854
+ }, {
1855
+ readonly code: "SHP";
1856
+ readonly name: "Saint Helena pound";
1857
+ readonly numeric: "654";
1858
+ }, {
1859
+ readonly code: "SLL";
1860
+ readonly name: "Sierra Leonean leone";
1861
+ readonly numeric: "694";
1862
+ }, {
1863
+ readonly code: "SOS";
1864
+ readonly name: "Somali shilling";
1865
+ readonly numeric: "706";
1866
+ }, {
1867
+ readonly code: "SRD";
1868
+ readonly name: "Surinamese dollar";
1869
+ readonly numeric: "968";
1870
+ }, {
1871
+ readonly code: "SSP";
1872
+ readonly name: "South Sudanese pound";
1873
+ readonly numeric: "728";
1874
+ }, {
1875
+ readonly code: "STN";
1876
+ readonly name: "São Tomé and Príncipe dobra";
1877
+ readonly numeric: "930";
1878
+ }, {
1879
+ readonly code: "SVC";
1880
+ readonly name: "Salvadoran colón";
1881
+ readonly numeric: "222";
1882
+ }, {
1883
+ readonly code: "SYP";
1884
+ readonly name: "Syrian pound";
1885
+ readonly numeric: "760";
1886
+ }, {
1887
+ readonly code: "SZL";
1888
+ readonly name: "Swazi lilangeni";
1889
+ readonly numeric: "748";
1890
+ }, {
1891
+ readonly code: "THB";
1892
+ readonly name: "Thai baht";
1893
+ readonly numeric: "764";
1894
+ }, {
1895
+ readonly code: "TJS";
1896
+ readonly name: "Tajikistani somoni";
1897
+ readonly numeric: "972";
1898
+ }, {
1899
+ readonly code: "TMT";
1900
+ readonly name: "Turkmenistan manat";
1901
+ readonly numeric: "934";
1902
+ }, {
1903
+ readonly code: "TND";
1904
+ readonly name: "Tunisian dinar";
1905
+ readonly numeric: "788";
1906
+ }, {
1907
+ readonly code: "TOP";
1908
+ readonly name: "Tongan paʻanga";
1909
+ readonly numeric: "776";
1910
+ }, {
1911
+ readonly code: "TRY";
1912
+ readonly name: "Turkish lira";
1913
+ readonly numeric: "949";
1914
+ }, {
1915
+ readonly code: "TTD";
1916
+ readonly name: "Trinidad and Tobago dollar";
1917
+ readonly numeric: "780";
1918
+ }, {
1919
+ readonly code: "TWD";
1920
+ readonly name: "New Taiwan dollar";
1921
+ readonly numeric: "901";
1922
+ }, {
1923
+ readonly code: "TZS";
1924
+ readonly name: "Tanzanian shilling";
1925
+ readonly numeric: "834";
1926
+ }, {
1927
+ readonly code: "UAH";
1928
+ readonly name: "Ukrainian hryvnia";
1929
+ readonly numeric: "980";
1930
+ }, {
1931
+ readonly code: "UGX";
1932
+ readonly name: "Ugandan shilling";
1933
+ readonly numeric: "800";
1934
+ }, {
1935
+ readonly code: "USD";
1936
+ readonly name: "United States dollar";
1937
+ readonly numeric: "840";
1938
+ }, {
1939
+ readonly code: "UYU";
1940
+ readonly name: "Uruguayan peso";
1941
+ readonly numeric: "858";
1942
+ }, {
1943
+ readonly code: "UZS";
1944
+ readonly name: "Uzbekistan som";
1945
+ readonly numeric: "860";
1946
+ }, {
1947
+ readonly code: "VES";
1948
+ readonly name: "Venezuelan bolívar soberano";
1949
+ readonly numeric: "928";
1950
+ }, {
1951
+ readonly code: "VND";
1952
+ readonly name: "Vietnamese đồng";
1953
+ readonly numeric: "704";
1954
+ }, {
1955
+ readonly code: "VUV";
1956
+ readonly name: "Vanuatu vatu";
1957
+ readonly numeric: "548";
1958
+ }, {
1959
+ readonly code: "WST";
1960
+ readonly name: "Samoan tala";
1961
+ readonly numeric: "882";
1962
+ }, {
1963
+ readonly code: "XAF";
1964
+ readonly name: "CFA franc BEAC";
1965
+ readonly numeric: "950";
1966
+ }, {
1967
+ readonly code: "XCD";
1968
+ readonly name: "East Caribbean dollar";
1969
+ readonly numeric: "951";
1970
+ }, {
1971
+ readonly code: "XOF";
1972
+ readonly name: "CFA franc BCEAO";
1973
+ readonly numeric: "952";
1974
+ }, {
1975
+ readonly code: "XPF";
1976
+ readonly name: "CFP franc";
1977
+ readonly numeric: "953";
1978
+ }, {
1979
+ readonly code: "YER";
1980
+ readonly name: "Yemeni rial";
1981
+ readonly numeric: "886";
1982
+ }, {
1983
+ readonly code: "ZAR";
1984
+ readonly name: "South African rand";
1985
+ readonly numeric: "710";
1986
+ }, {
1987
+ readonly code: "ZMW";
1988
+ readonly name: "Zambian kwacha";
1989
+ readonly numeric: "967";
1990
+ }, {
1991
+ readonly code: "ZWL";
1992
+ readonly name: "Zimbabwean dollar";
1993
+ readonly numeric: "932";
1994
+ }];
1995
+
1996
+ declare interface DatetimeOptions {
1997
+ message?: string;
1998
+ }
1999
+
2000
+ export declare type DeepPartial<T> = {
2001
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
2002
+ };
2003
+
2004
+ /**
2005
+ * Delivery options - requires at least one of onData or webhook
2006
+ */
2007
+ export declare type DeliveryOptions<T> = RequireAtLeastOne<DeliveryOptionsBase<T>, 'onData' | 'webhook'>;
2008
+
2009
+ /**
2010
+ * Base delivery options - at least one must be provided
2011
+ */
2012
+ declare interface DeliveryOptionsBase<T> {
2013
+ /** Local callback for processing chunks */
2014
+ onData?: (chunk: RecordsChunk<T>, next: () => void) => void | Promise<void>;
2015
+ /** Webhook configuration for remote delivery */
2016
+ webhook?: WebhookConfig;
2017
+ }
2018
+
2019
+ /**
2020
+ * Font source configuration for custom fonts
2021
+ */
2022
+ export declare type ECSVFontSource = {
2023
+ source: 'google';
2024
+ name: string;
2025
+ weights?: (number | string)[];
2026
+ } | {
2027
+ source: 'custom';
2028
+ url: string;
2029
+ format?: 'woff2' | 'woff';
2030
+ };
2031
+
2032
+ /**
2033
+ * Theme - can be either dual-mode (light/dark) or single-mode (applies to both)
2034
+ */
2035
+ export declare type ECSVTheme = ECSVThemeWithModes | ECSVThemeSingle;
2036
+
2037
+ /**
2038
+ * Single theme that applies to both light and dark modes
2039
+ */
2040
+ declare type ECSVThemeSingle = TailwindThemeVars;
2041
+
2042
+ /**
2043
+ * Theme with light and dark mode support
2044
+ */
2045
+ declare interface ECSVThemeWithModes {
2046
+ modes: {
2047
+ light: TailwindThemeVars;
2048
+ dark: TailwindThemeVars;
2049
+ };
2050
+ }
2051
+
2052
+ export declare interface ExBaseDef {
2053
+ typeName: string;
2054
+ }
2055
+
2056
+ /**
2057
+ * Boolean field type that validates true/false values.
2058
+ *
2059
+ * When parsing strings (all comparisons are case-insensitive):
2060
+ * - The following values are considered false:
2061
+ * "" (empty cell), "0", "off", "n", "no", "false", "disabled"
2062
+ * - Cross characters are considered false: "×", "✗", "✘", "x"
2063
+ * - Check characters are considered true: "✓", "✔", "☑", "✅"
2064
+ * - All other string values are considered true
2065
+ *
2066
+ * When parsing numbers:
2067
+ * - 0 is considered false
2068
+ * - All other numbers are considered true
2069
+ */
2070
+ declare class ExBoolean extends PrimitiveExType<boolean, ExBooleanDef> {
2071
+ /**
2072
+ * Factory method to create an ExBoolean validator
2073
+ *
2074
+ * @param options - Configuration options
2075
+ * @param options.control - UI control type to use ('toggle', 'checkbox', 'dropdown')
2076
+ * @param options.message - Optional custom error message for validation failures
2077
+ * @returns A new ExBoolean instance
2078
+ */
2079
+ static create(options?: {
2080
+ control?: BooleanControlType;
2081
+ message?: string;
2082
+ }): ExBoolean;
2083
+ /**
2084
+ * Creates an optional version of this type
2085
+ *
2086
+ * @returns An optional version of this type
2087
+ */
2088
+ optional(): ExOptionalBoolean;
2089
+ }
2090
+
2091
+ declare interface ExBooleanDef extends PrimitiveExBaseDef {
2092
+ typeName: 'ExBoolean';
2093
+ control?: BooleanControlType;
2094
+ message?: string;
2095
+ checks: ValidatorCheck[];
2096
+ }
2097
+
2098
+ declare class ExCurrencyNumber extends ExNumberBase<ExCurrencyNumber> {
2099
+ /**
2100
+ * Creates an optional version of this type
2101
+ *
2102
+ * @returns An optional version of this type
2103
+ */
2104
+ optional(): ExOptionalCurrencyNumber;
2105
+ /**
2106
+ * Updates the currency code for this currency number
2107
+ * This allows chaining multiple currency() calls with "last call wins" behavior
2108
+ *
2109
+ * @param currencyCode - ISO 4217 currency code (e.g., 'USD', 'EUR', 'JPY')
2110
+ * @returns The instance for method chaining
2111
+ */
2112
+ currency(currencyCode: CurrencyCode): ExCurrencyNumber;
2113
+ }
2114
+
2115
+ declare class ExDate extends PrimitiveExType<string, ExDateDef> {
2116
+ /**
2117
+ * Factory method to create an ExDate validator
2118
+ *
2119
+ * @param options - Configuration options
2120
+ * @param options.message - Optional custom error message for validation failures
2121
+ * @returns A new ExDate instance
2122
+ */
2123
+ static create(options?: {
2124
+ message?: string;
2125
+ }): ExDate;
2126
+ /**
2127
+ * Creates an optional version of this type
2128
+ *
2129
+ * @returns An optional version of this type
2130
+ */
2131
+ optional(): ExOptionalDate;
2132
+ /**
2133
+ * Sets a custom output format for the date
2134
+ *
2135
+ * @param template - Format template string for output
2136
+ * @returns The ExDate instance for method chaining
2137
+ */
2138
+ output(template: string): this;
2139
+ }
2140
+
2141
+ declare interface ExDateDef extends PrimitiveExBaseDef {
2142
+ typeName: 'ExDate';
2143
+ message?: string;
2144
+ outputFormat?: string;
2145
+ internalValue?: {
2146
+ year: number;
2147
+ month: number;
2148
+ day: number;
2149
+ };
2150
+ }
2151
+
2152
+ declare class ExDatetime extends PrimitiveExType<string, ExDatetimeDef> {
2153
+ /**
2154
+ * Factory method to create an ExDatetime validator
2155
+ *
2156
+ * @param options - Configuration options
2157
+ * @param options.message - Optional custom error message for validation failures
2158
+ * @returns A new ExDatetime instance
2159
+ */
2160
+ static create(options?: DatetimeOptions): ExDatetime;
2161
+ /**
2162
+ * Creates an optional version of this type
2163
+ *
2164
+ * @returns An optional version of this type
2165
+ */
2166
+ optional(): ExOptionalDatetime;
2167
+ /**
2168
+ * Sets a custom output format for the datetime
2169
+ *
2170
+ * @param template - Format template string for output
2171
+ * @returns The ExDatetime instance for method chaining
2172
+ */
2173
+ output(template: string): this;
2174
+ /**
2175
+ * Allows timezone offsets in the datetime string
2176
+ *
2177
+ * @param options - Configuration options
2178
+ * @param options.message - Custom error message for validation failures
2179
+ * @returns The ExDatetime instance for method chaining
2180
+ */
2181
+ allowOffset(options?: {
2182
+ message?: string;
2183
+ }): this;
2184
+ private _getDatetimeCheck;
2185
+ }
2186
+
2187
+ declare interface ExDatetimeDef extends PrimitiveExBaseDef {
2188
+ typeName: 'ExDatetime';
2189
+ checks: ValidatorCheck[];
2190
+ outputFormat?: string;
2191
+ internalValue?: string;
2192
+ }
2193
+
2194
+ declare class ExMultiselect<TValue extends string | number = string | number> extends PrimitiveExType<TValue[], ExMultiselectDef<TValue>> {
2195
+ /**
2196
+ * Factory method to create an ExMultiselect validator for multiple selection
2197
+ *
2198
+ * @param options - Array of select options with labels and values
2199
+ * @param config - Configuration options
2200
+ * @param config.enforceCaseSensitiveMatch - Whether to enforce case-sensitive matching
2201
+ * @param config.message - Custom error message for validation failures
2202
+ * @returns A new ExMultiselect instance
2203
+ */
2204
+ static create<const T extends readonly (SelectOption & {
2205
+ value: string | number;
2206
+ })[]>(options: T, config?: MultiselectOptions): ExMultiselect<T[number]['value']>;
2207
+ /**
2208
+ * Creates an optional version of this multiselect type
2209
+ *
2210
+ * @returns An optional version of this multiselect type
2211
+ */
2212
+ optional(): ExOptionalMultiselect<TValue>;
2213
+ /**
2214
+ * Sets case sensitive matching for option values
2215
+ *
2216
+ * @param enabled - Whether to enable case-sensitive matching
2217
+ * @returns The ExMultiselect instance for method chaining
2218
+ */
2219
+ caseSensitive(enabled?: boolean): this;
2220
+ /**
2221
+ * Sets minimum number of selections required
2222
+ *
2223
+ * @param min - Minimum number of selections (must be at least 1)
2224
+ * @param message - Custom error message for minimum validation
2225
+ * @returns The ExMultiselect instance for method chaining
2226
+ */
2227
+ min(min: number, message?: string): this;
2228
+ /**
2229
+ * Sets maximum number of selections allowed
2230
+ *
2231
+ * @param max - Maximum number of selections
2232
+ * @param message - Custom error message for maximum validation
2233
+ * @returns The ExMultiselect instance for method chaining
2234
+ */
2235
+ max(max: number, message?: string): this;
2236
+ }
2237
+
2238
+ declare interface ExMultiselectDef<TValue extends string | number = string | number> extends PrimitiveExBaseDef {
2239
+ typeName: 'ExMultiselect';
2240
+ options: SelectOption<TValue>[];
2241
+ config: {
2242
+ enforceCaseSensitiveMatch: boolean;
2243
+ allowCustom?: boolean;
2244
+ };
2245
+ checks: ValidatorCheck[];
2246
+ _value?: TValue[];
2247
+ message?: string;
2248
+ }
2249
+
2250
+ declare class ExNumber extends ExNumberBase<ExNumber> {
2251
+ /**
2252
+ * Factory method to create an ExNumber validator
2253
+ *
2254
+ * @param options - Configuration options
2255
+ * @param options.message - Optional custom error message for validation failures
2256
+ * @returns A new ExNumber instance
2257
+ */
2258
+ static create(options?: {
2259
+ message?: string;
2260
+ }): ExNumber;
2261
+ /**
2262
+ * Creates an optional version of this type
2263
+ *
2264
+ * @returns An optional version of this type
2265
+ */
2266
+ optional(): ExOptionalNumber;
2267
+ /**
2268
+ * Marks the number as a percentage value for presentation purposes.
2269
+ * This flag tells the cell editor to display the number with a percentage symbol.
2270
+ * No input or output transformation is performed - values are stored as-is.
2271
+ *
2272
+ * @returns A specialized percentage number type
2273
+ */
2274
+ percentage(): ExPercentageNumber;
2275
+ /**
2276
+ * Marks the number as a currency value, associating it with a specific currency code
2277
+ * The number will be formatted for the specified currency
2278
+ *
2279
+ * @param currencyCode - ISO 4217 currency code (e.g., 'USD', 'EUR', 'JPY')
2280
+ * @returns A specialized currency number type
2281
+ */
2282
+ currency(currencyCode: CurrencyCode): ExCurrencyNumber;
2283
+ }
2284
+
2285
+ declare abstract class ExNumberBase<T extends ExNumberBase<T>> extends PrimitiveExType<number, ExNumberDef> {
2286
+ /**
2287
+ * Validates that the number is greater than or equal to the specified minimum value
2288
+ *
2289
+ * @param value - Minimum allowed value
2290
+ * @param options - Configuration options
2291
+ * @param options.message - Custom error message for validation failures
2292
+ * @returns The instance for method chaining
2293
+ */
2294
+ min(value: number, options?: {
2295
+ message?: string;
2296
+ }): this;
2297
+ /**
2298
+ * Validates that the number is less than or equal to the specified maximum value
2299
+ *
2300
+ * @param value - Maximum allowed value
2301
+ * @param options - Configuration options
2302
+ * @param options.message - Custom error message for validation failures
2303
+ * @returns The instance for method chaining
2304
+ */
2305
+ max(value: number, options?: {
2306
+ message?: string;
2307
+ }): this;
2308
+ /**
2309
+ * Validates that the number is an integer (no decimal places)
2310
+ *
2311
+ * @param options - Configuration options
2312
+ * @param options.message - Custom error message for validation failures
2313
+ * @returns The instance for method chaining
2314
+ */
2315
+ integer(options?: {
2316
+ message?: string;
2317
+ }): this;
2318
+ /**
2319
+ * Validates that the number is a multiple of the specified value
2320
+ *
2321
+ * @param value - The number that the validated value must be a multiple of
2322
+ * @param options - Configuration options
2323
+ * @param options.message - Custom error message for validation failures
2324
+ * @returns The instance for method chaining
2325
+ */
2326
+ multipleOf(value: number, options?: {
2327
+ message?: string;
2328
+ }): this;
2329
+ }
2330
+
2331
+ declare interface ExNumberDef extends PrimitiveExBaseDef {
2332
+ typeName: 'ExNumber';
2333
+ checks: ValidatorCheck[];
2334
+ isPercentage?: boolean;
2335
+ currencyCode?: CurrencyCode;
2336
+ }
2337
+
2338
+ declare class ExOptional<T extends ExType<unknown, ExBaseDef, unknown>> extends PrimitiveExType<T extends ExType<infer O, ExBaseDef, unknown> ? O | null : never, ExOptionalDef<T>> {
2339
+ /**
2340
+ * Factory method to create an ExOptional wrapper around a type
2341
+ *
2342
+ * @param type - The type to make optional
2343
+ * @param options - Configuration options
2344
+ * @param options.when - Function that determines when the field is allowed to be null/optional
2345
+ * @returns A new ExOptional instance
2346
+ */
2347
+ static create<T extends ExType<unknown, ExBaseDef, unknown>>(type: T, options?: {
2348
+ /**
2349
+ * Function that determines when the field is allowed to be null/optional.
2350
+ *
2351
+ * @param rowData The row data being validated
2352
+ * @returns true if the field can be null, false if the field is required
2353
+ *
2354
+ * For example, if a field should only be required when another field has a specific value:
2355
+ * ```
2356
+ * when: (row) => row.isEmployed === false // Company is optional when not employed
2357
+ * ```
2358
+ */
2359
+ when?: (rowData: Record<string, unknown>) => boolean;
2360
+ }): ExOptional<T>;
2361
+ /**
2362
+ * Unwraps the optional type to get the inner type
2363
+ *
2364
+ * @returns The inner type
2365
+ */
2366
+ unwrap(): T;
2367
+ /**
2368
+ * Creates an optional version of this type (returns self since already optional)
2369
+ *
2370
+ * @returns This instance (self-reference)
2371
+ */
2372
+ optional(): this;
2373
+ /**
2374
+ * Sets a default value to use when the value is null or undefined
2375
+ *
2376
+ * @param defaultValue - The default value or function that returns the default value
2377
+ * @returns The ExOptional instance for method chaining
2378
+ */
2379
+ default<T1 extends T extends ExType<infer O, ExBaseDef, unknown> ? O | null : never>(defaultValue: T1 | (() => T1 | Promise<T1>)): this;
2380
+ }
2381
+
2382
+ /**
2383
+ * Specialized optional wrapper for boolean fields
2384
+ */
2385
+ declare class ExOptionalBoolean extends ExOptional<ExBoolean> {
2386
+ }
2387
+
2388
+ /**
2389
+ * Specialized optional wrapper for currency number fields
2390
+ */
2391
+ declare class ExOptionalCurrencyNumber extends ExOptional<ExCurrencyNumber> {
2392
+ /**
2393
+ * Validates that the number is greater than or equal to the specified minimum value
2394
+ *
2395
+ * @param value - Minimum allowed value
2396
+ * @param options - Configuration options
2397
+ * @param options.message - Custom error message for validation failures
2398
+ * @returns The instance for method chaining
2399
+ */
2400
+ min(value: number, options?: {
2401
+ message?: string;
2402
+ }): this;
2403
+ /**
2404
+ * Validates that the number is less than or equal to the specified maximum value
2405
+ *
2406
+ * @param value - Maximum allowed value
2407
+ * @param options - Configuration options
2408
+ * @param options.message - Custom error message for validation failures
2409
+ * @returns The instance for method chaining
2410
+ */
2411
+ max(value: number, options?: {
2412
+ message?: string;
2413
+ }): this;
2414
+ /**
2415
+ * Validates that the number is an integer (no decimal places)
2416
+ *
2417
+ * @param options - Configuration options
2418
+ * @param options.message - Custom error message for validation failures
2419
+ * @returns The instance for method chaining
2420
+ */
2421
+ integer(options?: {
2422
+ message?: string;
2423
+ }): this;
2424
+ /**
2425
+ * Validates that the number is a multiple of the specified value
2426
+ *
2427
+ * @param value - The number that the validated value must be a multiple of
2428
+ * @param options - Configuration options
2429
+ * @param options.message - Custom error message for validation failures
2430
+ * @returns The instance for method chaining
2431
+ */
2432
+ multipleOf(value: number, options?: {
2433
+ message?: string;
2434
+ }): this;
2435
+ /**
2436
+ * Updates the currency code for this optional currency number
2437
+ * This allows chaining multiple currency() calls with "last call wins" behavior
2438
+ *
2439
+ * @param currencyCode - ISO 4217 currency code (e.g., 'USD', 'EUR', 'JPY')
2440
+ * @returns The instance for method chaining
2441
+ */
2442
+ currency(currencyCode: CurrencyCode): this;
2443
+ }
2444
+
2445
+ /**
2446
+ * Specialized optional wrapper for date fields
2447
+ */
2448
+ declare class ExOptionalDate extends ExOptional<ExDate> {
2449
+ /**
2450
+ * Specifies the output format for the date
2451
+ *
2452
+ * @param template - The format template
2453
+ * @returns The instance for method chaining
2454
+ */
2455
+ output(template: string): this;
2456
+ }
2457
+
2458
+ /**
2459
+ * Specialized optional wrapper for datetime fields
2460
+ */
2461
+ declare class ExOptionalDatetime extends ExOptional<ExDatetime> {
2462
+ /**
2463
+ * Specifies the output format for the datetime
2464
+ *
2465
+ * @param template - The format template
2466
+ * @returns The instance for method chaining
2467
+ */
2468
+ output(template: string): this;
2469
+ }
2470
+
2471
+ declare interface ExOptionalDef<T extends ExType<unknown, ExBaseDef, unknown>> extends PrimitiveExBaseDef {
2472
+ typeName: 'ExOptional';
2473
+ innerType: T;
2474
+ when?: (rowData: Record<string, unknown>) => boolean;
2475
+ checks?: ValidatorCheck[];
2476
+ outputFormat?: string;
2477
+ }
2478
+
2479
+ /**
2480
+ * Specialized optional wrapper for multiselect fields
2481
+ */
2482
+ declare class ExOptionalMultiselect<TValue extends string | number = string | number> extends ExOptional<ExMultiselect<TValue>> {
2483
+ /**
2484
+ * Specifies whether the multiselect options should be case-sensitive
2485
+ *
2486
+ * @param enabled - Whether case sensitivity is enabled
2487
+ * @returns The instance for method chaining
2488
+ */
2489
+ caseSensitive(enabled?: boolean): this;
2490
+ /**
2491
+ * Sets minimum number of selections required
2492
+ *
2493
+ * @param min - Minimum number of selections
2494
+ * @param message - Custom error message for minimum validation
2495
+ * @returns The instance for method chaining
2496
+ */
2497
+ min(min: number, message?: string): this;
2498
+ /**
2499
+ * Sets maximum number of selections allowed
2500
+ *
2501
+ * @param max - Maximum number of selections
2502
+ * @param message - Custom error message for maximum validation
2503
+ * @returns The instance for method chaining
2504
+ */
2505
+ max(max: number, message?: string): this;
2506
+ }
2507
+
2508
+ /**
2509
+ * Specialized optional wrapper for number fields
2510
+ */
2511
+ declare class ExOptionalNumber extends ExOptional<ExNumber> {
2512
+ /**
2513
+ * Validates that the number is greater than or equal to the specified minimum value
2514
+ *
2515
+ * @param value - Minimum allowed value
2516
+ * @param options - Configuration options
2517
+ * @param options.message - Custom error message for validation failures
2518
+ * @returns The instance for method chaining
2519
+ */
2520
+ min(value: number, options?: {
2521
+ message?: string;
2522
+ }): this;
2523
+ /**
2524
+ * Validates that the number is less than or equal to the specified maximum value
2525
+ *
2526
+ * @param value - Maximum allowed value
2527
+ * @param options - Configuration options
2528
+ * @param options.message - Custom error message for validation failures
2529
+ * @returns The instance for method chaining
2530
+ */
2531
+ max(value: number, options?: {
2532
+ message?: string;
2533
+ }): this;
2534
+ /**
2535
+ * Validates that the number is an integer (no decimal places)
2536
+ *
2537
+ * @param options - Configuration options
2538
+ * @param options.message - Custom error message for validation failures
2539
+ * @returns The instance for method chaining
2540
+ */
2541
+ integer(options?: {
2542
+ message?: string;
2543
+ }): this;
2544
+ /**
2545
+ * Validates that the number is a multiple of the specified value
2546
+ *
2547
+ * @param value - The number that the validated value must be a multiple of
2548
+ * @param options - Configuration options
2549
+ * @param options.message - Custom error message for validation failures
2550
+ * @returns The instance for method chaining
2551
+ */
2552
+ multipleOf(value: number, options?: {
2553
+ message?: string;
2554
+ }): this;
2555
+ /**
2556
+ * Marks the number as a percentage value
2557
+ *
2558
+ * @returns A specialized percentage number type that cannot be combined with currency
2559
+ */
2560
+ percentage(): ExOptionalPercentageNumber;
2561
+ /**
2562
+ * Marks the number as a currency value, associating it with a specific currency code
2563
+ *
2564
+ * @param currencyCode - ISO 4217 currency code (e.g., 'USD', 'EUR', 'JPY')
2565
+ * @returns A specialized currency number type that cannot be combined with percentage
2566
+ */
2567
+ currency(currencyCode: CurrencyCode): ExOptionalCurrencyNumber;
2568
+ }
2569
+
2570
+ /**
2571
+ * Specialized optional wrapper for percentage number fields
2572
+ */
2573
+ declare class ExOptionalPercentageNumber extends ExOptional<ExPercentageNumber> {
2574
+ /**
2575
+ * Validates that the number is greater than or equal to the specified minimum value
2576
+ *
2577
+ * @param value - Minimum allowed value
2578
+ * @param options - Configuration options
2579
+ * @param options.message - Custom error message for validation failures
2580
+ * @returns The instance for method chaining
2581
+ */
2582
+ min(value: number, options?: {
2583
+ message?: string;
2584
+ }): this;
2585
+ /**
2586
+ * Validates that the number is less than or equal to the specified maximum value
2587
+ *
2588
+ * @param value - Maximum allowed value
2589
+ * @param options - Configuration options
2590
+ * @param options.message - Custom error message for validation failures
2591
+ * @returns The instance for method chaining
2592
+ */
2593
+ max(value: number, options?: {
2594
+ message?: string;
2595
+ }): this;
2596
+ /**
2597
+ * Validates that the number is an integer (no decimal places)
2598
+ *
2599
+ * @param options - Configuration options
2600
+ * @param options.message - Custom error message for validation failures
2601
+ * @returns The instance for method chaining
2602
+ */
2603
+ integer(options?: {
2604
+ message?: string;
2605
+ }): this;
2606
+ /**
2607
+ * Validates that the number is a multiple of the specified value
2608
+ *
2609
+ * @param value - The number that the validated value must be a multiple of
2610
+ * @param options - Configuration options
2611
+ * @param options.message - Custom error message for validation failures
2612
+ * @returns The instance for method chaining
2613
+ */
2614
+ multipleOf(value: number, options?: {
2615
+ message?: string;
2616
+ }): this;
2617
+ }
2618
+
2619
+ declare type ExOptionalPrimitiveType = ExOptionalString | ExOptionalNumber | ExOptionalCurrencyNumber | ExOptionalPercentageNumber | ExOptionalBoolean | ExOptionalDate | ExOptionalDatetime | ExOptionalTime | ExOptionalSelect<string | number> | ExOptionalMultiselect<string | number>;
2620
+
2621
+ /**
2622
+ * Specialized optional wrapper for select fields
2623
+ */
2624
+ declare class ExOptionalSelect<TValue extends string | number = string | number> extends ExOptional<ExSelect<TValue>> {
2625
+ /**
2626
+ * Specifies whether the select options should be case-sensitive
2627
+ *
2628
+ * @param enabled - Whether case sensitivity is enabled
2629
+ * @returns The instance for method chaining
2630
+ */
2631
+ caseSensitive(enabled?: boolean): this;
2632
+ }
2633
+
2634
+ declare class ExOptionalString extends ExOptional<ExString> {
2635
+ /**
2636
+ * Validates that the string is a valid UUID
2637
+ *
2638
+ * @param options - Configuration options
2639
+ * @param options.version - The specific UUID version to validate against
2640
+ * @param options.message - Custom error message for validation failures
2641
+ * @returns The instance for method chaining
2642
+ */
2643
+ uuid(options?: {
2644
+ version?: UUIDVersion;
2645
+ message?: string;
2646
+ }): this;
2647
+ /**
2648
+ * Validates that the string is a valid IP address
2649
+ *
2650
+ * @param options - Configuration options
2651
+ * @param options.version - Specific IP version to validate against
2652
+ * @param options.message - Custom error message for validation failures
2653
+ * @returns The instance for method chaining
2654
+ */
2655
+ ip(options?: {
2656
+ version?: IPAddressVersion;
2657
+ message?: string;
2658
+ }): this;
2659
+ /**
2660
+ * Validates that the string is a valid URL
2661
+ *
2662
+ * @param options - Configuration options
2663
+ * @returns The instance for method chaining
2664
+ */
2665
+ url(options?: URLOptions): this;
2666
+ /**
2667
+ * Validates that the string is a valid email address
2668
+ *
2669
+ * @param options - Configuration options
2670
+ * @param options.message - Custom error message for validation failures
2671
+ * @returns The instance for method chaining
2672
+ */
2673
+ email(options?: {
2674
+ message?: string;
2675
+ }): this;
2676
+ /**
2677
+ * Validates that the string is a valid phone number
2678
+ *
2679
+ * @param options - Configuration options
2680
+ * @returns The instance for method chaining
2681
+ */
2682
+ phone(options?: PhoneOptions): this;
2683
+ /**
2684
+ * Validates that the string is a valid country code
2685
+ *
2686
+ * @param options - Configuration options
2687
+ * @returns The instance for method chaining
2688
+ */
2689
+ country(options?: CountryOptions): this;
2690
+ /**
2691
+ * Validates that the string does not exceed the specified maximum length
2692
+ *
2693
+ * @param maxLength - Maximum allowed length
2694
+ * @param options - Configuration options
2695
+ * @param options.message - Custom error message for validation failures
2696
+ * @returns The instance for method chaining
2697
+ */
2698
+ max(maxLength: number, options?: {
2699
+ message?: string;
2700
+ }): this;
2701
+ /**
2702
+ * Validates that the string meets or exceeds the specified minimum length
2703
+ *
2704
+ * @param minLength - Minimum allowed length
2705
+ * @param options - Configuration options
2706
+ * @param options.message - Custom error message for validation failures
2707
+ * @returns The instance for method chaining
2708
+ */
2709
+ min(minLength: number, options?: {
2710
+ message?: string;
2711
+ }): this;
2712
+ /**
2713
+ * Validates that the string is exactly the specified length
2714
+ *
2715
+ * @param exactLength - Exact required length
2716
+ * @param options - Configuration options
2717
+ * @param options.message - Custom error message for validation failures
2718
+ * @returns The instance for method chaining
2719
+ */
2720
+ length(exactLength: number, options?: {
2721
+ message?: string;
2722
+ }): this;
2723
+ /**
2724
+ * Validates that the string includes the specified substring
2725
+ *
2726
+ * @param substring - The substring that must be included
2727
+ * @param options - Configuration options
2728
+ * @param options.message - Custom error message for validation failures
2729
+ * @returns The instance for method chaining
2730
+ */
2731
+ includes(substring: string, options?: {
2732
+ message?: string;
2733
+ }): this;
2734
+ /**
2735
+ * Validates that the string starts with the specified prefix
2736
+ *
2737
+ * @param prefix - The required starting prefix
2738
+ * @param options - Configuration options
2739
+ * @param options.message - Custom error message for validation failures
2740
+ * @returns The instance for method chaining
2741
+ */
2742
+ startsWith(prefix: string, options?: {
2743
+ message?: string;
2744
+ }): this;
2745
+ /**
2746
+ * Validates that the string ends with the specified suffix
2747
+ *
2748
+ * @param suffix - The required ending suffix
2749
+ * @param options - Configuration options
2750
+ * @param options.message - Custom error message for validation failures
2751
+ * @returns The instance for method chaining
2752
+ */
2753
+ endsWith(suffix: string, options?: {
2754
+ message?: string;
2755
+ }): this;
2756
+ /**
2757
+ * Validates that the string matches the specified regular expression pattern
2758
+ *
2759
+ * @param pattern - The regex pattern to match against
2760
+ * @param options - Configuration options
2761
+ * @param options.message - Custom error message for validation failures
2762
+ * @returns The instance for method chaining
2763
+ */
2764
+ regex(pattern: RegExp, options?: {
2765
+ message?: string;
2766
+ }): this;
2767
+ /**
2768
+ * Validates that the string contains only alphabetical characters
2769
+ *
2770
+ * @param options - Configuration options
2771
+ * @param options.message - Custom error message for validation failures
2772
+ * @returns The instance for method chaining
2773
+ */
2774
+ alphabetical(options?: {
2775
+ message?: string;
2776
+ }): this;
2777
+ /**
2778
+ * Validates that the string contains only alphanumerical characters
2779
+ *
2780
+ * @param options - Configuration options
2781
+ * @param options.message - Custom error message for validation failures
2782
+ * @returns The instance for method chaining
2783
+ */
2784
+ alphanumerical(options?: {
2785
+ message?: string;
2786
+ }): this;
2787
+ /**
2788
+ * Validates that the string contains only numerical characters
2789
+ *
2790
+ * @param options - Configuration options
2791
+ * @param options.message - Custom error message for validation failures
2792
+ * @returns The instance for method chaining
2793
+ */
2794
+ numerical(options?: {
2795
+ message?: string;
2796
+ }): this;
2797
+ /**
2798
+ * Validates that the string is a valid IBAN (International Bank Account Number)
2799
+ *
2800
+ * @param options - Configuration options
2801
+ * @returns The instance for method chaining
2802
+ */
2803
+ iban(options?: IbanOptions): this;
2804
+ /**
2805
+ * Validates that the string is a valid BIC (Bank Identifier Code)
2806
+ *
2807
+ * @param options - Configuration options
2808
+ * @returns The instance for method chaining
2809
+ */
2810
+ bic(options?: BICOptions): this;
2811
+ /**
2812
+ * Validates that the string is a valid GTIN (Global Trade Item Number)
2813
+ *
2814
+ * @param options - Configuration options
2815
+ * @returns The instance for method chaining
2816
+ */
2817
+ gtin(options?: GTINOptions): this;
2818
+ /**
2819
+ * Validates that the string is a valid currency code
2820
+ *
2821
+ * @param options - Configuration options
2822
+ * @returns The instance for method chaining
2823
+ */
2824
+ currencyCode(options?: CurrencyCodeOptions): this;
2825
+ }
2826
+
2827
+ /**
2828
+ * Specialized optional wrapper for time fields
2829
+ */
2830
+ declare class ExOptionalTime extends ExOptional<ExTime> {
2831
+ /**
2832
+ * Specifies the decimal precision for the time field
2833
+ *
2834
+ * @param precision - The number of decimal places
2835
+ * @param options - Configuration options
2836
+ * @param options.message - Custom error message for validation failures
2837
+ * @returns The instance for method chaining
2838
+ */
2839
+ precision(precision: number, options?: {
2840
+ message?: string;
2841
+ }): this;
2842
+ }
2843
+
2844
+ declare class ExPercentageNumber extends ExNumberBase<ExPercentageNumber> {
2845
+ /**
2846
+ * Creates an optional version of this type
2847
+ *
2848
+ * @returns An optional version of this type
2849
+ */
2850
+ optional(): ExOptionalPercentageNumber;
2851
+ }
2852
+
2853
+ declare interface ExpressCSVLocale {
2854
+ general: {
2855
+ cancel: string;
2856
+ back: string;
2857
+ next: string;
2858
+ finish: string;
2859
+ required: string;
2860
+ optional: string;
2861
+ matched: string;
2862
+ unmatched: string;
2863
+ custom: string;
2864
+ };
2865
+ widget: {
2866
+ title: string;
2867
+ loading: string;
2868
+ closeConfirmTitle: string;
2869
+ closeConfirmDescription: string;
2870
+ closeConfirmCancel: string;
2871
+ closeConfirmContinue: string;
2872
+ errorTitle: string;
2873
+ startOver: string;
2874
+ };
2875
+ sessionRecovery: {
2876
+ message: string;
2877
+ discard: string;
2878
+ resume: string;
2879
+ };
2880
+ dropzone: {
2881
+ ariaLabel: string;
2882
+ clearAriaLabel: string;
2883
+ clearTooltip: string;
2884
+ clearConfirmTitle: string;
2885
+ clearConfirmDescription: string;
2886
+ processing: string;
2887
+ restoredSession: string;
2888
+ prompt: string;
2889
+ or: string;
2890
+ browse: string;
2891
+ };
2892
+ upload: {
2893
+ expectedColumns: string;
2894
+ templatePrompt: string;
2895
+ templateCSV: string;
2896
+ templateXLSX: string;
2897
+ templateGenerating: string;
2898
+ /** Available: {format} */
2899
+ templateDownloadFormat: TemplateString<'format'>;
2900
+ templateDownload: string;
2901
+ };
2902
+ selectSheet: {
2903
+ title: string;
2904
+ subtitle: string;
2905
+ noWorksheets: string;
2906
+ preview: string;
2907
+ /** Available: {count} */
2908
+ columnCount: TemplateString<'count'>;
2909
+ /** Available: {count} */
2910
+ rowCount: TemplateString<'count'>;
2911
+ /** Available: {name} */
2912
+ inSheet: TemplateString<'name'>;
2913
+ sheetSelected: string;
2914
+ noColumns: string;
2915
+ needsMoreRows: string;
2916
+ };
2917
+ selectHeader: {
2918
+ loading: string;
2919
+ noData: string;
2920
+ noDataDescription: string;
2921
+ title: string;
2922
+ subtitle: string;
2923
+ validHeader: string;
2924
+ /** Available: {count} */
2925
+ emptyColumns: TemplateString<'count'>;
2926
+ allColumnsEmpty: string;
2927
+ emptyColumnsTooltip: string;
2928
+ /** Available: {displayed}, {total} */
2929
+ showingRows: TemplateString<'displayed' | 'total'>;
2930
+ showAll: string;
2931
+ moveUp: string;
2932
+ moveDown: string;
2933
+ };
2934
+ matchColumns: {
2935
+ loading: string;
2936
+ autoMatching: string;
2937
+ title: string;
2938
+ subtitle: string;
2939
+ csvColumnHeader: string;
2940
+ matchFieldHeader: string;
2941
+ selectFieldPlaceholder: string;
2942
+ searchFieldsPlaceholder: string;
2943
+ noFieldsFound: string;
2944
+ unmatchAll: string;
2945
+ unmatchAllConfirmTitle: string;
2946
+ unmatchAllConfirmDescription: string;
2947
+ allRequiredMatched: string;
2948
+ /** Available: {count} */
2949
+ matchingConflicts: TemplateString<'count'>;
2950
+ validationIssuesFound: string;
2951
+ goToNextConflict: string;
2952
+ /** Available: {count} */
2953
+ unmatchedRequiredFields: TemplateString<'count'>;
2954
+ requiredFieldsNotMatched: string;
2955
+ goToUnmatchedFields: string;
2956
+ /** Available: {count} */
2957
+ validationIssues: TemplateString<'count'>;
2958
+ goToNextIssue: string;
2959
+ addEmptyColumnsForRequired: string;
2960
+ /** Available: {fieldName} */
2961
+ createEmptyColumn: TemplateString<'fieldName'>;
2962
+ requiredFieldsNotAssigned: string;
2963
+ addEmptyColumnTooltip: string;
2964
+ previewTooltip: string;
2965
+ /** Available: {rowCount}, {columnName} */
2966
+ previewShowing: TemplateString<'rowCount' | 'columnName'>;
2967
+ };
2968
+ matchOptions: {
2969
+ loading: string;
2970
+ title: string;
2971
+ subtitle: string;
2972
+ csvValueHeader: string;
2973
+ matchOptionHeader: string;
2974
+ selectOptionPlaceholder: string;
2975
+ searchOptionsPlaceholder: string;
2976
+ noOptionsFound: string;
2977
+ optionalBadge: string;
2978
+ customValuesHint: string;
2979
+ /** Available: {count}, {remaining} */
2980
+ showMore: TemplateString<'count' | 'remaining'>;
2981
+ /** Available: {value} */
2982
+ useCustomValue: TemplateString<'value'>;
2983
+ allValuesMatched: string;
2984
+ /** Available: {count} */
2985
+ unmatchedValues: TemplateString<'count'>;
2986
+ unmatchedValuesFound: string;
2987
+ goToNextUnmatched: string;
2988
+ /** Available: {count} */
2989
+ valueCount: TemplateString<'count'>;
2990
+ };
2991
+ review: {
2992
+ completing: string;
2993
+ loading: string;
2994
+ title: string;
2995
+ subtitle: string;
2996
+ validating: string;
2997
+ noRecords: string;
2998
+ validatingCells: string;
2999
+ /** Available: {count} */
3000
+ allRecordsValid: TemplateString<'count'>;
3001
+ /** Available: {count} */
3002
+ recordCount: TemplateString<'count'>;
3003
+ filterAll: string;
3004
+ filterValid: string;
3005
+ filterInvalid: string;
3006
+ clearFilters: string;
3007
+ noInvalidRows: string;
3008
+ applyAutofix: string;
3009
+ invalidValue: string;
3010
+ undo: string;
3011
+ redo: string;
3012
+ /** Available: {count} */
3013
+ autofixCount: TemplateString<'count'>;
3014
+ /** Available: {count} */
3015
+ applyAllAutofixes: TemplateString<'count'>;
3016
+ /** Available: {description}, {count} */
3017
+ autofixItem: TemplateString<'description' | 'count'>;
3018
+ filter: string;
3019
+ actions: string;
3020
+ addRecord: string;
3021
+ /** Available: {count} */
3022
+ deleteSelectedRecords: TemplateString<'count'>;
3023
+ /** Available: {count} */
3024
+ exportSelectedRecords: TemplateString<'count'>;
3025
+ /** Available: {count} */
3026
+ exportFilteredRecords: TemplateString<'count'>;
3027
+ /** Available: {count} */
3028
+ exportAllRecords: TemplateString<'count'>;
3029
+ exportCSV: string;
3030
+ exportXLSX: string;
3031
+ sortAZ: string;
3032
+ sortZA: string;
3033
+ sortLowHigh: string;
3034
+ sortHighLow: string;
3035
+ sortOldestNewest: string;
3036
+ sortNewestOldest: string;
3037
+ sortEarlyLate: string;
3038
+ sortLateEarly: string;
3039
+ sortFalseTrue: string;
3040
+ sortTrueFalse: string;
3041
+ sortAscending: string;
3042
+ sortDescending: string;
3043
+ removeSort: string;
3044
+ unpinColumn: string;
3045
+ pinColumn: string;
3046
+ clearColumn: string;
3047
+ /** Available: {description} */
3048
+ columnAutofix: TemplateString<'description'>;
3049
+ applyAllColumnAutofixes: string;
3050
+ removeFilter: string;
3051
+ columnMenu: string;
3052
+ emptyDataTitle: string;
3053
+ emptyDataDescription: string;
3054
+ editFilter: string;
3055
+ filteredColumns: string;
3056
+ unfilteredColumns: string;
3057
+ columnsLabel: string;
3058
+ transformTooltip: string;
3059
+ transformTitle: string;
3060
+ transformClose: string;
3061
+ transformCloseDiscardTooltip: string;
3062
+ transformCloseTooltip: string;
3063
+ transformError: string;
3064
+ transformPlaceholder: string;
3065
+ transformGenerating: string;
3066
+ transformApplying: string;
3067
+ transformDiscard: string;
3068
+ transformApply: string;
3069
+ transformUnappliedTitle: string;
3070
+ transformUnappliedDescription: string;
3071
+ transformKeepEditing: string;
3072
+ transformDiscardClose: string;
3073
+ transformAbortTitle: string;
3074
+ transformAbortDescription: string;
3075
+ transformAbortClose: string;
3076
+ transformSubmit: string;
3077
+ };
3078
+ phantomColumn: {
3079
+ /** Available: {number} */
3080
+ defaultName: TemplateString<'number'>;
3081
+ remove: string;
3082
+ removeTooltip: string;
3083
+ };
3084
+ validation: {
3085
+ showOtherMatch: string;
3086
+ };
3087
+ steps: {
3088
+ upload: string;
3089
+ selectSheet: string;
3090
+ selectHeader: string;
3091
+ matchColumns: string;
3092
+ matchOptions: string;
3093
+ review: string;
3094
+ /** Available: {currentStep}, {totalSteps} */
3095
+ progress: TemplateString<'currentStep' | 'totalSteps'>;
3096
+ };
3097
+ }
3098
+
3099
+ /** User-facing locale type where every leaf is a plain `string`. */
3100
+ export declare type ExpressCSVLocaleInput = StripBrand<ExpressCSVLocale>;
3101
+
3102
+ /**
3103
+ * Core step identifiers for the CSV import wizard
3104
+ */
3105
+ export declare type ExpressCSVStep = 'upload' | 'select-sheet' | 'select-header' | 'match-columns' | 'match-options' | 'review';
3106
+
3107
+ declare type ExPrimitiveType = ExString | ExNumber | ExCurrencyNumber | ExPercentageNumber | ExBoolean | ExDate | ExTime | ExDatetime | ExSelect<string | number> | ExMultiselect<string | number> | ExOptionalPrimitiveType;
3108
+
3109
+ declare class ExRow<T extends ExRowShape> extends ExType<{
3110
+ [K in keyof T]: T[K] extends ExType<infer O, ExBaseDef, unknown> ? K extends string ? T['optionalColumnConfig'] extends {
3111
+ columns: Array<infer C>;
3112
+ } ? C extends K ? O | null : O : O : O : never;
3113
+ }, ExRowDef<T>> {
3114
+ /**
3115
+ * Factory method to create an ExRow validator for a row of data
3116
+ *
3117
+ * @param shape - Object defining the structure of fields in the row
3118
+ * @returns A new ExRow instance
3119
+ */
3120
+ static create<T extends ExRowShape>(shape: T): ExRow<T>;
3121
+ /**
3122
+ * Specifies columns that can be null/optional with conditional logic
3123
+ *
3124
+ * @param columns - Array of column keys to make optional
3125
+ * @param options - Configuration options
3126
+ * @param options.when - Optional function to determine when columns should be optional
3127
+ * @returns The ExRow instance with optional columns configuration
3128
+ */
3129
+ optionalColumns<K extends keyof T>(columns: K[], options?: {
3130
+ when?: (row: {
3131
+ [P in keyof T]: T[P] extends ExType<infer O, ExBaseDef, unknown> ? O : never;
3132
+ }) => boolean | Promise<boolean>;
3133
+ }): ExRowWithOptionalColumns<T, K>;
3134
+ /**
3135
+ * Specifies unique constraints on columns in the row
3136
+ *
3137
+ * @param columns - Array of column keys or a single column key that form the unique constraint
3138
+ * @param options - Configuration options
3139
+ * @param options.key - Optional function to generate a unique key from column values
3140
+ * @returns The ExRow instance for method chaining
3141
+ */
3142
+ unique<K extends keyof T>(columns: K[] | K, options?: {
3143
+ key?: (values: {
3144
+ [P in K]: T[P] extends ExType<infer O, ExBaseDef, unknown> ? O | null : never;
3145
+ }) => string | Promise<string>;
3146
+ }): this;
3147
+ /**
3148
+ * Adds metadata to the row definition
3149
+ *
3150
+ * @param metadata - Metadata object
3151
+ * @param metadata.description - Optional description of the row
3152
+ * @returns The ExRow instance for method chaining
3153
+ */
3154
+ meta(metadata: {
3155
+ description?: string;
3156
+ }): this;
3157
+ /**
3158
+ * Sets the minimum number of rows required
3159
+ *
3160
+ * @param count - Minimum number of rows (must be a non-negative integer)
3161
+ * @returns The ExRow instance for method chaining
3162
+ */
3163
+ minRows(count: number): this;
3164
+ /**
3165
+ * Sets the maximum number of rows allowed
3166
+ *
3167
+ * @param count - Maximum number of rows (must be a positive integer)
3168
+ * @returns The ExRow instance for method chaining
3169
+ */
3170
+ maxRows(count: number): this;
3171
+ }
3172
+
3173
+ declare interface ExRowDef<T extends ExRowShape> extends ExBaseDef {
3174
+ typeName: 'ExRow';
3175
+ shape: T;
3176
+ meta?: {
3177
+ description?: string;
3178
+ };
3179
+ rowCountConfig?: {
3180
+ minRows?: number;
3181
+ maxRows?: number;
3182
+ };
3183
+ optionalColumnConfig?: {
3184
+ columns: Array<keyof T>;
3185
+ when?: (row: {
3186
+ [K in keyof T]: T[K] extends ExType<infer O, ExBaseDef, unknown> ? O : never;
3187
+ }) => boolean | Promise<boolean>;
3188
+ whenMap?: Record<string, (row: {
3189
+ [K in keyof T]: T[K] extends ExType<infer O, ExBaseDef, unknown> ? O : never;
3190
+ }) => boolean | Promise<boolean>>;
3191
+ };
3192
+ uniqueColumnConfig?: {
3193
+ uniqueConstraints: Array<{
3194
+ id: string;
3195
+ columns: Array<keyof T>;
3196
+ key?: (values: {
3197
+ [K in keyof T]: T[K] extends ExType<infer O, ExBaseDef, unknown> ? O | null : never;
3198
+ }) => string | Promise<string>;
3199
+ }>;
3200
+ };
3201
+ }
3202
+
3203
+ declare type ExRowShape = Record<string, ExPrimitiveType>;
3204
+
3205
+ declare type ExRowWithOptionalColumns<T extends ExRowShape, K extends keyof T> = ExType<{
3206
+ [P in keyof T]: P extends K ? T[P] extends ExType<infer O, ExBaseDef, unknown> ? O | null : never : T[P] extends ExType<infer O, ExBaseDef, unknown> ? O : never;
3207
+ }, ExRowDef<T>> & {
3208
+ optionalColumns<J extends keyof T>(columns: J[], options?: {
3209
+ when?: (row: {
3210
+ [P in keyof T]: T[P] extends ExType<infer O, ExBaseDef, unknown> ? O : never;
3211
+ }) => boolean | Promise<boolean>;
3212
+ }): ExRowWithOptionalColumns<T, J | K>;
3213
+ unique<J extends keyof T>(columns: J[] | J, options?: {
3214
+ key?: (values: {
3215
+ [P in J]: T[P] extends ExType<infer O, ExBaseDef, unknown> ? O | null : never;
3216
+ }) => string | Promise<string>;
3217
+ }): ExRowWithOptionalColumns<T, K>;
3218
+ meta(metadata: {
3219
+ description?: string;
3220
+ }): ExRowWithOptionalColumns<T, K>;
3221
+ minRows(count: number): ExRowWithOptionalColumns<T, K>;
3222
+ maxRows(count: number): ExRowWithOptionalColumns<T, K>;
3223
+ };
3224
+
3225
+ declare class ExSelect<TValue extends string | number = string | number> extends PrimitiveExType<TValue, ExSelectDef<TValue>> {
3226
+ /**
3227
+ * Factory method to create an ExSelect validator for single selection
3228
+ *
3229
+ * @param options - Array of select options with labels and values
3230
+ * @param config - Configuration options
3231
+ * @param config.enforceCaseSensitiveMatch - Whether to enforce case-sensitive matching
3232
+ * @param config.allowCustom - When true, allows custom values not in the options list
3233
+ * @param config.message - Custom error message for validation failures
3234
+ * @returns A new ExSelect instance
3235
+ */
3236
+ static create<const T extends readonly (SelectOption & {
3237
+ value: string | number;
3238
+ })[], TAllowCustom extends boolean = false>(options: T, config?: SelectOptions & {
3239
+ allowCustom?: TAllowCustom;
3240
+ }): TAllowCustom extends true ? ExSelect<string | number> : ExSelect<T[number]['value']>;
3241
+ /**
3242
+ * Creates an optional version of this select type
3243
+ *
3244
+ * @returns An optional version of this select type
3245
+ */
3246
+ optional(): ExOptionalSelect<TValue>;
3247
+ /**
3248
+ * Sets case sensitive matching for option values
3249
+ *
3250
+ * @param enabled - Whether to enable case-sensitive matching
3251
+ * @returns The ExSelect instance for method chaining
3252
+ */
3253
+ caseSensitive(enabled?: boolean): this;
3254
+ }
3255
+
3256
+ declare interface ExSelectDef<TValue extends string | number = string | number> extends PrimitiveExBaseDef {
3257
+ typeName: 'ExSelect';
3258
+ options: SelectOption<TValue>[];
3259
+ config: {
3260
+ enforceCaseSensitiveMatch: boolean;
3261
+ allowCustom?: boolean;
3262
+ };
3263
+ checks: ValidatorCheck[];
3264
+ _value?: TValue;
3265
+ message?: string;
3266
+ }
3267
+
3268
+ declare class ExString extends PrimitiveExType<string, ExStringDef> {
3269
+ /**
3270
+ * Factory method to create an ExString validator
3271
+ *
3272
+ * @param options - Configuration options
3273
+ * @param options.message - Optional custom error message for validation failures
3274
+ * @returns A new ExString instance
3275
+ */
3276
+ static create(options?: {
3277
+ message?: string;
3278
+ }): ExString;
3279
+ /**
3280
+ * Creates an optional version of this type
3281
+ *
3282
+ * @returns An optional version of this type
3283
+ */
3284
+ optional(): ExOptionalString;
3285
+ /**
3286
+ * Validates that the string is a valid UUID
3287
+ *
3288
+ * @param options - Configuration options
3289
+ * @param options.version - UUID version to validate against ('v1', 'v4', 'v5', 'all')
3290
+ * @param options.message - Custom error message for validation failures
3291
+ * @returns The ExString instance for method chaining
3292
+ */
3293
+ uuid(options?: {
3294
+ version?: UUIDVersion;
3295
+ message?: string;
3296
+ }): this;
3297
+ /**
3298
+ * Validates that the string is a valid IP address
3299
+ *
3300
+ * @param options - Configuration options
3301
+ * @param options.version - IP version to validate against ('v4', 'v6', 'all')
3302
+ * @param options.message - Custom error message for validation failures
3303
+ * @returns The ExString instance for method chaining
3304
+ */
3305
+ ip(options?: {
3306
+ version?: IPAddressVersion;
3307
+ message?: string;
3308
+ }): this;
3309
+ /**
3310
+ * Validates that the string is a valid URL
3311
+ *
3312
+ * @param options - Configuration options for URL validation
3313
+ * @param options.allowedProtocols - List of allowed protocols
3314
+ * @param options.allowedDomains - List of allowed domains
3315
+ * @param options.allowSubdomains - Whether to allow subdomains
3316
+ * @param options.allowPaths - Whether to allow paths
3317
+ * @param options.allowQueryParams - Whether to allow query parameters
3318
+ * @param options.message - Custom error message
3319
+ * @returns The ExString instance for method chaining
3320
+ */
3321
+ url(options?: URLOptions): this;
3322
+ /**
3323
+ * Validates that the string is a valid email address
3324
+ *
3325
+ * @param options - Configuration options
3326
+ * @param options.message - Custom error message for validation failures
3327
+ * @returns The ExString instance for method chaining
3328
+ */
3329
+ email(options?: {
3330
+ message?: string;
3331
+ }): this;
3332
+ /**
3333
+ * Validates that the string is a valid phone number
3334
+ *
3335
+ * @param options - Configuration options for phone validation
3336
+ * @param options.allowedCountries - Array of ISO 3166-1 alpha-2 country codes (e.g., ["US", "FR"])
3337
+ * @param options.format - The expected input format ("international", "national", or "both")
3338
+ * @param options.output - How the phone number should be normalized ("e164", "formatted", or "digits")
3339
+ * @param options.message - Custom error message
3340
+ * @returns The ExString instance for method chaining
3341
+ */
3342
+ phone(options?: PhoneOptions): this;
3343
+ /**
3344
+ * Validates that the string represents a valid country
3345
+ *
3346
+ * @param options - Configuration options for country validation
3347
+ * @param options.output - The format to output the country ("name", "2-letter", or "3-letter")
3348
+ * @param options.message - Custom error message
3349
+ * @returns The ExString instance for method chaining
3350
+ */
3351
+ country(options?: CountryOptions): this;
3352
+ /**
3353
+ * Validates that the string length is at most maxLength
3354
+ *
3355
+ * @param maxLength - Maximum allowed length
3356
+ * @param options - Configuration options
3357
+ * @param options.message - Custom error message for validation failures
3358
+ * @returns The ExString instance for method chaining
3359
+ */
3360
+ max(maxLength: number, options?: {
3361
+ message?: string;
3362
+ }): this;
3363
+ /**
3364
+ * Validates that the string length is at least minLength
3365
+ *
3366
+ * @param minLength - Minimum allowed length
3367
+ * @param options - Configuration options
3368
+ * @param options.message - Custom error message for validation failures
3369
+ * @returns The ExString instance for method chaining
3370
+ */
3371
+ min(minLength: number, options?: {
3372
+ message?: string;
3373
+ }): this;
3374
+ /**
3375
+ * Validates that the string has exactly the specified length
3376
+ *
3377
+ * @param exactLength - Required exact length
3378
+ * @param options - Configuration options
3379
+ * @param options.message - Custom error message for validation failures
3380
+ * @returns The ExString instance for method chaining
3381
+ */
3382
+ length(exactLength: number, options?: {
3383
+ message?: string;
3384
+ }): this;
3385
+ /**
3386
+ * Validates that the string includes the specified substring
3387
+ *
3388
+ * @param substring - Substring that must be included
3389
+ * @param options - Configuration options
3390
+ * @param options.message - Custom error message for validation failures
3391
+ * @returns The ExString instance for method chaining
3392
+ */
3393
+ includes(substring: string, options?: {
3394
+ message?: string;
3395
+ }): this;
3396
+ /**
3397
+ * Validates that the string starts with the specified prefix
3398
+ *
3399
+ * @param prefix - Required starting prefix
3400
+ * @param options - Configuration options
3401
+ * @param options.message - Custom error message for validation failures
3402
+ * @returns The ExString instance for method chaining
3403
+ */
3404
+ startsWith(prefix: string, options?: {
3405
+ message?: string;
3406
+ }): this;
3407
+ /**
3408
+ * Validates that the string ends with the specified suffix
3409
+ *
3410
+ * @param suffix - Required ending suffix
3411
+ * @param options - Configuration options
3412
+ * @param options.message - Custom error message for validation failures
3413
+ * @returns The ExString instance for method chaining
3414
+ */
3415
+ endsWith(suffix: string, options?: {
3416
+ message?: string;
3417
+ }): this;
3418
+ /**
3419
+ * Validates that the string matches the specified regular expression
3420
+ *
3421
+ * @param pattern - Regular expression pattern to match
3422
+ * @param options - Configuration options
3423
+ * @param options.message - Custom error message for validation failures
3424
+ * @returns The ExString instance for method chaining
3425
+ */
3426
+ regex(pattern: RegExp, options?: {
3427
+ message?: string;
3428
+ }): this;
3429
+ /**
3430
+ * Validates that the string contains only alphabetical characters
3431
+ *
3432
+ * @param options - Configuration options
3433
+ * @param options.message - Custom error message for validation failures
3434
+ * @returns The ExString instance for method chaining
3435
+ */
3436
+ alphabetical(options?: {
3437
+ message?: string;
3438
+ }): this;
3439
+ /**
3440
+ * Validates that the string contains only alphanumeric characters
3441
+ *
3442
+ * @param options - Configuration options
3443
+ * @param options.message - Custom error message for validation failures
3444
+ * @returns The ExString instance for method chaining
3445
+ */
3446
+ alphanumerical(options?: {
3447
+ message?: string;
3448
+ }): this;
3449
+ /**
3450
+ * Validates that the string represents a numeric value
3451
+ *
3452
+ * @param options - Configuration options
3453
+ * @param options.message - Custom error message for validation failures
3454
+ * @returns The ExString instance for method chaining
3455
+ */
3456
+ numerical(options?: {
3457
+ message?: string;
3458
+ }): this;
3459
+ /**
3460
+ * Validates that the string is a valid IBAN (International Bank Account Number)
3461
+ *
3462
+ * @param options - Configuration options for IBAN validation
3463
+ * @param options.allowedCountries - Array of country codes to restrict validation to (e.g., ["DE", "FR"])
3464
+ * @param options.message - Custom error message
3465
+ * @returns The ExString instance for method chaining
3466
+ */
3467
+ iban(options?: IbanOptions): this;
3468
+ /**
3469
+ * Validates that the string is a valid BIC/SWIFT code
3470
+ *
3471
+ * @param options - Configuration options for BIC validation
3472
+ * @param options.message - Custom error message
3473
+ * @returns The ExString instance for method chaining
3474
+ */
3475
+ bic(options?: BICOptions): this;
3476
+ /**
3477
+ * Validates that the string is a valid GTIN (Global Trade Item Number)
3478
+ * Supports GTIN-8, GTIN-12, GTIN-13, or GTIN-14 formats
3479
+ *
3480
+ * @param options - Configuration options for GTIN validation
3481
+ * @param options.message - Custom error message
3482
+ * @returns The ExString instance for method chaining
3483
+ */
3484
+ gtin(options?: GTINOptions): this;
3485
+ /**
3486
+ * Validates that the string is a valid ISO 4217 currency code
3487
+ *
3488
+ * @param options - Configuration options for currency code validation
3489
+ * @param options.allowedCurrencies - Array of specific currency codes to limit validation to
3490
+ * @param options.message - Custom error message
3491
+ * @returns The ExString instance for method chaining
3492
+ */
3493
+ currencyCode(options?: CurrencyCodeOptions): this;
3494
+ }
3495
+
3496
+ declare interface ExStringDef extends PrimitiveExBaseDef {
3497
+ typeName: 'ExString';
3498
+ checks: ValidatorCheck[];
3499
+ }
3500
+
3501
+ declare class ExTime extends PrimitiveExType<string, ExTimeDef> {
3502
+ /**
3503
+ * Factory method to create an ExTime validator
3504
+ *
3505
+ * @param options - Configuration options
3506
+ * @param options.message - Optional custom error message for validation failures
3507
+ * @returns A new ExTime instance
3508
+ */
3509
+ static create(options?: TimeOptions): ExTime;
3510
+ /**
3511
+ * Creates an optional version of this type
3512
+ *
3513
+ * @returns An optional version of this type
3514
+ */
3515
+ optional(): ExOptionalTime;
3516
+ /**
3517
+ * Sets precision for milliseconds in the time
3518
+ *
3519
+ * @param precision - Number of millisecond decimal places
3520
+ * @param options - Configuration options
3521
+ * @param options.message - Custom error message for validation failures
3522
+ * @returns The ExTime instance for method chaining
3523
+ */
3524
+ precision(precision: number, options?: {
3525
+ message?: string;
3526
+ }): this;
3527
+ }
3528
+
3529
+ declare interface ExTimeDef extends PrimitiveExBaseDef {
3530
+ typeName: 'ExTime';
3531
+ precision?: number | null;
3532
+ message?: string;
3533
+ checks: ValidatorCheck[];
3534
+ }
3535
+
3536
+ export declare abstract class ExType<Output, Def extends ExBaseDef, Input = Output> {
3537
+ _def: Def;
3538
+ _output: Output;
3539
+ _input: Input;
3540
+ /**
3541
+ * Creates a new ExType instance
3542
+ *
3543
+ * @param def - Definition object for this type
3544
+ */
3545
+ constructor(def: Def);
3546
+ /**
3547
+ * Protected method to create a validation check
3548
+ *
3549
+ * @param type - Type of check
3550
+ * @param params - Parameters for the check
3551
+ * @param message - Optional error message
3552
+ * @returns A ValidatorCheck object
3553
+ */
3554
+ protected _addCheck(type: string, params?: Record<string, unknown>, message?: string): ValidatorCheck;
3555
+ }
3556
+
3557
+ declare interface GTINOptions {
3558
+ message?: string;
3559
+ }
3560
+
3561
+ declare interface IbanOptions {
3562
+ allowedCountries?: CountryTwoLetterCode[];
3563
+ message?: string;
3564
+ }
3565
+
3566
+ /**
3567
+ * Error thrown when the user cancels the import operation
3568
+ */
3569
+ export declare class ImportCancelledError extends Error {
3570
+ constructor(message?: string);
3571
+ }
3572
+
3573
+ export declare type Infer<T extends ExType<unknown, ExBaseDef, unknown>> = T extends ExType<infer Output, ExBaseDef, unknown> ? Output : never;
3574
+
3575
+ export declare type InferCSVImporter<TSchema extends ExType<unknown, ExBaseDef, unknown>> = CSVImporter<TSchema>;
3576
+
3577
+ declare type IPAddressVersion = 'v4' | 'v6' | 'all';
3578
+
3579
+ declare interface MultiselectOptions {
3580
+ enforceCaseSensitiveMatch?: boolean;
3581
+ message?: string;
3582
+ }
3583
+
3584
+ /**
3585
+ * Options for the open() method
3586
+ * Requires at least one of onData or webhook for delivery
3587
+ */
3588
+ export declare type OpenOptions<T> = RequireAtLeastOne<DeliveryOptionsBase<T>, 'onData' | 'webhook'> & {
3589
+ /** Number of records per chunk (default: 1000) */
3590
+ chunkSize?: number;
3591
+ /** Called when all chunks have been processed */
3592
+ onComplete?: () => void;
3593
+ /** Called when the user cancels the import */
3594
+ onCancel?: () => void;
3595
+ /** Called when an error occurs */
3596
+ onError?: (error: Error) => void;
3597
+ /** Called when the widget opens */
3598
+ onWidgetOpen?: () => void;
3599
+ /** Called when the step changes in the wizard */
3600
+ onStepChange?: (stepId: ExpressCSVStep, previousStepId?: ExpressCSVStep) => void;
3601
+ /** Called when the widget closes */
3602
+ onWidgetClose?: (reason: 'user_close' | 'cancel' | 'complete' | 'error') => void;
3603
+ };
3604
+
3605
+ declare type PhoneNumberFormat = 'international' | 'national' | 'both';
3606
+
3607
+ declare type PhoneNumberOutput = 'e164' | 'formatted' | 'digits';
3608
+
3609
+ declare interface PhoneOptions {
3610
+ allowedCountries?: CountryTwoLetterCode[];
3611
+ format?: PhoneNumberFormat;
3612
+ output?: PhoneNumberOutput;
3613
+ message?: string;
3614
+ }
3615
+
3616
+ declare interface PrimitiveExBaseDef extends ExBaseDef {
3617
+ columnNameAliases?: string[];
3618
+ description?: string;
3619
+ label?: string;
3620
+ example?: string;
3621
+ message?: string;
3622
+ checks?: ValidatorCheck[];
3623
+ defaultValue?: unknown | (() => unknown);
3624
+ }
3625
+
3626
+ declare abstract class PrimitiveExType<Output, Def extends PrimitiveExBaseDef, Input = Output> extends ExType<Output, Def, Input> {
3627
+ /**
3628
+ * Sets column name aliases for this field
3629
+ *
3630
+ * @param aliases - Array of alternative column names that can map to this field
3631
+ * @returns The type instance for method chaining
3632
+ */
3633
+ columnNameAliases(aliases: string[]): this;
3634
+ /**
3635
+ * Sets a description for this field
3636
+ *
3637
+ * @param text - Description text
3638
+ * @returns The type instance for method chaining
3639
+ */
3640
+ description(text: string): this;
3641
+ /**
3642
+ * Sets a display label for this field
3643
+ *
3644
+ * @param text - Label text
3645
+ * @returns The type instance for method chaining
3646
+ */
3647
+ label(text: string): this;
3648
+ /**
3649
+ * Sets an example value for this field
3650
+ *
3651
+ * @param text - Example text
3652
+ * @returns The type instance for method chaining
3653
+ */
3654
+ example(text: string): this;
3655
+ /**
3656
+ * Adds a custom refinement validator to this field.
3657
+ *
3658
+ * Supports two calling styles:
3659
+ * 1. Boolean validator with optional params:
3660
+ * `.refine((value) => value > 0, { message: 'Must be positive' })`
3661
+ * 2. Object-returning validator (like refineBatch for a single value):
3662
+ * `.refine((value) => ({ valid: value > 0, message: 'Must be positive', suggestedFix: {...} }))`
3663
+ *
3664
+ * @param validator - Function or RegExp that validates the data
3665
+ * @param params - Additional parameters or function that returns parameters (only for boolean validators)
3666
+ * @returns The type instance for method chaining
3667
+ */
3668
+ refine<T extends Output>(validator: ((data: NonNullable<T>) => RefineResultItem | Promise<RefineResultItem> | unknown | Promise<unknown>) | RegExp, params?: RefineParams | ((data: NonNullable<T>) => RefineParams)): this;
3669
+ /**
3670
+ * Adds a batch refinement validator that validates all column values at once
3671
+ *
3672
+ * @param validator - Function that receives all values and returns validation results, or RegExp for per-value validation
3673
+ * @param params - Additional parameters including fallback error message
3674
+ * @returns The type instance for method chaining
3675
+ */
3676
+ refineBatch<T extends Output>(validator: ((data: NonNullable<T>[]) => RefineBatchResultItem[] | Promise<RefineBatchResultItem[]>) | RegExp, params?: RefineParams): this;
3677
+ /**
3678
+ * Protected method to find an existing check by type
3679
+ *
3680
+ * @param type - Type of check to find
3681
+ * @returns Object with the check, its index, and whether it was found
3682
+ */
3683
+ protected _findExistingCheck(type: string): {
3684
+ check: ValidatorCheck | undefined;
3685
+ index: number;
3686
+ found: boolean;
3687
+ };
3688
+ /**
3689
+ * Protected method to replace an existing check or add a new one
3690
+ *
3691
+ * @param check - The check to add or replace with
3692
+ * @param existingIndex - Index of existing check, or -1 if none exists
3693
+ */
3694
+ protected _replaceOrAddCheck(check: ValidatorCheck, existingIndex: number): void;
3695
+ }
3696
+
3697
+ declare type Protocol = 'http' | 'https' | 'ftp' | 'sftp' | 'file' | 'mailto' | 'tel';
3698
+
3699
+ /**
3700
+ * A chunk of records passed to the onData callback
3701
+ */
3702
+ export declare interface RecordsChunk<T> {
3703
+ /** The records in this chunk */
3704
+ records: T[];
3705
+ /** Total number of chunks */
3706
+ totalChunks: number;
3707
+ /** Current chunk index (0-based) */
3708
+ currentChunkIndex: number;
3709
+ /** Total number of records across all chunks */
3710
+ totalRecords: number;
3711
+ }
3712
+
3713
+ declare type RefineBatchResultItem = {
3714
+ valid: boolean;
3715
+ message?: string;
3716
+ suggestedFix?: {
3717
+ id: string;
3718
+ value: unknown;
3719
+ description: string;
3720
+ };
3721
+ };
3722
+
3723
+ declare type RefineParams = {
3724
+ message?: string;
3725
+ suggestedFix?: {
3726
+ id: string;
3727
+ value: unknown;
3728
+ description: string;
3729
+ };
3730
+ };
3731
+
3732
+ declare type RefineResultItem = {
3733
+ valid: boolean;
3734
+ message?: string;
3735
+ suggestedFix?: {
3736
+ id: string;
3737
+ value: unknown;
3738
+ description: string;
3739
+ };
3740
+ };
3741
+
3742
+ /**
3743
+ * Type helper that requires at least one of the specified keys to be present
3744
+ */
3745
+ declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
3746
+ [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
3747
+ }[Keys];
3748
+
3749
+ export declare interface SDKOptions<TSchema extends ExType<unknown, ExBaseDef, unknown>> {
3750
+ schema: TSchema;
3751
+ publishableKey: string;
3752
+ importIdentifier: string;
3753
+ title?: string;
3754
+ debug?: boolean;
3755
+ developerMode?: boolean;
3756
+ preload?: boolean;
3757
+ theme?: ECSVTheme;
3758
+ colorMode?: ColorModeConfig;
3759
+ customCSS?: string;
3760
+ fonts?: Record<string, ECSVFontSource>;
3761
+ stepDisplay?: 'progressBar' | 'segmented' | 'numbered';
3762
+ previewSchemaBeforeUpload?: boolean;
3763
+ templateDownload?: TemplateDownloadConfig;
3764
+ saveSession?: boolean;
3765
+ locale?: DeepPartial<ExpressCSVLocaleInput>;
3766
+ }
3767
+
3768
+ declare interface SelectOption<TValue extends string | number = string | number> {
3769
+ label: string;
3770
+ value: TValue;
3771
+ alsoMatches?: (string | RegExp)[];
3772
+ }
3773
+
3774
+ declare interface SelectOptions {
3775
+ enforceCaseSensitiveMatch?: boolean;
3776
+ allowCustom?: boolean;
3777
+ message?: string;
3778
+ }
3779
+
3780
+ declare type StripBrand<T> = {
3781
+ [K in keyof T]: T[K] extends TemplateString<string> ? string : T[K] extends object ? StripBrand<T[K]> : T[K];
3782
+ };
3783
+
3784
+ /**
3785
+ * Tailwind CSS variables for theming
3786
+ * These variables override :root values in globals.css when scoped to .ecsv
3787
+ */
3788
+ export declare interface TailwindThemeVars {
3789
+ radius?: string;
3790
+ background?: string;
3791
+ foreground?: string;
3792
+ card?: string;
3793
+ 'card-foreground'?: string;
3794
+ popover?: string;
3795
+ 'popover-foreground'?: string;
3796
+ primary?: string;
3797
+ 'primary-foreground'?: string;
3798
+ secondary?: string;
3799
+ 'secondary-foreground'?: string;
3800
+ muted?: string;
3801
+ 'muted-foreground'?: string;
3802
+ accent?: string;
3803
+ 'accent-foreground'?: string;
3804
+ destructive?: string;
3805
+ 'destructive-foreground'?: string;
3806
+ success?: string;
3807
+ 'success-foreground'?: string;
3808
+ warning?: string;
3809
+ 'warning-foreground'?: string;
3810
+ border?: string;
3811
+ input?: string;
3812
+ ring?: string;
3813
+ 'font-title'?: string;
3814
+ 'font-body'?: string;
3815
+ }
3816
+
3817
+ /**
3818
+ * Configuration for template download in the upload step.
3819
+ * When `source` is `"generate"`, a header-only template file is created
3820
+ * client-side from the schema column names.
3821
+ */
3822
+ declare interface TemplateDownloadConfig {
3823
+ source: 'generate';
3824
+ formats?: TemplateDownloadFormat[];
3825
+ }
3826
+
3827
+ /**
3828
+ * Template download format
3829
+ */
3830
+ declare type TemplateDownloadFormat = 'csv' | 'xlsx';
3831
+
3832
+ /**
3833
+ * A branded string type for locale entries that require interpolation via `{variable}` syntax.
3834
+ * Widget code cannot render a `TemplateString` directly in JSX — it must go through the `t()` function.
3835
+ * The generic `TVars` encodes the expected variable names so `t()` enforces the correct vars argument.
3836
+ */
3837
+ declare type TemplateString<TVars extends string = string> = string & {
3838
+ readonly __brand: 'TemplateString';
3839
+ readonly __vars: TVars;
3840
+ };
3841
+
3842
+ /**
3843
+ * Time validation options
3844
+ */
3845
+ declare interface TimeOptions {
3846
+ message?: string;
3847
+ }
3848
+
3849
+ declare interface URLOptions {
3850
+ allowedProtocols?: Protocol[];
3851
+ allowedDomains?: string[];
3852
+ allowSubdomains?: boolean;
3853
+ allowPaths?: boolean;
3854
+ allowQueryParams?: boolean;
3855
+ message?: string;
3856
+ }
3857
+
3858
+ declare type UUIDVersion = 'v1' | 'v4' | 'v5' | 'all';
3859
+
3860
+ declare interface ValidatorCheck {
3861
+ type: string;
3862
+ params?: Record<string, unknown>;
3863
+ message?: string;
3864
+ }
3865
+
3866
+ /**
3867
+ * Webhook configuration for remote delivery of results
3868
+ */
3869
+ export declare interface WebhookConfig {
3870
+ /** The URL to send webhook requests to */
3871
+ url: string;
3872
+ /** Optional HTTP headers to include in the request */
3873
+ headers?: Record<string, string>;
3874
+ /** HTTP method to use (default: 'POST') */
3875
+ method?: 'POST' | 'PUT' | 'PATCH';
3876
+ /** Request timeout in milliseconds (default: 30000) */
3877
+ timeout?: number;
3878
+ /** Number of retry attempts on failure (default: 0) */
3879
+ retries?: number;
3880
+ /** Arbitrary developer-provided metadata */
3881
+ metadata?: Record<string, unknown>;
3882
+ }
3883
+
3884
+ /**
3885
+ * Widget mode enumeration
3886
+ */
3887
+ export declare enum WidgetMode {
3888
+ NORMAL = "normal",
3889
+ PRELOAD = "preload"
3890
+ }
3891
+
3892
+ /**
3893
+ * Widget state enumeration for consistent state management
3894
+ */
3895
+ export declare enum WidgetState {
3896
+ UNINITIALIZED = "uninitialized",
3897
+ INITIALIZING = "initializing",
3898
+ READY = "ready",
3899
+ OPENING = "opening",
3900
+ OPEN = "open",
3901
+ CLOSING = "closing",
3902
+ RESETTING = "resetting",
3903
+ ERROR = "error",
3904
+ DESTROYED = "destroyed"
3905
+ }
3906
+
3907
+ export declare const x: {
3908
+ string: typeof ExString.create;
3909
+ number: typeof ExNumber.create;
3910
+ boolean: typeof ExBoolean.create;
3911
+ date: typeof ExDate.create;
3912
+ time: typeof ExTime.create;
3913
+ datetime: typeof ExDatetime.create;
3914
+ row: typeof ExRow.create;
3915
+ select: typeof ExSelect.create;
3916
+ multiselect: typeof ExMultiselect.create;
3917
+ infer: <T extends ExType<unknown, ExBaseDef, unknown>>(_schema: T) => Infer<T>;
3918
+ };
3919
+
3920
+ export { }