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.
- package/DATA.md +212 -3
- package/LICENSE +1 -1
- package/NOTICE +14 -0
- package/README.md +426 -207
- package/dist/address.cjs +5 -4
- package/dist/address.js +3 -2
- package/dist/bills.cjs +19 -0
- package/dist/bills.d.cts +63 -0
- package/dist/bills.d.ts +63 -0
- package/dist/bills.js +2 -0
- package/dist/{chunk-OKMBYX3F.cjs → chunk-33GOK7EE.cjs} +2 -910
- package/dist/chunk-34U2ZMHR.js +194 -0
- package/dist/chunk-4GSBHJX6.js +165 -0
- package/dist/chunk-5DDHO5Z7.cjs +565 -0
- package/dist/chunk-5EY5DQS7.js +51 -0
- package/dist/chunk-5RGX4DWF.js +559 -0
- package/dist/chunk-5UCRHVI4.cjs +302 -0
- package/dist/{chunk-TQP2T33V.js → chunk-B7DOQ5QF.js} +2 -1
- package/dist/chunk-CF6AMRBU.cjs +198 -0
- package/dist/chunk-CZOZB4K3.js +61 -0
- package/dist/chunk-E2XU6NOW.js +909 -0
- package/dist/chunk-E6GWBOKV.cjs +911 -0
- package/dist/chunk-EA3SIHYT.js +313 -0
- package/dist/{chunk-YTSMFGTW.js → chunk-IDTRFOQW.js} +8 -3
- package/dist/chunk-OTI7HY55.js +297 -0
- package/dist/{chunk-J5ARB4TE.cjs → chunk-QFPEFD67.cjs} +5 -4
- package/dist/chunk-SF4ECUZ6.cjs +56 -0
- package/dist/chunk-UYFTXD4P.js +168 -0
- package/dist/{chunk-TBTWZC74.cjs → chunk-XCFZKCV2.cjs} +8 -3
- package/dist/{chunk-N4S22XX3.js → chunk-XOTCIXY6.js} +2 -909
- package/dist/chunk-XVEG53NN.cjs +322 -0
- package/dist/chunk-YDUXIENX.cjs +172 -0
- package/dist/chunk-YPAWNWFD.cjs +168 -0
- package/dist/chunk-YQFI7W3I.cjs +65 -0
- package/dist/class-validator.cjs +16 -8
- package/dist/class-validator.d.cts +7 -1
- package/dist/class-validator.d.ts +7 -1
- package/dist/class-validator.js +15 -8
- package/dist/cli.js +1 -1
- package/dist/courier.cjs +16 -0
- package/dist/courier.d.cts +51 -0
- package/dist/courier.d.ts +51 -0
- package/dist/courier.js +3 -0
- package/dist/fbr-invoice.cjs +25 -0
- package/dist/fbr-invoice.d.cts +170 -0
- package/dist/fbr-invoice.d.ts +170 -0
- package/dist/fbr-invoice.js +4 -0
- package/dist/geo.cjs +11 -10
- package/dist/geo.js +2 -1
- package/dist/incometax.cjs +27 -0
- package/dist/incometax.d.cts +91 -0
- package/dist/incometax.d.ts +91 -0
- package/dist/incometax.js +2 -0
- package/dist/index.cjs +227 -123
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +21 -13
- package/dist/input.cjs +8 -8
- package/dist/input.js +2 -2
- package/dist/joi.cjs +14 -8
- package/dist/joi.d.cts +1 -0
- package/dist/joi.d.ts +1 -0
- package/dist/joi.js +13 -7
- package/dist/quality.cjs +25 -0
- package/dist/quality.d.cts +62 -0
- package/dist/quality.d.ts +62 -0
- package/dist/quality.js +8 -0
- package/dist/salestax.cjs +20 -0
- package/dist/salestax.d.cts +106 -0
- package/dist/salestax.d.ts +106 -0
- package/dist/salestax.js +3 -0
- package/dist/superstruct.cjs +14 -8
- package/dist/superstruct.d.cts +1 -0
- package/dist/superstruct.d.ts +1 -0
- package/dist/superstruct.js +13 -7
- package/dist/text.cjs +21 -5
- package/dist/text.d.cts +90 -1
- package/dist/text.d.ts +90 -1
- package/dist/text.js +1 -1
- package/dist/valibot.cjs +14 -8
- package/dist/valibot.d.cts +1 -0
- package/dist/valibot.d.ts +1 -0
- package/dist/valibot.js +13 -7
- package/dist/yup.cjs +14 -8
- package/dist/yup.d.cts +1 -0
- package/dist/yup.d.ts +1 -0
- package/dist/yup.js +13 -7
- package/dist/zod.cjs +14 -8
- package/dist/zod.d.cts +1 -0
- package/dist/zod.d.ts +1 -0
- package/dist/zod.js +13 -7
- package/package.json +74 -11
- package/dist/chunk-JKE4AMSZ.js +0 -47
- package/dist/chunk-KEHCTYLO.cjs +0 -52
- package/dist/{chunk-A3HBEBXY.js → chunk-7DY26QPN.js} +1 -1
- 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
|
|
3
|
+
var chunkQFPEFD67_cjs = require('./chunk-QFPEFD67.cjs');
|
|
4
4
|
require('./chunk-I7UUPD3G.cjs');
|
|
5
|
-
require('./chunk-
|
|
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
|
|
13
|
+
get: function () { return chunkQFPEFD67_cjs.formatAddress; }
|
|
13
14
|
});
|
|
14
15
|
Object.defineProperty(exports, "parseAddress", {
|
|
15
16
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkQFPEFD67_cjs.parseAddress; }
|
|
17
18
|
});
|
package/dist/address.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { formatAddress, parseAddress } from './chunk-
|
|
1
|
+
export { formatAddress, parseAddress } from './chunk-B7DOQ5QF.js';
|
|
2
2
|
import './chunk-33QMFE2Z.js';
|
|
3
|
-
import './chunk-
|
|
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
|
+
});
|
package/dist/bills.d.cts
ADDED
|
@@ -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.d.ts
ADDED
|
@@ -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