@zyacreatives/shared 2.2.87 → 2.2.88

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.
@@ -41,3 +41,42 @@ export declare const UpdateSellerEntitySchema: z.ZodObject<{
41
41
  }>>;
42
42
  }, z.core.$strip>;
43
43
  export type UpdateSellerInput = z.infer<typeof UpdateSellerEntitySchema>;
44
+ export declare const SellerProfileSchema: z.ZodObject<{
45
+ id: z.ZodCUID2;
46
+ businessName: z.ZodString;
47
+ countryOfOperation: z.ZodEnum<{
48
+ readonly NG: "NG";
49
+ readonly GB: "GB";
50
+ }>;
51
+ stripeConnectId: z.ZodNullable<z.ZodString>;
52
+ paystackSubaccountCode: z.ZodNullable<z.ZodString>;
53
+ status: z.ZodDefault<z.ZodEnum<{
54
+ readonly ACTIVE: "ACTIVE";
55
+ readonly PENDING: "PENDING";
56
+ readonly SUSPENDED: "SUSPENDED";
57
+ }>>;
58
+ createdAt: z.ZodCoercedDate<unknown>;
59
+ updatedAt: z.ZodCoercedDate<unknown>;
60
+ payoutMethods: z.ZodArray<z.ZodObject<{
61
+ id: z.ZodCUID2;
62
+ sellerId: z.ZodCUID2;
63
+ provider: z.ZodEnum<{
64
+ readonly PAYSTACK: "PAYSTACK";
65
+ readonly STRIPE: "STRIPE";
66
+ }>;
67
+ currency: z.ZodString;
68
+ bankName: z.ZodString;
69
+ accountLast4: z.ZodString;
70
+ accountName: z.ZodString;
71
+ externalBankId: z.ZodNullable<z.ZodString>;
72
+ isDefault: z.ZodBoolean;
73
+ status: z.ZodDefault<z.ZodEnum<{
74
+ readonly VERIFIED: "VERIFIED";
75
+ readonly PENDING: "PENDING";
76
+ readonly REJECTED: "REJECTED";
77
+ }>>;
78
+ createdAt: z.ZodCoercedDate<unknown>;
79
+ updatedAt: z.ZodCoercedDate<unknown>;
80
+ }, z.core.$strip>>;
81
+ }, z.core.$strip>;
82
+ export type SellerProfile = z.infer<typeof SellerProfileSchema>;
@@ -3,9 +3,10 @@ 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.UpdateSellerEntitySchema = exports.CreateSellerEntityInputSchema = exports.SellerEntitySchema = void 0;
6
+ exports.SellerProfileSchema = exports.UpdateSellerEntitySchema = exports.CreateSellerEntityInputSchema = exports.SellerEntitySchema = void 0;
7
7
  const zod_1 = __importDefault(require("zod"));
8
8
  const constants_1 = require("../constants");
9
+ const payout_method_1 = require("./payout-method");
9
10
  exports.SellerEntitySchema = zod_1.default.object({
10
11
  id: zod_1.default.cuid2(),
11
12
  businessName: zod_1.default.string(), // Kept here for the app to consume!
@@ -31,3 +32,6 @@ exports.UpdateSellerEntitySchema = zod_1.default
31
32
  status: zod_1.default.enum(constants_1.SELLER_STATUS),
32
33
  })
33
34
  .partial();
35
+ exports.SellerProfileSchema = exports.SellerEntitySchema.extend({
36
+ payoutMethods: zod_1.default.array(payout_method_1.PayoutMethodEntitySchema),
37
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.87",
3
+ "version": "2.2.88",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,5 +1,6 @@
1
1
  import z from "zod";
2
2
  import { COUNTRY_OF_OPERATION, SELLER_STATUS } from "../constants";
3
+ import { PayoutMethodEntitySchema } from "./payout-method";
3
4
 
4
5
  export const SellerEntitySchema = z.object({
5
6
  id: z.cuid2(),
@@ -31,3 +32,9 @@ export const UpdateSellerEntitySchema = z
31
32
  })
32
33
  .partial();
33
34
  export type UpdateSellerInput = z.infer<typeof UpdateSellerEntitySchema>;
35
+
36
+ export const SellerProfileSchema = SellerEntitySchema.extend({
37
+ payoutMethods: z.array(PayoutMethodEntitySchema),
38
+ });
39
+
40
+ export type SellerProfile = z.infer<typeof SellerProfileSchema>;