@apps-in-toss/web-framework 2.6.1 → 3.0.0-beta.9d42c0b
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/dist/cli.js +306 -0
- package/dist/config.cjs +52 -0
- package/dist/config.d.cts +54 -0
- package/dist/config.d.ts +54 -0
- package/dist/config.js +27 -0
- package/dist/core.cjs +1511 -0
- package/dist/core.d.cts +906 -0
- package/dist/core.d.ts +906 -0
- package/dist/core.js +1452 -0
- package/package.json +42 -91
- package/LICENSE +0 -674
- package/README.md +0 -43
- package/ait.js +0 -4
- package/bin.js +0 -4
- package/config.d.ts +0 -1
- package/dist/cli/chunk-BAH3W7VD.js +0 -61
- package/dist/cli/index.js +0 -15558
- package/dist/cli/lib-O2ZDIQPQ.js +0 -1007
- package/dist/config/index.d.ts +0 -85
- package/dist/config/index.js +0 -599
- package/dist/prebuilt/dev.android.rn84.js +0 -214517
- package/dist/prebuilt/dev.ios.rn84.js +0 -213945
- package/dist/prebuilt/prod.android.rn72.js +0 -49390
- package/dist/prebuilt/prod.android.rn84.js +0 -48405
- package/dist/prebuilt/prod.ios.rn72.js +0 -49399
- package/dist/prebuilt/prod.ios.rn84.js +0 -48414
- package/dist-web/index.d.ts +0 -2
- package/dist-web/index.js +0 -2
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,906 @@
|
|
|
1
|
+
import * as _apps_in_toss_webview_bridge_spec from '@apps-in-toss/webview-bridge/spec';
|
|
2
|
+
import { LoadAppsInTossAdmobParams, LoadAppsInTossAdmobResult, ShowAppsInTossAdmobParams, ShowAppsInTossAdmobEvent, GetCachedStatusAppsInTossAdmobParams, LoadTossAdOrAdmobParams, ShowTossAdOrAdmobParams, LoadFullScreenAdOptions, LoadFullScreenAdEvent, ShowFullScreenAdOptions, ShowFullScreenAdEvent, GetAnonymousKeyResponse, AppLoginResponse, AppsInTossSignTossCertParams, CheckoutPaymentParams, CheckoutPaymentResult, FetchContactsResult, ContactsViralParams as ContactsViralParams$1, ContactsViralEvent, ContactsViralCloseEvent, FetchContactsParams, ContactsViralRewardEvent, AppsInTossGlobals, EventLogParams as EventLogParams$1, GameCenterGameProfileResponse, GrantPromotionRewardParams, GrantPromotionRewardResponse, SubmitGameCenterLeaderBoardScoreResponse, IapCreateOneTimePurchaseOrderResult, GetSubscriptionInfoResult, Location, FetchAlbumPhotosParams, OpenCameraParams, AddAccessoryButtonParams, PermissionStatus, PermissionName, PermissionAccess, SafeAreaInsets as SafeAreaInsets$2, SaveBase64DataParams, DeviceOrientation, OpenPDFViewerParams, OpenPDFViewerResult, FetchAlbumItemsOptions, AlbumItemResponse, RequestTossPayPaysBillingParams, RequestTossPayPaysBillingResult, RequestNotificationAgreementParams, NotificationAgreementResult, ImageResponse, LogParam } from '@apps-in-toss/webview-bridge/spec';
|
|
3
|
+
export { AlbumItemResponse, AlbumItemType, AppsInTossGlobals, AppsInTossSignTossCertParams, CheckoutPaymentResult, CompletedOrRefundedOrdersResult, ConsumableProductListItem, ContactEntity, ContactsViralEvent, ContactsViralParams as ContactsViralOption, FetchAlbumItemsOptions, FetchTossAdOptions, GameCenterGameProfileResponse, GetAnonymousKeyResponse, GrantPromotionRewardParams, GrantPromotionRewardResponse, IapCreateOneTimePurchaseOrderResult, IapProductListItem, IapSubscriptionInfoResult, ImageResponse, LoadFullScreenAdEvent, LoadFullScreenAdOptions, Location, LocationCoords, NonConsumableProductListItem, NotificationAgreementResult, Offer, OpenPDFViewerParams, OpenPDFViewerResult, PermissionAccess, PermissionName, PermissionStatus, RequestTossPayPaysBillingParams, RequestTossPayPaysBillingResult, SaveBase64DataParams, ShowFullScreenAdEvent, ShowFullScreenAdOptions, ShowTossAdOrAdmobEvent, SubmitGameCenterLeaderBoardScoreResponse, SubscriptionProductListItem, TossAdEventLogParams } from '@apps-in-toss/webview-bridge/spec';
|
|
4
|
+
|
|
5
|
+
type LoadAdMobOptions = LoadAppsInTossAdmobParams;
|
|
6
|
+
type LoadAdMobResult = LoadAppsInTossAdmobResult;
|
|
7
|
+
type ShowAdMobOptions = ShowAppsInTossAdmobParams;
|
|
8
|
+
type ShowAdMobEvent = ShowAppsInTossAdmobEvent;
|
|
9
|
+
type IsAdMobLoadedOptions = GetCachedStatusAppsInTossAdmobParams;
|
|
10
|
+
type LoadAdMobEvent = {
|
|
11
|
+
type: "loaded";
|
|
12
|
+
data: LoadAdMobResult;
|
|
13
|
+
};
|
|
14
|
+
type LoadTossAdOrAdmobOptions = LoadTossAdOrAdmobParams;
|
|
15
|
+
type ShowTossAdOrAdmobOptions = ShowTossAdOrAdmobParams;
|
|
16
|
+
type TossAdOrAdmobRewardData = {
|
|
17
|
+
unitType: string;
|
|
18
|
+
unitAmount: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
declare const GoogleAdMob: {
|
|
22
|
+
/**
|
|
23
|
+
* @public
|
|
24
|
+
* @category 광고
|
|
25
|
+
* @name loadAppsInTossAdMob
|
|
26
|
+
* @description 광고를 미리 불러와서, 광고가 필요한 시점에 바로 보여줄 수 있도록 준비하는 함수예요.
|
|
27
|
+
* @param {object} params 광고를 불러올 때 사용할 설정 값이에요.
|
|
28
|
+
* @param {LoadAdMobOptions} params.options 광고를 불러올 때 전달할 옵션 객체예요.
|
|
29
|
+
* @param {string} params.options.adGroupId 광고 그룹 단위 ID예요.
|
|
30
|
+
* @param {(event: LoadAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요.
|
|
31
|
+
* @param {(reason: unknown) => void} [params.onError] 광고를 불러오지 못했을 때 호출돼요.
|
|
32
|
+
* @property {() => boolean} [isSupported] 현재 환경에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요.
|
|
33
|
+
*/
|
|
34
|
+
loadAppsInTossAdMob: ((params: {
|
|
35
|
+
options: LoadAdMobOptions;
|
|
36
|
+
onEvent: (event: LoadAdMobEvent) => void;
|
|
37
|
+
onError: (error: unknown) => void;
|
|
38
|
+
}) => () => void) & {
|
|
39
|
+
isSupported: () => boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* @public
|
|
43
|
+
* @category 광고
|
|
44
|
+
* @name showAppsInTossAdMob
|
|
45
|
+
* @description 광고를 사용자에게 노출해요.
|
|
46
|
+
* @param {object} params 광고를 보여주기 위해 사용할 설정 값이에요.
|
|
47
|
+
* @param {ShowAdMobOptions} params.options 광고를 보여줄 때 전달할 옵션 객체예요.
|
|
48
|
+
* @param {string} params.options.adGroupId 광고 그룹 단위 ID예요.
|
|
49
|
+
* @param {(event: ShowAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요.
|
|
50
|
+
* @param {(reason: unknown) => void} [params.onError] 광고를 노출하지 못했을 때 호출돼요.
|
|
51
|
+
* @property {() => boolean} [isSupported] 현재 환경에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요.
|
|
52
|
+
*/
|
|
53
|
+
showAppsInTossAdMob: ((params: {
|
|
54
|
+
options: ShowAdMobOptions;
|
|
55
|
+
onEvent: (event: ShowAdMobEvent) => void;
|
|
56
|
+
onError: (error: unknown) => void;
|
|
57
|
+
}) => () => void) & {
|
|
58
|
+
isSupported: () => boolean;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* @public
|
|
62
|
+
* @category 광고
|
|
63
|
+
* @name isAppsInTossAdMobLoaded
|
|
64
|
+
* @description 광고가 잘 불러와졌는지 확인해요.
|
|
65
|
+
* @param {IsAdMobLoadedOptions} options 광고 그룹 단위 ID가 포함된 옵션 객체예요.
|
|
66
|
+
* @property {() => boolean} [isSupported] 현재 환경에서 지원하는지 확인하는 함수예요.
|
|
67
|
+
*/
|
|
68
|
+
isAppsInTossAdMobLoaded: ((options: IsAdMobLoadedOptions) => Promise<boolean>) & {
|
|
69
|
+
isSupported: () => boolean;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
declare const loadFullScreenAd: ((params: {
|
|
74
|
+
options: LoadFullScreenAdOptions;
|
|
75
|
+
onEvent: (event: LoadFullScreenAdEvent) => void;
|
|
76
|
+
onError: (error: unknown) => void;
|
|
77
|
+
}) => () => void) & {
|
|
78
|
+
isSupported: () => boolean;
|
|
79
|
+
};
|
|
80
|
+
declare const showFullScreenAd: ((params: {
|
|
81
|
+
options: ShowFullScreenAdOptions;
|
|
82
|
+
onEvent: (event: ShowFullScreenAdEvent) => void;
|
|
83
|
+
onError: (error: unknown) => void;
|
|
84
|
+
}) => () => void) & {
|
|
85
|
+
isSupported: () => boolean;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
type Environment = 'alpha' | 'live';
|
|
89
|
+
type DeviceOS = 'IOS' | 'ANDROID';
|
|
90
|
+
type DeviceAttStatus = 'NOT_DETERMINED' | 'RESTRICTED' | 'DENIED' | 'AUTHORIZED';
|
|
91
|
+
type DeviceCarrier = 'SKT' | 'KT' | 'LGU' | 'SKT_MVNO' | 'KT_MVNO' | 'LG_MVNO';
|
|
92
|
+
type RequestHeaders = Record<string, string>;
|
|
93
|
+
interface DeviceInfo {
|
|
94
|
+
os?: DeviceOS;
|
|
95
|
+
osVersion?: string;
|
|
96
|
+
ua?: string;
|
|
97
|
+
ifa?: string;
|
|
98
|
+
ifv?: string | null;
|
|
99
|
+
attStatus?: DeviceAttStatus | null;
|
|
100
|
+
model?: string;
|
|
101
|
+
carrier?: DeviceCarrier;
|
|
102
|
+
}
|
|
103
|
+
interface SafeAreaInsets$1 {
|
|
104
|
+
top: string;
|
|
105
|
+
bottom: string;
|
|
106
|
+
left: string;
|
|
107
|
+
right: string;
|
|
108
|
+
}
|
|
109
|
+
interface RuntimeInfo {
|
|
110
|
+
safeAreaInsets?: SafeAreaInsets$1;
|
|
111
|
+
}
|
|
112
|
+
type AdOpener = (url: string, target?: string, features?: string) => void;
|
|
113
|
+
interface AdConfig {
|
|
114
|
+
environment: Environment;
|
|
115
|
+
apiEndpoint?: string;
|
|
116
|
+
deviceInfo?: DeviceInfo;
|
|
117
|
+
requestHeaders?: RequestHeaders;
|
|
118
|
+
runtimeInfo?: RuntimeInfo;
|
|
119
|
+
opener?: AdOpener;
|
|
120
|
+
customAdFetcher?: CustomAdFetcher;
|
|
121
|
+
}
|
|
122
|
+
interface AdRequest {
|
|
123
|
+
spaceUnitId: string;
|
|
124
|
+
options?: {
|
|
125
|
+
dummyAdFormat?: string;
|
|
126
|
+
maxSize?: number;
|
|
127
|
+
video?: {
|
|
128
|
+
maxDurationMs?: number;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
type AdResponseStatus = 'OK' | 'NO_AD' | 'BLOCKED' | 'ERROR' | 'TIMEOUT' | 'INVALID_SPACE' | 'INVALID_REQUEST' | 'LIMITED_AD' | 'CONSENT_REQUIRED' | 'TEST_MODE';
|
|
133
|
+
interface AdResponse {
|
|
134
|
+
requestId?: string;
|
|
135
|
+
status?: AdResponseStatus;
|
|
136
|
+
ads: Ad[];
|
|
137
|
+
ext?: AdResponseExt;
|
|
138
|
+
}
|
|
139
|
+
interface Ad {
|
|
140
|
+
styleId: string;
|
|
141
|
+
creative: Record<string, any>;
|
|
142
|
+
eventTrackingUrls?: string[];
|
|
143
|
+
eventTypes?: string[];
|
|
144
|
+
eventPayload?: string;
|
|
145
|
+
requestId?: string;
|
|
146
|
+
}
|
|
147
|
+
interface AdResponseExt {
|
|
148
|
+
skippableOffsetSeconds?: number;
|
|
149
|
+
reward?: {
|
|
150
|
+
type: string;
|
|
151
|
+
amount: number;
|
|
152
|
+
};
|
|
153
|
+
isAdBadgeEnabled?: boolean;
|
|
154
|
+
refetchSeconds?: number | null;
|
|
155
|
+
}
|
|
156
|
+
interface ApiResponse<T> {
|
|
157
|
+
resultType: 'SUCCESS' | 'HTTP_TIMEOUT' | 'NETWORK_ERROR' | 'EXECUTION_FAIL' | 'INTERRUPTED' | 'INTERNAL_ERROR' | 'FAIL';
|
|
158
|
+
success?: T;
|
|
159
|
+
error?: {
|
|
160
|
+
errorType?: number;
|
|
161
|
+
errorCode?: string;
|
|
162
|
+
reason?: string;
|
|
163
|
+
data?: Record<string, any>;
|
|
164
|
+
title?: string;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
type CustomAdFetcher = (endpoint: string, request: AdRequest, headers?: RequestHeaders) => Promise<ApiResponse<AdResponse>>;
|
|
168
|
+
interface InitializeOptions {
|
|
169
|
+
callbacks?: {
|
|
170
|
+
onInitialized?: () => void;
|
|
171
|
+
onInitializationFailed?: (error: Error) => void;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
interface BannerSlotEventPayload {
|
|
175
|
+
slotId: string;
|
|
176
|
+
adGroupId: string;
|
|
177
|
+
adMetadata: {
|
|
178
|
+
creativeId: string;
|
|
179
|
+
requestId: string;
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
interface BannerSlotErrorPayload {
|
|
183
|
+
slotId: string;
|
|
184
|
+
adGroupId: string;
|
|
185
|
+
adMetadata: Record<string, never>;
|
|
186
|
+
error: {
|
|
187
|
+
code: number;
|
|
188
|
+
message: string;
|
|
189
|
+
domain?: string;
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
interface BannerSlotCallbacks {
|
|
193
|
+
onAdRendered?: (payload: BannerSlotEventPayload) => void;
|
|
194
|
+
onAdViewable?: (payload: BannerSlotEventPayload) => void;
|
|
195
|
+
onAdClicked?: (payload: BannerSlotEventPayload) => void;
|
|
196
|
+
onAdImpression?: (payload: BannerSlotEventPayload) => void;
|
|
197
|
+
onAdFailedToRender?: (payload: BannerSlotErrorPayload) => void;
|
|
198
|
+
onNoFill?: (payload: {
|
|
199
|
+
slotId: string;
|
|
200
|
+
adGroupId: string;
|
|
201
|
+
adMetadata: Record<string, never>;
|
|
202
|
+
}) => void;
|
|
203
|
+
}
|
|
204
|
+
interface BannerSlotOptions {
|
|
205
|
+
spaceId: string;
|
|
206
|
+
autoLoad?: boolean;
|
|
207
|
+
dummyAdFormat?: string;
|
|
208
|
+
maxVideoDurationMs?: number;
|
|
209
|
+
refetchIntervalMs?: number;
|
|
210
|
+
theme?: 'light' | 'dark';
|
|
211
|
+
padding?: string;
|
|
212
|
+
renderPadding?: (styleId: string) => string;
|
|
213
|
+
callbacks?: BannerSlotCallbacks;
|
|
214
|
+
}
|
|
215
|
+
interface BannerSlot {
|
|
216
|
+
load(): void | Promise<void>;
|
|
217
|
+
destroy(): void;
|
|
218
|
+
}
|
|
219
|
+
interface BannerNamespace {
|
|
220
|
+
createSlot(target: string | HTMLElement, options: BannerSlotOptions): BannerSlot;
|
|
221
|
+
destroy(slotId: string): void;
|
|
222
|
+
destroyAll(): void;
|
|
223
|
+
}
|
|
224
|
+
interface AdsSdkGlobal {
|
|
225
|
+
init(config: AdConfig): void;
|
|
226
|
+
banner: BannerNamespace;
|
|
227
|
+
isInitialized(): boolean;
|
|
228
|
+
}
|
|
229
|
+
declare global {
|
|
230
|
+
interface Window {
|
|
231
|
+
TossAdsSpaceKit?: AdsSdkGlobal;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
interface AttachOptions {
|
|
235
|
+
theme?: 'light' | 'dark';
|
|
236
|
+
padding?: string;
|
|
237
|
+
callbacks?: BannerSlotCallbacks;
|
|
238
|
+
}
|
|
239
|
+
interface AttachBannerOptions {
|
|
240
|
+
theme?: 'auto' | 'light' | 'dark';
|
|
241
|
+
tone?: 'blackAndWhite' | 'grey';
|
|
242
|
+
variant?: 'card' | 'expanded';
|
|
243
|
+
callbacks?: BannerSlotCallbacks;
|
|
244
|
+
}
|
|
245
|
+
interface AttachBannerResult {
|
|
246
|
+
destroy: () => void;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
declare function initialize(options: InitializeOptions): void;
|
|
250
|
+
/**
|
|
251
|
+
* @deprecated attach는 더 이상 권장되지 않습니다. attachBanner를 사용해주세요.
|
|
252
|
+
*/
|
|
253
|
+
declare function attach(adGroupId: string, target: string | HTMLElement, options?: AttachOptions): void;
|
|
254
|
+
declare function attachBanner(adGroupId: string, target: string | HTMLElement, options?: AttachBannerOptions): AttachBannerResult;
|
|
255
|
+
declare function destroy(slotId: string): void;
|
|
256
|
+
declare function destroyAll(): void;
|
|
257
|
+
declare const TossAds: {
|
|
258
|
+
initialize: typeof initialize & {
|
|
259
|
+
isSupported: () => boolean;
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* @deprecated attach는 더 이상 권장되지 않습니다. attachBanner를 사용해주세요.
|
|
263
|
+
*/
|
|
264
|
+
attach: typeof attach & {
|
|
265
|
+
isSupported: () => boolean;
|
|
266
|
+
};
|
|
267
|
+
attachBanner: typeof attachBanner & {
|
|
268
|
+
isSupported: () => boolean;
|
|
269
|
+
};
|
|
270
|
+
destroy: typeof destroy & {
|
|
271
|
+
isSupported: () => boolean;
|
|
272
|
+
};
|
|
273
|
+
destroyAll: typeof destroyAll & {
|
|
274
|
+
isSupported: () => boolean;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
declare function getAnonymousKey(): Promise<GetAnonymousKeyResponse>;
|
|
279
|
+
|
|
280
|
+
declare function appLogin(): Promise<AppLoginResponse>;
|
|
281
|
+
|
|
282
|
+
declare function appsInTossSignTossCert(params: AppsInTossSignTossCertParams): Promise<void>;
|
|
283
|
+
|
|
284
|
+
type CheckoutPaymentOptions = CheckoutPaymentParams;
|
|
285
|
+
|
|
286
|
+
declare function checkoutPayment(options: {
|
|
287
|
+
params: CheckoutPaymentOptions;
|
|
288
|
+
}): Promise<CheckoutPaymentResult>;
|
|
289
|
+
|
|
290
|
+
declare const getClipboardText: PermissionFunctionWithDialog<() => Promise<string>>;
|
|
291
|
+
|
|
292
|
+
declare const setClipboardText: PermissionFunctionWithDialog<(text: string) => Promise<void>>;
|
|
293
|
+
|
|
294
|
+
declare function getDeviceId(): string;
|
|
295
|
+
|
|
296
|
+
declare function getGroupId(): string;
|
|
297
|
+
|
|
298
|
+
declare function getLocale(): string;
|
|
299
|
+
|
|
300
|
+
declare function getOperationalEnvironment(): "toss" | "sandbox";
|
|
301
|
+
|
|
302
|
+
declare function getPlatformOS(): "ios" | "android";
|
|
303
|
+
|
|
304
|
+
declare function getSchemeUri(): string;
|
|
305
|
+
|
|
306
|
+
declare function getTossAppVersion(): string;
|
|
307
|
+
|
|
308
|
+
type FetchContactsOptions = FetchContactsParams;
|
|
309
|
+
type ContactResult = FetchContactsResult;
|
|
310
|
+
type RewardFromContactsViralEvent = ContactsViralRewardEvent;
|
|
311
|
+
type ContactsViralSuccessEvent = ContactsViralCloseEvent;
|
|
312
|
+
interface ContactsViralParams {
|
|
313
|
+
options: ContactsViralParams$1;
|
|
314
|
+
onEvent: (event: ContactsViralEvent) => void;
|
|
315
|
+
onError: (error: unknown) => void;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
declare function contactsViral(params: ContactsViralParams): () => void;
|
|
319
|
+
|
|
320
|
+
declare const fetchContacts: PermissionFunctionWithDialog<(options: FetchContactsOptions) => Promise<_apps_in_toss_webview_bridge_spec.FetchContactsResult>>;
|
|
321
|
+
|
|
322
|
+
declare const env: {
|
|
323
|
+
getDeploymentId: () => string;
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
declare function getAppsInTossGlobals(): AppsInTossGlobals;
|
|
327
|
+
|
|
328
|
+
declare function isMinVersionSupported(minVersions: {
|
|
329
|
+
android: `${number}.${number}.${number}` | "always" | "never";
|
|
330
|
+
ios: `${number}.${number}.${number}` | "always" | "never";
|
|
331
|
+
}): boolean;
|
|
332
|
+
|
|
333
|
+
declare function eventLog(params: EventLogParams$1): Promise<void>;
|
|
334
|
+
|
|
335
|
+
type GraniteEvent = {
|
|
336
|
+
backEvent: {
|
|
337
|
+
onEvent: () => void;
|
|
338
|
+
onError?: (error: Error) => void;
|
|
339
|
+
options?: void;
|
|
340
|
+
};
|
|
341
|
+
homeEvent: {
|
|
342
|
+
onEvent: () => void;
|
|
343
|
+
onError?: (error: Error) => void;
|
|
344
|
+
options?: void;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
type AppsInTossEvent = {};
|
|
348
|
+
type TdsEvent = {
|
|
349
|
+
navigationAccessoryEvent: {
|
|
350
|
+
onEvent: (data: {
|
|
351
|
+
id: string;
|
|
352
|
+
}) => void;
|
|
353
|
+
onError?: (error: Error) => void;
|
|
354
|
+
options: undefined;
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
declare const appsInTossEvent: {
|
|
359
|
+
addEventListener: <K extends keyof AppsInTossEvent>(event: K, args: {
|
|
360
|
+
onEvent: AppsInTossEvent[K]["onEvent"];
|
|
361
|
+
onError?: AppsInTossEvent[K]["onError"];
|
|
362
|
+
options?: AppsInTossEvent[K]["options"];
|
|
363
|
+
}) => () => void;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
declare const graniteEvent: {
|
|
367
|
+
addEventListener: <K extends keyof GraniteEvent>(event: K, args: {
|
|
368
|
+
onEvent: GraniteEvent[K]["onEvent"];
|
|
369
|
+
onError?: GraniteEvent[K]["onError"];
|
|
370
|
+
options?: GraniteEvent[K]["options"];
|
|
371
|
+
}) => () => void;
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
declare const tdsEvent: {
|
|
375
|
+
addEventListener: <K extends keyof TdsEvent>(event: K, args: {
|
|
376
|
+
onEvent: TdsEvent[K]["onEvent"];
|
|
377
|
+
onError?: TdsEvent[K]["onError"];
|
|
378
|
+
options?: TdsEvent[K]["options"];
|
|
379
|
+
}) => () => void;
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
declare function getGameCenterGameProfile(): Promise<GameCenterGameProfileResponse | undefined>;
|
|
383
|
+
|
|
384
|
+
/** @deprecated getAnonymousKey를 사용하세요. */
|
|
385
|
+
declare const getUserKeyForGame: typeof getAnonymousKey;
|
|
386
|
+
|
|
387
|
+
declare function grantPromotionReward(params: GrantPromotionRewardParams): Promise<GrantPromotionRewardResponse>;
|
|
388
|
+
|
|
389
|
+
/** @deprecated grantPromotionReward를 사용하세요. */
|
|
390
|
+
declare const grantPromotionRewardForGame: typeof grantPromotionReward;
|
|
391
|
+
|
|
392
|
+
declare function openGameCenterLeaderboard(): Promise<void>;
|
|
393
|
+
|
|
394
|
+
declare function submitGameCenterLeaderBoardScore(params: {
|
|
395
|
+
score: string;
|
|
396
|
+
}): Promise<SubmitGameCenterLeaderBoardScoreResponse | undefined>;
|
|
397
|
+
|
|
398
|
+
type HapticFeedbackType = "tickWeak" | "tap" | "tickMedium" | "softMedium" | "basicWeak" | "basicMedium" | "success" | "error" | "wiggle" | "confetti";
|
|
399
|
+
interface HapticFeedbackOptions {
|
|
400
|
+
type: HapticFeedbackType;
|
|
401
|
+
}
|
|
402
|
+
declare function generateHapticFeedback(options: HapticFeedbackOptions): Promise<void>;
|
|
403
|
+
|
|
404
|
+
declare function getIsTossLoginIntegratedService(): Promise<boolean | undefined>;
|
|
405
|
+
|
|
406
|
+
type NetworkStatus = "OFFLINE" | "WIFI" | "2G" | "3G" | "4G" | "5G" | "WWAN" | "UNKNOWN";
|
|
407
|
+
declare function getNetworkStatus(): Promise<NetworkStatus>;
|
|
408
|
+
|
|
409
|
+
declare const getServerTime: (() => Promise<number | undefined>) & {
|
|
410
|
+
isSupported: () => boolean;
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
type IapCreateSubscriptionPurchaseOrderResult = IapCreateOneTimePurchaseOrderResult;
|
|
414
|
+
type IapSubscriptionInfoResponse = GetSubscriptionInfoResult;
|
|
415
|
+
interface IapCreateOneTimePurchaseOrderOptions {
|
|
416
|
+
options: {
|
|
417
|
+
sku: string;
|
|
418
|
+
productId?: string;
|
|
419
|
+
processProductGrant: (params: {
|
|
420
|
+
orderId: string;
|
|
421
|
+
}) => boolean | Promise<boolean>;
|
|
422
|
+
};
|
|
423
|
+
onEvent: (event: {
|
|
424
|
+
type: "success";
|
|
425
|
+
data: IapCreateOneTimePurchaseOrderResult;
|
|
426
|
+
}) => void | Promise<void>;
|
|
427
|
+
onError: (error: unknown) => void | Promise<void>;
|
|
428
|
+
}
|
|
429
|
+
interface CreateSubscriptionPurchaseOrderOptions {
|
|
430
|
+
options: {
|
|
431
|
+
sku: string;
|
|
432
|
+
offerId?: string | null;
|
|
433
|
+
processProductGrant: (params: {
|
|
434
|
+
orderId: string;
|
|
435
|
+
subscriptionId?: string;
|
|
436
|
+
}) => boolean | Promise<boolean>;
|
|
437
|
+
};
|
|
438
|
+
onEvent: (event: {
|
|
439
|
+
type: "success";
|
|
440
|
+
data: IapCreateSubscriptionPurchaseOrderResult;
|
|
441
|
+
}) => void | Promise<void>;
|
|
442
|
+
onError: (error: unknown) => void | Promise<void>;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
declare const IAP: {
|
|
446
|
+
createOneTimePurchaseOrder: (params: IapCreateOneTimePurchaseOrderOptions) => (() => void);
|
|
447
|
+
createSubscriptionPurchaseOrder: (params: CreateSubscriptionPurchaseOrderOptions) => (() => void);
|
|
448
|
+
getProductItemList: () => Promise<_apps_in_toss_webview_bridge_spec.IapGetProductItemListResult>;
|
|
449
|
+
getPendingOrders: () => Promise<_apps_in_toss_webview_bridge_spec.GetPendingOrdersResult>;
|
|
450
|
+
getCompletedOrRefundedOrders: () => Promise<_apps_in_toss_webview_bridge_spec.CompletedOrRefundedOrdersResult>;
|
|
451
|
+
completeProductGrant: (args: {
|
|
452
|
+
params: {
|
|
453
|
+
orderId: string;
|
|
454
|
+
};
|
|
455
|
+
}) => Promise<boolean>;
|
|
456
|
+
getSubscriptionInfo: (args: {
|
|
457
|
+
params: {
|
|
458
|
+
orderId: string;
|
|
459
|
+
};
|
|
460
|
+
}) => Promise<_apps_in_toss_webview_bridge_spec.GetSubscriptionInfoResult>;
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
declare enum Accuracy {
|
|
464
|
+
Lowest = 1,
|
|
465
|
+
Low = 2,
|
|
466
|
+
Balanced = 3,
|
|
467
|
+
High = 4,
|
|
468
|
+
Highest = 5,
|
|
469
|
+
BestForNavigation = 6
|
|
470
|
+
}
|
|
471
|
+
interface GetCurrentLocationOptions {
|
|
472
|
+
accuracy: Accuracy;
|
|
473
|
+
}
|
|
474
|
+
interface StartUpdateLocationOptions {
|
|
475
|
+
accuracy: Accuracy;
|
|
476
|
+
timeInterval: number;
|
|
477
|
+
distanceInterval: number;
|
|
478
|
+
}
|
|
479
|
+
type StartUpdateLocationEventParams = {
|
|
480
|
+
onEvent: (response: Location) => void;
|
|
481
|
+
onError: (error: unknown) => void;
|
|
482
|
+
options: StartUpdateLocationOptions;
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
declare const getCurrentLocation: PermissionFunctionWithDialog<(options: GetCurrentLocationOptions) => Promise<_apps_in_toss_webview_bridge_spec.Location>>;
|
|
486
|
+
|
|
487
|
+
declare const startUpdateLocation: {
|
|
488
|
+
(eventParams: StartUpdateLocationEventParams): (() => void);
|
|
489
|
+
getPermission(): Promise<_apps_in_toss_webview_bridge_spec.PermissionStatus>;
|
|
490
|
+
openPermissionDialog(): Promise<_apps_in_toss_webview_bridge_spec.PermissionDialogResult>;
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
type FetchAlbumPhotosOptions = FetchAlbumPhotosParams;
|
|
494
|
+
type OpenCameraOptions = OpenCameraParams;
|
|
495
|
+
|
|
496
|
+
declare const fetchAlbumPhotos: PermissionFunctionWithDialog<(options?: FetchAlbumPhotosOptions) => Promise<_apps_in_toss_webview_bridge_spec.ImageResponse[]>>;
|
|
497
|
+
|
|
498
|
+
declare const openCamera: PermissionFunctionWithDialog<(options?: OpenCameraOptions) => Promise<_apps_in_toss_webview_bridge_spec.ImageResponse>>;
|
|
499
|
+
|
|
500
|
+
declare function openURL(url: string): Promise<any>;
|
|
501
|
+
|
|
502
|
+
declare const partner: {
|
|
503
|
+
addAccessoryButton: (params: AddAccessoryButtonParams) => Promise<void>;
|
|
504
|
+
removeAccessoryButton: () => Promise<void>;
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
type PermissionFunctionName = "getClipboardText" | "setClipboardText" | "fetchContacts" | "fetchAlbumPhotos" | "getCurrentLocation" | "openCamera";
|
|
508
|
+
interface PermissionErrorConstructorParams {
|
|
509
|
+
methodName: PermissionFunctionName;
|
|
510
|
+
message: string;
|
|
511
|
+
}
|
|
512
|
+
interface PermissionErrorType extends Error {
|
|
513
|
+
name: string;
|
|
514
|
+
message: string;
|
|
515
|
+
}
|
|
516
|
+
type PermissionDialogFunction = () => Promise<Exclude<PermissionStatus, "notDetermined">>;
|
|
517
|
+
type GetPermissionFunction = () => Promise<PermissionStatus>;
|
|
518
|
+
type PermissionFunctionWithDialog<T extends (...args: any[]) => any> = T & {
|
|
519
|
+
getPermission: GetPermissionFunction;
|
|
520
|
+
openPermissionDialog: PermissionDialogFunction;
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* 권한 에러를 나타내는 클래스예요. 공통된 권한에러를 처리할 때 사용해요.
|
|
525
|
+
* 에러가 발생했을 때 `error instanceof PermissionError`를 통해 확인할 수 있어요.
|
|
526
|
+
*/
|
|
527
|
+
declare class PermissionError extends Error {
|
|
528
|
+
constructor({ methodName, message }: PermissionErrorConstructorParams);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* 사진첩 권한이 거부되었을 때 발생하는 에러예요.
|
|
533
|
+
* 에러가 발생했을 때 `error instanceof FetchAlbumPhotosPermissionError`를 통해 확인할 수 있어요.
|
|
534
|
+
*/
|
|
535
|
+
declare class FetchAlbumPhotosPermissionError extends PermissionError {
|
|
536
|
+
constructor();
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* 연락처 권한이 거부되었을 때 발생하는 에러예요.
|
|
541
|
+
* 에러가 발생했을 때 `error instanceof FetchContactsPermissionError`를 통해 확인할 수 있어요.
|
|
542
|
+
*/
|
|
543
|
+
declare class FetchContactsPermissionError extends PermissionError {
|
|
544
|
+
constructor();
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* 클립보드 읽기 권한이 거부되었을 때 발생하는 에러예요.
|
|
549
|
+
* 에러가 발생했을 때 `error instanceof GetClipboardTextPermissionError`를 통해 확인할 수 있어요.
|
|
550
|
+
*/
|
|
551
|
+
declare class GetClipboardTextPermissionError extends PermissionError {
|
|
552
|
+
constructor();
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* 위치 권한이 거부되었을 때 발생하는 에러예요.
|
|
557
|
+
* 에러가 발생했을 때 `error instanceof GetCurrentLocationPermissionError`를 통해 확인할 수 있어요.
|
|
558
|
+
*/
|
|
559
|
+
declare class GetCurrentLocationPermissionError extends PermissionError {
|
|
560
|
+
constructor();
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* 카메라 권한이 거부되었을 때 발생하는 에러예요.
|
|
565
|
+
* 에러가 발생했을 때 `error instanceof OpenCameraPermissionError`를 통해 확인할 수 있어요.
|
|
566
|
+
*/
|
|
567
|
+
declare class OpenCameraPermissionError extends PermissionError {
|
|
568
|
+
constructor();
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* 클립보드 쓰기 권한이 거부되었을 때 발생하는 에러예요.
|
|
573
|
+
* 에러가 발생했을 때 `error instanceof SetClipboardTextPermissionError`를 통해 확인할 수 있어요.
|
|
574
|
+
*/
|
|
575
|
+
declare class SetClipboardTextPermissionError extends PermissionError {
|
|
576
|
+
constructor();
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* 위치 업데이트 권한이 거부되었을 때 발생하는 에러예요.
|
|
581
|
+
* `GetCurrentLocationPermissionError`와 동일하며,
|
|
582
|
+
* `error instanceof StartUpdateLocationPermissionError`로 확인할 수 있어요.
|
|
583
|
+
*/
|
|
584
|
+
declare const StartUpdateLocationPermissionError: typeof GetCurrentLocationPermissionError;
|
|
585
|
+
|
|
586
|
+
declare function getPermission(permission: {
|
|
587
|
+
name: PermissionName;
|
|
588
|
+
access: PermissionAccess;
|
|
589
|
+
}): Promise<PermissionStatus>;
|
|
590
|
+
|
|
591
|
+
declare function openPermissionDialog(permission: {
|
|
592
|
+
name: PermissionName;
|
|
593
|
+
access: PermissionAccess;
|
|
594
|
+
}): Promise<Exclude<PermissionStatus, "notDetermined">>;
|
|
595
|
+
|
|
596
|
+
declare function requestPermission(permission: {
|
|
597
|
+
name: PermissionName;
|
|
598
|
+
access: PermissionAccess;
|
|
599
|
+
}): Promise<Exclude<PermissionStatus, "notDetermined">>;
|
|
600
|
+
|
|
601
|
+
declare const requestReview: (() => Promise<void>) & {
|
|
602
|
+
isSupported: () => boolean;
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
/** @deprecated SafeAreaInsets.get()를 사용하세요. */
|
|
606
|
+
declare function getSafeAreaInsets(): number;
|
|
607
|
+
|
|
608
|
+
type SafeAreaInsets = SafeAreaInsets$2;
|
|
609
|
+
declare const SafeAreaInsets: {
|
|
610
|
+
get: () => SafeAreaInsets;
|
|
611
|
+
subscribe: (args: {
|
|
612
|
+
onEvent: (data: SafeAreaInsets) => void;
|
|
613
|
+
}) => () => void;
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
declare function saveBase64Data(params: SaveBase64DataParams): Promise<void>;
|
|
617
|
+
|
|
618
|
+
declare function getTossShareLink(url: string, ogImageUrl?: string): Promise<string>;
|
|
619
|
+
|
|
620
|
+
declare function share(message: {
|
|
621
|
+
message: string;
|
|
622
|
+
}): Promise<void>;
|
|
623
|
+
|
|
624
|
+
declare const Storage: {
|
|
625
|
+
getItem: (key: string) => Promise<string | null>;
|
|
626
|
+
setItem: (key: string, value: string) => Promise<void>;
|
|
627
|
+
removeItem: (key: string) => Promise<void>;
|
|
628
|
+
clearItems: () => Promise<void>;
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
declare function closeView(): Promise<void>;
|
|
632
|
+
|
|
633
|
+
declare function setDeviceOrientation(options: {
|
|
634
|
+
type: DeviceOrientation;
|
|
635
|
+
}): Promise<void>;
|
|
636
|
+
|
|
637
|
+
declare function setIosSwipeGestureEnabled(options: {
|
|
638
|
+
isEnabled: boolean;
|
|
639
|
+
}): Promise<void>;
|
|
640
|
+
|
|
641
|
+
declare function setScreenAwakeMode(options: {
|
|
642
|
+
enabled: boolean;
|
|
643
|
+
}): Promise<{
|
|
644
|
+
enabled: boolean;
|
|
645
|
+
}>;
|
|
646
|
+
|
|
647
|
+
declare function setSecureScreen(options: {
|
|
648
|
+
enabled: boolean;
|
|
649
|
+
}): Promise<{
|
|
650
|
+
enabled: boolean;
|
|
651
|
+
}>;
|
|
652
|
+
|
|
653
|
+
declare const openPDFViewer: ((params: OpenPDFViewerParams) => Promise<OpenPDFViewerResult>) & {
|
|
654
|
+
isSupported: () => boolean;
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
declare const fetchAlbumItems: ((options?: FetchAlbumItemsOptions) => Promise<AlbumItemResponse[]>) & {
|
|
658
|
+
isSupported: () => boolean;
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
type RequestTossPayPaysBillingOptions = RequestTossPayPaysBillingParams;
|
|
662
|
+
declare const requestTossPayPaysBilling: ((options: {
|
|
663
|
+
params: RequestTossPayPaysBillingOptions;
|
|
664
|
+
}) => Promise<RequestTossPayPaysBillingResult | undefined>) & {
|
|
665
|
+
isSupported: () => boolean;
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
interface RequestNotificationAgreementOptions {
|
|
669
|
+
options: RequestNotificationAgreementParams;
|
|
670
|
+
onEvent: (result: {
|
|
671
|
+
type: NotificationAgreementResult;
|
|
672
|
+
}) => void;
|
|
673
|
+
onError: (error: unknown) => void | Promise<void>;
|
|
674
|
+
}
|
|
675
|
+
declare const requestNotificationAgreement: ((params: RequestNotificationAgreementOptions) => () => void) & {
|
|
676
|
+
isSupported: () => boolean;
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* @deprecated v2 호환용 타입. v3에서는 `GetAnonymousKeyResponse`를 사용하세요.
|
|
681
|
+
*/
|
|
682
|
+
type GetAnonymousKeySuccessResponse = GetAnonymousKeyResponse;
|
|
683
|
+
/**
|
|
684
|
+
* @deprecated v2 호환용 타입. `getAnonymousKey`를 사용하세요.
|
|
685
|
+
*/
|
|
686
|
+
type GetUserKeyForGameSuccessResponse = GetAnonymousKeyResponse;
|
|
687
|
+
/**
|
|
688
|
+
* @deprecated v2 호환용 타입. `getAnonymousKey`를 사용하세요.
|
|
689
|
+
*/
|
|
690
|
+
type GetUserKeyForGameErrorResponse = {
|
|
691
|
+
type: "NOT_AVAILABLE";
|
|
692
|
+
};
|
|
693
|
+
/**
|
|
694
|
+
* @deprecated v2 호환용 타입. `getAnonymousKey`를 사용하세요.
|
|
695
|
+
*/
|
|
696
|
+
type GetUserKeyForGameResponse = GetAnonymousKeyResponse | GetUserKeyForGameErrorResponse;
|
|
697
|
+
/**
|
|
698
|
+
* @deprecated v2 호환용 타입. `GrantPromotionRewardResponse`를 사용하세요.
|
|
699
|
+
*/
|
|
700
|
+
type GrantPromotionRewardSuccessResponse = GrantPromotionRewardResponse;
|
|
701
|
+
/**
|
|
702
|
+
* @deprecated v2 호환용 타입.
|
|
703
|
+
*/
|
|
704
|
+
interface GrantPromotionRewardErrorResponse {
|
|
705
|
+
code: string;
|
|
706
|
+
[key: string]: any;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* @deprecated v2 호환용 타입.
|
|
710
|
+
*/
|
|
711
|
+
interface GrantPromotionRewardErrorResult {
|
|
712
|
+
errorCode: string;
|
|
713
|
+
message: string;
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* @deprecated v2 호환용 타입. `grantPromotionReward`를 사용하세요.
|
|
717
|
+
*/
|
|
718
|
+
type GrantPromotionRewardForGameSuccessResponse = GrantPromotionRewardResponse;
|
|
719
|
+
/**
|
|
720
|
+
* @deprecated v2 호환용 타입. `grantPromotionReward`를 사용하세요.
|
|
721
|
+
*/
|
|
722
|
+
type GrantPromotionRewardForGameErrorResponse = GrantPromotionRewardErrorResponse;
|
|
723
|
+
/**
|
|
724
|
+
* @deprecated v2 호환용 타입. `grantPromotionReward`를 사용하세요.
|
|
725
|
+
*/
|
|
726
|
+
type GrantPromotionRewardForGameErrorResult = GrantPromotionRewardErrorResult;
|
|
727
|
+
/**
|
|
728
|
+
* @deprecated v2 호환용 타입. `grantPromotionReward`를 사용하세요.
|
|
729
|
+
*/
|
|
730
|
+
type GrantPromotionRewardForGameResponse = GrantPromotionRewardForGameSuccessResponse | GrantPromotionRewardForGameErrorResponse;
|
|
731
|
+
/**
|
|
732
|
+
* @deprecated v2 호환용 타입.
|
|
733
|
+
*/
|
|
734
|
+
type GrantPromotionRewardResult = GrantPromotionRewardResponse | GrantPromotionRewardErrorResult | "ERROR" | undefined;
|
|
735
|
+
/**
|
|
736
|
+
* @deprecated v2 호환용 타입.
|
|
737
|
+
*/
|
|
738
|
+
interface AdNetworkResponseInfo {
|
|
739
|
+
adSourceId: string;
|
|
740
|
+
adSourceName: string;
|
|
741
|
+
adSourceInstanceId: string;
|
|
742
|
+
adSourceInstanceName: string;
|
|
743
|
+
adNetworkClassName: string | null;
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* @deprecated v2 호환용 타입.
|
|
747
|
+
*/
|
|
748
|
+
interface ResponseInfo {
|
|
749
|
+
adNetworkInfoArray: Array<AdNetworkResponseInfo>;
|
|
750
|
+
loadedAdNetworkInfo: AdNetworkResponseInfo | null;
|
|
751
|
+
responseId: string | null;
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* @deprecated v2 호환용 타입. v3의 `LoadAdMobResult`를 사용하세요.
|
|
755
|
+
*/
|
|
756
|
+
interface AdMobLoadResult {
|
|
757
|
+
adGroupId: string;
|
|
758
|
+
adUnitId: string;
|
|
759
|
+
responseInfo: ResponseInfo;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* @deprecated v2 호환용 타입.
|
|
763
|
+
*/
|
|
764
|
+
type AdUserEarnedReward = {
|
|
765
|
+
type: "userEarnedReward";
|
|
766
|
+
data: {
|
|
767
|
+
unitType: string;
|
|
768
|
+
unitAmount: number;
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
/**
|
|
772
|
+
* @deprecated v2 호환용 타입.
|
|
773
|
+
*/
|
|
774
|
+
type AdMobFullScreenEvent = {
|
|
775
|
+
type: "clicked";
|
|
776
|
+
} | {
|
|
777
|
+
type: "dismissed";
|
|
778
|
+
} | {
|
|
779
|
+
type: "failedToShow";
|
|
780
|
+
} | {
|
|
781
|
+
type: "impression";
|
|
782
|
+
} | {
|
|
783
|
+
type: "show";
|
|
784
|
+
};
|
|
785
|
+
/**
|
|
786
|
+
* @deprecated v2 호환용 타입.
|
|
787
|
+
*/
|
|
788
|
+
interface AdMobHandlerParams<Options = void, Event = AdMobFullScreenEvent> {
|
|
789
|
+
options: Options;
|
|
790
|
+
onEvent: (event: Event) => void;
|
|
791
|
+
onError: (error: unknown) => void;
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* @deprecated v2 호환용 타입.
|
|
795
|
+
*/
|
|
796
|
+
interface InterstitialAd {
|
|
797
|
+
adUnitId: string;
|
|
798
|
+
responseInfo: ResponseInfo;
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* @deprecated v2 호환용 타입.
|
|
802
|
+
*/
|
|
803
|
+
interface RewardedAd {
|
|
804
|
+
adUnitId: string;
|
|
805
|
+
responseInfo: ResponseInfo;
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* @deprecated v2 호환용 타입.
|
|
809
|
+
*/
|
|
810
|
+
type LoadAdMobParams = AdMobHandlerParams<LoadAdMobOptions, LoadAdMobEvent>;
|
|
811
|
+
/**
|
|
812
|
+
* @deprecated v2 호환용 타입.
|
|
813
|
+
*/
|
|
814
|
+
type ShowAdMobParams = AdMobHandlerParams<ShowAdMobOptions, ShowAdMobEvent>;
|
|
815
|
+
/**
|
|
816
|
+
* @deprecated v2 호환용 타입.
|
|
817
|
+
*/
|
|
818
|
+
interface LoadFullScreenAdParams {
|
|
819
|
+
options: LoadFullScreenAdOptions;
|
|
820
|
+
onEvent: (data: LoadFullScreenAdEvent) => void;
|
|
821
|
+
onError: (err: unknown) => void;
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* @deprecated v2 호환용 타입.
|
|
825
|
+
*/
|
|
826
|
+
interface ShowFullScreenAdParams {
|
|
827
|
+
options: ShowFullScreenAdOptions;
|
|
828
|
+
onEvent: (data: ShowFullScreenAdEvent) => void;
|
|
829
|
+
onError: (err: unknown) => void;
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* @deprecated v2 호환용 타입.
|
|
833
|
+
*/
|
|
834
|
+
type GetClipboardText = () => Promise<string>;
|
|
835
|
+
/**
|
|
836
|
+
* @deprecated v2 호환용 타입.
|
|
837
|
+
*/
|
|
838
|
+
type SetClipboardText = (text: string) => Promise<void>;
|
|
839
|
+
/**
|
|
840
|
+
* @deprecated v2 호환용 타입.
|
|
841
|
+
*/
|
|
842
|
+
interface SetClipboardTextOptions {
|
|
843
|
+
text: string;
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* @deprecated v2 호환용 타입.
|
|
847
|
+
*/
|
|
848
|
+
type FetchContacts = (options: FetchContactsOptions) => Promise<ContactResult>;
|
|
849
|
+
/**
|
|
850
|
+
* @deprecated v2 호환용 타입.
|
|
851
|
+
*/
|
|
852
|
+
type FetchAlbumPhotos = (options?: FetchAlbumPhotosOptions) => Promise<ImageResponse[]>;
|
|
853
|
+
/**
|
|
854
|
+
* @deprecated v2 호환용 타입.
|
|
855
|
+
*/
|
|
856
|
+
type OpenCamera = (options?: OpenCameraOptions) => Promise<ImageResponse>;
|
|
857
|
+
/**
|
|
858
|
+
* @deprecated v2 호환용 타입.
|
|
859
|
+
*/
|
|
860
|
+
type GetCurrentLocation = (options: GetCurrentLocationOptions) => Promise<Location>;
|
|
861
|
+
/**
|
|
862
|
+
* @deprecated v2 호환용 타입.
|
|
863
|
+
*/
|
|
864
|
+
type StartUpdateLocation = (eventParams: StartUpdateLocationEventParams) => () => void;
|
|
865
|
+
/**
|
|
866
|
+
* @deprecated v2 호환용 타입.
|
|
867
|
+
*/
|
|
868
|
+
interface EventEmitterSchema<K extends string, P extends unknown[]> {
|
|
869
|
+
name: K;
|
|
870
|
+
params: P;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* @deprecated v2 호환용 타입.
|
|
874
|
+
*/
|
|
875
|
+
type UpdateLocationEventEmitter = EventEmitterSchema<"updateLocation", [
|
|
876
|
+
Location
|
|
877
|
+
]>;
|
|
878
|
+
/**
|
|
879
|
+
* @deprecated v2 호환용 타입. spec의 `AddAccessoryButtonParams`를 사용하세요.
|
|
880
|
+
*/
|
|
881
|
+
type AddAccessoryButtonOptions = AddAccessoryButtonParams;
|
|
882
|
+
/**
|
|
883
|
+
* @deprecated v2 호환용 타입.
|
|
884
|
+
*/
|
|
885
|
+
type Primitive = string | number | boolean | null | undefined | symbol;
|
|
886
|
+
/**
|
|
887
|
+
* @deprecated v2 호환용 타입. v3에서는 spec의 `EventLogParams`를 사용하세요.
|
|
888
|
+
*/
|
|
889
|
+
interface EventLogParams {
|
|
890
|
+
log_name: string;
|
|
891
|
+
log_type: "debug" | "info" | "warn" | "error" | "event" | "screen" | "impression" | "click" | "popup";
|
|
892
|
+
params: Record<string, Primitive>;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
type LoggerParams = {
|
|
896
|
+
log_name?: string;
|
|
897
|
+
} & {
|
|
898
|
+
[key: string]: LogParam;
|
|
899
|
+
};
|
|
900
|
+
declare const Analytics: {
|
|
901
|
+
screen: (params?: LoggerParams) => Promise<void> | undefined;
|
|
902
|
+
impression: (params?: LoggerParams) => Promise<void> | undefined;
|
|
903
|
+
click: (params?: LoggerParams) => Promise<void> | undefined;
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
export { Accuracy, type AdMobFullScreenEvent, type AdMobHandlerParams, type AdMobLoadResult, type AdNetworkResponseInfo, type AdUserEarnedReward, type AddAccessoryButtonOptions, Analytics, type AppsInTossEvent, type CheckoutPaymentOptions, type ContactResult, type ContactsViralParams, type ContactsViralSuccessEvent, type CreateSubscriptionPurchaseOrderOptions, type EventEmitterSchema, type EventLogParams, type FetchAlbumPhotos, type FetchAlbumPhotosOptions, FetchAlbumPhotosPermissionError, type FetchContacts, type FetchContactsOptions, FetchContactsPermissionError, type GetAnonymousKeySuccessResponse, type GetClipboardText, GetClipboardTextPermissionError, type GetCurrentLocation, type GetCurrentLocationOptions, GetCurrentLocationPermissionError, type GetPermissionFunction, type GetUserKeyForGameErrorResponse, type GetUserKeyForGameResponse, type GetUserKeyForGameSuccessResponse, GoogleAdMob, type GraniteEvent, type GrantPromotionRewardErrorResponse, type GrantPromotionRewardErrorResult, type GrantPromotionRewardForGameErrorResponse, type GrantPromotionRewardForGameErrorResult, type GrantPromotionRewardForGameResponse, type GrantPromotionRewardForGameSuccessResponse, type GrantPromotionRewardResult, type GrantPromotionRewardSuccessResponse, type HapticFeedbackOptions, type HapticFeedbackType, IAP, type IapCreateOneTimePurchaseOrderOptions, type IapSubscriptionInfoResponse, type InterstitialAd, type IsAdMobLoadedOptions, type LoadAdMobEvent, type LoadAdMobOptions, type LoadAdMobParams, type LoadAdMobResult, type LoadFullScreenAdParams, type LoadTossAdOrAdmobOptions, type NetworkStatus, type OpenCamera, type OpenCameraOptions, OpenCameraPermissionError, type PermissionDialogFunction, PermissionError, type PermissionErrorConstructorParams, type PermissionErrorType, type PermissionFunctionName, type PermissionFunctionWithDialog, type Primitive, type RequestNotificationAgreementOptions, type RequestTossPayPaysBillingOptions, type ResponseInfo, type RewardFromContactsViralEvent, type RewardedAd, SafeAreaInsets, type SetClipboardText, type SetClipboardTextOptions, SetClipboardTextPermissionError, type ShowAdMobEvent, type ShowAdMobOptions, type ShowAdMobParams, type ShowFullScreenAdParams, type ShowTossAdOrAdmobOptions, type StartUpdateLocation, type StartUpdateLocationEventParams, type StartUpdateLocationOptions, StartUpdateLocationPermissionError, Storage, type TdsEvent, type TossAdOrAdmobRewardData, TossAds, type AttachBannerOptions as TossAdsAttachBannerOptions, type AttachBannerResult as TossAdsAttachBannerResult, type AttachOptions as TossAdsAttachOptions, type BannerSlotCallbacks as TossAdsBannerSlotCallbacks, type BannerSlotErrorPayload as TossAdsBannerSlotErrorPayload, type BannerSlotEventPayload as TossAdsBannerSlotEventPayload, type InitializeOptions as TossAdsInitializeOptions, type UpdateLocationEventEmitter, appLogin, appsInTossEvent, appsInTossSignTossCert, checkoutPayment, closeView, contactsViral, env, eventLog, fetchAlbumItems, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getAnonymousKey, getAppsInTossGlobals, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getGroupId, getIsTossLoginIntegratedService, getLocale, getNetworkStatus, getOperationalEnvironment, getPermission, getPlatformOS, getSafeAreaInsets, getSchemeUri, getServerTime, getTossAppVersion, getTossShareLink, getUserKeyForGame, graniteEvent, grantPromotionReward, grantPromotionRewardForGame, isMinVersionSupported, loadFullScreenAd, openCamera, openGameCenterLeaderboard, openPDFViewer, openPermissionDialog, openURL, partner, requestNotificationAgreement, requestPermission, requestReview, requestTossPayPaysBilling, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, showFullScreenAd, startUpdateLocation, submitGameCenterLeaderBoardScore, tdsEvent };
|