@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@affiliateo/react-native",
3
- "version": "1.0.2",
4
- "description": "Affiliateo SDK for React Native — mobile affiliate attribution and screen tracking",
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
@@ -73,6 +73,7 @@ async function getStableDeviceId(): Promise<string> {
73
73
  return cachedDeviceId
74
74
  }
75
75
 
76
+ const noop = () => {}
76
77
  export const AffiliateoContext = createContext<AffiliateoContextValue>({
77
78
  refCode: null,
78
79
  isMatched: false,
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: 'screen_view' | 'session_start' | 'session_end' | 'custom'
26
- screen?: string
27
- timestamp: string
28
- metadata?: Record<string, unknown>
29
- }
30
-
31
- export interface AffiliateoContextValue {
32
- refCode: string | null
33
- isMatched: boolean
34
- isLoading: boolean
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
+ }