@zyacreatives/shared 2.2.81 → 2.2.83
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.
- package/dist/constants.d.ts +22 -0
- package/dist/constants.js +19 -1
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/payout-method.d.ts +33 -0
- package/dist/schemas/payout-method.js +28 -0
- package/dist/schemas/seller.d.ts +30 -0
- package/dist/schemas/seller.js +25 -0
- package/dist/schemas/user.d.ts +73 -74
- package/dist/schemas/user.js +4 -4
- package/package.json +1 -1
- package/src/constants.ts +29 -1
- package/src/schemas/index.ts +2 -0
- package/src/schemas/payout-method.ts +31 -0
- package/src/schemas/seller.ts +23 -0
- package/src/schemas/user.ts +5 -5
package/dist/constants.d.ts
CHANGED
|
@@ -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
|
+
ACTIVE: string;
|
|
25
|
+
PENDING: string;
|
|
26
|
+
SUSPENDED: string;
|
|
27
|
+
};
|
|
28
|
+
export declare const PAYMENT_METHOD_STATUS: {
|
|
29
|
+
VERIFIED: string;
|
|
30
|
+
PENDING: string;
|
|
31
|
+
REJECTED: string;
|
|
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
|
+
NG: string;
|
|
273
|
+
GB: string;
|
|
274
|
+
};
|
|
275
|
+
export declare const GATEWAY_PROVIDER: {
|
|
276
|
+
PAYSTACK: string;
|
|
277
|
+
STRIPE: string;
|
|
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: {
|
package/dist/schemas/index.d.ts
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -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
|
+
PAYSTACK: string;
|
|
7
|
+
STRIPE: string;
|
|
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
|
+
VERIFIED: string;
|
|
17
|
+
PENDING: string;
|
|
18
|
+
REJECTED: string;
|
|
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
|
+
PAYSTACK: string;
|
|
27
|
+
STRIPE: string;
|
|
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
|
+
NG: string;
|
|
7
|
+
GB: string;
|
|
8
|
+
}>;
|
|
9
|
+
stripeConnectId: z.ZodNullable<z.ZodString>;
|
|
10
|
+
paystackSubaccountCode: z.ZodNullable<z.ZodString>;
|
|
11
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
12
|
+
ACTIVE: string;
|
|
13
|
+
PENDING: string;
|
|
14
|
+
SUSPENDED: string;
|
|
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
|
+
NG: string;
|
|
24
|
+
GB: string;
|
|
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/dist/schemas/user.d.ts
CHANGED
|
@@ -638,6 +638,79 @@ export declare const GetUserWithPostBookmarksInputSchema: z.ZodObject<{
|
|
|
638
638
|
limit: z.ZodNullable<z.ZodOptional<z.ZodInt>>;
|
|
639
639
|
}, z.core.$strip>;
|
|
640
640
|
export declare const GetUserWithProjectBookmarksOutputSchema: z.ZodObject<{
|
|
641
|
+
bookmarks: z.ZodObject<{
|
|
642
|
+
userId: z.ZodCUID2;
|
|
643
|
+
projectBookmarks: z.ZodArray<z.ZodObject<{
|
|
644
|
+
id: z.ZodCUID2;
|
|
645
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
646
|
+
userId: z.ZodCUID2;
|
|
647
|
+
parentId: z.ZodCUID2;
|
|
648
|
+
parentType: z.ZodEnum<{
|
|
649
|
+
readonly PROJECT: "PROJECT";
|
|
650
|
+
readonly USER: "USER";
|
|
651
|
+
readonly JOB: "JOB";
|
|
652
|
+
readonly POST: "POST";
|
|
653
|
+
readonly COMMENT: "COMMENT";
|
|
654
|
+
readonly JOB_APPLICATION: "JOB_APPLICATION";
|
|
655
|
+
}>;
|
|
656
|
+
project: z.ZodObject<{
|
|
657
|
+
id: z.ZodString;
|
|
658
|
+
userId: z.ZodString;
|
|
659
|
+
title: z.ZodString;
|
|
660
|
+
imagePlaceholderUrl: z.ZodURL;
|
|
661
|
+
projectCreatorType: z.ZodEnum<{
|
|
662
|
+
readonly CREATIVE: "CREATIVE";
|
|
663
|
+
readonly BRAND: "BRAND";
|
|
664
|
+
readonly INVESTOR: "INVESTOR";
|
|
665
|
+
readonly ADMIN: "ADMIN";
|
|
666
|
+
}>;
|
|
667
|
+
createdAt: z.ZodNumber;
|
|
668
|
+
updatedAt: z.ZodNumber;
|
|
669
|
+
description: z.ZodOptional<z.ZodString>;
|
|
670
|
+
capitalLookingToRaise: z.ZodOptional<z.ZodString>;
|
|
671
|
+
capitalLookingToRaiseCurrency: z.ZodOptional<z.ZodEnum<{
|
|
672
|
+
readonly USD: "USD (United States Dollar)";
|
|
673
|
+
readonly EUR: "EUR (Euro)";
|
|
674
|
+
readonly GBP: "GBP (British Pound Sterling)";
|
|
675
|
+
readonly NGN: "NGN (Nigerian Naira)";
|
|
676
|
+
readonly CAD: "CAD (Canadian Dollar)";
|
|
677
|
+
readonly AUD: "AUD (Australian Dollar)";
|
|
678
|
+
readonly JPY: "JPY (Japanese Yen)";
|
|
679
|
+
readonly CHF: "CHF (Swiss Franc)";
|
|
680
|
+
readonly INR: "INR (Indian Rupee)";
|
|
681
|
+
readonly ZAR: "ZAR (South African Rand)";
|
|
682
|
+
}>>;
|
|
683
|
+
ventureStage: z.ZodOptional<z.ZodEnum<{
|
|
684
|
+
readonly IDEA: "Idea";
|
|
685
|
+
readonly PRE_SEED: "Pre Seed";
|
|
686
|
+
readonly MVP: "MVP";
|
|
687
|
+
readonly SEED: "Seed";
|
|
688
|
+
readonly SERIES_A: "Series A";
|
|
689
|
+
readonly SERIES_B: "Series B";
|
|
690
|
+
readonly SERIES_C: "Series C";
|
|
691
|
+
readonly GROWTH: "Growth";
|
|
692
|
+
readonly EXIT: "Exit";
|
|
693
|
+
}>>;
|
|
694
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
695
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
696
|
+
creatorUsername: z.ZodString;
|
|
697
|
+
creatorImageUrl: z.ZodString;
|
|
698
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
699
|
+
clientType: z.ZodOptional<z.ZodEnum<{
|
|
700
|
+
readonly CREATIVE: "CREATIVE";
|
|
701
|
+
readonly BRAND: "BRAND";
|
|
702
|
+
readonly NONE: "NONE";
|
|
703
|
+
}>>;
|
|
704
|
+
clientName: z.ZodOptional<z.ZodString>;
|
|
705
|
+
isFeatured: z.ZodOptional<z.ZodBoolean>;
|
|
706
|
+
startDate: z.ZodOptional<z.ZodNumber>;
|
|
707
|
+
endDate: z.ZodOptional<z.ZodNumber>;
|
|
708
|
+
}, z.core.$strip>;
|
|
709
|
+
}, z.core.$strip>>;
|
|
710
|
+
}, z.core.$strip>;
|
|
711
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
712
|
+
}, z.core.$strip>;
|
|
713
|
+
export declare const GetUserWithPostBookmarksOutputSchema: z.ZodObject<{
|
|
641
714
|
bookmarks: z.ZodArray<z.ZodObject<{
|
|
642
715
|
id: z.ZodCUID2;
|
|
643
716
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -729,80 +802,6 @@ export declare const GetUserWithProjectBookmarksOutputSchema: z.ZodObject<{
|
|
|
729
802
|
}, z.core.$strip>>;
|
|
730
803
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
731
804
|
}, z.core.$strip>;
|
|
732
|
-
export declare const GetUserWithPostBookmarksOutputSchema: z.ZodObject<{
|
|
733
|
-
bookmarks: z.ZodObject<{
|
|
734
|
-
userId: z.ZodCUID2;
|
|
735
|
-
postBookmarks: z.ZodArray<z.ZodObject<{
|
|
736
|
-
id: z.ZodCUID2;
|
|
737
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
738
|
-
userId: z.ZodCUID2;
|
|
739
|
-
parentId: z.ZodCUID2;
|
|
740
|
-
parentType: z.ZodEnum<{
|
|
741
|
-
readonly PROJECT: "PROJECT";
|
|
742
|
-
readonly USER: "USER";
|
|
743
|
-
readonly JOB: "JOB";
|
|
744
|
-
readonly POST: "POST";
|
|
745
|
-
readonly COMMENT: "COMMENT";
|
|
746
|
-
readonly JOB_APPLICATION: "JOB_APPLICATION";
|
|
747
|
-
}>;
|
|
748
|
-
post: z.ZodObject<{
|
|
749
|
-
id: z.ZodCUID2;
|
|
750
|
-
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
751
|
-
parentType: z.ZodDefault<z.ZodEnum<{
|
|
752
|
-
readonly PROJECT: "PROJECT";
|
|
753
|
-
readonly USER: "USER";
|
|
754
|
-
readonly JOB: "JOB";
|
|
755
|
-
readonly POST: "POST";
|
|
756
|
-
readonly COMMENT: "COMMENT";
|
|
757
|
-
readonly JOB_APPLICATION: "JOB_APPLICATION";
|
|
758
|
-
}>>;
|
|
759
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
760
|
-
name: z.ZodString;
|
|
761
|
-
id: z.ZodInt;
|
|
762
|
-
}, z.core.$strip>>>;
|
|
763
|
-
badge: z.ZodOptional<z.ZodEnum<{
|
|
764
|
-
readonly NETWORKING: "Networking";
|
|
765
|
-
readonly FUNDING: "Funding";
|
|
766
|
-
readonly COLLABORATION: "Collaboration";
|
|
767
|
-
readonly OPPORTUNITIES: "Opportunities";
|
|
768
|
-
readonly SHOWCASE: "Showcase";
|
|
769
|
-
readonly LEARNING: "Learning";
|
|
770
|
-
readonly DISCUSSION: "Discussion";
|
|
771
|
-
readonly MENTORSHIP: "Mentorship";
|
|
772
|
-
}>>;
|
|
773
|
-
userId: z.ZodCUID2;
|
|
774
|
-
creatorUsername: z.ZodOptional<z.ZodString>;
|
|
775
|
-
creatorFullName: z.ZodOptional<z.ZodString>;
|
|
776
|
-
creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
|
|
777
|
-
content: z.ZodOptional<z.ZodString>;
|
|
778
|
-
postType: z.ZodEnum<{
|
|
779
|
-
readonly MARKETPLACE: "MARKETPLACE";
|
|
780
|
-
readonly PROJECT: "PROJECT";
|
|
781
|
-
readonly JOB_OPENING: "JOB_OPENING";
|
|
782
|
-
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
783
|
-
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
784
|
-
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
785
|
-
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
786
|
-
}>;
|
|
787
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
788
|
-
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
789
|
-
url: z.ZodURL;
|
|
790
|
-
title: z.ZodOptional<z.ZodString>;
|
|
791
|
-
description: z.ZodOptional<z.ZodString>;
|
|
792
|
-
image: z.ZodOptional<z.ZodURL>;
|
|
793
|
-
}, z.core.$strip>>;
|
|
794
|
-
postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
795
|
-
id: z.ZodCUID2;
|
|
796
|
-
postId: z.ZodCUID2;
|
|
797
|
-
fileId: z.ZodCUID2;
|
|
798
|
-
order: z.ZodNumber;
|
|
799
|
-
url: z.ZodURL;
|
|
800
|
-
}, z.core.$strip>>>;
|
|
801
|
-
}, z.core.$strip>;
|
|
802
|
-
}, z.core.$strip>>;
|
|
803
|
-
}, z.core.$strip>;
|
|
804
|
-
nextCursor: z.ZodNullable<z.ZodString>;
|
|
805
|
-
}, z.core.$strip>;
|
|
806
805
|
export declare const UserWithFollowingEntitySchema: z.ZodObject<{
|
|
807
806
|
email: z.ZodEmail;
|
|
808
807
|
username: z.ZodOptional<z.ZodString>;
|
package/dist/schemas/user.js
CHANGED
|
@@ -160,13 +160,13 @@ exports.UserWithPostBookmarksEntitySchema = zod_openapi_1.z.object({
|
|
|
160
160
|
exports.GetUserWithProjectBookmarksInputSchema = exports.UserWithJobBookmarksInputSchema;
|
|
161
161
|
exports.GetUserWithPostBookmarksInputSchema = exports.UserWithJobBookmarksInputSchema;
|
|
162
162
|
exports.GetUserWithProjectBookmarksOutputSchema = zod_openapi_1.z.object({
|
|
163
|
-
bookmarks:
|
|
164
|
-
post: post_1.FeedPostEntitySchema,
|
|
165
|
-
})),
|
|
163
|
+
bookmarks: exports.UserWithProjectBookmarksEntitySchema,
|
|
166
164
|
nextCursor: zod_openapi_1.z.string().nullable(),
|
|
167
165
|
});
|
|
168
166
|
exports.GetUserWithPostBookmarksOutputSchema = zod_openapi_1.z.object({
|
|
169
|
-
bookmarks:
|
|
167
|
+
bookmarks: zod_openapi_1.z.array(bookmark_1.BookmarkEntitySchema.extend({
|
|
168
|
+
post: post_1.FeedPostEntitySchema,
|
|
169
|
+
})),
|
|
170
170
|
nextCursor: zod_openapi_1.z.string().nullable(),
|
|
171
171
|
});
|
|
172
172
|
// ==========================================
|
package/package.json
CHANGED
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
|
+
};
|
|
32
|
+
|
|
33
|
+
export const PAYMENT_METHOD_STATUS = {
|
|
34
|
+
VERIFIED: "VERIFIED",
|
|
35
|
+
PENDING: "PENDING",
|
|
36
|
+
REJECTED: "REJECTED",
|
|
37
|
+
};
|
|
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
|
+
};
|
|
310
|
+
|
|
311
|
+
export const GATEWAY_PROVIDER = {
|
|
312
|
+
PAYSTACK: "PAYSTACK",
|
|
313
|
+
STRIPE: "STRIPE",
|
|
314
|
+
};
|
|
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: {
|
package/src/schemas/index.ts
CHANGED
|
@@ -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>;
|
package/src/schemas/user.ts
CHANGED
|
@@ -211,6 +211,11 @@ export const GetUserWithPostBookmarksInputSchema =
|
|
|
211
211
|
UserWithJobBookmarksInputSchema;
|
|
212
212
|
|
|
213
213
|
export const GetUserWithProjectBookmarksOutputSchema = z.object({
|
|
214
|
+
bookmarks: UserWithProjectBookmarksEntitySchema,
|
|
215
|
+
nextCursor: z.string().nullable(),
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
export const GetUserWithPostBookmarksOutputSchema = z.object({
|
|
214
219
|
bookmarks: z.array(
|
|
215
220
|
BookmarkEntitySchema.extend({
|
|
216
221
|
post: FeedPostEntitySchema,
|
|
@@ -219,11 +224,6 @@ export const GetUserWithProjectBookmarksOutputSchema = z.object({
|
|
|
219
224
|
nextCursor: z.string().nullable(),
|
|
220
225
|
});
|
|
221
226
|
|
|
222
|
-
export const GetUserWithPostBookmarksOutputSchema = z.object({
|
|
223
|
-
bookmarks: UserWithPostBookmarksEntitySchema,
|
|
224
|
-
nextCursor: z.string().nullable(),
|
|
225
|
-
});
|
|
226
|
-
|
|
227
227
|
// ==========================================
|
|
228
228
|
// 5. FOLLOWERS & FOLLOWING
|
|
229
229
|
// ==========================================
|