@apps-in-toss/web-framework 0.0.13 → 0.0.14

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 (32) hide show
  1. package/dist/cli/index.js +17 -11
  2. package/dist/prebuilt/dev.android.js +121 -73
  3. package/dist/prebuilt/dev.ios.js +121 -73
  4. package/dist/prebuilt/prod.android.js +1 -1
  5. package/dist/prebuilt/prod.ios.js +1 -1
  6. package/dist/prebuilt/prod.json +4 -4
  7. package/{src-web/index.d.ts → dist-web/bridge.d.ts} +2 -0
  8. package/{src-web/index.js → dist-web/bridge.js} +1 -1
  9. package/dist-web/checkoutPayment.d.ts +125 -0
  10. package/dist-web/executePayment.d.ts +266 -0
  11. package/dist-web/index.d.ts +70 -0
  12. package/dist-web/index.js +144 -0
  13. package/package.json +9 -9
  14. /package/{src-web → dist-web}/appLogin.d.ts +0 -0
  15. /package/{src-web → dist-web}/closeView.d.ts +0 -0
  16. /package/{src-web → dist-web}/fetchAlbumPhotos.d.ts +0 -0
  17. /package/{src-web → dist-web}/fetchContacts.d.ts +0 -0
  18. /package/{src-web → dist-web}/generateHapticFeedback.d.ts +0 -0
  19. /package/{src-web → dist-web}/getClipboardText.d.ts +0 -0
  20. /package/{src-web → dist-web}/getCurrentLocation.d.ts +0 -0
  21. /package/{src-web → dist-web}/getDeviceId.d.ts +0 -0
  22. /package/{src-web → dist-web}/getLocale.d.ts +0 -0
  23. /package/{src-web → dist-web}/getNetworkStatus.d.ts +0 -0
  24. /package/{src-web → dist-web}/getOperationalEnvironment.d.ts +0 -0
  25. /package/{src-web → dist-web}/getPlatformOS.d.ts +0 -0
  26. /package/{src-web → dist-web}/getSchemeUri.d.ts +0 -0
  27. /package/{src-web → dist-web}/openCamera.d.ts +0 -0
  28. /package/{src-web → dist-web}/setClipboardText.d.ts +0 -0
  29. /package/{src-web → dist-web}/setScreenAwakeMode.d.ts +0 -0
  30. /package/{src-web → dist-web}/setSecureScreen.d.ts +0 -0
  31. /package/{src-web → dist-web}/share.d.ts +0 -0
  32. /package/{src-web → dist-web}/startUpdateLocation.d.ts +0 -0
@@ -154340,6 +154340,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154340
154340
  AppsInToss: function AppsInToss() {
154341
154341
  return _AppsInToss;
154342
154342
  },
154343
+ TossPay: function TossPay() {
154344
+ return _TossPay;
154345
+ },
154343
154346
  WebView: function WebView() {
154344
154347
  return _WebView;
154345
154348
  },
@@ -154496,36 +154499,70 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154496
154499
  function _startUpdateLocation(eventParams) {
154497
154500
  return appsInTossEvent.addEventListener("updateLocationEvent", eventParams);
154498
154501
  }
154499
- function _setClipboardText(_x2) {
154502
+ function _checkoutPayment2(_x2) {
154503
+ return _checkoutPayment.apply(this, arguments);
154504
+ }
154505
+ function _checkoutPayment() {
154506
+ _checkoutPayment = _asyncToGenerator(_regeneratorRuntime().mark(function _callee2(options) {
154507
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
154508
+ while (1) switch (_context2.prev = _context2.next) {
154509
+ case 0:
154510
+ return _context2.abrupt("return", AppsInTossModule.checkoutPayment(options));
154511
+ case 1:
154512
+ case "end":
154513
+ return _context2.stop();
154514
+ }
154515
+ }, _callee2);
154516
+ }));
154517
+ return _checkoutPayment.apply(this, arguments);
154518
+ }
154519
+ function _executePayment2(_x3) {
154520
+ return _executePayment.apply(this, arguments);
154521
+ }
154522
+ function _executePayment() {
154523
+ _executePayment = _asyncToGenerator(_regeneratorRuntime().mark(function _callee3(options) {
154524
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
154525
+ while (1) switch (_context3.prev = _context3.next) {
154526
+ case 0:
154527
+ return _context3.abrupt("return", AppsInTossModule.executePayment(options));
154528
+ case 1:
154529
+ case "end":
154530
+ return _context3.stop();
154531
+ }
154532
+ }, _callee3);
154533
+ }));
154534
+ return _executePayment.apply(this, arguments);
154535
+ }
154536
+ function _setClipboardText(_x4) {
154500
154537
  return _setClipboardText2.apply(this, arguments);
154501
154538
  }
154502
154539
  function _setClipboardText2() {
154503
- _setClipboardText2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee2(text) {
154540
+ _setClipboardText2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee4(text) {
154504
154541
  var permissionStatus;
154505
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
154506
- while (1) switch (_context2.prev = _context2.next) {
154542
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
154543
+ while (1) switch (_context4.prev = _context4.next) {
154507
154544
  case 0:
154508
- _context2.next = 2;
154545
+ _context4.next = 2;
154509
154546
  return requestPermission({
154510
154547
  name: "clipboard",
154511
154548
  access: "write"
154512
154549
  });
154513
154550
  case 2:
154514
- permissionStatus = _context2.sent;
154551
+ permissionStatus = _context4.sent;
154515
154552
  if (!(permissionStatus === "denied")) {
154516
- _context2.next = 5;
154553
+ _context4.next = 5;
154517
154554
  break;
154518
154555
  }
154519
154556
  throw new Error("\uD074\uB9BD\uBCF4\uB4DC \uC4F0\uAE30 \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
154520
154557
  case 5:
154521
- return _context2.abrupt("return", AppsInTossModule.setClipboardText({
154558
+ return _context4.abrupt("return", AppsInTossModule.setClipboardText({
154522
154559
  text: text
154523
154560
  }));
154524
154561
  case 6:
154525
154562
  case "end":
154526
- return _context2.stop();
154563
+ return _context4.stop();
154527
154564
  }
154528
- }, _callee2);
154565
+ }, _callee4);
154529
154566
  }));
154530
154567
  return _setClipboardText2.apply(this, arguments);
154531
154568
  }
@@ -154533,189 +154570,189 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154533
154570
  return _getClipboardText2.apply(this, arguments);
154534
154571
  }
154535
154572
  function _getClipboardText2() {
154536
- _getClipboardText2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee3() {
154573
+ _getClipboardText2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee5() {
154537
154574
  var permissionStatus;
154538
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
154539
- while (1) switch (_context3.prev = _context3.next) {
154575
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
154576
+ while (1) switch (_context5.prev = _context5.next) {
154540
154577
  case 0:
154541
- _context3.next = 2;
154578
+ _context5.next = 2;
154542
154579
  return requestPermission({
154543
154580
  name: "clipboard",
154544
154581
  access: "read"
154545
154582
  });
154546
154583
  case 2:
154547
- permissionStatus = _context3.sent;
154584
+ permissionStatus = _context5.sent;
154548
154585
  if (!(permissionStatus === "denied")) {
154549
- _context3.next = 5;
154586
+ _context5.next = 5;
154550
154587
  break;
154551
154588
  }
154552
154589
  throw new Error("\uD074\uB9BD\uBCF4\uB4DC \uC77D\uAE30 \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
154553
154590
  case 5:
154554
- return _context3.abrupt("return", AppsInTossModule.getClipboardText({}));
154591
+ return _context5.abrupt("return", AppsInTossModule.getClipboardText({}));
154555
154592
  case 6:
154556
154593
  case "end":
154557
- return _context3.stop();
154594
+ return _context5.stop();
154558
154595
  }
154559
- }, _callee3);
154596
+ }, _callee5);
154560
154597
  }));
154561
154598
  return _getClipboardText2.apply(this, arguments);
154562
154599
  }
154563
- function _fetchContacts(_x3) {
154600
+ function _fetchContacts(_x5) {
154564
154601
  return _fetchContacts2.apply(this, arguments);
154565
154602
  }
154566
154603
  function _fetchContacts2() {
154567
- _fetchContacts2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee4(_ref3) {
154604
+ _fetchContacts2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee6(_ref3) {
154568
154605
  var _contacts$nextOffset;
154569
154606
  var size, offset, query, permissionStatus, contacts;
154570
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
154571
- while (1) switch (_context4.prev = _context4.next) {
154607
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
154608
+ while (1) switch (_context6.prev = _context6.next) {
154572
154609
  case 0:
154573
154610
  size = _ref3.size, offset = _ref3.offset, query = _ref3.query;
154574
- _context4.next = 3;
154611
+ _context6.next = 3;
154575
154612
  return requestPermission({
154576
154613
  name: "contacts",
154577
154614
  access: "read"
154578
154615
  });
154579
154616
  case 3:
154580
- permissionStatus = _context4.sent;
154617
+ permissionStatus = _context6.sent;
154581
154618
  if (!(permissionStatus === "denied")) {
154582
- _context4.next = 6;
154619
+ _context6.next = 6;
154583
154620
  break;
154584
154621
  }
154585
154622
  throw new Error("\uC5F0\uB77D\uCC98 \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
154586
154623
  case 6:
154587
- _context4.next = 8;
154624
+ _context6.next = 8;
154588
154625
  return AppsInTossModule.fetchContacts({
154589
154626
  size: size,
154590
154627
  offset: offset,
154591
154628
  query: query
154592
154629
  });
154593
154630
  case 8:
154594
- contacts = _context4.sent;
154595
- return _context4.abrupt("return", {
154631
+ contacts = _context6.sent;
154632
+ return _context6.abrupt("return", {
154596
154633
  result: contacts.result,
154597
154634
  nextOffset: (_contacts$nextOffset = contacts.nextOffset) !== null && _contacts$nextOffset !== void 0 ? _contacts$nextOffset : null,
154598
154635
  done: contacts.done
154599
154636
  });
154600
154637
  case 10:
154601
154638
  case "end":
154602
- return _context4.stop();
154639
+ return _context6.stop();
154603
154640
  }
154604
- }, _callee4);
154641
+ }, _callee6);
154605
154642
  }));
154606
154643
  return _fetchContacts2.apply(this, arguments);
154607
154644
  }
154608
154645
  var DEFAULT_MAX_COUNT = 10;
154609
154646
  var DEFAULT_MAX_WIDTH = 1024;
154610
- function _fetchAlbumPhotos(_x4) {
154647
+ function _fetchAlbumPhotos(_x6) {
154611
154648
  return _fetchAlbumPhotos2.apply(this, arguments);
154612
154649
  }
154613
154650
  function _fetchAlbumPhotos2() {
154614
- _fetchAlbumPhotos2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee5(options) {
154651
+ _fetchAlbumPhotos2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee7(options) {
154615
154652
  var _options$maxCount, _options$maxWidth;
154616
154653
  var permissionStatus, albumPhotos;
154617
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
154618
- while (1) switch (_context5.prev = _context5.next) {
154654
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
154655
+ while (1) switch (_context7.prev = _context7.next) {
154619
154656
  case 0:
154620
- _context5.next = 2;
154657
+ _context7.next = 2;
154621
154658
  return requestPermission({
154622
154659
  name: "photos",
154623
154660
  access: "read"
154624
154661
  });
154625
154662
  case 2:
154626
- permissionStatus = _context5.sent;
154663
+ permissionStatus = _context7.sent;
154627
154664
  if (!(permissionStatus === "denied")) {
154628
- _context5.next = 5;
154665
+ _context7.next = 5;
154629
154666
  break;
154630
154667
  }
154631
154668
  throw new Error("\uC0AC\uC9C4\uCCA9 \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
154632
154669
  case 5:
154633
- _context5.next = 7;
154670
+ _context7.next = 7;
154634
154671
  return AppsInTossModule.fetchAlbumPhotos(_objectSpread(_objectSpread({}, options), {}, {
154635
154672
  maxCount: (_options$maxCount = options.maxCount) !== null && _options$maxCount !== void 0 ? _options$maxCount : DEFAULT_MAX_COUNT,
154636
154673
  maxWidth: (_options$maxWidth = options.maxWidth) !== null && _options$maxWidth !== void 0 ? _options$maxWidth : DEFAULT_MAX_WIDTH
154637
154674
  }));
154638
154675
  case 7:
154639
- albumPhotos = _context5.sent;
154640
- return _context5.abrupt("return", albumPhotos);
154676
+ albumPhotos = _context7.sent;
154677
+ return _context7.abrupt("return", albumPhotos);
154641
154678
  case 9:
154642
154679
  case "end":
154643
- return _context5.stop();
154680
+ return _context7.stop();
154644
154681
  }
154645
- }, _callee5);
154682
+ }, _callee7);
154646
154683
  }));
154647
154684
  return _fetchAlbumPhotos2.apply(this, arguments);
154648
154685
  }
154649
- function _getCurrentLocation(_x5) {
154686
+ function _getCurrentLocation(_x7) {
154650
154687
  return _getCurrentLocation2.apply(this, arguments);
154651
154688
  }
154652
154689
  function _getCurrentLocation2() {
154653
- _getCurrentLocation2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee6(options) {
154690
+ _getCurrentLocation2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee8(options) {
154654
154691
  var permissionStatus, position;
154655
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
154656
- while (1) switch (_context6.prev = _context6.next) {
154692
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
154693
+ while (1) switch (_context8.prev = _context8.next) {
154657
154694
  case 0:
154658
- _context6.next = 2;
154695
+ _context8.next = 2;
154659
154696
  return requestPermission({
154660
154697
  name: "geolocation",
154661
154698
  access: "access"
154662
154699
  });
154663
154700
  case 2:
154664
- permissionStatus = _context6.sent;
154701
+ permissionStatus = _context8.sent;
154665
154702
  if (!(permissionStatus === "denied")) {
154666
- _context6.next = 5;
154703
+ _context8.next = 5;
154667
154704
  break;
154668
154705
  }
154669
154706
  throw new Error("\uC704\uCE58 \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
154670
154707
  case 5:
154671
- _context6.next = 7;
154708
+ _context8.next = 7;
154672
154709
  return AppsInTossModule.getCurrentLocation(options);
154673
154710
  case 7:
154674
- position = _context6.sent;
154675
- return _context6.abrupt("return", position);
154711
+ position = _context8.sent;
154712
+ return _context8.abrupt("return", position);
154676
154713
  case 9:
154677
154714
  case "end":
154678
- return _context6.stop();
154715
+ return _context8.stop();
154679
154716
  }
154680
- }, _callee6);
154717
+ }, _callee8);
154681
154718
  }));
154682
154719
  return _getCurrentLocation2.apply(this, arguments);
154683
154720
  }
154684
- function _openCamera(_x6) {
154721
+ function _openCamera(_x8) {
154685
154722
  return _openCamera2.apply(this, arguments);
154686
154723
  }
154687
154724
  function _openCamera2() {
154688
- _openCamera2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee7(options) {
154725
+ _openCamera2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee9(options) {
154689
154726
  var permissionStatus, photo;
154690
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
154691
- while (1) switch (_context7.prev = _context7.next) {
154727
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
154728
+ while (1) switch (_context9.prev = _context9.next) {
154692
154729
  case 0:
154693
- _context7.next = 2;
154730
+ _context9.next = 2;
154694
154731
  return requestPermission({
154695
154732
  name: "camera",
154696
154733
  access: "access"
154697
154734
  });
154698
154735
  case 2:
154699
- permissionStatus = _context7.sent;
154736
+ permissionStatus = _context9.sent;
154700
154737
  if (!(permissionStatus === "denied")) {
154701
- _context7.next = 5;
154738
+ _context9.next = 5;
154702
154739
  break;
154703
154740
  }
154704
154741
  throw new Error("\uCE74\uBA54\uB77C \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
154705
154742
  case 5:
154706
- _context7.next = 7;
154743
+ _context9.next = 7;
154707
154744
  return AppsInTossModule.openCamera(_objectSpread({
154708
154745
  base64: false,
154709
154746
  maxWidth: 1024
154710
154747
  }, options));
154711
154748
  case 7:
154712
- photo = _context7.sent;
154713
- return _context7.abrupt("return", photo);
154749
+ photo = _context9.sent;
154750
+ return _context9.abrupt("return", photo);
154714
154751
  case 9:
154715
154752
  case "end":
154716
- return _context7.stop();
154753
+ return _context9.stop();
154717
154754
  }
154718
- }, _callee7);
154755
+ }, _callee9);
154719
154756
  }));
154720
154757
  return _openCamera2.apply(this, arguments);
154721
154758
  }
@@ -154723,22 +154760,26 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154723
154760
  return _appLogin2.apply(this, arguments);
154724
154761
  }
154725
154762
  function _appLogin2() {
154726
- _appLogin2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee8() {
154727
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
154728
- while (1) switch (_context8.prev = _context8.next) {
154763
+ _appLogin2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee10() {
154764
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
154765
+ while (1) switch (_context10.prev = _context10.next) {
154729
154766
  case 0:
154730
- return _context8.abrupt("return", AppsInTossModule.appLogin({}));
154767
+ return _context10.abrupt("return", AppsInTossModule.appLogin({}));
154731
154768
  case 1:
154732
154769
  case "end":
154733
- return _context8.stop();
154770
+ return _context10.stop();
154734
154771
  }
154735
- }, _callee8);
154772
+ }, _callee10);
154736
154773
  }));
154737
154774
  return _appLogin2.apply(this, arguments);
154738
154775
  }
154739
154776
  function _getOperationalEnvironment() {
154740
154777
  return AppsInTossModule.operationalEnvironment;
154741
154778
  }
154779
+ var _TossPay = {
154780
+ checkoutPayment: _checkoutPayment2,
154781
+ executePayment: _executePayment2
154782
+ };
154742
154783
  var import_react_native_webview = _$$_REQUIRE(_dependencyMap[3], "@react-native-bedrock/native/react-native-webview");
154743
154784
  var import_react = _$$_REQUIRE(_dependencyMap[4], "react");
154744
154785
  var import_react_native_bedrock4 = _$$_REQUIRE(_dependencyMap[0], "react-native-bedrock");
@@ -154749,6 +154790,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154749
154790
  appLogin: function appLogin() {
154750
154791
  return _appLogin;
154751
154792
  },
154793
+ checkoutPayment: function checkoutPayment() {
154794
+ return _checkoutPayment2;
154795
+ },
154796
+ executePayment: function executePayment() {
154797
+ return _executePayment2;
154798
+ },
154752
154799
  fetchAlbumPhotos: function fetchAlbumPhotos() {
154753
154800
  return _fetchAlbumPhotos;
154754
154801
  },
@@ -154862,6 +154909,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
154862
154909
  0 && (module.exports = {
154863
154910
  Accuracy: Accuracy,
154864
154911
  AppsInToss: _AppsInToss,
154912
+ TossPay: _TossPay,
154865
154913
  WebView: _WebView,
154866
154914
  appLogin: _appLogin,
154867
154915
  env: _env,