@ariary/ariary 2.0.0 → 2.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 +18 -104
  2. package/package.json +3 -5
package/README.md CHANGED
@@ -21,88 +21,28 @@ Ariari.config({
21
21
 
22
22
  ## Utilisation
23
23
 
24
- ### Paiements
25
-
26
- ```typescript
27
- // Créer un paiement
28
- const payment = await Ariari.payment.create({
29
- code: 'PAY-K1X2Y3Z4-ABC123',
30
- amount: 5000
31
- });
32
-
33
- console.log(payment);
34
- // {
35
- // id: "...",
36
- // amount: 5000,
37
- // rest: 0,
38
- // status: "payé",
39
- // ...
40
- // }
41
-
42
- // Récupérer tous les paiements
43
- const allPayments = await Ariari.payment.getAll();
44
-
45
- // Récupérer un paiement par ID
46
- const payment = await Ariari.payment.getById(paymentId);
47
-
48
- // Mettre à jour le reste d'un paiement
49
- const updated = await Ariari.payment.updateRest(paymentId, 'TICKET123');
50
- ```
51
-
52
- ### Transferts
53
-
54
24
  ```typescript
55
- // Envoyer un transfert
56
- const transaction = await Ariari.payment.transfert({
57
- phone: '261345678901',
58
- amount: 5000
59
- });
60
-
61
- // Récupérer tous les transferts
62
- const allTransferts = await Ariari.payment.getAllTransfert();
63
- ```
64
-
65
- ### SMS
66
-
67
- ```typescript
68
- // Envoyer un SMS
69
- const result = await Ariari.notification.send({
70
- phone: '261345678901',
71
- message: 'Bonjour!'
72
- });
73
-
74
- // Envoyer des SMS différents
75
- const result = await Ariari.notification.sendBulk([
25
+ // Pay
26
+ await Ariari.payment.create({ code: 'PAY-123', amount: 5000 });
27
+ await Ariari.payment.getAll();
28
+ await Ariari.payment.getById(paymentId);
29
+ await Ariari.payment.updateRest(paymentId, 'TICKET123');
30
+ await Ariari.payment.transfert({ phone: '261345678901', amount: 5000 });
31
+ await Ariari.payment.getAllTransfert();
32
+
33
+ // Notifications
34
+ await Ariari.notification.send({ phone: '261345678901', message: 'Hello' });
35
+ await Ariari.notification.sendBulk([
76
36
  { phone: '261345678901', message: 'Message 1' },
77
37
  { phone: '261345678902', message: 'Message 2' }
78
38
  ]);
79
-
80
- // Récupérer tous les SMS
81
- const allSms = await Ariari.notification.getAll();
82
- ```
83
-
84
- ### Tâches de Notification
85
-
86
- ```typescript
87
- // Récupérer toutes les tâches
88
- const allTasks = await Ariari.notification.task.findAll('votre_project_id');
89
-
90
- // Récupérer une tâche par ID
91
- const task = await Ariari.notification.task.findOne(taskId);
92
-
93
- // Mettre à jour une tâche
94
- const updated = await Ariari.notification.task.update(taskId, {
95
- message: 'Nouveau message'
96
- });
97
-
98
- // Supprimer une tâche
99
- const deleted = await Ariari.notification.task.delete(taskId);
100
-
101
- // Récupérer les détails des SMS
102
- const smsDetails = await Ariari.notification.task.getSmsDetails(taskId);
103
-
104
- // Réessayer les SMS échoués
105
- const retry = await Ariari.notification.task.retryFailedSms(taskId);
39
+ await Ariari.notification.getAll();
40
+ await Ariari.notification.task.findAll('projectId');
41
+ await Ariari.notification.task.findOne(taskId);
42
+ await Ariari.notification.task.update(taskId, { message: 'New' });
43
+ await Ariari.notification.task.delete(taskId);
44
+ await Ariari.notification.task.getSmsDetails(taskId);
45
+ await Ariari.notification.task.retryFailedSms(taskId);
106
46
  ```
107
47
 
108
48
  ## Imports
@@ -111,32 +51,6 @@ const retry = await Ariari.notification.task.retryFailedSms(taskId);
111
51
  import { Ariari } from '@ariary/ariary';
112
52
  ```
113
53
 
114
- ## Types
115
-
116
- Tous les types TypeScript sont inclus automatiquement (.d.ts).
117
-
118
- ```typescript
119
- // Payment
120
- - CreatePaymentDto
121
- - PaymentResponseDto
122
- - SendTransactionDto
123
- - SendTransactionResponse
124
-
125
- // SMS
126
- - SendSmsDto
127
- - BulkSmsDto
128
- - SendSmsResponseDto
129
- - MultiSmsResponseDto
130
- - BulkSmsResponseDto
131
- - ResponseSmsDto
132
-
133
- // NotifTask
134
- - ResponseNotifTaskDto
135
- - NotifTaskDetailsDto
136
- - UpdateNotifTaskDto
137
- - RetryFailedSmsResponseDto
138
- ```
139
-
140
54
  ## License
141
55
 
142
56
  ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariary/ariary",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "SDK officiel pour l'API de paiement Ariary",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -38,10 +38,8 @@
38
38
  },
39
39
  "keywords": [
40
40
  "ariary",
41
- "payment",
42
- "sms",
43
- "transfer",
44
- "api"
41
+ "pay",
42
+ "notifications"
45
43
  ],
46
44
  "author": "Ariary",
47
45
  "license": "ISC",