@apps-in-toss/framework 0.0.31 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -611,7 +611,7 @@ interface LoadAdMobRewardedAdOptions {
611
611
  /**
612
612
  * @public
613
613
  * @category 광고
614
- * @name LoadAdMobInterstitialAdEvent
614
+ * @name LoadAdMobRewardedAdEvent
615
615
  * @description 보상형 광고를 불러오는 함수에서 발생하는 이벤트 타입이에요. `loaded` 이벤트가 발생하면 광고를 성공적으로 불러온 거예요. 이때 [RewardedAd](/react-native/reference/framework/광고/RewardedAd.html) 객체가 함께 반환돼요. `userEarnedReward` 이벤트는 사용자가 광고를 끝까지 시청해, 보상 조건을 충족했을 때 발생해요.
616
616
  */
617
617
  type LoadAdMobRewardedAdEvent = AdMobFullScreenEvent | {
@@ -961,73 +961,144 @@ declare function checkoutPayment(options: CheckoutPaymentOptions): Promise<Check
961
961
 
962
962
  /**
963
963
  * @public
964
- * @category 클립보드
965
- * @name setClipboardText
966
- * @description 텍스트를 클립보드에 복사해서 사용자가 다른 곳에 붙여 넣기 할 수 있어요.
967
- * @param {Promise<void>} text - 클립보드에 복사할 텍스트예요. 문자열 형식으로 입력해요.
968
- *
964
+ * @category 로그인
965
+ * @name appLogin
966
+ * @description 토스 인증으로 로그인해요. 로그인이 완료되면 다시 토스 앱으로 이동해요.
969
967
  * @example
970
- * ### 텍스트를 클립보드에 복사하기
968
+ *
969
+ * ### 토스 인증을 통해 로그인을 하는 예제
971
970
  *
972
971
  * ```tsx
973
972
  * import { Button } from 'react-native';
974
- * import { setClipboardText } from '@apps-in-toss/framework';
973
+ * import { appLogin } from '@apps-in-toss/framework';
975
974
  *
976
- * // '복사' 버튼을 누르면 "복사할 텍스트"가 클립보드에 복사돼요.
977
- * function CopyButton() {
978
- * const handleCopy = async () => {
979
- * try {
980
- * await setClipboardText('복사할 텍스트');
981
- * console.log('텍스트가 복사됐어요!');
982
- * } catch (error) {
983
- * console.error('텍스트 복사에 실패했어요:', error);
984
- * }
985
- * };
975
+ * function Page() {
976
+ * const handleLogin = async () => {
977
+ * const { authorizationCode, referrer } = await appLogin();
986
978
  *
987
- * return <Button title="복사" onPress={handleCopy} />;
979
+ * // 획득한 인가 코드(`authorizationCode`)와 `referrer`를 서버로 전달해요.
980
+ * }
981
+ *
982
+ * return <Button title="로그인" onPress={handleLogin} />;
988
983
  * }
989
984
  * ```
990
985
  */
991
- declare function setClipboardText(text: string): Promise<void>;
986
+ declare function appLogin(): Promise<{
987
+ authorizationCode: string;
988
+ referrer: "DEFAULT" | "SANDBOX";
989
+ }>;
990
+
991
+ type Primitive = string | number | boolean | null | undefined | symbol;
992
+
993
+ interface EventLogParams {
994
+ log_name: string;
995
+ log_type: 'debug' | 'info' | 'warn' | 'error' | 'screen' | 'impression' | 'click';
996
+ params: Record<string, Primitive>;
997
+ }
998
+ /**
999
+ * @category 로깅
1000
+ * @kind function
1001
+ * @name eventLog
1002
+ * @description
1003
+ * 이벤트 로그를 기록하는 함수예요.
1004
+ *
1005
+ * 이 함수는 앱 내에서 발생하는 다양한 이벤트를 로깅하는 데 사용돼요. 디버깅, 정보 제공, 경고, 오류 등 다양한 유형의 로그를 기록할 수 있어요. 샌드박스 환경에서는 콘솔에 로그가 출력되고, 실제 환경에서는 로그 시스템에 기록돼요.
1006
+ *
1007
+ * @param {Object} params 로그 기록에 필요한 매개변수 객체예요.
1008
+ * @param {string} params.log_name 로그의 이름이에요.
1009
+ * @param {'debug' | 'info' | 'warn' | 'error' | 'screen' | 'impression' | 'click'} params.log_type 로그의 유형이에요.
1010
+ * @param {Record<string, Primitive>} params.params 로그에 포함할 추가 매개변수 객체예요.
1011
+ *
1012
+ * @returns {Promise<void>} 로그 기록이 완료되면 해결되는 Promise예요.
1013
+ *
1014
+ * @example
1015
+ * ### 이벤트 로그 기록하기
1016
+ *
1017
+ * ```tsx
1018
+ * import { eventLog } from '@apps-in-toss/framework';
1019
+ *
1020
+ * function logUserAction() {
1021
+ * eventLog({
1022
+ * log_name: 'user_action',
1023
+ * log_type: 'info',
1024
+ * params: {
1025
+ * action: 'button_click',
1026
+ * screen: 'main',
1027
+ * userId: 12345
1028
+ * }
1029
+ * });
1030
+ * }
1031
+ * ```
1032
+ */
1033
+ declare function eventLog(params: EventLogParams): Promise<void>;
992
1034
 
1035
+ /**
1036
+ * 앨범 사진을 조회할 때 사용하는 옵션 타입이에요.
1037
+ */
1038
+ interface FetchAlbumPhotosOptions {
1039
+ /** 가져올 사진의 최대 개수를 설정해요. 숫자를 입력하고 기본값은 10이에요. */
1040
+ maxCount?: number;
1041
+ /** 사진의 최대 폭을 제한해요. 단위는 픽셀이고 기본값은 1024이에요. */
1042
+ maxWidth?: number;
1043
+ /** 이미지를 base64 형식으로 반환할지 설정해요. 기본값은 `false`예요. */
1044
+ base64?: boolean;
1045
+ }
993
1046
  /**
994
1047
  * @public
995
- * @category 클립보드
996
- * @name getClipboardText
997
- * @description 클립보드에 저장된 텍스트를 가져오는 함수예요. 복사된 텍스트를 읽어서 다른 작업에 활용할 수 있어요.
998
- * @returns {Promise<string>} - 클립보드에 저장된 텍스트를 반환해요. 클립보드에 텍스트가 없으면 빈 문자열을 반환해요.
1048
+ * @category 사진
1049
+ * @name fetchAlbumPhotos
1050
+ * @description
1051
+ * 사용자의 앨범에서 사진 목록을 불러오는 함수예요.
1052
+ * 최대 개수와 해상도를 설정할 수 있고 갤러리 미리보기, 이미지 선택 기능 등에 활용할 수 있어요.
1053
+ *
1054
+ * @param options - 조회 옵션을 담은 객체예요.
1055
+ * @param {number} [options.maxCount=10] 가져올 사진의 최대 개수를 설정해요. 숫자로 입력하며 기본값은 10이에요.
1056
+ * @param {number} [options.maxWidth=1024] 사진의 최대 폭을 제한해요. 단위는 픽셀이며 기본값은 `1024`이에요.
1057
+ * @param {boolean} [options.base64=false] 이미지를 base64 형식으로 반환할지 설정해요. 기본값은 `false`예요.
1058
+ * @returns {Promise<ImageResponse[]>}
1059
+ * 앨범 사진의 고유 ID와 데이터 URI를 포함한 배열을 반환해요.
999
1060
  *
1000
1061
  * @example
1001
- * ### 클립보드의 텍스트 가져오기
1062
+ * ### 사진의 최대 폭을 360px로 제한하여 가져오기
1002
1063
  *
1003
1064
  * ```tsx
1004
1065
  * import React, { useState } from 'react';
1005
- * import { View, Text, Button } from 'react-native';
1006
- * import { getClipboardText } from '@apps-in-toss/framework';
1066
+ * import { View, Image, Button } from 'react-native';
1067
+ * import { fetchAlbumPhotos } from '@apps-in-toss/framework';
1007
1068
  *
1008
- * // '붙여넣기' 버튼을 누르면 클립보드에 저장된 텍스트를 가져와 화면에 표시해요.
1009
- * function PasteButton() {
1010
- * const [text, setText] = useState('');
1069
+ * const base64 = true;
1070
+ *
1071
+ * // 앨범 사진 목록을 가져와 화면에 표시하는 컴포넌트
1072
+ * function AlbumPhotoList() {
1073
+ * const [albumPhotos, setAlbumPhotos] = useState([]);
1011
1074
  *
1012
1075
  * const handlePress = async () => {
1013
1076
  * try {
1014
- * const clipboardText = await getClipboardText();
1015
- * setText(clipboardText || '클립보드에 텍스트가 없어요.');
1077
+ * const response = await fetchAlbumPhotos({
1078
+ * base64,
1079
+ * maxWidth: 360,
1080
+ * });
1081
+ * setAlbumPhotos((prev) => ([...prev, ...response]));
1016
1082
  * } catch (error) {
1017
- * console.error('클립보드에서 텍스트를 가져오지 못했어요:', error);
1083
+ * console.error('앨범을 가져오는 실패했어요:', error);
1018
1084
  * }
1019
1085
  * };
1020
1086
  *
1021
1087
  * return (
1022
1088
  * <View>
1023
- * <Text>{text}</Text>
1024
- * <Button title="붙여넣기" onPress={handlePress} />
1089
+ * {albumPhotos.map((image) => {
1090
+ * // base64 형식으로 반환된 이미지를 표시하려면 데이터 URL 스키마 Prefix를 붙여야해요.
1091
+ * const imageUri = base64 ? 'data:image/jpeg;base64,' + image.dataUri : image.dataUri;
1092
+ *
1093
+ * return <Image source={{ uri: imageUri }} key={image.id} />;
1094
+ * })}
1095
+ * <Button title="앨범 가져오기" onPress={handlePress} />
1025
1096
  * </View>
1026
1097
  * );
1027
1098
  * }
1028
1099
  * ```
1029
1100
  */
1030
- declare function getClipboardText(): Promise<string>;
1101
+ declare function fetchAlbumPhotos(options: FetchAlbumPhotosOptions): Promise<ImageResponse[]>;
1031
1102
 
1032
1103
  /**
1033
1104
  * 연락처 정보를 나타내는 타입이에요.
@@ -1137,73 +1208,44 @@ declare function fetchContacts({ size, offset, query, }: {
1137
1208
  done: boolean;
1138
1209
  }>;
1139
1210
 
1140
- /**
1141
- * 앨범 사진을 조회할 때 사용하는 옵션 타입이에요.
1142
- */
1143
- interface FetchAlbumPhotosOptions {
1144
- /** 가져올 사진의 최대 개수를 설정해요. 숫자를 입력하고 기본값은 10이에요. */
1145
- maxCount?: number;
1146
- /** 사진의 최대 폭을 제한해요. 단위는 픽셀이고 기본값은 1024이에요. */
1147
- maxWidth?: number;
1148
- /** 이미지를 base64 형식으로 반환할지 설정해요. 기본값은 `false`예요. */
1149
- base64?: boolean;
1150
- }
1151
1211
  /**
1152
1212
  * @public
1153
- * @category 사진
1154
- * @name fetchAlbumPhotos
1155
- * @description
1156
- * 사용자의 앨범에서 사진 목록을 불러오는 함수예요.
1157
- * 최대 개수와 해상도를 설정할 수 있고 갤러리 미리보기, 이미지 선택 기능 등에 활용할 수 있어요.
1158
- *
1159
- * @param options - 조회 옵션을 담은 객체예요.
1160
- * @param {number} [options.maxCount=10] 가져올 사진의 최대 개수를 설정해요. 숫자로 입력하며 기본값은 10이에요.
1161
- * @param {number} [options.maxWidth=1024] 사진의 최대 폭을 제한해요. 단위는 픽셀이며 기본값은 `1024`이에요.
1162
- * @param {boolean} [options.base64=false] 이미지를 base64 형식으로 반환할지 설정해요. 기본값은 `false`예요.
1163
- * @returns {Promise<ImageResponse[]>}
1164
- * 앨범 사진의 고유 ID와 데이터 URI를 포함한 배열을 반환해요.
1213
+ * @category 클립보드
1214
+ * @name getClipboardText
1215
+ * @description 클립보드에 저장된 텍스트를 가져오는 함수예요. 복사된 텍스트를 읽어서 다른 작업에 활용할 수 있어요.
1216
+ * @returns {Promise<string>} - 클립보드에 저장된 텍스트를 반환해요. 클립보드에 텍스트가 없으면 빈 문자열을 반환해요.
1165
1217
  *
1166
1218
  * @example
1167
- * ### 사진의 최대 폭을 360px로 제한하여 가져오기
1219
+ * ### 클립보드의 텍스트 가져오기
1168
1220
  *
1169
1221
  * ```tsx
1170
1222
  * import React, { useState } from 'react';
1171
- * import { View, Image, Button } from 'react-native';
1172
- * import { fetchAlbumPhotos } from '@apps-in-toss/framework';
1173
- *
1174
- * const base64 = true;
1223
+ * import { View, Text, Button } from 'react-native';
1224
+ * import { getClipboardText } from '@apps-in-toss/framework';
1175
1225
  *
1176
- * // 앨범 사진 목록을 가져와 화면에 표시하는 컴포넌트
1177
- * function AlbumPhotoList() {
1178
- * const [albumPhotos, setAlbumPhotos] = useState([]);
1226
+ * // '붙여넣기' 버튼을 누르면 클립보드에 저장된 텍스트를 가져와 화면에 표시해요.
1227
+ * function PasteButton() {
1228
+ * const [text, setText] = useState('');
1179
1229
  *
1180
1230
  * const handlePress = async () => {
1181
1231
  * try {
1182
- * const response = await fetchAlbumPhotos({
1183
- * base64,
1184
- * maxWidth: 360,
1185
- * });
1186
- * setAlbumPhotos((prev) => ([...prev, ...response]));
1232
+ * const clipboardText = await getClipboardText();
1233
+ * setText(clipboardText || '클립보드에 텍스트가 없어요.');
1187
1234
  * } catch (error) {
1188
- * console.error('앨범을 가져오는 실패했어요:', error);
1235
+ * console.error('클립보드에서 텍스트를 가져오지 못했어요:', error);
1189
1236
  * }
1190
1237
  * };
1191
1238
  *
1192
1239
  * return (
1193
1240
  * <View>
1194
- * {albumPhotos.map((image) => {
1195
- * // base64 형식으로 반환된 이미지를 표시하려면 데이터 URL 스키마 Prefix를 붙여야해요.
1196
- * const imageUri = base64 ? 'data:image/jpeg;base64,' + image.dataUri : image.dataUri;
1197
- *
1198
- * return <Image source={{ uri: imageUri }} key={image.id} />;
1199
- * })}
1200
- * <Button title="앨범 가져오기" onPress={handlePress} />
1241
+ * <Text>{text}</Text>
1242
+ * <Button title="붙여넣기" onPress={handlePress} />
1201
1243
  * </View>
1202
1244
  * );
1203
1245
  * }
1204
1246
  * ```
1205
1247
  */
1206
- declare function fetchAlbumPhotos(options: FetchAlbumPhotosOptions): Promise<ImageResponse[]>;
1248
+ declare function getClipboardText(): Promise<string>;
1207
1249
 
1208
1250
  interface GetCurrentLocationOptions {
1209
1251
  /**
@@ -1259,102 +1301,35 @@ interface GetCurrentLocationOptions {
1259
1301
  */
1260
1302
  declare function getCurrentLocation(options: GetCurrentLocationOptions): Promise<Location>;
1261
1303
 
1262
- interface OpenCameraOptions {
1263
- /**
1264
- * 이미지를 Base64 형식으로 반환할지 여부를 나타내는 불리언 값이에요.
1265
- *
1266
- * 기본값: `false`.
1267
- */
1268
- base64?: boolean;
1269
- /**
1270
- * 이미지의 최대 너비를 나타내는 숫자 값이에요.
1271
- *
1272
- * 기본값: `1024`.
1273
- */
1274
- maxWidth?: number;
1275
- }
1276
1304
  /**
1277
1305
  * @public
1278
- * @category 카메라
1279
- * @name openCamera
1280
- * @description 카메라를 실행해서 촬영된 이미지를 반환하는 함수예요.
1281
- * @param {OpenCameraOptions} options - 카메라 실행 시 사용되는 옵션 객체예요.
1282
- * @param {boolean} [options.base64=false] - 이미지를 Base64 형식으로 반환할지 여부를 나타내는 불리언 값이에요. 기본값은 `false`예요. `true`로 설정하면 `dataUri` 대신 Base64 인코딩된 문자열을 반환해요.
1283
- * @param {number} [options.maxWidth=1024] - 이미지의 최대 너비를 나타내는 숫자 값이에요. 기본값은 `1024`예요.
1284
- * @returns {Promise<ImageResponse>}
1285
- * 촬영된 이미지 정보를 포함한 객체를 반환해요. 반환 객체의 구성은 다음과 같아요:
1286
- * - `id`: 이미지의 고유 식별자예요.
1287
- * - `dataUri`: 이미지 데이터를 표현하는 데이터 URI예요.
1306
+ * @category 환경 확인
1307
+ * @kind function
1308
+ * @name getDeviceId
1309
+ * @description
1310
+ * 사용 중인 기기의 고유 식별자를 문자열로 반환해요.
1311
+ *
1312
+ * 함수는 현재 사용 중인 기기의 고유 식별자를 문자열로 반환해요. 기기별로 설정이나 데이터를 저장하거나 사용자의 기기를 식별해서 로그를 기록하고 분석하는 데 사용할 수 있어요. 같은 사용자의 여러 기기를 구분하는 데도 유용해요.
1313
+ *
1314
+ * @returns {string} 기기의 고유 식별자를 나타내는 문자열이에요.
1288
1315
  *
1289
1316
  * @example
1290
- * ### 카메라 실행 촬영된 사진 가져오기
1317
+ * ### 기기 고유 식별자 가져오기
1291
1318
  *
1292
1319
  * ```tsx
1293
- * import React, { useState } from 'react';
1294
- * import { View, Text, Button, Image } from 'react-native';
1295
- * import { openCamera } from '@apps-in-toss/framework';
1296
- *
1297
- * const base64 = true;
1320
+ * import { getDeviceId } from '@apps-in-toss/framework';
1321
+ * import { Text } from 'react-native';
1298
1322
  *
1299
- * // 카메라를 실행하고 촬영된 이미지를 화면에 표시하는 컴포넌트
1300
- * function Camera() {
1301
- * const [image, setImage] = useState(null);
1302
- *
1303
- * const handlePress = async () => {
1304
- * try {
1305
- * const response = await openCamera({ base64 });
1306
- * setImage(response);
1307
- * } catch (error) {
1308
- * console.error('사진을 가져오는 데 실패했어요:', error);
1309
- * }
1310
- * };
1311
- *
1312
- * // base64 형식으로 반환된 이미지를 표시하려면 데이터 URL 스키마 Prefix를 붙여야해요.
1313
- * const imageUri = base64 ? 'data:image/jpeg;base64,' + image.dataUri : image.dataUri;
1323
+ * function MyPage() {
1324
+ * const id = getDeviceId();
1314
1325
  *
1315
1326
  * return (
1316
- * <View>
1317
- * {image ? (
1318
- * <Image source={{ uri: imageUri }} style={{ width: 200, height: 200 }} />
1319
- * ) : (
1320
- * <Text>사진이 없어요</Text>
1321
- * )}
1322
- * <Button title="사진 촬영하기" onPress={handlePress} />
1323
- * </View>
1327
+ * <Text>사용자의 기기 고유 식별자: {id}</Text>
1324
1328
  * );
1325
1329
  * }
1326
1330
  * ```
1327
1331
  */
1328
- declare function openCamera(options?: OpenCameraOptions): Promise<ImageResponse>;
1329
-
1330
- /**
1331
- * @public
1332
- * @category 로그인
1333
- * @name appLogin
1334
- * @description 토스 인증으로 로그인해요. 로그인이 완료되면 다시 토스 앱으로 이동해요.
1335
- * @example
1336
- *
1337
- * ### 토스 인증을 통해 로그인을 하는 예제
1338
- *
1339
- * ```tsx
1340
- * import { Button } from 'react-native';
1341
- * import { appLogin } from '@apps-in-toss/framework';
1342
- *
1343
- * function Page() {
1344
- * const handleLogin = async () => {
1345
- * const { authorizationCode, referrer } = await appLogin();
1346
- *
1347
- * // 획득한 인가 코드(`authorizationCode`)와 `referrer`를 서버로 전달해요.
1348
- * }
1349
- *
1350
- * return <Button title="로그인" onPress={handleLogin} />;
1351
- * }
1352
- * ```
1353
- */
1354
- declare function appLogin(): Promise<{
1355
- authorizationCode: string;
1356
- referrer: "DEFAULT" | "SANDBOX";
1357
- }>;
1332
+ declare function getDeviceId(): string;
1358
1333
 
1359
1334
  /**
1360
1335
  * @public
@@ -1422,116 +1397,189 @@ declare function getTossAppVersion(): string;
1422
1397
 
1423
1398
  /**
1424
1399
  * @public
1425
- * @category 환경 확인
1400
+ * @category 공유
1426
1401
  * @kind function
1427
- * @name getDeviceId
1402
+ * @name getTossShareLink
1428
1403
  * @description
1429
- * 사용 중인 기기의 고유 식별자를 문자열로 반환해요.
1404
+ * `getTossShareLink` 함수는 사용자가 지정한 경로를 토스 앱에서 열 수 있는 공유 링크를 반환해요.
1405
+ * 이 링크를 다른 사람과 공유하면 토스 앱이 실행되면서 지정한 경로로 진입해요. 토스앱이 없는 사람은 iOS 일 때는 앱스토어로 이동하고, Android 일 때는 플레이스토어로 이동해요.
1430
1406
  *
1431
- * 함수는 현재 사용 중인 기기의 고유 식별자를 문자열로 반환해요. 기기별로 설정이나 데이터를 저장하거나 사용자의 기기를 식별해서 로그를 기록하고 분석하는 데 사용할 수 있어요. 같은 사용자의 여러 기기를 구분하는 데도 유용해요.
1407
+ * 경로는 토스 내부 특정 화면을 나타내는 딥링크(deep link) 형식이어야 해요.
1408
+ * 예를 들어 `intoss://<앱 이름>`이나 `intoss://<앱 이름>/about?name=test`처럼 작성해요.
1432
1409
  *
1433
- * @returns {string} 기기의 고유 식별자를 나타내는 문자열이에요.
1410
+ * 함수를 사용하면 `deep_link_value`를 포함한 완성된 공유 링크를 만들 수 있어요.
1434
1411
  *
1435
- * @example
1436
- * ### 기기 고유 식별자 가져오기
1412
+ * @param path - 딥링크로 열고 싶은 경로예요. `intoss://`로 시작하는 문자열이어야 해요.
1413
+ * @returns {Promise<string>} `deep_link_value`가 포함된 토스 공유 링크를 반환해요.
1437
1414
  *
1415
+ * @example
1438
1416
  * ```tsx
1439
- * import { getDeviceId } from '@apps-in-toss/framework';
1440
- * import { Text } from 'react-native';
1417
+ * import { share } from 'react-native-bedrock';
1418
+ * import { getTossShareLink } from '@apps-in-toss/framework';
1441
1419
  *
1442
- * function MyPage() {
1443
- * const id = getDeviceId();
1420
+ * // '/' 경로를 딥링크로 포함한 토스 공유 링크를 생성해요.
1421
+ * const tossLink = await getTossShareLink('intoss://my-app');
1444
1422
  *
1445
- * return (
1446
- * <Text>사용자의 기기 고유 식별자: {id}</Text>
1447
- * );
1448
- * }
1423
+ * // 생성한 링크를 메시지로 공유해요.
1424
+ * await share({ message: tossLink });
1449
1425
  * ```
1450
1426
  */
1451
- declare function getDeviceId(): string;
1427
+ declare function getTossShareLink(path: string): Promise<string>;
1452
1428
 
1453
1429
  /**
1454
1430
  * @public
1455
- * @category 저장소
1456
- * @name getItem
1457
- * @description 모바일 앱의 로컬 저장소에서 문자열 데이터를 가져와요. 주로 앱이 종료되었다가 다시 시작해도 데이터가 유지되어야 하는 경우에 사용해요.
1458
- * @param {string} key - 가져올 아이템의 키를 입력해요.
1459
- * @returns {Promise<string | null>} 지정한 키에 저장된 문자열 값을 반환해요. 값이 없으면 `null`을 반환해요.
1460
- * @example
1461
- *
1462
- * ### `my-key`에 저장된 아이템 가져오기
1463
- * ```ts
1464
- * const value = await Storage.getItem('my-key');
1465
- * console.log(value); // 'value'
1466
- * ```
1431
+ * @category 인앱결제
1432
+ * @name IapCreateOneTimePurchaseOrderOptions
1433
+ * @description 인앱결제 1건을 요청할 필요한 정보예요.
1434
+ * @property {string} productId - 주문할 상품의 ID예요.
1467
1435
  */
1468
- declare function getItem(key: string): Promise<string | null>;
1436
+ interface IapCreateOneTimePurchaseOrderOptions {
1437
+ productId: string;
1438
+ }
1469
1439
  /**
1470
1440
  * @public
1471
- * @category 저장소
1472
- * @name setItem
1473
- * @description 모바일 앱의 로컬 저장소에 문자열 데이터를 저장해요. 주로 앱이 종료되었다가 다시 시작해도 데이터가 유지되어야 하는 경우에 사용해요.
1474
- * @param {string} key - 저장할 아이템의 키를 입력해요.
1475
- * @param {string} value - 저장할 아이템의 값을 입력해요.
1476
- * @returns {Promise<void>} 아이템을 성공적으로 저장하면 아무 값도 반환하지 않아요.
1477
- * @example
1478
- *
1479
- * ### `my-key`에 아이템 저장하기
1480
- * ```ts
1481
- * import { Storage } from '@apps-in-toss/framework';
1482
- *
1483
- * await Storage.setItem('my-key', 'value');
1484
- * ```
1441
+ * @category 인앱결제
1442
+ * @name IapCreateOneTimePurchaseOrderResult
1443
+ * @description 인앱결제 1건이 완료되면 결제 세부 정보와 상품 정보를 담아 반환해요. 반환된 정보로 결제한 상품의 정보를 화면에 표시할 수 있어요.
1444
+ * @property {string | null} miniAppIconUrl - 미니앱 아이콘 이미지의 URL이에요. 아이콘은 앱인토스 콘솔에서 설정한 이미지예요. 콘솔에서 아이콘을 등록하지 않았다면 `null`로 반환돼요.
1445
+ * @property {string} displayName - 화면에 표시할 상품 이름이에요.
1446
+ * @property {string} displayAmount - 통화 단위가 포함된 가격 정보예요. 예를 들어 `1,000원`으로 가격과 통화가 함께 표시돼요.
1447
+ * @property {number} amount - 상품 가격 숫자 값이에요. 화폐 단위와 쉼표를 제외한 순수 숫자예요. 예를 들어 `1000`으로 표시돼요.
1448
+ * @property {string} currency - [ISO 4217 표준](https://ko.wikipedia.org/wiki/ISO_4217)에 따른 상품 가격 통화 단위예요. 예를 들어 원화는 `KRW`, 달러는 `USD`로 표시돼요.
1449
+ * @property {number} fraction - 가격을 표시할 때 소수점 아래 몇 자리까지 보여줄지 정하는 값이에요. 예를 들어 달러는 소수점 둘째 자리까지 보여줘서 `2`, 원화는 소수점이 필요 없어서 `0`이에요
1485
1450
  */
1486
- declare function setItem(key: string, value: string): Promise<void>;
1451
+ interface IapCreateOneTimePurchaseOrderResult {
1452
+ miniAppIconUrl: string | null;
1453
+ displayName: string;
1454
+ displayAmount: string;
1455
+ amount: number;
1456
+ currency: string;
1457
+ fraction: number;
1458
+ }
1487
1459
  /**
1488
1460
  * @public
1489
- * @category 저장소
1490
- * @name removeItem
1491
- * @description 모바일 앱의 로컬 저장소에서 특정 키에 해당하는 아이템을 삭제해요.
1492
- * @param {string} key - 삭제할 아이템의 키를 입력해요.
1493
- * @returns {Promise<void>} 아이템을 삭제하면 아무 값도 반환하지 않아요.
1461
+ * @category 인앱결제
1462
+ * @name iapCreateOneTimePurchaseOrder
1463
+ * @description
1464
+ * 특정 인앱결제 주문서 페이지로 이동해요. 사용자가 상품 구매 버튼을 누르는 상황 등에 사용할 수 있어요. 사용자의 결제는 이동한 페이지에서 진행돼요. 만약 결제 중에 에러가 발생하면 에러 유형에 따라 에러 페이지로 이동해요.
1465
+ * @param {IapCreateOneTimePurchaseOrderOptions} params - 인앱결제를 생성할 필요한 정보예요.
1466
+ * @param {string} params.productId - 주문할 상품의 ID예요.
1467
+ * @returns {Promise<IapCreateOneTimePurchaseOrderResult | undefined>} 결제에 성공하면 결제 결과 객체를 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.219.0, iOS 5.219.0)보다 낮으면 인앱결제를 실행할 수 없어서 `undefined`를 반환해요.
1468
+ *
1469
+ * @throw {code: "INVALID_PRODUCT_ID"} - 유효하지 않은 상품 ID이거나, 해당 상품이 존재하지 않을 때 발생해요.
1470
+ * @throw {code: "PAYMENT_PENDING"} - 사용자가 요청한 결제가 아직 승인을 기다리고 있을 때 발생해요.
1471
+ * @throw {code: "NETWORK_ERROR"} - 서버 내부 문제로 요청을 처리할 수 없을 때 발생해요.
1472
+ * @throw {code: "INVALID_USER_ENVIRONMENT"} - 특정 기기, 계정 또는 설정 환경에서 구매할 수 없는 상품일 때 발생해요.
1473
+ * @throw {code: "ITEM_ALREADY_OWNED"} - 사용자가 이미 구매한 상품을 다시 구매하려고 할 때 발생해요.
1474
+ * @throw {code: "APP_MARKET_VERIFICATION_FAILED"} - 사용자가 결제를 완료했지만, 앱스토어에서 사용자 정보 검증에 실패했을 때 발생해요. 사용자가 앱스토어에 문의해서 환불을 요청해야해요.
1475
+ * @throw {code: "TOSS_SERVER_VERIFICATION_FAILED"} - 사용자가 결제를 완료했지만, 서버 전송에 실패해서 결제 정보를 저장할 수 없을 때 발생해요.
1476
+ * @throw {code: "INTERNAL_ERROR"} - 서버 내부 문제로 요청을 처리할 수 없을 때 발생해요.
1477
+ * @throw {code: "KOREAN_ACCOUNT_ONLY"} - iOS 환경에서 사용자의 계정이 한국 계정이 아닐 때 발생해요.
1478
+ * @throw {code: "USER_CANCELED"} - 사용자가 결제를 완료하지 않고 주문서 페이지를 이탈했을 때 발생해요.
1479
+ *
1494
1480
  * @example
1481
+ * ### 특정 인앱결제 주문서 페이지로 이동하기
1495
1482
  *
1496
- * ### `my-key`에 저장된 아이템 삭제하기
1497
- * ```ts
1498
- * import { Storage } from '@apps-in-toss/framework';
1483
+ * ```tsx
1484
+ * import { Button } from 'react-native';
1485
+ * import { IAP } from '@apps-in-toss/framework';
1499
1486
  *
1500
- * await Storage.removeItem('my-key');
1487
+ * interface Props {
1488
+ * productId: string;
1489
+ * }
1490
+ *
1491
+ * function IapCreateOneTimePurchaseOrderButton({ productId }: Props) {
1492
+ * const handleClick = async () => {
1493
+ * try {
1494
+ * await IAP.createOneTimePurchaseOrder({
1495
+ * productId,
1496
+ * });
1497
+ * } catch (error) {
1498
+ * console.error('인앱결제에 실패했어요:', error);
1499
+ * }
1500
+ * };
1501
+ *
1502
+ * return <Button title="구매하기" onPress={handleClick} />;
1503
+ * }
1501
1504
  * ```
1502
1505
  */
1503
- declare function removeItem(key: string): Promise<void>;
1506
+ declare function createOneTimePurchaseOrder(params: IapCreateOneTimePurchaseOrderOptions): Promise<IapCreateOneTimePurchaseOrderResult | undefined>;
1504
1507
  /**
1505
1508
  * @public
1506
- * @category 저장소
1507
- * @name clearItems
1508
- * @description 모바일 앱의 로컬 저장소의 모든 아이템을 삭제해요.
1509
- * @returns {Promise<void>} 아이템을 삭제하면 아무 값도 반환하지 않고 저장소가 초기화돼요.
1509
+ * @category 인앱결제
1510
+ * @name IapProductListItem
1511
+ * @description 인앱결제로 구매할 있는 상품 하나의 정보를 담은 객체예요. 상품 목록을 화면에 표시할 때 사용해요.
1512
+ * @property {string} sku - 상품의 고유 ID예요. [인앱결제 주문서 페이지로 이동할때](/bedrock/reference/framework/인앱결제/createOneTimePurchaseOrder.html) 사용하는 `productId`와 동일한 값이에요.
1513
+ * @property {string} displayName - 화면에 표시할 상품 이름이에요. 상품 이름은 앱인토스 콘솔에서 설정한 값이에요.
1514
+ * @property {string} displayAmount - 통화 단위가 포함된 가격 정보예요. 예를 들어 `1,000원`으로 가격과 통화가 함께 표시돼요.
1515
+ * @property {string} iconUrl - 상품 아이콘 이미지의 URL이에요. 아이콘은 앱인토스 콘솔에서 설정한 이미지예요.
1516
+ * @property {string} description - 상품에 대한 설명이에요. 설명은 앱인토스 콘솔에서 설정한 값이에요.
1517
+ */
1518
+ interface IapProductListItem {
1519
+ sku: string;
1520
+ displayAmount: string;
1521
+ displayName: string;
1522
+ iconUrl: string;
1523
+ description: string;
1524
+ }
1525
+ /**
1526
+ * @public
1527
+ * @category 인앱결제
1528
+ * @name iapGetProductItemList
1529
+ * @description 인앱결제로 구매할 수 있는 상품 목록을 가져와요. 상품 목록 화면에 진입할 때 호출해요.
1530
+ * @returns {Promise<{ products: IapProductListItem[] } | undefined>} 상품 목록을 포함한 객체를 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.219.0, iOS 5.219.0)보다 낮으면 `undefined`를 반환해요.
1531
+ *
1510
1532
  * @example
1533
+ * ### 구매 가능한 인앱결제 상품목록 가져오기
1511
1534
  *
1512
- * ### 저장소 초기화하기
1513
- * ```ts
1514
- * import { Storage } from '@apps-in-toss/framework';
1535
+ * ```tsx
1536
+ * import { useEffect, useState } from 'react';
1537
+ * import { List, ListRow, Txt } from '@toss-design-system/react-native';
1538
+ * import { IAP } from '@apps-in-toss/framework';
1515
1539
  *
1516
- * await Storage.clearItems();
1540
+ * function IapGetProductItemList() {
1541
+ * const [products, setProducts] = useState<IapProductListItem[]>([]);
1542
+ *
1543
+ * useEffect(() => {
1544
+ * async function fetchProducts() {
1545
+ * try {
1546
+ * const response = await IAP.getProductItemList();
1547
+ * setProducts(response?.products ?? []);
1548
+ * } catch (error) {
1549
+ * console.error('상품 목록을 가져오는 데 실패했어요:', error);
1550
+ * }
1551
+ * }
1552
+ *
1553
+ * fetchProducts();
1554
+ * }, []);
1555
+ *
1556
+ * return (
1557
+ * <List>
1558
+ * {products.map((product) => (
1559
+ * <ListRow
1560
+ * key={product.sku}
1561
+ * contents={<Txt>{product.displayName}</Txt>}
1562
+ * />
1563
+ * ))}
1564
+ * </List>
1565
+ * );
1566
+ * }
1517
1567
  * ```
1518
1568
  */
1519
- declare function clearItems(): Promise<void>;
1569
+ declare function getProductItemList(): Promise<{
1570
+ products: IapProductListItem[];
1571
+ } | undefined>;
1520
1572
  /**
1521
1573
  * @public
1522
- * @category 저장소
1523
- * @name Storage
1524
- * @description 네이티브의 저장소를 사용해요.
1525
- * @property {typeof getItem} [getItem] 모바일 앱의 로컬 저장소에서 아이템을 가져오는 함수예요. 자세한 내용은 [getItem](/react-native/reference/framework/저장소/getItem.html) 참고하세요.
1526
- * @property {typeof setItem} [setItem] 모바일 앱의 로컬 저장소에 아이템을 저장하는 함수예요. 자세한 내용은 [setItem](/react-native/reference/framework/저장소/setItem.html) 참고하셰요.
1527
- * @property {typeof removeItem} [removeItem] 모바일 앱의 로컬 저장소에서 아이템을 삭제하는 함수예요. 자세한 내용은 [removeItem](/react-native/reference/framework/저장소/removeItem.html)을 참고하세요.
1528
- * @property {typeof clearItems} [clearItems] 모바일 앱의 로컬 저장소를 초기화하는 함수예요. 자세한 내용은 [clearItems](/react-native/reference/framework/저장소/clearItems.html)을 참고하세요.
1574
+ * @category 인앱결제
1575
+ * @name IAP
1576
+ * @description 인앱결제 관련 기능을 모은 객체예요. 단건 인앱결제 주문서 이동과 상품 목록 조회 기능을 제공해요.
1577
+ * @property {typeof createOneTimePurchaseOrder} [createOneTimePurchaseOrder] 특정 인앱결제 주문서 페이지로 이동해요. 자세한 내용은 [createOneTimePurchaseOrder](/bedrock/reference/framework/인앱결제/createOneTimePurchaseOrder.html) 문서를 참고하세요.
1578
+ * @property {typeof getProductItemList} [getProductItemList] 인앱결제로 구매할 있는 상품 목록을 가져와요. 자세한 내용은 [getProductItemList](/bedrock/reference/framework/인앱결제/getProductItemList.html) 문서를 참고하세요.
1529
1579
  */
1530
- declare const Storage: {
1531
- getItem: typeof getItem;
1532
- setItem: typeof setItem;
1533
- removeItem: typeof removeItem;
1534
- clearItems: typeof clearItems;
1580
+ declare const IAP: {
1581
+ createOneTimePurchaseOrder: typeof createOneTimePurchaseOrder;
1582
+ getProductItemList: typeof getProductItemList;
1535
1583
  };
1536
1584
 
1537
1585
  /**
@@ -1577,80 +1625,170 @@ declare function isMinVersionSupported(minVersions: {
1577
1625
  ios: `${number}.${number}.${number}` | 'always' | 'never';
1578
1626
  }): boolean;
1579
1627
 
1580
- type Primitive = string | number | boolean | null | undefined | symbol;
1581
-
1582
- interface EventLogParams {
1583
- log_name: string;
1584
- log_type: 'debug' | 'info' | 'warn' | 'error' | 'screen' | 'impression' | 'click';
1585
- params: Record<string, Primitive>;
1628
+ interface OpenCameraOptions {
1629
+ /**
1630
+ * 이미지를 Base64 형식으로 반환할지 여부를 나타내는 불리언 값이에요.
1631
+ *
1632
+ * 기본값: `false`.
1633
+ */
1634
+ base64?: boolean;
1635
+ /**
1636
+ * 이미지의 최대 너비를 나타내는 숫자 값이에요.
1637
+ *
1638
+ * 기본값: `1024`.
1639
+ */
1640
+ maxWidth?: number;
1586
1641
  }
1587
1642
  /**
1588
- * @category 로깅
1589
- * @kind function
1590
- * @name eventLog
1591
- * @description
1592
- * 이벤트 로그를 기록하는 함수예요.
1593
- *
1594
- * 함수는 내에서 발생하는 다양한 이벤트를 로깅하는 사용돼요. 디버깅, 정보 제공, 경고, 오류 등 다양한 유형의 로그를 기록할 수 있어요. 샌드박스 환경에서는 콘솔에 로그가 출력되고, 실제 환경에서는 로그 시스템에 기록돼요.
1595
- *
1596
- * @param {Object} params 로그 기록에 필요한 매개변수 객체예요.
1597
- * @param {string} params.log_name 로그의 이름이에요.
1598
- * @param {'debug' | 'info' | 'warn' | 'error' | 'screen' | 'impression' | 'click'} params.log_type 로그의 유형이에요.
1599
- * @param {Record<string, Primitive>} params.params 로그에 포함할 추가 매개변수 객체예요.
1600
- *
1601
- * @returns {Promise<void>} 로그 기록이 완료되면 해결되는 Promise예요.
1643
+ * @public
1644
+ * @category 카메라
1645
+ * @name openCamera
1646
+ * @description 카메라를 실행해서 촬영된 이미지를 반환하는 함수예요.
1647
+ * @param {OpenCameraOptions} options - 카메라 실행 시 사용되는 옵션 객체예요.
1648
+ * @param {boolean} [options.base64=false] - 이미지를 Base64 형식으로 반환할지 여부를 나타내는 불리언 값이에요. 기본값은 `false`예요. `true`로 설정하면 `dataUri` 대신 Base64 인코딩된 문자열을 반환해요.
1649
+ * @param {number} [options.maxWidth=1024] - 이미지의 최대 너비를 나타내는 숫자 값이에요. 기본값은 `1024`예요.
1650
+ * @returns {Promise<ImageResponse>}
1651
+ * 촬영된 이미지 정보를 포함한 객체를 반환해요. 반환 객체의 구성은 다음과 같아요:
1652
+ * - `id`: 이미지의 고유 식별자예요.
1653
+ * - `dataUri`: 이미지 데이터를 표현하는 데이터 URI예요.
1602
1654
  *
1603
1655
  * @example
1604
- * ### 이벤트 로그 기록하기
1656
+ * ### 카메라 실행 후 촬영된 사진 가져오기
1605
1657
  *
1606
1658
  * ```tsx
1607
- * import { eventLog } from '@apps-in-toss/framework';
1659
+ * import React, { useState } from 'react';
1660
+ * import { View, Text, Button, Image } from 'react-native';
1661
+ * import { openCamera } from '@apps-in-toss/framework';
1608
1662
  *
1609
- * function logUserAction() {
1610
- * eventLog({
1611
- * log_name: 'user_action',
1612
- * log_type: 'info',
1613
- * params: {
1614
- * action: 'button_click',
1615
- * screen: 'main',
1616
- * userId: 12345
1663
+ * const base64 = true;
1664
+ *
1665
+ * // 카메라를 실행하고 촬영된 이미지를 화면에 표시하는 컴포넌트
1666
+ * function Camera() {
1667
+ * const [image, setImage] = useState(null);
1668
+ *
1669
+ * const handlePress = async () => {
1670
+ * try {
1671
+ * const response = await openCamera({ base64 });
1672
+ * setImage(response);
1673
+ * } catch (error) {
1674
+ * console.error('사진을 가져오는 데 실패했어요:', error);
1617
1675
  * }
1618
- * });
1676
+ * };
1677
+ *
1678
+ * // base64 형식으로 반환된 이미지를 표시하려면 데이터 URL 스키마 Prefix를 붙여야해요.
1679
+ * const imageUri = base64 ? 'data:image/jpeg;base64,' + image.dataUri : image.dataUri;
1680
+ *
1681
+ * return (
1682
+ * <View>
1683
+ * {image ? (
1684
+ * <Image source={{ uri: imageUri }} style={{ width: 200, height: 200 }} />
1685
+ * ) : (
1686
+ * <Text>사진이 없어요</Text>
1687
+ * )}
1688
+ * <Button title="사진 촬영하기" onPress={handlePress} />
1689
+ * </View>
1690
+ * );
1619
1691
  * }
1620
1692
  * ```
1621
1693
  */
1622
- declare function eventLog(params: EventLogParams): Promise<void>;
1694
+ declare function openCamera(options?: OpenCameraOptions): Promise<ImageResponse>;
1623
1695
 
1624
1696
  /**
1625
1697
  * @public
1626
- * @category 공유
1627
- * @kind function
1628
- * @name getTossShareLink
1629
- * @description
1630
- * `getTossShareLink` 함수는 사용자가 지정한 경로를 토스 앱에서 있는 공유 링크를 반환해요.
1631
- * 링크를 다른 사람과 공유하면 토스 앱이 실행되면서 지정한 경로로 진입해요. 토스앱이 없는 사람은 iOS 일 때는 앱스토어로 이동하고, Android 일 때는 플레이스토어로 이동해요.
1698
+ * @category 게임센터
1699
+ * @name openGameCenterLeaderboard
1700
+ * @description 게임센터 리더보드 웹뷰를 열어요.
1701
+ * 앱 버전이 최소 지원 버전(`5.221.0`)보다 낮으면 아무 동작도 하지 않고 `undefined`를 반환해요.
1702
+ * 게임센터를 사용하는 사용자는 반드시 최소 지원 버전 이상이어야 게임을 실행할 있어요.
1703
+ * @returns 리더보드 웹뷰를 호출해요. 버전이 낮으면 아무 동작도 하지 않고 `undefined`를 반환해요.
1632
1704
  *
1633
- * 경로는 토스 앱 내부 특정 화면을 나타내는 딥링크(deep link) 형식이어야 해요.
1634
- * 예를 들어 `intoss://<앱 이름>`이나 `intoss://<앱 이름>/about?name=test`처럼 작성해요.
1705
+ * @example
1706
+ * import { Button } from 'react-native';
1707
+ * import { openGameCenterLeaderboard } from '@apps-in-toss/framework';
1635
1708
  *
1636
- * 함수를 사용하면 `deep_link_value`를 포함한 완성된 공유 링크를 만들 수 있어요.
1709
+ * // '리더보드' 버튼을 누르면 게임센터 리더보드 웹뷰가 열려요.
1710
+ * function LeaderboardButton() {
1711
+ * const onPress = () => {
1712
+ * openGameCenterLeaderboard();
1713
+ * };
1637
1714
  *
1638
- * @param path - 딥링크로 열고 싶은 경로예요. `intoss://`로 시작하는 문자열이어야 해요.
1639
- * @returns {Promise<string>} `deep_link_value`가 포함된 토스 공유 링크를 반환해요.
1715
+ * return <Button title="리더보드 웹뷰 호출" onPress={onPress} />;
1716
+ * }
1717
+ */
1718
+ declare function openGameCenterLeaderboard(): Promise<void>;
1719
+
1720
+ interface SaveBase64DataParams {
1721
+ data: string;
1722
+ fileName: string;
1723
+ mimeType: string;
1724
+ }
1725
+ /**
1726
+ * @public
1727
+ * @category 데이터
1728
+ * @name saveBase64Data
1729
+ * @description 문자열로 인코딩된 Base64 데이터를 지정한 파일 이름과 MIME 타입으로 사용자 기기에 저장해요. 이미지, 텍스트, PDF 등 다양한 형식의 데이터를 저장할 수 있어요.
1730
+ * @param {SaveBase64DataParams} params - 저장할 데이터와 파일 정보를 담은 객체예요.
1731
+ * @param {string} params.data - Base64 형식으로 인코딩된 데이터 문자열이에요.
1732
+ * @param {string} params.fileName - 저장할 파일 이름이에요. 확장자도 같이 붙여줘야해요. 예를 들어, 'example.png'로 저장할 수 있어요.
1733
+ * @param {string} params.mimeType - 저장할 파일의 MIME 타입이에요. 예를 들어 'image/png' 로 지정하면 이미지, 'application/pdf'는 PDF 파일이에요. 자세한 내용은 [MIME 문서](https://developer.mozilla.org/ko/docs/Web/HTTP/Guides/MIME_types)를 참고해주세요.
1640
1734
  *
1641
1735
  * @example
1736
+ * ### Base64 이미지 데이터를 사용자 기기에 저장하기
1737
+ *
1642
1738
  * ```tsx
1643
- * import { share } from 'react-native-bedrock';
1644
- * import { getTossShareLink } from '@apps-in-toss/framework';
1739
+ * import { Button } from 'react-native';
1740
+ * import { saveBase64Data } from '@apps-in-toss/framework';
1741
+ *
1742
+ * // '저장' 버튼을 누르면 이미지가 사용자 기기에 저장돼요.
1743
+ * function SaveButton() {
1744
+ * const handleSave = async () => {
1745
+ * try {
1746
+ * await saveBase64Data({
1747
+ * data: 'iVBORw0KGgo...',
1748
+ * fileName: 'some-photo.png',
1749
+ * mimeType: 'image/png',
1750
+ * });
1751
+ * } catch (error) {
1752
+ * console.error('데이터 저장에 실패했어요:', error);
1753
+ * }
1754
+ * };
1755
+ *
1756
+ * return <Button title="저장" onPress={handleSave} />;
1757
+ * }
1758
+ * ```
1759
+ */
1760
+ declare function saveBase64Data(params: SaveBase64DataParams): Promise<void>;
1761
+
1762
+ /**
1763
+ * @public
1764
+ * @category 클립보드
1765
+ * @name setClipboardText
1766
+ * @description 텍스트를 클립보드에 복사해서 사용자가 다른 곳에 붙여 넣기 할 수 있어요.
1767
+ * @param {Promise<void>} text - 클립보드에 복사할 텍스트예요. 문자열 형식으로 입력해요.
1768
+ *
1769
+ * @example
1770
+ * ### 텍스트를 클립보드에 복사하기
1771
+ *
1772
+ * ```tsx
1773
+ * import { Button } from 'react-native';
1774
+ * import { setClipboardText } from '@apps-in-toss/framework';
1645
1775
  *
1646
- * // '/' 경로를 딥링크로 포함한 토스 공유 링크를 생성해요.
1647
- * const tossLink = await getTossShareLink('intoss://my-app');
1776
+ * // '복사' 버튼을 누르면 "복사할 텍스트"가 클립보드에 복사돼요.
1777
+ * function CopyButton() {
1778
+ * const handleCopy = async () => {
1779
+ * try {
1780
+ * await setClipboardText('복사할 텍스트');
1781
+ * console.log('텍스트가 복사됐어요!');
1782
+ * } catch (error) {
1783
+ * console.error('텍스트 복사에 실패했어요:', error);
1784
+ * }
1785
+ * };
1648
1786
  *
1649
- * // 생성한 링크를 메시지로 공유해요.
1650
- * await share({ message: tossLink });
1787
+ * return <Button title="복사" onPress={handleCopy} />;
1788
+ * }
1651
1789
  * ```
1652
1790
  */
1653
- declare function getTossShareLink(path: string): Promise<string>;
1791
+ declare function setClipboardText(text: string): Promise<void>;
1654
1792
 
1655
1793
  /**
1656
1794
  * @public
@@ -1716,203 +1854,208 @@ declare function setDeviceOrientation(options: {
1716
1854
  type: 'portrait' | 'landscape';
1717
1855
  }): Promise<void>;
1718
1856
 
1719
- interface SaveBase64DataParams {
1720
- data: string;
1721
- fileName: string;
1722
- mimeType: string;
1723
- }
1724
1857
  /**
1725
1858
  * @public
1726
- * @category 데이터
1727
- * @name saveBase64Data
1728
- * @description 문자열로 인코딩된 Base64 데이터를 지정한 파일 이름과 MIME 타입으로 사용자 기기에 저장해요. 이미지, 텍스트, PDF 다양한 형식의 데이터를 저장할 수 있어요.
1729
- * @param {SaveBase64DataParams} params - 저장할 데이터와 파일 정보를 담은 객체예요.
1730
- * @param {string} params.data - Base64 형식으로 인코딩된 데이터 문자열이에요.
1731
- * @param {string} params.fileName - 저장할 파일 이름이에요. 확장자도 같이 붙여줘야해요. 예를 들어, 'example.png'로 저장할 수 있어요.
1732
- * @param {string} params.mimeType - 저장할 파일의 MIME 타입이에요. 예를 들어 'image/png' 로 지정하면 이미지, 'application/pdf'는 PDF 파일이에요. 자세한 내용은 [MIME 문서](https://developer.mozilla.org/ko/docs/Web/HTTP/Guides/MIME_types)를 참고해주세요.
1733
- *
1859
+ * @category 저장소
1860
+ * @name getItem
1861
+ * @description 모바일 앱의 로컬 저장소에서 문자열 데이터를 가져와요. 주로 앱이 종료되었다가 다시 시작해도 데이터가 유지되어야 하는 경우에 사용해요.
1862
+ * @param {string} key - 가져올 아이템의 키를 입력해요.
1863
+ * @returns {Promise<string | null>} 지정한 키에 저장된 문자열 값을 반환해요. 값이 없으면 `null`을 반환해요.
1734
1864
  * @example
1735
- * ### Base64 이미지 데이터를 사용자 기기에 저장하기
1736
1865
  *
1737
- * ```tsx
1738
- * import { Button } from 'react-native';
1739
- * import { saveBase64Data } from '@apps-in-toss/framework';
1866
+ * ### `my-key`에 저장된 아이템 가져오기
1867
+ * ```ts
1868
+ * const value = await Storage.getItem('my-key');
1869
+ * console.log(value); // 'value'
1870
+ * ```
1871
+ */
1872
+ declare function getItem(key: string): Promise<string | null>;
1873
+ /**
1874
+ * @public
1875
+ * @category 저장소
1876
+ * @name setItem
1877
+ * @description 모바일 앱의 로컬 저장소에 문자열 데이터를 저장해요. 주로 앱이 종료되었다가 다시 시작해도 데이터가 유지되어야 하는 경우에 사용해요.
1878
+ * @param {string} key - 저장할 아이템의 키를 입력해요.
1879
+ * @param {string} value - 저장할 아이템의 값을 입력해요.
1880
+ * @returns {Promise<void>} 아이템을 성공적으로 저장하면 아무 값도 반환하지 않아요.
1881
+ * @example
1740
1882
  *
1741
- * // '저장' 버튼을 누르면 이미지가 사용자 기기에 저장돼요.
1742
- * function SaveButton() {
1743
- * const handleSave = async () => {
1744
- * try {
1745
- * await saveBase64Data({
1746
- * data: 'iVBORw0KGgo...',
1747
- * fileName: 'some-photo.png',
1748
- * mimeType: 'image/png',
1749
- * });
1750
- * } catch (error) {
1751
- * console.error('데이터 저장에 실패했어요:', error);
1752
- * }
1753
- * };
1883
+ * ### `my-key`에 아이템 저장하기
1884
+ * ```ts
1885
+ * import { Storage } from '@apps-in-toss/framework';
1754
1886
  *
1755
- * return <Button title="저장" onPress={handleSave} />;
1756
- * }
1887
+ * await Storage.setItem('my-key', 'value');
1757
1888
  * ```
1758
1889
  */
1759
- declare function saveBase64Data(params: SaveBase64DataParams): Promise<void>;
1760
-
1890
+ declare function setItem(key: string, value: string): Promise<void>;
1761
1891
  /**
1762
1892
  * @public
1763
- * @category 인앱결제
1764
- * @name IapCreateOneTimePurchaseOrderOptions
1765
- * @description 인앱결제 1건을 요청할 필요한 정보예요.
1766
- * @property {string} productId - 주문할 상품의 ID예요.
1893
+ * @category 저장소
1894
+ * @name removeItem
1895
+ * @description 모바일 앱의 로컬 저장소에서 특정 키에 해당하는 아이템을 삭제해요.
1896
+ * @param {string} key - 삭제할 아이템의 키를 입력해요.
1897
+ * @returns {Promise<void>} 아이템을 삭제하면 아무 값도 반환하지 않아요.
1898
+ * @example
1899
+ *
1900
+ * ### `my-key`에 저장된 아이템 삭제하기
1901
+ * ```ts
1902
+ * import { Storage } from '@apps-in-toss/framework';
1903
+ *
1904
+ * await Storage.removeItem('my-key');
1905
+ * ```
1767
1906
  */
1768
- interface IapCreateOneTimePurchaseOrderOptions {
1769
- productId: string;
1770
- }
1907
+ declare function removeItem(key: string): Promise<void>;
1771
1908
  /**
1772
1909
  * @public
1773
- * @category 인앱결제
1774
- * @name IapCreateOneTimePurchaseOrderResult
1775
- * @description 인앱결제 1건이 완료되면 결제 세부 정보와 상품 정보를 담아 반환해요. 반환된 정보로 결제한 상품의 정보를 화면에 표시할 수 있어요.
1776
- * @property {string | null} miniAppIconUrl - 미니앱 아이콘 이미지의 URL이에요. 아이콘은 앱인토스 콘솔에서 설정한 이미지예요. 콘솔에서 아이콘을 등록하지 않았다면 `null`로 반환돼요.
1777
- * @property {string} displayName - 화면에 표시할 상품 이름이에요.
1778
- * @property {string} displayAmount - 통화 단위가 포함된 가격 정보예요. 예를 들어 `1,000원`으로 가격과 통화가 함께 표시돼요.
1779
- * @property {number} amount - 상품 가격 숫자 값이에요. 화폐 단위와 쉼표를 제외한 순수 숫자예요. 예를 들어 `1000`으로 표시돼요.
1780
- * @property {string} currency - [ISO 4217 표준](https://ko.wikipedia.org/wiki/ISO_4217)에 따른 상품 가격 통화 단위예요. 예를 들어 원화는 `KRW`, 달러는 `USD`로 표시돼요.
1781
- * @property {number} fraction - 가격을 표시할 때 소수점 아래 몇 자리까지 보여줄지 정하는 값이에요. 예를 들어 달러는 소수점 둘째 자리까지 보여줘서 `2`, 원화는 소수점이 필요 없어서 `0`이에요
1910
+ * @category 저장소
1911
+ * @name clearItems
1912
+ * @description 모바일 앱의 로컬 저장소의 모든 아이템을 삭제해요.
1913
+ * @returns {Promise<void>} 아이템을 삭제하면 아무 값도 반환하지 않고 저장소가 초기화돼요.
1914
+ * @example
1915
+ *
1916
+ * ### 저장소 초기화하기
1917
+ * ```ts
1918
+ * import { Storage } from '@apps-in-toss/framework';
1919
+ *
1920
+ * await Storage.clearItems();
1921
+ * ```
1782
1922
  */
1783
- interface IapCreateOneTimePurchaseOrderResult {
1784
- miniAppIconUrl: string | null;
1785
- displayName: string;
1786
- displayAmount: string;
1787
- amount: number;
1788
- currency: string;
1789
- fraction: number;
1790
- }
1923
+ declare function clearItems(): Promise<void>;
1791
1924
  /**
1792
1925
  * @public
1793
- * @category 인앱결제
1794
- * @name iapCreateOneTimePurchaseOrder
1795
- * @description
1796
- * 특정 인앱결제 주문서 페이지로 이동해요. 사용자가 상품 구매 버튼을 누르는 상황 등에 사용할 있어요. 사용자의 결제는 이동한 페이지에서 진행돼요. 만약 결제 중에 에러가 발생하면 에러 유형에 따라 에러 페이지로 이동해요.
1797
- * @param {IapCreateOneTimePurchaseOrderOptions} params - 인앱결제를 생성할 필요한 정보예요.
1798
- * @param {string} params.productId - 주문할 상품의 ID예요.
1799
- * @returns {Promise<IapCreateOneTimePurchaseOrderResult | undefined>} 결제에 성공하면 결제 결과 객체를 반환해요. 버전이 최소 지원 버전(안드로이드 5.219.0, iOS 5.219.0)보다 낮으면 인앱결제를 실행할 수 없어서 `undefined`를 반환해요.
1800
- *
1801
- * @throw {code: "INVALID_PRODUCT_ID"} - 유효하지 않은 상품 ID이거나, 해당 상품이 존재하지 않을 때 발생해요.
1802
- * @throw {code: "PAYMENT_PENDING"} - 사용자가 요청한 결제가 아직 승인을 기다리고 있을 때 발생해요.
1803
- * @throw {code: "NETWORK_ERROR"} - 서버 내부 문제로 요청을 처리할 수 없을 때 발생해요.
1804
- * @throw {code: "INVALID_USER_ENVIRONMENT"} - 특정 기기, 계정 또는 설정 환경에서 구매할 수 없는 상품일 때 발생해요.
1805
- * @throw {code: "ITEM_ALREADY_OWNED"} - 사용자가 이미 구매한 상품을 다시 구매하려고 할 때 발생해요.
1806
- * @throw {code: "APP_MARKET_VERIFICATION_FAILED"} - 사용자가 결제를 완료했지만, 앱스토어에서 사용자 정보 검증에 실패했을 때 발생해요. 사용자가 앱스토어에 문의해서 환불을 요청해야해요.
1807
- * @throw {code: "TOSS_SERVER_VERIFICATION_FAILED"} - 사용자가 결제를 완료했지만, 서버 전송에 실패해서 결제 정보를 저장할 수 없을 때 발생해요.
1808
- * @throw {code: "INTERNAL_ERROR"} - 서버 내부 문제로 요청을 처리할 수 없을 때 발생해요.
1809
- * @throw {code: "KOREAN_ACCOUNT_ONLY"} - iOS 환경에서 사용자의 계정이 한국 계정이 아닐 때 발생해요.
1810
- * @throw {code: "USER_CANCELED"} - 사용자가 결제를 완료하지 않고 주문서 페이지를 이탈했을 때 발생해요.
1926
+ * @category 저장소
1927
+ * @name Storage
1928
+ * @description 네이티브의 저장소를 사용해요.
1929
+ * @property {typeof getItem} [getItem] 모바일 앱의 로컬 저장소에서 아이템을 가져오는 함수예요. 자세한 내용은 [getItem](/react-native/reference/framework/저장소/getItem.html)을 참고하세요.
1930
+ * @property {typeof setItem} [setItem] 모바일 앱의 로컬 저장소에 아이템을 저장하는 함수예요. 자세한 내용은 [setItem](/react-native/reference/framework/저장소/setItem.html)을 참고하셰요.
1931
+ * @property {typeof removeItem} [removeItem] 모바일 앱의 로컬 저장소에서 아이템을 삭제하는 함수예요. 자세한 내용은 [removeItem](/react-native/reference/framework/저장소/removeItem.html)을 참고하세요.
1932
+ * @property {typeof clearItems} [clearItems] 모바일 앱의 로컬 저장소를 초기화하는 함수예요. 자세한 내용은 [clearItems](/react-native/reference/framework/저장소/clearItems.html) 참고하세요.
1933
+ */
1934
+ declare const Storage: {
1935
+ getItem: typeof getItem;
1936
+ setItem: typeof setItem;
1937
+ removeItem: typeof removeItem;
1938
+ clearItems: typeof clearItems;
1939
+ };
1940
+
1941
+ /**
1942
+ * @category 게임센터
1943
+ * @name GameCenterGameProfileResponse
1944
+ * @description 토스게임센터 프로필을 가져온 결과 타입이에요.
1945
+ * 앱에 프로필이 없는 경우, `statusCode`가 `'PROFILE_NOT_FOUND'`이고 다른 정보는 없어요.
1946
+ * 프로필이 있는 경우 `statusCode`가 `'SUCCESS'`이고, 닉네임과 프로필 이미지 주소가 함께 제공돼요.
1947
+ * @property {string} statusCode 프로필 조회 결과 상태예요. `'SUCCESS'` 또는 `'PROFILE_NOT_FOUND'` 중 하나예요.
1948
+ * @property {string} [nickname] 프로필 닉네임이에요. `statusCode`가 `'SUCCESS'`일 때만 있어요.
1949
+ * @property {string} [profileImageUri] 프로필 이미지 URL이에요. `statusCode`가 `'SUCCESS'`일 때만 있어요.
1950
+ */
1951
+ type GameCenterGameProfileResponse = {
1952
+ statusCode: 'PROFILE_NOT_FOUND';
1953
+ } | {
1954
+ statusCode: 'SUCCESS';
1955
+ nickname: string;
1956
+ profileImageUri: string;
1957
+ };
1958
+ /**
1959
+ * @category 게임센터
1960
+ * @name getGameCenterGameProfile
1961
+ * @description 토스게임센터 프로필 정보를 가져와요.
1962
+ * 사용자가 프로필을 만들지 않았다면 `statusCode`가 `'PROFILE_NOT_FOUND'`인 응답이 반환돼요.
1963
+ * 앱 버전이 최소 지원 버전(안드로이드 5.221.0, iOS 5.221.0)보다 낮으면 `undefined`를 반환해요.
1964
+ * @returns {Promise<GameCenterGameProfileResponse | undefined>} 프로필 정보 또는 `undefined`를 반환해요.
1811
1965
  *
1812
1966
  * @example
1813
- * ### 특정 인앱결제 주문서 페이지로 이동하기
1814
- *
1967
+ * ### 게임센터 프로필 가져오기
1815
1968
  * ```tsx
1816
- * import { Button } from 'react-native';
1817
- * import { IAP } from '@apps-in-toss/framework';
1969
+ * import { getGameCenterGameProfile } from './getGameCenterGameProfile';
1970
+ * import { useState } from 'react';
1971
+ * import { View, Button } from 'react-native';
1818
1972
  *
1819
- * interface Props {
1820
- * productId: string;
1821
- * }
1973
+ * function GameProfile() {
1974
+ * const [profile, setProfile] = useState<GameCenterGameProfileResponse | null>(null);
1822
1975
  *
1823
- * function IapCreateOneTimePurchaseOrderButton({ productId }: Props) {
1824
- * const handleClick = async () => {
1976
+ * const handlePress = async () => {
1825
1977
  * try {
1826
- * await IAP.createOneTimePurchaseOrder({
1827
- * productId,
1828
- * });
1978
+ * const result = await getGameCenterGameProfile();
1979
+ * if (result) {
1980
+ * setProfile(result);
1981
+ * }
1829
1982
  * } catch (error) {
1830
- * console.error('인앱결제에 실패했어요:', error);
1983
+ * console.error('게임센터 프로필 가져오기에 실패했어요.', error);
1831
1984
  * }
1832
1985
  * };
1833
1986
  *
1834
- * return <Button title="구매하기" onPress={handleClick} />;
1987
+ * return (
1988
+ * <View>
1989
+ * <Button title="게임센터 프로필 가져오기" onPress={handlePress} />
1990
+ * </View>
1991
+ * );
1835
1992
  * }
1836
1993
  * ```
1837
1994
  */
1838
- declare function createOneTimePurchaseOrder(params: IapCreateOneTimePurchaseOrderOptions): Promise<IapCreateOneTimePurchaseOrderResult | undefined>;
1995
+ declare function getGameCenterGameProfile(): Promise<GameCenterGameProfileResponse | undefined>;
1996
+
1839
1997
  /**
1840
1998
  * @public
1841
- * @category 인앱결제
1842
- * @name IapProductListItem
1843
- * @description 인앱결제로 구매할 수 있는 상품 하나의 정보를 담은 객체예요. 상품 목록을 화면에 표시할 때 사용해요.
1844
- * @property {string} sku - 상품의 고유 ID예요. [인앱결제 주문서 페이지로 이동할때](/bedrock/reference/framework/인앱결제/createOneTimePurchaseOrder.html) 사용하는 `productId`와 동일한 값이에요.
1845
- * @property {string} displayName - 화면에 표시할 상품 이름이에요. 상품 이름은 앱인토스 콘솔에서 설정한 값이에요.
1846
- * @property {string} displayAmount - 통화 단위가 포함된 가격 정보예요. 예를 들어 `1,000원`으로 가격과 통화가 함께 표시돼요.
1847
- * @property {string} iconUrl - 상품 아이콘 이미지의 URL이에요. 아이콘은 앱인토스 콘솔에서 설정한 이미지예요.
1848
- * @property {string} description - 상품에 대한 설명이에요. 설명은 앱인토스 콘솔에서 설정한 값이에요.
1999
+ * @category 게임센터
2000
+ * @name SubmitGameCenterLeaderBoardScoreResponse
2001
+ * @description
2002
+ * 토스게임센터 리더보드에 점수를 제출한 결과 정보를 담아서 반환해요. 반환된 정보를 사용해서 점수 제출 결과에 따라 적절한 에러 처리를 할 수 있어요.
2003
+ * @property {'SUCCESS' | 'LEADERBOARD_NOT_FOUND' | 'PROFILE_NOT_FOUND' | 'UNPARSABLE_SCORE'} statusCode
2004
+ * 점수 제출 결과를 나타내는 상태 코드예요.
2005
+ * - `'SUCCESS'`: 점수 제출이 성공했어요.
2006
+ * - `'LEADERBOARD_NOT_FOUND'`: `gameId`에 해당하는 리더보드를 찾을 없어요.
2007
+ * - `'PROFILE_NOT_FOUND'`: 사용자의 프로필이 없어요.
2008
+ * - `'UNPARSABLE_SCORE'`: 점수를 해석할 수 없어요. 점수는 실수(float) 형태의 문자열로 전달해야 해요.
1849
2009
  */
1850
- interface IapProductListItem {
1851
- sku: string;
1852
- displayAmount: string;
1853
- displayName: string;
1854
- iconUrl: string;
1855
- description: string;
2010
+ interface SubmitGameCenterLeaderBoardScoreResponse {
2011
+ statusCode: 'SUCCESS' | 'LEADERBOARD_NOT_FOUND' | 'PROFILE_NOT_FOUND' | 'UNPARSABLE_SCORE';
1856
2012
  }
1857
2013
  /**
1858
2014
  * @public
1859
- * @category 인앱결제
1860
- * @name iapGetProductItemList
1861
- * @description 인앱결제로 구매할 수 있는 상품 목록을 가져와요. 상품 목록 화면에 진입할 때 호출해요.
1862
- * @returns {Promise<{ products: IapProductListItem[] } | undefined>} 상품 목록을 포함한 객체를 반환해요. 버전이 최소 지원 버전(안드로이드 5.219.0, iOS 5.219.0)보다 낮으면 `undefined`를 반환해요.
2015
+ * @category 게임센터
2016
+ * @name submitGameCenterLeaderBoardScore
2017
+ * @description
2018
+ * 사용자의 게임 점수를 토스게임센터 리더보드에 제출해요. 기능으로 사용자의 점수를 공식 리더보드에 기록하고 다른 사용자와 비교할 있어요.
2019
+ * @param {string} params.score
2020
+ * 제출할 게임 점수예요. 실수 형태의 숫자를 문자열로 전달해야 해요. 예를들어 `"123.45"` 또는 `"9999"` 예요.
2021
+ * @returns {Promise<SubmitGameCenterLeaderBoardScoreResponse | undefined>}
2022
+ * 점수 제출 결과를 반환해요. 앱 버전이 최소 지원 버전보다 낮으면 아무 동작도 하지 않고 `undefined`를 반환해요.
1863
2023
  *
1864
2024
  * @example
1865
- * ### 구매 가능한 인앱결제 상품목록 가져오기
1866
- *
2025
+ * ### 게임 점수를 토스게임센터 리더보드에 제출하기
1867
2026
  * ```tsx
1868
- * import { useEffect, useState } from 'react';
1869
- * import { List, ListRow, Txt } from '@toss-design-system/react-native';
1870
- * import { IAP } from '@apps-in-toss/framework';
2027
+ * import { Button } from 'react-native';
2028
+ * import { submitGameCenterLeaderBoardScore } from '@apps-in-toss/framework';
1871
2029
  *
1872
- * function IapGetProductItemList() {
1873
- * const [products, setProducts] = useState<IapProductListItem[]>([]);
2030
+ * function GameCenterLeaderBoardScoreSubmitButton() {
2031
+ * async function handlePress() {
2032
+ * try {
2033
+ * const result = await submitGameCenterLeaderBoardScore({ score: '123.45' });
1874
2034
  *
1875
- * useEffect(() => {
1876
- * async function fetchProducts() {
1877
- * try {
1878
- * const response = await IAP.getProductItemList();
1879
- * setProducts(response?.products ?? []);
1880
- * } catch (error) {
1881
- * console.error('상품 목록을 가져오는 데 실패했어요:', error);
2035
+ * if (!result) {
2036
+ * console.warn('지원하지 않는 앱 버전이에요.');
2037
+ * return;
1882
2038
  * }
1883
- * }
1884
2039
  *
1885
- * fetchProducts();
1886
- * }, []);
2040
+ * if (result.statusCode === 'SUCCESS') {
2041
+ * console.log('점수 제출 성공!');
2042
+ * } else {
2043
+ * console.error('점수 제출 실패:', result.statusCode);
2044
+ * }
2045
+ * } catch (error) {
2046
+ * console.error('점수 제출 중 오류가 발생했어요.', error);
2047
+ * }
2048
+ * }
1887
2049
  *
1888
2050
  * return (
1889
- * <List>
1890
- * {products.map((product) => (
1891
- * <ListRow
1892
- * key={product.sku}
1893
- * contents={<Txt>{product.displayName}</Txt>}
1894
- * />
1895
- * ))}
1896
- * </List>
2051
+ * <Button onPress={handlePress}>점수 제출하기</Button>
1897
2052
  * );
1898
2053
  * }
1899
2054
  * ```
1900
2055
  */
1901
- declare function getProductItemList(): Promise<{
1902
- products: IapProductListItem[];
1903
- } | undefined>;
1904
- /**
1905
- * @public
1906
- * @category 인앱결제
1907
- * @name IAP
1908
- * @description 인앱결제 관련 기능을 모은 객체예요. 단건 인앱결제 주문서 이동과 상품 목록 조회 기능을 제공해요.
1909
- * @property {typeof createOneTimePurchaseOrder} [createOneTimePurchaseOrder] 특정 인앱결제 주문서 페이지로 이동해요. 자세한 내용은 [createOneTimePurchaseOrder](/bedrock/reference/framework/인앱결제/createOneTimePurchaseOrder.html) 문서를 참고하세요.
1910
- * @property {typeof getProductItemList} [getProductItemList] 인앱결제로 구매할 수 있는 상품 목록을 가져와요. 자세한 내용은 [getProductItemList](/bedrock/reference/framework/인앱결제/getProductItemList.html) 문서를 참고하세요.
1911
- */
1912
- declare const IAP: {
1913
- createOneTimePurchaseOrder: typeof createOneTimePurchaseOrder;
1914
- getProductItemList: typeof getProductItemList;
1915
- };
2056
+ declare function submitGameCenterLeaderBoardScore(params: {
2057
+ score: string;
2058
+ }): Promise<SubmitGameCenterLeaderBoardScoreResponse | undefined>;
1916
2059
 
1917
2060
  /**
1918
2061
  * @public
@@ -2095,4 +2238,4 @@ declare const Analytics: {
2095
2238
  Area: ({ children, params: _params, ...props }: _apps_in_toss_analytics.LoggingAreaProps) => react_jsx_runtime.JSX.Element;
2096
2239
  };
2097
2240
 
2098
- export { Accuracy, Analytics, AppsInToss, type ContactEntity, type EventLogParams, type ExternalWebViewProps, type FetchAlbumPhotosOptions, type GameWebViewProps, type GetCurrentLocationOptions, GoogleAdMob, IAP, INTERNAL__onVisibilityChangedByTransparentServiceWeb, type IapCreateOneTimePurchaseOrderOptions, type IapCreateOneTimePurchaseOrderResult, type IapProductListItem, type ImageResponse, type LoadAdMobInterstitialAdEvent, type LoadAdMobInterstitialAdOptions, type LoadAdMobRewardedAdEvent, type LoadAdMobRewardedAdOptions, type Location, type LocationCoords, type OpenCameraOptions, type PartnerWebViewProps, type SaveBase64DataParams, type ShowAdMobInterstitialAdEvent, type ShowAdMobInterstitialAdOptions, type ShowAdMobRewardedAdEvent, type ShowAdMobRewardedAdOptions, type StartUpdateLocationOptions$1 as StartUpdateLocationOptions, type StartUpdateLocationSubscription, Storage, TossPay, type UpdateLocationEventEmitter, type UseGeolocationOptions, WebView, type WebViewProps, appLogin, appsInTossEvent, env, eventLog, fetchAlbumPhotos, fetchContacts, getClipboardText, getCurrentLocation, getDeviceId, getOperationalEnvironment, getTossAppVersion, getTossShareLink, isMinVersionSupported, openCamera, saveBase64Data, setClipboardText, setDeviceOrientation, startUpdateLocation, useCreateUserAgent, useGeolocation };
2241
+ export { Accuracy, Analytics, AppsInToss, type ContactEntity, type EventLogParams, type ExternalWebViewProps, type FetchAlbumPhotosOptions, type GameCenterGameProfileResponse, type GameWebViewProps, type GetCurrentLocationOptions, GoogleAdMob, IAP, INTERNAL__onVisibilityChangedByTransparentServiceWeb, type IapCreateOneTimePurchaseOrderOptions, type IapCreateOneTimePurchaseOrderResult, type IapProductListItem, type ImageResponse, type LoadAdMobInterstitialAdEvent, type LoadAdMobInterstitialAdOptions, type LoadAdMobRewardedAdEvent, type LoadAdMobRewardedAdOptions, type Location, type LocationCoords, type OpenCameraOptions, type PartnerWebViewProps, type SaveBase64DataParams, type ShowAdMobInterstitialAdEvent, type ShowAdMobInterstitialAdOptions, type ShowAdMobRewardedAdEvent, type ShowAdMobRewardedAdOptions, type StartUpdateLocationOptions$1 as StartUpdateLocationOptions, type StartUpdateLocationSubscription, Storage, type SubmitGameCenterLeaderBoardScoreResponse, TossPay, type UpdateLocationEventEmitter, type UseGeolocationOptions, WebView, type WebViewProps, appLogin, appsInTossEvent, env, eventLog, fetchAlbumPhotos, fetchContacts, getClipboardText, getCurrentLocation, getDeviceId, getGameCenterGameProfile, getOperationalEnvironment, getTossAppVersion, getTossShareLink, isMinVersionSupported, openCamera, openGameCenterLeaderboard, saveBase64Data, setClipboardText, setDeviceOrientation, startUpdateLocation, submitGameCenterLeaderBoardScore, useCreateUserAgent, useGeolocation };