@ariary/notification 2.0.3 → 2.0.4

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 +28 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -32,7 +32,9 @@ const task = await Ariari.send(
32
32
 
33
33
  ### Check Task Status
34
34
 
35
- You can check the status of a task:
35
+ #### Quick Status (Summary Only)
36
+
37
+ Get a quick overview of the task status without SMS details:
36
38
 
37
39
  ```typescript
38
40
  const task = await Ariari.send(
@@ -42,16 +44,39 @@ const task = await Ariari.send(
42
44
 
43
45
  const status = await task.status();
44
46
  console.log(status);
45
- // Returns SMS details: status (PENDING, SENT, FAILED), retry count, summary
47
+ // Returns: { notifTaskId, projectId, createdAt, summary: { total, sent, failed, pending } }
46
48
  ```
47
49
 
48
50
  Or check an existing task by ID:
49
51
 
50
52
  ```typescript
51
- const task = new Ariari.Task( 'id');
53
+ const task = new Ariari.Task('id');
52
54
  const status = await task.status();
53
55
  ```
54
56
 
57
+ #### Detailed Status (SMS Details)
58
+
59
+ Get complete SMS details including individual message status and retry information:
60
+
61
+ ```typescript
62
+ const task = await Ariari.send(
63
+ { phone: '+261123456789', message: 'Message 1' },
64
+ { phone: ['+261987654321', '+261555555555'], message: 'Message 2' }
65
+ );
66
+
67
+ const details = await task.smsDetails();
68
+ console.log(details);
69
+ // Returns: { notifTaskId, projectId, createdAt, summary, smsDetails: [...] }
70
+ // smsDetails includes: smsId, phone, message, status, retryCount
71
+ ```
72
+
73
+ Or get details for an existing task:
74
+
75
+ ```typescript
76
+ const task = new Ariari.Task('id');
77
+ const details = await task.smsDetails();
78
+ ```
79
+
55
80
  ### List Tasks
56
81
 
57
82
  ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariary/notification",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "SMS et Notification Task SDK pour l'API Ariary",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",