@przeslijmi/real-fake-data-playwright 1.1.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.d.ts CHANGED
@@ -16,7 +16,7 @@ export type PolishLegalForm = 'Sp. z o.o.' | 'Sp. z o.o. sp.k.' | 'P.S.A.' | 'S.
16
16
  /** Naming family the company-name generator drew from. */
17
17
  export type CompanyNameStrategy = 'morpheme' | 'surname' | 'descriptive' | 'modern';
18
18
  /** Kind of vehicle registration plate produced. */
19
- export type VehicleRegistrationType = 'standard' | 'custom' | 'police' | 'military';
19
+ export type VehicleRegistrationType = 'standard' | 'custom' | 'police' | 'military' | 'historic';
20
20
  /** Local-part shape the email generator can produce. */
21
21
  export type EmailLocalPattern = 'first.last' | 'firstlast' | 'first_last' | 'first.last.number' | 'flast' | 'initial.last' | 'noun.number';
22
22
  /** Provider-domain category the email generator can draw from. */
@@ -145,6 +145,20 @@ export interface LoremOptions extends RequestOptions {
145
145
  */
146
146
  readonly startWithLorem?: boolean;
147
147
  }
148
+ export interface CustomRegexOptions extends RequestOptions {
149
+ /**
150
+ * The regular expression (source form, no delimiters) to generate a matching
151
+ * string for, e.g. `"[A-Z]{2}-\\d{6}"`. Required. Back-references and
152
+ * look-around assertions are rejected, as are patterns with an over-large
153
+ * worst-case expansion. Requires the Pro plan or above.
154
+ */
155
+ readonly pattern: string;
156
+ /**
157
+ * How many times unbounded quantifiers (`*`, `+`, `{n,}`) may expand.
158
+ * Defaults to 32.
159
+ */
160
+ readonly maxRepetition?: number;
161
+ }
148
162
  export interface PolishPeselData {
149
163
  readonly value: string;
150
164
  readonly birthDate: string;
@@ -200,6 +214,186 @@ export interface PolishCompanyData {
200
214
  readonly regon: string;
201
215
  readonly krs: string | null;
202
216
  }
217
+ /**
218
+ * Options for a country's one-call `company` generator — shared across every
219
+ * country (the data shape differs per country, but the inputs do not).
220
+ */
221
+ export interface LocaleCompanyOptions extends RequestOptions {
222
+ readonly strategy?: CompanyNameStrategy | 'any';
223
+ /** Country-specific legal form, `'any'` for weighted-random, or `'none'` to omit. */
224
+ readonly legalForm?: string;
225
+ /** Corrupt the checksummed identifiers so they fail validation; name unaffected. */
226
+ readonly invalid?: boolean;
227
+ /** Restrict output to edge-case values from the rare corners. */
228
+ readonly edge?: boolean;
229
+ }
230
+ /** One AT company: the name, its legal form, and the matching national identifiers. */
231
+ export interface AtCompanyData {
232
+ readonly name: string;
233
+ readonly legalForm: string | null;
234
+ readonly firmenbuchnummer: string;
235
+ readonly uid: string;
236
+ readonly steuernummer: string;
237
+ }
238
+ /** One BE company: the name, its legal form, and the matching national identifiers. */
239
+ export interface BeCompanyData {
240
+ readonly name: string;
241
+ readonly legalForm: string | null;
242
+ readonly ondernemingsnummer: string;
243
+ }
244
+ /** One BG company: the name, its legal form, and the matching national identifiers. */
245
+ export interface BgCompanyData {
246
+ readonly name: string;
247
+ readonly legalForm: string | null;
248
+ readonly eik: string;
249
+ }
250
+ /** One CY company: the name, its legal form, and the matching national identifiers. */
251
+ export interface CyCompanyData {
252
+ readonly name: string;
253
+ readonly legalForm: string | null;
254
+ readonly tic: string;
255
+ }
256
+ /** One CZ company: the name, its legal form, and the matching national identifiers. */
257
+ export interface CzCompanyData {
258
+ readonly name: string;
259
+ readonly legalForm: string | null;
260
+ readonly ico: string;
261
+ }
262
+ /** One DE company: the name, its legal form, and the matching national identifiers. */
263
+ export interface DeCompanyData {
264
+ readonly name: string;
265
+ readonly legalForm: string | null;
266
+ readonly handelsregisternummer: string;
267
+ readonly ustIdnr: string;
268
+ readonly wirtschaftsIdnr: string;
269
+ }
270
+ /** One DK company: the name, its legal form, and the matching national identifiers. */
271
+ export interface DkCompanyData {
272
+ readonly name: string;
273
+ readonly legalForm: string | null;
274
+ readonly cvr: string;
275
+ }
276
+ /** One EE company: the name, its legal form, and the matching national identifiers. */
277
+ export interface EeCompanyData {
278
+ readonly name: string;
279
+ readonly legalForm: string | null;
280
+ readonly registrikood: string;
281
+ readonly kmkr: string;
282
+ }
283
+ /** One ES company: the name, its legal form, and the matching national identifiers. */
284
+ export interface EsCompanyData {
285
+ readonly name: string;
286
+ readonly legalForm: string | null;
287
+ readonly cif: string;
288
+ }
289
+ /** One FI company: the name, its legal form, and the matching national identifiers. */
290
+ export interface FiCompanyData {
291
+ readonly name: string;
292
+ readonly legalForm: string | null;
293
+ readonly yTunnus: string;
294
+ }
295
+ /** One FR company: the name, its legal form, and the matching national identifiers. */
296
+ export interface FrCompanyData {
297
+ readonly name: string;
298
+ readonly legalForm: string | null;
299
+ readonly siren: string;
300
+ }
301
+ /** One GR company: the name, its legal form, and the matching national identifiers. */
302
+ export interface GrCompanyData {
303
+ readonly name: string;
304
+ readonly legalForm: string | null;
305
+ readonly afm: string;
306
+ }
307
+ /** One HR company: the name, its legal form, and the matching national identifiers. */
308
+ export interface HrCompanyData {
309
+ readonly name: string;
310
+ readonly legalForm: string | null;
311
+ readonly oib: string;
312
+ }
313
+ /** One HU company: the name, its legal form, and the matching national identifiers. */
314
+ export interface HuCompanyData {
315
+ readonly name: string;
316
+ readonly legalForm: string | null;
317
+ readonly cegjegyzekszam: string;
318
+ readonly adoszam: string;
319
+ }
320
+ /** One IE company: the name, its legal form, and the matching national identifiers. */
321
+ export interface IeCompanyData {
322
+ readonly name: string;
323
+ readonly legalForm: string | null;
324
+ readonly cro: string;
325
+ readonly vat: string;
326
+ }
327
+ /** One IT company: the name, its legal form, and the matching national identifiers. */
328
+ export interface ItCompanyData {
329
+ readonly name: string;
330
+ readonly legalForm: string | null;
331
+ readonly partitaIva: string;
332
+ }
333
+ /** One LT company: the name, its legal form, and the matching national identifiers. */
334
+ export interface LtCompanyData {
335
+ readonly name: string;
336
+ readonly legalForm: string | null;
337
+ readonly imonesKodas: string;
338
+ readonly pvm: string;
339
+ }
340
+ /** One LU company: the name, its legal form, and the matching national identifiers. */
341
+ export interface LuCompanyData {
342
+ readonly name: string;
343
+ readonly legalForm: string | null;
344
+ readonly tva: string;
345
+ }
346
+ /** One LV company: the name, its legal form, and the matching national identifiers. */
347
+ export interface LvCompanyData {
348
+ readonly name: string;
349
+ readonly legalForm: string | null;
350
+ readonly registracijasNumurs: string;
351
+ }
352
+ /** One MT company: the name, its legal form, and the matching national identifiers. */
353
+ export interface MtCompanyData {
354
+ readonly name: string;
355
+ readonly legalForm: string | null;
356
+ readonly vat: string;
357
+ }
358
+ /** One NL company: the name, its legal form, and the matching national identifiers. */
359
+ export interface NlCompanyData {
360
+ readonly name: string;
361
+ readonly legalForm: string | null;
362
+ readonly kvk: string;
363
+ readonly rsin: string;
364
+ readonly btwId: string;
365
+ }
366
+ /** One PT company: the name, its legal form, and the matching national identifiers. */
367
+ export interface PtCompanyData {
368
+ readonly name: string;
369
+ readonly legalForm: string | null;
370
+ readonly nif: string;
371
+ }
372
+ /** One RO company: the name, its legal form, and the matching national identifiers. */
373
+ export interface RoCompanyData {
374
+ readonly name: string;
375
+ readonly legalForm: string | null;
376
+ readonly cui: string;
377
+ }
378
+ /** One SE company: the name, its legal form, and the matching national identifiers. */
379
+ export interface SeCompanyData {
380
+ readonly name: string;
381
+ readonly legalForm: string | null;
382
+ readonly organisationsnummer: string;
383
+ }
384
+ /** One SI company: the name, its legal form, and the matching national identifiers. */
385
+ export interface SiCompanyData {
386
+ readonly name: string;
387
+ readonly legalForm: string | null;
388
+ readonly davcnaStevilka: string;
389
+ }
390
+ /** One SK company: the name, its legal form, and the matching national identifiers. */
391
+ export interface SkCompanyData {
392
+ readonly name: string;
393
+ readonly legalForm: string | null;
394
+ readonly ico: string;
395
+ readonly icDph: string;
396
+ }
203
397
  export interface PolishVehicleRegistrationData {
204
398
  readonly value: string;
205
399
  readonly prefix: string;
@@ -251,6 +445,11 @@ export interface LoremData {
251
445
  readonly paragraphs: number;
252
446
  readonly startedWithLorem: boolean;
253
447
  }
448
+ export interface CustomRegexData {
449
+ readonly value: string;
450
+ /** The source pattern the value was generated from, echoed back. */
451
+ readonly pattern: string;
452
+ }
254
453
  /**
255
454
  * Options shared by every country's `person-name` generator (`dePersonName`,
256
455
  * `itPersonName`, `plPersonName`, …). Only the underlying name pools and
@@ -528,6 +727,17 @@ export interface DkCprData {
528
727
  readonly birthDate: string;
529
728
  readonly sex: Sex;
530
729
  }
730
+ export interface DkPersonOptions extends DkCprOptions {
731
+ /** Mangle the casing of `name`/`surname` for testing. Defaults to `true`. */
732
+ readonly caseStrict?: boolean;
733
+ }
734
+ export interface DkPersonData {
735
+ readonly name: string;
736
+ readonly surname: string;
737
+ readonly initials: string;
738
+ readonly birthDate: string;
739
+ readonly cpr: string;
740
+ }
531
741
  export interface DkCvrOptions extends RequestOptions {
532
742
  readonly format?: 'national' | 'vat';
533
743
  readonly invalid?: boolean;
@@ -700,7 +910,7 @@ export interface HuSzemelyiAzonositoOptions extends RequestOptions {
700
910
  readonly bornOn?: string;
701
911
  readonly bornBefore?: string;
702
912
  readonly bornAfter?: string;
703
- readonly standard?: 'pre-1997' | 'modern';
913
+ readonly standard?: 'pre-1997' | 'modern' | 'both';
704
914
  readonly invalid?: boolean;
705
915
  readonly edge?: boolean;
706
916
  }
@@ -731,7 +941,7 @@ export interface HuCegjegyzekszamData {
731
941
  readonly digits: string;
732
942
  }
733
943
  export interface IePpsnOptions extends RequestOptions {
734
- readonly standard?: 'pre-2013' | 'modern';
944
+ readonly standard?: 'pre-2013' | 'modern' | 'both';
735
945
  readonly invalid?: boolean;
736
946
  readonly edge?: boolean;
737
947
  }
@@ -743,7 +953,7 @@ export interface IePpsnData {
743
953
  }
744
954
  export interface IeVatOptions extends RequestOptions {
745
955
  readonly format?: 'national' | 'vat';
746
- readonly standard?: 'pre-2013' | 'modern';
956
+ readonly standard?: 'pre-2013' | 'modern' | 'both';
747
957
  readonly invalid?: boolean;
748
958
  readonly edge?: boolean;
749
959
  }
@@ -794,7 +1004,7 @@ export interface LvPersonasKodsOptions extends RequestOptions {
794
1004
  readonly bornOn?: string;
795
1005
  readonly bornBefore?: string;
796
1006
  readonly bornAfter?: string;
797
- readonly standard?: 'legacy' | 'modern';
1007
+ readonly standard?: 'legacy' | 'modern' | 'both';
798
1008
  readonly format?: 'plain' | 'with-hyphen';
799
1009
  readonly invalid?: boolean;
800
1010
  readonly edge?: boolean;
@@ -897,6 +1107,223 @@ export interface NlBsnData {
897
1107
  readonly value: string;
898
1108
  readonly digits: string;
899
1109
  }
1110
+ export interface NlPersonOptions extends PersonConstraintOptions {
1111
+ /** Bias the BSN and name shape toward their rare corners. */
1112
+ readonly edge?: boolean;
1113
+ /** Mangle the casing of `name`/`surname` for testing. Defaults to `true`. */
1114
+ readonly caseStrict?: boolean;
1115
+ }
1116
+ export interface NlPersonData {
1117
+ readonly name: string;
1118
+ readonly surname: string;
1119
+ readonly initials: string;
1120
+ readonly birthDate: string;
1121
+ readonly bsn: string;
1122
+ }
1123
+ /**
1124
+ * Options shared by every full-person generator (`bePerson`, `frPerson`,
1125
+ * `itPerson`, …): the person constraints (`sex`, age/birth-date filters,
1126
+ * `invalid`) plus `edge` and `caseStrict`. The matching national number is
1127
+ * carried on each country's own `*PersonData` result.
1128
+ */
1129
+ export interface FullPersonOptions extends PersonConstraintOptions {
1130
+ /** Bias the number and name shape toward their rarely-exercised corners. */
1131
+ readonly edge?: boolean;
1132
+ /** Mangle the casing of `name`/`surname` for testing. Defaults to `true`. */
1133
+ readonly caseStrict?: boolean;
1134
+ }
1135
+ export type BePersonOptions = FullPersonOptions;
1136
+ export interface BePersonData {
1137
+ readonly name: string;
1138
+ readonly surname: string;
1139
+ readonly initials: string;
1140
+ readonly birthDate: string;
1141
+ readonly rijksregisternummer: string;
1142
+ }
1143
+ export type BgPersonOptions = FullPersonOptions;
1144
+ export interface BgPersonData {
1145
+ readonly name: string;
1146
+ readonly surname: string;
1147
+ readonly initials: string;
1148
+ readonly birthDate: string;
1149
+ readonly egn: string;
1150
+ }
1151
+ export type CzPersonOptions = FullPersonOptions;
1152
+ export interface CzPersonData {
1153
+ readonly name: string;
1154
+ readonly surname: string;
1155
+ readonly initials: string;
1156
+ readonly birthDate: string;
1157
+ readonly rodneCislo: string;
1158
+ }
1159
+ export type EePersonOptions = FullPersonOptions;
1160
+ export interface EePersonData {
1161
+ readonly name: string;
1162
+ readonly surname: string;
1163
+ readonly initials: string;
1164
+ readonly birthDate: string;
1165
+ readonly isikukood: string;
1166
+ }
1167
+ export type FiPersonOptions = FullPersonOptions;
1168
+ export interface FiPersonData {
1169
+ readonly name: string;
1170
+ readonly surname: string;
1171
+ readonly initials: string;
1172
+ readonly birthDate: string;
1173
+ readonly henkilotunnus: string;
1174
+ }
1175
+ export type GrPersonOptions = FullPersonOptions;
1176
+ export interface GrPersonData {
1177
+ readonly name: string;
1178
+ readonly surname: string;
1179
+ readonly initials: string;
1180
+ readonly birthDate: string;
1181
+ readonly amka: string;
1182
+ }
1183
+ export type HrPersonOptions = FullPersonOptions;
1184
+ export interface HrPersonData {
1185
+ readonly name: string;
1186
+ readonly surname: string;
1187
+ readonly initials: string;
1188
+ readonly birthDate: string;
1189
+ readonly jmbg: string;
1190
+ }
1191
+ export type HuPersonOptions = FullPersonOptions;
1192
+ export interface HuPersonData {
1193
+ readonly name: string;
1194
+ readonly surname: string;
1195
+ readonly initials: string;
1196
+ readonly birthDate: string;
1197
+ readonly szemelyiAzonosito: string;
1198
+ }
1199
+ export type LtPersonOptions = FullPersonOptions;
1200
+ export interface LtPersonData {
1201
+ readonly name: string;
1202
+ readonly surname: string;
1203
+ readonly initials: string;
1204
+ readonly birthDate: string;
1205
+ readonly asmensKodas: string;
1206
+ }
1207
+ export type RoPersonOptions = FullPersonOptions;
1208
+ export interface RoPersonData {
1209
+ readonly name: string;
1210
+ readonly surname: string;
1211
+ readonly initials: string;
1212
+ readonly birthDate: string;
1213
+ readonly cnp: string;
1214
+ }
1215
+ export type SePersonOptions = FullPersonOptions;
1216
+ export interface SePersonData {
1217
+ readonly name: string;
1218
+ readonly surname: string;
1219
+ readonly initials: string;
1220
+ readonly birthDate: string;
1221
+ readonly personnummer: string;
1222
+ }
1223
+ export type SiPersonOptions = FullPersonOptions;
1224
+ export interface SiPersonData {
1225
+ readonly name: string;
1226
+ readonly surname: string;
1227
+ readonly initials: string;
1228
+ readonly birthDate: string;
1229
+ readonly emso: string;
1230
+ }
1231
+ export type SkPersonOptions = FullPersonOptions;
1232
+ export interface SkPersonData {
1233
+ readonly name: string;
1234
+ readonly surname: string;
1235
+ readonly initials: string;
1236
+ readonly birthDate: string;
1237
+ readonly rodneCislo: string;
1238
+ }
1239
+ export type AtPersonOptions = FullPersonOptions;
1240
+ export interface AtPersonData {
1241
+ readonly name: string;
1242
+ readonly surname: string;
1243
+ readonly initials: string;
1244
+ readonly birthDate: string;
1245
+ readonly svnr: string;
1246
+ }
1247
+ export type LuPersonOptions = FullPersonOptions;
1248
+ export interface LuPersonData {
1249
+ readonly name: string;
1250
+ readonly surname: string;
1251
+ readonly initials: string;
1252
+ readonly birthDate: string;
1253
+ readonly matricule: string;
1254
+ }
1255
+ export type FrPersonOptions = FullPersonOptions;
1256
+ export interface FrPersonData {
1257
+ readonly name: string;
1258
+ readonly surname: string;
1259
+ readonly initials: string;
1260
+ readonly birthDate: string;
1261
+ readonly nir: string;
1262
+ }
1263
+ export type ItPersonOptions = FullPersonOptions;
1264
+ export interface ItPersonData {
1265
+ readonly name: string;
1266
+ readonly surname: string;
1267
+ readonly initials: string;
1268
+ readonly birthDate: string;
1269
+ readonly codiceFiscale: string;
1270
+ }
1271
+ export type CyPersonOptions = FullPersonOptions;
1272
+ export interface CyPersonData {
1273
+ readonly name: string;
1274
+ readonly surname: string;
1275
+ readonly initials: string;
1276
+ readonly birthDate: string;
1277
+ readonly tic: string;
1278
+ }
1279
+ export type DePersonOptions = FullPersonOptions;
1280
+ export interface DePersonData {
1281
+ readonly name: string;
1282
+ readonly surname: string;
1283
+ readonly initials: string;
1284
+ readonly birthDate: string;
1285
+ readonly steuerId: string;
1286
+ }
1287
+ export type EsPersonOptions = FullPersonOptions;
1288
+ export interface EsPersonData {
1289
+ readonly name: string;
1290
+ readonly surname: string;
1291
+ readonly initials: string;
1292
+ readonly birthDate: string;
1293
+ readonly dni: string;
1294
+ }
1295
+ export type IePersonOptions = FullPersonOptions;
1296
+ export interface IePersonData {
1297
+ readonly name: string;
1298
+ readonly surname: string;
1299
+ readonly initials: string;
1300
+ readonly birthDate: string;
1301
+ readonly ppsn: string;
1302
+ }
1303
+ export type MtPersonOptions = FullPersonOptions;
1304
+ export interface MtPersonData {
1305
+ readonly name: string;
1306
+ readonly surname: string;
1307
+ readonly initials: string;
1308
+ readonly birthDate: string;
1309
+ readonly idCard: string;
1310
+ }
1311
+ export type PtPersonOptions = FullPersonOptions;
1312
+ export interface PtPersonData {
1313
+ readonly name: string;
1314
+ readonly surname: string;
1315
+ readonly initials: string;
1316
+ readonly birthDate: string;
1317
+ readonly cartaoCidadao: string;
1318
+ }
1319
+ export type LvPersonOptions = FullPersonOptions;
1320
+ export interface LvPersonData {
1321
+ readonly name: string;
1322
+ readonly surname: string;
1323
+ readonly initials: string;
1324
+ readonly birthDate: string;
1325
+ readonly personasKods: string;
1326
+ }
900
1327
  export interface NlRsinOptions extends RequestOptions {
901
1328
  readonly invalid?: boolean;
902
1329
  readonly edge?: boolean;
@@ -906,7 +1333,7 @@ export interface NlRsinData {
906
1333
  readonly digits: string;
907
1334
  }
908
1335
  export interface NlBtwIdOptions extends RequestOptions {
909
- readonly standard?: 'legacy' | 'modern';
1336
+ readonly standard?: 'legacy' | 'modern' | 'both';
910
1337
  readonly invalid?: boolean;
911
1338
  readonly edge?: boolean;
912
1339
  }