@portone/browser-sdk 0.0.1 → 0.0.2

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 (72) hide show
  1. package/README.md +25 -4
  2. package/dist/chunk-4ed6f045.js +66 -0
  3. package/dist/chunk-ced8f127.js +13 -0
  4. package/dist/chunk-f7332846.js +690 -0
  5. package/dist/loader.d.ts +14 -0
  6. package/dist/types/utils.d.ts +18 -0
  7. package/dist/types/v2/entity/Address.d.ts +8 -0
  8. package/dist/types/v2/entity/Bank.d.ts +78 -0
  9. package/dist/types/v2/entity/BillingKeyMethod.d.ts +7 -0
  10. package/dist/types/v2/entity/CardCompany.d.ts +25 -0
  11. package/dist/types/v2/entity/Carrier.d.ts +18 -0
  12. package/dist/types/v2/entity/CashReceiptType.d.ts +6 -0
  13. package/dist/types/v2/entity/Country.d.ts +252 -0
  14. package/dist/types/v2/entity/Currency.d.ts +184 -0
  15. package/dist/types/v2/entity/Customer.d.ts +15 -0
  16. package/dist/types/v2/entity/EasyPayProvider.d.ts +20 -0
  17. package/dist/types/v2/entity/FreeInstallmentPlan.d.ts +19 -0
  18. package/dist/types/v2/entity/Gender.d.ts +6 -0
  19. package/dist/types/v2/entity/GiftCertificateType.d.ts +7 -0
  20. package/dist/types/v2/entity/Installment.d.ts +24 -0
  21. package/dist/types/v2/entity/Locale.d.ts +6 -0
  22. package/dist/types/v2/entity/OfferPeriod.d.ts +27 -0
  23. package/dist/types/v2/entity/PayMethod.d.ts +1 -0
  24. package/dist/types/v2/entity/PgProvider.d.ts +44 -0
  25. package/dist/types/v2/entity/Product.d.ts +8 -0
  26. package/dist/types/v2/entity/ProductType.d.ts +10 -0
  27. package/dist/types/v2/entity/StoreDetails.d.ts +14 -0
  28. package/dist/types/v2/entity/TransactionType.d.ts +12 -0
  29. package/dist/types/v2/entity/WindowType.d.ts +15 -0
  30. package/dist/types/v2/entity/bypass/identityVerification/Danal.d.ts +23 -0
  31. package/dist/types/v2/entity/bypass/identityVerification/index.d.ts +4 -0
  32. package/dist/types/v2/entity/bypass/issueBillingKey/Naverpay.d.ts +8 -0
  33. package/dist/types/v2/entity/bypass/issueBillingKey/PaypalV2.d.ts +24 -0
  34. package/dist/types/v2/entity/bypass/issueBillingKey/SmartroV2.d.ts +8 -0
  35. package/dist/types/v2/entity/bypass/issueBillingKey/index.d.ts +10 -0
  36. package/dist/types/v2/entity/bypass/payment/Kakaopay.d.ts +3 -0
  37. package/dist/types/v2/entity/bypass/payment/Ksnet.d.ts +7 -0
  38. package/dist/types/v2/entity/bypass/payment/Naverpay.d.ts +31 -0
  39. package/dist/types/v2/entity/bypass/payment/NiceV2.d.ts +39 -0
  40. package/dist/types/v2/entity/bypass/payment/PaypalV2.d.ts +44 -0
  41. package/dist/types/v2/entity/bypass/payment/SmartroV2.d.ts +9 -0
  42. package/dist/types/v2/entity/bypass/payment/Tosspayments.d.ts +8 -0
  43. package/dist/types/v2/entity/bypass/payment/TosspaymentsBrandpay.d.ts +27 -0
  44. package/dist/types/v2/entity/bypass/payment/index.d.ts +18 -0
  45. package/dist/types/v2/entity/index.d.ts +27 -0
  46. package/dist/types/v2/entity/index.js +2 -0
  47. package/dist/types/v2/exception/CheckoutServiceErrorCode.d.ts +1 -0
  48. package/dist/types/v2/exception/GrpcErrorCode.d.ts +1 -0
  49. package/dist/types/v2/exception/IdentityVerificationError.d.ts +20 -0
  50. package/dist/types/v2/exception/IssueBillingKeyError.d.ts +19 -0
  51. package/dist/types/v2/exception/PaymentError.d.ts +20 -0
  52. package/dist/types/v2/exception/TxServiceIdentityVerificationErrorCode.d.ts +1 -0
  53. package/dist/types/v2/exception/TxServiceIssueErrorCode.d.ts +1 -0
  54. package/dist/types/v2/exception/TxServicePayErrorCode.d.ts +1 -0
  55. package/dist/types/v2/exception/index.d.ts +7 -0
  56. package/dist/types/v2/exception/index.js +2 -0
  57. package/dist/types/v2/index.d.ts +5 -0
  58. package/dist/types/v2/request/IdentityVerification.d.ts +14 -0
  59. package/dist/types/v2/request/IssueBillingKey.d.ts +38 -0
  60. package/dist/types/v2/request/Payment.d.ts +79 -0
  61. package/dist/types/v2/request/index.d.ts +5 -0
  62. package/dist/types/v2/response/IdentityVerification.d.ts +13 -0
  63. package/dist/types/v2/response/IssueBillingKey.d.ts +12 -0
  64. package/dist/types/v2/response/Payment.d.ts +13 -0
  65. package/dist/types/v2/response/index.d.ts +5 -0
  66. package/dist/v2-entity.js +2 -0
  67. package/dist/v2-exception.js +2 -0
  68. package/dist/v2.d.ts +11 -0
  69. package/dist/v2.js +75 -0
  70. package/package.json +60 -9
  71. package/v2/index.d.ts +0 -1120
  72. package/v2/index.js +0 -84
@@ -0,0 +1,7 @@
1
+ export declare const GiftCertificateType: {
2
+ readonly BOOKNLIFE: "GIFT_CERTIFICATE_TYPE_BOOKNLIFE";
3
+ readonly SMART_MUNSANG: "GIFT_CERTIFICATE_TYPE_SMART_MUNSANG";
4
+ readonly CULTURELAND: "GIFT_CERTIFICATE_TYPE_CULTURELAND";
5
+ readonly HAPPYMONEY: "GIFT_CERTIFICATE_TYPE_HAPPYMONEY";
6
+ };
7
+ export type GiftCertificateType = typeof GiftCertificateType[keyof typeof GiftCertificateType];
@@ -0,0 +1,24 @@
1
+ import { OneOfType } from '../../utils.js';
2
+ import { Entity } from '../index.js';
3
+ export type Installment = {
4
+ freeInstallmentPlans?: Entity.FreeInstallmentPlan[];
5
+ /**
6
+ * 할부 개월수 옵션
7
+ * - fixedMonth: 고정 할부 개월수
8
+ * - availableMonthList: 렌더링을 허용 할 할부 개월수 리스트
9
+ *
10
+ * 예1) 3개월 고정 할부 개월수
11
+ * monthOption: {
12
+ * fixedMonth: 3
13
+ * }
14
+ *
15
+ * 예2) 2, 3, 4, 5, 6개월 리스트 할부 개월수
16
+ * monthOption: {
17
+ * availableMonthList: [2, 3, 4, 5, 6]
18
+ * }
19
+ */
20
+ monthOption?: OneOfType<{
21
+ fixedMonth: number;
22
+ availableMonthList: number[];
23
+ }>;
24
+ };
@@ -0,0 +1,6 @@
1
+ export declare const Locale: {
2
+ readonly KO_KR: "KO_KR";
3
+ readonly EN_US: "EN_US";
4
+ readonly ZH_CN: "ZH_CN";
5
+ };
6
+ export type Locale = typeof Locale[keyof typeof Locale];
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 제공 기간
3
+ * - range: 제공 기간 범위
4
+ *
5
+ * 예1) 2023년 1월 1일 00시 00분 00초(KST) ~
6
+ * range: {
7
+ * from: '2023-01-01T00:00:00+09:00'
8
+ * }
9
+ *
10
+ * 예2) ~ 2023년 1월 1일 00시 00분 00초(KST)
11
+ * range: {
12
+ * to: '2023-01-01T00:00:00+09:00'
13
+ * }
14
+ *
15
+ * 예3) 2023년 1월 1일 00시 00분 00초(KST) ~ 2023년 12월 31일 23시 59분 59초(KST)
16
+ * range: {
17
+ * from: '2023-12-31T23:59:59+09:00'
18
+ * to: '2023-01-01T00:00:00+09:00'
19
+ * }
20
+ */
21
+ export type OfferPeriod = {
22
+ range?: {
23
+ from: string;
24
+ } | {
25
+ to: string;
26
+ };
27
+ };
@@ -0,0 +1 @@
1
+ export type PayMethod = 'CARD' | 'VIRTUAL_ACCOUNT' | 'TRANSFER' | 'MOBILE' | 'GIFT_CERTIFICATE' | 'EASY_PAY' | 'PAYPAL';
@@ -0,0 +1,44 @@
1
+ export declare const PgProvider: {
2
+ readonly HTML5_INICIS: "PG_PROVIDER_HTML5_INICIS";
3
+ readonly PAYPAL: "PG_PROVIDER_PAYPAL";
4
+ readonly INICIS: "PG_PROVIDER_INICIS";
5
+ readonly DANAL: "PG_PROVIDER_DANAL";
6
+ readonly NICE: "PG_PROVIDER_NICE";
7
+ readonly DANAL_TPAY: "PG_PROVIDER_DANAL_TPAY";
8
+ readonly JTNET: "PG_PROVIDER_JTNET";
9
+ readonly UPLUS: "PG_PROVIDER_UPLUS";
10
+ readonly NAVERPAY: "PG_PROVIDER_NAVERPAY";
11
+ readonly KAKAO: "PG_PROVIDER_KAKAO";
12
+ readonly SETTLE: "PG_PROVIDER_SETTLE";
13
+ readonly KCP: "PG_PROVIDER_KCP";
14
+ readonly MOBILIANS: "PG_PROVIDER_MOBILIANS";
15
+ readonly KAKAOPAY: "PG_PROVIDER_KAKAOPAY";
16
+ readonly NAVERCO: "PG_PROVIDER_NAVERCO";
17
+ readonly SYRUP: "PG_PROVIDER_SYRUP";
18
+ readonly KICC: "PG_PROVIDER_KICC";
19
+ readonly EXIMBAY: "PG_PROVIDER_EXIMBAY";
20
+ readonly SMILEPAY: "PG_PROVIDER_SMILEPAY";
21
+ readonly PAYCO: "PG_PROVIDER_PAYCO";
22
+ readonly KCP_BILLING: "PG_PROVIDER_KCP_BILLING";
23
+ readonly ALIPAY: "PG_PROVIDER_ALIPAY";
24
+ readonly PAYPLE: "PG_PROVIDER_PAYPLE";
25
+ readonly CHAI: "PG_PROVIDER_CHAI";
26
+ readonly BLUEWALNUT: "PG_PROVIDER_BLUEWALNUT";
27
+ readonly SMARTRO: "PG_PROVIDER_SMARTRO";
28
+ readonly PAYMENTWALL: "PG_PROVIDER_PAYMENTWALL";
29
+ readonly TOSSPAYMENTS: "PG_PROVIDER_TOSSPAYMENTS";
30
+ readonly KCP_QUICK: "PG_PROVIDER_KCP_QUICK";
31
+ readonly DAOU: "PG_PROVIDER_DAOU";
32
+ readonly GALAXIA: "PG_PROVIDER_GALAXIA";
33
+ readonly TOSSPAY: "PG_PROVIDER_TOSSPAY";
34
+ readonly KCP_DIRECT: "PG_PROVIDER_KCP_DIRECT";
35
+ readonly SETTLE_ACC: "PG_PROVIDER_SETTLE_ACC";
36
+ readonly SETTLE_FIRM: "PG_PROVIDER_SETTLE_FIRM";
37
+ readonly INICIS_UNIFIED: "PG_PROVIDER_INICIS_UNIFIED";
38
+ readonly KSNET: "PG_PROVIDER_KSNET";
39
+ readonly PAYPAL_V2: "PG_PROVIDER_PAYPAL_V2";
40
+ readonly SMARTRO_V2: "PG_PROVIDER_SMARTRO_V2";
41
+ readonly NICE_V2: "PG_PROVIDER_NICE_V2";
42
+ readonly TOSS_BRANDPAY: "PG_PROVIDER_TOSS_BRANDPAY";
43
+ };
44
+ export type PgProvider = typeof PgProvider[keyof typeof PgProvider];
@@ -0,0 +1,8 @@
1
+ export type Product = {
2
+ id: string;
3
+ name: string;
4
+ code?: string;
5
+ amount: number;
6
+ quantity: number;
7
+ tag?: string;
8
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 상품 유형. 대개 휴대폰 소액결제시 필수 입력으로 사용 됨
3
+ * - REAL: 실물
4
+ * - DIGITAL: 컨텐츠
5
+ */
6
+ export declare const ProductType: {
7
+ readonly REAL: "PRODUCT_TYPE_REAL";
8
+ readonly DIGITAL: "PRODUCT_TYPE_DIGITAL";
9
+ };
10
+ export type ProductType = typeof ProductType[keyof typeof ProductType];
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 상점 정보
3
+ *
4
+ * KSNET 카카오페이의 경우 필수 입력
5
+ * (신)나이스페이의 경우 매출 전표에 표기 할 용도로 선택 입력
6
+ */
7
+ export type StoreDetails = {
8
+ ceoFullName?: string;
9
+ phoneNumber?: string;
10
+ address?: string;
11
+ zipcode?: string;
12
+ businessName?: string;
13
+ businessRegistrationNumber?: string;
14
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 트랜잭션 유형
3
+ * - PAYMENT: 결제
4
+ * - ISSUE_BILLING_KEY: 빌링키 발급
5
+ * - IDENTITY_VERIFICATION: 본인 인증
6
+ */
7
+ export declare const TransactionType: {
8
+ readonly PAYMENT: "PAYMENT";
9
+ readonly ISSUE_BILLING_KEY: "ISSUE_BILLING_KEY";
10
+ readonly IDENTITY_VERIFICATION: "IDENTITY_VERIFICATION";
11
+ };
12
+ export type TransactionType = typeof TransactionType[keyof typeof TransactionType];
@@ -0,0 +1,15 @@
1
+ /**
2
+ * PG사 창 렌더링 방식
3
+ * PG사나 결제 환경에 따라 허용되는 창 종류가 다름
4
+ */
5
+ export declare const WindowType: {
6
+ readonly IFRAME: "IFRAME";
7
+ readonly POPUP: "POPUP";
8
+ readonly REDIRECTION: "REDIRECTION";
9
+ readonly UI: "UI";
10
+ };
11
+ export type WindowType = typeof WindowType[keyof typeof WindowType];
12
+ export type WindowTypes = {
13
+ pc?: WindowType;
14
+ mobile?: WindowType;
15
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 정규화가 어려운 다날 본인인증 bypass 파라미터
3
+ * 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
4
+ */
5
+ export type DanalIdentityVerificationBypass = {
6
+ /**
7
+ * 가맹점 서비스 URL 혹은 본인확인 기능 사용 경로
8
+ * 본인확인 기능을 앱에서만 사용하는 경우 서비스 홈 URL 입력. Ex) www.MarketA.co.kr
9
+ * 본인확인 기능을 사용하는 웹 페이지가 존재할 경우 해당 URL 입력. Ex) m.login.MarketC.co.kr
10
+ * 웹 서비스 URL 자체가 존재하지 않는 경우 서비스 이름 (app 이름) 입력. Ex) 마켓A
11
+ *
12
+ * 해당 값을 넘기지 않을 경우 '포트원'으로 default 값 채움
13
+ */
14
+ CPTITLE?: string;
15
+ AGELIMIT?: number;
16
+ /**
17
+ * 통신사 정보. 인증 화면에서 해당 통신사만 활성화시킴
18
+ * 가능한 값: 'SKT', 'KTF', 'LGT', 'MVNO'
19
+ * 여러 개의 통신사를 활성화시키려면 위 값들을 semicolon(;) 으로 이어야 함.
20
+ * ex) 'SKT;KTF'
21
+ */
22
+ IsCarrier?: string;
23
+ };
@@ -0,0 +1,4 @@
1
+ import { DanalIdentityVerificationBypass } from './Danal.js';
2
+ export type IdentityVerificationBypass = {
3
+ danal?: DanalIdentityVerificationBypass;
4
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 정규화가 어려운 네이버페이 빌링키 발급 bypass 파라미터
3
+ * 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
4
+ */
5
+ export type NaverpayIssueBillingKeyBypass = {
6
+ subMerchantName?: string;
7
+ subMerchantId?: string;
8
+ };
@@ -0,0 +1,24 @@
1
+ import { Entity } from '../../../index.js';
2
+ export type PaypalV2IssueBillingKeyBypass = {
3
+ style?: {
4
+ color?: 'gold' | 'blue' | 'silver' | 'white' | 'black';
5
+ height?: number;
6
+ label?: 'paypal' | 'checkout' | 'buynow' | 'pay' | 'installment' | 'subscribe' | 'donate';
7
+ layout?: 'vertical' | 'horizontal';
8
+ shape?: 'rect' | 'pill';
9
+ tagline?: boolean;
10
+ };
11
+ shipping_address?: {
12
+ recipient_name?: string;
13
+ line1: string;
14
+ line2?: string;
15
+ city: string;
16
+ state?: string;
17
+ postal_code?: string;
18
+ country_code: Entity.Country;
19
+ };
20
+ additional_data?: {
21
+ key: string;
22
+ value: string;
23
+ }[];
24
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 정규화가 어려운 스마트로 bypass 파라미터
3
+ * 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
4
+ */
5
+ export type SmartroV2IssueBillingKeyBypass = {
6
+ SkinColor?: 'RED' | 'GREEN' | 'BLUE' | 'PURPLE';
7
+ IsPwdPass?: 'Y' | 'N';
8
+ };
@@ -0,0 +1,10 @@
1
+ import { KakaopayPaymentBypass } from '../payment/Kakaopay.js';
2
+ import { SmartroV2IssueBillingKeyBypass } from './SmartroV2.js';
3
+ import { NaverpayIssueBillingKeyBypass } from './Naverpay.js';
4
+ import { PaypalV2IssueBillingKeyBypass } from './PaypalV2.js';
5
+ export type IssueBillingKeyBypass = {
6
+ kakaopay?: KakaopayPaymentBypass;
7
+ smartro_v2?: SmartroV2IssueBillingKeyBypass;
8
+ naverpay?: NaverpayIssueBillingKeyBypass;
9
+ paypal_v2?: PaypalV2IssueBillingKeyBypass;
10
+ };
@@ -0,0 +1,3 @@
1
+ export type KakaopayPaymentBypass = {
2
+ custom_message?: string;
3
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 정규화가 어려운 Ksnet bypass 파라미터
3
+ * 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
4
+ */
5
+ export type KsnetPaymentBypass = {
6
+ sndQpayType?: '1' | '0';
7
+ };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 정규화가 어려운 네이버페이 bypass 파라미터
3
+ * 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
4
+ */
5
+ type ProductItem = {
6
+ categoryType: string;
7
+ categoryId: string;
8
+ uid: string;
9
+ name: string;
10
+ payReferrer?: NaverPayReferrer;
11
+ startDate?: string;
12
+ endDate?: string;
13
+ sellerId?: string;
14
+ count: number;
15
+ };
16
+ type NaverPayReferrer = 'NAVER_BOOK' | 'NAVER_MUSIC' | 'NAVER_SHOPPING' | 'NAVER_MAP' | 'NAVER_PLACE' | 'SEARCH_AD' | 'NAVER_SEARCH' | 'BRAND_SEARCH' | 'PARTNER_DIRECT' | 'ETC';
17
+ type SubMerchantInfo = {
18
+ subMerchantName: string;
19
+ subMerchantId: string;
20
+ subMerchantBusinessNo: string;
21
+ subMerchantPayId: string;
22
+ subMerchantTelephoneNo: string;
23
+ subMerchantCustomerServiceUrl: string;
24
+ };
25
+ export type NaverpayPaymentBypass = {
26
+ useCfmYmdt?: string;
27
+ productItems?: ProductItem[];
28
+ subMerchantInfo?: SubMerchantInfo;
29
+ deliveryFee?: number;
30
+ };
31
+ export {};
@@ -0,0 +1,39 @@
1
+ /**
2
+ * 정규화가 어려운 나이스페이 bypass 파라미터
3
+ * 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
4
+ */
5
+ export type NiceV2PaymentBypass = {
6
+ LogoImage?: string;
7
+ NPDisableScroll?: 'Y' | 'N';
8
+ SkinType?: 'red' | 'green' | 'purple' | 'gray' | 'dark';
9
+ UserCI?: string;
10
+ MallUserID?: string;
11
+ /**
12
+ * 신용카드 쿠폰 자동 적용 여부(Y: 사전 등록된 선 할인 쿠폰을 자동 적용 / N: 쿠폰 미적용(기본값))
13
+ * 할부 거래 요청 시 할인 적용 후 승인 금액이 할부 가능 금액 (50,000) 미만인 경우 인증 실패 처리
14
+ */
15
+ DirectCouponYN?: 'Y' | 'N';
16
+ /**
17
+ * 다이렉트 호출 결제 수단(BANK: 계좌이체/CELLPHONE: 휴대폰 소액결제)
18
+ * 간편결제와 카드사 다이렉트 호출의 경우 CheckoutService가 다이렉트 여부를 판단 후 올바른 값을 직접 넣어 줌
19
+ * 단, 계좌이체와 휴대폰 소액결제는 각각 은행 코드와 통신사 코드를 전달하는 방식이 아니기 때문에
20
+ * 정확한 다이렉트 호출이 아니므로 다이렉트 호출/비 다이렉트 호출을 구분하기 위해 DirectShowOpt 파라미터를 가맹점으로부터 직접 받음
21
+ */
22
+ DirectShowOpt?: 'BANK' | 'CELLPHONE';
23
+ /**
24
+ * 카드사 별 호출 방식
25
+ * 형식) 카드코드:노출유형|카드코드:노출유형
26
+ * - 노출 유형: 1(안심클릭), 2(간편결제), 3(앱 카드 직접 호출)
27
+ * - 카드 코드: 02(국민), 04(삼성), 06(신한), 07(현대), 08(롯데), 12(NH), 15(우리)만 가능
28
+ * 예시) CardShowOpt=08:3|02:3 → 롯데카드와 국민카드 선택시 앱 카드 직접 호출 방식으로 렌더링
29
+ */
30
+ CardShowOpt?: string;
31
+ PaycoClientId?: string;
32
+ PaycoAccessToken?: string;
33
+ /**
34
+ * 삼성페이 가맹점 유형
35
+ * - 01: 삼성페이 內 쇼핑
36
+ * - 99: 기타(기본값)
37
+ */
38
+ SamPayMallType?: '01' | '99';
39
+ };
@@ -0,0 +1,44 @@
1
+ import { Entity } from '../../../index.js';
2
+ export type PaypalV2PaymentBypass = {
3
+ style?: {
4
+ color?: 'gold' | 'blue' | 'silver' | 'white' | 'black';
5
+ height?: number;
6
+ label?: 'paypal' | 'checkout' | 'buynow' | 'pay' | 'installment' | 'subscribe' | 'donate';
7
+ layout?: 'vertical' | 'horizontal';
8
+ shape?: 'rect' | 'pill';
9
+ period?: string;
10
+ tagline?: boolean;
11
+ };
12
+ ['enable-funding']?: string;
13
+ ['disable-funding']?: string;
14
+ purchase_units?: {
15
+ shipping?: {
16
+ address?: {
17
+ address_line_1: string;
18
+ address_line_2?: string;
19
+ admin_area_1?: string;
20
+ admin_area_2: string;
21
+ postal_code?: string;
22
+ country_code: Entity.Country;
23
+ };
24
+ };
25
+ }[];
26
+ payer?: {
27
+ tax_info?: {
28
+ tax_id: string;
29
+ tax_id_type: string;
30
+ };
31
+ address?: {
32
+ address_line_1?: string;
33
+ address_line_2?: string;
34
+ admin_area_1?: string;
35
+ admin_area_2?: string;
36
+ postal_code?: string;
37
+ country_code: Entity.Country;
38
+ };
39
+ };
40
+ additional_data?: {
41
+ key: string;
42
+ value: string;
43
+ }[];
44
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 정규화가 어려운 스마트로 bypass 파라미터
3
+ * 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
4
+ */
5
+ export type SmartroV2PaymentBypass = {
6
+ GoodsCnt?: number;
7
+ SkinColor?: 'RED' | 'GREEN' | 'BLUE' | 'PURPLE';
8
+ OpenType?: 'KR' | 'EN';
9
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 정규화가 어려운 토스페이먼츠 bypass 파라미터
3
+ * 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
4
+ */
5
+ export type TosspaymentsPaymentBypass = {
6
+ discountCode?: string;
7
+ useInternationalCardOnly?: boolean;
8
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 정규화가 어려운 토스페이먼츠 브랜드페이 bypass 파라미터
3
+ * 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
4
+ */
5
+ export type TosspaymentsBrandpayPaymentBypass = {
6
+ discountCode?: string;
7
+ ui?: Ui;
8
+ };
9
+ type Ui = {
10
+ highlightColor?: string;
11
+ /**
12
+ * 버튼 스타일
13
+ * - default(기본값): 모서리가 둥글고 주변에 여백을 가진 버튼
14
+ * - full: 하단 영역이 전부 채워지는 형태의 버튼
15
+ */
16
+ buttonStyle?: 'default' | 'full';
17
+ labels?: Labels;
18
+ navigationBar?: NavigationBar;
19
+ };
20
+ type Labels = {
21
+ oneTouchPay?: string;
22
+ };
23
+ type NavigationBar = {
24
+ visible?: boolean;
25
+ paddingTop?: number;
26
+ };
27
+ export {};
@@ -0,0 +1,18 @@
1
+ import { TosspaymentsPaymentBypass } from './Tosspayments.js';
2
+ import { KsnetPaymentBypass } from './Ksnet.js';
3
+ import { PaypalV2PaymentBypass } from './PaypalV2.js';
4
+ import { KakaopayPaymentBypass } from './Kakaopay.js';
5
+ import { SmartroV2PaymentBypass } from './SmartroV2.js';
6
+ import { NaverpayPaymentBypass } from './Naverpay.js';
7
+ import { NiceV2PaymentBypass } from './NiceV2.js';
8
+ import { TosspaymentsBrandpayPaymentBypass } from './TosspaymentsBrandpay.js';
9
+ export type PaymentBypass = {
10
+ tosspayments?: TosspaymentsPaymentBypass;
11
+ ksnet?: KsnetPaymentBypass;
12
+ paypal_v2?: PaypalV2PaymentBypass;
13
+ kakaopay?: KakaopayPaymentBypass;
14
+ smartro_v2?: SmartroV2PaymentBypass;
15
+ naverpay?: NaverpayPaymentBypass;
16
+ nice_v2?: NiceV2PaymentBypass;
17
+ tosspayments_brandpay?: TosspaymentsBrandpayPaymentBypass;
18
+ };
@@ -0,0 +1,27 @@
1
+ export { Bank } from './Bank.js';
2
+ export { BillingKeyMethod } from './BillingKeyMethod.js';
3
+ export { CardCompany } from './CardCompany.js';
4
+ export { Carrier } from './Carrier.js';
5
+ export { Country } from './Country.js';
6
+ export { Currency } from './Currency.js';
7
+ export { EasyPayProvider } from './EasyPayProvider.js';
8
+ export { Gender } from './Gender.js';
9
+ export { GiftCertificateType } from './GiftCertificateType.js';
10
+ export { Locale } from './Locale.js';
11
+ export { PgProvider } from './PgProvider.js';
12
+ export { TransactionType } from './TransactionType.js';
13
+ export { WindowType } from './WindowType.js';
14
+ export type { Address } from './Address.js';
15
+ export type { CashReceiptType } from './CashReceiptType.js';
16
+ export type { Customer } from './Customer.js';
17
+ export type { FreeInstallmentPlan } from './FreeInstallmentPlan.js';
18
+ export type { Installment } from './Installment.js';
19
+ export type { OfferPeriod } from './OfferPeriod.js';
20
+ export type { PayMethod } from './PayMethod.js';
21
+ export type { Product } from './Product.js';
22
+ export type { ProductType } from './ProductType.js';
23
+ export type { StoreDetails } from './StoreDetails.js';
24
+ export type { WindowTypes } from './WindowType.js';
25
+ export type { IdentityVerificationBypass } from './bypass/identityVerification/index.js';
26
+ export type { IssueBillingKeyBypass } from './bypass/issueBillingKey/index.js';
27
+ export type { PaymentBypass } from './bypass/payment/index.js';
@@ -0,0 +1,2 @@
1
+ export { B as Bank, a as BillingKeyMethod, C as CardCompany, b as Carrier, c as Country, d as Currency, E as EasyPayProvider, G as Gender, e as GiftCertificateType, L as Locale, P as PgProvider, W as WindowType } from '../../../chunk-f7332846.js';
2
+ export { T as TransactionType } from '../../../chunk-ced8f127.js';
@@ -0,0 +1 @@
1
+ export type CheckoutServiceErrorCode = 'ParsePrepareResponseFailed' | 'ParsePgRawResponseFailed' | 'BadRequest';
@@ -0,0 +1 @@
1
+ export type GrpcErrorCode = 'Ok' | 'Cancelled' | 'Unknown' | 'InvalidArgument' | 'DeadlineExceeded' | 'NotFound' | 'AlreadyExists' | 'PermissionDenied' | 'ResourceExhausted' | 'FailedPrecondition' | 'Aborted' | 'OutOfRange' | 'Unimplemented' | 'Internal' | 'Unavailable' | 'DataLoss' | 'Unauthenticated';
@@ -0,0 +1,20 @@
1
+ import { PortOneError } from './index.js';
2
+ import { CheckoutServiceErrorCode } from './CheckoutServiceErrorCode.js';
3
+ import { GrpcErrorCode } from './GrpcErrorCode.js';
4
+ import { TxServiceIdentityVerificationErrorCode } from './TxServiceIdentityVerificationErrorCode.js';
5
+ export type IdentityVerificationErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServiceIdentityVerificationErrorCode;
6
+ export declare function isIdentityVerificationError(error: unknown): error is IdentityVerificationError;
7
+ export declare class IdentityVerificationError extends Error implements PortOneError {
8
+ __portOneErrorType: string;
9
+ transactionType: "IDENTITY_VERIFICATION";
10
+ code: IdentityVerificationErrorCode;
11
+ message: string;
12
+ identityVerificationId?: string;
13
+ identityVerificationTxId?: string;
14
+ constructor({ code, message, identityVerificationId, identityVerificationTxId, }: {
15
+ code: IdentityVerificationErrorCode;
16
+ message: string;
17
+ identityVerificationId?: string;
18
+ identityVerificationTxId?: string;
19
+ });
20
+ }
@@ -0,0 +1,19 @@
1
+ import { PortOneError } from './index.js';
2
+ import { CheckoutServiceErrorCode } from './CheckoutServiceErrorCode.js';
3
+ import { GrpcErrorCode } from './GrpcErrorCode.js';
4
+ import { TxServiceIssueErrorCode } from './TxServiceIssueErrorCode.js';
5
+ export type IssueBillingKeyErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServiceIssueErrorCode;
6
+ export declare function isIssueBillingKeyError(error: unknown): error is IssueBillingKeyError;
7
+ export declare class IssueBillingKeyError extends Error implements PortOneError {
8
+ __portOneErrorType: string;
9
+ transactionType: "ISSUE_BILLING_KEY";
10
+ code: IssueBillingKeyErrorCode;
11
+ message: string;
12
+ billingKey?: string;
13
+ constructor({ code, message, billingKey, }: {
14
+ code: IssueBillingKeyErrorCode;
15
+ message: string;
16
+ billingKey?: string;
17
+ });
18
+ }
19
+ export default IssueBillingKeyError;
@@ -0,0 +1,20 @@
1
+ import { PortOneError } from './index.js';
2
+ import { CheckoutServiceErrorCode } from './CheckoutServiceErrorCode.js';
3
+ import { GrpcErrorCode } from './GrpcErrorCode.js';
4
+ import { TxServicePayErrorCode } from './TxServicePayErrorCode.js';
5
+ export type PaymentErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServicePayErrorCode;
6
+ export declare function isPaymentError(error: unknown): error is PaymentError;
7
+ export declare class PaymentError extends Error implements PortOneError {
8
+ __portOneErrorType: string;
9
+ transactionType: "PAYMENT";
10
+ code: PaymentErrorCode;
11
+ message: string;
12
+ txId?: string;
13
+ paymentId?: string;
14
+ constructor({ code, message, txId, paymentId, }: {
15
+ code: PaymentErrorCode;
16
+ message: string;
17
+ txId?: string;
18
+ paymentId?: string;
19
+ });
20
+ }
@@ -0,0 +1 @@
1
+ export type TxServiceIdentityVerificationErrorCode = 'RequestParseFailed' | 'InvalidEntityState' | 'StoreNotFound' | 'ChannelNotFound' | 'PGProviderError' | 'IdentityVerificationAlreadyVerified' | 'AllChannelsNotSatisfied' | 'UnknownError';
@@ -0,0 +1 @@
1
+ export type TxServiceIssueErrorCode = 'RequestParseFailed' | 'InvalidEntityState' | 'ConfirmUrlRequired' | 'StoreNotFound' | 'ChannelNotFound' | 'PGProviderError' | 'AllChannelsNotSatisfied' | 'BillingKeyNotFound' | 'UnknownError';
@@ -0,0 +1 @@
1
+ export type TxServicePayErrorCode = 'RequestParseFailed' | 'InvalidEntityState' | 'ConfirmUrlRequired' | 'StoreNotFound' | 'ChannelNotFound' | 'PGProviderError' | 'PaymentNotFound' | 'PaymentAlreadyPaid' | 'TransactionNotFound' | 'AllChannelsNotSatisfied' | 'AmountNotEqualToPredefined' | 'ConfirmProcessFailed' | 'UnknownError';
@@ -0,0 +1,7 @@
1
+ export interface PortOneError extends Error {
2
+ __portOneErrorType: string;
3
+ }
4
+ export declare function isPortOneError(error: unknown): error is PortOneError;
5
+ export * from './IdentityVerificationError.js';
6
+ export * from './IssueBillingKeyError.js';
7
+ export * from './PaymentError.js';
@@ -0,0 +1,2 @@
1
+ export { I as IdentityVerificationError, d as IssueBillingKeyError, P as PaymentError, b as isIdentityVerificationError, c as isIssueBillingKeyError, e as isPaymentError, a as isPortOneError } from '../../../chunk-4ed6f045.js';
2
+ import '../../../chunk-ced8f127.js';
@@ -0,0 +1,5 @@
1
+ import * as Entity from './entity/index.js';
2
+ import * as Request from './request/index.js';
3
+ import * as Response from './response/index.js';
4
+ import * as Exception from './exception/index.js';
5
+ export { Entity, Request, Response, Exception };
@@ -0,0 +1,14 @@
1
+ import { Entity } from '../index.js';
2
+ type IdentityVerificationRequest = {
3
+ storeId: string;
4
+ identityVerificationId: string;
5
+ channelKey?: string;
6
+ pgProvider?: Entity.PgProvider;
7
+ isTestChannel?: boolean;
8
+ customer?: Entity.Customer;
9
+ windowType?: Entity.WindowTypes;
10
+ redirectUrl?: string;
11
+ customData?: string;
12
+ bypass?: Entity.IdentityVerificationBypass;
13
+ };
14
+ export default IdentityVerificationRequest;