@types/matomo-tracker-react-native 0.3.0 → 0.3.1
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.
|
@@ -6,107 +6,9 @@ This package contains type definitions for matomo-tracker-react-native (https://
|
|
|
6
6
|
|
|
7
7
|
# Details
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/matomo-tracker-react-native.
|
|
9
|
-
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/matomo-tracker-react-native/index.d.ts)
|
|
10
|
-
````ts
|
|
11
|
-
// Type definitions for matomo-tracker-react-native 0.3
|
|
12
|
-
// Project: https://github.com/donni106/matomo-tracker-react-native
|
|
13
|
-
// Definitions by: Zeynep Ece Ergin <https://github.com/zecergin>
|
|
14
|
-
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
15
|
-
// TypeScript Version: 4.4
|
|
16
|
-
|
|
17
|
-
import * as React from 'react';
|
|
18
|
-
|
|
19
|
-
export interface AppStart {
|
|
20
|
-
userInfo?: {
|
|
21
|
-
uid?: string
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface Action {
|
|
26
|
-
name: string;
|
|
27
|
-
userInfo?:
|
|
28
|
-
{
|
|
29
|
-
uid?: string
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface Event {
|
|
34
|
-
category: string;
|
|
35
|
-
action: string;
|
|
36
|
-
name?: string;
|
|
37
|
-
value?: number;
|
|
38
|
-
userInfo?: {
|
|
39
|
-
uid?: string
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface SiteSearch {
|
|
44
|
-
keyword: string;
|
|
45
|
-
category?: string;
|
|
46
|
-
count?: number;
|
|
47
|
-
userInfo?: {
|
|
48
|
-
uid?: string
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface Link {
|
|
53
|
-
link: string;
|
|
54
|
-
url?: string;
|
|
55
|
-
userInfo?: {
|
|
56
|
-
uid?: string
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface Download {
|
|
61
|
-
download: string;
|
|
62
|
-
url?: string;
|
|
63
|
-
userInfo?: {
|
|
64
|
-
uid?: string
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function useMatomo(): {
|
|
69
|
-
trackAppStart: (params: AppStart) => undefined | Promise<Response>,
|
|
70
|
-
trackScreenView: (params: Action) => undefined | Promise<Response>,
|
|
71
|
-
trackAction: (params: Action) => undefined | Promise<Response>,
|
|
72
|
-
trackEvent: (params: Event) => undefined | Promise<Response>,
|
|
73
|
-
trackSiteSearch: (params: SiteSearch) => undefined | Promise<Response>,
|
|
74
|
-
trackLink: (params: Link) => undefined | Promise<Response>,
|
|
75
|
-
trackDownload: (params: Download) => undefined | Promise<Response>
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export interface MatomoProviderProps {
|
|
79
|
-
instance: MatomoTracker;
|
|
80
|
-
children: React.ReactElement;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function MatomoProvider(props: MatomoProviderProps): JSX.Element;
|
|
84
|
-
|
|
85
|
-
export const MatomoContext: React.Context<{}>;
|
|
86
|
-
export interface InstanceProps {
|
|
87
|
-
urlBase: string;
|
|
88
|
-
siteId: number;
|
|
89
|
-
trackerUrl?: string;
|
|
90
|
-
userId?: string;
|
|
91
|
-
disabled?: boolean;
|
|
92
|
-
log?: boolean;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export default class MatomoTracker {
|
|
96
|
-
constructor(props: InstanceProps);
|
|
97
|
-
trackAppStart(params: AppStart): Promise<Response>;
|
|
98
|
-
trackScreenView(params: Action): Promise<Response>;
|
|
99
|
-
trackAction(params: Action): Promise<Response>;
|
|
100
|
-
trackEvent(params: Event): Promise<Response>;
|
|
101
|
-
trackSiteSearch(params: SiteSearch): Promise<Response>;
|
|
102
|
-
trackLink(params: Link): Promise<Response>;
|
|
103
|
-
trackDownload(params: Download): Promise<Response>;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
````
|
|
107
9
|
|
|
108
10
|
### Additional Details
|
|
109
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 13 Oct 2022 10:02:58 GMT
|
|
110
12
|
* Dependencies: [@types/react](https://npmjs.com/package/@types/react)
|
|
111
13
|
* Global values: none
|
|
112
14
|
|
|
@@ -8,8 +8,23 @@ import * as React from 'react';
|
|
|
8
8
|
|
|
9
9
|
export interface AppStart {
|
|
10
10
|
userInfo?: {
|
|
11
|
-
uid?: string
|
|
12
|
-
|
|
11
|
+
uid?: string,
|
|
12
|
+
cid?: string,
|
|
13
|
+
urlref?: string,
|
|
14
|
+
lang?: string,
|
|
15
|
+
ua?: string,
|
|
16
|
+
_idvc?: string,
|
|
17
|
+
new_visit?: number,
|
|
18
|
+
_viewts?: number,
|
|
19
|
+
_idts?: number
|
|
20
|
+
res?: number,
|
|
21
|
+
h?: number,
|
|
22
|
+
m?: number,
|
|
23
|
+
s?: number,
|
|
24
|
+
cookie?: number,
|
|
25
|
+
uadata?: object,
|
|
26
|
+
dimension?: number
|
|
27
|
+
};
|
|
13
28
|
}
|
|
14
29
|
|
|
15
30
|
export interface Action {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/matomo-tracker-react-native",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "TypeScript definitions for matomo-tracker-react-native",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/matomo-tracker-react-native",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@types/react": "*"
|
|
24
24
|
},
|
|
25
|
-
"typesPublisherContentHash": "
|
|
25
|
+
"typesPublisherContentHash": "afc09f709d7a9114f305f4e78e3b83ab037fec136622c63699f97a14b4bd0d2a",
|
|
26
26
|
"typeScriptVersion": "4.4"
|
|
27
27
|
}
|