glitch-javascript-sdk 2.2.8 → 2.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.
- package/dist/cjs/index.js +45 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/ShortLinks.d.ts +11 -0
- package/dist/esm/index.js +45 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +11 -0
- package/package.json +1 -1
- package/src/api/ShortLinks.ts +86 -42
- package/src/routes/ShortLinksRoute.ts +22 -8
package/dist/index.d.ts
CHANGED
|
@@ -6400,6 +6400,17 @@ 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>>;
|
|
6410
|
+
static socialPostDeepDive<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6411
|
+
static socialPostContentAnalysis<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6412
|
+
static socialPostEngagementBreakdown<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6413
|
+
static socialPostTrackingEffectiveness<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6403
6414
|
}
|
|
6404
6415
|
|
|
6405
6416
|
declare class AIUsage {
|
package/package.json
CHANGED
package/src/api/ShortLinks.ts
CHANGED
|
@@ -37,57 +37,101 @@ 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
|
+
}
|
|
119
|
+
|
|
120
|
+
public static socialPostDeepDive<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
121
|
+
return Requests.processRoute(ShortLinksRoute.routes.socialPostDeepDive, undefined, undefined, params);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
public static socialPostContentAnalysis<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
125
|
+
return Requests.processRoute(ShortLinksRoute.routes.socialPostContentAnalysis, undefined, undefined, params);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
public static socialPostEngagementBreakdown<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
129
|
+
return Requests.processRoute(ShortLinksRoute.routes.socialPostEngagementBreakdown, undefined, undefined, params);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
public static socialPostTrackingEffectiveness<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
133
|
+
return Requests.processRoute(ShortLinksRoute.routes.socialPostTrackingEffectiveness, undefined, undefined, params);
|
|
134
|
+
}
|
|
91
135
|
}
|
|
92
136
|
|
|
93
137
|
export default ShortLinks;
|
|
@@ -3,17 +3,31 @@ import HTTP_METHODS from "../constants/HttpMethods";
|
|
|
3
3
|
|
|
4
4
|
class ShortLinksRoute {
|
|
5
5
|
public static routes: { [key: string]: Route } = {
|
|
6
|
-
listShortLinks:
|
|
7
|
-
createShortLink:
|
|
8
|
-
viewShortLink:
|
|
9
|
-
updateShortLink:
|
|
6
|
+
listShortLinks: { url: '/shortlinks', method: HTTP_METHODS.GET },
|
|
7
|
+
createShortLink: { url: '/shortlinks', method: HTTP_METHODS.POST },
|
|
8
|
+
viewShortLink: { url: '/shortlinks/{id}', method: HTTP_METHODS.GET },
|
|
9
|
+
updateShortLink: { url: '/shortlinks/{id}', method: HTTP_METHODS.PUT },
|
|
10
10
|
// Delete can be added if supported
|
|
11
11
|
// deleteShortLink: { url: '/shortlinks/{id}', method: HTTP_METHODS.DELETE }
|
|
12
12
|
|
|
13
|
-
clickSummary:
|
|
14
|
-
geoDeviceBreakdown:{ url: '/shortlinks/reports/geo-device',
|
|
15
|
-
timeSeries:
|
|
16
|
-
referrerReport:
|
|
13
|
+
clickSummary: { url: '/shortlinks/reports/click-summary', method: HTTP_METHODS.GET },
|
|
14
|
+
geoDeviceBreakdown: { url: '/shortlinks/reports/geo-device', method: HTTP_METHODS.GET },
|
|
15
|
+
timeSeries: { url: '/shortlinks/reports/time-series', method: HTTP_METHODS.GET },
|
|
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 },
|
|
25
|
+
|
|
26
|
+
// Social Media Post Reports
|
|
27
|
+
socialPostDeepDive: { url: '/shortlinks/reports/social-post-deep-dive', method: HTTP_METHODS.GET },
|
|
28
|
+
socialPostContentAnalysis: { url: '/shortlinks/reports/social-post-content-analysis', method: HTTP_METHODS.GET },
|
|
29
|
+
socialPostEngagementBreakdown: { url: '/shortlinks/reports/social-post-engagement-breakdown', method: HTTP_METHODS.GET },
|
|
30
|
+
socialPostTrackingEffectiveness: { url: '/shortlinks/reports/social-post-tracking-effectiveness', method: HTTP_METHODS.GET },
|
|
17
31
|
};
|
|
18
32
|
}
|
|
19
33
|
|