@teamhanko/hanko-frontend-sdk 0.0.6-alpha → 0.0.7-alpha

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.
Files changed (46) hide show
  1. package/dist/lib/client/Client.d.ts +1 -1
  2. package/dist/lib/client/HttpClient.d.ts +7 -1
  3. package/dist/lib/client/PasscodeClient.d.ts +3 -2
  4. package/dist/lib/client/PasswordClient.d.ts +3 -2
  5. package/dist/lib/client/WebauthnClient.d.ts +8 -4
  6. package/dist/lib/state/State.d.ts +5 -7
  7. package/dist/lib/state/UserState.d.ts +1 -2
  8. package/dist/sdk.cjs +1 -1
  9. package/dist/sdk.cjs.map +1 -1
  10. package/dist/sdk.modern.js +1 -1
  11. package/dist/sdk.modern.js.map +1 -1
  12. package/dist/sdk.module.js +1 -1
  13. package/dist/sdk.module.js.map +1 -1
  14. package/dist/sdk.umd.js +1 -1
  15. package/dist/sdk.umd.js.map +1 -1
  16. package/package.json +15 -11
  17. package/dist/src/Hanko.d.ts +0 -20
  18. package/dist/src/index.d.ts +0 -14
  19. package/dist/src/lib/Dto.d.ts +0 -97
  20. package/dist/src/lib/Errors.d.ts +0 -139
  21. package/dist/src/lib/WebauthnSupport.d.ts +0 -36
  22. package/dist/src/lib/client/Client.d.ts +0 -15
  23. package/dist/src/lib/client/ConfigClient.d.ts +0 -20
  24. package/dist/src/lib/client/HttpClient.d.ts +0 -87
  25. package/dist/src/lib/client/PasscodeClient.d.ts +0 -54
  26. package/dist/src/lib/client/PasswordClient.d.ts +0 -46
  27. package/dist/src/lib/client/UserClient.d.ts +0 -48
  28. package/dist/src/lib/client/WebauthnClient.d.ts +0 -58
  29. package/dist/src/lib/state/PasscodeState.d.ts +0 -91
  30. package/dist/src/lib/state/PasswordState.d.ts +0 -50
  31. package/dist/src/lib/state/State.d.ts +0 -53
  32. package/dist/src/lib/state/UserState.d.ts +0 -51
  33. package/dist/src/lib/state/WebauthnState.d.ts +0 -60
  34. package/dist/tests/lib/WebauthnSupport.spec.d.ts +0 -1
  35. package/dist/tests/lib/client/ConfigClient.spec.d.ts +0 -1
  36. package/dist/tests/lib/client/HttpClient.spec.d.ts +0 -1
  37. package/dist/tests/lib/client/PasscodeClient.spec.d.ts +0 -1
  38. package/dist/tests/lib/client/PasswordClient.spec.d.ts +0 -1
  39. package/dist/tests/lib/client/UserClient.spec.d.ts +0 -1
  40. package/dist/tests/lib/client/WebauthnClient.spec.d.ts +0 -1
  41. package/dist/tests/lib/state/PasscodeState.spec.d.ts +0 -1
  42. package/dist/tests/lib/state/PasswordState.spec.d.ts +0 -1
  43. package/dist/tests/lib/state/State.spec.d.ts +0 -1
  44. package/dist/tests/lib/state/UserState.spec.d.ts +0 -1
  45. package/dist/tests/lib/state/WebauthnState.spec.d.ts +0 -1
  46. package/dist/tests/setup.d.ts +0 -10
@@ -1,53 +0,0 @@
1
- import { LocalStorageUsers } from "./UserState";
2
- /**
3
- * @interface
4
- * @category SDK
5
- * @subcategory Internal
6
- * @property {LocalStorageUsers=} users - The user states.
7
- */
8
- interface LocalStorage {
9
- users?: LocalStorageUsers;
10
- }
11
- /**
12
- * A class to read and write local storage contents.
13
- *
14
- * @abstract
15
- * @param {string} key - The local storage key.
16
- * @category SDK
17
- * @subcategory Internal
18
- */
19
- declare abstract class State {
20
- private readonly key;
21
- ls: LocalStorage;
22
- constructor(key?: string);
23
- /**
24
- * Reads and decodes the locally stored data.
25
- *
26
- * @return {State}
27
- */
28
- read(): State;
29
- /**
30
- * Encodes and writes the data to the local storage.
31
- *
32
- * @return {State}
33
- */
34
- write(): State;
35
- /**
36
- * Converts a timestamp into remaining seconds that you can count down.
37
- *
38
- * @static
39
- * @param {number} time - Timestamp in seconds (since January 1, 1970 00:00:00 UTC).
40
- * @return {number}
41
- */
42
- static timeToRemainingSeconds(time?: number): number;
43
- /**
44
- * Converts a number of seconds into a timestamp.
45
- *
46
- * @static
47
- * @param {number} seconds - Remaining seconds to be converted into a timestamp.
48
- * @return {number}
49
- */
50
- static remainingSecondsToTime(seconds?: number): number;
51
- }
52
- export { State };
53
- export type { LocalStorage };
@@ -1,51 +0,0 @@
1
- /**
2
- * @interface
3
- * @category SDK
4
- * @subcategory Internal
5
- * @property {Object.<string, LocalStorageUser>} - A dictionary for mapping users to their states.
6
- */
7
- import { State } from "./State";
8
- import { LocalStorageWebauthn } from "./WebauthnState";
9
- import { LocalStoragePasscode } from "./PasscodeState";
10
- import { LocalStoragePassword } from "./PasswordState";
11
- /**
12
- * @interface
13
- * @category SDK
14
- * @subcategory Internal
15
- * @property {LocalStorageWebauthn=} webauthn - Information about WebAuthn credentials.
16
- * @property {LocalStoragePasscode=} passcode - Information about the active passcode.
17
- * @property {LocalStoragePassword=} password - Information about the password login attempts.
18
- */
19
- interface LocalStorageUser {
20
- webauthn?: LocalStorageWebauthn;
21
- passcode?: LocalStoragePasscode;
22
- password?: LocalStoragePassword;
23
- }
24
- /**
25
- * @interface
26
- * @category SDK
27
- * @subcategory Internal
28
- * @property {Object.<string, LocalStorageUser>} - A dictionary for mapping users to their states.
29
- */
30
- export interface LocalStorageUsers {
31
- [userID: string]: LocalStorageUser;
32
- }
33
- /**
34
- * A class to read and write local storage contents.
35
- *
36
- * @abstract
37
- * @extends State
38
- * @param {string} key - The local storage key.
39
- * @category SDK
40
- * @subcategory Internal
41
- */
42
- declare abstract class UserState extends State {
43
- /**
44
- * Gets the state of the specified user.
45
- *
46
- * @param {string} userID - The UUID of the user.
47
- * @return {LocalStorageUser}
48
- */
49
- getUserState(userID: string): LocalStorageUser;
50
- }
51
- export { UserState };
@@ -1,60 +0,0 @@
1
- import { UserState } from "./UserState";
2
- import { Credential } from "../Dto";
3
- /**
4
- * @interface
5
- * @category SDK
6
- * @subcategory Internal
7
- * @property {string[]?} credentials - A list of known credential IDs on the current browser.
8
- */
9
- export interface LocalStorageWebauthn {
10
- credentials?: string[];
11
- }
12
- /**
13
- * A class that manages WebAuthn credentials via local storage.
14
- *
15
- * @extends UserState
16
- * @category SDK
17
- * @subcategory Internal
18
- */
19
- declare class WebauthnState extends UserState {
20
- /**
21
- * Gets the WebAuthn state.
22
- *
23
- * @private
24
- * @param {string} userID - The UUID of the user.
25
- * @return {LocalStorageWebauthn}
26
- */
27
- private getState;
28
- /**
29
- * Reads the current state.
30
- *
31
- * @public
32
- * @return {WebauthnState}
33
- */
34
- read(): WebauthnState;
35
- /**
36
- * Gets the list of known credentials on the current browser.
37
- *
38
- * @param {string} userID - The UUID of the user.
39
- * @return {string[]}
40
- */
41
- getCredentials(userID: string): string[];
42
- /**
43
- * Adds the credential to the list of known credentials.
44
- *
45
- * @param {string} userID - The UUID of the user.
46
- * @param {string} credentialID - The WebAuthn credential ID.
47
- * @return {WebauthnState}
48
- */
49
- addCredential(userID: string, credentialID: string): WebauthnState;
50
- /**
51
- * Returns the intersection between the specified list of credentials and the known credentials stored in
52
- * the local storage.
53
- *
54
- * @param {string} userID - The UUID of the user.
55
- * @param {Credential[]} match - A list of credential IDs to be matched against the local storage.
56
- * @return {Credential[]}
57
- */
58
- matchCredentials(userID: string, match: Credential[]): Credential[];
59
- }
60
- export { WebauthnState };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- /// <reference types="jest" />
2
- import { LocalStorage } from "../src/lib/state/State";
3
- export declare const encodedLSContent: () => string;
4
- export declare const decodedLSContent: () => LocalStorage;
5
- export declare const fakePublicKeyCredential: {
6
- isUserVerifyingPlatformAuthenticatorAvailable: jest.Mock<any, any>;
7
- isExternalCTAP2SecurityKeySupported: jest.Mock<any, any>;
8
- isConditionalMediationAvailable: jest.Mock<any, any>;
9
- };
10
- export declare const fakeXMLHttpRequest: jest.Mock<any, any>;