@nicefer/types 1.0.207 → 1.0.209

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,2 +1,17 @@
1
- export * from './event';
2
- export * from './radar';
1
+ export interface NiceEvent {
2
+ id: string;
3
+ title: string;
4
+ description: string;
5
+ inPerson: boolean;
6
+ organizerName: string;
7
+ createdBy: {
8
+ id: string;
9
+ name: string;
10
+ };
11
+ location: string;
12
+ coverUrl?: string;
13
+ startDate: Date;
14
+ endDate: Date;
15
+ createdAt: string;
16
+ updatedAt?: string;
17
+ }
package/dist/org/index.js CHANGED
@@ -1,2 +1 @@
1
- export * from './event';
2
- export * from './radar';
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nicefer/types",
3
- "version": "1.0.207",
3
+ "version": "1.0.209",
4
4
  "description": "Tipos compartidos para Nicefer",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,98 +0,0 @@
1
- import { PaymentIntent } from "@stripe/stripe-js";
2
- export declare namespace Org {
3
- interface NiceEvent {
4
- id: string;
5
- title: string;
6
- description: string;
7
- inPerson: boolean;
8
- organizerName: string;
9
- createdBy: {
10
- id: string;
11
- name: string;
12
- };
13
- location: string;
14
- coverUrl?: string;
15
- startDate: Date;
16
- endDate: Date;
17
- createdAt: string;
18
- updatedAt?: string;
19
- }
20
- type Currency = 'HNL' | 'EUR' | 'USD';
21
- type DonationStatus = 'pending_pay' | 'pending' | 'payment_error' | 'processing' | 'resolve' | 'rejected' | 'expired' | 'used';
22
- /**
23
- * Tipos de donaciones usadas en el radar
24
- *
25
- * Valores posibles:
26
- * - `direct_donation`: Donación directa a una persona
27
- * - `event`: Evento
28
- * - `operating_expenses`: Gastos operativos
29
- */
30
- type UsedIn = 'direct_donation' | 'event' | 'operating_expenses';
31
- /**
32
- * Tipos de movimientos del radar
33
- *
34
- * Valores posibles:
35
- * - `info`: Movimiento informativo
36
- * - `cash_converted_to_hnl`: Convertido a lempiras
37
- * - `cash_income`: Ingreso
38
- * - `cash_expense`: Gasto
39
- * - `cash_refund`: Reembolso
40
- * - `cash_reversion`: Reversión
41
- *
42
- * @remarks
43
- * El reembolso es para el cliente, mientras que la reversión
44
- * es para devolver el dinero a la donación original.
45
- */
46
- type FlowType = 'info' | 'cash_converted_to_hnl' | 'cash_income' | 'cash_expense' | 'cash_refund' | 'cash_reversion';
47
- interface Movement {
48
- id: string;
49
- title: string;
50
- desc?: string;
51
- /**
52
- * Tipos de donaciones usadas en el radar
53
- *
54
- * Valores posibles:
55
- * - `direct_donation`: Donación directa a una persona
56
- * - `event`: Evento
57
- * - `operating_expenses`: Gastos operativos
58
- */
59
- usedIn: UsedIn;
60
- icon: 'ok' | 'error' | 'info' | 'waiting';
61
- type: FlowType;
62
- /**
63
- * Monto involucrado en el movimiento,
64
- * se debe proporcionar `0` cuándo {@link FlowType} sea `none`.
65
- * Ej. `amount: 0`
66
- */
67
- amount: number;
68
- createdAt: string;
69
- }
70
- interface DonationCharges {
71
- subtotal: number;
72
- fees: number;
73
- total: number;
74
- }
75
- /**
76
- * La donación se puede recibir en HNL, USD o EUR,
77
- * pero se deberá convertir a lempiras antes de ser usada.
78
- */
79
- interface Donation {
80
- id: string;
81
- donorId: string;
82
- fullname: string;
83
- anonymous: boolean;
84
- charges: DonationCharges;
85
- /**
86
- * Cuándo se reciba en una moneda distinta de HNL, se convertirá a HNL.
87
- * De lo contrario será `undefined`
88
- */
89
- chargesInHNL?: DonationCharges;
90
- status: DonationStatus;
91
- mainCcy: Currency;
92
- paymentStatus?: PaymentIntent.Status;
93
- radar?: {
94
- [movementId: string]: Movement;
95
- };
96
- createdAt?: string;
97
- }
98
- }
package/dist/index.org.js DELETED
@@ -1,5 +0,0 @@
1
- export var Org;
2
- (function (Org) {
3
- ;
4
- ;
5
- })(Org || (Org = {}));