@apps-in-toss/native-modules 1.0.3 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/bridges-meta.json +24 -12
  2. package/dist/index.cjs +212 -154
  3. package/dist/index.d.cts +640 -588
  4. package/dist/index.d.ts +640 -588
  5. package/dist/index.js +190 -132
  6. package/package.json +5 -4
  7. package/src/AppsInTossModule/native-event-emitter/StartUpdateLocationPermissionError.ts +1 -0
  8. package/src/AppsInTossModule/native-event-emitter/appsInTossEvent.ts +5 -0
  9. package/src/AppsInTossModule/native-event-emitter/event-plugins/BackButtonClickHandleEvent.ts +10 -0
  10. package/src/AppsInTossModule/native-event-emitter/event-plugins/UpdateLocationEvent.ts +3 -3
  11. package/src/AppsInTossModule/native-event-emitter/index.ts +1 -0
  12. package/src/AppsInTossModule/native-event-emitter/internal/appBridge.ts +7 -1
  13. package/src/AppsInTossModule/native-event-emitter/startUpdateLocation.ts +64 -44
  14. package/src/AppsInTossModule/native-modules/AppsInTossModule.ts +22 -27
  15. package/src/AppsInTossModule/native-modules/getPermission.ts +1 -1
  16. package/src/AppsInTossModule/native-modules/index.ts +9 -6
  17. package/src/AppsInTossModule/native-modules/permissions/createPermissionFunction.ts +25 -0
  18. package/src/AppsInTossModule/native-modules/permissions/fetchAlbumPhotos/fetchAlbumPhotos.ts +109 -0
  19. package/src/AppsInTossModule/native-modules/{fetchContacts.ts → permissions/fetchContacts/fetchContacts.ts} +51 -40
  20. package/src/AppsInTossModule/native-modules/permissions/getClipboardText/getClipboardText.ts +87 -0
  21. package/src/AppsInTossModule/native-modules/permissions/getCurrentLocation/getCurrentLocation.ts +88 -0
  22. package/src/AppsInTossModule/native-modules/permissions/openCamera/openCamera.ts +99 -0
  23. package/src/AppsInTossModule/native-modules/{openPermissionDialog.ts → permissions/openPermissionDialog.ts} +3 -3
  24. package/src/AppsInTossModule/native-modules/{requestPermission.ts → permissions/requestPermission.ts} +2 -2
  25. package/src/AppsInTossModule/native-modules/permissions/setClipboardText/setClipboardText.ts +75 -0
  26. package/src/AppsInTossModule/native-modules/saveBase64Data.ts +1 -1
  27. package/src/async-bridges.ts +9 -6
  28. package/src/types.ts +0 -106
  29. package/src/AppsInTossModule/native-modules/fetchAlbumPhotos.ts +0 -88
  30. package/src/AppsInTossModule/native-modules/getClipboardText.ts +0 -47
  31. package/src/AppsInTossModule/native-modules/getCurrentLocation.ts +0 -65
  32. package/src/AppsInTossModule/native-modules/openCamera.ts +0 -81
  33. package/src/AppsInTossModule/native-modules/setClipboardText.ts +0 -39
@@ -31,29 +31,41 @@
31
31
  "identifier": "openURL",
32
32
  "dts": "/**\n * @public\n * @kind function\n * @category 화면 이동\n *\n * @name openURL\n * @signature\n * ```typescript\n * function openURL(url: string): Promise<any>;\n * ```\n *\n * @description\n * 지정된 URL을 기기의 기본 브라우저나 관련 앱에서 열어요.\n * 이 함수는 `react-native`의 [`Linking.openURL`](https://reactnative.dev/docs/0.72/linking#openurl) 메서드를 사용하여 URL을 열어요.\n *\n * @param {string} url 열고자 하는 URL 주소\n * @returns {Promise<any>} URL이 성공적으로 열렸을 때 해결되는 Promise\n *\n * @example\n *\n * ### 외부 URL 열기\n *\n * ```tsx\n * import { openURL } from '@apps-in-toss/native-modules';\n * import { Button } from 'react-native';\n *\n * function Page() {\n * const handlePress = () => {\n * openURL('https://google.com');\n * };\n *\n * return <Button title=\"구글 웹사이트 열기\" onPress={handlePress} />;\n * }\n * ```\n */\nexport declare function openURL(url: string): Promise<any>;\n\nexport {};\n"
33
33
  },
34
+ {
35
+ "identifier": "openPermissionDialog",
36
+ "dts": "type PermissionStatus$1 = \"notDetermined\" | \"denied\" | \"allowed\";\nexport type PermissionAccess = \"read\" | \"write\" | \"access\";\ntype PermissionName$1 = \"clipboard\" | \"contacts\" | \"photos\" | \"geolocation\" | \"camera\";\nexport type PermissionDialogFunction = () => Promise<Exclude<PermissionStatus$1, \"notDetermined\">>;\n/**\n * @category AppsInTossModules\n * @name openPermissionDialog\n * @description 권한 요청 다이얼로그를 표시하는 함수예요. 사용자는 이 다이얼로그에서 특정 권한을 허용하거나 거부할 수 있어요.\n * @param permission.name {PermissionName} 요청할 권한의 이름이에요. 예를 들어 `clipboard`는 클립보드 접근 권한을, `camera`는 카메라 접근 권한을 나타내요.\n * @param permission.access {PermissionAccess} 요청할 권한의 접근 유형이에요. 예를 들어 `read`는 읽기 권한, `write`는 쓰기 권한을 의미해요.\n * @returns {Promise<'allowed' | 'denied'>} 권한의 현재 상태를 반환해요. 반환값은 다음 중 하나예요:\n * - `allowed`: 권한이 허용된 상태예요.\n * - `denied`: 권한이 거부된 상태예요.\n *\n * @example\n * ### 클립보드 읽기 권한 다이얼로그 열기\n *\n * ```tsx\n * import React, { useState } from 'react';\n * import { View, Text, Button } from 'react-native';\n * import { openPermissionDialog, type PermissionStatus } from '@apps-in-toss/framework';\n *\n * function PermissionRequest() {\n * const [permission, setPermission] = useState<PermissionStatus | null>(null);\n *\n * const handleRequestPermission = async () => {\n * try {\n * // 클립보드 읽기 권한을 요청하는 다이얼로그를 표시해요.\n * const status = await openPermissionDialog({\n * name: 'clipboard',\n * access: 'read',\n * });\n * setPermission(status); // 권한 상태를 업데이트해요.\n * } catch (error) {\n * console.error('권한 요청 중 오류가 발생했어요:', error);\n * }\n * };\n *\n * return (\n * <View>\n * <Text>\n * 클립보드 읽기 권한 상태: {permission ? permission : '아직 요청하지 않음'}\n * </Text>\n * <Button title=\"권한 요청하기\" onPress={handleRequestPermission} />\n * </View>\n * );\n * }\n * ```\n */\nexport declare function openPermissionDialog(permission: {\n\tname: PermissionName$1;\n\taccess: PermissionAccess;\n}): ReturnType<PermissionDialogFunction>;\n\nexport {};\n"
37
+ },
38
+ {
39
+ "identifier": "getPermission",
40
+ "dts": "type PermissionStatus$1 = \"notDetermined\" | \"denied\" | \"allowed\";\nexport type PermissionAccess = \"read\" | \"write\" | \"access\";\ntype PermissionName$1 = \"clipboard\" | \"contacts\" | \"photos\" | \"geolocation\" | \"camera\";\n/**\n * @category AppsInTossModules\n * @name getPermission\n * @description 특정 권한의 현재 상태를 확인하는 함수예요. 사용자가 권한을 허용했는지, 거부했는지, 또는 아직 선택하지 않았는지를 알 수 있어요.\n * @param permission.name {PermissionName} 요청할 권한의 이름이에요. 예를 들어 `clipboard`는 클립보드 접근 권한을, `camera`는 카메라 접근 권한을 나타내요.\n * @param permission.access {PermissionAccess} 요청할 권한의 접근 유형이에요. 예를 들어 `read`는 읽기 권한, `write`는 쓰기 권한을 의미해요.\n * @returns {Promise<'allowed' | 'denied' | 'notDetermined'>} 권한의 현재 상태를 반환해요. 반환값은 다음 중 하나예요:\n * - `allowed`: 권한이 허용된 상태예요.\n * - `denied`: 권한이 거부된 상태예요.\n * - `notDetermined`: 아직 권한 요청에 대한 결정이 이루어지지 않은 상태예요.\n *\n * @example\n * ### 클립보드 읽기 권한 상태 확인하기\n *\n * ```tsx\n * import React, { useEffect, useState } from 'react';\n * import { View, Text } from 'react-native';\n * import { getPermission, type PermissionStatus } from '@apps-in-toss/framework';\n *\n * function PermissionCheck() {\n * const [permission, setPermission] = useState<PermissionStatus | null>(null);\n *\n * useEffect(() => {\n * async function checkPermission() {\n * try {\n * // 'clipboard'는 권한 이름, 'read'는 접근 유형을 나타내요.\n * const status = await getPermission({\n * name: 'clipboard', // 클립보드 접근 권한\n * access: 'read', // 읽기 권한 요청\n * });\n * setPermission(status); // 권한 상태를 업데이트해요.\n * } catch (error) {\n * console.error('권한 상태를 확인하지 못했어요:', error);\n * }\n * }\n *\n * checkPermission();\n * }, []);\n *\n * return (\n * <View>\n * <Text>\n * 클립보드 읽기 권한 상태: {permission ? permission : '확인 중...'}\n * </Text>\n * </View>\n * );\n * }\n * ```\n */\nexport declare function getPermission(permission: {\n\tname: PermissionName$1;\n\taccess: PermissionAccess;\n}): Promise<PermissionStatus$1>;\n\nexport {};\n"
41
+ },
42
+ {
43
+ "identifier": "requestPermission",
44
+ "dts": "type PermissionStatus$1 = \"notDetermined\" | \"denied\" | \"allowed\";\nexport type PermissionAccess = \"read\" | \"write\" | \"access\";\ntype PermissionName$1 = \"clipboard\" | \"contacts\" | \"photos\" | \"geolocation\" | \"camera\";\n/**\n * @category PermissionManagement\n * @name requestPermission\n * @description 특정 권한을 요청하는 함수예요. 이미 허용되었거나 거부된 권한 상태를 확인한 뒤, 필요할 때 권한 요청 다이얼로그를 표시해요.\n * @param permission.name {PermissionName} 요청할 권한의 이름이에요. 예를 들어 `clipboard`는 클립보드 접근 권한을, `camera`는 카메라 접근 권한을 나타내요.\n * @param permission.access {PermissionAccess} 요청할 권한의 접근 유형이에요. 예를 들어 `read`는 읽기 권한, `write`는 쓰기 권한을 의미해요.\n * @returns {Promise<'allowed' | 'denied'>} 사용자가 선택한 최종 권한 상태를 반환해요.\n * 반환값은 다음 중 하나예요:\n * - `allowed`: 권한이 허용된 경우\n * - `denied`: 권한이 거부된 경우\n *\n * @example\n * ### 클립보드 읽기 권한 요청하기\n *\n * ```tsx\n * import React, { useState } from 'react';\n * import { View, Text, Button } from 'react-native';\n * import { requestPermission, type PermissionStatus } from '@apps-in-toss/framework';\n *\n * function PermissionRequest() {\n * const [permissionStatus, setPermissionStatus] = useState<PermissionStatus | null>(null);\n *\n * const handleRequestPermission = async () => {\n * try {\n * // 클립보드 읽기 권한을 요청해요.\n * const permissionStatus = await requestPermission({\n * name: 'clipboard', // 권한 이름: 클립보드\n * access: 'read', // 접근 유형: 읽기\n * });\n * setPermissionStatus(permissionStatus); // 최종 권한 상태를 저장해요.\n * } catch (error) {\n * console.error('권한 요청 중 오류가 발생했어요:', error);\n * }\n * };\n *\n * return (\n * <View>\n * <Text>\n * 클립보드 읽기 권한 상태: {permissionStatus ? permissionStatus : '아직 요청하지 않음'}\n * </Text>\n * <Button title=\"권한 요청하기\" onPress={handleRequestPermission} />\n * </View>\n * );\n * }\n * ```\n */\nexport declare function requestPermission(permission: {\n\tname: PermissionName$1;\n\taccess: PermissionAccess;\n}): Promise<Exclude<PermissionStatus$1, \"notDetermined\">>;\n\nexport {};\n"
45
+ },
34
46
  {
35
47
  "identifier": "setClipboardText",
36
- "dts": "/**\n * @public\n * @category 클립보드\n * @name setClipboardText\n * @description 텍스트를 클립보드에 복사해서 사용자가 다른 곳에 붙여 넣기 할 수 있어요.\n * @param {Promise<void>} text - 클립보드에 복사할 텍스트예요. 문자열 형식으로 입력해요.\n *\n * @example\n * ### 텍스트를 클립보드에 복사하기\n *\n * ```tsx\n * import { Button } from 'react-native';\n * import { setClipboardText } from '@apps-in-toss/framework';\n *\n * // '복사' 버튼을 누르면 \"복사할 텍스트\"가 클립보드에 복사돼요.\n * function CopyButton() {\n * const handleCopy = async () => {\n * try {\n * await setClipboardText('복사할 텍스트');\n * console.log('텍스트가 복사됐어요!');\n * } catch (error) {\n * console.error('텍스트 복사에 실패했어요:', error);\n * }\n * };\n *\n * return <Button title=\"복사\" onPress={handleCopy} />;\n * }\n * ```\n */\nexport declare function setClipboardText(text: string): Promise<void>;\n\nexport {};\n"
48
+ "dts": "export type SetClipboardText = (text: string) => Promise<void>;\ntype PermissionStatus$1 = \"notDetermined\" | \"denied\" | \"allowed\";\nexport type PermissionDialogFunction = () => Promise<Exclude<PermissionStatus$1, \"notDetermined\">>;\nexport type GetPermissionFunction = () => Promise<PermissionStatus$1>;\nexport type PermissionFunctionWithDialog<T extends (...args: any[]) => any> = T & {\n\tgetPermission: GetPermissionFunction;\n\topenPermissionDialog: PermissionDialogFunction;\n};\n/**\n * @public\n * @category 클립보드\n * @name setClipboardText\n * @description 텍스트를 클립보드에 복사해서 사용자가 다른 곳에 붙여 넣기 할 수 있어요.\n * @param {Promise<void>} text - 클립보드에 복사할 텍스트예요. 문자열 형식으로 입력해요.\n * @property [openPermissionDialog] - 클립보드 쓰기 권한을 다시 요청하는 다이얼로그를 표시해요. 사용자는 \"허용\", \"한 번만 허용\", \"안하기\" 중 하나를 선택할 수 있어요. \"허용\"이나 \"한 번만 허용\"을 선택하면 `allowed`를 반환하고, \"안하기\"를 선택하면 `denied`를 반환해요.\n * @property [getPermission] - 클립보드 쓰기 권한의 현재 상태를 반환해요. `allowed`는 사용자가 클립보드 쓰기 권한을 허용한 상태예요. `denied`는 사용자가 클립보드 쓰기 권한을 거부한 상태예요. `notDetermined`는 클립보드 쓰기 권한 요청을 한 번도 하지 않은 상태예요.\n *\n * @signature\n * ```typescript\n * function setClipboardText(text: string): Promise<void>;\n * ```\n *\n * @example\n * ### 텍스트를 클립보드에 복사하기\n *\n * 텍스트를 클립보드에 복사하는 예제예요.\n * \"권한 확인하기\"버튼을 눌러서 현재 클립보드 쓰기 권한을 확인해요.\n * 사용자가 권한을 거부했거나 시스템에서 권한이 제한된 경우에는 [`SetClipboardTextPermissionError`](/react-native/reference/types/권한/SetClipboardTextPermissionError)를 반환해요.\n * \"권한 요청하기\"버튼을 눌러서 클립보드 쓰기 권한을 요청할 수 있어요.\n *\n * ```tsx\n * import { setClipboardText, SetClipboardTextPermissionError } from '@apps-in-toss/framework';\n * import { Alert, Button } from 'react-native';\n *\n * // '복사' 버튼을 누르면 \"복사할 텍스트\"가 클립보드에 복사돼요.\n * function CopyButton() {\n * const handleCopy = async () => {\n * try {\n * await setClipboardText('복사할 텍스트');\n * console.log('텍스트가 복사됐어요!');\n * } catch (error) {\n * if (error instanceof SetClipboardTextPermissionError) {\n * // 텍스트 쓰기 권한 거부됨\n * }\n * }\n * };\n *\n * return (\n * <>\n * <Button title=\"복사\" onPress={handleCopy} />\n * <Button\n * title=\"권한 확인하기\"\n * onPress={async () => {\n * const permission = await setClipboardText.getPermission();\n * Alert.alert(permission);\n * }}\n * />\n * <Button\n * title=\"권한 요청하기\"\n * onPress={async () => {\n * const permission = await setClipboardText.openPermissionDialog();\n * Alert.alert(permission);\n * }}\n * />\n * </>\n * );\n * }\n * ```\n */\nexport declare const setClipboardText: PermissionFunctionWithDialog<SetClipboardText>;\n\nexport {};\n"
37
49
  },
38
50
  {
39
51
  "identifier": "getClipboardText",
40
- "dts": "/**\n * @public\n * @category 클립보드\n * @name getClipboardText\n * @description 클립보드에 저장된 텍스트를 가져오는 함수예요. 복사된 텍스트를 읽어서 다른 작업에 활용할 수 있어요.\n * @returns {Promise<string>} - 클립보드에 저장된 텍스트를 반환해요. 클립보드에 텍스트가 없으면 빈 문자열을 반환해요.\n *\n * @example\n * ### 클립보드의 텍스트 가져오기\n *\n * ```tsx\n * import React, { useState } from 'react';\n * import { View, Text, Button } from 'react-native';\n * import { getClipboardText } from '@apps-in-toss/framework';\n *\n * // '붙여넣기' 버튼을 누르면 클립보드에 저장된 텍스트를 가져와 화면에 표시해요.\n * function PasteButton() {\n * const [text, setText] = useState('');\n *\n * const handlePress = async () => {\n * try {\n * const clipboardText = await getClipboardText();\n * setText(clipboardText || '클립보드에 텍스트가 없어요.');\n * } catch (error) {\n * console.error('클립보드에서 텍스트를 가져오지 못했어요:', error);\n * }\n * };\n *\n * return (\n * <View>\n * <Text>{text}</Text>\n * <Button title=\"붙여넣기\" onPress={handlePress} />\n * </View>\n * );\n * }\n * ```\n */\nexport declare function getClipboardText(): Promise<string>;\n\nexport {};\n"
52
+ "dts": "export type GetClipboardText = () => Promise<string>;\ntype PermissionStatus$1 = \"notDetermined\" | \"denied\" | \"allowed\";\nexport type PermissionDialogFunction = () => Promise<Exclude<PermissionStatus$1, \"notDetermined\">>;\nexport type GetPermissionFunction = () => Promise<PermissionStatus$1>;\nexport type PermissionFunctionWithDialog<T extends (...args: any[]) => any> = T & {\n\tgetPermission: GetPermissionFunction;\n\topenPermissionDialog: PermissionDialogFunction;\n};\n/**\n * @public\n * @category 클립보드\n * @name getClipboardText\n * @description 클립보드에 저장된 텍스트를 가져오는 함수예요. 복사된 텍스트를 읽어서 다른 작업에 활용할 수 있어요.\n * @property [openPermissionDialog] - 클립보드 읽기 권한을 다시 요청하는 다이얼로그를 표시해요. 사용자는 \"허용\", \"한 번만 허용\", \"안하기\" 중 하나를 선택할 수 있어요. \"허용\"이나 \"한 번만 허용\"을 선택하면 `allowed`를 반환하고, \"안하기\"를 선택하면 `denied`를 반환해요.\n * @property [getPermission] - 클립보드 읽기 권한의 현재 상태를 반환해요. `allowed`는 사용자가 클립보드 읽기 권한을 허용한 상태예요. `denied`는 사용자가 클립보드 읽기 권한을 거부한 상태예요. `notDetermined`는 클립보드 읽기 권한 요청을 한 번도 하지 않은 상태예요.\n * @returns {Promise<string>} - 클립보드에 저장된 텍스트를 반환해요. 클립보드에 텍스트가 없으면 빈 문자열을 반환해요.\n *\n * @signature\n * ```typescript\n * function getClipboardText(): Promise<string>;\n * ```\n *\n * @example\n * ### 클립보드의 텍스트 가져오기\n *\n * 클립보드의 텍스트를 가져오는 예제예요.\n * \"권한 확인하기\"버튼을 눌러서 현재 클립보드 읽기 권한을 확인해요.\n * 사용자가 권한을 거부했거나 시스템에서 권한이 제한된 경우에는 [`GetClipboardTextPermissionError`](/react-native/reference/types/권한/GetClipboardTextPermissionError)를 반환해요.\n * \"권한 요청하기\"버튼을 눌러서 클립보드 읽기 권한을 요청할 수 있어요.\n *\n * ```tsx\n * import {\n * getClipboardText,\n * GetClipboardTextPermissionError,\n * SetClipboardTextPermissionError,\n * } from '@apps-in-toss/framework';\n * import { useState } from 'react';\n * import { Alert, Button, Text, View } from 'react-native'; *\n\n * // '붙여넣기' 버튼을 누르면 클립보드에 저장된 텍스트를 가져와 화면에 표시해요.\n * function PasteButton() {\n * const [text, setText] = useState(''); *\n\n * const handlePress = async () => {\n * try {\n * const clipboardText = await getClipboardText();\n * setText(clipboardText || '클립보드에 텍스트가 없어요.');\n * } catch (error) {\n * if (error instanceof GetClipboardTextPermissionError) {\n * // 클립보드 읽기 권한 없음\n * } *\n\n * if (error instanceof SetClipboardTextPermissionError) {\n * // 클립보드 쓰기 권한 없음\n * }\n * }\n * }; *\n\n * return (\n * <View>\n * <Text>{text}</Text>\n * <Button title=\"붙여넣기\" onPress={handlePress} />\n * <Button\n * title=\"권한 확인하기\"\n * onPress={async () => {\n * const permission = await getClipboardText.getPermission();\n * Alert.alert(permission);\n * }}\n * />\n * <Button\n * title=\"권한 요청하기\"\n * onPress={async () => {\n * const permission = await getClipboardText.openPermissionDialog();\n * Alert.alert(permission);\n * }}\n * />\n * </View>\n * );\n * }\n * ```\n */\nexport declare const getClipboardText: PermissionFunctionWithDialog<GetClipboardText>;\n\nexport {};\n"
41
53
  },
42
54
  {
43
55
  "identifier": "fetchContacts",
44
- "dts": "/**\n * 연락처 정보를 나타내는 타입이에요.\n */\nexport interface ContactEntity {\n\t/** 연락처 이름이에요. */\n\tname: string;\n\t/** 연락처 전화번호로, 문자열 형식이에요. */\n\tphoneNumber: string;\n}\nexport interface ContactResult {\n\tresult: ContactEntity[];\n\tnextOffset: number | null;\n\tdone: boolean;\n}\n/**\n * @public\n * @category 연락처\n * @name fetchContacts\n * @description 사용자의 연락처 목록을 페이지 단위로 가져오는 함수예요.\n * @param options - 연락처를 가져올 때 지정하는 옵션 객체예요.\n * @param options.size - 한 번에 가져올 연락처 개수예요. 예를 들어, 10을 전달하면 최대 10개의 연락처를 가져와요.\n * @param options.offset - 가져올 연락처의 시작 지점이에요. 처음 호출할 때는 `0`을 전달해야 해요. 이후에는 이전 호출에서 반환된 `nextOffset` 값을 사용해요.\n * @param options.query - 추가적인 필터링 옵션이에요.\n * @param options.query.contains - 이름에 특정 문자열이 포함된 연락처만 가져오고 싶을 때 사용해요. 이 값을 전달하지 않으면 모든 연락처를 가져와요.\n * @returns {Promise<ContactResult>}\n * 연락처 목록과 페이지네이션 정보를 포함한 객체를 반환해요.\n * - `result`: 가져온 연락처 목록이에요.\n * - `nextOffset`: 다음 호출에 사용할 오프셋 값이에요. 더 가져올 연락처가 없으면 `null`이에요.\n * - `done`: 모든 연락처를 다 가져왔는지 여부를 나타내요. 모두 가져왔다면 `true`예요.\n *\n * @signature\n * ```typescript\n * function fetchContacts(options: {\n * size: number;\n * offset: number;\n * query?: {\n * contains?: string;\n * };\n * }): Promise<ContactResult>;\n * ```\n *\n * @example\n * ### 특정 문자열이 포함된 연락처 목록 가져오기\n *\n * ```tsx\n * import React, { useState } from 'react';\n * import { View, Text, Button } from 'react-native';\n * import { fetchContacts, ContactEntity } from '@apps-in-toss/framework';\n *\n * // 특정 문자열을 포함한 연락처 목록을 가져와 화면에 표시하는 컴포넌트\n * function ContactsList() {\n * const [contacts, setContacts] = useState<{\n * result: ContactEntity[];\n * nextOffset: number | null;\n * done: boolean;\n * }>({\n * result: [],\n * nextOffset: null,\n * done: false,\n * });\n *\n * const handlePress = async () => {\n * try {\n * if (contacts.done) {\n * console.log('모든 연락처를 가져왔어요.');\n * return;\n * }\n *\n * const response = await fetchContacts({\n * size: 10,\n * offset: contacts.nextOffset ?? 0,\n * query: { contains: '김' },\n * });\n * setContacts((prev) => ({\n * result: [...prev.result, ...response.result],\n * nextOffset: response.nextOffset,\n * done: response.done,\n * }));\n * } catch (error) {\n * console.error('연락처를 가져오는 데 실패했어요:', error);\n * }\n * };\n *\n * return (\n * <View>\n * {contacts.result.map((contact, index) => (\n * <Text key={index}>{contact.name}: {contact.phoneNumber}</Text>\n * ))}\n * <Button\n * title={contacts.done ? '모든 연락처를 가져왔어요.' : '다음 연락처 가져오기'}\n * disabled={contacts.done}\n * onPress={handlePress}\n * />\n * </View>\n * );\n * }\n * ```\n */\nexport declare function fetchContacts(options: {\n\tsize: number;\n\toffset: number;\n\tquery?: {\n\t\tcontains?: string;\n\t};\n}): Promise<ContactResult>;\n\nexport {};\n"
56
+ "dts": "export interface FetchContactsOptions {\n\tsize: number;\n\toffset: number;\n\tquery?: {\n\t\tcontains?: string;\n\t};\n}\n/**\n * 연락처 정보를 나타내는 타입이에요.\n */\nexport interface ContactEntity {\n\t/** 연락처 이름이에요. */\n\tname: string;\n\t/** 연락처 전화번호로, 문자열 형식이에요. */\n\tphoneNumber: string;\n}\nexport interface ContactResult {\n\tresult: ContactEntity[];\n\tnextOffset: number | null;\n\tdone: boolean;\n}\nexport type FetchContacts = (options: FetchContactsOptions) => Promise<ContactResult>;\ntype PermissionStatus$1 = \"notDetermined\" | \"denied\" | \"allowed\";\nexport type PermissionDialogFunction = () => Promise<Exclude<PermissionStatus$1, \"notDetermined\">>;\nexport type GetPermissionFunction = () => Promise<PermissionStatus$1>;\nexport type PermissionFunctionWithDialog<T extends (...args: any[]) => any> = T & {\n\tgetPermission: GetPermissionFunction;\n\topenPermissionDialog: PermissionDialogFunction;\n};\n/**\n * @public\n * @category 연락처\n * @name fetchContacts\n * @description 사용자의 연락처 목록을 페이지 단위로 가져오는 함수예요.\n * @param options - 연락처를 가져올 때 지정하는 옵션 객체예요.\n * @param options.size - 한 번에 가져올 연락처 개수예요. 예를 들어, 10을 전달하면 최대 10개의 연락처를 가져와요.\n * @param options.offset - 가져올 연락처의 시작 지점이에요. 처음 호출할 때는 `0`을 전달해야 해요. 이후에는 이전 호출에서 반환된 `nextOffset` 값을 사용해요.\n * @param options.query - 추가적인 필터링 옵션이에요.\n * @param options.query.contains - 이름에 특정 문자열이 포함된 연락처만 가져오고 싶을 때 사용해요. 이 값을 전달하지 않으면 모든 연락처를 가져와요.\n * @property [openPermissionDialog] - 연락처 읽기 권한을 다시 요청하는 다이얼로그를 표시해요. 사용자는 \"허용\", \"한 번만 허용\", \"안하기\" 중 하나를 선택할 수 있어요. \"허용\"이나 \"한 번만 허용\"을 선택하면 `allowed`를 반환하고, \"안하기\"를 선택하면 `denied`를 반환해요.\n * @property [getPermission] - 연락처 읽기 권한의 현재 상태를 반환해요. `allowed`는 사용자가 연락처 읽기 권한을 허용한 상태예요. `denied`는 사용자가 연락처 읽기 권한을 거부한 상태예요. `notDetermined`는 연락처 읽기 권한 요청을 한 번도 하지 않은 상태예요.\n *\n * @returns {Promise<ContactResult>}\n * 연락처 목록과 페이지네이션 정보를 포함한 객체를 반환해요.\n * - `result`: 가져온 연락처 목록이에요.\n * - `nextOffset`: 다음 호출에 사용할 오프셋 값이에요. 더 가져올 연락처가 없으면 `null`이에요.\n * - `done`: 모든 연락처를 다 가져왔는지 여부를 나타내요. 모두 가져왔다면 `true`예요.\n *\n * @signature\n * ```typescript\n * function fetchContacts(options: {\n * size: number;\n * offset: number;\n * query?: {\n * contains?: string;\n * };\n * }): Promise<ContactResult>;\n * ```\n *\n * @example\n * ### 특정 문자열이 포함된 연락처 목록 가져오기\n *\n * 연락처 목록을 가져오는 예제예요.\n * \"권한 확인하기\"버튼을 눌러서 현재 연락처 읽기 권한을 확인해요.\n * 사용자가 권한을 거부했거나 시스템에서 권한이 제한된 경우에는 [`FetchContactsPermissionError`](/react-native/reference/types/권한/FetchContactsPermissionError)를 반환해요.\n * \"권한 요청하기\"버튼을 눌러서 연락처 읽기 권한을 요청할 수 있어요.\n *\n * ```tsx\n * import { ContactEntity, fetchContacts, FetchContactsPermissionError } from '@apps-in-toss/framework';\n * import { useState } from 'react';\n * import { Alert, Button, Text, View } from 'react-native';\n *\n * // 특정 문자열을 포함한 연락처 목록을 가져와 화면에 표시하는 컴포넌트\n * function ContactsList() {\n * const [contacts, setContacts] = useState<{\n * result: ContactEntity[];\n * nextOffset: number | null;\n * done: boolean;\n * }>({\n * result: [],\n * nextOffset: null,\n * done: false,\n * });\n *\n * const handlePress = async () => {\n * try {\n * if (contacts.done) {\n * console.log('모든 연락처를 가져왔어요.');\n * return;\n * }\n *\n * const response = await fetchContacts({\n * size: 10,\n * offset: contacts.nextOffset ?? 0,\n * query: { contains: '김' },\n * });\n * setContacts((prev) => ({\n * result: [...prev.result, ...response.result],\n * nextOffset: response.nextOffset,\n * done: response.done,\n * }));\n * } catch (error) {\n * if (error instanceof FetchContactsPermissionError) {\n * // 연락처 읽기 권한 없음\n * }\n * console.error('연락처를 가져오는 데 실패했어요:', error);\n * }\n * };\n *\n * return (\n * <View>\n * {contacts.result.map((contact, index) => (\n * <Text key={index}>\n * {contact.name}: {contact.phoneNumber}\n * </Text>\n * ))}\n * <Button\n * title={contacts.done ? '모든 연락처를 가져왔어요.' : '다음 연락처 가져오기'}\n * disabled={contacts.done}\n * onPress={handlePress}\n * />\n * <Button\n * title=\"권한 확인하기\"\n * onPress={async () => {\n * const permission = await fetchContacts.getPermission();\n * Alert.alert(permission);\n * }}\n * />\n * <Button\n * title=\"권한 요청하기\"\n * onPress={async () => {\n * const permission = await fetchContacts.openPermissionDialog();\n * Alert.alert(permission);\n * }}\n * />\n * </View>\n * );\n * }\n * ```\n */\nexport declare const fetchContacts: PermissionFunctionWithDialog<FetchContacts>;\n\nexport {};\n"
45
57
  },
46
58
  {
47
59
  "identifier": "fetchAlbumPhotos",
48
- "dts": "/**\n * 사진 조회 결과를 나타내는 타입이에요.\n */\nexport interface ImageResponse {\n\t/** 가져온 사진의 고유 ID예요. */\n\tid: string;\n\t/** 사진의 데이터 URI예요. `base64` 옵션이 `true`인 경우 Base64 문자열로 반환돼요. */\n\tdataUri: string;\n}\n/**\n * 앨범 사진을 조회할 사용하는 옵션 타입이에요.\n */\nexport interface FetchAlbumPhotosOptions {\n\t/** 가져올 사진의 최대 개수를 설정해요. 숫자를 입력하고 기본값은 10이에요. */\n\tmaxCount?: number;\n\t/** 사진의 최대 폭을 제한해요. 단위는 픽셀이고 기본값은 1024이에요. */\n\tmaxWidth?: number;\n\t/** 이미지를 base64 형식으로 반환할지 설정해요. 기본값은 `false`예요. */\n\tbase64?: boolean;\n}\n/**\n * @public\n * @category 사진\n * @name fetchAlbumPhotos\n * @description\n * 사용자의 앨범에서 사진 목록을 불러오는 함수예요.\n * 최대 개수와 해상도를 설정할 수 있고 갤러리 미리보기, 이미지 선택 기능 등에 활용할 수 있어요.\n *\n * @param options - 조회 옵션을 담은 객체예요.\n * @param {number} [options.maxCount=10] 가져올 사진의 최대 개수를 설정해요. 숫자로 입력하며 기본값은 10이에요.\n * @param {number} [options.maxWidth=1024] 사진의 최대 폭을 제한해요. 단위는 픽셀이며 기본값은 `1024`이에요.\n * @param {boolean} [options.base64=false] 이미지를 base64 형식으로 반환할지 설정해요. 기본값은 `false`예요.\n * @returns {Promise<ImageResponse[]>}\n * 앨범 사진의 고유 ID와 데이터 URI를 포함한 배열을 반환해요.\n *\n * @example\n * ### 사진의 최대 폭을 360px로 제한하여 가져오기\n *\n * ```tsx\n * import React, { useState } from 'react';\n * import { View, Image, Button } from 'react-native';\n * import { fetchAlbumPhotos } from '@apps-in-toss/framework';\n *\n * const base64 = true;\n *\n * // 앨범 사진 목록을 가져와 화면에 표시하는 컴포넌트\n * function AlbumPhotoList() {\n * const [albumPhotos, setAlbumPhotos] = useState([]);\n *\n * const handlePress = async () => {\n * try {\n * const response = await fetchAlbumPhotos({\n * base64,\n * maxWidth: 360,\n * });\n * setAlbumPhotos((prev) => ([...prev, ...response]));\n * } catch (error) {\n * console.error('앨범을 가져오는 데 실패했어요:', error);\n * }\n * };\n *\n * return (\n * <View>\n * {albumPhotos.map((image) => {\n * // base64 형식으로 반환된 이미지를 표시하려면 데이터 URL 스키마 Prefix를 붙여야해요.\n * const imageUri = base64 ? 'data:image/jpeg;base64,' + image.dataUri : image.dataUri;\n *\n * return <Image source={{ uri: imageUri }} key={image.id} />;\n * })}\n * <Button title=\"앨범 가져오기\" onPress={handlePress} />\n * </View>\n * );\n * }\n * ```\n */\nexport declare function fetchAlbumPhotos(options: FetchAlbumPhotosOptions): Promise<ImageResponse[]>;\n\nexport {};\n"
60
+ "dts": "/**\n * 앨범 사진을 조회할 때 사용하는 옵션 타입이에요.\n */\nexport interface FetchAlbumPhotosOptions {\n\t/** 가져올 사진의 최대 개수를 설정해요. 숫자를 입력하고 기본값은 10이에요. */\n\tmaxCount?: number;\n\t/** 사진의 최대 폭을 제한해요. 단위는 픽셀이고 기본값은 1024이에요. */\n\tmaxWidth?: number;\n\t/** 이미지를 base64 형식으로 반환할지 설정해요. 기본값은 `false`예요. */\n\tbase64?: boolean;\n}\n/**\n * 사진 조회 결과를 나타내는 타입이에요.\n */\nexport interface ImageResponse {\n\t/** 가져온 사진의 고유 ID예요. */\n\tid: string;\n\t/** 사진의 데이터 URI예요. `base64` 옵션이 `true`인 경우 Base64 문자열로 반환돼요. */\n\tdataUri: string;\n}\nexport type FetchAlbumPhotos = (options?: FetchAlbumPhotosOptions) => Promise<ImageResponse[]>;\ntype PermissionStatus$1 = \"notDetermined\" | \"denied\" | \"allowed\";\nexport type PermissionDialogFunction = () => Promise<Exclude<PermissionStatus$1, \"notDetermined\">>;\nexport type GetPermissionFunction = () => Promise<PermissionStatus$1>;\nexport type PermissionFunctionWithDialog<T extends (...args: any[]) => any> = T & {\n\tgetPermission: GetPermissionFunction;\n\topenPermissionDialog: PermissionDialogFunction;\n};\n/**\n * @public\n * @category 사진\n * @name fetchAlbumPhotos\n * @description\n * 사용자의 앨범에서 사진 목록을 불러오는 함수예요.\n * 최대 개수와 해상도를 설정할 수 있고 갤러리 미리보기, 이미지 선택 기능 등에 활용할 수 있어요.\n *\n * @param options - 조회 옵션을 담은 객체예요.\n * @param {number} [options.maxCount=10] 가져올 사진의 최대 개수를 설정해요. 숫자로 입력하며 기본값은 10이에요.\n * @param {number} [options.maxWidth=1024] 사진의 최대 폭을 제한해요. 단위는 픽셀이며 기본값은 `1024`이에요.\n * @param {boolean} [options.base64=false] 이미지를 base64 형식으로 반환할지 설정해요. 기본값은 `false`예요.\n * @property [openPermissionDialog] - 사진첩 읽기 권한을 다시 요청하는 다이얼로그를 표시해요. 사용자는 \"허용\", \"한 번만 허용\", \"안하기\" 중 하나를 선택할 수 있어요. \"허용\"이나 \"한 번만 허용\"을 선택하면 `allowed`를 반환하고, \"안하기\"를 선택하면 `denied`를 반환해요.\n * @property [getPermission] - 사진첩 읽기 권한의 현재 상태를 반환해요. `allowed`는 사용자가 사진첩 읽기 권한을 허용한 상태예요. `denied`는 사용자가 사진첩 읽기 권한을 거부한 상태예요. `notDetermined`는 사진첩 읽기 권한 요청을 한 번도 하지 않은 상태예요.\n * @returns {Promise<ImageResponse[]>}\n * 앨범 사진의 고유 ID와 데이터 URI를 포함한 배열을 반환해요.\n *\n * @signature\n * ```typescript\n * function fetchAlbumPhotos(options: {\n * maxCount: number;\n * maxWidth: number;\n * base64: boolean;\n * }): Promise<ImageResponse[]>;\n * ```\n *\n * @example\n * ### 사진의 최대 폭을 360px로 제한하여 가져오기\n *\n * 사진을 가져오는 예제예요.\n * \"권한 확인하기\"버튼을 눌러서 현재 사진첩 읽기 권한을 확인해요.\n * 사용자가 권한을 거부했거나 시스템에서 권한이 제한된 경우에는 [`FetchAlbumPhotosPermissionError`](/react-native/reference/types/권한/FetchAlbumPhotosPermissionError)를 반환해요.\n * \"권한 요청하기\"버튼을 눌러서 사진첩 읽기 권한을 요청할 수 있어요.\n *\n * ```tsx\n * import { fetchAlbumPhotos, FetchAlbumPhotosPermissionError, ImageResponse } from '@apps-in-toss/framework';\n * import { useState } from 'react';\n * import { Alert, Button, Image, View } from 'react-native';\n *\n * const base64 = true;\n *\n * // 앨범 사진 목록을 가져와 화면에 표시하는 컴포넌트\n * function AlbumPhotoList() {\n * const [albumPhotos, setAlbumPhotos] = useState<ImageResponse[]>([]);\n *\n * const handlePress = async () => {\n * try {\n * const response = await fetchAlbumPhotos({\n * base64,\n * maxWidth: 360,\n * });\n * setAlbumPhotos((prev) => [...prev, ...response]);\n * } catch (error) {\n * if (error instanceof FetchAlbumPhotosPermissionError) {\n * // 앨범 읽기 권한 없음\n * }\n * console.error('앨범을 가져오는 데 실패했어요:', error);\n * }\n * };\n *\n * return (\n * <View>\n * {albumPhotos.map((image) => {\n * // base64 형식으로 반환된 이미지를 표시하려면 데이터 URL 스키마 Prefix를 붙여야해요.\n * const imageUri = base64 ? 'data:image/jpeg;base64,' + image.dataUri : image.dataUri;\n *\n * return <Image source={{ uri: imageUri }} key={image.id} />;\n * })}\n * <Button title=\"앨범 가져오기\" onPress={handlePress} />\n * <Button\n * title=\"권한 확인하기\"\n * onPress={async () => {\n * const permission = await fetchAlbumPhotos.getPermission();\n * Alert.alert(permission);\n * }}\n * />\n * <Button\n * title=\"권한 요청하기\"\n * onPress={async () => {\n * const permission = await fetchAlbumPhotos.openPermissionDialog();\n * Alert.alert(permission);\n * }}\n * />\n * </View>\n * );\n * }\n * ```\n */\nexport declare const fetchAlbumPhotos: PermissionFunctionWithDialog<FetchAlbumPhotos>;\n\nexport {};\n"
49
61
  },
50
62
  {
51
63
  "identifier": "getCurrentLocation",
52
- "dts": "declare enum Accuracy {\n\t/**\n\t * 오차범위 3KM 이내\n\t */\n\tLowest = 1,\n\t/**\n\t * 오차범위 1KM 이내\n\t */\n\tLow = 2,\n\t/**\n\t * 오차범위 몇 백미터 이내\n\t */\n\tBalanced = 3,\n\t/**\n\t * 오차범위 10M 이내\n\t */\n\tHigh = 4,\n\t/**\n\t * 가장 높은 정확도\n\t */\n\tHighest = 5,\n\t/**\n\t * 네비게이션을 위한 최고 정확도\n\t */\n\tBestForNavigation = 6\n}\ninterface Location$1 {\n\t/**\n\t * Android에서만 지원하는 옵션이에요.\n\t *\n\t * - `FINE`: 정확한 위치\n\t * - `COARSE`: 대략적인 위치\n\t *\n\t * @see https://developer.android.com/codelabs/approximate-location\n\t */\n\taccessLocation?: \"FINE\" | \"COARSE\";\n\t/**\n\t * 위치가 업데이트된 시점의 유닉스 타임스탬프예요.\n\t */\n\ttimestamp: number;\n\t/**\n\t * @description 위치 정보를 나타내는 객체예요. 자세한 내용은 [LocationCoords](/react-native/reference/native-modules/Types/LocationCoords.html)을 참고해주세요.\n\t */\n\tcoords: LocationCoords;\n}\n/**\n * @public\n * @category 위치 정보\n * @name LocationCoords\n * @description 세부 위치 정보를 나타내는 객체예요.\n */\nexport interface LocationCoords {\n\t/**\n\t * 위도\n\t */\n\tlatitude: number;\n\t/**\n\t * 경도\n\t */\n\tlongitude: number;\n\t/**\n\t * 높이\n\t */\n\taltitude: number;\n\t/**\n\t * 위치 정확도\n\t */\n\taccuracy: number;\n\t/**\n\t * 고도 정확도\n\t */\n\taltitudeAccuracy: number;\n\t/**\n\t * 방향\n\t */\n\theading: number;\n}\nexport interface GetCurrentLocationOptions {\n\t/**\n\t * 위치 정보를 가져올 정확도 수준이에요.\n\t */\n\taccuracy: Accuracy;\n}\n/**\n * @public\n * @category 위치 정보\n * @name getCurrentLocation\n * @description 디바이스의 현재 위치 정보를 가져오는 함수예요.\n * 위치 기반 서비스를 구현할 때 사용되고, 한 번만 호출되어 현재 위치를 즉시 반환해요.\n * 예를 들어 지도 앱에서 사용자의 현재 위치를 한 번만 가져올 때, 날씨 앱에서 사용자의 위치를 기반으로 기상 정보를 제공할 때, 매장 찾기 기능에서 사용자의 위치를 기준으로 가까운 매장을 검색할 때 사용하면 유용해요.\n *\n * @param {GetCurrentLocationOptions} options 위치 정보를 가져올 때 사용하는 옵션 객체예요.\n * @param {Accuracy} [options.accuracy] 위치 정보의 정확도 수준이에요. 정확도는 `Accuracy` 타입으로 설정돼요.\n * @returns {Promise<Location>} 디바이스의 위치 정보가 담긴 객체를 반환해요. 자세한 내용은 [Location](/react-native/reference/native-modules/Types/Location.html)을 참고해주세요.\n *\n * @example\n * ### 디바이스의 현재 위치 정보 가져오기\n *\n * ```tsx\n * import React, { useState } from 'react';\n * import { View, Text, Button } from 'react-native';\n * import { getCurrentLocation } from '@apps-in-toss/framework';\n *\n * // 현재 위치 정보를 가져와 화면에 표시하는 컴포넌트\n * function CurrentPosition() {\n * const [position, setPosition] = useState(null);\n *\n * const handlePress = async () => {\n * try {\n * const response = await getCurrentLocation({ accuracy: Accuracy.Balanced });\n * setPosition(response);\n * } catch (error) {\n * console.error('위치 정보를 가져오는 데 실패했어요:', error);\n * }\n * };\n *\n * return (\n * <View>\n * {position ? (\n * <Text>위치: {position.coords.latitude}, {position.coords.longitude}</Text>\n * ) : (\n * <Text>위치 정보를 아직 가져오지 않았어요</Text>\n * )}\n * <Button title=\"현재 위치 정보 가져오기\" onPress={handlePress} />\n * </View>\n * );\n * }\n * ```\n */\nexport declare function getCurrentLocation(options: GetCurrentLocationOptions): Promise<Location$1>;\n\nexport {};\n"
64
+ "dts": "declare enum Accuracy {\n\t/**\n\t * 오차범위 3KM 이내\n\t */\n\tLowest = 1,\n\t/**\n\t * 오차범위 1KM 이내\n\t */\n\tLow = 2,\n\t/**\n\t * 오차범위 몇 백미터 이내\n\t */\n\tBalanced = 3,\n\t/**\n\t * 오차범위 10M 이내\n\t */\n\tHigh = 4,\n\t/**\n\t * 가장 높은 정확도\n\t */\n\tHighest = 5,\n\t/**\n\t * 네비게이션을 위한 최고 정확도\n\t */\n\tBestForNavigation = 6\n}\nexport interface GetCurrentLocationOptions {\n\t/**\n\t * 위치 정보를 가져올 정확도 수준이에요.\n\t */\n\taccuracy: Accuracy;\n}\ninterface Location$1 {\n\t/**\n\t * Android에서만 지원하는 옵션이에요.\n\t *\n\t * - `FINE`: 정확한 위치\n\t * - `COARSE`: 대략적인 위치\n\t *\n\t * @see https://developer.android.com/codelabs/approximate-location\n\t */\n\taccessLocation?: \"FINE\" | \"COARSE\";\n\t/**\n\t * 위치가 업데이트된 시점의 유닉스 타임스탬프예요.\n\t */\n\ttimestamp: number;\n\t/**\n\t * @description 위치 정보를 나타내는 객체예요. 자세한 내용은 [LocationCoords](/react-native/reference/native-modules/Types/LocationCoords.html)을 참고해주세요.\n\t */\n\tcoords: LocationCoords;\n}\n/**\n * @public\n * @category 위치 정보\n * @name LocationCoords\n * @description 세부 위치 정보를 나타내는 객체예요.\n */\nexport interface LocationCoords {\n\t/**\n\t * 위도\n\t */\n\tlatitude: number;\n\t/**\n\t * 경도\n\t */\n\tlongitude: number;\n\t/**\n\t * 높이\n\t */\n\taltitude: number;\n\t/**\n\t * 위치 정확도\n\t */\n\taccuracy: number;\n\t/**\n\t * 고도 정확도\n\t */\n\taltitudeAccuracy: number;\n\t/**\n\t * 방향\n\t */\n\theading: number;\n}\nexport type GetCurrentLocation = (options: GetCurrentLocationOptions) => Promise<Location$1>;\ntype PermissionStatus$1 = \"notDetermined\" | \"denied\" | \"allowed\";\nexport type PermissionDialogFunction = () => Promise<Exclude<PermissionStatus$1, \"notDetermined\">>;\nexport type GetPermissionFunction = () => Promise<PermissionStatus$1>;\nexport type PermissionFunctionWithDialog<T extends (...args: any[]) => any> = T & {\n\tgetPermission: GetPermissionFunction;\n\topenPermissionDialog: PermissionDialogFunction;\n};\n/**\n * @public\n * @category 위치 정보\n * @name getCurrentLocation\n * @description 디바이스의 현재 위치 정보를 가져오는 함수예요.\n * 위치 기반 서비스를 구현할 때 사용되고, 한 번만 호출되어 현재 위치를 즉시 반환해요.\n * 예를 들어 지도 앱에서 사용자의 현재 위치를 한 번만 가져올 때, 날씨 앱에서 사용자의 위치를 기반으로 기상 정보를 제공할 때, 매장 찾기 기능에서 사용자의 위치를 기준으로 가까운 매장을 검색할 때 사용하면 유용해요.\n *\n * @param {GetCurrentLocationOptions} options 위치 정보를 가져올 때 사용하는 옵션 객체예요.\n * @param {Accuracy} [options.accuracy] 위치 정보의 정확도 수준이에요. 정확도는 `Accuracy` 타입으로 설정돼요.\n * @property [openPermissionDialog] - 위치 정보 권한을 다시 요청하는 다이얼로그를 표시해요. 사용자는 \"허용\", \"한 번만 허용\", \"안하기\" 중 하나를 선택할 수 있어요. \"허용\"이나 \"한 번만 허용\"을 선택하면 `allowed`를 반환하고, \"안하기\"를 선택하면 `denied`를 반환해요.\n * @property [getPermission] - 위치 정보 권한의 현재 상태를 반환해요. `allowed`는 사용자가 위치 정보 권한을 허용한 상태예요. `denied`는 사용자가 위치 정보 권한을 거부한 상태예요. `notDetermined`는 위치 정보 권한 요청을 한 번도 하지 않은 상태예요.\n * @returns {Promise<Location>} 디바이스의 위치 정보가 담긴 객체를 반환해요. 자세한 내용은 [Location](/react-native/reference/native-modules/Types/Location.html)을 참고해주세요.\n *\n * @signature\n * ```typescript\n * function getCurrentLocation(options: {\n * accuracy: Accuracy;\n * }): Promise<Location>;\n * ```\n *\n * @example\n * ### 디바이스의 현재 위치 정보 가져오기\n *\n * \"권한 확인하기\"버튼을 눌러서 현재 위치정보 권한을 확인해요.\n * 사용자가 권한을 거부했거나 시스템에서 권한이 제한된 경우에는 [`GetCurrentLocationPermissionError`](/react-native/reference/types/권한/GetCurrentLocationPermissionError)를 반환해요.\n * \"권한 요청하기\"버튼을 눌러서 위치정보 권한을 요청할 수 있어요.\n *\n * ```tsx\n * import { Accuracy, getCurrentLocation, Location } from '@apps-in-toss/framework';\n * import { useState } from 'react';\n * import { Alert, Button, Text, View } from 'react-native';\n *\n * // 현재 위치 정보를 가져와 화면에 표시하는 컴포넌트\n * function CurrentPosition() {\n * const [position, setPosition] = useState<Location | null>(null);\n *\n * const handlePress = async () => {\n * try {\n * const response = await getCurrentLocation({ accuracy: Accuracy.Balanced });\n * setPosition(response);\n * } catch (error) {\n * console.error('위치 정보를 가져오는 데 실패했어요:', error);\n * }\n * };\n *\n * return (\n * <View>\n * {position ? (\n * <Text>\n * 위치: {position.coords.latitude}, {position.coords.longitude}\n * </Text>\n * ) : (\n * <Text>위치 정보를 아직 가져오지 않았어요</Text>\n * )}\n * <Button title=\"현재 위치 정보 가져오기\" onPress={handlePress} />\n * <Button\n * title=\"권한 확인하기\"\n * onPress={async () => {\n * Alert.alert(await getCurrentLocation.getPermission());\n * }}\n * />\n * <Button\n * title=\"권한 요청하기\"\n * onPress={async () => {\n * Alert.alert(await getCurrentLocation.openPermissionDialog());\n * }}\n * />\n * </View>\n * );\n * }\n *\n * ```\n */\nexport declare const getCurrentLocation: PermissionFunctionWithDialog<GetCurrentLocation>;\n\nexport {};\n"
53
65
  },
54
66
  {
55
67
  "identifier": "openCamera",
56
- "dts": "/**\n * 사진 조회 결과를 나타내는 타입이에요.\n */\nexport interface ImageResponse {\n\t/** 가져온 사진의 고유 ID예요. */\n\tid: string;\n\t/** 사진의 데이터 URI예요. `base64` 옵션이 `true`인 경우 Base64 문자열로 반환돼요. */\n\tdataUri: string;\n}\nexport interface OpenCameraOptions {\n\t/**\n\t * 이미지를 Base64 형식으로 반환할지 여부를 나타내는 불리언 값이에요.\n\t *\n\t * 기본값: `false`.\n\t */\n\tbase64?: boolean;\n\t/**\n\t * 이미지의 최대 너비를 나타내는 숫자 값이에요.\n\t *\n\t * 기본값: `1024`.\n\t */\n\tmaxWidth?: number;\n}\n/**\n * @public\n * @category 카메라\n * @name openCamera\n * @description 카메라를 실행해서 촬영된 이미지를 반환하는 함수예요.\n * @param {OpenCameraOptions} options - 카메라 실행 시 사용되는 옵션 객체예요.\n * @param {boolean} [options.base64=false] - 이미지를 Base64 형식으로 반환할지 여부를 나타내는 불리언 값이에요. 기본값은 `false`예요. `true`로 설정하면 `dataUri` 대신 Base64 인코딩된 문자열을 반환해요.\n * @param {number} [options.maxWidth=1024] - 이미지의 최대 너비를 나타내는 숫자 값이에요. 기본값은 `1024`예요.\n * @returns {Promise<ImageResponse>}\n * 촬영된 이미지 정보를 포함한 객체를 반환해요. 반환 객체의 구성은 다음과 같아요:\n * - `id`: 이미지의 고유 식별자예요.\n * - `dataUri`: 이미지 데이터를 표현하는 데이터 URI예요.\n *\n * @example\n * ### 카메라 실행 후 촬영된 사진 가져오기\n *\n * ```tsx\n * import React, { useState } from 'react';\n * import { View, Text, Button, Image } from 'react-native';\n * import { openCamera } from '@apps-in-toss/framework';\n *\n * const base64 = true;\n *\n * // 카메라를 실행하고 촬영된 이미지를 화면에 표시하는 컴포넌트\n * function Camera() {\n * const [image, setImage] = useState(null);\n *\n * const handlePress = async () => {\n * try {\n * const response = await openCamera({ base64 });\n * setImage(response);\n * } catch (error) {\n * console.error('사진을 가져오는 데 실패했어요:', error);\n * }\n * };\n *\n * // base64 형식으로 반환된 이미지를 표시하려면 데이터 URL 스키마 Prefix를 붙여야해요.\n * const imageUri = base64 ? 'data:image/jpeg;base64,' + image.dataUri : image.dataUri;\n *\n * return (\n * <View>\n * {image ? (\n * <Image source={{ uri: imageUri }} style={{ width: 200, height: 200 }} />\n * ) : (\n * <Text>사진이 없어요</Text>\n * )}\n * <Button title=\"사진 촬영하기\" onPress={handlePress} />\n * </View>\n * );\n * }\n * ```\n */\nexport declare function openCamera(options?: OpenCameraOptions): Promise<ImageResponse>;\n\nexport {};\n"
68
+ "dts": "/**\n * 사진 조회 결과를 나타내는 타입이에요.\n */\nexport interface ImageResponse {\n\t/** 가져온 사진의 고유 ID예요. */\n\tid: string;\n\t/** 사진의 데이터 URI예요. `base64` 옵션이 `true`인 경우 Base64 문자열로 반환돼요. */\n\tdataUri: string;\n}\nexport interface OpenCameraOptions {\n\t/**\n\t * 이미지를 Base64 형식으로 반환할지 여부를 나타내는 불리언 값이에요.\n\t *\n\t * 기본값: `false`.\n\t */\n\tbase64?: boolean;\n\t/**\n\t * 이미지의 최대 너비를 나타내는 숫자 값이에요.\n\t *\n\t * 기본값: `1024`.\n\t */\n\tmaxWidth?: number;\n}\nexport type OpenCamera = (options?: OpenCameraOptions) => Promise<ImageResponse>;\ntype PermissionStatus$1 = \"notDetermined\" | \"denied\" | \"allowed\";\nexport type PermissionDialogFunction = () => Promise<Exclude<PermissionStatus$1, \"notDetermined\">>;\nexport type GetPermissionFunction = () => Promise<PermissionStatus$1>;\nexport type PermissionFunctionWithDialog<T extends (...args: any[]) => any> = T & {\n\tgetPermission: GetPermissionFunction;\n\topenPermissionDialog: PermissionDialogFunction;\n};\n/**\n * @public\n * @category 카메라\n * @name openCamera\n * @description 카메라를 실행해서 촬영된 이미지를 반환하는 함수예요.\n * @param {OpenCameraOptions} options - 카메라 실행 시 사용되는 옵션 객체예요.\n * @param {boolean} [options.base64=false] - 이미지를 Base64 형식으로 반환할지 여부를 나타내는 불리언 값이에요. 기본값은 `false`예요. `true`로 설정하면 `dataUri` 대신 Base64 인코딩된 문자열을 반환해요.\n * @param {number} [options.maxWidth=1024] - 이미지의 최대 너비를 나타내는 숫자 값이에요. 기본값은 `1024`예요.\n * @property [openPermissionDialog] - 카메라 접근 권한을 다시 요청하는 다이얼로그를 표시해요. 사용자는 \"허용\", \"한 번만 허용\", \"안하기\" 중 하나를 선택할 수 있어요. \"허용\"이나 \"한 번만 허용\"을 선택하면 `allowed`를 반환하고, \"안하기\"를 선택하면 `denied`를 반환해요.\n * @property [getPermission] - 카메라 접근 권한의 현재 상태를 반환해요. `allowed`는 사용자가 카메라 접근 권한을 허용한 상태예요. `denied`는 사용자가 카메라 접근 권한을 거부한 상태예요. `notDetermined`는 카메라 접근 권한 요청을 한 번도 하지 않은 상태예요.\n * @returns {Promise<ImageResponse>}\n * 촬영된 이미지 정보를 포함한 객체를 반환해요. 반환 객체의 구성은 다음과 같아요:\n * - `id`: 이미지의 고유 식별자예요.\n * - `dataUri`: 이미지 데이터를 표현하는 데이터 URI예요.\n *\n * @signature\n * ```typescript\n * function openCamera(options: {\n * base64: boolean;\n * maxWidth: number;\n * }): Promise<ImageResponse>;\n * ```\n *\n * @example\n * ### 카메라 실행 후 촬영된 사진 가져오기\n *\n * 카메라로 사진을 찍고 결과를 가져오는 예제예요.\n * 이 과정에서 현재 카메라 권한 상태를 확인할 수 있고, 권한이 없으면 권한을 요청해요.\n * 사용자가 권한을 거부했거나 시스템에서 권한이 제한된 경우에는 [`OpenCameraPermissionError`](/react-native/reference/types/권한/OpenCameraPermissionError)를 반환해요.\n *\n * ```tsx\n * import { ImageResponse, openCamera, OpenCameraPermissionError } from '@apps-in-toss/framework';\n * import { useState } from 'react';\n * import { Alert, Button, Image, Text, View } from 'react-native';\n *\n * const base64 = true;\n *\n * // 카메라를 실행하고 촬영된 이미지를 화면에 표시하는 컴포넌트\n * function Camera() {\n * const [image, setImage] = useState<ImageResponse | null>(null);\n *\n * const handlePress = async () => {\n * try {\n * const response = await openCamera({ base64 });\n * setImage(response);\n * } catch (error) {\n * if (error instanceof OpenCameraPermissionError) {\n * console.log('권한 에러');\n * }\n *\n * console.error('사진을 가져오는 데 실패했어요:', error);\n * }\n * };\n *\n * // base64 형식으로 반환된 이미지를 표시하려면 데이터 URL 스키마 Prefix를 붙여야해요.\n * const imageUri = base64 ? 'data:image/jpeg;base64,' + image?.dataUri : image?.dataUri;\n *\n * return (\n * <View>\n * {image ? <Image source={{ uri: imageUri }} style={{ width: 200, height: 200 }} /> : <Text>사진이 없어요</Text>}\n * <Button title=\"사진 촬영하기\" onPress={handlePress} />\n * <Button\n * title=\"권한 확인하기\"\n * onPress={async () => {\n * const permission = await openCamera.getPermission();\n * Alert.alert(permission);\n * }}\n * />\n *\n * <Button\n * title=\"권한 요청하기\"\n * onPress={async () => {\n * const currentPermission = await openCamera.openPermissionDialog();\n * Alert.alert(currentPermission);\n * }}\n * />\n * </View>\n * );\n * }\n * ```\n */\nexport declare const openCamera: PermissionFunctionWithDialog<OpenCamera>;\n\nexport {};\n"
57
69
  },
58
70
  {
59
71
  "identifier": "appLogin",
@@ -115,19 +127,19 @@
115
127
  "identifier": "getDeviceId",
116
128
  "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"
117
129
  },
130
+ {
131
+ "identifier": "contactsViral",
132
+ "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"
133
+ },
118
134
  {
119
135
  "identifier": "startUpdateLocation",
120
- "dts": "import { EmitterSubscription } from 'react-native';\n\nexport interface EventEmitterSchema<K extends string, P extends unknown[]> {\n\tname: K;\n\tparams: P;\n}\ndeclare enum Accuracy {\n\t/**\n\t * 오차범위 3KM 이내\n\t */\n\tLowest = 1,\n\t/**\n\t * 오차범위 1KM 이내\n\t */\n\tLow = 2,\n\t/**\n\t * 오차범위 몇 백미터 이내\n\t */\n\tBalanced = 3,\n\t/**\n\t * 오차범위 10M 이내\n\t */\n\tHigh = 4,\n\t/**\n\t * 가장 높은 정확도\n\t */\n\tHighest = 5,\n\t/**\n\t * 네비게이션을 위한 최고 정확도\n\t */\n\tBestForNavigation = 6\n}\ninterface Location$1 {\n\t/**\n\t * Android에서만 지원하는 옵션이에요.\n\t *\n\t * - `FINE`: 정확한 위치\n\t * - `COARSE`: 대략적인 위치\n\t *\n\t * @see https://developer.android.com/codelabs/approximate-location\n\t */\n\taccessLocation?: \"FINE\" | \"COARSE\";\n\t/**\n\t * 위치가 업데이트된 시점의 유닉스 타임스탬프예요.\n\t */\n\ttimestamp: number;\n\t/**\n\t * @description 위치 정보를 나타내는 객체예요. 자세한 내용은 [LocationCoords](/react-native/reference/native-modules/Types/LocationCoords.html)을 참고해주세요.\n\t */\n\tcoords: LocationCoords;\n}\n/**\n * @public\n * @category 위치 정보\n * @name LocationCoords\n * @description 세부 위치 정보를 나타내는 객체예요.\n */\nexport interface LocationCoords {\n\t/**\n\t * 위도\n\t */\n\tlatitude: number;\n\t/**\n\t * 경도\n\t */\n\tlongitude: number;\n\t/**\n\t * 높이\n\t */\n\taltitude: number;\n\t/**\n\t * 위치 정확도\n\t */\n\taccuracy: number;\n\t/**\n\t * 고도 정확도\n\t */\n\taltitudeAccuracy: number;\n\t/**\n\t * 방향\n\t */\n\theading: number;\n}\nexport interface StartUpdateLocationOptions {\n\t/**\n\t * 위치 정확도를 설정해요.\n\t */\n\taccuracy: Accuracy;\n\t/**\n\t * 위치 업데이트 주기를 밀리초(ms) 단위로 설정해요.\n\t */\n\ttimeInterval: number;\n\t/**\n\t * 위치 변경 거리를 미터(m) 단위로 설정해요.\n\t */\n\tdistanceInterval: number;\n}\nexport interface StartUpdateLocationSubscription extends EmitterSubscription {\n\tremove: () => Promise<void>;\n}\n/**\n * @name UpdateLocationEventEmitter\n * @kind typedef\n * @description\n * 디바이스의 위치 정보 변경을 감지해요\n */\nexport type UpdateLocationEventEmitter = EventEmitterSchema<\"updateLocation\", [\n\tLocation$1\n]>;\n/**\n * @public\n * @category 위치 정보\n * @name startUpdateLocation\n * @description 디바이스의 위치 정보를 지속적으로 감지하고, 위치가 변경되면 콜백을 실행하는 함수예요. 콜백 함수를 등록하면 위치가 변경될 때마다 자동으로 호출돼요.\n * 실시간 위치 추적이 필요한 기능을 구현할 때 사용할 수 있어요. 예를 들어 지도 앱에서 사용자의 현재 위치를 실시간으로 업데이트할 때, 운동 앱에서 사용자의 이동 거리를 기록할 때 등이에요.\n * 위치 업데이트 주기와 정확도를 조정해 배터리 소모를 최소화하면서도 필요한 정보를 얻을 수 있어요.\n *\n * @param {StartUpdateLocationOptions} options - 위치 정보 감지에 필요한 설정 객체에요.\n * @param {number} [options.accuracy] 위치 정확도를 설정해요.\n * @param {number} [options.timeInterval] 위치 정보를 업데이트하는 최소 주기로, 단위는 밀리초(ms)예요. 이 값은 위치 업데이트가 발생하는 가장 짧은 간격을 설정하지만, 시스템이나 환경의 영향을 받아 지정한 주기보다 더 긴 간격으로 업데이트될 수 있어요.\n * @param {number} [options.distanceInterval] 위치 변경 거리를 미터(m) 단위로 설정해요.\n * @param {(location: Location) => void} [options.callback] 위치 정보가 변경될 호출되는 콜백 함수예요. 자세한 내용은 [Location](/react-native/reference/native-modules/Types/Location.html) 참고해주세요.\n *\n * @example\n * ### 위치 정보 변경 감지하기\n *\n * ```tsx\n * import React, { useState, useEffect } from 'react';\n * import { View, Text, Button } from 'react-native';\n * import { startUpdateLocation } from '@apps-in-toss/framework';\n *\n * // 위치 정보 변경 감지하기\n * function LocationWatcher() {\n * const [location, setLocation] = useState(null);\n *\n * useEffect(() => {\n * return startUpdateLocation({\n * options: {\n * accuracy: Accuracy.Balanced,\n * timeInterval: 3000,\n * distanceInterval: 10,\n * },\n * onEvent: (location) => {\n * setLocation(location);\n * },\n * onError: (error) => {\n * console.error('위치 정보를 가져오는데 실패했어요:', error);\n * },\n * });\n * }, []);\n *\n * if (location == null) {\n * return <Text>위치 정보를 가져오는 중이에요...</Text>;\n * }\n *\n * return (\n * <View>\n * <Text>위도: {location.coords.latitude}</Text>\n * <Text>경도: {location.coords.longitude}</Text>\n * <Text>위치 정확도: {location.coords.accuracy}m</Text>\n * <Text>높이: {location.coords.altitude}m</Text>\n * <Text>고도 정확도: {location.coords.altitudeAccuracy}m</Text>\n * <Text>방향: {location.coords.heading}°</Text>\n * </View>\n * );\n * }\n * ```\n */\nexport declare function startUpdateLocation(eventParams: {\n\tonEvent: (response: Location$1) => void;\n\tonError: (error: unknown) => void;\n\toptions: StartUpdateLocationOptions;\n}): () => void;\n\nexport {};\n"
136
+ "dts": "declare enum Accuracy {\n\t/**\n\t * 오차범위 3KM 이내\n\t */\n\tLowest = 1,\n\t/**\n\t * 오차범위 1KM 이내\n\t */\n\tLow = 2,\n\t/**\n\t * 오차범위 몇 백미터 이내\n\t */\n\tBalanced = 3,\n\t/**\n\t * 오차범위 10M 이내\n\t */\n\tHigh = 4,\n\t/**\n\t * 가장 높은 정확도\n\t */\n\tHighest = 5,\n\t/**\n\t * 네비게이션을 위한 최고 정확도\n\t */\n\tBestForNavigation = 6\n}\ninterface Location$1 {\n\t/**\n\t * Android에서만 지원하는 옵션이에요.\n\t *\n\t * - `FINE`: 정확한 위치\n\t * - `COARSE`: 대략적인 위치\n\t *\n\t * @see https://developer.android.com/codelabs/approximate-location\n\t */\n\taccessLocation?: \"FINE\" | \"COARSE\";\n\t/**\n\t * 위치가 업데이트된 시점의 유닉스 타임스탬프예요.\n\t */\n\ttimestamp: number;\n\t/**\n\t * @description 위치 정보를 나타내는 객체예요. 자세한 내용은 [LocationCoords](/react-native/reference/native-modules/Types/LocationCoords.html)을 참고해주세요.\n\t */\n\tcoords: LocationCoords;\n}\n/**\n * @public\n * @category 위치 정보\n * @name LocationCoords\n * @description 세부 위치 정보를 나타내는 객체예요.\n */\nexport interface LocationCoords {\n\t/**\n\t * 위도\n\t */\n\tlatitude: number;\n\t/**\n\t * 경도\n\t */\n\tlongitude: number;\n\t/**\n\t * 높이\n\t */\n\taltitude: number;\n\t/**\n\t * 위치 정확도\n\t */\n\taccuracy: number;\n\t/**\n\t * 고도 정확도\n\t */\n\taltitudeAccuracy: number;\n\t/**\n\t * 방향\n\t */\n\theading: number;\n}\nexport interface StartUpdateLocationOptions {\n\t/**\n\t * 위치 정확도를 설정해요.\n\t */\n\taccuracy: Accuracy;\n\t/**\n\t * 위치 업데이트 주기를 밀리초(ms) 단위로 설정해요.\n\t */\n\ttimeInterval: number;\n\t/**\n\t * 위치 변경 거리를 미터(m) 단위로 설정해요.\n\t */\n\tdistanceInterval: number;\n}\nexport type StartUpdateLocationEventParams = {\n\tonEvent: (response: Location$1) => void;\n\tonError: (error: unknown) => void;\n\toptions: StartUpdateLocationOptions;\n};\ntype PermissionStatus$1 = \"notDetermined\" | \"denied\" | \"allowed\";\nexport type PermissionDialogFunction = () => Promise<Exclude<PermissionStatus$1, \"notDetermined\">>;\nexport type GetPermissionFunction = () => Promise<PermissionStatus$1>;\nexport interface EventEmitterSchema<K extends string, P extends unknown[]> {\n\tname: K;\n\tparams: P;\n}\n/**\n * @name UpdateLocationEventEmitter\n * @kind typedef\n * @description\n * 디바이스의 위치 정보 변경을 감지해요\n */\nexport type UpdateLocationEventEmitter = EventEmitterSchema<\"updateLocation\", [\n\tLocation$1\n]>;\n/**\n * @public\n * @category 위치 정보\n * @name startUpdateLocation\n * @description 디바이스의 위치 정보를 지속적으로 감지하고, 위치가 변경되면 콜백을 실행하는 함수예요. 콜백 함수를 등록하면 위치가 변경될 때마다 자동으로 호출돼요.\n * 실시간 위치 추적이 필요한 기능을 구현할 때 사용할 수 있어요. 예를 들어 지도 앱에서 사용자의 현재 위치를 실시간으로 업데이트할 때, 운동 앱에서 사용자의 이동 거리를 기록할 때 등이에요.\n * 위치 업데이트 주기와 정확도를 조정해 배터리 소모를 최소화하면서도 필요한 정보를 얻을 수 있어요.\n *\n *\n * @param {(error: unknown) => void} onError 위치 정보 감지에 실패했을 때 호출되는 콜백 함수예요.\n * @param {(location: Location) => void} onEvent 위치 정보가 변경될 때 호출되는 콜백 함수예요. 자세한 내용은 [Location](/react-native/reference/native-modules/Types/Location.html)을 참고해주세요.\n * @param {StartUpdateLocationOptions} options - 위치 정보 감지에 필요한 설정 객체에요.\n * @param {number} [options.accuracy] 위치 정확도를 설정해요.\n * @param {number} [options.timeInterval] 위치 정보를 업데이트하는 최소 주기로, 단위는 밀리초(ms)예요. 이 값은 위치 업데이트가 발생하는 가장 짧은 간격을 설정하지만, 시스템이나 환경의 영향을 받아 지정한 주기보다 더 긴 간격으로 업데이트될 수 있어요.\n * @param {number} [options.distanceInterval] 위치 변경 거리를 미터(m) 단위로 설정해요.\n *\n * @property [openPermissionDialog] - 위치 정보 권한을 다시 요청하는 다이얼로그를 표시해요. 사용자는 \"허용\", \"한 번만 허용\", \"안하기\" 중 하나를 선택할 수 있어요. \"허용\"이나 \"한 번만 허용\"을 선택하면 `allowed`를 반환하고, \"안하기\"를 선택하면 `denied`를 반환해요.\n * @property [getPermission] - 위치 정보 권한의 현재 상태를 반환해요. `allowed`는 사용자가 위치 정보 권한을 허용한 상태예요. `denied`는 사용자가 위치 정보 권한을 거부한 상태예요. `notDetermined`는 위치 정보 권한 요청을 한 번도 하지 않은 상태예요.\n *\n * @signature\n * ```typescript\n * function startUpdateLocation(options: {\n * onError: (error: unknown) => void;\n * onEvent: (location: Location) => void;\n * options: StartUpdateLocationOptions;\n * }): () => void;\n * ```\n *\n * @example\n * ### 위치 정보 변경 감지하기\n *\n * 위치 정보가 변경되는것을 감지하는 예제예요. \"위치 정보 변경 감지하기\"를 눌러서 감지할 수 있어요.\n *\n * \"권한 확인하기\"버튼을 눌러서 현재 위치 정보 변경 감지 권한을 확인해요.\n * 사용자가 권한을 거부했거나 시스템에서 권한이 제한된 경우에는 [`StartUpdateLocationPermissionError`](/react-native/reference/types/권한/StartUpdateLocationPermissionError) 반환해요.\n * \"권한 요청하기\"버튼을 눌러서 위치 정보 변경 감지 권한을 요청할 수 있어요.\n *\n * ```tsx\n * import { Accuracy, Location, startUpdateLocation, StartUpdateLocationPermissionError } from '@apps-in-toss/framework';\n * import { useCallback, useState } from 'react';\n * import { Alert, Button, Text, View } from 'react-native';\n *\n * // 위치 정보 변경 감지하기\n * function LocationWatcher() {\n * const [location, setLocation] = useState<Location | null>(null);\n *\n * const handlePress = useCallback(() => {\n * startUpdateLocation({\n * options: {\n * accuracy: Accuracy.Balanced,\n * timeInterval: 3000,\n * distanceInterval: 10,\n * },\n * onEvent: (location) => {\n * setLocation(location);\n * },\n * onError: (error) => {\n * if (error instanceof StartUpdateLocationPermissionError) {\n * // 위치 정보 변경 감지 권한 없음\n * }\n * console.error('위치 정보를 가져오는데 실패했어요:', error);\n * },\n * });\n * }, []);\n *\n * return (\n * <View>\n * {location != null && (\n * <>\n * <Text>위도: {location.coords.latitude}</Text>\n * <Text>경도: {location.coords.longitude}</Text>\n * <Text>위치 정확도: {location.coords.accuracy}m</Text>\n * <Text>높이: {location.coords.altitude}m</Text>\n * <Text>고도 정확도: {location.coords.altitudeAccuracy}m</Text>\n * <Text>방향: {location.coords.heading}°</Text>\n * </>\n * )}\n *\n * <Button title=\"위치 정보 변경 감지하기\" onPress={handlePress} />\n *\n * <Button\n * title=\"권한 확인하기\"\n * onPress={async () => {\n * const permission = await startUpdateLocation.getPermission();\n * Alert.alert(permission);\n * }}\n * />\n * <Button\n * title=\"권한 요청하기\"\n * onPress={async () => {\n * const permission = await startUpdateLocation.openPermissionDialog();\n * Alert.alert(permission);\n * }}\n * />\n * </View>\n * );\n * }\n * ```\n */\nexport declare function startUpdateLocation(eventParams: StartUpdateLocationEventParams): () => void;\nexport declare namespace startUpdateLocation {\n\tvar openPermissionDialog: PermissionDialogFunction;\n\tvar getPermission: GetPermissionFunction;\n}\n\nexport {};\n"
121
137
  },
122
138
  {
123
139
  "identifier": "onVisibilityChangedByTransparentServiceWeb",
124
140
  "dts": "import { EmitterSubscription } from 'react-native';\n\nexport interface EventEmitterSchema<K extends string, P extends unknown[]> {\n\tname: K;\n\tparams: P;\n}\nexport interface OnVisibilityChangedByTransparentServiceWebSubscription extends EmitterSubscription {\n\tremove: () => void;\n}\nexport type OnVisibilityChangedByTransparentServiceWebEventEmitter = EventEmitterSchema<\"visibilityChangedByTransparentServiceWeb\", [\n\tboolean\n]>;\nexport declare function onVisibilityChangedByTransparentServiceWeb(eventParams: {\n\toptions: {\n\t\tcallbackId: string;\n\t};\n\tonEvent: (isVisible: boolean) => void;\n\tonError: (error: unknown) => void;\n}): () => void;\n\nexport {};\n"
125
141
  },
126
142
  {
127
- "identifier": "contactsViral",
128
- "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"
129
- },
130
- {
131
- "dts": "type PermissionStatus$1 = \"notDetermined\" | \"denied\" | \"allowed\";\nexport type PermissionAccess = \"read\" | \"write\" | \"access\";\ntype PermissionName$1 = \"clipboard\" | \"contacts\" | \"photos\" | \"geolocation\" | \"camera\";\nexport type Primitive = string | number | boolean | null | undefined | symbol;\n/**\n * @public\n * @category 위치 정보\n * @name Accuracy\n * @description 위치 정확도 옵션이에요.\n */\nexport declare enum Accuracy {\n\t/**\n\t * 오차범위 3KM 이내\n\t */\n\tLowest = 1,\n\t/**\n\t * 오차범위 1KM 이내\n\t */\n\tLow = 2,\n\t/**\n\t * 오차범위 몇 백미터 이내\n\t */\n\tBalanced = 3,\n\t/**\n\t * 오차범위 10M 이내\n\t */\n\tHigh = 4,\n\t/**\n\t * 가장 높은 정확도\n\t */\n\tHighest = 5,\n\t/**\n\t * 네비게이션을 위한 최고 정확도\n\t */\n\tBestForNavigation = 6\n}\n/**\n * @public\n * @category 위치 정보\n * @name Location\n * @description 위치 정보를 나타내는 객체예요.\n */\ninterface Location$1 {\n\t/**\n\t * Android에서만 지원하는 옵션이에요.\n\t *\n\t * - `FINE`: 정확한 위치\n\t * - `COARSE`: 대략적인 위치\n\t *\n\t * @see https://developer.android.com/codelabs/approximate-location\n\t */\n\taccessLocation?: \"FINE\" | \"COARSE\";\n\t/**\n\t * 위치가 업데이트된 시점의 유닉스 타임스탬프예요.\n\t */\n\ttimestamp: number;\n\t/**\n\t * @description 위치 정보를 나타내는 객체예요. 자세한 내용은 [LocationCoords](/react-native/reference/native-modules/Types/LocationCoords.html)을 참고해주세요.\n\t */\n\tcoords: LocationCoords;\n}\n/**\n * @public\n * @category 위치 정보\n * @name LocationCoords\n * @description 세부 위치 정보를 나타내는 객체예요.\n */\nexport interface LocationCoords {\n\t/**\n\t * 위도\n\t */\n\tlatitude: number;\n\t/**\n\t * 경도\n\t */\n\tlongitude: number;\n\t/**\n\t * 높이\n\t */\n\taltitude: number;\n\t/**\n\t * 위치 정확도\n\t */\n\taccuracy: number;\n\t/**\n\t * 고도 정확도\n\t */\n\taltitudeAccuracy: number;\n\t/**\n\t * 방향\n\t */\n\theading: number;\n}\n/**\n * 사진 조회 결과를 나타내는 타입이에요.\n */\nexport interface ImageResponse {\n\t/** 가져온 사진의 고유 ID예요. */\n\tid: string;\n\t/** 사진의 데이터 URI예요. `base64` 옵션이 `true`인 경우 Base64 문자열로 반환돼요. */\n\tdataUri: string;\n}\n\nexport {\n\tLocation$1 as Location,\n\tPermissionName$1 as PermissionName,\n\tPermissionStatus$1 as PermissionStatus,\n};\n\nexport {};\n"
143
+ "dts": "export type Primitive = string | number | boolean | null | undefined | symbol;\n\nexport {};\n"
132
144
  }
133
145
  ]