Releases: hubtwork/NCPClient
v1.2.0
v1.2.0 ( 2021. 5. 14 )
-
Add preprocessed data (#4)
-
preprocessed data will deliver simple, essentials to client
-
add SENS sms services
-
add PAPAGO services
-
-
Add test with bug fixed
- bug fix with mocked response for test
- test with preprocessed data
- test with latest
-
Update readme
- update readme with preprocessed data exmaple
- update usage functions with parameters
v1.1.2
v1.1.0
v1.0.5
NCPClient will support service's unique error types
-
NCPClient's request module,
ApiRequestcan handle service's unique errors nowservice's unique error means almost parameter validation.
If given parameter is incorrect with NCP-defined format, It will return ApiClientResponse with error and request won't send.
[ SENS - SMS service ] SearchMessageRequest / SearchMessageResult now supported
-
Using SendSMS API , you can get
requestIdof request from response -
SearchMessageRequest with requestId from SendSMS API's response will return the detail delivery request
const { isSuccess, data } = await smsService.searchMessageRequest('requestId')
-
SearchMessageResponse with messageId from SearchMessageRequest API's response will return the detail delivery results
const { isSuccess, data } = await smsService.searchMessageResult('messageId')
Dependency changed
- crypto changed to built-in module, so deprecated in dependency
v1.0.4
ApiRequest clarity guaranteed
ApiRequestwill be used more clearly to request http requestsApiRequestrepresent root Interface that defines the configuration for the request
ApiClient, the request Wrapper added
-
After this updates, no pure
axiosInstance.requestwill be used -
ApiClient, custom request wrapper handles errors and return uniformed custom response -
Error Handling - url validation, error response from server / other reasons
-
Uniformed Response
type ApiClientResponse = { isSuccess: boolean // if isSuccess, will contain data and no errorMessage data?: T // if isFailed, will contain errorMessage and no data errorMessage?: {} }
[ SENS - SMS service ] SendSMS support Multi-mode
sendSMSwill support sending SMS to multiple people- User can pass param
SendSMSParamType[]if want to send to multiple SMS at the same time
Ensure API Service scalability
-
Other NCP API Service will be added continuously, so consider scalability.
-
SMSService agent can be generated like belowvar { SENS } = require('ncp-client') ... const sens = new SENS() const smsService = sens.smsService(ncpAuthKey, smsAuthKey)