sr-npm 1.0.21 → 1.2.1

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.
@@ -0,0 +1,27 @@
1
+ name: Update Sites After Release Main
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+ packages: write
12
+
13
+ jobs:
14
+ update-sites:
15
+ uses: psdevteamenterprise/ci-workflows/.github/workflows/update-and-notify.yml@main
16
+ with:
17
+ sites_to_update: "[{repo: 'psdevteamenterprise/tests-site', secret: 'WIX_PS_API_KEY'},
18
+ {repo: 'psdevteamenterprise/external-template', secret: 'WIX_SR_API_KEY'},
19
+ {repo: 'psdevteamenterprise/internal', secret: 'WIX_SR_API_KEY'}]"
20
+
21
+ secrets:
22
+ GH_TOKEN: ${{ secrets.GH_TOKEN }}
23
+ NPM_TOKEN: ${{ secrets.PS_NPM_TOKEN }}
24
+ GH_APP_ID: ${{ secrets.GH_APP_ID }}
25
+ GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
26
+ WIX_PS_API_KEY: ${{ secrets.WIX_PS_API_KEY }}
27
+ WIX_SR_API_KEY: ${{ secrets.WIX_SR_API_KEY }}
@@ -0,0 +1,61 @@
1
+ const CAREERS_MULTI_BOXES_PAGE_CONSTS={
2
+ FILTER_REPEATER: '#filterReapter',
3
+ JOBS_REPEATER: '#jobsReapter',
4
+ JOBS_REPEATER_ITEM_TITLE: '#jobTitle',
5
+ JOBS_REPEATER_ITEM_LOCATION: '#locationLabel',
6
+ JOBS_REPEATER_ITEM_EMPLOYMENT_TYPE: '#employmentTypeLabel',
7
+ TotalJobsCountText: '#totalJobsCountText',
8
+ FILTER_LABEL: '#FilterTextInput',
9
+ FILTER_CHECKBOX_CONTAINER: '#FilterCheckBoxContainer',
10
+ FILTER_REPEATER_ITEM_CHECKBOX: '#filterCheckBox',
11
+ SELECTED_VALUES_REPEATER: '#selectedValuesReapter',
12
+ SELECTED_VALUES_REPEATER_ITEM_LABEL: '#selectedValueLabel',
13
+ DESELECT_BUTTON_ID: '#deselectFilterValueButton',
14
+ CLEAR_ALL_BUTTON_ID: '#clearAllButton',
15
+ PAGE_BUTTON_NEXT: '#nextPageButton',
16
+ PAGE_BUTTON_PREVIOUS: '#previousPageButton',
17
+ paginationCurrentText: '#paginationCurrent',
18
+ paginationTotalCountText: '#paginationTotalCount',
19
+ PRIMARY_SEARCH_RESULTS: '#resultsRepeater',
20
+ SEARCH_BUTTON: '#searchButton',
21
+ SECONDARY_SEARCH_INPUT: '#secondarySearchInput',
22
+ JOBS_MULTI_STATE_BOX:"#jobsMultiStateBox",
23
+ PRIMARY_SEARCH_INPUT: '#primarySearchInput',
24
+ JOB_RESULTS_REPEATER: '#jobResultsRepeater',
25
+ JOB_RESULTS_REPEATER_ITEM: '#jobResultsRepeaterItem',
26
+ CATEGORY_RESULTS_REPEATER: '#categoryResultsRepeater',
27
+ CATEGORY_RESULTS_REPEATER_ITEM: '#categoryResultsRepeaterItem',
28
+ PRIMARY_SEARCH_MULTI_BOX: '#primarySearchMultiBox',
29
+ PRIMARY_SEARCH_POSITION_BUTTON: '#primarySearchPositionButton',
30
+ PRIMARY_SEARCH_CATEGORY_BUTTON: '#primarySearchCategoryButton',
31
+ RESULTS_CONTAINER: '#resultsContainer',
32
+ PRIMARY_SEARCH_BUTTON: '#primarySearchButton',
33
+
34
+ }
35
+
36
+ const CATEGORY_CUSTOM_FIELD_ID_IN_CMS='5cd8c873c9e77c0008aa7d23';
37
+
38
+ const fieldTitlesInCMS={
39
+ "brand": "Brands",
40
+ category: "Category",
41
+ visibility: "Visibility",
42
+ }
43
+
44
+ const FiltersIds={
45
+ Category: 'Category',
46
+ "Company Segment": 'CompanySegment',
47
+ Location: 'Location',
48
+ "Store Name": 'StoreName',
49
+ "Employment Type": 'employmentType',
50
+ "Contract Type": 'contractType',
51
+ Brands: 'Brands',
52
+ Visibility: 'Visibility',
53
+ }
54
+
55
+
56
+ module.exports = {
57
+ CAREERS_MULTI_BOXES_PAGE_CONSTS,
58
+ FiltersIds,
59
+ fieldTitlesInCMS,
60
+ CATEGORY_CUSTOM_FIELD_ID_IN_CMS,
61
+ }
@@ -4,6 +4,12 @@ const COLLECTIONS = {
4
4
  JOBS: 'Jobs',
5
5
  TEMPLATE_TYPE: 'templateType',
6
6
  SECRET_MANAGER_MIRROR: 'SecretManagerMirror',
7
+ BRANDS: 'Brands',
8
+ CUSTOM_VALUES:'CustomValues',
9
+ CUSTOM_FIELDS:'CustomFields',
10
+ SITE_CONFIGS: 'SiteConfigs',
11
+ SUPPORT_TEAMS: 'SupportTeams',
12
+
7
13
  }
8
14
  const JOBS_COLLECTION_FIELDS = {
9
15
  LOCATION: 'location',
@@ -20,18 +26,38 @@ const JOBS_COLLECTION_FIELDS = {
20
26
  IMAGE: 'image',
21
27
  APPLY_LINK: 'applyLink',
22
28
  REFER_FRIEND_LINK: 'referFriendLink',
29
+ BRAND: 'brand',
30
+ BRAND_REF: 'brandRef',
31
+ MULTI_REF_JOBS_CUSTOM_VALUES: 'multiRefJobsCustomValues',
32
+ EMPLOYMENT_TYPE: 'employmentType',
33
+ RELEASED_DATE: 'releasedDate',
23
34
  }
24
35
  const AMOUNT_OF_JOBS_PER_DEPARTMENT_COLLECTION_FIELDS = {
25
36
  TITLE: 'title',
26
37
  COUNT: 'count',
27
38
  IMAGE: 'image',
28
39
  }
40
+ const CUSTOM_VALUES_COLLECTION_FIELDS = {
41
+ TITLE: 'title',
42
+ CUSTOM_FIELD: 'customField',
43
+ MULTI_REF_JOBS_CUSTOM_VALUES: 'multiRefJobsCustomValues',
44
+ count: 'count',
45
+ JOB_IDS: 'jobIds',
46
+ }
47
+ const CUSTOM_FIELDS_COLLECTION_FIELDS = {
48
+ TITLE: 'title',
49
+ }
50
+ const BRANDS_COLLECTION_FIELDS = {
51
+ TITLE: 'title',
52
+ COUNT: 'count',
53
+ }
29
54
  const CITIES_COLLECTION_FIELDS = {
30
55
  TITLE: 'title',
31
56
  CITY: 'city',
32
57
  LOCATION_ADDRESS: 'locationAddress',
33
58
  COUNT: 'count',
34
59
  COUNTRY: 'country',
60
+ JOB_IDS: 'jobIds',
35
61
  }
36
62
  const COLLECTIONS_FIELDS = {
37
63
  AMOUNT_OF_JOBS_PER_DEPARTMENT: [
@@ -45,6 +71,7 @@ const COLLECTIONS_FIELDS = {
45
71
  {key:'locationAddress', type: 'ADDRESS'},
46
72
  {key:'count', type: 'NUMBER'},
47
73
  {key:'country', type: 'TEXT'},
74
+ {key:'jobIds', type: 'ARRAY'},
48
75
  ],
49
76
  JOBS: [
50
77
  {key:'location', type: 'OBJECT'},
@@ -55,31 +82,55 @@ const COLLECTIONS_FIELDS = {
55
82
  {key:'language', type: 'TEXT'},
56
83
  {key:'remote', type: 'BOOLEAN'},
57
84
  {key:'jobDescription', type: 'OBJECT'},
85
+ {key:'multiRefJobsCustomValues', type: 'MULTI_REFERENCE', typeMetadata: { multiReference: { referencedCollectionId: COLLECTIONS.CUSTOM_VALUES,referencingFieldKey:JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES,referencingDisplayName:JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES } } },
58
86
  {key:'cityText', type: 'TEXT'},
59
87
  {key:'applyLink', type: 'URL'},
60
- {key:'referFriendLink', type: 'URL'},
88
+ {key:'referFriendLink', type: 'URL'},
89
+ {key:'brand', type: 'TEXT'},
61
90
  {key:'departmentref', type: 'REFERENCE', typeMetadata: { reference: { referencedCollectionId: COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT } } },
62
91
  {key:'city', type: 'REFERENCE', typeMetadata: { reference: { referencedCollectionId: COLLECTIONS.CITIES } } },
63
- { key: 'image', type: 'IMAGE' },
92
+ {key:'brandRef', type: 'REFERENCE', typeMetadata: { reference: { referencedCollectionId: COLLECTIONS.BRANDS } } },
93
+ {key: 'image', type: 'IMAGE' },
94
+ {key:'employmentType', type: 'TEXT'},
95
+ {key:'releasedDate', type: 'TEXT'},
64
96
  ],
65
97
  TEMPLATE_TYPE: [
66
98
  {key:'templateType', type: 'TEXT'},
67
99
  ],
100
+ SITE_CONFIGS: [
101
+ {key:'onlyBrandKeywordUrlParams', type: 'TEXT'},
102
+ {key:'customFields', type: 'TEXT'},
103
+ ],
68
104
  SECRET_MANAGER_MIRROR: [
69
105
  {key:'tokenName', type: 'TEXT'},
70
- {key:'tokenValue', type: 'TEXT'},
106
+ {key:'value', type: 'TEXT'},
107
+ ],
108
+ BRANDS: [
109
+ {key:'title', type: 'TEXT'},
110
+ { key: 'count', type: 'NUMBER' },
111
+ ],
112
+ CUSTOM_VALUES: [
113
+ {key:'title', type: 'TEXT'},
114
+ {key:'customField', type: 'REFERENCE', typeMetadata: { reference: { referencedCollectionId: COLLECTIONS.CUSTOM_FIELDS } } },
115
+ {key:'count', type: 'NUMBER'},
116
+ {key:'multiRefJobsCustomValues', type: 'MULTI_REFERENCE', typeMetadata: { multiReference: { referencedCollectionId: COLLECTIONS.JOBS,referencingFieldKey:CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES,referencingDisplayName:CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES } } },
117
+ {key:'jobIds', type: 'ARRAY'},
118
+ ],
119
+ CUSTOM_FIELDS: [
120
+ {key:'title', type: 'TEXT'},
71
121
  ],
72
122
  };
73
123
 
124
+
74
125
  const TEMPLATE_TYPE = {
75
- INTERNAL: 'INTERNAL',
126
+ INTERNAL: 'INTERNAL_OR_PUBLIC',
76
127
  EXTERNAL: 'PUBLIC',
77
128
  }
78
129
 
79
130
  const TOKEN_NAME = {
80
131
  COMPANY_ID: 'companyId',
81
- COMPANY_ID_SM: 'companyID',
82
132
  SMART_TOKEN: 'x-smarttoken',
133
+ DESIRED_BRAND: 'desiredBrand',
83
134
  }
84
135
 
85
136
 
@@ -89,6 +140,10 @@ const COLLECTIONS_FIELDS = {
89
140
  JOBS_COLLECTION_FIELDS,
90
141
  AMOUNT_OF_JOBS_PER_DEPARTMENT_COLLECTION_FIELDS,
91
142
  CITIES_COLLECTION_FIELDS,
143
+ BRANDS_COLLECTION_FIELDS,
144
+ CUSTOM_FIELDS_COLLECTION_FIELDS,
145
+ CUSTOM_VALUES_COLLECTION_FIELDS,
92
146
  TEMPLATE_TYPE,
93
147
  TOKEN_NAME,
148
+
94
149
  };
package/backend/consts.js CHANGED
@@ -1,4 +1,4 @@
1
- const {saveJobsDataToCMS,saveJobsDescriptionsAndLocationApplyUrlToCMS,createCollections,aggregateJobs,referenceJobs,syncJobsFast} = require('./data')
1
+ const {saveJobsDataToCMS,saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS,createCollections,aggregateJobs,referenceJobs,syncJobsFast} = require('./data')
2
2
 
3
3
 
4
4
  const QUERY_MAX_LIMIT = 1000;
@@ -6,7 +6,7 @@ const QUERY_MAX_LIMIT = 1000;
6
6
  const TASKS_NAMES = {
7
7
  SYNC_JOBS: 'syncJobsFromSRAPIToCMS',
8
8
  INSERT_JOBS_TO_CMS: 'insertJobsToCMS',
9
- INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_TO_CMS: 'insertJobsDescriptionsLocationApplyUrlToCMS',
9
+ INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_REFERENCES_TO_CMS: 'insertJobsDescriptionsLocationApplyUrlReferencesToCMS',
10
10
  AGGREGATE_JOBS_BY_FIELD_TO_CMS: 'aggregateJobsByFieldToCMS',
11
11
  REFERENCE_JOBS: 'referenceJobs',
12
12
  CREATE_COLLECTIONS: 'createCollections',
@@ -21,7 +21,7 @@ const TASKS = {
21
21
  childTasks: [
22
22
  { name: TASKS_NAMES.CREATE_COLLECTIONS},
23
23
  { name: TASKS_NAMES.INSERT_JOBS_TO_CMS },
24
- { name: TASKS_NAMES.INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_TO_CMS },
24
+ { name: TASKS_NAMES.INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_REFERENCES_TO_CMS },
25
25
  { name: TASKS_NAMES.AGGREGATE_JOBS_BY_FIELD_TO_CMS },
26
26
  {name: TASKS_NAMES.REFERENCE_JOBS},
27
27
  ],
@@ -42,10 +42,10 @@ const TASKS = {
42
42
  shouldSkipCheck:()=>false,
43
43
  estimatedDurationSec:20
44
44
  },
45
- [TASKS_NAMES.INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_TO_CMS]: {
46
- name: TASKS_NAMES.INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_TO_CMS,
45
+ [TASKS_NAMES.INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_REFERENCES_TO_CMS]: {
46
+ name: TASKS_NAMES.INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_REFERENCES_TO_CMS,
47
47
  getIdentifier:()=> "SHOULD_NEVER_SKIP",
48
- process:saveJobsDescriptionsAndLocationApplyUrlToCMS,
48
+ process:saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS,
49
49
  shouldSkipCheck:()=>false,
50
50
  estimatedDurationSec:20
51
51
  },
@@ -72,17 +72,71 @@ const TASKS = {
72
72
  }
73
73
  }
74
74
 
75
-
76
-
77
-
78
75
  const TASK_TYPE = {
79
76
  SCHEDULED: 'scheduled',
80
77
  EVENT: 'event',
81
78
  };
82
79
 
83
- module.exports = {
84
- TASKS_NAMES,
85
- TASK_TYPE,
86
- TASKS,
87
- QUERY_MAX_LIMIT,
80
+ const supportTeamsPageIds={
81
+ PEOPLE_REPEATER: "#peopleRepeater",
82
+ PEOPLE_BUTTON: "#peopleButton",
83
+ PEOPLE_TITLE: "#peopleTitle",
84
+ RECENT_JOBS_REPEATER: "#recentJobsRepeater",
85
+ RECENT_JOBS_TITLE: "#recentJobsTitle",
86
+ RECENT_JOBS_BUTTON: "#recentJobsButton",
87
+ RECENT_JOBS_SECTION: "#recentJobsSection",
88
+ VIDEO_SECTION: "#videoSection",
89
+ VIDEO_TITLE: "#videoTitle",
90
+ VIDEO_PLAYER: "#videoPlayer",
91
+
92
+ RECENTLEY_ADDED_JOBS_ITEM: "#recentleyAddedJobsItem",
93
+ JOB_LOCATION: "#jobLocation",
94
+ JOB_TITLE: "#jobTitle",
95
+ TEAM_SUPPORT_DYNAMIC_DATASET: "#dynamicDataset",
96
+ valueToValueIdMap: {
97
+ "Human Resouces":"PeopleSupport",
98
+ "Merchandise - Buying":"Merchandise",
99
+ "Technology, Data and Digital":"InformationServices",
100
+ "Merchandise - Planning":"Merchandise",
101
+ "Digital":"ecommerceandDigital",// this field doesnt exists in the database
102
+ "Marketing and Market Media":"Marketing",
103
+ "Finance, Property and Legal":"Finance",// this field doesnt exists in the database
104
+ "Services":"ServicesInstallation",
105
+ "Merchandise - Design and Sourcing":"Merchandise",
106
+ "Store Operations":"Operations",// this field doesnt exists in the database
107
+ "Data":"InsightsandDataScience",// this field doesnt exists in the database
108
+ "Property":"Property",// this field doesnt exists in the database,
109
+ "Legal":"Legal",// this field doesnt exists in the database,
110
+ "Supply Chain and Logistics":"Logistics",
111
+ "Contact Centres":"CustomerEngagementCentres",// this field doesnt exists in the database
112
+ "Commercial":"CommercialSales",// this field doesnt exists in the database
113
+ },
114
+ excludeValues: new Set([
115
+ "Noel Leeming Commercial",
116
+ "Noel Leeming Services",
117
+ "Sustainability"
118
+ ])
119
+ }
120
+ const LINKS={
121
+ myApplication:'https://www.smartrecruiters.com/app/employee-portal/68246e5512d84f4c00a19e62/job-applications',
122
+ myReferrals:'https://www.smartrecruiters.com/app/referrals/',
123
+ login:'https://www.smartrecruiters.com/web-sso/saml/${companyId}/login',
124
+ }
125
+
126
+
127
+ const supportTeamsPageSections={
128
+ RECENT_JOBS: "recentJobs",
129
+ PEOPLE: "people",
130
+ VIDEO: "video",
131
+ }
132
+
133
+
134
+ module.exports = {
135
+ TASKS_NAMES,
136
+ TASK_TYPE,
137
+ TASKS,
138
+ QUERY_MAX_LIMIT,
139
+ supportTeamsPageIds,
140
+ LINKS,
141
+ supportTeamsPageSections,
88
142
  };