glitch-javascript-sdk 2.3.0 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3588,6 +3588,28 @@ declare class SocialPosts {
3588
3588
  * @returns A promise
3589
3589
  */
3590
3590
  static createComment<T>(post_id: string, data: object): AxiosPromise<Response<T>>;
3591
+ /**
3592
+ * Get game install attribution data for a specific social media post.
3593
+ *
3594
+ * @param post_id The ID of the social media post.
3595
+ * @param params Optional query parameters (start_date, end_date, confidence_threshold).
3596
+ * @returns A promise
3597
+ */
3598
+ static getPostAttribution<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
3599
+ /**
3600
+ * Get a report of all social media posts for a title that are converting to game installs.
3601
+ *
3602
+ * @param params Query parameters (title_id, start_date, end_date, confidence_threshold).
3603
+ * @returns A promise
3604
+ */
3605
+ static getSocialPostAttributionReport<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
3606
+ /**
3607
+ * Get a summary of clicks for each short link in a post.
3608
+ *
3609
+ * @param post_id The ID of the social media post.
3610
+ * @returns A promise
3611
+ */
3612
+ static getLinkSummary<T>(post_id: string): AxiosPromise<Response<T>>;
3591
3613
  }
3592
3614
 
3593
3615
  declare class Titles {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.3.0",
3
+ "version": "2.3.3",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -297,6 +297,37 @@ class SocialPosts {
297
297
  return Requests.processRoute(SocialPostsRoute.routes.createComment, data, { post_id });
298
298
  }
299
299
 
300
+ /**
301
+ * Get game install attribution data for a specific social media post.
302
+ *
303
+ * @param post_id The ID of the social media post.
304
+ * @param params Optional query parameters (start_date, end_date, confidence_threshold).
305
+ * @returns A promise
306
+ */
307
+ public static getPostAttribution<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
308
+ return Requests.processRoute(SocialPostsRoute.routes.getPostAttribution, undefined, { post_id }, params);
309
+ }
310
+
311
+ /**
312
+ * Get a report of all social media posts for a title that are converting to game installs.
313
+ *
314
+ * @param params Query parameters (title_id, start_date, end_date, confidence_threshold).
315
+ * @returns A promise
316
+ */
317
+ public static getSocialPostAttributionReport<T>(params: Record<string, any>): AxiosPromise<Response<T>> {
318
+ return Requests.processRoute(SocialPostsRoute.routes.getSocialPostAttributionReport, undefined, undefined, params);
319
+ }
320
+
321
+ /**
322
+ * Get a summary of clicks for each short link in a post.
323
+ *
324
+ * @param post_id The ID of the social media post.
325
+ * @returns A promise
326
+ */
327
+ public static getLinkSummary<T>(post_id: string): AxiosPromise<Response<T>> {
328
+ return Requests.processRoute(SocialPostsRoute.routes.getLinkSummary, undefined, { post_id });
329
+ }
330
+
300
331
  }
301
332
 
302
333
  export default SocialPosts;
@@ -22,6 +22,7 @@ class ShortLinksRoute {
22
22
  clickHeatmap: { url: '/shortlinks/reports/click-heatmap', method: HTTP_METHODS.GET },
23
23
  botAnalysis: { url: '/shortlinks/reports/bot-analysis', method: HTTP_METHODS.GET },
24
24
  attributionReport: { url: '/shortlinks/reports/attribution', method: HTTP_METHODS.GET },
25
+ getLinkSummary: { url: '/socialposts/{post_id}/link-summary', method: HTTP_METHODS.GET },
25
26
 
26
27
  // Social Media Post Reports
27
28
  socialPostDeepDive: { url: '/shortlinks/reports/social-post-deep-dive', method: HTTP_METHODS.GET },
@@ -2,21 +2,21 @@ import Route from "./interface";
2
2
  import HTTP_METHODS from "../constants/HttpMethods";
3
3
 
4
4
  class SocialPostsRoute {
5
-
5
+
6
6
  public static routes: { [key: string]: Route } = {
7
7
  getPosts: { url: '/socialposts', method: HTTP_METHODS.GET },
8
8
  createPost: { url: '/socialposts', method: HTTP_METHODS.POST },
9
- retrievePost : { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
10
- updatePost : { url: '/socialposts/{post_id}', method: HTTP_METHODS.PUT },
11
- deletePost : { url: '/socialposts/{post_id}', method: HTTP_METHODS.DELETE },
9
+ retrievePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
10
+ updatePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.PUT },
11
+ deletePost: { url: '/socialposts/{post_id}', method: HTTP_METHODS.DELETE },
12
12
  dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
13
- history : { url: '/socialposts/{post_id}/history', method: HTTP_METHODS.GET },
14
- progression : { url: '/socialposts/progression', method: HTTP_METHODS.GET },
13
+ history: { url: '/socialposts/{post_id}/history', method: HTTP_METHODS.GET },
14
+ progression: { url: '/socialposts/progression', method: HTTP_METHODS.GET },
15
15
  addMedia: { url: '/socialposts/{post_id}/addMedia', method: HTTP_METHODS.POST },
16
16
  removeMedia: { url: '/socialposts/{post_id}/removeMedia/{media_id}', method: HTTP_METHODS.DELETE },
17
17
  reschedule: { url: '/socialposts/{post_id}/reschedule', method: HTTP_METHODS.POST },
18
18
  reports: { url: '/socialposts/{post_id}/reports', method: HTTP_METHODS.GET },
19
- updatePostImpressions : { url: '/socialposts/{post_id}/impressions', method: HTTP_METHODS.PUT },
19
+ updatePostImpressions: { url: '/socialposts/{post_id}/impressions', method: HTTP_METHODS.PUT },
20
20
  shortLinkReports: { url: '/socialposts/shortlinks/reports', method: HTTP_METHODS.GET },
21
21
 
22
22
  // New Comment Routes
@@ -31,9 +31,11 @@ class SocialPostsRoute {
31
31
  updateCommentMetrics: { url: '/socialposts/comments/{comment_id}/update-metrics', method: HTTP_METHODS.PUT },
32
32
  createComment: { url: '/socialposts/{post_id}/comments', method: HTTP_METHODS.POST },
33
33
 
34
+ getPostAttribution: { url: '/socialposts/{post_id}/attribution', method: HTTP_METHODS.GET },
35
+ getSocialPostAttributionReport: { url: '/reports/fingerprinting/social-post-attribution', method: HTTP_METHODS.GET },
34
36
 
35
37
  };
36
38
 
37
- }
39
+ }
38
40
 
39
- export default SocialPostsRoute;
41
+ export default SocialPostsRoute;