@zyacreatives/shared 2.2.82 → 2.2.84

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.
@@ -20,6 +20,16 @@ export declare const EXPERIENCE_LEVELS: {
20
20
  readonly YEAR_3_5: "3-5 years";
21
21
  readonly YEAR_5_PLUS: "5+ years";
22
22
  };
23
+ export declare const SELLER_STATUS: {
24
+ readonly ACTIVE: "ACTIVE";
25
+ readonly PENDING: "PENDING";
26
+ readonly SUSPENDED: "SUSPENDED";
27
+ };
28
+ export declare const PAYMENT_METHOD_STATUS: {
29
+ readonly VERIFIED: "VERIFIED";
30
+ readonly PENDING: "PENDING";
31
+ readonly REJECTED: "REJECTED";
32
+ };
23
33
  export declare const ONBOARDING_PAGES: {
24
34
  readonly EMAIL_VERIFICATION: "EMAIL_VERIFICATION";
25
35
  readonly USERNAME_SELECTION: "USERNAME_SELECTION";
@@ -258,6 +268,14 @@ export declare const SIGNAL_STATUS: {
258
268
  readonly PENDING: "PENDING";
259
269
  readonly ARCHIVED: "ARCHIVED";
260
270
  };
271
+ export declare const COUNTRY_OF_OPERATION: {
272
+ readonly NG: "NG";
273
+ readonly GB: "GB";
274
+ };
275
+ export declare const GATEWAY_PROVIDER: {
276
+ readonly PAYSTACK: "PAYSTACK";
277
+ readonly STRIPE: "STRIPE";
278
+ };
261
279
  export type SignalInterestType = (typeof SIGNAL_INTEREST_TYPES)[keyof typeof SIGNAL_INTEREST_TYPES];
262
280
  export type SignalStatus = (typeof SIGNAL_STATUS)[keyof typeof SIGNAL_STATUS];
263
281
  export type NotificationType = (typeof NOTIFICATION_TYPES)[keyof typeof NOTIFICATION_TYPES];
@@ -290,6 +308,10 @@ export type InvestorVerificationDocumentStatus = (typeof INVESTOR_VERIFICATION_D
290
308
  export type InvestorVerificationDocumentType = (typeof INVESTOR_VERIFICATION_DOCUMENT_TYPES)[keyof typeof INVESTOR_VERIFICATION_DOCUMENT_TYPES];
291
309
  export type VentureStage = (typeof VENTURE_STAGES)[keyof typeof VENTURE_STAGES];
292
310
  export type ProjectStatus = (typeof PROJECT_STATUS)[keyof typeof PROJECT_STATUS];
311
+ export type SellerStatus = (typeof SELLER_STATUS)[keyof typeof SELLER_STATUS];
312
+ export type CountryOfOperation = (typeof COUNTRY_OF_OPERATION)[keyof typeof COUNTRY_OF_OPERATION];
313
+ export type GatewayProvider = (typeof GATEWAY_PROVIDER)[keyof typeof GATEWAY_PROVIDER];
314
+ export type PaymentMethodStatus = (typeof PAYMENT_METHOD_STATUS)[keyof typeof PAYMENT_METHOD_STATUS];
293
315
  export declare const API_ROUTES: {
294
316
  readonly healthCheck: "/health";
295
317
  readonly username: {
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ANALYTICS_EVENTS = exports.DEFAULT_DISCIPLINES = exports.API_ROUTES = exports.SIGNAL_STATUS = exports.SIGNAL_INTEREST_TYPES = exports.VENTURE_STAGES = exports.NOTIFICATION_TYPES = exports.APPLICATION_STATUS = exports.LINK_TYPES = exports.ACTIVITY_TYPES = exports.POST_BADGE_TYPES = exports.PROJECT_STATUS = exports.MESSAGE_REQUEST_STATUS = exports.JOB_STATUS = exports.WAGES_CURRENCY = exports.GIG_TYPE = exports.MESSAGE_TYPES = exports.JOB_LOCATIONS = exports.JOB_SECTIONS = exports.WAGE_TYPES = exports.JOB_AVAILABILITY_TYPES = exports.EMPLOYMENT_TYPE = exports.WORK_MODE = exports.JOB_TYPE = exports.POST_TYPES = exports.ACTIVITY_PARENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_STATUSES = exports.GEOGRAPHIC_FOCUS = exports.INVESTMENT_SIZES = exports.INVESTOR_TYPES = exports.ONBOARDING_PAGES = exports.EXPERIENCE_LEVELS = exports.CLIENT_TYPES = exports.USER_STATUSES = exports.ROLES = void 0;
3
+ exports.ANALYTICS_EVENTS = exports.DEFAULT_DISCIPLINES = exports.API_ROUTES = exports.GATEWAY_PROVIDER = exports.COUNTRY_OF_OPERATION = exports.SIGNAL_STATUS = exports.SIGNAL_INTEREST_TYPES = exports.VENTURE_STAGES = exports.NOTIFICATION_TYPES = exports.APPLICATION_STATUS = exports.LINK_TYPES = exports.ACTIVITY_TYPES = exports.POST_BADGE_TYPES = exports.PROJECT_STATUS = exports.MESSAGE_REQUEST_STATUS = exports.JOB_STATUS = exports.WAGES_CURRENCY = exports.GIG_TYPE = exports.MESSAGE_TYPES = exports.JOB_LOCATIONS = exports.JOB_SECTIONS = exports.WAGE_TYPES = exports.JOB_AVAILABILITY_TYPES = exports.EMPLOYMENT_TYPE = exports.WORK_MODE = exports.JOB_TYPE = exports.POST_TYPES = exports.ACTIVITY_PARENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_STATUSES = exports.GEOGRAPHIC_FOCUS = exports.INVESTMENT_SIZES = exports.INVESTOR_TYPES = exports.ONBOARDING_PAGES = exports.PAYMENT_METHOD_STATUS = exports.SELLER_STATUS = exports.EXPERIENCE_LEVELS = exports.CLIENT_TYPES = exports.USER_STATUSES = exports.ROLES = void 0;
4
4
  exports.ROLES = {
5
5
  CREATIVE: "CREATIVE",
6
6
  BRAND: "BRAND",
@@ -23,6 +23,16 @@ exports.EXPERIENCE_LEVELS = {
23
23
  YEAR_3_5: "3-5 years",
24
24
  YEAR_5_PLUS: "5+ years",
25
25
  };
26
+ exports.SELLER_STATUS = {
27
+ ACTIVE: "ACTIVE",
28
+ PENDING: "PENDING",
29
+ SUSPENDED: "SUSPENDED",
30
+ };
31
+ exports.PAYMENT_METHOD_STATUS = {
32
+ VERIFIED: "VERIFIED",
33
+ PENDING: "PENDING",
34
+ REJECTED: "REJECTED",
35
+ };
26
36
  exports.ONBOARDING_PAGES = {
27
37
  EMAIL_VERIFICATION: "EMAIL_VERIFICATION",
28
38
  USERNAME_SELECTION: "USERNAME_SELECTION",
@@ -260,6 +270,14 @@ exports.SIGNAL_STATUS = {
260
270
  PENDING: "PENDING",
261
271
  ARCHIVED: "ARCHIVED",
262
272
  };
273
+ exports.COUNTRY_OF_OPERATION = {
274
+ NG: "NG",
275
+ GB: "GB",
276
+ };
277
+ exports.GATEWAY_PROVIDER = {
278
+ PAYSTACK: "PAYSTACK",
279
+ STRIPE: "STRIPE",
280
+ };
263
281
  exports.API_ROUTES = {
264
282
  healthCheck: "/health",
265
283
  username: {
@@ -22,3 +22,5 @@ export * from "./bookmark";
22
22
  export * from "./like";
23
23
  export * from "./investor-signal";
24
24
  export * from "./investor-shortlist";
25
+ export * from "./payout-method";
26
+ export * from "./seller";
@@ -38,3 +38,5 @@ __exportStar(require("./bookmark"), exports);
38
38
  __exportStar(require("./like"), exports);
39
39
  __exportStar(require("./investor-signal"), exports);
40
40
  __exportStar(require("./investor-shortlist"), exports);
41
+ __exportStar(require("./payout-method"), exports);
42
+ __exportStar(require("./seller"), exports);
@@ -0,0 +1,33 @@
1
+ import z from "zod";
2
+ export declare const PayoutMethodEntitySchema: z.ZodObject<{
3
+ id: z.ZodCUID2;
4
+ sellerId: z.ZodCUID2;
5
+ provider: z.ZodEnum<{
6
+ readonly PAYSTACK: "PAYSTACK";
7
+ readonly STRIPE: "STRIPE";
8
+ }>;
9
+ currency: z.ZodString;
10
+ bankName: z.ZodString;
11
+ accountLast4: z.ZodString;
12
+ accountName: z.ZodString;
13
+ externalBankId: z.ZodString;
14
+ isDefault: z.ZodBoolean;
15
+ status: z.ZodDefault<z.ZodEnum<{
16
+ readonly VERIFIED: "VERIFIED";
17
+ readonly PENDING: "PENDING";
18
+ readonly REJECTED: "REJECTED";
19
+ }>>;
20
+ createdAt: z.ZodCoercedDate<unknown>;
21
+ updatedAt: z.ZodCoercedDate<unknown>;
22
+ }, z.core.$strip>;
23
+ export type PayoutMethodEntity = z.infer<typeof PayoutMethodEntitySchema>;
24
+ export declare const CreatePayoutMethodEntitySchema: z.ZodObject<{
25
+ provider: z.ZodEnum<{
26
+ readonly PAYSTACK: "PAYSTACK";
27
+ readonly STRIPE: "STRIPE";
28
+ }>;
29
+ bankName: z.ZodString;
30
+ accountLast4: z.ZodString;
31
+ accountName: z.ZodString;
32
+ }, z.core.$strip>;
33
+ export type CreatePayoutMethodInput = z.infer<typeof CreatePayoutMethodEntitySchema>;
@@ -0,0 +1,28 @@
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.CreatePayoutMethodEntitySchema = exports.PayoutMethodEntitySchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const constants_1 = require("../constants");
9
+ exports.PayoutMethodEntitySchema = zod_1.default.object({
10
+ id: zod_1.default.cuid2(),
11
+ sellerId: zod_1.default.cuid2(),
12
+ provider: zod_1.default.enum(constants_1.GATEWAY_PROVIDER),
13
+ currency: zod_1.default.string(),
14
+ bankName: zod_1.default.string(),
15
+ accountLast4: zod_1.default.string(),
16
+ accountName: zod_1.default.string(),
17
+ externalBankId: zod_1.default.string(),
18
+ isDefault: zod_1.default.boolean(),
19
+ status: zod_1.default.enum(constants_1.PAYMENT_METHOD_STATUS).default(constants_1.PAYMENT_METHOD_STATUS.PENDING),
20
+ createdAt: zod_1.default.coerce.date(),
21
+ updatedAt: zod_1.default.coerce.date(),
22
+ });
23
+ exports.CreatePayoutMethodEntitySchema = zod_1.default.object({
24
+ provider: zod_1.default.enum(constants_1.GATEWAY_PROVIDER),
25
+ bankName: zod_1.default.string(),
26
+ accountLast4: zod_1.default.string(),
27
+ accountName: zod_1.default.string(),
28
+ });
@@ -0,0 +1,30 @@
1
+ import z from "zod";
2
+ export declare const SellerEntitySchema: z.ZodObject<{
3
+ id: z.ZodCUID2;
4
+ businessName: z.ZodString;
5
+ countryOfOperation: z.ZodEnum<{
6
+ readonly NG: "NG";
7
+ readonly GB: "GB";
8
+ }>;
9
+ stripeConnectId: z.ZodNullable<z.ZodString>;
10
+ paystackSubaccountCode: z.ZodNullable<z.ZodString>;
11
+ status: z.ZodDefault<z.ZodEnum<{
12
+ readonly ACTIVE: "ACTIVE";
13
+ readonly PENDING: "PENDING";
14
+ readonly SUSPENDED: "SUSPENDED";
15
+ }>>;
16
+ createdAt: z.ZodCoercedDate<unknown>;
17
+ updatedAt: z.ZodCoercedDate<unknown>;
18
+ }, z.core.$strip>;
19
+ export type SellerEntity = z.infer<typeof SellerEntitySchema>;
20
+ export declare const CreateSellerEntityInputSchema: z.ZodObject<{
21
+ businessName: z.ZodString;
22
+ countryOfOperation: z.ZodEnum<{
23
+ readonly NG: "NG";
24
+ readonly GB: "GB";
25
+ }>;
26
+ bankCode: z.ZodNullable<z.ZodString>;
27
+ accountNumber: z.ZodString;
28
+ accountName: z.ZodString;
29
+ }, z.core.$strip>;
30
+ export type CreateSellerInput = z.infer<typeof CreateSellerEntityInputSchema>;
@@ -0,0 +1,25 @@
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.CreateSellerEntityInputSchema = exports.SellerEntitySchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const constants_1 = require("../constants");
9
+ exports.SellerEntitySchema = zod_1.default.object({
10
+ id: zod_1.default.cuid2(),
11
+ businessName: zod_1.default.string(),
12
+ countryOfOperation: zod_1.default.enum(constants_1.COUNTRY_OF_OPERATION),
13
+ stripeConnectId: zod_1.default.string().nullable(),
14
+ paystackSubaccountCode: zod_1.default.string().nullable(),
15
+ status: zod_1.default.enum(constants_1.SELLER_STATUS).default(constants_1.SELLER_STATUS.PENDING),
16
+ createdAt: zod_1.default.coerce.date(),
17
+ updatedAt: zod_1.default.coerce.date(),
18
+ });
19
+ exports.CreateSellerEntityInputSchema = zod_1.default.object({
20
+ businessName: zod_1.default.string(),
21
+ countryOfOperation: zod_1.default.enum(constants_1.COUNTRY_OF_OPERATION),
22
+ bankCode: zod_1.default.string().nullable(),
23
+ accountNumber: zod_1.default.string(),
24
+ accountName: zod_1.default.string(),
25
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.82",
3
+ "version": "2.2.84",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/constants.ts CHANGED
@@ -24,6 +24,18 @@ export const EXPERIENCE_LEVELS = {
24
24
  YEAR_5_PLUS: "5+ years",
25
25
  } as const;
26
26
 
27
+ export const SELLER_STATUS = {
28
+ ACTIVE: "ACTIVE",
29
+ PENDING: "PENDING",
30
+ SUSPENDED: "SUSPENDED",
31
+ } as const;
32
+
33
+ export const PAYMENT_METHOD_STATUS = {
34
+ VERIFIED: "VERIFIED",
35
+ PENDING: "PENDING",
36
+ REJECTED: "REJECTED",
37
+ } as const;
38
+
27
39
  export const ONBOARDING_PAGES = {
28
40
  EMAIL_VERIFICATION: "EMAIL_VERIFICATION",
29
41
  USERNAME_SELECTION: "USERNAME_SELECTION",
@@ -291,6 +303,16 @@ export const SIGNAL_STATUS = {
291
303
  ARCHIVED: "ARCHIVED",
292
304
  } as const;
293
305
 
306
+ export const COUNTRY_OF_OPERATION = {
307
+ NG: "NG",
308
+ GB: "GB",
309
+ } as const;
310
+
311
+ export const GATEWAY_PROVIDER = {
312
+ PAYSTACK: "PAYSTACK",
313
+ STRIPE: "STRIPE",
314
+ } as const;
315
+
294
316
  export type SignalInterestType =
295
317
  (typeof SIGNAL_INTEREST_TYPES)[keyof typeof SIGNAL_INTEREST_TYPES];
296
318
  export type SignalStatus = (typeof SIGNAL_STATUS)[keyof typeof SIGNAL_STATUS];
@@ -339,7 +361,13 @@ export type InvestorVerificationDocumentType =
339
361
  export type VentureStage = (typeof VENTURE_STAGES)[keyof typeof VENTURE_STAGES];
340
362
  export type ProjectStatus =
341
363
  (typeof PROJECT_STATUS)[keyof typeof PROJECT_STATUS];
342
-
364
+ export type SellerStatus = (typeof SELLER_STATUS)[keyof typeof SELLER_STATUS];
365
+ export type CountryOfOperation =
366
+ (typeof COUNTRY_OF_OPERATION)[keyof typeof COUNTRY_OF_OPERATION];
367
+ export type GatewayProvider =
368
+ (typeof GATEWAY_PROVIDER)[keyof typeof GATEWAY_PROVIDER];
369
+ export type PaymentMethodStatus =
370
+ (typeof PAYMENT_METHOD_STATUS)[keyof typeof PAYMENT_METHOD_STATUS];
343
371
  export const API_ROUTES = {
344
372
  healthCheck: "/health",
345
373
  username: {
@@ -22,3 +22,5 @@ export * from "./bookmark";
22
22
  export * from "./like";
23
23
  export * from "./investor-signal";
24
24
  export * from "./investor-shortlist";
25
+ export * from "./payout-method";
26
+ export * from "./seller";
@@ -0,0 +1,31 @@
1
+ import z from "zod";
2
+ import {
3
+ GATEWAY_PROVIDER,
4
+ PAYMENT_METHOD_STATUS,
5
+ } from "../constants";
6
+
7
+ export const PayoutMethodEntitySchema = z.object({
8
+ id: z.cuid2(),
9
+ sellerId: z.cuid2(),
10
+ provider: z.enum(GATEWAY_PROVIDER),
11
+ currency: z.string(),
12
+ bankName: z.string(),
13
+ accountLast4: z.string(),
14
+ accountName: z.string(),
15
+ externalBankId: z.string(),
16
+ isDefault: z.boolean(),
17
+ status: z.enum(PAYMENT_METHOD_STATUS).default(PAYMENT_METHOD_STATUS.PENDING),
18
+ createdAt: z.coerce.date(),
19
+ updatedAt: z.coerce.date(),
20
+ });
21
+ export type PayoutMethodEntity = z.infer<typeof PayoutMethodEntitySchema>;
22
+
23
+ export const CreatePayoutMethodEntitySchema = z.object({
24
+ provider: z.enum(GATEWAY_PROVIDER),
25
+ bankName: z.string(),
26
+ accountLast4: z.string(),
27
+ accountName: z.string(),
28
+ });
29
+ export type CreatePayoutMethodInput = z.infer<
30
+ typeof CreatePayoutMethodEntitySchema
31
+ >;
@@ -0,0 +1,23 @@
1
+ import z from "zod";
2
+ import { COUNTRY_OF_OPERATION, SELLER_STATUS } from "../constants";
3
+
4
+ export const SellerEntitySchema = z.object({
5
+ id: z.cuid2(),
6
+ businessName: z.string(),
7
+ countryOfOperation: z.enum(COUNTRY_OF_OPERATION),
8
+ stripeConnectId: z.string().nullable(),
9
+ paystackSubaccountCode: z.string().nullable(),
10
+ status: z.enum(SELLER_STATUS).default(SELLER_STATUS.PENDING),
11
+ createdAt: z.coerce.date(),
12
+ updatedAt: z.coerce.date(),
13
+ });
14
+ export type SellerEntity = z.infer<typeof SellerEntitySchema>;
15
+
16
+ export const CreateSellerEntityInputSchema = z.object({
17
+ businessName: z.string(),
18
+ countryOfOperation: z.enum(COUNTRY_OF_OPERATION),
19
+ bankCode: z.string().nullable(),
20
+ accountNumber: z.string(),
21
+ accountName: z.string(),
22
+ });
23
+ export type CreateSellerInput = z.infer<typeof CreateSellerEntityInputSchema>;