@myrjfa/state 1.0.6 → 1.0.7

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,4 +20,12 @@ export declare function searchStatesOfCountry(countryName: string, query: string
20
20
  export declare function getCurrencies(): string[];
21
21
  export declare function getCurrency(countryName: string): string | null;
22
22
  export declare function getCountiesByCurrency(currencyName: string): string[];
23
+ /**
24
+ * Converts a price from one currency to another.
25
+ * @param amount - The amount to convert
26
+ * @param fromCurrency - The source currency code
27
+ * @param toCurrency - The target currency code
28
+ * @returns The converted amount
29
+ */
30
+ export declare function convertCurrency(amount: number, fromCurrency: string, toCurrency: string | undefined): number;
23
31
  //# sourceMappingURL=countryStates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"countryStates.d.ts","sourceRoot":"","sources":["../../../src/lib/data/countryStates.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,OAAO;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,EAAE,OAAO,EAo4N9B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAGrB,CAAC;AAElC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAGrB,CAAC;AAGnC,wBAAgB,YAAY,IAAI,OAAO,EAAE,CAExC;AAED,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAE1C;AAED,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAEvD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAElE;AAED,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAED,wBAAgB,0BAA0B,IAAI,MAAM,EAAE,CAErD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAElE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAKxD;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAMlF;AAED,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAExC;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE9D;AAED,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAEpE"}
1
+ {"version":3,"file":"countryStates.d.ts","sourceRoot":"","sources":["../../../src/lib/data/countryStates.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,OAAO;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,EAAE,OAAO,EAo4N9B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAGrB,CAAC;AAElC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAGrB,CAAC;AAGnC,wBAAgB,YAAY,IAAI,OAAO,EAAE,CAExC;AAED,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAE1C;AAED,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAEvD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAElE;AAED,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAED,wBAAgB,0BAA0B,IAAI,MAAM,EAAE,CAErD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAElE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAKxD;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAMlF;AAED,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAExC;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE9D;AAED,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAEpE;AASD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAY5G"}
@@ -7091,3 +7091,27 @@ export function getCurrency(countryName) {
7091
7091
  export function getCountiesByCurrency(currencyName) {
7092
7092
  return COUNTRIES.filter(country => country.currency == currencyName).map(country => country.name);
7093
7093
  }
7094
+ const exchangeRates = {
7095
+ 'inr': 1,
7096
+ 'usd': 90,
7097
+ 'eur': 109,
7098
+ 'gbp': 120,
7099
+ };
7100
+ /**
7101
+ * Converts a price from one currency to another.
7102
+ * @param amount - The amount to convert
7103
+ * @param fromCurrency - The source currency code
7104
+ * @param toCurrency - The target currency code
7105
+ * @returns The converted amount
7106
+ */
7107
+ export function convertCurrency(amount, fromCurrency, toCurrency) {
7108
+ const from = fromCurrency?.toLowerCase() || 'inr';
7109
+ const to = toCurrency?.toLowerCase() || 'inr';
7110
+ // If same currency or invalid, return original amount
7111
+ if (from === to || !from)
7112
+ return amount;
7113
+ const fromRate = exchangeRates[from] || 1;
7114
+ const toRate = exchangeRates[to] || 1;
7115
+ // Convert: amount in 'from' currency -> INR -> 'to' currency
7116
+ return (amount * fromRate) / toRate;
7117
+ }
@@ -10,6 +10,7 @@ export interface Application {
10
10
  hostId?: string;
11
11
  opportunityId: string;
12
12
  opportunityTitle: string;
13
+ opportunityType?: 'volunteer' | 'job' | 'internship' | 'freelance';
13
14
  location: string;
14
15
  status: ApplicationStatus;
15
16
  skills: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../src/lib/models/application.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,eAAe,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAC;AAElG,MAAM,WAAW,WAAW;IACxB,GAAG,EAAE,MAAM,CAAC;IAEZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,WAAW,EAiIzC,CAAC"}
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../src/lib/models/application.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,eAAe,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAC;AAElG,MAAM,WAAW,WAAW;IACxB,GAAG,EAAE,MAAM,CAAC;IAEZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,YAAY,GAAG,WAAW,CAAC;IACnE,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,WAAW,EAiIzC,CAAC"}
@@ -24,13 +24,13 @@ export declare const BlogSchema: z.ZodObject<{
24
24
  createdAt: Date;
25
25
  updatedAt: Date;
26
26
  slug: string;
27
+ views: number;
28
+ shares: number;
27
29
  overview: string;
28
30
  content: string;
29
31
  blogImages: string[];
30
- views: number;
31
32
  likes: number;
32
33
  comments: number;
33
- shares: number;
34
34
  author: string;
35
35
  authorImage: string;
36
36
  authorRole: "host" | "user" | "admin";
@@ -41,13 +41,13 @@ export declare const BlogSchema: z.ZodObject<{
41
41
  createdAt: Date;
42
42
  updatedAt: Date;
43
43
  slug: string;
44
+ views: number;
45
+ shares: number;
44
46
  overview: string;
45
47
  content: string;
46
48
  blogImages: string[];
47
- views: number;
48
49
  likes: number;
49
50
  comments: number;
50
- shares: number;
51
51
  author: string;
52
52
  authorImage: string;
53
53
  authorRole: "host" | "user" | "admin";
@@ -0,0 +1,499 @@
1
+ import { z } from "zod";
2
+ export declare const FreelanceOpportunitySchema: z.ZodObject<{
3
+ slug: z.ZodString;
4
+ title: z.ZodString;
5
+ skills: z.ZodArray<z.ZodString, "many">;
6
+ description: z.ZodString;
7
+ images: z.ZodArray<z.ZodString, "many">;
8
+ categoryId: z.ZodOptional<z.ZodString>;
9
+ city: z.ZodString;
10
+ state: z.ZodString;
11
+ country: z.ZodString;
12
+ address: z.ZodOptional<z.ZodString>;
13
+ workMode: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
14
+ bondPlan: z.ZodOptional<z.ZodObject<{
15
+ enabled: z.ZodBoolean;
16
+ durationMonths: z.ZodOptional<z.ZodNumber>;
17
+ hostFee: z.ZodOptional<z.ZodNumber>;
18
+ securityDeposit: z.ZodOptional<z.ZodNumber>;
19
+ commissionRate: z.ZodDefault<z.ZodNumber>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ enabled: boolean;
22
+ commissionRate: number;
23
+ durationMonths?: number | undefined;
24
+ hostFee?: number | undefined;
25
+ securityDeposit?: number | undefined;
26
+ }, {
27
+ enabled: boolean;
28
+ durationMonths?: number | undefined;
29
+ hostFee?: number | undefined;
30
+ securityDeposit?: number | undefined;
31
+ commissionRate?: number | undefined;
32
+ }>>;
33
+ availableFrom: z.ZodDate;
34
+ minDuration: z.ZodNumber;
35
+ maxDuration: z.ZodNumber;
36
+ urgent: z.ZodBoolean;
37
+ peopleRequired: z.ZodNumber;
38
+ facilities: z.ZodArray<z.ZodString, "many">;
39
+ responsibilities: z.ZodArray<z.ZodString, "many">;
40
+ questions: z.ZodArray<z.ZodObject<{
41
+ question: z.ZodString;
42
+ answer: z.ZodString;
43
+ }, "strict", z.ZodTypeAny, {
44
+ question: string;
45
+ answer: string;
46
+ }, {
47
+ question: string;
48
+ answer: string;
49
+ }>, "many">;
50
+ applicationCount: z.ZodNumber;
51
+ views: z.ZodNumber;
52
+ shares: z.ZodNumber;
53
+ rating: z.ZodNumber;
54
+ ratingCount: z.ZodNumber;
55
+ reviewCount: z.ZodNumber;
56
+ hostingType: z.ZodOptional<z.ZodString>;
57
+ hostId: z.ZodLazy<z.ZodObject<{
58
+ username: z.ZodString;
59
+ firstName: z.ZodString;
60
+ lastName: z.ZodString;
61
+ email: z.ZodString;
62
+ password: z.ZodString;
63
+ phoneNumber: z.ZodString;
64
+ countryCode: z.ZodString;
65
+ country: z.ZodString;
66
+ location: z.ZodOptional<z.ZodString>;
67
+ pinCode: z.ZodOptional<z.ZodString>;
68
+ dob: z.ZodOptional<z.ZodDate>;
69
+ gender: z.ZodEnum<["male", "female", "other"]>;
70
+ profilePic: z.ZodOptional<z.ZodString>;
71
+ rating: z.ZodNumber;
72
+ ratingCount: z.ZodNumber;
73
+ reviewCount: z.ZodNumber;
74
+ blogsCount: z.ZodOptional<z.ZodNumber>;
75
+ joinedDate: z.ZodDate;
76
+ isActive: z.ZodBoolean;
77
+ lastActive: z.ZodDate;
78
+ userBio: z.ZodOptional<z.ZodString>;
79
+ userIdCard: z.ZodOptional<z.ZodString>;
80
+ watchHistory: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
81
+ accessToken: z.ZodOptional<z.ZodString>;
82
+ refreshToken: z.ZodOptional<z.ZodString>;
83
+ verifiedEmail: z.ZodBoolean;
84
+ verifiedMobile: z.ZodBoolean;
85
+ verifiedIdCard: z.ZodOptional<z.ZodBoolean>;
86
+ role: z.ZodEnum<["host", "user", "admin", "hr", "sales"]>;
87
+ socialLinks: z.ZodOptional<z.ZodRecord<z.ZodEnum<[string, ...string[]]>, z.ZodString>>;
88
+ userResume: z.ZodOptional<z.ZodString>;
89
+ skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
90
+ skill: z.ZodString;
91
+ skillExpertise: z.ZodNumber;
92
+ }, "strip", z.ZodTypeAny, {
93
+ skill: string;
94
+ skillExpertise: number;
95
+ }, {
96
+ skill: string;
97
+ skillExpertise: number;
98
+ }>, "many">>;
99
+ wishlist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
100
+ favBlogs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
101
+ favPackages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
102
+ id: z.ZodOptional<z.ZodString>;
103
+ selfie: z.ZodOptional<z.ZodString>;
104
+ selfieAction: z.ZodOptional<z.ZodString>;
105
+ jobCount: z.ZodOptional<z.ZodNumber>;
106
+ travelPackageCount: z.ZodOptional<z.ZodNumber>;
107
+ gstNumber: z.ZodOptional<z.ZodString>;
108
+ panCard: z.ZodOptional<z.ZodString>;
109
+ verifiedBusiness: z.ZodOptional<z.ZodEnum<["true", "false", "inProgress"]>>;
110
+ }, "strict", z.ZodTypeAny, {
111
+ username: string;
112
+ firstName: string;
113
+ lastName: string;
114
+ email: string;
115
+ password: string;
116
+ phoneNumber: string;
117
+ countryCode: string;
118
+ country: string;
119
+ gender: "male" | "female" | "other";
120
+ rating: number;
121
+ ratingCount: number;
122
+ reviewCount: number;
123
+ joinedDate: Date;
124
+ isActive: boolean;
125
+ lastActive: Date;
126
+ verifiedEmail: boolean;
127
+ verifiedMobile: boolean;
128
+ role: "host" | "user" | "admin" | "hr" | "sales";
129
+ location?: string | undefined;
130
+ pinCode?: string | undefined;
131
+ dob?: Date | undefined;
132
+ profilePic?: string | undefined;
133
+ blogsCount?: number | undefined;
134
+ userBio?: string | undefined;
135
+ userIdCard?: string | undefined;
136
+ watchHistory?: string[] | undefined;
137
+ accessToken?: string | undefined;
138
+ refreshToken?: string | undefined;
139
+ verifiedIdCard?: boolean | undefined;
140
+ socialLinks?: Record<string, string> | undefined;
141
+ userResume?: string | undefined;
142
+ skills?: {
143
+ skill: string;
144
+ skillExpertise: number;
145
+ }[] | undefined;
146
+ wishlist?: string[] | undefined;
147
+ favBlogs?: string[] | undefined;
148
+ favPackages?: string[] | undefined;
149
+ id?: string | undefined;
150
+ selfie?: string | undefined;
151
+ selfieAction?: string | undefined;
152
+ jobCount?: number | undefined;
153
+ travelPackageCount?: number | undefined;
154
+ gstNumber?: string | undefined;
155
+ panCard?: string | undefined;
156
+ verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
157
+ }, {
158
+ username: string;
159
+ firstName: string;
160
+ lastName: string;
161
+ email: string;
162
+ password: string;
163
+ phoneNumber: string;
164
+ countryCode: string;
165
+ country: string;
166
+ gender: "male" | "female" | "other";
167
+ rating: number;
168
+ ratingCount: number;
169
+ reviewCount: number;
170
+ joinedDate: Date;
171
+ isActive: boolean;
172
+ lastActive: Date;
173
+ verifiedEmail: boolean;
174
+ verifiedMobile: boolean;
175
+ role: "host" | "user" | "admin" | "hr" | "sales";
176
+ location?: string | undefined;
177
+ pinCode?: string | undefined;
178
+ dob?: Date | undefined;
179
+ profilePic?: string | undefined;
180
+ blogsCount?: number | undefined;
181
+ userBio?: string | undefined;
182
+ userIdCard?: string | undefined;
183
+ watchHistory?: string[] | undefined;
184
+ accessToken?: string | undefined;
185
+ refreshToken?: string | undefined;
186
+ verifiedIdCard?: boolean | undefined;
187
+ socialLinks?: Record<string, string> | undefined;
188
+ userResume?: string | undefined;
189
+ skills?: {
190
+ skill: string;
191
+ skillExpertise: number;
192
+ }[] | undefined;
193
+ wishlist?: string[] | undefined;
194
+ favBlogs?: string[] | undefined;
195
+ favPackages?: string[] | undefined;
196
+ id?: string | undefined;
197
+ selfie?: string | undefined;
198
+ selfieAction?: string | undefined;
199
+ jobCount?: number | undefined;
200
+ travelPackageCount?: number | undefined;
201
+ gstNumber?: string | undefined;
202
+ panCard?: string | undefined;
203
+ verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
204
+ }>>;
205
+ applicationObservers: z.ZodOptional<z.ZodArray<z.ZodObject<{
206
+ username: z.ZodString;
207
+ role: z.ZodEnum<["host", "user", "admin", "hr", "sales"]>;
208
+ countryCode: z.ZodString;
209
+ phoneNumber: z.ZodString;
210
+ email: z.ZodString;
211
+ }, "strip", z.ZodTypeAny, {
212
+ username: string;
213
+ email: string;
214
+ phoneNumber: string;
215
+ countryCode: string;
216
+ role: "host" | "user" | "admin" | "hr" | "sales";
217
+ }, {
218
+ username: string;
219
+ email: string;
220
+ phoneNumber: string;
221
+ countryCode: string;
222
+ role: "host" | "user" | "admin" | "hr" | "sales";
223
+ }>, "many">>;
224
+ status: z.ZodEnum<["draft", "archived", "pending", "open", "closed", "denied", "deleted"]>;
225
+ adminApproval: z.ZodBoolean;
226
+ createdAt: z.ZodOptional<z.ZodDate>;
227
+ updatedAt: z.ZodOptional<z.ZodDate>;
228
+ } & {
229
+ opportunityType: z.ZodLiteral<"freelance">;
230
+ compensation: z.ZodObject<{
231
+ type: z.ZodEnum<[string, ...string[]]>;
232
+ amount: z.ZodOptional<z.ZodNumber>;
233
+ currency: z.ZodEnum<[string, ...string[]]>;
234
+ frequency: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ type: string;
237
+ currency: string;
238
+ amount?: number | undefined;
239
+ frequency?: string | undefined;
240
+ }, {
241
+ type: string;
242
+ currency: string;
243
+ amount?: number | undefined;
244
+ frequency?: string | undefined;
245
+ }>;
246
+ platformFees: z.ZodObject<{
247
+ commissionPercent: z.ZodNumber;
248
+ commissionAmount: z.ZodNumber;
249
+ payoutToHost: z.ZodNumber;
250
+ }, "strip", z.ZodTypeAny, {
251
+ commissionPercent: number;
252
+ commissionAmount: number;
253
+ payoutToHost: number;
254
+ }, {
255
+ commissionPercent: number;
256
+ commissionAmount: number;
257
+ payoutToHost: number;
258
+ }>;
259
+ legal: z.ZodObject<{
260
+ agreementRequired: z.ZodBoolean;
261
+ ndaRequired: z.ZodBoolean;
262
+ ipOwnership: z.ZodOptional<z.ZodEnum<["host", "shared", "freelancer"]>>;
263
+ }, "strip", z.ZodTypeAny, {
264
+ agreementRequired: boolean;
265
+ ndaRequired: boolean;
266
+ ipOwnership?: "host" | "shared" | "freelancer" | undefined;
267
+ }, {
268
+ agreementRequired: boolean;
269
+ ndaRequired: boolean;
270
+ ipOwnership?: "host" | "shared" | "freelancer" | undefined;
271
+ }>;
272
+ }, "strict", z.ZodTypeAny, {
273
+ country: string;
274
+ status: "draft" | "archived" | "pending" | "denied" | "open" | "closed" | "deleted";
275
+ rating: number;
276
+ ratingCount: number;
277
+ reviewCount: number;
278
+ skills: string[];
279
+ title: string;
280
+ description: string;
281
+ slug: string;
282
+ opportunityType: "freelance";
283
+ images: string[];
284
+ city: string;
285
+ state: string;
286
+ compensation: {
287
+ type: string;
288
+ currency: string;
289
+ amount?: number | undefined;
290
+ frequency?: string | undefined;
291
+ };
292
+ availableFrom: Date;
293
+ minDuration: number;
294
+ maxDuration: number;
295
+ urgent: boolean;
296
+ peopleRequired: number;
297
+ facilities: string[];
298
+ responsibilities: string[];
299
+ questions: {
300
+ question: string;
301
+ answer: string;
302
+ }[];
303
+ applicationCount: number;
304
+ views: number;
305
+ shares: number;
306
+ hostId: {
307
+ username: string;
308
+ firstName: string;
309
+ lastName: string;
310
+ email: string;
311
+ password: string;
312
+ phoneNumber: string;
313
+ countryCode: string;
314
+ country: string;
315
+ gender: "male" | "female" | "other";
316
+ rating: number;
317
+ ratingCount: number;
318
+ reviewCount: number;
319
+ joinedDate: Date;
320
+ isActive: boolean;
321
+ lastActive: Date;
322
+ verifiedEmail: boolean;
323
+ verifiedMobile: boolean;
324
+ role: "host" | "user" | "admin" | "hr" | "sales";
325
+ location?: string | undefined;
326
+ pinCode?: string | undefined;
327
+ dob?: Date | undefined;
328
+ profilePic?: string | undefined;
329
+ blogsCount?: number | undefined;
330
+ userBio?: string | undefined;
331
+ userIdCard?: string | undefined;
332
+ watchHistory?: string[] | undefined;
333
+ accessToken?: string | undefined;
334
+ refreshToken?: string | undefined;
335
+ verifiedIdCard?: boolean | undefined;
336
+ socialLinks?: Record<string, string> | undefined;
337
+ userResume?: string | undefined;
338
+ skills?: {
339
+ skill: string;
340
+ skillExpertise: number;
341
+ }[] | undefined;
342
+ wishlist?: string[] | undefined;
343
+ favBlogs?: string[] | undefined;
344
+ favPackages?: string[] | undefined;
345
+ id?: string | undefined;
346
+ selfie?: string | undefined;
347
+ selfieAction?: string | undefined;
348
+ jobCount?: number | undefined;
349
+ travelPackageCount?: number | undefined;
350
+ gstNumber?: string | undefined;
351
+ panCard?: string | undefined;
352
+ verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
353
+ };
354
+ adminApproval: boolean;
355
+ platformFees: {
356
+ commissionPercent: number;
357
+ commissionAmount: number;
358
+ payoutToHost: number;
359
+ };
360
+ legal: {
361
+ agreementRequired: boolean;
362
+ ndaRequired: boolean;
363
+ ipOwnership?: "host" | "shared" | "freelancer" | undefined;
364
+ };
365
+ createdAt?: Date | undefined;
366
+ updatedAt?: Date | undefined;
367
+ categoryId?: string | undefined;
368
+ address?: string | undefined;
369
+ workMode?: string | undefined;
370
+ bondPlan?: {
371
+ enabled: boolean;
372
+ commissionRate: number;
373
+ durationMonths?: number | undefined;
374
+ hostFee?: number | undefined;
375
+ securityDeposit?: number | undefined;
376
+ } | undefined;
377
+ hostingType?: string | undefined;
378
+ applicationObservers?: {
379
+ username: string;
380
+ email: string;
381
+ phoneNumber: string;
382
+ countryCode: string;
383
+ role: "host" | "user" | "admin" | "hr" | "sales";
384
+ }[] | undefined;
385
+ }, {
386
+ country: string;
387
+ status: "draft" | "archived" | "pending" | "denied" | "open" | "closed" | "deleted";
388
+ rating: number;
389
+ ratingCount: number;
390
+ reviewCount: number;
391
+ skills: string[];
392
+ title: string;
393
+ description: string;
394
+ slug: string;
395
+ opportunityType: "freelance";
396
+ images: string[];
397
+ city: string;
398
+ state: string;
399
+ compensation: {
400
+ type: string;
401
+ currency: string;
402
+ amount?: number | undefined;
403
+ frequency?: string | undefined;
404
+ };
405
+ availableFrom: Date;
406
+ minDuration: number;
407
+ maxDuration: number;
408
+ urgent: boolean;
409
+ peopleRequired: number;
410
+ facilities: string[];
411
+ responsibilities: string[];
412
+ questions: {
413
+ question: string;
414
+ answer: string;
415
+ }[];
416
+ applicationCount: number;
417
+ views: number;
418
+ shares: number;
419
+ hostId: {
420
+ username: string;
421
+ firstName: string;
422
+ lastName: string;
423
+ email: string;
424
+ password: string;
425
+ phoneNumber: string;
426
+ countryCode: string;
427
+ country: string;
428
+ gender: "male" | "female" | "other";
429
+ rating: number;
430
+ ratingCount: number;
431
+ reviewCount: number;
432
+ joinedDate: Date;
433
+ isActive: boolean;
434
+ lastActive: Date;
435
+ verifiedEmail: boolean;
436
+ verifiedMobile: boolean;
437
+ role: "host" | "user" | "admin" | "hr" | "sales";
438
+ location?: string | undefined;
439
+ pinCode?: string | undefined;
440
+ dob?: Date | undefined;
441
+ profilePic?: string | undefined;
442
+ blogsCount?: number | undefined;
443
+ userBio?: string | undefined;
444
+ userIdCard?: string | undefined;
445
+ watchHistory?: string[] | undefined;
446
+ accessToken?: string | undefined;
447
+ refreshToken?: string | undefined;
448
+ verifiedIdCard?: boolean | undefined;
449
+ socialLinks?: Record<string, string> | undefined;
450
+ userResume?: string | undefined;
451
+ skills?: {
452
+ skill: string;
453
+ skillExpertise: number;
454
+ }[] | undefined;
455
+ wishlist?: string[] | undefined;
456
+ favBlogs?: string[] | undefined;
457
+ favPackages?: string[] | undefined;
458
+ id?: string | undefined;
459
+ selfie?: string | undefined;
460
+ selfieAction?: string | undefined;
461
+ jobCount?: number | undefined;
462
+ travelPackageCount?: number | undefined;
463
+ gstNumber?: string | undefined;
464
+ panCard?: string | undefined;
465
+ verifiedBusiness?: "true" | "false" | "inProgress" | undefined;
466
+ };
467
+ adminApproval: boolean;
468
+ platformFees: {
469
+ commissionPercent: number;
470
+ commissionAmount: number;
471
+ payoutToHost: number;
472
+ };
473
+ legal: {
474
+ agreementRequired: boolean;
475
+ ndaRequired: boolean;
476
+ ipOwnership?: "host" | "shared" | "freelancer" | undefined;
477
+ };
478
+ createdAt?: Date | undefined;
479
+ updatedAt?: Date | undefined;
480
+ categoryId?: string | undefined;
481
+ address?: string | undefined;
482
+ workMode?: string | undefined;
483
+ bondPlan?: {
484
+ enabled: boolean;
485
+ durationMonths?: number | undefined;
486
+ hostFee?: number | undefined;
487
+ securityDeposit?: number | undefined;
488
+ commissionRate?: number | undefined;
489
+ } | undefined;
490
+ hostingType?: string | undefined;
491
+ applicationObservers?: {
492
+ username: string;
493
+ email: string;
494
+ phoneNumber: string;
495
+ countryCode: string;
496
+ role: "host" | "user" | "admin" | "hr" | "sales";
497
+ }[] | undefined;
498
+ }>;
499
+ //# sourceMappingURL=freelance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"freelance.d.ts","sourceRoot":"","sources":["../../../../src/lib/models/opportunities/freelance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUrC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { CompensationSchema, OpportunitySchema, PlatformFeeSchema } from "./opportunity";
2
+ import { z } from "zod";
3
+ export const FreelanceOpportunitySchema = OpportunitySchema.extend({
4
+ opportunityType: z.literal("freelance"),
5
+ compensation: CompensationSchema,
6
+ platformFees: PlatformFeeSchema,
7
+ legal: z.object({
8
+ agreementRequired: z.boolean(),
9
+ ndaRequired: z.boolean(),
10
+ ipOwnership: z.enum(["host", "shared", "freelancer"]).optional(),
11
+ }),
12
+ });