@ariary/ariary 1.0.6 → 1.0.8

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
@@ -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
@@ -39,4 +39,4 @@ declare class ApiClient {
39
39
  private handleError;
40
40
  }
41
41
 
42
- export { ApiClient as A, type ApiConfig as a, type ApiResponse as b };
42
+ export { type ApiConfig as A, ApiClient as a, type ApiResponse as b };
@@ -39,4 +39,4 @@ declare class ApiClient {
39
39
  private handleError;
40
40
  }
41
41
 
42
- export { ApiClient as A, type ApiConfig as a, type ApiResponse as b };
42
+ export { type ApiConfig as A, ApiClient as a, type ApiResponse as b };
package/dist/index.d.mts CHANGED
@@ -4,64 +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 { A as ApiClient, a as ApiConfig } from './client-gwES2l4Y.mjs';
8
- export { b as ApiResponse } from './client-gwES2l4Y.mjs';
9
-
10
- interface CreateNotifTaskDto {
11
- message: string;
12
- phones: string[];
13
- }
14
- interface UpdateNotifTaskDto {
15
- message?: string;
16
- phones?: string[];
17
- }
18
- interface ResponseNotifTaskDto {
19
- id: string;
20
- message: string;
21
- phones: string[];
22
- status: string;
23
- createdAt: string;
24
- updatedAt: string;
25
- }
26
- interface SmsDetail {
27
- id: string;
28
- phone: string;
29
- message: string;
30
- status: string;
31
- attempts: number;
32
- lastAttempt?: string;
33
- createdAt: string;
34
- updatedAt: string;
35
- }
36
- interface NotifTaskDetailsDto {
37
- id: string;
38
- message: string;
39
- status: string;
40
- totalSms: number;
41
- successCount: number;
42
- failedCount: number;
43
- pendingCount: number;
44
- smsDetails: SmsDetail[];
45
- createdAt: string;
46
- updatedAt: string;
47
- }
48
- interface RetryFailedSmsResponseDto {
49
- status: string;
50
- message: string;
51
- retried?: number;
52
- }
53
-
54
- declare class NotifTaskService {
55
- private client;
56
- constructor(client: ApiClient);
57
- create(createNotifTaskDto: CreateNotifTaskDto): Promise<ResponseNotifTaskDto>;
58
- findAll(projectId: string): Promise<ResponseNotifTaskDto[]>;
59
- findOne(id: string): Promise<ResponseNotifTaskDto>;
60
- update(id: string, updateNotifTaskDto: UpdateNotifTaskDto): Promise<ResponseNotifTaskDto>;
61
- remove(id: string): Promise<ResponseNotifTaskDto>;
62
- getSmsDetails(id: string): Promise<NotifTaskDetailsDto>;
63
- retryFailedSms(id: string): Promise<RetryFailedSmsResponseDto>;
64
- }
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';
65
11
 
66
12
  /**
67
13
  * SDK client pour l'API de paiement Ariary
@@ -77,4 +23,4 @@ declare class AriarySDK {
77
23
  }
78
24
  declare function sendPayment(code: string, amount: number, projectId: string, secretId: string): Promise<PaymentResponseDto>;
79
25
 
80
- export { ApiClient, ApiConfig, AriarySDK, type CreateNotifTaskDto, type NotifTaskDetailsDto, NotifTaskService, PaymentResponseDto, PaymentService, type ResponseNotifTaskDto, type RetryFailedSmsResponseDto, type SmsDetail, SmsService, TransferService, type UpdateNotifTaskDto, sendPayment };
26
+ export { ApiConfig, AriarySDK, NotifTaskService, PaymentResponseDto, PaymentService, SmsService, TransferService, sendPayment };
package/dist/index.d.ts CHANGED
@@ -4,64 +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 { A as ApiClient, a as ApiConfig } from './client-gwES2l4Y.js';
8
- export { b as ApiResponse } from './client-gwES2l4Y.js';
9
-
10
- interface CreateNotifTaskDto {
11
- message: string;
12
- phones: string[];
13
- }
14
- interface UpdateNotifTaskDto {
15
- message?: string;
16
- phones?: string[];
17
- }
18
- interface ResponseNotifTaskDto {
19
- id: string;
20
- message: string;
21
- phones: string[];
22
- status: string;
23
- createdAt: string;
24
- updatedAt: string;
25
- }
26
- interface SmsDetail {
27
- id: string;
28
- phone: string;
29
- message: string;
30
- status: string;
31
- attempts: number;
32
- lastAttempt?: string;
33
- createdAt: string;
34
- updatedAt: string;
35
- }
36
- interface NotifTaskDetailsDto {
37
- id: string;
38
- message: string;
39
- status: string;
40
- totalSms: number;
41
- successCount: number;
42
- failedCount: number;
43
- pendingCount: number;
44
- smsDetails: SmsDetail[];
45
- createdAt: string;
46
- updatedAt: string;
47
- }
48
- interface RetryFailedSmsResponseDto {
49
- status: string;
50
- message: string;
51
- retried?: number;
52
- }
53
-
54
- declare class NotifTaskService {
55
- private client;
56
- constructor(client: ApiClient);
57
- create(createNotifTaskDto: CreateNotifTaskDto): Promise<ResponseNotifTaskDto>;
58
- findAll(projectId: string): Promise<ResponseNotifTaskDto[]>;
59
- findOne(id: string): Promise<ResponseNotifTaskDto>;
60
- update(id: string, updateNotifTaskDto: UpdateNotifTaskDto): Promise<ResponseNotifTaskDto>;
61
- remove(id: string): Promise<ResponseNotifTaskDto>;
62
- getSmsDetails(id: string): Promise<NotifTaskDetailsDto>;
63
- retryFailedSms(id: string): Promise<RetryFailedSmsResponseDto>;
64
- }
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';
65
11
 
66
12
  /**
67
13
  * SDK client pour l'API de paiement Ariary
@@ -77,4 +23,4 @@ declare class AriarySDK {
77
23
  }
78
24
  declare function sendPayment(code: string, amount: number, projectId: string, secretId: string): Promise<PaymentResponseDto>;
79
25
 
80
- export { ApiClient, ApiConfig, AriarySDK, type CreateNotifTaskDto, type NotifTaskDetailsDto, NotifTaskService, PaymentResponseDto, PaymentService, type ResponseNotifTaskDto, type RetryFailedSmsResponseDto, type SmsDetail, SmsService, TransferService, type UpdateNotifTaskDto, sendPayment };
26
+ export { ApiConfig, AriarySDK, NotifTaskService, PaymentResponseDto, PaymentService, SmsService, TransferService, sendPayment };
package/dist/index.js CHANGED
@@ -270,14 +270,6 @@ var NotifTaskService = class {
270
270
  constructor(client) {
271
271
  this.client = client;
272
272
  }
273
- async create(createNotifTaskDto) {
274
- const response = await this.client.post(
275
- "/api/notif-task",
276
- createNotifTaskDto,
277
- true
278
- );
279
- return response;
280
- }
281
273
  async findAll(projectId) {
282
274
  const response = await this.client.get(
283
275
  `/api/notif-task?projectId=${projectId}`,
package/dist/index.mjs CHANGED
@@ -228,14 +228,6 @@ var NotifTaskService = class {
228
228
  constructor(client) {
229
229
  this.client = client;
230
230
  }
231
- async create(createNotifTaskDto) {
232
- const response = await this.client.post(
233
- "/api/notif-task",
234
- createNotifTaskDto,
235
- true
236
- );
237
- return response;
238
- }
239
231
  async findAll(projectId) {
240
232
  const response = await this.client.get(
241
233
  `/api/notif-task?projectId=${projectId}`,
@@ -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
+ };
@@ -1,4 +1,4 @@
1
- import { A as ApiClient } from '../client-gwES2l4Y.mjs';
1
+ import { a as ApiClient } from '../client-CKv433F4.mjs';
2
2
 
3
3
  interface CreatePaymentDto {
4
4
  code: string;
@@ -1,4 +1,4 @@
1
- import { A as ApiClient } from '../client-gwES2l4Y.js';
1
+ import { a as ApiClient } from '../client-CKv433F4.js';
2
2
 
3
3
  interface CreatePaymentDto {
4
4
  code: string;
@@ -1,4 +1,4 @@
1
- import { A as ApiClient } from '../client-gwES2l4Y.mjs';
1
+ import { a as ApiClient } from '../client-CKv433F4.mjs';
2
2
 
3
3
  interface CreateSmsDto {
4
4
  message: string;
@@ -1,4 +1,4 @@
1
- import { A as ApiClient } from '../client-gwES2l4Y.js';
1
+ import { a as ApiClient } from '../client-CKv433F4.js';
2
2
 
3
3
  interface CreateSmsDto {
4
4
  message: string;
@@ -1,4 +1,4 @@
1
- import { A as ApiClient } from '../client-gwES2l4Y.mjs';
1
+ import { a as ApiClient } from '../client-CKv433F4.mjs';
2
2
 
3
3
  interface SendTransactionDto {
4
4
  phone: string;
@@ -1,4 +1,4 @@
1
- import { A as ApiClient } from '../client-gwES2l4Y.js';
1
+ import { a as ApiClient } from '../client-CKv433F4.js';
2
2
 
3
3
  interface SendTransactionDto {
4
4
  phone: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariary/ariary",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
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",