glitch-javascript-sdk 3.1.4 → 3.1.6

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.
@@ -0,0 +1,35 @@
1
+ import Response from "../util/Response";
2
+ import { AxiosPromise } from "axios";
3
+ declare class RedditSubreddits {
4
+ /**
5
+ * Search indexed Reddit communities for game marketing research.
6
+ *
7
+ * @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/indexRedditSubreddits
8
+ */
9
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
10
+ /**
11
+ * Get an analyzed subreddit record by display name.
12
+ *
13
+ * @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/showRedditSubreddit
14
+ */
15
+ static show<T>(subreddit: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
16
+ /**
17
+ * Match a game concept to relevant Reddit communities.
18
+ *
19
+ * @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/matchRedditSubreddits
20
+ */
21
+ static match<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
22
+ /**
23
+ * Admin-only ingestion of subreddit metadata and rules.
24
+ *
25
+ * @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/ingestRedditSubreddits
26
+ */
27
+ static ingest<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
28
+ /**
29
+ * Admin-only refresh for one subreddit.
30
+ *
31
+ * @see https://api.glitch.fun/api/documentation#/Reddit%20Subreddit%20Intelligence/refreshRedditSubreddit
32
+ */
33
+ static refresh<T>(subreddit: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
34
+ }
35
+ export default RedditSubreddits;
@@ -477,7 +477,7 @@ declare class Scheduler {
477
477
  */
478
478
  static deleteDestination<T>(scheduler_id: string, update_id: string, destination_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
479
479
  /**
480
- * Get AI-powered subreddit recommendations for a scheduler.
480
+ * Get subreddit recommendations for a scheduler.
481
481
  *
482
482
  * @see https://api.glitch.fun/api/documentation#/Scheduler/getSchedulerRedditRecommendations
483
483
  *
@@ -496,6 +496,22 @@ declare class Scheduler {
496
496
  * @returns promise
497
497
  */
498
498
  static generateRedditContent<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
499
+ /**
500
+ * Match the scheduler title to indexed Reddit communities.
501
+ *
502
+ * @param scheduler_id The ID of the promotion schedule.
503
+ * @param data Optional post context and filters.
504
+ * @returns promise
505
+ */
506
+ static getRedditSubredditMatches<T>(scheduler_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
507
+ /**
508
+ * Position a registered game for a subreddit and optionally prepare Reddit draft content.
509
+ *
510
+ * @param scheduler_id The ID of the promotion schedule.
511
+ * @param data The target subreddit and optional post context.
512
+ * @returns promise
513
+ */
514
+ static getRedditSubredditPositioning<T>(scheduler_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
499
515
  /**
500
516
  * Get all posts and comments for a scheduler.
501
517
  *
@@ -0,0 +1,7 @@
1
+ import Response from "../util/Response";
2
+ import { AxiosPromise } from "axios";
3
+ declare class ServerOperations {
4
+ static listDeployments<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
5
+ static updatePolicy<T>(title_id: string, build_id: string, data: object): AxiosPromise<Response<T>>;
6
+ }
7
+ export default ServerOperations;
@@ -1,5 +1,40 @@
1
1
  import Response from "../util/Response";
2
2
  import { AxiosPromise } from "axios";
3
+ export type GameReviewRecommendation = 'recommended' | 'not_recommended' | 'neutral';
4
+ export type GameReviewSentiment = 'positive' | 'mixed' | 'negative';
5
+ export type GameReviewVoteType = 'helpful' | 'funny' | 'detailed' | 'not_helpful';
6
+ export type GameReviewReportReason = 'abuse' | 'spam' | 'off_topic' | 'manipulation' | 'hate' | 'personal_info' | 'other';
7
+ export interface GameReviewRatings {
8
+ gameplay?: GameReviewSentiment;
9
+ performance?: GameReviewSentiment;
10
+ value?: GameReviewSentiment;
11
+ content?: GameReviewSentiment;
12
+ multiplayer?: GameReviewSentiment;
13
+ monetization?: GameReviewSentiment;
14
+ stability?: GameReviewSentiment;
15
+ localization?: GameReviewSentiment;
16
+ accessibility?: GameReviewSentiment;
17
+ }
18
+ export interface CreateGameReviewRequest {
19
+ recommendation: GameReviewRecommendation;
20
+ title: string;
21
+ body: string;
22
+ review_type?: 'first_impression' | 'full_review' | 'bug_performance_warning' | 'early_access_feedback' | 'multiplayer_community_feedback' | 'monetization_pricing_feedback' | 'changed_opinion_after_update';
23
+ liked?: string;
24
+ needs_work?: string;
25
+ audience?: string;
26
+ language?: string;
27
+ game_version?: string;
28
+ platform?: string;
29
+ acquisition_type?: 'purchased' | 'free_to_play' | 'free_copy' | 'promotional_key' | 'beta_key' | 'demo' | 'external_verified';
30
+ received_for_free?: boolean;
31
+ early_access?: boolean;
32
+ current_version_review?: boolean;
33
+ main_negative_reason?: 'bugs_crashes' | 'bad_performance' | 'not_enough_content' | 'misleading_marketing' | 'price_value' | 'monetization' | 'community_toxicity' | 'developer_business_decision' | 'localization' | 'server_network' | 'gameplay_design' | 'not_my_type' | 'other';
34
+ change_reason?: string;
35
+ ratings?: GameReviewRatings;
36
+ }
37
+ export type UpdateGameReviewRequest = Partial<CreateGameReviewRequest>;
3
38
  declare class Titles {
4
39
  /**
5
40
  * List all the Titles.
@@ -707,5 +742,54 @@ declare class Titles {
707
742
  static wishlistConversions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
708
743
  static wishlistGeo<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
709
744
  static wishlistDevices<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
745
+ /**
746
+ * List public reviews for a title.
747
+ *
748
+ * @param title_id The UUID of the title.
749
+ * @param params Optional filters: recommendation, language, current_version_only,
750
+ * verified_only, platform, acquisition_type, complaint, playtime, sort, per_page.
751
+ */
752
+ static listReviews<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
753
+ /**
754
+ * Get aggregate review scores and structured praise/complaint summaries.
755
+ */
756
+ static reviewSummary<T>(title_id: string, params?: {
757
+ language?: string;
758
+ }): AxiosPromise<Response<T>>;
759
+ /**
760
+ * Create the current user's review for a title. The backend verifies play/purchase eligibility.
761
+ */
762
+ static createReview<T>(title_id: string, data: CreateGameReviewRequest): AxiosPromise<Response<T>>;
763
+ /**
764
+ * View a single review, including revision history when the backend includes it.
765
+ */
766
+ static viewReview<T>(review_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
767
+ /**
768
+ * Update the current user's review and preserve a backend revision trail.
769
+ */
770
+ static updateReview<T>(review_id: string, data: UpdateGameReviewRequest): AxiosPromise<Response<T>>;
771
+ /**
772
+ * Delete the current user's review, or a title admin's moderated review.
773
+ */
774
+ static deleteReview<T>(review_id: string): AxiosPromise<Response<T>>;
775
+ /**
776
+ * Vote on a review as helpful, funny, detailed, or not helpful.
777
+ */
778
+ static voteReview<T>(review_id: string, vote_type: GameReviewVoteType): AxiosPromise<Response<T>>;
779
+ /**
780
+ * Report a review for moderation.
781
+ */
782
+ static reportReview<T>(review_id: string, data: {
783
+ reason: GameReviewReportReason;
784
+ notes?: string;
785
+ }): AxiosPromise<Response<T>>;
786
+ /**
787
+ * Create or update the title developer's official response to a review.
788
+ */
789
+ static respondToReview<T>(review_id: string, data: {
790
+ body: string;
791
+ linked_patch_note_id?: string;
792
+ issue_marked_fixed?: boolean;
793
+ }): AxiosPromise<Response<T>>;
710
794
  }
711
795
  export default Titles;
@@ -30,6 +30,7 @@ import Newsletters from "./Newsletters";
30
30
  import PlayTests from "./PlayTests";
31
31
  import Media from "./Media";
32
32
  import Scheduler from "./Scheduler";
33
+ import RedditSubreddits from "./RedditSubreddits";
33
34
  import Funnel from "./Funnel";
34
35
  import SocialStats from "./SocialStats";
35
36
  import Hashtags from "./Hashtags";
@@ -42,6 +43,8 @@ import Raffles from "./Raffles";
42
43
  import DiscordMarketplace from "./DiscordMarketplace";
43
44
  import Education from "./Education";
44
45
  import Crm from "./Crm";
46
+ import Multiplayer from "./Multiplayer";
47
+ import ServerOperations from "./ServerOperations";
45
48
  export { Ads };
46
49
  export { AccessKeys };
47
50
  export { Auth };
@@ -73,6 +76,7 @@ export { Newsletters };
73
76
  export { PlayTests };
74
77
  export { Media };
75
78
  export { Scheduler };
79
+ export { RedditSubreddits };
76
80
  export { Funnel };
77
81
  export { SocialStats };
78
82
  export { Hashtags };
@@ -86,3 +90,5 @@ export { Raffles };
86
90
  export { DiscordMarketplace };
87
91
  export { Education };
88
92
  export { Crm };
93
+ export { Multiplayer };
94
+ export { ServerOperations };
@@ -1,6 +1,7 @@
1
1
  declare const HTTP_METHODS: {
2
2
  readonly GET: "GET";
3
3
  readonly POST: "POST";
4
+ readonly PATCH: "PATCH";
4
5
  readonly PUT: "PUT";
5
6
  readonly DELETE: "DELETE";
6
7
  };
@@ -29,6 +29,7 @@ import { Newsletters } from "./api";
29
29
  import { PlayTests } from "./api";
30
30
  import { Media } from "./api";
31
31
  import { Scheduler } from "./api";
32
+ import { RedditSubreddits } from "./api";
32
33
  import { Funnel } from "./api";
33
34
  import { SocialStats } from "./api";
34
35
  import { Hashtags } from "./api";
@@ -42,6 +43,8 @@ import { Raffles } from './api';
42
43
  import { DiscordMarketplace } from './api';
43
44
  import { Education } from './api';
44
45
  import { Crm } from './api';
46
+ import { Multiplayer } from './api';
47
+ import { ServerOperations } from './api';
45
48
  import Requests from "./util/Requests";
46
49
  import Parser from "./util/Parser";
47
50
  import Session from "./util/Session";
@@ -93,6 +96,7 @@ declare class Glitch {
93
96
  PlayTests: typeof PlayTests;
94
97
  Media: typeof Media;
95
98
  Scheduler: typeof Scheduler;
99
+ RedditSubreddits: typeof RedditSubreddits;
96
100
  Funnel: typeof Funnel;
97
101
  SocialStats: typeof SocialStats;
98
102
  WebsiteAnalytics: typeof WebsiteAnalytics;
@@ -105,6 +109,8 @@ declare class Glitch {
105
109
  DiscordMarketplace: typeof DiscordMarketplace;
106
110
  Education: typeof Education;
107
111
  Crm: typeof Crm;
112
+ Multiplayer: typeof Multiplayer;
113
+ ServerOperations: typeof ServerOperations;
108
114
  };
109
115
  static util: {
110
116
  Requests: typeof Requests;