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