UNPKG

@bootpay/backend-js

Version:

Bootpay Server Side Package for Node.js

41 lines (40 loc) 1.42 kB
import { BootpayCommerceResource, BootpayCommerceResponse } from '../../commerce-resource'; import { CommerceProduct, ProductListParams, ProductStatusParams } from '../types'; export declare class ProductModule { private bootpay; constructor(bootpay: BootpayCommerceResource); /** * 상품 목록 조회 * @param params 조회 파라미터 */ list(params?: ProductListParams): Promise<BootpayCommerceResponse<{ items: CommerceProduct[]; total: number; }>>; /** * 상품 생성 (이미지 포함) * @param product 상품 정보 * @param imagePaths 이미지 파일 경로 배열 */ create(product: CommerceProduct, imagePaths?: string[]): Promise<BootpayCommerceResponse<CommerceProduct>>; /** * 상품 상세 조회 * @param productId 상품 ID */ detail(productId: string): Promise<BootpayCommerceResponse<CommerceProduct>>; /** * 상품 수정 * @param product 상품 정보 */ update(product: CommerceProduct): Promise<BootpayCommerceResponse<CommerceProduct>>; /** * 상품 상태 변경 * @param params 상태 변경 파라미터 */ status(params: ProductStatusParams): Promise<BootpayCommerceResponse<CommerceProduct>>; /** * 상품 삭제 * @param productId 상품 ID */ delete(productId: string): Promise<BootpayCommerceResponse<null>>; }