contiguity 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +78 -1
  2. package/package.json +6 -3
package/README.md CHANGED
@@ -1 +1,78 @@
1
- npm i contiguity
1
+ <p align='center'><img src="https://contiguity.co/assets/icon-black.png" height="150px"/></p>
2
+ <h1 align='center'>Contiguity JavaScript SDK</h1>
3
+
4
+ <p align='center'>
5
+ <img display="inline-block" src="https://img.shields.io/npm/v/contiguity?style=for-the-badge" />
6
+ <img display="inline-block" src="https://img.shields.io/badge/Made%20with-TypeScript-3178C6?style=for-the-badge&logo=typescript&logoColor=white" />
7
+ </p>
8
+
9
+ <p align='center'>The official TypeScript/JavaScript SDK for Contiguity's APIs.</p>
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ # Using npm
15
+ npm install contiguity
16
+
17
+ # Using pnpm
18
+ pnpm add contiguity
19
+
20
+ # Using bun
21
+ bun add contiguity
22
+ ```
23
+
24
+ ## Getting Started
25
+
26
+ ```typescript
27
+ import { Contiguity } from 'contiguity';
28
+
29
+ const contiguity = new Contiguity('contiguity_sk_...your_token...');
30
+ ```
31
+
32
+ Get your API token from the [Contiguity Console](https://console.contiguity.com/).
33
+
34
+ ### Send a text message
35
+
36
+ ```typescript
37
+ const response = await contiguity.text.send({
38
+ to: "+1234567890",
39
+ message: "Hello from Contiguity!"
40
+ });
41
+ ```
42
+
43
+ ### Send an email
44
+
45
+ ```typescript
46
+ const response = await contiguity.email.send({
47
+ to: "user@example.com",
48
+ from: "Your App <no-reply@yourapp.com>",
49
+ subject: "Welcome!",
50
+ body: { text: "Welcome to our platform!" }
51
+ });
52
+ ```
53
+
54
+ ### Send and verify OTP
55
+
56
+ ```typescript
57
+ const otpResponse = await contiguity.otp.send({
58
+ to: "+1234567890",
59
+ language: "en",
60
+ name: "MyApp"
61
+ });
62
+
63
+ const verification = await contiguity.otp.verify({
64
+ otp_id: otpResponse.otp_id,
65
+ otp: "123456"
66
+ });
67
+ ```
68
+
69
+ ## Documentation
70
+
71
+ For complete documentation, examples, and API reference, visit [docs.contiguity.com](https://docs.contiguity.com/sdk/js/overview).
72
+
73
+ ## Resources
74
+
75
+ - [API Reference](https://docs.contiguity.com/api-reference/) - Complete API documentation
76
+ - [Console](https://console.contiguity.com/) - Manage your account and API keys
77
+ - [Discord Community](https://discord.gg/Z9K5XAsS7H) - Get support and connect with other developers
78
+ - [GitHub Repository](https://github.com/contiguity/javascript) - Source code and issue tracking
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "contiguity",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
- "description": "Contiguity's official JavaScript SDK",
5
+ "description": "Contiguity's official TypeScript SDK",
6
6
  "author": "Contiguity",
7
7
  "license": "MIT",
8
8
  "main": "./dist/index.js",
@@ -20,7 +20,9 @@
20
20
  "whatsapp",
21
21
  "imessage",
22
22
  "otp",
23
- "domains"
23
+ "send texts",
24
+ "api",
25
+ "sdk"
24
26
  ],
25
27
  "homepage": "https://contiguity.com",
26
28
  "bugs": {
@@ -30,6 +32,7 @@
30
32
  "type": "git",
31
33
  "url": "https://github.com/contiguity/javascript.git"
32
34
  },
35
+ "documentation": "https://docs.contiguity.com/sdk/js/overview",
33
36
  "scripts": {
34
37
  "publish": "bun publish --access public",
35
38
  "dev": "bun run src/index.ts",