@expresscsv/react 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.mts +3415 -22
  2. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -1,18 +1,1895 @@
1
- import { ColorModeConfig } from '@expresscsv/theme';
2
- import { ColorModePref } from '@expresscsv/theme';
3
- import { ECSVFontSource } from '@expresscsv/theme';
4
- import { ECSVTheme } from '@expresscsv/theme';
5
- import { ExBaseDef } from '@expresscsv/fields';
6
- import { ExType } from '@expresscsv/fields';
7
- import { Infer } from '@expresscsv/fields';
8
- import { TailwindThemeVars } from '@expresscsv/theme';
9
- import { WidgetMode } from '@expresscsv/iframe-comm';
10
- import { WidgetState } from '@expresscsv/iframe-comm';
11
- import { x } from '@expresscsv/fields';
12
-
13
- export { ColorModeConfig }
14
-
15
- export { ColorModePref }
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
+ /**
1248
+ * ISO 4217 Currency Codes
1249
+ *
1250
+ * This file contains the list of all valid currency codes according to ISO 4217 standard.
1251
+ * Each currency has a 3-letter code, a name, and a numeric code.
1252
+ */
1253
+ declare type CurrencyCode = (typeof CurrencyCodes)[number]['code'];
1254
+
1255
+ declare interface CurrencyCodeOptions {
1256
+ allowedCurrencies?: CurrencyCode[];
1257
+ message?: string;
1258
+ }
1259
+
1260
+ declare const CurrencyCodes: readonly [{
1261
+ readonly code: "AED";
1262
+ readonly name: "United Arab Emirates dirham";
1263
+ readonly numeric: "784";
1264
+ }, {
1265
+ readonly code: "AFN";
1266
+ readonly name: "Afghan afghani";
1267
+ readonly numeric: "971";
1268
+ }, {
1269
+ readonly code: "ALL";
1270
+ readonly name: "Albanian lek";
1271
+ readonly numeric: "008";
1272
+ }, {
1273
+ readonly code: "AMD";
1274
+ readonly name: "Armenian dram";
1275
+ readonly numeric: "051";
1276
+ }, {
1277
+ readonly code: "ANG";
1278
+ readonly name: "Netherlands Antillean guilder";
1279
+ readonly numeric: "532";
1280
+ }, {
1281
+ readonly code: "AOA";
1282
+ readonly name: "Angolan kwanza";
1283
+ readonly numeric: "973";
1284
+ }, {
1285
+ readonly code: "ARS";
1286
+ readonly name: "Argentine peso";
1287
+ readonly numeric: "032";
1288
+ }, {
1289
+ readonly code: "AUD";
1290
+ readonly name: "Australian dollar";
1291
+ readonly numeric: "036";
1292
+ }, {
1293
+ readonly code: "AWG";
1294
+ readonly name: "Aruban florin";
1295
+ readonly numeric: "533";
1296
+ }, {
1297
+ readonly code: "AZN";
1298
+ readonly name: "Azerbaijani manat";
1299
+ readonly numeric: "944";
1300
+ }, {
1301
+ readonly code: "BAM";
1302
+ readonly name: "Bosnia and Herzegovina convertible mark";
1303
+ readonly numeric: "977";
1304
+ }, {
1305
+ readonly code: "BBD";
1306
+ readonly name: "Barbados dollar";
1307
+ readonly numeric: "052";
1308
+ }, {
1309
+ readonly code: "BDT";
1310
+ readonly name: "Bangladeshi taka";
1311
+ readonly numeric: "050";
1312
+ }, {
1313
+ readonly code: "BGN";
1314
+ readonly name: "Bulgarian lev";
1315
+ readonly numeric: "975";
1316
+ }, {
1317
+ readonly code: "BHD";
1318
+ readonly name: "Bahraini dinar";
1319
+ readonly numeric: "048";
1320
+ }, {
1321
+ readonly code: "BIF";
1322
+ readonly name: "Burundian franc";
1323
+ readonly numeric: "108";
1324
+ }, {
1325
+ readonly code: "BMD";
1326
+ readonly name: "Bermudian dollar";
1327
+ readonly numeric: "060";
1328
+ }, {
1329
+ readonly code: "BND";
1330
+ readonly name: "Brunei dollar";
1331
+ readonly numeric: "096";
1332
+ }, {
1333
+ readonly code: "BOB";
1334
+ readonly name: "Boliviano";
1335
+ readonly numeric: "068";
1336
+ }, {
1337
+ readonly code: "BRL";
1338
+ readonly name: "Brazilian real";
1339
+ readonly numeric: "986";
1340
+ }, {
1341
+ readonly code: "BSD";
1342
+ readonly name: "Bahamian dollar";
1343
+ readonly numeric: "044";
1344
+ }, {
1345
+ readonly code: "BTN";
1346
+ readonly name: "Bhutanese ngultrum";
1347
+ readonly numeric: "064";
1348
+ }, {
1349
+ readonly code: "BWP";
1350
+ readonly name: "Botswana pula";
1351
+ readonly numeric: "072";
1352
+ }, {
1353
+ readonly code: "BYN";
1354
+ readonly name: "Belarusian ruble";
1355
+ readonly numeric: "933";
1356
+ }, {
1357
+ readonly code: "BZD";
1358
+ readonly name: "Belize dollar";
1359
+ readonly numeric: "084";
1360
+ }, {
1361
+ readonly code: "CAD";
1362
+ readonly name: "Canadian dollar";
1363
+ readonly numeric: "124";
1364
+ }, {
1365
+ readonly code: "CDF";
1366
+ readonly name: "Congolese franc";
1367
+ readonly numeric: "976";
1368
+ }, {
1369
+ readonly code: "CHF";
1370
+ readonly name: "Swiss franc";
1371
+ readonly numeric: "756";
1372
+ }, {
1373
+ readonly code: "CLP";
1374
+ readonly name: "Chilean peso";
1375
+ readonly numeric: "152";
1376
+ }, {
1377
+ readonly code: "CNY";
1378
+ readonly name: "Chinese yuan";
1379
+ readonly numeric: "156";
1380
+ }, {
1381
+ readonly code: "COP";
1382
+ readonly name: "Colombian peso";
1383
+ readonly numeric: "170";
1384
+ }, {
1385
+ readonly code: "CRC";
1386
+ readonly name: "Costa Rican colon";
1387
+ readonly numeric: "188";
1388
+ }, {
1389
+ readonly code: "CUC";
1390
+ readonly name: "Cuban convertible peso";
1391
+ readonly numeric: "931";
1392
+ }, {
1393
+ readonly code: "CUP";
1394
+ readonly name: "Cuban peso";
1395
+ readonly numeric: "192";
1396
+ }, {
1397
+ readonly code: "CVE";
1398
+ readonly name: "Cape Verdean escudo";
1399
+ readonly numeric: "132";
1400
+ }, {
1401
+ readonly code: "CZK";
1402
+ readonly name: "Czech koruna";
1403
+ readonly numeric: "203";
1404
+ }, {
1405
+ readonly code: "DJF";
1406
+ readonly name: "Djiboutian franc";
1407
+ readonly numeric: "262";
1408
+ }, {
1409
+ readonly code: "DKK";
1410
+ readonly name: "Danish krone";
1411
+ readonly numeric: "208";
1412
+ }, {
1413
+ readonly code: "DOP";
1414
+ readonly name: "Dominican peso";
1415
+ readonly numeric: "214";
1416
+ }, {
1417
+ readonly code: "DZD";
1418
+ readonly name: "Algerian dinar";
1419
+ readonly numeric: "012";
1420
+ }, {
1421
+ readonly code: "EGP";
1422
+ readonly name: "Egyptian pound";
1423
+ readonly numeric: "818";
1424
+ }, {
1425
+ readonly code: "ERN";
1426
+ readonly name: "Eritrean nakfa";
1427
+ readonly numeric: "232";
1428
+ }, {
1429
+ readonly code: "ETB";
1430
+ readonly name: "Ethiopian birr";
1431
+ readonly numeric: "230";
1432
+ }, {
1433
+ readonly code: "EUR";
1434
+ readonly name: "Euro";
1435
+ readonly numeric: "978";
1436
+ }, {
1437
+ readonly code: "FJD";
1438
+ readonly name: "Fiji dollar";
1439
+ readonly numeric: "242";
1440
+ }, {
1441
+ readonly code: "FKP";
1442
+ readonly name: "Falkland Islands pound";
1443
+ readonly numeric: "238";
1444
+ }, {
1445
+ readonly code: "GBP";
1446
+ readonly name: "Pound sterling";
1447
+ readonly numeric: "826";
1448
+ }, {
1449
+ readonly code: "GEL";
1450
+ readonly name: "Georgian lari";
1451
+ readonly numeric: "981";
1452
+ }, {
1453
+ readonly code: "GHS";
1454
+ readonly name: "Ghanaian cedi";
1455
+ readonly numeric: "936";
1456
+ }, {
1457
+ readonly code: "GIP";
1458
+ readonly name: "Gibraltar pound";
1459
+ readonly numeric: "292";
1460
+ }, {
1461
+ readonly code: "GMD";
1462
+ readonly name: "Gambian dalasi";
1463
+ readonly numeric: "270";
1464
+ }, {
1465
+ readonly code: "GNF";
1466
+ readonly name: "Guinean franc";
1467
+ readonly numeric: "324";
1468
+ }, {
1469
+ readonly code: "GTQ";
1470
+ readonly name: "Guatemalan quetzal";
1471
+ readonly numeric: "320";
1472
+ }, {
1473
+ readonly code: "GYD";
1474
+ readonly name: "Guyanese dollar";
1475
+ readonly numeric: "328";
1476
+ }, {
1477
+ readonly code: "HKD";
1478
+ readonly name: "Hong Kong dollar";
1479
+ readonly numeric: "344";
1480
+ }, {
1481
+ readonly code: "HNL";
1482
+ readonly name: "Honduran lempira";
1483
+ readonly numeric: "340";
1484
+ }, {
1485
+ readonly code: "HRK";
1486
+ readonly name: "Croatian kuna";
1487
+ readonly numeric: "191";
1488
+ }, {
1489
+ readonly code: "HTG";
1490
+ readonly name: "Haitian gourde";
1491
+ readonly numeric: "332";
1492
+ }, {
1493
+ readonly code: "HUF";
1494
+ readonly name: "Hungarian forint";
1495
+ readonly numeric: "348";
1496
+ }, {
1497
+ readonly code: "IDR";
1498
+ readonly name: "Indonesian rupiah";
1499
+ readonly numeric: "360";
1500
+ }, {
1501
+ readonly code: "ILS";
1502
+ readonly name: "Israeli new shekel";
1503
+ readonly numeric: "376";
1504
+ }, {
1505
+ readonly code: "INR";
1506
+ readonly name: "Indian rupee";
1507
+ readonly numeric: "356";
1508
+ }, {
1509
+ readonly code: "IQD";
1510
+ readonly name: "Iraqi dinar";
1511
+ readonly numeric: "368";
1512
+ }, {
1513
+ readonly code: "IRR";
1514
+ readonly name: "Iranian rial";
1515
+ readonly numeric: "364";
1516
+ }, {
1517
+ readonly code: "ISK";
1518
+ readonly name: "Icelandic króna";
1519
+ readonly numeric: "352";
1520
+ }, {
1521
+ readonly code: "JMD";
1522
+ readonly name: "Jamaican dollar";
1523
+ readonly numeric: "388";
1524
+ }, {
1525
+ readonly code: "JOD";
1526
+ readonly name: "Jordanian dinar";
1527
+ readonly numeric: "400";
1528
+ }, {
1529
+ readonly code: "JPY";
1530
+ readonly name: "Japanese yen";
1531
+ readonly numeric: "392";
1532
+ }, {
1533
+ readonly code: "KES";
1534
+ readonly name: "Kenyan shilling";
1535
+ readonly numeric: "404";
1536
+ }, {
1537
+ readonly code: "KGS";
1538
+ readonly name: "Kyrgyzstani som";
1539
+ readonly numeric: "417";
1540
+ }, {
1541
+ readonly code: "KHR";
1542
+ readonly name: "Cambodian riel";
1543
+ readonly numeric: "116";
1544
+ }, {
1545
+ readonly code: "KMF";
1546
+ readonly name: "Comoro franc";
1547
+ readonly numeric: "174";
1548
+ }, {
1549
+ readonly code: "KPW";
1550
+ readonly name: "North Korean won";
1551
+ readonly numeric: "408";
1552
+ }, {
1553
+ readonly code: "KRW";
1554
+ readonly name: "South Korean won";
1555
+ readonly numeric: "410";
1556
+ }, {
1557
+ readonly code: "KWD";
1558
+ readonly name: "Kuwaiti dinar";
1559
+ readonly numeric: "414";
1560
+ }, {
1561
+ readonly code: "KYD";
1562
+ readonly name: "Cayman Islands dollar";
1563
+ readonly numeric: "136";
1564
+ }, {
1565
+ readonly code: "KZT";
1566
+ readonly name: "Kazakhstani tenge";
1567
+ readonly numeric: "398";
1568
+ }, {
1569
+ readonly code: "LAK";
1570
+ readonly name: "Lao kip";
1571
+ readonly numeric: "418";
1572
+ }, {
1573
+ readonly code: "LBP";
1574
+ readonly name: "Lebanese pound";
1575
+ readonly numeric: "422";
1576
+ }, {
1577
+ readonly code: "LKR";
1578
+ readonly name: "Sri Lankan rupee";
1579
+ readonly numeric: "144";
1580
+ }, {
1581
+ readonly code: "LRD";
1582
+ readonly name: "Liberian dollar";
1583
+ readonly numeric: "430";
1584
+ }, {
1585
+ readonly code: "LSL";
1586
+ readonly name: "Lesotho loti";
1587
+ readonly numeric: "426";
1588
+ }, {
1589
+ readonly code: "LYD";
1590
+ readonly name: "Libyan dinar";
1591
+ readonly numeric: "434";
1592
+ }, {
1593
+ readonly code: "MAD";
1594
+ readonly name: "Moroccan dirham";
1595
+ readonly numeric: "504";
1596
+ }, {
1597
+ readonly code: "MDL";
1598
+ readonly name: "Moldovan leu";
1599
+ readonly numeric: "498";
1600
+ }, {
1601
+ readonly code: "MGA";
1602
+ readonly name: "Malagasy ariary";
1603
+ readonly numeric: "969";
1604
+ }, {
1605
+ readonly code: "MKD";
1606
+ readonly name: "Macedonian denar";
1607
+ readonly numeric: "807";
1608
+ }, {
1609
+ readonly code: "MMK";
1610
+ readonly name: "Myanmar kyat";
1611
+ readonly numeric: "104";
1612
+ }, {
1613
+ readonly code: "MNT";
1614
+ readonly name: "Mongolian tögrög";
1615
+ readonly numeric: "496";
1616
+ }, {
1617
+ readonly code: "MOP";
1618
+ readonly name: "Macanese pataca";
1619
+ readonly numeric: "446";
1620
+ }, {
1621
+ readonly code: "MRU";
1622
+ readonly name: "Mauritanian ouguiya";
1623
+ readonly numeric: "929";
1624
+ }, {
1625
+ readonly code: "MUR";
1626
+ readonly name: "Mauritian rupee";
1627
+ readonly numeric: "480";
1628
+ }, {
1629
+ readonly code: "MVR";
1630
+ readonly name: "Maldivian rufiyaa";
1631
+ readonly numeric: "462";
1632
+ }, {
1633
+ readonly code: "MWK";
1634
+ readonly name: "Malawian kwacha";
1635
+ readonly numeric: "454";
1636
+ }, {
1637
+ readonly code: "MXN";
1638
+ readonly name: "Mexican peso";
1639
+ readonly numeric: "484";
1640
+ }, {
1641
+ readonly code: "MYR";
1642
+ readonly name: "Malaysian ringgit";
1643
+ readonly numeric: "458";
1644
+ }, {
1645
+ readonly code: "MZN";
1646
+ readonly name: "Mozambican metical";
1647
+ readonly numeric: "943";
1648
+ }, {
1649
+ readonly code: "NAD";
1650
+ readonly name: "Namibian dollar";
1651
+ readonly numeric: "516";
1652
+ }, {
1653
+ readonly code: "NGN";
1654
+ readonly name: "Nigerian naira";
1655
+ readonly numeric: "566";
1656
+ }, {
1657
+ readonly code: "NIO";
1658
+ readonly name: "Nicaraguan córdoba";
1659
+ readonly numeric: "558";
1660
+ }, {
1661
+ readonly code: "NOK";
1662
+ readonly name: "Norwegian krone";
1663
+ readonly numeric: "578";
1664
+ }, {
1665
+ readonly code: "NPR";
1666
+ readonly name: "Nepalese rupee";
1667
+ readonly numeric: "524";
1668
+ }, {
1669
+ readonly code: "NZD";
1670
+ readonly name: "New Zealand dollar";
1671
+ readonly numeric: "554";
1672
+ }, {
1673
+ readonly code: "OMR";
1674
+ readonly name: "Omani rial";
1675
+ readonly numeric: "512";
1676
+ }, {
1677
+ readonly code: "PAB";
1678
+ readonly name: "Panamanian balboa";
1679
+ readonly numeric: "590";
1680
+ }, {
1681
+ readonly code: "PEN";
1682
+ readonly name: "Peruvian sol";
1683
+ readonly numeric: "604";
1684
+ }, {
1685
+ readonly code: "PGK";
1686
+ readonly name: "Papua New Guinean kina";
1687
+ readonly numeric: "598";
1688
+ }, {
1689
+ readonly code: "PHP";
1690
+ readonly name: "Philippine peso";
1691
+ readonly numeric: "608";
1692
+ }, {
1693
+ readonly code: "PKR";
1694
+ readonly name: "Pakistani rupee";
1695
+ readonly numeric: "586";
1696
+ }, {
1697
+ readonly code: "PLN";
1698
+ readonly name: "Polish złoty";
1699
+ readonly numeric: "985";
1700
+ }, {
1701
+ readonly code: "PYG";
1702
+ readonly name: "Paraguayan guaraní";
1703
+ readonly numeric: "600";
1704
+ }, {
1705
+ readonly code: "QAR";
1706
+ readonly name: "Qatari riyal";
1707
+ readonly numeric: "634";
1708
+ }, {
1709
+ readonly code: "RON";
1710
+ readonly name: "Romanian leu";
1711
+ readonly numeric: "946";
1712
+ }, {
1713
+ readonly code: "RSD";
1714
+ readonly name: "Serbian dinar";
1715
+ readonly numeric: "941";
1716
+ }, {
1717
+ readonly code: "RUB";
1718
+ readonly name: "Russian ruble";
1719
+ readonly numeric: "643";
1720
+ }, {
1721
+ readonly code: "RWF";
1722
+ readonly name: "Rwandan franc";
1723
+ readonly numeric: "646";
1724
+ }, {
1725
+ readonly code: "SAR";
1726
+ readonly name: "Saudi riyal";
1727
+ readonly numeric: "682";
1728
+ }, {
1729
+ readonly code: "SBD";
1730
+ readonly name: "Solomon Islands dollar";
1731
+ readonly numeric: "090";
1732
+ }, {
1733
+ readonly code: "SCR";
1734
+ readonly name: "Seychelles rupee";
1735
+ readonly numeric: "690";
1736
+ }, {
1737
+ readonly code: "SDG";
1738
+ readonly name: "Sudanese pound";
1739
+ readonly numeric: "938";
1740
+ }, {
1741
+ readonly code: "SEK";
1742
+ readonly name: "Swedish krona";
1743
+ readonly numeric: "752";
1744
+ }, {
1745
+ readonly code: "SGD";
1746
+ readonly name: "Singapore dollar";
1747
+ readonly numeric: "702";
1748
+ }, {
1749
+ readonly code: "SHP";
1750
+ readonly name: "Saint Helena pound";
1751
+ readonly numeric: "654";
1752
+ }, {
1753
+ readonly code: "SLL";
1754
+ readonly name: "Sierra Leonean leone";
1755
+ readonly numeric: "694";
1756
+ }, {
1757
+ readonly code: "SOS";
1758
+ readonly name: "Somali shilling";
1759
+ readonly numeric: "706";
1760
+ }, {
1761
+ readonly code: "SRD";
1762
+ readonly name: "Surinamese dollar";
1763
+ readonly numeric: "968";
1764
+ }, {
1765
+ readonly code: "SSP";
1766
+ readonly name: "South Sudanese pound";
1767
+ readonly numeric: "728";
1768
+ }, {
1769
+ readonly code: "STN";
1770
+ readonly name: "São Tomé and Príncipe dobra";
1771
+ readonly numeric: "930";
1772
+ }, {
1773
+ readonly code: "SVC";
1774
+ readonly name: "Salvadoran colón";
1775
+ readonly numeric: "222";
1776
+ }, {
1777
+ readonly code: "SYP";
1778
+ readonly name: "Syrian pound";
1779
+ readonly numeric: "760";
1780
+ }, {
1781
+ readonly code: "SZL";
1782
+ readonly name: "Swazi lilangeni";
1783
+ readonly numeric: "748";
1784
+ }, {
1785
+ readonly code: "THB";
1786
+ readonly name: "Thai baht";
1787
+ readonly numeric: "764";
1788
+ }, {
1789
+ readonly code: "TJS";
1790
+ readonly name: "Tajikistani somoni";
1791
+ readonly numeric: "972";
1792
+ }, {
1793
+ readonly code: "TMT";
1794
+ readonly name: "Turkmenistan manat";
1795
+ readonly numeric: "934";
1796
+ }, {
1797
+ readonly code: "TND";
1798
+ readonly name: "Tunisian dinar";
1799
+ readonly numeric: "788";
1800
+ }, {
1801
+ readonly code: "TOP";
1802
+ readonly name: "Tongan paʻanga";
1803
+ readonly numeric: "776";
1804
+ }, {
1805
+ readonly code: "TRY";
1806
+ readonly name: "Turkish lira";
1807
+ readonly numeric: "949";
1808
+ }, {
1809
+ readonly code: "TTD";
1810
+ readonly name: "Trinidad and Tobago dollar";
1811
+ readonly numeric: "780";
1812
+ }, {
1813
+ readonly code: "TWD";
1814
+ readonly name: "New Taiwan dollar";
1815
+ readonly numeric: "901";
1816
+ }, {
1817
+ readonly code: "TZS";
1818
+ readonly name: "Tanzanian shilling";
1819
+ readonly numeric: "834";
1820
+ }, {
1821
+ readonly code: "UAH";
1822
+ readonly name: "Ukrainian hryvnia";
1823
+ readonly numeric: "980";
1824
+ }, {
1825
+ readonly code: "UGX";
1826
+ readonly name: "Ugandan shilling";
1827
+ readonly numeric: "800";
1828
+ }, {
1829
+ readonly code: "USD";
1830
+ readonly name: "United States dollar";
1831
+ readonly numeric: "840";
1832
+ }, {
1833
+ readonly code: "UYU";
1834
+ readonly name: "Uruguayan peso";
1835
+ readonly numeric: "858";
1836
+ }, {
1837
+ readonly code: "UZS";
1838
+ readonly name: "Uzbekistan som";
1839
+ readonly numeric: "860";
1840
+ }, {
1841
+ readonly code: "VES";
1842
+ readonly name: "Venezuelan bolívar soberano";
1843
+ readonly numeric: "928";
1844
+ }, {
1845
+ readonly code: "VND";
1846
+ readonly name: "Vietnamese đồng";
1847
+ readonly numeric: "704";
1848
+ }, {
1849
+ readonly code: "VUV";
1850
+ readonly name: "Vanuatu vatu";
1851
+ readonly numeric: "548";
1852
+ }, {
1853
+ readonly code: "WST";
1854
+ readonly name: "Samoan tala";
1855
+ readonly numeric: "882";
1856
+ }, {
1857
+ readonly code: "XAF";
1858
+ readonly name: "CFA franc BEAC";
1859
+ readonly numeric: "950";
1860
+ }, {
1861
+ readonly code: "XCD";
1862
+ readonly name: "East Caribbean dollar";
1863
+ readonly numeric: "951";
1864
+ }, {
1865
+ readonly code: "XOF";
1866
+ readonly name: "CFA franc BCEAO";
1867
+ readonly numeric: "952";
1868
+ }, {
1869
+ readonly code: "XPF";
1870
+ readonly name: "CFP franc";
1871
+ readonly numeric: "953";
1872
+ }, {
1873
+ readonly code: "YER";
1874
+ readonly name: "Yemeni rial";
1875
+ readonly numeric: "886";
1876
+ }, {
1877
+ readonly code: "ZAR";
1878
+ readonly name: "South African rand";
1879
+ readonly numeric: "710";
1880
+ }, {
1881
+ readonly code: "ZMW";
1882
+ readonly name: "Zambian kwacha";
1883
+ readonly numeric: "967";
1884
+ }, {
1885
+ readonly code: "ZWL";
1886
+ readonly name: "Zimbabwean dollar";
1887
+ readonly numeric: "932";
1888
+ }];
1889
+
1890
+ declare interface DatetimeOptions {
1891
+ message?: string;
1892
+ }
16
1893
 
17
1894
  export declare type DeepPartial<T> = {
18
1895
  [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
@@ -33,9 +1910,839 @@ declare interface DeliveryOptionsBase<T> {
33
1910
  webhook?: WebhookConfig;
34
1911
  }
35
1912
 
36
- export { ECSVFontSource }
1913
+ /**
1914
+ * Font source configuration for custom fonts
1915
+ */
1916
+ export declare type ECSVFontSource = {
1917
+ source: 'google';
1918
+ name: string;
1919
+ weights?: (number | string)[];
1920
+ } | {
1921
+ source: 'custom';
1922
+ url: string;
1923
+ format?: 'woff2' | 'woff';
1924
+ };
1925
+
1926
+ /**
1927
+ * Theme - can be either dual-mode (light/dark) or single-mode (applies to both)
1928
+ */
1929
+ export declare type ECSVTheme = ECSVThemeWithModes | ECSVThemeSingle;
1930
+
1931
+ /**
1932
+ * Single theme that applies to both light and dark modes
1933
+ */
1934
+ declare type ECSVThemeSingle = TailwindThemeVars;
1935
+
1936
+ /**
1937
+ * Theme with light and dark mode support
1938
+ */
1939
+ declare interface ECSVThemeWithModes {
1940
+ modes: {
1941
+ light: TailwindThemeVars;
1942
+ dark: TailwindThemeVars;
1943
+ };
1944
+ }
1945
+
1946
+ declare interface ExBaseDef {
1947
+ typeName: string;
1948
+ }
1949
+
1950
+ /**
1951
+ * Boolean field type that validates true/false values.
1952
+ *
1953
+ * When parsing strings (all comparisons are case-insensitive):
1954
+ * - The following values are considered false:
1955
+ * "" (empty cell), "0", "off", "n", "no", "false", "disabled"
1956
+ * - Cross characters are considered false: "×", "✗", "✘", "x"
1957
+ * - Check characters are considered true: "✓", "✔", "☑", "✅"
1958
+ * - All other string values are considered true
1959
+ *
1960
+ * When parsing numbers:
1961
+ * - 0 is considered false
1962
+ * - All other numbers are considered true
1963
+ */
1964
+ declare class ExBoolean extends PrimitiveExType<boolean, ExBooleanDef> {
1965
+ /**
1966
+ * Factory method to create an ExBoolean validator
1967
+ *
1968
+ * @param options - Configuration options
1969
+ * @param options.control - UI control type to use ('toggle', 'checkbox', 'dropdown')
1970
+ * @param options.message - Optional custom error message for validation failures
1971
+ * @returns A new ExBoolean instance
1972
+ */
1973
+ static create(options?: {
1974
+ control?: BooleanControlType;
1975
+ message?: string;
1976
+ }): ExBoolean;
1977
+ /**
1978
+ * Creates an optional version of this type
1979
+ *
1980
+ * @returns An optional version of this type
1981
+ */
1982
+ optional(): ExOptionalBoolean;
1983
+ }
1984
+
1985
+ declare interface ExBooleanDef extends PrimitiveExBaseDef {
1986
+ typeName: 'ExBoolean';
1987
+ control?: BooleanControlType;
1988
+ message?: string;
1989
+ checks: ValidatorCheck[];
1990
+ }
1991
+
1992
+ declare class ExCurrencyNumber extends ExNumberBase<ExCurrencyNumber> {
1993
+ /**
1994
+ * Creates an optional version of this type
1995
+ *
1996
+ * @returns An optional version of this type
1997
+ */
1998
+ optional(): ExOptionalCurrencyNumber;
1999
+ /**
2000
+ * Updates the currency code for this currency number
2001
+ * This allows chaining multiple currency() calls with "last call wins" behavior
2002
+ *
2003
+ * @param currencyCode - ISO 4217 currency code (e.g., 'USD', 'EUR', 'JPY')
2004
+ * @returns The instance for method chaining
2005
+ */
2006
+ currency(currencyCode: CurrencyCode): ExCurrencyNumber;
2007
+ }
2008
+
2009
+ declare class ExDate extends PrimitiveExType<string, ExDateDef> {
2010
+ /**
2011
+ * Factory method to create an ExDate validator
2012
+ *
2013
+ * @param options - Configuration options
2014
+ * @param options.message - Optional custom error message for validation failures
2015
+ * @returns A new ExDate instance
2016
+ */
2017
+ static create(options?: {
2018
+ message?: string;
2019
+ }): ExDate;
2020
+ /**
2021
+ * Creates an optional version of this type
2022
+ *
2023
+ * @returns An optional version of this type
2024
+ */
2025
+ optional(): ExOptionalDate;
2026
+ /**
2027
+ * Sets a custom output format for the date
2028
+ *
2029
+ * @param template - Format template string for output
2030
+ * @returns The ExDate instance for method chaining
2031
+ */
2032
+ output(template: string): this;
2033
+ }
2034
+
2035
+ declare interface ExDateDef extends PrimitiveExBaseDef {
2036
+ typeName: 'ExDate';
2037
+ message?: string;
2038
+ outputFormat?: string;
2039
+ internalValue?: {
2040
+ year: number;
2041
+ month: number;
2042
+ day: number;
2043
+ };
2044
+ }
2045
+
2046
+ declare class ExDatetime extends PrimitiveExType<string, ExDatetimeDef> {
2047
+ /**
2048
+ * Factory method to create an ExDatetime validator
2049
+ *
2050
+ * @param options - Configuration options
2051
+ * @param options.message - Optional custom error message for validation failures
2052
+ * @returns A new ExDatetime instance
2053
+ */
2054
+ static create(options?: DatetimeOptions): ExDatetime;
2055
+ /**
2056
+ * Creates an optional version of this type
2057
+ *
2058
+ * @returns An optional version of this type
2059
+ */
2060
+ optional(): ExOptionalDatetime;
2061
+ /**
2062
+ * Sets a custom output format for the datetime
2063
+ *
2064
+ * @param template - Format template string for output
2065
+ * @returns The ExDatetime instance for method chaining
2066
+ */
2067
+ output(template: string): this;
2068
+ /**
2069
+ * Allows timezone offsets in the datetime string
2070
+ *
2071
+ * @param options - Configuration options
2072
+ * @param options.message - Custom error message for validation failures
2073
+ * @returns The ExDatetime instance for method chaining
2074
+ */
2075
+ allowOffset(options?: {
2076
+ message?: string;
2077
+ }): this;
2078
+ private _getDatetimeCheck;
2079
+ }
2080
+
2081
+ declare interface ExDatetimeDef extends PrimitiveExBaseDef {
2082
+ typeName: 'ExDatetime';
2083
+ checks: ValidatorCheck[];
2084
+ outputFormat?: string;
2085
+ internalValue?: string;
2086
+ }
2087
+
2088
+ declare class ExMultiselect<TValue extends string | number = string | number> extends PrimitiveExType<TValue[], ExMultiselectDef<TValue>> {
2089
+ /**
2090
+ * Factory method to create an ExMultiselect validator for multiple selection
2091
+ *
2092
+ * @param options - Array of select options with labels and values
2093
+ * @param config - Configuration options
2094
+ * @param config.enforceCaseSensitiveMatch - Whether to enforce case-sensitive matching
2095
+ * @param config.message - Custom error message for validation failures
2096
+ * @returns A new ExMultiselect instance
2097
+ */
2098
+ static create<const T extends readonly (SelectOption & {
2099
+ value: string | number;
2100
+ })[]>(options: T, config?: MultiselectOptions): ExMultiselect<T[number]['value']>;
2101
+ /**
2102
+ * Creates an optional version of this multiselect type
2103
+ *
2104
+ * @returns An optional version of this multiselect type
2105
+ */
2106
+ optional(): ExOptionalMultiselect<TValue>;
2107
+ /**
2108
+ * Sets case sensitive matching for option values
2109
+ *
2110
+ * @param enabled - Whether to enable case-sensitive matching
2111
+ * @returns The ExMultiselect instance for method chaining
2112
+ */
2113
+ caseSensitive(enabled?: boolean): this;
2114
+ /**
2115
+ * Sets minimum number of selections required
2116
+ *
2117
+ * @param min - Minimum number of selections (must be at least 1)
2118
+ * @param message - Custom error message for minimum validation
2119
+ * @returns The ExMultiselect instance for method chaining
2120
+ */
2121
+ min(min: number, message?: string): this;
2122
+ /**
2123
+ * Sets maximum number of selections allowed
2124
+ *
2125
+ * @param max - Maximum number of selections
2126
+ * @param message - Custom error message for maximum validation
2127
+ * @returns The ExMultiselect instance for method chaining
2128
+ */
2129
+ max(max: number, message?: string): this;
2130
+ }
2131
+
2132
+ declare interface ExMultiselectDef<TValue extends string | number = string | number> extends PrimitiveExBaseDef {
2133
+ typeName: 'ExMultiselect';
2134
+ options: SelectOption<TValue>[];
2135
+ config: {
2136
+ enforceCaseSensitiveMatch: boolean;
2137
+ allowCustom?: boolean;
2138
+ };
2139
+ checks: ValidatorCheck[];
2140
+ _value?: TValue[];
2141
+ message?: string;
2142
+ }
2143
+
2144
+ declare class ExNumber extends ExNumberBase<ExNumber> {
2145
+ /**
2146
+ * Factory method to create an ExNumber validator
2147
+ *
2148
+ * @param options - Configuration options
2149
+ * @param options.message - Optional custom error message for validation failures
2150
+ * @returns A new ExNumber instance
2151
+ */
2152
+ static create(options?: {
2153
+ message?: string;
2154
+ }): ExNumber;
2155
+ /**
2156
+ * Creates an optional version of this type
2157
+ *
2158
+ * @returns An optional version of this type
2159
+ */
2160
+ optional(): ExOptionalNumber;
2161
+ /**
2162
+ * Marks the number as a percentage value for presentation purposes.
2163
+ * This flag tells the cell editor to display the number with a percentage symbol.
2164
+ * No input or output transformation is performed - values are stored as-is.
2165
+ *
2166
+ * @returns A specialized percentage number type
2167
+ */
2168
+ percentage(): ExPercentageNumber;
2169
+ /**
2170
+ * Marks the number as a currency value, associating it with a specific currency code
2171
+ * The number will be formatted for the specified currency
2172
+ *
2173
+ * @param currencyCode - ISO 4217 currency code (e.g., 'USD', 'EUR', 'JPY')
2174
+ * @returns A specialized currency number type
2175
+ */
2176
+ currency(currencyCode: CurrencyCode): ExCurrencyNumber;
2177
+ }
2178
+
2179
+ declare abstract class ExNumberBase<T extends ExNumberBase<T>> extends PrimitiveExType<number, ExNumberDef> {
2180
+ /**
2181
+ * Validates that the number is greater than or equal to the specified minimum value
2182
+ *
2183
+ * @param value - Minimum allowed value
2184
+ * @param options - Configuration options
2185
+ * @param options.message - Custom error message for validation failures
2186
+ * @returns The instance for method chaining
2187
+ */
2188
+ min(value: number, options?: {
2189
+ message?: string;
2190
+ }): this;
2191
+ /**
2192
+ * Validates that the number is less than or equal to the specified maximum value
2193
+ *
2194
+ * @param value - Maximum allowed value
2195
+ * @param options - Configuration options
2196
+ * @param options.message - Custom error message for validation failures
2197
+ * @returns The instance for method chaining
2198
+ */
2199
+ max(value: number, options?: {
2200
+ message?: string;
2201
+ }): this;
2202
+ /**
2203
+ * Validates that the number is an integer (no decimal places)
2204
+ *
2205
+ * @param options - Configuration options
2206
+ * @param options.message - Custom error message for validation failures
2207
+ * @returns The instance for method chaining
2208
+ */
2209
+ integer(options?: {
2210
+ message?: string;
2211
+ }): this;
2212
+ /**
2213
+ * Validates that the number is a multiple of the specified value
2214
+ *
2215
+ * @param value - The number that the validated value must be a multiple of
2216
+ * @param options - Configuration options
2217
+ * @param options.message - Custom error message for validation failures
2218
+ * @returns The instance for method chaining
2219
+ */
2220
+ multipleOf(value: number, options?: {
2221
+ message?: string;
2222
+ }): this;
2223
+ }
37
2224
 
38
- export { ECSVTheme }
2225
+ declare interface ExNumberDef extends PrimitiveExBaseDef {
2226
+ typeName: 'ExNumber';
2227
+ checks: ValidatorCheck[];
2228
+ isPercentage?: boolean;
2229
+ currencyCode?: CurrencyCode;
2230
+ }
2231
+
2232
+ declare class ExOptional<T extends ExType<unknown, ExBaseDef, unknown>> extends PrimitiveExType<T extends ExType<infer O, ExBaseDef, unknown> ? O | null : never, ExOptionalDef<T>> {
2233
+ /**
2234
+ * Factory method to create an ExOptional wrapper around a type
2235
+ *
2236
+ * @param type - The type to make optional
2237
+ * @param options - Configuration options
2238
+ * @param options.when - Function that determines when the field is allowed to be null/optional
2239
+ * @returns A new ExOptional instance
2240
+ */
2241
+ static create<T extends ExType<unknown, ExBaseDef, unknown>>(type: T, options?: {
2242
+ /**
2243
+ * Function that determines when the field is allowed to be null/optional.
2244
+ *
2245
+ * @param rowData The row data being validated
2246
+ * @returns true if the field can be null, false if the field is required
2247
+ *
2248
+ * For example, if a field should only be required when another field has a specific value:
2249
+ * ```
2250
+ * when: (row) => row.isEmployed === false // Company is optional when not employed
2251
+ * ```
2252
+ */
2253
+ when?: (rowData: Record<string, unknown>) => boolean;
2254
+ }): ExOptional<T>;
2255
+ /**
2256
+ * Unwraps the optional type to get the inner type
2257
+ *
2258
+ * @returns The inner type
2259
+ */
2260
+ unwrap(): T;
2261
+ /**
2262
+ * Creates an optional version of this type (returns self since already optional)
2263
+ *
2264
+ * @returns This instance (self-reference)
2265
+ */
2266
+ optional(): this;
2267
+ /**
2268
+ * Sets a default value to use when the value is null or undefined
2269
+ *
2270
+ * @param defaultValue - The default value or function that returns the default value
2271
+ * @returns The ExOptional instance for method chaining
2272
+ */
2273
+ default<T1 extends T extends ExType<infer O, ExBaseDef, unknown> ? O | null : never>(defaultValue: T1 | (() => T1 | Promise<T1>)): this;
2274
+ }
2275
+
2276
+ /**
2277
+ * Specialized optional wrapper for boolean fields
2278
+ */
2279
+ declare class ExOptionalBoolean extends ExOptional<ExBoolean> {
2280
+ }
2281
+
2282
+ /**
2283
+ * Specialized optional wrapper for currency number fields
2284
+ */
2285
+ declare class ExOptionalCurrencyNumber extends ExOptional<ExCurrencyNumber> {
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
+ * Updates the currency code for this optional currency number
2331
+ * This allows chaining multiple currency() calls with "last call wins" behavior
2332
+ *
2333
+ * @param currencyCode - ISO 4217 currency code (e.g., 'USD', 'EUR', 'JPY')
2334
+ * @returns The instance for method chaining
2335
+ */
2336
+ currency(currencyCode: CurrencyCode): this;
2337
+ }
2338
+
2339
+ /**
2340
+ * Specialized optional wrapper for date fields
2341
+ */
2342
+ declare class ExOptionalDate extends ExOptional<ExDate> {
2343
+ /**
2344
+ * Specifies the output format for the date
2345
+ *
2346
+ * @param template - The format template
2347
+ * @returns The instance for method chaining
2348
+ */
2349
+ output(template: string): this;
2350
+ }
2351
+
2352
+ /**
2353
+ * Specialized optional wrapper for datetime fields
2354
+ */
2355
+ declare class ExOptionalDatetime extends ExOptional<ExDatetime> {
2356
+ /**
2357
+ * Specifies the output format for the datetime
2358
+ *
2359
+ * @param template - The format template
2360
+ * @returns The instance for method chaining
2361
+ */
2362
+ output(template: string): this;
2363
+ }
2364
+
2365
+ declare interface ExOptionalDef<T extends ExType<unknown, ExBaseDef, unknown>> extends PrimitiveExBaseDef {
2366
+ typeName: 'ExOptional';
2367
+ innerType: T;
2368
+ when?: (rowData: Record<string, unknown>) => boolean;
2369
+ checks?: ValidatorCheck[];
2370
+ outputFormat?: string;
2371
+ }
2372
+
2373
+ /**
2374
+ * Specialized optional wrapper for multiselect fields
2375
+ */
2376
+ declare class ExOptionalMultiselect<TValue extends string | number = string | number> extends ExOptional<ExMultiselect<TValue>> {
2377
+ /**
2378
+ * Specifies whether the multiselect options should be case-sensitive
2379
+ *
2380
+ * @param enabled - Whether case sensitivity is enabled
2381
+ * @returns The instance for method chaining
2382
+ */
2383
+ caseSensitive(enabled?: boolean): this;
2384
+ /**
2385
+ * Sets minimum number of selections required
2386
+ *
2387
+ * @param min - Minimum number of selections
2388
+ * @param message - Custom error message for minimum validation
2389
+ * @returns The instance for method chaining
2390
+ */
2391
+ min(min: number, message?: string): this;
2392
+ /**
2393
+ * Sets maximum number of selections allowed
2394
+ *
2395
+ * @param max - Maximum number of selections
2396
+ * @param message - Custom error message for maximum validation
2397
+ * @returns The instance for method chaining
2398
+ */
2399
+ max(max: number, message?: string): this;
2400
+ }
2401
+
2402
+ /**
2403
+ * Specialized optional wrapper for number fields
2404
+ */
2405
+ declare class ExOptionalNumber extends ExOptional<ExNumber> {
2406
+ /**
2407
+ * Validates that the number is greater than or equal to the specified minimum value
2408
+ *
2409
+ * @param value - Minimum allowed value
2410
+ * @param options - Configuration options
2411
+ * @param options.message - Custom error message for validation failures
2412
+ * @returns The instance for method chaining
2413
+ */
2414
+ min(value: number, options?: {
2415
+ message?: string;
2416
+ }): this;
2417
+ /**
2418
+ * Validates that the number is less than or equal to the specified maximum value
2419
+ *
2420
+ * @param value - Maximum allowed value
2421
+ * @param options - Configuration options
2422
+ * @param options.message - Custom error message for validation failures
2423
+ * @returns The instance for method chaining
2424
+ */
2425
+ max(value: number, options?: {
2426
+ message?: string;
2427
+ }): this;
2428
+ /**
2429
+ * Validates that the number is an integer (no decimal places)
2430
+ *
2431
+ * @param options - Configuration options
2432
+ * @param options.message - Custom error message for validation failures
2433
+ * @returns The instance for method chaining
2434
+ */
2435
+ integer(options?: {
2436
+ message?: string;
2437
+ }): this;
2438
+ /**
2439
+ * Validates that the number is a multiple of the specified value
2440
+ *
2441
+ * @param value - The number that the validated value must be a multiple of
2442
+ * @param options - Configuration options
2443
+ * @param options.message - Custom error message for validation failures
2444
+ * @returns The instance for method chaining
2445
+ */
2446
+ multipleOf(value: number, options?: {
2447
+ message?: string;
2448
+ }): this;
2449
+ /**
2450
+ * Marks the number as a percentage value
2451
+ *
2452
+ * @returns A specialized percentage number type that cannot be combined with currency
2453
+ */
2454
+ percentage(): ExOptionalPercentageNumber;
2455
+ /**
2456
+ * Marks the number as a currency value, associating it with a specific currency code
2457
+ *
2458
+ * @param currencyCode - ISO 4217 currency code (e.g., 'USD', 'EUR', 'JPY')
2459
+ * @returns A specialized currency number type that cannot be combined with percentage
2460
+ */
2461
+ currency(currencyCode: CurrencyCode): ExOptionalCurrencyNumber;
2462
+ }
2463
+
2464
+ /**
2465
+ * Specialized optional wrapper for percentage number fields
2466
+ */
2467
+ declare class ExOptionalPercentageNumber extends ExOptional<ExPercentageNumber> {
2468
+ /**
2469
+ * Validates that the number is greater than or equal to the specified minimum value
2470
+ *
2471
+ * @param value - Minimum allowed value
2472
+ * @param options - Configuration options
2473
+ * @param options.message - Custom error message for validation failures
2474
+ * @returns The instance for method chaining
2475
+ */
2476
+ min(value: number, options?: {
2477
+ message?: string;
2478
+ }): this;
2479
+ /**
2480
+ * Validates that the number is less than or equal to the specified maximum value
2481
+ *
2482
+ * @param value - Maximum allowed value
2483
+ * @param options - Configuration options
2484
+ * @param options.message - Custom error message for validation failures
2485
+ * @returns The instance for method chaining
2486
+ */
2487
+ max(value: number, options?: {
2488
+ message?: string;
2489
+ }): this;
2490
+ /**
2491
+ * Validates that the number is an integer (no decimal places)
2492
+ *
2493
+ * @param options - Configuration options
2494
+ * @param options.message - Custom error message for validation failures
2495
+ * @returns The instance for method chaining
2496
+ */
2497
+ integer(options?: {
2498
+ message?: string;
2499
+ }): this;
2500
+ /**
2501
+ * Validates that the number is a multiple of the specified value
2502
+ *
2503
+ * @param value - The number that the validated value must be a multiple of
2504
+ * @param options - Configuration options
2505
+ * @param options.message - Custom error message for validation failures
2506
+ * @returns The instance for method chaining
2507
+ */
2508
+ multipleOf(value: number, options?: {
2509
+ message?: string;
2510
+ }): this;
2511
+ }
2512
+
2513
+ declare type ExOptionalPrimitiveType = ExOptionalString | ExOptionalNumber | ExOptionalCurrencyNumber | ExOptionalPercentageNumber | ExOptionalBoolean | ExOptionalDate | ExOptionalDatetime | ExOptionalTime | ExOptionalSelect<string | number> | ExOptionalMultiselect<string | number>;
2514
+
2515
+ /**
2516
+ * Specialized optional wrapper for select fields
2517
+ */
2518
+ declare class ExOptionalSelect<TValue extends string | number = string | number> extends ExOptional<ExSelect<TValue>> {
2519
+ /**
2520
+ * Specifies whether the select options should be case-sensitive
2521
+ *
2522
+ * @param enabled - Whether case sensitivity is enabled
2523
+ * @returns The instance for method chaining
2524
+ */
2525
+ caseSensitive(enabled?: boolean): this;
2526
+ }
2527
+
2528
+ declare class ExOptionalString extends ExOptional<ExString> {
2529
+ /**
2530
+ * Validates that the string is a valid UUID
2531
+ *
2532
+ * @param options - Configuration options
2533
+ * @param options.version - The specific UUID version to validate against
2534
+ * @param options.message - Custom error message for validation failures
2535
+ * @returns The instance for method chaining
2536
+ */
2537
+ uuid(options?: {
2538
+ version?: UUIDVersion;
2539
+ message?: string;
2540
+ }): this;
2541
+ /**
2542
+ * Validates that the string is a valid IP address
2543
+ *
2544
+ * @param options - Configuration options
2545
+ * @param options.version - Specific IP version to validate against
2546
+ * @param options.message - Custom error message for validation failures
2547
+ * @returns The instance for method chaining
2548
+ */
2549
+ ip(options?: {
2550
+ version?: IPAddressVersion;
2551
+ message?: string;
2552
+ }): this;
2553
+ /**
2554
+ * Validates that the string is a valid URL
2555
+ *
2556
+ * @param options - Configuration options
2557
+ * @returns The instance for method chaining
2558
+ */
2559
+ url(options?: URLOptions): this;
2560
+ /**
2561
+ * Validates that the string is a valid email address
2562
+ *
2563
+ * @param options - Configuration options
2564
+ * @param options.message - Custom error message for validation failures
2565
+ * @returns The instance for method chaining
2566
+ */
2567
+ email(options?: {
2568
+ message?: string;
2569
+ }): this;
2570
+ /**
2571
+ * Validates that the string is a valid phone number
2572
+ *
2573
+ * @param options - Configuration options
2574
+ * @returns The instance for method chaining
2575
+ */
2576
+ phone(options?: PhoneOptions): this;
2577
+ /**
2578
+ * Validates that the string is a valid country code
2579
+ *
2580
+ * @param options - Configuration options
2581
+ * @returns The instance for method chaining
2582
+ */
2583
+ country(options?: CountryOptions): this;
2584
+ /**
2585
+ * Validates that the string does not exceed the specified maximum length
2586
+ *
2587
+ * @param maxLength - Maximum allowed length
2588
+ * @param options - Configuration options
2589
+ * @param options.message - Custom error message for validation failures
2590
+ * @returns The instance for method chaining
2591
+ */
2592
+ max(maxLength: number, options?: {
2593
+ message?: string;
2594
+ }): this;
2595
+ /**
2596
+ * Validates that the string meets or exceeds the specified minimum length
2597
+ *
2598
+ * @param minLength - Minimum allowed length
2599
+ * @param options - Configuration options
2600
+ * @param options.message - Custom error message for validation failures
2601
+ * @returns The instance for method chaining
2602
+ */
2603
+ min(minLength: number, options?: {
2604
+ message?: string;
2605
+ }): this;
2606
+ /**
2607
+ * Validates that the string is exactly the specified length
2608
+ *
2609
+ * @param exactLength - Exact required length
2610
+ * @param options - Configuration options
2611
+ * @param options.message - Custom error message for validation failures
2612
+ * @returns The instance for method chaining
2613
+ */
2614
+ length(exactLength: number, options?: {
2615
+ message?: string;
2616
+ }): this;
2617
+ /**
2618
+ * Validates that the string includes the specified substring
2619
+ *
2620
+ * @param substring - The substring that must be included
2621
+ * @param options - Configuration options
2622
+ * @param options.message - Custom error message for validation failures
2623
+ * @returns The instance for method chaining
2624
+ */
2625
+ includes(substring: string, options?: {
2626
+ message?: string;
2627
+ }): this;
2628
+ /**
2629
+ * Validates that the string starts with the specified prefix
2630
+ *
2631
+ * @param prefix - The required starting prefix
2632
+ * @param options - Configuration options
2633
+ * @param options.message - Custom error message for validation failures
2634
+ * @returns The instance for method chaining
2635
+ */
2636
+ startsWith(prefix: string, options?: {
2637
+ message?: string;
2638
+ }): this;
2639
+ /**
2640
+ * Validates that the string ends with the specified suffix
2641
+ *
2642
+ * @param suffix - The required ending suffix
2643
+ * @param options - Configuration options
2644
+ * @param options.message - Custom error message for validation failures
2645
+ * @returns The instance for method chaining
2646
+ */
2647
+ endsWith(suffix: string, options?: {
2648
+ message?: string;
2649
+ }): this;
2650
+ /**
2651
+ * Validates that the string matches the specified regular expression pattern
2652
+ *
2653
+ * @param pattern - The regex pattern to match against
2654
+ * @param options - Configuration options
2655
+ * @param options.message - Custom error message for validation failures
2656
+ * @returns The instance for method chaining
2657
+ */
2658
+ regex(pattern: RegExp, options?: {
2659
+ message?: string;
2660
+ }): this;
2661
+ /**
2662
+ * Validates that the string contains only alphabetical characters
2663
+ *
2664
+ * @param options - Configuration options
2665
+ * @param options.message - Custom error message for validation failures
2666
+ * @returns The instance for method chaining
2667
+ */
2668
+ alphabetical(options?: {
2669
+ message?: string;
2670
+ }): this;
2671
+ /**
2672
+ * Validates that the string contains only alphanumerical characters
2673
+ *
2674
+ * @param options - Configuration options
2675
+ * @param options.message - Custom error message for validation failures
2676
+ * @returns The instance for method chaining
2677
+ */
2678
+ alphanumerical(options?: {
2679
+ message?: string;
2680
+ }): this;
2681
+ /**
2682
+ * Validates that the string contains only numerical characters
2683
+ *
2684
+ * @param options - Configuration options
2685
+ * @param options.message - Custom error message for validation failures
2686
+ * @returns The instance for method chaining
2687
+ */
2688
+ numerical(options?: {
2689
+ message?: string;
2690
+ }): this;
2691
+ /**
2692
+ * Validates that the string is a valid IBAN (International Bank Account Number)
2693
+ *
2694
+ * @param options - Configuration options
2695
+ * @returns The instance for method chaining
2696
+ */
2697
+ iban(options?: IbanOptions): this;
2698
+ /**
2699
+ * Validates that the string is a valid BIC (Bank Identifier Code)
2700
+ *
2701
+ * @param options - Configuration options
2702
+ * @returns The instance for method chaining
2703
+ */
2704
+ bic(options?: BICOptions): this;
2705
+ /**
2706
+ * Validates that the string is a valid GTIN (Global Trade Item Number)
2707
+ *
2708
+ * @param options - Configuration options
2709
+ * @returns The instance for method chaining
2710
+ */
2711
+ gtin(options?: GTINOptions): this;
2712
+ /**
2713
+ * Validates that the string is a valid currency code
2714
+ *
2715
+ * @param options - Configuration options
2716
+ * @returns The instance for method chaining
2717
+ */
2718
+ currencyCode(options?: CurrencyCodeOptions): this;
2719
+ }
2720
+
2721
+ /**
2722
+ * Specialized optional wrapper for time fields
2723
+ */
2724
+ declare class ExOptionalTime extends ExOptional<ExTime> {
2725
+ /**
2726
+ * Specifies the decimal precision for the time field
2727
+ *
2728
+ * @param precision - The number of decimal places
2729
+ * @param options - Configuration options
2730
+ * @param options.message - Custom error message for validation failures
2731
+ * @returns The instance for method chaining
2732
+ */
2733
+ precision(precision: number, options?: {
2734
+ message?: string;
2735
+ }): this;
2736
+ }
2737
+
2738
+ declare class ExPercentageNumber extends ExNumberBase<ExPercentageNumber> {
2739
+ /**
2740
+ * Creates an optional version of this type
2741
+ *
2742
+ * @returns An optional version of this type
2743
+ */
2744
+ optional(): ExOptionalPercentageNumber;
2745
+ }
39
2746
 
40
2747
  declare interface ExpressCSVLocale {
41
2748
  general: {
@@ -291,6 +2998,465 @@ export declare type ExpressCSVLocaleInput = StripBrand<ExpressCSVLocale>;
291
2998
  */
292
2999
  export declare type ExpressCSVStep = 'upload' | 'select-sheet' | 'select-header' | 'match-columns' | 'match-options' | 'review';
293
3000
 
3001
+ declare type ExPrimitiveType = ExString | ExNumber | ExCurrencyNumber | ExPercentageNumber | ExBoolean | ExDate | ExTime | ExDatetime | ExSelect<string | number> | ExMultiselect<string | number> | ExOptionalPrimitiveType;
3002
+
3003
+ declare class ExRow<T extends ExRowShape> extends ExType<{
3004
+ [K in keyof T]: T[K] extends ExType<infer O, ExBaseDef, unknown> ? K extends string ? T['optionalColumnConfig'] extends {
3005
+ columns: Array<infer C>;
3006
+ } ? C extends K ? O | null : O : O : O : never;
3007
+ }, ExRowDef<T>> {
3008
+ /**
3009
+ * Factory method to create an ExRow validator for a row of data
3010
+ *
3011
+ * @param shape - Object defining the structure of fields in the row
3012
+ * @returns A new ExRow instance
3013
+ */
3014
+ static create<T extends ExRowShape>(shape: T): ExRow<T>;
3015
+ /**
3016
+ * Specifies columns that can be null/optional with conditional logic
3017
+ *
3018
+ * @param columns - Array of column keys to make optional
3019
+ * @param options - Configuration options
3020
+ * @param options.when - Optional function to determine when columns should be optional
3021
+ * @returns The ExRow instance with optional columns configuration
3022
+ */
3023
+ optionalColumns<K extends keyof T>(columns: K[], options?: {
3024
+ when?: (row: {
3025
+ [P in keyof T]: T[P] extends ExType<infer O, ExBaseDef, unknown> ? O : never;
3026
+ }) => boolean | Promise<boolean>;
3027
+ }): ExRowWithOptionalColumns<T, K>;
3028
+ /**
3029
+ * Specifies unique constraints on columns in the row
3030
+ *
3031
+ * @param columns - Array of column keys or a single column key that form the unique constraint
3032
+ * @param options - Configuration options
3033
+ * @param options.key - Optional function to generate a unique key from column values
3034
+ * @returns The ExRow instance for method chaining
3035
+ */
3036
+ unique<K extends keyof T>(columns: K[] | K, options?: {
3037
+ key?: (values: {
3038
+ [P in K]: T[P] extends ExType<infer O, ExBaseDef, unknown> ? O | null : never;
3039
+ }) => string | Promise<string>;
3040
+ }): this;
3041
+ /**
3042
+ * Adds metadata to the row definition
3043
+ *
3044
+ * @param metadata - Metadata object
3045
+ * @param metadata.description - Optional description of the row
3046
+ * @returns The ExRow instance for method chaining
3047
+ */
3048
+ meta(metadata: {
3049
+ description?: string;
3050
+ }): this;
3051
+ /**
3052
+ * Sets the minimum number of rows required
3053
+ *
3054
+ * @param count - Minimum number of rows (must be a non-negative integer)
3055
+ * @returns The ExRow instance for method chaining
3056
+ */
3057
+ minRows(count: number): this;
3058
+ /**
3059
+ * Sets the maximum number of rows allowed
3060
+ *
3061
+ * @param count - Maximum number of rows (must be a positive integer)
3062
+ * @returns The ExRow instance for method chaining
3063
+ */
3064
+ maxRows(count: number): this;
3065
+ }
3066
+
3067
+ declare interface ExRowDef<T extends ExRowShape> extends ExBaseDef {
3068
+ typeName: 'ExRow';
3069
+ shape: T;
3070
+ meta?: {
3071
+ description?: string;
3072
+ };
3073
+ rowCountConfig?: {
3074
+ minRows?: number;
3075
+ maxRows?: number;
3076
+ };
3077
+ optionalColumnConfig?: {
3078
+ columns: Array<keyof T>;
3079
+ when?: (row: {
3080
+ [K in keyof T]: T[K] extends ExType<infer O, ExBaseDef, unknown> ? O : never;
3081
+ }) => boolean | Promise<boolean>;
3082
+ whenMap?: Record<string, (row: {
3083
+ [K in keyof T]: T[K] extends ExType<infer O, ExBaseDef, unknown> ? O : never;
3084
+ }) => boolean | Promise<boolean>>;
3085
+ };
3086
+ uniqueColumnConfig?: {
3087
+ uniqueConstraints: Array<{
3088
+ id: string;
3089
+ columns: Array<keyof T>;
3090
+ key?: (values: {
3091
+ [K in keyof T]: T[K] extends ExType<infer O, ExBaseDef, unknown> ? O | null : never;
3092
+ }) => string | Promise<string>;
3093
+ }>;
3094
+ };
3095
+ }
3096
+
3097
+ declare type ExRowShape = Record<string, ExPrimitiveType>;
3098
+
3099
+ declare type ExRowWithOptionalColumns<T extends ExRowShape, K extends keyof T> = ExType<{
3100
+ [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;
3101
+ }, ExRowDef<T>> & {
3102
+ optionalColumns<J extends keyof T>(columns: J[], options?: {
3103
+ when?: (row: {
3104
+ [P in keyof T]: T[P] extends ExType<infer O, ExBaseDef, unknown> ? O : never;
3105
+ }) => boolean | Promise<boolean>;
3106
+ }): ExRowWithOptionalColumns<T, J | K>;
3107
+ unique<J extends keyof T>(columns: J[] | J, options?: {
3108
+ key?: (values: {
3109
+ [P in J]: T[P] extends ExType<infer O, ExBaseDef, unknown> ? O | null : never;
3110
+ }) => string | Promise<string>;
3111
+ }): ExRowWithOptionalColumns<T, K>;
3112
+ meta(metadata: {
3113
+ description?: string;
3114
+ }): ExRowWithOptionalColumns<T, K>;
3115
+ minRows(count: number): ExRowWithOptionalColumns<T, K>;
3116
+ maxRows(count: number): ExRowWithOptionalColumns<T, K>;
3117
+ };
3118
+
3119
+ declare class ExSelect<TValue extends string | number = string | number> extends PrimitiveExType<TValue, ExSelectDef<TValue>> {
3120
+ /**
3121
+ * Factory method to create an ExSelect validator for single selection
3122
+ *
3123
+ * @param options - Array of select options with labels and values
3124
+ * @param config - Configuration options
3125
+ * @param config.enforceCaseSensitiveMatch - Whether to enforce case-sensitive matching
3126
+ * @param config.allowCustom - When true, allows custom values not in the options list
3127
+ * @param config.message - Custom error message for validation failures
3128
+ * @returns A new ExSelect instance
3129
+ */
3130
+ static create<const T extends readonly (SelectOption & {
3131
+ value: string | number;
3132
+ })[], TAllowCustom extends boolean = false>(options: T, config?: SelectOptions & {
3133
+ allowCustom?: TAllowCustom;
3134
+ }): TAllowCustom extends true ? ExSelect<string | number> : ExSelect<T[number]['value']>;
3135
+ /**
3136
+ * Creates an optional version of this select type
3137
+ *
3138
+ * @returns An optional version of this select type
3139
+ */
3140
+ optional(): ExOptionalSelect<TValue>;
3141
+ /**
3142
+ * Sets case sensitive matching for option values
3143
+ *
3144
+ * @param enabled - Whether to enable case-sensitive matching
3145
+ * @returns The ExSelect instance for method chaining
3146
+ */
3147
+ caseSensitive(enabled?: boolean): this;
3148
+ }
3149
+
3150
+ declare interface ExSelectDef<TValue extends string | number = string | number> extends PrimitiveExBaseDef {
3151
+ typeName: 'ExSelect';
3152
+ options: SelectOption<TValue>[];
3153
+ config: {
3154
+ enforceCaseSensitiveMatch: boolean;
3155
+ allowCustom?: boolean;
3156
+ };
3157
+ checks: ValidatorCheck[];
3158
+ _value?: TValue;
3159
+ message?: string;
3160
+ }
3161
+
3162
+ declare class ExString extends PrimitiveExType<string, ExStringDef> {
3163
+ /**
3164
+ * Factory method to create an ExString validator
3165
+ *
3166
+ * @param options - Configuration options
3167
+ * @param options.message - Optional custom error message for validation failures
3168
+ * @returns A new ExString instance
3169
+ */
3170
+ static create(options?: {
3171
+ message?: string;
3172
+ }): ExString;
3173
+ /**
3174
+ * Creates an optional version of this type
3175
+ *
3176
+ * @returns An optional version of this type
3177
+ */
3178
+ optional(): ExOptionalString;
3179
+ /**
3180
+ * Validates that the string is a valid UUID
3181
+ *
3182
+ * @param options - Configuration options
3183
+ * @param options.version - UUID version to validate against ('v1', 'v4', 'v5', 'all')
3184
+ * @param options.message - Custom error message for validation failures
3185
+ * @returns The ExString instance for method chaining
3186
+ */
3187
+ uuid(options?: {
3188
+ version?: UUIDVersion;
3189
+ message?: string;
3190
+ }): this;
3191
+ /**
3192
+ * Validates that the string is a valid IP address
3193
+ *
3194
+ * @param options - Configuration options
3195
+ * @param options.version - IP version to validate against ('v4', 'v6', 'all')
3196
+ * @param options.message - Custom error message for validation failures
3197
+ * @returns The ExString instance for method chaining
3198
+ */
3199
+ ip(options?: {
3200
+ version?: IPAddressVersion;
3201
+ message?: string;
3202
+ }): this;
3203
+ /**
3204
+ * Validates that the string is a valid URL
3205
+ *
3206
+ * @param options - Configuration options for URL validation
3207
+ * @param options.allowedProtocols - List of allowed protocols
3208
+ * @param options.allowedDomains - List of allowed domains
3209
+ * @param options.allowSubdomains - Whether to allow subdomains
3210
+ * @param options.allowPaths - Whether to allow paths
3211
+ * @param options.allowQueryParams - Whether to allow query parameters
3212
+ * @param options.message - Custom error message
3213
+ * @returns The ExString instance for method chaining
3214
+ */
3215
+ url(options?: URLOptions): this;
3216
+ /**
3217
+ * Validates that the string is a valid email address
3218
+ *
3219
+ * @param options - Configuration options
3220
+ * @param options.message - Custom error message for validation failures
3221
+ * @returns The ExString instance for method chaining
3222
+ */
3223
+ email(options?: {
3224
+ message?: string;
3225
+ }): this;
3226
+ /**
3227
+ * Validates that the string is a valid phone number
3228
+ *
3229
+ * @param options - Configuration options for phone validation
3230
+ * @param options.allowedCountries - Array of ISO 3166-1 alpha-2 country codes (e.g., ["US", "FR"])
3231
+ * @param options.format - The expected input format ("international", "national", or "both")
3232
+ * @param options.output - How the phone number should be normalized ("e164", "formatted", or "digits")
3233
+ * @param options.message - Custom error message
3234
+ * @returns The ExString instance for method chaining
3235
+ */
3236
+ phone(options?: PhoneOptions): this;
3237
+ /**
3238
+ * Validates that the string represents a valid country
3239
+ *
3240
+ * @param options - Configuration options for country validation
3241
+ * @param options.output - The format to output the country ("name", "2-letter", or "3-letter")
3242
+ * @param options.message - Custom error message
3243
+ * @returns The ExString instance for method chaining
3244
+ */
3245
+ country(options?: CountryOptions): this;
3246
+ /**
3247
+ * Validates that the string length is at most maxLength
3248
+ *
3249
+ * @param maxLength - Maximum allowed length
3250
+ * @param options - Configuration options
3251
+ * @param options.message - Custom error message for validation failures
3252
+ * @returns The ExString instance for method chaining
3253
+ */
3254
+ max(maxLength: number, options?: {
3255
+ message?: string;
3256
+ }): this;
3257
+ /**
3258
+ * Validates that the string length is at least minLength
3259
+ *
3260
+ * @param minLength - Minimum allowed length
3261
+ * @param options - Configuration options
3262
+ * @param options.message - Custom error message for validation failures
3263
+ * @returns The ExString instance for method chaining
3264
+ */
3265
+ min(minLength: number, options?: {
3266
+ message?: string;
3267
+ }): this;
3268
+ /**
3269
+ * Validates that the string has exactly the specified length
3270
+ *
3271
+ * @param exactLength - Required exact length
3272
+ * @param options - Configuration options
3273
+ * @param options.message - Custom error message for validation failures
3274
+ * @returns The ExString instance for method chaining
3275
+ */
3276
+ length(exactLength: number, options?: {
3277
+ message?: string;
3278
+ }): this;
3279
+ /**
3280
+ * Validates that the string includes the specified substring
3281
+ *
3282
+ * @param substring - Substring that must be included
3283
+ * @param options - Configuration options
3284
+ * @param options.message - Custom error message for validation failures
3285
+ * @returns The ExString instance for method chaining
3286
+ */
3287
+ includes(substring: string, options?: {
3288
+ message?: string;
3289
+ }): this;
3290
+ /**
3291
+ * Validates that the string starts with the specified prefix
3292
+ *
3293
+ * @param prefix - Required starting prefix
3294
+ * @param options - Configuration options
3295
+ * @param options.message - Custom error message for validation failures
3296
+ * @returns The ExString instance for method chaining
3297
+ */
3298
+ startsWith(prefix: string, options?: {
3299
+ message?: string;
3300
+ }): this;
3301
+ /**
3302
+ * Validates that the string ends with the specified suffix
3303
+ *
3304
+ * @param suffix - Required ending suffix
3305
+ * @param options - Configuration options
3306
+ * @param options.message - Custom error message for validation failures
3307
+ * @returns The ExString instance for method chaining
3308
+ */
3309
+ endsWith(suffix: string, options?: {
3310
+ message?: string;
3311
+ }): this;
3312
+ /**
3313
+ * Validates that the string matches the specified regular expression
3314
+ *
3315
+ * @param pattern - Regular expression pattern to match
3316
+ * @param options - Configuration options
3317
+ * @param options.message - Custom error message for validation failures
3318
+ * @returns The ExString instance for method chaining
3319
+ */
3320
+ regex(pattern: RegExp, options?: {
3321
+ message?: string;
3322
+ }): this;
3323
+ /**
3324
+ * Validates that the string contains only alphabetical characters
3325
+ *
3326
+ * @param options - Configuration options
3327
+ * @param options.message - Custom error message for validation failures
3328
+ * @returns The ExString instance for method chaining
3329
+ */
3330
+ alphabetical(options?: {
3331
+ message?: string;
3332
+ }): this;
3333
+ /**
3334
+ * Validates that the string contains only alphanumeric characters
3335
+ *
3336
+ * @param options - Configuration options
3337
+ * @param options.message - Custom error message for validation failures
3338
+ * @returns The ExString instance for method chaining
3339
+ */
3340
+ alphanumerical(options?: {
3341
+ message?: string;
3342
+ }): this;
3343
+ /**
3344
+ * Validates that the string represents a numeric value
3345
+ *
3346
+ * @param options - Configuration options
3347
+ * @param options.message - Custom error message for validation failures
3348
+ * @returns The ExString instance for method chaining
3349
+ */
3350
+ numerical(options?: {
3351
+ message?: string;
3352
+ }): this;
3353
+ /**
3354
+ * Validates that the string is a valid IBAN (International Bank Account Number)
3355
+ *
3356
+ * @param options - Configuration options for IBAN validation
3357
+ * @param options.allowedCountries - Array of country codes to restrict validation to (e.g., ["DE", "FR"])
3358
+ * @param options.message - Custom error message
3359
+ * @returns The ExString instance for method chaining
3360
+ */
3361
+ iban(options?: IbanOptions): this;
3362
+ /**
3363
+ * Validates that the string is a valid BIC/SWIFT code
3364
+ *
3365
+ * @param options - Configuration options for BIC validation
3366
+ * @param options.message - Custom error message
3367
+ * @returns The ExString instance for method chaining
3368
+ */
3369
+ bic(options?: BICOptions): this;
3370
+ /**
3371
+ * Validates that the string is a valid GTIN (Global Trade Item Number)
3372
+ * Supports GTIN-8, GTIN-12, GTIN-13, or GTIN-14 formats
3373
+ *
3374
+ * @param options - Configuration options for GTIN validation
3375
+ * @param options.message - Custom error message
3376
+ * @returns The ExString instance for method chaining
3377
+ */
3378
+ gtin(options?: GTINOptions): this;
3379
+ /**
3380
+ * Validates that the string is a valid ISO 4217 currency code
3381
+ *
3382
+ * @param options - Configuration options for currency code validation
3383
+ * @param options.allowedCurrencies - Array of specific currency codes to limit validation to
3384
+ * @param options.message - Custom error message
3385
+ * @returns The ExString instance for method chaining
3386
+ */
3387
+ currencyCode(options?: CurrencyCodeOptions): this;
3388
+ }
3389
+
3390
+ declare interface ExStringDef extends PrimitiveExBaseDef {
3391
+ typeName: 'ExString';
3392
+ checks: ValidatorCheck[];
3393
+ }
3394
+
3395
+ declare class ExTime extends PrimitiveExType<string, ExTimeDef> {
3396
+ /**
3397
+ * Factory method to create an ExTime validator
3398
+ *
3399
+ * @param options - Configuration options
3400
+ * @param options.message - Optional custom error message for validation failures
3401
+ * @returns A new ExTime instance
3402
+ */
3403
+ static create(options?: TimeOptions): ExTime;
3404
+ /**
3405
+ * Creates an optional version of this type
3406
+ *
3407
+ * @returns An optional version of this type
3408
+ */
3409
+ optional(): ExOptionalTime;
3410
+ /**
3411
+ * Sets precision for milliseconds in the time
3412
+ *
3413
+ * @param precision - Number of millisecond decimal places
3414
+ * @param options - Configuration options
3415
+ * @param options.message - Custom error message for validation failures
3416
+ * @returns The ExTime instance for method chaining
3417
+ */
3418
+ precision(precision: number, options?: {
3419
+ message?: string;
3420
+ }): this;
3421
+ }
3422
+
3423
+ declare interface ExTimeDef extends PrimitiveExBaseDef {
3424
+ typeName: 'ExTime';
3425
+ precision?: number | null;
3426
+ message?: string;
3427
+ checks: ValidatorCheck[];
3428
+ }
3429
+
3430
+ declare abstract class ExType<Output, Def extends ExBaseDef, Input = Output> {
3431
+ _def: Def;
3432
+ _output: Output;
3433
+ _input: Input;
3434
+ /**
3435
+ * Creates a new ExType instance
3436
+ *
3437
+ * @param def - Definition object for this type
3438
+ */
3439
+ constructor(def: Def);
3440
+ /**
3441
+ * Protected method to create a validation check
3442
+ *
3443
+ * @param type - Type of check
3444
+ * @param params - Parameters for the check
3445
+ * @param message - Optional error message
3446
+ * @returns A ValidatorCheck object
3447
+ */
3448
+ protected _addCheck(type: string, params?: Record<string, unknown>, message?: string): ValidatorCheck;
3449
+ }
3450
+
3451
+ declare interface GTINOptions {
3452
+ message?: string;
3453
+ }
3454
+
3455
+ declare interface IbanOptions {
3456
+ allowedCountries?: CountryTwoLetterCode[];
3457
+ message?: string;
3458
+ }
3459
+
294
3460
  /**
295
3461
  * Error thrown when the user cancels the import operation
296
3462
  */
@@ -298,7 +3464,14 @@ export declare class ImportCancelledError extends Error {
298
3464
  constructor(message?: string);
299
3465
  }
300
3466
 
301
- export { Infer }
3467
+ export declare type Infer<T extends ExType<unknown, ExBaseDef, unknown>> = T extends ExType<infer Output, ExBaseDef, unknown> ? Output : never;
3468
+
3469
+ declare type IPAddressVersion = 'v4' | 'v6' | 'all';
3470
+
3471
+ declare interface MultiselectOptions {
3472
+ enforceCaseSensitiveMatch?: boolean;
3473
+ message?: string;
3474
+ }
302
3475
 
303
3476
  /**
304
3477
  * Options for the open() method
@@ -321,6 +3494,100 @@ export declare type OpenOptions<T> = RequireAtLeastOne<DeliveryOptionsBase<T>, '
321
3494
  onWidgetClose?: (reason: 'user_close' | 'cancel' | 'complete' | 'error') => void;
322
3495
  };
323
3496
 
3497
+ declare type PhoneNumberFormat = 'international' | 'national' | 'both';
3498
+
3499
+ declare type PhoneNumberOutput = 'e164' | 'formatted' | 'digits';
3500
+
3501
+ declare interface PhoneOptions {
3502
+ allowedCountries?: CountryTwoLetterCode[];
3503
+ format?: PhoneNumberFormat;
3504
+ output?: PhoneNumberOutput;
3505
+ message?: string;
3506
+ }
3507
+
3508
+ declare interface PrimitiveExBaseDef extends ExBaseDef {
3509
+ columnNameAliases?: string[];
3510
+ description?: string;
3511
+ label?: string;
3512
+ example?: string;
3513
+ message?: string;
3514
+ checks?: ValidatorCheck[];
3515
+ defaultValue?: unknown | (() => unknown);
3516
+ }
3517
+
3518
+ declare abstract class PrimitiveExType<Output, Def extends PrimitiveExBaseDef, Input = Output> extends ExType<Output, Def, Input> {
3519
+ /**
3520
+ * Sets column name aliases for this field
3521
+ *
3522
+ * @param aliases - Array of alternative column names that can map to this field
3523
+ * @returns The type instance for method chaining
3524
+ */
3525
+ columnNameAliases(aliases: string[]): this;
3526
+ /**
3527
+ * Sets a description for this field
3528
+ *
3529
+ * @param text - Description text
3530
+ * @returns The type instance for method chaining
3531
+ */
3532
+ description(text: string): this;
3533
+ /**
3534
+ * Sets a display label for this field
3535
+ *
3536
+ * @param text - Label text
3537
+ * @returns The type instance for method chaining
3538
+ */
3539
+ label(text: string): this;
3540
+ /**
3541
+ * Sets an example value for this field
3542
+ *
3543
+ * @param text - Example text
3544
+ * @returns The type instance for method chaining
3545
+ */
3546
+ example(text: string): this;
3547
+ /**
3548
+ * Adds a custom refinement validator to this field.
3549
+ *
3550
+ * Supports two calling styles:
3551
+ * 1. Boolean validator with optional params:
3552
+ * `.refine((value) => value > 0, { message: 'Must be positive' })`
3553
+ * 2. Object-returning validator (like refineBatch for a single value):
3554
+ * `.refine((value) => ({ valid: value > 0, message: 'Must be positive', suggestedFix: {...} }))`
3555
+ *
3556
+ * @param validator - Function or RegExp that validates the data
3557
+ * @param params - Additional parameters or function that returns parameters (only for boolean validators)
3558
+ * @returns The type instance for method chaining
3559
+ */
3560
+ refine<T extends Output>(validator: ((data: NonNullable<T>) => RefineResultItem | Promise<RefineResultItem> | unknown | Promise<unknown>) | RegExp, params?: RefineParams | ((data: NonNullable<T>) => RefineParams)): this;
3561
+ /**
3562
+ * Adds a batch refinement validator that validates all column values at once
3563
+ *
3564
+ * @param validator - Function that receives all values and returns validation results, or RegExp for per-value validation
3565
+ * @param params - Additional parameters including fallback error message
3566
+ * @returns The type instance for method chaining
3567
+ */
3568
+ refineBatch<T extends Output>(validator: ((data: NonNullable<T>[]) => RefineBatchResultItem[] | Promise<RefineBatchResultItem[]>) | RegExp, params?: RefineParams): this;
3569
+ /**
3570
+ * Protected method to find an existing check by type
3571
+ *
3572
+ * @param type - Type of check to find
3573
+ * @returns Object with the check, its index, and whether it was found
3574
+ */
3575
+ protected _findExistingCheck(type: string): {
3576
+ check: ValidatorCheck | undefined;
3577
+ index: number;
3578
+ found: boolean;
3579
+ };
3580
+ /**
3581
+ * Protected method to replace an existing check or add a new one
3582
+ *
3583
+ * @param check - The check to add or replace with
3584
+ * @param existingIndex - Index of existing check, or -1 if none exists
3585
+ */
3586
+ protected _replaceOrAddCheck(check: ValidatorCheck, existingIndex: number): void;
3587
+ }
3588
+
3589
+ declare type Protocol = 'http' | 'https' | 'ftp' | 'sftp' | 'file' | 'mailto' | 'tel';
3590
+
324
3591
  /**
325
3592
  * A chunk of records passed to the onData callback
326
3593
  */
@@ -335,6 +3602,35 @@ export declare interface RecordsChunk<T> {
335
3602
  totalRecords: number;
336
3603
  }
337
3604
 
3605
+ declare type RefineBatchResultItem = {
3606
+ valid: boolean;
3607
+ message?: string;
3608
+ suggestedFix?: {
3609
+ id: string;
3610
+ value: unknown;
3611
+ description: string;
3612
+ };
3613
+ };
3614
+
3615
+ declare type RefineParams = {
3616
+ message?: string;
3617
+ suggestedFix?: {
3618
+ id: string;
3619
+ value: unknown;
3620
+ description: string;
3621
+ };
3622
+ };
3623
+
3624
+ declare type RefineResultItem = {
3625
+ valid: boolean;
3626
+ message?: string;
3627
+ suggestedFix?: {
3628
+ id: string;
3629
+ value: unknown;
3630
+ description: string;
3631
+ };
3632
+ };
3633
+
338
3634
  /**
339
3635
  * Type helper that requires at least one of the specified keys to be present
340
3636
  */
@@ -342,11 +3638,54 @@ declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Excl
342
3638
  [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
343
3639
  }[Keys];
344
3640
 
3641
+ declare interface SelectOption<TValue extends string | number = string | number> {
3642
+ label: string;
3643
+ value: TValue;
3644
+ alsoMatches?: (string | RegExp)[];
3645
+ }
3646
+
3647
+ declare interface SelectOptions {
3648
+ enforceCaseSensitiveMatch?: boolean;
3649
+ allowCustom?: boolean;
3650
+ message?: string;
3651
+ }
3652
+
345
3653
  declare type StripBrand<T> = {
346
3654
  [K in keyof T]: T[K] extends TemplateString<string> ? string : T[K] extends object ? StripBrand<T[K]> : T[K];
347
3655
  };
348
3656
 
349
- export { TailwindThemeVars }
3657
+ /**
3658
+ * Tailwind CSS variables for theming
3659
+ * These variables override :root values in globals.css when scoped to .ecsv
3660
+ */
3661
+ export declare interface TailwindThemeVars {
3662
+ radius?: string;
3663
+ background?: string;
3664
+ foreground?: string;
3665
+ card?: string;
3666
+ 'card-foreground'?: string;
3667
+ popover?: string;
3668
+ 'popover-foreground'?: string;
3669
+ primary?: string;
3670
+ 'primary-foreground'?: string;
3671
+ secondary?: string;
3672
+ 'secondary-foreground'?: string;
3673
+ muted?: string;
3674
+ 'muted-foreground'?: string;
3675
+ accent?: string;
3676
+ 'accent-foreground'?: string;
3677
+ destructive?: string;
3678
+ 'destructive-foreground'?: string;
3679
+ success?: string;
3680
+ 'success-foreground'?: string;
3681
+ warning?: string;
3682
+ 'warning-foreground'?: string;
3683
+ border?: string;
3684
+ input?: string;
3685
+ ring?: string;
3686
+ 'font-title'?: string;
3687
+ 'font-body'?: string;
3688
+ }
350
3689
 
351
3690
  /**
352
3691
  * Configuration for template download in the upload step.
@@ -373,6 +3712,22 @@ declare type TemplateString<TVars extends string = string> = string & {
373
3712
  readonly __vars: TVars;
374
3713
  };
375
3714
 
3715
+ /**
3716
+ * Time validation options
3717
+ */
3718
+ declare interface TimeOptions {
3719
+ message?: string;
3720
+ }
3721
+
3722
+ declare interface URLOptions {
3723
+ allowedProtocols?: Protocol[];
3724
+ allowedDomains?: string[];
3725
+ allowSubdomains?: boolean;
3726
+ allowPaths?: boolean;
3727
+ allowQueryParams?: boolean;
3728
+ message?: string;
3729
+ }
3730
+
376
3731
  export declare function useExpressCSV<TSchema extends ExType<unknown, ExBaseDef, unknown>>({ schema, title, importIdentifier, publishableKey, debug, developerMode, preload, theme, colorMode, customCSS, fonts, stepDisplay, previewSchemaBeforeUpload, templateDownload, saveSession, locale, }: UseExpressCSVOptions<TSchema>): {
377
3732
  open: (options: OpenOptions<Infer<TSchema>>) => void;
378
3733
  widgetState: WidgetState;
@@ -399,6 +3754,14 @@ export declare interface UseExpressCSVOptions<TSchema extends ExType<unknown, Ex
399
3754
  locale?: DeepPartial<ExpressCSVLocaleInput>;
400
3755
  }
401
3756
 
3757
+ declare type UUIDVersion = 'v1' | 'v4' | 'v5' | 'all';
3758
+
3759
+ declare interface ValidatorCheck {
3760
+ type: string;
3761
+ params?: Record<string, unknown>;
3762
+ message?: string;
3763
+ }
3764
+
402
3765
  /**
403
3766
  * Webhook configuration for remote delivery of results
404
3767
  */
@@ -417,10 +3780,40 @@ export declare interface WebhookConfig {
417
3780
  metadata?: Record<string, unknown>;
418
3781
  }
419
3782
 
420
- export { WidgetMode }
3783
+ /**
3784
+ * Widget mode enumeration
3785
+ */
3786
+ export declare enum WidgetMode {
3787
+ NORMAL = "normal",
3788
+ PRELOAD = "preload"
3789
+ }
421
3790
 
422
- export { WidgetState }
3791
+ /**
3792
+ * Widget state enumeration for consistent state management
3793
+ */
3794
+ export declare enum WidgetState {
3795
+ UNINITIALIZED = "uninitialized",
3796
+ INITIALIZING = "initializing",
3797
+ READY = "ready",
3798
+ OPENING = "opening",
3799
+ OPEN = "open",
3800
+ CLOSING = "closing",
3801
+ RESETTING = "resetting",
3802
+ ERROR = "error",
3803
+ DESTROYED = "destroyed"
3804
+ }
423
3805
 
424
- export { x }
3806
+ export declare const x: {
3807
+ string: typeof ExString.create;
3808
+ number: typeof ExNumber.create;
3809
+ boolean: typeof ExBoolean.create;
3810
+ date: typeof ExDate.create;
3811
+ time: typeof ExTime.create;
3812
+ datetime: typeof ExDatetime.create;
3813
+ row: typeof ExRow.create;
3814
+ select: typeof ExSelect.create;
3815
+ multiselect: typeof ExMultiselect.create;
3816
+ infer: <T extends ExType<unknown, ExBaseDef, unknown>>(_schema: T) => Infer<T>;
3817
+ };
425
3818
 
426
3819
  export { }