glitch-javascript-sdk 3.10.2 → 3.10.4

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,7 @@
1
+ import Route from './interface';
2
+ declare class GameDesignRoute {
3
+ static routes: {
4
+ [key: string]: Route;
5
+ };
6
+ }
7
+ export default GameDesignRoute;
package/dist/index.d.ts CHANGED
@@ -11658,7 +11658,7 @@ interface HostingServiceDefinition {
11658
11658
  game_build_id?: string;
11659
11659
  }
11660
11660
  interface HostingServiceStackRequest {
11661
- preset?: 'single_server' | 'world_of_claudecraft' | 'web_and_api' | 'authoritative_world' | 'biomes_style';
11661
+ preset?: 'single_server' | 'stateful_game_server' | 'web_and_api' | 'authoritative_world' | 'large_realtime_world';
11662
11662
  game_build_id?: string;
11663
11663
  builds?: Record<string, string>;
11664
11664
  services?: HostingServiceDefinition[];
@@ -11769,6 +11769,47 @@ 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
+ genre: GameDesignGenre;
11778
+ playMode: GameDesignPlayMode;
11779
+ sessionLength: GameDesignSessionLength;
11780
+ playerFantasy: string;
11781
+ setting: string;
11782
+ primaryGoal: string;
11783
+ mainPressure: string;
11784
+ signatureTwist: string;
11785
+ progression?: string;
11786
+ preferredActivities?: string;
11787
+ }
11788
+ interface GameDesignBlueprintItem {
11789
+ title: string;
11790
+ description: string;
11791
+ }
11792
+ interface GameDesignBlueprint {
11793
+ gameName: string;
11794
+ descriptor: string;
11795
+ shortPitch: string;
11796
+ coreFantasy: string;
11797
+ coreVerbs: string[];
11798
+ pillars: GameDesignBlueprintItem[];
11799
+ mechanics: GameDesignBlueprintItem[];
11800
+ coreLoop: GameDesignBlueprintItem[];
11801
+ sessionLoop: string[];
11802
+ coreTest: string;
11803
+ scopeRules: string[];
11804
+ documentationInstruction: string;
11805
+ ai_used: boolean;
11806
+ }
11807
+ /** Public AI-assisted tools for turning an early game idea into testable design documentation. */
11808
+ declare class GameDesign {
11809
+ /** Generate a mechanics and core-loop blueprint without requiring authentication. */
11810
+ static generateBlueprint<T = GameDesignBlueprint>(input: GameDesignBlueprintInput): AxiosPromise<Response<T>>;
11811
+ }
11812
+
11772
11813
  interface Route {
11773
11814
  url: string;
11774
11815
  method: string;
@@ -12141,6 +12182,7 @@ declare class Glitch {
12141
12182
  MarketResearch: typeof MarketResearch;
12142
12183
  GameAdvertising: typeof GameAdvertising;
12143
12184
  Hosting: typeof Hosting;
12185
+ GameDesign: typeof GameDesign;
12144
12186
  };
12145
12187
  static util: {
12146
12188
  Requests: typeof Requests;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "3.10.2",
3
+ "version": "3.10.4",
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,79 @@
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
+ genre: GameDesignGenre;
37
+ playMode: GameDesignPlayMode;
38
+ sessionLength: GameDesignSessionLength;
39
+ playerFantasy: string;
40
+ setting: string;
41
+ primaryGoal: string;
42
+ mainPressure: string;
43
+ signatureTwist: string;
44
+ progression?: string;
45
+ preferredActivities?: string;
46
+ }
47
+
48
+ export interface GameDesignBlueprintItem {
49
+ title: string;
50
+ description: string;
51
+ }
52
+
53
+ export interface GameDesignBlueprint {
54
+ gameName: string;
55
+ descriptor: string;
56
+ shortPitch: string;
57
+ coreFantasy: string;
58
+ coreVerbs: string[];
59
+ pillars: GameDesignBlueprintItem[];
60
+ mechanics: GameDesignBlueprintItem[];
61
+ coreLoop: GameDesignBlueprintItem[];
62
+ sessionLoop: string[];
63
+ coreTest: string;
64
+ scopeRules: string[];
65
+ documentationInstruction: string;
66
+ ai_used: boolean;
67
+ }
68
+
69
+ /** Public AI-assisted tools for turning an early game idea into testable design documentation. */
70
+ class GameDesign {
71
+ /** Generate a mechanics and core-loop blueprint without requiring authentication. */
72
+ static generateBlueprint<T = GameDesignBlueprint>(
73
+ input: GameDesignBlueprintInput
74
+ ): AxiosPromise<Response<T>> {
75
+ return Requests.processRoute<T>(GameDesignRoute.routes.generateBlueprint, input);
76
+ }
77
+ }
78
+
79
+ export default GameDesign;
@@ -210,7 +210,7 @@ export interface HostingServiceDefinition {
210
210
  }
211
211
 
212
212
  export interface HostingServiceStackRequest {
213
- preset?: 'single_server' | 'world_of_claudecraft' | 'web_and_api' | 'authoritative_world' | 'biomes_style';
213
+ preset?: 'single_server' | 'stateful_game_server' | 'web_and_api' | 'authoritative_world' | 'large_realtime_world';
214
214
  game_build_id?: string;
215
215
  builds?: Record<string, string>;
216
216
  services?: HostingServiceDefinition[];
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;