@myrjfa/state 1.0.3 → 1.0.4
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/lib/actions.d.ts +2 -2
- package/dist/lib/fetcher.d.ts +1 -1
- package/dist/lib/fetcher.d.ts.map +1 -1
- package/dist/lib/fetcher.js +36 -30
- package/dist/lib/models/blog.d.ts +64 -64
- package/dist/lib/models/portfolio.d.ts +42 -42
- package/dist/lib/models/review.d.ts +2 -2
- package/dist/lib/models/volunteerJob.d.ts +379 -379
- package/dist/lib/userAtom.d.ts +4 -4
- package/package.json +1 -1
package/dist/lib/actions.d.ts
CHANGED
|
@@ -84,8 +84,8 @@ export declare function getAllNotifications(): Promise<{
|
|
|
84
84
|
success: boolean;
|
|
85
85
|
message: string;
|
|
86
86
|
notifs: {
|
|
87
|
-
_id: string;
|
|
88
87
|
message: string;
|
|
88
|
+
_id: string;
|
|
89
89
|
userId: string;
|
|
90
90
|
timestamp: Date;
|
|
91
91
|
read: boolean;
|
|
@@ -104,8 +104,8 @@ export declare function getNotifications(limit: number): Promise<{
|
|
|
104
104
|
success: boolean;
|
|
105
105
|
message: string;
|
|
106
106
|
notifs: {
|
|
107
|
-
_id: string;
|
|
108
107
|
message: string;
|
|
108
|
+
_id: string;
|
|
109
109
|
userId: string;
|
|
110
110
|
timestamp: Date;
|
|
111
111
|
read: boolean;
|
package/dist/lib/fetcher.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type FetchMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
2
2
|
export declare function refreshToken<T>(input: string, method: FetchMethod, body?: any): Promise<T>;
|
|
3
|
-
export declare function get<T>(url: string): Promise<T>;
|
|
3
|
+
export declare function get<T>(url: string, includeAuth?: boolean): Promise<T>;
|
|
4
4
|
export declare function post<T>(url: string, body: any): Promise<T>;
|
|
5
5
|
export declare function put<T>(url: string, body: any): Promise<T>;
|
|
6
6
|
export declare function patch<T>(url: string, body: any): Promise<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetcher.d.ts","sourceRoot":"","sources":["../../src/lib/fetcher.ts"],"names":[],"mappings":"AAKA,KAAK,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"fetcher.d.ts","sourceRoot":"","sources":["../../src/lib/fetcher.ts"],"names":[],"mappings":"AAKA,KAAK,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAsE/D,wBAAsB,YAAY,CAAC,CAAC,EAChC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,WAAW,EACnB,IAAI,CAAC,EAAE,GAAG,GACX,OAAO,CAAC,CAAC,CAAC,CAiBZ;AAID,wBAAsB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,GAAE,OAAc,cAEpE;AAED,wBAAsB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,cAEnD;AAED,wBAAsB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,cAElD;AAED,wBAAsB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,cAEpD;AAED,wBAAsB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,cAEnD"}
|
package/dist/lib/fetcher.js
CHANGED
|
@@ -1,33 +1,38 @@
|
|
|
1
1
|
import { ApiError } from "next/dist/server/api-utils";
|
|
2
2
|
import { getCookieHeader, getRole } from "./severActions";
|
|
3
3
|
const baseURL = process.env.NEXT_PUBLIC_API_URL;
|
|
4
|
-
async function customFetch(input, method, body,
|
|
4
|
+
async function customFetch(input, method, body, options = {}) {
|
|
5
|
+
const { includeAuth = false, retry = true } = options;
|
|
5
6
|
const url = `${baseURL}${input}`;
|
|
6
7
|
const isFormData = typeof FormData !== 'undefined' && body instanceof FormData;
|
|
7
|
-
|
|
8
|
+
let headers = isFormData
|
|
9
|
+
? { Accept: 'application/json' }
|
|
10
|
+
: { 'Content-Type': 'application/json', Accept: 'application/json' };
|
|
11
|
+
if (includeAuth) {
|
|
12
|
+
try {
|
|
13
|
+
const cookieHeader = await getCookieHeader();
|
|
14
|
+
headers = { ...headers, Cookie: cookieHeader };
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
// If we can't get cookies (CSR context), credentials: 'include' will handle it
|
|
18
|
+
console.warn('Could not get cookies for auth header:', error);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
8
21
|
const init = {
|
|
9
22
|
method,
|
|
10
23
|
credentials: 'include',
|
|
11
|
-
headers
|
|
12
|
-
? {
|
|
13
|
-
Accept: 'application/json',
|
|
14
|
-
Cookie: cookieHeader,
|
|
15
|
-
} // Let browser set correct Content-Type for FormData
|
|
16
|
-
: {
|
|
17
|
-
'Content-Type': 'application/json',
|
|
18
|
-
Accept: 'application/json',
|
|
19
|
-
Cookie: cookieHeader,
|
|
20
|
-
},
|
|
24
|
+
headers,
|
|
21
25
|
...(body ? { body: isFormData ? body : JSON.stringify(body) } : {}),
|
|
22
26
|
};
|
|
23
27
|
const response = await fetch(url, init);
|
|
24
28
|
if (response.ok) {
|
|
25
29
|
return response.status !== 204 ? (await response.json()) : {};
|
|
26
30
|
}
|
|
27
|
-
// Token refresh logic on 401
|
|
28
|
-
if (response.status === 401 && retry && !input.includes('/login')) {
|
|
29
|
-
return refreshToken(input, method, body);
|
|
31
|
+
// Token refresh logic on 401 (only for authenticated requests)
|
|
32
|
+
if (response.status === 401 && retry && includeAuth && !input.includes('/login')) {
|
|
33
|
+
return await refreshToken(input, method, body);
|
|
30
34
|
}
|
|
35
|
+
// Error handling
|
|
31
36
|
let errorBody;
|
|
32
37
|
try {
|
|
33
38
|
errorBody = (await response.json());
|
|
@@ -40,39 +45,40 @@ async function customFetch(input, method, body, retry = true) {
|
|
|
40
45
|
}
|
|
41
46
|
throw new ApiError(errorBody.statusCode, errorBody.error);
|
|
42
47
|
}
|
|
48
|
+
// Token refresh function
|
|
43
49
|
export async function refreshToken(input, method, body) {
|
|
44
50
|
const role = await getRole();
|
|
45
51
|
try {
|
|
46
|
-
const
|
|
52
|
+
const roleForEndpoint = role == "admin" ? "user" : role;
|
|
53
|
+
const response = await fetch(`${baseURL}/${roleForEndpoint}s/refresh-token`, {
|
|
47
54
|
method: 'POST',
|
|
48
55
|
credentials: 'include',
|
|
49
56
|
});
|
|
50
57
|
const data = await response.json();
|
|
51
|
-
if (response.ok)
|
|
52
|
-
return customFetch(input, method, body, false);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
+
if (response.ok) {
|
|
59
|
+
return customFetch(input, method, body, { includeAuth: true, retry: false });
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
throw { statusCode: 401, error: data.error };
|
|
63
|
+
}
|
|
58
64
|
}
|
|
59
65
|
catch (error) {
|
|
60
66
|
throw new ApiError(error.statusCode ?? 500, error.error);
|
|
61
67
|
}
|
|
62
68
|
}
|
|
63
|
-
//
|
|
64
|
-
export async function get(url) {
|
|
65
|
-
return customFetch(url, 'GET');
|
|
69
|
+
// ✅ Sever-safe exported functions
|
|
70
|
+
export async function get(url, includeAuth = true) {
|
|
71
|
+
return customFetch(url, 'GET', undefined, { includeAuth });
|
|
66
72
|
}
|
|
67
73
|
export async function post(url, body) {
|
|
68
|
-
return customFetch(url, 'POST', body);
|
|
74
|
+
return customFetch(url, 'POST', body, { includeAuth: true });
|
|
69
75
|
}
|
|
70
76
|
export async function put(url, body) {
|
|
71
|
-
return customFetch(url, 'PUT', body);
|
|
77
|
+
return customFetch(url, 'PUT', body, { includeAuth: true });
|
|
72
78
|
}
|
|
73
79
|
export async function patch(url, body) {
|
|
74
|
-
return customFetch(url, 'PATCH', body);
|
|
80
|
+
return customFetch(url, 'PATCH', body, { includeAuth: true });
|
|
75
81
|
}
|
|
76
82
|
export async function del(url, body) {
|
|
77
|
-
return customFetch(url, 'DELETE', body);
|
|
83
|
+
return customFetch(url, 'DELETE', body, { includeAuth: true });
|
|
78
84
|
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const BlogStatusSchema: z.ZodEnum<["draft", "posted", "archived", "pending", "denied"]>;
|
|
3
|
-
export type BlogStatus = z.infer<typeof BlogStatusSchema>;
|
|
4
|
-
export declare const BlogSchema: z.ZodObject<{
|
|
5
|
-
slug: z.ZodString;
|
|
6
|
-
title: z.ZodString;
|
|
7
|
-
overview: z.ZodString;
|
|
8
|
-
hashtags: z.ZodOptional<z.ZodString>;
|
|
9
|
-
content: z.ZodString;
|
|
10
|
-
blogImages: z.ZodArray<z.ZodString, "many">;
|
|
11
|
-
status: z.ZodEnum<["draft", "posted", "archived", "pending", "denied"]>;
|
|
12
|
-
views: z.ZodNumber;
|
|
13
|
-
likes: z.ZodNumber;
|
|
14
|
-
comments: z.ZodNumber;
|
|
15
|
-
shares: z.ZodNumber;
|
|
16
|
-
createdAt: z.ZodDate;
|
|
17
|
-
updatedAt: z.ZodDate;
|
|
18
|
-
author: z.ZodString;
|
|
19
|
-
authorImage: z.ZodString;
|
|
20
|
-
authorRole: z.ZodEnum<["host", "admin", "user"]>;
|
|
21
|
-
}, "strict", z.ZodTypeAny, {
|
|
22
|
-
status: "draft" | "posted" | "archived" | "pending" | "denied";
|
|
23
|
-
title: string;
|
|
24
|
-
createdAt: Date;
|
|
25
|
-
updatedAt: Date;
|
|
26
|
-
slug: string;
|
|
27
|
-
overview: string;
|
|
28
|
-
content: string;
|
|
29
|
-
blogImages: string[];
|
|
30
|
-
views: number;
|
|
31
|
-
likes: number;
|
|
32
|
-
comments: number;
|
|
33
|
-
shares: number;
|
|
34
|
-
author: string;
|
|
35
|
-
authorImage: string;
|
|
36
|
-
authorRole: "host" | "user" | "admin";
|
|
37
|
-
hashtags?: string | undefined;
|
|
38
|
-
}, {
|
|
39
|
-
status: "draft" | "posted" | "archived" | "pending" | "denied";
|
|
40
|
-
title: string;
|
|
41
|
-
createdAt: Date;
|
|
42
|
-
updatedAt: Date;
|
|
43
|
-
slug: string;
|
|
44
|
-
overview: string;
|
|
45
|
-
content: string;
|
|
46
|
-
blogImages: string[];
|
|
47
|
-
views: number;
|
|
48
|
-
likes: number;
|
|
49
|
-
comments: number;
|
|
50
|
-
shares: number;
|
|
51
|
-
author: string;
|
|
52
|
-
authorImage: string;
|
|
53
|
-
authorRole: "host" | "user" | "admin";
|
|
54
|
-
hashtags?: string | undefined;
|
|
55
|
-
}>;
|
|
56
|
-
export type Blog = z.infer<typeof BlogSchema>;
|
|
57
|
-
export type BlogMetaData = {
|
|
58
|
-
image: string;
|
|
59
|
-
title: string;
|
|
60
|
-
overview: string;
|
|
61
|
-
};
|
|
62
|
-
export declare const hashTagOptions: {
|
|
63
|
-
title: string;
|
|
64
|
-
}[];
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const BlogStatusSchema: z.ZodEnum<["draft", "posted", "archived", "pending", "denied"]>;
|
|
3
|
+
export type BlogStatus = z.infer<typeof BlogStatusSchema>;
|
|
4
|
+
export declare const BlogSchema: z.ZodObject<{
|
|
5
|
+
slug: z.ZodString;
|
|
6
|
+
title: z.ZodString;
|
|
7
|
+
overview: z.ZodString;
|
|
8
|
+
hashtags: z.ZodOptional<z.ZodString>;
|
|
9
|
+
content: z.ZodString;
|
|
10
|
+
blogImages: z.ZodArray<z.ZodString, "many">;
|
|
11
|
+
status: z.ZodEnum<["draft", "posted", "archived", "pending", "denied"]>;
|
|
12
|
+
views: z.ZodNumber;
|
|
13
|
+
likes: z.ZodNumber;
|
|
14
|
+
comments: z.ZodNumber;
|
|
15
|
+
shares: z.ZodNumber;
|
|
16
|
+
createdAt: z.ZodDate;
|
|
17
|
+
updatedAt: z.ZodDate;
|
|
18
|
+
author: z.ZodString;
|
|
19
|
+
authorImage: z.ZodString;
|
|
20
|
+
authorRole: z.ZodEnum<["host", "admin", "user"]>;
|
|
21
|
+
}, "strict", z.ZodTypeAny, {
|
|
22
|
+
status: "draft" | "posted" | "archived" | "pending" | "denied";
|
|
23
|
+
title: string;
|
|
24
|
+
createdAt: Date;
|
|
25
|
+
updatedAt: Date;
|
|
26
|
+
slug: string;
|
|
27
|
+
overview: string;
|
|
28
|
+
content: string;
|
|
29
|
+
blogImages: string[];
|
|
30
|
+
views: number;
|
|
31
|
+
likes: number;
|
|
32
|
+
comments: number;
|
|
33
|
+
shares: number;
|
|
34
|
+
author: string;
|
|
35
|
+
authorImage: string;
|
|
36
|
+
authorRole: "host" | "user" | "admin";
|
|
37
|
+
hashtags?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
status: "draft" | "posted" | "archived" | "pending" | "denied";
|
|
40
|
+
title: string;
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
updatedAt: Date;
|
|
43
|
+
slug: string;
|
|
44
|
+
overview: string;
|
|
45
|
+
content: string;
|
|
46
|
+
blogImages: string[];
|
|
47
|
+
views: number;
|
|
48
|
+
likes: number;
|
|
49
|
+
comments: number;
|
|
50
|
+
shares: number;
|
|
51
|
+
author: string;
|
|
52
|
+
authorImage: string;
|
|
53
|
+
authorRole: "host" | "user" | "admin";
|
|
54
|
+
hashtags?: string | undefined;
|
|
55
|
+
}>;
|
|
56
|
+
export type Blog = z.infer<typeof BlogSchema>;
|
|
57
|
+
export type BlogMetaData = {
|
|
58
|
+
image: string;
|
|
59
|
+
title: string;
|
|
60
|
+
overview: string;
|
|
61
|
+
};
|
|
62
|
+
export declare const hashTagOptions: {
|
|
63
|
+
title: string;
|
|
64
|
+
}[];
|
|
65
65
|
//# sourceMappingURL=blog.d.ts.map
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const PortfolioItemSchema: z.ZodObject<{
|
|
3
|
-
_id: z.ZodString;
|
|
4
|
-
user: z.ZodString;
|
|
5
|
-
mediaType: z.ZodEnum<["image", "video"]>;
|
|
6
|
-
url: z.ZodString;
|
|
7
|
-
mainUrl: z.ZodOptional<z.ZodString>;
|
|
8
|
-
caption: z.ZodString;
|
|
9
|
-
views: z.ZodNumber;
|
|
10
|
-
likes: z.ZodNumber;
|
|
11
|
-
comments: z.ZodNumber;
|
|
12
|
-
shares: z.ZodNumber;
|
|
13
|
-
createdAt: z.ZodDate;
|
|
14
|
-
updatedAt: z.ZodDate;
|
|
15
|
-
}, "strict", z.ZodTypeAny, {
|
|
16
|
-
user: string;
|
|
17
|
-
url: string;
|
|
18
|
-
_id: string;
|
|
19
|
-
createdAt: Date;
|
|
20
|
-
updatedAt: Date;
|
|
21
|
-
views: number;
|
|
22
|
-
likes: number;
|
|
23
|
-
comments: number;
|
|
24
|
-
shares: number;
|
|
25
|
-
mediaType: "image" | "video";
|
|
26
|
-
caption: string;
|
|
27
|
-
mainUrl?: string | undefined;
|
|
28
|
-
}, {
|
|
29
|
-
user: string;
|
|
30
|
-
url: string;
|
|
31
|
-
_id: string;
|
|
32
|
-
createdAt: Date;
|
|
33
|
-
updatedAt: Date;
|
|
34
|
-
views: number;
|
|
35
|
-
likes: number;
|
|
36
|
-
comments: number;
|
|
37
|
-
shares: number;
|
|
38
|
-
mediaType: "image" | "video";
|
|
39
|
-
caption: string;
|
|
40
|
-
mainUrl?: string | undefined;
|
|
41
|
-
}>;
|
|
42
|
-
export type PortfolioItem = z.infer<typeof PortfolioItemSchema>;
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PortfolioItemSchema: z.ZodObject<{
|
|
3
|
+
_id: z.ZodString;
|
|
4
|
+
user: z.ZodString;
|
|
5
|
+
mediaType: z.ZodEnum<["image", "video"]>;
|
|
6
|
+
url: z.ZodString;
|
|
7
|
+
mainUrl: z.ZodOptional<z.ZodString>;
|
|
8
|
+
caption: z.ZodString;
|
|
9
|
+
views: z.ZodNumber;
|
|
10
|
+
likes: z.ZodNumber;
|
|
11
|
+
comments: z.ZodNumber;
|
|
12
|
+
shares: z.ZodNumber;
|
|
13
|
+
createdAt: z.ZodDate;
|
|
14
|
+
updatedAt: z.ZodDate;
|
|
15
|
+
}, "strict", z.ZodTypeAny, {
|
|
16
|
+
user: string;
|
|
17
|
+
url: string;
|
|
18
|
+
_id: string;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
views: number;
|
|
22
|
+
likes: number;
|
|
23
|
+
comments: number;
|
|
24
|
+
shares: number;
|
|
25
|
+
mediaType: "image" | "video";
|
|
26
|
+
caption: string;
|
|
27
|
+
mainUrl?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
user: string;
|
|
30
|
+
url: string;
|
|
31
|
+
_id: string;
|
|
32
|
+
createdAt: Date;
|
|
33
|
+
updatedAt: Date;
|
|
34
|
+
views: number;
|
|
35
|
+
likes: number;
|
|
36
|
+
comments: number;
|
|
37
|
+
shares: number;
|
|
38
|
+
mediaType: "image" | "video";
|
|
39
|
+
caption: string;
|
|
40
|
+
mainUrl?: string | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
export type PortfolioItem = z.infer<typeof PortfolioItemSchema>;
|
|
43
43
|
//# sourceMappingURL=portfolio.d.ts.map
|
|
@@ -8,18 +8,18 @@ export declare const ReviewSchema: z.ZodObject<{
|
|
|
8
8
|
createdAt: z.ZodDate;
|
|
9
9
|
updatedAt: z.ZodDate;
|
|
10
10
|
}, "strict", z.ZodTypeAny, {
|
|
11
|
+
rating: number;
|
|
11
12
|
_id: string;
|
|
12
13
|
reviewerPic: string;
|
|
13
14
|
reviewerUsername: string;
|
|
14
|
-
rating: number;
|
|
15
15
|
comment: string;
|
|
16
16
|
createdAt: Date;
|
|
17
17
|
updatedAt: Date;
|
|
18
18
|
}, {
|
|
19
|
+
rating: number;
|
|
19
20
|
_id: string;
|
|
20
21
|
reviewerPic: string;
|
|
21
22
|
reviewerUsername: string;
|
|
22
|
-
rating: number;
|
|
23
23
|
comment: string;
|
|
24
24
|
createdAt: Date;
|
|
25
25
|
updatedAt: Date;
|
|
@@ -1,380 +1,380 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { DisplayItem } from "./props";
|
|
3
|
-
export declare const OpportunitySchema: z.ZodObject<{
|
|
4
|
-
slug: z.ZodString;
|
|
5
|
-
title: z.ZodString;
|
|
6
|
-
skills: z.ZodArray<z.ZodString, "many">;
|
|
7
|
-
description: z.ZodString;
|
|
8
|
-
images: z.ZodArray<z.ZodString, "many">;
|
|
9
|
-
categoryId: z.ZodOptional<z.ZodString>;
|
|
10
|
-
city: z.ZodString;
|
|
11
|
-
state: z.ZodString;
|
|
12
|
-
address: z.ZodOptional<z.ZodString>;
|
|
13
|
-
availableFrom: z.ZodDate;
|
|
14
|
-
minDuration: z.ZodNumber;
|
|
15
|
-
maxDuration: z.ZodNumber;
|
|
16
|
-
urgent: z.ZodBoolean;
|
|
17
|
-
applicationCount: z.ZodNumber;
|
|
18
|
-
peopleRequired: z.ZodNumber;
|
|
19
|
-
facilities: z.ZodArray<z.ZodString, "many">;
|
|
20
|
-
responsibilities: z.ZodArray<z.ZodString, "many">;
|
|
21
|
-
questions: z.ZodArray<z.ZodObject<{
|
|
22
|
-
question: z.ZodString;
|
|
23
|
-
answer: z.ZodString;
|
|
24
|
-
}, "strict", z.ZodTypeAny, {
|
|
25
|
-
question: string;
|
|
26
|
-
answer: string;
|
|
27
|
-
}, {
|
|
28
|
-
question: string;
|
|
29
|
-
answer: string;
|
|
30
|
-
}>, "many">;
|
|
31
|
-
rating: z.ZodNumber;
|
|
32
|
-
ratingCount: z.ZodNumber;
|
|
33
|
-
reviewCount: z.ZodNumber;
|
|
34
|
-
hostId: z.ZodLazy<z.ZodObject<{
|
|
35
|
-
username: z.ZodString;
|
|
36
|
-
firstName: z.ZodString;
|
|
37
|
-
lastName: z.ZodString;
|
|
38
|
-
email: z.ZodString;
|
|
39
|
-
password: z.ZodString;
|
|
40
|
-
phoneNumber: z.ZodString;
|
|
41
|
-
location: z.ZodOptional<z.ZodString>;
|
|
42
|
-
pinCode: z.ZodOptional<z.ZodString>;
|
|
43
|
-
dob: z.ZodOptional<z.ZodDate>;
|
|
44
|
-
gender: z.ZodEnum<["male", "female", "other"]>;
|
|
45
|
-
profilePic: z.ZodOptional<z.ZodString>;
|
|
46
|
-
rating: z.ZodNumber;
|
|
47
|
-
ratingCount: z.ZodNumber;
|
|
48
|
-
reviewCount: z.ZodNumber;
|
|
49
|
-
blogsCount: z.ZodOptional<z.ZodNumber>;
|
|
50
|
-
joinedDate: z.ZodDate;
|
|
51
|
-
isActive: z.ZodBoolean;
|
|
52
|
-
lastActive: z.ZodDate;
|
|
53
|
-
userBio: z.ZodOptional<z.ZodString>;
|
|
54
|
-
userIdCard: z.ZodOptional<z.ZodString>;
|
|
55
|
-
watchHistory: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
56
|
-
accessToken: z.ZodOptional<z.ZodString>;
|
|
57
|
-
refreshToken: z.ZodOptional<z.ZodString>;
|
|
58
|
-
verifiedEmail: z.ZodBoolean;
|
|
59
|
-
verifiedMobile: z.ZodBoolean;
|
|
60
|
-
verifiedIdCard: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
-
role: z.ZodEnum<["host", "user", "admin", "hr", "sales"]>;
|
|
62
|
-
socialLinks: z.ZodOptional<z.ZodRecord<z.ZodEnum<[string, ...string[]]>, z.ZodString>>;
|
|
63
|
-
userResume: z.ZodOptional<z.ZodString>;
|
|
64
|
-
skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
65
|
-
skill: z.ZodString;
|
|
66
|
-
skillExpertise: z.ZodNumber;
|
|
67
|
-
}, "strip", z.ZodTypeAny, {
|
|
68
|
-
skill: string;
|
|
69
|
-
skillExpertise: number;
|
|
70
|
-
}, {
|
|
71
|
-
skill: string;
|
|
72
|
-
skillExpertise: number;
|
|
73
|
-
}>, "many">>;
|
|
74
|
-
wishlist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
75
|
-
favBlogs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
76
|
-
favPackages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
77
|
-
id: z.ZodOptional<z.ZodString>;
|
|
78
|
-
selfie: z.ZodOptional<z.ZodString>;
|
|
79
|
-
selfieAction: z.ZodOptional<z.ZodString>;
|
|
80
|
-
jobCount: z.ZodOptional<z.ZodNumber>;
|
|
81
|
-
travelPackageCount: z.ZodOptional<z.ZodNumber>;
|
|
82
|
-
gstNumber: z.ZodOptional<z.ZodString>;
|
|
83
|
-
panCard: z.ZodOptional<z.ZodString>;
|
|
84
|
-
verifiedBusiness: z.ZodOptional<z.ZodEnum<["true", "false", "inProgress"]>>;
|
|
85
|
-
}, "strict", z.ZodTypeAny, {
|
|
86
|
-
username: string;
|
|
87
|
-
firstName: string;
|
|
88
|
-
lastName: string;
|
|
89
|
-
email: string;
|
|
90
|
-
password: string;
|
|
91
|
-
phoneNumber: string;
|
|
92
|
-
gender: "male" | "female" | "other";
|
|
93
|
-
rating: number;
|
|
94
|
-
ratingCount: number;
|
|
95
|
-
reviewCount: number;
|
|
96
|
-
joinedDate: Date;
|
|
97
|
-
isActive: boolean;
|
|
98
|
-
lastActive: Date;
|
|
99
|
-
verifiedEmail: boolean;
|
|
100
|
-
verifiedMobile: boolean;
|
|
101
|
-
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
102
|
-
location?: string | undefined;
|
|
103
|
-
pinCode?: string | undefined;
|
|
104
|
-
dob?: Date | undefined;
|
|
105
|
-
profilePic?: string | undefined;
|
|
106
|
-
blogsCount?: number | undefined;
|
|
107
|
-
userBio?: string | undefined;
|
|
108
|
-
userIdCard?: string | undefined;
|
|
109
|
-
watchHistory?: string[] | undefined;
|
|
110
|
-
accessToken?: string | undefined;
|
|
111
|
-
refreshToken?: string | undefined;
|
|
112
|
-
verifiedIdCard?: boolean | undefined;
|
|
113
|
-
socialLinks?: Record<string, string> | undefined;
|
|
114
|
-
userResume?: string | undefined;
|
|
115
|
-
skills?: {
|
|
116
|
-
skill: string;
|
|
117
|
-
skillExpertise: number;
|
|
118
|
-
}[] | undefined;
|
|
119
|
-
wishlist?: string[] | undefined;
|
|
120
|
-
favBlogs?: string[] | undefined;
|
|
121
|
-
favPackages?: string[] | undefined;
|
|
122
|
-
id?: string | undefined;
|
|
123
|
-
selfie?: string | undefined;
|
|
124
|
-
selfieAction?: string | undefined;
|
|
125
|
-
jobCount?: number | undefined;
|
|
126
|
-
travelPackageCount?: number | undefined;
|
|
127
|
-
gstNumber?: string | undefined;
|
|
128
|
-
panCard?: string | undefined;
|
|
129
|
-
verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
|
|
130
|
-
}, {
|
|
131
|
-
username: string;
|
|
132
|
-
firstName: string;
|
|
133
|
-
lastName: string;
|
|
134
|
-
email: string;
|
|
135
|
-
password: string;
|
|
136
|
-
phoneNumber: string;
|
|
137
|
-
gender: "male" | "female" | "other";
|
|
138
|
-
rating: number;
|
|
139
|
-
ratingCount: number;
|
|
140
|
-
reviewCount: number;
|
|
141
|
-
joinedDate: Date;
|
|
142
|
-
isActive: boolean;
|
|
143
|
-
lastActive: Date;
|
|
144
|
-
verifiedEmail: boolean;
|
|
145
|
-
verifiedMobile: boolean;
|
|
146
|
-
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
147
|
-
location?: string | undefined;
|
|
148
|
-
pinCode?: string | undefined;
|
|
149
|
-
dob?: Date | undefined;
|
|
150
|
-
profilePic?: string | undefined;
|
|
151
|
-
blogsCount?: number | undefined;
|
|
152
|
-
userBio?: string | undefined;
|
|
153
|
-
userIdCard?: string | undefined;
|
|
154
|
-
watchHistory?: string[] | undefined;
|
|
155
|
-
accessToken?: string | undefined;
|
|
156
|
-
refreshToken?: string | undefined;
|
|
157
|
-
verifiedIdCard?: boolean | undefined;
|
|
158
|
-
socialLinks?: Record<string, string> | undefined;
|
|
159
|
-
userResume?: string | undefined;
|
|
160
|
-
skills?: {
|
|
161
|
-
skill: string;
|
|
162
|
-
skillExpertise: number;
|
|
163
|
-
}[] | undefined;
|
|
164
|
-
wishlist?: string[] | undefined;
|
|
165
|
-
favBlogs?: string[] | undefined;
|
|
166
|
-
favPackages?: string[] | undefined;
|
|
167
|
-
id?: string | undefined;
|
|
168
|
-
selfie?: string | undefined;
|
|
169
|
-
selfieAction?: string | undefined;
|
|
170
|
-
jobCount?: number | undefined;
|
|
171
|
-
travelPackageCount?: number | undefined;
|
|
172
|
-
gstNumber?: string | undefined;
|
|
173
|
-
panCard?: string | undefined;
|
|
174
|
-
verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
|
|
175
|
-
}>>;
|
|
176
|
-
applicationObservers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
177
|
-
username: z.ZodString;
|
|
178
|
-
role: z.ZodEnum<["host", "user", "admin", "hr", "sales"]>;
|
|
179
|
-
phoneNumber: z.ZodString;
|
|
180
|
-
email: z.ZodString;
|
|
181
|
-
}, "strip", z.ZodTypeAny, {
|
|
182
|
-
username: string;
|
|
183
|
-
email: string;
|
|
184
|
-
phoneNumber: string;
|
|
185
|
-
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
186
|
-
}, {
|
|
187
|
-
username: string;
|
|
188
|
-
email: string;
|
|
189
|
-
phoneNumber: string;
|
|
190
|
-
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
191
|
-
}>, "many">>;
|
|
192
|
-
hostingType: z.ZodOptional<z.ZodString>;
|
|
193
|
-
views: z.ZodNumber;
|
|
194
|
-
shares: z.ZodNumber;
|
|
195
|
-
status: z.ZodEnum<["draft", "archived", "pending", "open", "closed", "denied", "deleted"]>;
|
|
196
|
-
createdAt: z.ZodOptional<z.ZodDate>;
|
|
197
|
-
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
198
|
-
adminApproval: z.ZodBoolean;
|
|
199
|
-
}, "strict", z.ZodTypeAny, {
|
|
200
|
-
status: "draft" | "archived" | "pending" | "denied" | "open" | "closed" | "deleted";
|
|
201
|
-
rating: number;
|
|
202
|
-
ratingCount: number;
|
|
203
|
-
reviewCount: number;
|
|
204
|
-
skills: string[];
|
|
205
|
-
title: string;
|
|
206
|
-
description: string;
|
|
207
|
-
slug: string;
|
|
208
|
-
views: number;
|
|
209
|
-
shares: number;
|
|
210
|
-
images: string[];
|
|
211
|
-
city: string;
|
|
212
|
-
state: string;
|
|
213
|
-
availableFrom: Date;
|
|
214
|
-
minDuration: number;
|
|
215
|
-
maxDuration: number;
|
|
216
|
-
urgent: boolean;
|
|
217
|
-
applicationCount: number;
|
|
218
|
-
peopleRequired: number;
|
|
219
|
-
facilities: string[];
|
|
220
|
-
responsibilities: string[];
|
|
221
|
-
questions: {
|
|
222
|
-
question: string;
|
|
223
|
-
answer: string;
|
|
224
|
-
}[];
|
|
225
|
-
hostId: {
|
|
226
|
-
username: string;
|
|
227
|
-
firstName: string;
|
|
228
|
-
lastName: string;
|
|
229
|
-
email: string;
|
|
230
|
-
password: string;
|
|
231
|
-
phoneNumber: string;
|
|
232
|
-
gender: "male" | "female" | "other";
|
|
233
|
-
rating: number;
|
|
234
|
-
ratingCount: number;
|
|
235
|
-
reviewCount: number;
|
|
236
|
-
joinedDate: Date;
|
|
237
|
-
isActive: boolean;
|
|
238
|
-
lastActive: Date;
|
|
239
|
-
verifiedEmail: boolean;
|
|
240
|
-
verifiedMobile: boolean;
|
|
241
|
-
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
242
|
-
location?: string | undefined;
|
|
243
|
-
pinCode?: string | undefined;
|
|
244
|
-
dob?: Date | undefined;
|
|
245
|
-
profilePic?: string | undefined;
|
|
246
|
-
blogsCount?: number | undefined;
|
|
247
|
-
userBio?: string | undefined;
|
|
248
|
-
userIdCard?: string | undefined;
|
|
249
|
-
watchHistory?: string[] | undefined;
|
|
250
|
-
accessToken?: string | undefined;
|
|
251
|
-
refreshToken?: string | undefined;
|
|
252
|
-
verifiedIdCard?: boolean | undefined;
|
|
253
|
-
socialLinks?: Record<string, string> | undefined;
|
|
254
|
-
userResume?: string | undefined;
|
|
255
|
-
skills?: {
|
|
256
|
-
skill: string;
|
|
257
|
-
skillExpertise: number;
|
|
258
|
-
}[] | undefined;
|
|
259
|
-
wishlist?: string[] | undefined;
|
|
260
|
-
favBlogs?: string[] | undefined;
|
|
261
|
-
favPackages?: string[] | undefined;
|
|
262
|
-
id?: string | undefined;
|
|
263
|
-
selfie?: string | undefined;
|
|
264
|
-
selfieAction?: string | undefined;
|
|
265
|
-
jobCount?: number | undefined;
|
|
266
|
-
travelPackageCount?: number | undefined;
|
|
267
|
-
gstNumber?: string | undefined;
|
|
268
|
-
panCard?: string | undefined;
|
|
269
|
-
verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
|
|
270
|
-
};
|
|
271
|
-
adminApproval: boolean;
|
|
272
|
-
createdAt?: Date | undefined;
|
|
273
|
-
updatedAt?: Date | undefined;
|
|
274
|
-
categoryId?: string | undefined;
|
|
275
|
-
address?: string | undefined;
|
|
276
|
-
applicationObservers?: {
|
|
277
|
-
username: string;
|
|
278
|
-
email: string;
|
|
279
|
-
phoneNumber: string;
|
|
280
|
-
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
281
|
-
}[] | undefined;
|
|
282
|
-
hostingType?: string | undefined;
|
|
283
|
-
}, {
|
|
284
|
-
status: "draft" | "archived" | "pending" | "denied" | "open" | "closed" | "deleted";
|
|
285
|
-
rating: number;
|
|
286
|
-
ratingCount: number;
|
|
287
|
-
reviewCount: number;
|
|
288
|
-
skills: string[];
|
|
289
|
-
title: string;
|
|
290
|
-
description: string;
|
|
291
|
-
slug: string;
|
|
292
|
-
views: number;
|
|
293
|
-
shares: number;
|
|
294
|
-
images: string[];
|
|
295
|
-
city: string;
|
|
296
|
-
state: string;
|
|
297
|
-
availableFrom: Date;
|
|
298
|
-
minDuration: number;
|
|
299
|
-
maxDuration: number;
|
|
300
|
-
urgent: boolean;
|
|
301
|
-
applicationCount: number;
|
|
302
|
-
peopleRequired: number;
|
|
303
|
-
facilities: string[];
|
|
304
|
-
responsibilities: string[];
|
|
305
|
-
questions: {
|
|
306
|
-
question: string;
|
|
307
|
-
answer: string;
|
|
308
|
-
}[];
|
|
309
|
-
hostId: {
|
|
310
|
-
username: string;
|
|
311
|
-
firstName: string;
|
|
312
|
-
lastName: string;
|
|
313
|
-
email: string;
|
|
314
|
-
password: string;
|
|
315
|
-
phoneNumber: string;
|
|
316
|
-
gender: "male" | "female" | "other";
|
|
317
|
-
rating: number;
|
|
318
|
-
ratingCount: number;
|
|
319
|
-
reviewCount: number;
|
|
320
|
-
joinedDate: Date;
|
|
321
|
-
isActive: boolean;
|
|
322
|
-
lastActive: Date;
|
|
323
|
-
verifiedEmail: boolean;
|
|
324
|
-
verifiedMobile: boolean;
|
|
325
|
-
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
326
|
-
location?: string | undefined;
|
|
327
|
-
pinCode?: string | undefined;
|
|
328
|
-
dob?: Date | undefined;
|
|
329
|
-
profilePic?: string | undefined;
|
|
330
|
-
blogsCount?: number | undefined;
|
|
331
|
-
userBio?: string | undefined;
|
|
332
|
-
userIdCard?: string | undefined;
|
|
333
|
-
watchHistory?: string[] | undefined;
|
|
334
|
-
accessToken?: string | undefined;
|
|
335
|
-
refreshToken?: string | undefined;
|
|
336
|
-
verifiedIdCard?: boolean | undefined;
|
|
337
|
-
socialLinks?: Record<string, string> | undefined;
|
|
338
|
-
userResume?: string | undefined;
|
|
339
|
-
skills?: {
|
|
340
|
-
skill: string;
|
|
341
|
-
skillExpertise: number;
|
|
342
|
-
}[] | undefined;
|
|
343
|
-
wishlist?: string[] | undefined;
|
|
344
|
-
favBlogs?: string[] | undefined;
|
|
345
|
-
favPackages?: string[] | undefined;
|
|
346
|
-
id?: string | undefined;
|
|
347
|
-
selfie?: string | undefined;
|
|
348
|
-
selfieAction?: string | undefined;
|
|
349
|
-
jobCount?: number | undefined;
|
|
350
|
-
travelPackageCount?: number | undefined;
|
|
351
|
-
gstNumber?: string | undefined;
|
|
352
|
-
panCard?: string | undefined;
|
|
353
|
-
verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
|
|
354
|
-
};
|
|
355
|
-
adminApproval: boolean;
|
|
356
|
-
createdAt?: Date | undefined;
|
|
357
|
-
updatedAt?: Date | undefined;
|
|
358
|
-
categoryId?: string | undefined;
|
|
359
|
-
address?: string | undefined;
|
|
360
|
-
applicationObservers?: {
|
|
361
|
-
username: string;
|
|
362
|
-
email: string;
|
|
363
|
-
phoneNumber: string;
|
|
364
|
-
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
365
|
-
}[] | undefined;
|
|
366
|
-
hostingType?: string | undefined;
|
|
367
|
-
}>;
|
|
368
|
-
export type OppMetaData = {
|
|
369
|
-
image: string;
|
|
370
|
-
title: string;
|
|
371
|
-
location: string;
|
|
372
|
-
skills: string[];
|
|
373
|
-
hostingType: string;
|
|
374
|
-
};
|
|
375
|
-
export type Opportunity = z.infer<typeof OpportunitySchema>;
|
|
376
|
-
export declare const facilitiesOptions: DisplayItem[];
|
|
377
|
-
export declare const otherFacilitiesOptions: DisplayItem[];
|
|
378
|
-
export declare const responsibilitiesOptions: DisplayItem[];
|
|
379
|
-
export declare const otherResponsibilitiesOptions: DisplayItem[];
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { DisplayItem } from "./props";
|
|
3
|
+
export declare const OpportunitySchema: z.ZodObject<{
|
|
4
|
+
slug: z.ZodString;
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
skills: z.ZodArray<z.ZodString, "many">;
|
|
7
|
+
description: z.ZodString;
|
|
8
|
+
images: z.ZodArray<z.ZodString, "many">;
|
|
9
|
+
categoryId: z.ZodOptional<z.ZodString>;
|
|
10
|
+
city: z.ZodString;
|
|
11
|
+
state: z.ZodString;
|
|
12
|
+
address: z.ZodOptional<z.ZodString>;
|
|
13
|
+
availableFrom: z.ZodDate;
|
|
14
|
+
minDuration: z.ZodNumber;
|
|
15
|
+
maxDuration: z.ZodNumber;
|
|
16
|
+
urgent: z.ZodBoolean;
|
|
17
|
+
applicationCount: z.ZodNumber;
|
|
18
|
+
peopleRequired: z.ZodNumber;
|
|
19
|
+
facilities: z.ZodArray<z.ZodString, "many">;
|
|
20
|
+
responsibilities: z.ZodArray<z.ZodString, "many">;
|
|
21
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
22
|
+
question: z.ZodString;
|
|
23
|
+
answer: z.ZodString;
|
|
24
|
+
}, "strict", z.ZodTypeAny, {
|
|
25
|
+
question: string;
|
|
26
|
+
answer: string;
|
|
27
|
+
}, {
|
|
28
|
+
question: string;
|
|
29
|
+
answer: string;
|
|
30
|
+
}>, "many">;
|
|
31
|
+
rating: z.ZodNumber;
|
|
32
|
+
ratingCount: z.ZodNumber;
|
|
33
|
+
reviewCount: z.ZodNumber;
|
|
34
|
+
hostId: z.ZodLazy<z.ZodObject<{
|
|
35
|
+
username: z.ZodString;
|
|
36
|
+
firstName: z.ZodString;
|
|
37
|
+
lastName: z.ZodString;
|
|
38
|
+
email: z.ZodString;
|
|
39
|
+
password: z.ZodString;
|
|
40
|
+
phoneNumber: z.ZodString;
|
|
41
|
+
location: z.ZodOptional<z.ZodString>;
|
|
42
|
+
pinCode: z.ZodOptional<z.ZodString>;
|
|
43
|
+
dob: z.ZodOptional<z.ZodDate>;
|
|
44
|
+
gender: z.ZodEnum<["male", "female", "other"]>;
|
|
45
|
+
profilePic: z.ZodOptional<z.ZodString>;
|
|
46
|
+
rating: z.ZodNumber;
|
|
47
|
+
ratingCount: z.ZodNumber;
|
|
48
|
+
reviewCount: z.ZodNumber;
|
|
49
|
+
blogsCount: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
joinedDate: z.ZodDate;
|
|
51
|
+
isActive: z.ZodBoolean;
|
|
52
|
+
lastActive: z.ZodDate;
|
|
53
|
+
userBio: z.ZodOptional<z.ZodString>;
|
|
54
|
+
userIdCard: z.ZodOptional<z.ZodString>;
|
|
55
|
+
watchHistory: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
56
|
+
accessToken: z.ZodOptional<z.ZodString>;
|
|
57
|
+
refreshToken: z.ZodOptional<z.ZodString>;
|
|
58
|
+
verifiedEmail: z.ZodBoolean;
|
|
59
|
+
verifiedMobile: z.ZodBoolean;
|
|
60
|
+
verifiedIdCard: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
role: z.ZodEnum<["host", "user", "admin", "hr", "sales"]>;
|
|
62
|
+
socialLinks: z.ZodOptional<z.ZodRecord<z.ZodEnum<[string, ...string[]]>, z.ZodString>>;
|
|
63
|
+
userResume: z.ZodOptional<z.ZodString>;
|
|
64
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
65
|
+
skill: z.ZodString;
|
|
66
|
+
skillExpertise: z.ZodNumber;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
skill: string;
|
|
69
|
+
skillExpertise: number;
|
|
70
|
+
}, {
|
|
71
|
+
skill: string;
|
|
72
|
+
skillExpertise: number;
|
|
73
|
+
}>, "many">>;
|
|
74
|
+
wishlist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
75
|
+
favBlogs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
76
|
+
favPackages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
77
|
+
id: z.ZodOptional<z.ZodString>;
|
|
78
|
+
selfie: z.ZodOptional<z.ZodString>;
|
|
79
|
+
selfieAction: z.ZodOptional<z.ZodString>;
|
|
80
|
+
jobCount: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
travelPackageCount: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
gstNumber: z.ZodOptional<z.ZodString>;
|
|
83
|
+
panCard: z.ZodOptional<z.ZodString>;
|
|
84
|
+
verifiedBusiness: z.ZodOptional<z.ZodEnum<["true", "false", "inProgress"]>>;
|
|
85
|
+
}, "strict", z.ZodTypeAny, {
|
|
86
|
+
username: string;
|
|
87
|
+
firstName: string;
|
|
88
|
+
lastName: string;
|
|
89
|
+
email: string;
|
|
90
|
+
password: string;
|
|
91
|
+
phoneNumber: string;
|
|
92
|
+
gender: "male" | "female" | "other";
|
|
93
|
+
rating: number;
|
|
94
|
+
ratingCount: number;
|
|
95
|
+
reviewCount: number;
|
|
96
|
+
joinedDate: Date;
|
|
97
|
+
isActive: boolean;
|
|
98
|
+
lastActive: Date;
|
|
99
|
+
verifiedEmail: boolean;
|
|
100
|
+
verifiedMobile: boolean;
|
|
101
|
+
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
102
|
+
location?: string | undefined;
|
|
103
|
+
pinCode?: string | undefined;
|
|
104
|
+
dob?: Date | undefined;
|
|
105
|
+
profilePic?: string | undefined;
|
|
106
|
+
blogsCount?: number | undefined;
|
|
107
|
+
userBio?: string | undefined;
|
|
108
|
+
userIdCard?: string | undefined;
|
|
109
|
+
watchHistory?: string[] | undefined;
|
|
110
|
+
accessToken?: string | undefined;
|
|
111
|
+
refreshToken?: string | undefined;
|
|
112
|
+
verifiedIdCard?: boolean | undefined;
|
|
113
|
+
socialLinks?: Record<string, string> | undefined;
|
|
114
|
+
userResume?: string | undefined;
|
|
115
|
+
skills?: {
|
|
116
|
+
skill: string;
|
|
117
|
+
skillExpertise: number;
|
|
118
|
+
}[] | undefined;
|
|
119
|
+
wishlist?: string[] | undefined;
|
|
120
|
+
favBlogs?: string[] | undefined;
|
|
121
|
+
favPackages?: string[] | undefined;
|
|
122
|
+
id?: string | undefined;
|
|
123
|
+
selfie?: string | undefined;
|
|
124
|
+
selfieAction?: string | undefined;
|
|
125
|
+
jobCount?: number | undefined;
|
|
126
|
+
travelPackageCount?: number | undefined;
|
|
127
|
+
gstNumber?: string | undefined;
|
|
128
|
+
panCard?: string | undefined;
|
|
129
|
+
verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
|
|
130
|
+
}, {
|
|
131
|
+
username: string;
|
|
132
|
+
firstName: string;
|
|
133
|
+
lastName: string;
|
|
134
|
+
email: string;
|
|
135
|
+
password: string;
|
|
136
|
+
phoneNumber: string;
|
|
137
|
+
gender: "male" | "female" | "other";
|
|
138
|
+
rating: number;
|
|
139
|
+
ratingCount: number;
|
|
140
|
+
reviewCount: number;
|
|
141
|
+
joinedDate: Date;
|
|
142
|
+
isActive: boolean;
|
|
143
|
+
lastActive: Date;
|
|
144
|
+
verifiedEmail: boolean;
|
|
145
|
+
verifiedMobile: boolean;
|
|
146
|
+
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
147
|
+
location?: string | undefined;
|
|
148
|
+
pinCode?: string | undefined;
|
|
149
|
+
dob?: Date | undefined;
|
|
150
|
+
profilePic?: string | undefined;
|
|
151
|
+
blogsCount?: number | undefined;
|
|
152
|
+
userBio?: string | undefined;
|
|
153
|
+
userIdCard?: string | undefined;
|
|
154
|
+
watchHistory?: string[] | undefined;
|
|
155
|
+
accessToken?: string | undefined;
|
|
156
|
+
refreshToken?: string | undefined;
|
|
157
|
+
verifiedIdCard?: boolean | undefined;
|
|
158
|
+
socialLinks?: Record<string, string> | undefined;
|
|
159
|
+
userResume?: string | undefined;
|
|
160
|
+
skills?: {
|
|
161
|
+
skill: string;
|
|
162
|
+
skillExpertise: number;
|
|
163
|
+
}[] | undefined;
|
|
164
|
+
wishlist?: string[] | undefined;
|
|
165
|
+
favBlogs?: string[] | undefined;
|
|
166
|
+
favPackages?: string[] | undefined;
|
|
167
|
+
id?: string | undefined;
|
|
168
|
+
selfie?: string | undefined;
|
|
169
|
+
selfieAction?: string | undefined;
|
|
170
|
+
jobCount?: number | undefined;
|
|
171
|
+
travelPackageCount?: number | undefined;
|
|
172
|
+
gstNumber?: string | undefined;
|
|
173
|
+
panCard?: string | undefined;
|
|
174
|
+
verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
|
|
175
|
+
}>>;
|
|
176
|
+
applicationObservers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
177
|
+
username: z.ZodString;
|
|
178
|
+
role: z.ZodEnum<["host", "user", "admin", "hr", "sales"]>;
|
|
179
|
+
phoneNumber: z.ZodString;
|
|
180
|
+
email: z.ZodString;
|
|
181
|
+
}, "strip", z.ZodTypeAny, {
|
|
182
|
+
username: string;
|
|
183
|
+
email: string;
|
|
184
|
+
phoneNumber: string;
|
|
185
|
+
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
186
|
+
}, {
|
|
187
|
+
username: string;
|
|
188
|
+
email: string;
|
|
189
|
+
phoneNumber: string;
|
|
190
|
+
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
191
|
+
}>, "many">>;
|
|
192
|
+
hostingType: z.ZodOptional<z.ZodString>;
|
|
193
|
+
views: z.ZodNumber;
|
|
194
|
+
shares: z.ZodNumber;
|
|
195
|
+
status: z.ZodEnum<["draft", "archived", "pending", "open", "closed", "denied", "deleted"]>;
|
|
196
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
197
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
198
|
+
adminApproval: z.ZodBoolean;
|
|
199
|
+
}, "strict", z.ZodTypeAny, {
|
|
200
|
+
status: "draft" | "archived" | "pending" | "denied" | "open" | "closed" | "deleted";
|
|
201
|
+
rating: number;
|
|
202
|
+
ratingCount: number;
|
|
203
|
+
reviewCount: number;
|
|
204
|
+
skills: string[];
|
|
205
|
+
title: string;
|
|
206
|
+
description: string;
|
|
207
|
+
slug: string;
|
|
208
|
+
views: number;
|
|
209
|
+
shares: number;
|
|
210
|
+
images: string[];
|
|
211
|
+
city: string;
|
|
212
|
+
state: string;
|
|
213
|
+
availableFrom: Date;
|
|
214
|
+
minDuration: number;
|
|
215
|
+
maxDuration: number;
|
|
216
|
+
urgent: boolean;
|
|
217
|
+
applicationCount: number;
|
|
218
|
+
peopleRequired: number;
|
|
219
|
+
facilities: string[];
|
|
220
|
+
responsibilities: string[];
|
|
221
|
+
questions: {
|
|
222
|
+
question: string;
|
|
223
|
+
answer: string;
|
|
224
|
+
}[];
|
|
225
|
+
hostId: {
|
|
226
|
+
username: string;
|
|
227
|
+
firstName: string;
|
|
228
|
+
lastName: string;
|
|
229
|
+
email: string;
|
|
230
|
+
password: string;
|
|
231
|
+
phoneNumber: string;
|
|
232
|
+
gender: "male" | "female" | "other";
|
|
233
|
+
rating: number;
|
|
234
|
+
ratingCount: number;
|
|
235
|
+
reviewCount: number;
|
|
236
|
+
joinedDate: Date;
|
|
237
|
+
isActive: boolean;
|
|
238
|
+
lastActive: Date;
|
|
239
|
+
verifiedEmail: boolean;
|
|
240
|
+
verifiedMobile: boolean;
|
|
241
|
+
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
242
|
+
location?: string | undefined;
|
|
243
|
+
pinCode?: string | undefined;
|
|
244
|
+
dob?: Date | undefined;
|
|
245
|
+
profilePic?: string | undefined;
|
|
246
|
+
blogsCount?: number | undefined;
|
|
247
|
+
userBio?: string | undefined;
|
|
248
|
+
userIdCard?: string | undefined;
|
|
249
|
+
watchHistory?: string[] | undefined;
|
|
250
|
+
accessToken?: string | undefined;
|
|
251
|
+
refreshToken?: string | undefined;
|
|
252
|
+
verifiedIdCard?: boolean | undefined;
|
|
253
|
+
socialLinks?: Record<string, string> | undefined;
|
|
254
|
+
userResume?: string | undefined;
|
|
255
|
+
skills?: {
|
|
256
|
+
skill: string;
|
|
257
|
+
skillExpertise: number;
|
|
258
|
+
}[] | undefined;
|
|
259
|
+
wishlist?: string[] | undefined;
|
|
260
|
+
favBlogs?: string[] | undefined;
|
|
261
|
+
favPackages?: string[] | undefined;
|
|
262
|
+
id?: string | undefined;
|
|
263
|
+
selfie?: string | undefined;
|
|
264
|
+
selfieAction?: string | undefined;
|
|
265
|
+
jobCount?: number | undefined;
|
|
266
|
+
travelPackageCount?: number | undefined;
|
|
267
|
+
gstNumber?: string | undefined;
|
|
268
|
+
panCard?: string | undefined;
|
|
269
|
+
verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
|
|
270
|
+
};
|
|
271
|
+
adminApproval: boolean;
|
|
272
|
+
createdAt?: Date | undefined;
|
|
273
|
+
updatedAt?: Date | undefined;
|
|
274
|
+
categoryId?: string | undefined;
|
|
275
|
+
address?: string | undefined;
|
|
276
|
+
applicationObservers?: {
|
|
277
|
+
username: string;
|
|
278
|
+
email: string;
|
|
279
|
+
phoneNumber: string;
|
|
280
|
+
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
281
|
+
}[] | undefined;
|
|
282
|
+
hostingType?: string | undefined;
|
|
283
|
+
}, {
|
|
284
|
+
status: "draft" | "archived" | "pending" | "denied" | "open" | "closed" | "deleted";
|
|
285
|
+
rating: number;
|
|
286
|
+
ratingCount: number;
|
|
287
|
+
reviewCount: number;
|
|
288
|
+
skills: string[];
|
|
289
|
+
title: string;
|
|
290
|
+
description: string;
|
|
291
|
+
slug: string;
|
|
292
|
+
views: number;
|
|
293
|
+
shares: number;
|
|
294
|
+
images: string[];
|
|
295
|
+
city: string;
|
|
296
|
+
state: string;
|
|
297
|
+
availableFrom: Date;
|
|
298
|
+
minDuration: number;
|
|
299
|
+
maxDuration: number;
|
|
300
|
+
urgent: boolean;
|
|
301
|
+
applicationCount: number;
|
|
302
|
+
peopleRequired: number;
|
|
303
|
+
facilities: string[];
|
|
304
|
+
responsibilities: string[];
|
|
305
|
+
questions: {
|
|
306
|
+
question: string;
|
|
307
|
+
answer: string;
|
|
308
|
+
}[];
|
|
309
|
+
hostId: {
|
|
310
|
+
username: string;
|
|
311
|
+
firstName: string;
|
|
312
|
+
lastName: string;
|
|
313
|
+
email: string;
|
|
314
|
+
password: string;
|
|
315
|
+
phoneNumber: string;
|
|
316
|
+
gender: "male" | "female" | "other";
|
|
317
|
+
rating: number;
|
|
318
|
+
ratingCount: number;
|
|
319
|
+
reviewCount: number;
|
|
320
|
+
joinedDate: Date;
|
|
321
|
+
isActive: boolean;
|
|
322
|
+
lastActive: Date;
|
|
323
|
+
verifiedEmail: boolean;
|
|
324
|
+
verifiedMobile: boolean;
|
|
325
|
+
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
326
|
+
location?: string | undefined;
|
|
327
|
+
pinCode?: string | undefined;
|
|
328
|
+
dob?: Date | undefined;
|
|
329
|
+
profilePic?: string | undefined;
|
|
330
|
+
blogsCount?: number | undefined;
|
|
331
|
+
userBio?: string | undefined;
|
|
332
|
+
userIdCard?: string | undefined;
|
|
333
|
+
watchHistory?: string[] | undefined;
|
|
334
|
+
accessToken?: string | undefined;
|
|
335
|
+
refreshToken?: string | undefined;
|
|
336
|
+
verifiedIdCard?: boolean | undefined;
|
|
337
|
+
socialLinks?: Record<string, string> | undefined;
|
|
338
|
+
userResume?: string | undefined;
|
|
339
|
+
skills?: {
|
|
340
|
+
skill: string;
|
|
341
|
+
skillExpertise: number;
|
|
342
|
+
}[] | undefined;
|
|
343
|
+
wishlist?: string[] | undefined;
|
|
344
|
+
favBlogs?: string[] | undefined;
|
|
345
|
+
favPackages?: string[] | undefined;
|
|
346
|
+
id?: string | undefined;
|
|
347
|
+
selfie?: string | undefined;
|
|
348
|
+
selfieAction?: string | undefined;
|
|
349
|
+
jobCount?: number | undefined;
|
|
350
|
+
travelPackageCount?: number | undefined;
|
|
351
|
+
gstNumber?: string | undefined;
|
|
352
|
+
panCard?: string | undefined;
|
|
353
|
+
verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
|
|
354
|
+
};
|
|
355
|
+
adminApproval: boolean;
|
|
356
|
+
createdAt?: Date | undefined;
|
|
357
|
+
updatedAt?: Date | undefined;
|
|
358
|
+
categoryId?: string | undefined;
|
|
359
|
+
address?: string | undefined;
|
|
360
|
+
applicationObservers?: {
|
|
361
|
+
username: string;
|
|
362
|
+
email: string;
|
|
363
|
+
phoneNumber: string;
|
|
364
|
+
role: "host" | "user" | "admin" | "hr" | "sales";
|
|
365
|
+
}[] | undefined;
|
|
366
|
+
hostingType?: string | undefined;
|
|
367
|
+
}>;
|
|
368
|
+
export type OppMetaData = {
|
|
369
|
+
image: string;
|
|
370
|
+
title: string;
|
|
371
|
+
location: string;
|
|
372
|
+
skills: string[];
|
|
373
|
+
hostingType: string;
|
|
374
|
+
};
|
|
375
|
+
export type Opportunity = z.infer<typeof OpportunitySchema>;
|
|
376
|
+
export declare const facilitiesOptions: DisplayItem[];
|
|
377
|
+
export declare const otherFacilitiesOptions: DisplayItem[];
|
|
378
|
+
export declare const responsibilitiesOptions: DisplayItem[];
|
|
379
|
+
export declare const otherResponsibilitiesOptions: DisplayItem[];
|
|
380
380
|
//# sourceMappingURL=volunteerJob.d.ts.map
|
package/dist/lib/userAtom.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export declare const storageInitializedAtom: import("jotai").PrimitiveAtom<boole
|
|
|
2
2
|
init: boolean;
|
|
3
3
|
};
|
|
4
4
|
export declare const userAtom: import("jotai").WritableAtom<{
|
|
5
|
-
rating: number;
|
|
6
5
|
username: string;
|
|
7
6
|
firstName: string;
|
|
8
7
|
lastName: string;
|
|
@@ -10,6 +9,7 @@ export declare const userAtom: import("jotai").WritableAtom<{
|
|
|
10
9
|
password: string;
|
|
11
10
|
phoneNumber: string;
|
|
12
11
|
gender: "male" | "female" | "other";
|
|
12
|
+
rating: number;
|
|
13
13
|
ratingCount: number;
|
|
14
14
|
reviewCount: number;
|
|
15
15
|
joinedDate: Date;
|
|
@@ -47,7 +47,6 @@ export declare const userAtom: import("jotai").WritableAtom<{
|
|
|
47
47
|
panCard?: string | undefined;
|
|
48
48
|
verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
|
|
49
49
|
} | null, [{
|
|
50
|
-
rating: number;
|
|
51
50
|
username: string;
|
|
52
51
|
firstName: string;
|
|
53
52
|
lastName: string;
|
|
@@ -55,6 +54,7 @@ export declare const userAtom: import("jotai").WritableAtom<{
|
|
|
55
54
|
password: string;
|
|
56
55
|
phoneNumber: string;
|
|
57
56
|
gender: "male" | "female" | "other";
|
|
57
|
+
rating: number;
|
|
58
58
|
ratingCount: number;
|
|
59
59
|
reviewCount: number;
|
|
60
60
|
joinedDate: Date;
|
|
@@ -92,7 +92,6 @@ export declare const userAtom: import("jotai").WritableAtom<{
|
|
|
92
92
|
panCard?: string | undefined;
|
|
93
93
|
verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
|
|
94
94
|
} | typeof import("jotai/utils").RESET | ((prev: {
|
|
95
|
-
rating: number;
|
|
96
95
|
username: string;
|
|
97
96
|
firstName: string;
|
|
98
97
|
lastName: string;
|
|
@@ -100,6 +99,7 @@ export declare const userAtom: import("jotai").WritableAtom<{
|
|
|
100
99
|
password: string;
|
|
101
100
|
phoneNumber: string;
|
|
102
101
|
gender: "male" | "female" | "other";
|
|
102
|
+
rating: number;
|
|
103
103
|
ratingCount: number;
|
|
104
104
|
reviewCount: number;
|
|
105
105
|
joinedDate: Date;
|
|
@@ -137,7 +137,6 @@ export declare const userAtom: import("jotai").WritableAtom<{
|
|
|
137
137
|
panCard?: string | undefined;
|
|
138
138
|
verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
|
|
139
139
|
} | null) => {
|
|
140
|
-
rating: number;
|
|
141
140
|
username: string;
|
|
142
141
|
firstName: string;
|
|
143
142
|
lastName: string;
|
|
@@ -145,6 +144,7 @@ export declare const userAtom: import("jotai").WritableAtom<{
|
|
|
145
144
|
password: string;
|
|
146
145
|
phoneNumber: string;
|
|
147
146
|
gender: "male" | "female" | "other";
|
|
147
|
+
rating: number;
|
|
148
148
|
ratingCount: number;
|
|
149
149
|
reviewCount: number;
|
|
150
150
|
joinedDate: Date;
|