@randstad-uca/aws-sns-publisher 1.0.21 → 1.0.23
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/build/constants.d.ts +10 -1
- package/build/constants.js +10 -9
- package/build/generate-schema-doc.js +5 -0
- package/build/schemas/cv.schema.d.ts +2 -0
- package/build/schemas/cv.schema.js +13 -0
- package/build/schemas/document-status.schema.js +2 -1
- package/build/types/cv.type.d.ts +8 -0
- package/build/types/cv.type.js +6 -0
- package/build/types/index.d.ts +1 -0
- package/build/types/index.js +1 -0
- package/build/validator.js +4 -0
- package/package.json +1 -1
- package/schema-doc.md +11 -0
package/build/constants.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare const validEventTypes: {
|
|
|
24
24
|
updateLanguage: string;
|
|
25
25
|
deleteLanguage: string;
|
|
26
26
|
setProfileUpdatedDate: string;
|
|
27
|
+
setCvAdjunto: string;
|
|
27
28
|
setCvAdjuntoUpdatedDate: string;
|
|
28
29
|
setCvBuilderUpdatedDate: string;
|
|
29
30
|
setCvBuilderDownloadUpdatedDate: string;
|
|
@@ -38,4 +39,12 @@ export declare const validEventTypes: {
|
|
|
38
39
|
mail: string;
|
|
39
40
|
push: string;
|
|
40
41
|
};
|
|
41
|
-
export declare const validDocumentStatus:
|
|
42
|
+
export declare const validDocumentStatus: {
|
|
43
|
+
enviado: string;
|
|
44
|
+
rechazado: string;
|
|
45
|
+
firmado: string;
|
|
46
|
+
anulado: string;
|
|
47
|
+
pendienteEnvio: string;
|
|
48
|
+
incompleto: string;
|
|
49
|
+
pendienteFirma: string;
|
|
50
|
+
};
|
package/build/constants.js
CHANGED
|
@@ -27,6 +27,7 @@ exports.validEventTypes = {
|
|
|
27
27
|
updateLanguage: 'update-language',
|
|
28
28
|
deleteLanguage: 'delete-language',
|
|
29
29
|
setProfileUpdatedDate: 'set-profile-updated-date',
|
|
30
|
+
setCvAdjunto: 'set-cv-adjunto',
|
|
30
31
|
setCvAdjuntoUpdatedDate: 'set-cv-adjunto-updated-date',
|
|
31
32
|
setCvBuilderUpdatedDate: 'set-cv-builder-updated-date',
|
|
32
33
|
setCvBuilderDownloadUpdatedDate: 'set-cv-builder-download-updated-date',
|
|
@@ -41,12 +42,12 @@ exports.validEventTypes = {
|
|
|
41
42
|
mail: 'mail',
|
|
42
43
|
push: 'push',
|
|
43
44
|
};
|
|
44
|
-
exports.validDocumentStatus =
|
|
45
|
-
'enviado',
|
|
46
|
-
'rechazado',
|
|
47
|
-
'firmado',
|
|
48
|
-
'anulado',
|
|
49
|
-
'pendiente envio',
|
|
50
|
-
'incompleto',
|
|
51
|
-
'pendiente firma'
|
|
52
|
-
|
|
45
|
+
exports.validDocumentStatus = {
|
|
46
|
+
enviado: 'enviado',
|
|
47
|
+
rechazado: 'rechazado',
|
|
48
|
+
firmado: 'firmado',
|
|
49
|
+
anulado: 'anulado',
|
|
50
|
+
pendienteEnvio: 'pendiente envio',
|
|
51
|
+
incompleto: 'incompleto',
|
|
52
|
+
pendienteFirma: 'pendiente firma'
|
|
53
|
+
};
|
|
@@ -19,6 +19,7 @@ const alert_schema_1 = require("./schemas/alert.schema");
|
|
|
19
19
|
const document_status_schema_1 = require("./schemas/document-status.schema");
|
|
20
20
|
const email_schema_1 = require("./schemas/email.schema");
|
|
21
21
|
const push_schema_1 = require("./schemas/push.schema");
|
|
22
|
+
const cv_schema_1 = require("./schemas/cv.schema");
|
|
22
23
|
const schemas = {
|
|
23
24
|
[constants_1.validEventTypes.sms]: { schema: sms_schema_1.SMSSchema, label: 'SMS' },
|
|
24
25
|
[constants_1.validEventTypes.addPersonalData]: {
|
|
@@ -89,6 +90,10 @@ const schemas = {
|
|
|
89
90
|
schema: update_event_date_schema_1.SetUpdatedDateSchema,
|
|
90
91
|
label: 'Set Profile Updated Date',
|
|
91
92
|
},
|
|
93
|
+
[constants_1.validEventTypes.setCvAdjunto]: {
|
|
94
|
+
schema: cv_schema_1.SetCvSchema,
|
|
95
|
+
label: 'Set CV Adjunto',
|
|
96
|
+
},
|
|
92
97
|
[constants_1.validEventTypes.setCvAdjuntoUpdatedDate]: {
|
|
93
98
|
schema: update_event_date_schema_1.SetUpdatedDateSchema,
|
|
94
99
|
label: 'Set CV Adjunto Updated Date',
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SetCvSchema = void 0;
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
8
|
+
exports.SetCvSchema = joi_1.default.object({
|
|
9
|
+
CanCod: joi_1.default.number().integer().required(),
|
|
10
|
+
cvAdjunto: joi_1.default.string().valid('si', 'no').required(),
|
|
11
|
+
})
|
|
12
|
+
.unknown(false)
|
|
13
|
+
.meta({ className: 'SetCvType' });
|
|
@@ -6,10 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.SetDocumentStatusSchema = void 0;
|
|
7
7
|
const joi_1 = __importDefault(require("joi"));
|
|
8
8
|
const constants_1 = require("../constants");
|
|
9
|
+
const statusValues = Object.values(constants_1.validDocumentStatus);
|
|
9
10
|
exports.SetDocumentStatusSchema = joi_1.default.object({
|
|
10
11
|
CanCod: joi_1.default.number().integer().required(),
|
|
11
12
|
estado: joi_1.default.string()
|
|
12
|
-
.valid(...
|
|
13
|
+
.valid(...statusValues)
|
|
13
14
|
.required(),
|
|
14
15
|
})
|
|
15
16
|
.unknown(false)
|
package/build/types/index.d.ts
CHANGED
package/build/types/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
__exportStar(require("./alert.type"), exports);
|
|
22
22
|
__exportStar(require("./certification.type"), exports);
|
|
23
|
+
__exportStar(require("./cv.type"), exports);
|
|
23
24
|
__exportStar(require("./document-status.type"), exports);
|
|
24
25
|
__exportStar(require("./education.type"), exports);
|
|
25
26
|
__exportStar(require("./email.type"), exports);
|
package/build/validator.js
CHANGED
|
@@ -14,6 +14,7 @@ const alert_schema_1 = require("./schemas/alert.schema");
|
|
|
14
14
|
const document_status_schema_1 = require("./schemas/document-status.schema");
|
|
15
15
|
const email_schema_1 = require("./schemas/email.schema");
|
|
16
16
|
const push_schema_1 = require("./schemas/push.schema");
|
|
17
|
+
const cv_schema_1 = require("./schemas/cv.schema");
|
|
17
18
|
const validateSchema = (eventType, data) => {
|
|
18
19
|
let schema;
|
|
19
20
|
switch (eventType) {
|
|
@@ -68,6 +69,9 @@ const validateSchema = (eventType, data) => {
|
|
|
68
69
|
case constants_1.validEventTypes.setCertification:
|
|
69
70
|
schema = certification_schema_1.SetCertificationSchema;
|
|
70
71
|
break;
|
|
72
|
+
case constants_1.validEventTypes.setCvAdjunto:
|
|
73
|
+
schema = cv_schema_1.SetCvSchema;
|
|
74
|
+
break;
|
|
71
75
|
case constants_1.validEventTypes.setProfileUpdatedDate:
|
|
72
76
|
case constants_1.validEventTypes.setCvAdjuntoUpdatedDate:
|
|
73
77
|
case constants_1.validEventTypes.setCvBuilderUpdatedDate:
|
package/package.json
CHANGED
package/schema-doc.md
CHANGED
|
@@ -257,6 +257,17 @@ This file describes the required and optional fields for each `eventType`.
|
|
|
257
257
|
|
|
258
258
|
---
|
|
259
259
|
|
|
260
|
+
## Event: `set-cv-adjunto` (Set CV Adjunto)
|
|
261
|
+
|
|
262
|
+
**Required fields:**
|
|
263
|
+
- `CanCod` (number)
|
|
264
|
+
- `cvAdjunto` (string) (valid: 'si', 'no')
|
|
265
|
+
|
|
266
|
+
**Optional fields:**
|
|
267
|
+
- *(none)*
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
260
271
|
## Event: `set-cv-adjunto-updated-date` (Set CV Adjunto Updated Date)
|
|
261
272
|
|
|
262
273
|
**Required fields:**
|