@zyacreatives/shared 2.2.83 → 2.2.85

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.
@@ -21,14 +21,14 @@ export declare const EXPERIENCE_LEVELS: {
21
21
  readonly YEAR_5_PLUS: "5+ years";
22
22
  };
23
23
  export declare const SELLER_STATUS: {
24
- ACTIVE: string;
25
- PENDING: string;
26
- SUSPENDED: string;
24
+ readonly ACTIVE: "ACTIVE";
25
+ readonly PENDING: "PENDING";
26
+ readonly SUSPENDED: "SUSPENDED";
27
27
  };
28
28
  export declare const PAYMENT_METHOD_STATUS: {
29
- VERIFIED: string;
30
- PENDING: string;
31
- REJECTED: string;
29
+ readonly VERIFIED: "VERIFIED";
30
+ readonly PENDING: "PENDING";
31
+ readonly REJECTED: "REJECTED";
32
32
  };
33
33
  export declare const ONBOARDING_PAGES: {
34
34
  readonly EMAIL_VERIFICATION: "EMAIL_VERIFICATION";
@@ -269,12 +269,12 @@ export declare const SIGNAL_STATUS: {
269
269
  readonly ARCHIVED: "ARCHIVED";
270
270
  };
271
271
  export declare const COUNTRY_OF_OPERATION: {
272
- NG: string;
273
- GB: string;
272
+ readonly NG: "NG";
273
+ readonly GB: "GB";
274
274
  };
275
275
  export declare const GATEWAY_PROVIDER: {
276
- PAYSTACK: string;
277
- STRIPE: string;
276
+ readonly PAYSTACK: "PAYSTACK";
277
+ readonly STRIPE: "STRIPE";
278
278
  };
279
279
  export type SignalInterestType = (typeof SIGNAL_INTEREST_TYPES)[keyof typeof SIGNAL_INTEREST_TYPES];
280
280
  export type SignalStatus = (typeof SIGNAL_STATUS)[keyof typeof SIGNAL_STATUS];
@@ -3,19 +3,19 @@ export declare const PayoutMethodEntitySchema: z.ZodObject<{
3
3
  id: z.ZodCUID2;
4
4
  sellerId: z.ZodCUID2;
5
5
  provider: z.ZodEnum<{
6
- PAYSTACK: string;
7
- STRIPE: string;
6
+ readonly PAYSTACK: "PAYSTACK";
7
+ readonly STRIPE: "STRIPE";
8
8
  }>;
9
9
  currency: z.ZodString;
10
10
  bankName: z.ZodString;
11
- accountLast4: z.ZodString;
11
+ accountLastFour: z.ZodString;
12
12
  accountName: z.ZodString;
13
- externalBankId: z.ZodString;
13
+ externalBankId: z.ZodNullable<z.ZodString>;
14
14
  isDefault: z.ZodBoolean;
15
15
  status: z.ZodDefault<z.ZodEnum<{
16
- VERIFIED: string;
17
- PENDING: string;
18
- REJECTED: string;
16
+ readonly VERIFIED: "VERIFIED";
17
+ readonly PENDING: "PENDING";
18
+ readonly REJECTED: "REJECTED";
19
19
  }>>;
20
20
  createdAt: z.ZodCoercedDate<unknown>;
21
21
  updatedAt: z.ZodCoercedDate<unknown>;
@@ -23,11 +23,25 @@ export declare const PayoutMethodEntitySchema: z.ZodObject<{
23
23
  export type PayoutMethodEntity = z.infer<typeof PayoutMethodEntitySchema>;
24
24
  export declare const CreatePayoutMethodEntitySchema: z.ZodObject<{
25
25
  provider: z.ZodEnum<{
26
- PAYSTACK: string;
27
- STRIPE: string;
26
+ readonly PAYSTACK: "PAYSTACK";
27
+ readonly STRIPE: "STRIPE";
28
28
  }>;
29
29
  bankName: z.ZodString;
30
30
  accountLast4: z.ZodString;
31
31
  accountName: z.ZodString;
32
+ isDefault: z.ZodBoolean;
32
33
  }, z.core.$strip>;
33
34
  export type CreatePayoutMethodInput = z.infer<typeof CreatePayoutMethodEntitySchema>;
35
+ export declare const UpdatePayoutMethodEntitySchema: z.ZodObject<{
36
+ bankName: z.ZodOptional<z.ZodString>;
37
+ accountLast4: z.ZodOptional<z.ZodString>;
38
+ accountName: z.ZodOptional<z.ZodString>;
39
+ isDefault: z.ZodOptional<z.ZodBoolean>;
40
+ status: z.ZodOptional<z.ZodEnum<{
41
+ readonly VERIFIED: "VERIFIED";
42
+ readonly PENDING: "PENDING";
43
+ readonly REJECTED: "REJECTED";
44
+ }>>;
45
+ externalBankId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ }, z.core.$strip>;
47
+ export type UpdatePayoutMethodInput = z.infer<typeof UpdatePayoutMethodEntitySchema>;
@@ -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.CreatePayoutMethodEntitySchema = exports.PayoutMethodEntitySchema = void 0;
6
+ 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({
@@ -12,9 +12,9 @@ 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
- accountLast4: zod_1.default.string(),
15
+ accountLastFour: zod_1.default.string(),
16
16
  accountName: zod_1.default.string(),
17
- externalBankId: zod_1.default.string(),
17
+ externalBankId: zod_1.default.string().nullable(),
18
18
  isDefault: zod_1.default.boolean(),
19
19
  status: zod_1.default.enum(constants_1.PAYMENT_METHOD_STATUS).default(constants_1.PAYMENT_METHOD_STATUS.PENDING),
20
20
  createdAt: zod_1.default.coerce.date(),
@@ -25,4 +25,13 @@ exports.CreatePayoutMethodEntitySchema = zod_1.default.object({
25
25
  bankName: zod_1.default.string(),
26
26
  accountLast4: zod_1.default.string(),
27
27
  accountName: zod_1.default.string(),
28
+ isDefault: zod_1.default.boolean(),
28
29
  });
30
+ exports.UpdatePayoutMethodEntitySchema = zod_1.default.object({
31
+ bankName: zod_1.default.string(),
32
+ accountLast4: zod_1.default.string(),
33
+ accountName: zod_1.default.string(),
34
+ isDefault: zod_1.default.boolean(),
35
+ status: zod_1.default.enum(constants_1.PAYMENT_METHOD_STATUS),
36
+ externalBankId: zod_1.default.string().nullable(),
37
+ }).partial();
@@ -3,15 +3,15 @@ export declare const SellerEntitySchema: z.ZodObject<{
3
3
  id: z.ZodCUID2;
4
4
  businessName: z.ZodString;
5
5
  countryOfOperation: z.ZodEnum<{
6
- NG: string;
7
- GB: string;
6
+ readonly NG: "NG";
7
+ readonly GB: "GB";
8
8
  }>;
9
9
  stripeConnectId: z.ZodNullable<z.ZodString>;
10
10
  paystackSubaccountCode: z.ZodNullable<z.ZodString>;
11
11
  status: z.ZodDefault<z.ZodEnum<{
12
- ACTIVE: string;
13
- PENDING: string;
14
- SUSPENDED: string;
12
+ readonly ACTIVE: "ACTIVE";
13
+ readonly PENDING: "PENDING";
14
+ readonly SUSPENDED: "SUSPENDED";
15
15
  }>>;
16
16
  createdAt: z.ZodCoercedDate<unknown>;
17
17
  updatedAt: z.ZodCoercedDate<unknown>;
@@ -20,11 +20,26 @@ export type SellerEntity = z.infer<typeof SellerEntitySchema>;
20
20
  export declare const CreateSellerEntityInputSchema: z.ZodObject<{
21
21
  businessName: z.ZodString;
22
22
  countryOfOperation: z.ZodEnum<{
23
- NG: string;
24
- GB: string;
23
+ readonly NG: "NG";
24
+ readonly GB: "GB";
25
25
  }>;
26
26
  bankCode: z.ZodNullable<z.ZodString>;
27
27
  accountNumber: z.ZodString;
28
28
  accountName: z.ZodString;
29
29
  }, z.core.$strip>;
30
30
  export type CreateSellerInput = z.infer<typeof CreateSellerEntityInputSchema>;
31
+ export declare const UpdateSellerEntitySchema: z.ZodObject<{
32
+ businessName: z.ZodOptional<z.ZodString>;
33
+ countryOfOperation: z.ZodOptional<z.ZodEnum<{
34
+ readonly NG: "NG";
35
+ readonly GB: "GB";
36
+ }>>;
37
+ stripeConnectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
+ paystackSubaccountCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
+ status: z.ZodOptional<z.ZodEnum<{
40
+ readonly ACTIVE: "ACTIVE";
41
+ readonly PENDING: "PENDING";
42
+ readonly SUSPENDED: "SUSPENDED";
43
+ }>>;
44
+ }, z.core.$strip>;
45
+ export type UpdateSellerInput = z.infer<typeof UpdateSellerEntitySchema>;
@@ -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.CreateSellerEntityInputSchema = exports.SellerEntitySchema = void 0;
6
+ exports.UpdateSellerEntitySchema = exports.CreateSellerEntityInputSchema = exports.SellerEntitySchema = void 0;
7
7
  const zod_1 = __importDefault(require("zod"));
8
8
  const constants_1 = require("../constants");
9
9
  exports.SellerEntitySchema = zod_1.default.object({
@@ -23,3 +23,12 @@ exports.CreateSellerEntityInputSchema = zod_1.default.object({
23
23
  accountNumber: zod_1.default.string(),
24
24
  accountName: zod_1.default.string(),
25
25
  });
26
+ exports.UpdateSellerEntitySchema = zod_1.default
27
+ .object({
28
+ businessName: zod_1.default.string(),
29
+ countryOfOperation: zod_1.default.enum(constants_1.COUNTRY_OF_OPERATION),
30
+ stripeConnectId: zod_1.default.string().nullable(),
31
+ paystackSubaccountCode: zod_1.default.string().nullable(),
32
+ status: zod_1.default.enum(constants_1.SELLER_STATUS),
33
+ })
34
+ .partial();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.83",
3
+ "version": "2.2.85",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/constants.ts CHANGED
@@ -28,13 +28,13 @@ export const SELLER_STATUS = {
28
28
  ACTIVE: "ACTIVE",
29
29
  PENDING: "PENDING",
30
30
  SUSPENDED: "SUSPENDED",
31
- };
31
+ } as const;
32
32
 
33
33
  export const PAYMENT_METHOD_STATUS = {
34
34
  VERIFIED: "VERIFIED",
35
35
  PENDING: "PENDING",
36
36
  REJECTED: "REJECTED",
37
- };
37
+ } as const;
38
38
 
39
39
  export const ONBOARDING_PAGES = {
40
40
  EMAIL_VERIFICATION: "EMAIL_VERIFICATION",
@@ -306,12 +306,12 @@ export const SIGNAL_STATUS = {
306
306
  export const COUNTRY_OF_OPERATION = {
307
307
  NG: "NG",
308
308
  GB: "GB",
309
- };
309
+ } as const;
310
310
 
311
311
  export const GATEWAY_PROVIDER = {
312
312
  PAYSTACK: "PAYSTACK",
313
313
  STRIPE: "STRIPE",
314
- };
314
+ } as const;
315
315
 
316
316
  export type SignalInterestType =
317
317
  (typeof SIGNAL_INTEREST_TYPES)[keyof typeof SIGNAL_INTEREST_TYPES];
@@ -1,8 +1,5 @@
1
1
  import z from "zod";
2
- import {
3
- GATEWAY_PROVIDER,
4
- PAYMENT_METHOD_STATUS,
5
- } from "../constants";
2
+ import { GATEWAY_PROVIDER, PAYMENT_METHOD_STATUS } from "../constants";
6
3
 
7
4
  export const PayoutMethodEntitySchema = z.object({
8
5
  id: z.cuid2(),
@@ -10,14 +7,15 @@ export const PayoutMethodEntitySchema = z.object({
10
7
  provider: z.enum(GATEWAY_PROVIDER),
11
8
  currency: z.string(),
12
9
  bankName: z.string(),
13
- accountLast4: z.string(),
10
+ accountLastFour: z.string(),
14
11
  accountName: z.string(),
15
- externalBankId: z.string(),
12
+ externalBankId: z.string().nullable(),
16
13
  isDefault: z.boolean(),
17
14
  status: z.enum(PAYMENT_METHOD_STATUS).default(PAYMENT_METHOD_STATUS.PENDING),
18
15
  createdAt: z.coerce.date(),
19
16
  updatedAt: z.coerce.date(),
20
17
  });
18
+
21
19
  export type PayoutMethodEntity = z.infer<typeof PayoutMethodEntitySchema>;
22
20
 
23
21
  export const CreatePayoutMethodEntitySchema = z.object({
@@ -25,7 +23,19 @@ export const CreatePayoutMethodEntitySchema = z.object({
25
23
  bankName: z.string(),
26
24
  accountLast4: z.string(),
27
25
  accountName: z.string(),
26
+ isDefault: z.boolean(),
28
27
  });
29
28
  export type CreatePayoutMethodInput = z.infer<
30
29
  typeof CreatePayoutMethodEntitySchema
31
30
  >;
31
+
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>;
@@ -21,3 +21,15 @@ export const CreateSellerEntityInputSchema = z.object({
21
21
  accountName: z.string(),
22
22
  });
23
23
  export type CreateSellerInput = z.infer<typeof CreateSellerEntityInputSchema>;
24
+
25
+ export const UpdateSellerEntitySchema = z
26
+ .object({
27
+ businessName: z.string(),
28
+ countryOfOperation: z.enum(COUNTRY_OF_OPERATION),
29
+ stripeConnectId: z.string().nullable(),
30
+ paystackSubaccountCode: z.string().nullable(),
31
+ status: z.enum(SELLER_STATUS),
32
+ })
33
+ .partial();
34
+
35
+ export type UpdateSellerInput = z.infer<typeof UpdateSellerEntitySchema>;