glitch-javascript-sdk 3.10.3 → 3.10.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 +24 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/GameDesign.d.ts +46 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/GameDesignRoute.d.ts +7 -0
- package/dist/index.d.ts +45 -0
- package/package.json +2 -2
- package/src/api/GameDesign.ts +82 -0
- package/src/api/index.ts +2 -0
- package/src/index.ts +2 -0
- package/src/routes/GameDesignRoute.ts +13 -0
package/dist/index.d.ts
CHANGED
|
@@ -11769,6 +11769,50 @@ declare class Hosting {
|
|
|
11769
11769
|
static deleteDatabase<T>(title_id: string, site_id: string, database_id: string, confirmation: string): AxiosPromise<Response<T>>;
|
|
11770
11770
|
}
|
|
11771
11771
|
|
|
11772
|
+
type GameDesignGenre = 'action' | 'adventure' | 'rpg' | 'strategy' | 'simulation' | 'puzzle' | 'survival' | 'platformer' | 'racing' | 'sports' | 'cozy' | 'horror' | 'card' | 'sandbox';
|
|
11773
|
+
type GameDesignPlayMode = 'single-player' | 'cooperative' | 'competitive multiplayer' | 'asynchronous multiplayer';
|
|
11774
|
+
type GameDesignSessionLength = '5–10 minute' | '15–30 minute' | '30–60 minute' | 'open-ended';
|
|
11775
|
+
interface GameDesignBlueprintInput {
|
|
11776
|
+
gameName?: string;
|
|
11777
|
+
/** Primary deterministic fallback profile retained for older clients. */
|
|
11778
|
+
genre?: GameDesignGenre;
|
|
11779
|
+
/** Exact genre names selected from Utility.listGenres(). */
|
|
11780
|
+
genres?: string[];
|
|
11781
|
+
playMode: GameDesignPlayMode;
|
|
11782
|
+
sessionLength: GameDesignSessionLength;
|
|
11783
|
+
playerFantasy: string;
|
|
11784
|
+
setting: string;
|
|
11785
|
+
primaryGoal: string;
|
|
11786
|
+
mainPressure: string;
|
|
11787
|
+
signatureTwist: string;
|
|
11788
|
+
progression?: string;
|
|
11789
|
+
preferredActivities?: string;
|
|
11790
|
+
}
|
|
11791
|
+
interface GameDesignBlueprintItem {
|
|
11792
|
+
title: string;
|
|
11793
|
+
description: string;
|
|
11794
|
+
}
|
|
11795
|
+
interface GameDesignBlueprint {
|
|
11796
|
+
gameName: string;
|
|
11797
|
+
descriptor: string;
|
|
11798
|
+
shortPitch: string;
|
|
11799
|
+
coreFantasy: string;
|
|
11800
|
+
coreVerbs: string[];
|
|
11801
|
+
pillars: GameDesignBlueprintItem[];
|
|
11802
|
+
mechanics: GameDesignBlueprintItem[];
|
|
11803
|
+
coreLoop: GameDesignBlueprintItem[];
|
|
11804
|
+
sessionLoop: string[];
|
|
11805
|
+
coreTest: string;
|
|
11806
|
+
scopeRules: string[];
|
|
11807
|
+
documentationInstruction: string;
|
|
11808
|
+
ai_used: boolean;
|
|
11809
|
+
}
|
|
11810
|
+
/** Public AI-assisted tools for turning an early game idea into testable design documentation. */
|
|
11811
|
+
declare class GameDesign {
|
|
11812
|
+
/** Generate a mechanics and core-loop blueprint without requiring authentication. */
|
|
11813
|
+
static generateBlueprint<T = GameDesignBlueprint>(input: GameDesignBlueprintInput): AxiosPromise<Response<T>>;
|
|
11814
|
+
}
|
|
11815
|
+
|
|
11772
11816
|
interface Route {
|
|
11773
11817
|
url: string;
|
|
11774
11818
|
method: string;
|
|
@@ -12141,6 +12185,7 @@ declare class Glitch {
|
|
|
12141
12185
|
MarketResearch: typeof MarketResearch;
|
|
12142
12186
|
GameAdvertising: typeof GameAdvertising;
|
|
12143
12187
|
Hosting: typeof Hosting;
|
|
12188
|
+
GameDesign: typeof GameDesign;
|
|
12144
12189
|
};
|
|
12145
12190
|
static util: {
|
|
12146
12191
|
Requests: typeof Requests;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glitch-javascript-sdk",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.5",
|
|
4
4
|
"description": "Javascript SDK for Glitch",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
15
|
"scripts": {
|
|
16
|
-
"test": "node scripts/test-hosting-routes.cjs && node scripts/test-game-advertising-routes.cjs && node scripts/test-discord-media-routes.cjs && node scripts/test-user-email-delivery-routes.cjs && node scripts/test-game-show-ticket-routes.cjs",
|
|
16
|
+
"test": "node scripts/test-hosting-routes.cjs && node scripts/test-game-advertising-routes.cjs && node scripts/test-game-design-routes.cjs && node scripts/test-discord-media-routes.cjs && node scripts/test-user-email-delivery-routes.cjs && node scripts/test-game-show-ticket-routes.cjs",
|
|
17
17
|
"build": "rm -Rf dist && rollup -c --bundleConfigAsCjs",
|
|
18
18
|
"build-docs": "rm -rf docs && typedoc --tsconfig tsconfig.json src/"
|
|
19
19
|
},
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { AxiosPromise } from 'axios';
|
|
2
|
+
import GameDesignRoute from '../routes/GameDesignRoute';
|
|
3
|
+
import Requests from '../util/Requests';
|
|
4
|
+
import Response from '../util/Response';
|
|
5
|
+
|
|
6
|
+
export type GameDesignGenre =
|
|
7
|
+
| 'action'
|
|
8
|
+
| 'adventure'
|
|
9
|
+
| 'rpg'
|
|
10
|
+
| 'strategy'
|
|
11
|
+
| 'simulation'
|
|
12
|
+
| 'puzzle'
|
|
13
|
+
| 'survival'
|
|
14
|
+
| 'platformer'
|
|
15
|
+
| 'racing'
|
|
16
|
+
| 'sports'
|
|
17
|
+
| 'cozy'
|
|
18
|
+
| 'horror'
|
|
19
|
+
| 'card'
|
|
20
|
+
| 'sandbox';
|
|
21
|
+
|
|
22
|
+
export type GameDesignPlayMode =
|
|
23
|
+
| 'single-player'
|
|
24
|
+
| 'cooperative'
|
|
25
|
+
| 'competitive multiplayer'
|
|
26
|
+
| 'asynchronous multiplayer';
|
|
27
|
+
|
|
28
|
+
export type GameDesignSessionLength =
|
|
29
|
+
| '5–10 minute'
|
|
30
|
+
| '15–30 minute'
|
|
31
|
+
| '30–60 minute'
|
|
32
|
+
| 'open-ended';
|
|
33
|
+
|
|
34
|
+
export interface GameDesignBlueprintInput {
|
|
35
|
+
gameName?: string;
|
|
36
|
+
/** Primary deterministic fallback profile retained for older clients. */
|
|
37
|
+
genre?: GameDesignGenre;
|
|
38
|
+
/** Exact genre names selected from Utility.listGenres(). */
|
|
39
|
+
genres?: string[];
|
|
40
|
+
playMode: GameDesignPlayMode;
|
|
41
|
+
sessionLength: GameDesignSessionLength;
|
|
42
|
+
playerFantasy: string;
|
|
43
|
+
setting: string;
|
|
44
|
+
primaryGoal: string;
|
|
45
|
+
mainPressure: string;
|
|
46
|
+
signatureTwist: string;
|
|
47
|
+
progression?: string;
|
|
48
|
+
preferredActivities?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface GameDesignBlueprintItem {
|
|
52
|
+
title: string;
|
|
53
|
+
description: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface GameDesignBlueprint {
|
|
57
|
+
gameName: string;
|
|
58
|
+
descriptor: string;
|
|
59
|
+
shortPitch: string;
|
|
60
|
+
coreFantasy: string;
|
|
61
|
+
coreVerbs: string[];
|
|
62
|
+
pillars: GameDesignBlueprintItem[];
|
|
63
|
+
mechanics: GameDesignBlueprintItem[];
|
|
64
|
+
coreLoop: GameDesignBlueprintItem[];
|
|
65
|
+
sessionLoop: string[];
|
|
66
|
+
coreTest: string;
|
|
67
|
+
scopeRules: string[];
|
|
68
|
+
documentationInstruction: string;
|
|
69
|
+
ai_used: boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Public AI-assisted tools for turning an early game idea into testable design documentation. */
|
|
73
|
+
class GameDesign {
|
|
74
|
+
/** Generate a mechanics and core-loop blueprint without requiring authentication. */
|
|
75
|
+
static generateBlueprint<T = GameDesignBlueprint>(
|
|
76
|
+
input: GameDesignBlueprintInput
|
|
77
|
+
): AxiosPromise<Response<T>> {
|
|
78
|
+
return Requests.processRoute<T>(GameDesignRoute.routes.generateBlueprint, input);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export default GameDesign;
|
package/src/api/index.ts
CHANGED
|
@@ -53,6 +53,7 @@ import AdminUsers from "./AdminUsers";
|
|
|
53
53
|
import MarketResearch from "./MarketResearch";
|
|
54
54
|
import GameAdvertising from './GameAdvertising';
|
|
55
55
|
import Hosting from './Hosting';
|
|
56
|
+
import GameDesign from './GameDesign';
|
|
56
57
|
|
|
57
58
|
export {Ads};
|
|
58
59
|
export {AccessKeys};
|
|
@@ -109,3 +110,4 @@ export {AdminUsers};
|
|
|
109
110
|
export {MarketResearch};
|
|
110
111
|
export {GameAdvertising};
|
|
111
112
|
export {Hosting};
|
|
113
|
+
export {GameDesign};
|
package/src/index.ts
CHANGED
|
@@ -57,6 +57,7 @@ import {AdminUsers} from './api';
|
|
|
57
57
|
import {MarketResearch} from './api';
|
|
58
58
|
import {GameAdvertising} from './api';
|
|
59
59
|
import {Hosting} from './api';
|
|
60
|
+
import {GameDesign} from './api';
|
|
60
61
|
|
|
61
62
|
import Requests from "./util/Requests";
|
|
62
63
|
import Parser from "./util/Parser";
|
|
@@ -143,6 +144,7 @@ class Glitch {
|
|
|
143
144
|
MarketResearch : MarketResearch,
|
|
144
145
|
GameAdvertising: GameAdvertising,
|
|
145
146
|
Hosting: Hosting,
|
|
147
|
+
GameDesign: GameDesign,
|
|
146
148
|
}
|
|
147
149
|
|
|
148
150
|
public static util = {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import HTTP_METHODS from '../constants/HttpMethods';
|
|
2
|
+
import Route from './interface';
|
|
3
|
+
|
|
4
|
+
class GameDesignRoute {
|
|
5
|
+
public static routes: { [key: string]: Route } = {
|
|
6
|
+
generateBlueprint: {
|
|
7
|
+
url: '/tools/game-design/blueprint',
|
|
8
|
+
method: HTTP_METHODS.POST,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default GameDesignRoute;
|