@wvdsh/api 0.1.96 → 0.1.98

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.
@@ -45,6 +45,46 @@ export declare const GAME_ENGINE: {
45
45
  readonly RENPY: "RENPY";
46
46
  readonly CUSTOM: "CUSTOM";
47
47
  };
48
+ export declare const LANGUAGE_CODE: {
49
+ readonly ARABIC: "ar";
50
+ readonly BULGARIAN: "bg";
51
+ readonly CATALAN: "ca";
52
+ readonly CHINESE_SIMPLIFIED: "zh-CN";
53
+ readonly CHINESE_TRADITIONAL: "zh-TW";
54
+ readonly CROATIAN: "hr";
55
+ readonly CZECH: "cs";
56
+ readonly DANISH: "da";
57
+ readonly DUTCH: "nl";
58
+ readonly ENGLISH: "en";
59
+ readonly ESPERANTO: "eo";
60
+ readonly FINNISH: "fi";
61
+ readonly FRENCH: "fr";
62
+ readonly GALICIAN: "gl";
63
+ readonly GERMAN: "de";
64
+ readonly GREEK: "el";
65
+ readonly HUNGARIAN: "hu";
66
+ readonly INDONESIAN: "id";
67
+ readonly ITALIAN: "it";
68
+ readonly JAPANESE: "ja";
69
+ readonly KOREAN: "ko";
70
+ readonly LATVIAN: "lv";
71
+ readonly LITHUANIAN: "lt";
72
+ readonly MALAY: "ms";
73
+ readonly NORWEGIAN: "no";
74
+ readonly POLISH: "pl";
75
+ readonly PORTUGUESE: "pt";
76
+ readonly PORTUGUESE_BRAZIL: "pt-BR";
77
+ readonly ROMANIAN: "ro";
78
+ readonly RUSSIAN: "ru";
79
+ readonly SPANISH: "es";
80
+ readonly SPANISH_LATIN_AMERICA: "es-419";
81
+ readonly SWEDISH: "sv";
82
+ readonly THAI: "th";
83
+ readonly TURKISH: "tr";
84
+ readonly UKRAINIAN: "uk";
85
+ readonly VIETNAMESE: "vi";
86
+ };
87
+ export type LanguageCode = (typeof LANGUAGE_CODE)[keyof typeof LANGUAGE_CODE];
48
88
  export declare const MAX_LOBBY_USERS = 250;
49
89
  export declare const LOBBY_DEFAULTS: {
50
90
  readonly MAX_PLAYERS: 250;
@@ -169,11 +209,14 @@ export interface IFrameResponse<T> {
169
209
  requestType: (typeof IFRAME_MESSAGE_TYPE)[keyof typeof IFRAME_MESSAGE_TYPE];
170
210
  data: T;
171
211
  }
172
- export interface SDKUser {
212
+ export interface SDKPeer {
173
213
  id: GenericId<'users'>;
174
214
  username: string;
175
215
  avatarUrl: string | undefined;
176
216
  }
217
+ export interface SDKUser extends SDKPeer {
218
+ language: LanguageCode;
219
+ }
177
220
  export interface SDKConfig {
178
221
  convexCloudUrl: string;
179
222
  wavedashUser: SDKUser;
@@ -10,6 +10,46 @@ export const GAME_ENGINE = {
10
10
  RENPY: 'RENPY',
11
11
  CUSTOM: 'CUSTOM'
12
12
  };
13
+ // ========== LANGUAGES ==========
14
+ export const LANGUAGE_CODE = {
15
+ ARABIC: 'ar',
16
+ BULGARIAN: 'bg',
17
+ CATALAN: 'ca',
18
+ CHINESE_SIMPLIFIED: 'zh-CN',
19
+ CHINESE_TRADITIONAL: 'zh-TW',
20
+ CROATIAN: 'hr',
21
+ CZECH: 'cs',
22
+ DANISH: 'da',
23
+ DUTCH: 'nl',
24
+ ENGLISH: 'en',
25
+ ESPERANTO: 'eo',
26
+ FINNISH: 'fi',
27
+ FRENCH: 'fr',
28
+ GALICIAN: 'gl',
29
+ GERMAN: 'de',
30
+ GREEK: 'el',
31
+ HUNGARIAN: 'hu',
32
+ INDONESIAN: 'id',
33
+ ITALIAN: 'it',
34
+ JAPANESE: 'ja',
35
+ KOREAN: 'ko',
36
+ LATVIAN: 'lv',
37
+ LITHUANIAN: 'lt',
38
+ MALAY: 'ms',
39
+ NORWEGIAN: 'no',
40
+ POLISH: 'pl',
41
+ PORTUGUESE: 'pt',
42
+ PORTUGUESE_BRAZIL: 'pt-BR',
43
+ ROMANIAN: 'ro',
44
+ RUSSIAN: 'ru',
45
+ SPANISH: 'es',
46
+ SPANISH_LATIN_AMERICA: 'es-419',
47
+ SWEDISH: 'sv',
48
+ THAI: 'th',
49
+ TURKISH: 'tr',
50
+ UKRAINIAN: 'uk',
51
+ VIETNAMESE: 'vi'
52
+ };
13
53
  // ========== LOBBIES ==========
14
54
  const LOBBY_EXPIRY_HOURS = 24;
15
55
  export const MAX_LOBBY_USERS = 250;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/api",
3
- "version": "0.1.96",
3
+ "version": "0.1.98",
4
4
  "description": "Public API types and shared constants for the Wavedash platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",