@nicefer/types 2.0.11 → 2.0.12
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.
|
@@ -11,13 +11,13 @@ export type Currency = 'HNL' | 'EUR' | 'USD';
|
|
|
11
11
|
* - **resolve** → Donación completada con éxito; los fondos han sido confirmados.
|
|
12
12
|
* - **rejected** → La donación fue rechazada por el sistema o la pasarela de pago.
|
|
13
13
|
* - **expired** → El tiempo límite para completar la donación ha caducado.
|
|
14
|
-
* - **
|
|
14
|
+
* - **partially_used** → La donación fue usada parcialmente.
|
|
15
15
|
* - **fully_used** → La donación ha sido usada por completo.
|
|
16
16
|
*
|
|
17
17
|
* Este tipo permite un control ordenado y claro del flujo energético
|
|
18
18
|
* y transaccional de las donaciones dentro del sistema.
|
|
19
19
|
*/
|
|
20
|
-
export type DonationStatus = 'pending_pay' | 'pending' | 'payment_error' | 'processing' | 'resolve' | 'rejected' | 'expired' | '
|
|
20
|
+
export type DonationStatus = 'pending_pay' | 'pending' | 'payment_error' | 'processing' | 'resolve' | 'rejected' | 'expired' | 'partially_used' | 'fully_used';
|
|
21
21
|
/**
|
|
22
22
|
* Tipos de donaciones usadas en el radar
|
|
23
23
|
*
|
|
@@ -43,8 +43,9 @@ export type UsedIn = 'direct_donation' | 'event' | 'operating_expenses';
|
|
|
43
43
|
* es para devolver el dinero a la donación original.
|
|
44
44
|
*/
|
|
45
45
|
export type FlowType = 'info' | 'cash_converted_to_hnl' | 'cash_income' | 'cash_expense' | 'cash_refund' | 'cash_reversion';
|
|
46
|
-
export interface
|
|
46
|
+
export interface RadarMovement {
|
|
47
47
|
id: string;
|
|
48
|
+
donationId: string;
|
|
48
49
|
title: string;
|
|
49
50
|
desc?: string;
|
|
50
51
|
/**
|
|
@@ -58,6 +59,16 @@ export interface Movement {
|
|
|
58
59
|
usedIn?: UsedIn;
|
|
59
60
|
icon: 'ok' | 'error' | 'info' | 'waiting';
|
|
60
61
|
type: FlowType;
|
|
62
|
+
/**
|
|
63
|
+
* Elemento relacionado al movimiento,
|
|
64
|
+
* por ejemplo si se gastó en un evento:
|
|
65
|
+
*
|
|
66
|
+
* Ej. `relatedItem: {docId: '123', collection: 'events'}`
|
|
67
|
+
*/
|
|
68
|
+
relatedItem?: {
|
|
69
|
+
docId: string;
|
|
70
|
+
collection: string;
|
|
71
|
+
};
|
|
61
72
|
/**
|
|
62
73
|
* Monto involucrado en el movimiento,
|
|
63
74
|
* se debe proporcionar `0` cuándo {@link FlowType} sea `none`.
|
|
@@ -97,9 +108,6 @@ export interface Donation {
|
|
|
97
108
|
score: number;
|
|
98
109
|
level: string;
|
|
99
110
|
};
|
|
100
|
-
radar?: {
|
|
101
|
-
[movementId: string]: Movement;
|
|
102
|
-
};
|
|
103
111
|
tags: string[];
|
|
104
112
|
createdAt?: string;
|
|
105
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radar.d.ts","sourceRoot":"","sources":["../../src/types-org/radar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAE7C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,SAAS,GACT,eAAe,GACf,YAAY,GACZ,SAAS,GACT,UAAU,GACV,SAAS,GACT,
|
|
1
|
+
{"version":3,"file":"radar.d.ts","sourceRoot":"","sources":["../../src/types-org/radar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAE7C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,SAAS,GACT,eAAe,GACf,YAAY,GACZ,SAAS,GACT,UAAU,GACV,SAAS,GACT,gBA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