1
1
/**
2
- * Types extracted from https://discord.com/developers/docs/game-sdk/sdk-starter-guide
2
+ * Types extracted from https://discord.com/developers/docs/game-sdk/store
3
3
*/
4
4
5
5
import type { Snowflake } from '../../globals.ts' ;
6
6
import type { LocalizationMap } from '../common.ts' ;
7
7
8
- export interface APIAchievement {
9
- /**
10
- * Unique id of the application
11
- */
12
- application_id : Snowflake ;
13
- /**
14
- * Name of this achievement
15
- */
16
- name : string ;
17
- /**
18
- * Localization dictionary for the `name` field
19
- */
20
- name_localizations : LocalizationMap | null ;
21
- /**
22
- * The description of this achievement
23
- */
24
- description : string ;
25
- /**
26
- * Localization dictionary for the `description` field
27
- */
28
- description_localizations : keyof LocalizationMap | null ;
29
- /**
30
- * Whether this achievement is secret
31
- */
32
- secret : boolean ;
33
- /**
34
- * Whether this achievement is secure
35
- */
36
- secure : boolean ;
37
- /**
38
- * Unique id of this achievement
39
- */
40
- id : Snowflake ;
41
- /**
42
- * The achievement icon hash
43
- */
44
- icon_hash : string ;
45
- }
46
-
47
- export interface APILobby {
48
- /**
49
- * Unique id of this lobby
50
- */
51
- id : Snowflake ;
52
- /**
53
- * The type of this lobby (whether it is private or public)
54
- */
55
- type : LobbyType ;
56
- /**
57
- * The user id of the lobby owner
58
- */
59
- owner_id : Snowflake ;
60
- /**
61
- * The password of this lobby
62
- */
63
- secret : string ;
64
- /**
65
- * The maximum capacity of this lobby
66
- *
67
- * @default 16
68
- */
69
- capacity : number ;
70
- /**
71
- * Whether this lobby can be joined
72
- */
73
- locked : boolean ;
74
- /**
75
- * Unique id of the application
76
- */
77
- application_id : Snowflake ;
78
- /**
79
- * Metadata for this lobby. key/value pairs with type `string`
80
- */
81
- metadata : Record < string , string > ;
82
- /**
83
- * The region of this lobby. Defaults the region of the requesting server's IP address
84
- */
85
- region : LobbyRegion ;
86
- }
87
-
88
- export enum LobbyRegion {
89
- Atlanta = 'atlanta' ,
90
- Brazil = 'brazil' ,
91
- Bucharest = 'bucharest' ,
92
- BuenosAires = 'buenos-aires' ,
93
- Dubai = 'dubai' ,
94
- Finland = 'finland' ,
95
- Hongkong = 'hongkong' ,
96
- India = 'india' ,
97
- Japan = 'japan' ,
98
- Madrid = 'madrid' ,
99
- Milan = 'milan' ,
100
- Montreal = 'montreal' ,
101
- Newark = 'newark' ,
102
- Rotterdam = 'rotterdam' ,
103
- Russia = 'russia' ,
104
- SantaClara = 'santa-clara' ,
105
- Santiago = 'santiago' ,
106
- Seattle = 'seattle' ,
107
- Singapore = 'singapore' ,
108
- SouthKorea = 'south-korea' ,
109
- SouthAfrica = 'southafrica' ,
110
- StPete = 'st-pete' ,
111
- Stockholm = 'stockholm' ,
112
- Sydney = 'sydney' ,
113
- UsCentral = 'us-central' ,
114
- UsEast = 'us-east' ,
115
- UsSouth = 'us-south' ,
116
- UsWest = 'us-west' ,
117
- }
118
-
119
- export enum LobbyType {
120
- Private = 1 ,
121
- Public ,
122
- }
123
-
124
8
export interface APISKU {
125
9
/**
126
10
* Unique id of this SKU
@@ -185,7 +69,7 @@ export interface APISKU {
185
69
/**
186
70
* @unstable This field is missing documentation
187
71
*/
188
- locales : LocalizationMap [ ] ;
72
+ locales : keyof LocalizationMap [ ] ;
189
73
/**
190
74
* @unstable This field is missing documentation
191
75
*/
@@ -200,13 +84,13 @@ export enum SKUType {
200
84
/**
201
85
* The SKU is a DLC
202
86
*/
203
- Dlc ,
87
+ DLC ,
204
88
/**
205
89
* The SKU is consumable (in-app purchase)
206
90
*/
207
91
Consumable ,
208
92
/**
209
- * The SKU is a bundle (comprising by `Application`, `Dlc ` and `Consumable` all together)
93
+ * The SKU is a bundle (comprising by `Application`, `DLC ` and `Consumable` all together)
210
94
*/
211
95
Bundle ,
212
96
}
0 commit comments