@randstad-uca/aws-sns-publisher 1.3.12 → 1.4.13

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.
@@ -15,6 +15,7 @@ export declare const validEventTypes: {
15
15
  addJobApplication: string;
16
16
  updateJobApplication: string;
17
17
  deleteJobApplication: string;
18
+ setJobApplicationTags: string;
18
19
  addLanguage: string;
19
20
  updateLanguage: string;
20
21
  deleteLanguage: string;
@@ -20,6 +20,7 @@ exports.validEventTypes = {
20
20
  addJobApplication: 'add-job-application',
21
21
  updateJobApplication: 'update-job-application',
22
22
  deleteJobApplication: 'delete-job-application',
23
+ setJobApplicationTags: 'set-job-application-tags',
23
24
  addLanguage: 'add-language',
24
25
  updateLanguage: 'update-language',
25
26
  deleteLanguage: 'delete-language',
@@ -49,5 +50,5 @@ exports.validDocumentStatus = {
49
50
  exports.USER_STATUS = [
50
51
  'candidato temporal',
51
52
  'candidato',
52
- 'talento',
53
+ 'colaborador',
53
54
  ];
@@ -78,6 +78,10 @@ const schemas = {
78
78
  schema: job_application_schema_1.DeleteJobApplicationSchema,
79
79
  label: 'Delete Job Application',
80
80
  },
81
+ [constants_1.validEventTypes.setJobApplicationTags]: {
82
+ schema: job_application_schema_1.SetJobApplicationTagsSchema,
83
+ label: 'Set Job Application Tags',
84
+ },
81
85
  [constants_1.validEventTypes.addLanguage]: {
82
86
  schema: language_schema_1.AddLanguageSchema,
83
87
  label: 'Add Language',
@@ -2,3 +2,4 @@ import Joi from 'joi';
2
2
  export declare const AddJobApplicationSchema: Joi.ObjectSchema<any>;
3
3
  export declare const UpdateJobApplicationSchema: Joi.ObjectSchema<any>;
4
4
  export declare const DeleteJobApplicationSchema: Joi.ObjectSchema<any>;
5
+ export declare const SetJobApplicationTagsSchema: Joi.ObjectSchema<any>;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DeleteJobApplicationSchema = exports.UpdateJobApplicationSchema = exports.AddJobApplicationSchema = void 0;
6
+ exports.SetJobApplicationTagsSchema = exports.DeleteJobApplicationSchema = exports.UpdateJobApplicationSchema = exports.AddJobApplicationSchema = void 0;
7
7
  const joi_1 = __importDefault(require("joi"));
8
8
  const userId = joi_1.default.string().uuid().required();
9
9
  const titulo = joi_1.default.string().min(1).max(50).required();
@@ -37,3 +37,17 @@ exports.UpdateJobApplicationSchema = joi_1.default.object({
37
37
  exports.DeleteJobApplicationSchema = joi_1.default.object(baseFields)
38
38
  .unknown(false)
39
39
  .meta({ className: 'DeleteJobApplicationType' });
40
+ exports.SetJobApplicationTagsSchema = joi_1.default.object({
41
+ userId,
42
+ postulaciones: joi_1.default.array()
43
+ .items(joi_1.default.object({
44
+ titulo,
45
+ area,
46
+ OPoCod,
47
+ provincia,
48
+ fecha,
49
+ }))
50
+ .required(),
51
+ })
52
+ .unknown(false)
53
+ .meta({ className: 'SetJobApplicationTagsType' });
@@ -4,5 +4,5 @@
4
4
  */
5
5
  export interface SetCustomTagsType {
6
6
  userId: string;
7
- usuario?: 'candidato temporal' | 'candidato' | 'talento' | '';
7
+ usuario?: 'candidato temporal' | 'candidato' | 'colaborador' | '';
8
8
  }
@@ -20,6 +20,16 @@ export interface DeleteJobApplicationType {
20
20
  titulo: string;
21
21
  userId: string;
22
22
  }
23
+ export interface SetJobApplicationTagsType {
24
+ postulaciones: {
25
+ OPoCod: number;
26
+ area: string;
27
+ fecha: Date;
28
+ provincia: string;
29
+ titulo: string;
30
+ }[];
31
+ userId: string;
32
+ }
23
33
  export interface UpdateJobApplicationType {
24
34
  OPoCod: number;
25
35
  area: string;
@@ -17,5 +17,5 @@ export interface UpdatePersonalDataType {
17
17
  subscriptions?: SubscriptionType;
18
18
  telefono?: string;
19
19
  userId: string;
20
- usuario?: 'candidato temporal' | 'candidato' | 'talento' | '';
20
+ usuario?: 'candidato temporal' | 'candidato' | 'colaborador' | '';
21
21
  }
@@ -21,6 +21,6 @@ export interface AddUserIdentityType {
21
21
  subscriptions?: SubscriptionType;
22
22
  telefono?: string;
23
23
  userId: string;
24
- usuario?: 'candidato temporal' | 'candidato' | 'talento' | '';
24
+ usuario?: 'candidato temporal' | 'candidato' | 'colaborador' | '';
25
25
  workExperiences: AddWorkExperienceType[];
26
26
  }
@@ -67,6 +67,9 @@ const validateSchema = (eventType, data) => {
67
67
  case constants_1.validEventTypes.deleteJobApplication:
68
68
  schema = job_application_schema_1.DeleteJobApplicationSchema;
69
69
  break;
70
+ case constants_1.validEventTypes.setJobApplicationTags:
71
+ schema = job_application_schema_1.SetJobApplicationTagsSchema;
72
+ break;
70
73
  case constants_1.validEventTypes.addLanguage:
71
74
  schema = language_schema_1.AddLanguageSchema;
72
75
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randstad-uca/aws-sns-publisher",
3
- "version": "1.3.12",
3
+ "version": "1.4.13",
4
4
  "description": "AWS SNS Publisher",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
package/schema-doc.md CHANGED
@@ -29,7 +29,7 @@ This file describes the required and optional fields for each `eventType`.
29
29
  - `localidad` (string)
30
30
  - `telefono` (string)
31
31
  - `subscriptions` (object)
32
- - `usuario` (string) (valid: 'candidato temporal', 'candidato', 'talento', '')
32
+ - `usuario` (string) (valid: 'candidato temporal', 'candidato', 'colaborador', '')
33
33
 
34
34
  ---
35
35
 
@@ -213,6 +213,17 @@ This file describes the required and optional fields for each `eventType`.
213
213
 
214
214
  ---
215
215
 
216
+ ## Event: `set-job-application-tags` (Set Job Application Tags)
217
+
218
+ **Required fields:**
219
+ - `userId` (string)
220
+ - `postulaciones` (array)
221
+
222
+ **Optional fields:**
223
+ - *(none)*
224
+
225
+ ---
226
+
216
227
  ## Event: `add-language` (Add Language)
217
228
 
218
229
  **Required fields:**
@@ -364,7 +375,6 @@ This file describes the required and optional fields for each `eventType`.
364
375
  - `workExperiences` (array)
365
376
 
366
377
  **Optional fields:**
367
- - `fechaActualizacionPerfil` (date)
368
378
  - `email` (string)
369
379
  - `nombre` (string)
370
380
  - `fechaNacimiento` (date)
@@ -373,7 +383,8 @@ This file describes the required and optional fields for each `eventType`.
373
383
  - `localidad` (string)
374
384
  - `telefono` (string)
375
385
  - `subscriptions` (object)
376
- - `usuario` (string) (valid: 'candidato temporal', 'candidato', 'talento', '')
386
+ - `fechaActualizacionPerfil` (date)
387
+ - `usuario` (string) (valid: 'candidato temporal', 'candidato', 'colaborador', '')
377
388
  - `fechaActualizacionCVAdjunto` (date)
378
389
 
379
390
  ---
@@ -416,7 +427,7 @@ This file describes the required and optional fields for each `eventType`.
416
427
  - `userId` (string)
417
428
 
418
429
  **Optional fields:**
419
- - `usuario` (string) (valid: 'candidato temporal', 'candidato', 'talento', '')
430
+ - `usuario` (string) (valid: 'candidato temporal', 'candidato', 'colaborador', '')
420
431
 
421
432
  ---
422
433