smart-sms-solutions
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "smart-sms-solutions", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Smart-SMS-Solutions sdk - https://developer.smartsmssolutions.com/", | ||
@@ -5,0 +5,0 @@ "scripts": { |
# Smart sms solutions | ||
## Installation | ||
```bash | ||
pnpm add smart-sms-solutions | ||
``` | ||
```bash | ||
npm install smart-sms-solutions | ||
``` | ||
```bash | ||
yarn add smart-sms-solutions | ||
``` | ||
```bash | ||
bun add smart-sms-solutions | ||
``` | ||
## Usage | ||
```js | ||
import SmartSmsSolutions from "smart-sms-solutions"; | ||
const instance = new SmartSmsSolutions("api_key"); | ||
const balance = await instance.getBalance(); | ||
``` | ||
## Methods | ||
### getBalance | ||
### getDataProductList | ||
### buyInternetData | ||
### buyAirtime | ||
### voiceOtpRequest | ||
### voiceOtpDeliveryStatus | ||
### sendSmsOtp | ||
### sendSms | ||
### submitSenderId | ||
### getPhoneInfo | ||
@@ -11,3 +11,2 @@ import axios, { AxiosInstance } from "axios"; | ||
GetDataPlansResponse, | ||
InboxForwarding, | ||
SendSmsResponse, | ||
@@ -133,23 +132,2 @@ SmartSmsSolutionsResponse, | ||
public async inboxForwarding( | ||
payload: InboxForwarding[], | ||
endpoint: string, | ||
headers?: Record<string, string> | ||
) { | ||
try { | ||
const data = { | ||
data: JSON.stringify(payload), | ||
}; | ||
const res = await axios.post(endpoint, createFormData(data), { | ||
headers: { | ||
...headers, | ||
}, | ||
maxBodyLength: Infinity, | ||
}); | ||
return res.data; | ||
} catch (error: any) { | ||
throw error.response || error; | ||
} | ||
} | ||
/** | ||
@@ -156,0 +134,0 @@ * classTitle and classCode are mutually exclusive use one or the other. |
Sorry, the diff of this file is not supported yet
45
26116
14
556