sr-npm 1.7.435 → 1.7.437
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/backend/consts.js
CHANGED
|
@@ -73,10 +73,6 @@ const TASKS = {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
const TEMPLATE_TYPE = {
|
|
77
|
-
INTERNAL: 'INTERNAL',
|
|
78
|
-
EXTERNAL: 'PUBLIC',
|
|
79
|
-
}
|
|
80
76
|
|
|
81
77
|
const TOKEN_NAME = {
|
|
82
78
|
COMPANY_ID: 'companyId',
|
|
@@ -93,6 +89,5 @@ const TASK_TYPE = {
|
|
|
93
89
|
TASK_TYPE,
|
|
94
90
|
TASKS,
|
|
95
91
|
QUERY_MAX_LIMIT,
|
|
96
|
-
TEMPLATE_TYPE,
|
|
97
92
|
TOKEN_NAME
|
|
98
93
|
};
|
package/backend/data.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
const { items: wixData } = require('@wix/data');
|
|
2
2
|
const { fetchPositionsFromSRAPI, fetchJobDescription } = require('./fetchPositionsFromSRAPI');
|
|
3
3
|
const { createCollectionIfMissing } = require('@hisense-staging/velo-npm/backend');
|
|
4
|
-
const { COLLECTIONS, COLLECTIONS_FIELDS,JOBS_COLLECTION_FIELDS } = require('./collectionConsts');
|
|
4
|
+
const { COLLECTIONS, COLLECTIONS_FIELDS,JOBS_COLLECTION_FIELDS,TEMPLATE_TYPE } = require('./collectionConsts');
|
|
5
5
|
const { chunkedBulkOperation, countJobsPerGivenField, fillCityLocationAndLocationAddress ,prepareToSaveArray,normalizeCityName} = require('./utils');
|
|
6
6
|
const { getAllPositions } = require('./queries');
|
|
7
7
|
const{TOKEN_NAME} = require('./consts');
|
|
8
|
-
const { TEMPLATE_TYPE } = require('./collectionConsts');
|
|
9
8
|
const { getCompanyId, getSmartToken } = require('./secretsData');
|
|
10
9
|
|
|
11
10
|
function validatePosition(position) {
|
|
@@ -364,6 +363,7 @@ async function fillSecretManagerMirror() {
|
|
|
364
363
|
console.log("Getting the company ID ");
|
|
365
364
|
const companyId = await getCompanyId();
|
|
366
365
|
console.log("companyId is : ", companyId);
|
|
366
|
+
console.log("TOKEN_NAME is , ", TOKEN_NAME);
|
|
367
367
|
await wixData.insert(COLLECTIONS.SECRET_MANAGER_MIRROR, {
|
|
368
368
|
tokenName: TOKEN_NAME.COMPANY_ID,
|
|
369
369
|
tokenValue: companyId.value
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
const { fetch } = require('wix-fetch');
|
|
2
2
|
const { items: wixData } = require('@wix/data');
|
|
3
|
-
const { COLLECTIONS } = require('./collectionConsts');
|
|
4
|
-
const {
|
|
5
|
-
|
|
3
|
+
const { COLLECTIONS,TEMPLATE_TYPE } = require('./collectionConsts');
|
|
4
|
+
const { TOKEN_NAME } = require('./consts');
|
|
6
5
|
async function makeSmartRecruitersRequest(path,templateType) {
|
|
7
6
|
const baseUrl = 'https://api.smartrecruiters.com';
|
|
8
7
|
const fullUrl = `${baseUrl}${path}`;
|