@learncard/network-plugin 2.4.11 → 2.4.13
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/dist/lcn-plugin.cjs.development.js +105 -4
- package/dist/lcn-plugin.cjs.development.js.map +3 -3
- package/dist/lcn-plugin.cjs.production.min.js +2 -2
- package/dist/lcn-plugin.cjs.production.min.js.map +3 -3
- package/dist/lcn-plugin.esm.js +105 -4
- package/dist/lcn-plugin.esm.js.map +3 -3
- package/dist/plugin.d.ts.map +1 -1
- package/dist/types.d.ts +12 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -1242,6 +1242,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
1242
1242
|
AddressValidator: () => AddressValidator2,
|
|
1243
1243
|
AlignmentTargetTypeValidator: () => AlignmentTargetTypeValidator2,
|
|
1244
1244
|
AlignmentValidator: () => AlignmentValidator2,
|
|
1245
|
+
AutoBoostConfigValidator: () => AutoBoostConfigValidator2,
|
|
1245
1246
|
BoostPermissionsQueryValidator: () => BoostPermissionsQueryValidator2,
|
|
1246
1247
|
BoostPermissionsValidator: () => BoostPermissionsValidator2,
|
|
1247
1248
|
BoostQueryValidator: () => BoostQueryValidator2,
|
|
@@ -1250,10 +1251,12 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
1250
1251
|
ClaimHookQueryValidator: () => ClaimHookQueryValidator2,
|
|
1251
1252
|
ClaimHookTypeValidator: () => ClaimHookTypeValidator2,
|
|
1252
1253
|
ClaimHookValidator: () => ClaimHookValidator2,
|
|
1254
|
+
ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator2,
|
|
1253
1255
|
ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator2,
|
|
1254
1256
|
ConsentFlowContractDetailsValidator: () => ConsentFlowContractDetailsValidator2,
|
|
1255
1257
|
ConsentFlowContractQueryValidator: () => ConsentFlowContractQueryValidator2,
|
|
1256
1258
|
ConsentFlowContractValidator: () => ConsentFlowContractValidator2,
|
|
1259
|
+
ConsentFlowDataForDidQueryValidator: () => ConsentFlowDataForDidQueryValidator2,
|
|
1257
1260
|
ConsentFlowDataQueryValidator: () => ConsentFlowDataQueryValidator2,
|
|
1258
1261
|
ConsentFlowTermValidator: () => ConsentFlowTermValidator2,
|
|
1259
1262
|
ConsentFlowTermsQueryValidator: () => ConsentFlowTermsQueryValidator2,
|
|
@@ -1263,6 +1266,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
1263
1266
|
ConsentFlowTransactionValidator: () => ConsentFlowTransactionValidator2,
|
|
1264
1267
|
ConsentFlowTransactionsQueryValidator: () => ConsentFlowTransactionsQueryValidator2,
|
|
1265
1268
|
ContextValidator: () => ContextValidator2,
|
|
1269
|
+
ContractCredentialValidator: () => ContractCredentialValidator2,
|
|
1266
1270
|
CredentialInfoValidator: () => CredentialInfoValidator2,
|
|
1267
1271
|
CredentialRecordValidator: () => CredentialRecordValidator2,
|
|
1268
1272
|
CredentialSchemaValidator: () => CredentialSchemaValidator2,
|
|
@@ -1306,9 +1310,11 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
1306
1310
|
PaginatedBoostsValidator: () => PaginatedBoostsValidator2,
|
|
1307
1311
|
PaginatedClaimHooksValidator: () => PaginatedClaimHooksValidator2,
|
|
1308
1312
|
PaginatedConsentFlowContractsValidator: () => PaginatedConsentFlowContractsValidator2,
|
|
1313
|
+
PaginatedConsentFlowDataForDidValidator: () => PaginatedConsentFlowDataForDidValidator2,
|
|
1309
1314
|
PaginatedConsentFlowDataValidator: () => PaginatedConsentFlowDataValidator2,
|
|
1310
1315
|
PaginatedConsentFlowTermsValidator: () => PaginatedConsentFlowTermsValidator2,
|
|
1311
1316
|
PaginatedConsentFlowTransactionsValidator: () => PaginatedConsentFlowTransactionsValidator2,
|
|
1317
|
+
PaginatedContractCredentialsValidator: () => PaginatedContractCredentialsValidator2,
|
|
1312
1318
|
PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator2,
|
|
1313
1319
|
PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator2,
|
|
1314
1320
|
PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator2,
|
|
@@ -5326,6 +5332,13 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5326
5332
|
did: mod2.string()
|
|
5327
5333
|
})
|
|
5328
5334
|
});
|
|
5335
|
+
var AutoBoostConfigValidator2 = mod2.object({
|
|
5336
|
+
boostUri: mod2.string(),
|
|
5337
|
+
signingAuthority: mod2.object({
|
|
5338
|
+
endpoint: mod2.string(),
|
|
5339
|
+
name: mod2.string()
|
|
5340
|
+
})
|
|
5341
|
+
});
|
|
5329
5342
|
var ConsentFlowTermsStatusValidator2 = mod2.enum(["live", "stale", "withdrawn"]);
|
|
5330
5343
|
var ConsentFlowContractValidator2 = mod2.object({
|
|
5331
5344
|
read: mod2.object({
|
|
@@ -5349,6 +5362,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5349
5362
|
uri: mod2.string(),
|
|
5350
5363
|
needsGuardianConsent: mod2.boolean().optional(),
|
|
5351
5364
|
redirectUrl: mod2.string().optional(),
|
|
5365
|
+
frontDoorBoostUri: mod2.string().optional(),
|
|
5352
5366
|
createdAt: mod2.string(),
|
|
5353
5367
|
updatedAt: mod2.string(),
|
|
5354
5368
|
expiresAt: mod2.string().optional()
|
|
@@ -5364,6 +5378,15 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5364
5378
|
var PaginatedConsentFlowDataValidator2 = PaginationResponseValidator2.extend({
|
|
5365
5379
|
records: ConsentFlowContractDataValidator2.array()
|
|
5366
5380
|
});
|
|
5381
|
+
var ConsentFlowContractDataForDidValidator2 = mod2.object({
|
|
5382
|
+
credentials: mod2.object({ category: mod2.string(), uri: mod2.string() }).array(),
|
|
5383
|
+
personal: mod2.record(mod2.string()).default({}),
|
|
5384
|
+
date: mod2.string(),
|
|
5385
|
+
contractUri: mod2.string()
|
|
5386
|
+
});
|
|
5387
|
+
var PaginatedConsentFlowDataForDidValidator2 = PaginationResponseValidator2.extend({
|
|
5388
|
+
records: ConsentFlowContractDataForDidValidator2.array()
|
|
5389
|
+
});
|
|
5367
5390
|
var ConsentFlowTermValidator2 = mod2.object({
|
|
5368
5391
|
sharing: mod2.boolean().optional(),
|
|
5369
5392
|
shared: mod2.string().array().optional(),
|
|
@@ -5416,6 +5439,11 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5416
5439
|
credentials: mod2.object({ categories: mod2.record(mod2.boolean()).optional() }).optional(),
|
|
5417
5440
|
personal: mod2.record(mod2.boolean()).optional()
|
|
5418
5441
|
});
|
|
5442
|
+
var ConsentFlowDataForDidQueryValidator2 = mod2.object({
|
|
5443
|
+
credentials: mod2.object({ categories: mod2.record(mod2.boolean()).optional() }).optional(),
|
|
5444
|
+
personal: mod2.record(mod2.boolean()).optional(),
|
|
5445
|
+
id: StringQuery2.optional()
|
|
5446
|
+
});
|
|
5419
5447
|
var ConsentFlowTermsQueryValidator2 = mod2.object({
|
|
5420
5448
|
read: mod2.object({
|
|
5421
5449
|
anonymize: mod2.boolean().optional(),
|
|
@@ -5435,7 +5463,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5435
5463
|
"consent",
|
|
5436
5464
|
"update",
|
|
5437
5465
|
"sync",
|
|
5438
|
-
"withdraw"
|
|
5466
|
+
"withdraw",
|
|
5467
|
+
"write"
|
|
5439
5468
|
]);
|
|
5440
5469
|
var ConsentFlowTransactionsQueryValidator2 = mod2.object({
|
|
5441
5470
|
terms: ConsentFlowTermsQueryValidator2.optional(),
|
|
@@ -5452,11 +5481,23 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5452
5481
|
terms: ConsentFlowTermsValidator2.optional(),
|
|
5453
5482
|
id: mod2.string(),
|
|
5454
5483
|
action: ConsentFlowTransactionActionValidator2,
|
|
5455
|
-
date: mod2.string()
|
|
5484
|
+
date: mod2.string(),
|
|
5485
|
+
uris: mod2.string().array().optional()
|
|
5456
5486
|
});
|
|
5457
5487
|
var PaginatedConsentFlowTransactionsValidator2 = PaginationResponseValidator2.extend({
|
|
5458
5488
|
records: ConsentFlowTransactionValidator2.array()
|
|
5459
5489
|
});
|
|
5490
|
+
var ContractCredentialValidator2 = mod2.object({
|
|
5491
|
+
credentialUri: mod2.string(),
|
|
5492
|
+
termsUri: mod2.string(),
|
|
5493
|
+
contractUri: mod2.string(),
|
|
5494
|
+
boostUri: mod2.string(),
|
|
5495
|
+
category: mod2.string().optional(),
|
|
5496
|
+
date: mod2.string()
|
|
5497
|
+
});
|
|
5498
|
+
var PaginatedContractCredentialsValidator2 = PaginationResponseValidator2.extend({
|
|
5499
|
+
records: ContractCredentialValidator2.array()
|
|
5500
|
+
});
|
|
5460
5501
|
var LCNNotificationTypeEnumValidator2 = mod2.enum([
|
|
5461
5502
|
"CONNECTION_REQUEST",
|
|
5462
5503
|
"CONNECTION_ACCEPTED",
|
|
@@ -9572,6 +9613,13 @@ var LCNSigningAuthorityForUserValidator = mod.object({
|
|
|
9572
9613
|
did: mod.string()
|
|
9573
9614
|
})
|
|
9574
9615
|
});
|
|
9616
|
+
var AutoBoostConfigValidator = mod.object({
|
|
9617
|
+
boostUri: mod.string(),
|
|
9618
|
+
signingAuthority: mod.object({
|
|
9619
|
+
endpoint: mod.string(),
|
|
9620
|
+
name: mod.string()
|
|
9621
|
+
})
|
|
9622
|
+
});
|
|
9575
9623
|
var ConsentFlowTermsStatusValidator = mod.enum(["live", "stale", "withdrawn"]);
|
|
9576
9624
|
var ConsentFlowContractValidator = mod.object({
|
|
9577
9625
|
read: mod.object({
|
|
@@ -9595,6 +9643,7 @@ var ConsentFlowContractDetailsValidator = mod.object({
|
|
|
9595
9643
|
uri: mod.string(),
|
|
9596
9644
|
needsGuardianConsent: mod.boolean().optional(),
|
|
9597
9645
|
redirectUrl: mod.string().optional(),
|
|
9646
|
+
frontDoorBoostUri: mod.string().optional(),
|
|
9598
9647
|
createdAt: mod.string(),
|
|
9599
9648
|
updatedAt: mod.string(),
|
|
9600
9649
|
expiresAt: mod.string().optional()
|
|
@@ -9610,6 +9659,15 @@ var ConsentFlowContractDataValidator = mod.object({
|
|
|
9610
9659
|
var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
|
|
9611
9660
|
records: ConsentFlowContractDataValidator.array()
|
|
9612
9661
|
});
|
|
9662
|
+
var ConsentFlowContractDataForDidValidator = mod.object({
|
|
9663
|
+
credentials: mod.object({ category: mod.string(), uri: mod.string() }).array(),
|
|
9664
|
+
personal: mod.record(mod.string()).default({}),
|
|
9665
|
+
date: mod.string(),
|
|
9666
|
+
contractUri: mod.string()
|
|
9667
|
+
});
|
|
9668
|
+
var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
|
|
9669
|
+
records: ConsentFlowContractDataForDidValidator.array()
|
|
9670
|
+
});
|
|
9613
9671
|
var ConsentFlowTermValidator = mod.object({
|
|
9614
9672
|
sharing: mod.boolean().optional(),
|
|
9615
9673
|
shared: mod.string().array().optional(),
|
|
@@ -9662,6 +9720,11 @@ var ConsentFlowDataQueryValidator = mod.object({
|
|
|
9662
9720
|
credentials: mod.object({ categories: mod.record(mod.boolean()).optional() }).optional(),
|
|
9663
9721
|
personal: mod.record(mod.boolean()).optional()
|
|
9664
9722
|
});
|
|
9723
|
+
var ConsentFlowDataForDidQueryValidator = mod.object({
|
|
9724
|
+
credentials: mod.object({ categories: mod.record(mod.boolean()).optional() }).optional(),
|
|
9725
|
+
personal: mod.record(mod.boolean()).optional(),
|
|
9726
|
+
id: StringQuery.optional()
|
|
9727
|
+
});
|
|
9665
9728
|
var ConsentFlowTermsQueryValidator = mod.object({
|
|
9666
9729
|
read: mod.object({
|
|
9667
9730
|
anonymize: mod.boolean().optional(),
|
|
@@ -9681,7 +9744,8 @@ var ConsentFlowTransactionActionValidator = mod.enum([
|
|
|
9681
9744
|
"consent",
|
|
9682
9745
|
"update",
|
|
9683
9746
|
"sync",
|
|
9684
|
-
"withdraw"
|
|
9747
|
+
"withdraw",
|
|
9748
|
+
"write"
|
|
9685
9749
|
]);
|
|
9686
9750
|
var ConsentFlowTransactionsQueryValidator = mod.object({
|
|
9687
9751
|
terms: ConsentFlowTermsQueryValidator.optional(),
|
|
@@ -9698,11 +9762,23 @@ var ConsentFlowTransactionValidator = mod.object({
|
|
|
9698
9762
|
terms: ConsentFlowTermsValidator.optional(),
|
|
9699
9763
|
id: mod.string(),
|
|
9700
9764
|
action: ConsentFlowTransactionActionValidator,
|
|
9701
|
-
date: mod.string()
|
|
9765
|
+
date: mod.string(),
|
|
9766
|
+
uris: mod.string().array().optional()
|
|
9702
9767
|
});
|
|
9703
9768
|
var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
|
|
9704
9769
|
records: ConsentFlowTransactionValidator.array()
|
|
9705
9770
|
});
|
|
9771
|
+
var ContractCredentialValidator = mod.object({
|
|
9772
|
+
credentialUri: mod.string(),
|
|
9773
|
+
termsUri: mod.string(),
|
|
9774
|
+
contractUri: mod.string(),
|
|
9775
|
+
boostUri: mod.string(),
|
|
9776
|
+
category: mod.string().optional(),
|
|
9777
|
+
date: mod.string()
|
|
9778
|
+
});
|
|
9779
|
+
var PaginatedContractCredentialsValidator = PaginationResponseValidator.extend({
|
|
9780
|
+
records: ContractCredentialValidator.array()
|
|
9781
|
+
});
|
|
9706
9782
|
var LCNNotificationTypeEnumValidator = mod.enum([
|
|
9707
9783
|
"CONNECTION_REQUEST",
|
|
9708
9784
|
"CONNECTION_ACCEPTED",
|
|
@@ -10338,11 +10414,26 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10338
10414
|
throw new Error("Please make an account first!");
|
|
10339
10415
|
return client.contracts.getConsentedDataForContract.query({ uri, ...options });
|
|
10340
10416
|
},
|
|
10417
|
+
getConsentFlowDataForDid: async (_learnCard, did2, options = {}) => {
|
|
10418
|
+
if (!userData)
|
|
10419
|
+
throw new Error("Please make an account first!");
|
|
10420
|
+
return client.contracts.getConsentedDataForDid.query({ did: did2, ...options });
|
|
10421
|
+
},
|
|
10341
10422
|
getAllConsentFlowData: async (_learnCard, query = {}, options = {}) => {
|
|
10342
10423
|
if (!userData)
|
|
10343
10424
|
throw new Error("Please make an account first!");
|
|
10344
10425
|
return client.contracts.getConsentedData.query({ query, ...options });
|
|
10345
10426
|
},
|
|
10427
|
+
writeCredentialToContract: async (_learnCard, did2, contractUri, credential, boostUri) => {
|
|
10428
|
+
if (!userData)
|
|
10429
|
+
throw new Error("Please make an account first!");
|
|
10430
|
+
return client.contracts.writeCredentialToContract.mutate({
|
|
10431
|
+
did: did2,
|
|
10432
|
+
contractUri,
|
|
10433
|
+
credential,
|
|
10434
|
+
boostUri
|
|
10435
|
+
});
|
|
10436
|
+
},
|
|
10346
10437
|
consentToContract: async (_learnCard, contractUri, { terms, expiresAt, oneTime }) => {
|
|
10347
10438
|
if (!userData)
|
|
10348
10439
|
throw new Error("Please make an account first!");
|
|
@@ -10378,6 +10469,16 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10378
10469
|
throw new Error("Please make an account first!");
|
|
10379
10470
|
return client.contracts.getTermsTransactionHistory.query({ uri, ...options });
|
|
10380
10471
|
},
|
|
10472
|
+
getCredentialsForContract: async (_learnCard, termsUri, options = {}) => {
|
|
10473
|
+
if (!userData)
|
|
10474
|
+
throw new Error("Please make an account first!");
|
|
10475
|
+
return client.contracts.getCredentialsForContract.query({ termsUri, ...options });
|
|
10476
|
+
},
|
|
10477
|
+
getConsentFlowCredentials: async (_learnCard, options = {}) => {
|
|
10478
|
+
if (!userData)
|
|
10479
|
+
throw new Error("Please make an account first!");
|
|
10480
|
+
return client.contracts.getAllCredentialsForTerms.query(options);
|
|
10481
|
+
},
|
|
10381
10482
|
verifyConsent: async (_learnCard, uri, profileId) => {
|
|
10382
10483
|
return client.contracts.verifyConsent.query({ uri, profileId });
|
|
10383
10484
|
},
|