# fivesim_ts

> Simple wrapper around 5Sim API with TypeScript support

Latest version **1.0.3** (published 2023-03-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install fivesim_ts
pnpm add fivesim_ts
yarn add fivesim_ts
bun add fivesim_ts
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2023-03-08 |
| First published | 2023-03-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 106.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Karolus Xiao |
| Maintainers | ubuygold |

## Links

- npm: https://www.npmjs.com/package/fivesim_ts
- Repository: https://github.com/ubuygold/FiveSim_TS
- Homepage: https://github.com/ubuygold/FiveSim_TS#readme
- Issues: https://github.com/ubuygold/FiveSim_TS/issues
- npm.io page: https://npm.io/package/fivesim_ts

## Dependencies (3)

- [date](https://npm.io/package/date.md) ^1.0.2
- [axios](https://npm.io/package/axios.md) ^1.3.4
- [delay](https://npm.io/package/delay.md) ^5.0.0

## Recent versions

- 1.0.3 (latest) — 2023-03-08
- 1.0.2 — 2023-03-08
- 1.0.1 — 2023-03-08

## README

# 5SIM

This is an unofficial wrapper around the 5SIM API calls with TypeScript support.
Forked from [nickpick42/FiveSim](https://github.com/nickpick42/FiveSim).

## Installation
https://www.npmjs.com/package/fivesim_ts
Use the package manager [npm](https://www.npmjs.com/) to install 5sim.

```bash
npm install fivesim_ts
```
##Recommended Usage

```javascript
const FiveSim = require("fivesim_ts");

let main = async ()=> {

    let apiKey = "API_KEY_HERE"
    let SimTesting = FiveSim(apiKey)
    let numberRequest = await SimTesting.getAuthorizationNumber('any','any','google')
    let phoneNumber = numberRequest.phone //Generated phone number
    //await page.type("input[name='phone_number']",phoneNumber)
    let code = await SimTesting.waitForCode().then( verificationCode => verificationCode)
    if ( code === undefinded){
        // await SimTesting.banNumber() OR  await SimTesting.finishOrder() (NO code recieved)
    }else{
         //await page.type("input[name='verification_code']",code)
    }
   
}
main()

```




##Manual Usage

```javascript
const FiveSim = require("../main");

let main = async ()=> {
    let apiKey = "PUT_API_KEY_HERE"
    let SimTesting = FiveSim(apiKey)
    let numberRequest = await SimTesting.getAuthorizationNumber('any','any','google')
    let phoneNumber = numberRequest.phone //Generated phone number
    let id = numberRequest.id //Id to check order
    let check = await SimTesting.checkOrder()
    let code = check.sms[0].code//Recieved Code
    let finish = await SimTesting.finishOrder()// Finish order if successful
    console.log(finish)

}
main()
```

## Contributing
Huge thank you to the creators of 5sim. The API endpoints are extremely easy to use and thought I would do my part and upload a basic wrapper around the endpoints. Please contact me for any requested changes or updates. 
Forked from [nickpick42/FiveSim](https://github.com/nickpick42/FiveSim).
Added TS Support for testing(by me). Make an issue if not work.


## License
[MIT](https://choosealicense.com/licenses/mit/)

---
_Source: https://npm.io/package/fivesim_ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
