pakdatakit 2.1.1 → 2.2.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/DATA.md +104 -0
- package/README.md +93 -6
- package/dist/address.cjs +4 -4
- package/dist/address.js +2 -2
- package/dist/{chunk-PHHKIMO2.cjs → chunk-33FXHM2E.cjs} +5 -5
- package/dist/chunk-3IARSCO6.cjs +317 -0
- package/dist/{chunk-BSS4Z7NI.cjs → chunk-3ZA265SK.cjs} +2 -2
- package/dist/{chunk-43ULDYUP.cjs → chunk-4VSGCQ6K.cjs} +107 -11
- package/dist/{chunk-Y6BUGLXU.js → chunk-6IPPANNX.js} +4 -1
- package/dist/{chunk-L45UXUWX.js → chunk-AZV45DMG.js} +1 -1
- package/dist/{chunk-QQQKISXT.js → chunk-BR4QLZPX.js} +11 -2
- package/dist/{chunk-AUATLZA5.cjs → chunk-CLL6VDPO.cjs} +4 -4
- package/dist/{chunk-P4CGOJEM.js → chunk-EMH4IP2U.js} +1 -1
- package/dist/{chunk-JNP27XW2.cjs → chunk-GJENL6VK.cjs} +6 -6
- package/dist/{chunk-APXP7OK7.cjs → chunk-HIZQBWNW.cjs} +11 -2
- package/dist/{chunk-YS7MOLK2.cjs → chunk-HTERSQGF.cjs} +3 -3
- package/dist/{chunk-E7GAK72W.js → chunk-HUQY2WR5.js} +3 -3
- package/dist/{chunk-L2BDDM2W.js → chunk-I664KOWP.js} +1 -1
- package/dist/{chunk-K6CZFCX6.js → chunk-J272OMDL.js} +51 -6
- package/dist/{chunk-KQKW2ZEK.cjs → chunk-NAJGGUAM.cjs} +2 -2
- package/dist/{chunk-YLWZGSFY.cjs → chunk-NTD4JLDW.cjs} +4 -0
- package/dist/{chunk-44YRK7WO.js → chunk-NZQ47NWD.js} +105 -10
- package/dist/{chunk-432ZYMYV.js → chunk-PLDVGOKZ.js} +2 -2
- package/dist/{chunk-T3E4B5MJ.js → chunk-RXNYY5K5.js} +1 -1
- package/dist/{chunk-3COX5FSL.cjs → chunk-SBS2GHM3.cjs} +51 -6
- package/dist/chunk-TTARJWGT.js +82 -0
- package/dist/chunk-U7MWHXMF.cjs +89 -0
- package/dist/chunk-YPPKY5XZ.js +312 -0
- package/dist/cli.js +1 -1
- package/dist/geo.cjs +6 -6
- package/dist/geo.js +1 -1
- package/dist/holidays.d.cts +2 -1
- package/dist/holidays.d.ts +2 -1
- package/dist/iban.cjs +11 -3
- package/dist/iban.d.cts +45 -1
- package/dist/iban.d.ts +45 -1
- package/dist/iban.js +1 -1
- package/dist/index.cjs +76 -37
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +16 -10
- package/dist/input.cjs +34 -0
- package/dist/input.d.cts +67 -0
- package/dist/input.d.ts +67 -0
- package/dist/input.js +5 -0
- package/dist/networks.cjs +3 -3
- package/dist/networks.js +2 -2
- package/dist/numbers.cjs +6 -6
- package/dist/numbers.js +2 -2
- package/dist/phone.cjs +8 -8
- package/dist/phone.js +3 -3
- package/dist/raast.cjs +9 -5
- package/dist/raast.d.cts +68 -5
- package/dist/raast.d.ts +68 -5
- package/dist/raast.js +2 -2
- package/dist/valibot.cjs +7 -7
- package/dist/valibot.js +6 -6
- package/dist/whatsapp.cjs +3 -3
- package/dist/whatsapp.js +2 -2
- package/dist/words.cjs +3 -3
- package/dist/words.js +1 -1
- package/dist/yup.cjs +7 -7
- package/dist/yup.js +6 -6
- package/dist/zod.cjs +7 -7
- package/dist/zod.js +6 -6
- package/package.json +16 -3
- package/dist/chunk-4EUKCSLW.js +0 -221
- package/dist/chunk-E47SNBWQ.cjs +0 -224
package/dist/raast.d.cts
CHANGED
|
@@ -10,6 +10,8 @@ interface EmvField {
|
|
|
10
10
|
children?: EmvField[];
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/** A duration such as `'30m'`, `'12h'` or `'7d'` (minutes, hours or days). */
|
|
14
|
+
type RaastDuration = `${number}${'m' | 'h' | 'd'}`;
|
|
13
15
|
/** Options for {@link createRaastP2PQr}. */
|
|
14
16
|
interface RaastP2PQrOptions {
|
|
15
17
|
/** Payee's Pakistani IBAN. */
|
|
@@ -19,8 +21,22 @@ interface RaastP2PQrOptions {
|
|
|
19
21
|
* `'30'` is the value listed for Raast in SBP's QR standard.
|
|
20
22
|
*/
|
|
21
23
|
scheme?: '00' | '30';
|
|
22
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Amount in PKR. When set, the QR is dynamic (point of initiation 12) and
|
|
26
|
+
* `expiresAt` is required: banking apps reject dynamic QR codes without an
|
|
27
|
+
* expiry, and ignore the amount in static ones.
|
|
28
|
+
*/
|
|
23
29
|
amount?: number;
|
|
30
|
+
/**
|
|
31
|
+
* When a QR with an amount stops working (tag 07). With `amount`, give this
|
|
32
|
+
* or `expiresIn`.
|
|
33
|
+
*/
|
|
34
|
+
expiresAt?: Date;
|
|
35
|
+
/**
|
|
36
|
+
* How long from now a QR with an amount works, instead of `expiresAt`:
|
|
37
|
+
* milliseconds, or a string such as `'30m'`, `'12h'` or `'7d'`.
|
|
38
|
+
*/
|
|
39
|
+
expiresIn?: number | RaastDuration;
|
|
24
40
|
/** Payee's bank name (up to 25 characters). */
|
|
25
41
|
bankName?: string;
|
|
26
42
|
/** Payment description (up to 30 characters). */
|
|
@@ -71,6 +87,8 @@ interface ParsedRaastQr {
|
|
|
71
87
|
/** Whether `iban` passes the IBAN checksum. */
|
|
72
88
|
ibanValid: boolean;
|
|
73
89
|
amount: number | null;
|
|
90
|
+
/** P2P: expiry of a dynamic QR as local `YYYY-MM-DDTHH:mm`. */
|
|
91
|
+
expiresAt: string | null;
|
|
74
92
|
/** P2P: bank name. */
|
|
75
93
|
bankName: string | null;
|
|
76
94
|
/** P2P: payment description. */
|
|
@@ -91,12 +109,18 @@ interface ParsedRaastQr {
|
|
|
91
109
|
* scanned by apps such as Easypaisa and JazzCash. Encode the string as a QR
|
|
92
110
|
* code with any QR library.
|
|
93
111
|
*
|
|
112
|
+
* A QR with an `amount` is dynamic and needs `expiresAt`; this layout
|
|
113
|
+
* (`01` = `12`, amount in tag 05, expiry in tag 07) matches dynamic QR codes
|
|
114
|
+
* from banking apps and scans in Easypaisa and JazzCash.
|
|
115
|
+
*
|
|
94
116
|
* @example
|
|
95
|
-
* createRaastP2PQr({ iban: 'PK36SCBL0000001123456702'
|
|
117
|
+
* createRaastP2PQr({ iban: 'PK36SCBL0000001123456702' });
|
|
118
|
+
* createRaastP2PQr({ iban: 'PK36SCBL0000001123456702', amount: 1500, expiresIn: '1d' });
|
|
96
119
|
*
|
|
97
|
-
* @param options - Payee IBAN and optional amount, bank name and description
|
|
120
|
+
* @param options - Payee IBAN and optional amount with expiry, bank name and description
|
|
98
121
|
* @returns QR payload string
|
|
99
|
-
* @throws {RangeError} If the IBAN is invalid
|
|
122
|
+
* @throws {RangeError} If the IBAN is invalid, a field is too long, or an
|
|
123
|
+
* amount is given without `expiresAt` or `expiresIn`
|
|
100
124
|
*/
|
|
101
125
|
declare function createRaastP2PQr(options: RaastP2PQrOptions): string;
|
|
102
126
|
/**
|
|
@@ -121,5 +145,44 @@ declare function createMerchantQr(options: MerchantQrOptions): string;
|
|
|
121
145
|
* @returns Parsed details, or `null` if the payload is not a well-formed Pakistani QR code
|
|
122
146
|
*/
|
|
123
147
|
declare function parseRaastQr(payload: string): ParsedRaastQr | null;
|
|
148
|
+
/** A problem that stops a Raast QR from working or makes it unsafe to pay. */
|
|
149
|
+
type RaastQrError = 'not-a-raast-qr' | 'bad-checksum' | 'no-iban' | 'invalid-iban' | 'expired' | 'missing-expiry';
|
|
150
|
+
/** Something worth telling the payer, but which does not stop payment. */
|
|
151
|
+
type RaastQrWarning = 'amount-ignored' | 'expires-soon';
|
|
152
|
+
/** Result of {@link validateRaastQr}. */
|
|
153
|
+
interface RaastQrValidation {
|
|
154
|
+
/** `true` when there are no errors. */
|
|
155
|
+
valid: boolean;
|
|
156
|
+
errors: RaastQrError[];
|
|
157
|
+
warnings: RaastQrWarning[];
|
|
158
|
+
/** The parsed QR, or `null` if it could not be read. */
|
|
159
|
+
qr: ParsedRaastQr | null;
|
|
160
|
+
}
|
|
161
|
+
/** Options for {@link validateRaastQr}. */
|
|
162
|
+
interface ValidateRaastQrOptions {
|
|
163
|
+
/** The time to check expiry against. Defaults to now. */
|
|
164
|
+
now?: Date;
|
|
165
|
+
/** Warn when a QR expires within this many milliseconds. Defaults to 1 hour. */
|
|
166
|
+
expiresSoonMs?: number;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Checks whether a Raast QR code can be paid, e.g. before showing a payment
|
|
170
|
+
* screen or to warn about a tampered sticker.
|
|
171
|
+
*
|
|
172
|
+
* Errors: not a Pakistani payment QR, checksum mismatch (damaged or edited),
|
|
173
|
+
* no IBAN or an IBAN that fails its checksum, expired, or a fixed-amount QR
|
|
174
|
+
* without the expiry that banking apps require.
|
|
175
|
+
* Warnings: an amount in a static QR (apps ignore it, so the payer must type
|
|
176
|
+
* it), or a QR that expires soon (within an hour by default).
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* validateRaastQr(scannedText);
|
|
180
|
+
* // { valid: false, errors: ['expired'], warnings: [], qr: { ... } }
|
|
181
|
+
*
|
|
182
|
+
* @param payload - Text decoded from the QR code
|
|
183
|
+
* @param options - Time to check against and the "expires soon" window
|
|
184
|
+
* @returns Validation result with the parsed QR
|
|
185
|
+
*/
|
|
186
|
+
declare function validateRaastQr(payload: string, options?: ValidateRaastQrOptions): RaastQrValidation;
|
|
124
187
|
|
|
125
|
-
export { type MerchantAccountInfo, type MerchantQrOptions, type ParsedRaastQr, type RaastP2PQrOptions, createMerchantQr, createRaastP2PQr, parseRaastQr };
|
|
188
|
+
export { type EmvField, type MerchantAccountInfo, type MerchantQrOptions, type ParsedRaastQr, type RaastDuration, type RaastP2PQrOptions, type RaastQrError, type RaastQrValidation, type RaastQrWarning, type ValidateRaastQrOptions, createMerchantQr, createRaastP2PQr, parseRaastQr, validateRaastQr };
|
package/dist/raast.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ interface EmvField {
|
|
|
10
10
|
children?: EmvField[];
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/** A duration such as `'30m'`, `'12h'` or `'7d'` (minutes, hours or days). */
|
|
14
|
+
type RaastDuration = `${number}${'m' | 'h' | 'd'}`;
|
|
13
15
|
/** Options for {@link createRaastP2PQr}. */
|
|
14
16
|
interface RaastP2PQrOptions {
|
|
15
17
|
/** Payee's Pakistani IBAN. */
|
|
@@ -19,8 +21,22 @@ interface RaastP2PQrOptions {
|
|
|
19
21
|
* `'30'` is the value listed for Raast in SBP's QR standard.
|
|
20
22
|
*/
|
|
21
23
|
scheme?: '00' | '30';
|
|
22
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Amount in PKR. When set, the QR is dynamic (point of initiation 12) and
|
|
26
|
+
* `expiresAt` is required: banking apps reject dynamic QR codes without an
|
|
27
|
+
* expiry, and ignore the amount in static ones.
|
|
28
|
+
*/
|
|
23
29
|
amount?: number;
|
|
30
|
+
/**
|
|
31
|
+
* When a QR with an amount stops working (tag 07). With `amount`, give this
|
|
32
|
+
* or `expiresIn`.
|
|
33
|
+
*/
|
|
34
|
+
expiresAt?: Date;
|
|
35
|
+
/**
|
|
36
|
+
* How long from now a QR with an amount works, instead of `expiresAt`:
|
|
37
|
+
* milliseconds, or a string such as `'30m'`, `'12h'` or `'7d'`.
|
|
38
|
+
*/
|
|
39
|
+
expiresIn?: number | RaastDuration;
|
|
24
40
|
/** Payee's bank name (up to 25 characters). */
|
|
25
41
|
bankName?: string;
|
|
26
42
|
/** Payment description (up to 30 characters). */
|
|
@@ -71,6 +87,8 @@ interface ParsedRaastQr {
|
|
|
71
87
|
/** Whether `iban` passes the IBAN checksum. */
|
|
72
88
|
ibanValid: boolean;
|
|
73
89
|
amount: number | null;
|
|
90
|
+
/** P2P: expiry of a dynamic QR as local `YYYY-MM-DDTHH:mm`. */
|
|
91
|
+
expiresAt: string | null;
|
|
74
92
|
/** P2P: bank name. */
|
|
75
93
|
bankName: string | null;
|
|
76
94
|
/** P2P: payment description. */
|
|
@@ -91,12 +109,18 @@ interface ParsedRaastQr {
|
|
|
91
109
|
* scanned by apps such as Easypaisa and JazzCash. Encode the string as a QR
|
|
92
110
|
* code with any QR library.
|
|
93
111
|
*
|
|
112
|
+
* A QR with an `amount` is dynamic and needs `expiresAt`; this layout
|
|
113
|
+
* (`01` = `12`, amount in tag 05, expiry in tag 07) matches dynamic QR codes
|
|
114
|
+
* from banking apps and scans in Easypaisa and JazzCash.
|
|
115
|
+
*
|
|
94
116
|
* @example
|
|
95
|
-
* createRaastP2PQr({ iban: 'PK36SCBL0000001123456702'
|
|
117
|
+
* createRaastP2PQr({ iban: 'PK36SCBL0000001123456702' });
|
|
118
|
+
* createRaastP2PQr({ iban: 'PK36SCBL0000001123456702', amount: 1500, expiresIn: '1d' });
|
|
96
119
|
*
|
|
97
|
-
* @param options - Payee IBAN and optional amount, bank name and description
|
|
120
|
+
* @param options - Payee IBAN and optional amount with expiry, bank name and description
|
|
98
121
|
* @returns QR payload string
|
|
99
|
-
* @throws {RangeError} If the IBAN is invalid
|
|
122
|
+
* @throws {RangeError} If the IBAN is invalid, a field is too long, or an
|
|
123
|
+
* amount is given without `expiresAt` or `expiresIn`
|
|
100
124
|
*/
|
|
101
125
|
declare function createRaastP2PQr(options: RaastP2PQrOptions): string;
|
|
102
126
|
/**
|
|
@@ -121,5 +145,44 @@ declare function createMerchantQr(options: MerchantQrOptions): string;
|
|
|
121
145
|
* @returns Parsed details, or `null` if the payload is not a well-formed Pakistani QR code
|
|
122
146
|
*/
|
|
123
147
|
declare function parseRaastQr(payload: string): ParsedRaastQr | null;
|
|
148
|
+
/** A problem that stops a Raast QR from working or makes it unsafe to pay. */
|
|
149
|
+
type RaastQrError = 'not-a-raast-qr' | 'bad-checksum' | 'no-iban' | 'invalid-iban' | 'expired' | 'missing-expiry';
|
|
150
|
+
/** Something worth telling the payer, but which does not stop payment. */
|
|
151
|
+
type RaastQrWarning = 'amount-ignored' | 'expires-soon';
|
|
152
|
+
/** Result of {@link validateRaastQr}. */
|
|
153
|
+
interface RaastQrValidation {
|
|
154
|
+
/** `true` when there are no errors. */
|
|
155
|
+
valid: boolean;
|
|
156
|
+
errors: RaastQrError[];
|
|
157
|
+
warnings: RaastQrWarning[];
|
|
158
|
+
/** The parsed QR, or `null` if it could not be read. */
|
|
159
|
+
qr: ParsedRaastQr | null;
|
|
160
|
+
}
|
|
161
|
+
/** Options for {@link validateRaastQr}. */
|
|
162
|
+
interface ValidateRaastQrOptions {
|
|
163
|
+
/** The time to check expiry against. Defaults to now. */
|
|
164
|
+
now?: Date;
|
|
165
|
+
/** Warn when a QR expires within this many milliseconds. Defaults to 1 hour. */
|
|
166
|
+
expiresSoonMs?: number;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Checks whether a Raast QR code can be paid, e.g. before showing a payment
|
|
170
|
+
* screen or to warn about a tampered sticker.
|
|
171
|
+
*
|
|
172
|
+
* Errors: not a Pakistani payment QR, checksum mismatch (damaged or edited),
|
|
173
|
+
* no IBAN or an IBAN that fails its checksum, expired, or a fixed-amount QR
|
|
174
|
+
* without the expiry that banking apps require.
|
|
175
|
+
* Warnings: an amount in a static QR (apps ignore it, so the payer must type
|
|
176
|
+
* it), or a QR that expires soon (within an hour by default).
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* validateRaastQr(scannedText);
|
|
180
|
+
* // { valid: false, errors: ['expired'], warnings: [], qr: { ... } }
|
|
181
|
+
*
|
|
182
|
+
* @param payload - Text decoded from the QR code
|
|
183
|
+
* @param options - Time to check against and the "expires soon" window
|
|
184
|
+
* @returns Validation result with the parsed QR
|
|
185
|
+
*/
|
|
186
|
+
declare function validateRaastQr(payload: string, options?: ValidateRaastQrOptions): RaastQrValidation;
|
|
124
187
|
|
|
125
|
-
export { type MerchantAccountInfo, type MerchantQrOptions, type ParsedRaastQr, type RaastP2PQrOptions, createMerchantQr, createRaastP2PQr, parseRaastQr };
|
|
188
|
+
export { type EmvField, type MerchantAccountInfo, type MerchantQrOptions, type ParsedRaastQr, type RaastDuration, type RaastP2PQrOptions, type RaastQrError, type RaastQrValidation, type RaastQrWarning, type ValidateRaastQrOptions, createMerchantQr, createRaastP2PQr, parseRaastQr, validateRaastQr };
|
package/dist/raast.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createMerchantQr, createRaastP2PQr, parseRaastQr } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { createMerchantQr, createRaastP2PQr, parseRaastQr, validateRaastQr } from './chunk-NZQ47NWD.js';
|
|
2
|
+
import './chunk-YPPKY5XZ.js';
|
|
3
3
|
import './chunk-ENQ7O7VW.js';
|
package/dist/valibot.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunkGJENL6VK_cjs = require('./chunk-GJENL6VK.cjs');
|
|
4
|
+
require('./chunk-3ZA265SK.cjs');
|
|
5
|
+
require('./chunk-33FXHM2E.cjs');
|
|
6
|
+
require('./chunk-HTERSQGF.cjs');
|
|
7
|
+
require('./chunk-NTD4JLDW.cjs');
|
|
7
8
|
require('./chunk-H6M6L26S.cjs');
|
|
8
|
-
require('./chunk-YLWZGSFY.cjs');
|
|
9
9
|
require('./chunk-HTCSHHOR.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-3IARSCO6.cjs');
|
|
11
11
|
require('./chunk-VPBMIYO2.cjs');
|
|
12
12
|
var v = require('valibot');
|
|
13
13
|
|
|
@@ -32,7 +32,7 @@ function _interopNamespace(e) {
|
|
|
32
32
|
var v__namespace = /*#__PURE__*/_interopNamespace(v);
|
|
33
33
|
|
|
34
34
|
function schema(name) {
|
|
35
|
-
const rule =
|
|
35
|
+
const rule = chunkGJENL6VK_cjs.RULES[name];
|
|
36
36
|
return (options = {}) => v__namespace.pipe(v__namespace.string(), v__namespace.check(rule.test, options.message ?? rule.message));
|
|
37
37
|
}
|
|
38
38
|
var pk = {
|
package/dist/valibot.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { RULES } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { RULES } from './chunk-HUQY2WR5.js';
|
|
2
|
+
import './chunk-RXNYY5K5.js';
|
|
3
|
+
import './chunk-PLDVGOKZ.js';
|
|
4
|
+
import './chunk-AZV45DMG.js';
|
|
5
|
+
import './chunk-6IPPANNX.js';
|
|
5
6
|
import './chunk-CEPNSHIC.js';
|
|
6
|
-
import './chunk-Y6BUGLXU.js';
|
|
7
7
|
import './chunk-EEVNLTB4.js';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-YPPKY5XZ.js';
|
|
9
9
|
import './chunk-ENQ7O7VW.js';
|
|
10
10
|
import * as v from 'valibot';
|
|
11
11
|
|
package/dist/whatsapp.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkNAJGGUAM_cjs = require('./chunk-NAJGGUAM.cjs');
|
|
4
|
+
require('./chunk-NTD4JLDW.cjs');
|
|
5
5
|
require('./chunk-VPBMIYO2.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "createWhatsAppLink", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkNAJGGUAM_cjs.createWhatsAppLink; }
|
|
12
12
|
});
|
package/dist/whatsapp.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createWhatsAppLink } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { createWhatsAppLink } from './chunk-EMH4IP2U.js';
|
|
2
|
+
import './chunk-6IPPANNX.js';
|
|
3
3
|
import './chunk-ENQ7O7VW.js';
|
package/dist/words.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHIZQBWNW_cjs = require('./chunk-HIZQBWNW.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "amountInWords", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkHIZQBWNW_cjs.amountInWords; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "numberToWords", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkHIZQBWNW_cjs.numberToWords; }
|
|
14
14
|
});
|
package/dist/words.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { amountInWords, numberToWords } from './chunk-
|
|
1
|
+
export { amountInWords, numberToWords } from './chunk-BR4QLZPX.js';
|
package/dist/yup.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunkGJENL6VK_cjs = require('./chunk-GJENL6VK.cjs');
|
|
4
|
+
require('./chunk-3ZA265SK.cjs');
|
|
5
|
+
require('./chunk-33FXHM2E.cjs');
|
|
6
|
+
require('./chunk-HTERSQGF.cjs');
|
|
7
|
+
require('./chunk-NTD4JLDW.cjs');
|
|
7
8
|
require('./chunk-H6M6L26S.cjs');
|
|
8
|
-
require('./chunk-YLWZGSFY.cjs');
|
|
9
9
|
require('./chunk-HTCSHHOR.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-3IARSCO6.cjs');
|
|
11
11
|
require('./chunk-VPBMIYO2.cjs');
|
|
12
12
|
var yup = require('yup');
|
|
13
13
|
|
|
14
14
|
function schema(name) {
|
|
15
|
-
const rule =
|
|
15
|
+
const rule = chunkGJENL6VK_cjs.RULES[name];
|
|
16
16
|
return (options = {}) => yup.string().test(
|
|
17
17
|
`pk-${name}`,
|
|
18
18
|
options.message ?? rule.message,
|
package/dist/yup.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { RULES } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { RULES } from './chunk-HUQY2WR5.js';
|
|
2
|
+
import './chunk-RXNYY5K5.js';
|
|
3
|
+
import './chunk-PLDVGOKZ.js';
|
|
4
|
+
import './chunk-AZV45DMG.js';
|
|
5
|
+
import './chunk-6IPPANNX.js';
|
|
5
6
|
import './chunk-CEPNSHIC.js';
|
|
6
|
-
import './chunk-Y6BUGLXU.js';
|
|
7
7
|
import './chunk-EEVNLTB4.js';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-YPPKY5XZ.js';
|
|
9
9
|
import './chunk-ENQ7O7VW.js';
|
|
10
10
|
import { string } from 'yup';
|
|
11
11
|
|
package/dist/zod.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunkGJENL6VK_cjs = require('./chunk-GJENL6VK.cjs');
|
|
4
|
+
require('./chunk-3ZA265SK.cjs');
|
|
5
|
+
require('./chunk-33FXHM2E.cjs');
|
|
6
|
+
require('./chunk-HTERSQGF.cjs');
|
|
7
|
+
require('./chunk-NTD4JLDW.cjs');
|
|
7
8
|
require('./chunk-H6M6L26S.cjs');
|
|
8
|
-
require('./chunk-YLWZGSFY.cjs');
|
|
9
9
|
require('./chunk-HTCSHHOR.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-3IARSCO6.cjs');
|
|
11
11
|
require('./chunk-VPBMIYO2.cjs');
|
|
12
12
|
var zod = require('zod');
|
|
13
13
|
|
|
14
14
|
function schema(name) {
|
|
15
|
-
const rule =
|
|
15
|
+
const rule = chunkGJENL6VK_cjs.RULES[name];
|
|
16
16
|
return (options = {}) => zod.z.string().refine(rule.test, { message: options.message ?? rule.message });
|
|
17
17
|
}
|
|
18
18
|
var pk = {
|
package/dist/zod.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { RULES } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { RULES } from './chunk-HUQY2WR5.js';
|
|
2
|
+
import './chunk-RXNYY5K5.js';
|
|
3
|
+
import './chunk-PLDVGOKZ.js';
|
|
4
|
+
import './chunk-AZV45DMG.js';
|
|
5
|
+
import './chunk-6IPPANNX.js';
|
|
5
6
|
import './chunk-CEPNSHIC.js';
|
|
6
|
-
import './chunk-Y6BUGLXU.js';
|
|
7
7
|
import './chunk-EEVNLTB4.js';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-YPPKY5XZ.js';
|
|
9
9
|
import './chunk-ENQ7O7VW.js';
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pakdatakit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Production-ready utility toolkit for Pakistani developers — CNIC, phone, WhatsApp, IBAN, postal codes, address parsing, Hijri dates, Roman Urdu, networks, geography, and formatting",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -90,6 +90,16 @@
|
|
|
90
90
|
"default": "./dist/iban.cjs"
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
|
+
"./input": {
|
|
94
|
+
"import": {
|
|
95
|
+
"types": "./dist/input.d.ts",
|
|
96
|
+
"default": "./dist/input.js"
|
|
97
|
+
},
|
|
98
|
+
"require": {
|
|
99
|
+
"types": "./dist/input.d.cts",
|
|
100
|
+
"default": "./dist/input.cjs"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
93
103
|
"./networks": {
|
|
94
104
|
"import": {
|
|
95
105
|
"types": "./dist/networks.d.ts",
|
|
@@ -213,7 +223,8 @@
|
|
|
213
223
|
"./package.json": "./package.json"
|
|
214
224
|
},
|
|
215
225
|
"files": [
|
|
216
|
-
"dist"
|
|
226
|
+
"dist",
|
|
227
|
+
"DATA.md"
|
|
217
228
|
],
|
|
218
229
|
"sideEffects": false,
|
|
219
230
|
"scripts": {
|
|
@@ -227,7 +238,8 @@
|
|
|
227
238
|
"format": "prettier --write .",
|
|
228
239
|
"format:check": "prettier --check .",
|
|
229
240
|
"typecheck": "tsc --noEmit",
|
|
230
|
-
"prepublishOnly": "npm run lint && npm run typecheck && npm test && npm run build"
|
|
241
|
+
"prepublishOnly": "npm run lint && npm run typecheck && npm test && npm run build",
|
|
242
|
+
"docs": "typedoc && node scripts/generate-llms.mjs"
|
|
231
243
|
},
|
|
232
244
|
"keywords": [
|
|
233
245
|
"pakistan",
|
|
@@ -284,6 +296,7 @@
|
|
|
284
296
|
"libphonenumber-js": "^1.13.15",
|
|
285
297
|
"prettier": "^3.5.3",
|
|
286
298
|
"tsup": "^8.5.0",
|
|
299
|
+
"typedoc": "^0.28.20",
|
|
287
300
|
"typescript": "^5.8.3",
|
|
288
301
|
"valibot": "^1.5.0",
|
|
289
302
|
"vitest": "^3.2.1",
|