@thejob/schema 1.0.86 → 1.0.87

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.
@@ -1,4 +1,71 @@
1
1
  import { InferType } from "../yup-extended";
2
+ export declare const GroupTranslationSchema: import("yup").ObjectSchema<{
3
+ language: string;
4
+ name: string;
5
+ description: string | undefined;
6
+ slug: string | undefined;
7
+ seo: {
8
+ description?: string | undefined;
9
+ keywords?: string[] | undefined;
10
+ } | undefined;
11
+ }, import("yup").AnyObject, {
12
+ language: undefined;
13
+ name: undefined;
14
+ description: undefined;
15
+ slug: undefined;
16
+ seo: {
17
+ description: undefined;
18
+ keywords: "";
19
+ };
20
+ }, "">;
21
+ export type TGroupTranslationSchema = InferType<typeof GroupTranslationSchema>;
22
+ export declare const GroupFormSchema: import("yup").ObjectSchema<{
23
+ name: string;
24
+ description: string | undefined;
25
+ slug: string | undefined;
26
+ filterQuery: {
27
+ courses?: string | undefined;
28
+ jobs?: string | undefined;
29
+ discussions?: string | undefined;
30
+ };
31
+ countries: string[];
32
+ logo: string | undefined;
33
+ banner: string | undefined;
34
+ isFeatured: boolean | undefined;
35
+ seo: {
36
+ description?: string | undefined;
37
+ keywords?: string[] | undefined;
38
+ };
39
+ translation: {
40
+ description?: string | undefined;
41
+ slug?: string | undefined;
42
+ seo?: {
43
+ description?: string | undefined;
44
+ keywords?: string[] | undefined;
45
+ } | undefined;
46
+ language: string;
47
+ name: string;
48
+ }[] | undefined;
49
+ }, import("yup").AnyObject, {
50
+ name: undefined;
51
+ description: undefined;
52
+ slug: undefined;
53
+ filterQuery: {
54
+ jobs: undefined;
55
+ courses: undefined;
56
+ discussions: undefined;
57
+ };
58
+ countries: "";
59
+ logo: undefined;
60
+ banner: undefined;
61
+ isFeatured: undefined;
62
+ seo: {
63
+ description: undefined;
64
+ keywords: "";
65
+ };
66
+ translation: "";
67
+ }, "">;
68
+ export type TGroupFormSchema = InferType<typeof GroupFormSchema>;
2
69
  export declare const GroupSchema: import("yup").ObjectSchema<{
3
70
  id: string;
4
71
  shortId: string;
@@ -7,18 +74,28 @@ export declare const GroupSchema: import("yup").ObjectSchema<{
7
74
  slug: string;
8
75
  banner: string | undefined;
9
76
  logo: string | undefined;
77
+ isFeatured: boolean | undefined;
10
78
  followersCount: number | undefined;
11
- seoTags: {
12
- meta: {
13
- description?: string | undefined;
14
- keywords?: (string | undefined)[] | undefined;
15
- };
16
- } | undefined;
79
+ countries: (string | undefined)[] | undefined;
17
80
  filterQuery: {
18
81
  courses?: string | undefined;
19
82
  jobs?: string | undefined;
20
83
  discussions?: string | undefined;
21
84
  };
85
+ seo: {
86
+ description?: string | undefined;
87
+ keywords?: (string | undefined)[] | undefined;
88
+ } | undefined;
89
+ translation: {
90
+ description?: string | undefined;
91
+ slug?: string | undefined;
92
+ seo?: {
93
+ description?: string | undefined;
94
+ keywords?: string[] | undefined;
95
+ } | undefined;
96
+ language: string;
97
+ name: string;
98
+ }[] | undefined;
22
99
  }, import("yup").AnyObject, {
23
100
  id: undefined;
24
101
  shortId: undefined;
@@ -27,18 +104,19 @@ export declare const GroupSchema: import("yup").ObjectSchema<{
27
104
  slug: undefined;
28
105
  banner: undefined;
29
106
  logo: undefined;
107
+ isFeatured: undefined;
30
108
  followersCount: undefined;
31
- seoTags: {
32
- meta: {
33
- description: undefined;
34
- keywords: "";
35
- };
36
- };
109
+ countries: "";
37
110
  filterQuery: {
38
111
  jobs: undefined;
39
112
  courses: undefined;
40
113
  discussions: undefined;
41
114
  };
115
+ seo: {
116
+ description: undefined;
117
+ keywords: "";
118
+ };
119
+ translation: "";
42
120
  }, "">;
43
121
  export type TGroupSchema = InferType<typeof GroupSchema>;
44
122
  //# sourceMappingURL=group.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"group.schema.d.ts","sourceRoot":"","sources":["../../../src/group/group.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,SAAS,EAA0B,MAAM,iBAAiB,CAAC;AAE3E,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2BA,CAAC;AAEzB,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"group.schema.d.ts","sourceRoot":"","sources":["../../../src/group/group.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EAIV,MAAM,iBAAiB,CAAC;AAIzB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;MASjC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,SAAS,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAI/E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqB1B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,OAAO,eAAe,CAAC,CAAC;AAIjE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA4BA,CAAC;AAEzB,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -1,7 +1,42 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GroupSchema = void 0;
3
+ exports.GroupSchema = exports.GroupFormSchema = exports.GroupTranslationSchema = void 0;
4
4
  const yup_extended_1 = require("../yup-extended");
5
+ // ─── Translation Schema ─────────────────────────────────────────────────────
6
+ exports.GroupTranslationSchema = (0, yup_extended_1.object)({
7
+ language: (0, yup_extended_1.string)().required("Language is required"),
8
+ name: (0, yup_extended_1.string)().required("Name is required"),
9
+ description: (0, yup_extended_1.string)().optional(),
10
+ slug: (0, yup_extended_1.string)().optional(),
11
+ seo: (0, yup_extended_1.object)({
12
+ description: (0, yup_extended_1.string)().optional(),
13
+ keywords: (0, yup_extended_1.array)().of((0, yup_extended_1.string)().required()).optional(),
14
+ }).optional(),
15
+ });
16
+ // ─── Form Schema (admin create / edit) ───────────────────────────────────────
17
+ exports.GroupFormSchema = (0, yup_extended_1.object)({
18
+ name: (0, yup_extended_1.string)().required("Name is required"),
19
+ description: (0, yup_extended_1.string)().optional(),
20
+ slug: (0, yup_extended_1.string)().optional(),
21
+ filterQuery: (0, yup_extended_1.object)({
22
+ jobs: (0, yup_extended_1.string)().optional(),
23
+ courses: (0, yup_extended_1.string)().optional(),
24
+ discussions: (0, yup_extended_1.string)().optional(),
25
+ }).required("Filter query is required"),
26
+ countries: (0, yup_extended_1.array)()
27
+ .of((0, yup_extended_1.string)().required())
28
+ .min(1, "At least one country is required")
29
+ .required(),
30
+ logo: (0, yup_extended_1.string)().optional(),
31
+ banner: (0, yup_extended_1.string)().optional(),
32
+ isFeatured: (0, yup_extended_1.boolean)().optional(),
33
+ seo: (0, yup_extended_1.object)({
34
+ description: (0, yup_extended_1.string)().optional(),
35
+ keywords: (0, yup_extended_1.array)().of((0, yup_extended_1.string)().required()).optional(),
36
+ }),
37
+ translation: (0, yup_extended_1.array)().of(exports.GroupTranslationSchema).optional(),
38
+ });
39
+ // ─── Full Document Schema ────────────────────────────────────────────────────
5
40
  exports.GroupSchema = (0, yup_extended_1.object)()
6
41
  .shape({
7
42
  id: (0, yup_extended_1.string)().objectId().required().label("ID"),
@@ -11,16 +46,9 @@ exports.GroupSchema = (0, yup_extended_1.object)()
11
46
  slug: (0, yup_extended_1.string)().required().label("Slug"),
12
47
  banner: (0, yup_extended_1.string)().label("Banner"),
13
48
  logo: (0, yup_extended_1.string)().label("Logo"),
49
+ isFeatured: (0, yup_extended_1.boolean)().label("Is Featured"),
14
50
  followersCount: (0, yup_extended_1.number)().min(0).label("Followers Count"),
15
- seoTags: (0, yup_extended_1.object)()
16
- .shape({
17
- meta: (0, yup_extended_1.object)().shape({
18
- description: (0, yup_extended_1.string)().optional().label("Description"),
19
- keywords: (0, yup_extended_1.array)().of((0, yup_extended_1.string)()).optional().label("Keywords"),
20
- }),
21
- })
22
- .optional()
23
- .label("SEO Tags"),
51
+ countries: (0, yup_extended_1.array)().of((0, yup_extended_1.string)()).optional().label("Countries"),
24
52
  filterQuery: (0, yup_extended_1.object)()
25
53
  .shape({
26
54
  jobs: (0, yup_extended_1.string)().label("Job"),
@@ -28,5 +56,13 @@ exports.GroupSchema = (0, yup_extended_1.object)()
28
56
  discussions: (0, yup_extended_1.string)().label("Discussion"),
29
57
  })
30
58
  .label("Filter Query"),
59
+ seo: (0, yup_extended_1.object)()
60
+ .shape({
61
+ description: (0, yup_extended_1.string)().optional().label("Description"),
62
+ keywords: (0, yup_extended_1.array)().of((0, yup_extended_1.string)()).optional().label("Keywords"),
63
+ })
64
+ .optional()
65
+ .label("SEO"),
66
+ translation: (0, yup_extended_1.array)().of(exports.GroupTranslationSchema).optional().label("Translations"),
31
67
  })
32
68
  .label("Group Schema");
@@ -24,6 +24,5 @@ export * from "./social-account";
24
24
  export * from "./design-and-font";
25
25
  export * from "./yup-extended";
26
26
  export * from "./constants";
27
- export * from "./recommendation";
28
27
  export * from './interfaces.index';
29
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
package/dist/cjs/index.js CHANGED
@@ -40,5 +40,4 @@ __exportStar(require("./social-account"), exports);
40
40
  __exportStar(require("./design-and-font"), exports);
41
41
  __exportStar(require("./yup-extended"), exports);
42
42
  __exportStar(require("./constants"), exports);
43
- __exportStar(require("./recommendation"), exports);
44
43
  __exportStar(require("./interfaces.index"), exports);
@@ -595,15 +595,63 @@ export interface IDurationSchema {
595
595
  export interface IFieldOfStudySchema {
596
596
  name: string;
597
597
  }
598
- export interface IGroupSchema {
598
+ export interface IGroupTranslationSchema {
599
+ slug?: string | undefined;
600
+ description?: string | undefined;
601
+ seo?: {
602
+ description?: string | undefined;
603
+ keywords?: string[] | undefined;
604
+ } | undefined;
605
+ name: string;
606
+ language: string;
607
+ }
608
+ export interface IGroupFormSchema {
609
+ slug?: string | undefined;
599
610
  logo?: string | undefined;
600
- seoTags?: {
601
- meta: {
611
+ description?: string | undefined;
612
+ banner?: string | undefined;
613
+ isFeatured?: boolean | undefined;
614
+ translation?: {
615
+ slug?: string | undefined;
616
+ description?: string | undefined;
617
+ seo?: {
602
618
  description?: string | undefined;
603
- keywords?: (string | undefined)[] | undefined;
604
- };
619
+ keywords?: string[] | undefined;
620
+ } | undefined;
621
+ name: string;
622
+ language: string;
623
+ }[] | undefined;
624
+ name: string;
625
+ seo: {
626
+ description?: string | undefined;
627
+ keywords?: string[] | undefined;
628
+ };
629
+ filterQuery: {
630
+ jobs?: string | undefined;
631
+ courses?: string | undefined;
632
+ discussions?: string | undefined;
633
+ };
634
+ countries: string[];
635
+ }
636
+ export interface IGroupSchema {
637
+ logo?: string | undefined;
638
+ seo?: {
639
+ description?: string | undefined;
640
+ keywords?: (string | undefined)[] | undefined;
605
641
  } | undefined;
642
+ countries?: (string | undefined)[] | undefined;
606
643
  banner?: string | undefined;
644
+ isFeatured?: boolean | undefined;
645
+ translation?: {
646
+ slug?: string | undefined;
647
+ description?: string | undefined;
648
+ seo?: {
649
+ description?: string | undefined;
650
+ keywords?: string[] | undefined;
651
+ } | undefined;
652
+ name: string;
653
+ language: string;
654
+ }[] | undefined;
607
655
  followersCount?: number | undefined;
608
656
  slug: string;
609
657
  id: string;
@@ -1264,36 +1312,6 @@ export interface IReadAndAcknowledgeQuestionSchema {
1264
1312
  preferredAnswer: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/constants/common/common").Common.Yes | import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/constants/common/common").Common.No | undefined>;
1265
1313
  answers: NonNullable<import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/constants/common/common").Common.Yes | import("/Users/nadeem.ahmad/Documents/GitHub/thejob-yup-schema/src/constants/common/common").Common.No | undefined>;
1266
1314
  }
1267
- export interface IRecommendationFormSchema {
1268
- slug?: string | undefined;
1269
- subTitle?: string | undefined;
1270
- translation?: {
1271
- slug?: string | undefined;
1272
- subTitle?: string | undefined;
1273
- seo?: {
1274
- description?: string | undefined;
1275
- keywords?: string[] | undefined;
1276
- } | undefined;
1277
- title: string;
1278
- language: string;
1279
- }[] | undefined;
1280
- title: string;
1281
- countries: string[];
1282
- seo: {
1283
- description?: string | undefined;
1284
- keywords?: string[] | undefined;
1285
- };
1286
- }
1287
- export interface IRecommendationTranslationSchema {
1288
- slug?: string | undefined;
1289
- subTitle?: string | undefined;
1290
- seo?: {
1291
- description?: string | undefined;
1292
- keywords?: string[] | undefined;
1293
- } | undefined;
1294
- title: string;
1295
- language: string;
1296
- }
1297
1315
  export interface IResumeGeneralInfoSectionSchema {
1298
1316
  headline?: string | undefined;
1299
1317
  id?: string | undefined;