@ait-co/devtools 0.0.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/LICENSE +28 -0
- package/README.md +284 -0
- package/dist/chunk-YYIIG3JT.js +146 -0
- package/dist/chunk-YYIIG3JT.js.map +1 -0
- package/dist/mock/index.d.ts +613 -0
- package/dist/mock/index.js +696 -0
- package/dist/mock/index.js.map +1 -0
- package/dist/panel/index.d.ts +9 -0
- package/dist/panel/index.js +528 -0
- package/dist/panel/index.js.map +1 -0
- package/dist/unplugin/index.cjs +75 -0
- package/dist/unplugin/index.cjs.map +1 -0
- package/dist/unplugin/index.js +46 -0
- package/dist/unplugin/index.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ait-devtools 중앙 상태 관리
|
|
3
|
+
* DevTools Panel과 mock 구현체가 이 상태를 공유한다.
|
|
4
|
+
*/
|
|
5
|
+
type PlatformOS = 'ios' | 'android';
|
|
6
|
+
type OperationalEnvironment = 'toss' | 'sandbox';
|
|
7
|
+
type NetworkStatus$1 = 'OFFLINE' | 'WIFI' | '2G' | '3G' | '4G' | '5G' | 'WWAN' | 'UNKNOWN';
|
|
8
|
+
type PermissionStatus = 'notDetermined' | 'denied' | 'allowed';
|
|
9
|
+
type PermissionName = 'clipboard' | 'contacts' | 'photos' | 'geolocation' | 'camera' | 'microphone';
|
|
10
|
+
type HapticFeedbackType = 'tickWeak' | 'tap' | 'tickMedium' | 'softMedium' | 'basicWeak' | 'basicMedium' | 'success' | 'error' | 'wiggle' | 'confetti';
|
|
11
|
+
interface LocationCoords {
|
|
12
|
+
latitude: number;
|
|
13
|
+
longitude: number;
|
|
14
|
+
altitude: number;
|
|
15
|
+
accuracy: number;
|
|
16
|
+
altitudeAccuracy: number;
|
|
17
|
+
heading: number;
|
|
18
|
+
}
|
|
19
|
+
interface MockLocation {
|
|
20
|
+
coords: LocationCoords;
|
|
21
|
+
timestamp: number;
|
|
22
|
+
accessLocation?: 'FINE' | 'COARSE';
|
|
23
|
+
}
|
|
24
|
+
interface MockContact {
|
|
25
|
+
name: string;
|
|
26
|
+
phoneNumber: string;
|
|
27
|
+
}
|
|
28
|
+
interface MockIapProduct {
|
|
29
|
+
sku: string;
|
|
30
|
+
type: 'CONSUMABLE' | 'NON_CONSUMABLE' | 'SUBSCRIPTION';
|
|
31
|
+
displayName: string;
|
|
32
|
+
displayAmount: string;
|
|
33
|
+
iconUrl: string;
|
|
34
|
+
description: string;
|
|
35
|
+
renewalCycle?: 'WEEKLY' | 'MONTHLY' | 'YEARLY';
|
|
36
|
+
}
|
|
37
|
+
type IapNextResult = 'success' | 'USER_CANCELED' | 'INVALID_PRODUCT_ID' | 'PAYMENT_PENDING' | 'NETWORK_ERROR' | 'ITEM_ALREADY_OWNED' | 'INTERNAL_ERROR';
|
|
38
|
+
interface AnalyticsLogEntry {
|
|
39
|
+
timestamp: number;
|
|
40
|
+
type: string;
|
|
41
|
+
params: Record<string, unknown>;
|
|
42
|
+
}
|
|
43
|
+
interface SafeAreaInsets$1 {
|
|
44
|
+
top: number;
|
|
45
|
+
bottom: number;
|
|
46
|
+
left: number;
|
|
47
|
+
right: number;
|
|
48
|
+
}
|
|
49
|
+
type Listener = () => void;
|
|
50
|
+
interface AitDevtoolsState {
|
|
51
|
+
platform: PlatformOS;
|
|
52
|
+
environment: OperationalEnvironment;
|
|
53
|
+
appVersion: string;
|
|
54
|
+
locale: string;
|
|
55
|
+
schemeUri: string;
|
|
56
|
+
groupId: string;
|
|
57
|
+
deploymentId: string;
|
|
58
|
+
deviceId: string;
|
|
59
|
+
brand: {
|
|
60
|
+
displayName: string;
|
|
61
|
+
icon: string;
|
|
62
|
+
primaryColor: string;
|
|
63
|
+
};
|
|
64
|
+
networkStatus: NetworkStatus$1;
|
|
65
|
+
permissions: Record<PermissionName, PermissionStatus>;
|
|
66
|
+
location: MockLocation;
|
|
67
|
+
safeAreaInsets: SafeAreaInsets$1;
|
|
68
|
+
contacts: MockContact[];
|
|
69
|
+
iap: {
|
|
70
|
+
products: MockIapProduct[];
|
|
71
|
+
nextResult: IapNextResult;
|
|
72
|
+
pendingOrders: Array<{
|
|
73
|
+
orderId: string;
|
|
74
|
+
sku: string;
|
|
75
|
+
paymentCompletedDate: string;
|
|
76
|
+
}>;
|
|
77
|
+
completedOrders: Array<{
|
|
78
|
+
orderId: string;
|
|
79
|
+
sku: string;
|
|
80
|
+
status: 'COMPLETED' | 'REFUNDED';
|
|
81
|
+
date: string;
|
|
82
|
+
}>;
|
|
83
|
+
};
|
|
84
|
+
payment: {
|
|
85
|
+
nextResult: 'success' | 'fail';
|
|
86
|
+
failReason: string;
|
|
87
|
+
};
|
|
88
|
+
auth: {
|
|
89
|
+
isLoggedIn: boolean;
|
|
90
|
+
isTossLoginIntegrated: boolean;
|
|
91
|
+
userKeyHash: string;
|
|
92
|
+
};
|
|
93
|
+
ads: {
|
|
94
|
+
isLoaded: boolean;
|
|
95
|
+
nextEvent: 'loaded' | 'clicked' | 'dismissed' | 'failedToShow' | 'impression' | 'userEarnedReward';
|
|
96
|
+
};
|
|
97
|
+
game: {
|
|
98
|
+
profile: {
|
|
99
|
+
nickname: string;
|
|
100
|
+
profileImageUri: string;
|
|
101
|
+
} | null;
|
|
102
|
+
leaderboardScores: Array<{
|
|
103
|
+
score: string;
|
|
104
|
+
timestamp: number;
|
|
105
|
+
}>;
|
|
106
|
+
};
|
|
107
|
+
analyticsLog: AnalyticsLogEntry[];
|
|
108
|
+
}
|
|
109
|
+
declare class AitStateManager {
|
|
110
|
+
private _state;
|
|
111
|
+
private _listeners;
|
|
112
|
+
constructor();
|
|
113
|
+
get state(): AitDevtoolsState;
|
|
114
|
+
update(partial: Partial<AitDevtoolsState>): void;
|
|
115
|
+
/** 중첩 객체 업데이트용 */
|
|
116
|
+
patch<K extends keyof AitDevtoolsState>(key: K, partial: Partial<AitDevtoolsState[K]>): void;
|
|
117
|
+
subscribe(listener: Listener): () => void;
|
|
118
|
+
/** 분석 로그 추가 */
|
|
119
|
+
logAnalytics(entry: Omit<AnalyticsLogEntry, 'timestamp'>): void;
|
|
120
|
+
/** 이벤트 트리거 (backEvent, homeEvent 등) */
|
|
121
|
+
trigger(event: string): void;
|
|
122
|
+
reset(): void;
|
|
123
|
+
private _notify;
|
|
124
|
+
}
|
|
125
|
+
declare const aitState: AitStateManager;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* 인증/로그인 mock
|
|
129
|
+
*/
|
|
130
|
+
declare function appLogin(): Promise<{
|
|
131
|
+
authorizationCode: string;
|
|
132
|
+
referrer: 'DEFAULT' | 'SANDBOX';
|
|
133
|
+
}>;
|
|
134
|
+
declare function getIsTossLoginIntegratedService(): Promise<boolean | undefined>;
|
|
135
|
+
declare function getUserKeyForGame(): Promise<{
|
|
136
|
+
hash: string;
|
|
137
|
+
type: 'HASH';
|
|
138
|
+
} | 'INVALID_CATEGORY' | 'ERROR' | undefined>;
|
|
139
|
+
interface AppsInTossSignTossCertParams {
|
|
140
|
+
txId: string;
|
|
141
|
+
}
|
|
142
|
+
declare function appsInTossSignTossCert(_params: AppsInTossSignTossCertParams): Promise<void>;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* 화면/네비게이션/이벤트 mock
|
|
146
|
+
*/
|
|
147
|
+
declare function closeView(): Promise<void>;
|
|
148
|
+
declare function openURL(url: string): Promise<void>;
|
|
149
|
+
declare function share(message: {
|
|
150
|
+
message: string;
|
|
151
|
+
}): Promise<void>;
|
|
152
|
+
declare function getTossShareLink(path: string, _ogImageUrl?: string): Promise<string>;
|
|
153
|
+
declare function setIosSwipeGestureEnabled(_options: {
|
|
154
|
+
isEnabled: boolean;
|
|
155
|
+
}): Promise<void>;
|
|
156
|
+
declare function setDeviceOrientation(_options: {
|
|
157
|
+
type: 'portrait' | 'landscape';
|
|
158
|
+
}): Promise<void>;
|
|
159
|
+
declare function setScreenAwakeMode(options: {
|
|
160
|
+
enabled: boolean;
|
|
161
|
+
}): Promise<{
|
|
162
|
+
enabled: boolean;
|
|
163
|
+
}>;
|
|
164
|
+
declare function setSecureScreen(options: {
|
|
165
|
+
enabled: boolean;
|
|
166
|
+
}): Promise<{
|
|
167
|
+
enabled: boolean;
|
|
168
|
+
}>;
|
|
169
|
+
declare function requestReview(): Promise<void>;
|
|
170
|
+
declare function getPlatformOS(): 'ios' | 'android';
|
|
171
|
+
declare function getOperationalEnvironment(): 'toss' | 'sandbox';
|
|
172
|
+
declare function getTossAppVersion(): string;
|
|
173
|
+
declare function isMinVersionSupported(minVersions: {
|
|
174
|
+
android: string;
|
|
175
|
+
ios: string;
|
|
176
|
+
}): boolean;
|
|
177
|
+
declare function getSchemeUri(): string;
|
|
178
|
+
declare function getLocale(): string;
|
|
179
|
+
declare function getDeviceId(): string;
|
|
180
|
+
declare function getGroupId(): string;
|
|
181
|
+
declare function getNetworkStatus(): Promise<NetworkStatus>;
|
|
182
|
+
type NetworkStatus = 'OFFLINE' | 'WIFI' | '2G' | '3G' | '4G' | '5G' | 'WWAN' | 'UNKNOWN';
|
|
183
|
+
declare function getServerTime(): Promise<number | undefined>;
|
|
184
|
+
interface GraniteEventMap {
|
|
185
|
+
backEvent: {
|
|
186
|
+
onEvent: () => void;
|
|
187
|
+
onError?: (error: Error) => void;
|
|
188
|
+
options?: void;
|
|
189
|
+
};
|
|
190
|
+
homeEvent: {
|
|
191
|
+
onEvent: () => void;
|
|
192
|
+
onError?: (error: Error) => void;
|
|
193
|
+
options?: void;
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
declare const graniteEvent: {
|
|
197
|
+
addEventListener<K extends keyof GraniteEventMap>(event: K, { onEvent, onError }: {
|
|
198
|
+
onEvent: GraniteEventMap[K]["onEvent"];
|
|
199
|
+
onError?: GraniteEventMap[K]["onError"];
|
|
200
|
+
options?: GraniteEventMap[K]["options"];
|
|
201
|
+
}): () => void;
|
|
202
|
+
};
|
|
203
|
+
declare const appsInTossEvent: {
|
|
204
|
+
addEventListener<K extends string>(_event: K, _handlers: {
|
|
205
|
+
onEvent: (...args: unknown[]) => void;
|
|
206
|
+
onError?: (error: Error) => void;
|
|
207
|
+
options?: unknown;
|
|
208
|
+
}): () => void;
|
|
209
|
+
};
|
|
210
|
+
interface TdsEventMap {
|
|
211
|
+
navigationAccessoryEvent: {
|
|
212
|
+
onEvent: (data: {
|
|
213
|
+
id: string;
|
|
214
|
+
}) => void;
|
|
215
|
+
onError?: (error: Error) => void;
|
|
216
|
+
options: undefined;
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
declare const tdsEvent: {
|
|
220
|
+
addEventListener<K extends keyof TdsEventMap>(event: K, { onEvent }: {
|
|
221
|
+
onEvent: TdsEventMap[K]["onEvent"];
|
|
222
|
+
onError?: TdsEventMap[K]["onError"];
|
|
223
|
+
options?: TdsEventMap[K]["options"];
|
|
224
|
+
}): () => void;
|
|
225
|
+
};
|
|
226
|
+
declare function onVisibilityChangedByTransparentServiceWeb(eventParams: {
|
|
227
|
+
options: {
|
|
228
|
+
callbackId: string;
|
|
229
|
+
};
|
|
230
|
+
onEvent: (isVisible: boolean) => void;
|
|
231
|
+
onError: (error: unknown) => void;
|
|
232
|
+
}): () => void;
|
|
233
|
+
declare const env: {
|
|
234
|
+
getDeploymentId: () => string;
|
|
235
|
+
};
|
|
236
|
+
declare function getAppsInTossGlobals(): {
|
|
237
|
+
deploymentId: string;
|
|
238
|
+
brandDisplayName: string;
|
|
239
|
+
brandIcon: string;
|
|
240
|
+
brandPrimaryColor: string;
|
|
241
|
+
};
|
|
242
|
+
type SafeAreaInsetsValue = {
|
|
243
|
+
top: number;
|
|
244
|
+
bottom: number;
|
|
245
|
+
left: number;
|
|
246
|
+
right: number;
|
|
247
|
+
};
|
|
248
|
+
type SafeAreaInsetsSubscribeHandler = {
|
|
249
|
+
onEvent: (data: SafeAreaInsetsValue) => void;
|
|
250
|
+
};
|
|
251
|
+
declare const SafeAreaInsets: {
|
|
252
|
+
get: () => SafeAreaInsetsValue;
|
|
253
|
+
subscribe: ({ onEvent }: SafeAreaInsetsSubscribeHandler) => (() => void);
|
|
254
|
+
};
|
|
255
|
+
/** @deprecated */
|
|
256
|
+
declare function getSafeAreaInsets(): number;
|
|
257
|
+
|
|
258
|
+
declare const Storage: {
|
|
259
|
+
getItem: (key: string) => Promise<string | null>;
|
|
260
|
+
setItem: (key: string, value: string) => Promise<void>;
|
|
261
|
+
removeItem: (key: string) => Promise<void>;
|
|
262
|
+
clearItems: () => Promise<void>;
|
|
263
|
+
};
|
|
264
|
+
declare enum Accuracy {
|
|
265
|
+
Lowest = 1,
|
|
266
|
+
Low = 2,
|
|
267
|
+
Balanced = 3,
|
|
268
|
+
High = 4,
|
|
269
|
+
Highest = 5,
|
|
270
|
+
BestForNavigation = 6
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare const getCurrentLocation: ((_options?: {
|
|
274
|
+
accuracy: Accuracy;
|
|
275
|
+
}) => Promise<MockLocation>) & {
|
|
276
|
+
getPermission: () => Promise<PermissionStatus>;
|
|
277
|
+
openPermissionDialog: () => Promise<"allowed" | "denied">;
|
|
278
|
+
};
|
|
279
|
+
interface StartUpdateLocationEventParams {
|
|
280
|
+
onEvent: (response: MockLocation) => void;
|
|
281
|
+
onError: (error: unknown) => void;
|
|
282
|
+
options: {
|
|
283
|
+
accuracy: Accuracy;
|
|
284
|
+
timeInterval: number;
|
|
285
|
+
distanceInterval: number;
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
declare function _startUpdateLocation(eventParams: StartUpdateLocationEventParams): () => void;
|
|
289
|
+
declare const startUpdateLocation: typeof _startUpdateLocation & {
|
|
290
|
+
getPermission: () => Promise<PermissionStatus>;
|
|
291
|
+
openPermissionDialog: () => Promise<"denied" | "allowed">;
|
|
292
|
+
};
|
|
293
|
+
declare const openCamera: ((options?: {
|
|
294
|
+
base64?: boolean;
|
|
295
|
+
maxWidth?: number;
|
|
296
|
+
}) => Promise<{
|
|
297
|
+
id: string;
|
|
298
|
+
dataUri: string;
|
|
299
|
+
}>) & {
|
|
300
|
+
getPermission: () => Promise<PermissionStatus>;
|
|
301
|
+
openPermissionDialog: () => Promise<"allowed" | "denied">;
|
|
302
|
+
};
|
|
303
|
+
declare const fetchAlbumPhotos: ((options?: {
|
|
304
|
+
maxCount?: number;
|
|
305
|
+
maxWidth?: number;
|
|
306
|
+
base64?: boolean;
|
|
307
|
+
}) => Promise<Array<{
|
|
308
|
+
id: string;
|
|
309
|
+
dataUri: string;
|
|
310
|
+
}>>) & {
|
|
311
|
+
getPermission: () => Promise<PermissionStatus>;
|
|
312
|
+
openPermissionDialog: () => Promise<"allowed" | "denied">;
|
|
313
|
+
};
|
|
314
|
+
declare const fetchContacts: ((options: {
|
|
315
|
+
size: number;
|
|
316
|
+
offset: number;
|
|
317
|
+
query?: {
|
|
318
|
+
contains?: string;
|
|
319
|
+
};
|
|
320
|
+
}) => Promise<{
|
|
321
|
+
result: MockContact[];
|
|
322
|
+
nextOffset: number | null;
|
|
323
|
+
done: boolean;
|
|
324
|
+
}>) & {
|
|
325
|
+
getPermission: () => Promise<PermissionStatus>;
|
|
326
|
+
openPermissionDialog: () => Promise<"allowed" | "denied">;
|
|
327
|
+
};
|
|
328
|
+
declare const getClipboardText: (() => Promise<string>) & {
|
|
329
|
+
getPermission: () => Promise<PermissionStatus>;
|
|
330
|
+
openPermissionDialog: () => Promise<"allowed" | "denied">;
|
|
331
|
+
};
|
|
332
|
+
declare const setClipboardText: ((text: string) => Promise<void>) & {
|
|
333
|
+
getPermission: () => Promise<PermissionStatus>;
|
|
334
|
+
openPermissionDialog: () => Promise<"allowed" | "denied">;
|
|
335
|
+
};
|
|
336
|
+
declare function generateHapticFeedback(options: {
|
|
337
|
+
type: string;
|
|
338
|
+
}): Promise<void>;
|
|
339
|
+
declare function saveBase64Data(params: {
|
|
340
|
+
data: string;
|
|
341
|
+
fileName: string;
|
|
342
|
+
mimeType: string;
|
|
343
|
+
}): Promise<void>;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* IAP (인앱결제) mock
|
|
347
|
+
*/
|
|
348
|
+
interface IapCreateOneTimePurchaseOrderOptions {
|
|
349
|
+
options: {
|
|
350
|
+
sku?: string;
|
|
351
|
+
productId?: string;
|
|
352
|
+
processProductGrant: (params: {
|
|
353
|
+
orderId: string;
|
|
354
|
+
}) => boolean | Promise<boolean>;
|
|
355
|
+
};
|
|
356
|
+
onEvent: (event: {
|
|
357
|
+
type: 'success';
|
|
358
|
+
data: IapOrderResult;
|
|
359
|
+
}) => void | Promise<void>;
|
|
360
|
+
onError: (error: unknown) => void | Promise<void>;
|
|
361
|
+
}
|
|
362
|
+
interface CreateSubscriptionPurchaseOrderOptions {
|
|
363
|
+
options: {
|
|
364
|
+
sku: string;
|
|
365
|
+
offerId?: string | null;
|
|
366
|
+
processProductGrant: (params: {
|
|
367
|
+
orderId: string;
|
|
368
|
+
subscriptionId?: string;
|
|
369
|
+
}) => boolean | Promise<boolean>;
|
|
370
|
+
};
|
|
371
|
+
onEvent: (event: {
|
|
372
|
+
type: 'success';
|
|
373
|
+
data: IapOrderResult;
|
|
374
|
+
}) => void | Promise<void>;
|
|
375
|
+
onError: (error: unknown) => void | Promise<void>;
|
|
376
|
+
}
|
|
377
|
+
interface IapOrderResult {
|
|
378
|
+
orderId: string;
|
|
379
|
+
displayName: string;
|
|
380
|
+
displayAmount: string;
|
|
381
|
+
amount: number;
|
|
382
|
+
currency: string;
|
|
383
|
+
fraction: number;
|
|
384
|
+
miniAppIconUrl: string | null;
|
|
385
|
+
}
|
|
386
|
+
declare const IAP: {
|
|
387
|
+
createOneTimePurchaseOrder(params: IapCreateOneTimePurchaseOrderOptions): () => void;
|
|
388
|
+
createSubscriptionPurchaseOrder(params: CreateSubscriptionPurchaseOrderOptions): () => void;
|
|
389
|
+
getProductItemList(): Promise<{
|
|
390
|
+
products: unknown[];
|
|
391
|
+
}>;
|
|
392
|
+
getPendingOrders(): Promise<{
|
|
393
|
+
orders: Array<{
|
|
394
|
+
orderId: string;
|
|
395
|
+
sku: string;
|
|
396
|
+
paymentCompletedDate: string;
|
|
397
|
+
}>;
|
|
398
|
+
}>;
|
|
399
|
+
getCompletedOrRefundedOrders(): Promise<{
|
|
400
|
+
hasNext: boolean;
|
|
401
|
+
nextKey?: string | null;
|
|
402
|
+
orders: Array<{
|
|
403
|
+
orderId: string;
|
|
404
|
+
sku: string;
|
|
405
|
+
status: "COMPLETED" | "REFUNDED";
|
|
406
|
+
date: string;
|
|
407
|
+
}>;
|
|
408
|
+
}>;
|
|
409
|
+
completeProductGrant(args: {
|
|
410
|
+
params: {
|
|
411
|
+
orderId: string;
|
|
412
|
+
};
|
|
413
|
+
}): Promise<boolean>;
|
|
414
|
+
getSubscriptionInfo(_args: {
|
|
415
|
+
params: {
|
|
416
|
+
orderId: string;
|
|
417
|
+
};
|
|
418
|
+
}): Promise<{
|
|
419
|
+
subscription: {
|
|
420
|
+
catalogId: number;
|
|
421
|
+
status: string;
|
|
422
|
+
expiresAt: string;
|
|
423
|
+
isAutoRenew: boolean;
|
|
424
|
+
gracePeriodExpiresAt: null;
|
|
425
|
+
isAccessible: boolean;
|
|
426
|
+
};
|
|
427
|
+
}>;
|
|
428
|
+
};
|
|
429
|
+
declare function checkoutPayment(options: {
|
|
430
|
+
params: {
|
|
431
|
+
payToken: string;
|
|
432
|
+
};
|
|
433
|
+
}): Promise<{
|
|
434
|
+
success: boolean;
|
|
435
|
+
reason?: string;
|
|
436
|
+
}>;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* 광고 mock (GoogleAdMob, TossAds, FullScreenAd)
|
|
440
|
+
*/
|
|
441
|
+
declare const GoogleAdMob: {
|
|
442
|
+
loadAppsInTossAdMob: ((args: {
|
|
443
|
+
onEvent: (data: {
|
|
444
|
+
type: string;
|
|
445
|
+
data?: unknown;
|
|
446
|
+
}) => void;
|
|
447
|
+
onError: (error: Error) => void;
|
|
448
|
+
options?: {
|
|
449
|
+
adGroupId?: string;
|
|
450
|
+
};
|
|
451
|
+
}) => (() => void)) & {
|
|
452
|
+
isSupported: () => boolean;
|
|
453
|
+
};
|
|
454
|
+
showAppsInTossAdMob: ((args: {
|
|
455
|
+
onEvent: (data: {
|
|
456
|
+
type: string;
|
|
457
|
+
data?: unknown;
|
|
458
|
+
}) => void;
|
|
459
|
+
onError: (error: Error) => void;
|
|
460
|
+
options?: {
|
|
461
|
+
adGroupId?: string;
|
|
462
|
+
};
|
|
463
|
+
}) => (() => void)) & {
|
|
464
|
+
isSupported: () => boolean;
|
|
465
|
+
};
|
|
466
|
+
isAppsInTossAdMobLoaded: ((_options: {
|
|
467
|
+
adGroupId?: string;
|
|
468
|
+
}) => Promise<boolean>) & {
|
|
469
|
+
isSupported: () => boolean;
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
declare const TossAds: {
|
|
473
|
+
initialize: ((_options: unknown) => void) & {
|
|
474
|
+
isSupported: () => boolean;
|
|
475
|
+
};
|
|
476
|
+
attach: ((_adGroupId: string, target: string | HTMLElement, _options?: unknown) => void) & {
|
|
477
|
+
isSupported: () => boolean;
|
|
478
|
+
};
|
|
479
|
+
attachBanner: ((_adGroupId: string, target: string | HTMLElement, _options?: unknown) => {
|
|
480
|
+
destroy: () => void;
|
|
481
|
+
}) & {
|
|
482
|
+
isSupported: () => boolean;
|
|
483
|
+
};
|
|
484
|
+
destroy: ((_slotId: string) => void) & {
|
|
485
|
+
isSupported: () => boolean;
|
|
486
|
+
};
|
|
487
|
+
destroyAll: (() => void) & {
|
|
488
|
+
isSupported: () => boolean;
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
declare const loadFullScreenAd: ((args: {
|
|
492
|
+
onEvent: (data: {
|
|
493
|
+
type: string;
|
|
494
|
+
data?: unknown;
|
|
495
|
+
}) => void;
|
|
496
|
+
onError: (error: Error) => void;
|
|
497
|
+
options?: {
|
|
498
|
+
adGroupId?: string;
|
|
499
|
+
};
|
|
500
|
+
}) => (() => void)) & {
|
|
501
|
+
isSupported: () => boolean;
|
|
502
|
+
};
|
|
503
|
+
declare const showFullScreenAd: ((args: {
|
|
504
|
+
onEvent: (data: {
|
|
505
|
+
type: string;
|
|
506
|
+
data?: unknown;
|
|
507
|
+
}) => void;
|
|
508
|
+
onError: (error: Error) => void;
|
|
509
|
+
options?: {
|
|
510
|
+
adGroupId?: string;
|
|
511
|
+
};
|
|
512
|
+
}) => (() => void)) & {
|
|
513
|
+
isSupported: () => boolean;
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* 게임/프로모션 mock
|
|
518
|
+
*/
|
|
519
|
+
declare function grantPromotionReward(params: {
|
|
520
|
+
params: {
|
|
521
|
+
promotionCode: string;
|
|
522
|
+
amount: number;
|
|
523
|
+
};
|
|
524
|
+
}): Promise<{
|
|
525
|
+
key: string;
|
|
526
|
+
} | {
|
|
527
|
+
errorCode: string;
|
|
528
|
+
message: string;
|
|
529
|
+
} | 'ERROR' | undefined>;
|
|
530
|
+
declare function grantPromotionRewardForGame(params: {
|
|
531
|
+
params: {
|
|
532
|
+
promotionCode: string;
|
|
533
|
+
amount: number;
|
|
534
|
+
};
|
|
535
|
+
}): Promise<{
|
|
536
|
+
key: string;
|
|
537
|
+
} | {
|
|
538
|
+
errorCode: string;
|
|
539
|
+
message: string;
|
|
540
|
+
} | 'ERROR' | undefined>;
|
|
541
|
+
declare function submitGameCenterLeaderBoardScore(params: {
|
|
542
|
+
score: string;
|
|
543
|
+
}): Promise<{
|
|
544
|
+
statusCode: 'SUCCESS' | 'LEADERBOARD_NOT_FOUND' | 'PROFILE_NOT_FOUND' | 'UNPARSABLE_SCORE';
|
|
545
|
+
} | undefined>;
|
|
546
|
+
declare function getGameCenterGameProfile(): Promise<{
|
|
547
|
+
statusCode: 'SUCCESS';
|
|
548
|
+
nickname: string;
|
|
549
|
+
profileImageUri: string;
|
|
550
|
+
} | {
|
|
551
|
+
statusCode: 'PROFILE_NOT_FOUND';
|
|
552
|
+
} | undefined>;
|
|
553
|
+
declare function openGameCenterLeaderboard(): Promise<void>;
|
|
554
|
+
interface ContactsViralEvent {
|
|
555
|
+
type: string;
|
|
556
|
+
data: Record<string, unknown>;
|
|
557
|
+
}
|
|
558
|
+
declare function contactsViral(params: {
|
|
559
|
+
options: {
|
|
560
|
+
moduleId: string;
|
|
561
|
+
};
|
|
562
|
+
onEvent: (event: ContactsViralEvent) => void;
|
|
563
|
+
onError: (error: unknown) => void;
|
|
564
|
+
}): () => void;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Analytics mock
|
|
568
|
+
*/
|
|
569
|
+
type Primitive$1 = string | number | boolean | null | undefined | symbol;
|
|
570
|
+
type LoggerParams = {
|
|
571
|
+
log_name?: string;
|
|
572
|
+
} & Record<string, Primitive$1>;
|
|
573
|
+
declare const Analytics: {
|
|
574
|
+
screen: (params?: LoggerParams) => Promise<void> | undefined;
|
|
575
|
+
impression: (params?: LoggerParams) => Promise<void> | undefined;
|
|
576
|
+
click: (params?: LoggerParams) => Promise<void> | undefined;
|
|
577
|
+
};
|
|
578
|
+
declare function eventLog(params: {
|
|
579
|
+
log_name: string;
|
|
580
|
+
log_type: 'debug' | 'info' | 'warn' | 'error' | 'event' | 'screen' | 'impression' | 'click';
|
|
581
|
+
params: Record<string, Primitive$1>;
|
|
582
|
+
}): Promise<void>;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Partner / TDS mock
|
|
586
|
+
*/
|
|
587
|
+
interface AddAccessoryButtonOptions {
|
|
588
|
+
id: string;
|
|
589
|
+
title: string;
|
|
590
|
+
icon: {
|
|
591
|
+
name: string;
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
declare const partner: {
|
|
595
|
+
addAccessoryButton(options: AddAccessoryButtonOptions): Promise<void>;
|
|
596
|
+
removeAccessoryButton(): Promise<void>;
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* 권한 시스템 mock
|
|
601
|
+
* 각 디바이스 API (.getPermission, .openPermissionDialog)에 부착된다.
|
|
602
|
+
*/
|
|
603
|
+
|
|
604
|
+
declare function getPermission(name: PermissionName): Promise<PermissionStatus>;
|
|
605
|
+
declare function openPermissionDialog(name: PermissionName): Promise<'allowed' | 'denied'>;
|
|
606
|
+
declare function requestPermission(permission: {
|
|
607
|
+
name: PermissionName;
|
|
608
|
+
access: string;
|
|
609
|
+
}): Promise<'allowed' | 'denied'>;
|
|
610
|
+
|
|
611
|
+
type Primitive = string | number | boolean | null | undefined | symbol;
|
|
612
|
+
|
|
613
|
+
export { Accuracy, type AitDevtoolsState, Analytics, type AnalyticsLogEntry, GoogleAdMob, type HapticFeedbackType, IAP, type IapNextResult, type LocationCoords, type MockContact, type MockIapProduct, type MockLocation, type NetworkStatus$1 as NetworkStatus, type OperationalEnvironment, type PermissionName, type PermissionStatus, type PlatformOS, type Primitive, SafeAreaInsets, type SafeAreaInsets$1 as SafeAreaInsetsType, Storage, TossAds, aitState, appLogin, appsInTossEvent, appsInTossSignTossCert, checkoutPayment, closeView, contactsViral, env, eventLog, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getAppsInTossGlobals, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getGroupId, getIsTossLoginIntegratedService, getLocale, getNetworkStatus, getOperationalEnvironment, getPermission, getPlatformOS, getSafeAreaInsets, getSchemeUri, getServerTime, getTossAppVersion, getTossShareLink, getUserKeyForGame, graniteEvent, grantPromotionReward, grantPromotionRewardForGame, isMinVersionSupported, loadFullScreenAd, onVisibilityChangedByTransparentServiceWeb, openCamera, openGameCenterLeaderboard, openPermissionDialog, openURL, partner, requestPermission, requestReview, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, showFullScreenAd, startUpdateLocation, submitGameCenterLeaderBoardScore, tdsEvent };
|