This package defines types and helpers to be used for NikitaMobile API
| environment variable | required |
|---|---|
| NIKITA_MOBILE_BASE_URL | no |
| NIKITA_MOBILE_USERNAME | yes |
| NIKITA_MOBILE_PASSWORD | yes |
| NIKITA_MOBILE_LOGGING | no |
Use
NIKITA_MOBILE_BASE_URLenvironment variable to change the base URL of the requests By default it is [https://sendsms.nikita.am/broker-api/send]
Sending sms
import { NM } from "nikitamobile";
const messageId = crypto.randomUUID();
await NM.send({
messages: [
{
recipient: "37499454545",
messageId,
sms: {
originator: "Acme",
ttl: 300,
content: {
text: "Welcome!",
},
},
},
],
});We wrote the types according to the documentation, however, it may have some mismatches. If you find any, were are happy to merge PRs.