glitch-javascript-sdk 2.1.1 → 2.1.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.
@@ -150,5 +150,16 @@ declare class Fingerprinting {
150
150
  * @returns Promise with geolocation report data
151
151
  */
152
152
  static installJourneyReport<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
153
+ /**
154
+ * Get how the ad campaigns are performing and turning into installs
155
+ *
156
+ * @param params Report options:
157
+ * - title_id: string - Required title ID
158
+ * - start_date?: string - Start date (YYYY-MM-DD)
159
+ * - end_date?: string - End date (YYYY-MM-DD)
160
+ * - group_by?: 'country'|'region'|'city' - Grouping level
161
+ * @returns Promise with geolocation report data
162
+ */
163
+ static adCampaignPerformanceReport<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
153
164
  }
154
165
  export default Fingerprinting;
@@ -1,5 +1,51 @@
1
1
  import Response from "../util/Response";
2
2
  import { AxiosProgressEvent, AxiosPromise } from "axios";
3
+ export interface SteamCapsuleCropRequest {
4
+ media_id: string;
5
+ capsule_type: 'header' | 'small' | 'main' | 'vertical' | 'library' | 'library_header' | 'library_hero' | 'page_background';
6
+ crop_x?: number;
7
+ crop_y?: number;
8
+ crop_width?: number;
9
+ crop_height?: number;
10
+ }
11
+ export interface SteamCapsuleAnalysisRequest {
12
+ media_id: string;
13
+ capsule_type: 'header' | 'small' | 'main' | 'vertical' | 'library' | 'library_header' | 'library_hero' | 'page_background';
14
+ game_name?: string;
15
+ game_genre?: string;
16
+ }
17
+ export interface SteamCapsuleDimensions {
18
+ width: number;
19
+ height: number;
20
+ }
21
+ export interface SteamCapsuleCropResponse {
22
+ media: any;
23
+ download_url: string;
24
+ dimensions: SteamCapsuleDimensions;
25
+ capsule_type: string;
26
+ }
27
+ export interface CategoryScores {
28
+ visual_hierarchy: number;
29
+ title_readability: number;
30
+ genre_communication: number;
31
+ brand_identity: number;
32
+ composition_balance: number;
33
+ art_style: number;
34
+ emotional_impact: number;
35
+ steam_compliance: number;
36
+ }
37
+ export interface SteamCapsuleAnalysisResponse {
38
+ media_id: string;
39
+ capsule_type: string;
40
+ dimensions: SteamCapsuleDimensions;
41
+ overall_score: number;
42
+ category_scores: CategoryScores;
43
+ strengths: string[];
44
+ improvements: string[];
45
+ recommendations: string[];
46
+ ai_description: string;
47
+ guidelines: any;
48
+ }
3
49
  declare class Media {
4
50
  /**
5
51
  * Upload media content using a File object.
@@ -33,5 +79,39 @@ declare class Media {
33
79
  * @returns promise
34
80
  */
35
81
  static get<T>(media_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
82
+ /**
83
+ * Crop and resize an image to Steam capsule dimensions.
84
+ *
85
+ * @param request The crop request parameters.
86
+ * @param params Additional query parameters.
87
+ *
88
+ * @returns promise
89
+ */
90
+ static cropSteamCapsule(request: SteamCapsuleCropRequest, params?: Record<string, any>): AxiosPromise<Response<SteamCapsuleCropResponse>>;
91
+ /**
92
+ * Analyze a Steam capsule image using AI.
93
+ *
94
+ * @param request The analysis request parameters.
95
+ * @param params Additional query parameters.
96
+ *
97
+ * @returns promise
98
+ */
99
+ static analyzeSteamCapsule(request: SteamCapsuleAnalysisRequest, params?: Record<string, any>): AxiosPromise<Response<SteamCapsuleAnalysisResponse>>;
100
+ /**
101
+ * Get Steam capsule dimensions for a specific type.
102
+ *
103
+ * @param capsuleType The type of Steam capsule.
104
+ *
105
+ * @returns The dimensions object or null if invalid type.
106
+ */
107
+ static getSteamCapsuleDimensions(capsuleType: string): SteamCapsuleDimensions | null;
108
+ /**
109
+ * Get Steam capsule type information and requirements.
110
+ *
111
+ * @param capsuleType The type of Steam capsule.
112
+ *
113
+ * @returns Information about the capsule type.
114
+ */
115
+ static getSteamCapsuleInfo(capsuleType: string): any;
36
116
  }
37
117
  export default Media;
@@ -135,5 +135,73 @@ declare class SocialPosts {
135
135
  * @returns promise
136
136
  */
137
137
  static shortLinkReports<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
138
+ /**
139
+ * List comments for a social media post.
140
+ *
141
+ * @param post_id The ID of the social media post.
142
+ * @param params Optional query parameters for filtering and sorting.
143
+ * @returns A promise
144
+ */
145
+ static listComments<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
146
+ /**
147
+ * Sync comments from the social media platform for a specific post.
148
+ *
149
+ * @param post_id The ID of the social media post.
150
+ * @param params Optional query parameters (e.g., limit).
151
+ * @returns A promise
152
+ */
153
+ static syncComments<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
154
+ /**
155
+ * Get a list of all comments that are pending a response.
156
+ *
157
+ * @param params Optional query parameters for filtering.
158
+ * @returns A promise
159
+ */
160
+ static listPendingResponses<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
161
+ /**
162
+ * Retrieve a single comment by its ID.
163
+ *
164
+ * @param comment_id The ID of the comment.
165
+ * @param params Optional query parameters (e.g., include_thread).
166
+ * @returns A promise
167
+ */
168
+ static viewComment<T>(comment_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
169
+ /**
170
+ * Post a reply to a comment.
171
+ *
172
+ * @param comment_id The ID of the comment to reply to.
173
+ * @param data The content of the reply.
174
+ * @returns A promise
175
+ */
176
+ static replyToComment<T>(comment_id: string, data: object): AxiosPromise<Response<T>>;
177
+ /**
178
+ * Moderate a comment (approve, reject, spam, hide, show).
179
+ *
180
+ * @param comment_id The ID of the comment to moderate.
181
+ * @param data The moderation action and optional reason.
182
+ * @returns A promise
183
+ */
184
+ static moderateComment<T>(comment_id: string, data: object): AxiosPromise<Response<T>>;
185
+ /**
186
+ * Mark a comment as needing a response.
187
+ *
188
+ * @param comment_id The ID of the comment.
189
+ * @returns A promise
190
+ */
191
+ static markCommentForResponse<T>(comment_id: string): AxiosPromise<Response<T>>;
192
+ /**
193
+ * Get the full thread for a given comment.
194
+ *
195
+ * @param comment_id The ID of a comment within the thread.
196
+ * @returns A promise
197
+ */
198
+ static getCommentThread<T>(comment_id: string): AxiosPromise<Response<T>>;
199
+ /**
200
+ * Trigger a manual update of a comment's metrics from its platform.
201
+ *
202
+ * @param comment_id The ID of the comment to update.
203
+ * @returns A promise
204
+ */
205
+ static updateCommentMetrics<T>(comment_id: string): AxiosPromise<Response<T>>;
138
206
  }
139
207
  export default SocialPosts;
package/dist/esm/index.js CHANGED
@@ -9737,6 +9737,10 @@ var FingerprintingRoute = /** @class */ (function () {
9737
9737
  url: '/reports/fingerprinting/install-journey',
9738
9738
  method: HTTP_METHODS.GET
9739
9739
  },
9740
+ adCampaignPerformanceReport: {
9741
+ url: '/reports/fingerprinting/ad-campaign-performance',
9742
+ method: HTTP_METHODS.GET
9743
+ },
9740
9744
  };
9741
9745
  return FingerprintingRoute;
9742
9746
  }());
@@ -9917,6 +9921,19 @@ var Fingerprinting = /** @class */ (function () {
9917
9921
  Fingerprinting.installJourneyReport = function (params) {
9918
9922
  return Requests.processRoute(FingerprintingRoute.routes.installJourneyReport, {}, undefined, params);
9919
9923
  };
9924
+ /**
9925
+ * Get how the ad campaigns are performing and turning into installs
9926
+ *
9927
+ * @param params Report options:
9928
+ * - title_id: string - Required title ID
9929
+ * - start_date?: string - Start date (YYYY-MM-DD)
9930
+ * - end_date?: string - End date (YYYY-MM-DD)
9931
+ * - group_by?: 'country'|'region'|'city' - Grouping level
9932
+ * @returns Promise with geolocation report data
9933
+ */
9934
+ Fingerprinting.adCampaignPerformanceReport = function (params) {
9935
+ return Requests.processRoute(FingerprintingRoute.routes.adCampaignPerformanceReport, {}, undefined, params);
9936
+ };
9920
9937
  return Fingerprinting;
9921
9938
  }());
9922
9939
 
@@ -10919,6 +10936,16 @@ var SocialPostsRoute = /** @class */ (function () {
10919
10936
  reports: { url: '/socialposts/{post_id}/reports', method: HTTP_METHODS.GET },
10920
10937
  updatePostImpressions: { url: '/socialposts/{post_id}/impressions', method: HTTP_METHODS.PUT },
10921
10938
  shortLinkReports: { url: '/socialposts/shortlinks/reports', method: HTTP_METHODS.GET },
10939
+ // New Comment Routes
10940
+ listComments: { url: '/socialposts/{post_id}/comments', method: HTTP_METHODS.GET },
10941
+ syncComments: { url: '/socialposts/{post_id}/sync-comments', method: HTTP_METHODS.POST },
10942
+ listPendingResponses: { url: '/socialposts/comments/pending-responses', method: HTTP_METHODS.GET },
10943
+ viewComment: { url: '/socialposts/comments/{comment_id}', method: HTTP_METHODS.GET },
10944
+ replyToComment: { url: '/socialposts/comments/{comment_id}/reply', method: HTTP_METHODS.POST },
10945
+ moderateComment: { url: '/socialposts/comments/{comment_id}/moderate', method: HTTP_METHODS.PUT },
10946
+ markCommentForResponse: { url: '/socialposts/comments/{comment_id}/mark-for-response', method: HTTP_METHODS.PUT },
10947
+ getCommentThread: { url: '/socialposts/comments/{comment_id}/thread', method: HTTP_METHODS.GET },
10948
+ updateCommentMetrics: { url: '/socialposts/comments/{comment_id}/update-metrics', method: HTTP_METHODS.PUT },
10922
10949
  };
10923
10950
  return SocialPostsRoute;
10924
10951
  }());
@@ -11088,6 +11115,92 @@ var SocialPosts = /** @class */ (function () {
11088
11115
  SocialPosts.shortLinkReports = function (params) {
11089
11116
  return Requests.processRoute(SocialPostsRoute.routes.shortLinkReports, undefined, undefined, params);
11090
11117
  };
11118
+ /**
11119
+ * List comments for a social media post.
11120
+ *
11121
+ * @param post_id The ID of the social media post.
11122
+ * @param params Optional query parameters for filtering and sorting.
11123
+ * @returns A promise
11124
+ */
11125
+ SocialPosts.listComments = function (post_id, params) {
11126
+ return Requests.processRoute(SocialPostsRoute.routes.listComments, undefined, { post_id: post_id }, params);
11127
+ };
11128
+ /**
11129
+ * Sync comments from the social media platform for a specific post.
11130
+ *
11131
+ * @param post_id The ID of the social media post.
11132
+ * @param params Optional query parameters (e.g., limit).
11133
+ * @returns A promise
11134
+ */
11135
+ SocialPosts.syncComments = function (post_id, params) {
11136
+ return Requests.processRoute(SocialPostsRoute.routes.syncComments, undefined, { post_id: post_id }, params);
11137
+ };
11138
+ /**
11139
+ * Get a list of all comments that are pending a response.
11140
+ *
11141
+ * @param params Optional query parameters for filtering.
11142
+ * @returns A promise
11143
+ */
11144
+ SocialPosts.listPendingResponses = function (params) {
11145
+ return Requests.processRoute(SocialPostsRoute.routes.listPendingResponses, undefined, undefined, params);
11146
+ };
11147
+ /**
11148
+ * Retrieve a single comment by its ID.
11149
+ *
11150
+ * @param comment_id The ID of the comment.
11151
+ * @param params Optional query parameters (e.g., include_thread).
11152
+ * @returns A promise
11153
+ */
11154
+ SocialPosts.viewComment = function (comment_id, params) {
11155
+ return Requests.processRoute(SocialPostsRoute.routes.viewComment, undefined, { comment_id: comment_id }, params);
11156
+ };
11157
+ /**
11158
+ * Post a reply to a comment.
11159
+ *
11160
+ * @param comment_id The ID of the comment to reply to.
11161
+ * @param data The content of the reply.
11162
+ * @returns A promise
11163
+ */
11164
+ SocialPosts.replyToComment = function (comment_id, data) {
11165
+ return Requests.processRoute(SocialPostsRoute.routes.replyToComment, data, { comment_id: comment_id });
11166
+ };
11167
+ /**
11168
+ * Moderate a comment (approve, reject, spam, hide, show).
11169
+ *
11170
+ * @param comment_id The ID of the comment to moderate.
11171
+ * @param data The moderation action and optional reason.
11172
+ * @returns A promise
11173
+ */
11174
+ SocialPosts.moderateComment = function (comment_id, data) {
11175
+ return Requests.processRoute(SocialPostsRoute.routes.moderateComment, data, { comment_id: comment_id });
11176
+ };
11177
+ /**
11178
+ * Mark a comment as needing a response.
11179
+ *
11180
+ * @param comment_id The ID of the comment.
11181
+ * @returns A promise
11182
+ */
11183
+ SocialPosts.markCommentForResponse = function (comment_id) {
11184
+ return Requests.processRoute(SocialPostsRoute.routes.markCommentForResponse, undefined, { comment_id: comment_id });
11185
+ };
11186
+ /**
11187
+ * Get the full thread for a given comment.
11188
+ *
11189
+ * @param comment_id The ID of a comment within the thread.
11190
+ * @returns A promise
11191
+ */
11192
+ SocialPosts.getCommentThread = function (comment_id) {
11193
+ return Requests.processRoute(SocialPostsRoute.routes.getCommentThread, undefined, { comment_id: comment_id });
11194
+ };
11195
+ /**
11196
+ * Trigger a manual update of a comment's metrics from its platform.
11197
+ *
11198
+ * @param comment_id The ID of the comment to update.
11199
+ * @returns A promise
11200
+ */
11201
+ SocialPosts.updateCommentMetrics = function (comment_id) {
11202
+ return Requests.processRoute(SocialPostsRoute.routes.updateCommentMetrics, undefined, { comment_id: comment_id });
11203
+ };
11091
11204
  return SocialPosts;
11092
11205
  }());
11093
11206
 
@@ -13441,6 +13554,8 @@ var MediaRoute = /** @class */ (function () {
13441
13554
  MediaRoute.routes = {
13442
13555
  upload: { url: '/media', method: HTTP_METHODS.POST },
13443
13556
  getMedia: { url: '/media/{media_id}', method: HTTP_METHODS.GET },
13557
+ cropSteamCapsule: { url: '/media/crop-steam-capsule', method: HTTP_METHODS.POST },
13558
+ analyzeSteamCapsule: { url: '/media/analyze-steam-capsule', method: HTTP_METHODS.POST },
13444
13559
  };
13445
13560
  return MediaRoute;
13446
13561
  }());
@@ -13486,6 +13601,108 @@ var Media = /** @class */ (function () {
13486
13601
  Media.get = function (media_id, params) {
13487
13602
  return Requests.processRoute(MediaRoute.routes.getMedia, {}, { media_id: media_id }, params);
13488
13603
  };
13604
+ /**
13605
+ * Crop and resize an image to Steam capsule dimensions.
13606
+ *
13607
+ * @param request The crop request parameters.
13608
+ * @param params Additional query parameters.
13609
+ *
13610
+ * @returns promise
13611
+ */
13612
+ Media.cropSteamCapsule = function (request, params) {
13613
+ return Requests.processRoute(MediaRoute.routes.cropSteamCapsule, request, {}, params);
13614
+ };
13615
+ /**
13616
+ * Analyze a Steam capsule image using AI.
13617
+ *
13618
+ * @param request The analysis request parameters.
13619
+ * @param params Additional query parameters.
13620
+ *
13621
+ * @returns promise
13622
+ */
13623
+ Media.analyzeSteamCapsule = function (request, params) {
13624
+ return Requests.processRoute(MediaRoute.routes.analyzeSteamCapsule, request, {}, params);
13625
+ };
13626
+ /**
13627
+ * Get Steam capsule dimensions for a specific type.
13628
+ *
13629
+ * @param capsuleType The type of Steam capsule.
13630
+ *
13631
+ * @returns The dimensions object or null if invalid type.
13632
+ */
13633
+ Media.getSteamCapsuleDimensions = function (capsuleType) {
13634
+ var dimensions = {
13635
+ 'header': { width: 920, height: 430 },
13636
+ 'small': { width: 462, height: 174 },
13637
+ 'main': { width: 1232, height: 706 },
13638
+ 'vertical': { width: 748, height: 896 },
13639
+ 'library': { width: 600, height: 900 },
13640
+ 'library_header': { width: 920, height: 430 },
13641
+ 'library_hero': { width: 3840, height: 1240 },
13642
+ 'page_background': { width: 1438, height: 810 }
13643
+ };
13644
+ return dimensions[capsuleType] || null;
13645
+ };
13646
+ /**
13647
+ * Get Steam capsule type information and requirements.
13648
+ *
13649
+ * @param capsuleType The type of Steam capsule.
13650
+ *
13651
+ * @returns Information about the capsule type.
13652
+ */
13653
+ Media.getSteamCapsuleInfo = function (capsuleType) {
13654
+ var info = {
13655
+ 'header': {
13656
+ name: 'Header Capsule',
13657
+ purpose: 'Appears at the top of store page, in recommended sections, grid view in libraries',
13658
+ textRequirement: 'Logo must be clearly legible',
13659
+ designFocus: 'Focus on branding of your product'
13660
+ },
13661
+ 'small': {
13662
+ name: 'Small Capsule',
13663
+ purpose: 'Used for all lists throughout Steam: search results, top-sellers, new releases',
13664
+ textRequirement: 'Logo should nearly fill the small capsule for readability',
13665
+ designFocus: 'Focus on making logo clearly legible at smallest size'
13666
+ },
13667
+ 'main': {
13668
+ name: 'Main Capsule',
13669
+ purpose: 'Appears at top of front page in featured and recommended carousel',
13670
+ textRequirement: 'Logo should be prominent and readable',
13671
+ designFocus: 'Designed to market the product with key art and logo'
13672
+ },
13673
+ 'vertical': {
13674
+ name: 'Vertical Capsule',
13675
+ purpose: 'Can appear at top of front page during seasonal sales',
13676
+ textRequirement: 'Logo should be clearly visible',
13677
+ designFocus: 'Vertical asset designed to market your game'
13678
+ },
13679
+ 'library': {
13680
+ name: 'Library Capsule',
13681
+ purpose: 'Used in library overview and collection views',
13682
+ textRequirement: 'Game name/logo should be easily legible against background',
13683
+ designFocus: 'Graphically-centric to give user sense of experience'
13684
+ },
13685
+ 'library_header': {
13686
+ name: 'Library Header',
13687
+ purpose: 'Appears in various places in Steam Client Library',
13688
+ textRequirement: 'Logo must be clearly legible',
13689
+ designFocus: 'Focus on branding, similar to Library Capsule'
13690
+ },
13691
+ 'library_hero': {
13692
+ name: 'Library Hero',
13693
+ purpose: 'Appears at top of user\'s library details page',
13694
+ textRequirement: 'Should NOT contain any text or logos',
13695
+ designFocus: 'Visually rich, easily recognizable key art'
13696
+ },
13697
+ 'page_background': {
13698
+ name: 'Page Background',
13699
+ purpose: 'Background image for store page',
13700
+ textRequirement: 'Minimal or no text',
13701
+ designFocus: 'Should be ambient, not compete with page content'
13702
+ }
13703
+ };
13704
+ return info[capsuleType] || null;
13705
+ };
13489
13706
  return Media;
13490
13707
  }());
13491
13708