@apps-in-toss/native-modules 1.14.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/bridges-meta.json +11 -7
  2. package/dist/index.cjs +201 -219
  3. package/dist/index.d.cts +1479 -1446
  4. package/dist/index.d.ts +1479 -1446
  5. package/dist/index.js +173 -192
  6. package/package.json +10 -8
  7. package/src/BedrockModule/native-modules/index.ts +0 -2
  8. package/src/BedrockModule/native-modules/natives/BedrockModule.ts +8 -18
  9. package/src/BedrockModule/native-modules/natives/closeView.ts +2 -2
  10. package/src/BedrockModule/native-modules/natives/generateHapticFeedback/index.ts +2 -2
  11. package/src/BedrockModule/native-modules/natives/getLocale.ts +2 -2
  12. package/src/BedrockModule/native-modules/natives/getNetworkStatus/index.ts +2 -2
  13. package/src/BedrockModule/native-modules/natives/getSchemeUri.ts +2 -2
  14. package/src/BedrockModule/native-modules/natives/setIosSwipeGestureEnabled.ts +3 -3
  15. package/src/BedrockModule/native-modules/natives/setScreenAwakeMode.ts +2 -2
  16. package/src/BedrockModule/native-modules/natives/setSecureScreen.ts +2 -2
  17. package/src/BedrockModule/native-modules/natives/share.ts +2 -2
  18. package/src/CommonModule.brick.ts +36 -0
  19. package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/event-plugins/UpdateLocationEvent.ts +9 -6
  20. package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/internal/AppBridgeCallbackEvent.ts +8 -9
  21. package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/internal/VisibilityChangedByTransparentServiceWebEvent.ts +13 -12
  22. package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/internal/appBridge.spec.ts +5 -5
  23. package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/internal/appBridge.ts +4 -12
  24. package/src/MiniAppModule/native-modules/ads/types.ts +179 -0
  25. package/src/{AppsInTossModule → MiniAppModule}/native-modules/appLogin.ts +2 -2
  26. package/src/{AppsInTossModule → MiniAppModule}/native-modules/appsInTossSignTossCert.ts +6 -18
  27. package/src/{AppsInTossModule → MiniAppModule}/native-modules/checkoutPayment.ts +3 -3
  28. package/src/{AppsInTossModule → MiniAppModule}/native-modules/eventLog.ts +3 -3
  29. package/src/{AppsInTossModule → MiniAppModule}/native-modules/getDeviceId.ts +2 -2
  30. package/src/{AppsInTossModule → MiniAppModule}/native-modules/getGameCenterGameProfile.ts +2 -2
  31. package/src/MiniAppModule/native-modules/getGroupId.ts +20 -0
  32. package/src/{AppsInTossModule → MiniAppModule}/native-modules/getIsTossLoginIntegratedService.ts +2 -2
  33. package/src/{AppsInTossModule → MiniAppModule}/native-modules/getOperationalEnvironment.ts +2 -2
  34. package/src/{AppsInTossModule → MiniAppModule}/native-modules/getPermission.ts +2 -2
  35. package/src/{AppsInTossModule → MiniAppModule}/native-modules/getServerTime.ts +2 -2
  36. package/src/{AppsInTossModule → MiniAppModule}/native-modules/getTossAppVersion.ts +2 -2
  37. package/src/MiniAppModule/native-modules/getTossShareLink.ts +39 -0
  38. package/src/{AppsInTossModule → MiniAppModule}/native-modules/getUserKeyForGame.ts +2 -2
  39. package/src/{AppsInTossModule → MiniAppModule}/native-modules/grantPromotionRewardForGame.ts +10 -6
  40. package/src/{AppsInTossModule → MiniAppModule}/native-modules/iap.ts +11 -12
  41. package/src/{AppsInTossModule → MiniAppModule}/native-modules/index.ts +5 -3
  42. package/src/{AppsInTossModule → MiniAppModule}/native-modules/isMinVersionSupported.ts +3 -3
  43. package/src/{AppsInTossModule → MiniAppModule}/native-modules/permissions/fetchAlbumPhotos/fetchAlbumPhotos.ts +2 -2
  44. package/src/{AppsInTossModule → MiniAppModule}/native-modules/permissions/fetchContacts/fetchContacts.ts +2 -2
  45. package/src/{AppsInTossModule → MiniAppModule}/native-modules/permissions/getClipboardText/getClipboardText.ts +2 -2
  46. package/src/{AppsInTossModule → MiniAppModule}/native-modules/permissions/getCurrentLocation/getCurrentLocation.ts +2 -2
  47. package/src/{AppsInTossModule → MiniAppModule}/native-modules/permissions/openCamera/openCamera.ts +2 -2
  48. package/src/{AppsInTossModule → MiniAppModule}/native-modules/permissions/openPermissionDialog.ts +2 -2
  49. package/src/{AppsInTossModule → MiniAppModule}/native-modules/permissions/setClipboardText/setClipboardText.ts +2 -2
  50. package/src/{AppsInTossModule → MiniAppModule}/native-modules/saveBase64Data.ts +2 -2
  51. package/src/{AppsInTossModule → MiniAppModule}/native-modules/setDeviceOrientation.ts +2 -2
  52. package/src/MiniAppModule/native-modules/shareWithScheme.ts +23 -0
  53. package/src/{AppsInTossModule → MiniAppModule}/native-modules/storage.ts +5 -8
  54. package/src/{AppsInTossModule → MiniAppModule}/native-modules/submitGameCenterLeaderBoardScore.ts +2 -2
  55. package/src/{AppsInTossModule → MiniAppModule}/native-modules/tossCore.ts +5 -17
  56. package/src/MiniAppModule.brick.ts +158 -0
  57. package/src/TossCoreModule.brick.ts +17 -0
  58. package/src/async-bridges.ts +23 -23
  59. package/src/constant-bridges.ts +4 -3
  60. package/src/event-bridges.ts +3 -3
  61. package/src/index.ts +6 -5
  62. package/src/natives.ts +10 -0
  63. package/src/AppsInTossModule/native-event-emitter/nativeEventEmitter.ts +0 -35
  64. package/src/AppsInTossModule/native-modules/AppsInTossModule.ts +0 -107
  65. package/src/AppsInTossModule/native-modules/getTossShareLink.ts +0 -65
  66. package/src/BedrockModule/native-modules/core/BedrockCoreModule.ts +0 -8
  67. /package/src/{AppsInTossModule → MiniAppModule}/constants.ts +0 -0
  68. /package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/StartUpdateLocationPermissionError.ts +0 -0
  69. /package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/appsInTossEvent.ts +0 -0
  70. /package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/contactsViral.ts +0 -0
  71. /package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/index.ts +0 -0
  72. /package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/internal/onVisibilityChangedByTransparentServiceWeb.ts +0 -0
  73. /package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/startUpdateLocation.ts +0 -0
  74. /package/src/{AppsInTossModule → MiniAppModule}/native-event-emitter/types.ts +0 -0
  75. /package/src/{AppsInTossModule → MiniAppModule}/native-modules/ads/googleAdMobV2.ts +0 -0
  76. /package/src/{AppsInTossModule → MiniAppModule}/native-modules/eventLog.spec.ts +0 -0
  77. /package/src/{AppsInTossModule → MiniAppModule}/native-modules/isMinVersionSupported.spec.ts +0 -0
  78. /package/src/{AppsInTossModule → MiniAppModule}/native-modules/openGameCenterLeaderboard.ts +0 -0
  79. /package/src/{AppsInTossModule → MiniAppModule}/native-modules/permissions/createPermissionFunction.ts +0 -0
  80. /package/src/{AppsInTossModule → MiniAppModule}/native-modules/permissions/requestPermission.ts +0 -0
@@ -77,7 +77,7 @@
77
77
  },
78
78
  {
79
79
  "identifier": "getTossShareLink",
80
- "dts": "/**\n * @public\n * @category 공유\n * @kind function\n * @name getTossShareLink\n * @description\n * 사용자가 지정한 경로를 토스 앱에서 열 수 있는 공유 링크를 생성해요.\n *\n * 생성된 링크를 다른 사람과 공유하면:\n * - 토스 앱이 설치되어 있으면: 토스 앱이 실행되면서 지정한 경로로 이동해요.\n * - 토스 앱이 없으면: iOS는 앱스토어로, Android 플레이스토어로 이동해요.\n *\n * @param path - 딥링크 경로예요. `intoss://`로 시작하는 문자열이어야 해요. (예: `intoss://my-app`, `intoss://my-app/detail?id=123`)\n * @param ogImageUrl - (선택) 공유 표시될 커스텀 OG 이미지 URL이에요. 최소 버전: Android 5.240.0, iOS 5.239.0\n * @returns {Promise<string>} 생성된 토스 공유 링크\n *\n * @example\n * ```tsx\n * import { share } from '@granite-js/react-native';\n * import { getTossShareLink } from '@apps-in-toss/framework';\n *\n * // 기본 사용법\n * const tossLink = await getTossShareLink('intoss://my-app');\n * await share({ message: tossLink });\n *\n * // 커스텀 OG 이미지와 함께 사용\n * const linkWithImage = await getTossShareLink(\n * 'intoss://my-app/event',\n * 'https://example.com/og-image.png'\n * );\n * await share({ message: linkWithImage });\n * ```\n */\nexport declare function getTossShareLink(path: string, ogImageUrl?: string): Promise<string>;\n\nexport {};\n"
80
+ "dts": "/**\n * @public\n * @category 공유\n * @kind function\n * @name getTossShareLink\n * @description\n * `getTossShareLink` 함수는 사용자가 지정한 경로를 토스 앱에서 열 수 있는 공유 링크를 반환해요.\n * 링크를 다른 사람과 공유하면 토스 앱이 실행되면서 지정한 경로로 진입해요. 토스앱이 없는 사람은 iOS 때는 앱스토어로 이동하고, Android 일 때는 플레이스토어로 이동해요.\n *\n * 경로는 토스 내부 특정 화면을 나타내는 딥링크(deep link) 형식이어야 해요.\n * 예를 들어 `intoss://<앱 이름>`이나 `intoss://<앱 이름>/about?name=test`처럼 작성해요.\n *\n * 함수를 사용하면 `deep_link_value`를 포함한 완성된 공유 링크를 만들 있어요.\n *\n * @param path - 딥링크로 열고 싶은 경로예요. `intoss://`로 시작하는 문자열이어야 해요.\n * @returns {Promise<string>} `deep_link_value`가 포함된 토스 공유 링크를 반환해요.\n *\n * @example\n * ```tsx\n * import { share } from '@granite-js/react-native';\n * import { getTossShareLink } from '@apps-in-toss/framework';\n *\n * // '/' 경로를 딥링크로 포함한 토스 공유 링크를 생성해요.\n * const tossLink = await getTossShareLink('intoss://my-app');\n *\n * // 생성한 링크를 메시지로 공유해요.\n * await share({ message: tossLink });\n * ```\n */\nexport declare function getTossShareLink(path: string): Promise<string>;\n\nexport {};\n"
81
81
  },
82
82
  {
83
83
  "identifier": "setDeviceOrientation",
@@ -85,7 +85,7 @@
85
85
  },
86
86
  {
87
87
  "identifier": "checkoutPayment",
88
- "dts": "/**\n * @public\n * @category 토스페이\n * @name CheckoutPaymentOptions\n * @description 토스페이 결제창을 띄울 때 필요한 옵션이에요.\n * @property {string} payToken 결제 토큰이에요.\n */\nexport interface CheckoutPaymentOptions {\n\t/**\n\t * 결제 토큰이에요.\n\t */\n\tpayToken: string;\n}\n/**\n * @public\n * @category 토스페이\n * @name CheckoutPaymentResult\n * @description 토스페이 결제창에서 사용자가 인증에 성공했는지 여부예요.\n * @property {boolean} success 인증이 성공했는지 여부예요.\n * @property {string} [reason] 인증이 실패했을 경우의 이유예요.\n */\nexport interface CheckoutPaymentResult {\n\t/**\n\t * 인증이 성공했는지 여부예요.\n\t */\n\tsuccess: boolean;\n\t/**\n\t * 인증이 실패했을 경우의 이유예요.\n\t */\n\treason?: string;\n}\n/**\n * @public\n * @category 토스페이\n * @name checkoutPayment\n * @description 토스페이 결제창을 띄우고, 사용자 인증을 수행해요. 인증이 완료되면 성공 여부를 반환해요.\n *\n * 이 함수는 결제창을 통해 사용자 인증만 해요. 실제 결제 처리는 인증 성공 후 서버에서 별도로 해야 해요.\n *\n * @param {CheckoutPaymentOptions} options 결제창을 띄울 때 필요한 옵션이에요.\n * @returns {Promise<CheckoutPaymentResult>} 인증 성공 여부를 포함한 결과를 반환해요.\n *\n * @example\n *\n * ### 토스페이 결제창 띄우고 인증 처리하기\n *\n * ```tsx\n * import { TossPay } from '@apps-in-toss/framework';\n *\n * async function handlePayment() {\n * try {\n * // 실제 구현 시 결제 생성 역할을 하는 API 엔드포인트로 대체해주세요.\n * const { payToken } = await fetch('/my-api/payment/create').then(res => res.json());\n *\n * const { success, reason } = await TossPay.checkoutPayment({ payToken });\n *\n * if (success) {\n * // 실제 구현 시 결제를 실행하는 API 엔드포인트로 대체해주세요.\n * await fetch('/my-api/payment/execute', {\n * method: 'POST',\n * body: JSON.stringify({ payToken }),\n * headers: { 'Content-Type': 'application/json' },\n * });\n * } else {\n * console.log('인증 실패:', reason);\n * }\n * } catch (error) {\n * console.error('결제 인증 중 오류가 발생했어요:', error);\n * }\n * }\n * ```\n */\nexport declare function checkoutPayment(options: CheckoutPaymentOptions): Promise<CheckoutPaymentResult>;\n\nexport {};\n"
88
+ "dts": "/**\n * @public\n * @category 토스페이\n * @name CheckoutPaymentOptions\n * @description 토스페이 결제창을 띄울 때 필요한 옵션이에요.\n * @property {string} payToken 결제 토큰이에요.\n */\nexport interface CheckoutPaymentOptions {\n\t/**\n\t * 결제 토큰이에요.\n\t */\n\tpayToken: string;\n}\n/**\n * @public\n * @category 토스페이\n * @name CheckoutPaymentResult\n * @description 토스페이 결제창에서 사용자가 인증에 성공했는지 여부예요.\n * @property {boolean} success 인증이 성공했는지 여부예요.\n * @property {string} [reason] 인증이 실패했을 경우의 이유예요.\n */\nexport interface CheckoutPaymentResult {\n\t/**\n\t * 인증이 성공했는지 여부예요.\n\t */\n\tsuccess: boolean;\n\t/**\n\t * 인증이 실패했을 경우의 이유예요.\n\t */\n\treason?: string;\n}\n/**\n * @public\n * @category 토스페이\n * @name checkoutPayment\n * @description 토스페이 결제창을 띄우고, 사용자 인증을 수행해요. 인증이 완료되면 성공 여부를 반환해요.\n *\n * 이 함수는 결제창을 통해 사용자 인증만 해요. 실제 결제 처리는 인증 성공 후 서버에서 별도로 해야 해요.\n *\n * @param {CheckoutPaymentOptions} options 결제창을 띄울 때 필요한 옵션이에요.\n * @returns {Promise<CheckoutPaymentResult>} 인증 성공 여부를 포함한 결과를 반환해요.\n *\n * @example\n *\n * ### 토스페이 결제창 띄우고 인증 처리하기\n *\n * ```tsx\n * import { TossPay } from '@apps-in-toss/framework';\n *\n * async function handlePayment() {\n * try {\n * // 실제 구현 시 결제 생성 역할을 하는 API 엔드포인트로 대체해주세요.\n * const { payToken } = await fetch('/my-api/payment/create').then(res => res.json());\n *\n * const { success, reason } = await TossPay.checkoutPayment({ payToken });\n *\n * if (success) {\n * // 실제 구현 시 결제를 실행하는 API 엔드포인트로 대체해주세요.\n * await fetch('/my-api/payment/execute', {\n * method: 'POST',\n * body: JSON.stringify({ payToken }),\n * headers: { 'Content-Type': 'application/json' },\n * });\n * } else {\n * console.log('인증 실패:', reason);\n * }\n * } catch (error) {\n * console.error('결제 인증 중 오류가 발생했어요:', error);\n * }\n * }\n * ```\n */\nexport declare function checkoutPayment(options: {\n\tparams: CheckoutPaymentOptions;\n}): Promise<CheckoutPaymentResult>;\n\nexport {};\n"
89
89
  },
90
90
  {
91
91
  "identifier": "saveBase64Data",
@@ -93,7 +93,7 @@
93
93
  },
94
94
  {
95
95
  "identifier": "appsInTossSignTossCert",
96
- "dts": "export interface AppsInTossSignTossCertParams {\n\ttxId: string;\n\tskipConfirmDoc?: boolean;\n}\n/**\n * @public\n * @category 토스인증\n * @name appsInTossSignTossCert\n * @description 토스 인증서를 사용해 서명하는 기능을 제공해요. 이 함수를 사용하면 앱인토스에서 제공하는 인증서를 활용해 서명을 할 수 있어요.\n *\n * @param {AppsInTossSignTossCertParams} params - 서명에 필요한 파라미터를 포함하는 객체예요.\n * @param {string} params.txId - 토스인증서를 사용한 본인확인이나 간편인증, 전자서명에서 사용하는 Transaction Id예요.\n * @param {boolean} params.skipConfirmDoc - (선택) 토스 원터치 인증방식을 사용하기 위한 옵션이예요. true 설정 시 최소 버전: Android 5.236.0, iOS 5.236.0 (default: false)\n *\n * @example\n * ```tsx\n * import { appsInTossSignTossCert } from '@apps-in-toss/framework';\n *\n * // 서명에 필요한 파라미터를 정의해요.\n * const params = {\n * txId: \"f2e1a6df...\"\n * };\n *\n * appsInTossSignTossCert(params)\n * .then(() => {\n * console.log('서명 작업이 성공적으로 완료되었어요.');\n * })\n * .catch((error) => {\n * console.error('서명 작업 중 에러가 발생했어요:', error);\n * });\n * ```\n */\nexport declare function appsInTossSignTossCert(params: AppsInTossSignTossCertParams): Promise<void>;\n\nexport {};\n"
96
+ "dts": "export interface AppsInTossSignTossCertParams {\n\ttxId: string;\n}\n/**\n * @public\n * @category 토스인증\n * @name appsInTossSignTossCert\n * @description 토스 인증서를 사용해 서명하는 기능을 제공해요. 이 함수를 사용하면 앱인토스에서 제공하는 인증서를 활용해 서명을 할 수 있어요.\n *\n * @param {AppsInTossSignTossCertParams} params - 서명에 필요한 파라미터를 포함하는 객체예요.\n * @param {string} params.txId - 토스인증서를 사용한 본인확인이나 간편인증, 전자서명에서 사용하는 Transaction Id예요.\n *\n * @example\n * ```tsx\n * import { appsInTossSignTossCert } from '@apps-in-toss/framework';\n *\n * // 서명에 필요한 파라미터를 정의해요.\n * const params = {\n * txId: \"f2e1a6df...\"\n * };\n *\n * appsInTossSignTossCert(params)\n * .then(() => {\n * console.log('서명 작업이 성공적으로 완료되었어요.');\n * })\n * .catch((error) => {\n * console.error('서명 작업 중 에러가 발생했어요:', error);\n * });\n * ```\n */\nexport declare function appsInTossSignTossCert(params: AppsInTossSignTossCertParams): Promise<void>;\n\nexport {};\n"
97
97
  },
98
98
  {
99
99
  "identifier": "getGameCenterGameProfile",
@@ -112,12 +112,12 @@
112
112
  "dts": "export interface GetUserKeyForGameSuccessResponse {\n\thash: string;\n\ttype: \"HASH\";\n}\nexport interface GetUserKeyForGameErrorResponse {\n\ttype: \"NOT_AVAILABLE\";\n}\nexport type GetUserKeyForGameResponse = GetUserKeyForGameSuccessResponse | GetUserKeyForGameErrorResponse;\n/**\n * @public\n * @category 게임\n * @name getUserKeyForGame\n * @description\n * 게임 카테고리 미니앱에서 사용자의 고유 키를 가져와요. 이 키를 사용해서 사용자를 식별하고 게임 데이터를 관리할 수 있어요.\n * 게임 카테고리가 아닌 미니앱에서 호출하면 `'INVALID_CATEGORY'`를 반환해요.\n * @returns {Promise<GetUserKeyForGameSuccessResponse | 'INVALID_CATEGORY' | 'ERROR' | undefined>}\n * 사용자 키 조회 결과를 반환해요.\n * - `GetUserKeyForGameSuccessResponse`: 사용자 키 조회에 성공했어요. `{ type: 'HASH', hash: string }` 형태로 반환돼요.\n * - `'INVALID_CATEGORY'`: 게임 카테고리가 아닌 미니앱에서 호출했어요.\n * - `'ERROR'`: 알 수 없는 오류가 발생했어요.\n * - `undefined`: 앱 버전이 최소 지원 버전보다 낮아요.\n *\n * @example\n * ```tsx\n * // react-native\n * import { Button } from 'react-native';\n * import { getUserKeyForGame } from '@apps-in-toss/framework';\n *\n * function GameUserKeyButton() {\n * async function handlePress() {\n * const result = await getUserKeyForGame();\n *\n * if (!result) {\n * console.warn('지원하지 않는 앱 버전이에요.');\n * return;\n * }\n *\n * if (result === 'INVALID_CATEGORY') {\n * console.error('게임 카테고리가 아닌 미니앱이에요.');\n * return;\n * }\n *\n * if (result === 'ERROR') {\n * console.error('사용자 키 조회 중 오류가 발생했어요.');\n * return;\n * }\n *\n * if (result.type === 'HASH') {\n * console.log('사용자 키:', result.hash);\n * // 여기에서 사용자 키를 사용해 게임 데이터를 관리할 수 있어요.\n * }\n * }\n *\n * return (\n * <Button onPress={handlePress} title=\"유저 키 가져오기\" />\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * // webview\n * import { getUserKeyForGame } from '@apps-in-toss/web-framework';\n *\n * function GameUserKeyButton() {\n * async function handleClick() {\n * const result = await getUserKeyForGame();\n *\n * if (!result) {\n * console.warn('지원하지 않는 앱 버전이에요.');\n * return;\n * }\n *\n * if (result === 'INVALID_CATEGORY') {\n * console.error('게임 카테고리가 아닌 미니앱이에요.');\n * return;\n * }\n *\n * if (result === 'ERROR') {\n * console.error('사용자 키 조회 중 오류가 발생했어요.');\n * return;\n * }\n *\n * if (result.type === 'HASH') {\n * console.log('사용자 키:', result.hash);\n * // 여기에서 사용자 키를 사용해 게임 데이터를 관리할 수 있어요.\n * }\n * }\n *\n * return (\n * <button onClick={handleClick}>유저 키 가져오기</button>\n * );\n * }\n * ```\n */\nexport declare function getUserKeyForGame(): Promise<GetUserKeyForGameSuccessResponse | \"INVALID_CATEGORY\" | \"ERROR\" | undefined>;\n\nexport {};\n"
113
113
  },
114
114
  {
115
- "identifier": "getIsTossLoginIntegratedService",
116
- "dts": "/**\n * @public\n * @category 토스 로그인\n * @name getIsTossLoginIntegratedService\n * @description\n * 유저가 토스 로그인을 연동했는지 여부를 확인해요.\n * 기존 토스 로그인 사용자를 찾아서 게임 식별자로 전환하는 마이그레이션을 사용할 있어요.\n * @returns {Promise<boolean | undefined>}\n * 토스 로그인이 연동된 유저인지 여부를 반환해요.\n * - `true`: 토스 로그인이 연동된 유저에요.\n * - `false`: 토스 로그인이 연동되지 않은 유저에요.\n * - `undefined`: 버전이 최소 지원 버전보다 낮아요.\n * @throw {message: \"oauth2ClientId 설정이 필요합니다.\"} - 토스 로그인을 사용하지 않는 미니앱에서 호출했을 발생해요.\n * @example\n * ```tsx\n * // react-native\n * import { Button } from 'react-native';\n * import { getIsTossLoginIntegratedService } from '@apps-in-toss/framework';\n *\n * function GetIsTossLoginIntegratedServiceButton() {\n * async function handlePress() {\n * try {\n * const result = await getIsTossLoginIntegratedService();\n *\n * if (result === undefined) {\n * console.warn('지원하지 않는 앱 버전이에요.');\n * return;\n * }\n * if (result === true) {\n * console.log('토스 로그인이 연동된 유저에요.');\n * // 여기에서 토스 로그인 연동 유저에 대한 처리를 있어요.\n * }\n * if (result === false) {\n * console.log('토스 로그인이 연동되지 않은 유저에요.');\n * // 여기에서 토스 로그인 연동 유저가 아닌 경우에 대한 처리를 있어요.\n * }\n * } catch (error) {\n * console.error(error);\n * }\n * }\n *\n * return (\n * <Button onPress={handlePress} title=\"토스 로그인 통합 서비스 여부 확인\" />\n * );\n * }\n * ```\n */\nexport declare function getIsTossLoginIntegratedService(): Promise<boolean | undefined>;\n\nexport {};\n"
115
+ "identifier": "grantPromotionRewardForGame",
116
+ "dts": "export interface GrantPromotionRewardForGameSuccessResponse {\n\tkey: string;\n}\nexport interface GrantPromotionRewardForGameErrorResponse {\n\tcode: string;\n\t[key: string]: any;\n}\nexport interface GrantPromotionRewardForGameErrorResult {\n\terrorCode: string;\n\tmessage: string;\n}\nexport type GrantPromotionRewardForGameResponse = GrantPromotionRewardForGameSuccessResponse | GrantPromotionRewardForGameErrorResponse;\nexport type GrantPromotionRewardForGameResult = GrantPromotionRewardForGameResponse | GrantPromotionRewardForGameErrorResult | \"ERROR\" | undefined;\n/**\n * @public\n * @category 게임\n * @name grantPromotionRewardForGame\n * @description\n * 함수를 사용하면 게임 카테고리 미니앱에서 프로모션 코드를 사용해서 유저에게 리워드를 지급할 수 있어요.\n * 게임 카테고리가 아닌 미니앱에서 호출할 없어요.\n * @param {{ params: { promotionCode: string; amount: number } }} params - 포인트를 지급하기 위해 필요한 정보예요.\n * @param {string} params.promotionCode - 프로모션 코드예요.\n * @param {number} params.amount - 지급할 포인트 금액이에요.\n * @returns {Promise<{ key: string } | { errorCode: string; message: string } | 'ERROR' | undefined>}\n * 포인트 지급 결과를 반환해요.\n * - `{ key: string }`: 포인트 지급에 성공했어요. key는 리워드 키를 의미해요.\n * - `{ errorCode: string, message: string }`: 포인트 지급에 실패했어요. 에러 코드는 다음과 같아요.\n * - `\"40000\"`: 게임이 아닌 미니앱에서 호출했을 때\n * - `\"4100\"`: 프로모션 정보를 찾을 없을 때\n * - `\"4104\"`: 프로모션이 중지되었을 때\n * - `\"4105\"`: 프로모션이 종료되었을 때\n * - `\"4108\"`: 프로모션이 승인되지 않았을 때\n * - `\"4109\"`: 프로모션이 실행중이 아닐 때\n * - `\"4110\"`: 리워드를 지급/회수할 수 없을 때\n * - `\"4112\"`: 프로모션 머니가 부족할 때\n * - `\"4113\"`: 이미 지급/회수된 내역일 때\n * - `\"4114\"`: 프로모션에 설정된 1회 지급 금액을 초과할 때\n * - `'ERROR'`: 알 수 없는 오류가 발생했어요.\n * - `undefined`: 앱 버전이 최소 지원 버전보다 낮아요.\n * @example\n * ```tsx\n * // react-native\n * import { Button } from 'react-native';\n * import { grantPromotionRewardForGame } from '@apps-in-toss/framework';\n *\n * function GrantRewardButton() {\n * async function handlePress() {\n * const result = await grantPromotionRewardForGame({\n * params: {\n * promotionCode: 'GAME_EVENT_2024',\n * amount: 1000,\n * },\n * });\n *\n * if (!result) {\n * console.warn('지원하지 않는 앱 버전이에요.');\n * return;\n * }\n *\n * if (result === 'ERROR') {\n * console.error('포인트 지급 알 수 없는 오류가 발생했어요.');\n * return;\n * }\n *\n * if ('key' in result) {\n * console.log('포인트 지급 성공!', result.key);\n * } else if ('errorCode' in result) {\n * console.error('포인트 지급 실패:', result.errorCode, result.message);\n * }\n * }\n *\n * return <Button onPress={handlePress} title=\"포인트 지급하기\" />;\n * }\n * ```\n *\n * @example\n * ```tsx\n * // webview\n * import { grantPromotionRewardForGame } from '@apps-in-toss/web-framework';\n *\n * function GrantRewardButton() {\n * async function handleClick() {\n * const result = await grantPromotionRewardForGame({\n * params: {\n * promotionCode: 'GAME_EVENT_2024',\n * amount: 1000,\n * },\n * });\n *\n * if (!result) {\n * console.warn('지원하지 않는 버전이에요.');\n * return;\n * }\n *\n * if (result === 'ERROR') {\n * console.error('포인트 지급 없는 오류가 발생했어요.');\n * return;\n * }\n *\n * if ('key' in result) {\n * console.log('포인트 지급 성공!', result.key);\n * } else if ('errorCode' in result) {\n * console.error('포인트 지급 실패:', result.errorCode, result.message);\n * }\n * }\n *\n * return (\n * <button onClick={handleClick}>포인트 지급하기</button>\n * );\n * }\n * ```\n */\nexport declare function grantPromotionRewardForGame(params: {\n\tparams: {\n\t\tpromotionCode: string;\n\t\tamount: number;\n\t};\n}): Promise<GrantPromotionRewardForGameResult>;\n\nexport {};\n"
117
117
  },
118
118
  {
119
- "identifier": "grantPromotionRewardForGame",
120
- "dts": "export interface GrantPromotionRewardForGameSuccessResponse {\n\tkey: string;\n}\nexport interface GrantPromotionRewardForGameErrorResponse {\n\tcode: string;\n\t[key: string]: any;\n}\nexport interface GrantPromotionRewardForGameErrorResult {\n\terrorCode: string;\n\tmessage: string;\n}\nexport type GrantPromotionRewardForGameResponse = GrantPromotionRewardForGameSuccessResponse | GrantPromotionRewardForGameErrorResponse;\nexport type GrantPromotionRewardForGameResult = GrantPromotionRewardForGameResponse | GrantPromotionRewardForGameErrorResult | \"ERROR\" | undefined;\n/**\n * @public\n * @category 게임\n * @name grantPromotionRewardForGame\n * @description\n * 함수를 사용하면 게임 카테고리 미니앱에서 프로모션 코드를 사용해서 유저에게 리워드를 지급할 수 있어요.\n * 게임 카테고리가 아닌 미니앱에서 호출할 없어요.\n * @param {{ params: { promotionCode: string; amount: number } }} params - 포인트를 지급하기 위해 필요한 정보예요.\n * @param {string} params.promotionCode - 프로모션 코드예요.\n * @param {number} params.amount - 지급할 포인트 금액이에요.\n * @returns {Promise<{ key: string } | { errorCode: string; message: string } | 'ERROR' | undefined>}\n * 포인트 지급 결과를 반환해요.\n * - `{ key: string }`: 포인트 지급에 성공했어요. key는 리워드 키를 의미해요.\n * - `{ errorCode: string, message: string }`: 포인트 지급에 실패했어요. 에러 코드는 다음과 같아요.\n * - `\"40000\"`: 게임이 아닌 미니앱에서 호출했을 때\n * - `\"4100\"`: 프로모션 정보를 찾을 없을 때\n * - `\"4104\"`: 프로모션이 중지되었을 때\n * - `\"4105\"`: 프로모션이 종료되었을 때\n * - `\"4108\"`: 프로모션이 승인되지 않았을 때\n * - `\"4109\"`: 프로모션이 실행중이 아닐 때\n * - `\"4110\"`: 리워드를 지급/회수할 수 없을 때\n * - `\"4112\"`: 프로모션 머니가 부족할 때\n * - `\"4113\"`: 이미 지급/회수된 내역일 때\n * - `\"4114\"`: 프로모션에 설정된 1회 지급 금액을 초과할 때\n * - `'ERROR'`: 알 수 없는 오류가 발생했어요.\n * - `undefined`: 앱 버전이 최소 지원 버전보다 낮아요.\n * @example\n * ```tsx\n * // react-native\n * import { Button } from 'react-native';\n * import { grantPromotionRewardForGame } from '@apps-in-toss/framework';\n *\n * function GrantRewardButton() {\n * async function handlePress() {\n * const result = await grantPromotionRewardForGame({\n * params: {\n * promotionCode: 'GAME_EVENT_2024',\n * amount: 1000,\n * },\n * });\n *\n * if (!result) {\n * console.warn('지원하지 않는 앱 버전이에요.');\n * return;\n * }\n *\n * if (result === 'ERROR') {\n * console.error('포인트 지급 알 수 없는 오류가 발생했어요.');\n * return;\n * }\n *\n * if ('key' in result) {\n * console.log('포인트 지급 성공!', result.key);\n * } else if ('errorCode' in result) {\n * console.error('포인트 지급 실패:', result.errorCode, result.message);\n * }\n * }\n *\n * return <Button onPress={handlePress} title=\"포인트 지급하기\" />;\n * }\n * ```\n *\n * @example\n * ```tsx\n * // webview\n * import { grantPromotionRewardForGame } from '@apps-in-toss/web-framework';\n *\n * function GrantRewardButton() {\n * async function handleClick() {\n * const result = await grantPromotionRewardForGame({\n * params: {\n * promotionCode: 'GAME_EVENT_2024',\n * amount: 1000,\n * },\n * });\n *\n * if (!result) {\n * console.warn('지원하지 않는 버전이에요.');\n * return;\n * }\n *\n * if (result === 'ERROR') {\n * console.error('포인트 지급 없는 오류가 발생했어요.');\n * return;\n * }\n *\n * if ('key' in result) {\n * console.log('포인트 지급 성공!', result.key);\n * } else if ('errorCode' in result) {\n * console.error('포인트 지급 실패:', result.errorCode, result.message);\n * }\n * }\n *\n * return (\n * <button onClick={handleClick}>포인트 지급하기</button>\n * );\n * }\n * ```\n */\nexport declare function grantPromotionRewardForGame({ params, }: {\n\tparams: {\n\t\tpromotionCode: string;\n\t\tamount: number;\n\t};\n}): Promise<GrantPromotionRewardForGameResult>;\n\nexport {};\n"
119
+ "identifier": "getIsTossLoginIntegratedService",
120
+ "dts": "/**\n * @public\n * @category 토스 로그인\n * @name getIsTossLoginIntegratedService\n * @description\n * 유저가 토스 로그인을 연동했는지 여부를 확인해요.\n * 기존 토스 로그인 사용자를 찾아서 게임 식별자로 전환하는 마이그레이션을 사용할 있어요.\n * @returns {Promise<boolean | undefined>}\n * 토스 로그인이 연동된 유저인지 여부를 반환해요.\n * - `true`: 토스 로그인이 연동된 유저에요.\n * - `false`: 토스 로그인이 연동되지 않은 유저에요.\n * - `undefined`: 버전이 최소 지원 버전보다 낮아요.\n * @throw {message: \"oauth2ClientId 설정이 필요합니다.\"} - 토스 로그인을 사용하지 않는 미니앱에서 호출했을 발생해요.\n * @example\n * ```tsx\n * // react-native\n * import { Button } from 'react-native';\n * import { getIsTossLoginIntegratedService } from '@apps-in-toss/framework';\n *\n * function GetIsTossLoginIntegratedServiceButton() {\n * async function handlePress() {\n * try {\n * const result = await getIsTossLoginIntegratedService();\n *\n * if (result === undefined) {\n * console.warn('지원하지 않는 앱 버전이에요.');\n * return;\n * }\n * if (result === true) {\n * console.log('토스 로그인이 연동된 유저에요.');\n * // 여기에서 토스 로그인 연동 유저에 대한 처리를 있어요.\n * }\n * if (result === false) {\n * console.log('토스 로그인이 연동되지 않은 유저에요.');\n * // 여기에서 토스 로그인 연동 유저가 아닌 경우에 대한 처리를 있어요.\n * }\n * } catch (error) {\n * console.error(error);\n * }\n * }\n *\n * return (\n * <Button onPress={handlePress} title=\"토스 로그인 통합 서비스 여부 확인\" />\n * );\n * }\n * ```\n */\nexport declare function getIsTossLoginIntegratedService(): Promise<boolean | undefined>;\n\nexport {};\n"
121
121
  },
122
122
  {
123
123
  "identifier": "getServerTime",
@@ -147,6 +147,10 @@
147
147
  "identifier": "getDeviceId",
148
148
  "dts": "/**\n * @public\n * @category 환경 확인\n * @kind function\n * @name getDeviceId\n * @description\n * 사용 중인 기기의 고유 식별자를 문자열로 반환해요.\n *\n * 이 함수는 현재 사용 중인 기기의 고유 식별자를 문자열로 반환해요. 기기별로 설정이나 데이터를 저장하거나 사용자의 기기를 식별해서 로그를 기록하고 분석하는 데 사용할 수 있어요. 같은 사용자의 여러 기기를 구분하는 데도 유용해요.\n *\n * @returns {string} 기기의 고유 식별자를 나타내는 문자열이에요.\n *\n * @example\n * ### 기기 고유 식별자 가져오기\n *\n * ```tsx\n * import { getDeviceId } from '@apps-in-toss/framework';\n * import { Text } from 'react-native';\n *\n * function MyPage() {\n * const id = getDeviceId();\n *\n * return (\n * <Text>사용자의 기기 고유 식별자: {id}</Text>\n * );\n * }\n * ```\n */\nexport declare function getDeviceId(): string;\n\nexport {};\n"
149
149
  },
150
+ {
151
+ "identifier": "getGroupId",
152
+ "dts": "/**\n * @public\n * @category Constants\n * @name getGroupId\n * @description 앱인토스에서 제공하는 그룹 ID를 가져와요.\n * @returns {string} 그룹 ID\n *\n * @example\n * ```typescript\n * import { getGroupId } from '@apps-in-toss/native-modules';\n *\n * const groupId = getGroupId();\n * console.log('Group ID:', groupId);\n * ```\n */\nexport declare function getGroupId(): string;\n\nexport {};\n"
153
+ },
150
154
  {
151
155
  "identifier": "contactsViral",
152
156
  "dts": "/**\n * @public\n * @category 친구초대\n * @name RewardFromContactsViralEvent\n * @description 친구에게 공유하기를 완료했을 때 지급할 리워드 정보를 담는 타입이에요. 이 타입을 사용하면 공유가 완료됐을 때 지급할 리워드 정보를 확인할 수 있어요.\n * @property {'sendViral'} type - 이벤트의 타입이에요. `'sendViral'`은 사용자가 친구에게 공유를 완료했을 때 돌아와요.\n * @property {Object} data - 지급할 리워드 관련 정보를 담고 있어요.\n * @property {number} data.rewardAmount - 지급할 리워드 수량이에요. 앱인토스 콘솔에서 설정한 수량 및 금액 값이에요.\n * @property {string} data.rewardUnit - 리워드의 단위예요. 앱인토스 콘솔에 설정된 리워드 이름인 '하트', '보석' 등이 리워드 단위예요.\n */\nexport type RewardFromContactsViralEvent = {\n\ttype: \"sendViral\";\n\tdata: {\n\t\trewardAmount: number;\n\t\trewardUnit: string;\n\t};\n};\n/**\n * @public\n * @category 친구초대\n * @name ContactsViralSuccessEvent\n * @description 연락처 공유 모듈이 정상적으로 종료됐을 때 전달되는 이벤트 객체예요. 종료 이유와 함께 리워드 상태 및 남은 친구 수 등 관련 정보를 제공해요.\n * @property {'close'} type - 이벤트의 타입이에요. `'close'`는 공유 모듈이 종료됐을 때 돌아와요.\n * @property {Object} data - 모듈 종료와 관련된 세부 정보를 담고 있어요.\n * @property {'clickBackButton' | 'noReward'} data.closeReason - 모듈이 종료된 이유예요. `'clickBackButton'`은 사용자가 뒤로 가기 버튼을 눌러 종료한 경우이고, `'noReward'`는 받을 수 있는 리워드가 없어서 종료된 경우예요.\n * @property {number} data.sentRewardAmount - 사용자가 받은 전체 리워드 수량이에요.\n * @property {number} data.sendableRewardsCount - 아직 공유할 수 있는 친구 수예요.\n * @property {number} data.sentRewardsCount - 사용자가 공유를 완료한 친구 수예요.\n * @property {string} data.rewardUnit - 리워드의 단위예요. 앱인토스 콘솔에 설정된 리워드 이름인 '하트', '보석' 등이 리워드 단위예요.\n */\nexport type ContactsViralSuccessEvent = {\n\ttype: \"close\";\n\tdata: {\n\t\tcloseReason: \"clickBackButton\" | \"noReward\";\n\t\tsentRewardAmount?: number;\n\t\tsendableRewardsCount?: number;\n\t\tsentRewardsCount: number;\n\t\trewardUnit?: string;\n\t};\n};\nexport type ContactsViralEvent = RewardFromContactsViralEvent | ContactsViralSuccessEvent;\n/**\n * @public\n * @category 친구초대\n * @name ContactsViralOption\n * @description [연락처 공유 기능](/react-native/reference/native-modules/친구초대/contactsViral.html)을 사용할 때 필요한 옵션이에요.\n * @property {string} moduleId - 공유 리워드를 구분하는 UUID 형식의 고유 ID예요. 앱인토스 콘솔의 미니앱 > 공유 리워드 메뉴에서 확인할 수 있어요.\n */\nexport type ContactsViralOption = {\n\tmoduleId: string;\n};\n/**\n * @public\n * @category 친구초대\n * @name ContactsViralParams\n * @description `ContactsViralParams`는 연락처 공유 기능을 사용할 때 전달해야 하는 파라미터 타입이에요. 옵션을 설정하고, 이벤트 및 에러 처리 콜백을 지정할 수 있어요.\n * @property {ContactsViralOption} options - 공유 기능에 사용할 옵션 객체예요.\n * @property {(event: ContactsViralEvent) => void} onEvent - 공유 이벤트가 발생했을 때 실행되는 함수예요. [`RewardFromContactsViralEvent`](/bedrock/reference/native-modules/친구초대/RewardFromContactsViralEvent.html) 또는 [`ContactsViralSuccessEvent`](/react-native/reference/native-modules/친구초대/ContactsViralSuccessEvent.html) 타입의 이벤트 객체가 전달돼요.\n * @property {(error: unknown) => void} onError - 예기치 않은 에러가 발생했을 때 실행되는 함수예요.\n */\nexport interface ContactsViralParams {\n\toptions: ContactsViralOption;\n\tonEvent: (event: ContactsViralEvent) => void;\n\tonError: (error: unknown) => void;\n}\n/**\n * @public\n * @category 친구초대\n * @name contactsViral\n * @description 친구에게 공유하고 리워드를 받을 수 있는 기능을 제공해요. 사용자가 친구에게 공유를 완료하면 앱브릿지가 이벤트를 통해 리워드 정보를 전달해요.\n * @param {ContactsViralParams} params - 연락처 공유 기능을 실행할 때 사용하는 파라미터예요. 옵션 설정과 이벤트 핸들러를 포함해요. 자세한 내용은 [ContactsViralParams](/bedrock/reference/native-modules/친구초대/ContactsViralParams.html) 문서를 참고하세요.\n * @returns {() => void} 앱브릿지 cleanup 함수를 반환해요. 공유 기능이 끝나면 반드시 이 함수를 호출해서 리소스를 해제해야 해요.\n *\n * @example\n * ### 친구에게 공유하고 리워드 받기\n *\n * ```tsx\n * import { useCallback } from 'react';\n * import { Button } from 'react-native';\n * import { contactsViral } from '@apps-in-toss/framework';\n *\n * function ContactsViralButton({ moduleId }: { moduleId: string }) {\n * const handleContactsViral = useCallback(() => {\n * try {\n * const cleanup = contactsViral({\n * options: { moduleId: moduleId.trim() },\n * onEvent: (event) => {\n * if (event.type === 'sendViral') {\n * console.log('리워드 지급:', event.data.rewardAmount, event.data.rewardUnit);\n * } else if (event.type === 'close') {\n * console.log('모듈 종료:', event.data.closeReason);\n * }\n * },\n * onError: (error) => {\n * console.error('에러 발생:', error);\n * },\n * });\n *\n * return cleanup;\n * } catch (error) {\n * console.error('실행 중 에러:', error);\n * }\n * }, [moduleId]);\n *\n * return <Button title=\"친구에게 공유하고 리워드 받기\" onPress={handleContactsViral} />;\n * }\n * ```\n */\nexport declare function contactsViral(params: ContactsViralParams): () => void;\n\nexport {};\n"