pakdatakit 2.3.0 → 2.5.1

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 (96) hide show
  1. package/DATA.md +212 -3
  2. package/LICENSE +1 -1
  3. package/NOTICE +14 -0
  4. package/README.md +426 -207
  5. package/dist/address.cjs +5 -4
  6. package/dist/address.js +3 -2
  7. package/dist/bills.cjs +19 -0
  8. package/dist/bills.d.cts +63 -0
  9. package/dist/bills.d.ts +63 -0
  10. package/dist/bills.js +2 -0
  11. package/dist/{chunk-OKMBYX3F.cjs → chunk-33GOK7EE.cjs} +2 -910
  12. package/dist/chunk-34U2ZMHR.js +194 -0
  13. package/dist/chunk-4GSBHJX6.js +165 -0
  14. package/dist/chunk-5DDHO5Z7.cjs +565 -0
  15. package/dist/chunk-5EY5DQS7.js +51 -0
  16. package/dist/chunk-5RGX4DWF.js +559 -0
  17. package/dist/chunk-5UCRHVI4.cjs +302 -0
  18. package/dist/{chunk-TQP2T33V.js → chunk-B7DOQ5QF.js} +2 -1
  19. package/dist/chunk-CF6AMRBU.cjs +198 -0
  20. package/dist/chunk-CZOZB4K3.js +61 -0
  21. package/dist/chunk-E2XU6NOW.js +909 -0
  22. package/dist/chunk-E6GWBOKV.cjs +911 -0
  23. package/dist/chunk-EA3SIHYT.js +313 -0
  24. package/dist/{chunk-YTSMFGTW.js → chunk-IDTRFOQW.js} +8 -3
  25. package/dist/chunk-OTI7HY55.js +297 -0
  26. package/dist/{chunk-J5ARB4TE.cjs → chunk-QFPEFD67.cjs} +5 -4
  27. package/dist/chunk-SF4ECUZ6.cjs +56 -0
  28. package/dist/chunk-UYFTXD4P.js +168 -0
  29. package/dist/{chunk-TBTWZC74.cjs → chunk-XCFZKCV2.cjs} +8 -3
  30. package/dist/{chunk-N4S22XX3.js → chunk-XOTCIXY6.js} +2 -909
  31. package/dist/chunk-XVEG53NN.cjs +322 -0
  32. package/dist/chunk-YDUXIENX.cjs +172 -0
  33. package/dist/chunk-YPAWNWFD.cjs +168 -0
  34. package/dist/chunk-YQFI7W3I.cjs +65 -0
  35. package/dist/class-validator.cjs +16 -8
  36. package/dist/class-validator.d.cts +7 -1
  37. package/dist/class-validator.d.ts +7 -1
  38. package/dist/class-validator.js +15 -8
  39. package/dist/cli.js +1 -1
  40. package/dist/courier.cjs +16 -0
  41. package/dist/courier.d.cts +51 -0
  42. package/dist/courier.d.ts +51 -0
  43. package/dist/courier.js +3 -0
  44. package/dist/fbr-invoice.cjs +25 -0
  45. package/dist/fbr-invoice.d.cts +170 -0
  46. package/dist/fbr-invoice.d.ts +170 -0
  47. package/dist/fbr-invoice.js +4 -0
  48. package/dist/geo.cjs +11 -10
  49. package/dist/geo.js +2 -1
  50. package/dist/incometax.cjs +27 -0
  51. package/dist/incometax.d.cts +91 -0
  52. package/dist/incometax.d.ts +91 -0
  53. package/dist/incometax.js +2 -0
  54. package/dist/index.cjs +227 -123
  55. package/dist/index.d.cts +8 -2
  56. package/dist/index.d.ts +8 -2
  57. package/dist/index.js +21 -13
  58. package/dist/input.cjs +8 -8
  59. package/dist/input.js +2 -2
  60. package/dist/joi.cjs +14 -8
  61. package/dist/joi.d.cts +1 -0
  62. package/dist/joi.d.ts +1 -0
  63. package/dist/joi.js +13 -7
  64. package/dist/quality.cjs +25 -0
  65. package/dist/quality.d.cts +62 -0
  66. package/dist/quality.d.ts +62 -0
  67. package/dist/quality.js +8 -0
  68. package/dist/salestax.cjs +20 -0
  69. package/dist/salestax.d.cts +106 -0
  70. package/dist/salestax.d.ts +106 -0
  71. package/dist/salestax.js +3 -0
  72. package/dist/superstruct.cjs +14 -8
  73. package/dist/superstruct.d.cts +1 -0
  74. package/dist/superstruct.d.ts +1 -0
  75. package/dist/superstruct.js +13 -7
  76. package/dist/text.cjs +21 -5
  77. package/dist/text.d.cts +90 -1
  78. package/dist/text.d.ts +90 -1
  79. package/dist/text.js +1 -1
  80. package/dist/valibot.cjs +14 -8
  81. package/dist/valibot.d.cts +1 -0
  82. package/dist/valibot.d.ts +1 -0
  83. package/dist/valibot.js +13 -7
  84. package/dist/yup.cjs +14 -8
  85. package/dist/yup.d.cts +1 -0
  86. package/dist/yup.d.ts +1 -0
  87. package/dist/yup.js +13 -7
  88. package/dist/zod.cjs +14 -8
  89. package/dist/zod.d.cts +1 -0
  90. package/dist/zod.d.ts +1 -0
  91. package/dist/zod.js +13 -7
  92. package/package.json +74 -11
  93. package/dist/chunk-JKE4AMSZ.js +0 -47
  94. package/dist/chunk-KEHCTYLO.cjs +0 -52
  95. package/dist/{chunk-A3HBEBXY.js → chunk-7DY26QPN.js} +1 -1
  96. package/dist/{chunk-FRBPAGEJ.cjs → chunk-TVL6RDAU.cjs} +1 -1
package/dist/address.cjs CHANGED
@@ -1,17 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkJ5ARB4TE_cjs = require('./chunk-J5ARB4TE.cjs');
3
+ var chunkQFPEFD67_cjs = require('./chunk-QFPEFD67.cjs');
4
4
  require('./chunk-I7UUPD3G.cjs');
5
- require('./chunk-OKMBYX3F.cjs');
5
+ require('./chunk-33GOK7EE.cjs');
6
+ require('./chunk-E6GWBOKV.cjs');
6
7
  require('./chunk-VPBMIYO2.cjs');
7
8
 
8
9
 
9
10
 
10
11
  Object.defineProperty(exports, "formatAddress", {
11
12
  enumerable: true,
12
- get: function () { return chunkJ5ARB4TE_cjs.formatAddress; }
13
+ get: function () { return chunkQFPEFD67_cjs.formatAddress; }
13
14
  });
14
15
  Object.defineProperty(exports, "parseAddress", {
15
16
  enumerable: true,
16
- get: function () { return chunkJ5ARB4TE_cjs.parseAddress; }
17
+ get: function () { return chunkQFPEFD67_cjs.parseAddress; }
17
18
  });
package/dist/address.js CHANGED
@@ -1,4 +1,5 @@
1
- export { formatAddress, parseAddress } from './chunk-TQP2T33V.js';
1
+ export { formatAddress, parseAddress } from './chunk-B7DOQ5QF.js';
2
2
  import './chunk-33QMFE2Z.js';
3
- import './chunk-N4S22XX3.js';
3
+ import './chunk-XOTCIXY6.js';
4
+ import './chunk-E2XU6NOW.js';
4
5
  import './chunk-ENQ7O7VW.js';
package/dist/bills.cjs ADDED
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var chunkYQFI7W3I_cjs = require('./chunk-YQFI7W3I.cjs');
4
+ require('./chunk-VPBMIYO2.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "parseElectricityRef", {
9
+ enumerable: true,
10
+ get: function () { return chunkYQFI7W3I_cjs.parseElectricityRef; }
11
+ });
12
+ Object.defineProperty(exports, "validateElectricityRef", {
13
+ enumerable: true,
14
+ get: function () { return chunkYQFI7W3I_cjs.validateElectricityRef; }
15
+ });
16
+ Object.defineProperty(exports, "validateGasConsumerNumber", {
17
+ enumerable: true,
18
+ get: function () { return chunkYQFI7W3I_cjs.validateGasConsumerNumber; }
19
+ });
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Kind of electricity bill identifier.
3
+ *
4
+ * - `reference`: the 14-digit reference number on a DISCO (WAPDA) bill,
5
+ * optionally followed by `U` (urban) or `R` (rural).
6
+ * - `customer-id`: the customer ID on a DISCO bill: 10 digits, or 11 for
7
+ * LESCO.
8
+ * - `k-electric`: a 13-digit K-Electric account number (`04000…`).
9
+ */
10
+ type ElectricityRefType = 'reference' | 'customer-id' | 'k-electric';
11
+ /** Result of {@link parseElectricityRef}. */
12
+ interface ElectricityRef {
13
+ type: ElectricityRefType;
14
+ /** The digits, without separators or the U/R letter. */
15
+ digits: string;
16
+ /**
17
+ * Display form: `01 14111 1234567 U` for a reference (2, 5 and 7 digits,
18
+ * as on PITC's bill illustration), the digits for the others.
19
+ */
20
+ formatted: string;
21
+ /** `U` or `R` when given after a reference number, otherwise `null`. */
22
+ urbanRural: 'U' | 'R' | null;
23
+ /**
24
+ * The distribution company. `K-Electric` for a K-Electric account;
25
+ * otherwise always `null`, because no official source maps reference or
26
+ * customer ID digits to a DISCO.
27
+ */
28
+ disco: 'K-Electric' | null;
29
+ }
30
+ /**
31
+ * Parses a Pakistani electricity bill identifier: a DISCO reference number,
32
+ * a DISCO customer ID or a K-Electric account number.
33
+ *
34
+ * Formats are those the utilities' own bill pages ask for (retrieved
35
+ * 2026-11-18; see DATA.md): PITC's bill pages take a 14-digit reference
36
+ * number with a separate U/R choice, or a 10-digit customer ID (11 digits
37
+ * for LESCO); K-Electric asks for a "13 digits KE Account Number starting
38
+ * from 04000". No check digit is published, so only the format is checked.
39
+ *
40
+ * Spaces, dashes and dots are ignored, and Urdu digits are accepted.
41
+ *
42
+ * @returns The identifier, or `null` if it matches none of the formats.
43
+ * Never throws.
44
+ */
45
+ declare function parseElectricityRef(input: string): ElectricityRef | null;
46
+ /**
47
+ * Validates a Pakistani electricity bill identifier. See
48
+ * {@link parseElectricityRef}.
49
+ */
50
+ declare function validateElectricityRef(input: string): boolean;
51
+ /** A gas company whose consumer number format is published. */
52
+ type GasCompany = 'SNGPL' | 'SSGC';
53
+ /**
54
+ * Validates a gas bill consumer number: 11 digits for SNGPL, 10 digits for
55
+ * SSGC, as their bill pages ask for (retrieved 2026-11-18; see DATA.md). No
56
+ * check digit is published, so only the format is checked.
57
+ *
58
+ * @param company - `SNGPL` or `SSGC`; anything else returns `false`
59
+ */
60
+ declare function validateGasConsumerNumber(input: string, company: GasCompany): boolean;
61
+
62
+ export { parseElectricityRef, validateElectricityRef, validateGasConsumerNumber };
63
+ export type { ElectricityRef, ElectricityRefType, GasCompany };
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Kind of electricity bill identifier.
3
+ *
4
+ * - `reference`: the 14-digit reference number on a DISCO (WAPDA) bill,
5
+ * optionally followed by `U` (urban) or `R` (rural).
6
+ * - `customer-id`: the customer ID on a DISCO bill: 10 digits, or 11 for
7
+ * LESCO.
8
+ * - `k-electric`: a 13-digit K-Electric account number (`04000…`).
9
+ */
10
+ type ElectricityRefType = 'reference' | 'customer-id' | 'k-electric';
11
+ /** Result of {@link parseElectricityRef}. */
12
+ interface ElectricityRef {
13
+ type: ElectricityRefType;
14
+ /** The digits, without separators or the U/R letter. */
15
+ digits: string;
16
+ /**
17
+ * Display form: `01 14111 1234567 U` for a reference (2, 5 and 7 digits,
18
+ * as on PITC's bill illustration), the digits for the others.
19
+ */
20
+ formatted: string;
21
+ /** `U` or `R` when given after a reference number, otherwise `null`. */
22
+ urbanRural: 'U' | 'R' | null;
23
+ /**
24
+ * The distribution company. `K-Electric` for a K-Electric account;
25
+ * otherwise always `null`, because no official source maps reference or
26
+ * customer ID digits to a DISCO.
27
+ */
28
+ disco: 'K-Electric' | null;
29
+ }
30
+ /**
31
+ * Parses a Pakistani electricity bill identifier: a DISCO reference number,
32
+ * a DISCO customer ID or a K-Electric account number.
33
+ *
34
+ * Formats are those the utilities' own bill pages ask for (retrieved
35
+ * 2026-11-18; see DATA.md): PITC's bill pages take a 14-digit reference
36
+ * number with a separate U/R choice, or a 10-digit customer ID (11 digits
37
+ * for LESCO); K-Electric asks for a "13 digits KE Account Number starting
38
+ * from 04000". No check digit is published, so only the format is checked.
39
+ *
40
+ * Spaces, dashes and dots are ignored, and Urdu digits are accepted.
41
+ *
42
+ * @returns The identifier, or `null` if it matches none of the formats.
43
+ * Never throws.
44
+ */
45
+ declare function parseElectricityRef(input: string): ElectricityRef | null;
46
+ /**
47
+ * Validates a Pakistani electricity bill identifier. See
48
+ * {@link parseElectricityRef}.
49
+ */
50
+ declare function validateElectricityRef(input: string): boolean;
51
+ /** A gas company whose consumer number format is published. */
52
+ type GasCompany = 'SNGPL' | 'SSGC';
53
+ /**
54
+ * Validates a gas bill consumer number: 11 digits for SNGPL, 10 digits for
55
+ * SSGC, as their bill pages ask for (retrieved 2026-11-18; see DATA.md). No
56
+ * check digit is published, so only the format is checked.
57
+ *
58
+ * @param company - `SNGPL` or `SSGC`; anything else returns `false`
59
+ */
60
+ declare function validateGasConsumerNumber(input: string, company: GasCompany): boolean;
61
+
62
+ export { parseElectricityRef, validateElectricityRef, validateGasConsumerNumber };
63
+ export type { ElectricityRef, ElectricityRefType, GasCompany };
package/dist/bills.js ADDED
@@ -0,0 +1,2 @@
1
+ export { parseElectricityRef, validateElectricityRef, validateGasConsumerNumber } from './chunk-CZOZB4K3.js';
2
+ import './chunk-ENQ7O7VW.js';