@ariary/ariary 1.0.5 → 1.0.7
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 +31 -1
- package/dist/{client-DwMAE1vB.d.mts → client-CKv433F4.d.mts} +4 -0
- package/dist/{client-DwMAE1vB.d.ts → client-CKv433F4.d.ts} +4 -0
- package/dist/index.d.mts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +71 -0
- package/dist/index.mjs +70 -0
- package/dist/notif-task/index.d.mts +58 -0
- package/dist/notif-task/index.d.ts +58 -0
- package/dist/notif-task/index.js +80 -0
- package/dist/notif-task/index.mjs +53 -0
- package/dist/payment/index.d.mts +1 -1
- package/dist/payment/index.d.ts +1 -1
- package/dist/sms/index.d.mts +1 -1
- package/dist/sms/index.d.ts +1 -1
- package/dist/transfert/index.d.mts +1 -1
- package/dist/transfert/index.d.ts +1 -1
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -76,10 +76,33 @@ const transaction = await sdk.transfer.send('261345678901', 5000);
|
|
|
76
76
|
const allTransactions = await sdk.transfer.getAll();
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
### NotifTask
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
const allTasks = await sdk.notifTask.findAll('votre_project_id');
|
|
83
|
+
|
|
84
|
+
// Récupérer une tâche par ID
|
|
85
|
+
const task = await sdk.notifTask.findOne(taskId);
|
|
86
|
+
|
|
87
|
+
// Mettre à jour une tâche
|
|
88
|
+
const updated = await sdk.notifTask.update(taskId, {
|
|
89
|
+
// paramètres à mettre à jour...
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Supprimer une tâche
|
|
93
|
+
const deleted = await sdk.notifTask.remove(taskId);
|
|
94
|
+
|
|
95
|
+
// Récupérer les détails des SMS
|
|
96
|
+
const smsDetails = await sdk.notifTask.getSmsDetails(taskId);
|
|
97
|
+
|
|
98
|
+
// Réessayer les SMS échoués
|
|
99
|
+
const retry = await sdk.notifTask.retryFailedSms(taskId);
|
|
100
|
+
```
|
|
101
|
+
|
|
79
102
|
## Imports
|
|
80
103
|
|
|
81
104
|
```typescript
|
|
82
|
-
import { AriarySDK, PaymentService, SmsService, TransferService } from '@ariary/ariary';
|
|
105
|
+
import { AriarySDK, PaymentService, SmsService, TransferService, NotifTaskService } from '@ariary/ariary';
|
|
83
106
|
```
|
|
84
107
|
|
|
85
108
|
## Types
|
|
@@ -103,6 +126,13 @@ Tous les types TypeScript sont inclus automatiquement (.d.ts).
|
|
|
103
126
|
- SendTransactionDto
|
|
104
127
|
- SendTransactionResponse
|
|
105
128
|
- TransactionResponseDto
|
|
129
|
+
|
|
130
|
+
// NotifTask
|
|
131
|
+
- CreateNotifTaskDto
|
|
132
|
+
- ResponseNotifTaskDto
|
|
133
|
+
- NotifTaskDetailsDto
|
|
134
|
+
- UpdateNotifTaskDto
|
|
135
|
+
- RetryFailedSmsResponseDto
|
|
106
136
|
```
|
|
107
137
|
|
|
108
138
|
## API
|
|
@@ -29,6 +29,10 @@ declare class ApiClient {
|
|
|
29
29
|
* Effectue une requête PUT avec les en-têtes d'authentification
|
|
30
30
|
*/
|
|
31
31
|
put<T>(endpoint: string, data: any, requiresSecret?: boolean): Promise<T>;
|
|
32
|
+
/**
|
|
33
|
+
* Effectue une requête DELETE avec les en-têtes d'authentification
|
|
34
|
+
*/
|
|
35
|
+
delete<T>(endpoint: string, requiresSecret?: boolean): Promise<T>;
|
|
32
36
|
/**
|
|
33
37
|
* Gère les erreurs API
|
|
34
38
|
*/
|
|
@@ -29,6 +29,10 @@ declare class ApiClient {
|
|
|
29
29
|
* Effectue une requête PUT avec les en-têtes d'authentification
|
|
30
30
|
*/
|
|
31
31
|
put<T>(endpoint: string, data: any, requiresSecret?: boolean): Promise<T>;
|
|
32
|
+
/**
|
|
33
|
+
* Effectue une requête DELETE avec les en-têtes d'authentification
|
|
34
|
+
*/
|
|
35
|
+
delete<T>(endpoint: string, requiresSecret?: boolean): Promise<T>;
|
|
32
36
|
/**
|
|
33
37
|
* Gère les erreurs API
|
|
34
38
|
*/
|
package/dist/index.d.mts
CHANGED
|
@@ -4,8 +4,10 @@ import { SmsService } from './sms/index.mjs';
|
|
|
4
4
|
export { BulkSmsDto, BulkSmsResponseDto, CreateSmsDto, MultiSmsResponseDto, ResponseSmsDto, SendSmsDto, SendSmsResponseDto } from './sms/index.mjs';
|
|
5
5
|
import { TransferService } from './transfert/index.mjs';
|
|
6
6
|
export { SendTransactionDto, SendTransactionResponse, TransactionResponseDto } from './transfert/index.mjs';
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
7
|
+
import { NotifTaskService } from './notif-task/index.mjs';
|
|
8
|
+
export { CreateNotifTaskDto, NotifTaskDetailsDto, ResponseNotifTaskDto, RetryFailedSmsResponseDto, SmsDetail, UpdateNotifTaskDto } from './notif-task/index.mjs';
|
|
9
|
+
import { A as ApiConfig } from './client-CKv433F4.mjs';
|
|
10
|
+
export { a as ApiClient, b as ApiResponse } from './client-CKv433F4.mjs';
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* SDK client pour l'API de paiement Ariary
|
|
@@ -16,8 +18,9 @@ declare class AriarySDK {
|
|
|
16
18
|
payment: PaymentService;
|
|
17
19
|
sms: SmsService;
|
|
18
20
|
transfer: TransferService;
|
|
21
|
+
notifTask: NotifTaskService;
|
|
19
22
|
constructor(config: ApiConfig);
|
|
20
23
|
}
|
|
21
24
|
declare function sendPayment(code: string, amount: number, projectId: string, secretId: string): Promise<PaymentResponseDto>;
|
|
22
25
|
|
|
23
|
-
export { ApiConfig, AriarySDK, PaymentResponseDto, PaymentService, SmsService, TransferService, sendPayment };
|
|
26
|
+
export { ApiConfig, AriarySDK, NotifTaskService, PaymentResponseDto, PaymentService, SmsService, TransferService, sendPayment };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,10 @@ import { SmsService } from './sms/index.js';
|
|
|
4
4
|
export { BulkSmsDto, BulkSmsResponseDto, CreateSmsDto, MultiSmsResponseDto, ResponseSmsDto, SendSmsDto, SendSmsResponseDto } from './sms/index.js';
|
|
5
5
|
import { TransferService } from './transfert/index.js';
|
|
6
6
|
export { SendTransactionDto, SendTransactionResponse, TransactionResponseDto } from './transfert/index.js';
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
7
|
+
import { NotifTaskService } from './notif-task/index.js';
|
|
8
|
+
export { CreateNotifTaskDto, NotifTaskDetailsDto, ResponseNotifTaskDto, RetryFailedSmsResponseDto, SmsDetail, UpdateNotifTaskDto } from './notif-task/index.js';
|
|
9
|
+
import { A as ApiConfig } from './client-CKv433F4.js';
|
|
10
|
+
export { a as ApiClient, b as ApiResponse } from './client-CKv433F4.js';
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* SDK client pour l'API de paiement Ariary
|
|
@@ -16,8 +18,9 @@ declare class AriarySDK {
|
|
|
16
18
|
payment: PaymentService;
|
|
17
19
|
sms: SmsService;
|
|
18
20
|
transfer: TransferService;
|
|
21
|
+
notifTask: NotifTaskService;
|
|
19
22
|
constructor(config: ApiConfig);
|
|
20
23
|
}
|
|
21
24
|
declare function sendPayment(code: string, amount: number, projectId: string, secretId: string): Promise<PaymentResponseDto>;
|
|
22
25
|
|
|
23
|
-
export { ApiConfig, AriarySDK, PaymentResponseDto, PaymentService, SmsService, TransferService, sendPayment };
|
|
26
|
+
export { ApiConfig, AriarySDK, NotifTaskService, PaymentResponseDto, PaymentService, SmsService, TransferService, sendPayment };
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var src_exports = {};
|
|
|
32
32
|
__export(src_exports, {
|
|
33
33
|
ApiClient: () => ApiClient,
|
|
34
34
|
AriarySDK: () => AriarySDK,
|
|
35
|
+
NotifTaskService: () => NotifTaskService,
|
|
35
36
|
PaymentService: () => PaymentService,
|
|
36
37
|
SmsService: () => SmsService,
|
|
37
38
|
TransferService: () => TransferService,
|
|
@@ -120,6 +121,23 @@ var ApiClient = class {
|
|
|
120
121
|
throw this.handleError(error);
|
|
121
122
|
}
|
|
122
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Effectue une requête DELETE avec les en-têtes d'authentification
|
|
126
|
+
*/
|
|
127
|
+
async delete(endpoint, requiresSecret = true) {
|
|
128
|
+
const headers = {
|
|
129
|
+
"x-project-id": this.config.projectId
|
|
130
|
+
};
|
|
131
|
+
if (requiresSecret) {
|
|
132
|
+
headers["x-secret-id"] = this.config.secretId;
|
|
133
|
+
}
|
|
134
|
+
try {
|
|
135
|
+
const response = await this.client.delete(endpoint, { headers });
|
|
136
|
+
return response.data;
|
|
137
|
+
} catch (error) {
|
|
138
|
+
throw this.handleError(error);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
123
141
|
/**
|
|
124
142
|
* Gère les erreurs API
|
|
125
143
|
*/
|
|
@@ -247,6 +265,57 @@ var TransferService = class {
|
|
|
247
265
|
}
|
|
248
266
|
};
|
|
249
267
|
|
|
268
|
+
// src/notif-task.ts
|
|
269
|
+
var NotifTaskService = class {
|
|
270
|
+
constructor(client) {
|
|
271
|
+
this.client = client;
|
|
272
|
+
}
|
|
273
|
+
async findAll(projectId) {
|
|
274
|
+
const response = await this.client.get(
|
|
275
|
+
`/api/notif-task?projectId=${projectId}`,
|
|
276
|
+
true
|
|
277
|
+
);
|
|
278
|
+
return response;
|
|
279
|
+
}
|
|
280
|
+
async findOne(id) {
|
|
281
|
+
const response = await this.client.get(
|
|
282
|
+
`/api/notif-task/${id}`,
|
|
283
|
+
true
|
|
284
|
+
);
|
|
285
|
+
return response;
|
|
286
|
+
}
|
|
287
|
+
async update(id, updateNotifTaskDto) {
|
|
288
|
+
const response = await this.client.patch(
|
|
289
|
+
`/api/notif-task/${id}`,
|
|
290
|
+
updateNotifTaskDto,
|
|
291
|
+
true
|
|
292
|
+
);
|
|
293
|
+
return response;
|
|
294
|
+
}
|
|
295
|
+
async remove(id) {
|
|
296
|
+
const response = await this.client.delete(
|
|
297
|
+
`/api/notif-task/${id}`,
|
|
298
|
+
true
|
|
299
|
+
);
|
|
300
|
+
return response;
|
|
301
|
+
}
|
|
302
|
+
async getSmsDetails(id) {
|
|
303
|
+
const response = await this.client.get(
|
|
304
|
+
`/api/notif-task/${id}/sms-details`,
|
|
305
|
+
true
|
|
306
|
+
);
|
|
307
|
+
return response;
|
|
308
|
+
}
|
|
309
|
+
async retryFailedSms(id) {
|
|
310
|
+
const response = await this.client.post(
|
|
311
|
+
`/api/notif-task/${id}/retry-failed-sms`,
|
|
312
|
+
{},
|
|
313
|
+
true
|
|
314
|
+
);
|
|
315
|
+
return response;
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
|
|
250
319
|
// src/index.ts
|
|
251
320
|
var AriarySDK = class {
|
|
252
321
|
constructor(config) {
|
|
@@ -256,6 +325,7 @@ var AriarySDK = class {
|
|
|
256
325
|
this.payment = new PaymentService(this.paymentClient);
|
|
257
326
|
this.sms = new SmsService(this.defaultClient);
|
|
258
327
|
this.transfer = new TransferService(this.defaultClient);
|
|
328
|
+
this.notifTask = new NotifTaskService(this.defaultClient);
|
|
259
329
|
}
|
|
260
330
|
};
|
|
261
331
|
async function sendPayment(code, amount, projectId, secretId) {
|
|
@@ -267,6 +337,7 @@ async function sendPayment(code, amount, projectId, secretId) {
|
|
|
267
337
|
0 && (module.exports = {
|
|
268
338
|
ApiClient,
|
|
269
339
|
AriarySDK,
|
|
340
|
+
NotifTaskService,
|
|
270
341
|
PaymentService,
|
|
271
342
|
SmsService,
|
|
272
343
|
TransferService,
|
package/dist/index.mjs
CHANGED
|
@@ -79,6 +79,23 @@ var ApiClient = class {
|
|
|
79
79
|
throw this.handleError(error);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Effectue une requête DELETE avec les en-têtes d'authentification
|
|
84
|
+
*/
|
|
85
|
+
async delete(endpoint, requiresSecret = true) {
|
|
86
|
+
const headers = {
|
|
87
|
+
"x-project-id": this.config.projectId
|
|
88
|
+
};
|
|
89
|
+
if (requiresSecret) {
|
|
90
|
+
headers["x-secret-id"] = this.config.secretId;
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
const response = await this.client.delete(endpoint, { headers });
|
|
94
|
+
return response.data;
|
|
95
|
+
} catch (error) {
|
|
96
|
+
throw this.handleError(error);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
82
99
|
/**
|
|
83
100
|
* Gère les erreurs API
|
|
84
101
|
*/
|
|
@@ -206,6 +223,57 @@ var TransferService = class {
|
|
|
206
223
|
}
|
|
207
224
|
};
|
|
208
225
|
|
|
226
|
+
// src/notif-task.ts
|
|
227
|
+
var NotifTaskService = class {
|
|
228
|
+
constructor(client) {
|
|
229
|
+
this.client = client;
|
|
230
|
+
}
|
|
231
|
+
async findAll(projectId) {
|
|
232
|
+
const response = await this.client.get(
|
|
233
|
+
`/api/notif-task?projectId=${projectId}`,
|
|
234
|
+
true
|
|
235
|
+
);
|
|
236
|
+
return response;
|
|
237
|
+
}
|
|
238
|
+
async findOne(id) {
|
|
239
|
+
const response = await this.client.get(
|
|
240
|
+
`/api/notif-task/${id}`,
|
|
241
|
+
true
|
|
242
|
+
);
|
|
243
|
+
return response;
|
|
244
|
+
}
|
|
245
|
+
async update(id, updateNotifTaskDto) {
|
|
246
|
+
const response = await this.client.patch(
|
|
247
|
+
`/api/notif-task/${id}`,
|
|
248
|
+
updateNotifTaskDto,
|
|
249
|
+
true
|
|
250
|
+
);
|
|
251
|
+
return response;
|
|
252
|
+
}
|
|
253
|
+
async remove(id) {
|
|
254
|
+
const response = await this.client.delete(
|
|
255
|
+
`/api/notif-task/${id}`,
|
|
256
|
+
true
|
|
257
|
+
);
|
|
258
|
+
return response;
|
|
259
|
+
}
|
|
260
|
+
async getSmsDetails(id) {
|
|
261
|
+
const response = await this.client.get(
|
|
262
|
+
`/api/notif-task/${id}/sms-details`,
|
|
263
|
+
true
|
|
264
|
+
);
|
|
265
|
+
return response;
|
|
266
|
+
}
|
|
267
|
+
async retryFailedSms(id) {
|
|
268
|
+
const response = await this.client.post(
|
|
269
|
+
`/api/notif-task/${id}/retry-failed-sms`,
|
|
270
|
+
{},
|
|
271
|
+
true
|
|
272
|
+
);
|
|
273
|
+
return response;
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
|
|
209
277
|
// src/index.ts
|
|
210
278
|
var AriarySDK = class {
|
|
211
279
|
constructor(config) {
|
|
@@ -215,6 +283,7 @@ var AriarySDK = class {
|
|
|
215
283
|
this.payment = new PaymentService(this.paymentClient);
|
|
216
284
|
this.sms = new SmsService(this.defaultClient);
|
|
217
285
|
this.transfer = new TransferService(this.defaultClient);
|
|
286
|
+
this.notifTask = new NotifTaskService(this.defaultClient);
|
|
218
287
|
}
|
|
219
288
|
};
|
|
220
289
|
async function sendPayment(code, amount, projectId, secretId) {
|
|
@@ -225,6 +294,7 @@ async function sendPayment(code, amount, projectId, secretId) {
|
|
|
225
294
|
export {
|
|
226
295
|
ApiClient,
|
|
227
296
|
AriarySDK,
|
|
297
|
+
NotifTaskService,
|
|
228
298
|
PaymentService,
|
|
229
299
|
SmsService,
|
|
230
300
|
TransferService,
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { a as ApiClient } from '../client-CKv433F4.mjs';
|
|
2
|
+
|
|
3
|
+
interface CreateNotifTaskDto {
|
|
4
|
+
message: string;
|
|
5
|
+
phones: string[];
|
|
6
|
+
}
|
|
7
|
+
interface UpdateNotifTaskDto {
|
|
8
|
+
message?: string;
|
|
9
|
+
phones?: string[];
|
|
10
|
+
}
|
|
11
|
+
interface ResponseNotifTaskDto {
|
|
12
|
+
id: string;
|
|
13
|
+
message: string;
|
|
14
|
+
phones: string[];
|
|
15
|
+
status: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}
|
|
19
|
+
interface SmsDetail {
|
|
20
|
+
id: string;
|
|
21
|
+
phone: string;
|
|
22
|
+
message: string;
|
|
23
|
+
status: string;
|
|
24
|
+
attempts: number;
|
|
25
|
+
lastAttempt?: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
}
|
|
29
|
+
interface NotifTaskDetailsDto {
|
|
30
|
+
id: string;
|
|
31
|
+
message: string;
|
|
32
|
+
status: string;
|
|
33
|
+
totalSms: number;
|
|
34
|
+
successCount: number;
|
|
35
|
+
failedCount: number;
|
|
36
|
+
pendingCount: number;
|
|
37
|
+
smsDetails: SmsDetail[];
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}
|
|
41
|
+
interface RetryFailedSmsResponseDto {
|
|
42
|
+
status: string;
|
|
43
|
+
message: string;
|
|
44
|
+
retried?: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare class NotifTaskService {
|
|
48
|
+
private client;
|
|
49
|
+
constructor(client: ApiClient);
|
|
50
|
+
findAll(projectId: string): Promise<ResponseNotifTaskDto[]>;
|
|
51
|
+
findOne(id: string): Promise<ResponseNotifTaskDto>;
|
|
52
|
+
update(id: string, updateNotifTaskDto: UpdateNotifTaskDto): Promise<ResponseNotifTaskDto>;
|
|
53
|
+
remove(id: string): Promise<ResponseNotifTaskDto>;
|
|
54
|
+
getSmsDetails(id: string): Promise<NotifTaskDetailsDto>;
|
|
55
|
+
retryFailedSms(id: string): Promise<RetryFailedSmsResponseDto>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { type CreateNotifTaskDto, type NotifTaskDetailsDto, NotifTaskService, type ResponseNotifTaskDto, type RetryFailedSmsResponseDto, type SmsDetail, type UpdateNotifTaskDto };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { a as ApiClient } from '../client-CKv433F4.js';
|
|
2
|
+
|
|
3
|
+
interface CreateNotifTaskDto {
|
|
4
|
+
message: string;
|
|
5
|
+
phones: string[];
|
|
6
|
+
}
|
|
7
|
+
interface UpdateNotifTaskDto {
|
|
8
|
+
message?: string;
|
|
9
|
+
phones?: string[];
|
|
10
|
+
}
|
|
11
|
+
interface ResponseNotifTaskDto {
|
|
12
|
+
id: string;
|
|
13
|
+
message: string;
|
|
14
|
+
phones: string[];
|
|
15
|
+
status: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}
|
|
19
|
+
interface SmsDetail {
|
|
20
|
+
id: string;
|
|
21
|
+
phone: string;
|
|
22
|
+
message: string;
|
|
23
|
+
status: string;
|
|
24
|
+
attempts: number;
|
|
25
|
+
lastAttempt?: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
}
|
|
29
|
+
interface NotifTaskDetailsDto {
|
|
30
|
+
id: string;
|
|
31
|
+
message: string;
|
|
32
|
+
status: string;
|
|
33
|
+
totalSms: number;
|
|
34
|
+
successCount: number;
|
|
35
|
+
failedCount: number;
|
|
36
|
+
pendingCount: number;
|
|
37
|
+
smsDetails: SmsDetail[];
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}
|
|
41
|
+
interface RetryFailedSmsResponseDto {
|
|
42
|
+
status: string;
|
|
43
|
+
message: string;
|
|
44
|
+
retried?: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare class NotifTaskService {
|
|
48
|
+
private client;
|
|
49
|
+
constructor(client: ApiClient);
|
|
50
|
+
findAll(projectId: string): Promise<ResponseNotifTaskDto[]>;
|
|
51
|
+
findOne(id: string): Promise<ResponseNotifTaskDto>;
|
|
52
|
+
update(id: string, updateNotifTaskDto: UpdateNotifTaskDto): Promise<ResponseNotifTaskDto>;
|
|
53
|
+
remove(id: string): Promise<ResponseNotifTaskDto>;
|
|
54
|
+
getSmsDetails(id: string): Promise<NotifTaskDetailsDto>;
|
|
55
|
+
retryFailedSms(id: string): Promise<RetryFailedSmsResponseDto>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { type CreateNotifTaskDto, type NotifTaskDetailsDto, NotifTaskService, type ResponseNotifTaskDto, type RetryFailedSmsResponseDto, type SmsDetail, type UpdateNotifTaskDto };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/notif-task/index.ts
|
|
21
|
+
var notif_task_exports = {};
|
|
22
|
+
__export(notif_task_exports, {
|
|
23
|
+
NotifTaskService: () => NotifTaskService
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(notif_task_exports);
|
|
26
|
+
|
|
27
|
+
// src/notif-task.ts
|
|
28
|
+
var NotifTaskService = class {
|
|
29
|
+
constructor(client) {
|
|
30
|
+
this.client = client;
|
|
31
|
+
}
|
|
32
|
+
async findAll(projectId) {
|
|
33
|
+
const response = await this.client.get(
|
|
34
|
+
`/api/notif-task?projectId=${projectId}`,
|
|
35
|
+
true
|
|
36
|
+
);
|
|
37
|
+
return response;
|
|
38
|
+
}
|
|
39
|
+
async findOne(id) {
|
|
40
|
+
const response = await this.client.get(
|
|
41
|
+
`/api/notif-task/${id}`,
|
|
42
|
+
true
|
|
43
|
+
);
|
|
44
|
+
return response;
|
|
45
|
+
}
|
|
46
|
+
async update(id, updateNotifTaskDto) {
|
|
47
|
+
const response = await this.client.patch(
|
|
48
|
+
`/api/notif-task/${id}`,
|
|
49
|
+
updateNotifTaskDto,
|
|
50
|
+
true
|
|
51
|
+
);
|
|
52
|
+
return response;
|
|
53
|
+
}
|
|
54
|
+
async remove(id) {
|
|
55
|
+
const response = await this.client.delete(
|
|
56
|
+
`/api/notif-task/${id}`,
|
|
57
|
+
true
|
|
58
|
+
);
|
|
59
|
+
return response;
|
|
60
|
+
}
|
|
61
|
+
async getSmsDetails(id) {
|
|
62
|
+
const response = await this.client.get(
|
|
63
|
+
`/api/notif-task/${id}/sms-details`,
|
|
64
|
+
true
|
|
65
|
+
);
|
|
66
|
+
return response;
|
|
67
|
+
}
|
|
68
|
+
async retryFailedSms(id) {
|
|
69
|
+
const response = await this.client.post(
|
|
70
|
+
`/api/notif-task/${id}/retry-failed-sms`,
|
|
71
|
+
{},
|
|
72
|
+
true
|
|
73
|
+
);
|
|
74
|
+
return response;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
78
|
+
0 && (module.exports = {
|
|
79
|
+
NotifTaskService
|
|
80
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// src/notif-task.ts
|
|
2
|
+
var NotifTaskService = class {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
async findAll(projectId) {
|
|
7
|
+
const response = await this.client.get(
|
|
8
|
+
`/api/notif-task?projectId=${projectId}`,
|
|
9
|
+
true
|
|
10
|
+
);
|
|
11
|
+
return response;
|
|
12
|
+
}
|
|
13
|
+
async findOne(id) {
|
|
14
|
+
const response = await this.client.get(
|
|
15
|
+
`/api/notif-task/${id}`,
|
|
16
|
+
true
|
|
17
|
+
);
|
|
18
|
+
return response;
|
|
19
|
+
}
|
|
20
|
+
async update(id, updateNotifTaskDto) {
|
|
21
|
+
const response = await this.client.patch(
|
|
22
|
+
`/api/notif-task/${id}`,
|
|
23
|
+
updateNotifTaskDto,
|
|
24
|
+
true
|
|
25
|
+
);
|
|
26
|
+
return response;
|
|
27
|
+
}
|
|
28
|
+
async remove(id) {
|
|
29
|
+
const response = await this.client.delete(
|
|
30
|
+
`/api/notif-task/${id}`,
|
|
31
|
+
true
|
|
32
|
+
);
|
|
33
|
+
return response;
|
|
34
|
+
}
|
|
35
|
+
async getSmsDetails(id) {
|
|
36
|
+
const response = await this.client.get(
|
|
37
|
+
`/api/notif-task/${id}/sms-details`,
|
|
38
|
+
true
|
|
39
|
+
);
|
|
40
|
+
return response;
|
|
41
|
+
}
|
|
42
|
+
async retryFailedSms(id) {
|
|
43
|
+
const response = await this.client.post(
|
|
44
|
+
`/api/notif-task/${id}/retry-failed-sms`,
|
|
45
|
+
{},
|
|
46
|
+
true
|
|
47
|
+
);
|
|
48
|
+
return response;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
NotifTaskService
|
|
53
|
+
};
|
package/dist/payment/index.d.mts
CHANGED
package/dist/payment/index.d.ts
CHANGED
package/dist/sms/index.d.mts
CHANGED
package/dist/sms/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ariary/ariary",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "SDK officiel pour l'API de paiement Ariary",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
"types": "./dist/transfert/index.d.ts",
|
|
26
26
|
"import": "./dist/transfert/index.mjs",
|
|
27
27
|
"require": "./dist/transfert/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./notif-task": {
|
|
30
|
+
"types": "./dist/notif-task/index.d.ts",
|
|
31
|
+
"import": "./dist/notif-task/index.mjs",
|
|
32
|
+
"require": "./dist/notif-task/index.js"
|
|
28
33
|
}
|
|
29
34
|
},
|
|
30
35
|
"files": [
|
|
@@ -36,7 +41,8 @@
|
|
|
36
41
|
"index": "src/index.ts",
|
|
37
42
|
"payment/index": "src/payment/index.ts",
|
|
38
43
|
"sms/index": "src/sms/index.ts",
|
|
39
|
-
"transfert/index": "src/transfert/index.ts"
|
|
44
|
+
"transfert/index": "src/transfert/index.ts",
|
|
45
|
+
"notif-task/index": "src/notif-task/index.ts"
|
|
40
46
|
},
|
|
41
47
|
"format": [
|
|
42
48
|
"cjs",
|