@ariary/notification 2.0.0 → 2.0.1

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 CHANGED
@@ -28,9 +28,6 @@ const task = await Ariari.send(
28
28
  { phone: '+261123456789', message: 'Message 1' },
29
29
  { phone: ['+261987654321', '+261555555555'], message: 'Message 2' }
30
30
  );
31
-
32
- // Check task status
33
- await task.status();
34
31
  ```
35
32
 
36
33
  ### Check Task Status
@@ -39,10 +36,12 @@ You can also check the status of a task by ID:
39
36
 
40
37
  ```typescript
41
38
  const task = new Ariari.Task('task-id-123');
42
- await task.status();
43
- await task.detailedStatus();
39
+ const status = await task.status();
40
+ const detailedStatus = await task.detailedStatus();
44
41
  ```
45
42
 
43
+ The status endpoint returns SMS details including status (SENT, PENDING, FAILED), retry count, and summary information.
44
+
46
45
  ### List Tasks
47
46
 
48
47
  ```typescript
package/dist/index.js CHANGED
@@ -92,10 +92,10 @@ var Task = class {
92
92
  this.id = id;
93
93
  }
94
94
  async status() {
95
- return httpGet(`/api/sms/${this.id}/status`);
95
+ return httpGet(`/api/notif-task/${this.id}/sms-details`);
96
96
  }
97
97
  async detailedStatus() {
98
- return httpGet(`/api/sms/${this.id}/detailed-status`);
98
+ return httpGet(`/api/notif-task/${this.id}/sms-details`);
99
99
  }
100
100
  };
101
101
  var Notification = class {
package/dist/index.mjs CHANGED
@@ -64,10 +64,10 @@ var Task = class {
64
64
  this.id = id;
65
65
  }
66
66
  async status() {
67
- return httpGet(`/api/sms/${this.id}/status`);
67
+ return httpGet(`/api/notif-task/${this.id}/sms-details`);
68
68
  }
69
69
  async detailedStatus() {
70
- return httpGet(`/api/sms/${this.id}/detailed-status`);
70
+ return httpGet(`/api/notif-task/${this.id}/sms-details`);
71
71
  }
72
72
  };
73
73
  var Notification = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariary/notification",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "SMS et Notification Task SDK pour l'API Ariary",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/dist/index.d.mts DELETED
@@ -1,30 +0,0 @@
1
- type Message = {
2
- phone: string[] | string;
3
- message: string;
4
- };
5
- type GetTaskParam = {
6
- from: number;
7
- count: number;
8
- order: -1 | 1;
9
- };
10
-
11
- declare class Task {
12
- id: string;
13
- constructor(id: string);
14
- status(): Promise<unknown>;
15
- detailedStatus(): Promise<unknown>;
16
- }
17
- declare class Notification {
18
- send(...data: Message[]): Promise<Task>;
19
- sendMessage(data: Message): Promise<Task>;
20
- getMessages(param: GetTaskParam): Promise<unknown>;
21
- }
22
- declare class Ariari {
23
- private static notification;
24
- static config(config: any): void;
25
- static sendMessage(data: Message): Promise<Task>;
26
- static send(...data: Message[]): Promise<Task>;
27
- static getMessages(param: GetTaskParam): Promise<unknown>;
28
- }
29
-
30
- export { Ariari, type GetTaskParam, type Message, Notification, Task };
package/dist/index.d.ts DELETED
@@ -1,30 +0,0 @@
1
- type Message = {
2
- phone: string[] | string;
3
- message: string;
4
- };
5
- type GetTaskParam = {
6
- from: number;
7
- count: number;
8
- order: -1 | 1;
9
- };
10
-
11
- declare class Task {
12
- id: string;
13
- constructor(id: string);
14
- status(): Promise<unknown>;
15
- detailedStatus(): Promise<unknown>;
16
- }
17
- declare class Notification {
18
- send(...data: Message[]): Promise<Task>;
19
- sendMessage(data: Message): Promise<Task>;
20
- getMessages(param: GetTaskParam): Promise<unknown>;
21
- }
22
- declare class Ariari {
23
- private static notification;
24
- static config(config: any): void;
25
- static sendMessage(data: Message): Promise<Task>;
26
- static send(...data: Message[]): Promise<Task>;
27
- static getMessages(param: GetTaskParam): Promise<unknown>;
28
- }
29
-
30
- export { Ariari, type GetTaskParam, type Message, Notification, Task };