@tosspayments/payment__types
Advanced tools
Comparing version 1.66.3 to 1.66.4
{ | ||
"name": "@tosspayments/payment__types", | ||
"description": "Toss Payments Payment SDK Types", | ||
"version": "1.66.3", | ||
"version": "1.66.4", | ||
"types": "types/index.d.ts", | ||
@@ -6,0 +6,0 @@ "author": "Toss Payments", |
import BillingAuthRequest from './BillingAuthRequest'; | ||
export default function requestBillingAuth(clientKey: string, method: '카드', requestParams: BillingAuthRequest): Promise<import("../payment/openPaymentWindow").PaymentSuccessParams | undefined>; | ||
export default function requestBillingAuth(clientKey: string, method: '카드', requestParams: BillingAuthRequest): Promise<import("../public-interfaces").PaymentSuccessParams | undefined>; |
@@ -1,3 +0,6 @@ | ||
import { PaymentSuccessParams } from '../payment/openPaymentWindow'; | ||
import BillingAuthRequest from './BillingAuthRequest'; | ||
import { PaymentSuccessParams } from '../public-interfaces'; | ||
type Options = { | ||
sessionCreationApiVersion: string | null; | ||
}; | ||
export declare function isPaymentGatewayCompatible({ clientKey, method, requestParams, }: { | ||
@@ -7,3 +10,10 @@ clientKey: string; | ||
requestParams: BillingAuthRequest; | ||
}): Promise<boolean>; | ||
export declare function requestPaymentGatewayBillingAuth(clientKey: string, method: '카드' | 'CARD', requestParams: BillingAuthRequest): Promise<PaymentSuccessParams | undefined>; | ||
}): Promise<{ | ||
result: true; | ||
sessionCreationApiVersion: string; | ||
} | { | ||
result: boolean; | ||
sessionCreationApiVersion: null; | ||
}>; | ||
export declare function requestPaymentGatewayBillingAuth(clientKey: string, method: '카드' | 'CARD', requestParams: BillingAuthRequest, options: Options): Promise<PaymentSuccessParams | undefined>; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { ValueOf } from '@tosspayments/typings'; | ||
import { ValueOf } from '../utils/types'; | ||
/** | ||
@@ -31,3 +31,3 @@ * @see https://docs.tosspayments.com/reference/codes#%EC%9D%80%ED%96%89-%EC%BD%94%EB%93%9C | ||
}; | ||
export declare type Bank = keyof typeof Bank; | ||
export declare type BankCode = ValueOf<typeof Bank>; | ||
export type Bank = keyof typeof Bank; | ||
export type BankCode = ValueOf<typeof Bank>; |
@@ -1,2 +0,2 @@ | ||
import { ValueOf } from '@tosspayments/typings'; | ||
import { ValueOf } from '../utils/types'; | ||
export declare const CardCompany: { | ||
@@ -34,3 +34,3 @@ readonly 신한: "SHINHAN"; | ||
}; | ||
export declare type CardCompany = keyof typeof CardCompany; | ||
export declare type CardCompanyCode = ValueOf<typeof CardCompany>; | ||
export type CardCompany = keyof typeof CardCompany; | ||
export type CardCompanyCode = ValueOf<typeof CardCompany>; |
@@ -1,2 +0,2 @@ | ||
import { ValueOf } from '@tosspayments/typings'; | ||
import { ValueOf } from '../utils/types'; | ||
export declare const EasyPayMethod: { | ||
@@ -13,3 +13,3 @@ readonly 토스페이: "TOSSPAY"; | ||
}; | ||
export declare type EasyPayMethod = keyof typeof EasyPayMethod; | ||
export declare type EasyPayMethodCode = ValueOf<typeof EasyPayMethod>; | ||
export type EasyPayMethod = keyof typeof EasyPayMethod; | ||
export type EasyPayMethodCode = ValueOf<typeof EasyPayMethod>; |
@@ -1,2 +0,2 @@ | ||
import { ValueOf } from '@tosspayments/typings'; | ||
import { ValueOf } from '../utils/types'; | ||
export declare const ErrorCode: { | ||
@@ -7,2 +7,2 @@ readonly 올바르지_않은_파라미터: "INVALID_PARAMETER"; | ||
}; | ||
export declare type ErrorCode = ValueOf<typeof ErrorCode>; | ||
export type ErrorCode = ValueOf<typeof ErrorCode>; |
@@ -1,2 +0,2 @@ | ||
export declare type PaymentStatus = 'READY' | 'IN_PROGRESS' | 'DONE'; | ||
export type PaymentStatus = 'READY' | 'IN_PROGRESS' | 'DONE'; | ||
export default function getStatus(clientKey: string, paymentKey: string): Promise<PaymentStatus>; |
import { OpenPaymentWindowOptions } from './openPaymentWindow'; | ||
export declare function openDirectPaymentWindow(path: string, params: Record<string, string | boolean>, options?: OpenPaymentWindowOptions): Promise<import("./openPaymentWindow").PaymentSuccessParams | undefined>; | ||
export declare function openDirectPaymentWindow(path: string, params: Record<string, string | boolean>, options?: OpenPaymentWindowOptions): Promise<import("../../public-interfaces").PaymentSuccessParams | undefined>; |
import { OpenPaymentWindowOptions } from './openPaymentWindow'; | ||
export declare function openPaycoWindow(path: string, params: Record<string, string | boolean>, options?: OpenPaymentWindowOptions): Promise<import("./openPaymentWindow").PaymentSuccessParams | undefined>; | ||
export declare function openPaycoWindow(path: string, params: Record<string, string | boolean>, options?: OpenPaymentWindowOptions): Promise<import("../../public-interfaces").PaymentSuccessParams | undefined>; |
@@ -1,2 +0,2 @@ | ||
import { PaymentRequest } from '../PaymentRequest'; | ||
import { PaymentSuccessParams } from '../../public-interfaces'; | ||
export interface OpenPaymentWindowOptions { | ||
@@ -7,9 +7,2 @@ dimmer?: HTMLDivElement; | ||
} | ||
export interface PaymentSuccessParams extends Pick<PaymentRequest, 'amount' | 'orderId'> { | ||
paymentKey: string; | ||
} | ||
export interface PaymentFailureParams extends Pick<PaymentRequest, 'orderId'> { | ||
code: string; | ||
message: string; | ||
} | ||
export declare function openPaymentWindow(path: string, params: Record<string, string | boolean>, options?: OpenPaymentWindowOptions): Promise<PaymentSuccessParams | undefined>; |
import type { Bank, BankCode, CardCompany, CardCompanyCode, EasyPayProvider, EasyPayProviderCode, MobileCarrier } from '@tosspayments/sdk-constants'; | ||
import { ValueOf } from '@tosspayments/typings'; | ||
import { ValueOf } from '../utils/types'; | ||
export declare const PaymentMethod: { | ||
@@ -19,4 +19,4 @@ readonly 카드: "CARD"; | ||
}; | ||
export declare type PaymentMethodType = keyof typeof PaymentMethod; | ||
export declare type PaymentMethodCode = ValueOf<typeof PaymentMethod>; | ||
export type PaymentMethodType = keyof typeof PaymentMethod; | ||
export type PaymentMethodCode = ValueOf<typeof PaymentMethod>; | ||
export declare function resolvePaymentMethodCode(typeOrCode: PaymentMethodType | PaymentMethodCode): PaymentMethodCode; | ||
@@ -70,4 +70,4 @@ export interface BasePaymentRequest { | ||
} | ||
export declare type CardPaymentRequest = DefaultCardPaymentRequest | DirectCardPaymentRequest | DirectEasyPayPaymentRequest; | ||
export declare type CardPaymentRequestWithoutUrl = Omit<DefaultCardPaymentRequest, 'failUrl' | 'successUrl'> | Omit<DirectCardPaymentRequest, 'failUrl' | 'successUrl'> | Omit<DirectEasyPayPaymentRequest, 'failUrl' | 'successUrl'>; | ||
export type CardPaymentRequest = DefaultCardPaymentRequest | DirectCardPaymentRequest | DirectEasyPayPaymentRequest; | ||
export type CardPaymentRequestWithoutUrl = Omit<DefaultCardPaymentRequest, 'failUrl' | 'successUrl'> | Omit<DirectCardPaymentRequest, 'failUrl' | 'successUrl'> | Omit<DirectEasyPayPaymentRequest, 'failUrl' | 'successUrl'>; | ||
interface EscrowProduct { | ||
@@ -111,2 +111,3 @@ id: string; | ||
cashReceipt?: CashReceipt; | ||
customerMobilePhone?: string; | ||
} | ||
@@ -139,2 +140,3 @@ export interface TranferPaymentRequestWithoutUrl extends Omit<TranferPaymentRequest, 'failUrl' | 'successUrl'> { | ||
shipping?: ForeignEasyPayShipping; | ||
pendingUrl?: string; | ||
paymentMethodOptions?: { | ||
@@ -148,4 +150,4 @@ paypal?: { | ||
} | ||
export declare type PaymentRequest = CommonPaymentRequest | CardPaymentRequest | VirtualAccountPaymentRequest | TranferPaymentRequest | ForeignEasyPayPaymentRequest; | ||
export declare type PaymentRequestWithoutUrl = CommonPaymentRequestWithoutUrl | CardPaymentRequestWithoutUrl | VirtualAccountPaymentRequestWithoutUrl | TranferPaymentRequestWithoutUrl | ForeignEasyPayPaymentRequestWithoutUrl; | ||
export type PaymentRequest = CommonPaymentRequest | CardPaymentRequest | VirtualAccountPaymentRequest | TranferPaymentRequest | ForeignEasyPayPaymentRequest; | ||
export type PaymentRequestWithoutUrl = CommonPaymentRequestWithoutUrl | CardPaymentRequestWithoutUrl | VirtualAccountPaymentRequestWithoutUrl | TranferPaymentRequestWithoutUrl | ForeignEasyPayPaymentRequestWithoutUrl; | ||
export declare function isSyncPaymentRequest(params: unknown): params is PaymentRequest; | ||
@@ -152,0 +154,0 @@ export interface PaymentRequestOptions { |
import { CardPaymentRequest, CardPaymentRequestWithoutUrl, PaymentRequestOptions } from '../PaymentRequest'; | ||
export declare function requestCardPayment(clientKey: string, params: CardPaymentRequest | CardPaymentRequestWithoutUrl, paymentRequestOptions?: PaymentRequestOptions): Promise<import("../openPaymentWindow").PaymentSuccessParams | undefined>; | ||
export declare function requestCardPayment(clientKey: string, params: CardPaymentRequest | CardPaymentRequestWithoutUrl, paymentRequestOptions?: PaymentRequestOptions): Promise<import("../../public-interfaces").PaymentSuccessParams | undefined>; |
import { PaymentRequest, PaymentRequestOptions, PaymentRequestWithoutUrl } from '../PaymentRequest'; | ||
export declare function requestOtherPayment(clientKey: string, params: PaymentRequest | PaymentRequestWithoutUrl, paymentRequestOptions?: PaymentRequestOptions): Promise<import("../openPaymentWindow").PaymentSuccessParams | undefined>; | ||
export declare function requestOtherPayment(clientKey: string, params: PaymentRequest | PaymentRequestWithoutUrl, paymentRequestOptions?: PaymentRequestOptions): Promise<import("../../public-interfaces").PaymentSuccessParams | undefined>; |
@@ -1,5 +0,5 @@ | ||
import { PaymentSuccessParams } from '../openPaymentWindow'; | ||
import { CommonPaymentRequest, CommonPaymentRequestWithoutUrl, PaymentMethodCode, PaymentMethodType, PaymentRequest, PaymentRequestWithoutUrl } from '../PaymentRequest'; | ||
import { PaymentSuccessParams } from '../../public-interfaces'; | ||
export interface RequestPaymentResult extends PaymentSuccessParams { | ||
} | ||
export declare function requestPayment(clientKey: string, methodOrParams: PaymentMethodType | PaymentMethodCode | CommonPaymentRequest | CommonPaymentRequestWithoutUrl, requestParams?: PaymentRequest | PaymentRequestWithoutUrl): Promise<void | PaymentSuccessParams>; |
@@ -1,6 +0,23 @@ | ||
import { CardPaymentRequest, PaymentMethodCode } from '../PaymentRequest'; | ||
export declare function isPaymentGatewayCompatible({ amount, clientKey, method, ...params }: { | ||
import { PaymentMethodCode, PaymentRequest, PaymentRequestWithoutUrl } from '../PaymentRequest'; | ||
import { PaymentSuccessParams } from '../../public-interfaces'; | ||
type RouteResponse = { | ||
result: true; | ||
sessionCreationApiVersion: string; | ||
} | { | ||
result: false; | ||
sessionCreationApiVersion: null; | ||
}; | ||
export declare function isPaymentGatewayCompatible({ amount, clientKey, method, isPromise, ...params }: { | ||
clientKey: string; | ||
method: PaymentMethodCode; | ||
} & CardPaymentRequest): Promise<boolean>; | ||
export declare function requestPaymentGatewayCardPayment(clientKey: string, params: CardPaymentRequest): Promise<void>; | ||
isPromise: boolean; | ||
} & (PaymentRequest | PaymentRequestWithoutUrl)): Promise<RouteResponse>; | ||
interface Options { | ||
sessionCreationApiVersion: string; | ||
isPromise?: true; | ||
} | ||
export declare function requestPaymentGatewayPayment(clientKey: string, methodCode: PaymentMethodCode, params: PaymentRequest, options: Options): Promise<void>; | ||
export declare namespace requestPaymentGatewayPayment { | ||
var async: (clientKey: string, methodCode: PaymentMethodCode, params: PaymentRequestWithoutUrl, options: Options) => Promise<PaymentSuccessParams>; | ||
} | ||
export {}; |
import { PaymentMethodCode, PaymentRequest, PaymentRequestOptions, PaymentRequestWithoutUrl } from '../PaymentRequest'; | ||
export declare function requestPXPayment(clientKey: string, method: PaymentMethodCode, params: PaymentRequest | PaymentRequestWithoutUrl, options?: PaymentRequestOptions): Promise<import("../openPaymentWindow").PaymentSuccessParams | undefined>; | ||
export declare function requestPXPayment(clientKey: string, method: PaymentMethodCode, params: PaymentRequest | PaymentRequestWithoutUrl, options?: PaymentRequestOptions): Promise<import("../../public-interfaces").PaymentSuccessParams | undefined>; | ||
export declare namespace requestPXPayment { | ||
var async: (clientKey: string, method: PaymentMethodCode, params: PaymentRequest | PaymentRequestWithoutUrl) => Promise<import("../openPaymentWindow").PaymentSuccessParams | undefined>; | ||
var async: (clientKey: string, method: PaymentMethodCode, params: PaymentRequest | PaymentRequestWithoutUrl) => Promise<import("../../public-interfaces").PaymentSuccessParams | undefined>; | ||
} |
@@ -8,2 +8,3 @@ import BillingAuthRequest from './billing/BillingAuthRequest'; | ||
serverUrl?: string; | ||
serverHeaders?: Record<string, string>; | ||
pgWindowServerUrl?: string; | ||
@@ -36,3 +37,3 @@ gtid?: string; | ||
}; | ||
readonly requestBillingAuth: (method: '카드', params: BillingAuthRequest) => Promise<import("./payment/openPaymentWindow").PaymentSuccessParams | undefined>; | ||
readonly requestBillingAuth: (method: '카드', params: BillingAuthRequest) => Promise<import("./public-interfaces").PaymentSuccessParams | undefined>; | ||
readonly cancelPayment: typeof cancelPayment; | ||
@@ -43,4 +44,4 @@ }; | ||
} | ||
export declare type TossPaymentsConstructor = typeof TossPayments; | ||
export declare type TossPaymentsInstance = ReturnType<TossPaymentsConstructor>; | ||
export type TossPaymentsConstructor = typeof TossPayments; | ||
export type TossPaymentsInstance = ReturnType<TossPaymentsConstructor>; | ||
declare global { | ||
@@ -47,0 +48,0 @@ interface Window { |
@@ -5,4 +5,6 @@ export declare const STAGE: Stage; | ||
export declare const PAYMENT_GATEWAY_URL_BASE: any; | ||
export declare const PAYMENT_GATEWAY_SANDBOX_URL_BASE: any; | ||
export declare const PAYMENT_GATEWAY_API_URL_BASE: any; | ||
export declare const PAYMENT_GATEWAY_API_SANDBOX_URL_BASE: any; | ||
export declare const COMMIT_SHA: any; | ||
export declare type Stage = 'baemin' | 'baemin-staging' | 'baemin-dev' | 'v1' | 'beta' | 'alpha' | 'dev'; | ||
export type Stage = 'baemin' | 'baemin-staging' | 'baemin-dev' | 'v1' | 'beta' | 'alpha' | 'dev'; |
@@ -1,1 +0,8 @@ | ||
export declare const globalContext: Record<string, string | undefined>; | ||
export declare const globalContext: { | ||
clientUrl: string | undefined; | ||
serverUrl: string | undefined; | ||
serverHeaders: Record<string, string>; | ||
pgWindowServerUrl: string | undefined; | ||
gtid: string | undefined; | ||
service: string | undefined; | ||
}; |
@@ -6,3 +6,3 @@ export interface TossPaymentsMessageEvent<T = any> { | ||
} | ||
declare type Callback<T = any> = (event: TossPaymentsMessageEvent<T>) => void; | ||
type Callback<T = any> = (event: TossPaymentsMessageEvent<T>) => void; | ||
declare const PostMessageListener: { | ||
@@ -9,0 +9,0 @@ add(callback: Callback): void; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24517
43
528