@appfunnel-dev/sdk 0.7.0 → 0.8.0
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/README.md +2 -80
- package/dist/elements/index.cjs +49 -4
- package/dist/elements/index.cjs.map +1 -1
- package/dist/elements/index.d.cts +19 -1
- package/dist/elements/index.d.ts +19 -1
- package/dist/elements/index.js +49 -5
- package/dist/elements/index.js.map +1 -1
- package/dist/index.cjs +727 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +729 -40
- package/dist/index.js.map +1 -1
- package/dist/{internal-C7seLJBr.d.cts → internal-C9MOEdND.d.cts} +11 -12
- package/dist/{internal-C7seLJBr.d.ts → internal-C9MOEdND.d.ts} +11 -12
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7,8 +7,8 @@ interface AppFunnelConfig {
|
|
|
7
7
|
/** Funnel ID — set automatically on first publish. */
|
|
8
8
|
funnelId?: string;
|
|
9
9
|
name: string;
|
|
10
|
-
/** Page key to start on.
|
|
11
|
-
initialPageKey
|
|
10
|
+
/** Page key to start on. */
|
|
11
|
+
initialPageKey: string;
|
|
12
12
|
/**
|
|
13
13
|
* Response variables — user answers to quiz/survey questions.
|
|
14
14
|
* Stored internally as `answers.<key>`.
|
|
@@ -212,10 +212,13 @@ interface UserState {
|
|
|
212
212
|
stripeCustomerId: string;
|
|
213
213
|
paddleCustomerId: string;
|
|
214
214
|
dateOfBirth: string;
|
|
215
|
-
|
|
215
|
+
marketingConsent: boolean;
|
|
216
216
|
setEmail: (email: string) => void;
|
|
217
217
|
setName: (name: string) => void;
|
|
218
218
|
setDateOfBirth: (dateOfBirth: string) => void;
|
|
219
|
+
setMarketingConsent: (consent: boolean) => void;
|
|
220
|
+
/** Identify the user by email — fires user.registered event */
|
|
221
|
+
identify: (email: string) => void;
|
|
219
222
|
}
|
|
220
223
|
interface NavigationState {
|
|
221
224
|
goToNextPage: () => void;
|
|
@@ -232,19 +235,15 @@ interface ProductsState {
|
|
|
232
235
|
}
|
|
233
236
|
interface TrackingState {
|
|
234
237
|
track: (eventName: string, data?: Record<string, unknown>) => void;
|
|
235
|
-
identify: (email: string) => void;
|
|
236
238
|
}
|
|
237
239
|
interface PaymentState {
|
|
238
|
-
customerId: string | null;
|
|
239
|
-
isAuthorized: boolean;
|
|
240
240
|
loading: boolean;
|
|
241
241
|
error: string | null;
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
} | null;
|
|
242
|
+
/** Purchase a product using the card on file. */
|
|
243
|
+
purchase: (productId: string, options?: {
|
|
244
|
+
onSuccess?: () => void;
|
|
245
|
+
onError?: (error: string) => void;
|
|
246
|
+
}) => Promise<boolean>;
|
|
248
247
|
}
|
|
249
248
|
interface DeviceInfo {
|
|
250
249
|
os: {
|
|
@@ -7,8 +7,8 @@ interface AppFunnelConfig {
|
|
|
7
7
|
/** Funnel ID — set automatically on first publish. */
|
|
8
8
|
funnelId?: string;
|
|
9
9
|
name: string;
|
|
10
|
-
/** Page key to start on.
|
|
11
|
-
initialPageKey
|
|
10
|
+
/** Page key to start on. */
|
|
11
|
+
initialPageKey: string;
|
|
12
12
|
/**
|
|
13
13
|
* Response variables — user answers to quiz/survey questions.
|
|
14
14
|
* Stored internally as `answers.<key>`.
|
|
@@ -212,10 +212,13 @@ interface UserState {
|
|
|
212
212
|
stripeCustomerId: string;
|
|
213
213
|
paddleCustomerId: string;
|
|
214
214
|
dateOfBirth: string;
|
|
215
|
-
|
|
215
|
+
marketingConsent: boolean;
|
|
216
216
|
setEmail: (email: string) => void;
|
|
217
217
|
setName: (name: string) => void;
|
|
218
218
|
setDateOfBirth: (dateOfBirth: string) => void;
|
|
219
|
+
setMarketingConsent: (consent: boolean) => void;
|
|
220
|
+
/** Identify the user by email — fires user.registered event */
|
|
221
|
+
identify: (email: string) => void;
|
|
219
222
|
}
|
|
220
223
|
interface NavigationState {
|
|
221
224
|
goToNextPage: () => void;
|
|
@@ -232,19 +235,15 @@ interface ProductsState {
|
|
|
232
235
|
}
|
|
233
236
|
interface TrackingState {
|
|
234
237
|
track: (eventName: string, data?: Record<string, unknown>) => void;
|
|
235
|
-
identify: (email: string) => void;
|
|
236
238
|
}
|
|
237
239
|
interface PaymentState {
|
|
238
|
-
customerId: string | null;
|
|
239
|
-
isAuthorized: boolean;
|
|
240
240
|
loading: boolean;
|
|
241
241
|
error: string | null;
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
} | null;
|
|
242
|
+
/** Purchase a product using the card on file. */
|
|
243
|
+
purchase: (productId: string, options?: {
|
|
244
|
+
onSuccess?: () => void;
|
|
245
|
+
onError?: (error: string) => void;
|
|
246
|
+
}) => Promise<boolean>;
|
|
248
247
|
}
|
|
249
248
|
interface DeviceInfo {
|
|
250
249
|
os: {
|
package/dist/internal.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { r as FunnelContextValue, f as FunnelProvider, g as FunnelProviderProps, s as TranslationMap } from './internal-
|
|
1
|
+
export { r as FunnelContextValue, f as FunnelProvider, g as FunnelProviderProps, s as TranslationMap } from './internal-C9MOEdND.cjs';
|
|
2
2
|
import 'react/jsx-runtime';
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { r as FunnelContextValue, f as FunnelProvider, g as FunnelProviderProps, s as TranslationMap } from './internal-
|
|
1
|
+
export { r as FunnelContextValue, f as FunnelProvider, g as FunnelProviderProps, s as TranslationMap } from './internal-C9MOEdND.js';
|
|
2
2
|
import 'react/jsx-runtime';
|