@affiliateo/react-native 1.0.2 → 1.1.5
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/package.json +2 -2
- package/src/index.ts +8 -8
- package/src/provider.tsx +1 -0
- package/src/types.ts +34 -36
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@affiliateo/react-native",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Affiliateo SDK for React Native — mobile affiliate attribution and
|
|
3
|
+
"version": "1.1.5",
|
|
4
|
+
"description": "Affiliateo SDK for React Native — mobile affiliate attribution and session tracking",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
7
7
|
"scripts": {
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { AffiliateoProvider, useAffiliateRef } from './provider'
|
|
2
|
-
export type {
|
|
3
|
-
AffiliateoConfig,
|
|
4
|
-
AffiliateoContextValue,
|
|
5
|
-
DeviceInfo,
|
|
6
|
-
IdentifyResponse,
|
|
7
|
-
MobileEvent,
|
|
8
|
-
} from './types'
|
|
1
|
+
export { AffiliateoProvider, useAffiliateRef } from './provider'
|
|
2
|
+
export type {
|
|
3
|
+
AffiliateoConfig,
|
|
4
|
+
AffiliateoContextValue,
|
|
5
|
+
DeviceInfo,
|
|
6
|
+
IdentifyResponse,
|
|
7
|
+
MobileEvent,
|
|
8
|
+
} from './types'
|
package/src/provider.tsx
CHANGED
package/src/types.ts
CHANGED
|
@@ -1,36 +1,34 @@
|
|
|
1
|
-
export interface AffiliateoConfig {
|
|
2
|
-
campaignId: string
|
|
3
|
-
/** Base URL for the API. Defaults to https://affiliateo.com */
|
|
4
|
-
apiUrl?: string
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface DeviceInfo {
|
|
8
|
-
device_model: string
|
|
9
|
-
os: string
|
|
10
|
-
os_version: string
|
|
11
|
-
app_version: string
|
|
12
|
-
screen_width: number
|
|
13
|
-
screen_height: number
|
|
14
|
-
timezone: string
|
|
15
|
-
language: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface IdentifyResponse {
|
|
19
|
-
visitor_id: string
|
|
20
|
-
ref_code: string | null
|
|
21
|
-
matched: boolean
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface MobileEvent {
|
|
25
|
-
type: '
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
visitorId: string | null
|
|
36
|
-
}
|
|
1
|
+
export interface AffiliateoConfig {
|
|
2
|
+
campaignId: string
|
|
3
|
+
/** Base URL for the API. Defaults to https://affiliateo.com */
|
|
4
|
+
apiUrl?: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface DeviceInfo {
|
|
8
|
+
device_model: string
|
|
9
|
+
os: string
|
|
10
|
+
os_version: string
|
|
11
|
+
app_version: string
|
|
12
|
+
screen_width: number
|
|
13
|
+
screen_height: number
|
|
14
|
+
timezone: string
|
|
15
|
+
language: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface IdentifyResponse {
|
|
19
|
+
visitor_id: string
|
|
20
|
+
ref_code: string | null
|
|
21
|
+
matched: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface MobileEvent {
|
|
25
|
+
type: 'session_start' | 'session_end'
|
|
26
|
+
timestamp: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface AffiliateoContextValue {
|
|
30
|
+
refCode: string | null
|
|
31
|
+
isMatched: boolean
|
|
32
|
+
isLoading: boolean
|
|
33
|
+
visitorId: string | null
|
|
34
|
+
}
|