bysquare 2.12.0 → 2.12.2

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
@@ -4,52 +4,59 @@
4
4
  * It's a bit silly to limit the version number to 4-bit, if they keep
5
5
  * increasing the version number, the latest possible mapped value is 16
6
6
  */
7
- export declare enum Version {
7
+ export declare const Version: {
8
8
  /**
9
9
  * Created this document from original by square specifications.
10
10
  *
11
11
  * **Released Date:** 2013-02-22
12
12
  */
13
- "1.0.0" = 0,
13
+ readonly "1.0.0": 0;
14
14
  /**
15
15
  * Added fields for beneficiary name and address
16
16
  *
17
17
  * **Released Date:** 2015-06-24
18
18
  */
19
- "1.1.0" = 1
20
- }
19
+ readonly "1.1.0": 1;
20
+ };
21
+ export type Version = typeof Version[keyof typeof Version];
21
22
  /**
22
23
  * Kalendárny mesiac.
24
+ *
25
+ * @dprint-ignore
23
26
  */
24
- export declare enum Month {
25
- January = 1,
26
- February = 2,
27
- March = 4,
28
- April = 8,
29
- May = 16,
30
- June = 32,
31
- July = 64,
32
- August = 128,
33
- September = 256,
34
- October = 512,
35
- November = 1024,
36
- December = 2048
37
- }
27
+ export declare const Month: {
28
+ readonly January: 1;
29
+ readonly February: 2;
30
+ readonly March: 4;
31
+ readonly April: 8;
32
+ readonly May: 16;
33
+ readonly June: 32;
34
+ readonly July: 64;
35
+ readonly August: 128;
36
+ readonly September: 256;
37
+ readonly October: 512;
38
+ readonly November: 1024;
39
+ readonly December: 2048;
40
+ };
41
+ export type Month = typeof Month[keyof typeof Month];
38
42
  /**
39
43
  * Deň platby vyplývajúci z opakovania (Periodicity). Deň v mesiaci je číslo
40
44
  * medzi 1 a 31. Deň v týždni je číslo medzi 1 a 7 (1 = pondelok, 2=utorok, …, 7
41
45
  * = nedeľa).
46
+ *
47
+ * @dprint-ignore
42
48
  */
43
- export declare enum Periodicity {
44
- Daily = "d",
45
- Weekly = "w",
46
- Biweekly = "b",
47
- Monthly = "m",
48
- Bimonthly = "B",
49
- Quarterly = "q",
50
- Semiannually = "s",
51
- Annually = "a"
52
- }
49
+ export declare const Periodicity: {
50
+ readonly Daily: "d";
51
+ readonly Weekly: "w";
52
+ readonly Biweekly: "b";
53
+ readonly Monthly: "m";
54
+ readonly Bimonthly: "B";
55
+ readonly Quarterly: "q";
56
+ readonly Semiannually: "s";
57
+ readonly Annually: "a";
58
+ };
59
+ export type Periodicity = typeof Periodicity[keyof typeof Periodicity];
53
60
  /**
54
61
  * This is the payment day. It‘s meaning depends on the periodicity, meaning
55
62
  * either day of the month (number between 1 and 31) or day of the week
@@ -66,20 +73,21 @@ export type Day = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 1
66
73
  * - `StandingOrder`: trvalý príkaz, údaje sa vyplnia do StandingOrderExt
67
74
  * - `DirectDebit`: inkaso, údaje sa vyplnia do DirectDebitExt
68
75
  */
69
- export declare enum PaymentOptions {
76
+ export declare const PaymentOptions: {
70
77
  /**
71
78
  * Platobný príkaz
72
79
  */
73
- PaymentOrder = 1,
80
+ readonly PaymentOrder: 1;
74
81
  /**
75
82
  * Trvalý príkaz, údaje sa vyplnia do StandingOrderExt
76
83
  */
77
- StandingOrder = 2,
84
+ readonly StandingOrder: 2;
78
85
  /**
79
86
  * Inkaso, údaje sa vyplnia do DirectDebitExt
80
87
  */
81
- DirectDebit = 4
82
- }
88
+ readonly DirectDebit: 4;
89
+ };
90
+ export type PaymentOptions = typeof PaymentOptions[keyof typeof PaymentOptions];
83
91
  /**
84
92
  * Údaje bankového účtu prijímateľa platby.
85
93
  */
@@ -111,16 +119,17 @@ export type BankAccount = {
111
119
  * - SEPA - Inkaso zodpovedá schéme
112
120
  * - SEPA. other - iné
113
121
  */
114
- export declare enum DirectDebitScheme {
122
+ export declare const DirectDebitScheme: {
115
123
  /**
116
124
  * other - iné
117
125
  */
118
- Other = 0,
126
+ readonly Other: 0;
119
127
  /**
120
128
  * SEPA - Inkaso zodpovedá schéme
121
129
  */
122
- Sepa = 1
123
- }
130
+ readonly Sepa: 1;
131
+ };
132
+ export type DirectDebitScheme = typeof DirectDebitScheme[keyof typeof DirectDebitScheme];
124
133
  /**
125
134
  * Typ inkasa. Uvádza ja jedna z možností:
126
135
  *
@@ -129,16 +138,17 @@ export declare enum DirectDebitScheme {
129
138
  * - one-off - jednorázové inkaso
130
139
  * - recurrent - opakované inkaso
131
140
  */
132
- export declare enum DirectDebitType {
141
+ export declare const DirectDebitType: {
133
142
  /**
134
143
  * Jednorázové inkaso
135
144
  */
136
- OneOff = 0,
145
+ readonly OneOff: 0;
137
146
  /**
138
147
  * Opakované inkaso
139
148
  */
140
- Recurrent = 1
141
- }
149
+ readonly Recurrent: 1;
150
+ };
151
+ export type DirectDebitType = typeof DirectDebitType[keyof typeof DirectDebitType];
142
152
  export type Beneficiary = {
143
153
  /**
144
154
  * Rozšírenie o meno príjemcu
@@ -179,7 +189,7 @@ export type SimplePayment = {
179
189
  *
180
190
  * @example "EUR"
181
191
  */
182
- currencyCode: string | CurrencyCode;
192
+ currencyCode: string | keyof typeof CurrencyCode;
183
193
  /**
184
194
  * Dátum splatnosti vo formáte [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) `"RRRR-MM-DD"`.
185
195
  * Vprípade trvalého príkazu označuje dátum prvej platby.
@@ -228,13 +238,13 @@ export type SimplePayment = {
228
238
  beneficiary?: Beneficiary;
229
239
  };
230
240
  export type PaymentOrder = SimplePayment & {
231
- type: PaymentOptions.PaymentOrder;
241
+ type: typeof PaymentOptions.PaymentOrder;
232
242
  };
233
243
  /**
234
244
  * Rozšírenie platobných údajov o údaje pre nastavenie trvalého príkazu.
235
245
  */
236
246
  export type StandingOrder = SimplePayment & {
237
- type: PaymentOptions.StandingOrder;
247
+ type: typeof PaymentOptions.StandingOrder;
238
248
  /**
239
249
  * Deň platby vyplývajúci z opakovania (Periodicity). Deň v mesiaci je číslo
240
250
  * medzi 1 a 31. Deň v týždni je číslo medzi 1 a 7 (1 = pondelok, 2 =utorok,
@@ -244,11 +254,11 @@ export type StandingOrder = SimplePayment & {
244
254
  /**
245
255
  * Medzerou oddelený zoznam mesiacov, v ktoré sa má platba uskutočniť.
246
256
  */
247
- month?: Month;
257
+ month?: keyof typeof Month | number;
248
258
  /**
249
259
  * Opakovanie (periodicita) trvalého príkazu.
250
260
  */
251
- periodicity: Periodicity;
261
+ periodicity: keyof typeof Periodicity | string;
252
262
  /**
253
263
  * Dátum poslednej platby v trvalom príkaze.
254
264
  *
@@ -260,9 +270,9 @@ export type StandingOrder = SimplePayment & {
260
270
  * Rozšírenie platobných údajov o údaje pre nastavenie a identifikáciu inkasa.
261
271
  */
262
272
  export type DirectDebit = SimplePayment & {
263
- type: PaymentOptions.DirectDebit;
264
- directDebitScheme?: DirectDebitScheme;
265
- directDebitType?: DirectDebitType;
273
+ type: typeof PaymentOptions.DirectDebit;
274
+ directDebitScheme?: keyof typeof DirectDebitScheme | number;
275
+ directDebitType?: keyof typeof DirectDebitType | number;
266
276
  /**
267
277
  * Identifikácia mandátu medzi veriteľom a dlžníkom podľa SEPA.
268
278
  *
@@ -316,162 +326,163 @@ export type DataModel = {
316
326
  /**
317
327
  * [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217)
318
328
  */
319
- export declare enum CurrencyCode {
320
- AED = "AED",
321
- AFN = "AFN",
322
- ALL = "ALL",
323
- AMD = "AMD",
324
- ANG = "ANG",
325
- AOA = "AOA",
326
- ARS = "ARS",
327
- AUD = "AUD",
328
- AWG = "AWG",
329
- AZN = "AZN",
330
- BAM = "BAM",
331
- BBD = "BBD",
332
- BDT = "BDT",
333
- BGN = "BGN",
334
- BHD = "BHD",
335
- BIF = "BIF",
336
- BMD = "BMD",
337
- BND = "BND",
338
- BOB = "BOB",
339
- BRL = "BRL",
340
- BSD = "BSD",
341
- BTN = "BTN",
342
- BWP = "BWP",
343
- BYN = "BYN",
344
- BZD = "BZD",
345
- CAD = "CAD",
346
- CDF = "CDF",
347
- CHF = "CHF",
348
- CLP = "CLP",
349
- CNY = "CNY",
350
- COP = "COP",
351
- CRC = "CRC",
352
- CUC = "CUC",
353
- CUP = "CUP",
354
- CVE = "CVE",
355
- CZK = "CZK",
356
- DJF = "DJF",
357
- DKK = "DKK",
358
- DOP = "DOP",
359
- DZD = "DZD",
360
- EGP = "EGP",
361
- ERN = "ERN",
362
- ETB = "ETB",
363
- EUR = "EUR",
364
- FJD = "FJD",
365
- FKP = "FKP",
366
- GBP = "GBP",
367
- GEL = "GEL",
368
- GHS = "GHS",
369
- GIP = "GIP",
370
- GMD = "GMD",
371
- GNF = "GNF",
372
- GTQ = "GTQ",
373
- GYD = "GYD",
374
- HKD = "HKD",
375
- HNL = "HNL",
376
- HRK = "HRK",
377
- HTG = "HTG",
378
- HUF = "HUF",
379
- IDR = "IDR",
380
- ILS = "ILS",
381
- INR = "INR",
382
- IQD = "IQD",
383
- IRR = "IRR",
384
- ISK = "ISK",
385
- JMD = "JMD",
386
- JOD = "JOD",
387
- JPY = "JPY",
388
- KES = "KES",
389
- KGS = "KGS",
390
- KHR = "KHR",
391
- KMF = "KMF",
392
- KPW = "KPW",
393
- KRW = "KRW",
394
- KWD = "KWD",
395
- KYD = "KYD",
396
- KZT = "KZT",
397
- LAK = "LAK",
398
- LBP = "LBP",
399
- LKR = "LKR",
400
- LRD = "LRD",
401
- LSL = "LSL",
402
- LYD = "LYD",
403
- MAD = "MAD",
404
- MDL = "MDL",
405
- MGA = "MGA",
406
- MKD = "MKD",
407
- MMK = "MMK",
408
- MNT = "MNT",
409
- MOP = "MOP",
410
- MRU = "MRU",
411
- MUR = "MUR",
412
- MVR = "MVR",
413
- MWK = "MWK",
414
- MXN = "MXN",
415
- MYR = "MYR",
416
- MZN = "MZN",
417
- NAD = "NAD",
418
- NGN = "NGN",
419
- NIO = "NIO",
420
- NOK = "NOK",
421
- NPR = "NPR",
422
- NZD = "NZD",
423
- OMR = "OMR",
424
- PAB = "PAB",
425
- PEN = "PEN",
426
- PGK = "PGK",
427
- PHP = "PHP",
428
- PKR = "PKR",
429
- PLN = "PLN",
430
- PYG = "PYG",
431
- QAR = "QAR",
432
- RON = "RON",
433
- RSD = "RSD",
434
- RUB = "RUB",
435
- RWF = "RWF",
436
- SAR = "SAR",
437
- SBD = "SBD",
438
- SCR = "SCR",
439
- SDG = "SDG",
440
- SEK = "SEK",
441
- SGD = "SGD",
442
- SHP = "SHP",
443
- SLL = "SLL",
444
- SOS = "SOS",
445
- SRD = "SRD",
446
- SSP = "SSP",
447
- STN = "STN",
448
- SVC = "SVC",
449
- SYP = "SYP",
450
- SZL = "SZL",
451
- THB = "THB",
452
- TJS = "TJS",
453
- TMT = "TMT",
454
- TND = "TND",
455
- TOP = "TOP",
456
- TRY = "TRY",
457
- TTD = "TTD",
458
- TWD = "TWD",
459
- TZS = "TZS",
460
- UAH = "UAH",
461
- UGX = "UGX",
462
- USD = "USD",
463
- UYU = "UYU",
464
- UZS = "UZS",
465
- VES = "VES",
466
- VND = "VND",
467
- VUV = "VUV",
468
- WST = "WST",
469
- XAF = "XAF",
470
- XCD = "XCD",
471
- XOF = "XOF",
472
- XPF = "XPF",
473
- YER = "YER",
474
- ZAR = "ZAR",
475
- ZMW = "ZMW",
476
- ZWL = "ZWL"
477
- }
329
+ export declare const CurrencyCode: {
330
+ readonly AED: "AED";
331
+ readonly AFN: "AFN";
332
+ readonly ALL: "ALL";
333
+ readonly AMD: "AMD";
334
+ readonly ANG: "ANG";
335
+ readonly AOA: "AOA";
336
+ readonly ARS: "ARS";
337
+ readonly AUD: "AUD";
338
+ readonly AWG: "AWG";
339
+ readonly AZN: "AZN";
340
+ readonly BAM: "BAM";
341
+ readonly BBD: "BBD";
342
+ readonly BDT: "BDT";
343
+ readonly BGN: "BGN";
344
+ readonly BHD: "BHD";
345
+ readonly BIF: "BIF";
346
+ readonly BMD: "BMD";
347
+ readonly BND: "BND";
348
+ readonly BOB: "BOB";
349
+ readonly BRL: "BRL";
350
+ readonly BSD: "BSD";
351
+ readonly BTN: "BTN";
352
+ readonly BWP: "BWP";
353
+ readonly BYN: "BYN";
354
+ readonly BZD: "BZD";
355
+ readonly CAD: "CAD";
356
+ readonly CDF: "CDF";
357
+ readonly CHF: "CHF";
358
+ readonly CLP: "CLP";
359
+ readonly CNY: "CNY";
360
+ readonly COP: "COP";
361
+ readonly CRC: "CRC";
362
+ readonly CUC: "CUC";
363
+ readonly CUP: "CUP";
364
+ readonly CVE: "CVE";
365
+ readonly CZK: "CZK";
366
+ readonly DJF: "DJF";
367
+ readonly DKK: "DKK";
368
+ readonly DOP: "DOP";
369
+ readonly DZD: "DZD";
370
+ readonly EGP: "EGP";
371
+ readonly ERN: "ERN";
372
+ readonly ETB: "ETB";
373
+ readonly EUR: "EUR";
374
+ readonly FJD: "FJD";
375
+ readonly FKP: "FKP";
376
+ readonly GBP: "GBP";
377
+ readonly GEL: "GEL";
378
+ readonly GHS: "GHS";
379
+ readonly GIP: "GIP";
380
+ readonly GMD: "GMD";
381
+ readonly GNF: "GNF";
382
+ readonly GTQ: "GTQ";
383
+ readonly GYD: "GYD";
384
+ readonly HKD: "HKD";
385
+ readonly HNL: "HNL";
386
+ readonly HRK: "HRK";
387
+ readonly HTG: "HTG";
388
+ readonly HUF: "HUF";
389
+ readonly IDR: "IDR";
390
+ readonly ILS: "ILS";
391
+ readonly INR: "INR";
392
+ readonly IQD: "IQD";
393
+ readonly IRR: "IRR";
394
+ readonly ISK: "ISK";
395
+ readonly JMD: "JMD";
396
+ readonly JOD: "JOD";
397
+ readonly JPY: "JPY";
398
+ readonly KES: "KES";
399
+ readonly KGS: "KGS";
400
+ readonly KHR: "KHR";
401
+ readonly KMF: "KMF";
402
+ readonly KPW: "KPW";
403
+ readonly KRW: "KRW";
404
+ readonly KWD: "KWD";
405
+ readonly KYD: "KYD";
406
+ readonly KZT: "KZT";
407
+ readonly LAK: "LAK";
408
+ readonly LBP: "LBP";
409
+ readonly LKR: "LKR";
410
+ readonly LRD: "LRD";
411
+ readonly LSL: "LSL";
412
+ readonly LYD: "LYD";
413
+ readonly MAD: "MAD";
414
+ readonly MDL: "MDL";
415
+ readonly MGA: "MGA";
416
+ readonly MKD: "MKD";
417
+ readonly MMK: "MMK";
418
+ readonly MNT: "MNT";
419
+ readonly MOP: "MOP";
420
+ readonly MRU: "MRU";
421
+ readonly MUR: "MUR";
422
+ readonly MVR: "MVR";
423
+ readonly MWK: "MWK";
424
+ readonly MXN: "MXN";
425
+ readonly MYR: "MYR";
426
+ readonly MZN: "MZN";
427
+ readonly NAD: "NAD";
428
+ readonly NGN: "NGN";
429
+ readonly NIO: "NIO";
430
+ readonly NOK: "NOK";
431
+ readonly NPR: "NPR";
432
+ readonly NZD: "NZD";
433
+ readonly OMR: "OMR";
434
+ readonly PAB: "PAB";
435
+ readonly PEN: "PEN";
436
+ readonly PGK: "PGK";
437
+ readonly PHP: "PHP";
438
+ readonly PKR: "PKR";
439
+ readonly PLN: "PLN";
440
+ readonly PYG: "PYG";
441
+ readonly QAR: "QAR";
442
+ readonly RON: "RON";
443
+ readonly RSD: "RSD";
444
+ readonly RUB: "RUB";
445
+ readonly RWF: "RWF";
446
+ readonly SAR: "SAR";
447
+ readonly SBD: "SBD";
448
+ readonly SCR: "SCR";
449
+ readonly SDG: "SDG";
450
+ readonly SEK: "SEK";
451
+ readonly SGD: "SGD";
452
+ readonly SHP: "SHP";
453
+ readonly SLL: "SLL";
454
+ readonly SOS: "SOS";
455
+ readonly SRD: "SRD";
456
+ readonly SSP: "SSP";
457
+ readonly STN: "STN";
458
+ readonly SVC: "SVC";
459
+ readonly SYP: "SYP";
460
+ readonly SZL: "SZL";
461
+ readonly THB: "THB";
462
+ readonly TJS: "TJS";
463
+ readonly TMT: "TMT";
464
+ readonly TND: "TND";
465
+ readonly TOP: "TOP";
466
+ readonly TRY: "TRY";
467
+ readonly TTD: "TTD";
468
+ readonly TWD: "TWD";
469
+ readonly TZS: "TZS";
470
+ readonly UAH: "UAH";
471
+ readonly UGX: "UGX";
472
+ readonly USD: "USD";
473
+ readonly UYU: "UYU";
474
+ readonly UZS: "UZS";
475
+ readonly VES: "VES";
476
+ readonly VND: "VND";
477
+ readonly VUV: "VUV";
478
+ readonly WST: "WST";
479
+ readonly XAF: "XAF";
480
+ readonly XCD: "XCD";
481
+ readonly XOF: "XOF";
482
+ readonly XPF: "XPF";
483
+ readonly YER: "YER";
484
+ readonly ZAR: "ZAR";
485
+ readonly ZMW: "ZMW";
486
+ readonly ZWL: "ZWL";
487
+ };
488
+ export type CurrencyCode = typeof CurrencyCode[keyof typeof CurrencyCode];