analytica.click 0.0.426 → 0.0.428
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/dist/{components → analytica.click/src/components}/AnalyticaConfig/index.d.ts +1 -1
- package/dist/{helpers → analytica.click/src/helpers}/errorTrack.d.ts +1 -1
- package/dist/{helpers → analytica.click/src/helpers}/track.d.ts +1 -1
- package/dist/{helpers → analytica.click/src/helpers}/trackServer.d.ts +1 -1
- package/dist/analytica.click/src/index.d.ts +2 -0
- package/dist/common/src/api/apis/DefaultApi.d.ts +117 -0
- package/dist/common/src/api/apis/index.d.ts +1 -0
- package/dist/common/src/api/index.d.ts +3 -0
- package/dist/common/src/api/models/ApiKey.d.ts +45 -0
- package/dist/common/src/api/models/ArchiveErrors.d.ts +27 -0
- package/dist/common/src/api/models/BingIntegration.d.ts +33 -0
- package/dist/common/src/api/models/Browser.d.ts +57 -0
- package/dist/common/src/api/models/DeleteAccount.d.ts +27 -0
- package/dist/common/src/api/models/Event.d.ts +57 -0
- package/dist/common/src/api/models/GetAccount.d.ts +51 -0
- package/dist/common/src/api/models/GetAccounts.d.ts +52 -0
- package/dist/common/src/api/models/GoogleIntegration.d.ts +39 -0
- package/dist/common/src/api/models/Language.d.ts +57 -0
- package/dist/common/src/api/models/Location.d.ts +57 -0
- package/dist/common/src/api/models/ModelError.d.ts +99 -0
- package/dist/common/src/api/models/PostAccount.d.ts +27 -0
- package/dist/common/src/api/models/PostError.d.ts +34 -0
- package/dist/common/src/api/models/PostErrorData.d.ts +51 -0
- package/dist/common/src/api/models/PostSiteTrack.d.ts +34 -0
- package/dist/common/src/api/models/PostSiteTrackData.d.ts +57 -0
- package/dist/common/src/api/models/Query.d.ts +69 -0
- package/dist/common/src/api/models/Referrer.d.ts +57 -0
- package/dist/common/src/api/models/Resolution.d.ts +57 -0
- package/dist/common/src/api/models/Rollup.d.ts +94 -0
- package/dist/common/src/api/models/RollupTopBrowsers.d.ts +33 -0
- package/dist/common/src/api/models/RollupTopErrors.d.ts +33 -0
- package/dist/common/src/api/models/RollupTopEvents.d.ts +33 -0
- package/dist/common/src/api/models/RollupTopLanguages.d.ts +33 -0
- package/dist/common/src/api/models/RollupTopLocations.d.ts +33 -0
- package/dist/common/src/api/models/RollupTopQueries.d.ts +33 -0
- package/dist/common/src/api/models/RollupTopReferrers.d.ts +33 -0
- package/dist/common/src/api/models/RollupTopResolutions.d.ts +33 -0
- package/dist/common/src/api/models/SeoResult.d.ts +64 -0
- package/dist/common/src/api/models/SeoResultValues.d.ts +45 -0
- package/dist/common/src/api/models/SiteData.d.ts +94 -0
- package/dist/common/src/api/models/SiteDetails.d.ts +45 -0
- package/dist/common/src/api/models/index.d.ts +33 -0
- package/dist/common/src/helpers/logsend.d.ts +2 -0
- package/dist/common-ui/src/components/ErrorBoundary/index.d.ts +16 -0
- package/dist/common-ui/src/types/widgets.d.ts +17 -0
- package/dist/helpers/trackServer.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/package.json +2 -2
- /package/dist/{components → analytica.click/src/components}/ErrorBoundary/index.d.ts +0 -0
- /package/dist/{components → analytica.click/src/components}/index.d.ts +0 -0
- /package/dist/{helpers → analytica.click/src/helpers}/index.d.ts +0 -0
- /package/dist/{helpers → analytica.click/src/helpers}/log.d.ts +0 -0
- /package/dist/{helpers → analytica.click/src/helpers}/object.d.ts +0 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* analytica.click
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
* Contact: support@analytica.click
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
* @export
|
15
|
+
* @interface RollupTopLanguages
|
16
|
+
*/
|
17
|
+
export interface RollupTopLanguages {
|
18
|
+
/**
|
19
|
+
*
|
20
|
+
* @type {string}
|
21
|
+
* @memberof RollupTopLanguages
|
22
|
+
*/
|
23
|
+
language: string;
|
24
|
+
/**
|
25
|
+
*
|
26
|
+
* @type {number}
|
27
|
+
* @memberof RollupTopLanguages
|
28
|
+
*/
|
29
|
+
count: number;
|
30
|
+
}
|
31
|
+
export declare function RollupTopLanguagesFromJSON(json: any): RollupTopLanguages;
|
32
|
+
export declare function RollupTopLanguagesFromJSONTyped(json: any, ignoreDiscriminator: boolean): RollupTopLanguages;
|
33
|
+
export declare function RollupTopLanguagesToJSON(value?: RollupTopLanguages | null): any;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* analytica.click
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
* Contact: support@analytica.click
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
* @export
|
15
|
+
* @interface RollupTopLocations
|
16
|
+
*/
|
17
|
+
export interface RollupTopLocations {
|
18
|
+
/**
|
19
|
+
*
|
20
|
+
* @type {string}
|
21
|
+
* @memberof RollupTopLocations
|
22
|
+
*/
|
23
|
+
countryRegion: string;
|
24
|
+
/**
|
25
|
+
*
|
26
|
+
* @type {number}
|
27
|
+
* @memberof RollupTopLocations
|
28
|
+
*/
|
29
|
+
count: number;
|
30
|
+
}
|
31
|
+
export declare function RollupTopLocationsFromJSON(json: any): RollupTopLocations;
|
32
|
+
export declare function RollupTopLocationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): RollupTopLocations;
|
33
|
+
export declare function RollupTopLocationsToJSON(value?: RollupTopLocations | null): any;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* analytica.click
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
* Contact: support@analytica.click
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
* @export
|
15
|
+
* @interface RollupTopQueries
|
16
|
+
*/
|
17
|
+
export interface RollupTopQueries {
|
18
|
+
/**
|
19
|
+
*
|
20
|
+
* @type {string}
|
21
|
+
* @memberof RollupTopQueries
|
22
|
+
*/
|
23
|
+
pathName: string;
|
24
|
+
/**
|
25
|
+
*
|
26
|
+
* @type {number}
|
27
|
+
* @memberof RollupTopQueries
|
28
|
+
*/
|
29
|
+
count: number;
|
30
|
+
}
|
31
|
+
export declare function RollupTopQueriesFromJSON(json: any): RollupTopQueries;
|
32
|
+
export declare function RollupTopQueriesFromJSONTyped(json: any, ignoreDiscriminator: boolean): RollupTopQueries;
|
33
|
+
export declare function RollupTopQueriesToJSON(value?: RollupTopQueries | null): any;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* analytica.click
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
* Contact: support@analytica.click
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
* @export
|
15
|
+
* @interface RollupTopReferrers
|
16
|
+
*/
|
17
|
+
export interface RollupTopReferrers {
|
18
|
+
/**
|
19
|
+
*
|
20
|
+
* @type {string}
|
21
|
+
* @memberof RollupTopReferrers
|
22
|
+
*/
|
23
|
+
referrer: string;
|
24
|
+
/**
|
25
|
+
*
|
26
|
+
* @type {number}
|
27
|
+
* @memberof RollupTopReferrers
|
28
|
+
*/
|
29
|
+
count: number;
|
30
|
+
}
|
31
|
+
export declare function RollupTopReferrersFromJSON(json: any): RollupTopReferrers;
|
32
|
+
export declare function RollupTopReferrersFromJSONTyped(json: any, ignoreDiscriminator: boolean): RollupTopReferrers;
|
33
|
+
export declare function RollupTopReferrersToJSON(value?: RollupTopReferrers | null): any;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* analytica.click
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
* Contact: support@analytica.click
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
* @export
|
15
|
+
* @interface RollupTopResolutions
|
16
|
+
*/
|
17
|
+
export interface RollupTopResolutions {
|
18
|
+
/**
|
19
|
+
*
|
20
|
+
* @type {string}
|
21
|
+
* @memberof RollupTopResolutions
|
22
|
+
*/
|
23
|
+
resolution: string;
|
24
|
+
/**
|
25
|
+
*
|
26
|
+
* @type {number}
|
27
|
+
* @memberof RollupTopResolutions
|
28
|
+
*/
|
29
|
+
count: number;
|
30
|
+
}
|
31
|
+
export declare function RollupTopResolutionsFromJSON(json: any): RollupTopResolutions;
|
32
|
+
export declare function RollupTopResolutionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): RollupTopResolutions;
|
33
|
+
export declare function RollupTopResolutionsToJSON(value?: RollupTopResolutions | null): any;
|
@@ -0,0 +1,64 @@
|
|
1
|
+
/**
|
2
|
+
* analytica.click
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
* Contact: support@analytica.click
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*/
|
12
|
+
import { SeoResultValues } from './';
|
13
|
+
/**
|
14
|
+
*
|
15
|
+
* @export
|
16
|
+
* @interface SeoResult
|
17
|
+
*/
|
18
|
+
export interface SeoResult {
|
19
|
+
/**
|
20
|
+
*
|
21
|
+
* @type {string}
|
22
|
+
* @memberof SeoResult
|
23
|
+
*/
|
24
|
+
account: string;
|
25
|
+
/**
|
26
|
+
*
|
27
|
+
* @type {string}
|
28
|
+
* @memberof SeoResult
|
29
|
+
*/
|
30
|
+
email: string;
|
31
|
+
/**
|
32
|
+
*
|
33
|
+
* @type {string}
|
34
|
+
* @memberof SeoResult
|
35
|
+
*/
|
36
|
+
site: string;
|
37
|
+
/**
|
38
|
+
*
|
39
|
+
* @type {number}
|
40
|
+
* @memberof SeoResult
|
41
|
+
*/
|
42
|
+
datetime: number;
|
43
|
+
/**
|
44
|
+
*
|
45
|
+
* @type {string}
|
46
|
+
* @memberof SeoResult
|
47
|
+
*/
|
48
|
+
category: string;
|
49
|
+
/**
|
50
|
+
*
|
51
|
+
* @type {SeoResultValues}
|
52
|
+
* @memberof SeoResult
|
53
|
+
*/
|
54
|
+
totals: SeoResultValues;
|
55
|
+
/**
|
56
|
+
*
|
57
|
+
* @type {Array<SeoResultValues>}
|
58
|
+
* @memberof SeoResult
|
59
|
+
*/
|
60
|
+
queries: Array<SeoResultValues>;
|
61
|
+
}
|
62
|
+
export declare function SeoResultFromJSON(json: any): SeoResult;
|
63
|
+
export declare function SeoResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): SeoResult;
|
64
|
+
export declare function SeoResultToJSON(value?: SeoResult | null): any;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* analytica.click
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
* Contact: support@analytica.click
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
* @export
|
15
|
+
* @interface SeoResultValues
|
16
|
+
*/
|
17
|
+
export interface SeoResultValues {
|
18
|
+
/**
|
19
|
+
*
|
20
|
+
* @type {number}
|
21
|
+
* @memberof SeoResultValues
|
22
|
+
*/
|
23
|
+
clicks: number;
|
24
|
+
/**
|
25
|
+
*
|
26
|
+
* @type {number}
|
27
|
+
* @memberof SeoResultValues
|
28
|
+
*/
|
29
|
+
impressions: number;
|
30
|
+
/**
|
31
|
+
*
|
32
|
+
* @type {number}
|
33
|
+
* @memberof SeoResultValues
|
34
|
+
*/
|
35
|
+
position: number;
|
36
|
+
/**
|
37
|
+
*
|
38
|
+
* @type {string}
|
39
|
+
* @memberof SeoResultValues
|
40
|
+
*/
|
41
|
+
query: string;
|
42
|
+
}
|
43
|
+
export declare function SeoResultValuesFromJSON(json: any): SeoResultValues;
|
44
|
+
export declare function SeoResultValuesFromJSONTyped(json: any, ignoreDiscriminator: boolean): SeoResultValues;
|
45
|
+
export declare function SeoResultValuesToJSON(value?: SeoResultValues | null): any;
|
@@ -0,0 +1,94 @@
|
|
1
|
+
/**
|
2
|
+
* analytica.click
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
* Contact: support@analytica.click
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*/
|
12
|
+
import { Browser, Event, GetAccount, Language, Location, ModelError, Query, Referrer, Resolution, Rollup, SeoResult } from './';
|
13
|
+
/**
|
14
|
+
*
|
15
|
+
* @export
|
16
|
+
* @interface SiteData
|
17
|
+
*/
|
18
|
+
export interface SiteData {
|
19
|
+
/**
|
20
|
+
*
|
21
|
+
* @type {GetAccount}
|
22
|
+
* @memberof SiteData
|
23
|
+
*/
|
24
|
+
details?: GetAccount;
|
25
|
+
/**
|
26
|
+
*
|
27
|
+
* @type {Array<Browser>}
|
28
|
+
* @memberof SiteData
|
29
|
+
*/
|
30
|
+
browsers?: Array<Browser>;
|
31
|
+
/**
|
32
|
+
*
|
33
|
+
* @type {Array<Event>}
|
34
|
+
* @memberof SiteData
|
35
|
+
*/
|
36
|
+
events?: Array<Event>;
|
37
|
+
/**
|
38
|
+
*
|
39
|
+
* @type {Array<Location>}
|
40
|
+
* @memberof SiteData
|
41
|
+
*/
|
42
|
+
locations?: Array<Location>;
|
43
|
+
/**
|
44
|
+
*
|
45
|
+
* @type {Array<Query>}
|
46
|
+
* @memberof SiteData
|
47
|
+
*/
|
48
|
+
queries?: Array<Query>;
|
49
|
+
/**
|
50
|
+
*
|
51
|
+
* @type {Array<Referrer>}
|
52
|
+
* @memberof SiteData
|
53
|
+
*/
|
54
|
+
referrers?: Array<Referrer>;
|
55
|
+
/**
|
56
|
+
*
|
57
|
+
* @type {Array<Resolution>}
|
58
|
+
* @memberof SiteData
|
59
|
+
*/
|
60
|
+
resolutions?: Array<Resolution>;
|
61
|
+
/**
|
62
|
+
*
|
63
|
+
* @type {Array<Language>}
|
64
|
+
* @memberof SiteData
|
65
|
+
*/
|
66
|
+
languages?: Array<Language>;
|
67
|
+
/**
|
68
|
+
*
|
69
|
+
* @type {Array<Rollup>}
|
70
|
+
* @memberof SiteData
|
71
|
+
*/
|
72
|
+
rollups?: Array<Rollup>;
|
73
|
+
/**
|
74
|
+
*
|
75
|
+
* @type {Array<ModelError>}
|
76
|
+
* @memberof SiteData
|
77
|
+
*/
|
78
|
+
errors?: Array<ModelError>;
|
79
|
+
/**
|
80
|
+
*
|
81
|
+
* @type {Array<SeoResult>}
|
82
|
+
* @memberof SiteData
|
83
|
+
*/
|
84
|
+
google?: Array<SeoResult>;
|
85
|
+
/**
|
86
|
+
*
|
87
|
+
* @type {Array<SeoResult>}
|
88
|
+
* @memberof SiteData
|
89
|
+
*/
|
90
|
+
bing?: Array<SeoResult>;
|
91
|
+
}
|
92
|
+
export declare function SiteDataFromJSON(json: any): SiteData;
|
93
|
+
export declare function SiteDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteData;
|
94
|
+
export declare function SiteDataToJSON(value?: SiteData | null): any;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* analytica.click
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
* Contact: support@analytica.click
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*/
|
12
|
+
/**
|
13
|
+
*
|
14
|
+
* @export
|
15
|
+
* @interface SiteDetails
|
16
|
+
*/
|
17
|
+
export interface SiteDetails {
|
18
|
+
/**
|
19
|
+
*
|
20
|
+
* @type {string}
|
21
|
+
* @memberof SiteDetails
|
22
|
+
*/
|
23
|
+
site: string;
|
24
|
+
/**
|
25
|
+
*
|
26
|
+
* @type {string}
|
27
|
+
* @memberof SiteDetails
|
28
|
+
*/
|
29
|
+
account: string;
|
30
|
+
/**
|
31
|
+
*
|
32
|
+
* @type {string}
|
33
|
+
* @memberof SiteDetails
|
34
|
+
*/
|
35
|
+
favicon?: string;
|
36
|
+
/**
|
37
|
+
*
|
38
|
+
* @type {string}
|
39
|
+
* @memberof SiteDetails
|
40
|
+
*/
|
41
|
+
category: string;
|
42
|
+
}
|
43
|
+
export declare function SiteDetailsFromJSON(json: any): SiteDetails;
|
44
|
+
export declare function SiteDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteDetails;
|
45
|
+
export declare function SiteDetailsToJSON(value?: SiteDetails | null): any;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
export * from './ApiKey';
|
2
|
+
export * from './ArchiveErrors';
|
3
|
+
export * from './BingIntegration';
|
4
|
+
export * from './Browser';
|
5
|
+
export * from './DeleteAccount';
|
6
|
+
export * from './Event';
|
7
|
+
export * from './GetAccount';
|
8
|
+
export * from './GetAccounts';
|
9
|
+
export * from './GoogleIntegration';
|
10
|
+
export * from './Language';
|
11
|
+
export * from './Location';
|
12
|
+
export * from './ModelError';
|
13
|
+
export * from './PostAccount';
|
14
|
+
export * from './PostError';
|
15
|
+
export * from './PostErrorData';
|
16
|
+
export * from './PostSiteTrack';
|
17
|
+
export * from './PostSiteTrackData';
|
18
|
+
export * from './Query';
|
19
|
+
export * from './Referrer';
|
20
|
+
export * from './Resolution';
|
21
|
+
export * from './Rollup';
|
22
|
+
export * from './RollupTopBrowsers';
|
23
|
+
export * from './RollupTopErrors';
|
24
|
+
export * from './RollupTopEvents';
|
25
|
+
export * from './RollupTopLanguages';
|
26
|
+
export * from './RollupTopLocations';
|
27
|
+
export * from './RollupTopQueries';
|
28
|
+
export * from './RollupTopReferrers';
|
29
|
+
export * from './RollupTopResolutions';
|
30
|
+
export * from './SeoResult';
|
31
|
+
export * from './SeoResultValues';
|
32
|
+
export * from './SiteData';
|
33
|
+
export * from './SiteDetails';
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { Component } from 'react';
|
2
|
+
import type { TErrorMessage } from '../../types/widgets';
|
3
|
+
export interface IErrorBoundaryProps {
|
4
|
+
notify?: TErrorMessage;
|
5
|
+
children?: JSX.Element | JSX.Element[];
|
6
|
+
}
|
7
|
+
export declare class ErrorBoundary extends Component<IErrorBoundaryProps, {
|
8
|
+
hasError: Error | ErrorEvent | undefined;
|
9
|
+
}> {
|
10
|
+
seenError: boolean;
|
11
|
+
constructor(props: any);
|
12
|
+
static getDerivedStateFromError(errorV: any): {
|
13
|
+
hasError: any;
|
14
|
+
};
|
15
|
+
render(): import("react/jsx-runtime").JSX.Element | JSX.Element[] | undefined;
|
16
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export type TTrackNoEvent = (p: Omit<ITrack, 'eventName'>) => Promise<{
|
2
|
+
error?: string;
|
3
|
+
}>;
|
4
|
+
export type TTrack = (p: ITrack) => Promise<{
|
5
|
+
error?: string;
|
6
|
+
}>;
|
7
|
+
export interface ITrack {
|
8
|
+
analyticaToken: string;
|
9
|
+
overrideBaseUrl?: string;
|
10
|
+
eventName: string;
|
11
|
+
}
|
12
|
+
export type TErrorMessage = (m: Error | ErrorEvent) => Promise<void>;
|
13
|
+
export interface IAnalyticaConfig {
|
14
|
+
analyticaToken?: string;
|
15
|
+
overrideBaseUrl?: string;
|
16
|
+
devMode?: boolean;
|
17
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
var Hr=Object.create;var ce=Object.defineProperty;var Wr=Object.getOwnPropertyDescriptor;var Xr=Object.getOwnPropertyNames;var Yr=Object.getPrototypeOf,Zr=Object.prototype.hasOwnProperty;var a=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),jr=(e,r)=>{for(var t in r)ce(e,t,{get:r[t],enumerable:!0})},be=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Xr(r))!Zr.call(e,i)&&i!==t&&ce(e,i,{get:()=>r[i],enumerable:!(n=Wr(r,i))||n.enumerable});return e};var et=(e,r,t)=>(t=e!=null?Hr(Yr(e)):{},be(r||!e||!e.__esModule?ce(t,"default",{value:e,enumerable:!0}):t,e)),rt=e=>be(ce({},"__esModule",{value:!0}),e);var m=a(s=>{"use strict";var ie=s&&s.__awaiter||function(e,r,t,n){function i(o){return o instanceof t?o:new t(function(l){l(o)})}return new(t||(t=Promise))(function(o,l){function ge(S){try{te(n.next(S))}catch(ne){l(ne)}}function Se(S){try{te(n.throw(S))}catch(ne){l(ne)}}function te(S){S.done?o(S.value):i(S.value).then(ge,Se)}te((n=n.apply(e,r||[])).next())})};Object.defineProperty(s,"__esModule",{value:!0});s.TextApiResponse=s.BlobApiResponse=s.VoidApiResponse=s.JSONApiResponse=s.canConsumeForm=s.mapValues=s.querystring=s.exists=s.Configuration=s.COLLECTION_FORMATS=s.RequiredError=s.BaseAPI=s.BASE_PATH=void 0;s.BASE_PATH="https://api.analytica.click".replace(/\/+$/,"");var tt=e=>typeof Blob<"u"&&e instanceof Blob,Oe=class{constructor(r=new se){this.configuration=r,this.fetchApi=(t,n)=>ie(this,void 0,void 0,function*(){let i={url:t,init:n};for(let l of this.middleware)l.pre&&(i=(yield l.pre(Object.assign({fetch:this.fetchApi},i)))||i);let o=yield(this.configuration.fetchApi||fetch)(i.url,i.init);for(let l of this.middleware)l.post&&(o=(yield l.post({fetch:this.fetchApi,url:i.url,init:i.init,response:o.clone()}))||o);return o}),this.middleware=r.middleware||[]}withMiddleware(...r){let t=this.clone();return t.middleware=t.middleware.concat(...r),t}withPreMiddleware(...r){let t=r.map(n=>({pre:n}));return this.withMiddleware(...t)}withPostMiddleware(...r){let t=r.map(n=>({post:n}));return this.withMiddleware(...t)}request(r,t){return ie(this,void 0,void 0,function*(){let{url:n,init:i}=this.createFetchParams(r,t),o=yield this.fetchApi(n,i);if(o.status>=200&&o.status<300)return o;throw o})}createFetchParams(r,t){let n=this.configuration.basePath+r.path;r.query!==void 0&&Object.keys(r.query).length!==0&&(n+="?"+(this.configuration.queryParamsStringify||de)(r.query));let i=typeof FormData<"u"&&r.body instanceof FormData||r.body instanceof URLSearchParams||tt(r.body)?r.body:JSON.stringify(r.body),o=Object.assign({},this.configuration.headers,r.headers),l=Object.assign({method:r.method,headers:o,body:i,credentials:this.configuration.credentials},t);return{url:n,init:l}}clone(){let r=this.constructor,t=new r(this.configuration);return t.middleware=this.middleware.slice(),t}};s.BaseAPI=Oe;var Te=class extends Error{constructor(r,t){super(t),this.field=r,this.name="RequiredError"}};s.RequiredError=Te;s.COLLECTION_FORMATS={csv:",",ssv:" ",tsv:" ",pipes:"|"};var se=class{constructor(r={}){this.configuration=r}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:s.BASE_PATH}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||de}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){let r=this.configuration.apiKey;if(r)return typeof r=="function"?r:()=>r}get accessToken(){let r=this.configuration.accessToken;if(r)return typeof r=="function"?r:()=>ie(this,void 0,void 0,function*(){return r})}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}};s.Configuration=se;function nt(e,r){let t=e[r];return t!=null}s.exists=nt;function de(e,r=""){return Object.keys(e).map(t=>{let n=r+(r.length?`[${t}]`:t),i=e[t];if(i instanceof Array){let o=i.map(l=>encodeURIComponent(String(l))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${o}`}return i instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(i.toISOString())}`:i instanceof Object?de(i,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(i))}`}).filter(t=>t.length>0).join("&")}s.querystring=de;function it(e,r){return Object.keys(e).reduce((t,n)=>Object.assign(Object.assign({},t),{[n]:r(e[n])}),{})}s.mapValues=it;function ot(e){for(let r of e)if(r.contentType==="multipart/form-data")return!0;return!1}s.canConsumeForm=ot;var ye=class{constructor(r,t=n=>n){this.raw=r,this.transformer=t}value(){return ie(this,void 0,void 0,function*(){return this.transformer(yield this.raw.json())})}};s.JSONApiResponse=ye;var Ne=class{constructor(r){this.raw=r}value(){return ie(this,void 0,void 0,function*(){})}};s.VoidApiResponse=Ne;var he=class{constructor(r){this.raw=r}value(){return ie(this,void 0,void 0,function*(){return yield this.raw.blob()})}};s.BlobApiResponse=he;var Je=class{constructor(r){this.raw=r}value(){return ie(this,void 0,void 0,function*(){return yield this.raw.text()})}};s.TextApiResponse=Je});var Ee=a(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.ApiKeyToJSON=J.ApiKeyFromJSONTyped=J.ApiKeyFromJSON=void 0;function ut(e){return Pe(e,!1)}J.ApiKeyFromJSON=ut;function Pe(e,r){return e==null?e:{key:e.key,adminKey:e.adminKey,site:e.site,account:e.account}}J.ApiKeyFromJSONTyped=Pe;function at(e){if(e!==void 0)return e===null?null:{key:e.key,adminKey:e.adminKey,site:e.site,account:e.account}}J.ApiKeyToJSON=at});var De=a(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.ArchiveErrorsToJSON=R.ArchiveErrorsFromJSONTyped=R.ArchiveErrorsFromJSON=void 0;function ct(e){return Ae(e,!1)}R.ArchiveErrorsFromJSON=ct;function Ae(e,r){return e==null?e:{PKsB64:e.PKsB64}}R.ArchiveErrorsFromJSONTyped=Ae;function st(e){if(e!==void 0)return e===null?null:{PKsB64:e.PKsB64}}R.ArchiveErrorsToJSON=st});var Le=a(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.BingIntegrationToJSON=F.BingIntegrationFromJSONTyped=F.BingIntegrationFromJSON=void 0;function dt(e){return qe(e,!1)}F.BingIntegrationFromJSON=dt;function qe(e,r){return e==null?e:{key:e.key,account:e.account}}F.BingIntegrationFromJSONTyped=qe;function ft(e){if(e!==void 0)return e===null?null:{key:e.key,account:e.account}}F.BingIntegrationToJSON=ft});var Ke=a(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.BrowserToJSON=w.BrowserFromJSONTyped=w.BrowserFromJSON=void 0;var lt=m();function pt(e){return ke(e,!1)}w.BrowserFromJSON=pt;function ke(e,r){return e==null?e:{account:(0,lt.exists)(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,browser:e.browser,count:e.count,category:e.category}}w.BrowserFromJSONTyped=ke;function mt(e){if(e!==void 0)return e===null?null:{account:e.account,datetime:e.datetime,site:e.site,browser:e.browser,count:e.count,category:e.category}}w.BrowserToJSON=mt});var Be=a(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});_.DeleteAccountToJSON=_.DeleteAccountFromJSONTyped=_.DeleteAccountFromJSON=void 0;function gt(e){return Me(e,!1)}_.DeleteAccountFromJSON=gt;function Me(e,r){return e==null?e:{site:e.site}}_.DeleteAccountFromJSONTyped=Me;function St(e){if(e!==void 0)return e===null?null:{site:e.site}}_.DeleteAccountToJSON=St});var Ie=a(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.EventToJSON=b.EventFromJSONTyped=b.EventFromJSON=void 0;var Ot=m();function Tt(e){return ve(e,!1)}b.EventFromJSON=Tt;function ve(e,r){return e==null?e:{account:(0,Ot.exists)(e,"account")?e.account:void 0,site:e.site,eventName:e.eventName,datetime:e.datetime,count:e.count,category:e.category}}b.EventFromJSONTyped=ve;function yt(e){if(e!==void 0)return e===null?null:{account:e.account,site:e.site,eventName:e.eventName,datetime:e.datetime,count:e.count,category:e.category}}b.EventToJSON=yt});var Ge=a(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.GetAccountToJSON=P.GetAccountFromJSONTyped=P.GetAccountFromJSON=void 0;var Nt=m();function ht(e){return xe(e,!1)}P.GetAccountFromJSON=ht;function xe(e,r){return e==null?e:{site:e.site,account:e.account,apiKey:e.apiKey,adminApiKey:e.adminApiKey,favicon:(0,Nt.exists)(e,"favicon")?e.favicon:void 0}}P.GetAccountFromJSONTyped=xe;function Jt(e){if(e!==void 0)return e===null?null:{site:e.site,account:e.account,apiKey:e.apiKey,adminApiKey:e.adminApiKey,favicon:e.favicon}}P.GetAccountToJSON=Jt});var Ce=a(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.GetAccountsToJSON=E.GetAccountsFromJSONTyped=E.GetAccountsFromJSON=void 0;var fe=m(),Qe=N();function Rt(e){return Ve(e,!1)}E.GetAccountsFromJSON=Rt;function Ve(e,r){return e==null?e:{accounts:e.accounts.map(Qe.GetAccountFromJSON),googleEmail:(0,fe.exists)(e,"googleEmail")?e.googleEmail:void 0,googleKey:(0,fe.exists)(e,"googleKey")?e.googleKey:void 0,bingKey:(0,fe.exists)(e,"bingKey")?e.bingKey:void 0,bingAccount:(0,fe.exists)(e,"bingAccount")?e.bingAccount:void 0}}E.GetAccountsFromJSONTyped=Ve;function Ft(e){if(e!==void 0)return e===null?null:{accounts:e.accounts.map(Qe.GetAccountToJSON),googleEmail:e.googleEmail,googleKey:e.googleKey,bingKey:e.bingKey,bingAccount:e.bingAccount}}E.GetAccountsToJSON=Ft});var $e=a(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.GoogleIntegrationToJSON=A.GoogleIntegrationFromJSONTyped=A.GoogleIntegrationFromJSON=void 0;function wt(e){return ze(e,!1)}A.GoogleIntegrationFromJSON=wt;function ze(e,r){return e==null?e:{email:e.email,key:e.key,account:e.account}}A.GoogleIntegrationFromJSONTyped=ze;function _t(e){if(e!==void 0)return e===null?null:{email:e.email,key:e.key,account:e.account}}A.GoogleIntegrationToJSON=_t});var He=a(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.LanguageToJSON=D.LanguageFromJSONTyped=D.LanguageFromJSON=void 0;var bt=m();function Pt(e){return Ue(e,!1)}D.LanguageFromJSON=Pt;function Ue(e,r){return e==null?e:{account:(0,bt.exists)(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,language:e.language,count:e.count,category:e.category}}D.LanguageFromJSONTyped=Ue;function Et(e){if(e!==void 0)return e===null?null:{account:e.account,datetime:e.datetime,site:e.site,language:e.language,count:e.count,category:e.category}}D.LanguageToJSON=Et});var Xe=a(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.LocationToJSON=q.LocationFromJSONTyped=q.LocationFromJSON=void 0;var At=m();function Dt(e){return We(e,!1)}q.LocationFromJSON=Dt;function We(e,r){return e==null?e:{account:(0,At.exists)(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,countryRegion:e.countryRegion,category:e.category,count:e.count}}q.LocationFromJSONTyped=We;function qt(e){if(e!==void 0)return e===null?null:{account:e.account,datetime:e.datetime,site:e.site,countryRegion:e.countryRegion,category:e.category,count:e.count}}q.LocationToJSON=qt});var Ze=a(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.ModelErrorToJSON=L.ModelErrorFromJSONTyped=L.ModelErrorFromJSON=void 0;var ue=m();function Lt(e){return Ye(e,!1)}L.ModelErrorFromJSON=Lt;function Ye(e,r){return e==null?e:{PK:e.PK,messageHash:(0,ue.exists)(e,"messageHash")?e.messageHash:void 0,site:e.site,account:e.account,message:(0,ue.exists)(e,"message")?e.message:void 0,name:(0,ue.exists)(e,"name")?e.name:void 0,stack:(0,ue.exists)(e,"stack")?e.stack:void 0,href:e.href,filename:(0,ue.exists)(e,"filename")?e.filename:void 0,datetime:e.datetime,archived:(0,ue.exists)(e,"archived")?e.archived:void 0,count:e.count,category:e.category}}L.ModelErrorFromJSONTyped=Ye;function kt(e){if(e!==void 0)return e===null?null:{PK:e.PK,messageHash:e.messageHash,site:e.site,account:e.account,message:e.message,name:e.name,stack:e.stack,href:e.href,filename:e.filename,datetime:e.datetime,archived:e.archived,count:e.count,category:e.category}}L.ModelErrorToJSON=kt});var er=a(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.PostAccountToJSON=k.PostAccountFromJSONTyped=k.PostAccountFromJSON=void 0;function Kt(e){return je(e,!1)}k.PostAccountFromJSON=Kt;function je(e,r){return e==null?e:{site:e.site}}k.PostAccountFromJSONTyped=je;function Mt(e){if(e!==void 0)return e===null?null:{site:e.site}}k.PostAccountToJSON=Mt});var nr=a(K=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.PostErrorToJSON=K.PostErrorFromJSONTyped=K.PostErrorFromJSON=void 0;var rr=N();function Bt(e){return tr(e,!1)}K.PostErrorFromJSON=Bt;function tr(e,r){return e==null?e:{key:e.key,data:(0,rr.PostErrorDataFromJSON)(e.data)}}K.PostErrorFromJSONTyped=tr;function vt(e){if(e!==void 0)return e===null?null:{key:e.key,data:(0,rr.PostErrorDataToJSON)(e.data)}}K.PostErrorToJSON=vt});var or=a(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.PostErrorDataToJSON=M.PostErrorDataFromJSONTyped=M.PostErrorDataFromJSON=void 0;var Re=m();function It(e){return ir(e,!1)}M.PostErrorDataFromJSON=It;function ir(e,r){return e==null?e:{message:e.message,name:(0,Re.exists)(e,"name")?e.name:void 0,stack:(0,Re.exists)(e,"stack")?e.stack:void 0,href:e.href,filename:(0,Re.exists)(e,"filename")?e.filename:void 0}}M.PostErrorDataFromJSONTyped=ir;function xt(e){if(e!==void 0)return e===null?null:{message:e.message,name:e.name,stack:e.stack,href:e.href,filename:e.filename}}M.PostErrorDataToJSON=xt});var cr=a(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.PostSiteTrackToJSON=B.PostSiteTrackFromJSONTyped=B.PostSiteTrackFromJSON=void 0;var ur=N();function Gt(e){return ar(e,!1)}B.PostSiteTrackFromJSON=Gt;function ar(e,r){return e==null?e:{key:e.key,data:(0,ur.PostSiteTrackDataFromJSON)(e.data)}}B.PostSiteTrackFromJSONTyped=ar;function Qt(e){if(e!==void 0)return e===null?null:{key:e.key,data:(0,ur.PostSiteTrackDataToJSON)(e.data)}}B.PostSiteTrackToJSON=Qt});var dr=a(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.PostSiteTrackDataToJSON=v.PostSiteTrackDataFromJSONTyped=v.PostSiteTrackDataFromJSON=void 0;var ae=m();function Vt(e){return sr(e,!1)}v.PostSiteTrackDataFromJSON=Vt;function sr(e,r){return e==null?e:{eventName:e.eventName,pageLocation:(0,ae.exists)(e,"pageLocation")?e.pageLocation:void 0,pageReferrer:(0,ae.exists)(e,"pageReferrer")?e.pageReferrer:void 0,pageTitle:(0,ae.exists)(e,"pageTitle")?e.pageTitle:void 0,browserResolution:(0,ae.exists)(e,"browserResolution")?e.browserResolution:void 0,browserLanguage:(0,ae.exists)(e,"browserLanguage")?e.browserLanguage:void 0}}v.PostSiteTrackDataFromJSONTyped=sr;function Ct(e){if(e!==void 0)return e===null?null:{eventName:e.eventName,pageLocation:e.pageLocation,pageReferrer:e.pageReferrer,pageTitle:e.pageTitle,browserResolution:e.browserResolution,browserLanguage:e.browserLanguage}}v.PostSiteTrackDataToJSON=Ct});var lr=a(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.QueryToJSON=I.QueryFromJSONTyped=I.QueryFromJSON=void 0;var Fe=m();function zt(e){return fr(e,!1)}I.QueryFromJSON=zt;function fr(e,r){return e==null?e:{account:(0,Fe.exists)(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,pathName:e.pathName,search:(0,Fe.exists)(e,"search")?e.search:void 0,hash:(0,Fe.exists)(e,"hash")?e.hash:void 0,count:e.count,category:e.category}}I.QueryFromJSONTyped=fr;function $t(e){if(e!==void 0)return e===null?null:{account:e.account,datetime:e.datetime,site:e.site,pathName:e.pathName,search:e.search,hash:e.hash,count:e.count,category:e.category}}I.QueryToJSON=$t});var mr=a(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.ReferrerToJSON=x.ReferrerFromJSONTyped=x.ReferrerFromJSON=void 0;var Ut=m();function Ht(e){return pr(e,!1)}x.ReferrerFromJSON=Ht;function pr(e,r){return e==null?e:{account:(0,Ut.exists)(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,referrer:e.referrer,count:e.count,category:e.category}}x.ReferrerFromJSONTyped=pr;function Wt(e){if(e!==void 0)return e===null?null:{account:e.account,datetime:e.datetime,site:e.site,referrer:e.referrer,count:e.count,category:e.category}}x.ReferrerToJSON=Wt});var Sr=a(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.ResolutionToJSON=G.ResolutionFromJSONTyped=G.ResolutionFromJSON=void 0;var Xt=m();function Yt(e){return gr(e,!1)}G.ResolutionFromJSON=Yt;function gr(e,r){return e==null?e:{account:(0,Xt.exists)(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,resolution:e.resolution,count:e.count,category:e.category}}G.ResolutionFromJSONTyped=gr;function Zt(e){if(e!==void 0)return e===null?null:{account:e.account,datetime:e.datetime,site:e.site,resolution:e.resolution,count:e.count,category:e.category}}G.ResolutionToJSON=Zt});var Tr=a(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.RollupToJSON=V.RollupFromJSONTyped=V.RollupFromJSON=void 0;var Q=m(),g=N();function jt(e){return Or(e,!1)}V.RollupFromJSON=jt;function Or(e,r){return e==null?e:{account:e.account,site:e.site,datetime:e.datetime,category:e.category,topReferrers:(0,Q.exists)(e,"topReferrers")?e.topReferrers.map(g.RollupTopReferrersFromJSON):void 0,topResolutions:(0,Q.exists)(e,"topResolutions")?e.topResolutions.map(g.RollupTopResolutionsFromJSON):void 0,topQueries:(0,Q.exists)(e,"topQueries")?e.topQueries.map(g.RollupTopQueriesFromJSON):void 0,topLocations:(0,Q.exists)(e,"topLocations")?e.topLocations.map(g.RollupTopLocationsFromJSON):void 0,topBrowsers:(0,Q.exists)(e,"topBrowsers")?e.topBrowsers.map(g.RollupTopBrowsersFromJSON):void 0,topEvents:(0,Q.exists)(e,"topEvents")?e.topEvents.map(g.RollupTopEventsFromJSON):void 0,topLanguages:(0,Q.exists)(e,"topLanguages")?e.topLanguages.map(g.RollupTopLanguagesFromJSON):void 0,topErrors:(0,Q.exists)(e,"topErrors")?e.topErrors.map(g.RollupTopErrorsFromJSON):void 0}}V.RollupFromJSONTyped=Or;function en(e){if(e!==void 0)return e===null?null:{account:e.account,site:e.site,datetime:e.datetime,category:e.category,topReferrers:e.topReferrers===void 0?void 0:e.topReferrers.map(g.RollupTopReferrersToJSON),topResolutions:e.topResolutions===void 0?void 0:e.topResolutions.map(g.RollupTopResolutionsToJSON),topQueries:e.topQueries===void 0?void 0:e.topQueries.map(g.RollupTopQueriesToJSON),topLocations:e.topLocations===void 0?void 0:e.topLocations.map(g.RollupTopLocationsToJSON),topBrowsers:e.topBrowsers===void 0?void 0:e.topBrowsers.map(g.RollupTopBrowsersToJSON),topEvents:e.topEvents===void 0?void 0:e.topEvents.map(g.RollupTopEventsToJSON),topLanguages:e.topLanguages===void 0?void 0:e.topLanguages.map(g.RollupTopLanguagesToJSON),topErrors:e.topErrors===void 0?void 0:e.topErrors.map(g.RollupTopErrorsToJSON)}}V.RollupToJSON=en});var Nr=a(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.RollupTopBrowsersToJSON=C.RollupTopBrowsersFromJSONTyped=C.RollupTopBrowsersFromJSON=void 0;function rn(e){return yr(e,!1)}C.RollupTopBrowsersFromJSON=rn;function yr(e,r){return e==null?e:{browser:e.browser,count:e.count}}C.RollupTopBrowsersFromJSONTyped=yr;function tn(e){if(e!==void 0)return e===null?null:{browser:e.browser,count:e.count}}C.RollupTopBrowsersToJSON=tn});var Jr=a(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.RollupTopErrorsToJSON=z.RollupTopErrorsFromJSONTyped=z.RollupTopErrorsFromJSON=void 0;function nn(e){return hr(e,!1)}z.RollupTopErrorsFromJSON=nn;function hr(e,r){return e==null?e:{href:e.href,count:e.count}}z.RollupTopErrorsFromJSONTyped=hr;function on(e){if(e!==void 0)return e===null?null:{href:e.href,count:e.count}}z.RollupTopErrorsToJSON=on});var Fr=a($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.RollupTopEventsToJSON=$.RollupTopEventsFromJSONTyped=$.RollupTopEventsFromJSON=void 0;function un(e){return Rr(e,!1)}$.RollupTopEventsFromJSON=un;function Rr(e,r){return e==null?e:{eventName:e.eventName,count:e.count}}$.RollupTopEventsFromJSONTyped=Rr;function an(e){if(e!==void 0)return e===null?null:{eventName:e.eventName,count:e.count}}$.RollupTopEventsToJSON=an});var _r=a(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.RollupTopLanguagesToJSON=U.RollupTopLanguagesFromJSONTyped=U.RollupTopLanguagesFromJSON=void 0;function cn(e){return wr(e,!1)}U.RollupTopLanguagesFromJSON=cn;function wr(e,r){return e==null?e:{language:e.language,count:e.count}}U.RollupTopLanguagesFromJSONTyped=wr;function sn(e){if(e!==void 0)return e===null?null:{language:e.language,count:e.count}}U.RollupTopLanguagesToJSON=sn});var Pr=a(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.RollupTopLocationsToJSON=H.RollupTopLocationsFromJSONTyped=H.RollupTopLocationsFromJSON=void 0;function dn(e){return br(e,!1)}H.RollupTopLocationsFromJSON=dn;function br(e,r){return e==null?e:{countryRegion:e.countryRegion,count:e.count}}H.RollupTopLocationsFromJSONTyped=br;function fn(e){if(e!==void 0)return e===null?null:{countryRegion:e.countryRegion,count:e.count}}H.RollupTopLocationsToJSON=fn});var Ar=a(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.RollupTopQueriesToJSON=W.RollupTopQueriesFromJSONTyped=W.RollupTopQueriesFromJSON=void 0;function ln(e){return Er(e,!1)}W.RollupTopQueriesFromJSON=ln;function Er(e,r){return e==null?e:{pathName:e.pathName,count:e.count}}W.RollupTopQueriesFromJSONTyped=Er;function pn(e){if(e!==void 0)return e===null?null:{pathName:e.pathName,count:e.count}}W.RollupTopQueriesToJSON=pn});var qr=a(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.RollupTopReferrersToJSON=X.RollupTopReferrersFromJSONTyped=X.RollupTopReferrersFromJSON=void 0;function mn(e){return Dr(e,!1)}X.RollupTopReferrersFromJSON=mn;function Dr(e,r){return e==null?e:{referrer:e.referrer,count:e.count}}X.RollupTopReferrersFromJSONTyped=Dr;function gn(e){if(e!==void 0)return e===null?null:{referrer:e.referrer,count:e.count}}X.RollupTopReferrersToJSON=gn});var kr=a(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.RollupTopResolutionsToJSON=Y.RollupTopResolutionsFromJSONTyped=Y.RollupTopResolutionsFromJSON=void 0;function Sn(e){return Lr(e,!1)}Y.RollupTopResolutionsFromJSON=Sn;function Lr(e,r){return e==null?e:{resolution:e.resolution,count:e.count}}Y.RollupTopResolutionsFromJSONTyped=Lr;function On(e){if(e!==void 0)return e===null?null:{resolution:e.resolution,count:e.count}}Y.RollupTopResolutionsToJSON=On});var Mr=a(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.SeoResultToJSON=Z.SeoResultFromJSONTyped=Z.SeoResultFromJSON=void 0;var le=N();function Tn(e){return Kr(e,!1)}Z.SeoResultFromJSON=Tn;function Kr(e,r){return e==null?e:{account:e.account,email:e.email,site:e.site,datetime:e.datetime,category:e.category,totals:(0,le.SeoResultValuesFromJSON)(e.totals),queries:e.queries.map(le.SeoResultValuesFromJSON)}}Z.SeoResultFromJSONTyped=Kr;function yn(e){if(e!==void 0)return e===null?null:{account:e.account,email:e.email,site:e.site,datetime:e.datetime,category:e.category,totals:(0,le.SeoResultValuesToJSON)(e.totals),queries:e.queries.map(le.SeoResultValuesToJSON)}}Z.SeoResultToJSON=yn});var vr=a(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.SeoResultValuesToJSON=j.SeoResultValuesFromJSONTyped=j.SeoResultValuesFromJSON=void 0;function Nn(e){return Br(e,!1)}j.SeoResultValuesFromJSON=Nn;function Br(e,r){return e==null?e:{clicks:e.clicks,impressions:e.impressions,position:e.position,query:e.query}}j.SeoResultValuesFromJSONTyped=Br;function hn(e){if(e!==void 0)return e===null?null:{clicks:e.clicks,impressions:e.impressions,position:e.position,query:e.query}}j.SeoResultValuesToJSON=hn});var xr=a(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.SiteDataToJSON=ee.SiteDataFromJSONTyped=ee.SiteDataFromJSON=void 0;var O=m(),f=N();function Jn(e){return Ir(e,!1)}ee.SiteDataFromJSON=Jn;function Ir(e,r){return e==null?e:{details:(0,O.exists)(e,"details")?(0,f.GetAccountFromJSON)(e.details):void 0,browsers:(0,O.exists)(e,"browsers")?e.browsers.map(f.BrowserFromJSON):void 0,events:(0,O.exists)(e,"events")?e.events.map(f.EventFromJSON):void 0,locations:(0,O.exists)(e,"locations")?e.locations.map(f.LocationFromJSON):void 0,queries:(0,O.exists)(e,"queries")?e.queries.map(f.QueryFromJSON):void 0,referrers:(0,O.exists)(e,"referrers")?e.referrers.map(f.ReferrerFromJSON):void 0,resolutions:(0,O.exists)(e,"resolutions")?e.resolutions.map(f.ResolutionFromJSON):void 0,languages:(0,O.exists)(e,"languages")?e.languages.map(f.LanguageFromJSON):void 0,rollups:(0,O.exists)(e,"rollups")?e.rollups.map(f.RollupFromJSON):void 0,errors:(0,O.exists)(e,"errors")?e.errors.map(f.ModelErrorFromJSON):void 0,google:(0,O.exists)(e,"google")?e.google.map(f.SeoResultFromJSON):void 0,bing:(0,O.exists)(e,"bing")?e.bing.map(f.SeoResultFromJSON):void 0}}ee.SiteDataFromJSONTyped=Ir;function Rn(e){if(e!==void 0)return e===null?null:{details:(0,f.GetAccountToJSON)(e.details),browsers:e.browsers===void 0?void 0:e.browsers.map(f.BrowserToJSON),events:e.events===void 0?void 0:e.events.map(f.EventToJSON),locations:e.locations===void 0?void 0:e.locations.map(f.LocationToJSON),queries:e.queries===void 0?void 0:e.queries.map(f.QueryToJSON),referrers:e.referrers===void 0?void 0:e.referrers.map(f.ReferrerToJSON),resolutions:e.resolutions===void 0?void 0:e.resolutions.map(f.ResolutionToJSON),languages:e.languages===void 0?void 0:e.languages.map(f.LanguageToJSON),rollups:e.rollups===void 0?void 0:e.rollups.map(f.RollupToJSON),errors:e.errors===void 0?void 0:e.errors.map(f.ModelErrorToJSON),google:e.google===void 0?void 0:e.google.map(f.SeoResultToJSON),bing:e.bing===void 0?void 0:e.bing.map(f.SeoResultToJSON)}}ee.SiteDataToJSON=Rn});var Qr=a(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.SiteDetailsToJSON=re.SiteDetailsFromJSONTyped=re.SiteDetailsFromJSON=void 0;var Fn=m();function wn(e){return Gr(e,!1)}re.SiteDetailsFromJSON=wn;function Gr(e,r){return e==null?e:{site:e.site,account:e.account,favicon:(0,Fn.exists)(e,"favicon")?e.favicon:void 0,category:e.category}}re.SiteDetailsFromJSONTyped=Gr;function _n(e){if(e!==void 0)return e===null?null:{site:e.site,account:e.account,favicon:e.favicon,category:e.category}}re.SiteDetailsToJSON=_n});var N=a(u=>{"use strict";var bn=u&&u.__createBinding||(Object.create?function(e,r,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(r,t);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,n,i)}:function(e,r,t,n){n===void 0&&(n=t),e[n]=r[t]}),c=u&&u.__exportStar||function(e,r){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(r,t)&&bn(r,e,t)};Object.defineProperty(u,"__esModule",{value:!0});c(Ee(),u);c(De(),u);c(Le(),u);c(Ke(),u);c(Be(),u);c(Ie(),u);c(Ge(),u);c(Ce(),u);c($e(),u);c(He(),u);c(Xe(),u);c(Ze(),u);c(er(),u);c(nr(),u);c(or(),u);c(cr(),u);c(dr(),u);c(lr(),u);c(mr(),u);c(Sr(),u);c(Tr(),u);c(Nr(),u);c(Jr(),u);c(Fr(),u);c(_r(),u);c(Pr(),u);c(Ar(),u);c(qr(),u);c(kr(),u);c(Mr(),u);c(vr(),u);c(xr(),u);c(Qr(),u)});var Vr=a(T=>{"use strict";var Pn=T&&T.__createBinding||(Object.create?function(e,r,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(r,t);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,n,i)}:function(e,r,t,n){n===void 0&&(n=t),e[n]=r[t]}),En=T&&T.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),An=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&Pn(r,e,t);return En(r,e),r},p=T&&T.__awaiter||function(e,r,t,n){function i(o){return o instanceof t?o:new t(function(l){l(o)})}return new(t||(t=Promise))(function(o,l){function ge(S){try{te(n.next(S))}catch(ne){l(ne)}}function Se(S){try{te(n.throw(S))}catch(ne){l(ne)}}function te(S){S.done?o(S.value):i(S.value).then(ge,Se)}te((n=n.apply(e,r||[])).next())})};Object.defineProperty(T,"__esModule",{value:!0});T.DefaultApi=void 0;var d=An(m()),y=N(),we=class extends d.BaseAPI{accountGetRaw(r){return p(this,void 0,void 0,function*(){let t={},n={};this.configuration&&this.configuration.apiKey&&(n.authorization=this.configuration.apiKey("authorization"));let i=yield this.request({path:"/account",method:"GET",headers:n,query:t},r);return new d.JSONApiResponse(i,o=>(0,y.GetAccountsFromJSON)(o))})}accountGet(r){return p(this,void 0,void 0,function*(){return yield(yield this.accountGetRaw(r)).value()})}archiveErrorRaw(r,t){return p(this,void 0,void 0,function*(){if(r.id===null||r.id===void 0)throw new d.RequiredError("id","Required parameter requestParameters.id was null or undefined when calling archiveError.");let n={},i={};this.configuration&&this.configuration.apiKey&&(i.authorization=this.configuration.apiKey("authorization"));let o=yield this.request({path:"/errors/{id}".replace("{id}",encodeURIComponent(String(r.id))),method:"DELETE",headers:i,query:n},t);return new d.VoidApiResponse(o)})}archiveError(r,t){return p(this,void 0,void 0,function*(){yield this.archiveErrorRaw(r,t)})}archiveErrorsRaw(r,t){return p(this,void 0,void 0,function*(){if(r.archiveErrors===null||r.archiveErrors===void 0)throw new d.RequiredError("archiveErrors","Required parameter requestParameters.archiveErrors was null or undefined when calling archiveErrors.");let n={},i={};i["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(i.authorization=this.configuration.apiKey("authorization"));let o=yield this.request({path:"/errors",method:"DELETE",headers:i,query:n,body:(0,y.ArchiveErrorsToJSON)(r.archiveErrors)},t);return new d.VoidApiResponse(o)})}archiveErrors(r,t){return p(this,void 0,void 0,function*(){yield this.archiveErrorsRaw(r,t)})}bingIntegrationPostRaw(r,t){return p(this,void 0,void 0,function*(){if(r.bingIntegration===null||r.bingIntegration===void 0)throw new d.RequiredError("bingIntegration","Required parameter requestParameters.bingIntegration was null or undefined when calling bingIntegrationPost.");let n={},i={};i["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(i.authorization=this.configuration.apiKey("authorization"));let o=yield this.request({path:"/account/integrations/bing",method:"POST",headers:i,query:n,body:(0,y.BingIntegrationToJSON)(r.bingIntegration)},t);return new d.VoidApiResponse(o)})}bingIntegrationPost(r,t){return p(this,void 0,void 0,function*(){yield this.bingIntegrationPostRaw(r,t)})}getTrackingAllSitesRaw(r,t){return p(this,void 0,void 0,function*(){if(r.minDate===null||r.minDate===void 0)throw new d.RequiredError("minDate","Required parameter requestParameters.minDate was null or undefined when calling getTrackingAllSites.");if(r.maxDate===null||r.maxDate===void 0)throw new d.RequiredError("maxDate","Required parameter requestParameters.maxDate was null or undefined when calling getTrackingAllSites.");let n={};r.minDate!==void 0&&(n.minDate=r.minDate),r.maxDate!==void 0&&(n.maxDate=r.maxDate);let i={};this.configuration&&this.configuration.apiKey&&(i.authorization=this.configuration.apiKey("authorization"));let o=yield this.request({path:"/site/tracking",method:"GET",headers:i,query:n},t);return new d.JSONApiResponse(o,l=>l.map(y.SiteDataFromJSON))})}getTrackingAllSites(r,t){return p(this,void 0,void 0,function*(){return yield(yield this.getTrackingAllSitesRaw(r,t)).value()})}getTrackingSiteRaw(r,t){return p(this,void 0,void 0,function*(){if(r.id===null||r.id===void 0)throw new d.RequiredError("id","Required parameter requestParameters.id was null or undefined when calling getTrackingSite.");if(r.minDate===null||r.minDate===void 0)throw new d.RequiredError("minDate","Required parameter requestParameters.minDate was null or undefined when calling getTrackingSite.");if(r.maxDate===null||r.maxDate===void 0)throw new d.RequiredError("maxDate","Required parameter requestParameters.maxDate was null or undefined when calling getTrackingSite.");let n={};r.minDate!==void 0&&(n.minDate=r.minDate),r.maxDate!==void 0&&(n.maxDate=r.maxDate);let i={};this.configuration&&this.configuration.apiKey&&(i.authorization=this.configuration.apiKey("authorization"));let o=yield this.request({path:"/site/tracking/{id}".replace("{id}",encodeURIComponent(String(r.id))),method:"GET",headers:i,query:n},t);return new d.JSONApiResponse(o,l=>(0,y.SiteDataFromJSON)(l))})}getTrackingSite(r,t){return p(this,void 0,void 0,function*(){return yield(yield this.getTrackingSiteRaw(r,t)).value()})}googleIntegrationPostRaw(r,t){return p(this,void 0,void 0,function*(){if(r.googleIntegration===null||r.googleIntegration===void 0)throw new d.RequiredError("googleIntegration","Required parameter requestParameters.googleIntegration was null or undefined when calling googleIntegrationPost.");let n={},i={};i["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(i.authorization=this.configuration.apiKey("authorization"));let o=yield this.request({path:"/account/integrations/google",method:"POST",headers:i,query:n,body:(0,y.GoogleIntegrationToJSON)(r.googleIntegration)},t);return new d.VoidApiResponse(o)})}googleIntegrationPost(r,t){return p(this,void 0,void 0,function*(){yield this.googleIntegrationPostRaw(r,t)})}postErrorsRaw(r,t){return p(this,void 0,void 0,function*(){if(r.postError===null||r.postError===void 0)throw new d.RequiredError("postError","Required parameter requestParameters.postError was null or undefined when calling postErrors.");let n={},i={};i["Content-Type"]="application/json";let o=yield this.request({path:"/errors",method:"POST",headers:i,query:n,body:r.postError.map(y.PostErrorToJSON)},t);return new d.VoidApiResponse(o)})}postErrors(r,t){return p(this,void 0,void 0,function*(){yield this.postErrorsRaw(r,t)})}postPageTrackRaw(r,t){return p(this,void 0,void 0,function*(){if(r.postSiteTrack===null||r.postSiteTrack===void 0)throw new d.RequiredError("postSiteTrack","Required parameter requestParameters.postSiteTrack was null or undefined when calling postPageTrack.");let n={},i={};i["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(i.authorization=this.configuration.apiKey("authorization"));let o=yield this.request({path:"/site",method:"POST",headers:i,query:n,body:(0,y.PostSiteTrackToJSON)(r.postSiteTrack)},t);return new d.VoidApiResponse(o)})}postPageTrack(r,t){return p(this,void 0,void 0,function*(){yield this.postPageTrackRaw(r,t)})}siteDeleteRaw(r,t){return p(this,void 0,void 0,function*(){if(r.deleteAccount===null||r.deleteAccount===void 0)throw new d.RequiredError("deleteAccount","Required parameter requestParameters.deleteAccount was null or undefined when calling siteDelete.");let n={},i={};i["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(i.authorization=this.configuration.apiKey("authorization"));let o=yield this.request({path:"/account/site",method:"DELETE",headers:i,query:n,body:(0,y.DeleteAccountToJSON)(r.deleteAccount)},t);return new d.VoidApiResponse(o)})}siteDelete(r,t){return p(this,void 0,void 0,function*(){yield this.siteDeleteRaw(r,t)})}sitePostRaw(r,t){return p(this,void 0,void 0,function*(){if(r.postAccount===null||r.postAccount===void 0)throw new d.RequiredError("postAccount","Required parameter requestParameters.postAccount was null or undefined when calling sitePost.");let n={},i={};i["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(i.authorization=this.configuration.apiKey("authorization"));let o=yield this.request({path:"/account/site",method:"POST",headers:i,query:n,body:(0,y.PostAccountToJSON)(r.postAccount)},t);return new d.VoidApiResponse(o)})}sitePost(r,t){return p(this,void 0,void 0,function*(){yield this.sitePostRaw(r,t)})}};T.DefaultApi=we});var Cr=a(oe=>{"use strict";var Dn=oe&&oe.__createBinding||(Object.create?function(e,r,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(r,t);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,n,i)}:function(e,r,t,n){n===void 0&&(n=t),e[n]=r[t]}),qn=oe&&oe.__exportStar||function(e,r){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(r,t)&&Dn(r,e,t)};Object.defineProperty(oe,"__esModule",{value:!0});qn(Vr(),oe)});var zr=a(h=>{"use strict";var Ln=h&&h.__createBinding||(Object.create?function(e,r,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(r,t);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,n,i)}:function(e,r,t,n){n===void 0&&(n=t),e[n]=r[t]}),_e=h&&h.__exportStar||function(e,r){for(var t in e)t!=="default"&&!Object.prototype.hasOwnProperty.call(r,t)&&Ln(r,e,t)};Object.defineProperty(h,"__esModule",{value:!0});_e(m(),h);_e(Cr(),h);_e(N(),h)});var Mn={};jr(Mn,{page:()=>Kn,track:()=>Ur});module.exports=rt(Mn);var pe=require("ag-common/dist/common/helpers/log"),me=require("ag-common/dist/ui/helpers/callOpenApi"),$r=et(zr());function kn(e){return(0,me.callOpenApi)({...e,func:r=>(0,me.apiResponseToAxiosResponse)(()=>e.func(r)),newDefaultApi:r=>new $r.DefaultApi(r),logout:()=>window.location.reload(),refreshToken:async()=>{}})}var Ur=async({analyticaToken:e,overrideBaseUrl:r="https://api.analytica.click",eventName:t})=>{let n={eventName:t};if(typeof window<"u"&&(n={...n,pageLocation:window.location.href,browserResolution:`${window?.screen?.width}:${window?.screen?.height}`}),typeof document<"u"&&(n={...n,pageReferrer:document.referrer,pageTitle:document.title}),typeof navigator<"u"&&(n={...n,browserLanguage:navigator.language}),typeof window<"u"&&window?.location?.hostname==="localhost")return(0,pe.debug)(`local page ignored: ${JSON.stringify(n)}, to ${r}`),{};let i=await kn({apiUrl:r,headers:{authorization:""},func:o=>o.postPageTrackRaw({postSiteTrack:{key:e,data:n}})});return i.error?((0,pe.warn)("tracking error:"+JSON.stringify(i.error,null,2)),{error:JSON.stringify(i.error,null,2)}):{}},Kn=async({analyticaToken:e,overrideBaseUrl:r="https://api.analytica.click"})=>Ur({analyticaToken:e,overrideBaseUrl:r,eventName:"PAGE"});0&&(module.exports={page,track});
|
1
|
+
"use strict";var y=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var j=(e,r)=>{for(var t in r)y(e,t,{get:r[t],enumerable:!0})},ee=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Z(r))!v.call(e,o)&&o!==t&&y(e,o,{get:()=>r[o],enumerable:!(n=Y(r,o))||n.enumerable});return e};var re=e=>ee(y({},"__esModule",{value:!0}),e);var De={};j(De,{page:()=>be,track:()=>X});module.exports=re(De);var m=require("ag-common/dist/common/helpers/log"),g=require("ag-common/dist/ui/helpers/callOpenApi");var te="https://api.analytica.click".replace(/\/+$/,""),ne=e=>typeof Blob<"u"&&e instanceof Blob,l=class{constructor(r=new T){this.configuration=r;this.fetchApi=async(r,t)=>{let n={url:r,init:t};for(let a of this.middleware)a.pre&&(n=await a.pre({fetch:this.fetchApi,...n})||n);let o=await(this.configuration.fetchApi||fetch)(n.url,n.init);for(let a of this.middleware)a.post&&(o=await a.post({fetch:this.fetchApi,url:n.url,init:n.init,response:o.clone()})||o);return o};this.middleware=r.middleware||[]}withMiddleware(...r){let t=this.clone();return t.middleware=t.middleware.concat(...r),t}withPreMiddleware(...r){let t=r.map(n=>({pre:n}));return this.withMiddleware(...t)}withPostMiddleware(...r){let t=r.map(n=>({post:n}));return this.withMiddleware(...t)}async request(r,t){let{url:n,init:o}=this.createFetchParams(r,t),a=await this.fetchApi(n,o);if(a.status>=200&&a.status<300)return a;throw a}createFetchParams(r,t){let n=this.configuration.basePath+r.path;r.query!==void 0&&Object.keys(r.query).length!==0&&(n+="?"+(this.configuration.queryParamsStringify||R)(r.query));let o=typeof FormData<"u"&&r.body instanceof FormData||r.body instanceof URLSearchParams||ne(r.body)?r.body:JSON.stringify(r.body),a=Object.assign({},this.configuration.headers,r.headers),c={method:r.method,headers:a,body:o,credentials:this.configuration.credentials,...t};return{url:n,init:c}}clone(){let r=this.constructor,t=new r(this.configuration);return t.middleware=this.middleware.slice(),t}},u=class extends Error{constructor(t,n){super(n);this.field=t;this.name="RequiredError"}};var T=class{constructor(r={}){this.configuration=r}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:te}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||R}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){let r=this.configuration.apiKey;if(r)return typeof r=="function"?r:()=>r}get accessToken(){let r=this.configuration.accessToken;if(r)return typeof r=="function"?r:async()=>r}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}};function i(e,r){let t=e[r];return t!=null}function R(e,r=""){return Object.keys(e).map(t=>{let n=r+(r.length?`[${t}]`:t),o=e[t];if(o instanceof Array){let a=o.map(c=>encodeURIComponent(String(c))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${a}`}return o instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(o.toISOString())}`:o instanceof Object?R(o,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(o))}`}).filter(t=>t.length>0).join("&")}var p=class{constructor(r,t=n=>n){this.raw=r;this.transformer=t}async value(){return this.transformer(await this.raw.json())}},s=class{constructor(r){this.raw=r}async value(){}};function w(e){if(e!==void 0)return e===null?null:{PKsB64:e.PKsB64}}function A(e){if(e!==void 0)return e===null?null:{key:e.key,account:e.account}}function N(e){return ie(e,!1)}function ie(e,r){return e==null?e:{account:i(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,browser:e.browser,count:e.count,category:e.category}}function O(e){if(e!==void 0)return e===null?null:{site:e.site}}function P(e){return ae(e,!1)}function ae(e,r){return e==null?e:{account:i(e,"account")?e.account:void 0,site:e.site,eventName:e.eventName,datetime:e.datetime,count:e.count,category:e.category}}function d(e){return ue(e,!1)}function ue(e,r){return e==null?e:{site:e.site,account:e.account,apiKey:e.apiKey,adminApiKey:e.adminApiKey,favicon:i(e,"favicon")?e.favicon:void 0}}function J(e){return ce(e,!1)}function ce(e,r){return e==null?e:{accounts:e.accounts.map(d),googleEmail:i(e,"googleEmail")?e.googleEmail:void 0,googleKey:i(e,"googleKey")?e.googleKey:void 0,bingKey:i(e,"bingKey")?e.bingKey:void 0,bingAccount:i(e,"bingAccount")?e.bingAccount:void 0}}function E(e){if(e!==void 0)return e===null?null:{email:e.email,key:e.key,account:e.account}}function b(e){return pe(e,!1)}function pe(e,r){return e==null?e:{account:i(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,language:e.language,count:e.count,category:e.category}}function D(e){return le(e,!1)}function le(e,r){return e==null?e:{account:i(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,countryRegion:e.countryRegion,category:e.category,count:e.count}}function F(e){return de(e,!1)}function de(e,r){return e==null?e:{PK:e.PK,messageHash:i(e,"messageHash")?e.messageHash:void 0,site:e.site,account:e.account,message:i(e,"message")?e.message:void 0,name:i(e,"name")?e.name:void 0,stack:i(e,"stack")?e.stack:void 0,href:e.href,filename:i(e,"filename")?e.filename:void 0,datetime:e.datetime,archived:i(e,"archived")?e.archived:void 0,count:e.count,category:e.category}}function q(e){if(e!==void 0)return e===null?null:{site:e.site}}function k(e){if(e!==void 0)return e===null?null:{key:e.key,data:I(e.data)}}function I(e){if(e!==void 0)return e===null?null:{message:e.message,name:e.name,stack:e.stack,href:e.href,filename:e.filename}}function L(e){if(e!==void 0)return e===null?null:{key:e.key,data:K(e.data)}}function K(e){if(e!==void 0)return e===null?null:{eventName:e.eventName,pageLocation:e.pageLocation,pageReferrer:e.pageReferrer,pageTitle:e.pageTitle,browserResolution:e.browserResolution,browserLanguage:e.browserLanguage}}function B(e){return fe(e,!1)}function fe(e,r){return e==null?e:{account:i(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,pathName:e.pathName,search:i(e,"search")?e.search:void 0,hash:i(e,"hash")?e.hash:void 0,count:e.count,category:e.category}}function G(e){return me(e,!1)}function me(e,r){return e==null?e:{account:i(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,referrer:e.referrer,count:e.count,category:e.category}}function V(e){return ge(e,!1)}function ge(e,r){return e==null?e:{account:i(e,"account")?e.account:void 0,datetime:e.datetime,site:e.site,resolution:e.resolution,count:e.count,category:e.category}}function H(e){return ye(e,!1)}function ye(e,r){return e==null?e:{account:e.account,site:e.site,datetime:e.datetime,category:e.category,topReferrers:i(e,"topReferrers")?e.topReferrers.map(_):void 0,topResolutions:i(e,"topResolutions")?e.topResolutions.map(W):void 0,topQueries:i(e,"topQueries")?e.topQueries.map(U):void 0,topLocations:i(e,"topLocations")?e.topLocations.map($):void 0,topBrowsers:i(e,"topBrowsers")?e.topBrowsers.map(Q):void 0,topEvents:i(e,"topEvents")?e.topEvents.map(M):void 0,topLanguages:i(e,"topLanguages")?e.topLanguages.map(z):void 0,topErrors:i(e,"topErrors")?e.topErrors.map(C):void 0}}function Q(e){return Te(e,!1)}function Te(e,r){return e==null?e:{browser:e.browser,count:e.count}}function C(e){return Re(e,!1)}function Re(e,r){return e==null?e:{href:e.href,count:e.count}}function M(e){return he(e,!1)}function he(e,r){return e==null?e:{eventName:e.eventName,count:e.count}}function z(e){return Se(e,!1)}function Se(e,r){return e==null?e:{language:e.language,count:e.count}}function $(e){return xe(e,!1)}function xe(e,r){return e==null?e:{countryRegion:e.countryRegion,count:e.count}}function U(e){return we(e,!1)}function we(e,r){return e==null?e:{pathName:e.pathName,count:e.count}}function _(e){return Ae(e,!1)}function Ae(e,r){return e==null?e:{referrer:e.referrer,count:e.count}}function W(e){return Ne(e,!1)}function Ne(e,r){return e==null?e:{resolution:e.resolution,count:e.count}}function S(e){return Oe(e,!1)}function Oe(e,r){return e==null?e:{account:e.account,email:e.email,site:e.site,datetime:e.datetime,category:e.category,totals:h(e.totals),queries:e.queries.map(h)}}function h(e){return Pe(e,!1)}function Pe(e,r){return e==null?e:{clicks:e.clicks,impressions:e.impressions,position:e.position,query:e.query}}function x(e){return Je(e,!1)}function Je(e,r){return e==null?e:{details:i(e,"details")?d(e.details):void 0,browsers:i(e,"browsers")?e.browsers.map(N):void 0,events:i(e,"events")?e.events.map(P):void 0,locations:i(e,"locations")?e.locations.map(D):void 0,queries:i(e,"queries")?e.queries.map(B):void 0,referrers:i(e,"referrers")?e.referrers.map(G):void 0,resolutions:i(e,"resolutions")?e.resolutions.map(V):void 0,languages:i(e,"languages")?e.languages.map(b):void 0,rollups:i(e,"rollups")?e.rollups.map(H):void 0,errors:i(e,"errors")?e.errors.map(F):void 0,google:i(e,"google")?e.google.map(S):void 0,bing:i(e,"bing")?e.bing.map(S):void 0}}var f=class extends l{async accountGetRaw(r){let t={},n={};this.configuration&&this.configuration.apiKey&&(n.authorization=this.configuration.apiKey("authorization"));let o=await this.request({path:"/account",method:"GET",headers:n,query:t},r);return new p(o,a=>J(a))}async accountGet(r){return await(await this.accountGetRaw(r)).value()}async archiveErrorRaw(r,t){if(r.id===null||r.id===void 0)throw new u("id","Required parameter requestParameters.id was null or undefined when calling archiveError.");let n={},o={};this.configuration&&this.configuration.apiKey&&(o.authorization=this.configuration.apiKey("authorization"));let a=await this.request({path:"/errors/{id}".replace("{id}",encodeURIComponent(String(r.id))),method:"DELETE",headers:o,query:n},t);return new s(a)}async archiveError(r,t){await this.archiveErrorRaw(r,t)}async archiveErrorsRaw(r,t){if(r.archiveErrors===null||r.archiveErrors===void 0)throw new u("archiveErrors","Required parameter requestParameters.archiveErrors was null or undefined when calling archiveErrors.");let n={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.authorization=this.configuration.apiKey("authorization"));let a=await this.request({path:"/errors",method:"DELETE",headers:o,query:n,body:w(r.archiveErrors)},t);return new s(a)}async archiveErrors(r,t){await this.archiveErrorsRaw(r,t)}async bingIntegrationPostRaw(r,t){if(r.bingIntegration===null||r.bingIntegration===void 0)throw new u("bingIntegration","Required parameter requestParameters.bingIntegration was null or undefined when calling bingIntegrationPost.");let n={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.authorization=this.configuration.apiKey("authorization"));let a=await this.request({path:"/account/integrations/bing",method:"POST",headers:o,query:n,body:A(r.bingIntegration)},t);return new s(a)}async bingIntegrationPost(r,t){await this.bingIntegrationPostRaw(r,t)}async getTrackingAllSitesRaw(r,t){if(r.minDate===null||r.minDate===void 0)throw new u("minDate","Required parameter requestParameters.minDate was null or undefined when calling getTrackingAllSites.");if(r.maxDate===null||r.maxDate===void 0)throw new u("maxDate","Required parameter requestParameters.maxDate was null or undefined when calling getTrackingAllSites.");let n={};r.minDate!==void 0&&(n.minDate=r.minDate),r.maxDate!==void 0&&(n.maxDate=r.maxDate);let o={};this.configuration&&this.configuration.apiKey&&(o.authorization=this.configuration.apiKey("authorization"));let a=await this.request({path:"/site/tracking",method:"GET",headers:o,query:n},t);return new p(a,c=>c.map(x))}async getTrackingAllSites(r,t){return await(await this.getTrackingAllSitesRaw(r,t)).value()}async getTrackingSiteRaw(r,t){if(r.id===null||r.id===void 0)throw new u("id","Required parameter requestParameters.id was null or undefined when calling getTrackingSite.");if(r.minDate===null||r.minDate===void 0)throw new u("minDate","Required parameter requestParameters.minDate was null or undefined when calling getTrackingSite.");if(r.maxDate===null||r.maxDate===void 0)throw new u("maxDate","Required parameter requestParameters.maxDate was null or undefined when calling getTrackingSite.");let n={};r.minDate!==void 0&&(n.minDate=r.minDate),r.maxDate!==void 0&&(n.maxDate=r.maxDate);let o={};this.configuration&&this.configuration.apiKey&&(o.authorization=this.configuration.apiKey("authorization"));let a=await this.request({path:"/site/tracking/{id}".replace("{id}",encodeURIComponent(String(r.id))),method:"GET",headers:o,query:n},t);return new p(a,c=>x(c))}async getTrackingSite(r,t){return await(await this.getTrackingSiteRaw(r,t)).value()}async googleIntegrationPostRaw(r,t){if(r.googleIntegration===null||r.googleIntegration===void 0)throw new u("googleIntegration","Required parameter requestParameters.googleIntegration was null or undefined when calling googleIntegrationPost.");let n={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.authorization=this.configuration.apiKey("authorization"));let a=await this.request({path:"/account/integrations/google",method:"POST",headers:o,query:n,body:E(r.googleIntegration)},t);return new s(a)}async googleIntegrationPost(r,t){await this.googleIntegrationPostRaw(r,t)}async postErrorsRaw(r,t){if(r.postError===null||r.postError===void 0)throw new u("postError","Required parameter requestParameters.postError was null or undefined when calling postErrors.");let n={},o={};o["Content-Type"]="application/json";let a=await this.request({path:"/errors",method:"POST",headers:o,query:n,body:r.postError.map(k)},t);return new s(a)}async postErrors(r,t){await this.postErrorsRaw(r,t)}async postPageTrackRaw(r,t){if(r.postSiteTrack===null||r.postSiteTrack===void 0)throw new u("postSiteTrack","Required parameter requestParameters.postSiteTrack was null or undefined when calling postPageTrack.");let n={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.authorization=this.configuration.apiKey("authorization"));let a=await this.request({path:"/site",method:"POST",headers:o,query:n,body:L(r.postSiteTrack)},t);return new s(a)}async postPageTrack(r,t){await this.postPageTrackRaw(r,t)}async siteDeleteRaw(r,t){if(r.deleteAccount===null||r.deleteAccount===void 0)throw new u("deleteAccount","Required parameter requestParameters.deleteAccount was null or undefined when calling siteDelete.");let n={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.authorization=this.configuration.apiKey("authorization"));let a=await this.request({path:"/account/site",method:"DELETE",headers:o,query:n,body:O(r.deleteAccount)},t);return new s(a)}async siteDelete(r,t){await this.siteDeleteRaw(r,t)}async sitePostRaw(r,t){if(r.postAccount===null||r.postAccount===void 0)throw new u("postAccount","Required parameter requestParameters.postAccount was null or undefined when calling sitePost.");let n={},o={};o["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(o.authorization=this.configuration.apiKey("authorization"));let a=await this.request({path:"/account/site",method:"POST",headers:o,query:n,body:q(r.postAccount)},t);return new s(a)}async sitePost(r,t){await this.sitePostRaw(r,t)}};function Ee(e){return(0,g.callOpenApi)({...e,func:r=>(0,g.apiResponseToAxiosResponse)(()=>e.func(r)),newDefaultApi:r=>new f(r),logout:()=>window.location.reload(),refreshToken:async()=>{}})}var X=async({analyticaToken:e,overrideBaseUrl:r="https://api.analytica.click",eventName:t})=>{let n={eventName:t};if(typeof window<"u"&&(n={...n,pageLocation:window.location.href,browserResolution:`${window?.screen?.width}:${window?.screen?.height}`}),typeof document<"u"&&(n={...n,pageReferrer:document.referrer,pageTitle:document.title}),typeof navigator<"u"&&(n={...n,browserLanguage:navigator.language}),typeof window<"u"&&window?.location?.hostname==="localhost")return(0,m.debug)(`local page ignored: ${JSON.stringify(n)}, to ${r}`),{};let o=await Ee({apiUrl:r,headers:{authorization:""},func:a=>a.postPageTrackRaw({postSiteTrack:{key:e,data:n}})});return o.error?((0,m.warn)("tracking error:"+JSON.stringify(o.error,null,2)),{error:JSON.stringify(o.error,null,2)}):{}},be=async({analyticaToken:e,overrideBaseUrl:r="https://api.analytica.click"})=>X({analyticaToken:e,overrideBaseUrl:r,eventName:"PAGE"});0&&(module.exports={page,track});
|