glitch-javascript-sdk 3.1.3 → 3.1.5
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 +666 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Multiplayer.d.ts +871 -0
- package/dist/esm/api/Scheduler.d.ts +5 -0
- package/dist/esm/api/ServerOperations.d.ts +7 -0
- package/dist/esm/api/Titles.d.ts +91 -0
- package/dist/esm/api/index.d.ts +4 -0
- package/dist/esm/constants/HttpMethods.d.ts +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +666 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/MultiplayerRoute.d.ts +7 -0
- package/dist/esm/routes/ServerOperationsRoute.d.ts +7 -0
- package/dist/esm/util/Requests.d.ts +1 -0
- package/dist/index.d.ts +973 -0
- package/package.json +1 -1
- package/src/api/Multiplayer.ts +1012 -0
- package/src/api/Scheduler.ts +8 -0
- package/src/api/ServerOperations.ts +16 -0
- package/src/api/Titles.ts +117 -4
- package/src/api/index.ts +5 -1
- package/src/constants/HttpMethods.ts +2 -1
- package/src/index.ts +5 -1
- package/src/routes/MultiplayerRoute.ts +46 -0
- package/src/routes/SchedulerRoute.ts +1 -0
- package/src/routes/ServerOperationsRoute.ts +17 -0
- package/src/routes/TitlesRoute.ts +12 -1
- package/src/util/Requests.ts +21 -1
|
@@ -576,5 +576,10 @@ declare class Scheduler {
|
|
|
576
576
|
* @param params { is_personalized: boolean }
|
|
577
577
|
*/
|
|
578
578
|
static getTikTokTrendingKeywords<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
579
|
+
/**
|
|
580
|
+
* Get recommended search keywords on TikTok.
|
|
581
|
+
* @param params { is_personalized: boolean }
|
|
582
|
+
*/
|
|
583
|
+
static getTikTokRecommendedKeywords<T>(scheduler_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
579
584
|
}
|
|
580
585
|
export default Scheduler;
|
|
@@ -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;
|
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -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.
|
|
@@ -641,10 +676,12 @@ declare class Titles {
|
|
|
641
676
|
* @param params
|
|
642
677
|
* - window: number (hours, default 24)
|
|
643
678
|
* - limit: number (default 10)
|
|
679
|
+
* - is_nsfw: 1 for adult titles only, 0 for safe titles only
|
|
644
680
|
*/
|
|
645
681
|
static getCommunityActivity<T>(params?: {
|
|
646
682
|
window?: number;
|
|
647
683
|
limit?: number;
|
|
684
|
+
is_nsfw?: number | boolean;
|
|
648
685
|
}): AxiosPromise<Response<T>>;
|
|
649
686
|
/**
|
|
650
687
|
* Get games trending on social media.
|
|
@@ -653,11 +690,13 @@ declare class Titles {
|
|
|
653
690
|
* - type: 'influencer' (campaigns) or 'organic' (non-paid)
|
|
654
691
|
* - window: number (hours, default 168)
|
|
655
692
|
* - limit: number (default 10)
|
|
693
|
+
* - is_nsfw: 1 for adult titles only, 0 for safe titles only
|
|
656
694
|
*/
|
|
657
695
|
static getSocialTrending<T>(params: {
|
|
658
696
|
type: 'influencer' | 'organic';
|
|
659
697
|
window?: number;
|
|
660
698
|
limit?: number;
|
|
699
|
+
is_nsfw?: number | boolean;
|
|
661
700
|
}): AxiosPromise<Response<T>>;
|
|
662
701
|
/**
|
|
663
702
|
* Get a personalized discovery queue of games.
|
|
@@ -665,10 +704,12 @@ declare class Titles {
|
|
|
665
704
|
* @param params
|
|
666
705
|
* - limit: number (default 12)
|
|
667
706
|
* - device_id: string (highly recommended for guest tracking)
|
|
707
|
+
* - is_nsfw: 1 for adult titles only, 0 for safe titles only
|
|
668
708
|
*/
|
|
669
709
|
static getDiscoveryQueue<T>(params?: {
|
|
670
710
|
limit?: number;
|
|
671
711
|
device_id?: string;
|
|
712
|
+
is_nsfw?: number | boolean;
|
|
672
713
|
}): AxiosPromise<Response<T>>;
|
|
673
714
|
/**
|
|
674
715
|
* Get a curated, playable feed for the Swipe interface.
|
|
@@ -680,6 +721,7 @@ declare class Titles {
|
|
|
680
721
|
* - seed?: number (For consistent randomization)
|
|
681
722
|
* - genres?: string[] (Filter by genre names)
|
|
682
723
|
* - models?: string[] (premium, rental, subscription, free)
|
|
724
|
+
* - is_nsfw?: 1 | 0 (1 for adult titles only, 0 for safe titles only)
|
|
683
725
|
* - excluded_ids?: string[] (UUIDs to skip)
|
|
684
726
|
* - page?: number
|
|
685
727
|
* - per_page?: number
|
|
@@ -700,5 +742,54 @@ declare class Titles {
|
|
|
700
742
|
static wishlistConversions<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
701
743
|
static wishlistGeo<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
702
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>>;
|
|
703
794
|
}
|
|
704
795
|
export default Titles;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -42,6 +42,8 @@ import Raffles from "./Raffles";
|
|
|
42
42
|
import DiscordMarketplace from "./DiscordMarketplace";
|
|
43
43
|
import Education from "./Education";
|
|
44
44
|
import Crm from "./Crm";
|
|
45
|
+
import Multiplayer from "./Multiplayer";
|
|
46
|
+
import ServerOperations from "./ServerOperations";
|
|
45
47
|
export { Ads };
|
|
46
48
|
export { AccessKeys };
|
|
47
49
|
export { Auth };
|
|
@@ -86,3 +88,5 @@ export { Raffles };
|
|
|
86
88
|
export { DiscordMarketplace };
|
|
87
89
|
export { Education };
|
|
88
90
|
export { Crm };
|
|
91
|
+
export { Multiplayer };
|
|
92
|
+
export { ServerOperations };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -42,6 +42,8 @@ import { Raffles } from './api';
|
|
|
42
42
|
import { DiscordMarketplace } from './api';
|
|
43
43
|
import { Education } from './api';
|
|
44
44
|
import { Crm } from './api';
|
|
45
|
+
import { Multiplayer } from './api';
|
|
46
|
+
import { ServerOperations } from './api';
|
|
45
47
|
import Requests from "./util/Requests";
|
|
46
48
|
import Parser from "./util/Parser";
|
|
47
49
|
import Session from "./util/Session";
|
|
@@ -105,6 +107,8 @@ declare class Glitch {
|
|
|
105
107
|
DiscordMarketplace: typeof DiscordMarketplace;
|
|
106
108
|
Education: typeof Education;
|
|
107
109
|
Crm: typeof Crm;
|
|
110
|
+
Multiplayer: typeof Multiplayer;
|
|
111
|
+
ServerOperations: typeof ServerOperations;
|
|
108
112
|
};
|
|
109
113
|
static util: {
|
|
110
114
|
Requests: typeof Requests;
|