@createlex/onetapforms-sdk 1.1.1 → 1.1.3

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/sdk.d.ts ADDED
@@ -0,0 +1,44 @@
1
+ import type { OneTapFormsConfig, RequestOptions, CompletionResult } from './types';
2
+ /**
3
+ * OneTapForms SDK class for secure, biometric-authenticated form completion
4
+ */
5
+ export declare class OneTapForms {
6
+ private instance;
7
+ constructor(config: OneTapFormsConfig);
8
+ /**
9
+ * Create a form completion request
10
+ */
11
+ request(options: RequestOptions): Promise<void>;
12
+ /**
13
+ * Cancel active polling (useful for cleanup)
14
+ */
15
+ cancelPolling(): void;
16
+ /**
17
+ * Handle callback from redirect flow
18
+ * Call this when user returns to your site with token in URL
19
+ */
20
+ handleCallback(): CompletionResult | null;
21
+ /**
22
+ * Exchange token for user data (server-side only!)
23
+ * This should be called from your backend, not the browser
24
+ */
25
+ exchangeToken(token: string): Promise<any>;
26
+ /**
27
+ * Get the App Store URL for downloading OneTapForms app
28
+ * Use this to encourage users to download the app for faster form completion
29
+ */
30
+ getAppDownloadUrl(): string;
31
+ /**
32
+ * Show a prompt encouraging users to download the OneTapForms app
33
+ * This helps developers get faster form completion and better conversion rates
34
+ *
35
+ * @param options Customization options for the prompt
36
+ */
37
+ showDownloadPrompt(options?: {
38
+ title?: string;
39
+ message?: string;
40
+ buttonText?: string;
41
+ onDismiss?: () => void;
42
+ }): void;
43
+ }
44
+ export default OneTapForms;
package/package.json CHANGED
@@ -1,11 +1,18 @@
1
1
  {
2
2
  "name": "@createlex/onetapforms-sdk",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "type": "module",
5
5
  "description": "Free SDK for instant form completion. Faster conversions, better UX, verified data - zero cost for developers. Users pay for convenience.",
6
- "main": "dist/index.js",
6
+ "main": "dist/index.cjs",
7
7
  "module": "dist/index.esm.js",
8
8
  "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.esm.js",
13
+ "require": "./dist/index.cjs"
14
+ }
15
+ },
9
16
  "files": [
10
17
  "dist",
11
18
  "README.md",