@learncard/lca-api-plugin 1.1.16 → 1.2.2

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/types.d.ts CHANGED
@@ -122,6 +122,8 @@ export declare const NotificationQueryFiltersValidator: z.ZodObject<{
122
122
  APP_LISTING_SUBMITTED: "APP_LISTING_SUBMITTED";
123
123
  APP_LISTING_APPROVED: "APP_LISTING_APPROVED";
124
124
  APP_LISTING_REJECTED: "APP_LISTING_REJECTED";
125
+ APP_LISTING_WITHDRAWN: "APP_LISTING_WITHDRAWN";
126
+ DEVICE_LINK_REQUEST: "DEVICE_LINK_REQUEST";
125
127
  }>>;
126
128
  }, z.core.$strip>;
127
129
  /** @group LCA API Plugin */
@@ -164,6 +166,8 @@ export declare const NotificationValidator: z.ZodObject<{
164
166
  APP_LISTING_SUBMITTED: "APP_LISTING_SUBMITTED";
165
167
  APP_LISTING_APPROVED: "APP_LISTING_APPROVED";
166
168
  APP_LISTING_REJECTED: "APP_LISTING_REJECTED";
169
+ APP_LISTING_WITHDRAWN: "APP_LISTING_WITHDRAWN";
170
+ DEVICE_LINK_REQUEST: "DEVICE_LINK_REQUEST";
167
171
  }>;
168
172
  to: z.ZodIntersection<z.ZodObject<{
169
173
  profileId: z.ZodOptional<z.ZodString>;
@@ -334,6 +338,8 @@ export declare const PaginatedNotificationsValidator: z.ZodObject<{
334
338
  APP_LISTING_SUBMITTED: "APP_LISTING_SUBMITTED";
335
339
  APP_LISTING_APPROVED: "APP_LISTING_APPROVED";
336
340
  APP_LISTING_REJECTED: "APP_LISTING_REJECTED";
341
+ APP_LISTING_WITHDRAWN: "APP_LISTING_WITHDRAWN";
342
+ DEVICE_LINK_REQUEST: "DEVICE_LINK_REQUEST";
337
343
  }>;
338
344
  to: z.ZodIntersection<z.ZodObject<{
339
345
  profileId: z.ZodOptional<z.ZodString>;
@@ -502,6 +508,8 @@ export declare const NotificationQueryInputValidator: z.ZodObject<{
502
508
  APP_LISTING_SUBMITTED: "APP_LISTING_SUBMITTED";
503
509
  APP_LISTING_APPROVED: "APP_LISTING_APPROVED";
504
510
  APP_LISTING_REJECTED: "APP_LISTING_REJECTED";
511
+ APP_LISTING_WITHDRAWN: "APP_LISTING_WITHDRAWN";
512
+ DEVICE_LINK_REQUEST: "DEVICE_LINK_REQUEST";
505
513
  }>>;
506
514
  'from.did': z.ZodOptional<z.ZodString>;
507
515
  'from.profileId': z.ZodOptional<z.ZodString>;
@@ -518,6 +526,87 @@ export declare const NotificationQueryInputValidator: z.ZodObject<{
518
526
  /** @group LCA API Plugin */
519
527
  export type NotificationQueryInputType = z.infer<typeof NotificationQueryInputValidator>;
520
528
  /** END Synced Types**/
529
+ /** @group LCA API Plugin - SSS Key Management */
530
+ export declare const AuthProviderTypeValidator: z.ZodEnum<{
531
+ firebase: "firebase";
532
+ supertokens: "supertokens";
533
+ keycloak: "keycloak";
534
+ oidc: "oidc";
535
+ }>;
536
+ export type AuthProviderType = z.infer<typeof AuthProviderTypeValidator>;
537
+ export declare const ServerEncryptedShareValidator: z.ZodObject<{
538
+ encryptedData: z.ZodString;
539
+ encryptedDek: z.ZodString;
540
+ iv: z.ZodString;
541
+ }, z.core.$strip>;
542
+ export type ServerEncryptedShare = z.infer<typeof ServerEncryptedShareValidator>;
543
+ export declare const EncryptedShareValidator: z.ZodObject<{
544
+ encryptedData: z.ZodString;
545
+ iv: z.ZodString;
546
+ salt: z.ZodOptional<z.ZodString>;
547
+ }, z.core.$strip>;
548
+ export type EncryptedShare = z.infer<typeof EncryptedShareValidator>;
549
+ export declare const RecoveryMethodTypeValidator: z.ZodEnum<{
550
+ email: "email";
551
+ passkey: "passkey";
552
+ backup: "backup";
553
+ phrase: "phrase";
554
+ }>;
555
+ export type RecoveryMethodType = z.infer<typeof RecoveryMethodTypeValidator>;
556
+ export declare const SecurityLevelValidator: z.ZodEnum<{
557
+ basic: "basic";
558
+ enhanced: "enhanced";
559
+ advanced: "advanced";
560
+ }>;
561
+ export type SecurityLevel = z.infer<typeof SecurityLevelValidator>;
562
+ export declare const KeyProviderValidator: z.ZodEnum<{
563
+ web3auth: "web3auth";
564
+ sss: "sss";
565
+ }>;
566
+ export type KeyProvider = z.infer<typeof KeyProviderValidator>;
567
+ export declare const RecoveryMethodInfoValidator: z.ZodObject<{
568
+ type: z.ZodEnum<{
569
+ email: "email";
570
+ passkey: "passkey";
571
+ backup: "backup";
572
+ phrase: "phrase";
573
+ }>;
574
+ createdAt: z.ZodString;
575
+ credentialId: z.ZodOptional<z.ZodString>;
576
+ shareVersion: z.ZodOptional<z.ZodNumber>;
577
+ }, z.core.$strip>;
578
+ export type RecoveryMethodInfo = z.infer<typeof RecoveryMethodInfoValidator>;
579
+ export declare const GetAuthShareResponseValidator: z.ZodNullable<z.ZodObject<{
580
+ authShare: z.ZodNullable<z.ZodObject<{
581
+ encryptedData: z.ZodString;
582
+ encryptedDek: z.ZodString;
583
+ iv: z.ZodString;
584
+ }, z.core.$strip>>;
585
+ primaryDid: z.ZodNullable<z.ZodString>;
586
+ securityLevel: z.ZodEnum<{
587
+ basic: "basic";
588
+ enhanced: "enhanced";
589
+ advanced: "advanced";
590
+ }>;
591
+ recoveryMethods: z.ZodArray<z.ZodObject<{
592
+ type: z.ZodEnum<{
593
+ email: "email";
594
+ passkey: "passkey";
595
+ backup: "backup";
596
+ phrase: "phrase";
597
+ }>;
598
+ createdAt: z.ZodString;
599
+ credentialId: z.ZodOptional<z.ZodString>;
600
+ shareVersion: z.ZodOptional<z.ZodNumber>;
601
+ }, z.core.$strip>>;
602
+ keyProvider: z.ZodEnum<{
603
+ web3auth: "web3auth";
604
+ sss: "sss";
605
+ }>;
606
+ shareVersion: z.ZodNumber;
607
+ maskedRecoveryEmail: z.ZodNullable<z.ZodString>;
608
+ }, z.core.$strip>>;
609
+ export type GetAuthShareResponse = z.infer<typeof GetAuthShareResponseValidator>;
521
610
  /** @group LCA API Plugin */
522
611
  export type LCAPluginDependentMethods = {
523
612
  getDidAuthVp: (options?: ProofOptions) => Promise<VP | string>;
@@ -610,6 +699,23 @@ export type LCAPluginMethods = {
610
699
  }, credential: {
611
700
  name: string;
612
701
  }, message: string) => Promise<boolean>;
702
+ getAuthShare: (authToken: string, providerType: AuthProviderType) => Promise<GetAuthShareResponse>;
703
+ storeAuthShare: (authToken: string, providerType: AuthProviderType, authShare: ServerEncryptedShare, primaryDid: string, securityLevel?: SecurityLevel) => Promise<{
704
+ success: boolean;
705
+ }>;
706
+ addRecoveryMethod: (authToken: string, providerType: AuthProviderType, type: RecoveryMethodType, encryptedShare?: EncryptedShare, credentialId?: string) => Promise<{
707
+ success: boolean;
708
+ }>;
709
+ getRecoveryShare: (authToken: string, providerType: AuthProviderType, type: RecoveryMethodType, credentialId?: string) => Promise<{
710
+ encryptedShare?: EncryptedShare;
711
+ shareVersion?: number;
712
+ } | null>;
713
+ markMigrated: (authToken: string, providerType: AuthProviderType) => Promise<{
714
+ success: boolean;
715
+ }>;
716
+ deleteUserKey: (authToken: string, providerType: AuthProviderType) => Promise<{
717
+ success: boolean;
718
+ }>;
613
719
  };
614
720
  /** @group LearnCardNetwork Plugin */
615
721
  export type LCAPlugin = Plugin<'LearnCard App', never, LCAPluginMethods, 'id', LCAPluginDependentMethods>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@learncard/lca-api-plugin",
3
- "version": "1.1.16",
3
+ "version": "1.2.2",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/lca-api-plugin.esm.js",
@@ -35,11 +35,11 @@
35
35
  "isomorphic-fetch": "^3.0.0",
36
36
  "isomorphic-webcrypto": "^2.3.8",
37
37
  "pbkdf2-hmac": "^1.2.1",
38
- "@learncard/core": "9.4.8",
39
- "@learncard/init": "2.3.6",
40
- "@learncard/didkit-plugin": "1.7.4",
41
- "@learncard/types": "5.12.2",
42
- "@learncard/lca-api-client": "1.1.13"
38
+ "@learncard/core": "9.4.12",
39
+ "@learncard/init": "2.3.10",
40
+ "@learncard/types": "5.13.2",
41
+ "@learncard/lca-api-client": "1.2.0",
42
+ "@learncard/didkit-plugin": "1.8.2"
43
43
  },
44
44
  "sideEffects": false,
45
45
  "scripts": {