@portone/browser-sdk 0.0.6 → 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.
@@ -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;
@@ -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
@@ -783,7 +783,7 @@ const IssueBillingKeyUIType = {
783
783
  PAYPAL_RT: 'PAYPAL_RT',
784
784
  };
785
785
 
786
- var index = /*#__PURE__*/Object.freeze({
786
+ var index$1 = {
787
787
  __proto__: null,
788
788
  Bank: Bank,
789
789
  BillingKeyAndPayMethod: BillingKeyAndPayMethod,
@@ -801,13 +801,16 @@ var index = /*#__PURE__*/Object.freeze({
801
801
  PgProvider: PgProvider,
802
802
  TransactionType: TransactionType,
803
803
  WindowType: WindowType
804
- });
804
+ };
805
805
 
806
806
  function isIdentityVerificationError(error) {
807
807
  return (isPortOneError(error) &&
808
808
  error.__portOneErrorType === 'IdentityVerificationError');
809
809
  }
810
810
  class IdentityVerificationError extends Error {
811
+ static [Symbol.hasInstance](instance) {
812
+ return isIdentityVerificationError(instance);
813
+ }
811
814
  constructor({ code, message, identityVerificationId, identityVerificationTxId, }) {
812
815
  super(message);
813
816
  this.__portOneErrorType = 'IdentityVerificationError';
@@ -824,6 +827,9 @@ function isIssueBillingKeyAndPayError(error) {
824
827
  error.__portOneErrorType === 'IssueBillingKeyAndPayError');
825
828
  }
826
829
  class IssueBillingKeyAndPayError extends Error {
830
+ static [Symbol.hasInstance](instance) {
831
+ return isIssueBillingKeyAndPayError(instance);
832
+ }
827
833
  constructor({ txId, paymentId, billingKey, code, message, }) {
828
834
  super(message);
829
835
  this.__portOneErrorType = 'IssueBillingKeyAndPayError';
@@ -840,6 +846,9 @@ function isIssueBillingKeyError(error) {
840
846
  return (isPortOneError(error) && error.__portOneErrorType === 'IssueBillingKeyError');
841
847
  }
842
848
  class IssueBillingKeyError extends Error {
849
+ static [Symbol.hasInstance](instance) {
850
+ return isIssueBillingKeyError(instance);
851
+ }
843
852
  constructor({ code, message, billingKey, }) {
844
853
  super(message);
845
854
  this.__portOneErrorType = 'IssueBillingKeyError';
@@ -854,6 +863,9 @@ function isModuleError(error) {
854
863
  return isPortOneError(error) && error.__portOneErrorType === 'ModuleError';
855
864
  }
856
865
  class ModuleError extends Error {
866
+ static [Symbol.hasInstance](instance) {
867
+ return isModuleError(instance);
868
+ }
857
869
  constructor({ code, message }) {
858
870
  super(message);
859
871
  this.__portOneErrorType = 'ModuleError';
@@ -866,6 +878,9 @@ function isPaymentError(error) {
866
878
  return isPortOneError(error) && error.__portOneErrorType === 'PaymentError';
867
879
  }
868
880
  class PaymentError extends Error {
881
+ static [Symbol.hasInstance](instance) {
882
+ return isPaymentError(instance);
883
+ }
869
884
  constructor({ code, message, txId, paymentId, }) {
870
885
  super(message);
871
886
  this.__portOneErrorType = 'PaymentError';
@@ -882,6 +897,9 @@ function isLoadIssueBillingKeyUIError(error) {
882
897
  error.__portOneErrorType === 'LoadIssueBillingKeyUIError');
883
898
  }
884
899
  class LoadIssueBillingKeyUIError extends Error {
900
+ static [Symbol.hasInstance](instance) {
901
+ return isLoadIssueBillingKeyUIError(instance);
902
+ }
885
903
  constructor({ code, message, }) {
886
904
  super(message);
887
905
  this.__portOneErrorType = 'LoadIssueBillingKeyUIError';
@@ -895,6 +913,9 @@ function isLoadPaymentUIError(error) {
895
913
  return (isPortOneError(error) && error.__portOneErrorType === 'LoadPaymentUIError');
896
914
  }
897
915
  class LoadPaymentUIError extends Error {
916
+ static [Symbol.hasInstance](instance) {
917
+ return isLoadPaymentUIError(instance);
918
+ }
898
919
  constructor({ code, message, }) {
899
920
  super(message);
900
921
  this.__portOneErrorType = 'LoadPaymentUIError';
@@ -911,6 +932,25 @@ function isPortOneError(error) {
911
932
  typeof error.__portOneErrorType === 'string');
912
933
  }
913
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
+
914
954
  const PortOne = {
915
955
  requestIdentityVerification,
916
956
  requestIssueBillingKeyAndPay,
@@ -922,7 +962,7 @@ const PortOne = {
922
962
  updateLoadIssueBillingKeyUIRequest,
923
963
  };
924
964
 
925
- exports.Entity = index;
965
+ exports.Entity = index$1;
926
966
  exports.IdentityVerificationError = IdentityVerificationError;
927
967
  exports.IssueBillingKeyAndPayError = IssueBillingKeyAndPayError;
928
968
  exports.IssueBillingKeyError = IssueBillingKeyError;
@@ -932,6 +972,7 @@ exports.ModuleError = ModuleError;
932
972
  exports.PaymentError = PaymentError;
933
973
  exports.__INTERNAL__setPortOneSdkUrl = setPortOneJsSdkUrl;
934
974
  exports.default = PortOne;
975
+ exports.errors = index;
935
976
  exports.isIdentityVerificationError = isIdentityVerificationError;
936
977
  exports.isIssueBillingKeyAndPayError = isIssueBillingKeyAndPayError;
937
978
  exports.isIssueBillingKeyError = isIssueBillingKeyError;
package/dist/v2.js CHANGED
@@ -779,7 +779,7 @@ const IssueBillingKeyUIType = {
779
779
  PAYPAL_RT: 'PAYPAL_RT',
780
780
  };
781
781
 
782
- var index = /*#__PURE__*/Object.freeze({
782
+ var index$1 = {
783
783
  __proto__: null,
784
784
  Bank: Bank,
785
785
  BillingKeyAndPayMethod: BillingKeyAndPayMethod,
@@ -797,13 +797,16 @@ var index = /*#__PURE__*/Object.freeze({
797
797
  PgProvider: PgProvider,
798
798
  TransactionType: TransactionType,
799
799
  WindowType: WindowType
800
- });
800
+ };
801
801
 
802
802
  function isIdentityVerificationError(error) {
803
803
  return (isPortOneError(error) &&
804
804
  error.__portOneErrorType === 'IdentityVerificationError');
805
805
  }
806
806
  class IdentityVerificationError extends Error {
807
+ static [Symbol.hasInstance](instance) {
808
+ return isIdentityVerificationError(instance);
809
+ }
807
810
  constructor({ code, message, identityVerificationId, identityVerificationTxId, }) {
808
811
  super(message);
809
812
  this.__portOneErrorType = 'IdentityVerificationError';
@@ -820,6 +823,9 @@ function isIssueBillingKeyAndPayError(error) {
820
823
  error.__portOneErrorType === 'IssueBillingKeyAndPayError');
821
824
  }
822
825
  class IssueBillingKeyAndPayError extends Error {
826
+ static [Symbol.hasInstance](instance) {
827
+ return isIssueBillingKeyAndPayError(instance);
828
+ }
823
829
  constructor({ txId, paymentId, billingKey, code, message, }) {
824
830
  super(message);
825
831
  this.__portOneErrorType = 'IssueBillingKeyAndPayError';
@@ -836,6 +842,9 @@ function isIssueBillingKeyError(error) {
836
842
  return (isPortOneError(error) && error.__portOneErrorType === 'IssueBillingKeyError');
837
843
  }
838
844
  class IssueBillingKeyError extends Error {
845
+ static [Symbol.hasInstance](instance) {
846
+ return isIssueBillingKeyError(instance);
847
+ }
839
848
  constructor({ code, message, billingKey, }) {
840
849
  super(message);
841
850
  this.__portOneErrorType = 'IssueBillingKeyError';
@@ -850,6 +859,9 @@ function isModuleError(error) {
850
859
  return isPortOneError(error) && error.__portOneErrorType === 'ModuleError';
851
860
  }
852
861
  class ModuleError extends Error {
862
+ static [Symbol.hasInstance](instance) {
863
+ return isModuleError(instance);
864
+ }
853
865
  constructor({ code, message }) {
854
866
  super(message);
855
867
  this.__portOneErrorType = 'ModuleError';
@@ -862,6 +874,9 @@ function isPaymentError(error) {
862
874
  return isPortOneError(error) && error.__portOneErrorType === 'PaymentError';
863
875
  }
864
876
  class PaymentError extends Error {
877
+ static [Symbol.hasInstance](instance) {
878
+ return isPaymentError(instance);
879
+ }
865
880
  constructor({ code, message, txId, paymentId, }) {
866
881
  super(message);
867
882
  this.__portOneErrorType = 'PaymentError';
@@ -878,6 +893,9 @@ function isLoadIssueBillingKeyUIError(error) {
878
893
  error.__portOneErrorType === 'LoadIssueBillingKeyUIError');
879
894
  }
880
895
  class LoadIssueBillingKeyUIError extends Error {
896
+ static [Symbol.hasInstance](instance) {
897
+ return isLoadIssueBillingKeyUIError(instance);
898
+ }
881
899
  constructor({ code, message, }) {
882
900
  super(message);
883
901
  this.__portOneErrorType = 'LoadIssueBillingKeyUIError';
@@ -891,6 +909,9 @@ function isLoadPaymentUIError(error) {
891
909
  return (isPortOneError(error) && error.__portOneErrorType === 'LoadPaymentUIError');
892
910
  }
893
911
  class LoadPaymentUIError extends Error {
912
+ static [Symbol.hasInstance](instance) {
913
+ return isLoadPaymentUIError(instance);
914
+ }
894
915
  constructor({ code, message, }) {
895
916
  super(message);
896
917
  this.__portOneErrorType = 'LoadPaymentUIError';
@@ -907,6 +928,25 @@ function isPortOneError(error) {
907
928
  typeof error.__portOneErrorType === 'string');
908
929
  }
909
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
+
910
950
  const PortOne = {
911
951
  requestIdentityVerification,
912
952
  requestIssueBillingKeyAndPay,
@@ -918,4 +958,4 @@ const PortOne = {
918
958
  updateLoadIssueBillingKeyUIRequest,
919
959
  };
920
960
 
921
- 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.6",
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
+ }