@ariary/notification 2.0.2 → 2.0.3
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.
- package/README.md +14 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,15 +32,25 @@ const task = await Ariari.send(
|
|
|
32
32
|
|
|
33
33
|
### Check Task Status
|
|
34
34
|
|
|
35
|
-
You can
|
|
35
|
+
You can check the status of a task:
|
|
36
36
|
|
|
37
37
|
```typescript
|
|
38
|
-
const task =
|
|
38
|
+
const task = await Ariari.send(
|
|
39
|
+
{ phone: '+261123456789', message: 'Message 1' },
|
|
40
|
+
{ phone: ['+261987654321', '+261555555555'], message: 'Message 2' }
|
|
41
|
+
);
|
|
42
|
+
|
|
39
43
|
const status = await task.status();
|
|
40
|
-
|
|
44
|
+
console.log(status);
|
|
45
|
+
// Returns SMS details: status (PENDING, SENT, FAILED), retry count, summary
|
|
41
46
|
```
|
|
42
47
|
|
|
43
|
-
|
|
48
|
+
Or check an existing task by ID:
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
const task = new Ariari.Task( 'id');
|
|
52
|
+
const status = await task.status();
|
|
53
|
+
```
|
|
44
54
|
|
|
45
55
|
### List Tasks
|
|
46
56
|
|