starti.app 2.0.100 → 2.0.110
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/integrations/App/AppIntegration.d.ts +10 -0
- package/dist/integrations/Biometrics/BiometricService.d.ts +2 -1
- package/dist/integrations/Biometrics/BiometricsDrawer.d.ts +12 -0
- package/dist/integrations/Biometrics/BiometricsIntegration.d.ts +15 -2
- package/dist/integrations/PushNotification/PushNotificationIntegration.d.ts +10 -0
- package/dist/integrations/QrScanner/QrScannerIntegration.d.ts +3 -0
- package/dist/integrations/QrScanner/typings.d.ts +3 -0
- package/dist/lib/VaulDrawerService.d.ts +36 -0
- package/dist/startiapp.d.ts +11 -0
- package/package.json +1 -1
|
@@ -220,6 +220,16 @@ export declare class App extends EventTargetWithType<{
|
|
|
220
220
|
*/
|
|
221
221
|
requestAppTracking: () => Promise<void>;
|
|
222
222
|
private onStartiappReady;
|
|
223
|
+
/**
|
|
224
|
+
* @event navigatingPage
|
|
225
|
+
* Fired when the app is navigating to a new page.
|
|
226
|
+
* @type {CustomEvent<NavigatingPageEvent>}
|
|
227
|
+
*/
|
|
223
228
|
private handleNavigatingPageEvent;
|
|
229
|
+
/**
|
|
230
|
+
* @event appInForeground
|
|
231
|
+
* Fired when the app comes to the foreground.
|
|
232
|
+
* @type {CustomEvent<void>}
|
|
233
|
+
*/
|
|
224
234
|
private handleAppInForegroundEvent;
|
|
225
235
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PopulatedSaveUsernameAndPasswordConfiguration, SaveUsernameAndPasswordConfiguration } from "./BiometricsIntegration";
|
|
1
|
+
import { BiometricsAuthenticationType, PopulatedSaveUsernameAndPasswordConfiguration, SaveUsernameAndPasswordConfiguration } from "./BiometricsIntegration";
|
|
2
2
|
export declare class BiometricService {
|
|
3
3
|
static saveConfigurationAndAddMiddlewareToSubmitButton(configurationKey: string, credentialsKey: string, request: SaveUsernameAndPasswordConfiguration): void;
|
|
4
4
|
static getCredentials(credentialsKey: string): {
|
|
@@ -9,6 +9,7 @@ export declare class BiometricService {
|
|
|
9
9
|
private static getTranslatedAuthenticationType;
|
|
10
10
|
private static getConfirmMessage;
|
|
11
11
|
static promptForBiometrics(populatedConfiguration: PopulatedSaveUsernameAndPasswordConfiguration): Promise<boolean>;
|
|
12
|
+
static presentPrompt(populatedConfiguration: SaveUsernameAndPasswordConfiguration, biometricsType: BiometricsAuthenticationType): Promise<boolean>;
|
|
12
13
|
static getPopulatedConfiguration(configurationKey: string): PopulatedSaveUsernameAndPasswordConfiguration;
|
|
13
14
|
static tryLoginAsync(configurationKey: string): Promise<boolean>;
|
|
14
15
|
private static setInputValue;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BiometricsAuthenticationType, SaveUsernameAndPasswordConfiguration } from "./BiometricsIntegration";
|
|
2
|
+
export declare class BiometricsDrawer {
|
|
3
|
+
private static vaulDrawerService;
|
|
4
|
+
static get isAvailable(): boolean;
|
|
5
|
+
private static getTranslatedAuthenticationType;
|
|
6
|
+
private static getTitle;
|
|
7
|
+
private static getSubtitle;
|
|
8
|
+
private static getAcceptButtonText;
|
|
9
|
+
private static getDeclineButtonText;
|
|
10
|
+
static presentBiometricDrawer(populatedConfiguration: SaveUsernameAndPasswordConfiguration, biometricsType: BiometricsAuthenticationType): Promise<boolean>;
|
|
11
|
+
static createDrawerContent(title: string, subtitle: string, acceptButtonText: string, declineButtonText: string): HTMLElement;
|
|
12
|
+
}
|
|
@@ -116,12 +116,25 @@ export type SaveUsernameAndPasswordConfiguration = {
|
|
|
116
116
|
face: string;
|
|
117
117
|
fingerprint: string;
|
|
118
118
|
};
|
|
119
|
+
} | {
|
|
120
|
+
translations: {
|
|
121
|
+
nextTime: {
|
|
122
|
+
title: string;
|
|
123
|
+
subtitle: string;
|
|
124
|
+
acceptedButtonText: string;
|
|
125
|
+
declinedButtonText: string;
|
|
126
|
+
};
|
|
127
|
+
biometricsType: {
|
|
128
|
+
face: string;
|
|
129
|
+
fingerprint: string;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
119
132
|
});
|
|
120
|
-
export type PopulatedSaveUsernameAndPasswordConfiguration = SaveUsernameAndPasswordConfiguration & {
|
|
133
|
+
export type PopulatedSaveUsernameAndPasswordConfiguration = (SaveUsernameAndPasswordConfiguration & {
|
|
121
134
|
usernameInputField: HTMLInputElement;
|
|
122
135
|
passwordInputField: HTMLInputElement;
|
|
123
136
|
submitButton: HTMLButtonElement;
|
|
124
137
|
executingButton?: HTMLButtonElement;
|
|
125
|
-
} | {
|
|
138
|
+
}) | {
|
|
126
139
|
error: string;
|
|
127
140
|
};
|
|
@@ -84,6 +84,16 @@ export declare class PushNotification extends EventTargetWithType<{
|
|
|
84
84
|
private updateSubscribedStatusAsync;
|
|
85
85
|
private updateSubscribedTopics;
|
|
86
86
|
private getSubscribedTopics;
|
|
87
|
+
/**
|
|
88
|
+
* @event tokenReceived
|
|
89
|
+
* Event fired when a new FCM token is received.
|
|
90
|
+
* @type {CustomEvent<string>}
|
|
91
|
+
*/
|
|
87
92
|
private onTokenReceived;
|
|
93
|
+
/**
|
|
94
|
+
* @event notificationReceived
|
|
95
|
+
* Event fired when a push notification is received.
|
|
96
|
+
* @type {CustomEvent<{ title: string; body: string }>}
|
|
97
|
+
*/
|
|
88
98
|
private onNotificationReceived;
|
|
89
99
|
}
|
|
@@ -24,14 +24,17 @@ export declare class QrScanner extends EventTarget {
|
|
|
24
24
|
* return scannedValue === "VALID_CODE"; // Only accept this specific code
|
|
25
25
|
* }
|
|
26
26
|
* });
|
|
27
|
+
* ```
|
|
27
28
|
*
|
|
28
29
|
* @example
|
|
30
|
+
* ```typescript
|
|
29
31
|
* // Using a synchronous validation function
|
|
30
32
|
* const validatedResult = await qrScanner.scan({
|
|
31
33
|
* validation: (scannedValue) => {
|
|
32
34
|
* return scannedValue.startsWith("VALID_"); // Accept codes starting with "VALID_"
|
|
33
35
|
* }
|
|
34
36
|
* });
|
|
37
|
+
* ```
|
|
35
38
|
*/
|
|
36
39
|
scan(options?: QrScannerOptions): Promise<string | null>;
|
|
37
40
|
/**
|
|
@@ -3,7 +3,10 @@ export type QrScannerOptionsNative = {
|
|
|
3
3
|
continuous?: boolean;
|
|
4
4
|
/** The delay in milliseconds between scan results. Default is 200ms */
|
|
5
5
|
throttleMilliseconds?: number;
|
|
6
|
+
/** Whether to show the camera preview while scanning. Default is true. */
|
|
7
|
+
showCameraPreview?: boolean;
|
|
6
8
|
};
|
|
7
9
|
export type QrScannerOptions = {
|
|
10
|
+
showCameraPreview?: boolean;
|
|
8
11
|
validation?: (scannedValue: string) => boolean | Promise<boolean>;
|
|
9
12
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare class VaulDrawerService {
|
|
2
|
+
private get vaulDrawerLibrary();
|
|
3
|
+
get isAvailable(): boolean;
|
|
4
|
+
createDrawer(selector: string, options: VaulDrawerOptions): VaulDrawer | null;
|
|
5
|
+
}
|
|
6
|
+
type VaulDrawerOptions = {
|
|
7
|
+
direction?: "top" | "bottom" | "left" | "right";
|
|
8
|
+
closeThreshold?: number;
|
|
9
|
+
dismissible?: boolean;
|
|
10
|
+
modal?: boolean;
|
|
11
|
+
handleOnly?: boolean;
|
|
12
|
+
snapPoints?: number[] | null;
|
|
13
|
+
activeSnapPoint?: number | null;
|
|
14
|
+
fadeFromIndex?: number | null;
|
|
15
|
+
scrollLockTimeout?: number;
|
|
16
|
+
shouldScaleBackground?: boolean;
|
|
17
|
+
setBackgroundColorOnScale?: boolean;
|
|
18
|
+
fixed?: boolean;
|
|
19
|
+
disablePreventScroll?: boolean;
|
|
20
|
+
repositionInputs?: boolean;
|
|
21
|
+
snapToSequentialPoint?: boolean;
|
|
22
|
+
defaultOpen?: boolean;
|
|
23
|
+
onOpenChange?: ((open: boolean) => void) | null;
|
|
24
|
+
onDrag?: ((event: unknown, percentageDragged: number) => void) | null;
|
|
25
|
+
onRelease?: ((event: unknown, open: boolean) => void) | null;
|
|
26
|
+
onClose?: ((state: unknown) => void) | null;
|
|
27
|
+
onAnimationEnd?: ((open: boolean) => void) | null;
|
|
28
|
+
onSnapPointChange?: ((activeSnapPointIndex: number) => void) | null;
|
|
29
|
+
};
|
|
30
|
+
type VaulDrawer = {
|
|
31
|
+
open: () => void;
|
|
32
|
+
close: (state?: unknown) => void;
|
|
33
|
+
toggle: () => void;
|
|
34
|
+
destroy: () => void;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
package/dist/startiapp.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export declare class StartiappClass extends EventTarget {
|
|
|
37
37
|
Trigger: Trigger;
|
|
38
38
|
User: User;
|
|
39
39
|
Media: Media;
|
|
40
|
+
demoToken: string | null;
|
|
40
41
|
constructor();
|
|
41
42
|
/**
|
|
42
43
|
* Initializes the app.
|
|
@@ -59,8 +60,18 @@ export declare class StartiappClass extends EventTarget {
|
|
|
59
60
|
*/
|
|
60
61
|
isRunningInApp: typeof isRunningInApp;
|
|
61
62
|
addEventListener: typeof EventTarget.prototype.addEventListener;
|
|
63
|
+
/**
|
|
64
|
+
* @event error
|
|
65
|
+
* Event fired when an error occurs.
|
|
66
|
+
* @type {CustomEvent<unknown>}
|
|
67
|
+
*/
|
|
62
68
|
private handleAppError;
|
|
63
69
|
private assertIsRunningInAppAndWarn;
|
|
70
|
+
/**
|
|
71
|
+
* @event ready
|
|
72
|
+
* Event fired when the starti.app SDK is fully loaded and initialized.
|
|
73
|
+
* @type {CustomEvent<void>}
|
|
74
|
+
*/
|
|
64
75
|
private readyEvent;
|
|
65
76
|
}
|
|
66
77
|
export interface InitializeParams {
|
package/package.json
CHANGED