@thejob/schema 1.0.38 → 1.0.39

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,84 +1,4 @@
1
- import { QuestionType } from "../question";
2
- export declare const getSchemaByQuestion: (type: QuestionType) => import("yup").ObjectSchema<{
3
- label: string | undefined;
4
- default: boolean;
5
- title: string;
6
- type: QuestionType.Input;
7
- isOptional: boolean | undefined;
8
- readonly: boolean | undefined;
9
- isNew: boolean | undefined;
10
- } & {
11
- type: QuestionType.Input;
12
- preferredAnswer: string | undefined;
13
- answers: string | undefined;
14
- }, import("yup").AnyObject, {
15
- label: undefined;
16
- default: false;
17
- title: undefined;
18
- type: undefined;
19
- isOptional: undefined;
20
- readonly: undefined;
21
- isNew: undefined;
22
- preferredAnswer: undefined;
23
- answers: undefined;
24
- }, ""> | import("yup").ObjectSchema<{
25
- label: string | undefined;
26
- default: boolean;
27
- title: string;
28
- type: QuestionType.Choice;
29
- isOptional: boolean | undefined;
30
- readonly: boolean | undefined;
31
- isNew: boolean | undefined;
32
- } & {
33
- type: QuestionType.Choice;
34
- optionsFrom: import("..").Common.EducationLevel | import("..").Common.ExperienceLevel | import("..").Common.Skill | undefined;
35
- options: (string | {
36
- logo?: string | undefined;
37
- name: string;
38
- id: string;
39
- } | {
40
- value: "others" | (string | undefined)[];
41
- otherValue: string | string[];
42
- } | undefined)[];
43
- answerChoiceType: NonNullable<import("../question").AnswerChoiceType | undefined>;
44
- preferredAnswer: import("../question").TMixedValue | import("../question").TMixedValue[] | undefined;
45
- answers: import("../question").TMixedValue | import("../question").TMixedValue[] | undefined;
46
- }, import("yup").AnyObject, {
47
- label: undefined;
48
- default: false;
49
- title: undefined;
50
- type: undefined;
51
- isOptional: undefined;
52
- readonly: undefined;
53
- isNew: undefined;
54
- optionsFrom: undefined;
55
- options: "";
56
- answerChoiceType: import("../question").AnswerChoiceType.Single;
57
- preferredAnswer: undefined;
58
- answers: undefined;
59
- }, ""> | import("yup").ObjectSchema<{
60
- label: string | undefined;
61
- default: boolean;
62
- title: string;
63
- type: QuestionType.ReadAndAcknowledge;
64
- isOptional: boolean | undefined;
65
- readonly: boolean | undefined;
66
- isNew: boolean | undefined;
67
- } & {
68
- type: QuestionType.ReadAndAcknowledge;
69
- description: string;
70
- preferredAnswer: NonNullable<import("..").Common.Yes | import("..").Common.No | undefined>;
71
- answers: NonNullable<import("..").Common.Yes | import("..").Common.No | undefined>;
72
- }, import("yup").AnyObject, {
73
- label: undefined;
74
- default: false;
75
- title: undefined;
76
- type: undefined;
77
- isOptional: undefined;
78
- readonly: undefined;
79
- isNew: undefined;
80
- description: undefined;
81
- preferredAnswer: undefined;
82
- answers: undefined;
83
- }, "">;
1
+ import { ObjectSchema } from "yup";
2
+ import { QuestionType, TQuestionSchema } from "../question";
3
+ export declare const getSchemaByQuestion: (type: QuestionType) => ObjectSchema<TQuestionSchema>;
84
4
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/job/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAEb,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,mBAAmB,GAAI,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWrD,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/job/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAGL,YAAY,EAEZ,eAAe,EAChB,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,mBAAmB,GAC9B,MAAM,YAAY,KACjB,YAAY,CAAC,eAAe,CAW9B,CAAC"}
@@ -245,19 +245,9 @@ export declare const JobApplicationSchema: ObjectSchema<{
245
245
  isNew?: boolean | undefined;
246
246
  isOptional?: boolean | undefined;
247
247
  readonly?: boolean | undefined;
248
- preferredAnswer?: string | undefined;
249
- answers?: string | undefined;
250
- type: import("../question").QuestionType.Input;
251
- default: boolean;
252
- title: string;
253
- } | {
254
- label?: string | undefined;
255
- isNew?: boolean | undefined;
256
- isOptional?: boolean | undefined;
257
- readonly?: boolean | undefined;
248
+ optionsFrom?: import("../common").Common.EducationLevel | import("../common").Common.ExperienceLevel | import("../common").Common.Skill | undefined;
258
249
  preferredAnswer?: import("../question").TMixedValue | import("../question").TMixedValue[] | undefined;
259
250
  answers?: import("../question").TMixedValue | import("../question").TMixedValue[] | undefined;
260
- optionsFrom?: import("../common").Common.EducationLevel | import("../common").Common.ExperienceLevel | import("../common").Common.Skill | undefined;
261
251
  type: import("../question").QuestionType.Choice;
262
252
  default: boolean;
263
253
  title: string;
@@ -270,6 +260,16 @@ export declare const JobApplicationSchema: ObjectSchema<{
270
260
  otherValue: string | string[];
271
261
  } | undefined)[];
272
262
  answerChoiceType: NonNullable<import("../question").AnswerChoiceType | undefined>;
263
+ } | {
264
+ label?: string | undefined;
265
+ isNew?: boolean | undefined;
266
+ isOptional?: boolean | undefined;
267
+ readonly?: boolean | undefined;
268
+ preferredAnswer?: string | undefined;
269
+ answers?: string | undefined;
270
+ type: import("../question").QuestionType.Input;
271
+ default: boolean;
272
+ title: string;
273
273
  } | {
274
274
  label?: string | undefined;
275
275
  isNew?: boolean | undefined;
@@ -21,6 +21,47 @@ export declare const JobRoleTemplateSchema: import("yup").ObjectSchema<{
21
21
  } | undefined>;
22
22
  tags: any[] | undefined;
23
23
  questionnaire: ({
24
+ label?: string | undefined;
25
+ isNew?: boolean | undefined;
26
+ isOptional?: boolean | undefined;
27
+ readonly?: boolean | undefined;
28
+ optionsFrom?: import("..").Common.EducationLevel | import("..").Common.ExperienceLevel | import("..").Common.Skill | undefined;
29
+ preferredAnswer?: import("..").TMixedValue | import("..").TMixedValue[] | undefined;
30
+ answers?: import("..").TMixedValue | import("..").TMixedValue[] | undefined;
31
+ type: import("..").QuestionType.Choice;
32
+ default: boolean;
33
+ title: string;
34
+ options: (string | {
35
+ logo?: string | undefined;
36
+ name: string;
37
+ id: string;
38
+ } | {
39
+ value: "others" | (string | undefined)[];
40
+ otherValue: string | string[];
41
+ } | undefined)[];
42
+ answerChoiceType: NonNullable<import("..").AnswerChoiceType | undefined>;
43
+ } | {
44
+ label?: string | undefined;
45
+ isNew?: boolean | undefined;
46
+ isOptional?: boolean | undefined;
47
+ readonly?: boolean | undefined;
48
+ preferredAnswer?: string | undefined;
49
+ answers?: string | undefined;
50
+ type: import("..").QuestionType.Input;
51
+ default: boolean;
52
+ title: string;
53
+ } | {
54
+ label?: string | undefined;
55
+ isNew?: boolean | undefined;
56
+ isOptional?: boolean | undefined;
57
+ readonly?: boolean | undefined;
58
+ type: import("..").QuestionType.ReadAndAcknowledge;
59
+ default: boolean;
60
+ description: string;
61
+ title: string;
62
+ preferredAnswer: NonNullable<import("..").Common.Yes | import("..").Common.No | undefined>;
63
+ answers: NonNullable<import("..").Common.Yes | import("..").Common.No | undefined>;
64
+ } | {
24
65
  label?: string | undefined;
25
66
  isNew?: boolean | undefined;
26
67
  isOptional?: boolean | undefined;
@@ -34,8 +75,8 @@ export declare const JobRoleTemplateSchema: import("yup").ObjectSchema<{
34
75
  isNew?: boolean | undefined;
35
76
  isOptional?: boolean | undefined;
36
77
  readonly?: boolean | undefined;
37
- preferredAnswer?: import("..").TMixedValue | import("..").TMixedValue[] | undefined;
38
78
  optionsFrom?: import("..").Common.EducationLevel | import("..").Common.ExperienceLevel | import("..").Common.Skill | undefined;
79
+ preferredAnswer?: import("..").TMixedValue | import("..").TMixedValue[] | undefined;
39
80
  type: import("..").QuestionType.Choice;
40
81
  default: boolean;
41
82
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"job-role-template.schema.d.ts","sourceRoot":"","sources":["../../../src/job-role-template/job-role-template.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQhC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"job-role-template.schema.d.ts","sourceRoot":"","sources":["../../../src/job-role-template/job-role-template.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQhC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { TNameIdLogoSchema, TOtherValueSchema } from "../common";
2
- import { InferType } from "../yup-extended";
2
+ import { TChoiceQuestionSchema } from "./choice-question.schema";
3
+ import { TInputQuestionSchema } from "./input-question.schema";
4
+ import { TReadAndAcknowledgeQuestionSchema } from "./read-and-acknowledge.schema";
3
5
  export type TMixedValue = string | boolean | number | TNameIdLogoSchema | TOtherValueSchema;
4
6
  export declare const QuestionSchema: import("yup").ObjectSchema<{
5
7
  label: string | undefined;
@@ -18,5 +20,5 @@ export declare const QuestionSchema: import("yup").ObjectSchema<{
18
20
  readonly: undefined;
19
21
  isNew: undefined;
20
22
  }, "">;
21
- export type TQuestionSchema = Omit<InferType<typeof QuestionSchema>, "options">;
23
+ export type TQuestionSchema = TInputQuestionSchema | TChoiceQuestionSchema | TReadAndAcknowledgeQuestionSchema;
22
24
  //# sourceMappingURL=question.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"question.schema.d.ts","sourceRoot":"","sources":["../../../src/question/question.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAW,SAAS,EAAkB,MAAM,iBAAiB,CAAC;AAGrE,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,OAAO,GACP,MAAM,GACN,iBAAiB,GACjB,iBAAiB,CAAC;AAEtB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;MAQzB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,cAAc,CAAC,EAAE,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"question.schema.d.ts","sourceRoot":"","sources":["../../../src/question/question.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAE,iCAAiC,EAAE,MAAM,+BAA+B,CAAC;AAElF,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,OAAO,GACP,MAAM,GACN,iBAAiB,GACjB,iBAAiB,CAAC;AAEtB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;MAQzB,CAAC;AAEH,MAAM,MAAM,eAAe,GACvB,oBAAoB,GACpB,qBAAqB,GACrB,iCAAiC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thejob/schema",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/esm/index.d.ts",