@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.
Files changed (2) hide show
  1. package/README.md +14 -4
  2. 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 also check the status of a task by ID:
35
+ You can check the status of a task:
36
36
 
37
37
  ```typescript
38
- const task = new Ariari.Task('task-id-123');
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
- const detailedStatus = await task.detailedStatus();
44
+ console.log(status);
45
+ // Returns SMS details: status (PENDING, SENT, FAILED), retry count, summary
41
46
  ```
42
47
 
43
- The status endpoint returns SMS details including status (SENT, PENDING, FAILED), retry count, and summary information.
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariary/notification",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "SMS et Notification Task SDK pour l'API Ariary",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",