@portone/browser-sdk 0.0.5 → 0.0.7

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/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  > **Warning**
4
4
  >
5
- > Browser SDK에서는 포트원 V2 베타 기능만 제공하고 있습니다.\
6
- > [V2 연동 시작하기 > 사용 가능한 PG사](https://developers.portone.io/docs/ko/v2-payment/v2#%EC%82%AC%EC%9A%A9-%EA%B0%80%EB%8A%A5%ED%95%9C-pg%EC%82%AC)
5
+ > Browser SDK 포트원 V2 모듈만을 지원합니다.\
6
+ > [V2 신모듈 소개](https://developers.portone.io/docs/ko/v2-payment/v2?v=v2)
7
7
  > 문서를 참고해주세요.
8
8
 
9
9
  `@portone/browser-sdk` 패키지를 통해 포트원 결제 연동을 빠르게 진행할 수
@@ -16,13 +16,18 @@
16
16
  npm i @portone/browser-sdk
17
17
  yarn add @portone/browser-sdk
18
18
  pnpm i @portone/browser-sdk
19
+ bun add @portone/browser-sdk
19
20
  ```
20
21
 
21
22
  ## Documentation
22
23
 
23
- [V2 연동하기 > 인증결제 연동하기](https://developers.portone.io/docs/ko/v2-payment/v2)
24
+ [V2 연동하기 > 인증 결제 연동하기](https://developers.portone.io/docs/ko/v2-payment/authpay?v=v2)
24
25
  문서를 참고해주세요.
25
26
 
27
+ ## Changelog
28
+
29
+ [JavaScript SDK 연동하기 > 버전별 Changelog](https://developers.portone.io/docs/ko/v2-payment/v2-sdk/changelog?v=v2) 문서를 참고해주세요.
30
+
26
31
  ## Support
27
32
 
28
33
  패키지에 문제가 있거나 결제 연동 시 도움이 필요하신 경우
@@ -21,5 +21,6 @@ export declare const CardCompany: {
21
21
  readonly KOOKMIN_CARD: "CARD_COMPANY_KOOKMIN_CARD";
22
22
  readonly K_BANK: "CARD_COMPANY_K_BANK";
23
23
  readonly TOSS_BANK: "CARD_COMPANY_TOSS_BANK";
24
+ readonly MIRAE_ASSET_SECURITIES: "CARD_COMPANY_MIRAE_ASSET_SECURITIES";
24
25
  };
25
26
  export type CardCompany = typeof CardCompany[keyof typeof CardCompany];
@@ -42,5 +42,7 @@ export declare const PgProvider: {
42
42
  readonly TOSS_BRANDPAY: "PG_PROVIDER_TOSS_BRANDPAY";
43
43
  readonly WELCOME: "PG_PROVIDER_WELCOME";
44
44
  readonly TOSSPAY_V2: "PG_PROVIDER_TOSSPAY_V2";
45
+ readonly INICIS_V2: "PG_PROVIDER_INICIS_V2";
46
+ readonly KPN: "PG_PROVIDER_KPN";
45
47
  };
46
48
  export type PgProvider = typeof PgProvider[keyof typeof PgProvider];
@@ -0,0 +1,8 @@
1
+ export type InicisV2IssueBillingKeyBypass = InicisV2IssueBillingKeyBypassOnMobile;
2
+ type InicisV2IssueBillingKeyBypassOnMobile = {
3
+ /**
4
+ * 개인/법인카드 선택 옵션 ["percard":개인카드만 선택 가능,"cocard":법인 카드만 선택 가능]
5
+ */
6
+ carduse?: 'percard' | 'cocard';
7
+ };
8
+ export {};
@@ -3,10 +3,12 @@ import { SmartroV2IssueBillingKeyBypass } from './SmartroV2.js';
3
3
  import { NaverpayIssueBillingKeyBypass } from './Naverpay.js';
4
4
  import { WelcomeIssueBillingKeyBypass } from './Welcome.js';
5
5
  import { TosspayV2IssueBillingKeyBypass } from './TosspayV2.js';
6
+ import { InicisV2IssueBillingKeyBypass } from './InicisV2.js';
6
7
  export type IssueBillingKeyBypass = {
7
8
  kakaopay?: KakaopayPaymentBypass;
8
9
  smartro_v2?: SmartroV2IssueBillingKeyBypass;
9
10
  naverpay?: NaverpayIssueBillingKeyBypass;
10
11
  welcome?: WelcomeIssueBillingKeyBypass;
11
12
  tosspay_v2?: TosspayV2IssueBillingKeyBypass;
13
+ inicis_v2?: InicisV2IssueBillingKeyBypass;
12
14
  };
@@ -0,0 +1,98 @@
1
+ export type InicisV2Bypass = InicisV2BypassOnPc & InicisV2BypassOnMobile;
2
+ type InicisV2BypassOnPc = {
3
+ /**
4
+ * 메인로고 삽입 [size: 89*18]
5
+ */
6
+ logo_url?: string;
7
+ /**
8
+ * 서브로고 삽입 [size: 64*13]
9
+ */
10
+ logo_2nd?: string;
11
+ /**
12
+ * 보호자 이메일주소
13
+ * 14세 미만 필수, "@", "." 외 특수문자 입력불가
14
+ */
15
+ parentemail?: string;
16
+ /**
17
+ * SSGPAY 결제요청 시 PUSH전송 휴대폰번호
18
+ * 숫자만 허용
19
+ */
20
+ Ini_SSGPAY_MDN?: string;
21
+ /**
22
+ * 지불수단별 추가옵션
23
+ */
24
+ acceptmethod?: AcceptMethodKeyFromBypass[];
25
+ };
26
+ type InicisV2BypassOnMobile = {
27
+ /**
28
+ * 신용카드 우선선택 옵션
29
+ * 설정한 카드코드에 해당하는 카드가 선택된 채로 Display 됨
30
+ *
31
+ * 형식) selcode=카드코드
32
+ * 예시) selcode=14
33
+ */
34
+ P_CARD_OPTION?: string;
35
+ /**
36
+ * 가맹점 이름
37
+ */
38
+ P_MNAME?: string;
39
+ /**
40
+ * 지불수단별 추가옵션
41
+ */
42
+ P_RESERVED?: ReservedKeyFromBypass[];
43
+ };
44
+ type AcceptMethodKeyFromBypass =
45
+ /**
46
+ * 결제창 배경색상 [Default: #C1272C]
47
+ */
48
+ `SKIN(${string})`
49
+ /**
50
+ * 신용카드 결제 시 1000원 이하금액 결제가능 옵션
51
+ */
52
+ | `below1000`
53
+ /**
54
+ * 카드 메인화면에 OCB 적립을 위한 카드번호 창 표시옵션
55
+ */
56
+ | `ocb`
57
+ /**
58
+ * 안심클릭계열 신용카드 POPUP 형태 표시옵션
59
+ */
60
+ | `paypopup`
61
+ /**
62
+ * 프로그래스바 미노출 옵션
63
+ */
64
+ | `hidebar`
65
+ /**
66
+ * 간편결제 미노출 옵션
67
+ */
68
+ | `noeasypay`
69
+ /**
70
+ * 부분 무이자 설정. 슬림 할부
71
+ * 형식) slimquota(코드-개월:개월^코드-개월:개월)
72
+ * 예시) slimquota(11-2:3^34-2:3)
73
+ */
74
+ | `slimquota(${string})`
75
+ /**
76
+ * 형식) mallpoint(카드코드:카드코드)
77
+ * 예시) mallpoint(11:34)
78
+ */
79
+ | `mallpoint(${string})`;
80
+ type ReservedKeyFromBypass =
81
+ /**
82
+ * 신용카드 결제 시 1000원 이하금액 결제가능 옵션
83
+ */
84
+ `below1000=Y`
85
+ /**
86
+ * 간편결제 미노출 옵션
87
+ */
88
+ | `noeasypay=Y`
89
+ /**
90
+ * 해외카드 노출 옵션
91
+ */
92
+ | `global_visa3d=Y`
93
+ /**
94
+ * 안드로이드 앱 내 웹뷰에서 ISP 결제 진행 시
95
+ * custom url scheme(ispmobile://) 대신 intent:// 로 처리할 지 여부
96
+ */
97
+ | `apprun_check=Y`;
98
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 정규화가 어려운 KPN bypass 파라미터
3
+ * 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
4
+ */
5
+ export type KpnBypass = {
6
+ /**
7
+ * GLOBAL('09') : 해외카드 (VISA + MASTER + JCB)
8
+ * 11PAY('96') : 11Pay (SKPay)
9
+ * LEGACY_AUTH('98') : 구인증
10
+ * KEY_IN('99') : 키인
11
+ * 'W2' : 페이코 (now Unsupported!!)
12
+ * 'X4' : 카카오페이 (now Unsupported!!)
13
+ */
14
+ CardSelect: Array<'GLOBAL' | '11PAY' | 'LEGACY_AUTH' | 'KEY_IN'>;
15
+ };
@@ -7,6 +7,8 @@ import { NiceV2PaymentBypass } from './NiceV2.js';
7
7
  import { TossBrandpayPaymentBypass } from './TossBrandpay.js';
8
8
  import { WelcomePaymentBypass } from './Welcome.js';
9
9
  import { TosspayV2PaymentBypass } from './TosspayV2.js';
10
+ import { InicisV2Bypass } from './InicisV2.js';
11
+ import { KpnBypass } from './Kpn.js';
10
12
  export type PaymentBypass = {
11
13
  tosspayments?: TosspaymentsPaymentBypass;
12
14
  ksnet?: KsnetPaymentBypass;
@@ -17,4 +19,6 @@ export type PaymentBypass = {
17
19
  toss_brandpay?: TossBrandpayPaymentBypass;
18
20
  welcome?: WelcomePaymentBypass;
19
21
  tosspay_v2?: TosspayV2PaymentBypass;
22
+ inicis_v2?: InicisV2Bypass;
23
+ kpn?: KpnBypass;
20
24
  };
@@ -5,6 +5,7 @@ import { TxServiceIdentityVerificationErrorCode } from './TxServiceIdentityVerif
5
5
  export type IdentityVerificationErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServiceIdentityVerificationErrorCode;
6
6
  export declare function isIdentityVerificationError(error: unknown): error is IdentityVerificationError;
7
7
  export declare class IdentityVerificationError extends Error implements PortOneError {
8
+ static [Symbol.hasInstance](instance: unknown): boolean;
8
9
  __portOneErrorType: string;
9
10
  transactionType: "IDENTITY_VERIFICATION";
10
11
  code: IdentityVerificationErrorCode;
@@ -6,6 +6,7 @@ import { TxServicePayErrorCode } from './TxServicePayErrorCode.js';
6
6
  export type IssueBillingKeyAndPayErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServiceIssueErrorCode | TxServicePayErrorCode;
7
7
  export declare function isIssueBillingKeyAndPayError(error: unknown): error is IssueBillingKeyAndPayError;
8
8
  export declare class IssueBillingKeyAndPayError extends Error implements PortOneError {
9
+ static [Symbol.hasInstance](instance: unknown): boolean;
9
10
  __portOneErrorType: string;
10
11
  transactionType: "ISSUE_BILLING_KEY_AND_PAY";
11
12
  txId?: string;
@@ -5,6 +5,7 @@ import { TxServiceIssueErrorCode } from './TxServiceIssueErrorCode.js';
5
5
  export type IssueBillingKeyErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServiceIssueErrorCode;
6
6
  export declare function isIssueBillingKeyError(error: unknown): error is IssueBillingKeyError;
7
7
  export declare class IssueBillingKeyError extends Error implements PortOneError {
8
+ static [Symbol.hasInstance](instance: unknown): boolean;
8
9
  __portOneErrorType: string;
9
10
  transactionType: "ISSUE_BILLING_KEY";
10
11
  code: IssueBillingKeyErrorCode;
@@ -5,6 +5,7 @@ import { TxServiceIssueErrorCode } from './TxServiceIssueErrorCode.js';
5
5
  export type LoadIssueBillingKeyUIErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServiceIssueErrorCode;
6
6
  export declare function isLoadIssueBillingKeyUIError(error: unknown): error is LoadIssueBillingKeyUIError;
7
7
  export declare class LoadIssueBillingKeyUIError extends Error implements PortOneError {
8
+ static [Symbol.hasInstance](instance: unknown): boolean;
8
9
  __portOneErrorType: string;
9
10
  transactionType: "ISSUE_BILLING_KEY";
10
11
  code: LoadIssueBillingKeyUIErrorCode;
@@ -5,6 +5,7 @@ import { TxServicePayErrorCode } from './TxServicePayErrorCode.js';
5
5
  export type LoadPaymentUIErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServicePayErrorCode;
6
6
  export declare function isLoadPaymentUIError(error: unknown): error is LoadPaymentUIError;
7
7
  export declare class LoadPaymentUIError extends Error implements PortOneError {
8
+ static [Symbol.hasInstance](instance: unknown): boolean;
8
9
  __portOneErrorType: string;
9
10
  transactionType: "PAYMENT";
10
11
  code: LoadPaymentUIErrorCode;
@@ -4,6 +4,7 @@ import { PortOneError } from './index.js';
4
4
  export type ModuleErrorCode = CheckoutServiceErrorCode | GrpcErrorCode;
5
5
  export declare function isModuleError(error: unknown): error is ModuleError;
6
6
  export declare class ModuleError extends Error implements PortOneError {
7
+ static [Symbol.hasInstance](instance: unknown): boolean;
7
8
  __portOneErrorType: string;
8
9
  code: ModuleErrorCode;
9
10
  message: string;
@@ -5,6 +5,7 @@ import { TxServicePayErrorCode } from './TxServicePayErrorCode.js';
5
5
  export type PaymentErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServicePayErrorCode;
6
6
  export declare function isPaymentError(error: unknown): error is PaymentError;
7
7
  export declare class PaymentError extends Error implements PortOneError {
8
+ static [Symbol.hasInstance](instance: unknown): boolean;
8
9
  __portOneErrorType: string;
9
10
  transactionType: "PAYMENT";
10
11
  code: PaymentErrorCode;
@@ -26,5 +26,6 @@ export { loadIssueBillingKeyUI, type LoadIssueBillingKeyUIRequest, } from './loa
26
26
  export { updateLoadPaymentUIRequest } from './updateLoadPaymentUIRequest.js';
27
27
  export { updateLoadIssueBillingKeyUIRequest } from './updateLoadIssueBillingKeyUIRequest.js';
28
28
  export * as Entity from './entity/index.js';
29
+ export * as errors from './exception/index.js';
29
30
  export * from './exception/index.js';
30
31
  export default PortOne;
@@ -16,6 +16,7 @@ export type IssueBillingKeyRequest = {
16
16
  redirectUrl?: string;
17
17
  locale?: Entity.Locale;
18
18
  customData?: Record<string, any>;
19
+ offerPeriod?: Entity.OfferPeriod;
19
20
  appScheme?: string;
20
21
  noticeUrls?: string[];
21
22
  productType?: Entity.ProductType;
@@ -6,6 +6,7 @@ export type IssueBillingKeyAndPayRequest = {
6
6
  paymentId: string;
7
7
  orderName: string;
8
8
  totalAmount: number;
9
+ currency: Entity.Currency;
9
10
  channelKey?: string;
10
11
  pgProvider?: Entity.PgProvider;
11
12
  isTestChannel?: boolean;
@@ -16,7 +17,6 @@ export type IssueBillingKeyAndPayRequest = {
16
17
  windowType?: Entity.WindowTypes;
17
18
  redirectUrl?: string;
18
19
  noticeUrls?: string[];
19
- confirmUrl?: string;
20
20
  locale?: Entity.Locale;
21
21
  isCulturalExpense?: boolean;
22
22
  customData?: Record<string, any>;
@@ -9,6 +9,7 @@ export type PaymentRequest = {
9
9
  channelKey?: string;
10
10
  pgProvider?: Entity.PgProvider;
11
11
  isTestChannel?: boolean;
12
+ channelGroupId?: string;
12
13
  taxFreeAmount?: number;
13
14
  vatAmount?: number;
14
15
  customer?: Entity.Customer;
package/dist/v2.cjs CHANGED
@@ -201,6 +201,7 @@ const CardCompany = {
201
201
  KOOKMIN_CARD: 'CARD_COMPANY_KOOKMIN_CARD',
202
202
  K_BANK: 'CARD_COMPANY_K_BANK',
203
203
  TOSS_BANK: 'CARD_COMPANY_TOSS_BANK',
204
+ MIRAE_ASSET_SECURITIES: 'CARD_COMPANY_MIRAE_ASSET_SECURITIES',
204
205
  };
205
206
 
206
207
  /**
@@ -745,6 +746,8 @@ const PgProvider = {
745
746
  TOSS_BRANDPAY: 'PG_PROVIDER_TOSS_BRANDPAY',
746
747
  WELCOME: 'PG_PROVIDER_WELCOME',
747
748
  TOSSPAY_V2: 'PG_PROVIDER_TOSSPAY_V2',
749
+ INICIS_V2: 'PG_PROVIDER_INICIS_V2',
750
+ KPN: 'PG_PROVIDER_KPN',
748
751
  };
749
752
 
750
753
  /**
@@ -780,7 +783,7 @@ const IssueBillingKeyUIType = {
780
783
  PAYPAL_RT: 'PAYPAL_RT',
781
784
  };
782
785
 
783
- var index = /*#__PURE__*/Object.freeze({
786
+ var index$1 = {
784
787
  __proto__: null,
785
788
  Bank: Bank,
786
789
  BillingKeyAndPayMethod: BillingKeyAndPayMethod,
@@ -798,13 +801,16 @@ var index = /*#__PURE__*/Object.freeze({
798
801
  PgProvider: PgProvider,
799
802
  TransactionType: TransactionType,
800
803
  WindowType: WindowType
801
- });
804
+ };
802
805
 
803
806
  function isIdentityVerificationError(error) {
804
807
  return (isPortOneError(error) &&
805
808
  error.__portOneErrorType === 'IdentityVerificationError');
806
809
  }
807
810
  class IdentityVerificationError extends Error {
811
+ static [Symbol.hasInstance](instance) {
812
+ return isIdentityVerificationError(instance);
813
+ }
808
814
  constructor({ code, message, identityVerificationId, identityVerificationTxId, }) {
809
815
  super(message);
810
816
  this.__portOneErrorType = 'IdentityVerificationError';
@@ -821,6 +827,9 @@ function isIssueBillingKeyAndPayError(error) {
821
827
  error.__portOneErrorType === 'IssueBillingKeyAndPayError');
822
828
  }
823
829
  class IssueBillingKeyAndPayError extends Error {
830
+ static [Symbol.hasInstance](instance) {
831
+ return isIssueBillingKeyAndPayError(instance);
832
+ }
824
833
  constructor({ txId, paymentId, billingKey, code, message, }) {
825
834
  super(message);
826
835
  this.__portOneErrorType = 'IssueBillingKeyAndPayError';
@@ -837,6 +846,9 @@ function isIssueBillingKeyError(error) {
837
846
  return (isPortOneError(error) && error.__portOneErrorType === 'IssueBillingKeyError');
838
847
  }
839
848
  class IssueBillingKeyError extends Error {
849
+ static [Symbol.hasInstance](instance) {
850
+ return isIssueBillingKeyError(instance);
851
+ }
840
852
  constructor({ code, message, billingKey, }) {
841
853
  super(message);
842
854
  this.__portOneErrorType = 'IssueBillingKeyError';
@@ -851,6 +863,9 @@ function isModuleError(error) {
851
863
  return isPortOneError(error) && error.__portOneErrorType === 'ModuleError';
852
864
  }
853
865
  class ModuleError extends Error {
866
+ static [Symbol.hasInstance](instance) {
867
+ return isModuleError(instance);
868
+ }
854
869
  constructor({ code, message }) {
855
870
  super(message);
856
871
  this.__portOneErrorType = 'ModuleError';
@@ -863,6 +878,9 @@ function isPaymentError(error) {
863
878
  return isPortOneError(error) && error.__portOneErrorType === 'PaymentError';
864
879
  }
865
880
  class PaymentError extends Error {
881
+ static [Symbol.hasInstance](instance) {
882
+ return isPaymentError(instance);
883
+ }
866
884
  constructor({ code, message, txId, paymentId, }) {
867
885
  super(message);
868
886
  this.__portOneErrorType = 'PaymentError';
@@ -879,6 +897,9 @@ function isLoadIssueBillingKeyUIError(error) {
879
897
  error.__portOneErrorType === 'LoadIssueBillingKeyUIError');
880
898
  }
881
899
  class LoadIssueBillingKeyUIError extends Error {
900
+ static [Symbol.hasInstance](instance) {
901
+ return isLoadIssueBillingKeyUIError(instance);
902
+ }
882
903
  constructor({ code, message, }) {
883
904
  super(message);
884
905
  this.__portOneErrorType = 'LoadIssueBillingKeyUIError';
@@ -892,6 +913,9 @@ function isLoadPaymentUIError(error) {
892
913
  return (isPortOneError(error) && error.__portOneErrorType === 'LoadPaymentUIError');
893
914
  }
894
915
  class LoadPaymentUIError extends Error {
916
+ static [Symbol.hasInstance](instance) {
917
+ return isLoadPaymentUIError(instance);
918
+ }
895
919
  constructor({ code, message, }) {
896
920
  super(message);
897
921
  this.__portOneErrorType = 'LoadPaymentUIError';
@@ -908,6 +932,25 @@ function isPortOneError(error) {
908
932
  typeof error.__portOneErrorType === 'string');
909
933
  }
910
934
 
935
+ var index = {
936
+ __proto__: null,
937
+ IdentityVerificationError: IdentityVerificationError,
938
+ IssueBillingKeyAndPayError: IssueBillingKeyAndPayError,
939
+ IssueBillingKeyError: IssueBillingKeyError,
940
+ LoadIssueBillingKeyUIError: LoadIssueBillingKeyUIError,
941
+ LoadPaymentUIError: LoadPaymentUIError,
942
+ ModuleError: ModuleError,
943
+ PaymentError: PaymentError,
944
+ isIdentityVerificationError: isIdentityVerificationError,
945
+ isIssueBillingKeyAndPayError: isIssueBillingKeyAndPayError,
946
+ isIssueBillingKeyError: isIssueBillingKeyError,
947
+ isLoadIssueBillingKeyUIError: isLoadIssueBillingKeyUIError,
948
+ isLoadPaymentUIError: isLoadPaymentUIError,
949
+ isModuleError: isModuleError,
950
+ isPaymentError: isPaymentError,
951
+ isPortOneError: isPortOneError
952
+ };
953
+
911
954
  const PortOne = {
912
955
  requestIdentityVerification,
913
956
  requestIssueBillingKeyAndPay,
@@ -919,7 +962,7 @@ const PortOne = {
919
962
  updateLoadIssueBillingKeyUIRequest,
920
963
  };
921
964
 
922
- exports.Entity = index;
965
+ exports.Entity = index$1;
923
966
  exports.IdentityVerificationError = IdentityVerificationError;
924
967
  exports.IssueBillingKeyAndPayError = IssueBillingKeyAndPayError;
925
968
  exports.IssueBillingKeyError = IssueBillingKeyError;
@@ -929,6 +972,7 @@ exports.ModuleError = ModuleError;
929
972
  exports.PaymentError = PaymentError;
930
973
  exports.__INTERNAL__setPortOneSdkUrl = setPortOneJsSdkUrl;
931
974
  exports.default = PortOne;
975
+ exports.errors = index;
932
976
  exports.isIdentityVerificationError = isIdentityVerificationError;
933
977
  exports.isIssueBillingKeyAndPayError = isIssueBillingKeyAndPayError;
934
978
  exports.isIssueBillingKeyError = isIssueBillingKeyError;
package/dist/v2.js CHANGED
@@ -197,6 +197,7 @@ const CardCompany = {
197
197
  KOOKMIN_CARD: 'CARD_COMPANY_KOOKMIN_CARD',
198
198
  K_BANK: 'CARD_COMPANY_K_BANK',
199
199
  TOSS_BANK: 'CARD_COMPANY_TOSS_BANK',
200
+ MIRAE_ASSET_SECURITIES: 'CARD_COMPANY_MIRAE_ASSET_SECURITIES',
200
201
  };
201
202
 
202
203
  /**
@@ -741,6 +742,8 @@ const PgProvider = {
741
742
  TOSS_BRANDPAY: 'PG_PROVIDER_TOSS_BRANDPAY',
742
743
  WELCOME: 'PG_PROVIDER_WELCOME',
743
744
  TOSSPAY_V2: 'PG_PROVIDER_TOSSPAY_V2',
745
+ INICIS_V2: 'PG_PROVIDER_INICIS_V2',
746
+ KPN: 'PG_PROVIDER_KPN',
744
747
  };
745
748
 
746
749
  /**
@@ -776,7 +779,7 @@ const IssueBillingKeyUIType = {
776
779
  PAYPAL_RT: 'PAYPAL_RT',
777
780
  };
778
781
 
779
- var index = /*#__PURE__*/Object.freeze({
782
+ var index$1 = {
780
783
  __proto__: null,
781
784
  Bank: Bank,
782
785
  BillingKeyAndPayMethod: BillingKeyAndPayMethod,
@@ -794,13 +797,16 @@ var index = /*#__PURE__*/Object.freeze({
794
797
  PgProvider: PgProvider,
795
798
  TransactionType: TransactionType,
796
799
  WindowType: WindowType
797
- });
800
+ };
798
801
 
799
802
  function isIdentityVerificationError(error) {
800
803
  return (isPortOneError(error) &&
801
804
  error.__portOneErrorType === 'IdentityVerificationError');
802
805
  }
803
806
  class IdentityVerificationError extends Error {
807
+ static [Symbol.hasInstance](instance) {
808
+ return isIdentityVerificationError(instance);
809
+ }
804
810
  constructor({ code, message, identityVerificationId, identityVerificationTxId, }) {
805
811
  super(message);
806
812
  this.__portOneErrorType = 'IdentityVerificationError';
@@ -817,6 +823,9 @@ function isIssueBillingKeyAndPayError(error) {
817
823
  error.__portOneErrorType === 'IssueBillingKeyAndPayError');
818
824
  }
819
825
  class IssueBillingKeyAndPayError extends Error {
826
+ static [Symbol.hasInstance](instance) {
827
+ return isIssueBillingKeyAndPayError(instance);
828
+ }
820
829
  constructor({ txId, paymentId, billingKey, code, message, }) {
821
830
  super(message);
822
831
  this.__portOneErrorType = 'IssueBillingKeyAndPayError';
@@ -833,6 +842,9 @@ function isIssueBillingKeyError(error) {
833
842
  return (isPortOneError(error) && error.__portOneErrorType === 'IssueBillingKeyError');
834
843
  }
835
844
  class IssueBillingKeyError extends Error {
845
+ static [Symbol.hasInstance](instance) {
846
+ return isIssueBillingKeyError(instance);
847
+ }
836
848
  constructor({ code, message, billingKey, }) {
837
849
  super(message);
838
850
  this.__portOneErrorType = 'IssueBillingKeyError';
@@ -847,6 +859,9 @@ function isModuleError(error) {
847
859
  return isPortOneError(error) && error.__portOneErrorType === 'ModuleError';
848
860
  }
849
861
  class ModuleError extends Error {
862
+ static [Symbol.hasInstance](instance) {
863
+ return isModuleError(instance);
864
+ }
850
865
  constructor({ code, message }) {
851
866
  super(message);
852
867
  this.__portOneErrorType = 'ModuleError';
@@ -859,6 +874,9 @@ function isPaymentError(error) {
859
874
  return isPortOneError(error) && error.__portOneErrorType === 'PaymentError';
860
875
  }
861
876
  class PaymentError extends Error {
877
+ static [Symbol.hasInstance](instance) {
878
+ return isPaymentError(instance);
879
+ }
862
880
  constructor({ code, message, txId, paymentId, }) {
863
881
  super(message);
864
882
  this.__portOneErrorType = 'PaymentError';
@@ -875,6 +893,9 @@ function isLoadIssueBillingKeyUIError(error) {
875
893
  error.__portOneErrorType === 'LoadIssueBillingKeyUIError');
876
894
  }
877
895
  class LoadIssueBillingKeyUIError extends Error {
896
+ static [Symbol.hasInstance](instance) {
897
+ return isLoadIssueBillingKeyUIError(instance);
898
+ }
878
899
  constructor({ code, message, }) {
879
900
  super(message);
880
901
  this.__portOneErrorType = 'LoadIssueBillingKeyUIError';
@@ -888,6 +909,9 @@ function isLoadPaymentUIError(error) {
888
909
  return (isPortOneError(error) && error.__portOneErrorType === 'LoadPaymentUIError');
889
910
  }
890
911
  class LoadPaymentUIError extends Error {
912
+ static [Symbol.hasInstance](instance) {
913
+ return isLoadPaymentUIError(instance);
914
+ }
891
915
  constructor({ code, message, }) {
892
916
  super(message);
893
917
  this.__portOneErrorType = 'LoadPaymentUIError';
@@ -904,6 +928,25 @@ function isPortOneError(error) {
904
928
  typeof error.__portOneErrorType === 'string');
905
929
  }
906
930
 
931
+ var index = {
932
+ __proto__: null,
933
+ IdentityVerificationError: IdentityVerificationError,
934
+ IssueBillingKeyAndPayError: IssueBillingKeyAndPayError,
935
+ IssueBillingKeyError: IssueBillingKeyError,
936
+ LoadIssueBillingKeyUIError: LoadIssueBillingKeyUIError,
937
+ LoadPaymentUIError: LoadPaymentUIError,
938
+ ModuleError: ModuleError,
939
+ PaymentError: PaymentError,
940
+ isIdentityVerificationError: isIdentityVerificationError,
941
+ isIssueBillingKeyAndPayError: isIssueBillingKeyAndPayError,
942
+ isIssueBillingKeyError: isIssueBillingKeyError,
943
+ isLoadIssueBillingKeyUIError: isLoadIssueBillingKeyUIError,
944
+ isLoadPaymentUIError: isLoadPaymentUIError,
945
+ isModuleError: isModuleError,
946
+ isPaymentError: isPaymentError,
947
+ isPortOneError: isPortOneError
948
+ };
949
+
907
950
  const PortOne = {
908
951
  requestIdentityVerification,
909
952
  requestIssueBillingKeyAndPay,
@@ -915,4 +958,4 @@ const PortOne = {
915
958
  updateLoadIssueBillingKeyUIRequest,
916
959
  };
917
960
 
918
- export { index as Entity, IdentityVerificationError, IssueBillingKeyAndPayError, IssueBillingKeyError, LoadIssueBillingKeyUIError, LoadPaymentUIError, ModuleError, PaymentError, setPortOneJsSdkUrl as __INTERNAL__setPortOneSdkUrl, PortOne as default, isIdentityVerificationError, isIssueBillingKeyAndPayError, isIssueBillingKeyError, isLoadIssueBillingKeyUIError, isLoadPaymentUIError, isModuleError, isPaymentError, isPortOneError, loadIssueBillingKeyUI, loadPaymentUI, requestIdentityVerification, requestIssueBillingKey, requestIssueBillingKeyAndPay, requestPayment, updateLoadIssueBillingKeyUIRequest, updateLoadPaymentUIRequest };
961
+ export { index$1 as Entity, IdentityVerificationError, IssueBillingKeyAndPayError, IssueBillingKeyError, LoadIssueBillingKeyUIError, LoadPaymentUIError, ModuleError, PaymentError, setPortOneJsSdkUrl as __INTERNAL__setPortOneSdkUrl, PortOne as default, index as errors, isIdentityVerificationError, isIssueBillingKeyAndPayError, isIssueBillingKeyError, isLoadIssueBillingKeyUIError, isLoadPaymentUIError, isModuleError, isPaymentError, isPortOneError, loadIssueBillingKeyUI, loadPaymentUI, requestIdentityVerification, requestIssueBillingKey, requestIssueBillingKeyAndPay, requestPayment, updateLoadIssueBillingKeyUIRequest, updateLoadPaymentUIRequest };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@portone/browser-sdk",
3
3
  "type": "module",
4
- "version": "0.0.5",
4
+ "version": "0.0.7",
5
5
  "description": "PortOne SDK for browser",
6
6
  "keywords": [
7
7
  "PortOne",
@@ -37,10 +37,6 @@
37
37
  "dirBuild": "./dist",
38
38
  "dirSrc": "./src"
39
39
  },
40
- "scripts": {
41
- "build": "rm -rf dist && rollup -c && tsconfig-replace-paths -s src",
42
- "prepublishOnly": "yarn build"
43
- },
44
40
  "devDependencies": {
45
41
  "@rollup/plugin-alias": "^5.0.0",
46
42
  "@rollup/plugin-multi-entry": "^6.0.0",
@@ -50,5 +46,8 @@
50
46
  "tsconfig-replace-paths": "^0.0.14",
51
47
  "tslib": "^2.6.0",
52
48
  "typescript": "^5.1.6"
49
+ },
50
+ "scripts": {
51
+ "build": "rm -rf dist && rollup -c && tsconfig-replace-paths -s src"
53
52
  }
54
- }
53
+ }