sr-npm 1.7.445 → 1.7.447

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.
@@ -11,10 +11,17 @@ function getSmartToken() {
11
11
  }
12
12
 
13
13
  function getCompanyId() {
14
- return getSecretValue("companyID")
14
+ console.log("Getting the company ID from the secrets");
15
+ const getSecretValue2 = auth.elevate(secrets.getSecretValue);
16
+ console.log("getSecretValue2 is : ", getSecretValue2);
17
+
18
+ return getSecretValue2("companyID")
15
19
  .then((secret) => {
16
20
  return secret;
17
- })
21
+ }).catch((error) => {
22
+ console.error("Error getting the company ID from the secrets: ", error);
23
+ throw error;
24
+ });
18
25
  }
19
26
  module.exports = {
20
27
  getCompanyId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.445",
3
+ "version": "1.7.447",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -30,8 +30,7 @@ describe('Job details fetch from SR API Tests', () => {
30
30
 
31
31
  test(`should successfully fetch job description from SR API (${templatename})`, async () => {
32
32
  const randomPosition = getRandomPosition(positions.data.result.content);
33
- console.log("randomPosition is : ", randomPosition);
34
- const fetchJobDescriptionRequestBody = `fetchJobDescription(${randomPosition.id});`;
33
+ const fetchJobDescriptionRequestBody = `fetchJobDescription(${randomPosition.id},{companyId:'WixTest',templateType: '${templateType}'});`;
35
34
  const jobFetchResponse = await executeApiRequest(fetchJobDescriptionRequestBody);
36
35
  expect(jobFetchResponse.data.result.id).toBe(randomPosition.id);
37
36
  expect(jobFetchResponse.data.result.jobAd.sections.jobDescription).toBeDefined();