@velocitycareerlabs/data-loader 1.24.0-dev-build.152847cbf → 1.24.0-dev-build.1a0af12ce
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@velocitycareerlabs/data-loader",
|
3
|
-
"version": "1.24.0-dev-build.
|
3
|
+
"version": "1.24.0-dev-build.1a0af12ce",
|
4
4
|
"description": "A tool for uploading data to the different target systems.",
|
5
5
|
"repository": "https://github.com/velocitycareerlabs/packages",
|
6
6
|
"main": "src/index.js",
|
@@ -41,5 +41,5 @@
|
|
41
41
|
"nanoid": "3.3.8",
|
42
42
|
"strip-bom-stream": "^4.0.0"
|
43
43
|
},
|
44
|
-
"gitHead": "
|
44
|
+
"gitHead": "fc6e44daa739a35e01c07b50da9787cee6750fd3"
|
45
45
|
}
|
@@ -30,6 +30,8 @@ Used for generating ready-to-claim qr-code from a csv that can be shared in orde
|
|
30
30
|
|
31
31
|
### Options
|
32
32
|
|
33
|
+
`--tenant [TENANT_ID]` **required** Id of the issuing organization's tenant
|
34
|
+
|
33
35
|
`-d [DID]` **required** DID of the issuing organization
|
34
36
|
|
35
37
|
`-o [OFFER_TEMPLATE_PATH]` **required** path to an offer handlebars template. Use moustaches around variables such as `{{email}}`
|
@@ -3,10 +3,10 @@ const got = require('got');
|
|
3
3
|
const { map, isEmpty } = require('lodash/fp');
|
4
4
|
const { printInfo } = require('../helpers/common');
|
5
5
|
|
6
|
-
const setupGot = ({ endpoint, authToken,
|
6
|
+
const setupGot = ({ endpoint, authToken, tenantId }) => {
|
7
7
|
const options = {};
|
8
8
|
if (endpoint != null) {
|
9
|
-
options.prefixUrl = `${endpoint}/operator-api/v0.8/tenants/${
|
9
|
+
options.prefixUrl = `${endpoint}/operator-api/v0.8/tenants/${tenantId}`;
|
10
10
|
}
|
11
11
|
if (authToken != null) {
|
12
12
|
options.headers = { Authorization: `Bearer ${authToken}` };
|
@@ -22,6 +22,10 @@ program
|
|
22
22
|
'file name containing the credential template file'
|
23
23
|
)
|
24
24
|
.requiredOption('-d, --did <did>', "the issuer's DID")
|
25
|
+
.requiredOption(
|
26
|
+
'--tenant <tenantId>',
|
27
|
+
"Id of the issuing organization's tenant"
|
28
|
+
)
|
25
29
|
.requiredOption(
|
26
30
|
'-p, --path <path>',
|
27
31
|
'the output directory to use where QR codes and output state files are stored'
|
@@ -1291,9 +1291,10 @@ describe('batch issuing test', () => {
|
|
1291
1291
|
it('should have error if the disclosureRequest is not found', async () => {
|
1292
1292
|
const agentUrl = 'https://exampleUrl';
|
1293
1293
|
const did = 'did:ion:sap123';
|
1294
|
+
const tenantId = '123';
|
1294
1295
|
nock(agentUrl)
|
1295
1296
|
.get(
|
1296
|
-
`/operator-api/v0.8/tenants/${
|
1297
|
+
`/operator-api/v0.8/tenants/${tenantId}/disclosures?vendorEndpoint=integrated-issuing-identification`
|
1297
1298
|
)
|
1298
1299
|
.reply(200, existingDisclosures);
|
1299
1300
|
|
@@ -1303,6 +1304,7 @@ describe('batch issuing test', () => {
|
|
1303
1304
|
__dirname,
|
1304
1305
|
'data/email-offer.template.json'
|
1305
1306
|
),
|
1307
|
+
tenantId,
|
1306
1308
|
did,
|
1307
1309
|
termsUrl: 'http://example.com/terms.html',
|
1308
1310
|
idCredentialType: 'EmailV1.0',
|
@@ -1318,9 +1320,10 @@ describe('batch issuing test', () => {
|
|
1318
1320
|
it('should find the existing disclosure disclosureRequest', async () => {
|
1319
1321
|
const agentUrl = 'https://exampleUrl';
|
1320
1322
|
const did = 'did:ion:sap123';
|
1323
|
+
const tenantId = '123';
|
1321
1324
|
nock(agentUrl)
|
1322
1325
|
.get(
|
1323
|
-
`/operator-api/v0.8/tenants/${
|
1326
|
+
`/operator-api/v0.8/tenants/${tenantId}/disclosures?vendorEndpoint=integrated-issuing-identification`
|
1324
1327
|
)
|
1325
1328
|
.reply(200, existingDisclosures);
|
1326
1329
|
|
@@ -1330,6 +1333,7 @@ describe('batch issuing test', () => {
|
|
1330
1333
|
__dirname,
|
1331
1334
|
'data/email-offer.template.json'
|
1332
1335
|
),
|
1336
|
+
tenantId,
|
1333
1337
|
did,
|
1334
1338
|
termsUrl: 'http://example.com/terms.html',
|
1335
1339
|
idCredentialType: 'EmailV1.0',
|
@@ -1421,6 +1425,7 @@ describe('batch issuing test', () => {
|
|
1421
1425
|
),
|
1422
1426
|
termsUrl: 'http://example.com/terms.html',
|
1423
1427
|
did: 'did:ion:sap123',
|
1428
|
+
tenant: '123',
|
1424
1429
|
new: true,
|
1425
1430
|
dryrun: true,
|
1426
1431
|
};
|