@apps-in-toss/native-modules 1.0.2 → 1.0.3
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/index.cjs +42 -28
- package/dist/index.d.cts +30 -6
- package/dist/index.d.ts +30 -6
- package/dist/index.js +19 -6
- package/package.json +2 -2
- package/src/AppsInTossModule/native-event-emitter/appsInTossEvent.ts +2 -0
- package/src/AppsInTossModule/native-event-emitter/event-plugins/HomeIconButtonClickHandleEvent.ts +10 -0
- package/src/AppsInTossModule/native-event-emitter/index.ts +1 -0
- package/src/AppsInTossModule/native-modules/ads/googleAdMobV2.ts +3 -3
- package/src/AppsInTossModule/native-modules/ads/types.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -27,6 +27,7 @@ __export(index_exports, {
|
|
|
27
27
|
GoogleAdMob: () => GoogleAdMob,
|
|
28
28
|
IAP: () => IAP,
|
|
29
29
|
INTERNAL__AppsInTossModule: () => AppsInTossModuleInstance,
|
|
30
|
+
INTERNAL__appBridgeHandler: () => INTERNAL__appBridgeHandler,
|
|
30
31
|
INTERNAL__module: () => INTERNAL__module,
|
|
31
32
|
Storage: () => Storage,
|
|
32
33
|
TossPay: () => TossPay,
|
|
@@ -67,7 +68,7 @@ __export(index_exports, {
|
|
|
67
68
|
module.exports = __toCommonJS(index_exports);
|
|
68
69
|
|
|
69
70
|
// src/AppsInTossModule/native-event-emitter/appsInTossEvent.ts
|
|
70
|
-
var
|
|
71
|
+
var import_react_native8 = require("@granite-js/react-native");
|
|
71
72
|
|
|
72
73
|
// src/AppsInTossModule/native-event-emitter/event-plugins/EntryMessageExitedEvent.ts
|
|
73
74
|
var import_react_native = require("@granite-js/react-native");
|
|
@@ -80,12 +81,23 @@ var EntryMessageExitedEvent = class extends import_react_native.GraniteEventDefi
|
|
|
80
81
|
}
|
|
81
82
|
};
|
|
82
83
|
|
|
84
|
+
// src/AppsInTossModule/native-event-emitter/event-plugins/HomeIconButtonClickHandleEvent.ts
|
|
85
|
+
var import_react_native2 = require("@granite-js/react-native");
|
|
86
|
+
var HomeIconButtonClickHandleEvent = class extends import_react_native2.GraniteEventDefinition {
|
|
87
|
+
name = "homeIconButtonClickEvent";
|
|
88
|
+
remove() {
|
|
89
|
+
}
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
91
|
+
listener(_) {
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
83
95
|
// src/AppsInTossModule/native-event-emitter/event-plugins/UpdateLocationEvent.ts
|
|
84
|
-
var
|
|
96
|
+
var import_react_native5 = require("@granite-js/react-native");
|
|
85
97
|
|
|
86
98
|
// src/AppsInTossModule/native-modules/AppsInTossModule.ts
|
|
87
|
-
var
|
|
88
|
-
var Module =
|
|
99
|
+
var import_react_native3 = require("react-native");
|
|
100
|
+
var Module = import_react_native3.TurboModuleRegistry.getEnforcing("AppsInTossModule");
|
|
89
101
|
var AppsInTossModuleInstance = Module;
|
|
90
102
|
var AppsInTossModule = Module;
|
|
91
103
|
|
|
@@ -112,11 +124,11 @@ async function requestPermission(permission) {
|
|
|
112
124
|
}
|
|
113
125
|
|
|
114
126
|
// src/AppsInTossModule/native-event-emitter/nativeEventEmitter.ts
|
|
115
|
-
var
|
|
116
|
-
var nativeEventEmitter = new
|
|
127
|
+
var import_react_native4 = require("react-native");
|
|
128
|
+
var nativeEventEmitter = new import_react_native4.NativeEventEmitter(AppsInTossModuleInstance);
|
|
117
129
|
|
|
118
130
|
// src/AppsInTossModule/native-event-emitter/event-plugins/UpdateLocationEvent.ts
|
|
119
|
-
var UpdateLocationEvent = class extends
|
|
131
|
+
var UpdateLocationEvent = class extends import_react_native5.GraniteEventDefinition {
|
|
120
132
|
name = "updateLocationEvent";
|
|
121
133
|
subscriptionCount = 0;
|
|
122
134
|
ref = {
|
|
@@ -146,7 +158,7 @@ var UpdateLocationEvent = class extends import_react_native4.GraniteEventDefinit
|
|
|
146
158
|
};
|
|
147
159
|
|
|
148
160
|
// src/AppsInTossModule/native-event-emitter/internal/AppBridgeCallbackEvent.ts
|
|
149
|
-
var
|
|
161
|
+
var import_react_native6 = require("@granite-js/react-native");
|
|
150
162
|
|
|
151
163
|
// src/utils/generateUUID.ts
|
|
152
164
|
function generateUUID(placeholder) {
|
|
@@ -203,7 +215,7 @@ var INTERNAL__appBridgeHandler = {
|
|
|
203
215
|
|
|
204
216
|
// src/AppsInTossModule/native-event-emitter/internal/AppBridgeCallbackEvent.ts
|
|
205
217
|
var UNSAFE__nativeEventEmitter = nativeEventEmitter;
|
|
206
|
-
var AppBridgeCallbackEvent = class _AppBridgeCallbackEvent extends
|
|
218
|
+
var AppBridgeCallbackEvent = class _AppBridgeCallbackEvent extends import_react_native6.GraniteEventDefinition {
|
|
207
219
|
static INTERNAL__appBridgeSubscription;
|
|
208
220
|
name = "appBridgeCallbackEvent";
|
|
209
221
|
constructor() {
|
|
@@ -233,8 +245,8 @@ var AppBridgeCallbackEvent = class _AppBridgeCallbackEvent extends import_react_
|
|
|
233
245
|
};
|
|
234
246
|
|
|
235
247
|
// src/AppsInTossModule/native-event-emitter/internal/VisibilityChangedByTransparentServiceWebEvent.ts
|
|
236
|
-
var
|
|
237
|
-
var VisibilityChangedByTransparentServiceWebEvent = class extends
|
|
248
|
+
var import_react_native7 = require("@granite-js/react-native");
|
|
249
|
+
var VisibilityChangedByTransparentServiceWebEvent = class extends import_react_native7.GraniteEventDefinition {
|
|
238
250
|
name = "onVisibilityChangedByTransparentServiceWeb";
|
|
239
251
|
subscription = null;
|
|
240
252
|
remove() {
|
|
@@ -259,9 +271,10 @@ var VisibilityChangedByTransparentServiceWebEvent = class extends import_react_n
|
|
|
259
271
|
};
|
|
260
272
|
|
|
261
273
|
// src/AppsInTossModule/native-event-emitter/appsInTossEvent.ts
|
|
262
|
-
var appsInTossEvent = new
|
|
274
|
+
var appsInTossEvent = new import_react_native8.GraniteEvent([
|
|
263
275
|
new UpdateLocationEvent(),
|
|
264
276
|
new EntryMessageExitedEvent(),
|
|
277
|
+
new HomeIconButtonClickHandleEvent(),
|
|
265
278
|
// Internal events
|
|
266
279
|
new AppBridgeCallbackEvent(),
|
|
267
280
|
new VisibilityChangedByTransparentServiceWebEvent()
|
|
@@ -273,7 +286,7 @@ function startUpdateLocation(eventParams) {
|
|
|
273
286
|
}
|
|
274
287
|
|
|
275
288
|
// src/AppsInTossModule/native-modules/isMinVersionSupported.ts
|
|
276
|
-
var
|
|
289
|
+
var import_react_native9 = require("react-native");
|
|
277
290
|
|
|
278
291
|
// src/utils/compareVersion.ts
|
|
279
292
|
var SEMVER_REGEX = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\\-]+(?:\.[\da-z\\-]+)*))?(?:\+[\da-z\\-]+(?:\.[\da-z\\-]+)*)?)?)?$/i;
|
|
@@ -349,7 +362,7 @@ function isMinVersionSupported(minVersions) {
|
|
|
349
362
|
return true;
|
|
350
363
|
}
|
|
351
364
|
const currentVersion = AppsInTossModule.tossAppVersion;
|
|
352
|
-
const isIOS =
|
|
365
|
+
const isIOS = import_react_native9.Platform.OS === "ios";
|
|
353
366
|
const minVersion = isIOS ? minVersions.ios : minVersions.android;
|
|
354
367
|
if (minVersion === void 0) {
|
|
355
368
|
return false;
|
|
@@ -764,7 +777,7 @@ var Storage = {
|
|
|
764
777
|
};
|
|
765
778
|
|
|
766
779
|
// src/AppsInTossModule/native-modules/openGameCenterLeaderboard.ts
|
|
767
|
-
var
|
|
780
|
+
var import_react_native10 = require("@granite-js/react-native");
|
|
768
781
|
|
|
769
782
|
// src/AppsInTossModule/constants.ts
|
|
770
783
|
var GAME_CENTER_MIN_VERSION = {
|
|
@@ -784,7 +797,7 @@ async function openGameCenterLeaderboard() {
|
|
|
784
797
|
const url = new URL("servicetoss://game-center/leaderboard?_navbar=hide");
|
|
785
798
|
url.searchParams.set("appName", appName);
|
|
786
799
|
url.searchParams.set("referrer", `appsintoss.${appName}`);
|
|
787
|
-
return (0,
|
|
800
|
+
return (0, import_react_native10.openURL)(url.toString());
|
|
788
801
|
}
|
|
789
802
|
|
|
790
803
|
// src/AppsInTossModule/native-modules/getGameCenterGameProfile.ts
|
|
@@ -819,8 +832,8 @@ var GoogleAdMob = {
|
|
|
819
832
|
};
|
|
820
833
|
|
|
821
834
|
// src/BedrockModule/native-modules/natives/BedrockModule.ts
|
|
822
|
-
var
|
|
823
|
-
var BedrockModule =
|
|
835
|
+
var import_react_native11 = require("react-native");
|
|
836
|
+
var BedrockModule = import_react_native11.NativeModules.BedrockModule;
|
|
824
837
|
|
|
825
838
|
// src/BedrockModule/native-modules/natives/closeView.ts
|
|
826
839
|
async function closeView() {
|
|
@@ -828,10 +841,10 @@ async function closeView() {
|
|
|
828
841
|
}
|
|
829
842
|
|
|
830
843
|
// src/BedrockModule/native-modules/natives/getLocale.ts
|
|
831
|
-
var
|
|
844
|
+
var import_react_native12 = require("react-native");
|
|
832
845
|
function getLocale() {
|
|
833
846
|
const locale = BedrockModule?.DeviceInfo?.locale ?? "ko-KR";
|
|
834
|
-
if (
|
|
847
|
+
if (import_react_native12.Platform.OS === "android") {
|
|
835
848
|
return replaceUnderbarToHypen(locale);
|
|
836
849
|
}
|
|
837
850
|
return locale;
|
|
@@ -879,20 +892,20 @@ async function setIosSwipeGestureEnabled(options) {
|
|
|
879
892
|
}
|
|
880
893
|
|
|
881
894
|
// src/BedrockModule/native-modules/natives/openURL.ts
|
|
882
|
-
var
|
|
895
|
+
var import_react_native13 = require("react-native");
|
|
883
896
|
function openURL2(url) {
|
|
884
|
-
return
|
|
897
|
+
return import_react_native13.Linking.openURL(url);
|
|
885
898
|
}
|
|
886
899
|
|
|
887
900
|
// src/BedrockModule/native-modules/natives/getPlatformOS.ts
|
|
888
|
-
var
|
|
901
|
+
var import_react_native14 = require("react-native");
|
|
889
902
|
function getPlatformOS() {
|
|
890
|
-
return
|
|
903
|
+
return import_react_native14.Platform.OS;
|
|
891
904
|
}
|
|
892
905
|
|
|
893
906
|
// src/BedrockModule/native-modules/core/BedrockCoreModule.ts
|
|
894
|
-
var
|
|
895
|
-
var BedrockCoreModule =
|
|
907
|
+
var import_react_native15 = require("react-native");
|
|
908
|
+
var BedrockCoreModule = import_react_native15.NativeModules.BedrockCoreModule;
|
|
896
909
|
|
|
897
910
|
// src/types.ts
|
|
898
911
|
var Accuracy = /* @__PURE__ */ ((Accuracy2) => {
|
|
@@ -906,8 +919,8 @@ var Accuracy = /* @__PURE__ */ ((Accuracy2) => {
|
|
|
906
919
|
})(Accuracy || {});
|
|
907
920
|
|
|
908
921
|
// src/AppsInTossModule/native-modules/tossCore.ts
|
|
909
|
-
var
|
|
910
|
-
var TossCoreModule =
|
|
922
|
+
var import_react_native16 = require("react-native");
|
|
923
|
+
var TossCoreModule = import_react_native16.NativeModules.TossCoreModule;
|
|
911
924
|
function tossCoreEventLog(params) {
|
|
912
925
|
const supported = isMinVersionSupported({ ios: "5.210.0", android: "5.210.0" });
|
|
913
926
|
const isSandbox = getOperationalEnvironment() === "sandbox";
|
|
@@ -936,6 +949,7 @@ var INTERNAL__module = {
|
|
|
936
949
|
GoogleAdMob,
|
|
937
950
|
IAP,
|
|
938
951
|
INTERNAL__AppsInTossModule,
|
|
952
|
+
INTERNAL__appBridgeHandler,
|
|
939
953
|
INTERNAL__module,
|
|
940
954
|
Storage,
|
|
941
955
|
TossPay,
|
package/dist/index.d.cts
CHANGED
|
@@ -314,6 +314,12 @@ declare class EntryMessageExitedEvent extends GraniteEventDefinition<undefined,
|
|
|
314
314
|
listener(_: undefined): void;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
+
declare class HomeIconButtonClickHandleEvent extends GraniteEventDefinition<undefined, undefined> {
|
|
318
|
+
name: "homeIconButtonClickEvent";
|
|
319
|
+
remove(): void;
|
|
320
|
+
listener(_: undefined): void;
|
|
321
|
+
}
|
|
322
|
+
|
|
317
323
|
interface StartUpdateLocationOptions {
|
|
318
324
|
/**
|
|
319
325
|
* 위치 정확도를 설정해요.
|
|
@@ -363,7 +369,7 @@ declare class VisibilityChangedByTransparentServiceWebEvent extends GraniteEvent
|
|
|
363
369
|
private isVisibilityChangedByTransparentServiceWebResult;
|
|
364
370
|
}
|
|
365
371
|
|
|
366
|
-
declare const appsInTossEvent: GraniteEvent<EntryMessageExitedEvent | UpdateLocationEvent | AppBridgeCallbackEvent | VisibilityChangedByTransparentServiceWebEvent>;
|
|
372
|
+
declare const appsInTossEvent: GraniteEvent<EntryMessageExitedEvent | HomeIconButtonClickHandleEvent | UpdateLocationEvent | AppBridgeCallbackEvent | VisibilityChangedByTransparentServiceWebEvent>;
|
|
367
373
|
|
|
368
374
|
declare function onVisibilityChangedByTransparentServiceWeb(eventParams: {
|
|
369
375
|
options: {
|
|
@@ -373,6 +379,24 @@ declare function onVisibilityChangedByTransparentServiceWeb(eventParams: {
|
|
|
373
379
|
onError: (error: unknown) => void;
|
|
374
380
|
}): () => void;
|
|
375
381
|
|
|
382
|
+
interface AppBridgeCompatCallbacks<Result> {
|
|
383
|
+
onSuccess: (result: Result) => void;
|
|
384
|
+
onError: (reason: unknown) => void;
|
|
385
|
+
}
|
|
386
|
+
type AppBridgeCallback = (...args: any[]) => void;
|
|
387
|
+
declare function invokeAppBridgeCallback(id: string, ...args: any[]): boolean;
|
|
388
|
+
declare function invokeAppBridgeMethod<Result = any, Params = any>(methodName: string, params: Params, callbacks: AppBridgeCompatCallbacks<Result> & Record<string, AppBridgeCallback>): () => void;
|
|
389
|
+
declare function registerCallback(callback: AppBridgeCallback, name?: string): string;
|
|
390
|
+
declare function unregisterCallback(id: string): void;
|
|
391
|
+
declare function getCallbackIds(): string[];
|
|
392
|
+
declare const INTERNAL__appBridgeHandler: {
|
|
393
|
+
invokeAppBridgeCallback: typeof invokeAppBridgeCallback;
|
|
394
|
+
invokeAppBridgeMethod: typeof invokeAppBridgeMethod;
|
|
395
|
+
registerCallback: typeof registerCallback;
|
|
396
|
+
unregisterCallback: typeof unregisterCallback;
|
|
397
|
+
getCallbackIds: typeof getCallbackIds;
|
|
398
|
+
};
|
|
399
|
+
|
|
376
400
|
/**
|
|
377
401
|
* @public
|
|
378
402
|
* @category 광고
|
|
@@ -497,7 +521,7 @@ interface RewardedAd {
|
|
|
497
521
|
* @description 광고의 ID와 응답 정보를 담고 있는 객체예요. 광고를 로드한 뒤, 관련 정보를 확인할 때 유용해요.
|
|
498
522
|
* @property {string} adGroupId 광고 그룹 ID예요.
|
|
499
523
|
* @property {string} adUnitId 광고 ID예요.
|
|
500
|
-
* @property {ResponseInfo} responseInfo 광고 로드 응답 정보예요. 자세한 내용은 [ResponseInfo](/react-native/reference/
|
|
524
|
+
* @property {ResponseInfo} responseInfo 광고 로드 응답 정보예요. 자세한 내용은 [ResponseInfo](/react-native/reference/native-modules/광고/ResponseInfo.html)를 참고하세요.
|
|
501
525
|
*/
|
|
502
526
|
interface AdMobLoadResult {
|
|
503
527
|
adGroupId: string;
|
|
@@ -1064,7 +1088,7 @@ interface LoadAdMobOptions {
|
|
|
1064
1088
|
* @public
|
|
1065
1089
|
* @category 광고
|
|
1066
1090
|
* @name LoadAdMobEvent
|
|
1067
|
-
* @description 광고를 불러오는 함수에서 발생하는 이벤트 타입이에요. `loaded` 이벤트가 발생하면 광고를 성공적으로 불러온 거예요. 이때 [AdMobLoadResult](/react-native/reference/
|
|
1091
|
+
* @description 광고를 불러오는 함수에서 발생하는 이벤트 타입이에요. `loaded` 이벤트가 발생하면 광고를 성공적으로 불러온 거예요. 이때 [AdMobLoadResult](/react-native/reference/native-modules/광고/AdMobLoadResult.html) 객체가 함께 반환돼요.
|
|
1068
1092
|
*/
|
|
1069
1093
|
type LoadAdMobEvent = {
|
|
1070
1094
|
type: 'loaded';
|
|
@@ -1085,7 +1109,7 @@ type LoadAdMobParams = AdMobHandlerParams<LoadAdMobOptions, LoadAdMobEvent>;
|
|
|
1085
1109
|
* @param {LoadAdMobParams} params 광고를 불러올 때 사용할 설정 값이에요. 광고 그룹 ID와 광고의 동작에 대한 콜백을 설정할 수 있어요.
|
|
1086
1110
|
* @param {LoadAdMobOptions} params.options 광고를 불러올 때 전달할 옵션 객체예요.
|
|
1087
1111
|
* @param {string} params.options.adGroupId 광고 그룹 단위 ID예요. 콘솔에서 발급받은 ID를 입력해요.
|
|
1088
|
-
* @param {(event: LoadAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고가 닫히거나 클릭됐을 때). 자세한 이벤트 타입은 [LoadAdMobEvent](/react-native/reference/
|
|
1112
|
+
* @param {(event: LoadAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고가 닫히거나 클릭됐을 때). 자세한 이벤트 타입은 [LoadAdMobEvent](/react-native/reference/native-modules/광고/LoadAdMobEvent.html)를 참고하세요.
|
|
1089
1113
|
* @param {(reason: unknown) => void} [params.onError] 광고를 불러오지 못했을 때 호출돼요. (예시: 네트워크 오류나 지원하지 않는 환경일 때)
|
|
1090
1114
|
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
1091
1115
|
*
|
|
@@ -1227,7 +1251,7 @@ type ShowAdMobParams = AdMobHandlerParams<ShowAdMobOptions, ShowAdMobEvent>;
|
|
|
1227
1251
|
* @param {ShowAdMobParams} params 광고를 보여주기 위해 사용할 설정 값이에요. 광고 그룹 ID와과 광고의 동작에 대한 콜백을 설정할 수 있어요.
|
|
1228
1252
|
* @param {ShowAdMobOptions} params.options 광고를 보여줄 때 전달할 옵션 객체예요.
|
|
1229
1253
|
* @param {string} params.options.adUnitId 광고 그룹 단위 ID예요. `loadAppsInTossAdMob` 로 불러온 광고용 그룹 ID를 입력해요.
|
|
1230
|
-
* @param {(event: ShowAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고 노출을 요청했을 때). 자세한 이벤트 타입은 [ShowAdMobEvent](/react-native/reference/
|
|
1254
|
+
* @param {(event: ShowAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고 노출을 요청했을 때). 자세한 이벤트 타입은 [ShowAdMobEvent](/react-native/reference/native-modules/광고/ShowAdMobEvent.html)를 참고하세요.
|
|
1231
1255
|
* @param {(reason: unknown) => void} [params.onError] 광고를 노출하지 못했을 때 호출돼요. (예시: 네트워크 오류나 지원하지 않는 환경일 때)
|
|
1232
1256
|
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
1233
1257
|
*
|
|
@@ -3119,4 +3143,4 @@ declare const INTERNAL__module: {
|
|
|
3119
3143
|
tossCoreEventLog: typeof tossCoreEventLog;
|
|
3120
3144
|
};
|
|
3121
3145
|
|
|
3122
|
-
export { Accuracy, AppsInTossModule, BedrockCoreModule, BedrockModule, type CheckoutPaymentOptions, type CheckoutPaymentResult, type ContactEntity, type ContactResult, type ContactsViralParams, type EventLogParams, type FetchAlbumPhotosOptions, type GameCenterGameProfileResponse, type GetCurrentLocationOptions, GoogleAdMob, type HapticFeedbackType, IAP, AppsInTossModuleInstance as INTERNAL__AppsInTossModule, INTERNAL__module, type IapCreateOneTimePurchaseOrderOptions, type IapCreateOneTimePurchaseOrderResult, type IapProductListItem, type ImageResponse, type LoadAdMobEvent, type LoadAdMobInterstitialAdEvent, type LoadAdMobInterstitialAdOptions, type LoadAdMobOptions, type LoadAdMobParams, type LoadAdMobRewardedAdEvent, type LoadAdMobRewardedAdOptions, type Location, type LocationCoords, type NetworkStatus, type OpenCameraOptions, type PermissionAccess, type PermissionName, type PermissionStatus, type Primitive, type SaveBase64DataParams, type ShowAdMobEvent, type ShowAdMobInterstitialAdEvent, type ShowAdMobInterstitialAdOptions, type ShowAdMobOptions, type ShowAdMobParams, type ShowAdMobRewardedAdEvent, type ShowAdMobRewardedAdOptions, type StartUpdateLocationOptions$1 as StartUpdateLocationOptions, type StartUpdateLocationSubscription, Storage, type SubmitGameCenterLeaderBoardScoreResponse, TossPay, type UpdateLocationEventEmitter, appLogin, appsInTossEvent, closeView, contactsViral, eventLog, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getLocale, getNetworkStatus, getOperationalEnvironment, getPlatformOS, getSchemeUri, getTossAppVersion, getTossShareLink, isMinVersionSupported, onVisibilityChangedByTransparentServiceWeb, openCamera, openGameCenterLeaderboard, openURL, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, startUpdateLocation, submitGameCenterLeaderBoardScore };
|
|
3146
|
+
export { Accuracy, AppsInTossModule, BedrockCoreModule, BedrockModule, type CheckoutPaymentOptions, type CheckoutPaymentResult, type ContactEntity, type ContactResult, type ContactsViralParams, type EventLogParams, type FetchAlbumPhotosOptions, type GameCenterGameProfileResponse, type GetCurrentLocationOptions, GoogleAdMob, type HapticFeedbackType, IAP, AppsInTossModuleInstance as INTERNAL__AppsInTossModule, INTERNAL__appBridgeHandler, INTERNAL__module, type IapCreateOneTimePurchaseOrderOptions, type IapCreateOneTimePurchaseOrderResult, type IapProductListItem, type ImageResponse, type LoadAdMobEvent, type LoadAdMobInterstitialAdEvent, type LoadAdMobInterstitialAdOptions, type LoadAdMobOptions, type LoadAdMobParams, type LoadAdMobRewardedAdEvent, type LoadAdMobRewardedAdOptions, type Location, type LocationCoords, type NetworkStatus, type OpenCameraOptions, type PermissionAccess, type PermissionName, type PermissionStatus, type Primitive, type SaveBase64DataParams, type ShowAdMobEvent, type ShowAdMobInterstitialAdEvent, type ShowAdMobInterstitialAdOptions, type ShowAdMobOptions, type ShowAdMobParams, type ShowAdMobRewardedAdEvent, type ShowAdMobRewardedAdOptions, type StartUpdateLocationOptions$1 as StartUpdateLocationOptions, type StartUpdateLocationSubscription, Storage, type SubmitGameCenterLeaderBoardScoreResponse, TossPay, type UpdateLocationEventEmitter, appLogin, appsInTossEvent, closeView, contactsViral, eventLog, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getLocale, getNetworkStatus, getOperationalEnvironment, getPlatformOS, getSchemeUri, getTossAppVersion, getTossShareLink, isMinVersionSupported, onVisibilityChangedByTransparentServiceWeb, openCamera, openGameCenterLeaderboard, openURL, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, startUpdateLocation, submitGameCenterLeaderBoardScore };
|
package/dist/index.d.ts
CHANGED
|
@@ -314,6 +314,12 @@ declare class EntryMessageExitedEvent extends GraniteEventDefinition<undefined,
|
|
|
314
314
|
listener(_: undefined): void;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
+
declare class HomeIconButtonClickHandleEvent extends GraniteEventDefinition<undefined, undefined> {
|
|
318
|
+
name: "homeIconButtonClickEvent";
|
|
319
|
+
remove(): void;
|
|
320
|
+
listener(_: undefined): void;
|
|
321
|
+
}
|
|
322
|
+
|
|
317
323
|
interface StartUpdateLocationOptions {
|
|
318
324
|
/**
|
|
319
325
|
* 위치 정확도를 설정해요.
|
|
@@ -363,7 +369,7 @@ declare class VisibilityChangedByTransparentServiceWebEvent extends GraniteEvent
|
|
|
363
369
|
private isVisibilityChangedByTransparentServiceWebResult;
|
|
364
370
|
}
|
|
365
371
|
|
|
366
|
-
declare const appsInTossEvent: GraniteEvent<EntryMessageExitedEvent | UpdateLocationEvent | AppBridgeCallbackEvent | VisibilityChangedByTransparentServiceWebEvent>;
|
|
372
|
+
declare const appsInTossEvent: GraniteEvent<EntryMessageExitedEvent | HomeIconButtonClickHandleEvent | UpdateLocationEvent | AppBridgeCallbackEvent | VisibilityChangedByTransparentServiceWebEvent>;
|
|
367
373
|
|
|
368
374
|
declare function onVisibilityChangedByTransparentServiceWeb(eventParams: {
|
|
369
375
|
options: {
|
|
@@ -373,6 +379,24 @@ declare function onVisibilityChangedByTransparentServiceWeb(eventParams: {
|
|
|
373
379
|
onError: (error: unknown) => void;
|
|
374
380
|
}): () => void;
|
|
375
381
|
|
|
382
|
+
interface AppBridgeCompatCallbacks<Result> {
|
|
383
|
+
onSuccess: (result: Result) => void;
|
|
384
|
+
onError: (reason: unknown) => void;
|
|
385
|
+
}
|
|
386
|
+
type AppBridgeCallback = (...args: any[]) => void;
|
|
387
|
+
declare function invokeAppBridgeCallback(id: string, ...args: any[]): boolean;
|
|
388
|
+
declare function invokeAppBridgeMethod<Result = any, Params = any>(methodName: string, params: Params, callbacks: AppBridgeCompatCallbacks<Result> & Record<string, AppBridgeCallback>): () => void;
|
|
389
|
+
declare function registerCallback(callback: AppBridgeCallback, name?: string): string;
|
|
390
|
+
declare function unregisterCallback(id: string): void;
|
|
391
|
+
declare function getCallbackIds(): string[];
|
|
392
|
+
declare const INTERNAL__appBridgeHandler: {
|
|
393
|
+
invokeAppBridgeCallback: typeof invokeAppBridgeCallback;
|
|
394
|
+
invokeAppBridgeMethod: typeof invokeAppBridgeMethod;
|
|
395
|
+
registerCallback: typeof registerCallback;
|
|
396
|
+
unregisterCallback: typeof unregisterCallback;
|
|
397
|
+
getCallbackIds: typeof getCallbackIds;
|
|
398
|
+
};
|
|
399
|
+
|
|
376
400
|
/**
|
|
377
401
|
* @public
|
|
378
402
|
* @category 광고
|
|
@@ -497,7 +521,7 @@ interface RewardedAd {
|
|
|
497
521
|
* @description 광고의 ID와 응답 정보를 담고 있는 객체예요. 광고를 로드한 뒤, 관련 정보를 확인할 때 유용해요.
|
|
498
522
|
* @property {string} adGroupId 광고 그룹 ID예요.
|
|
499
523
|
* @property {string} adUnitId 광고 ID예요.
|
|
500
|
-
* @property {ResponseInfo} responseInfo 광고 로드 응답 정보예요. 자세한 내용은 [ResponseInfo](/react-native/reference/
|
|
524
|
+
* @property {ResponseInfo} responseInfo 광고 로드 응답 정보예요. 자세한 내용은 [ResponseInfo](/react-native/reference/native-modules/광고/ResponseInfo.html)를 참고하세요.
|
|
501
525
|
*/
|
|
502
526
|
interface AdMobLoadResult {
|
|
503
527
|
adGroupId: string;
|
|
@@ -1064,7 +1088,7 @@ interface LoadAdMobOptions {
|
|
|
1064
1088
|
* @public
|
|
1065
1089
|
* @category 광고
|
|
1066
1090
|
* @name LoadAdMobEvent
|
|
1067
|
-
* @description 광고를 불러오는 함수에서 발생하는 이벤트 타입이에요. `loaded` 이벤트가 발생하면 광고를 성공적으로 불러온 거예요. 이때 [AdMobLoadResult](/react-native/reference/
|
|
1091
|
+
* @description 광고를 불러오는 함수에서 발생하는 이벤트 타입이에요. `loaded` 이벤트가 발생하면 광고를 성공적으로 불러온 거예요. 이때 [AdMobLoadResult](/react-native/reference/native-modules/광고/AdMobLoadResult.html) 객체가 함께 반환돼요.
|
|
1068
1092
|
*/
|
|
1069
1093
|
type LoadAdMobEvent = {
|
|
1070
1094
|
type: 'loaded';
|
|
@@ -1085,7 +1109,7 @@ type LoadAdMobParams = AdMobHandlerParams<LoadAdMobOptions, LoadAdMobEvent>;
|
|
|
1085
1109
|
* @param {LoadAdMobParams} params 광고를 불러올 때 사용할 설정 값이에요. 광고 그룹 ID와 광고의 동작에 대한 콜백을 설정할 수 있어요.
|
|
1086
1110
|
* @param {LoadAdMobOptions} params.options 광고를 불러올 때 전달할 옵션 객체예요.
|
|
1087
1111
|
* @param {string} params.options.adGroupId 광고 그룹 단위 ID예요. 콘솔에서 발급받은 ID를 입력해요.
|
|
1088
|
-
* @param {(event: LoadAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고가 닫히거나 클릭됐을 때). 자세한 이벤트 타입은 [LoadAdMobEvent](/react-native/reference/
|
|
1112
|
+
* @param {(event: LoadAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고가 닫히거나 클릭됐을 때). 자세한 이벤트 타입은 [LoadAdMobEvent](/react-native/reference/native-modules/광고/LoadAdMobEvent.html)를 참고하세요.
|
|
1089
1113
|
* @param {(reason: unknown) => void} [params.onError] 광고를 불러오지 못했을 때 호출돼요. (예시: 네트워크 오류나 지원하지 않는 환경일 때)
|
|
1090
1114
|
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
1091
1115
|
*
|
|
@@ -1227,7 +1251,7 @@ type ShowAdMobParams = AdMobHandlerParams<ShowAdMobOptions, ShowAdMobEvent>;
|
|
|
1227
1251
|
* @param {ShowAdMobParams} params 광고를 보여주기 위해 사용할 설정 값이에요. 광고 그룹 ID와과 광고의 동작에 대한 콜백을 설정할 수 있어요.
|
|
1228
1252
|
* @param {ShowAdMobOptions} params.options 광고를 보여줄 때 전달할 옵션 객체예요.
|
|
1229
1253
|
* @param {string} params.options.adUnitId 광고 그룹 단위 ID예요. `loadAppsInTossAdMob` 로 불러온 광고용 그룹 ID를 입력해요.
|
|
1230
|
-
* @param {(event: ShowAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고 노출을 요청했을 때). 자세한 이벤트 타입은 [ShowAdMobEvent](/react-native/reference/
|
|
1254
|
+
* @param {(event: ShowAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고 노출을 요청했을 때). 자세한 이벤트 타입은 [ShowAdMobEvent](/react-native/reference/native-modules/광고/ShowAdMobEvent.html)를 참고하세요.
|
|
1231
1255
|
* @param {(reason: unknown) => void} [params.onError] 광고를 노출하지 못했을 때 호출돼요. (예시: 네트워크 오류나 지원하지 않는 환경일 때)
|
|
1232
1256
|
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
1233
1257
|
*
|
|
@@ -3119,4 +3143,4 @@ declare const INTERNAL__module: {
|
|
|
3119
3143
|
tossCoreEventLog: typeof tossCoreEventLog;
|
|
3120
3144
|
};
|
|
3121
3145
|
|
|
3122
|
-
export { Accuracy, AppsInTossModule, BedrockCoreModule, BedrockModule, type CheckoutPaymentOptions, type CheckoutPaymentResult, type ContactEntity, type ContactResult, type ContactsViralParams, type EventLogParams, type FetchAlbumPhotosOptions, type GameCenterGameProfileResponse, type GetCurrentLocationOptions, GoogleAdMob, type HapticFeedbackType, IAP, AppsInTossModuleInstance as INTERNAL__AppsInTossModule, INTERNAL__module, type IapCreateOneTimePurchaseOrderOptions, type IapCreateOneTimePurchaseOrderResult, type IapProductListItem, type ImageResponse, type LoadAdMobEvent, type LoadAdMobInterstitialAdEvent, type LoadAdMobInterstitialAdOptions, type LoadAdMobOptions, type LoadAdMobParams, type LoadAdMobRewardedAdEvent, type LoadAdMobRewardedAdOptions, type Location, type LocationCoords, type NetworkStatus, type OpenCameraOptions, type PermissionAccess, type PermissionName, type PermissionStatus, type Primitive, type SaveBase64DataParams, type ShowAdMobEvent, type ShowAdMobInterstitialAdEvent, type ShowAdMobInterstitialAdOptions, type ShowAdMobOptions, type ShowAdMobParams, type ShowAdMobRewardedAdEvent, type ShowAdMobRewardedAdOptions, type StartUpdateLocationOptions$1 as StartUpdateLocationOptions, type StartUpdateLocationSubscription, Storage, type SubmitGameCenterLeaderBoardScoreResponse, TossPay, type UpdateLocationEventEmitter, appLogin, appsInTossEvent, closeView, contactsViral, eventLog, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getLocale, getNetworkStatus, getOperationalEnvironment, getPlatformOS, getSchemeUri, getTossAppVersion, getTossShareLink, isMinVersionSupported, onVisibilityChangedByTransparentServiceWeb, openCamera, openGameCenterLeaderboard, openURL, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, startUpdateLocation, submitGameCenterLeaderBoardScore };
|
|
3146
|
+
export { Accuracy, AppsInTossModule, BedrockCoreModule, BedrockModule, type CheckoutPaymentOptions, type CheckoutPaymentResult, type ContactEntity, type ContactResult, type ContactsViralParams, type EventLogParams, type FetchAlbumPhotosOptions, type GameCenterGameProfileResponse, type GetCurrentLocationOptions, GoogleAdMob, type HapticFeedbackType, IAP, AppsInTossModuleInstance as INTERNAL__AppsInTossModule, INTERNAL__appBridgeHandler, INTERNAL__module, type IapCreateOneTimePurchaseOrderOptions, type IapCreateOneTimePurchaseOrderResult, type IapProductListItem, type ImageResponse, type LoadAdMobEvent, type LoadAdMobInterstitialAdEvent, type LoadAdMobInterstitialAdOptions, type LoadAdMobOptions, type LoadAdMobParams, type LoadAdMobRewardedAdEvent, type LoadAdMobRewardedAdOptions, type Location, type LocationCoords, type NetworkStatus, type OpenCameraOptions, type PermissionAccess, type PermissionName, type PermissionStatus, type Primitive, type SaveBase64DataParams, type ShowAdMobEvent, type ShowAdMobInterstitialAdEvent, type ShowAdMobInterstitialAdOptions, type ShowAdMobOptions, type ShowAdMobParams, type ShowAdMobRewardedAdEvent, type ShowAdMobRewardedAdOptions, type StartUpdateLocationOptions$1 as StartUpdateLocationOptions, type StartUpdateLocationSubscription, Storage, type SubmitGameCenterLeaderBoardScoreResponse, TossPay, type UpdateLocationEventEmitter, appLogin, appsInTossEvent, closeView, contactsViral, eventLog, fetchAlbumPhotos, fetchContacts, generateHapticFeedback, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getLocale, getNetworkStatus, getOperationalEnvironment, getPlatformOS, getSchemeUri, getTossAppVersion, getTossShareLink, isMinVersionSupported, onVisibilityChangedByTransparentServiceWeb, openCamera, openGameCenterLeaderboard, openURL, saveBase64Data, setClipboardText, setDeviceOrientation, setIosSwipeGestureEnabled, setScreenAwakeMode, setSecureScreen, share, startUpdateLocation, submitGameCenterLeaderBoardScore };
|
package/dist/index.js
CHANGED
|
@@ -12,8 +12,19 @@ var EntryMessageExitedEvent = class extends GraniteEventDefinition {
|
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
// src/AppsInTossModule/native-event-emitter/event-plugins/
|
|
15
|
+
// src/AppsInTossModule/native-event-emitter/event-plugins/HomeIconButtonClickHandleEvent.ts
|
|
16
16
|
import { GraniteEventDefinition as GraniteEventDefinition2 } from "@granite-js/react-native";
|
|
17
|
+
var HomeIconButtonClickHandleEvent = class extends GraniteEventDefinition2 {
|
|
18
|
+
name = "homeIconButtonClickEvent";
|
|
19
|
+
remove() {
|
|
20
|
+
}
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
22
|
+
listener(_) {
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// src/AppsInTossModule/native-event-emitter/event-plugins/UpdateLocationEvent.ts
|
|
27
|
+
import { GraniteEventDefinition as GraniteEventDefinition3 } from "@granite-js/react-native";
|
|
17
28
|
|
|
18
29
|
// src/AppsInTossModule/native-modules/AppsInTossModule.ts
|
|
19
30
|
import { TurboModuleRegistry } from "react-native";
|
|
@@ -48,7 +59,7 @@ import { NativeEventEmitter } from "react-native";
|
|
|
48
59
|
var nativeEventEmitter = new NativeEventEmitter(AppsInTossModuleInstance);
|
|
49
60
|
|
|
50
61
|
// src/AppsInTossModule/native-event-emitter/event-plugins/UpdateLocationEvent.ts
|
|
51
|
-
var UpdateLocationEvent = class extends
|
|
62
|
+
var UpdateLocationEvent = class extends GraniteEventDefinition3 {
|
|
52
63
|
name = "updateLocationEvent";
|
|
53
64
|
subscriptionCount = 0;
|
|
54
65
|
ref = {
|
|
@@ -78,7 +89,7 @@ var UpdateLocationEvent = class extends GraniteEventDefinition2 {
|
|
|
78
89
|
};
|
|
79
90
|
|
|
80
91
|
// src/AppsInTossModule/native-event-emitter/internal/AppBridgeCallbackEvent.ts
|
|
81
|
-
import { GraniteEventDefinition as
|
|
92
|
+
import { GraniteEventDefinition as GraniteEventDefinition4 } from "@granite-js/react-native";
|
|
82
93
|
|
|
83
94
|
// src/utils/generateUUID.ts
|
|
84
95
|
function generateUUID(placeholder) {
|
|
@@ -135,7 +146,7 @@ var INTERNAL__appBridgeHandler = {
|
|
|
135
146
|
|
|
136
147
|
// src/AppsInTossModule/native-event-emitter/internal/AppBridgeCallbackEvent.ts
|
|
137
148
|
var UNSAFE__nativeEventEmitter = nativeEventEmitter;
|
|
138
|
-
var AppBridgeCallbackEvent = class _AppBridgeCallbackEvent extends
|
|
149
|
+
var AppBridgeCallbackEvent = class _AppBridgeCallbackEvent extends GraniteEventDefinition4 {
|
|
139
150
|
static INTERNAL__appBridgeSubscription;
|
|
140
151
|
name = "appBridgeCallbackEvent";
|
|
141
152
|
constructor() {
|
|
@@ -165,8 +176,8 @@ var AppBridgeCallbackEvent = class _AppBridgeCallbackEvent extends GraniteEventD
|
|
|
165
176
|
};
|
|
166
177
|
|
|
167
178
|
// src/AppsInTossModule/native-event-emitter/internal/VisibilityChangedByTransparentServiceWebEvent.ts
|
|
168
|
-
import { GraniteEventDefinition as
|
|
169
|
-
var VisibilityChangedByTransparentServiceWebEvent = class extends
|
|
179
|
+
import { GraniteEventDefinition as GraniteEventDefinition5 } from "@granite-js/react-native";
|
|
180
|
+
var VisibilityChangedByTransparentServiceWebEvent = class extends GraniteEventDefinition5 {
|
|
170
181
|
name = "onVisibilityChangedByTransparentServiceWeb";
|
|
171
182
|
subscription = null;
|
|
172
183
|
remove() {
|
|
@@ -194,6 +205,7 @@ var VisibilityChangedByTransparentServiceWebEvent = class extends GraniteEventDe
|
|
|
194
205
|
var appsInTossEvent = new GraniteEvent([
|
|
195
206
|
new UpdateLocationEvent(),
|
|
196
207
|
new EntryMessageExitedEvent(),
|
|
208
|
+
new HomeIconButtonClickHandleEvent(),
|
|
197
209
|
// Internal events
|
|
198
210
|
new AppBridgeCallbackEvent(),
|
|
199
211
|
new VisibilityChangedByTransparentServiceWebEvent()
|
|
@@ -867,6 +879,7 @@ export {
|
|
|
867
879
|
GoogleAdMob,
|
|
868
880
|
IAP,
|
|
869
881
|
AppsInTossModuleInstance as INTERNAL__AppsInTossModule,
|
|
882
|
+
INTERNAL__appBridgeHandler,
|
|
870
883
|
INTERNAL__module,
|
|
871
884
|
Storage,
|
|
872
885
|
TossPay,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/native-modules",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"description": "Native Modules for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "380ad5f697a176bcc6adae409153fa43e700d053"
|
|
57
57
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GraniteEvent } from '@granite-js/react-native';
|
|
2
2
|
import { EntryMessageExitedEvent } from './event-plugins/EntryMessageExitedEvent';
|
|
3
|
+
import { HomeIconButtonClickHandleEvent } from './event-plugins/HomeIconButtonClickHandleEvent';
|
|
3
4
|
import { UpdateLocationEvent } from './event-plugins/UpdateLocationEvent';
|
|
4
5
|
import { AppBridgeCallbackEvent } from './internal/AppBridgeCallbackEvent';
|
|
5
6
|
import { VisibilityChangedByTransparentServiceWebEvent } from './internal/VisibilityChangedByTransparentServiceWebEvent';
|
|
@@ -7,6 +8,7 @@ import { VisibilityChangedByTransparentServiceWebEvent } from './internal/Visibi
|
|
|
7
8
|
export const appsInTossEvent = new GraniteEvent([
|
|
8
9
|
new UpdateLocationEvent(),
|
|
9
10
|
new EntryMessageExitedEvent(),
|
|
11
|
+
new HomeIconButtonClickHandleEvent(),
|
|
10
12
|
// Internal events
|
|
11
13
|
new AppBridgeCallbackEvent(),
|
|
12
14
|
new VisibilityChangedByTransparentServiceWebEvent(),
|
package/src/AppsInTossModule/native-event-emitter/event-plugins/HomeIconButtonClickHandleEvent.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GraniteEventDefinition } from '@granite-js/react-native';
|
|
2
|
+
|
|
3
|
+
export class HomeIconButtonClickHandleEvent extends GraniteEventDefinition<undefined, undefined> {
|
|
4
|
+
name = 'homeIconButtonClickEvent' as const;
|
|
5
|
+
|
|
6
|
+
remove() {}
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9
|
+
listener(_: undefined) {}
|
|
10
|
+
}
|
|
@@ -3,3 +3,4 @@ export * from './contactsViral';
|
|
|
3
3
|
|
|
4
4
|
export { appsInTossEvent } from './appsInTossEvent';
|
|
5
5
|
export { onVisibilityChangedByTransparentServiceWeb } from './internal/onVisibilityChangedByTransparentServiceWeb';
|
|
6
|
+
export { INTERNAL__appBridgeHandler } from './internal/appBridge';
|
|
@@ -17,7 +17,7 @@ export interface LoadAdMobOptions {
|
|
|
17
17
|
* @public
|
|
18
18
|
* @category 광고
|
|
19
19
|
* @name LoadAdMobEvent
|
|
20
|
-
* @description 광고를 불러오는 함수에서 발생하는 이벤트 타입이에요. `loaded` 이벤트가 발생하면 광고를 성공적으로 불러온 거예요. 이때 [AdMobLoadResult](/react-native/reference/
|
|
20
|
+
* @description 광고를 불러오는 함수에서 발생하는 이벤트 타입이에요. `loaded` 이벤트가 발생하면 광고를 성공적으로 불러온 거예요. 이때 [AdMobLoadResult](/react-native/reference/native-modules/광고/AdMobLoadResult.html) 객체가 함께 반환돼요.
|
|
21
21
|
*/
|
|
22
22
|
export type LoadAdMobEvent = {
|
|
23
23
|
type: 'loaded';
|
|
@@ -40,7 +40,7 @@ export type LoadAdMobParams = AdMobHandlerParams<LoadAdMobOptions, LoadAdMobEven
|
|
|
40
40
|
* @param {LoadAdMobParams} params 광고를 불러올 때 사용할 설정 값이에요. 광고 그룹 ID와 광고의 동작에 대한 콜백을 설정할 수 있어요.
|
|
41
41
|
* @param {LoadAdMobOptions} params.options 광고를 불러올 때 전달할 옵션 객체예요.
|
|
42
42
|
* @param {string} params.options.adGroupId 광고 그룹 단위 ID예요. 콘솔에서 발급받은 ID를 입력해요.
|
|
43
|
-
* @param {(event: LoadAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고가 닫히거나 클릭됐을 때). 자세한 이벤트 타입은 [LoadAdMobEvent](/react-native/reference/
|
|
43
|
+
* @param {(event: LoadAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고가 닫히거나 클릭됐을 때). 자세한 이벤트 타입은 [LoadAdMobEvent](/react-native/reference/native-modules/광고/LoadAdMobEvent.html)를 참고하세요.
|
|
44
44
|
* @param {(reason: unknown) => void} [params.onError] 광고를 불러오지 못했을 때 호출돼요. (예시: 네트워크 오류나 지원하지 않는 환경일 때)
|
|
45
45
|
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
46
46
|
*
|
|
@@ -197,7 +197,7 @@ export type ShowAdMobParams = AdMobHandlerParams<ShowAdMobOptions, ShowAdMobEven
|
|
|
197
197
|
* @param {ShowAdMobParams} params 광고를 보여주기 위해 사용할 설정 값이에요. 광고 그룹 ID와과 광고의 동작에 대한 콜백을 설정할 수 있어요.
|
|
198
198
|
* @param {ShowAdMobOptions} params.options 광고를 보여줄 때 전달할 옵션 객체예요.
|
|
199
199
|
* @param {string} params.options.adUnitId 광고 그룹 단위 ID예요. `loadAppsInTossAdMob` 로 불러온 광고용 그룹 ID를 입력해요.
|
|
200
|
-
* @param {(event: ShowAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고 노출을 요청했을 때). 자세한 이벤트 타입은 [ShowAdMobEvent](/react-native/reference/
|
|
200
|
+
* @param {(event: ShowAdMobEvent) => void} [params.onEvent] 광고 관련 이벤트가 발생했을 때 호출돼요. (예시: 광고 노출을 요청했을 때). 자세한 이벤트 타입은 [ShowAdMobEvent](/react-native/reference/native-modules/광고/ShowAdMobEvent.html)를 참고하세요.
|
|
201
201
|
* @param {(reason: unknown) => void} [params.onError] 광고를 노출하지 못했을 때 호출돼요. (예시: 네트워크 오류나 지원하지 않는 환경일 때)
|
|
202
202
|
* @property {() => boolean} [isSupported] 현재 실행 중인 앱(예: 토스 앱, 개발용 샌드박스 앱 등)에서 Google AdMob 광고 기능을 지원하는지 확인하는 함수예요. 기능을 사용하기 전에 지원 여부를 확인해야 해요.
|
|
203
203
|
*
|
|
@@ -114,7 +114,7 @@ export interface RewardedAd {
|
|
|
114
114
|
* @description 광고의 ID와 응답 정보를 담고 있는 객체예요. 광고를 로드한 뒤, 관련 정보를 확인할 때 유용해요.
|
|
115
115
|
* @property {string} adGroupId 광고 그룹 ID예요.
|
|
116
116
|
* @property {string} adUnitId 광고 ID예요.
|
|
117
|
-
* @property {ResponseInfo} responseInfo 광고 로드 응답 정보예요. 자세한 내용은 [ResponseInfo](/react-native/reference/
|
|
117
|
+
* @property {ResponseInfo} responseInfo 광고 로드 응답 정보예요. 자세한 내용은 [ResponseInfo](/react-native/reference/native-modules/광고/ResponseInfo.html)를 참고하세요.
|
|
118
118
|
*/
|
|
119
119
|
export interface AdMobLoadResult {
|
|
120
120
|
adGroupId: string;
|