@ariary/ariary 1.0.8 → 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.
@@ -1,80 +0,0 @@
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
- });
@@ -1,53 +0,0 @@
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,54 +0,0 @@
1
- import { a as ApiClient } from '../client-CKv433F4.mjs';
2
-
3
- interface CreatePaymentDto {
4
- code: string;
5
- amount: number;
6
- projectId: string;
7
- }
8
- interface PaymentResponseDto {
9
- id: string;
10
- transactionId: string;
11
- amount: number;
12
- rest: number;
13
- projectId: string;
14
- status: string;
15
- parts: Array<{
16
- id: string;
17
- amount: number;
18
- transactionId: string;
19
- date: string;
20
- }>;
21
- createdAt: string;
22
- updatedAt: string;
23
- }
24
-
25
- declare class PaymentService {
26
- private client;
27
- constructor(client: ApiClient);
28
- /**
29
- * Crée un nouveau paiement
30
- * @param paymentData Les données du paiement
31
- * @returns La réponse de création du paiement
32
- */
33
- createPayment(paymentData: CreatePaymentDto): Promise<PaymentResponseDto>;
34
- /**
35
- * Récupère tous les paiements de l'application
36
- * @returns La liste de tous les paiements
37
- */
38
- getAllPayments(): Promise<PaymentResponseDto[]>;
39
- /**
40
- * Récupère un paiement par son ID
41
- * @param paymentId L'ID du paiement à récupérer
42
- * @returns Le paiement demandé
43
- */
44
- getPaymentById(paymentId: string): Promise<PaymentResponseDto>;
45
- /**
46
- * Met à jour le reste d'un paiement avec un code de ticket
47
- * @param paymentId L'ID du paiement à mettre à jour
48
- * @param ticketCode Le code du ticket à associer
49
- * @returns Le paiement mis à jour
50
- */
51
- updatePaymentRest(paymentId: string, ticketCode: string): Promise<PaymentResponseDto>;
52
- }
53
-
54
- export { type CreatePaymentDto, type PaymentResponseDto, PaymentService };
@@ -1,54 +0,0 @@
1
- import { a as ApiClient } from '../client-CKv433F4.js';
2
-
3
- interface CreatePaymentDto {
4
- code: string;
5
- amount: number;
6
- projectId: string;
7
- }
8
- interface PaymentResponseDto {
9
- id: string;
10
- transactionId: string;
11
- amount: number;
12
- rest: number;
13
- projectId: string;
14
- status: string;
15
- parts: Array<{
16
- id: string;
17
- amount: number;
18
- transactionId: string;
19
- date: string;
20
- }>;
21
- createdAt: string;
22
- updatedAt: string;
23
- }
24
-
25
- declare class PaymentService {
26
- private client;
27
- constructor(client: ApiClient);
28
- /**
29
- * Crée un nouveau paiement
30
- * @param paymentData Les données du paiement
31
- * @returns La réponse de création du paiement
32
- */
33
- createPayment(paymentData: CreatePaymentDto): Promise<PaymentResponseDto>;
34
- /**
35
- * Récupère tous les paiements de l'application
36
- * @returns La liste de tous les paiements
37
- */
38
- getAllPayments(): Promise<PaymentResponseDto[]>;
39
- /**
40
- * Récupère un paiement par son ID
41
- * @param paymentId L'ID du paiement à récupérer
42
- * @returns Le paiement demandé
43
- */
44
- getPaymentById(paymentId: string): Promise<PaymentResponseDto>;
45
- /**
46
- * Met à jour le reste d'un paiement avec un code de ticket
47
- * @param paymentId L'ID du paiement à mettre à jour
48
- * @param ticketCode Le code du ticket à associer
49
- * @returns Le paiement mis à jour
50
- */
51
- updatePaymentRest(paymentId: string, ticketCode: string): Promise<PaymentResponseDto>;
52
- }
53
-
54
- export { type CreatePaymentDto, type PaymentResponseDto, PaymentService };
@@ -1,86 +0,0 @@
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/payment/index.ts
21
- var payment_exports = {};
22
- __export(payment_exports, {
23
- PaymentService: () => PaymentService
24
- });
25
- module.exports = __toCommonJS(payment_exports);
26
-
27
- // src/payment.ts
28
- var PaymentService = class {
29
- constructor(client) {
30
- this.client = client;
31
- }
32
- /**
33
- * Crée un nouveau paiement
34
- * @param paymentData Les données du paiement
35
- * @returns La réponse de création du paiement
36
- */
37
- async createPayment(paymentData) {
38
- const response = await this.client.post(
39
- "/api/payments",
40
- paymentData,
41
- false
42
- );
43
- return response;
44
- }
45
- /**
46
- * Récupère tous les paiements de l'application
47
- * @returns La liste de tous les paiements
48
- */
49
- async getAllPayments() {
50
- const response = await this.client.get(
51
- "/api/payments",
52
- false
53
- );
54
- return response;
55
- }
56
- /**
57
- * Récupère un paiement par son ID
58
- * @param paymentId L'ID du paiement à récupérer
59
- * @returns Le paiement demandé
60
- */
61
- async getPaymentById(paymentId) {
62
- const response = await this.client.get(
63
- `/api/payments/${paymentId}`,
64
- false
65
- );
66
- return response;
67
- }
68
- /**
69
- * Met à jour le reste d'un paiement avec un code de ticket
70
- * @param paymentId L'ID du paiement à mettre à jour
71
- * @param ticketCode Le code du ticket à associer
72
- * @returns Le paiement mis à jour
73
- */
74
- async updatePaymentRest(paymentId, ticketCode) {
75
- const response = await this.client.put(
76
- `/api/payments/${paymentId}/rest`,
77
- { ticketCode },
78
- false
79
- );
80
- return response;
81
- }
82
- };
83
- // Annotate the CommonJS export names for ESM import in node:
84
- 0 && (module.exports = {
85
- PaymentService
86
- });
@@ -1,59 +0,0 @@
1
- // src/payment.ts
2
- var PaymentService = class {
3
- constructor(client) {
4
- this.client = client;
5
- }
6
- /**
7
- * Crée un nouveau paiement
8
- * @param paymentData Les données du paiement
9
- * @returns La réponse de création du paiement
10
- */
11
- async createPayment(paymentData) {
12
- const response = await this.client.post(
13
- "/api/payments",
14
- paymentData,
15
- false
16
- );
17
- return response;
18
- }
19
- /**
20
- * Récupère tous les paiements de l'application
21
- * @returns La liste de tous les paiements
22
- */
23
- async getAllPayments() {
24
- const response = await this.client.get(
25
- "/api/payments",
26
- false
27
- );
28
- return response;
29
- }
30
- /**
31
- * Récupère un paiement par son ID
32
- * @param paymentId L'ID du paiement à récupérer
33
- * @returns Le paiement demandé
34
- */
35
- async getPaymentById(paymentId) {
36
- const response = await this.client.get(
37
- `/api/payments/${paymentId}`,
38
- false
39
- );
40
- return response;
41
- }
42
- /**
43
- * Met à jour le reste d'un paiement avec un code de ticket
44
- * @param paymentId L'ID du paiement à mettre à jour
45
- * @param ticketCode Le code du ticket à associer
46
- * @returns Le paiement mis à jour
47
- */
48
- async updatePaymentRest(paymentId, ticketCode) {
49
- const response = await this.client.put(
50
- `/api/payments/${paymentId}/rest`,
51
- { ticketCode },
52
- false
53
- );
54
- return response;
55
- }
56
- };
57
- export {
58
- PaymentService
59
- };
@@ -1,62 +0,0 @@
1
- import { a as ApiClient } from '../client-CKv433F4.mjs';
2
-
3
- interface CreateSmsDto {
4
- message: string;
5
- phone: string;
6
- }
7
- interface SendSmsDto {
8
- message: string;
9
- phones: string[];
10
- }
11
- interface BulkSmsDto {
12
- messages: {
13
- phones: string[];
14
- message: string;
15
- }[];
16
- }
17
- interface SendSmsResponseDto {
18
- id: string;
19
- message: string;
20
- phone: string;
21
- status: string;
22
- createdAt: string;
23
- }
24
- interface ResponseSmsDto {
25
- id: string;
26
- message: string;
27
- phone: string;
28
- status: string;
29
- createdAt: string;
30
- updatedAt: string;
31
- }
32
- interface MultiSmsResponseDto {
33
- status: string;
34
- data: {
35
- id: string;
36
- message: string;
37
- phone: string;
38
- status: string;
39
- }[];
40
- }
41
- interface BulkSmsResponseDto {
42
- status: string;
43
- data: {
44
- id: string;
45
- message: string;
46
- phone: string;
47
- status: string;
48
- }[];
49
- }
50
-
51
- declare class SmsService {
52
- private client;
53
- constructor(client: ApiClient);
54
- notify(message: string, numbers: string | string[]): Promise<MultiSmsResponseDto>;
55
- notifyBulk(messages: {
56
- message: string;
57
- numbers: string | string[];
58
- }[]): Promise<BulkSmsResponseDto>;
59
- getAll(): Promise<ResponseSmsDto[]>;
60
- }
61
-
62
- export { type BulkSmsDto, type BulkSmsResponseDto, type CreateSmsDto, type MultiSmsResponseDto, type ResponseSmsDto, type SendSmsDto, type SendSmsResponseDto, SmsService };
@@ -1,62 +0,0 @@
1
- import { a as ApiClient } from '../client-CKv433F4.js';
2
-
3
- interface CreateSmsDto {
4
- message: string;
5
- phone: string;
6
- }
7
- interface SendSmsDto {
8
- message: string;
9
- phones: string[];
10
- }
11
- interface BulkSmsDto {
12
- messages: {
13
- phones: string[];
14
- message: string;
15
- }[];
16
- }
17
- interface SendSmsResponseDto {
18
- id: string;
19
- message: string;
20
- phone: string;
21
- status: string;
22
- createdAt: string;
23
- }
24
- interface ResponseSmsDto {
25
- id: string;
26
- message: string;
27
- phone: string;
28
- status: string;
29
- createdAt: string;
30
- updatedAt: string;
31
- }
32
- interface MultiSmsResponseDto {
33
- status: string;
34
- data: {
35
- id: string;
36
- message: string;
37
- phone: string;
38
- status: string;
39
- }[];
40
- }
41
- interface BulkSmsResponseDto {
42
- status: string;
43
- data: {
44
- id: string;
45
- message: string;
46
- phone: string;
47
- status: string;
48
- }[];
49
- }
50
-
51
- declare class SmsService {
52
- private client;
53
- constructor(client: ApiClient);
54
- notify(message: string, numbers: string | string[]): Promise<MultiSmsResponseDto>;
55
- notifyBulk(messages: {
56
- message: string;
57
- numbers: string | string[];
58
- }[]): Promise<BulkSmsResponseDto>;
59
- getAll(): Promise<ResponseSmsDto[]>;
60
- }
61
-
62
- export { type BulkSmsDto, type BulkSmsResponseDto, type CreateSmsDto, type MultiSmsResponseDto, type ResponseSmsDto, type SendSmsDto, type SendSmsResponseDto, SmsService };
package/dist/sms/index.js DELETED
@@ -1,64 +0,0 @@
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/sms/index.ts
21
- var sms_exports = {};
22
- __export(sms_exports, {
23
- SmsService: () => SmsService
24
- });
25
- module.exports = __toCommonJS(sms_exports);
26
-
27
- // src/sms.ts
28
- var SmsService = class {
29
- constructor(client) {
30
- this.client = client;
31
- }
32
- async notify(message, numbers) {
33
- const phones = Array.isArray(numbers) ? numbers : [numbers];
34
- const response = await this.client.post(
35
- "/api/sms/multi",
36
- { phones, message },
37
- true
38
- );
39
- return response;
40
- }
41
- async notifyBulk(messages) {
42
- const bulkMessages = messages.map((item) => ({
43
- message: item.message,
44
- phones: Array.isArray(item.numbers) ? item.numbers : [item.numbers]
45
- }));
46
- const response = await this.client.post(
47
- "/api/sms/bulk",
48
- { messages: bulkMessages },
49
- true
50
- );
51
- return response;
52
- }
53
- async getAll() {
54
- const response = await this.client.get(
55
- "/api/sms",
56
- true
57
- );
58
- return response;
59
- }
60
- };
61
- // Annotate the CommonJS export names for ESM import in node:
62
- 0 && (module.exports = {
63
- SmsService
64
- });
@@ -1,37 +0,0 @@
1
- // src/sms.ts
2
- var SmsService = class {
3
- constructor(client) {
4
- this.client = client;
5
- }
6
- async notify(message, numbers) {
7
- const phones = Array.isArray(numbers) ? numbers : [numbers];
8
- const response = await this.client.post(
9
- "/api/sms/multi",
10
- { phones, message },
11
- true
12
- );
13
- return response;
14
- }
15
- async notifyBulk(messages) {
16
- const bulkMessages = messages.map((item) => ({
17
- message: item.message,
18
- phones: Array.isArray(item.numbers) ? item.numbers : [item.numbers]
19
- }));
20
- const response = await this.client.post(
21
- "/api/sms/bulk",
22
- { messages: bulkMessages },
23
- true
24
- );
25
- return response;
26
- }
27
- async getAll() {
28
- const response = await this.client.get(
29
- "/api/sms",
30
- true
31
- );
32
- return response;
33
- }
34
- };
35
- export {
36
- SmsService
37
- };
@@ -1,36 +0,0 @@
1
- import { a as ApiClient } from '../client-CKv433F4.mjs';
2
-
3
- interface SendTransactionDto {
4
- phone: string;
5
- amount: number;
6
- }
7
- interface SendTransactionResponse {
8
- id: string;
9
- phone: string;
10
- amount: number;
11
- status: string;
12
- message: string;
13
- requestId: string;
14
- projectId: string;
15
- secretId: string;
16
- createdAt: string;
17
- }
18
- interface TransactionResponseDto {
19
- id: string;
20
- phone: string;
21
- amount: number;
22
- rest?: number;
23
- status: string;
24
- ticketCode: string;
25
- createdAt: string;
26
- updatedAt: string;
27
- }
28
-
29
- declare class TransferService {
30
- private client;
31
- constructor(client: ApiClient);
32
- send(phone: string, amount: number): Promise<SendTransactionResponse>;
33
- getAll(): Promise<SendTransactionResponse[]>;
34
- }
35
-
36
- export { type SendTransactionDto, type SendTransactionResponse, type TransactionResponseDto, TransferService };
@@ -1,36 +0,0 @@
1
- import { a as ApiClient } from '../client-CKv433F4.js';
2
-
3
- interface SendTransactionDto {
4
- phone: string;
5
- amount: number;
6
- }
7
- interface SendTransactionResponse {
8
- id: string;
9
- phone: string;
10
- amount: number;
11
- status: string;
12
- message: string;
13
- requestId: string;
14
- projectId: string;
15
- secretId: string;
16
- createdAt: string;
17
- }
18
- interface TransactionResponseDto {
19
- id: string;
20
- phone: string;
21
- amount: number;
22
- rest?: number;
23
- status: string;
24
- ticketCode: string;
25
- createdAt: string;
26
- updatedAt: string;
27
- }
28
-
29
- declare class TransferService {
30
- private client;
31
- constructor(client: ApiClient);
32
- send(phone: string, amount: number): Promise<SendTransactionResponse>;
33
- getAll(): Promise<SendTransactionResponse[]>;
34
- }
35
-
36
- export { type SendTransactionDto, type SendTransactionResponse, type TransactionResponseDto, TransferService };