@velocitycareerlabs/yoti-integration-plugin 1.27.0-dev-build.18cc7822e → 1.27.0-dev-build.191854f58

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.
Files changed (2) hide show
  1. package/package.json +11 -11
  2. package/src/fetchers.js +20 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velocitycareerlabs/yoti-integration-plugin",
3
- "version": "1.27.0-dev-build.18cc7822e",
3
+ "version": "1.27.0-dev-build.191854f58",
4
4
  "description": "Library supporting integration with Yoti services",
5
5
  "repository": "https://github.com/velocitycareerlabs/packages",
6
6
  "main": "index.js",
@@ -17,12 +17,12 @@
17
17
  "dependencies": {
18
18
  "@getyoti/sdk-sandbox": "1.7.0",
19
19
  "@spencejs/spence-mongo-repos": "^0.10.2",
20
- "@verii/common-schemas": "1.0.7",
21
- "@verii/config": "1.0.7",
22
- "@verii/country-data": "1.0.7",
23
- "@verii/crypto": "1.0.7",
24
- "@verii/jwt": "1.0.7",
25
- "@verii/request": "1.0.7",
20
+ "@verii/common-schemas": "1.1.0-pre.1762411615",
21
+ "@verii/config": "1.1.0-pre.1762411615",
22
+ "@verii/country-data": "1.1.0-pre.1762411615",
23
+ "@verii/crypto": "1.1.0-pre.1762411615",
24
+ "@verii/fastify-plugins": "1.1.0-pre.1762411615",
25
+ "@verii/jwt": "1.1.0-pre.1762411615",
26
26
  "env-var": "^7.0.0",
27
27
  "http-errors": "2.0.0",
28
28
  "lodash": "^4.17.21",
@@ -33,8 +33,8 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@spencejs/spence-factories": "0.10.2",
36
- "@verii/server-provider": "1.0.7",
37
- "@verii/tests-helpers": "1.0.7",
36
+ "@verii/server-provider": "1.1.0-pre.1762411615",
37
+ "@verii/tests-helpers": "1.1.0-pre.1762411615",
38
38
  "eslint": "8.57.1",
39
39
  "eslint-config-airbnb-base": "14.2.1",
40
40
  "eslint-config-prettier": "8.10.2",
@@ -45,8 +45,8 @@
45
45
  "eslint-plugin-prettier": "4.2.5",
46
46
  "eslint-watch": "7.0.0",
47
47
  "expect": "30.2.0",
48
- "nock": "14.0.9",
48
+ "nock": "v15.0.0-beta.6",
49
49
  "prettier": "2.8.8"
50
50
  },
51
- "gitHead": "15ad5367e4e6b0969707994f12bf5f76d6ef8412"
51
+ "gitHead": "6fa4496c8f99eb2b05763ba4d8140a5e3008707e"
52
52
  }
package/src/fetchers.js CHANGED
@@ -1,21 +1,26 @@
1
- const submitAddOfferToExchange = (
1
+ const submitAddOfferToExchange = async (
2
2
  { offer, exchangeId },
3
3
  { agentFetch, config }
4
- ) =>
5
- agentFetch
6
- .post(
7
- `operator-api/v0.8/tenants/${config.idVerificationTenantId}/exchanges/${exchangeId}/offers`,
8
- { json: offer }
9
- )
10
- .json();
4
+ ) => {
5
+ const response = await agentFetch.post(
6
+ `operator-api/v0.8/tenants/${config.idVerificationTenantId}/exchanges/${exchangeId}/offers`,
7
+ offer
8
+ );
11
9
 
12
- const submitCompleteOfferExchange = ({ exchangeId }, { agentFetch, config }) =>
13
- agentFetch
14
- .post(
15
- `operator-api/v0.8/tenants/${config.idVerificationTenantId}/exchanges/${exchangeId}/offers/complete`,
16
- { json: { exchangeId } }
17
- )
18
- .json();
10
+ return response.json();
11
+ };
12
+
13
+ const submitCompleteOfferExchange = async (
14
+ { exchangeId },
15
+ { agentFetch, config }
16
+ ) => {
17
+ const response = await agentFetch.post(
18
+ `operator-api/v0.8/tenants/${config.idVerificationTenantId}/exchanges/${exchangeId}/offers/complete`,
19
+ { exchangeId }
20
+ );
21
+
22
+ return response.json();
23
+ };
19
24
 
20
25
  module.exports = {
21
26
  submitAddOfferToExchange,