@vunexa/lixa 0.1.6-alpha.13 → 0.1.6-alpha.15

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/lixa.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { type LixaConfig, type ProviderConfig, type SignUpParams, type SignUpResult, type SignInParams, type SignInResult, type VerifyCredentialsParams, type ChangePasswordParams, type UserCredentials } from "./types";
1
+ import { type LixaConfig, type ProviderConfig, type SignUpParams, type SignUpResult, type SignInParams, type SignInResult, type VerifyCredentialsParams, type ChangePasswordParams, type UserIdentity, type ForgotPasswordParams, type ForgotPasswordResult, type ConfirmPasswordResetParams, type ConfirmSignUpParams, type ResendConfirmationCodeParams, type ResendConfirmationCodeResult, type IIdentityProvider, type IdentityConfig, type SessionCookieResolver, type ConfiguredIdentityKey, type ConfiguredOAuthKey } from "./types";
2
2
  import { IProvider } from "./providers";
3
- import { type Session, type ConnectedResource } from "./models/session";
3
+ import { type Session, type ConnectedResource, type LinkedAccount } from "./models/session";
4
4
  import { CredentialsManager } from "./credentials/credentials-manager";
5
5
  /**
6
6
  * Type representing the keys of configured providers
7
7
  */
8
- type ConfiguredProviderKey<T extends LixaConfig<Record<string, ProviderConfig>>> = keyof T['providers'];
8
+ export type ConfiguredProviderKey<TProviders extends Record<string, ProviderConfig>> = keyof TProviders & string;
9
9
  /**
10
10
  * A flexible, provider-agnostic OAuth 2.0 and OpenID Connect (OIDC) client library.
11
11
  *
@@ -58,20 +58,25 @@ type ConfiguredProviderKey<T extends LixaConfig<Record<string, ProviderConfig>>>
58
58
  *
59
59
  * @public
60
60
  */
61
- declare class Lixa<TConfig extends LixaConfig<Record<string, ProviderConfig>> = LixaConfig> {
61
+ declare class Lixa<TIdentity extends IIdentityProvider | IdentityConfig = IIdentityProvider | IdentityConfig, TProviders extends Record<string, ProviderConfig> = Record<string, ProviderConfig>> {
62
62
  private static DEFAULT_PROVIDERS;
63
63
  private static CONFIGURED_PROVIDERS;
64
64
  private localStateHandler;
65
65
  private localSessionHandler;
66
66
  private localResourceHandler;
67
+ private localAccountHandler;
67
68
  private userResourceStore;
69
+ private userAccountStore;
68
70
  private refreshMutexes;
71
+ private identityProvider?;
69
72
  private credentialsManager?;
70
73
  private config;
71
74
  private stateHandler;
72
75
  private sessionHandler;
73
76
  private resourceHandler;
77
+ private accountHandler;
74
78
  private debug;
79
+ private sessionCookieResolver?;
75
80
  /**
76
81
  * Creates a new Lixa instance with the provided configuration.
77
82
  *
@@ -85,7 +90,7 @@ declare class Lixa<TConfig extends LixaConfig<Record<string, ProviderConfig>> =
85
90
  * @throws Error when provider implementation is missing required properties
86
91
  * @throws Error when provider is not available and no inline implementation is provided
87
92
  */
88
- constructor(config: TConfig);
93
+ constructor(config: LixaConfig<TIdentity, TProviders>);
89
94
  /**
90
95
  * Validates that a provider configuration has all required credentials.
91
96
  *
@@ -126,7 +131,7 @@ declare class Lixa<TConfig extends LixaConfig<Record<string, ProviderConfig>> =
126
131
  * }
127
132
  * ```
128
133
  */
129
- isProviderConfigured<T extends string>(provider: T): provider is T & ConfiguredProviderKey<TConfig>;
134
+ isProviderConfigured<T extends string>(provider: T): provider is T & (ConfiguredOAuthKey<TIdentity, TProviders> | ConfiguredProviderKey<TProviders>);
130
135
  /**
131
136
  * Gets a provider implementation by name.
132
137
  * Resolution priority: inline custom provider \> default providers \> legacy registry
@@ -307,7 +312,7 @@ declare class Lixa<TConfig extends LixaConfig<Record<string, ProviderConfig>> =
307
312
  * res.redirect(authUrl);
308
313
  * ```
309
314
  */
310
- getAuthUrl(provider: ConfiguredProviderKey<TConfig> | string, state?: string): Promise<string>;
315
+ getAuthUrl(provider: ConfiguredOAuthKey<TIdentity, TProviders> | string, state?: string): Promise<string>;
311
316
  /**
312
317
  * Restricts primary authentication scopes strictly to AuthN identity scopes unless allowNonAuthScopes is true.
313
318
  */
@@ -331,10 +336,11 @@ declare class Lixa<TConfig extends LixaConfig<Record<string, ProviderConfig>> =
331
336
  * });
332
337
  * ```
333
338
  */
334
- handleCallback({ provider, code, state, }: {
335
- provider: ConfiguredProviderKey<TConfig> | string;
339
+ handleCallback({ provider, code, state, sessionId, }: {
340
+ provider: ConfiguredOAuthKey<TIdentity, TProviders> | string;
336
341
  code: string;
337
342
  state?: string;
343
+ sessionId?: string;
338
344
  }): Promise<string>;
339
345
  /**
340
346
  * Explicitly link a new OAuth provider account to an active session.
@@ -344,7 +350,7 @@ declare class Lixa<TConfig extends LixaConfig<Record<string, ProviderConfig>> =
344
350
  */
345
351
  linkAccount(params: {
346
352
  sessionId: string;
347
- provider: ConfiguredProviderKey<TConfig> | string;
353
+ provider: ConfiguredProviderKey<TProviders> | string;
348
354
  code: string;
349
355
  state?: string;
350
356
  }): Promise<string>;
@@ -356,6 +362,38 @@ declare class Lixa<TConfig extends LixaConfig<Record<string, ProviderConfig>> =
356
362
  * @returns Promise resolving to true on successful unlink
357
363
  */
358
364
  unlinkAccount(sessionId: string, providerToUnlink: string): Promise<boolean>;
365
+ /**
366
+ * Confirms a pending account linking step-up challenge using the user's password.
367
+ * On successful verification, links the pending provider to the existing account and creates a session.
368
+ *
369
+ * @param params - challengeToken and password
370
+ * @returns Session ID, Session, and User identity
371
+ * @throws InvalidStateError if challenge is invalid or expired
372
+ * @throws InvalidCredentialsError if password verification fails
373
+ */
374
+ confirmLinkingWithPassword(params: {
375
+ challengeToken: string;
376
+ password: string;
377
+ }): Promise<{
378
+ sessionId: string;
379
+ session: Session;
380
+ user?: any;
381
+ }>;
382
+ /**
383
+ * Sets a password for an SSO-authenticated user who doesn't have one yet.
384
+ * Must be called from an authenticated context (user has active session proving identity).
385
+ *
386
+ * @param params - userId, newPassword, optional identifier and email
387
+ * @returns True if password was set successfully
388
+ * @throws IdentityNotConfiguredError if no identity provider configured
389
+ * @throws WeakPasswordError if password doesn't meet policy
390
+ */
391
+ setPassword(params: {
392
+ userId: string;
393
+ newPassword: string;
394
+ identifier?: string;
395
+ email?: string;
396
+ }): Promise<boolean>;
359
397
  /**
360
398
  * Generates an authorization URL for connecting a resource provider (AuthZ) post-login.
361
399
  *
@@ -369,23 +407,46 @@ declare class Lixa<TConfig extends LixaConfig<Record<string, ProviderConfig>> =
369
407
  */
370
408
  getResourceAuthUrl(params: {
371
409
  sessionId: string;
372
- provider: ConfiguredProviderKey<TConfig> | string;
373
- scopes: string[];
410
+ provider: ConfiguredOAuthKey<TIdentity, TProviders> | string;
411
+ scopes?: string[];
374
412
  state?: string;
375
413
  prompt?: string;
414
+ authorizationParams?: Record<string, string>;
376
415
  extraConfig?: Record<string, string>;
377
416
  }): Promise<string>;
378
417
  private getUserKeyFromSession;
418
+ private sanitizeIdentityForStorage;
379
419
  /**
380
420
  * Handles the OAuth callback for a connected resource provider and stores resource tokens bound to user account.
381
421
  */
382
422
  handleResourceCallback(params: {
383
423
  sessionId: string;
384
- provider: ConfiguredProviderKey<TConfig> | string;
424
+ provider: ConfiguredOAuthKey<TIdentity, TProviders> | string;
385
425
  code: string;
386
426
  state?: string;
387
427
  scopes?: string[];
388
428
  }): Promise<Session>;
429
+ /**
430
+ * Retrieves configured default resource scopes for a provider.
431
+ *
432
+ * @param provider - Provider name (e.g. 'github', 'google')
433
+ * @returns Array of configured resource scopes, or undefined if not configured
434
+ */
435
+ getResourceScopes(provider: ConfiguredOAuthKey<TIdentity, TProviders> | string): string[] | undefined;
436
+ /**
437
+ * Returns the resolved session cookie name.
438
+ * Dynamically reflects any changes to the active identity provider.
439
+ *
440
+ * @param req - Optional request object for multi-tenant request-scoped cookie resolution
441
+ * @returns Resolved session cookie name
442
+ */
443
+ getSessionCookieName(req?: unknown): string;
444
+ /**
445
+ * Sets or updates the session cookie name or dynamic resolver on this instance.
446
+ *
447
+ * @param resolver - Static cookie name or dynamic resolver function
448
+ */
449
+ setSessionCookieName(resolver: SessionCookieResolver<Lixa<TProviders>>): void;
389
450
  /**
390
451
  * Retrieves a connected resource for a specific User ID / Email directly (independent of session IDs).
391
452
  * Automatically refreshes expired access tokens if a refresh token is present.
@@ -433,6 +494,13 @@ declare class Lixa<TConfig extends LixaConfig<Record<string, ProviderConfig>> =
433
494
  * Retrieves active session details from session storage.
434
495
  */
435
496
  fetchSessionInfo(sessionId: string): Promise<Session | null>;
497
+ /**
498
+ * Retrieves all linked accounts for a user from account storage.
499
+ *
500
+ * @param userIdOrSessionId - User ID, email, or active session ID
501
+ * @returns Record mapping provider name to linked account metadata
502
+ */
503
+ getUserAccounts(userIdOrSessionId: string): Promise<Record<string, LinkedAccount>>;
436
504
  /**
437
505
  * Deletes a session from session storage (e.g. on logout).
438
506
  *
@@ -441,57 +509,144 @@ declare class Lixa<TConfig extends LixaConfig<Record<string, ProviderConfig>> =
441
509
  deleteSession(sessionId: string): Promise<void>;
442
510
  private exchangeCodeForToken;
443
511
  /**
444
- * Checks if credentials (username and password) authentication is configured and enabled.
512
+ * Checks if an identity provider (Self-Managed Database, AWS Cognito, Auth0, Okta, etc.) is configured.
513
+ *
514
+ * @returns True if identity provider is configured and available
515
+ */
516
+ isIdentityEnabled(): boolean;
517
+ /**
518
+ * Checks if credentials / identity authentication is configured and enabled.
445
519
  *
446
- * @returns True if credentials authentication is available
520
+ * @returns True if credentials / identity authentication is available
447
521
  */
448
522
  isCredentialsEnabled(): boolean;
449
523
  /**
450
- * Returns the underlying CredentialsManager instance if configured.
524
+ * Returns the configured IdentityProvider instance.
525
+ */
526
+ getIdentityProvider(): IIdentityProvider | undefined;
527
+ /**
528
+ * Dynamically sets or updates the active identity provider (e.g. SelfManaged, Cognito, Auth0, Okta).
529
+ *
530
+ * @param provider - Identity provider instance or undefined to disable
531
+ */
532
+ setIdentityProvider(provider?: IIdentityProvider): void;
533
+ /**
534
+ * Returns the underlying CredentialsManager instance if using Self-Managed identity.
451
535
  */
452
536
  getCredentialsManager(): CredentialsManager | undefined;
453
537
  /**
454
- * Registers a new user with username/email and password.
455
- * Automatically enforces password policy, hashes password with Scrypt/configured hasher,
456
- * stores credentials, and creates a session (unless autoCreateSessionOnSignUp is false).
538
+ * Registers a new user with the configured identity provider (Self-Managed DB, Cognito, Auth0, Okta).
539
+ * Automatically creates an active session unless autoCreateSessionOnSignUp is explicitly set to false.
457
540
  *
458
541
  * @param params - Registration parameters (identifier, password, email, username, metadata)
459
- * @returns Created user (without password hash) and optional active session
542
+ * @returns Created user identity and optional active session
460
543
  * @throws WeakPasswordError if password does not meet policy requirements
461
544
  * @throws UserAlreadyExistsError if identifier is already registered
462
- * @throws CredentialsNotConfiguredError if credentials auth is not configured
545
+ * @throws IdentityNotConfiguredError if identity authentication is not configured
463
546
  */
464
- signUp(params: SignUpParams): Promise<SignUpResult>;
547
+ signUp(params: SignUpParams & {
548
+ provider?: ConfiguredIdentityKey<TIdentity>;
549
+ }): Promise<SignUpResult>;
465
550
  /**
466
- * Authenticates a user with username/email and password.
467
- * Performs constant-time verification with timing attack mitigation, and creates an active session.
468
- * If account linking is configured with AUTO_LINK_BY_VERIFIED_EMAIL, merges with existing session.
551
+ * Authenticates a user with credentials via the configured identity provider (Self-Managed DB, Cognito, Auth0, Okta, or Composite).
552
+ * Creates an active session and automatically links with existing sessions when AUTO_LINK_BY_VERIFIED_EMAIL is configured.
469
553
  *
470
- * @param params - Sign-in parameters (identifier, password)
554
+ * @param params - Sign-in parameters (identifier, password, optional provider)
471
555
  * @returns Authenticated user, session ID, and session object
472
556
  * @throws InvalidCredentialsError if authentication fails
473
- * @throws CredentialsNotConfiguredError if credentials auth is not configured
557
+ * @throws IdentityNotConfiguredError if identity authentication is not configured
474
558
  */
475
- signIn(params: SignInParams): Promise<SignInResult>;
559
+ signIn(params: SignInParams & {
560
+ provider?: ConfiguredIdentityKey<TIdentity>;
561
+ }): Promise<SignInResult>;
476
562
  /**
477
563
  * Verifies username/email and password credentials without generating a session.
478
564
  *
479
- * @param params - Verification parameters (identifier, password)
480
- * @returns User credentials (without password hash) or null if invalid
481
- * @throws CredentialsNotConfiguredError if credentials auth is not configured
565
+ * @param params - Verification parameters (identifier, password, optional provider)
566
+ * @returns User credentials/identity or null if invalid
567
+ * @throws IdentityNotConfiguredError if identity auth is not configured
482
568
  */
483
- verifyCredentials(params: VerifyCredentialsParams): Promise<Omit<UserCredentials, "passwordHash"> | null>;
569
+ verifyCredentials(params: VerifyCredentialsParams & {
570
+ provider?: ConfiguredIdentityKey<TIdentity>;
571
+ }): Promise<UserIdentity | null>;
484
572
  /**
485
573
  * Updates a user's password after verifying the current password and enforcing policy on the new password.
486
574
  *
487
- * @param params - Change password parameters (userId/identifier, oldPassword, newPassword)
575
+ * @param params - Change password parameters (userId/identifier, oldPassword, newPassword, optional provider)
488
576
  * @returns True if password was updated successfully
489
577
  * @throws UserNotFoundError if user is not found
490
578
  * @throws InvalidCredentialsError if current password is incorrect
491
579
  * @throws WeakPasswordError if new password does not meet policy requirements
492
- * @throws CredentialsNotConfiguredError if credentials auth is not configured
580
+ * @throws IdentityNotConfiguredError if identity auth is not configured
581
+ */
582
+ changePassword(params: ChangePasswordParams & {
583
+ provider?: ConfiguredIdentityKey<TIdentity>;
584
+ }): Promise<boolean>;
585
+ /**
586
+ * Initiates a password reset (forgot password flow) through the configured identity provider.
587
+ *
588
+ * @param params - Forgot password parameters (identifier, optional metadata, optional provider)
589
+ * @returns ForgotPasswordResult indicating status and delivery medium (email/SMS)
590
+ * @throws IdentityNotConfiguredError if identity auth is not configured
591
+ */
592
+ forgotPassword(params: ForgotPasswordParams & {
593
+ provider?: ConfiguredIdentityKey<TIdentity>;
594
+ }): Promise<ForgotPasswordResult>;
595
+ /**
596
+ * Confirms a password reset using a verification code / token and sets the new password.
597
+ *
598
+ * @param params - Verification code, identifier, new password, and optional provider
599
+ * @returns True if password reset was successfully confirmed
600
+ * @throws IdentityNotConfiguredError if identity auth is not configured
601
+ */
602
+ confirmPasswordReset(params: ConfirmPasswordResetParams & {
603
+ provider?: ConfiguredIdentityKey<TIdentity>;
604
+ }): Promise<boolean>;
605
+ /**
606
+ * Confirms user account registration using a verification code.
607
+ *
608
+ * @param params - Verification parameters including identifier, confirmationCode, and optional provider
609
+ * @returns True if confirmation was successful
610
+ * @throws IdentityNotConfiguredError if identity auth is not configured
611
+ * @throws IdentityProviderError if identity provider does not support confirmation
612
+ */
613
+ confirmSignUp(params: ConfirmSignUpParams & {
614
+ provider?: ConfiguredIdentityKey<TIdentity>;
615
+ }): Promise<boolean>;
616
+ /**
617
+ * Resends the sign up confirmation code to the user.
618
+ *
619
+ * @param params - Resend parameters including user identifier and optional provider
620
+ * @returns Details about the code delivery (medium, destination)
621
+ * @throws IdentityNotConfiguredError if identity auth is not configured
622
+ * @throws IdentityProviderError if identity provider does not support resending codes
623
+ */
624
+ resendConfirmationCode(params: ResendConfirmationCodeParams & {
625
+ provider?: ConfiguredIdentityKey<TIdentity>;
626
+ }): Promise<ResendConfirmationCodeResult>;
627
+ /**
628
+ * Retrieves a user by their unique ID from the configured identity provider.
629
+ *
630
+ * @param id - Unique user ID
631
+ * @param provider - Optional provider key when using CompositeIdentityProvider
632
+ * @returns UserIdentity or null if not found
633
+ */
634
+ getUserById(id: string, provider?: ConfiguredIdentityKey<TIdentity>): Promise<UserIdentity | null>;
635
+ /**
636
+ * Retrieves a user by their identifier (username or email) from the configured identity provider.
637
+ *
638
+ * @param identifier - Username or email string
639
+ * @param provider - Optional provider key when using CompositeIdentityProvider
640
+ * @returns UserIdentity or null if not found
641
+ */
642
+ getUserByIdentifier(identifier: string, provider?: ConfiguredIdentityKey<TIdentity>): Promise<UserIdentity | null>;
643
+ /**
644
+ * Deletes a user account from the configured identity provider.
645
+ *
646
+ * @param id - Unique user ID
647
+ * @param provider - Optional provider key when using CompositeIdentityProvider
493
648
  */
494
- changePassword(params: ChangePasswordParams): Promise<boolean>;
649
+ deleteUser(id: string, provider?: ConfiguredIdentityKey<TIdentity>): Promise<void>;
495
650
  private findProviderByType;
496
651
  }
497
652
  export { Lixa };
@@ -1 +1 @@
1
- {"version":3,"file":"lixa.d.ts","sourceRoot":"","sources":["../src/lixa.ts"],"names":[],"mappings":"AACA,OAAO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AO,CAAC,YAAY,GAAG,IAAI,CAAC;IAO/B;;;;;;OAMG;IACU,mBAAmB,CAC9B,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC,GAC1C,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAO/B;;;;;OAKG;IACU,UAAU,CACrB,EAAE,EAAE,MAAM,EACV,QAAQ,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC,GAC1C,OAAO,CAAC,IAAI,CAAC;IAQhB,OAAO,CAAC,kBAAkB;CAS3B;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -58,10 +58,16 @@ export interface LinkedAccount {
58
58
  providerUserId?: string | undefined;
59
59
  /** User email for this provider */
60
60
  email?: string | undefined;
61
- /** OAuth access token for this provider */
62
- accessToken: string;
63
- /** Full raw token response from provider */
64
- raw: OAuthTokenResponse;
61
+ /**
62
+ * Optional OAuth access token for this provider.
63
+ * @deprecated Authentication tokens belong strictly to session.token / session.raw for that session alone. Resource tokens belong in ConnectedResource / user_resources.
64
+ */
65
+ accessToken?: string | undefined;
66
+ /**
67
+ * Optional raw token response from provider.
68
+ * @deprecated Authentication tokens belong strictly to session.token / session.raw for that session alone. Resource tokens belong in ConnectedResource / user_resources.
69
+ */
70
+ raw?: OAuthTokenResponse | undefined;
65
71
  /** Unix timestamp in milliseconds when account was linked */
66
72
  linkedAt: number;
67
73
  }
@@ -101,9 +107,9 @@ export interface ConnectedResource {
101
107
  */
102
108
  export interface Session<TRaw = OAuthTokenResponse> {
103
109
  /**
104
- * Unique session ID generated by Lixa upon authentication.
110
+ * Unique canonical session ID generated by Lixa upon authentication.
105
111
  */
106
- id?: string | undefined;
112
+ sessionId?: string | undefined;
107
113
  /**
108
114
  * Linked identity provider accounts (AuthN) keyed by provider name.
109
115
  * Single source of truth for all authenticated user SSO identities.
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/models/session.ts"],"names":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;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgFG;IACH,aAAa,CAAC,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACpG;AAED;;;;;GAKG;AACH,qBAAa,sBAAuB,YAAW,eAAe;IAC5D;;;;;;;OAOG;IACG,aAAa,CAAC,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;CAUzG"}
@@ -136,6 +136,10 @@ interface IProvider {
136
136
  * @example ['openid', 'email', 'profile'] or ['read:user', 'user:email']
137
137
  */
138
138
  authScopes?: string[];
139
+ /**
140
+ * Default OAuth scopes requested when not explicitly specified in ProviderConfig.
141
+ */
142
+ defaultScopes?: string[];
139
143
  }
140
144
  export { IProvider };
141
145
  //# sourceMappingURL=IProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IProvider.d.ts","sourceRoot":"","sources":["../../src/providers/IProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,UAAU,SAAS;IACjB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"IProvider.d.ts","sourceRoot":"","sources":["../../src/providers/IProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,UAAU,SAAS;IACjB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}