@zyacreatives/shared 2.2.86 → 2.2.87

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.
@@ -4,6 +4,10 @@ export declare const ROLES: {
4
4
  readonly INVESTOR: "INVESTOR";
5
5
  readonly ADMIN: "ADMIN";
6
6
  };
7
+ export type PaystackBank = {
8
+ name: string;
9
+ code: string;
10
+ };
7
11
  export declare const USER_STATUSES: {
8
12
  readonly ACTIVE: "ACTIVE";
9
13
  readonly SUSPENDED: "SUSPENDED";
@@ -45,3 +45,21 @@ export declare const UpdatePayoutMethodEntitySchema: z.ZodObject<{
45
45
  externalBankId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
46
  }, z.core.$strip>;
47
47
  export type UpdatePayoutMethodInput = z.infer<typeof UpdatePayoutMethodEntitySchema>;
48
+ export declare const GetBanksInputSchema: z.ZodObject<{
49
+ country: z.ZodDefault<z.ZodString>;
50
+ }, z.core.$strip>;
51
+ export type GetBanksInput = z.infer<typeof GetBanksInputSchema>;
52
+ export declare const VerifyAccountInputSchema: z.ZodObject<{
53
+ accountNumber: z.ZodString;
54
+ bankCode: z.ZodString;
55
+ }, z.core.$strip>;
56
+ export type VerifyAccountInput = z.infer<typeof VerifyAccountInputSchema>;
57
+ export declare const VerifyAccountOutputSchema: z.ZodObject<{
58
+ accountName: z.ZodString;
59
+ }, z.core.$strip>;
60
+ export type VerifyAccountOutput = z.infer<typeof VerifyAccountOutputSchema>;
61
+ export declare const BankListOutputSchema: z.ZodArray<z.ZodObject<{
62
+ name: z.ZodString;
63
+ code: z.ZodString;
64
+ }, z.core.$strip>>;
65
+ export type BankListOutput = z.infer<typeof BankListOutputSchema>;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.UpdatePayoutMethodEntitySchema = exports.CreatePayoutMethodEntitySchema = exports.PayoutMethodEntitySchema = void 0;
6
+ exports.BankListOutputSchema = exports.VerifyAccountOutputSchema = exports.VerifyAccountInputSchema = exports.GetBanksInputSchema = exports.UpdatePayoutMethodEntitySchema = exports.CreatePayoutMethodEntitySchema = exports.PayoutMethodEntitySchema = void 0;
7
7
  const zod_1 = __importDefault(require("zod"));
8
8
  const constants_1 = require("../constants");
9
9
  exports.PayoutMethodEntitySchema = zod_1.default.object({
@@ -37,3 +37,29 @@ exports.UpdatePayoutMethodEntitySchema = zod_1.default
37
37
  externalBankId: zod_1.default.string().nullable(),
38
38
  })
39
39
  .partial();
40
+ exports.GetBanksInputSchema = zod_1.default.object({
41
+ country: zod_1.default
42
+ .string()
43
+ .default("nigeria")
44
+ .openapi({
45
+ param: { in: "query", name: "country" },
46
+ example: "nigeria",
47
+ }),
48
+ });
49
+ exports.VerifyAccountInputSchema = zod_1.default
50
+ .object({
51
+ accountNumber: zod_1.default.string().length(10, "Account number must be 10 digits"),
52
+ bankCode: zod_1.default.string().min(1, "Bank code is required"),
53
+ })
54
+ .openapi("VerifyAccountInput");
55
+ exports.VerifyAccountOutputSchema = zod_1.default
56
+ .object({
57
+ accountName: zod_1.default.string(),
58
+ })
59
+ .openapi("VerifyAccountOutput");
60
+ exports.BankListOutputSchema = zod_1.default
61
+ .array(zod_1.default.object({
62
+ name: zod_1.default.string(),
63
+ code: zod_1.default.string(),
64
+ }))
65
+ .openapi("BankListOutput");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.86",
3
+ "version": "2.2.87",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/constants.ts CHANGED
@@ -5,6 +5,11 @@ export const ROLES = {
5
5
  ADMIN: "ADMIN",
6
6
  } as const;
7
7
 
8
+ export type PaystackBank = {
9
+ name: string;
10
+ code: string;
11
+ };
12
+
8
13
  export const USER_STATUSES = {
9
14
  ACTIVE: "ACTIVE",
10
15
  SUSPENDED: "SUSPENDED",
@@ -37,6 +37,47 @@ export const UpdatePayoutMethodEntitySchema = z
37
37
  externalBankId: z.string().nullable(),
38
38
  })
39
39
  .partial();
40
+
40
41
  export type UpdatePayoutMethodInput = z.infer<
41
42
  typeof UpdatePayoutMethodEntitySchema
42
43
  >;
44
+
45
+ export const GetBanksInputSchema = z.object({
46
+ country: z
47
+ .string()
48
+ .default("nigeria")
49
+ .openapi({
50
+ param: { in: "query", name: "country" },
51
+ example: "nigeria",
52
+ }),
53
+ });
54
+
55
+ export type GetBanksInput = z.infer<typeof GetBanksInputSchema>;
56
+
57
+ export const VerifyAccountInputSchema = z
58
+ .object({
59
+ accountNumber: z.string().length(10, "Account number must be 10 digits"),
60
+ bankCode: z.string().min(1, "Bank code is required"),
61
+ })
62
+ .openapi("VerifyAccountInput");
63
+
64
+ export type VerifyAccountInput = z.infer<typeof VerifyAccountInputSchema>;
65
+
66
+ export const VerifyAccountOutputSchema = z
67
+ .object({
68
+ accountName: z.string(),
69
+ })
70
+ .openapi("VerifyAccountOutput");
71
+
72
+ export type VerifyAccountOutput = z.infer<typeof VerifyAccountOutputSchema>;
73
+
74
+ export const BankListOutputSchema = z
75
+ .array(
76
+ z.object({
77
+ name: z.string(),
78
+ code: z.string(),
79
+ }),
80
+ )
81
+ .openapi("BankListOutput");
82
+
83
+ export type BankListOutput = z.infer<typeof BankListOutputSchema>;