glitch-javascript-sdk 2.2.8 → 2.2.9
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/cjs/index.js +28 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/ShortLinks.d.ts +7 -0
- package/dist/esm/index.js +28 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/package.json +1 -1
- package/src/api/ShortLinks.ts +70 -42
- package/src/routes/ShortLinksRoute.ts +8 -0
package/dist/index.d.ts
CHANGED
|
@@ -6400,6 +6400,13 @@ declare class ShortLinks {
|
|
|
6400
6400
|
* - Example usage: ShortLinks.referrerReport({ short_link_id: 'uuid-here' })
|
|
6401
6401
|
*/
|
|
6402
6402
|
static referrerReport<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6403
|
+
static campaignPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6404
|
+
static influencerPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6405
|
+
static socialPostPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6406
|
+
static conversionFunnel<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6407
|
+
static clickHeatmap<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6408
|
+
static botAnalysis<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6409
|
+
static attributionReport<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6403
6410
|
}
|
|
6404
6411
|
|
|
6405
6412
|
declare class AIUsage {
|
package/package.json
CHANGED
package/src/api/ShortLinks.ts
CHANGED
|
@@ -37,57 +37,85 @@ class ShortLinks {
|
|
|
37
37
|
// return Requests.processRoute(ShortLinksRoute.routes.deleteShortLink, {}, { id }, params);
|
|
38
38
|
// }
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
public static clickSummary<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
45
|
-
return Requests.processRoute(
|
|
46
|
-
ShortLinksRoute.routes.clickSummary,
|
|
47
|
-
undefined,
|
|
48
|
-
undefined,
|
|
49
|
-
params
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Get click-summary report
|
|
42
|
+
* - Example usage: ShortLinks.clickSummary({ short_link_id: 'uuid-here' })
|
|
43
|
+
*/
|
|
44
|
+
public static clickSummary<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
45
|
+
return Requests.processRoute(
|
|
46
|
+
ShortLinksRoute.routes.clickSummary,
|
|
47
|
+
undefined,
|
|
48
|
+
undefined,
|
|
49
|
+
params
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
53
|
/**
|
|
54
54
|
* Get geo & device breakdown report
|
|
55
55
|
* - Example usage: ShortLinks.geoDeviceBreakdown({ short_link_id: 'uuid-here' })
|
|
56
|
-
*/
|
|
57
|
-
public static geoDeviceBreakdown<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
58
|
-
return Requests.processRoute(
|
|
59
|
-
ShortLinksRoute.routes.geoDeviceBreakdown,
|
|
60
|
-
undefined,
|
|
61
|
-
undefined,
|
|
62
|
-
params
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
56
|
+
*/
|
|
57
|
+
public static geoDeviceBreakdown<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
58
|
+
return Requests.processRoute(
|
|
59
|
+
ShortLinksRoute.routes.geoDeviceBreakdown,
|
|
60
|
+
undefined,
|
|
61
|
+
undefined,
|
|
62
|
+
params
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
66
|
/**
|
|
67
67
|
* Get time-series report
|
|
68
68
|
* - Example usage: ShortLinks.timeSeries({ short_link_id: 'uuid-here', group_by: 'day' })
|
|
69
|
-
*/
|
|
70
|
-
public static timeSeries<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
71
|
-
return Requests.processRoute(
|
|
72
|
-
ShortLinksRoute.routes.timeSeries,
|
|
73
|
-
undefined,
|
|
74
|
-
undefined,
|
|
75
|
-
params
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
69
|
+
*/
|
|
70
|
+
public static timeSeries<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
71
|
+
return Requests.processRoute(
|
|
72
|
+
ShortLinksRoute.routes.timeSeries,
|
|
73
|
+
undefined,
|
|
74
|
+
undefined,
|
|
75
|
+
params
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
79
|
/**
|
|
80
80
|
* Get referrer & UTM report
|
|
81
81
|
* - Example usage: ShortLinks.referrerReport({ short_link_id: 'uuid-here' })
|
|
82
|
-
*/
|
|
83
|
-
public static referrerReport<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
84
|
-
return Requests.processRoute(
|
|
85
|
-
ShortLinksRoute.routes.referrerReport,
|
|
86
|
-
undefined,
|
|
87
|
-
undefined,
|
|
88
|
-
params
|
|
89
|
-
);
|
|
90
|
-
}
|
|
82
|
+
*/
|
|
83
|
+
public static referrerReport<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
84
|
+
return Requests.processRoute(
|
|
85
|
+
ShortLinksRoute.routes.referrerReport,
|
|
86
|
+
undefined,
|
|
87
|
+
undefined,
|
|
88
|
+
params
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
public static campaignPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
93
|
+
return Requests.processRoute(ShortLinksRoute.routes.campaignPerformance, undefined, undefined, params);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
public static influencerPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
97
|
+
return Requests.processRoute(ShortLinksRoute.routes.influencerPerformance, undefined, undefined, params);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public static socialPostPerformance<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
101
|
+
return Requests.processRoute(ShortLinksRoute.routes.socialPostPerformance, undefined, undefined, params);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public static conversionFunnel<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
105
|
+
return Requests.processRoute(ShortLinksRoute.routes.conversionFunnel, undefined, undefined, params);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public static clickHeatmap<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
109
|
+
return Requests.processRoute(ShortLinksRoute.routes.clickHeatmap, undefined, undefined, params);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
public static botAnalysis<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
113
|
+
return Requests.processRoute(ShortLinksRoute.routes.botAnalysis, undefined, undefined, params);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
public static attributionReport<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
117
|
+
return Requests.processRoute(ShortLinksRoute.routes.attributionReport, undefined, undefined, params);
|
|
118
|
+
}
|
|
91
119
|
}
|
|
92
120
|
|
|
93
121
|
export default ShortLinks;
|
|
@@ -14,6 +14,14 @@ class ShortLinksRoute {
|
|
|
14
14
|
geoDeviceBreakdown:{ url: '/shortlinks/reports/geo-device', method: HTTP_METHODS.GET },
|
|
15
15
|
timeSeries: { url: '/shortlinks/reports/time-series', method: HTTP_METHODS.GET },
|
|
16
16
|
referrerReport: { url: '/shortlinks/reports/referrer', method: HTTP_METHODS.GET },
|
|
17
|
+
|
|
18
|
+
campaignPerformance: { url: '/shortlinks/reports/campaign-performance', method: HTTP_METHODS.GET },
|
|
19
|
+
influencerPerformance: { url: '/shortlinks/reports/influencer-performance', method: HTTP_METHODS.GET },
|
|
20
|
+
socialPostPerformance: { url: '/shortlinks/reports/social-post-performance', method: HTTP_METHODS.GET },
|
|
21
|
+
conversionFunnel: { url: '/shortlinks/reports/conversion-funnel', method: HTTP_METHODS.GET },
|
|
22
|
+
clickHeatmap: { url: '/shortlinks/reports/click-heatmap', method: HTTP_METHODS.GET },
|
|
23
|
+
botAnalysis: { url: '/shortlinks/reports/bot-analysis', method: HTTP_METHODS.GET },
|
|
24
|
+
attributionReport: { url: '/shortlinks/reports/attribution', method: HTTP_METHODS.GET },
|
|
17
25
|
};
|
|
18
26
|
}
|
|
19
27
|
|