@learncard/network-plugin 2.4.11 → 2.4.12
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
package/dist/lcn-plugin.esm.js
CHANGED
|
@@ -1217,6 +1217,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
1217
1217
|
AddressValidator: () => AddressValidator2,
|
|
1218
1218
|
AlignmentTargetTypeValidator: () => AlignmentTargetTypeValidator2,
|
|
1219
1219
|
AlignmentValidator: () => AlignmentValidator2,
|
|
1220
|
+
AutoBoostConfigValidator: () => AutoBoostConfigValidator2,
|
|
1220
1221
|
BoostPermissionsQueryValidator: () => BoostPermissionsQueryValidator2,
|
|
1221
1222
|
BoostPermissionsValidator: () => BoostPermissionsValidator2,
|
|
1222
1223
|
BoostQueryValidator: () => BoostQueryValidator2,
|
|
@@ -1225,10 +1226,12 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
1225
1226
|
ClaimHookQueryValidator: () => ClaimHookQueryValidator2,
|
|
1226
1227
|
ClaimHookTypeValidator: () => ClaimHookTypeValidator2,
|
|
1227
1228
|
ClaimHookValidator: () => ClaimHookValidator2,
|
|
1229
|
+
ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator2,
|
|
1228
1230
|
ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator2,
|
|
1229
1231
|
ConsentFlowContractDetailsValidator: () => ConsentFlowContractDetailsValidator2,
|
|
1230
1232
|
ConsentFlowContractQueryValidator: () => ConsentFlowContractQueryValidator2,
|
|
1231
1233
|
ConsentFlowContractValidator: () => ConsentFlowContractValidator2,
|
|
1234
|
+
ConsentFlowDataForDidQueryValidator: () => ConsentFlowDataForDidQueryValidator2,
|
|
1232
1235
|
ConsentFlowDataQueryValidator: () => ConsentFlowDataQueryValidator2,
|
|
1233
1236
|
ConsentFlowTermValidator: () => ConsentFlowTermValidator2,
|
|
1234
1237
|
ConsentFlowTermsQueryValidator: () => ConsentFlowTermsQueryValidator2,
|
|
@@ -1238,6 +1241,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
1238
1241
|
ConsentFlowTransactionValidator: () => ConsentFlowTransactionValidator2,
|
|
1239
1242
|
ConsentFlowTransactionsQueryValidator: () => ConsentFlowTransactionsQueryValidator2,
|
|
1240
1243
|
ContextValidator: () => ContextValidator2,
|
|
1244
|
+
ContractCredentialValidator: () => ContractCredentialValidator2,
|
|
1241
1245
|
CredentialInfoValidator: () => CredentialInfoValidator2,
|
|
1242
1246
|
CredentialRecordValidator: () => CredentialRecordValidator2,
|
|
1243
1247
|
CredentialSchemaValidator: () => CredentialSchemaValidator2,
|
|
@@ -1281,9 +1285,11 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
1281
1285
|
PaginatedBoostsValidator: () => PaginatedBoostsValidator2,
|
|
1282
1286
|
PaginatedClaimHooksValidator: () => PaginatedClaimHooksValidator2,
|
|
1283
1287
|
PaginatedConsentFlowContractsValidator: () => PaginatedConsentFlowContractsValidator2,
|
|
1288
|
+
PaginatedConsentFlowDataForDidValidator: () => PaginatedConsentFlowDataForDidValidator2,
|
|
1284
1289
|
PaginatedConsentFlowDataValidator: () => PaginatedConsentFlowDataValidator2,
|
|
1285
1290
|
PaginatedConsentFlowTermsValidator: () => PaginatedConsentFlowTermsValidator2,
|
|
1286
1291
|
PaginatedConsentFlowTransactionsValidator: () => PaginatedConsentFlowTransactionsValidator2,
|
|
1292
|
+
PaginatedContractCredentialsValidator: () => PaginatedContractCredentialsValidator2,
|
|
1287
1293
|
PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator2,
|
|
1288
1294
|
PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator2,
|
|
1289
1295
|
PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator2,
|
|
@@ -5301,6 +5307,13 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5301
5307
|
did: mod2.string()
|
|
5302
5308
|
})
|
|
5303
5309
|
});
|
|
5310
|
+
var AutoBoostConfigValidator2 = mod2.object({
|
|
5311
|
+
boostUri: mod2.string(),
|
|
5312
|
+
signingAuthority: mod2.object({
|
|
5313
|
+
endpoint: mod2.string(),
|
|
5314
|
+
name: mod2.string()
|
|
5315
|
+
})
|
|
5316
|
+
});
|
|
5304
5317
|
var ConsentFlowTermsStatusValidator2 = mod2.enum(["live", "stale", "withdrawn"]);
|
|
5305
5318
|
var ConsentFlowContractValidator2 = mod2.object({
|
|
5306
5319
|
read: mod2.object({
|
|
@@ -5324,6 +5337,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5324
5337
|
uri: mod2.string(),
|
|
5325
5338
|
needsGuardianConsent: mod2.boolean().optional(),
|
|
5326
5339
|
redirectUrl: mod2.string().optional(),
|
|
5340
|
+
frontDoorBoostUri: mod2.string().optional(),
|
|
5327
5341
|
createdAt: mod2.string(),
|
|
5328
5342
|
updatedAt: mod2.string(),
|
|
5329
5343
|
expiresAt: mod2.string().optional()
|
|
@@ -5339,6 +5353,15 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5339
5353
|
var PaginatedConsentFlowDataValidator2 = PaginationResponseValidator2.extend({
|
|
5340
5354
|
records: ConsentFlowContractDataValidator2.array()
|
|
5341
5355
|
});
|
|
5356
|
+
var ConsentFlowContractDataForDidValidator2 = mod2.object({
|
|
5357
|
+
credentials: mod2.object({ category: mod2.string(), uri: mod2.string() }).array(),
|
|
5358
|
+
personal: mod2.record(mod2.string()).default({}),
|
|
5359
|
+
date: mod2.string(),
|
|
5360
|
+
contractUri: mod2.string()
|
|
5361
|
+
});
|
|
5362
|
+
var PaginatedConsentFlowDataForDidValidator2 = PaginationResponseValidator2.extend({
|
|
5363
|
+
records: ConsentFlowContractDataForDidValidator2.array()
|
|
5364
|
+
});
|
|
5342
5365
|
var ConsentFlowTermValidator2 = mod2.object({
|
|
5343
5366
|
sharing: mod2.boolean().optional(),
|
|
5344
5367
|
shared: mod2.string().array().optional(),
|
|
@@ -5391,6 +5414,11 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5391
5414
|
credentials: mod2.object({ categories: mod2.record(mod2.boolean()).optional() }).optional(),
|
|
5392
5415
|
personal: mod2.record(mod2.boolean()).optional()
|
|
5393
5416
|
});
|
|
5417
|
+
var ConsentFlowDataForDidQueryValidator2 = mod2.object({
|
|
5418
|
+
credentials: mod2.object({ categories: mod2.record(mod2.boolean()).optional() }).optional(),
|
|
5419
|
+
personal: mod2.record(mod2.boolean()).optional(),
|
|
5420
|
+
id: StringQuery2.optional()
|
|
5421
|
+
});
|
|
5394
5422
|
var ConsentFlowTermsQueryValidator2 = mod2.object({
|
|
5395
5423
|
read: mod2.object({
|
|
5396
5424
|
anonymize: mod2.boolean().optional(),
|
|
@@ -5410,7 +5438,8 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5410
5438
|
"consent",
|
|
5411
5439
|
"update",
|
|
5412
5440
|
"sync",
|
|
5413
|
-
"withdraw"
|
|
5441
|
+
"withdraw",
|
|
5442
|
+
"write"
|
|
5414
5443
|
]);
|
|
5415
5444
|
var ConsentFlowTransactionsQueryValidator2 = mod2.object({
|
|
5416
5445
|
terms: ConsentFlowTermsQueryValidator2.optional(),
|
|
@@ -5427,11 +5456,23 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
5427
5456
|
terms: ConsentFlowTermsValidator2.optional(),
|
|
5428
5457
|
id: mod2.string(),
|
|
5429
5458
|
action: ConsentFlowTransactionActionValidator2,
|
|
5430
|
-
date: mod2.string()
|
|
5459
|
+
date: mod2.string(),
|
|
5460
|
+
uris: mod2.string().array().optional()
|
|
5431
5461
|
});
|
|
5432
5462
|
var PaginatedConsentFlowTransactionsValidator2 = PaginationResponseValidator2.extend({
|
|
5433
5463
|
records: ConsentFlowTransactionValidator2.array()
|
|
5434
5464
|
});
|
|
5465
|
+
var ContractCredentialValidator2 = mod2.object({
|
|
5466
|
+
credentialUri: mod2.string(),
|
|
5467
|
+
termsUri: mod2.string(),
|
|
5468
|
+
contractUri: mod2.string(),
|
|
5469
|
+
boostUri: mod2.string(),
|
|
5470
|
+
category: mod2.string().optional(),
|
|
5471
|
+
date: mod2.string()
|
|
5472
|
+
});
|
|
5473
|
+
var PaginatedContractCredentialsValidator2 = PaginationResponseValidator2.extend({
|
|
5474
|
+
records: ContractCredentialValidator2.array()
|
|
5475
|
+
});
|
|
5435
5476
|
var LCNNotificationTypeEnumValidator2 = mod2.enum([
|
|
5436
5477
|
"CONNECTION_REQUEST",
|
|
5437
5478
|
"CONNECTION_ACCEPTED",
|
|
@@ -9547,6 +9588,13 @@ var LCNSigningAuthorityForUserValidator = mod.object({
|
|
|
9547
9588
|
did: mod.string()
|
|
9548
9589
|
})
|
|
9549
9590
|
});
|
|
9591
|
+
var AutoBoostConfigValidator = mod.object({
|
|
9592
|
+
boostUri: mod.string(),
|
|
9593
|
+
signingAuthority: mod.object({
|
|
9594
|
+
endpoint: mod.string(),
|
|
9595
|
+
name: mod.string()
|
|
9596
|
+
})
|
|
9597
|
+
});
|
|
9550
9598
|
var ConsentFlowTermsStatusValidator = mod.enum(["live", "stale", "withdrawn"]);
|
|
9551
9599
|
var ConsentFlowContractValidator = mod.object({
|
|
9552
9600
|
read: mod.object({
|
|
@@ -9570,6 +9618,7 @@ var ConsentFlowContractDetailsValidator = mod.object({
|
|
|
9570
9618
|
uri: mod.string(),
|
|
9571
9619
|
needsGuardianConsent: mod.boolean().optional(),
|
|
9572
9620
|
redirectUrl: mod.string().optional(),
|
|
9621
|
+
frontDoorBoostUri: mod.string().optional(),
|
|
9573
9622
|
createdAt: mod.string(),
|
|
9574
9623
|
updatedAt: mod.string(),
|
|
9575
9624
|
expiresAt: mod.string().optional()
|
|
@@ -9585,6 +9634,15 @@ var ConsentFlowContractDataValidator = mod.object({
|
|
|
9585
9634
|
var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
|
|
9586
9635
|
records: ConsentFlowContractDataValidator.array()
|
|
9587
9636
|
});
|
|
9637
|
+
var ConsentFlowContractDataForDidValidator = mod.object({
|
|
9638
|
+
credentials: mod.object({ category: mod.string(), uri: mod.string() }).array(),
|
|
9639
|
+
personal: mod.record(mod.string()).default({}),
|
|
9640
|
+
date: mod.string(),
|
|
9641
|
+
contractUri: mod.string()
|
|
9642
|
+
});
|
|
9643
|
+
var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
|
|
9644
|
+
records: ConsentFlowContractDataForDidValidator.array()
|
|
9645
|
+
});
|
|
9588
9646
|
var ConsentFlowTermValidator = mod.object({
|
|
9589
9647
|
sharing: mod.boolean().optional(),
|
|
9590
9648
|
shared: mod.string().array().optional(),
|
|
@@ -9637,6 +9695,11 @@ var ConsentFlowDataQueryValidator = mod.object({
|
|
|
9637
9695
|
credentials: mod.object({ categories: mod.record(mod.boolean()).optional() }).optional(),
|
|
9638
9696
|
personal: mod.record(mod.boolean()).optional()
|
|
9639
9697
|
});
|
|
9698
|
+
var ConsentFlowDataForDidQueryValidator = mod.object({
|
|
9699
|
+
credentials: mod.object({ categories: mod.record(mod.boolean()).optional() }).optional(),
|
|
9700
|
+
personal: mod.record(mod.boolean()).optional(),
|
|
9701
|
+
id: StringQuery.optional()
|
|
9702
|
+
});
|
|
9640
9703
|
var ConsentFlowTermsQueryValidator = mod.object({
|
|
9641
9704
|
read: mod.object({
|
|
9642
9705
|
anonymize: mod.boolean().optional(),
|
|
@@ -9656,7 +9719,8 @@ var ConsentFlowTransactionActionValidator = mod.enum([
|
|
|
9656
9719
|
"consent",
|
|
9657
9720
|
"update",
|
|
9658
9721
|
"sync",
|
|
9659
|
-
"withdraw"
|
|
9722
|
+
"withdraw",
|
|
9723
|
+
"write"
|
|
9660
9724
|
]);
|
|
9661
9725
|
var ConsentFlowTransactionsQueryValidator = mod.object({
|
|
9662
9726
|
terms: ConsentFlowTermsQueryValidator.optional(),
|
|
@@ -9673,11 +9737,23 @@ var ConsentFlowTransactionValidator = mod.object({
|
|
|
9673
9737
|
terms: ConsentFlowTermsValidator.optional(),
|
|
9674
9738
|
id: mod.string(),
|
|
9675
9739
|
action: ConsentFlowTransactionActionValidator,
|
|
9676
|
-
date: mod.string()
|
|
9740
|
+
date: mod.string(),
|
|
9741
|
+
uris: mod.string().array().optional()
|
|
9677
9742
|
});
|
|
9678
9743
|
var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
|
|
9679
9744
|
records: ConsentFlowTransactionValidator.array()
|
|
9680
9745
|
});
|
|
9746
|
+
var ContractCredentialValidator = mod.object({
|
|
9747
|
+
credentialUri: mod.string(),
|
|
9748
|
+
termsUri: mod.string(),
|
|
9749
|
+
contractUri: mod.string(),
|
|
9750
|
+
boostUri: mod.string(),
|
|
9751
|
+
category: mod.string().optional(),
|
|
9752
|
+
date: mod.string()
|
|
9753
|
+
});
|
|
9754
|
+
var PaginatedContractCredentialsValidator = PaginationResponseValidator.extend({
|
|
9755
|
+
records: ContractCredentialValidator.array()
|
|
9756
|
+
});
|
|
9681
9757
|
var LCNNotificationTypeEnumValidator = mod.enum([
|
|
9682
9758
|
"CONNECTION_REQUEST",
|
|
9683
9759
|
"CONNECTION_ACCEPTED",
|
|
@@ -10313,11 +10389,26 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10313
10389
|
throw new Error("Please make an account first!");
|
|
10314
10390
|
return client.contracts.getConsentedDataForContract.query({ uri, ...options });
|
|
10315
10391
|
},
|
|
10392
|
+
getConsentFlowDataForDid: async (_learnCard, did2, options = {}) => {
|
|
10393
|
+
if (!userData)
|
|
10394
|
+
throw new Error("Please make an account first!");
|
|
10395
|
+
return client.contracts.getConsentedDataForDid.query({ did: did2, ...options });
|
|
10396
|
+
},
|
|
10316
10397
|
getAllConsentFlowData: async (_learnCard, query = {}, options = {}) => {
|
|
10317
10398
|
if (!userData)
|
|
10318
10399
|
throw new Error("Please make an account first!");
|
|
10319
10400
|
return client.contracts.getConsentedData.query({ query, ...options });
|
|
10320
10401
|
},
|
|
10402
|
+
writeCredentialToContract: async (_learnCard, did2, contractUri, credential, boostUri) => {
|
|
10403
|
+
if (!userData)
|
|
10404
|
+
throw new Error("Please make an account first!");
|
|
10405
|
+
return client.contracts.writeCredentialToContract.mutate({
|
|
10406
|
+
did: did2,
|
|
10407
|
+
contractUri,
|
|
10408
|
+
credential,
|
|
10409
|
+
boostUri
|
|
10410
|
+
});
|
|
10411
|
+
},
|
|
10321
10412
|
consentToContract: async (_learnCard, contractUri, { terms, expiresAt, oneTime }) => {
|
|
10322
10413
|
if (!userData)
|
|
10323
10414
|
throw new Error("Please make an account first!");
|
|
@@ -10353,6 +10444,16 @@ var getLearnCardNetworkPlugin = /* @__PURE__ */ __name(async (learnCard, url) =>
|
|
|
10353
10444
|
throw new Error("Please make an account first!");
|
|
10354
10445
|
return client.contracts.getTermsTransactionHistory.query({ uri, ...options });
|
|
10355
10446
|
},
|
|
10447
|
+
getCredentialsForContract: async (_learnCard, termsUri, options = {}) => {
|
|
10448
|
+
if (!userData)
|
|
10449
|
+
throw new Error("Please make an account first!");
|
|
10450
|
+
return client.contracts.getCredentialsForContract.query({ termsUri, ...options });
|
|
10451
|
+
},
|
|
10452
|
+
getConsentFlowCredentials: async (_learnCard, options = {}) => {
|
|
10453
|
+
if (!userData)
|
|
10454
|
+
throw new Error("Please make an account first!");
|
|
10455
|
+
return client.contracts.getAllCredentialsForTerms.query(options);
|
|
10456
|
+
},
|
|
10356
10457
|
verifyConsent: async (_learnCard, uri, profileId) => {
|
|
10357
10458
|
return client.contracts.verifyConsent.query({ uri, profileId });
|
|
10358
10459
|
},
|