@zyacreatives/shared 2.0.0 → 2.0.11
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 +4 -4
- package/dist/constants.js +2 -2
- package/dist/schemas/job.d.ts +52 -8
- package/dist/schemas/job.js +2 -0
- package/package.json +1 -1
- package/src/constants.ts +5 -4
- package/src/schemas/job.ts +4 -0
package/dist/constants.d.ts
CHANGED
|
@@ -147,8 +147,8 @@ export declare const JOB_LOCATIONS: {
|
|
|
147
147
|
};
|
|
148
148
|
export type JobLocation = (typeof JOB_LOCATIONS)[keyof typeof JOB_LOCATIONS];
|
|
149
149
|
export declare const GIG_TYPE: {
|
|
150
|
-
ONE_TIME:
|
|
151
|
-
RECURRING:
|
|
150
|
+
readonly ONE_TIME: "One Time";
|
|
151
|
+
readonly RECURRING: "Recurring";
|
|
152
152
|
};
|
|
153
153
|
export declare const WAGES_CURRENCY: {
|
|
154
154
|
readonly USD: "USD";
|
|
@@ -162,7 +162,7 @@ export declare const WAGES_CURRENCY: {
|
|
|
162
162
|
readonly INR: "INR";
|
|
163
163
|
readonly ZAR: "ZAR";
|
|
164
164
|
};
|
|
165
|
-
export declare const
|
|
165
|
+
export declare const JOB_STATUS: {
|
|
166
166
|
readonly ACTIVE: "ACTIVE";
|
|
167
167
|
readonly DRAFT: "DRAFT";
|
|
168
168
|
readonly ARCHIVED: "ARCHIVED";
|
|
@@ -170,7 +170,7 @@ export declare const JOBPOST_STATUS: {
|
|
|
170
170
|
};
|
|
171
171
|
export type JobSections = (typeof JOB_SECTIONS)[keyof typeof JOB_SECTIONS];
|
|
172
172
|
export type WagesCurrency = (typeof WAGES_CURRENCY)[keyof typeof WAGES_CURRENCY];
|
|
173
|
-
export type
|
|
173
|
+
export type JobStatus = (typeof JOB_STATUS)[keyof typeof JOB_STATUS];
|
|
174
174
|
export type Role = (typeof ROLES)[keyof typeof ROLES];
|
|
175
175
|
export type JobType = (typeof JOB_TYPE)[keyof typeof JOB_TYPE];
|
|
176
176
|
export type WorkMode = (typeof WORK_MODE)[keyof typeof WORK_MODE];
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_DISCIPLINES = exports.API_ROUTES = exports.
|
|
3
|
+
exports.DEFAULT_DISCIPLINES = exports.API_ROUTES = exports.JOB_STATUS = exports.WAGES_CURRENCY = exports.GIG_TYPE = 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;
|
|
4
4
|
exports.ROLES = {
|
|
5
5
|
CREATIVE: "CREATIVE",
|
|
6
6
|
BRAND: "BRAND",
|
|
@@ -164,7 +164,7 @@ exports.WAGES_CURRENCY = {
|
|
|
164
164
|
INR: "INR",
|
|
165
165
|
ZAR: "ZAR",
|
|
166
166
|
};
|
|
167
|
-
exports.
|
|
167
|
+
exports.JOB_STATUS = {
|
|
168
168
|
ACTIVE: "ACTIVE",
|
|
169
169
|
DRAFT: "DRAFT",
|
|
170
170
|
ARCHIVED: "ARCHIVED",
|
package/dist/schemas/job.d.ts
CHANGED
|
@@ -18,8 +18,15 @@ export declare const BaseJobEntitySchema: z.ZodObject<{
|
|
|
18
18
|
Hybrid: "Hybrid";
|
|
19
19
|
"On Site": "On Site";
|
|
20
20
|
}>;
|
|
21
|
+
status: z.ZodEnum<{
|
|
22
|
+
ACTIVE: "ACTIVE";
|
|
23
|
+
DELETED: "DELETED";
|
|
24
|
+
DRAFT: "DRAFT";
|
|
25
|
+
ARCHIVED: "ARCHIVED";
|
|
26
|
+
}>;
|
|
21
27
|
gigType: z.ZodOptional<z.ZodEnum<{
|
|
22
|
-
|
|
28
|
+
"One Time": "One Time";
|
|
29
|
+
Recurring: "Recurring";
|
|
23
30
|
}>>;
|
|
24
31
|
location: z.ZodEnum<{
|
|
25
32
|
Africa: "Africa";
|
|
@@ -51,6 +58,12 @@ export declare const JobEntitySchema: z.ZodObject<{
|
|
|
51
58
|
GIG: "GIG";
|
|
52
59
|
ROLE: "ROLE";
|
|
53
60
|
}>;
|
|
61
|
+
status: z.ZodEnum<{
|
|
62
|
+
ACTIVE: "ACTIVE";
|
|
63
|
+
DELETED: "DELETED";
|
|
64
|
+
DRAFT: "DRAFT";
|
|
65
|
+
ARCHIVED: "ARCHIVED";
|
|
66
|
+
}>;
|
|
54
67
|
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
55
68
|
"Full Time": "Full Time";
|
|
56
69
|
"Part Time": "Part Time";
|
|
@@ -63,7 +76,8 @@ export declare const JobEntitySchema: z.ZodObject<{
|
|
|
63
76
|
"On Site": "On Site";
|
|
64
77
|
}>;
|
|
65
78
|
gigType: z.ZodOptional<z.ZodEnum<{
|
|
66
|
-
|
|
79
|
+
"One Time": "One Time";
|
|
80
|
+
Recurring: "Recurring";
|
|
67
81
|
}>>;
|
|
68
82
|
location: z.ZodEnum<{
|
|
69
83
|
Africa: "Africa";
|
|
@@ -118,6 +132,12 @@ export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
|
|
|
118
132
|
brandId: z.ZodCUID2;
|
|
119
133
|
brandName: z.ZodCUID2;
|
|
120
134
|
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
135
|
+
status: z.ZodEnum<{
|
|
136
|
+
ACTIVE: "ACTIVE";
|
|
137
|
+
DELETED: "DELETED";
|
|
138
|
+
DRAFT: "DRAFT";
|
|
139
|
+
ARCHIVED: "ARCHIVED";
|
|
140
|
+
}>;
|
|
121
141
|
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
122
142
|
"Full Time": "Full Time";
|
|
123
143
|
"Part Time": "Part Time";
|
|
@@ -130,7 +150,8 @@ export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
|
|
|
130
150
|
"On Site": "On Site";
|
|
131
151
|
}>;
|
|
132
152
|
gigType: z.ZodOptional<z.ZodEnum<{
|
|
133
|
-
|
|
153
|
+
"One Time": "One Time";
|
|
154
|
+
Recurring: "Recurring";
|
|
134
155
|
}>>;
|
|
135
156
|
location: z.ZodEnum<{
|
|
136
157
|
Africa: "Africa";
|
|
@@ -220,6 +241,12 @@ export declare const JobWithRoleDetailsEntitySchema: z.ZodObject<{
|
|
|
220
241
|
brandId: z.ZodCUID2;
|
|
221
242
|
brandName: z.ZodCUID2;
|
|
222
243
|
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
244
|
+
status: z.ZodEnum<{
|
|
245
|
+
ACTIVE: "ACTIVE";
|
|
246
|
+
DELETED: "DELETED";
|
|
247
|
+
DRAFT: "DRAFT";
|
|
248
|
+
ARCHIVED: "ARCHIVED";
|
|
249
|
+
}>;
|
|
223
250
|
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
224
251
|
"Full Time": "Full Time";
|
|
225
252
|
"Part Time": "Part Time";
|
|
@@ -232,7 +259,8 @@ export declare const JobWithRoleDetailsEntitySchema: z.ZodObject<{
|
|
|
232
259
|
"On Site": "On Site";
|
|
233
260
|
}>;
|
|
234
261
|
gigType: z.ZodOptional<z.ZodEnum<{
|
|
235
|
-
|
|
262
|
+
"One Time": "One Time";
|
|
263
|
+
Recurring: "Recurring";
|
|
236
264
|
}>>;
|
|
237
265
|
location: z.ZodEnum<{
|
|
238
266
|
Africa: "Africa";
|
|
@@ -305,7 +333,8 @@ export declare const CreateJobInputSchema: z.ZodObject<{
|
|
|
305
333
|
"On Site": "On Site";
|
|
306
334
|
}>;
|
|
307
335
|
gigType: z.ZodOptional<z.ZodEnum<{
|
|
308
|
-
|
|
336
|
+
"One Time": "One Time";
|
|
337
|
+
Recurring: "Recurring";
|
|
309
338
|
}>>;
|
|
310
339
|
location: z.ZodDefault<z.ZodEnum<{
|
|
311
340
|
Africa: "Africa";
|
|
@@ -475,7 +504,8 @@ export declare const UpdateJobInputSchema: z.ZodObject<{
|
|
|
475
504
|
"On Site": "On Site";
|
|
476
505
|
}>>;
|
|
477
506
|
gigType: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
478
|
-
|
|
507
|
+
"One Time": "One Time";
|
|
508
|
+
Recurring: "Recurring";
|
|
479
509
|
}>>>;
|
|
480
510
|
location: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
481
511
|
Africa: "Africa";
|
|
@@ -498,6 +528,12 @@ export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
498
528
|
brandId: z.ZodCUID2;
|
|
499
529
|
brandName: z.ZodCUID2;
|
|
500
530
|
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
531
|
+
status: z.ZodEnum<{
|
|
532
|
+
ACTIVE: "ACTIVE";
|
|
533
|
+
DELETED: "DELETED";
|
|
534
|
+
DRAFT: "DRAFT";
|
|
535
|
+
ARCHIVED: "ARCHIVED";
|
|
536
|
+
}>;
|
|
501
537
|
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
502
538
|
"Full Time": "Full Time";
|
|
503
539
|
"Part Time": "Part Time";
|
|
@@ -510,7 +546,8 @@ export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
510
546
|
"On Site": "On Site";
|
|
511
547
|
}>;
|
|
512
548
|
gigType: z.ZodOptional<z.ZodEnum<{
|
|
513
|
-
|
|
549
|
+
"One Time": "One Time";
|
|
550
|
+
Recurring: "Recurring";
|
|
514
551
|
}>>;
|
|
515
552
|
location: z.ZodEnum<{
|
|
516
553
|
Africa: "Africa";
|
|
@@ -562,6 +599,12 @@ export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
562
599
|
brandId: z.ZodCUID2;
|
|
563
600
|
brandName: z.ZodCUID2;
|
|
564
601
|
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
602
|
+
status: z.ZodEnum<{
|
|
603
|
+
ACTIVE: "ACTIVE";
|
|
604
|
+
DELETED: "DELETED";
|
|
605
|
+
DRAFT: "DRAFT";
|
|
606
|
+
ARCHIVED: "ARCHIVED";
|
|
607
|
+
}>;
|
|
565
608
|
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
566
609
|
"Full Time": "Full Time";
|
|
567
610
|
"Part Time": "Part Time";
|
|
@@ -574,7 +617,8 @@ export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
574
617
|
"On Site": "On Site";
|
|
575
618
|
}>;
|
|
576
619
|
gigType: z.ZodOptional<z.ZodEnum<{
|
|
577
|
-
|
|
620
|
+
"One Time": "One Time";
|
|
621
|
+
Recurring: "Recurring";
|
|
578
622
|
}>>;
|
|
579
623
|
location: z.ZodEnum<{
|
|
580
624
|
Africa: "Africa";
|
package/dist/schemas/job.js
CHANGED
|
@@ -12,6 +12,7 @@ exports.BaseJobEntitySchema = zod_1.z.object({
|
|
|
12
12
|
.enum(Object.values(constants_1.EMPLOYMENT_TYPE))
|
|
13
13
|
.optional(),
|
|
14
14
|
workMode: zod_1.z.enum(Object.values(constants_1.WORK_MODE)),
|
|
15
|
+
status: zod_1.z.enum(Object.values(constants_1.JOB_STATUS)),
|
|
15
16
|
gigType: zod_1.z
|
|
16
17
|
.enum(Object.values(constants_1.GIG_TYPE))
|
|
17
18
|
.optional(),
|
|
@@ -29,6 +30,7 @@ exports.JobEntitySchema = zod_1.z.object({
|
|
|
29
30
|
brandName: zod_1.z.cuid2(),
|
|
30
31
|
brandImgUrl: zod_1.z.cuid2().optional(),
|
|
31
32
|
jobType: zod_1.z.enum(Object.values(constants_1.JOB_TYPE)),
|
|
33
|
+
status: zod_1.z.enum(Object.values(constants_1.JOB_STATUS)),
|
|
32
34
|
employmentType: zod_1.z
|
|
33
35
|
.enum(Object.values(constants_1.EMPLOYMENT_TYPE))
|
|
34
36
|
.optional(),
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -168,7 +168,8 @@ export type JobLocation = (typeof JOB_LOCATIONS)[keyof typeof JOB_LOCATIONS];
|
|
|
168
168
|
export const GIG_TYPE = {
|
|
169
169
|
ONE_TIME: "One Time",
|
|
170
170
|
RECURRING: "Recurring",
|
|
171
|
-
};
|
|
171
|
+
} as const;
|
|
172
|
+
|
|
172
173
|
export const WAGES_CURRENCY = {
|
|
173
174
|
USD: "USD",
|
|
174
175
|
EUR: "EUR",
|
|
@@ -182,7 +183,7 @@ export const WAGES_CURRENCY = {
|
|
|
182
183
|
ZAR: "ZAR",
|
|
183
184
|
} as const;
|
|
184
185
|
|
|
185
|
-
export const
|
|
186
|
+
export const JOB_STATUS = {
|
|
186
187
|
ACTIVE: "ACTIVE",
|
|
187
188
|
DRAFT: "DRAFT",
|
|
188
189
|
ARCHIVED: "ARCHIVED",
|
|
@@ -192,8 +193,8 @@ export const JOBPOST_STATUS = {
|
|
|
192
193
|
export type JobSections = (typeof JOB_SECTIONS)[keyof typeof JOB_SECTIONS];
|
|
193
194
|
export type WagesCurrency =
|
|
194
195
|
(typeof WAGES_CURRENCY)[keyof typeof WAGES_CURRENCY];
|
|
195
|
-
export type
|
|
196
|
-
(typeof
|
|
196
|
+
export type JobStatus =
|
|
197
|
+
(typeof JOB_STATUS)[keyof typeof JOB_STATUS];
|
|
197
198
|
export type Role = (typeof ROLES)[keyof typeof ROLES];
|
|
198
199
|
export type JobType = (typeof JOB_TYPE)[keyof typeof JOB_TYPE];
|
|
199
200
|
export type WorkMode = (typeof WORK_MODE)[keyof typeof WORK_MODE];
|
package/src/schemas/job.ts
CHANGED
|
@@ -9,9 +9,11 @@ import {
|
|
|
9
9
|
JOB_AVAILABILITY_TYPES,
|
|
10
10
|
JOB_LOCATIONS,
|
|
11
11
|
JOB_SECTIONS,
|
|
12
|
+
JOB_STATUS,
|
|
12
13
|
JOB_TYPE,
|
|
13
14
|
JobAvailabilityTypes,
|
|
14
15
|
JobLocation,
|
|
16
|
+
JobStatus,
|
|
15
17
|
JobType,
|
|
16
18
|
WAGE_TYPES,
|
|
17
19
|
WAGES_CURRENCY,
|
|
@@ -32,6 +34,7 @@ export const BaseJobEntitySchema = z.object({
|
|
|
32
34
|
)
|
|
33
35
|
.optional(),
|
|
34
36
|
workMode: z.enum(Object.values(WORK_MODE) as [WorkMode, ...WorkMode[]]),
|
|
37
|
+
status: z.enum(Object.values(JOB_STATUS) as [JobStatus, ...JobStatus[]]),
|
|
35
38
|
gigType: z
|
|
36
39
|
.enum(Object.values(GIG_TYPE) as [GigType, ...GigType[]])
|
|
37
40
|
.optional(),
|
|
@@ -53,6 +56,7 @@ export const JobEntitySchema = z.object({
|
|
|
53
56
|
brandName: z.cuid2(),
|
|
54
57
|
brandImgUrl: z.cuid2().optional(),
|
|
55
58
|
jobType: z.enum(Object.values(JOB_TYPE) as [JobType, ...JobType[]]),
|
|
59
|
+
status: z.enum(Object.values(JOB_STATUS) as [JobStatus, ...JobStatus[]]),
|
|
56
60
|
employmentType: z
|
|
57
61
|
.enum(
|
|
58
62
|
Object.values(EMPLOYMENT_TYPE) as [EmploymentType, ...EmploymentType[]]
|