glitch-javascript-sdk 3.1.4 → 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 +654 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Multiplayer.d.ts +871 -0
- package/dist/esm/api/ServerOperations.d.ts +7 -0
- package/dist/esm/api/Titles.d.ts +84 -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 +654 -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 +961 -0
- package/package.json +1 -1
- package/src/api/Multiplayer.ts +1012 -0
- package/src/api/ServerOperations.ts +16 -0
- package/src/api/Titles.ts +109 -0
- 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/ServerOperationsRoute.ts +17 -0
- package/src/routes/TitlesRoute.ts +12 -1
- package/src/util/Requests.ts +21 -1
|
@@ -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.
|
|
@@ -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;
|
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;
|