@learncard/network-plugin 2.6.6 → 2.6.9

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.
@@ -2045,6 +2045,7 @@ var require_helpers_cjs_development = __commonJS({
2045
2045
  ClaimHookQueryValidator: () => ClaimHookQueryValidator2,
2046
2046
  ClaimHookTypeValidator: () => ClaimHookTypeValidator2,
2047
2047
  ClaimHookValidator: () => ClaimHookValidator2,
2048
+ ClaimInboxCredentialValidator: () => ClaimInboxCredentialValidator2,
2048
2049
  ClaimTokenValidator: () => ClaimTokenValidator2,
2049
2050
  ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator2,
2050
2051
  ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator2,
@@ -2067,6 +2068,8 @@ var require_helpers_cjs_development = __commonJS({
2067
2068
  ContactMethodVerificationValidator: () => ContactMethodVerificationValidator2,
2068
2069
  ContextValidator: () => ContextValidator2,
2069
2070
  ContractCredentialValidator: () => ContractCredentialValidator2,
2071
+ CreateContactMethodSessionResponseValidator: () => CreateContactMethodSessionResponseValidator2,
2072
+ CreateContactMethodSessionValidator: () => CreateContactMethodSessionValidator2,
2070
2073
  CredentialInfoValidator: () => CredentialInfoValidator2,
2071
2074
  CredentialRecordValidator: () => CredentialRecordValidator2,
2072
2075
  CredentialSchemaValidator: () => CredentialSchemaValidator2,
@@ -2100,8 +2103,13 @@ var require_helpers_cjs_development = __commonJS({
2100
2103
  LCNBoostClaimLinkOptionsValidator: () => LCNBoostClaimLinkOptionsValidator2,
2101
2104
  LCNBoostClaimLinkSigningAuthorityValidator: () => LCNBoostClaimLinkSigningAuthorityValidator2,
2102
2105
  LCNBoostStatus: () => LCNBoostStatus2,
2106
+ LCNDomainOrOriginValidator: () => LCNDomainOrOriginValidator2,
2103
2107
  LCNInboxContactMethodValidator: () => LCNInboxContactMethodValidator2,
2104
2108
  LCNInboxStatusEnumValidator: () => LCNInboxStatusEnumValidator2,
2109
+ LCNIntegrationCreateValidator: () => LCNIntegrationCreateValidator2,
2110
+ LCNIntegrationQueryValidator: () => LCNIntegrationQueryValidator2,
2111
+ LCNIntegrationUpdateValidator: () => LCNIntegrationUpdateValidator2,
2112
+ LCNIntegrationValidator: () => LCNIntegrationValidator2,
2105
2113
  LCNNotificationDataValidator: () => LCNNotificationDataValidator2,
2106
2114
  LCNNotificationInboxValidator: () => LCNNotificationInboxValidator2,
2107
2115
  LCNNotificationMessageValidator: () => LCNNotificationMessageValidator2,
@@ -2128,6 +2136,7 @@ var require_helpers_cjs_development = __commonJS({
2128
2136
  PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator2,
2129
2137
  PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator2,
2130
2138
  PaginatedInboxCredentialsValidator: () => PaginatedInboxCredentialsValidator2,
2139
+ PaginatedLCNIntegrationsValidator: () => PaginatedLCNIntegrationsValidator2,
2131
2140
  PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator2,
2132
2141
  PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator2,
2133
2142
  PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator2,
@@ -7059,7 +7068,13 @@ var require_helpers_cjs_development = __commonJS({
7059
7068
  type: z2.string(),
7060
7069
  value: z2.string()
7061
7070
  });
7062
- var LCNInboxStatusEnumValidator2 = z2.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
7071
+ var LCNInboxStatusEnumValidator2 = z2.enum([
7072
+ "PENDING",
7073
+ "ISSUED",
7074
+ "EXPIRED",
7075
+ "DELIVERED",
7076
+ "CLAIMED"
7077
+ ]);
7063
7078
  var LCNNotificationInboxValidator2 = z2.object({
7064
7079
  issuanceId: z2.string(),
7065
7080
  status: LCNInboxStatusEnumValidator2,
@@ -7157,11 +7172,19 @@ var require_helpers_cjs_development = __commonJS({
7157
7172
  var SetPrimaryContactMethodValidator2 = z2.object({
7158
7173
  contactMethodId: z2.string()
7159
7174
  });
7175
+ var CreateContactMethodSessionValidator2 = z2.object({
7176
+ contactMethod: ContactMethodVerificationRequestValidator2,
7177
+ otpChallenge: z2.string()
7178
+ });
7179
+ var CreateContactMethodSessionResponseValidator2 = z2.object({
7180
+ sessionJwt: z2.string()
7181
+ });
7160
7182
  var InboxCredentialValidator2 = z2.object({
7161
7183
  id: z2.string(),
7162
7184
  credential: z2.string(),
7163
7185
  isSigned: z2.boolean(),
7164
7186
  currentStatus: LCNInboxStatusEnumValidator2,
7187
+ isAccepted: z2.boolean().optional(),
7165
7188
  expiresAt: z2.string(),
7166
7189
  createdAt: z2.string(),
7167
7190
  issuerDid: z2.string(),
@@ -7180,6 +7203,7 @@ var require_helpers_cjs_development = __commonJS({
7180
7203
  currentStatus: LCNInboxStatusEnumValidator2,
7181
7204
  id: z2.string(),
7182
7205
  isSigned: z2.boolean(),
7206
+ isAccepted: z2.boolean().optional(),
7183
7207
  issuerDid: z2.string()
7184
7208
  }).partial();
7185
7209
  var IssueInboxSigningAuthorityValidator2 = z2.object({
@@ -7221,6 +7245,51 @@ var require_helpers_cjs_development = __commonJS({
7221
7245
  claimUrl: z2.string().url().optional(),
7222
7246
  recipientDid: z2.string().optional()
7223
7247
  });
7248
+ var ClaimInboxCredentialValidator2 = z2.object({
7249
+ credential: VCValidator2.passthrough().or(VPValidator2.passthrough()).or(UnsignedVCValidator2.passthrough()).describe("The credential to issue."),
7250
+ configuration: z2.object({
7251
+ publishableKey: z2.string(),
7252
+ signingAuthorityName: z2.string().optional()
7253
+ }).optional()
7254
+ });
7255
+ var LCNDomainOrOriginValidator2 = z2.union([
7256
+ z2.string().regex(
7257
+ /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
7258
+ {
7259
+ message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
7260
+ }
7261
+ ),
7262
+ z2.string().regex(
7263
+ /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
7264
+ { message: "Must be a valid http(s) origin" }
7265
+ )
7266
+ ]);
7267
+ var LCNIntegrationValidator2 = z2.object({
7268
+ id: z2.string(),
7269
+ name: z2.string(),
7270
+ description: z2.string().optional(),
7271
+ publishableKey: z2.string(),
7272
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).default([])
7273
+ });
7274
+ var LCNIntegrationCreateValidator2 = z2.object({
7275
+ name: z2.string(),
7276
+ description: z2.string().optional(),
7277
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).default([])
7278
+ });
7279
+ var LCNIntegrationUpdateValidator2 = z2.object({
7280
+ name: z2.string().optional(),
7281
+ description: z2.string().optional(),
7282
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).optional(),
7283
+ rotatePublishableKey: z2.boolean().optional()
7284
+ });
7285
+ var LCNIntegrationQueryValidator2 = z2.object({
7286
+ id: StringQuery2,
7287
+ name: StringQuery2,
7288
+ description: StringQuery2
7289
+ }).partial();
7290
+ var PaginatedLCNIntegrationsValidator2 = PaginationResponseValidator2.extend({
7291
+ records: LCNIntegrationValidator2.array()
7292
+ });
7224
7293
  var ClaimTokenValidator2 = z2.object({
7225
7294
  token: z2.string(),
7226
7295
  contactMethodId: z2.string(),
@@ -12235,7 +12304,13 @@ var LCNInboxContactMethodValidator = z.object({
12235
12304
  type: z.string(),
12236
12305
  value: z.string()
12237
12306
  });
12238
- var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
12307
+ var LCNInboxStatusEnumValidator = z.enum([
12308
+ "PENDING",
12309
+ "ISSUED",
12310
+ "EXPIRED",
12311
+ "DELIVERED",
12312
+ "CLAIMED"
12313
+ ]);
12239
12314
  var LCNNotificationInboxValidator = z.object({
12240
12315
  issuanceId: z.string(),
12241
12316
  status: LCNInboxStatusEnumValidator,
@@ -12333,11 +12408,19 @@ var ContactMethodVerificationValidator = z.object({
12333
12408
  var SetPrimaryContactMethodValidator = z.object({
12334
12409
  contactMethodId: z.string()
12335
12410
  });
12411
+ var CreateContactMethodSessionValidator = z.object({
12412
+ contactMethod: ContactMethodVerificationRequestValidator,
12413
+ otpChallenge: z.string()
12414
+ });
12415
+ var CreateContactMethodSessionResponseValidator = z.object({
12416
+ sessionJwt: z.string()
12417
+ });
12336
12418
  var InboxCredentialValidator = z.object({
12337
12419
  id: z.string(),
12338
12420
  credential: z.string(),
12339
12421
  isSigned: z.boolean(),
12340
12422
  currentStatus: LCNInboxStatusEnumValidator,
12423
+ isAccepted: z.boolean().optional(),
12341
12424
  expiresAt: z.string(),
12342
12425
  createdAt: z.string(),
12343
12426
  issuerDid: z.string(),
@@ -12356,6 +12439,7 @@ var InboxCredentialQueryValidator = z.object({
12356
12439
  currentStatus: LCNInboxStatusEnumValidator,
12357
12440
  id: z.string(),
12358
12441
  isSigned: z.boolean(),
12442
+ isAccepted: z.boolean().optional(),
12359
12443
  issuerDid: z.string()
12360
12444
  }).partial();
12361
12445
  var IssueInboxSigningAuthorityValidator = z.object({
@@ -12397,6 +12481,51 @@ var IssueInboxCredentialResponseValidator = z.object({
12397
12481
  claimUrl: z.string().url().optional(),
12398
12482
  recipientDid: z.string().optional()
12399
12483
  });
12484
+ var ClaimInboxCredentialValidator = z.object({
12485
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue."),
12486
+ configuration: z.object({
12487
+ publishableKey: z.string(),
12488
+ signingAuthorityName: z.string().optional()
12489
+ }).optional()
12490
+ });
12491
+ var LCNDomainOrOriginValidator = z.union([
12492
+ z.string().regex(
12493
+ /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
12494
+ {
12495
+ message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
12496
+ }
12497
+ ),
12498
+ z.string().regex(
12499
+ /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
12500
+ { message: "Must be a valid http(s) origin" }
12501
+ )
12502
+ ]);
12503
+ var LCNIntegrationValidator = z.object({
12504
+ id: z.string(),
12505
+ name: z.string(),
12506
+ description: z.string().optional(),
12507
+ publishableKey: z.string(),
12508
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
12509
+ });
12510
+ var LCNIntegrationCreateValidator = z.object({
12511
+ name: z.string(),
12512
+ description: z.string().optional(),
12513
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
12514
+ });
12515
+ var LCNIntegrationUpdateValidator = z.object({
12516
+ name: z.string().optional(),
12517
+ description: z.string().optional(),
12518
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).optional(),
12519
+ rotatePublishableKey: z.boolean().optional()
12520
+ });
12521
+ var LCNIntegrationQueryValidator = z.object({
12522
+ id: StringQuery,
12523
+ name: StringQuery,
12524
+ description: StringQuery
12525
+ }).partial();
12526
+ var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
12527
+ records: LCNIntegrationValidator.array()
12528
+ });
12400
12529
  var ClaimTokenValidator = z.object({
12401
12530
  token: z.string(),
12402
12531
  contactMethodId: z.string(),
@@ -12474,6 +12603,7 @@ var require_types_cjs_development = __commonJS2({
12474
12603
  ClaimHookQueryValidator: () => ClaimHookQueryValidator2,
12475
12604
  ClaimHookTypeValidator: () => ClaimHookTypeValidator2,
12476
12605
  ClaimHookValidator: () => ClaimHookValidator2,
12606
+ ClaimInboxCredentialValidator: () => ClaimInboxCredentialValidator2,
12477
12607
  ClaimTokenValidator: () => ClaimTokenValidator2,
12478
12608
  ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator2,
12479
12609
  ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator2,
@@ -12496,6 +12626,8 @@ var require_types_cjs_development = __commonJS2({
12496
12626
  ContactMethodVerificationValidator: () => ContactMethodVerificationValidator2,
12497
12627
  ContextValidator: () => ContextValidator2,
12498
12628
  ContractCredentialValidator: () => ContractCredentialValidator2,
12629
+ CreateContactMethodSessionResponseValidator: () => CreateContactMethodSessionResponseValidator2,
12630
+ CreateContactMethodSessionValidator: () => CreateContactMethodSessionValidator2,
12499
12631
  CredentialInfoValidator: () => CredentialInfoValidator2,
12500
12632
  CredentialRecordValidator: () => CredentialRecordValidator2,
12501
12633
  CredentialSchemaValidator: () => CredentialSchemaValidator2,
@@ -12529,8 +12661,13 @@ var require_types_cjs_development = __commonJS2({
12529
12661
  LCNBoostClaimLinkOptionsValidator: () => LCNBoostClaimLinkOptionsValidator2,
12530
12662
  LCNBoostClaimLinkSigningAuthorityValidator: () => LCNBoostClaimLinkSigningAuthorityValidator2,
12531
12663
  LCNBoostStatus: () => LCNBoostStatus2,
12664
+ LCNDomainOrOriginValidator: () => LCNDomainOrOriginValidator2,
12532
12665
  LCNInboxContactMethodValidator: () => LCNInboxContactMethodValidator2,
12533
12666
  LCNInboxStatusEnumValidator: () => LCNInboxStatusEnumValidator2,
12667
+ LCNIntegrationCreateValidator: () => LCNIntegrationCreateValidator2,
12668
+ LCNIntegrationQueryValidator: () => LCNIntegrationQueryValidator2,
12669
+ LCNIntegrationUpdateValidator: () => LCNIntegrationUpdateValidator2,
12670
+ LCNIntegrationValidator: () => LCNIntegrationValidator2,
12534
12671
  LCNNotificationDataValidator: () => LCNNotificationDataValidator2,
12535
12672
  LCNNotificationInboxValidator: () => LCNNotificationInboxValidator2,
12536
12673
  LCNNotificationMessageValidator: () => LCNNotificationMessageValidator2,
@@ -12557,6 +12694,7 @@ var require_types_cjs_development = __commonJS2({
12557
12694
  PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator2,
12558
12695
  PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator2,
12559
12696
  PaginatedInboxCredentialsValidator: () => PaginatedInboxCredentialsValidator2,
12697
+ PaginatedLCNIntegrationsValidator: () => PaginatedLCNIntegrationsValidator2,
12560
12698
  PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator2,
12561
12699
  PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator2,
12562
12700
  PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator2,
@@ -17465,7 +17603,13 @@ var require_types_cjs_development = __commonJS2({
17465
17603
  type: z2.string(),
17466
17604
  value: z2.string()
17467
17605
  });
17468
- var LCNInboxStatusEnumValidator2 = z2.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
17606
+ var LCNInboxStatusEnumValidator2 = z2.enum([
17607
+ "PENDING",
17608
+ "ISSUED",
17609
+ "EXPIRED",
17610
+ "DELIVERED",
17611
+ "CLAIMED"
17612
+ ]);
17469
17613
  var LCNNotificationInboxValidator2 = z2.object({
17470
17614
  issuanceId: z2.string(),
17471
17615
  status: LCNInboxStatusEnumValidator2,
@@ -17563,11 +17707,19 @@ var require_types_cjs_development = __commonJS2({
17563
17707
  var SetPrimaryContactMethodValidator2 = z2.object({
17564
17708
  contactMethodId: z2.string()
17565
17709
  });
17710
+ var CreateContactMethodSessionValidator2 = z2.object({
17711
+ contactMethod: ContactMethodVerificationRequestValidator2,
17712
+ otpChallenge: z2.string()
17713
+ });
17714
+ var CreateContactMethodSessionResponseValidator2 = z2.object({
17715
+ sessionJwt: z2.string()
17716
+ });
17566
17717
  var InboxCredentialValidator2 = z2.object({
17567
17718
  id: z2.string(),
17568
17719
  credential: z2.string(),
17569
17720
  isSigned: z2.boolean(),
17570
17721
  currentStatus: LCNInboxStatusEnumValidator2,
17722
+ isAccepted: z2.boolean().optional(),
17571
17723
  expiresAt: z2.string(),
17572
17724
  createdAt: z2.string(),
17573
17725
  issuerDid: z2.string(),
@@ -17586,6 +17738,7 @@ var require_types_cjs_development = __commonJS2({
17586
17738
  currentStatus: LCNInboxStatusEnumValidator2,
17587
17739
  id: z2.string(),
17588
17740
  isSigned: z2.boolean(),
17741
+ isAccepted: z2.boolean().optional(),
17589
17742
  issuerDid: z2.string()
17590
17743
  }).partial();
17591
17744
  var IssueInboxSigningAuthorityValidator2 = z2.object({
@@ -17627,6 +17780,51 @@ var require_types_cjs_development = __commonJS2({
17627
17780
  claimUrl: z2.string().url().optional(),
17628
17781
  recipientDid: z2.string().optional()
17629
17782
  });
17783
+ var ClaimInboxCredentialValidator2 = z2.object({
17784
+ credential: VCValidator2.passthrough().or(VPValidator2.passthrough()).or(UnsignedVCValidator2.passthrough()).describe("The credential to issue."),
17785
+ configuration: z2.object({
17786
+ publishableKey: z2.string(),
17787
+ signingAuthorityName: z2.string().optional()
17788
+ }).optional()
17789
+ });
17790
+ var LCNDomainOrOriginValidator2 = z2.union([
17791
+ z2.string().regex(
17792
+ /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
17793
+ {
17794
+ message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
17795
+ }
17796
+ ),
17797
+ z2.string().regex(
17798
+ /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
17799
+ { message: "Must be a valid http(s) origin" }
17800
+ )
17801
+ ]);
17802
+ var LCNIntegrationValidator2 = z2.object({
17803
+ id: z2.string(),
17804
+ name: z2.string(),
17805
+ description: z2.string().optional(),
17806
+ publishableKey: z2.string(),
17807
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).default([])
17808
+ });
17809
+ var LCNIntegrationCreateValidator2 = z2.object({
17810
+ name: z2.string(),
17811
+ description: z2.string().optional(),
17812
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).default([])
17813
+ });
17814
+ var LCNIntegrationUpdateValidator2 = z2.object({
17815
+ name: z2.string().optional(),
17816
+ description: z2.string().optional(),
17817
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).optional(),
17818
+ rotatePublishableKey: z2.boolean().optional()
17819
+ });
17820
+ var LCNIntegrationQueryValidator2 = z2.object({
17821
+ id: StringQuery2,
17822
+ name: StringQuery2,
17823
+ description: StringQuery2
17824
+ }).partial();
17825
+ var PaginatedLCNIntegrationsValidator2 = PaginationResponseValidator2.extend({
17826
+ records: LCNIntegrationValidator2.array()
17827
+ });
17630
17828
  var ClaimTokenValidator2 = z2.object({
17631
17829
  token: z2.string(),
17632
17830
  contactMethodId: z2.string(),
@@ -18498,6 +18696,10 @@ async function getLearnCardNetworkPlugin(learnCard, url, apiToken) {
18498
18696
  await ensureUser();
18499
18697
  return client.inbox.getInboxCredential.query({ credentialId: id });
18500
18698
  },
18699
+ finalizeInboxCredentials: async (_learnCard) => {
18700
+ await ensureUser();
18701
+ return client.inbox.finalize.mutate();
18702
+ },
18501
18703
  sendGuardianApprovalEmail: async (_learnCard, options) => {
18502
18704
  await ensureUser();
18503
18705
  return client.inbox.sendGuardianApprovalEmail.mutate(options);
@@ -18524,10 +18726,42 @@ async function getLearnCardNetworkPlugin(learnCard, url, apiToken) {
18524
18726
  await ensureUser();
18525
18727
  return client.contactMethods.verifyContactMethod.mutate({ token });
18526
18728
  },
18729
+ verifyContactMethodWithCredential: async (_learnCard, proofOfLoginJwt) => {
18730
+ await ensureUser();
18731
+ return client.contactMethods.verifyWithCredential.mutate({ proofOfLoginJwt });
18732
+ },
18527
18733
  removeContactMethod: async (_learnCard, id) => {
18528
18734
  await ensureUser();
18529
18735
  return client.contactMethods.removeContactMethod.mutate({ id });
18530
18736
  },
18737
+ addIntegration: async (_learnCard, integration) => {
18738
+ await ensureUser();
18739
+ return client.integrations.addIntegration.mutate(integration);
18740
+ },
18741
+ getIntegration: async (_learnCard, id) => {
18742
+ await ensureUser();
18743
+ return client.integrations.getIntegration.query({ id });
18744
+ },
18745
+ getIntegrations: async (_learnCard, options = {}) => {
18746
+ await ensureUser();
18747
+ return client.integrations.getIntegrations.query(options);
18748
+ },
18749
+ countIntegrations: async (_learnCard, options = {}) => {
18750
+ await ensureUser();
18751
+ return client.integrations.countIntegrations.query(options);
18752
+ },
18753
+ updateIntegration: async (_learnCard, id, updates) => {
18754
+ await ensureUser();
18755
+ return client.integrations.updateIntegration.mutate({ id, updates });
18756
+ },
18757
+ deleteIntegration: async (_learnCard, id) => {
18758
+ await ensureUser();
18759
+ return client.integrations.deleteIntegration.mutate({ id });
18760
+ },
18761
+ associateIntegrationWithSigningAuthority: async (_learnCard, integrationId, endpoint, name, did2, isPrimary) => {
18762
+ await ensureUser();
18763
+ return client.integrations.associateIntegrationWithSigningAuthority.mutate({ integrationId, endpoint, name, did: did2, isPrimary });
18764
+ },
18531
18765
  resolveFromLCN: async (_learnCard, uri) => {
18532
18766
  const result = await client.storage.resolve.query({ uri });
18533
18767
  return UnsignedVCValidator.or(VCValidator).or(VPValidator).or(JWEValidator).or(ConsentFlowContractValidator).or(ConsentFlowTermsValidator).parseAsync(result);