@learncard/network-plugin 2.6.5 → 2.6.8

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.
@@ -2070,6 +2070,7 @@ var require_helpers_cjs_development = __commonJS({
2070
2070
  ClaimHookQueryValidator: () => ClaimHookQueryValidator2,
2071
2071
  ClaimHookTypeValidator: () => ClaimHookTypeValidator2,
2072
2072
  ClaimHookValidator: () => ClaimHookValidator2,
2073
+ ClaimInboxCredentialValidator: () => ClaimInboxCredentialValidator2,
2073
2074
  ClaimTokenValidator: () => ClaimTokenValidator2,
2074
2075
  ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator2,
2075
2076
  ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator2,
@@ -2092,6 +2093,8 @@ var require_helpers_cjs_development = __commonJS({
2092
2093
  ContactMethodVerificationValidator: () => ContactMethodVerificationValidator2,
2093
2094
  ContextValidator: () => ContextValidator2,
2094
2095
  ContractCredentialValidator: () => ContractCredentialValidator2,
2096
+ CreateContactMethodSessionResponseValidator: () => CreateContactMethodSessionResponseValidator2,
2097
+ CreateContactMethodSessionValidator: () => CreateContactMethodSessionValidator2,
2095
2098
  CredentialInfoValidator: () => CredentialInfoValidator2,
2096
2099
  CredentialRecordValidator: () => CredentialRecordValidator2,
2097
2100
  CredentialSchemaValidator: () => CredentialSchemaValidator2,
@@ -2125,8 +2128,13 @@ var require_helpers_cjs_development = __commonJS({
2125
2128
  LCNBoostClaimLinkOptionsValidator: () => LCNBoostClaimLinkOptionsValidator2,
2126
2129
  LCNBoostClaimLinkSigningAuthorityValidator: () => LCNBoostClaimLinkSigningAuthorityValidator2,
2127
2130
  LCNBoostStatus: () => LCNBoostStatus2,
2131
+ LCNDomainOrOriginValidator: () => LCNDomainOrOriginValidator2,
2128
2132
  LCNInboxContactMethodValidator: () => LCNInboxContactMethodValidator2,
2129
2133
  LCNInboxStatusEnumValidator: () => LCNInboxStatusEnumValidator2,
2134
+ LCNIntegrationCreateValidator: () => LCNIntegrationCreateValidator2,
2135
+ LCNIntegrationQueryValidator: () => LCNIntegrationQueryValidator2,
2136
+ LCNIntegrationUpdateValidator: () => LCNIntegrationUpdateValidator2,
2137
+ LCNIntegrationValidator: () => LCNIntegrationValidator2,
2130
2138
  LCNNotificationDataValidator: () => LCNNotificationDataValidator2,
2131
2139
  LCNNotificationInboxValidator: () => LCNNotificationInboxValidator2,
2132
2140
  LCNNotificationMessageValidator: () => LCNNotificationMessageValidator2,
@@ -2153,6 +2161,7 @@ var require_helpers_cjs_development = __commonJS({
2153
2161
  PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator2,
2154
2162
  PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator2,
2155
2163
  PaginatedInboxCredentialsValidator: () => PaginatedInboxCredentialsValidator2,
2164
+ PaginatedLCNIntegrationsValidator: () => PaginatedLCNIntegrationsValidator2,
2156
2165
  PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator2,
2157
2166
  PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator2,
2158
2167
  PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator2,
@@ -7084,7 +7093,13 @@ var require_helpers_cjs_development = __commonJS({
7084
7093
  type: z2.string(),
7085
7094
  value: z2.string()
7086
7095
  });
7087
- var LCNInboxStatusEnumValidator2 = z2.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
7096
+ var LCNInboxStatusEnumValidator2 = z2.enum([
7097
+ "PENDING",
7098
+ "ISSUED",
7099
+ "EXPIRED",
7100
+ "DELIVERED",
7101
+ "CLAIMED"
7102
+ ]);
7088
7103
  var LCNNotificationInboxValidator2 = z2.object({
7089
7104
  issuanceId: z2.string(),
7090
7105
  status: LCNInboxStatusEnumValidator2,
@@ -7182,11 +7197,19 @@ var require_helpers_cjs_development = __commonJS({
7182
7197
  var SetPrimaryContactMethodValidator2 = z2.object({
7183
7198
  contactMethodId: z2.string()
7184
7199
  });
7200
+ var CreateContactMethodSessionValidator2 = z2.object({
7201
+ contactMethod: ContactMethodVerificationRequestValidator2,
7202
+ otpChallenge: z2.string()
7203
+ });
7204
+ var CreateContactMethodSessionResponseValidator2 = z2.object({
7205
+ sessionJwt: z2.string()
7206
+ });
7185
7207
  var InboxCredentialValidator2 = z2.object({
7186
7208
  id: z2.string(),
7187
7209
  credential: z2.string(),
7188
7210
  isSigned: z2.boolean(),
7189
7211
  currentStatus: LCNInboxStatusEnumValidator2,
7212
+ isAccepted: z2.boolean().optional(),
7190
7213
  expiresAt: z2.string(),
7191
7214
  createdAt: z2.string(),
7192
7215
  issuerDid: z2.string(),
@@ -7205,6 +7228,7 @@ var require_helpers_cjs_development = __commonJS({
7205
7228
  currentStatus: LCNInboxStatusEnumValidator2,
7206
7229
  id: z2.string(),
7207
7230
  isSigned: z2.boolean(),
7231
+ isAccepted: z2.boolean().optional(),
7208
7232
  issuerDid: z2.string()
7209
7233
  }).partial();
7210
7234
  var IssueInboxSigningAuthorityValidator2 = z2.object({
@@ -7246,6 +7270,51 @@ var require_helpers_cjs_development = __commonJS({
7246
7270
  claimUrl: z2.string().url().optional(),
7247
7271
  recipientDid: z2.string().optional()
7248
7272
  });
7273
+ var ClaimInboxCredentialValidator2 = z2.object({
7274
+ credential: VCValidator2.passthrough().or(VPValidator2.passthrough()).or(UnsignedVCValidator2.passthrough()).describe("The credential to issue."),
7275
+ configuration: z2.object({
7276
+ publishableKey: z2.string(),
7277
+ signingAuthorityName: z2.string().optional()
7278
+ }).optional()
7279
+ });
7280
+ var LCNDomainOrOriginValidator2 = z2.union([
7281
+ z2.string().regex(
7282
+ /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
7283
+ {
7284
+ message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
7285
+ }
7286
+ ),
7287
+ z2.string().regex(
7288
+ /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
7289
+ { message: "Must be a valid http(s) origin" }
7290
+ )
7291
+ ]);
7292
+ var LCNIntegrationValidator2 = z2.object({
7293
+ id: z2.string(),
7294
+ name: z2.string(),
7295
+ description: z2.string().optional(),
7296
+ publishableKey: z2.string(),
7297
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).default([])
7298
+ });
7299
+ var LCNIntegrationCreateValidator2 = z2.object({
7300
+ name: z2.string(),
7301
+ description: z2.string().optional(),
7302
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).default([])
7303
+ });
7304
+ var LCNIntegrationUpdateValidator2 = z2.object({
7305
+ name: z2.string().optional(),
7306
+ description: z2.string().optional(),
7307
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).optional(),
7308
+ rotatePublishableKey: z2.boolean().optional()
7309
+ });
7310
+ var LCNIntegrationQueryValidator2 = z2.object({
7311
+ id: StringQuery2,
7312
+ name: StringQuery2,
7313
+ description: StringQuery2
7314
+ }).partial();
7315
+ var PaginatedLCNIntegrationsValidator2 = PaginationResponseValidator2.extend({
7316
+ records: LCNIntegrationValidator2.array()
7317
+ });
7249
7318
  var ClaimTokenValidator2 = z2.object({
7250
7319
  token: z2.string(),
7251
7320
  contactMethodId: z2.string(),
@@ -12260,7 +12329,13 @@ var LCNInboxContactMethodValidator = z.object({
12260
12329
  type: z.string(),
12261
12330
  value: z.string()
12262
12331
  });
12263
- var LCNInboxStatusEnumValidator = z.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
12332
+ var LCNInboxStatusEnumValidator = z.enum([
12333
+ "PENDING",
12334
+ "ISSUED",
12335
+ "EXPIRED",
12336
+ "DELIVERED",
12337
+ "CLAIMED"
12338
+ ]);
12264
12339
  var LCNNotificationInboxValidator = z.object({
12265
12340
  issuanceId: z.string(),
12266
12341
  status: LCNInboxStatusEnumValidator,
@@ -12358,11 +12433,19 @@ var ContactMethodVerificationValidator = z.object({
12358
12433
  var SetPrimaryContactMethodValidator = z.object({
12359
12434
  contactMethodId: z.string()
12360
12435
  });
12436
+ var CreateContactMethodSessionValidator = z.object({
12437
+ contactMethod: ContactMethodVerificationRequestValidator,
12438
+ otpChallenge: z.string()
12439
+ });
12440
+ var CreateContactMethodSessionResponseValidator = z.object({
12441
+ sessionJwt: z.string()
12442
+ });
12361
12443
  var InboxCredentialValidator = z.object({
12362
12444
  id: z.string(),
12363
12445
  credential: z.string(),
12364
12446
  isSigned: z.boolean(),
12365
12447
  currentStatus: LCNInboxStatusEnumValidator,
12448
+ isAccepted: z.boolean().optional(),
12366
12449
  expiresAt: z.string(),
12367
12450
  createdAt: z.string(),
12368
12451
  issuerDid: z.string(),
@@ -12381,6 +12464,7 @@ var InboxCredentialQueryValidator = z.object({
12381
12464
  currentStatus: LCNInboxStatusEnumValidator,
12382
12465
  id: z.string(),
12383
12466
  isSigned: z.boolean(),
12467
+ isAccepted: z.boolean().optional(),
12384
12468
  issuerDid: z.string()
12385
12469
  }).partial();
12386
12470
  var IssueInboxSigningAuthorityValidator = z.object({
@@ -12422,6 +12506,51 @@ var IssueInboxCredentialResponseValidator = z.object({
12422
12506
  claimUrl: z.string().url().optional(),
12423
12507
  recipientDid: z.string().optional()
12424
12508
  });
12509
+ var ClaimInboxCredentialValidator = z.object({
12510
+ credential: VCValidator.passthrough().or(VPValidator.passthrough()).or(UnsignedVCValidator.passthrough()).describe("The credential to issue."),
12511
+ configuration: z.object({
12512
+ publishableKey: z.string(),
12513
+ signingAuthorityName: z.string().optional()
12514
+ }).optional()
12515
+ });
12516
+ var LCNDomainOrOriginValidator = z.union([
12517
+ z.string().regex(
12518
+ /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
12519
+ {
12520
+ message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
12521
+ }
12522
+ ),
12523
+ z.string().regex(
12524
+ /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
12525
+ { message: "Must be a valid http(s) origin" }
12526
+ )
12527
+ ]);
12528
+ var LCNIntegrationValidator = z.object({
12529
+ id: z.string(),
12530
+ name: z.string(),
12531
+ description: z.string().optional(),
12532
+ publishableKey: z.string(),
12533
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
12534
+ });
12535
+ var LCNIntegrationCreateValidator = z.object({
12536
+ name: z.string(),
12537
+ description: z.string().optional(),
12538
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).default([])
12539
+ });
12540
+ var LCNIntegrationUpdateValidator = z.object({
12541
+ name: z.string().optional(),
12542
+ description: z.string().optional(),
12543
+ whitelistedDomains: z.array(LCNDomainOrOriginValidator).optional(),
12544
+ rotatePublishableKey: z.boolean().optional()
12545
+ });
12546
+ var LCNIntegrationQueryValidator = z.object({
12547
+ id: StringQuery,
12548
+ name: StringQuery,
12549
+ description: StringQuery
12550
+ }).partial();
12551
+ var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
12552
+ records: LCNIntegrationValidator.array()
12553
+ });
12425
12554
  var ClaimTokenValidator = z.object({
12426
12555
  token: z.string(),
12427
12556
  contactMethodId: z.string(),
@@ -12499,6 +12628,7 @@ var require_types_cjs_development = __commonJS2({
12499
12628
  ClaimHookQueryValidator: () => ClaimHookQueryValidator2,
12500
12629
  ClaimHookTypeValidator: () => ClaimHookTypeValidator2,
12501
12630
  ClaimHookValidator: () => ClaimHookValidator2,
12631
+ ClaimInboxCredentialValidator: () => ClaimInboxCredentialValidator2,
12502
12632
  ClaimTokenValidator: () => ClaimTokenValidator2,
12503
12633
  ConsentFlowContractDataForDidValidator: () => ConsentFlowContractDataForDidValidator2,
12504
12634
  ConsentFlowContractDataValidator: () => ConsentFlowContractDataValidator2,
@@ -12521,6 +12651,8 @@ var require_types_cjs_development = __commonJS2({
12521
12651
  ContactMethodVerificationValidator: () => ContactMethodVerificationValidator2,
12522
12652
  ContextValidator: () => ContextValidator2,
12523
12653
  ContractCredentialValidator: () => ContractCredentialValidator2,
12654
+ CreateContactMethodSessionResponseValidator: () => CreateContactMethodSessionResponseValidator2,
12655
+ CreateContactMethodSessionValidator: () => CreateContactMethodSessionValidator2,
12524
12656
  CredentialInfoValidator: () => CredentialInfoValidator2,
12525
12657
  CredentialRecordValidator: () => CredentialRecordValidator2,
12526
12658
  CredentialSchemaValidator: () => CredentialSchemaValidator2,
@@ -12554,8 +12686,13 @@ var require_types_cjs_development = __commonJS2({
12554
12686
  LCNBoostClaimLinkOptionsValidator: () => LCNBoostClaimLinkOptionsValidator2,
12555
12687
  LCNBoostClaimLinkSigningAuthorityValidator: () => LCNBoostClaimLinkSigningAuthorityValidator2,
12556
12688
  LCNBoostStatus: () => LCNBoostStatus2,
12689
+ LCNDomainOrOriginValidator: () => LCNDomainOrOriginValidator2,
12557
12690
  LCNInboxContactMethodValidator: () => LCNInboxContactMethodValidator2,
12558
12691
  LCNInboxStatusEnumValidator: () => LCNInboxStatusEnumValidator2,
12692
+ LCNIntegrationCreateValidator: () => LCNIntegrationCreateValidator2,
12693
+ LCNIntegrationQueryValidator: () => LCNIntegrationQueryValidator2,
12694
+ LCNIntegrationUpdateValidator: () => LCNIntegrationUpdateValidator2,
12695
+ LCNIntegrationValidator: () => LCNIntegrationValidator2,
12559
12696
  LCNNotificationDataValidator: () => LCNNotificationDataValidator2,
12560
12697
  LCNNotificationInboxValidator: () => LCNNotificationInboxValidator2,
12561
12698
  LCNNotificationMessageValidator: () => LCNNotificationMessageValidator2,
@@ -12582,6 +12719,7 @@ var require_types_cjs_development = __commonJS2({
12582
12719
  PaginatedEncryptedCredentialRecordsValidator: () => PaginatedEncryptedCredentialRecordsValidator2,
12583
12720
  PaginatedEncryptedRecordsValidator: () => PaginatedEncryptedRecordsValidator2,
12584
12721
  PaginatedInboxCredentialsValidator: () => PaginatedInboxCredentialsValidator2,
12722
+ PaginatedLCNIntegrationsValidator: () => PaginatedLCNIntegrationsValidator2,
12585
12723
  PaginatedLCNProfileManagersValidator: () => PaginatedLCNProfileManagersValidator2,
12586
12724
  PaginatedLCNProfilesAndManagersValidator: () => PaginatedLCNProfilesAndManagersValidator2,
12587
12725
  PaginatedLCNProfilesValidator: () => PaginatedLCNProfilesValidator2,
@@ -17490,7 +17628,13 @@ var require_types_cjs_development = __commonJS2({
17490
17628
  type: z2.string(),
17491
17629
  value: z2.string()
17492
17630
  });
17493
- var LCNInboxStatusEnumValidator2 = z2.enum(["PENDING", "DELIVERED", "CLAIMED", "EXPIRED"]);
17631
+ var LCNInboxStatusEnumValidator2 = z2.enum([
17632
+ "PENDING",
17633
+ "ISSUED",
17634
+ "EXPIRED",
17635
+ "DELIVERED",
17636
+ "CLAIMED"
17637
+ ]);
17494
17638
  var LCNNotificationInboxValidator2 = z2.object({
17495
17639
  issuanceId: z2.string(),
17496
17640
  status: LCNInboxStatusEnumValidator2,
@@ -17588,11 +17732,19 @@ var require_types_cjs_development = __commonJS2({
17588
17732
  var SetPrimaryContactMethodValidator2 = z2.object({
17589
17733
  contactMethodId: z2.string()
17590
17734
  });
17735
+ var CreateContactMethodSessionValidator2 = z2.object({
17736
+ contactMethod: ContactMethodVerificationRequestValidator2,
17737
+ otpChallenge: z2.string()
17738
+ });
17739
+ var CreateContactMethodSessionResponseValidator2 = z2.object({
17740
+ sessionJwt: z2.string()
17741
+ });
17591
17742
  var InboxCredentialValidator2 = z2.object({
17592
17743
  id: z2.string(),
17593
17744
  credential: z2.string(),
17594
17745
  isSigned: z2.boolean(),
17595
17746
  currentStatus: LCNInboxStatusEnumValidator2,
17747
+ isAccepted: z2.boolean().optional(),
17596
17748
  expiresAt: z2.string(),
17597
17749
  createdAt: z2.string(),
17598
17750
  issuerDid: z2.string(),
@@ -17611,6 +17763,7 @@ var require_types_cjs_development = __commonJS2({
17611
17763
  currentStatus: LCNInboxStatusEnumValidator2,
17612
17764
  id: z2.string(),
17613
17765
  isSigned: z2.boolean(),
17766
+ isAccepted: z2.boolean().optional(),
17614
17767
  issuerDid: z2.string()
17615
17768
  }).partial();
17616
17769
  var IssueInboxSigningAuthorityValidator2 = z2.object({
@@ -17652,6 +17805,51 @@ var require_types_cjs_development = __commonJS2({
17652
17805
  claimUrl: z2.string().url().optional(),
17653
17806
  recipientDid: z2.string().optional()
17654
17807
  });
17808
+ var ClaimInboxCredentialValidator2 = z2.object({
17809
+ credential: VCValidator2.passthrough().or(VPValidator2.passthrough()).or(UnsignedVCValidator2.passthrough()).describe("The credential to issue."),
17810
+ configuration: z2.object({
17811
+ publishableKey: z2.string(),
17812
+ signingAuthorityName: z2.string().optional()
17813
+ }).optional()
17814
+ });
17815
+ var LCNDomainOrOriginValidator2 = z2.union([
17816
+ z2.string().regex(
17817
+ /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
17818
+ {
17819
+ message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
17820
+ }
17821
+ ),
17822
+ z2.string().regex(
17823
+ /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
17824
+ { message: "Must be a valid http(s) origin" }
17825
+ )
17826
+ ]);
17827
+ var LCNIntegrationValidator2 = z2.object({
17828
+ id: z2.string(),
17829
+ name: z2.string(),
17830
+ description: z2.string().optional(),
17831
+ publishableKey: z2.string(),
17832
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).default([])
17833
+ });
17834
+ var LCNIntegrationCreateValidator2 = z2.object({
17835
+ name: z2.string(),
17836
+ description: z2.string().optional(),
17837
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).default([])
17838
+ });
17839
+ var LCNIntegrationUpdateValidator2 = z2.object({
17840
+ name: z2.string().optional(),
17841
+ description: z2.string().optional(),
17842
+ whitelistedDomains: z2.array(LCNDomainOrOriginValidator2).optional(),
17843
+ rotatePublishableKey: z2.boolean().optional()
17844
+ });
17845
+ var LCNIntegrationQueryValidator2 = z2.object({
17846
+ id: StringQuery2,
17847
+ name: StringQuery2,
17848
+ description: StringQuery2
17849
+ }).partial();
17850
+ var PaginatedLCNIntegrationsValidator2 = PaginationResponseValidator2.extend({
17851
+ records: LCNIntegrationValidator2.array()
17852
+ });
17655
17853
  var ClaimTokenValidator2 = z2.object({
17656
17854
  token: z2.string(),
17657
17855
  contactMethodId: z2.string(),
@@ -18523,6 +18721,10 @@ async function getLearnCardNetworkPlugin(learnCard, url, apiToken) {
18523
18721
  await ensureUser();
18524
18722
  return client.inbox.getInboxCredential.query({ credentialId: id });
18525
18723
  },
18724
+ finalizeInboxCredentials: async (_learnCard) => {
18725
+ await ensureUser();
18726
+ return client.inbox.finalize.mutate();
18727
+ },
18526
18728
  sendGuardianApprovalEmail: async (_learnCard, options) => {
18527
18729
  await ensureUser();
18528
18730
  return client.inbox.sendGuardianApprovalEmail.mutate(options);
@@ -18549,10 +18751,42 @@ async function getLearnCardNetworkPlugin(learnCard, url, apiToken) {
18549
18751
  await ensureUser();
18550
18752
  return client.contactMethods.verifyContactMethod.mutate({ token });
18551
18753
  },
18754
+ verifyContactMethodWithCredential: async (_learnCard, proofOfLoginJwt) => {
18755
+ await ensureUser();
18756
+ return client.contactMethods.verifyWithCredential.mutate({ proofOfLoginJwt });
18757
+ },
18552
18758
  removeContactMethod: async (_learnCard, id) => {
18553
18759
  await ensureUser();
18554
18760
  return client.contactMethods.removeContactMethod.mutate({ id });
18555
18761
  },
18762
+ addIntegration: async (_learnCard, integration) => {
18763
+ await ensureUser();
18764
+ return client.integrations.addIntegration.mutate(integration);
18765
+ },
18766
+ getIntegration: async (_learnCard, id) => {
18767
+ await ensureUser();
18768
+ return client.integrations.getIntegration.query({ id });
18769
+ },
18770
+ getIntegrations: async (_learnCard, options = {}) => {
18771
+ await ensureUser();
18772
+ return client.integrations.getIntegrations.query(options);
18773
+ },
18774
+ countIntegrations: async (_learnCard, options = {}) => {
18775
+ await ensureUser();
18776
+ return client.integrations.countIntegrations.query(options);
18777
+ },
18778
+ updateIntegration: async (_learnCard, id, updates) => {
18779
+ await ensureUser();
18780
+ return client.integrations.updateIntegration.mutate({ id, updates });
18781
+ },
18782
+ deleteIntegration: async (_learnCard, id) => {
18783
+ await ensureUser();
18784
+ return client.integrations.deleteIntegration.mutate({ id });
18785
+ },
18786
+ associateIntegrationWithSigningAuthority: async (_learnCard, integrationId, endpoint, name, did2, isPrimary) => {
18787
+ await ensureUser();
18788
+ return client.integrations.associateIntegrationWithSigningAuthority.mutate({ integrationId, endpoint, name, did: did2, isPrimary });
18789
+ },
18556
18790
  resolveFromLCN: async (_learnCard, uri) => {
18557
18791
  const result = await client.storage.resolve.query({ uri });
18558
18792
  return UnsignedVCValidator.or(VCValidator).or(VPValidator).or(JWEValidator).or(ConsentFlowContractValidator).or(ConsentFlowTermsValidator).parseAsync(result);