starti.app 2.0.66 → 2.0.72

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.
@@ -1,6 +1,6 @@
1
1
  import { EventTargetWithType } from "../../EventTarget";
2
2
  import { SetStatusBarOptions, SpinnerOptions, Startiapp } from "../../startiapp";
3
- import { NavigatingPageEvent } from "./typings";
3
+ import { NavigatingPageEvent, VibrationIntensity } from "./typings";
4
4
  export declare class App extends EventTargetWithType<{
5
5
  navigatingPage: CustomEvent<NavigatingPageEvent>;
6
6
  appInForeground: CustomEvent<void>;
@@ -189,6 +189,12 @@ export declare class App extends EventTargetWithType<{
189
189
  * ```
190
190
  */
191
191
  resetAppUrl: () => Promise<void>;
192
+ /**
193
+ * Triggers device vibration with specified intensity
194
+ * @param intensity - The intensity level of the vibration
195
+ * @returns A promise that resolves when the vibration is complete
196
+ */
197
+ vibrate: (intensity: VibrationIntensity) => Promise<void>;
192
198
  /**
193
199
  * Prompt the user to review the app.
194
200
  *
@@ -15,3 +15,9 @@ export interface RegexDto {
15
15
  export interface PermissionStatus {
16
16
  granted: boolean;
17
17
  }
18
+ export declare enum VibrationIntensity {
19
+ Low = 0,
20
+ Medium = 1,
21
+ High = 2,
22
+ Intense = 3
23
+ }
@@ -83,7 +83,7 @@ export declare class Biometrics extends EventTarget {
83
83
  */
84
84
  checkAccess: () => Promise<import("../App/typings").PermissionStatus>;
85
85
  }
86
- export type BiometricsAuthenticationType = "None" | "Face" | "Fingerprint";
86
+ export type BiometricsAuthenticationType = "none" | "face" | "fingerprint";
87
87
  export type BiometricsResultReponse<T> = {
88
88
  key: string;
89
89
  result: T;
@@ -95,6 +95,11 @@ export type BiometricsResultReponse<T> = {
95
95
  * @param submitButtonSelector - The JS selector for the submit button.
96
96
  * @param title - The title of the biometrics scan.
97
97
  * @param reason - The reason for the biometrics scan.
98
+ *
99
+ * @param language - The language of the biometrics scan.
100
+ *
101
+ * @param confirmMessageTemplate - The template for the confirm message.
102
+ * @param biometricsTypeTranslations - The translations for the biometrics types.
98
103
  */
99
104
  export type SaveUsernameAndPasswordConfiguration = {
100
105
  usernameInputFieldSelector: string;
@@ -102,8 +107,15 @@ export type SaveUsernameAndPasswordConfiguration = {
102
107
  submitButtonSelector: string;
103
108
  title: string;
104
109
  reason: string;
110
+ } & ({
105
111
  language?: "da" | "en";
106
- };
112
+ } | {
113
+ confirmMessageTemplate: string;
114
+ biometricsTypeTranslations?: {
115
+ face: string;
116
+ fingerprint: string;
117
+ };
118
+ });
107
119
  export type PopulatedSaveUsernameAndPasswordConfiguration = SaveUsernameAndPasswordConfiguration & {
108
120
  usernameInputField: HTMLInputElement;
109
121
  passwordInputField: HTMLInputElement;
@@ -1,4 +1,4 @@
1
- import { NavigationSpinnerOptions, PermissionStatus, RegexDto } from "./integrations/App/typings";
1
+ import { NavigationSpinnerOptions, PermissionStatus, RegexDto, VibrationIntensity } from "./integrations/App/typings";
2
2
  import { BiometricsAuthenticationType, BiometricsResultReponse, SaveUsernameAndPasswordConfiguration } from "./integrations/Biometrics/BiometricsIntegration";
3
3
  import { InApPurchasePurchaseType, InAppPurchaseGetProductResponse, InAppPurchaseProductResponse, InAppPurchaseResponse } from "./integrations/InAppPurchase/InAppPurchaseIntegration";
4
4
  import { GeofenceRegion, Location, LocationListeningOptions, LocationOptions } from "./integrations/Location/types";
@@ -37,6 +37,7 @@ type AppIntegration = {
37
37
  setAppUrl(url: string): void;
38
38
  getAppUrl(): string;
39
39
  resetAppUrl(): void;
40
+ vibrate(intensity: VibrationIntensity): void;
40
41
  webAppIsReady(): void;
41
42
  setNavigationSpinner(options: NavigationSpinnerOptions): void;
42
43
  showNavigationSpinner(options?: NavigationSpinnerOptions): void;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "starti.app",
3
3
  "author": "starti.app",
4
4
  "license": "MIT",
5
- "version": "2.0.66",
5
+ "version": "2.0.72",
6
6
  "description": "Use this package for easy communication with the starti.app API.",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",