@types/matomo-tracker-react-native 0.3.0

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,114 @@
1
+ # Installation
2
+ > `npm install --save @types/matomo-tracker-react-native`
3
+
4
+ # Summary
5
+ This package contains type definitions for matomo-tracker-react-native (https://github.com/donni106/matomo-tracker-react-native).
6
+
7
+ # Details
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
+
108
+ ### Additional Details
109
+ * Last updated: Mon, 29 Nov 2021 08:01:03 GMT
110
+ * Dependencies: [@types/react](https://npmjs.com/package/@types/react)
111
+ * Global values: none
112
+
113
+ # Credits
114
+ These definitions were written by [Zeynep Ece Ergin](https://github.com/zecergin).
@@ -0,0 +1,94 @@
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';
8
+
9
+ export interface AppStart {
10
+ userInfo?: {
11
+ uid?: string
12
+ };
13
+ }
14
+
15
+ export interface Action {
16
+ name: string;
17
+ userInfo?:
18
+ {
19
+ uid?: string
20
+ };
21
+ }
22
+
23
+ export interface Event {
24
+ category: string;
25
+ action: string;
26
+ name?: string;
27
+ value?: number;
28
+ userInfo?: {
29
+ uid?: string
30
+ };
31
+ }
32
+
33
+ export interface SiteSearch {
34
+ keyword: string;
35
+ category?: string;
36
+ count?: number;
37
+ userInfo?: {
38
+ uid?: string
39
+ };
40
+ }
41
+
42
+ export interface Link {
43
+ link: string;
44
+ url?: string;
45
+ userInfo?: {
46
+ uid?: string
47
+ };
48
+ }
49
+
50
+ export interface Download {
51
+ download: string;
52
+ url?: string;
53
+ userInfo?: {
54
+ uid?: string
55
+ };
56
+ }
57
+
58
+ export function useMatomo(): {
59
+ trackAppStart: (params: AppStart) => undefined | Promise<Response>,
60
+ trackScreenView: (params: Action) => undefined | Promise<Response>,
61
+ trackAction: (params: Action) => undefined | Promise<Response>,
62
+ trackEvent: (params: Event) => undefined | Promise<Response>,
63
+ trackSiteSearch: (params: SiteSearch) => undefined | Promise<Response>,
64
+ trackLink: (params: Link) => undefined | Promise<Response>,
65
+ trackDownload: (params: Download) => undefined | Promise<Response>
66
+ };
67
+
68
+ export interface MatomoProviderProps {
69
+ instance: MatomoTracker;
70
+ children: React.ReactElement;
71
+ }
72
+
73
+ export function MatomoProvider(props: MatomoProviderProps): JSX.Element;
74
+
75
+ export const MatomoContext: React.Context<{}>;
76
+ export interface InstanceProps {
77
+ urlBase: string;
78
+ siteId: number;
79
+ trackerUrl?: string;
80
+ userId?: string;
81
+ disabled?: boolean;
82
+ log?: boolean;
83
+ }
84
+
85
+ export default class MatomoTracker {
86
+ constructor(props: InstanceProps);
87
+ trackAppStart(params: AppStart): Promise<Response>;
88
+ trackScreenView(params: Action): Promise<Response>;
89
+ trackAction(params: Action): Promise<Response>;
90
+ trackEvent(params: Event): Promise<Response>;
91
+ trackSiteSearch(params: SiteSearch): Promise<Response>;
92
+ trackLink(params: Link): Promise<Response>;
93
+ trackDownload(params: Download): Promise<Response>;
94
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@types/matomo-tracker-react-native",
3
+ "version": "0.3.0",
4
+ "description": "TypeScript definitions for matomo-tracker-react-native",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/matomo-tracker-react-native",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Zeynep Ece Ergin",
10
+ "url": "https://github.com/zecergin",
11
+ "githubUsername": "zecergin"
12
+ }
13
+ ],
14
+ "main": "",
15
+ "types": "index.d.ts",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
19
+ "directory": "types/matomo-tracker-react-native"
20
+ },
21
+ "scripts": {},
22
+ "dependencies": {
23
+ "@types/react": "*"
24
+ },
25
+ "typesPublisherContentHash": "250ec231306f46a3f57bcab863c3aba14be71076e999fce485d9f1ecf045cc66",
26
+ "typeScriptVersion": "4.4"
27
+ }