shared_schemas 1.0.7 → 2.0.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.
@@ -0,0 +1,7 @@
1
+ import z from "zod";
2
+ export declare const paymentSchema: z.ZodObject<{
3
+ amount: z.ZodNumber;
4
+ phoneNumber: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type Payment = z.infer<typeof paymentSchema>;
7
+ //# sourceMappingURL=p2p.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p2p.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/p2p.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,aAAa;;;iBAUxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.paymentSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.paymentSchema = zod_1.default.object({
9
+ amount: zod_1.default
10
+ .number()
11
+ .min(1, "Amount must be at least Rs. 1")
12
+ .max(10_000, "You can send a maximum of Rs. 10,000 at once"),
13
+ phoneNumber: zod_1.default
14
+ .string()
15
+ .trim()
16
+ .regex(/^[6-9]\d{9}$/, "Please enter a valid 10-digit phone number"),
17
+ });
18
+ //# sourceMappingURL=p2p.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p2p.schemas.js","sourceRoot":"","sources":["../../src/schemas/p2p.schemas.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AAEP,QAAA,aAAa,GAAG,aAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,aAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,+BAA+B,CAAC;SACvC,GAAG,CAAC,MAAM,EAAE,8CAA8C,CAAC;IAE9D,WAAW,EAAE,aAAC;SACX,MAAM,EAAE;SACR,IAAI,EAAE;SACN,KAAK,CAAC,cAAc,EAAE,4CAA4C,CAAC;CACvE,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared_schemas",
3
- "version": "1.0.7",
3
+ "version": "2.0.0",
4
4
  "main": "dist/app.js",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -0,0 +1,15 @@
1
+ import z from "zod";
2
+
3
+ export const paymentSchema = z.object({
4
+ amount: z
5
+ .number()
6
+ .min(1, "Amount must be at least Rs. 1")
7
+ .max(10_000, "You can send a maximum of Rs. 10,000 at once"),
8
+
9
+ phoneNumber: z
10
+ .string()
11
+ .trim()
12
+ .regex(/^[6-9]\d{9}$/, "Please enter a valid 10-digit phone number"),
13
+ });
14
+
15
+ export type Payment = z.infer<typeof paymentSchema>;