@defold-typescript/library-types 0.22.0 → 0.24.0

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.
Files changed (145) hide show
  1. package/api-doc/boom.json +3870 -0
  2. package/api-doc/{bridge.bridge.json → bridge.json} +754 -844
  3. package/api-doc/bzAnim.json +338 -0
  4. package/api-doc/decore.json +23 -23
  5. package/api-doc/defcon.json +150 -0
  6. package/api-doc/{defmath.defmath.json → defmath.json} +6 -46
  7. package/api-doc/defsave.json +518 -0
  8. package/api-doc/deftest.json +741 -0
  9. package/api-doc/{dicebag.dicebag.json → dicebag.json} +19 -1
  10. package/api-doc/druid.json +249 -1846
  11. package/api-doc/event.json +1074 -0
  12. package/api-doc/gooey.json +2050 -0
  13. package/api-doc/immutable.json +65 -0
  14. package/api-doc/in.accelerometer.json +75 -1
  15. package/api-doc/in.button.json +17 -10
  16. package/api-doc/in.cursor.json +26 -0
  17. package/api-doc/in.gesture.json +401 -6
  18. package/api-doc/in.keyboard.json +2 -0
  19. package/api-doc/in.mapper.json +12 -8
  20. package/api-doc/in.onscreen.json +61 -5
  21. package/api-doc/in.state.json +61 -13
  22. package/api-doc/in.textbox.json +23 -12
  23. package/api-doc/in.triggers.json +336 -0
  24. package/api-doc/lang.json +528 -0
  25. package/api-doc/{event.event.json → log.json} +96 -101
  26. package/api-doc/metrics.fps.json +61 -2
  27. package/api-doc/metrics.mem.json +61 -2
  28. package/api-doc/monarch.monarch.json +249 -7
  29. package/api-doc/monarch.transitions.easings.json +19 -26
  30. package/api-doc/monarch.transitions.gui.json +782 -79
  31. package/api-doc/nakama.engine.defold.json +31 -18
  32. package/api-doc/{nakama.nakama.json → nakama.json} +4752 -2554
  33. package/api-doc/nakama.util.log.json +32 -4
  34. package/api-doc/narrator.json +647 -0
  35. package/api-doc/openapi/nakama.nakama.json +7680 -0
  36. package/api-doc/orthographic.camera.json +96 -98
  37. package/api-doc/orthographic.json +602 -0
  38. package/api-doc/panthera.json +1183 -0
  39. package/api-doc/{persist.persist.json → persist.json} +26 -1
  40. package/api-doc/{platypus.platypus.json → platypus.json} +68 -14
  41. package/api-doc/proto.json +995 -0
  42. package/api-doc/{rendy.rendy.json → rendy.json} +46 -99
  43. package/api-doc/richtext.color.json +77 -0
  44. package/api-doc/richtext.richtext.json +375 -5
  45. package/api-doc/saver.saver.json +714 -263
  46. package/api-doc/saver.storage.json +283 -52
  47. package/api-doc/squid.json +846 -0
  48. package/api-doc/{starly.starly.json → starly.json} +1 -1
  49. package/api-doc/tweener.json +277 -0
  50. package/api-doc/{yagames.yagames.json → yagames.json} +784 -189
  51. package/api-doc/{zzfx.api.json → zzfx.json} +9 -9
  52. package/authored-targets.json +403 -0
  53. package/generated/{boom.boom.d.ts → boom.d.ts} +14 -0
  54. package/generated/bridge.d.ts +468 -0
  55. package/generated/{bzAnim.bzLibrary.d.ts → bzAnim.d.ts} +6 -0
  56. package/generated/decore.d.ts +37 -37
  57. package/generated/defcon.d.ts +43 -0
  58. package/generated/{defmath.defmath.d.ts → defmath.d.ts} +3 -2
  59. package/generated/defsave.d.ts +144 -0
  60. package/generated/{dicebag.dicebag.d.ts → dicebag.d.ts} +25 -0
  61. package/generated/druid.d.ts +198 -502
  62. package/generated/event.d.ts +318 -0
  63. package/generated/{gooey.gooey.d.ts → gooey.d.ts} +61 -6
  64. package/generated/immutable.d.ts +13 -0
  65. package/generated/in.onscreen.d.ts +5 -0
  66. package/generated/in.textbox.d.ts +4 -0
  67. package/generated/lang.d.ts +101 -0
  68. package/generated/log.d.ts +36 -0
  69. package/generated/metrics.fps.d.ts +19 -1
  70. package/generated/metrics.mem.d.ts +19 -1
  71. package/generated/monarch.monarch.d.ts +44 -1
  72. package/generated/monarch.transitions.easings.d.ts +0 -1
  73. package/generated/monarch.transitions.gui.d.ts +96 -12
  74. package/generated/nakama.d.ts +1158 -0
  75. package/generated/nakama.engine.defold.d.ts +3 -1
  76. package/generated/nakama.util.log.d.ts +6 -0
  77. package/generated/narrator.d.ts +121 -0
  78. package/generated/openapi/nakama.nakama.d.ts +884 -0
  79. package/generated/orthographic.camera.d.ts +24 -38
  80. package/generated/orthographic.d.ts +155 -0
  81. package/generated/panthera.d.ts +170 -0
  82. package/generated/{persist.persist.d.ts → persist.d.ts} +3 -0
  83. package/generated/{platypus.platypus.d.ts → platypus.d.ts} +9 -0
  84. package/generated/proto.d.ts +146 -0
  85. package/generated/{rendy.rendy.d.ts → rendy.d.ts} +33 -80
  86. package/generated/richtext.color.d.ts +15 -0
  87. package/generated/saver.saver.d.ts +289 -42
  88. package/generated/saver.storage.d.ts +79 -14
  89. package/generated/squid.d.ts +127 -0
  90. package/generated/tweener.d.ts +42 -0
  91. package/generated/{yagames.yagames.d.ts → yagames.d.ts} +151 -29
  92. package/generated/{zzfx.api.d.ts → zzfx.d.ts} +7 -0
  93. package/library-classification.json +0 -227
  94. package/library-targets.json +1 -284
  95. package/luals-targets.json +168 -1
  96. package/openapi-targets.json +17 -0
  97. package/package.json +9 -88
  98. package/script-api-targets.json +15 -0
  99. package/scripts/__snapshots__/parse-luals.test.ts.snap +504 -85
  100. package/scripts/apply-luals-overrides.ts +95 -0
  101. package/scripts/authored-parity.ts +718 -0
  102. package/scripts/emit-library-dts.ts +177 -19
  103. package/scripts/extract-api-doc.ts +189 -38
  104. package/scripts/fidelity-floor.ts +178 -0
  105. package/scripts/import-upstream-docs.ts +125 -0
  106. package/scripts/lower-api-doc.ts +69 -19
  107. package/scripts/luals-fidelity.ts +22 -10
  108. package/scripts/map-luals-types.ts +86 -22
  109. package/scripts/parse-lua-surface.ts +187 -0
  110. package/scripts/parse-luals.ts +473 -22
  111. package/scripts/parse-markdown-api.ts +247 -0
  112. package/scripts/parse-openapi-api.ts +313 -0
  113. package/scripts/sync-authored-types.ts +249 -0
  114. package/scripts/sync-library-types.ts +99 -3
  115. package/scripts/sync-luals-types.ts +29 -2
  116. package/scripts/sync-markdown-types.ts +761 -0
  117. package/scripts/sync-openapi-types.ts +308 -0
  118. package/scripts/sync-script-api-types.ts +367 -0
  119. package/api-doc/boom.boom.json +0 -26
  120. package/api-doc/bzAnim.bzLibrary.json +0 -156
  121. package/api-doc/defcon.console.json +0 -109
  122. package/api-doc/defsave.defsave.json +0 -175
  123. package/api-doc/deftest.deftest.json +0 -71
  124. package/api-doc/gooey.gooey.json +0 -963
  125. package/api-doc/immutable.immutable.json +0 -63
  126. package/api-doc/lang.lang.json +0 -411
  127. package/api-doc/log.log.json +0 -50
  128. package/api-doc/narrator.narrator.json +0 -150
  129. package/api-doc/proto.proto.json +0 -355
  130. package/api-doc/squid.squid.json +0 -660
  131. package/api-doc/tweener.tweener.json +0 -419
  132. package/generated/bridge.bridge.d.ts +0 -533
  133. package/generated/defcon.console.d.ts +0 -24
  134. package/generated/defsave.defsave.d.ts +0 -31
  135. package/generated/event.event.d.ts +0 -54
  136. package/generated/immutable.immutable.d.ts +0 -13
  137. package/generated/lang.lang.d.ts +0 -33
  138. package/generated/log.log.d.ts +0 -40
  139. package/generated/nakama.nakama.d.ts +0 -594
  140. package/generated/narrator.narrator.d.ts +0 -66
  141. package/generated/proto.proto.d.ts +0 -36
  142. package/generated/squid.squid.d.ts +0 -106
  143. package/generated/tweener.tweener.d.ts +0 -151
  144. /package/generated/{deftest.deftest.d.ts → deftest.d.ts} +0 -0
  145. /package/generated/{starly.starly.d.ts → starly.d.ts} +0 -0
@@ -0,0 +1,127 @@
1
+ /** @noResolution */
2
+ declare module 'squid.squid' {
3
+ /**
4
+ * @(1) trace logging level constant
5
+ */
6
+ export const TRACE: number;
7
+ /**
8
+ * @(2) debug logging level constant
9
+ */
10
+ export const DEBUG: number;
11
+ /**
12
+ * @(3) info logging level constant
13
+ */
14
+ export const INFO: number;
15
+ /**
16
+ * @(4) warning logging level constant
17
+ */
18
+ export const WARN: number;
19
+ /**
20
+ * @(5) error logging level constant
21
+ */
22
+ export const ERROR: number;
23
+ /**
24
+ * @Public list of allowed tags (pairs tag[string] - is_allowed[boolean])
25
+ */
26
+ export const ALLOWLIST: LuaTable;
27
+ interface SquidInstance {
28
+ log(message: string | number, level: number, data?: unknown): void;
29
+ trace(message: string | number, data?: unknown): void;
30
+ debug(message: string | number, data?: unknown): void;
31
+ info(message: string | number, data?: unknown): void;
32
+ warn(message: string | number, data?: unknown): void;
33
+ error(message: string | number, data?: unknown): void;
34
+ set_allowed(this_tag?: string, this_is_allowed?: boolean): void;
35
+ save_logs(): void;
36
+ init(): void;
37
+ final(): void;
38
+ }
39
+ interface SquidConfig {
40
+ app_catalog: string;
41
+ log_file_name: string;
42
+ log_file_extension: string;
43
+ is_enabled: boolean;
44
+ is_enabled_in_release: boolean;
45
+ is_printing: boolean;
46
+ is_saving: boolean;
47
+ is_adding_timestamp: boolean;
48
+ is_using_allowlist: boolean;
49
+ days_to_delete_logs: number;
50
+ min_log_level: number;
51
+ unsaved_logs_buffer: number;
52
+ max_data_length: number;
53
+ max_data_depth: number;
54
+ is_printing_crashes: boolean;
55
+ is_saving_crashes: boolean;
56
+ crash_file_name: string;
57
+ crash_file_extension: string;
58
+ }
59
+ interface SystemHelper {
60
+ is_linux: boolean;
61
+ is_mobile: boolean;
62
+ is_debug: boolean;
63
+ }
64
+ interface TableToString {
65
+ }
66
+ /**
67
+ * ------
68
+ * ------
69
+ * ------
70
+ * ------
71
+ * Initialize Squid for error and crash handling and logging
72
+ */
73
+ export function init(this: void): void;
74
+ /**
75
+ * Set if logs should be saved to file
76
+ */
77
+ export function set_allowed(this: void, tag: string, is_allowed: boolean): void;
78
+ /**
79
+ * Log TRACE level message with optional data and tag
80
+ */
81
+ export function trace(this: void, message: string | number, data_or_tag?: unknown, tag?: string): void;
82
+ /**
83
+ * Log DEBUG level message with optional data and tag
84
+ */
85
+ export function debug(this: void, message: string | number, data_or_tag?: unknown, tag?: string): void;
86
+ /**
87
+ * Log INFO level message with optional data and tag
88
+ */
89
+ export function info(this: void, message: string | number, data_or_tag?: unknown, tag?: string): void;
90
+ /**
91
+ * Log WARNING level message with optional data and tag
92
+ */
93
+ export function warn(this: void, message: string | number, data_or_tag?: unknown, tag?: string): void;
94
+ /**
95
+ * Log ERROR level message with optional data and tag
96
+ */
97
+ export function error(this: void, message: string | number, data_or_tag?: unknown, tag?: string): void;
98
+ /**
99
+ * Log message with provided level, message, data and tag
100
+ */
101
+ export function log(this: void, message: string | number, level?: number, data_or_tag?: unknown, tag?: string): void;
102
+ /**
103
+ * Explicitly save buffer of unsaved logs to a file
104
+ */
105
+ export function save_logs(this: void): boolean;
106
+ /**
107
+ * Set error callback function that will be called on error after logging it
108
+ */
109
+ export function set_error_callback(this: void, callback: (source: string, message: string, traceback: string) => void): void;
110
+ /**
111
+ * Finalize Squid logging - check for crashes and saved all unsaved buffered logs
112
+ */
113
+ export function final(this: void): void;
114
+ /**
115
+ * Create a new instance of the Squid logger
116
+ */
117
+ export function new_(this: void, tag?: string, is_allowed?: boolean): SquidInstance;
118
+ export { new_ as new };
119
+ /**
120
+ * Get Squid configuration
121
+ */
122
+ export function get_config(this: void): SquidConfig;
123
+ /**
124
+ * Set and use user configuration
125
+ */
126
+ export function set_config(this: void, config: SquidConfig): void;
127
+ }
@@ -0,0 +1,42 @@
1
+ /** @noResolution */
2
+ declare module 'tweener.tweener' {
3
+ type easing_function = ((current: number, from: number, to: number, time: number) => number) | string | Opaque<"constant"> | number[];
4
+ /**
5
+ * Describe a struct of tween object returned by the `tweener.tween` function
6
+ */
7
+ interface tween {
8
+ timer_id: number;
9
+ is_paused: boolean;
10
+ }
11
+ /**
12
+ * A tweener module to manage tweening operations. Tween functions are based on the Defold timer.delay function.
13
+ * Use `tweener.tween` to create a tween, and `tweener.ease` to get the result of an easing function.
14
+ * You can track the final call of tween by last parameter of the callback function.
15
+ */
16
+ interface tweener {
17
+ }
18
+ /**
19
+ * Starts a tweening operation. Return a tween object to manage the tween.
20
+ */
21
+ export function tween(this: void, easing_function: easing_function, from: number, to: number, time: number | undefined, callback: (value: number, is_end: boolean, time_elapsed: number, time_total: number) => void, update_delta_time?: number | undefined): tween;
22
+ /**
23
+ * Returns the result of an easing function.
24
+ */
25
+ export function ease(this: void, easing_function: easing_function, from: number, to: number, time: number | undefined, time_elapsed: number): number;
26
+ /**
27
+ * Check if a tween exists
28
+ */
29
+ export function is_active(this: void, tween: tween): boolean;
30
+ /**
31
+ * Cancel a previous running tween.
32
+ */
33
+ export function cancel(this: void, tween?: tween | undefined): boolean;
34
+ /**
35
+ * Check if a tween is paused
36
+ */
37
+ export function is_paused(this: void, tween: tween): boolean;
38
+ /**
39
+ * Sets the pause on a running tween.
40
+ */
41
+ export function set_pause(this: void, tween: tween, is_paused: boolean): void;
42
+ }
@@ -29,7 +29,21 @@ declare module 'yagames.yagames' {
29
29
  }
30
30
  export function adv_show_rewarded_video(callbacks: RewardedCallbacks): void;
31
31
 
32
- //* Authentication + Player
32
+ export interface StickyBannerStatus {
33
+ stickyAdvIsShowing: boolean;
34
+ reason?: "ADV_IS_NOT_CONNECTED" | "UNKNOWN";
35
+ }
36
+ export type StickyBannerCallback = (ctx: Context, err?: string, result?: StickyBannerStatus) => void;
37
+ export function adv_get_banner_adv_status(callback: StickyBannerCallback): void;
38
+
39
+ export function adv_show_banner_adv(callback?: StickyBannerCallback): void;
40
+
41
+ export type StickyBannerHideCallback = (ctx: Context, err?: string, result?: {
42
+ stickyAdvIsShowing: boolean;
43
+ }) => void;
44
+ export function adv_hide_banner_adv(callback?: StickyBannerHideCallback): void;
45
+
46
+ //* Authentication + Player
33
47
 
34
48
  export function auth_open_auth_dialog(callback: ApiCallback): void;
35
49
 
@@ -50,7 +64,7 @@ declare module 'yagames.yagames' {
50
64
  export function player_get_stats(keys: Array<string> | undefined, callback: ApiCallback): void;
51
65
 
52
66
  /**
53
- * @deprecated Use `player_get_unqiue_id` instead.
67
+ * @deprecated Use `player_get_unique_id` instead.
54
68
  */
55
69
  export function player_get_id(): string;
56
70
 
@@ -66,6 +80,24 @@ declare module 'yagames.yagames' {
66
80
 
67
81
  export function player_get_photo(size: 'small' | 'medium' | 'large'): string;
68
82
 
83
+ export function player_get_paying_status(): 'paying' | 'partially_paying' | 'not_paying' | 'unknown';
84
+
85
+ /**
86
+ * Upstream types the result as "table or nil" and publishes no field list for the
87
+ * SDK's `_personalInfo` object, so the shape stays open rather than invented.
88
+ */
89
+ export type PlayerPersonalInfo = Record<string, unknown>;
90
+ export function player_get_personal_info(): PlayerPersonalInfo | undefined;
91
+
92
+ export function player_get_signature(): string | undefined;
93
+
94
+ /**
95
+ * @deprecated Use `player_is_authorized` instead.
96
+ */
97
+ export function player_get_mode(): 'lite' | '';
98
+
99
+ export function player_is_authorized(): boolean;
100
+
69
101
  //* In-Game Purchases
70
102
 
71
103
  export function payments_init(options: { signed?: boolean } | undefined, callback: ApiCallback): void;
@@ -101,12 +133,19 @@ declare module 'yagames.yagames' {
101
133
  priceValue: string;
102
134
  priceCurrencyCode: string;
103
135
  }>) => void;
104
- export function payments_get_catalog(callback: PaymentsCatalogCallback): void;
136
+ export interface PaymentsCatalogOptions {
137
+ getPriceCurrencyImage?: 'medium' | 'small' | 'svg';
138
+ }
139
+ export function payments_get_catalog(options: PaymentsCatalogOptions | undefined, callback: PaymentsCatalogCallback): void;
105
140
 
106
141
  export function payments_consume_purchase(purchase_token: string, callback: ApiCallback): void;
107
142
 
108
143
  //* Leaderboards
109
144
 
145
+ /**
146
+ * @deprecated The leaderboards subsystem no longer needs initializing; the other
147
+ * `leaderboards_*` functions work without it.
148
+ */
110
149
  export function leaderboards_init(callback: ApiCallback): void;
111
150
 
112
151
  export type LeaderboardsDescriptionCallback = (ctx: Context, err?: string, data?: {
@@ -177,6 +216,33 @@ declare module 'yagames.yagames' {
177
216
 
178
217
  export function leaderboards_set_score(leaderboard_name: string, score: number, extra_data: string, callback: ApiCallback): void;
179
218
 
219
+ //* Features
220
+
221
+ export function features_loadingapi_ready(): void;
222
+
223
+ export function features_gameplayapi_start(): void;
224
+
225
+ export function features_gameplayapi_stop(): void;
226
+
227
+ export interface GamesApiGame {
228
+ appID: string;
229
+ title: string;
230
+ url: string;
231
+ coverURL: string;
232
+ iconURL: string;
233
+ }
234
+ export type GamesApiAllGamesCallback = (ctx: Context, err?: string, result?: {
235
+ games: Array<GamesApiGame>;
236
+ developerURL: string;
237
+ }) => void;
238
+ export function features_gamesapi_get_all_games(callback: GamesApiAllGamesCallback): void;
239
+
240
+ export type GamesApiGameByIdCallback = (ctx: Context, err?: string, result?: {
241
+ isAvailable: boolean;
242
+ game?: GamesApiGame;
243
+ }) => void;
244
+ export function features_gamesapi_get_game_by_id(app_id: number, callback: GamesApiGameByIdCallback): void;
245
+
180
246
  //* Feedback
181
247
 
182
248
  export type FeedbackCanReviewCallback = (ctx: Context, err?: string, data?: {
@@ -204,6 +270,8 @@ declare module 'yagames.yagames' {
204
270
 
205
271
  export function device_info_is_tablet(): boolean;
206
272
 
273
+ export function device_info_is_tv(): boolean;
274
+
207
275
  //* Environment
208
276
 
209
277
  export interface EnvironmentResults {
@@ -229,6 +297,18 @@ declare module 'yagames.yagames' {
229
297
 
230
298
  export function screen_fullscreen_exit(callback?: ApiCallback): void;
231
299
 
300
+ //* Shortcuts
301
+
302
+ export type ShortcutCanShowCallback = (ctx: Context, err?: string, result?: {
303
+ canShow: boolean;
304
+ }) => void;
305
+ export function shortcut_can_show_prompt(callback: ShortcutCanShowCallback): void;
306
+
307
+ export type ShortcutShowPromptCallback = (ctx: Context, err?: string, result?: {
308
+ outcome: string;
309
+ }) => void;
310
+ export function shortcut_show_prompt(callback?: ShortcutShowPromptCallback): void;
311
+
232
312
  //* Safe Storage
233
313
 
234
314
  export function storage_init(callback: ApiCallback): void;
@@ -245,35 +325,77 @@ declare module 'yagames.yagames' {
245
325
 
246
326
  export function storage_length(): number;
247
327
 
248
- //* Banner Ads
328
+ //* Remote Config
329
+
330
+ export interface FlagsClientFeature {
331
+ name: string;
332
+ value: string;
333
+ }
334
+ export interface FlagsOptions {
335
+ defaultFlags?: Record<string, string>;
336
+ clientFeatures?: Array<FlagsClientFeature>;
337
+ }
338
+ export type FlagsCallback = (ctx: Context, err?: string, flags?: Record<string, string>) => void;
339
+ export function flags_get(options: FlagsOptions | undefined, callback: FlagsCallback): void;
340
+
341
+ //* Events
249
342
 
250
- export function banner_init(callback: ApiCallback): void;
343
+ export function event_on(event_name: string, listener: ApiCallback): void;
251
344
 
252
- export interface BannerCreateOptions {
253
- stat_id?: number;
254
- css_styles?: string;
255
- css_class?: string;
256
- display?: "none" | "block";
345
+ export function event_off(event_name: string, listener: ApiCallback): void;
346
+
347
+ export function event_dispatch(event_name: string): void;
348
+
349
+ //* Multiplayer Sessions
350
+
351
+ export interface MultiplayerSessionsMetaRange {
352
+ min: number;
353
+ max: number;
257
354
  }
258
- export type BannerCreateCallback = (ctx: Context, err?: string, data?: {
259
- product: "direct" | "rtb";
260
- }) => void;
261
- export function banner_create(rtb_id: string, options: BannerCreateOptions, callback?: BannerCreateCallback): void;
262
-
263
- export function banner_delete(rtb_id: string): void;
264
-
265
- export function banner_refresh(rtb_id: string, callback?: BannerCreateCallback): void;
266
-
267
- export function banner_set(rtb_id: string, property: "stat_id" | "css_styles" | "css_class" | "display", value: string): void;
355
+ export interface MultiplayerSessionsMeta {
356
+ meta1?: MultiplayerSessionsMetaRange;
357
+ meta2?: MultiplayerSessionsMetaRange;
358
+ meta3?: MultiplayerSessionsMetaRange;
359
+ }
360
+ export interface MultiplayerSessionsInitOptions {
361
+ count: number;
362
+ isEventBased: boolean;
363
+ maxOpponentTurnTime?: number;
364
+ meta: MultiplayerSessionsMeta;
365
+ }
366
+ export interface MultiplayerSessionEvent {
367
+ id: string;
368
+ payload: Record<string, unknown>;
369
+ time: number;
370
+ }
371
+ export interface MultiplayerSession {
372
+ id: string;
373
+ meta1?: number;
374
+ meta2?: number;
375
+ meta3?: number;
376
+ player: {
377
+ avatar: string;
378
+ name: string;
379
+ }
380
+ timeline: Array<MultiplayerSessionEvent>;
381
+ }
382
+ export type MultiplayerSessionsInitCallback = (ctx: Context, err?: string, result?: Array<MultiplayerSession>) => void;
383
+ export function multiplayer_sessions_init(options: MultiplayerSessionsInitOptions, callback: MultiplayerSessionsInitCallback): void;
268
384
 
269
- //* Sitelock
270
-
271
- export function add_domain(domain: string): void;
272
-
273
- export function verify_domain(): boolean;
274
-
275
- export function get_current_domain(): string;
276
-
277
- export function is_release_build(): boolean;
385
+ export function multiplayer_sessions_commit(data: Record<string, unknown>): void;
386
+
387
+ export interface MultiplayerSessionsPushMeta {
388
+ meta1?: number;
389
+ meta2?: number;
390
+ meta3?: number;
391
+ }
392
+ export function multiplayer_sessions_push(data: MultiplayerSessionsPushMeta): void;
393
+
394
+ //* Miscellaneous
395
+
396
+ export type AvailableMethodCallback = (ctx: Context, err?: string, result?: boolean) => void;
397
+ export function is_available_method(name: string, callback: AvailableMethodCallback): void;
398
+
399
+ export function server_time(): number;
278
400
 
279
401
  }
@@ -10,11 +10,18 @@ type ZzFXSample = LuaUserdata & {
10
10
  * @noResolution
11
11
  */
12
12
  declare module 'zzfx.api' {
13
+ /**
14
+ * Build a sample from a ZzFX parameter list and play it in one call.
15
+ * @see {@link https://killedbyapixel.github.io/ZzFX/|the ZzFX sound designer}
16
+ */
13
17
  export function play(...args: number[]): void;
14
18
 
19
+ /** Set the sample rate used to render subsequent samples. Defaults to 44100. */
15
20
  export function samplerate(rate: number): void;
16
21
 
22
+ /** Play a sample previously returned by {@link build_sample}. */
17
23
  export function play_sample(sample: ZzFXSample): void;
18
24
 
25
+ /** Build a reusable sample from a ZzFX parameter list, without playing it. */
19
26
  export function build_sample(...args: number[]): ZzFXSample;
20
27
  }