@flashcoffee/fcbackendutils
v1.3.1
Published
flashcoffee utils
Downloads
260
Readme
fcbackendutils
This package is used on the flashcoffee project. It can be used for Frontend & Backend
Requirements
Version 1.2.71 or newer
- NodeJS 16 or newer
- AWS-SDK V3
Version 1.2.70 or earlier
- NodeJS 14 or earlier
- AWS-SDK V2
Available Utils:
Exception
- BadRequestException will return http status 400
- UnauthorizedException will return http status 401
- ForbiddenException will return http status 403
- UnprocessableEntityException will return http status 422
- UnknownException will return http status 500
Filters
- HttpExceptionFilter
Interceptors
- Serialize
Utils
- CurrencyUtils
- ExceptionUtil
- DatetimeUtil
- ddlog
- stringify, parse
SNS
- Order SNS
- Checkout
await OrderSNS.checkout(data)
- Failed
await OrderSNS.failed(data)
- Paid
await OrderSNS.paid(data)
- Checkout
- Payment SNS
- Payment Status Updated
Installation
yarn add @flashcoffee/fcbackendutils
Usage
import { OrderSNS } from '@flashcoffee/fcbackendutils';