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