@apps-in-toss/web-bridge 1.1.3 → 1.2.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.
package/built/index.cjs CHANGED
@@ -247,7 +247,7 @@ var IAP = {
247
247
  return noop;
248
248
  }
249
249
  const isProcessProductGrantSupported = isMinVersionSupported({
250
- android: "5.230.0",
250
+ android: "5.231.1",
251
251
  ios: "5.230.0"
252
252
  });
253
253
  const { options, onEvent, onError } = params;
@@ -297,7 +297,52 @@ var IAP = {
297
297
  * @description 인앱결제로 구매할 수 있는 상품 목록을 가져와요. 상품 목록 화면에 진입할 때 호출해요.
298
298
  * @returns {Promise<{ products: IapProductListItem[] } | undefined>} 상품 목록을 포함한 객체를 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.219.0, iOS 5.219.0)보다 낮으면 `undefined`를 반환해요.
299
299
  */
300
- getProductItemList: (0, import_bridge_core3.createAsyncBridge)("iapGetProductItemList")
300
+ getProductItemList: (0, import_bridge_core3.createAsyncBridge)("iapGetProductItemList"),
301
+ /**
302
+ * @public
303
+ * @category 인앱결제
304
+ * @name getPendingOrders
305
+ * @description 대기 중인 주문 목록을 가져와요. 이 함수를 사용하면 결제가 아직 완료되지 않은 주문 정보를 확인할 수 있어요.
306
+ * @returns {Promise<{orderIds: string[]}}>} 대기 중인 주문ID 배열을 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.231.0, iOS 5.231.0)보다 낮으면 `undefined`를 반환해요.
307
+ *
308
+ * @example
309
+ * ### 대기 중인 주문 목록 가져오기
310
+ * ```typescript
311
+ * import { IAP } from '@apps-in-toss/web-framework';
312
+ *
313
+ * async function fetchOrders() {
314
+ * try {
315
+ * const pendingOrders = await IAP.getPendingOrders();
316
+ * return pendingOrders;
317
+ * } catch (error) {
318
+ * console.error(error);
319
+ * }
320
+ * }
321
+ * ```
322
+ */
323
+ getPendingOrders: (0, import_bridge_core3.createAsyncBridge)("getPendingOrders"),
324
+ /**
325
+ * @public
326
+ * @category 인앱결제
327
+ * @name getCompletedOrRefundedOrders
328
+ * @description 인앱결제로 구매하거나 환불한 주문 목록을 가져와요.
329
+ * @returns {Promise<CompletedOrRefundedOrdersResult>} 페이지네이션을 포함한 주문 목록 객체를 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.231.0, iOS 5.231.0)보다 낮으면 `undefined`를 반환해요.
330
+ *
331
+ * @example
332
+ * ```typescript
333
+ * import { IAP } from "@apps-in-toss/web-framework";
334
+ *
335
+ * async function fetchOrders() {
336
+ * try {
337
+ * const response = await IAP.getCompletedOrRefundedOrders();
338
+ * return response;
339
+ * } catch (error) {
340
+ * console.error(error);
341
+ * }
342
+ * }
343
+ * ```
344
+ */
345
+ getCompletedOrRefundedOrders: (0, import_bridge_core3.createAsyncBridge)("getCompletedOrRefundedOrders")
301
346
  };
302
347
 
303
348
  // src/getSafeAreaInsets.ts
package/built/index.d.cts CHANGED
@@ -158,6 +158,29 @@ interface IapProductListItem {
158
158
  iconUrl: string;
159
159
  description: string;
160
160
  }
161
+ /**
162
+ * @public
163
+ * @category 인앱결제
164
+ * @name CompletedOrRefundedOrdersResult
165
+ * @description 인앱결제로 구매하거나 환불한 주문 목록을 나타내는 객체예요. 페이지네이션 정보를 포함해요.
166
+ * @property {boolean} hasNext 다음 페이지가 있는지 여부예요. `true`면 더 많은 주문이 남아 있어요.
167
+ * @property {string | null} [nextKey] 다음 주문 목록을 조회할 때 사용할 키예요. 마지막 페이지라면 `null`이거나 생략될 수 있어요.
168
+ * @property {Array} orders 주문 정보를 담은 배열이에요. 각 요소는 하나의 주문을 나타내요.
169
+ * @property {string} orders[].orderId 주문의 고유 ID예요.
170
+ * @property {string} orders[].sku 주문 상품의 고유 ID예요.
171
+ * @property {'COMPLETED' | 'REFUNDED'} orders[].status 주문의 상태예요. 'COMPLETED'는 주문이 완료된 상태, 'REFUNDED'는 환불된 상태를 의미해요.
172
+ * @property {string} orders[].date 주문의 날짜 정보예요. ISO 8601 형식(YYYY-MM-DDTHH:mm:ss)을 사용해요. 예를 들어 "2025-09-22T00:00:00" 형식으로 제공돼요. 주문 상태가 `COMPLETED`라면 주문한 날짜를, `REFUNDED`라면 환불한 날짜를 나타내요.
173
+ */
174
+ interface CompletedOrRefundedOrdersResult {
175
+ hasNext: boolean;
176
+ nextKey?: string | null;
177
+ orders: {
178
+ orderId: string;
179
+ sku: string;
180
+ status: 'COMPLETED' | 'REFUNDED';
181
+ date: string;
182
+ }[];
183
+ }
161
184
  /**
162
185
  * @public
163
186
  * @category 인앱결제
@@ -199,6 +222,53 @@ declare const IAP: {
199
222
  getProductItemList: () => Promise<{
200
223
  products: IapProductListItem[];
201
224
  }>;
225
+ /**
226
+ * @public
227
+ * @category 인앱결제
228
+ * @name getPendingOrders
229
+ * @description 대기 중인 주문 목록을 가져와요. 이 함수를 사용하면 결제가 아직 완료되지 않은 주문 정보를 확인할 수 있어요.
230
+ * @returns {Promise<{orderIds: string[]}}>} 대기 중인 주문ID 배열을 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.231.0, iOS 5.231.0)보다 낮으면 `undefined`를 반환해요.
231
+ *
232
+ * @example
233
+ * ### 대기 중인 주문 목록 가져오기
234
+ * ```typescript
235
+ * import { IAP } from '@apps-in-toss/web-framework';
236
+ *
237
+ * async function fetchOrders() {
238
+ * try {
239
+ * const pendingOrders = await IAP.getPendingOrders();
240
+ * return pendingOrders;
241
+ * } catch (error) {
242
+ * console.error(error);
243
+ * }
244
+ * }
245
+ * ```
246
+ */
247
+ getPendingOrders: () => Promise<{
248
+ orderIds: string[];
249
+ }>;
250
+ /**
251
+ * @public
252
+ * @category 인앱결제
253
+ * @name getCompletedOrRefundedOrders
254
+ * @description 인앱결제로 구매하거나 환불한 주문 목록을 가져와요.
255
+ * @returns {Promise<CompletedOrRefundedOrdersResult>} 페이지네이션을 포함한 주문 목록 객체를 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.231.0, iOS 5.231.0)보다 낮으면 `undefined`를 반환해요.
256
+ *
257
+ * @example
258
+ * ```typescript
259
+ * import { IAP } from "@apps-in-toss/web-framework";
260
+ *
261
+ * async function fetchOrders() {
262
+ * try {
263
+ * const response = await IAP.getCompletedOrRefundedOrders();
264
+ * return response;
265
+ * } catch (error) {
266
+ * console.error(error);
267
+ * }
268
+ * }
269
+ * ```
270
+ */
271
+ getCompletedOrRefundedOrders: () => Promise<CompletedOrRefundedOrdersResult>;
202
272
  };
203
273
 
204
274
  declare function getSafeAreaInsets(): {
@@ -818,4 +888,4 @@ declare const startUpdateLocation: {
818
888
  openPermissionDialog(): Promise<"denied" | "allowed">;
819
889
  };
820
890
 
821
- export { type AddAccessoryButtonOptions, type AppsInTossEvent, type AppsInTossGlobals, GoogleAdMob, type GraniteEvent, IAP, type IapCreateOneTimePurchaseOrderOptions, type IapProductListItem, Storage, type TdsEvent, appsInTossEvent, env, fetchAlbumPhotos, fetchContacts, getAppsInTossGlobals, getClipboardText, getCurrentLocation, getSafeAreaInsets, graniteEvent, isMinVersionSupported, openCamera, partner, setClipboardText, startUpdateLocation, tdsEvent };
891
+ export { type AddAccessoryButtonOptions, type AppsInTossEvent, type AppsInTossGlobals, type CompletedOrRefundedOrdersResult, GoogleAdMob, type GraniteEvent, IAP, type IapCreateOneTimePurchaseOrderOptions, type IapProductListItem, Storage, type TdsEvent, appsInTossEvent, env, fetchAlbumPhotos, fetchContacts, getAppsInTossGlobals, getClipboardText, getCurrentLocation, getSafeAreaInsets, graniteEvent, isMinVersionSupported, openCamera, partner, setClipboardText, startUpdateLocation, tdsEvent };
package/built/index.d.ts CHANGED
@@ -158,6 +158,29 @@ interface IapProductListItem {
158
158
  iconUrl: string;
159
159
  description: string;
160
160
  }
161
+ /**
162
+ * @public
163
+ * @category 인앱결제
164
+ * @name CompletedOrRefundedOrdersResult
165
+ * @description 인앱결제로 구매하거나 환불한 주문 목록을 나타내는 객체예요. 페이지네이션 정보를 포함해요.
166
+ * @property {boolean} hasNext 다음 페이지가 있는지 여부예요. `true`면 더 많은 주문이 남아 있어요.
167
+ * @property {string | null} [nextKey] 다음 주문 목록을 조회할 때 사용할 키예요. 마지막 페이지라면 `null`이거나 생략될 수 있어요.
168
+ * @property {Array} orders 주문 정보를 담은 배열이에요. 각 요소는 하나의 주문을 나타내요.
169
+ * @property {string} orders[].orderId 주문의 고유 ID예요.
170
+ * @property {string} orders[].sku 주문 상품의 고유 ID예요.
171
+ * @property {'COMPLETED' | 'REFUNDED'} orders[].status 주문의 상태예요. 'COMPLETED'는 주문이 완료된 상태, 'REFUNDED'는 환불된 상태를 의미해요.
172
+ * @property {string} orders[].date 주문의 날짜 정보예요. ISO 8601 형식(YYYY-MM-DDTHH:mm:ss)을 사용해요. 예를 들어 "2025-09-22T00:00:00" 형식으로 제공돼요. 주문 상태가 `COMPLETED`라면 주문한 날짜를, `REFUNDED`라면 환불한 날짜를 나타내요.
173
+ */
174
+ interface CompletedOrRefundedOrdersResult {
175
+ hasNext: boolean;
176
+ nextKey?: string | null;
177
+ orders: {
178
+ orderId: string;
179
+ sku: string;
180
+ status: 'COMPLETED' | 'REFUNDED';
181
+ date: string;
182
+ }[];
183
+ }
161
184
  /**
162
185
  * @public
163
186
  * @category 인앱결제
@@ -199,6 +222,53 @@ declare const IAP: {
199
222
  getProductItemList: () => Promise<{
200
223
  products: IapProductListItem[];
201
224
  }>;
225
+ /**
226
+ * @public
227
+ * @category 인앱결제
228
+ * @name getPendingOrders
229
+ * @description 대기 중인 주문 목록을 가져와요. 이 함수를 사용하면 결제가 아직 완료되지 않은 주문 정보를 확인할 수 있어요.
230
+ * @returns {Promise<{orderIds: string[]}}>} 대기 중인 주문ID 배열을 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.231.0, iOS 5.231.0)보다 낮으면 `undefined`를 반환해요.
231
+ *
232
+ * @example
233
+ * ### 대기 중인 주문 목록 가져오기
234
+ * ```typescript
235
+ * import { IAP } from '@apps-in-toss/web-framework';
236
+ *
237
+ * async function fetchOrders() {
238
+ * try {
239
+ * const pendingOrders = await IAP.getPendingOrders();
240
+ * return pendingOrders;
241
+ * } catch (error) {
242
+ * console.error(error);
243
+ * }
244
+ * }
245
+ * ```
246
+ */
247
+ getPendingOrders: () => Promise<{
248
+ orderIds: string[];
249
+ }>;
250
+ /**
251
+ * @public
252
+ * @category 인앱결제
253
+ * @name getCompletedOrRefundedOrders
254
+ * @description 인앱결제로 구매하거나 환불한 주문 목록을 가져와요.
255
+ * @returns {Promise<CompletedOrRefundedOrdersResult>} 페이지네이션을 포함한 주문 목록 객체를 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.231.0, iOS 5.231.0)보다 낮으면 `undefined`를 반환해요.
256
+ *
257
+ * @example
258
+ * ```typescript
259
+ * import { IAP } from "@apps-in-toss/web-framework";
260
+ *
261
+ * async function fetchOrders() {
262
+ * try {
263
+ * const response = await IAP.getCompletedOrRefundedOrders();
264
+ * return response;
265
+ * } catch (error) {
266
+ * console.error(error);
267
+ * }
268
+ * }
269
+ * ```
270
+ */
271
+ getCompletedOrRefundedOrders: () => Promise<CompletedOrRefundedOrdersResult>;
202
272
  };
203
273
 
204
274
  declare function getSafeAreaInsets(): {
@@ -818,4 +888,4 @@ declare const startUpdateLocation: {
818
888
  openPermissionDialog(): Promise<"denied" | "allowed">;
819
889
  };
820
890
 
821
- export { type AddAccessoryButtonOptions, type AppsInTossEvent, type AppsInTossGlobals, GoogleAdMob, type GraniteEvent, IAP, type IapCreateOneTimePurchaseOrderOptions, type IapProductListItem, Storage, type TdsEvent, appsInTossEvent, env, fetchAlbumPhotos, fetchContacts, getAppsInTossGlobals, getClipboardText, getCurrentLocation, getSafeAreaInsets, graniteEvent, isMinVersionSupported, openCamera, partner, setClipboardText, startUpdateLocation, tdsEvent };
891
+ export { type AddAccessoryButtonOptions, type AppsInTossEvent, type AppsInTossGlobals, type CompletedOrRefundedOrdersResult, GoogleAdMob, type GraniteEvent, IAP, type IapCreateOneTimePurchaseOrderOptions, type IapProductListItem, Storage, type TdsEvent, appsInTossEvent, env, fetchAlbumPhotos, fetchContacts, getAppsInTossGlobals, getClipboardText, getCurrentLocation, getSafeAreaInsets, graniteEvent, isMinVersionSupported, openCamera, partner, setClipboardText, startUpdateLocation, tdsEvent };
package/built/index.js CHANGED
@@ -206,7 +206,7 @@ var IAP = {
206
206
  return noop;
207
207
  }
208
208
  const isProcessProductGrantSupported = isMinVersionSupported({
209
- android: "5.230.0",
209
+ android: "5.231.1",
210
210
  ios: "5.230.0"
211
211
  });
212
212
  const { options, onEvent, onError } = params;
@@ -256,7 +256,52 @@ var IAP = {
256
256
  * @description 인앱결제로 구매할 수 있는 상품 목록을 가져와요. 상품 목록 화면에 진입할 때 호출해요.
257
257
  * @returns {Promise<{ products: IapProductListItem[] } | undefined>} 상품 목록을 포함한 객체를 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.219.0, iOS 5.219.0)보다 낮으면 `undefined`를 반환해요.
258
258
  */
259
- getProductItemList: createAsyncBridge2("iapGetProductItemList")
259
+ getProductItemList: createAsyncBridge2("iapGetProductItemList"),
260
+ /**
261
+ * @public
262
+ * @category 인앱결제
263
+ * @name getPendingOrders
264
+ * @description 대기 중인 주문 목록을 가져와요. 이 함수를 사용하면 결제가 아직 완료되지 않은 주문 정보를 확인할 수 있어요.
265
+ * @returns {Promise<{orderIds: string[]}}>} 대기 중인 주문ID 배열을 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.231.0, iOS 5.231.0)보다 낮으면 `undefined`를 반환해요.
266
+ *
267
+ * @example
268
+ * ### 대기 중인 주문 목록 가져오기
269
+ * ```typescript
270
+ * import { IAP } from '@apps-in-toss/web-framework';
271
+ *
272
+ * async function fetchOrders() {
273
+ * try {
274
+ * const pendingOrders = await IAP.getPendingOrders();
275
+ * return pendingOrders;
276
+ * } catch (error) {
277
+ * console.error(error);
278
+ * }
279
+ * }
280
+ * ```
281
+ */
282
+ getPendingOrders: createAsyncBridge2("getPendingOrders"),
283
+ /**
284
+ * @public
285
+ * @category 인앱결제
286
+ * @name getCompletedOrRefundedOrders
287
+ * @description 인앱결제로 구매하거나 환불한 주문 목록을 가져와요.
288
+ * @returns {Promise<CompletedOrRefundedOrdersResult>} 페이지네이션을 포함한 주문 목록 객체를 반환해요. 앱 버전이 최소 지원 버전(안드로이드 5.231.0, iOS 5.231.0)보다 낮으면 `undefined`를 반환해요.
289
+ *
290
+ * @example
291
+ * ```typescript
292
+ * import { IAP } from "@apps-in-toss/web-framework";
293
+ *
294
+ * async function fetchOrders() {
295
+ * try {
296
+ * const response = await IAP.getCompletedOrRefundedOrders();
297
+ * return response;
298
+ * } catch (error) {
299
+ * console.error(error);
300
+ * }
301
+ * }
302
+ * ```
303
+ */
304
+ getCompletedOrRefundedOrders: createAsyncBridge2("getCompletedOrRefundedOrders")
260
305
  };
261
306
 
262
307
  // src/getSafeAreaInsets.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apps-in-toss/web-bridge",
3
3
  "type": "module",
4
- "version": "1.1.3",
4
+ "version": "1.2.1",
5
5
  "description": "Web Bridge for Apps In Toss",
6
6
  "scripts": {
7
7
  "prepack": "yarn build",
@@ -28,11 +28,11 @@
28
28
  "built"
29
29
  ],
30
30
  "dependencies": {
31
- "@apps-in-toss/types": "1.1.3"
31
+ "@apps-in-toss/types": "1.2.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@apps-in-toss/bridge-core": "1.1.3",
35
- "@apps-in-toss/framework": "1.1.3",
34
+ "@apps-in-toss/bridge-core": "1.2.1",
35
+ "@apps-in-toss/framework": "1.2.1",
36
36
  "@swc/core": "^1.12.7",
37
37
  "picocolors": "^1.1.1",
38
38
  "ts-morph": "^26.0.0",
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "0c80b4a0b49ec85f9f042909c7e9762c25425573"
49
+ "gitHead": "40254858b2f5f6d54bd7b228d0bc1dc96d3259aa"
50
50
  }