TossPaymentsKit — @gj-kit/toss-payments
A public type from @gj-kit/toss-payments/server. The signature below is taken directly from the 0.6.1 release declaration.
Verified import example
Section titled “Verified import example”import { TossPaymentsKit } from '@gj-kit/toss-payments/server';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”/** * 파사드 산출물 — 배선한 플로우만 프로퍼티가 존재한다. * * 기지 리스크(§2): 조건부 교차 타입의 에러 메시지는 "`billing` 프로퍼티가 없다"고만 * 말하고 원인(billingKeys 미배선)을 직접 말하지 않는다 — 각 프로퍼티 TSDoc의 * "이 프로퍼티가 없다면" 매핑과 README 에러↔원인 표를 참조하라. */type TossPaymentsKit<E extends Env, K extends KeyKind, C> = { readonly client: TossServerClient<E, K>; /** * 항상 존재 — config.events 미주입 시 no-op 구독 표면(구독해도 아무 이벤트도 발화되지 * 않는다 — 발행 지점 순회 0회). 이벤트를 받으려면 `createTossEvents()`를 config.events에 * 주입하라. */ readonly events: TossEvents;} & (C extends { readonly orders: OrderStore;} ? { /** confirm 플로우. **이 프로퍼티가 없다면** → config에 `orders`(OrderStore)가 빠진 것이다. */ readonly confirm: ConfirmFlow<E>;} : {}) & (C extends { readonly billingKeys: BillingKeyStore;} ? { /** * 빌링 플로우. **이 프로퍼티가 없다면** → config에 `billingKeys`(BillingKeyStore)가 * 빠졌거나, 위젯 시크릿 키 파사드다(빌링은 API 키 전용 — 키 쌍 규칙). */ readonly billing: BillingFlow<E, CapabilitiesOf<C>>;} : {}) & (C extends { readonly webhook: object;} ? { /** 웹훅 verifier. **이 프로퍼티가 없다면** → config에 `webhook`({ dedupe })이 빠진 것이다. */ readonly webhook: WebhookVerifier;} : {});This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.
Release context
Section titled “Release context”- Package:
@gj-kit/toss-payments - Version:
0.6.1 - Public entry:
./server - Source: GitHub