@defold-typescript/library-types 0.18.1
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.
- package/NOTICE +52 -0
- package/README.md +78 -0
- package/api-doc/boom.boom.json +26 -0
- package/api-doc/bridge.bridge.json +1653 -0
- package/api-doc/bzAnim.bzLibrary.json +156 -0
- package/api-doc/defcon.console.json +109 -0
- package/api-doc/defmath.defmath.json +1381 -0
- package/api-doc/defsave.defsave.json +175 -0
- package/api-doc/deftest.deftest.json +71 -0
- package/api-doc/dicebag.dicebag.json +323 -0
- package/api-doc/event.event.json +238 -0
- package/api-doc/gooey.gooey.json +963 -0
- package/api-doc/immutable.immutable.json +63 -0
- package/api-doc/in.accelerometer.json +281 -0
- package/api-doc/in.button.json +148 -0
- package/api-doc/in.cursor.json +203 -0
- package/api-doc/in.gesture.json +206 -0
- package/api-doc/in.keyboard.json +45 -0
- package/api-doc/in.mapper.json +141 -0
- package/api-doc/in.onscreen.json +265 -0
- package/api-doc/in.state.json +195 -0
- package/api-doc/in.textbox.json +213 -0
- package/api-doc/in.triggers.json +1260 -0
- package/api-doc/lang.lang.json +411 -0
- package/api-doc/log.log.json +50 -0
- package/api-doc/metrics.fps.json +88 -0
- package/api-doc/metrics.mem.json +80 -0
- package/api-doc/monarch.monarch.json +1065 -0
- package/api-doc/monarch.transitions.easings.json +206 -0
- package/api-doc/monarch.transitions.gui.json +445 -0
- package/api-doc/nakama.engine.defold.json +165 -0
- package/api-doc/nakama.nakama.json +6574 -0
- package/api-doc/nakama.util.log.json +25 -0
- package/api-doc/narrator.narrator.json +150 -0
- package/api-doc/orthographic.camera.json +1019 -0
- package/api-doc/persist.persist.json +142 -0
- package/api-doc/platypus.platypus.json +631 -0
- package/api-doc/proto.proto.json +355 -0
- package/api-doc/rendy.rendy.json +408 -0
- package/api-doc/richtext.color.json +219 -0
- package/api-doc/richtext.richtext.json +382 -0
- package/api-doc/richtext.tags.json +67 -0
- package/api-doc/saver.saver.json +553 -0
- package/api-doc/saver.storage.json +174 -0
- package/api-doc/squid.squid.json +660 -0
- package/api-doc/starly.starly.json +488 -0
- package/api-doc/tweener.tweener.json +419 -0
- package/api-doc/yagames.yagames.json +1465 -0
- package/api-doc/zzfx.api.json +85 -0
- package/generated/boom.boom.d.ts +1585 -0
- package/generated/bridge.bridge.d.ts +533 -0
- package/generated/bzAnim.bzLibrary.d.ts +93 -0
- package/generated/defcon.console.d.ts +24 -0
- package/generated/defmath.defmath.d.ts +194 -0
- package/generated/defsave.defsave.d.ts +31 -0
- package/generated/deftest.deftest.d.ts +47 -0
- package/generated/dicebag.dicebag.d.ts +90 -0
- package/generated/event.event.d.ts +54 -0
- package/generated/gooey.gooey.d.ts +261 -0
- package/generated/immutable.immutable.d.ts +13 -0
- package/generated/in.accelerometer.d.ts +37 -0
- package/generated/in.button.d.ts +20 -0
- package/generated/in.cursor.d.ts +33 -0
- package/generated/in.gesture.d.ts +64 -0
- package/generated/in.keyboard.d.ts +18 -0
- package/generated/in.mapper.d.ts +23 -0
- package/generated/in.onscreen.d.ts +58 -0
- package/generated/in.state.d.ts +34 -0
- package/generated/in.textbox.d.ts +26 -0
- package/generated/in.triggers.d.ts +180 -0
- package/generated/lang.lang.d.ts +33 -0
- package/generated/log.log.d.ts +40 -0
- package/generated/metrics.fps.d.ts +16 -0
- package/generated/metrics.mem.d.ts +16 -0
- package/generated/monarch.monarch.d.ts +412 -0
- package/generated/monarch.transitions.easings.d.ts +65 -0
- package/generated/monarch.transitions.gui.d.ts +197 -0
- package/generated/nakama.engine.defold.d.ts +24 -0
- package/generated/nakama.nakama.d.ts +594 -0
- package/generated/nakama.util.log.d.ts +10 -0
- package/generated/narrator.narrator.d.ts +66 -0
- package/generated/orthographic.camera.d.ts +308 -0
- package/generated/persist.persist.d.ts +34 -0
- package/generated/platypus.platypus.d.ts +76 -0
- package/generated/proto.proto.d.ts +36 -0
- package/generated/rendy.rendy.d.ts +184 -0
- package/generated/richtext.color.d.ts +33 -0
- package/generated/richtext.richtext.d.ts +126 -0
- package/generated/richtext.tags.d.ts +12 -0
- package/generated/saver.saver.d.ts +44 -0
- package/generated/saver.storage.d.ts +16 -0
- package/generated/squid.squid.d.ts +106 -0
- package/generated/starly.starly.d.ts +148 -0
- package/generated/tweener.tweener.d.ts +151 -0
- package/generated/yagames.yagames.d.ts +279 -0
- package/generated/zzfx.api.d.ts +20 -0
- package/library-classification.json +726 -0
- package/library-targets.json +291 -0
- package/package.json +180 -0
- package/scripts/extract-api-doc.ts +418 -0
- package/scripts/sync-library-types.ts +542 -0
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
/** @noSelfInFile **/
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @see {@link https://github.com/indiesoftby/defold-yagames|Github Source}
|
|
5
|
+
* @noResolution
|
|
6
|
+
*/
|
|
7
|
+
declare module 'yagames.yagames' {
|
|
8
|
+
export type Context = unknown;
|
|
9
|
+
|
|
10
|
+
export type ApiCallback = (self: Context, err?: string, data?: unknown) => void;
|
|
11
|
+
|
|
12
|
+
export function init(callback: ApiCallback): void;
|
|
13
|
+
|
|
14
|
+
//* Advertisement
|
|
15
|
+
|
|
16
|
+
export interface AdvCallbacks {
|
|
17
|
+
open: (ctx: Context) => void;
|
|
18
|
+
close: (ctx: Context, was_shown: boolean) => void;
|
|
19
|
+
offline: (ctx: Context) => void;
|
|
20
|
+
error: (err: string) => void;
|
|
21
|
+
}
|
|
22
|
+
export function adv_show_fullscreen_adv(callbacks: AdvCallbacks): void;
|
|
23
|
+
|
|
24
|
+
export interface RewardedCallbacks {
|
|
25
|
+
open: (ctx: Context) => void;
|
|
26
|
+
rewarded: (ctx: Context) => void;
|
|
27
|
+
close: (ctx: Context) => void;
|
|
28
|
+
error: (ctx: Context, err: string) => void;
|
|
29
|
+
}
|
|
30
|
+
export function adv_show_rewarded_video(callbacks: RewardedCallbacks): void;
|
|
31
|
+
|
|
32
|
+
//* Authentication + Player
|
|
33
|
+
|
|
34
|
+
export function auth_open_auth_dialog(callback: ApiCallback): void;
|
|
35
|
+
|
|
36
|
+
export interface PlayerInitOptions {
|
|
37
|
+
signed?: boolean;
|
|
38
|
+
scopes?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export function player_init(options: PlayerInitOptions, callback: ApiCallback): void;
|
|
41
|
+
|
|
42
|
+
export function player_set_data(data: Record<string, unknown>, flush: boolean, callback: ApiCallback): void;
|
|
43
|
+
|
|
44
|
+
export function player_get_data(keys: Array<string> | undefined, callback: ApiCallback): void;
|
|
45
|
+
|
|
46
|
+
export function player_set_stats(stats: Record<string, number>, callback: ApiCallback): void;
|
|
47
|
+
|
|
48
|
+
export function player_increment_stats(stats: Record<string, number>, callback: ApiCallback): void;
|
|
49
|
+
|
|
50
|
+
export function player_get_stats(keys: Array<string> | undefined, callback: ApiCallback): void;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Use `player_get_unqiue_id` instead.
|
|
54
|
+
*/
|
|
55
|
+
export function player_get_id(): string;
|
|
56
|
+
|
|
57
|
+
export function player_get_unique_id(): string;
|
|
58
|
+
|
|
59
|
+
export function player_get_name(): string;
|
|
60
|
+
|
|
61
|
+
export type PlayerGetIdsCallback = (ctx: Context, err?: string, data?: Array<{
|
|
62
|
+
appID: string;
|
|
63
|
+
userID: string;
|
|
64
|
+
}>) => void;
|
|
65
|
+
export function player_get_ids_per_game(callback: PlayerGetIdsCallback): void;
|
|
66
|
+
|
|
67
|
+
export function player_get_photo(size: 'small' | 'medium' | 'large'): string;
|
|
68
|
+
|
|
69
|
+
//* In-Game Purchases
|
|
70
|
+
|
|
71
|
+
export function payments_init(options: { signed?: boolean } | undefined, callback: ApiCallback): void;
|
|
72
|
+
|
|
73
|
+
export interface PaymentsPurchaseOptions {
|
|
74
|
+
id: string;
|
|
75
|
+
developerPayload?: string;
|
|
76
|
+
}
|
|
77
|
+
export type PaymentsPurchaseCallback = (ctx: Context, err?: string, data?: {
|
|
78
|
+
productId: string;
|
|
79
|
+
purchaseToken: string;
|
|
80
|
+
developerPayload: string;
|
|
81
|
+
signature: string;
|
|
82
|
+
}) => void;
|
|
83
|
+
export function payments_purchase(options: PaymentsPurchaseOptions | undefined, callback: PaymentsPurchaseCallback): void;
|
|
84
|
+
|
|
85
|
+
export type PaymentsPurchasesCallback = (ctx: Context, err?: string, data?: {
|
|
86
|
+
purchases: Array<{
|
|
87
|
+
productId: string;
|
|
88
|
+
purchaseToken: string;
|
|
89
|
+
developerPayload: string;
|
|
90
|
+
}>;
|
|
91
|
+
signature: Array<string>;
|
|
92
|
+
}) => void;
|
|
93
|
+
export function payments_get_purchases(callback: PaymentsPurchasesCallback): void;
|
|
94
|
+
|
|
95
|
+
export type PaymentsCatalogCallback = (ctx: Context, err?: string, data?: Array<{
|
|
96
|
+
id: string;
|
|
97
|
+
title: string;
|
|
98
|
+
description: string;
|
|
99
|
+
imageURI: string;
|
|
100
|
+
price: string;
|
|
101
|
+
priceValue: string;
|
|
102
|
+
priceCurrencyCode: string;
|
|
103
|
+
}>) => void;
|
|
104
|
+
export function payments_get_catalog(callback: PaymentsCatalogCallback): void;
|
|
105
|
+
|
|
106
|
+
export function payments_consume_purchase(purchase_token: string, callback: ApiCallback): void;
|
|
107
|
+
|
|
108
|
+
//* Leaderboards
|
|
109
|
+
|
|
110
|
+
export function leaderboards_init(callback: ApiCallback): void;
|
|
111
|
+
|
|
112
|
+
export type LeaderboardsDescriptionCallback = (ctx: Context, err?: string, data?: {
|
|
113
|
+
appID: string;
|
|
114
|
+
default: boolean;
|
|
115
|
+
description: {
|
|
116
|
+
invert_sort_order: boolean;
|
|
117
|
+
score_format: {
|
|
118
|
+
options: {
|
|
119
|
+
decimal_offset: number;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
type: string;
|
|
123
|
+
}
|
|
124
|
+
name: string;
|
|
125
|
+
title: {
|
|
126
|
+
en: string;
|
|
127
|
+
ru: string;
|
|
128
|
+
}
|
|
129
|
+
}) => void;
|
|
130
|
+
export function leaderboards_get_description(leaderboard_name: string, callback: LeaderboardsDescriptionCallback): void;
|
|
131
|
+
|
|
132
|
+
export interface LeaderboardsGetPlayerEntryOptions {
|
|
133
|
+
includeUser?: boolean;
|
|
134
|
+
quantityAround?: number;
|
|
135
|
+
quantityTop?: number;
|
|
136
|
+
getAvatarSrc?: "small" | "medium" | "large";
|
|
137
|
+
getAvatarSrcSet?: "small" | "medium" | "large"
|
|
138
|
+
}
|
|
139
|
+
export function leaderboards_get_player_entry(leaderboard_name: string, options: LeaderboardsGetPlayerEntryOptions | undefined, callback: ApiCallback): void;
|
|
140
|
+
|
|
141
|
+
export type LeaderboardsGetPlayerEntriesCallback = (ctx: Context, err?: string, data?: {
|
|
142
|
+
ranges: [
|
|
143
|
+
{
|
|
144
|
+
start: number,
|
|
145
|
+
size: number,
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
userRank: number,
|
|
149
|
+
entries: [
|
|
150
|
+
{
|
|
151
|
+
score: number,
|
|
152
|
+
extraData: string,
|
|
153
|
+
rank: number,
|
|
154
|
+
player: {
|
|
155
|
+
getAvatarSrc: (size: string) => string,
|
|
156
|
+
getAvatarSrcSet: (size: string) => string,
|
|
157
|
+
lang: string,
|
|
158
|
+
publicName: string,
|
|
159
|
+
scopePermissions: {
|
|
160
|
+
avatar: string,
|
|
161
|
+
public_name: string
|
|
162
|
+
},
|
|
163
|
+
uniqueID: string,
|
|
164
|
+
},
|
|
165
|
+
formattedScore: string
|
|
166
|
+
},
|
|
167
|
+
]
|
|
168
|
+
}) => void;
|
|
169
|
+
export interface LeaderboardsGetEntriesOptions {
|
|
170
|
+
includeUser?: boolean;
|
|
171
|
+
quantityAround?: number;
|
|
172
|
+
quantityTop?: number;
|
|
173
|
+
getAvatarSrc?: "small" | "medium" | "large";
|
|
174
|
+
getAvatarSrcSet?: "small" | "medium" | "large";
|
|
175
|
+
}
|
|
176
|
+
export function leaderboards_get_entries(leaderboard_name: string, options: LeaderboardsGetEntriesOptions | undefined, callback: LeaderboardsGetPlayerEntriesCallback): void;
|
|
177
|
+
|
|
178
|
+
export function leaderboards_set_score(leaderboard_name: string, score: number, extra_data: string, callback: ApiCallback): void;
|
|
179
|
+
|
|
180
|
+
//* Feedback
|
|
181
|
+
|
|
182
|
+
export type FeedbackCanReviewCallback = (ctx: Context, err?: string, data?: {
|
|
183
|
+
value: boolean;
|
|
184
|
+
reason: string;
|
|
185
|
+
}) => void;
|
|
186
|
+
export function feedback_can_review(callback: FeedbackCanReviewCallback): void;
|
|
187
|
+
|
|
188
|
+
export type FeedbackRequestReviewCallback = (ctx: Context, err?: string, data?: {
|
|
189
|
+
feedbackSent: boolean;
|
|
190
|
+
}) => void;
|
|
191
|
+
export function feedback_request_review(callback: FeedbackCanReviewCallback): void;
|
|
192
|
+
|
|
193
|
+
//* Clipboard
|
|
194
|
+
|
|
195
|
+
export function clipboard_write_text(text: string, callback?: ApiCallback): void;
|
|
196
|
+
|
|
197
|
+
//* Device Info
|
|
198
|
+
|
|
199
|
+
export function device_info_type(): "desktop" | "mobile" | "tablet";
|
|
200
|
+
|
|
201
|
+
export function device_info_is_desktop(): boolean;
|
|
202
|
+
|
|
203
|
+
export function device_info_is_mobile(): boolean;
|
|
204
|
+
|
|
205
|
+
export function device_info_is_tablet(): boolean;
|
|
206
|
+
|
|
207
|
+
//* Environment
|
|
208
|
+
|
|
209
|
+
export interface EnvironmentResults {
|
|
210
|
+
app: {
|
|
211
|
+
id: string;
|
|
212
|
+
}
|
|
213
|
+
browser: {
|
|
214
|
+
lang: string;
|
|
215
|
+
}
|
|
216
|
+
i18n: {
|
|
217
|
+
lang: string;
|
|
218
|
+
tld: string;
|
|
219
|
+
}
|
|
220
|
+
payload?: string;
|
|
221
|
+
}
|
|
222
|
+
export function environment(): EnvironmentResults;
|
|
223
|
+
|
|
224
|
+
//* Screen
|
|
225
|
+
|
|
226
|
+
export function screen_fullscreen_status(): "on" | "off";
|
|
227
|
+
|
|
228
|
+
export function screen_fullscreen_request(callback?: ApiCallback): void;
|
|
229
|
+
|
|
230
|
+
export function screen_fullscreen_exit(callback?: ApiCallback): void;
|
|
231
|
+
|
|
232
|
+
//* Safe Storage
|
|
233
|
+
|
|
234
|
+
export function storage_init(callback: ApiCallback): void;
|
|
235
|
+
|
|
236
|
+
export function storage_get_item(key: string): string | undefined;
|
|
237
|
+
|
|
238
|
+
export function storage_set_item(key: string, value: string): void;
|
|
239
|
+
|
|
240
|
+
export function storage_remove_item(key: string): void;
|
|
241
|
+
|
|
242
|
+
export function storage_clear(): void;
|
|
243
|
+
|
|
244
|
+
export function storage_key(n: number): string | undefined;
|
|
245
|
+
|
|
246
|
+
export function storage_length(): number;
|
|
247
|
+
|
|
248
|
+
//* Banner Ads
|
|
249
|
+
|
|
250
|
+
export function banner_init(callback: ApiCallback): void;
|
|
251
|
+
|
|
252
|
+
export interface BannerCreateOptions {
|
|
253
|
+
stat_id?: number;
|
|
254
|
+
css_styles?: string;
|
|
255
|
+
css_class?: string;
|
|
256
|
+
display?: "none" | "block";
|
|
257
|
+
}
|
|
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;
|
|
268
|
+
|
|
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;
|
|
278
|
+
|
|
279
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @noSelfInFile **/
|
|
2
|
+
|
|
3
|
+
type ZzFXSample = LuaUserdata & {
|
|
4
|
+
readonly __index: 'zzfx_ext_sample';
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* ZzFX extension for Defold
|
|
9
|
+
* @see {@link https://github.com/thejustinwalsh/defold-zzfx|Github Source}
|
|
10
|
+
* @noResolution
|
|
11
|
+
*/
|
|
12
|
+
declare module 'zzfx.api' {
|
|
13
|
+
export function play(...args: number[]): void;
|
|
14
|
+
|
|
15
|
+
export function samplerate(rate: number): void;
|
|
16
|
+
|
|
17
|
+
export function play_sample(sample: ZzFXSample): void;
|
|
18
|
+
|
|
19
|
+
export function build_sample(...args: number[]): ZzFXSample;
|
|
20
|
+
}
|