@zyacreatives/shared 2.2.85 → 2.2.86

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.
@@ -8,7 +8,7 @@ export declare const PayoutMethodEntitySchema: z.ZodObject<{
8
8
  }>;
9
9
  currency: z.ZodString;
10
10
  bankName: z.ZodString;
11
- accountLastFour: z.ZodString;
11
+ accountLast4: z.ZodString;
12
12
  accountName: z.ZodString;
13
13
  externalBankId: z.ZodNullable<z.ZodString>;
14
14
  isDefault: z.ZodBoolean;
@@ -12,7 +12,7 @@ exports.PayoutMethodEntitySchema = zod_1.default.object({
12
12
  provider: zod_1.default.enum(constants_1.GATEWAY_PROVIDER),
13
13
  currency: zod_1.default.string(),
14
14
  bankName: zod_1.default.string(),
15
- accountLastFour: zod_1.default.string(),
15
+ accountLast4: zod_1.default.string(),
16
16
  accountName: zod_1.default.string(),
17
17
  externalBankId: zod_1.default.string().nullable(),
18
18
  isDefault: zod_1.default.boolean(),
@@ -27,11 +27,13 @@ exports.CreatePayoutMethodEntitySchema = zod_1.default.object({
27
27
  accountName: zod_1.default.string(),
28
28
  isDefault: zod_1.default.boolean(),
29
29
  });
30
- exports.UpdatePayoutMethodEntitySchema = zod_1.default.object({
30
+ exports.UpdatePayoutMethodEntitySchema = zod_1.default
31
+ .object({
31
32
  bankName: zod_1.default.string(),
32
33
  accountLast4: zod_1.default.string(),
33
34
  accountName: zod_1.default.string(),
34
35
  isDefault: zod_1.default.boolean(),
35
36
  status: zod_1.default.enum(constants_1.PAYMENT_METHOD_STATUS),
36
37
  externalBankId: zod_1.default.string().nullable(),
37
- }).partial();
38
+ })
39
+ .partial();
@@ -18,7 +18,6 @@ export declare const SellerEntitySchema: z.ZodObject<{
18
18
  }, z.core.$strip>;
19
19
  export type SellerEntity = z.infer<typeof SellerEntitySchema>;
20
20
  export declare const CreateSellerEntityInputSchema: z.ZodObject<{
21
- businessName: z.ZodString;
22
21
  countryOfOperation: z.ZodEnum<{
23
22
  readonly NG: "NG";
24
23
  readonly GB: "GB";
@@ -29,7 +28,6 @@ export declare const CreateSellerEntityInputSchema: z.ZodObject<{
29
28
  }, z.core.$strip>;
30
29
  export type CreateSellerInput = z.infer<typeof CreateSellerEntityInputSchema>;
31
30
  export declare const UpdateSellerEntitySchema: z.ZodObject<{
32
- businessName: z.ZodOptional<z.ZodString>;
33
31
  countryOfOperation: z.ZodOptional<z.ZodEnum<{
34
32
  readonly NG: "NG";
35
33
  readonly GB: "GB";
@@ -8,7 +8,7 @@ const zod_1 = __importDefault(require("zod"));
8
8
  const constants_1 = require("../constants");
9
9
  exports.SellerEntitySchema = zod_1.default.object({
10
10
  id: zod_1.default.cuid2(),
11
- businessName: zod_1.default.string(),
11
+ businessName: zod_1.default.string(), // Kept here for the app to consume!
12
12
  countryOfOperation: zod_1.default.enum(constants_1.COUNTRY_OF_OPERATION),
13
13
  stripeConnectId: zod_1.default.string().nullable(),
14
14
  paystackSubaccountCode: zod_1.default.string().nullable(),
@@ -16,8 +16,8 @@ exports.SellerEntitySchema = zod_1.default.object({
16
16
  createdAt: zod_1.default.coerce.date(),
17
17
  updatedAt: zod_1.default.coerce.date(),
18
18
  });
19
+ // No businessName here, because the API doesn't accept it (it relies on the User table)
19
20
  exports.CreateSellerEntityInputSchema = zod_1.default.object({
20
- businessName: zod_1.default.string(),
21
21
  countryOfOperation: zod_1.default.enum(constants_1.COUNTRY_OF_OPERATION),
22
22
  bankCode: zod_1.default.string().nullable(),
23
23
  accountNumber: zod_1.default.string(),
@@ -25,7 +25,6 @@ exports.CreateSellerEntityInputSchema = zod_1.default.object({
25
25
  });
26
26
  exports.UpdateSellerEntitySchema = zod_1.default
27
27
  .object({
28
- businessName: zod_1.default.string(),
29
28
  countryOfOperation: zod_1.default.enum(constants_1.COUNTRY_OF_OPERATION),
30
29
  stripeConnectId: zod_1.default.string().nullable(),
31
30
  paystackSubaccountCode: zod_1.default.string().nullable(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.85",
3
+ "version": "2.2.86",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,13 +1,12 @@
1
1
  import z from "zod";
2
2
  import { GATEWAY_PROVIDER, PAYMENT_METHOD_STATUS } from "../constants";
3
-
4
3
  export const PayoutMethodEntitySchema = z.object({
5
4
  id: z.cuid2(),
6
5
  sellerId: z.cuid2(),
7
6
  provider: z.enum(GATEWAY_PROVIDER),
8
7
  currency: z.string(),
9
8
  bankName: z.string(),
10
- accountLastFour: z.string(),
9
+ accountLast4: z.string(),
11
10
  accountName: z.string(),
12
11
  externalBankId: z.string().nullable(),
13
12
  isDefault: z.boolean(),
@@ -15,7 +14,6 @@ export const PayoutMethodEntitySchema = z.object({
15
14
  createdAt: z.coerce.date(),
16
15
  updatedAt: z.coerce.date(),
17
16
  });
18
-
19
17
  export type PayoutMethodEntity = z.infer<typeof PayoutMethodEntitySchema>;
20
18
 
21
19
  export const CreatePayoutMethodEntitySchema = z.object({
@@ -29,13 +27,16 @@ export type CreatePayoutMethodInput = z.infer<
29
27
  typeof CreatePayoutMethodEntitySchema
30
28
  >;
31
29
 
32
- export const UpdatePayoutMethodEntitySchema = z.object({
33
- bankName: z.string(),
34
- accountLast4: z.string(),
35
- accountName: z.string(),
36
- isDefault: z.boolean(),
37
- status: z.enum(PAYMENT_METHOD_STATUS),
38
- externalBankId: z.string().nullable(),
39
- }).partial();
40
-
41
- export type UpdatePayoutMethodInput = z.infer<typeof UpdatePayoutMethodEntitySchema>;
30
+ export const UpdatePayoutMethodEntitySchema = z
31
+ .object({
32
+ bankName: z.string(),
33
+ accountLast4: z.string(),
34
+ accountName: z.string(),
35
+ isDefault: z.boolean(),
36
+ status: z.enum(PAYMENT_METHOD_STATUS),
37
+ externalBankId: z.string().nullable(),
38
+ })
39
+ .partial();
40
+ export type UpdatePayoutMethodInput = z.infer<
41
+ typeof UpdatePayoutMethodEntitySchema
42
+ >;
@@ -3,7 +3,7 @@ import { COUNTRY_OF_OPERATION, SELLER_STATUS } from "../constants";
3
3
 
4
4
  export const SellerEntitySchema = z.object({
5
5
  id: z.cuid2(),
6
- businessName: z.string(),
6
+ businessName: z.string(), // Kept here for the app to consume!
7
7
  countryOfOperation: z.enum(COUNTRY_OF_OPERATION),
8
8
  stripeConnectId: z.string().nullable(),
9
9
  paystackSubaccountCode: z.string().nullable(),
@@ -13,8 +13,8 @@ export const SellerEntitySchema = z.object({
13
13
  });
14
14
  export type SellerEntity = z.infer<typeof SellerEntitySchema>;
15
15
 
16
+ // No businessName here, because the API doesn't accept it (it relies on the User table)
16
17
  export const CreateSellerEntityInputSchema = z.object({
17
- businessName: z.string(),
18
18
  countryOfOperation: z.enum(COUNTRY_OF_OPERATION),
19
19
  bankCode: z.string().nullable(),
20
20
  accountNumber: z.string(),
@@ -24,12 +24,10 @@ export type CreateSellerInput = z.infer<typeof CreateSellerEntityInputSchema>;
24
24
 
25
25
  export const UpdateSellerEntitySchema = z
26
26
  .object({
27
- businessName: z.string(),
28
27
  countryOfOperation: z.enum(COUNTRY_OF_OPERATION),
29
28
  stripeConnectId: z.string().nullable(),
30
29
  paystackSubaccountCode: z.string().nullable(),
31
30
  status: z.enum(SELLER_STATUS),
32
31
  })
33
32
  .partial();
34
-
35
33
  export type UpdateSellerInput = z.infer<typeof UpdateSellerEntitySchema>;