🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@sendly/node

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sendly/node - npm Package Compare versions

Comparing version
3.5.2
to
3.5.3
+12
-9
dist/index.d.mts

@@ -758,15 +758,18 @@ /**

/**
* Test phone numbers for sandbox mode
* Test phone numbers for sandbox mode.
* Use these with test API keys (sk_test_*) to simulate different scenarios.
*/
declare const SANDBOX_TEST_NUMBERS: {
/** Always succeeds instantly */
readonly SUCCESS: "+15550001234";
/** Succeeds after 10 second delay */
readonly DELAYED: "+15550001010";
/** Always succeeds - any number not in error list succeeds */
readonly SUCCESS: "+15005550000";
/** Fails with invalid_number error */
readonly INVALID: "+15550001001";
/** Fails with carrier_rejected error after 2 seconds */
readonly REJECTED: "+15550001002";
readonly INVALID: "+15005550001";
/** Fails with unroutable destination error */
readonly UNROUTABLE: "+15005550002";
/** Fails with queue_full error */
readonly QUEUE_FULL: "+15005550003";
/** Fails with rate_limit_exceeded error */
readonly RATE_LIMITED: "+15550001003";
readonly RATE_LIMITED: "+15005550004";
/** Fails with carrier_violation error */
readonly CARRIER_VIOLATION: "+15005550006";
};

@@ -773,0 +776,0 @@

@@ -758,15 +758,18 @@ /**

/**
* Test phone numbers for sandbox mode
* Test phone numbers for sandbox mode.
* Use these with test API keys (sk_test_*) to simulate different scenarios.
*/
declare const SANDBOX_TEST_NUMBERS: {
/** Always succeeds instantly */
readonly SUCCESS: "+15550001234";
/** Succeeds after 10 second delay */
readonly DELAYED: "+15550001010";
/** Always succeeds - any number not in error list succeeds */
readonly SUCCESS: "+15005550000";
/** Fails with invalid_number error */
readonly INVALID: "+15550001001";
/** Fails with carrier_rejected error after 2 seconds */
readonly REJECTED: "+15550001002";
readonly INVALID: "+15005550001";
/** Fails with unroutable destination error */
readonly UNROUTABLE: "+15005550002";
/** Fails with queue_full error */
readonly QUEUE_FULL: "+15005550003";
/** Fails with rate_limit_exceeded error */
readonly RATE_LIMITED: "+15550001003";
readonly RATE_LIMITED: "+15005550004";
/** Fails with carrier_violation error */
readonly CARRIER_VIOLATION: "+15005550006";
};

@@ -773,0 +776,0 @@

@@ -444,12 +444,14 @@ "use strict";

var SANDBOX_TEST_NUMBERS = {
/** Always succeeds instantly */
SUCCESS: "+15550001234",
/** Succeeds after 10 second delay */
DELAYED: "+15550001010",
/** Always succeeds - any number not in error list succeeds */
SUCCESS: "+15005550000",
/** Fails with invalid_number error */
INVALID: "+15550001001",
/** Fails with carrier_rejected error after 2 seconds */
REJECTED: "+15550001002",
INVALID: "+15005550001",
/** Fails with unroutable destination error */
UNROUTABLE: "+15005550002",
/** Fails with queue_full error */
QUEUE_FULL: "+15005550003",
/** Fails with rate_limit_exceeded error */
RATE_LIMITED: "+15550001003"
RATE_LIMITED: "+15005550004",
/** Fails with carrier_violation error */
CARRIER_VIOLATION: "+15005550006"
};

@@ -456,0 +458,0 @@

@@ -384,12 +384,14 @@ // src/errors.ts

var SANDBOX_TEST_NUMBERS = {
/** Always succeeds instantly */
SUCCESS: "+15550001234",
/** Succeeds after 10 second delay */
DELAYED: "+15550001010",
/** Always succeeds - any number not in error list succeeds */
SUCCESS: "+15005550000",
/** Fails with invalid_number error */
INVALID: "+15550001001",
/** Fails with carrier_rejected error after 2 seconds */
REJECTED: "+15550001002",
INVALID: "+15005550001",
/** Fails with unroutable destination error */
UNROUTABLE: "+15005550002",
/** Fails with queue_full error */
QUEUE_FULL: "+15005550003",
/** Fails with rate_limit_exceeded error */
RATE_LIMITED: "+15550001003"
RATE_LIMITED: "+15005550004",
/** Fails with carrier_violation error */
CARRIER_VIOLATION: "+15005550006"
};

@@ -396,0 +398,0 @@

{
"name": "@sendly/node",
"version": "3.5.2",
"version": "3.5.3",
"description": "Official Sendly Node.js SDK for SMS messaging",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -80,8 +80,15 @@ # @sendly/node

// Basic usage
// Basic usage (marketing message - default)
const message = await sendly.messages.send({
to: '+15551234567',
text: 'Your verification code is: 123456'
text: 'Check out our new features!'
});
// Transactional message (bypasses quiet hours)
const message = await sendly.messages.send({
to: '+15551234567',
text: 'Your verification code is: 123456',
messageType: 'transactional'
});
// With custom sender ID (international)

@@ -205,3 +212,3 @@ const message = await sendly.messages.send({

await sendly.messages.send({
to: SANDBOX_TEST_NUMBERS.SUCCESS, // +15550001234 - Always succeeds
to: SANDBOX_TEST_NUMBERS.SUCCESS, // +15005550000 - Always succeeds
text: 'Test message'

@@ -211,3 +218,3 @@ });

await sendly.messages.send({
to: SANDBOX_TEST_NUMBERS.INVALID, // +15550001001 - Returns invalid_number error
to: SANDBOX_TEST_NUMBERS.INVALID, // +15005550001 - Returns invalid_number error
text: 'Test message'

@@ -221,7 +228,8 @@ });

|--------|----------|
| `+15550001234` | Instant success |
| `+15550001010` | Success after 10s delay |
| `+15550001001` | Fails: invalid_number |
| `+15550001002` | Fails: carrier_rejected (2s delay) |
| `+15550001003` | Fails: rate_limit_exceeded |
| `+15005550000` | Success (instant) |
| `+15005550001` | Fails: invalid_number |
| `+15005550002` | Fails: unroutable_destination |
| `+15005550003` | Fails: queue_full |
| `+15005550004` | Fails: rate_limit_exceeded |
| `+15005550006` | Fails: carrier_violation |

@@ -228,0 +236,0 @@ ## Pricing Tiers