@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
@@ -1,396 +1,416 @@
1
1
  {
2
2
  "info": {
3
- "namespace": "bridge.bridge",
4
- "brief": "",
5
- "description": ""
3
+ "namespace": "bridge",
4
+ "brief": "Functions and constants for interacting with bridge",
5
+ "description": "Functions and constants for interacting with bridge"
6
6
  },
7
7
  "elements": [
8
8
  {
9
9
  "type": "FUNCTION",
10
- "name": "achievements.get_list",
11
- "brief": "Returns the achievement list in JSON.",
12
- "description": "Returns the achievement list in JSON.",
10
+ "name": "bridge.platform.on",
11
+ "description": "State changed events.",
13
12
  "parameters": [
14
13
  {
15
- "name": "options",
14
+ "name": "event_name",
16
15
  "doc": "",
17
16
  "types": [
18
- "object"
19
- ],
20
- "is_optional": "False"
21
- },
22
- {
23
- "name": "on_success",
24
- "doc": "function(_, list)",
25
- "types": [
26
- "(this: any, list: unknown) => void"
27
- ],
28
- "is_optional": "False"
17
+ "string"
18
+ ]
29
19
  },
30
20
  {
31
- "name": "on_failure",
32
- "doc": "function(_, error)",
21
+ "name": "callback",
22
+ "doc": "function(_, state)",
33
23
  "types": [
34
- "(this: any, error: unknown) => void"
35
- ],
36
- "is_optional": "False"
24
+ "function"
25
+ ]
37
26
  }
38
27
  ],
39
28
  "returnvalues": []
40
29
  },
41
30
  {
42
31
  "type": "FUNCTION",
43
- "name": "achievements.is_get_list_supported",
44
- "brief": "Check if getting list of achievements is supported.",
45
- "description": "Check if getting list of achievements is supported.",
32
+ "name": "bridge.platform.id",
33
+ "description": "Identify the platform on which the game is currently running to customize features and settings accordingly.",
46
34
  "parameters": [],
47
35
  "returnvalues": [
48
36
  {
49
- "name": "",
37
+ "name": "result",
50
38
  "doc": "",
51
39
  "types": [
52
- "boolean"
40
+ "string",
41
+ "nil"
53
42
  ]
54
43
  }
55
44
  ]
56
45
  },
57
46
  {
58
47
  "type": "FUNCTION",
59
- "name": "achievements.is_native_popup_supported",
60
- "brief": "Check if built-in popup is supported.",
61
- "description": "Check if built-in popup is supported.",
48
+ "name": "bridge.platform.tld",
49
+ "description": "Retrieve the top-level domain of the platform to handle domain-specific configurations and behavior.",
62
50
  "parameters": [],
63
51
  "returnvalues": [
64
52
  {
65
- "name": "",
53
+ "name": "result",
66
54
  "doc": "",
67
55
  "types": [
68
- "boolean"
56
+ "string",
57
+ "nil"
69
58
  ]
70
59
  }
71
60
  ]
72
61
  },
73
62
  {
74
63
  "type": "FUNCTION",
75
- "name": "achievements.is_supported",
76
- "brief": "Use this to determine if you can implement achievements for your game on the current platform.",
77
- "description": "Use this to determine if you can implement achievements for your game on the current platform.",
64
+ "name": "bridge.platform.language",
65
+ "description": "Get the language set by the user on the platform or the browser language if not provided by the platform, to localize game content.",
78
66
  "parameters": [],
79
67
  "returnvalues": [
80
68
  {
81
- "name": "",
69
+ "name": "result",
82
70
  "doc": "",
83
71
  "types": [
84
- "boolean"
72
+ "string"
85
73
  ]
86
74
  }
87
75
  ]
88
76
  },
89
77
  {
90
78
  "type": "FUNCTION",
91
- "name": "achievements.show_native_popup",
92
- "brief": "Returns the achievement list in JSON.",
93
- "description": "Returns the achievement list in JSON.",
79
+ "name": "bridge.platform.payload",
80
+ "description": "Embed auxiliary information into the game URL to pass additional data or settings when launching the game.",
81
+ "parameters": [],
82
+ "returnvalues": [
83
+ {
84
+ "name": "result",
85
+ "doc": "",
86
+ "types": [
87
+ "string",
88
+ "nil"
89
+ ]
90
+ }
91
+ ]
92
+ },
93
+ {
94
+ "type": "FUNCTION",
95
+ "name": "bridge.platform.send_message",
96
+ "description": "Send predefined messages to the platform to trigger specific actions or events, such as signaling that the game is ready.",
94
97
  "parameters": [
98
+ {
99
+ "name": "message",
100
+ "doc": "One of message types: `game_ready` `in_game_loading_started`",
101
+ "types": [
102
+ "string"
103
+ ]
104
+ },
95
105
  {
96
106
  "name": "options",
97
- "doc": "",
107
+ "doc": "Optional message-specific options (may be omitted).",
98
108
  "types": [
99
- "object"
100
- ],
101
- "is_optional": "False"
109
+ "table"
110
+ ]
102
111
  },
103
112
  {
104
113
  "name": "on_success",
105
- "doc": "function()",
114
+ "doc": "",
106
115
  "types": [
107
- "(...args: any[]) => void"
108
- ],
109
- "is_optional": "False"
116
+ "function"
117
+ ]
110
118
  },
111
119
  {
112
120
  "name": "on_failure",
113
- "doc": "function(_, error)",
121
+ "doc": "",
114
122
  "types": [
115
- "(this: any, error: unknown) => void"
116
- ],
117
- "is_optional": "False"
123
+ "function"
124
+ ]
118
125
  }
119
126
  ],
120
127
  "returnvalues": []
121
128
  },
122
129
  {
123
130
  "type": "FUNCTION",
124
- "name": "achievements.unlock",
125
- "brief": "Unlocks achievement for a player.",
126
- "description": "Unlocks achievement for a player.",
131
+ "name": "bridge.platform.send_custom_message",
132
+ "description": "Send a custom message with an arbitrary id to the platform.",
127
133
  "parameters": [
134
+ {
135
+ "name": "id",
136
+ "doc": "The custom message id.",
137
+ "types": [
138
+ "string"
139
+ ]
140
+ },
128
141
  {
129
142
  "name": "options",
130
- "doc": "",
143
+ "doc": "Optional message-specific options (may be omitted).",
131
144
  "types": [
132
- "object"
133
- ],
134
- "is_optional": "False"
145
+ "table"
146
+ ]
135
147
  },
136
148
  {
137
149
  "name": "on_success",
138
- "doc": "function(_, result)",
150
+ "doc": "",
139
151
  "types": [
140
- "(this: any, result: unknown) => void"
141
- ],
142
- "is_optional": "False"
152
+ "function"
153
+ ]
143
154
  },
144
155
  {
145
156
  "name": "on_failure",
146
- "doc": "function(_, error)",
157
+ "doc": "",
147
158
  "types": [
148
- "(this: any, error: unknown) => void"
149
- ],
150
- "is_optional": "False"
159
+ "function"
160
+ ]
151
161
  }
152
162
  ],
153
163
  "returnvalues": []
154
164
  },
155
165
  {
156
166
  "type": "FUNCTION",
157
- "name": "advertisement.banner_state",
158
- "brief": "Hide the currently displayed banner ad when it is no longer needed.",
159
- "description": "Hide the currently displayed banner ad when it is no longer needed.",
160
- "parameters": [],
161
- "returnvalues": []
162
- },
163
- {
164
- "type": "FUNCTION",
165
- "name": "advertisement.check_ad_block",
166
- "brief": "Check if the ad blocker is enabled.",
167
- "description": "Check if the ad blocker is enabled.",
167
+ "name": "bridge.platform.get_server_time",
168
+ "description": "Server Time",
168
169
  "parameters": [
169
170
  {
170
171
  "name": "on_success",
171
- "doc": "function(_, bool)",
172
+ "doc": "function(_, time)",
172
173
  "types": [
173
- "(this: any, bool: boolean) => void"
174
- ],
175
- "is_optional": "False"
174
+ "function"
175
+ ]
176
176
  },
177
177
  {
178
178
  "name": "on_failure",
179
179
  "doc": "function(_, error)",
180
180
  "types": [
181
- "(this: any, error: unknown) => void"
182
- ],
183
- "is_optional": "False"
181
+ "function"
182
+ ]
184
183
  }
185
184
  ],
186
185
  "returnvalues": []
187
186
  },
188
187
  {
189
188
  "type": "FUNCTION",
190
- "name": "advertisement.hide_banner",
191
- "brief": "Hide the currently displayed banner ad when it is no longer needed.",
192
- "description": "Hide the currently displayed banner ad when it is no longer needed.",
193
- "parameters": [],
194
- "returnvalues": []
195
- },
196
- {
197
- "type": "FUNCTION",
198
- "name": "advertisement.interstitial_state",
199
- "brief": "Track the state of the interstitial ad to manage ad display and user experience.",
200
- "description": "Track the state of the interstitial ad to manage ad display and user experience.",
201
- "parameters": [],
202
- "returnvalues": []
203
- },
204
- {
205
- "type": "FUNCTION",
206
- "name": "advertisement.is_banner_supported",
207
- "brief": "Check if the platform supports displaying banner ads. Use this to determine if you can include banner advertisements in your game.",
208
- "description": "Check if the platform supports displaying banner ads. Use this to determine if you can include banner advertisements in your game.",
209
- "parameters": [],
210
- "returnvalues": [
211
- {
212
- "name": "",
213
- "doc": "",
214
- "types": [
215
- "string"
216
- ]
217
- }
218
- ]
219
- },
220
- {
221
- "type": "FUNCTION",
222
- "name": "advertisement.is_interstitial_supported",
223
- "brief": "Check if the platform supports displaying interstitial ads. Use this to determine if you can include interstitial advertisements in your game.",
224
- "description": "Check if the platform supports displaying interstitial ads. Use this to determine if you can include interstitial advertisements in your game.",
189
+ "name": "bridge.platform.is_audio_enabled",
190
+ "description": "Check if the audio is enabled on the platform.",
225
191
  "parameters": [],
226
192
  "returnvalues": [
227
193
  {
228
- "name": "",
194
+ "name": "result",
229
195
  "doc": "",
230
196
  "types": [
231
- "string"
197
+ "boolean"
232
198
  ]
233
199
  }
234
200
  ]
235
201
  },
236
202
  {
237
203
  "type": "FUNCTION",
238
- "name": "advertisement.is_rewarded_supported",
239
- "brief": "Check if the platform supports displaying rewarded ads. Use this to determine if you can include rewarded advertisements in your game.",
240
- "description": "Check if the platform supports displaying rewarded ads. Use this to determine if you can include rewarded advertisements in your game.",
204
+ "name": "bridge.platform.is_external_calls_supported",
205
+ "description": "Check if external calls are supported on the platform.",
241
206
  "parameters": [],
242
207
  "returnvalues": [
243
208
  {
244
- "name": "",
209
+ "name": "result",
245
210
  "doc": "",
246
211
  "types": [
247
- "string"
212
+ "boolean"
248
213
  ]
249
214
  }
250
215
  ]
251
216
  },
252
217
  {
253
218
  "type": "FUNCTION",
254
- "name": "advertisement.minimum_delay_between_interstitial",
255
- "brief": "Minimum time interval between interstitial ad displays to comply with platform requirements and improve user experience.",
256
- "description": "Minimum time interval between interstitial ad displays to comply with platform requirements and improve user experience.",
219
+ "name": "bridge.platform.is_external_links_allowed",
220
+ "description": "Check if external links are allowed on the platform.",
257
221
  "parameters": [],
258
222
  "returnvalues": [
259
223
  {
260
- "name": "",
224
+ "name": "result",
261
225
  "doc": "",
262
226
  "types": [
263
- "number"
227
+ "boolean"
264
228
  ]
265
229
  }
266
230
  ]
267
231
  },
268
232
  {
269
233
  "type": "FUNCTION",
270
- "name": "advertisement.on",
271
- "brief": "State changed events.",
272
- "description": "State changed events.",
234
+ "name": "bridge.cross_promo.get_games",
235
+ "description": "Get the cross-promo games list. Resolves to an empty array when unsupported. Each game has the shape { id, name, url, icon_url, cover_url, payload }.",
273
236
  "parameters": [
274
237
  {
275
- "name": "event_name",
276
- "doc": "",
238
+ "name": "on_success",
239
+ "doc": "function(_, games)",
277
240
  "types": [
278
- "string"
279
- ],
280
- "is_optional": "False"
241
+ "function"
242
+ ]
281
243
  },
282
244
  {
283
- "name": "callback",
284
- "doc": "function(_, state)",
245
+ "name": "on_failure",
246
+ "doc": "function(_, error)",
285
247
  "types": [
286
- "(this: any, state: unknown) => void"
287
- ],
288
- "is_optional": "False"
248
+ "function"
249
+ ]
289
250
  }
290
251
  ],
291
252
  "returnvalues": []
292
253
  },
293
254
  {
294
255
  "type": "FUNCTION",
295
- "name": "advertisement.rewarded_placement",
296
- "brief": "Monitor the placement of the rewarded ad to manage the reward process.",
297
- "description": "Monitor the placement of the rewarded ad to manage the reward process.",
256
+ "name": "bridge.cross_promo.show",
257
+ "description": "Show the built-in cross-promo HTML overlay.",
298
258
  "parameters": [],
299
259
  "returnvalues": []
300
260
  },
301
261
  {
302
262
  "type": "FUNCTION",
303
- "name": "advertisement.rewarded_state",
304
- "brief": "Monitor the state of the rewarded ad (loading, opened, closed, rewarded, failed) to manage the reward process.",
305
- "description": "Monitor the state of the rewarded ad (loading, opened, closed, rewarded, failed) to manage the reward process.",
263
+ "name": "bridge.cross_promo.hide",
264
+ "description": "Hide the built-in cross-promo HTML overlay.",
306
265
  "parameters": [],
307
266
  "returnvalues": []
308
267
  },
309
268
  {
310
269
  "type": "FUNCTION",
311
- "name": "advertisement.set_minimum_delay_between_interstitial",
312
- "brief": "Set the minimum time interval between interstitial ad displays to comply with platform requirements and improve user experience.",
313
- "description": "Set the minimum time interval between interstitial ad displays to comply with platform requirements and improve user experience.",
270
+ "name": "bridge.cross_promo.is_visible",
271
+ "description": "Check whether the cross-promo overlay is currently shown.",
272
+ "parameters": [],
273
+ "returnvalues": [
274
+ {
275
+ "name": "result",
276
+ "doc": "",
277
+ "types": [
278
+ "boolean"
279
+ ]
280
+ }
281
+ ]
282
+ },
283
+ {
284
+ "type": "FUNCTION",
285
+ "name": "bridge.storage.get",
286
+ "description": "Retrieve stored data based on a key or multiple keys to restore player progress or settings.",
314
287
  "parameters": [
315
288
  {
316
- "name": "delay",
317
- "doc": "60 from default",
289
+ "name": "table_keys",
290
+ "doc": "",
318
291
  "types": [
319
- "number"
320
- ],
321
- "is_optional": "False"
292
+ "table"
293
+ ]
294
+ },
295
+ {
296
+ "name": "on_success",
297
+ "doc": "function(_, data)",
298
+ "types": [
299
+ "function"
300
+ ]
301
+ },
302
+ {
303
+ "name": "on_failure",
304
+ "doc": "function(_, error)",
305
+ "types": [
306
+ "function"
307
+ ]
322
308
  }
323
309
  ],
324
310
  "returnvalues": []
325
311
  },
326
312
  {
327
313
  "type": "FUNCTION",
328
- "name": "advertisement.show_banner",
329
- "brief": "Display a banner ad within your game to generate revenue through advertising.",
330
- "description": "Display a banner ad within your game to generate revenue through advertising.",
314
+ "name": "bridge.storage.set",
315
+ "description": "Save data to the storage with a key to retain player progress or settings.",
331
316
  "parameters": [
332
317
  {
333
- "name": "position",
318
+ "name": "table_data",
334
319
  "doc": "",
335
320
  "types": [
336
- "string"
337
- ],
338
- "is_optional": "False"
321
+ "table"
322
+ ]
339
323
  },
340
324
  {
341
- "name": "placement",
342
- "doc": "",
325
+ "name": "on_success",
326
+ "doc": "function(_)",
343
327
  "types": [
344
- "string"
345
- ],
346
- "is_optional": "False"
328
+ "function"
329
+ ]
330
+ },
331
+ {
332
+ "name": "on_failure",
333
+ "doc": "function(_, error)",
334
+ "types": [
335
+ "function"
336
+ ]
347
337
  }
348
338
  ],
349
339
  "returnvalues": []
350
340
  },
351
341
  {
352
342
  "type": "FUNCTION",
353
- "name": "advertisement.show_interstitial",
354
- "brief": "Display an interstitial ad at appropriate moments, such as during level transitions or game over screens.",
355
- "description": "Display an interstitial ad at appropriate moments, such as during level transitions or game over screens.",
343
+ "name": "bridge.storage.delete",
344
+ "description": "Remove data from the storage by key to manage player data and settings effectively.",
356
345
  "parameters": [
357
346
  {
358
- "name": "placement",
347
+ "name": "table_keys",
359
348
  "doc": "",
360
349
  "types": [
361
- "string"
362
- ],
363
- "is_optional": "False"
350
+ "table"
351
+ ]
352
+ },
353
+ {
354
+ "name": "on_success",
355
+ "doc": "function(_)",
356
+ "types": [
357
+ "function"
358
+ ]
359
+ },
360
+ {
361
+ "name": "on_failure",
362
+ "doc": "function(_, error)",
363
+ "types": [
364
+ "function"
365
+ ]
364
366
  }
365
367
  ],
366
368
  "returnvalues": []
367
369
  },
368
370
  {
369
371
  "type": "FUNCTION",
370
- "name": "advertisement.show_rewarded",
371
- "brief": "Display a rewarded ad and provide incentives to players for watching the entire ad.",
372
- "description": "Display a rewarded ad and provide incentives to players for watching the entire ad.",
372
+ "name": "bridge.advertisement.show_banner",
373
+ "description": "Display a banner ad within your game to generate revenue through advertising.",
373
374
  "parameters": [
375
+ {
376
+ "name": "position",
377
+ "doc": "",
378
+ "types": [
379
+ "string"
380
+ ]
381
+ },
374
382
  {
375
383
  "name": "placement",
376
384
  "doc": "",
377
385
  "types": [
378
386
  "string"
379
- ],
380
- "is_optional": "False"
387
+ ]
381
388
  }
382
389
  ],
383
390
  "returnvalues": []
384
391
  },
385
392
  {
386
393
  "type": "FUNCTION",
387
- "name": "device.type",
388
- "brief": "Determine the type of device (mobile, tablet, desktop, tv) the game is being played on to adjust the game`s interface and performance settings.",
389
- "description": "Determine the type of device (mobile, tablet, desktop, tv) the game is being played on to adjust the game`s interface and performance settings.",
394
+ "name": "bridge.advertisement.hide_banner",
395
+ "description": "Hide the currently displayed banner ad when it is no longer needed.",
396
+ "parameters": [],
397
+ "returnvalues": []
398
+ },
399
+ {
400
+ "type": "FUNCTION",
401
+ "name": "bridge.advertisement.banner_state",
402
+ "description": "Hide the currently displayed banner ad when it is no longer needed.",
403
+ "parameters": [],
404
+ "returnvalues": []
405
+ },
406
+ {
407
+ "type": "FUNCTION",
408
+ "name": "bridge.advertisement.is_banner_supported",
409
+ "description": "Check if the platform supports displaying banner ads. Use this to determine if you can include banner advertisements in your game.",
390
410
  "parameters": [],
391
411
  "returnvalues": [
392
412
  {
393
- "name": "",
413
+ "name": "result",
394
414
  "doc": "",
395
415
  "types": [
396
416
  "string"
@@ -400,38 +420,27 @@
400
420
  },
401
421
  {
402
422
  "type": "FUNCTION",
403
- "name": "game.on",
404
- "brief": "Check if the game tab is visible or hidden, and adjust game behavior accordingly, such as muting sound when hidden.",
405
- "description": "Check if the game tab is visible or hidden, and adjust game behavior accordingly, such as muting sound when hidden.",
406
- "parameters": [
423
+ "name": "bridge.advertisement.is_interstitial_supported",
424
+ "description": "Check if the platform supports displaying interstitial ads. Use this to determine if you can include interstitial advertisements in your game.",
425
+ "parameters": [],
426
+ "returnvalues": [
407
427
  {
408
- "name": "event_name",
428
+ "name": "result",
409
429
  "doc": "",
410
430
  "types": [
411
431
  "string"
412
- ],
413
- "is_optional": "False"
414
- },
415
- {
416
- "name": "callback",
417
- "doc": "function(_, state)",
418
- "types": [
419
- "(this: any, state: unknown) => void"
420
- ],
421
- "is_optional": "False"
432
+ ]
422
433
  }
423
- ],
424
- "returnvalues": []
434
+ ]
425
435
  },
426
436
  {
427
437
  "type": "FUNCTION",
428
- "name": "game.visibility_state",
429
- "brief": "Returns the current visibility state of the game (the tab with the game).",
430
- "description": "Returns the current visibility state of the game (the tab with the game).",
438
+ "name": "bridge.advertisement.is_rewarded_supported",
439
+ "description": "Check if the platform supports displaying rewarded ads. Use this to determine if you can include rewarded advertisements in your game.",
431
440
  "parameters": [],
432
441
  "returnvalues": [
433
442
  {
434
- "name": "",
443
+ "name": "result",
435
444
  "doc": "",
436
445
  "types": [
437
446
  "string"
@@ -441,367 +450,211 @@
441
450
  },
442
451
  {
443
452
  "type": "FUNCTION",
444
- "name": "leaderboards.get_entries",
445
- "brief": "Retrieve entries from the leaderboard, including the player's rank and score, to display a comprehensive leaderboard.",
446
- "description": "Retrieve entries from the leaderboard, including the player's rank and score, to display a comprehensive leaderboard.",
453
+ "name": "bridge.advertisement.on",
454
+ "description": "State changed events.",
447
455
  "parameters": [
448
456
  {
449
- "name": "id",
457
+ "name": "event_name",
450
458
  "doc": "",
451
459
  "types": [
452
460
  "string"
453
- ],
454
- "is_optional": "False"
455
- },
456
- {
457
- "name": "on_success",
458
- "doc": "function(_, entries)",
459
- "types": [
460
- "(this: any, entries: unknown) => void"
461
- ],
462
- "is_optional": "False"
461
+ ]
463
462
  },
464
463
  {
465
- "name": "on_failure",
466
- "doc": "function(_, error)",
464
+ "name": "callback",
465
+ "doc": "function(_, state)",
467
466
  "types": [
468
- "(this: any, error: unknown) => void"
469
- ],
470
- "is_optional": "False"
467
+ "function"
468
+ ]
471
469
  }
472
470
  ],
473
471
  "returnvalues": []
474
472
  },
475
473
  {
476
474
  "type": "FUNCTION",
477
- "name": "leaderboards.set_score",
478
- "brief": "Submit the player's score to the leaderboard to update their rank and position.",
479
- "description": "Submit the player's score to the leaderboard to update their rank and position.",
475
+ "name": "bridge.advertisement.show_interstitial",
476
+ "description": "Display an interstitial ad at appropriate moments, such as during level transitions or game over screens.",
480
477
  "parameters": [
481
478
  {
482
- "name": "id",
479
+ "name": "placement",
483
480
  "doc": "",
484
481
  "types": [
485
482
  "string"
486
- ],
487
- "is_optional": "False"
488
- },
489
- {
490
- "name": "score",
491
- "doc": "",
492
- "types": [
493
- "number"
494
- ],
495
- "is_optional": "False"
496
- },
497
- {
498
- "name": "on_success",
499
- "doc": "function()",
500
- "types": [
501
- "(...args: any[]) => void"
502
- ],
503
- "is_optional": "False"
504
- },
505
- {
506
- "name": "on_failure",
507
- "doc": "function(_, error)",
508
- "types": [
509
- "(this: any, error: unknown) => void"
510
- ],
511
- "is_optional": "False"
483
+ ]
512
484
  }
513
485
  ],
514
486
  "returnvalues": []
515
487
  },
516
488
  {
517
489
  "type": "FUNCTION",
518
- "name": "leaderboards.show_native_popup",
519
- "brief": "Show native popup leaderboard.",
520
- "description": "Show native popup leaderboard.",
521
- "parameters": [
522
- {
523
- "name": "id",
524
- "doc": "",
525
- "types": [
526
- "string"
527
- ],
528
- "is_optional": "False"
529
- },
530
- {
531
- "name": "on_success",
532
- "doc": "function()",
533
- "types": [
534
- "(...args: any[]) => void"
535
- ],
536
- "is_optional": "False"
537
- },
538
- {
539
- "name": "on_failure",
540
- "doc": "function(_, error)",
541
- "types": [
542
- "(this: any, error: unknown) => void"
543
- ],
544
- "is_optional": "False"
545
- }
546
- ],
490
+ "name": "bridge.advertisement.interstitial_state",
491
+ "description": "Track the state of the interstitial ad to manage ad display and user experience.",
492
+ "parameters": [],
547
493
  "returnvalues": []
548
494
  },
549
495
  {
550
496
  "type": "FUNCTION",
551
- "name": "leaderboards.type",
552
- "brief": "Check the leaderboards type on the platform.",
553
- "description": "Check the leaderboards type on the platform.",
497
+ "name": "bridge.advertisement.minimum_delay_between_interstitial",
498
+ "description": "Minimum time interval between interstitial ad displays to comply with platform requirements and improve user experience.",
554
499
  "parameters": [],
555
500
  "returnvalues": [
556
501
  {
557
- "name": "",
502
+ "name": "result",
558
503
  "doc": "",
559
504
  "types": [
560
- "string"
505
+ "number"
561
506
  ]
562
507
  }
563
508
  ]
564
509
  },
565
510
  {
566
511
  "type": "FUNCTION",
567
- "name": "payments.consume_purchase",
568
- "brief": "Consume purchased items, such as in-game currency, once they are used, to manage inventory and player progression.",
569
- "description": "Consume purchased items, such as in-game currency, once they are used, to manage inventory and player progression.",
512
+ "name": "bridge.advertisement.set_minimum_delay_between_interstitial",
513
+ "description": "Set the minimum time interval between interstitial ad displays to comply with platform requirements and improve user experience.",
570
514
  "parameters": [
571
515
  {
572
- "name": "id",
573
- "doc": "",
574
- "types": [
575
- "string"
576
- ],
577
- "is_optional": "False"
578
- },
579
- {
580
- "name": "on_success",
581
- "doc": "function(_, purchase)",
582
- "types": [
583
- "(this: any, purchase: unknown) => void"
584
- ],
585
- "is_optional": "False"
586
- },
587
- {
588
- "name": "on_failure",
589
- "doc": "function(_, error)",
516
+ "name": "delay",
517
+ "doc": "60 from default",
590
518
  "types": [
591
- "(this: any, error: unknown) => void"
592
- ],
593
- "is_optional": "False"
519
+ "number"
520
+ ]
594
521
  }
595
522
  ],
596
523
  "returnvalues": []
597
524
  },
598
525
  {
599
526
  "type": "FUNCTION",
600
- "name": "payments.get_catalog",
601
- "brief": "Retrieve a list of all available in-game items that players can purchase to display in the game store.",
602
- "description": "Retrieve a list of all available in-game items that players can purchase to display in the game store.",
603
- "parameters": [
604
- {
605
- "name": "on_success",
606
- "doc": "function(_, catalogItems)",
607
- "types": [
608
- "(this: any, catalogItems: unknown) => void"
609
- ],
610
- "is_optional": "False"
611
- },
612
- {
613
- "name": "on_failure",
614
- "doc": "function(_, error)",
615
- "types": [
616
- "(this: any, error: unknown) => void"
617
- ],
618
- "is_optional": "False"
619
- }
620
- ],
527
+ "name": "bridge.advertisement.rewarded_state",
528
+ "description": "Monitor the state of the rewarded ad (loading, opened, closed, rewarded, failed) to manage the reward process.",
529
+ "parameters": [],
621
530
  "returnvalues": []
622
531
  },
623
532
  {
624
533
  "type": "FUNCTION",
625
- "name": "payments.get_purchases",
626
- "brief": "Retrieve a list of items that the player has purchased to manage their inventory and provide access to purchased content.",
627
- "description": "Retrieve a list of items that the player has purchased to manage their inventory and provide access to purchased content.",
534
+ "name": "bridge.advertisement.rewarded_placement",
535
+ "description": "Monitor the placement of the rewarded ad to manage the reward process.",
536
+ "parameters": [],
537
+ "returnvalues": []
538
+ },
539
+ {
540
+ "type": "FUNCTION",
541
+ "name": "bridge.advertisement.show_rewarded",
542
+ "description": "Display a rewarded ad and provide incentives to players for watching the entire ad.",
628
543
  "parameters": [
629
544
  {
630
- "name": "on_success",
631
- "doc": "function(nil, purchases)",
632
- "types": [
633
- "(this: any, purchases: unknown) => void"
634
- ],
635
- "is_optional": "False"
636
- },
637
- {
638
- "name": "on_failure",
639
- "doc": "function(_, error)",
545
+ "name": "placement",
546
+ "doc": "",
640
547
  "types": [
641
- "(this: any, error: unknown) => void"
642
- ],
643
- "is_optional": "False"
548
+ "string"
549
+ ]
644
550
  }
645
551
  ],
646
552
  "returnvalues": []
647
553
  },
648
554
  {
649
555
  "type": "FUNCTION",
650
- "name": "payments.is_supported",
651
- "brief": "Check if in-game purchases are supported to offer items or upgrades within the game.",
652
- "description": "Check if in-game purchases are supported to offer items or upgrades within the game.",
556
+ "name": "bridge.advertisement.is_advanced_banners_supported",
557
+ "description": "Check if the platform supports displaying advanced banner ads.",
653
558
  "parameters": [],
654
559
  "returnvalues": [
655
560
  {
656
- "name": "",
561
+ "name": "result",
657
562
  "doc": "",
658
563
  "types": [
659
- "boolean"
564
+ "string"
660
565
  ]
661
566
  }
662
567
  ]
663
568
  },
664
569
  {
665
570
  "type": "FUNCTION",
666
- "name": "payments.purchase",
667
- "brief": "Allow players to buy items or upgrades in your game to enhance their gameplay experience.",
668
- "description": "Allow players to buy items or upgrades in your game to enhance their gameplay experience.",
571
+ "name": "bridge.advertisement.advanced_banners_state",
572
+ "description": "Track the state of the advanced banners to manage ad display and user experience.",
573
+ "parameters": [],
574
+ "returnvalues": []
575
+ },
576
+ {
577
+ "type": "FUNCTION",
578
+ "name": "bridge.advertisement.show_advanced_banners",
579
+ "description": "Display advanced banners at appropriate moments of the game.",
669
580
  "parameters": [
670
581
  {
671
- "name": "id",
582
+ "name": "placement",
672
583
  "doc": "",
673
584
  "types": [
674
585
  "string"
675
- ],
676
- "is_optional": "False"
677
- },
678
- {
679
- "name": "on_success",
680
- "doc": "function(_, purchase)",
681
- "types": [
682
- "(this: any, purchase: unknown) => void"
683
- ],
684
- "is_optional": "False"
685
- },
686
- {
687
- "name": "on_failure",
688
- "doc": "function(_, error)",
689
- "types": [
690
- "(this: any, error: unknown) => void"
691
- ],
692
- "is_optional": "False"
586
+ ]
693
587
  }
694
588
  ],
695
589
  "returnvalues": []
696
590
  },
697
591
  {
698
592
  "type": "FUNCTION",
699
- "name": "platform.get_all_games",
700
- "brief": "Get all games on the platform.",
701
- "description": "Get all games on the platform.",
702
- "parameters": [
703
- {
704
- "name": "on_success",
705
- "doc": "function(_, data)",
706
- "types": [
707
- "(this: any, data: unknown) => void"
708
- ],
709
- "is_optional": "False"
710
- },
711
- {
712
- "name": "on_failure",
713
- "doc": "function(_, error)",
714
- "types": [
715
- "(this: any, error: unknown) => void"
716
- ],
717
- "is_optional": "False"
718
- }
719
- ],
593
+ "name": "bridge.advertisement.hide_advanced_banners",
594
+ "description": "Hide the currently displayed advanced banners when they are no longer needed.",
595
+ "parameters": [],
720
596
  "returnvalues": []
721
597
  },
722
598
  {
723
599
  "type": "FUNCTION",
724
- "name": "platform.get_game_by_id",
725
- "brief": "Get game by ID on the platform.",
726
- "description": "Get game by ID on the platform.",
600
+ "name": "bridge.advertisement.check_ad_block",
601
+ "description": "Check if the ad blocker is enabled.",
727
602
  "parameters": [
728
- {
729
- "name": "options",
730
- "doc": "",
731
- "types": [
732
- "object"
733
- ],
734
- "is_optional": "False"
735
- },
736
603
  {
737
604
  "name": "on_success",
738
- "doc": "function(_, data)",
605
+ "doc": "function(_, bool)",
739
606
  "types": [
740
- "(this: any, data: unknown) => void"
741
- ],
742
- "is_optional": "False"
607
+ "function"
608
+ ]
743
609
  },
744
610
  {
745
611
  "name": "on_failure",
746
612
  "doc": "function(_, error)",
747
613
  "types": [
748
- "(this: any, error: unknown) => void"
749
- ],
750
- "is_optional": "False"
614
+ "function"
615
+ ]
751
616
  }
752
617
  ],
753
618
  "returnvalues": []
754
619
  },
755
620
  {
756
621
  "type": "FUNCTION",
757
- "name": "platform.get_server_time",
758
- "brief": "Server Time",
759
- "description": "Server Time",
760
- "parameters": [
761
- {
762
- "name": "on_success",
763
- "doc": "function(_, time)",
764
- "types": [
765
- "(this: any, time: unknown) => void"
766
- ],
767
- "is_optional": "False"
768
- },
622
+ "name": "bridge.device.type",
623
+ "description": "Determine the type of device (mobile, tablet, desktop, tv) the game is being played on to adjust the game`s interface and performance settings.",
624
+ "parameters": [],
625
+ "returnvalues": [
769
626
  {
770
- "name": "on_failure",
771
- "doc": "function(_, error)",
627
+ "name": "result",
628
+ "doc": "",
772
629
  "types": [
773
- "(this: any, error: unknown) => void"
774
- ],
775
- "is_optional": "False"
630
+ "string"
631
+ ]
776
632
  }
777
- ],
778
- "returnvalues": []
633
+ ]
779
634
  },
780
635
  {
781
636
  "type": "FUNCTION",
782
- "name": "platform.id",
783
- "brief": "Identify the platform on which the game is currently running to customize features and settings accordingly.",
784
- "description": "Identify the platform on which the game is currently running to customize features and settings accordingly.",
637
+ "name": "bridge.player.is_authorization_supported",
638
+ "description": "Check if the platform supports player authorization to enable features that require user authentication, such as saving game progress or accessing social features.",
785
639
  "parameters": [],
786
640
  "returnvalues": [
787
641
  {
788
- "name": "",
642
+ "name": "result",
789
643
  "doc": "",
790
644
  "types": [
791
- "string | undefined"
645
+ "boolean"
792
646
  ]
793
647
  }
794
648
  ]
795
649
  },
796
650
  {
797
651
  "type": "FUNCTION",
798
- "name": "platform.is_audio_enabled",
799
- "brief": "Check if the audio is enabled on the platform.",
800
- "description": "Check if the audio is enabled on the platform.",
652
+ "name": "bridge.player.is_authorized",
653
+ "description": "Verify if the player is currently authorized on the platform. This allows you to enable personalized features, such as saving high scores or providing user-specific content.",
801
654
  "parameters": [],
802
655
  "returnvalues": [
803
656
  {
804
- "name": "",
657
+ "name": "result",
805
658
  "doc": "",
806
659
  "types": [
807
660
  "boolean"
@@ -811,13 +664,12 @@
811
664
  },
812
665
  {
813
666
  "type": "FUNCTION",
814
- "name": "platform.is_get_all_games_supported",
815
- "brief": "Verify if the get_all_games is supported on the platform to ensure compatibility.",
816
- "description": "Verify if the get_all_games is supported on the platform to ensure compatibility.",
667
+ "name": "bridge.player.is_guest",
668
+ "description": "Check if the player is unauthorized or running as a guest.",
817
669
  "parameters": [],
818
670
  "returnvalues": [
819
671
  {
820
- "name": "",
672
+ "name": "result",
821
673
  "doc": "",
822
674
  "types": [
823
675
  "boolean"
@@ -827,297 +679,279 @@
827
679
  },
828
680
  {
829
681
  "type": "FUNCTION",
830
- "name": "platform.is_get_game_by_id_supported",
831
- "brief": "Verify if the get_game_by_id is supported on the platform to ensure compatibility.",
832
- "description": "Verify if the get_game_by_id is supported on the platform to ensure compatibility.",
682
+ "name": "bridge.player.id",
683
+ "description": "Get the player’s unique ID on the platform to manage user-specific data and settings. Use this ID to track player progress, achievements, and purchases.",
833
684
  "parameters": [],
834
685
  "returnvalues": [
835
686
  {
836
- "name": "",
687
+ "name": "result",
837
688
  "doc": "",
838
689
  "types": [
839
- "boolean"
690
+ "string",
691
+ "nil"
840
692
  ]
841
693
  }
842
694
  ]
843
695
  },
844
696
  {
845
697
  "type": "FUNCTION",
846
- "name": "platform.language",
847
- "brief": "Get the language set by the user on the platform or the browser language if not provided by the platform, to localize game content.",
848
- "description": "Get the language set by the user on the platform or the browser language if not provided by the platform, to localize game content.",
698
+ "name": "bridge.player.name",
699
+ "description": "Retrieve the player's name to personalize the game experience. Display the name in leaderboards, friend lists, or when sending notifications and messages.",
849
700
  "parameters": [],
850
701
  "returnvalues": [
851
702
  {
852
- "name": "",
703
+ "name": "result",
853
704
  "doc": "",
854
705
  "types": [
855
- "string"
706
+ "string",
707
+ "nil"
856
708
  ]
857
709
  }
858
710
  ]
859
711
  },
860
712
  {
861
713
  "type": "FUNCTION",
862
- "name": "platform.on",
863
- "brief": "State changed events.",
864
- "description": "State changed events.",
865
- "parameters": [
714
+ "name": "bridge.player.extra",
715
+ "description": "Get the extra information about player.",
716
+ "parameters": [],
717
+ "returnvalues": [
866
718
  {
867
- "name": "event_name",
719
+ "name": "result",
868
720
  "doc": "",
869
721
  "types": [
870
- "string"
871
- ],
872
- "is_optional": "False"
873
- },
874
- {
875
- "name": "callback",
876
- "doc": "function(_, state)",
877
- "types": [
878
- "(this: any, state: unknown) => void"
879
- ],
880
- "is_optional": "False"
722
+ "table"
723
+ ]
881
724
  }
882
- ],
883
- "returnvalues": []
725
+ ]
884
726
  },
885
727
  {
886
728
  "type": "FUNCTION",
887
- "name": "platform.payload",
888
- "brief": "Embed auxiliary information into the game URL to pass additional data or settings when launching the game.",
889
- "description": "Embed auxiliary information into the game URL to pass additional data or settings when launching the game.",
729
+ "name": "bridge.player.photos",
730
+ "description": "Get the count of player avatars available. Use this to manage and display user profile images effectively, such as showing the avatar in multiplayer lobbies or profile screens.",
890
731
  "parameters": [],
891
732
  "returnvalues": [
892
733
  {
893
- "name": "",
734
+ "name": "result",
894
735
  "doc": "",
895
736
  "types": [
896
- "string | undefined"
737
+ "table"
897
738
  ]
898
739
  }
899
740
  ]
900
741
  },
901
742
  {
902
743
  "type": "FUNCTION",
903
- "name": "platform.send_message",
904
- "brief": "Send predefined messages to the platform to trigger specific actions or events, such as signaling that the game is ready.",
905
- "description": "Send predefined messages to the platform to trigger specific actions or events, such as signaling that the game is ready.",
744
+ "name": "bridge.player.authorize",
745
+ "description": "Authorize the player on the platform to access protected features and personalize the game experience. For example, prompting the player to log in to save their progress or unlock social sharing features.",
906
746
  "parameters": [
907
747
  {
908
- "name": "message",
909
- "doc": "One of message types: `game_ready` `in_game_loading_started`",
748
+ "name": "options",
749
+ "doc": "",
910
750
  "types": [
911
- "string"
912
- ],
913
- "is_optional": "False"
751
+ "table"
752
+ ]
914
753
  },
915
754
  {
916
755
  "name": "on_success",
917
- "doc": "",
756
+ "doc": "function()",
918
757
  "types": [
919
- "(...args: any[]) => void"
920
- ],
921
- "is_optional": "False"
758
+ "function"
759
+ ]
922
760
  },
923
761
  {
924
762
  "name": "on_failure",
925
- "doc": "",
763
+ "doc": "function(_, error)",
926
764
  "types": [
927
- "(this: any, error: unknown) => void"
928
- ],
929
- "is_optional": "False"
765
+ "function"
766
+ ]
930
767
  }
931
768
  ],
932
769
  "returnvalues": []
933
770
  },
934
771
  {
935
772
  "type": "FUNCTION",
936
- "name": "platform.tld",
937
- "brief": "Retrieve the top-level domain of the platform to handle domain-specific configurations and behavior.",
938
- "description": "Retrieve the top-level domain of the platform to handle domain-specific configurations and behavior.",
773
+ "name": "bridge.social.is_share_supported",
774
+ "description": "Check if the share functionality is supported on the platform.",
939
775
  "parameters": [],
940
776
  "returnvalues": [
941
777
  {
942
- "name": "",
778
+ "name": "result",
943
779
  "doc": "",
944
780
  "types": [
945
- "string | undefined"
781
+ "boolean"
946
782
  ]
947
783
  }
948
784
  ]
949
785
  },
950
786
  {
951
787
  "type": "FUNCTION",
952
- "name": "player.authorize",
953
- "brief": "Authorize the player on the platform to access protected features and personalize the game experience. For example, prompting the player to log in to save their progress or unlock social sharing features.",
954
- "description": "Authorize the player on the platform to access protected features and personalize the game experience. For example, prompting the player to log in to save their progress or unlock social sharing features.",
788
+ "name": "bridge.social.share",
789
+ "description": "Use this to allow players to share game content or achievements on social media platforms.",
955
790
  "parameters": [
956
791
  {
957
792
  "name": "options",
958
793
  "doc": "",
959
794
  "types": [
960
- "object"
961
- ],
962
- "is_optional": "False"
795
+ "table"
796
+ ]
963
797
  },
964
798
  {
965
799
  "name": "on_success",
966
- "doc": "function()",
800
+ "doc": "function(_)",
967
801
  "types": [
968
- "(...args: any[]) => void"
969
- ],
970
- "is_optional": "False"
802
+ "function"
803
+ ]
971
804
  },
972
805
  {
973
806
  "name": "on_failure",
974
- "doc": "function(_, error)",
807
+ "doc": "function(_)",
975
808
  "types": [
976
- "(this: any, error: unknown) => void"
977
- ],
978
- "is_optional": "False"
809
+ "function"
810
+ ]
979
811
  }
980
812
  ],
981
813
  "returnvalues": []
982
814
  },
983
815
  {
984
816
  "type": "FUNCTION",
985
- "name": "player.extra",
986
- "brief": "Get the extra information about player.",
987
- "description": "Get the extra information about player.",
817
+ "name": "bridge.social.is_join_community_supported",
818
+ "description": "Check if the join community functionality is supported on the platform.",
988
819
  "parameters": [],
989
820
  "returnvalues": [
990
821
  {
991
- "name": "",
822
+ "name": "result",
992
823
  "doc": "",
993
824
  "types": [
994
- "object"
825
+ "boolean"
995
826
  ]
996
827
  }
997
828
  ]
998
829
  },
999
830
  {
1000
831
  "type": "FUNCTION",
1001
- "name": "player.id",
1002
- "brief": "Get the player’s unique ID on the platform to manage user-specific data and settings. Use this ID to track player progress, achievements, and purchases.",
1003
- "description": "Get the player’s unique ID on the platform to manage user-specific data and settings. Use this ID to track player progress, achievements, and purchases.",
1004
- "parameters": [],
1005
- "returnvalues": [
832
+ "name": "bridge.social.join_community",
833
+ "description": "Use this to allow players to share game content or achievements on social media platforms.",
834
+ "parameters": [
1006
835
  {
1007
- "name": "",
836
+ "name": "options",
1008
837
  "doc": "",
1009
838
  "types": [
1010
- "string | undefined"
839
+ "table"
1011
840
  ]
1012
- }
1013
- ]
1014
- },
1015
- {
1016
- "type": "FUNCTION",
1017
- "name": "player.is_authorization_supported",
1018
- "brief": "Check if the platform supports player authorization to enable features that require user authentication, such as saving game progress or accessing social features.",
1019
- "description": "Check if the platform supports player authorization to enable features that require user authentication, such as saving game progress or accessing social features.",
1020
- "parameters": [],
1021
- "returnvalues": [
841
+ },
1022
842
  {
1023
- "name": "",
1024
- "doc": "",
843
+ "name": "on_success",
844
+ "doc": "function(_)",
1025
845
  "types": [
1026
- "boolean"
846
+ "function"
1027
847
  ]
1028
- }
1029
- ]
1030
- },
1031
- {
1032
- "type": "FUNCTION",
1033
- "name": "player.is_authorized",
1034
- "brief": "Verify if the player is currently authorized on the platform. This allows you to enable personalized features, such as saving high scores or providing user-specific content.",
1035
- "description": "Verify if the player is currently authorized on the platform. This allows you to enable personalized features, such as saving high scores or providing user-specific content.",
1036
- "parameters": [],
1037
- "returnvalues": [
848
+ },
1038
849
  {
1039
- "name": "",
1040
- "doc": "",
850
+ "name": "on_failure",
851
+ "doc": "function(_)",
1041
852
  "types": [
1042
- "boolean"
853
+ "function"
1043
854
  ]
1044
855
  }
1045
- ]
856
+ ],
857
+ "returnvalues": []
1046
858
  },
1047
859
  {
1048
860
  "type": "FUNCTION",
1049
- "name": "player.name",
1050
- "brief": "Retrieve the player's name to personalize the game experience. Display the name in leaderboards, friend lists, or when sending notifications and messages.",
1051
- "description": "Retrieve the player's name to personalize the game experience. Display the name in leaderboards, friend lists, or when sending notifications and messages.",
861
+ "name": "bridge.social.is_invite_friends_supported",
862
+ "description": "Check if the invite friends functionality is supported on the platform.",
1052
863
  "parameters": [],
1053
864
  "returnvalues": [
1054
865
  {
1055
- "name": "",
866
+ "name": "result",
1056
867
  "doc": "",
1057
868
  "types": [
1058
- "string | undefined"
869
+ "boolean"
1059
870
  ]
1060
871
  }
1061
872
  ]
1062
873
  },
1063
874
  {
1064
875
  "type": "FUNCTION",
1065
- "name": "player.photos",
1066
- "brief": "Get the count of player avatars available. Use this to manage and display user profile images effectively, such as showing the avatar in multiplayer lobbies or profile screens.",
1067
- "description": "Get the count of player avatars available. Use this to manage and display user profile images effectively, such as showing the avatar in multiplayer lobbies or profile screens.",
1068
- "parameters": [],
1069
- "returnvalues": [
876
+ "name": "bridge.social.invite_friends",
877
+ "description": "Allow players to invite their friends to play the game, helping to grow your player base organically.",
878
+ "parameters": [
1070
879
  {
1071
- "name": "",
880
+ "name": "options",
1072
881
  "doc": "",
1073
882
  "types": [
1074
- "object"
883
+ "table"
1075
884
  ]
1076
- }
885
+ },
886
+ {
887
+ "name": "on_success",
888
+ "doc": "function(_)",
889
+ "types": [
890
+ "function"
891
+ ]
892
+ },
893
+ {
894
+ "name": "on_failure",
895
+ "doc": "function(_)",
896
+ "types": [
897
+ "function"
898
+ ]
899
+ }
900
+ ],
901
+ "returnvalues": []
902
+ },
903
+ {
904
+ "type": "FUNCTION",
905
+ "name": "bridge.social.is_create_post_supported",
906
+ "description": "Check if the create post functionality is supported on the platform.",
907
+ "parameters": [],
908
+ "returnvalues": [
909
+ {
910
+ "name": "result",
911
+ "doc": "",
912
+ "types": [
913
+ "boolean"
914
+ ]
915
+ }
1077
916
  ]
1078
917
  },
1079
918
  {
1080
919
  "type": "FUNCTION",
1081
- "name": "remote_config.get",
1082
- "brief": "Encourage players to rate your game, providing valuable feedback and improving visibility.",
1083
- "description": "Encourage players to rate your game, providing valuable feedback and improving visibility.",
920
+ "name": "bridge.social.create_post",
921
+ "description": "Use this to let players create posts about their achievements or updates directly from the game.",
1084
922
  "parameters": [
1085
923
  {
1086
924
  "name": "options",
1087
925
  "doc": "",
1088
926
  "types": [
1089
- "object"
1090
- ],
1091
- "is_optional": "False"
927
+ "table"
928
+ ]
1092
929
  },
1093
930
  {
1094
931
  "name": "on_success",
1095
- "doc": "function(_, data)",
932
+ "doc": "function(_)",
1096
933
  "types": [
1097
- "(this: any, data: unknown) => void"
1098
- ],
1099
- "is_optional": "False"
934
+ "function"
935
+ ]
1100
936
  },
1101
937
  {
1102
938
  "name": "on_failure",
1103
939
  "doc": "function(_)",
1104
940
  "types": [
1105
- "(this: any, error: unknown) => void"
1106
- ],
1107
- "is_optional": "False"
941
+ "function"
942
+ ]
1108
943
  }
1109
944
  ],
1110
945
  "returnvalues": []
1111
946
  },
1112
947
  {
1113
948
  "type": "FUNCTION",
1114
- "name": "remote_config.is_supported",
1115
- "brief": "Check if remote configuration is supported to manage game settings without releasing updates.",
1116
- "description": "Check if remote configuration is supported to manage game settings without releasing updates.",
949
+ "name": "bridge.social.is_add_to_favorites_supported",
950
+ "description": "Check if the add to favorites functionality is supported on the platform.",
1117
951
  "parameters": [],
1118
952
  "returnvalues": [
1119
953
  {
1120
- "name": "",
954
+ "name": "result",
1121
955
  "doc": "",
1122
956
  "types": [
1123
957
  "boolean"
@@ -1127,348 +961,451 @@
1127
961
  },
1128
962
  {
1129
963
  "type": "FUNCTION",
1130
- "name": "social.add_to_favorites",
1131
- "brief": "Allow players to bookmark your game for easy access in the future.",
964
+ "name": "bridge.social.add_to_favorites",
1132
965
  "description": "Allow players to bookmark your game for easy access in the future.",
1133
966
  "parameters": [
1134
967
  {
1135
968
  "name": "on_success",
1136
969
  "doc": "function(_)",
1137
970
  "types": [
1138
- "(...args: any[]) => void"
1139
- ],
1140
- "is_optional": "False"
971
+ "function"
972
+ ]
1141
973
  },
1142
974
  {
1143
975
  "name": "on_failure",
1144
976
  "doc": "function(_)",
1145
977
  "types": [
1146
- "(this: any, error: unknown) => void"
1147
- ],
1148
- "is_optional": "False"
978
+ "function"
979
+ ]
1149
980
  }
1150
981
  ],
1151
982
  "returnvalues": []
1152
983
  },
1153
984
  {
1154
985
  "type": "FUNCTION",
1155
- "name": "social.add_to_home_screen",
1156
- "brief": "Enable players to add a shortcut to your game on their home screen for quick access.",
986
+ "name": "bridge.social.is_add_to_home_screen_supported",
987
+ "description": "Check if the add to home screen functionality is supported on the platform.",
988
+ "parameters": [],
989
+ "returnvalues": [
990
+ {
991
+ "name": "result",
992
+ "doc": "",
993
+ "types": [
994
+ "boolean"
995
+ ]
996
+ }
997
+ ]
998
+ },
999
+ {
1000
+ "type": "FUNCTION",
1001
+ "name": "bridge.social.add_to_home_screen",
1157
1002
  "description": "Enable players to add a shortcut to your game on their home screen for quick access.",
1158
1003
  "parameters": [
1159
1004
  {
1160
1005
  "name": "on_success",
1161
1006
  "doc": "function(_)",
1162
1007
  "types": [
1163
- "(...args: any[]) => void"
1164
- ],
1165
- "is_optional": "False"
1008
+ "function"
1009
+ ]
1166
1010
  },
1167
1011
  {
1168
1012
  "name": "on_failure",
1169
1013
  "doc": "function(_)",
1170
1014
  "types": [
1171
- "(this: any, error: unknown) => void"
1172
- ],
1173
- "is_optional": "False"
1015
+ "function"
1016
+ ]
1174
1017
  }
1175
1018
  ],
1176
1019
  "returnvalues": []
1177
1020
  },
1178
1021
  {
1179
1022
  "type": "FUNCTION",
1180
- "name": "social.create_post",
1181
- "brief": "Use this to let players create posts about their achievements or updates directly from the game.",
1182
- "description": "Use this to let players create posts about their achievements or updates directly from the game.",
1183
- "parameters": [
1023
+ "name": "bridge.social.is_rate_supported",
1024
+ "description": "Check if the rate game functionality is supported on the platform.",
1025
+ "parameters": [],
1026
+ "returnvalues": [
1184
1027
  {
1185
- "name": "options",
1028
+ "name": "result",
1186
1029
  "doc": "",
1187
1030
  "types": [
1188
- "object"
1189
- ],
1190
- "is_optional": "False"
1191
- },
1031
+ "boolean"
1032
+ ]
1033
+ }
1034
+ ]
1035
+ },
1036
+ {
1037
+ "type": "FUNCTION",
1038
+ "name": "bridge.social.rate",
1039
+ "description": "Encourage players to rate your game, providing valuable feedback and improving visibility.",
1040
+ "parameters": [
1192
1041
  {
1193
1042
  "name": "on_success",
1194
1043
  "doc": "function(_)",
1195
1044
  "types": [
1196
- "(...args: any[]) => void"
1197
- ],
1198
- "is_optional": "False"
1045
+ "function"
1046
+ ]
1199
1047
  },
1200
1048
  {
1201
1049
  "name": "on_failure",
1202
1050
  "doc": "function(_)",
1203
1051
  "types": [
1204
- "(this: any, error: unknown) => void"
1205
- ],
1206
- "is_optional": "False"
1052
+ "function"
1053
+ ]
1207
1054
  }
1208
1055
  ],
1209
1056
  "returnvalues": []
1210
1057
  },
1211
1058
  {
1212
1059
  "type": "FUNCTION",
1213
- "name": "social.invite_friends",
1214
- "brief": "Allow players to invite their friends to play the game, helping to grow your player base organically.",
1215
- "description": "Allow players to invite their friends to play the game, helping to grow your player base organically.",
1060
+ "name": "bridge.payments.is_supported",
1061
+ "description": "Check if in-game purchases are supported to offer items or upgrades within the game.",
1062
+ "parameters": [],
1063
+ "returnvalues": [
1064
+ {
1065
+ "name": "result",
1066
+ "doc": "",
1067
+ "types": [
1068
+ "boolean"
1069
+ ]
1070
+ }
1071
+ ]
1072
+ },
1073
+ {
1074
+ "type": "FUNCTION",
1075
+ "name": "bridge.payments.purchase",
1076
+ "description": "Allow players to buy items or upgrades in your game to enhance their gameplay experience.",
1216
1077
  "parameters": [
1217
1078
  {
1218
- "name": "options",
1079
+ "name": "id",
1219
1080
  "doc": "",
1220
1081
  "types": [
1221
- "object"
1222
- ],
1223
- "is_optional": "False"
1082
+ "string"
1083
+ ]
1224
1084
  },
1225
1085
  {
1226
1086
  "name": "on_success",
1227
- "doc": "function(_)",
1087
+ "doc": "function(_, purchase)",
1228
1088
  "types": [
1229
- "(...args: any[]) => void"
1230
- ],
1231
- "is_optional": "False"
1089
+ "function"
1090
+ ]
1232
1091
  },
1233
1092
  {
1234
1093
  "name": "on_failure",
1235
- "doc": "function(_)",
1094
+ "doc": "function(_, error)",
1236
1095
  "types": [
1237
- "(this: any, error: unknown) => void"
1238
- ],
1239
- "is_optional": "False"
1096
+ "function"
1097
+ ]
1240
1098
  }
1241
1099
  ],
1242
1100
  "returnvalues": []
1243
1101
  },
1244
1102
  {
1245
1103
  "type": "FUNCTION",
1246
- "name": "social.is_add_to_favorites_supported",
1247
- "brief": "Check if the add to favorites functionality is supported on the platform.",
1248
- "description": "Check if the add to favorites functionality is supported on the platform.",
1249
- "parameters": [],
1250
- "returnvalues": [
1104
+ "name": "bridge.payments.consume_purchase",
1105
+ "description": "Consume purchased items, such as in-game currency, once they are used, to manage inventory and player progression.",
1106
+ "parameters": [
1251
1107
  {
1252
- "name": "",
1108
+ "name": "id",
1253
1109
  "doc": "",
1254
1110
  "types": [
1255
- "boolean"
1111
+ "string"
1112
+ ]
1113
+ },
1114
+ {
1115
+ "name": "on_success",
1116
+ "doc": "function(_, purchase)",
1117
+ "types": [
1118
+ "function"
1119
+ ]
1120
+ },
1121
+ {
1122
+ "name": "on_failure",
1123
+ "doc": "function(_, error)",
1124
+ "types": [
1125
+ "function"
1256
1126
  ]
1257
1127
  }
1258
- ]
1128
+ ],
1129
+ "returnvalues": []
1259
1130
  },
1260
1131
  {
1261
1132
  "type": "FUNCTION",
1262
- "name": "social.is_add_to_home_screen_supported",
1263
- "brief": "Check if the add to home screen functionality is supported on the platform.",
1264
- "description": "Check if the add to home screen functionality is supported on the platform.",
1265
- "parameters": [],
1266
- "returnvalues": [
1133
+ "name": "bridge.payments.get_catalog",
1134
+ "description": "Retrieve a list of all available in-game items that players can purchase to display in the game store.",
1135
+ "parameters": [
1267
1136
  {
1268
- "name": "",
1269
- "doc": "",
1137
+ "name": "on_success",
1138
+ "doc": "function(_, catalogItems)",
1270
1139
  "types": [
1271
- "boolean"
1140
+ "function"
1141
+ ]
1142
+ },
1143
+ {
1144
+ "name": "on_failure",
1145
+ "doc": "function(_, error)",
1146
+ "types": [
1147
+ "function"
1272
1148
  ]
1273
1149
  }
1274
- ]
1150
+ ],
1151
+ "returnvalues": []
1275
1152
  },
1276
1153
  {
1277
1154
  "type": "FUNCTION",
1278
- "name": "social.is_create_post_supported",
1279
- "brief": "Check if the create post functionality is supported on the platform.",
1280
- "description": "Check if the create post functionality is supported on the platform.",
1281
- "parameters": [],
1282
- "returnvalues": [
1155
+ "name": "bridge.payments.get_purchases",
1156
+ "description": "Retrieve a list of items that the player has purchased to manage their inventory and provide access to purchased content.",
1157
+ "parameters": [
1283
1158
  {
1284
- "name": "",
1285
- "doc": "",
1159
+ "name": "on_success",
1160
+ "doc": "function(nil, purchases)",
1286
1161
  "types": [
1287
- "boolean"
1162
+ "function"
1163
+ ]
1164
+ },
1165
+ {
1166
+ "name": "on_failure",
1167
+ "doc": "function(_, error)",
1168
+ "types": [
1169
+ "function"
1288
1170
  ]
1289
1171
  }
1290
- ]
1172
+ ],
1173
+ "returnvalues": []
1291
1174
  },
1292
1175
  {
1293
1176
  "type": "FUNCTION",
1294
- "name": "social.is_external_links_allowed",
1295
- "brief": "Check if external links are allowed on the platform.",
1296
- "description": "Check if external links are allowed on the platform.",
1297
- "parameters": [],
1298
- "returnvalues": [
1177
+ "name": "bridge.achievements.unlock",
1178
+ "description": "Unlocks achievement for a player.",
1179
+ "parameters": [
1299
1180
  {
1300
- "name": "",
1181
+ "name": "id",
1301
1182
  "doc": "",
1302
1183
  "types": [
1303
- "boolean"
1184
+ "string"
1185
+ ]
1186
+ },
1187
+ {
1188
+ "name": "on_success",
1189
+ "doc": "function(_, result)",
1190
+ "types": [
1191
+ "function"
1192
+ ]
1193
+ },
1194
+ {
1195
+ "name": "on_failure",
1196
+ "doc": "function(_, error)",
1197
+ "types": [
1198
+ "function"
1304
1199
  ]
1305
1200
  }
1306
- ]
1201
+ ],
1202
+ "returnvalues": []
1307
1203
  },
1308
1204
  {
1309
1205
  "type": "FUNCTION",
1310
- "name": "social.is_invite_friends_supported",
1311
- "brief": "Check if the invite friends functionality is supported on the platform.",
1312
- "description": "Check if the invite friends functionality is supported on the platform.",
1313
- "parameters": [],
1314
- "returnvalues": [
1206
+ "name": "bridge.achievements.get_achievements",
1207
+ "description": "Returns the achievement list in JSON.",
1208
+ "parameters": [
1315
1209
  {
1316
- "name": "",
1317
- "doc": "",
1210
+ "name": "on_success",
1211
+ "doc": "function(_, list)",
1318
1212
  "types": [
1319
- "boolean"
1213
+ "function"
1214
+ ]
1215
+ },
1216
+ {
1217
+ "name": "on_failure",
1218
+ "doc": "function(_, error)",
1219
+ "types": [
1220
+ "function"
1320
1221
  ]
1321
1222
  }
1322
- ]
1223
+ ],
1224
+ "returnvalues": []
1323
1225
  },
1324
1226
  {
1325
1227
  "type": "FUNCTION",
1326
- "name": "social.is_join_community_supported",
1327
- "brief": "Check if the join community functionality is supported on the platform.",
1328
- "description": "Check if the join community functionality is supported on the platform.",
1329
- "parameters": [],
1330
- "returnvalues": [
1228
+ "name": "bridge.daily_rewards.get_rewards",
1229
+ "description": "Returns the configured ordered list of reward ids as a JSON string.",
1230
+ "parameters": [
1331
1231
  {
1332
- "name": "",
1333
- "doc": "",
1232
+ "name": "on_success",
1233
+ "doc": "function(_, rewards)",
1334
1234
  "types": [
1335
- "boolean"
1235
+ "function"
1236
+ ]
1237
+ },
1238
+ {
1239
+ "name": "on_failure",
1240
+ "doc": "function(_, error)",
1241
+ "types": [
1242
+ "function"
1336
1243
  ]
1337
1244
  }
1338
- ]
1245
+ ],
1246
+ "returnvalues": []
1339
1247
  },
1340
1248
  {
1341
1249
  "type": "FUNCTION",
1342
- "name": "social.is_rate_supported",
1343
- "brief": "Check if the rate game functionality is supported on the platform.",
1344
- "description": "Check if the rate game functionality is supported on the platform.",
1345
- "parameters": [],
1346
- "returnvalues": [
1250
+ "name": "bridge.daily_rewards.get_current_day",
1251
+ "description": "Returns the 0-based index of the reward the player is currently on.",
1252
+ "parameters": [
1347
1253
  {
1348
- "name": "",
1349
- "doc": "",
1254
+ "name": "on_success",
1255
+ "doc": "function(_, day)",
1350
1256
  "types": [
1351
- "boolean"
1257
+ "function"
1258
+ ]
1259
+ },
1260
+ {
1261
+ "name": "on_failure",
1262
+ "doc": "function(_, error)",
1263
+ "types": [
1264
+ "function"
1352
1265
  ]
1353
1266
  }
1354
- ]
1267
+ ],
1268
+ "returnvalues": []
1355
1269
  },
1356
1270
  {
1357
1271
  "type": "FUNCTION",
1358
- "name": "social.is_share_supported",
1359
- "brief": "Check if the share functionality is supported on the platform.",
1360
- "description": "Check if the share functionality is supported on the platform.",
1361
- "parameters": [],
1362
- "returnvalues": [
1272
+ "name": "bridge.daily_rewards.get_current_reward",
1273
+ "description": "Returns the id of the reward claimable today, or nil when nothing can be claimed.",
1274
+ "parameters": [
1363
1275
  {
1364
- "name": "",
1365
- "doc": "",
1276
+ "name": "on_success",
1277
+ "doc": "function(_, reward)",
1366
1278
  "types": [
1367
- "boolean"
1279
+ "function"
1280
+ ]
1281
+ },
1282
+ {
1283
+ "name": "on_failure",
1284
+ "doc": "function(_, error)",
1285
+ "types": [
1286
+ "function"
1368
1287
  ]
1369
1288
  }
1370
- ]
1289
+ ],
1290
+ "returnvalues": []
1371
1291
  },
1372
1292
  {
1373
1293
  "type": "FUNCTION",
1374
- "name": "social.join_community",
1375
- "brief": "Use this to allow players to share game content or achievements on social media platforms.",
1376
- "description": "Use this to allow players to share game content or achievements on social media platforms.",
1294
+ "name": "bridge.daily_rewards.claim_current_reward",
1295
+ "description": "Claims the reward available today. Calls on_success when claimed, on_failure otherwise.",
1377
1296
  "parameters": [
1378
1297
  {
1379
- "name": "options",
1380
- "doc": "",
1298
+ "name": "on_success",
1299
+ "doc": "function(_)",
1381
1300
  "types": [
1382
- "object"
1383
- ],
1384
- "is_optional": "False"
1301
+ "function"
1302
+ ]
1385
1303
  },
1304
+ {
1305
+ "name": "on_failure",
1306
+ "doc": "function(_, error)",
1307
+ "types": [
1308
+ "function"
1309
+ ]
1310
+ }
1311
+ ],
1312
+ "returnvalues": []
1313
+ },
1314
+ {
1315
+ "type": "FUNCTION",
1316
+ "name": "bridge.tasks.get_tasks",
1317
+ "description": "Returns every active task across all groups, with live progress, as a JSON string.",
1318
+ "parameters": [
1386
1319
  {
1387
1320
  "name": "on_success",
1388
- "doc": "function(_)",
1321
+ "doc": "function(_, tasks)",
1389
1322
  "types": [
1390
- "(...args: any[]) => void"
1391
- ],
1392
- "is_optional": "False"
1323
+ "function"
1324
+ ]
1393
1325
  },
1394
1326
  {
1395
1327
  "name": "on_failure",
1396
- "doc": "function(_)",
1328
+ "doc": "function(_, error)",
1397
1329
  "types": [
1398
- "(this: any, error: unknown) => void"
1399
- ],
1400
- "is_optional": "False"
1330
+ "function"
1331
+ ]
1401
1332
  }
1402
1333
  ],
1403
1334
  "returnvalues": []
1404
1335
  },
1405
1336
  {
1406
1337
  "type": "FUNCTION",
1407
- "name": "social.rate",
1408
- "brief": "Encourage players to rate your game, providing valuable feedback and improving visibility.",
1409
- "description": "Encourage players to rate your game, providing valuable feedback and improving visibility.",
1338
+ "name": "bridge.tasks.add_progress",
1339
+ "description": "Advances every active target whose id equals the given metric, clamped to the target amount.",
1410
1340
  "parameters": [
1341
+ {
1342
+ "name": "metric",
1343
+ "doc": "The metric id to advance.",
1344
+ "types": [
1345
+ "string"
1346
+ ]
1347
+ },
1348
+ {
1349
+ "name": "amount",
1350
+ "doc": "The amount to add (defaults to 1).",
1351
+ "types": [
1352
+ "number"
1353
+ ]
1354
+ },
1411
1355
  {
1412
1356
  "name": "on_success",
1413
1357
  "doc": "function(_)",
1414
1358
  "types": [
1415
- "(...args: any[]) => void"
1416
- ],
1417
- "is_optional": "False"
1359
+ "function"
1360
+ ]
1418
1361
  },
1419
1362
  {
1420
1363
  "name": "on_failure",
1421
- "doc": "function(_)",
1364
+ "doc": "function(_, error)",
1422
1365
  "types": [
1423
- "(...args: any[]) => void"
1424
- ],
1425
- "is_optional": "False"
1366
+ "function"
1367
+ ]
1426
1368
  }
1427
1369
  ],
1428
1370
  "returnvalues": []
1429
1371
  },
1430
1372
  {
1431
1373
  "type": "FUNCTION",
1432
- "name": "social.share",
1433
- "brief": "Use this to allow players to share game content or achievements on social media platforms.",
1434
- "description": "Use this to allow players to share game content or achievements on social media platforms.",
1374
+ "name": "bridge.tasks.claim_reward",
1375
+ "description": "Claims a completed task's rewards. Calls on_success with true when claimed, false otherwise.",
1435
1376
  "parameters": [
1436
1377
  {
1437
- "name": "options",
1438
- "doc": "",
1378
+ "name": "task_id",
1379
+ "doc": "The id of the task to claim.",
1439
1380
  "types": [
1440
- "object"
1441
- ],
1442
- "is_optional": "False"
1381
+ "string"
1382
+ ]
1443
1383
  },
1444
1384
  {
1445
1385
  "name": "on_success",
1446
- "doc": "function(_)",
1386
+ "doc": "function(_, claimed)",
1447
1387
  "types": [
1448
- "(...args: any[]) => void"
1449
- ],
1450
- "is_optional": "False"
1388
+ "function"
1389
+ ]
1451
1390
  },
1452
1391
  {
1453
1392
  "name": "on_failure",
1454
- "doc": "function(_)",
1393
+ "doc": "function(_, error)",
1455
1394
  "types": [
1456
- "(this: any, error: unknown) => void"
1457
- ],
1458
- "is_optional": "False"
1395
+ "function"
1396
+ ]
1459
1397
  }
1460
1398
  ],
1461
1399
  "returnvalues": []
1462
1400
  },
1463
1401
  {
1464
1402
  "type": "FUNCTION",
1465
- "name": "storage.default_type",
1466
- "brief": "Identify the default storage type to understand where data is being saved (local or server).",
1467
- "description": "Identify the default storage type to understand where data is being saved (local or server).",
1403
+ "name": "bridge.leaderboards.type",
1404
+ "description": "Check the leaderboards type on the platform.",
1468
1405
  "parameters": [],
1469
1406
  "returnvalues": [
1470
1407
  {
1471
- "name": "",
1408
+ "name": "result",
1472
1409
  "doc": "",
1473
1410
  "types": [
1474
1411
  "string"
@@ -1478,104 +1415,106 @@
1478
1415
  },
1479
1416
  {
1480
1417
  "type": "FUNCTION",
1481
- "name": "storage.delete_",
1482
- "brief": "Remove data from the specified storage by key to manage player data and settings effectively.",
1483
- "description": "Remove data from the specified storage by key to manage player data and settings effectively.",
1418
+ "name": "bridge.leaderboards.set_score",
1419
+ "description": "Submit the player's score to the leaderboard to update their rank and position.",
1484
1420
  "parameters": [
1485
1421
  {
1486
- "name": "table_keys",
1422
+ "name": "id",
1487
1423
  "doc": "",
1488
1424
  "types": [
1489
- "object"
1490
- ],
1491
- "is_optional": "False"
1425
+ "string"
1426
+ ]
1492
1427
  },
1493
1428
  {
1494
- "name": "on_success",
1495
- "doc": "function(_)",
1429
+ "name": "score",
1430
+ "doc": "",
1496
1431
  "types": [
1497
- "(...args: any[]) => void"
1498
- ],
1499
- "is_optional": "False"
1432
+ "number"
1433
+ ]
1500
1434
  },
1501
1435
  {
1502
- "name": "on_failure",
1503
- "doc": "function(_, error)",
1436
+ "name": "on_success",
1437
+ "doc": "function()",
1504
1438
  "types": [
1505
- "(this: any, error: unknown) => void"
1506
- ],
1507
- "is_optional": "False"
1439
+ "function"
1440
+ ]
1508
1441
  },
1509
1442
  {
1510
- "name": "storage_type",
1511
- "doc": "",
1443
+ "name": "on_failure",
1444
+ "doc": "function(_, error)",
1512
1445
  "types": [
1513
- "string"
1514
- ],
1515
- "is_optional": "False"
1446
+ "function"
1447
+ ]
1516
1448
  }
1517
1449
  ],
1518
1450
  "returnvalues": []
1519
1451
  },
1520
1452
  {
1521
1453
  "type": "FUNCTION",
1522
- "name": "storage.get",
1523
- "brief": "Retrieve stored data based on a key or multiple keys to restore player progress or settings.",
1524
- "description": "Retrieve stored data based on a key or multiple keys to restore player progress or settings.",
1454
+ "name": "bridge.leaderboards.get_entries",
1455
+ "description": "Retrieve entries from the leaderboard, including the player's rank and score, to display a comprehensive leaderboard.",
1525
1456
  "parameters": [
1526
1457
  {
1527
- "name": "table_keys",
1458
+ "name": "id",
1528
1459
  "doc": "",
1529
1460
  "types": [
1530
- "object"
1531
- ],
1532
- "is_optional": "False"
1461
+ "string"
1462
+ ]
1533
1463
  },
1534
1464
  {
1535
1465
  "name": "on_success",
1536
- "doc": "function(_, data)",
1466
+ "doc": "function(_, entries)",
1537
1467
  "types": [
1538
- "(this: any, data: unknown) => void"
1539
- ],
1540
- "is_optional": "False"
1468
+ "function"
1469
+ ]
1541
1470
  },
1542
1471
  {
1543
1472
  "name": "on_failure",
1544
1473
  "doc": "function(_, error)",
1545
1474
  "types": [
1546
- "(this: any, error: unknown) => void"
1547
- ],
1548
- "is_optional": "False"
1549
- },
1550
- {
1551
- "name": "storage_type",
1552
- "doc": "",
1553
- "types": [
1554
- "string"
1555
- ],
1556
- "is_optional": "False"
1475
+ "function"
1476
+ ]
1557
1477
  }
1558
1478
  ],
1559
1479
  "returnvalues": []
1560
1480
  },
1561
1481
  {
1562
1482
  "type": "FUNCTION",
1563
- "name": "storage.is_available",
1564
- "brief": "Check if the specified storage type is currently available for use to manage data storage effectively.",
1565
- "description": "Check if the specified storage type is currently available for use to manage data storage effectively.",
1483
+ "name": "bridge.leaderboards.show_native_popup",
1484
+ "description": "Show native popup leaderboard.",
1566
1485
  "parameters": [
1567
1486
  {
1568
- "name": "storage_type",
1487
+ "name": "id",
1569
1488
  "doc": "",
1570
1489
  "types": [
1571
1490
  "string"
1572
- ],
1573
- "is_optional": "False"
1491
+ ]
1492
+ },
1493
+ {
1494
+ "name": "on_success",
1495
+ "doc": "function()",
1496
+ "types": [
1497
+ "function"
1498
+ ]
1499
+ },
1500
+ {
1501
+ "name": "on_failure",
1502
+ "doc": "function(_, error)",
1503
+ "types": [
1504
+ "function"
1505
+ ]
1574
1506
  }
1575
1507
  ],
1508
+ "returnvalues": []
1509
+ },
1510
+ {
1511
+ "type": "FUNCTION",
1512
+ "name": "bridge.remote_config.is_supported",
1513
+ "description": "Check if remote configuration is supported to manage game settings without releasing updates.",
1514
+ "parameters": [],
1576
1515
  "returnvalues": [
1577
1516
  {
1578
- "name": "",
1517
+ "name": "result",
1579
1518
  "doc": "",
1580
1519
  "types": [
1581
1520
  "boolean"
@@ -1585,66 +1524,37 @@
1585
1524
  },
1586
1525
  {
1587
1526
  "type": "FUNCTION",
1588
- "name": "storage.is_supported",
1589
- "brief": "Verify if the specified storage type is supported on the platform to ensure compatibility.",
1590
- "description": "Verify if the specified storage type is supported on the platform to ensure compatibility.",
1527
+ "name": "bridge.remote_config.set_context",
1528
+ "description": "Set dynamic game/player parameters used for config segmentation. Accumulates across calls; only used by platforms that support it.",
1591
1529
  "parameters": [
1592
1530
  {
1593
- "name": "storage_type",
1531
+ "name": "parameters",
1594
1532
  "doc": "",
1595
1533
  "types": [
1596
- "string"
1597
- ],
1598
- "is_optional": "False"
1599
- }
1600
- ],
1601
- "returnvalues": [
1602
- {
1603
- "name": "",
1604
- "doc": "",
1605
- "types": [
1606
- "boolean"
1534
+ "table"
1607
1535
  ]
1608
1536
  }
1609
- ]
1537
+ ],
1538
+ "returnvalues": []
1610
1539
  },
1611
1540
  {
1612
1541
  "type": "FUNCTION",
1613
- "name": "storage.set",
1614
- "brief": "Save data to the specified storage with a key to retain player progress or settings.",
1615
- "description": "Save data to the specified storage with a key to retain player progress or settings.",
1542
+ "name": "bridge.remote_config.get",
1543
+ "description": "Encourage players to rate your game, providing valuable feedback and improving visibility.",
1616
1544
  "parameters": [
1617
- {
1618
- "name": "table_data",
1619
- "doc": "",
1620
- "types": [
1621
- "object"
1622
- ],
1623
- "is_optional": "False"
1624
- },
1625
1545
  {
1626
1546
  "name": "on_success",
1627
- "doc": "function(_)",
1547
+ "doc": "function(_, data)",
1628
1548
  "types": [
1629
- "(...args: any[]) => void"
1630
- ],
1631
- "is_optional": "False"
1549
+ "function"
1550
+ ]
1632
1551
  },
1633
1552
  {
1634
1553
  "name": "on_failure",
1635
- "doc": "function(_, error)",
1636
- "types": [
1637
- "(this: any, error: unknown) => void"
1638
- ],
1639
- "is_optional": "False"
1640
- },
1641
- {
1642
- "name": "storage_type",
1643
- "doc": "",
1554
+ "doc": "function(_)",
1644
1555
  "types": [
1645
- "string"
1646
- ],
1647
- "is_optional": "False"
1556
+ "function"
1557
+ ]
1648
1558
  }
1649
1559
  ],
1650
1560
  "returnvalues": []