ravcredit-lib 0.0.2 → 0.0.4

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.
Files changed (44) hide show
  1. package/esm2022/lib/v1/objects/oAddress.mjs +10 -0
  2. package/esm2022/lib/v1/objects/oBusiness.mjs +2 -0
  3. package/esm2022/lib/v1/objects/oClient.mjs +2 -0
  4. package/esm2022/lib/v1/objects/oConekta.mjs +85 -0
  5. package/esm2022/lib/v1/objects/oContract.mjs +2 -0
  6. package/esm2022/lib/v1/objects/oContractAll.mjs +2 -0
  7. package/esm2022/lib/v1/objects/oCustomer.mjs +18 -0
  8. package/esm2022/lib/v1/objects/oDevice.mjs +2 -0
  9. package/esm2022/lib/v1/objects/oFinancial.mjs +2 -0
  10. package/esm2022/lib/v1/objects/oGlobal.mjs +86 -0
  11. package/esm2022/lib/v1/objects/oLogIn.mjs +17 -0
  12. package/esm2022/lib/v1/objects/oNewPayment.mjs +2 -0
  13. package/esm2022/lib/v1/objects/oNotification.mjs +17 -0
  14. package/esm2022/lib/v1/objects/oPassport.mjs +7 -0
  15. package/esm2022/lib/v1/objects/oUser.mjs +2 -0
  16. package/esm2022/lib/v1/util/UtilBusiness.mjs +171 -0
  17. package/esm2022/lib/v1/util/UtilClient.mjs +221 -0
  18. package/esm2022/lib/v1/util/UtilContract.mjs +331 -0
  19. package/esm2022/lib/v1/util/UtilDynamiCore.mjs +292 -0
  20. package/esm2022/public-api.mjs +20 -2
  21. package/fesm2022/ravcredit-lib.mjs +1243 -1
  22. package/fesm2022/ravcredit-lib.mjs.map +1 -1
  23. package/lib/v1/objects/oAddress.d.ts +10 -0
  24. package/lib/v1/objects/oBusiness.d.ts +101 -0
  25. package/lib/{oClient.d.ts → v1/objects/oClient.d.ts} +0 -1
  26. package/lib/v1/objects/oConekta.d.ts +305 -0
  27. package/lib/v1/objects/oContract.d.ts +23 -0
  28. package/lib/v1/objects/oContractAll.d.ts +21 -0
  29. package/lib/v1/objects/oCustomer.d.ts +17 -0
  30. package/lib/v1/objects/oDevice.d.ts +5 -0
  31. package/lib/v1/objects/oFinancial.d.ts +30 -0
  32. package/lib/v1/objects/oGlobal.d.ts +149 -0
  33. package/lib/v1/objects/oLogIn.d.ts +30 -0
  34. package/lib/v1/objects/oNewPayment.d.ts +11 -0
  35. package/lib/v1/objects/oNotification.d.ts +25 -0
  36. package/lib/v1/objects/oPassport.d.ts +55 -0
  37. package/lib/v1/objects/oUser.d.ts +25 -0
  38. package/lib/v1/util/UtilBusiness.d.ts +52 -0
  39. package/lib/v1/util/UtilClient.d.ts +34 -0
  40. package/lib/v1/util/UtilContract.d.ts +70 -0
  41. package/lib/v1/util/UtilDynamiCore.d.ts +453 -0
  42. package/package.json +1 -1
  43. package/public-api.d.ts +19 -1
  44. package/esm2022/lib/oClient.mjs +0 -2
@@ -0,0 +1,305 @@
1
+ export declare enum eConektaRes {
2
+ CUSTOMER_CREATED = "customer.created",
3
+ ORDER_PENDING_PAYMENT = "order.pending_payment",
4
+ ORDER_CREATED = "order.created",
5
+ CHARGE_CREATED = "charge.created",
6
+ ORDER_PAID = "order.paid",
7
+ CHARGE_PAID = "charge.paid"
8
+ }
9
+ export declare enum eConektaOrderStatus {
10
+ expired = "expired",
11
+ paid = "paid",
12
+ pending_payment = "pending_payment"
13
+ }
14
+ export interface oConektaResObjChargePaid {
15
+ id: string;
16
+ livemode: boolean;
17
+ created_at: number;
18
+ currency: string;
19
+ payment_method: any;
20
+ object: string;
21
+ description: string;
22
+ status: string;
23
+ amount: number;
24
+ paid_at: number;
25
+ fee: number;
26
+ customer_id: string;
27
+ order_id: string;
28
+ }
29
+ export interface oConektaCustomerInfo {
30
+ email: string;
31
+ phone: string | null;
32
+ name: string;
33
+ corporate: boolean;
34
+ customer_id: string;
35
+ object: string;
36
+ customer_custom_reference: string | null;
37
+ }
38
+ export interface oConektaChannel {
39
+ segment: string;
40
+ checkout_request_id: string;
41
+ checkout_request_type: string;
42
+ id: string;
43
+ }
44
+ export interface oConektaCheckout {
45
+ id: string;
46
+ name: string;
47
+ livemode: boolean;
48
+ emails_sent: number;
49
+ success_url: string;
50
+ failure_url: string;
51
+ payments_limit_count: number | null;
52
+ paid_payments_count: number;
53
+ status: string;
54
+ type: string;
55
+ recurrent: boolean;
56
+ starts_at: number;
57
+ expires_at: number;
58
+ allowed_payment_methods: string[];
59
+ needs_shipping_contact: boolean;
60
+ redirection_time: number | null;
61
+ metadata: object;
62
+ can_not_expire: boolean;
63
+ object: string;
64
+ is_redirect_on_failure: boolean;
65
+ slug: string;
66
+ url: string;
67
+ }
68
+ export interface oConektaLineItem {
69
+ name: string;
70
+ description: string | null;
71
+ unit_price: number;
72
+ quantity: number;
73
+ sku: string | null;
74
+ tags: string[] | null;
75
+ brand: string | null;
76
+ type: string | null;
77
+ object: string;
78
+ id: string;
79
+ parent_id: string;
80
+ metadata: object;
81
+ antifraud_info: object;
82
+ }
83
+ export interface oConektaLineItems {
84
+ object: string;
85
+ has_more: boolean;
86
+ total: number;
87
+ data: oConektaLineItem[];
88
+ }
89
+ export interface oConektaCharges {
90
+ object: string;
91
+ has_more: boolean;
92
+ total: number;
93
+ data: oConektaChargeData[];
94
+ }
95
+ export interface oConektaPaymentMethod {
96
+ service_name: string;
97
+ barcode_url: string;
98
+ store: string;
99
+ auth_code: number;
100
+ object: string;
101
+ type: string;
102
+ expires_at: number;
103
+ store_name: string;
104
+ reference: string;
105
+ cashier_id: string;
106
+ }
107
+ export interface oConektaChargeData {
108
+ id: string;
109
+ livemode: boolean;
110
+ created_at: number;
111
+ currency: string;
112
+ failure_code: string | null;
113
+ failure_message: string | null;
114
+ channel: oConektaChannel;
115
+ payment_method: oConektaPaymentMethod;
116
+ object: string;
117
+ device_fingerprint: string;
118
+ description: string;
119
+ is_refundable: boolean;
120
+ reference_id: string | null;
121
+ status: string;
122
+ amount: number;
123
+ paid_at: number;
124
+ customer_id: string;
125
+ order_id: string;
126
+ is_button_premia: boolean;
127
+ refunds: string | null;
128
+ }
129
+ export interface oConektaResObjOrderPaid {
130
+ livemode: boolean;
131
+ amount: number;
132
+ currency: string;
133
+ payment_status: string;
134
+ amount_refunded: number;
135
+ customer_info: oConektaCustomerInfo;
136
+ object: string;
137
+ id: string;
138
+ metadata: any;
139
+ is_refundable: boolean;
140
+ created_at: number;
141
+ updated_at: number;
142
+ line_items: any;
143
+ charges: any;
144
+ }
145
+ export interface oConektaCustomerInfo {
146
+ email: string;
147
+ phone: string | null;
148
+ name: string;
149
+ corporate: boolean;
150
+ customer_id: string;
151
+ object: string;
152
+ customer_custom_reference: string | null;
153
+ }
154
+ export interface oConektaOrder {
155
+ livemode: boolean;
156
+ amount: number;
157
+ currency: string;
158
+ payment_status: string;
159
+ amount_refunded: number;
160
+ customer_info: oConektaCustomerInfo;
161
+ shipping_contact: string | null;
162
+ channel: oConektaChannel;
163
+ fiscal_entity: string | null;
164
+ object: string;
165
+ id: string;
166
+ metadata: object;
167
+ is_refundable: boolean;
168
+ created_at: number;
169
+ updated_at: number;
170
+ checkout: oConektaCheckout;
171
+ is_button_premia: boolean;
172
+ line_items: oConektaLineItems;
173
+ shipping_lines: string | null;
174
+ tax_lines: string | null;
175
+ discount_lines: string | null;
176
+ charges: oConektaCharges;
177
+ }
178
+ export interface oConektaOrdersResponse {
179
+ next_page_url: string | null;
180
+ previous_page_url: string | null;
181
+ has_more: boolean;
182
+ object: string;
183
+ data: oConektaOrder[];
184
+ }
185
+ /******************************************************* Order Create */
186
+ export interface oConektaNewOrderCustomerInfo {
187
+ customer_id: string;
188
+ }
189
+ export interface oConektaNewOrderPymMethod {
190
+ expires_at: number;
191
+ type: string;
192
+ }
193
+ export interface oConektaNewOrderCharge {
194
+ payment_method: oConektaNewOrderPymMethod;
195
+ amount: number;
196
+ }
197
+ export interface oConektaNewOrderAntifraudInfo {
198
+ newKey: string;
199
+ }
200
+ export interface oConektaNewOrderLineItem {
201
+ antifraud_info: oConektaNewOrderAntifraudInfo;
202
+ name: string;
203
+ quantity: number;
204
+ unit_price: number;
205
+ }
206
+ export interface oConektaOrderCreate {
207
+ customer_info: oConektaNewOrderCustomerInfo;
208
+ charges: oConektaNewOrderCharge[];
209
+ currency: string;
210
+ line_items: oConektaNewOrderLineItem[];
211
+ }
212
+ export interface oConektaNewOrder {
213
+ data: oConektaOrderCreate;
214
+ date?: number;
215
+ id: string;
216
+ }
217
+ export interface oConektaResPrevAttr {
218
+ status: string;
219
+ }
220
+ export interface oConektaResData {
221
+ object: oConektaResObjChargePaid | oConektaResObjOrderPaid;
222
+ previous_attributes: oConektaResPrevAttr;
223
+ }
224
+ export interface iConektaResObjChargePaidMethod {
225
+ barcode_url: string;
226
+ expires_at: number;
227
+ object: string;
228
+ reference: string;
229
+ service_name: string;
230
+ store: string;
231
+ type: string;
232
+ }
233
+ export interface iConektaResObjChargePaid {
234
+ id: string;
235
+ livemode: boolean;
236
+ created_at: number;
237
+ currency: string;
238
+ payment_method: iConektaResObjChargePaidMethod;
239
+ object: string;
240
+ description: string;
241
+ status: string;
242
+ amount: number;
243
+ paid_at: number;
244
+ fee: number;
245
+ customer_id: string;
246
+ order_id: string;
247
+ }
248
+ export interface iConektaResPrevAttr {
249
+ status: string;
250
+ }
251
+ export interface iConektaResData {
252
+ object: iConektaResObjChargePaid;
253
+ previous_attributes: iConektaResPrevAttr;
254
+ }
255
+ export interface oConektaRes {
256
+ client_id?: string;
257
+ data: iConektaResData;
258
+ livemode: false;
259
+ webhook_status: string;
260
+ webhook_logs: any[];
261
+ id: string;
262
+ object: string;
263
+ type: eConektaRes;
264
+ created_at: number;
265
+ }
266
+ /******************************************************* New reference res */
267
+ export interface iConektaSources {
268
+ type: string;
269
+ expires_at?: number;
270
+ }
271
+ export interface iOxxorecurrentSourcesData {
272
+ id: string;
273
+ object: string;
274
+ type: string;
275
+ provider: string;
276
+ reference: string;
277
+ barcode: string;
278
+ barcode_url: string;
279
+ expires_at: number;
280
+ created_at: number;
281
+ parent_id: string;
282
+ }
283
+ export interface iOxxoRecurrentSources {
284
+ object: string;
285
+ has_more: boolean;
286
+ total: number;
287
+ data: iOxxorecurrentSourcesData[];
288
+ }
289
+ export interface iConektaRecurrent {
290
+ corporate: boolean;
291
+ created_at: number;
292
+ customer_reference?: string;
293
+ email: string;
294
+ id: string;
295
+ livemode: boolean;
296
+ name: string;
297
+ phone: string;
298
+ object: string;
299
+ custom_id: string;
300
+ payment_sources: iOxxoRecurrentSources;
301
+ }
302
+ /******************************************************* New reference constant */
303
+ export declare const cOxxorecurrentSourcesData: iOxxorecurrentSourcesData;
304
+ export declare const cOxxoRecurrentSources: iOxxoRecurrentSources;
305
+ export declare const cConektaRecurrent: iConektaRecurrent;
@@ -0,0 +1,23 @@
1
+ import { oAddress } from "./oAddress";
2
+ import { oDevice } from "./oDevice";
3
+ import { oFinancial } from "./oFinancial";
4
+ export interface iContract {
5
+ createContract(data: any, monthlyPay: number, finalPayment: number): Promise<void>;
6
+ editContract(): void;
7
+ verifyClient(clientCurp: string): Promise<void>;
8
+ dataClient(client: string): void;
9
+ referenceAdded(reference: number): Promise<void>;
10
+ }
11
+ export interface oContract {
12
+ id: string;
13
+ dynamicAccount?: number;
14
+ client: string;
15
+ address: oAddress;
16
+ device: oDevice;
17
+ financial: oFinancial;
18
+ createdAt?: number;
19
+ lastPayment?: number;
20
+ by: string;
21
+ active: boolean;
22
+ photo?: string;
23
+ }
@@ -0,0 +1,21 @@
1
+ import { tyClientContract } from "./oGlobal";
2
+ import { oClient } from "./oClient";
3
+ import { oContract } from "./oContract";
4
+ import { IDCAccount } from '../util/UtilDynamiCore';
5
+ export interface iContractAll {
6
+ getAllLocal(): Promise<void>;
7
+ getAllServer(): Promise<void>;
8
+ getDynamicTransactionsManual(account: number): Promise<boolean>;
9
+ createNewReferenceDynamic(client: tyClientContract): Promise<boolean>;
10
+ createNewReferenceConekta(client: tyClientContract): Promise<void>;
11
+ createNewReferencePassport(client: tyClientContract): Promise<void>;
12
+ referenceCreated(response: boolean, provider: string): void;
13
+ getColumnName(column: string): string;
14
+ searchDynamicAccount(client: tyClientContract): Promise<IDCAccount | null>;
15
+ updateClient(client: Partial<oClient>): Promise<boolean>;
16
+ updateContract(id: string, contract: Partial<oContract>): Promise<boolean>;
17
+ deleteClient(client: oClient): Promise<boolean>;
18
+ deleteContract(contract: oContract): Promise<boolean>;
19
+ updateClientAppAccess(client: Partial<oClient>, id: string): Promise<boolean>;
20
+ calcTotal(contract: oContract): number;
21
+ }
@@ -0,0 +1,17 @@
1
+ export interface oCustomer {
2
+ livemode: boolean;
3
+ name: string;
4
+ email: string;
5
+ phone: string;
6
+ id: string;
7
+ object: string;
8
+ created_at: number;
9
+ corporate: boolean;
10
+ custom_reference: string;
11
+ }
12
+ export interface oCustomerInfo {
13
+ customer_id: string;
14
+ name?: string;
15
+ email?: string;
16
+ phone?: string;
17
+ }
@@ -0,0 +1,5 @@
1
+ export interface oDevice {
2
+ device: string;
3
+ id?: string;
4
+ IMEI: string;
5
+ }
@@ -0,0 +1,30 @@
1
+ import { oBusinessDeadlines } from "./oBusiness";
2
+ export interface oFinancialProgress {
3
+ id: string;
4
+ amount: number;
5
+ date: number;
6
+ }
7
+ export interface oFinancial {
8
+ total: number;
9
+ initial: number;
10
+ deadlines: oBusinessDeadlines;
11
+ initDate?: number;
12
+ finalDate?: number;
13
+ weeklyPayment: number;
14
+ dayCut?: number;
15
+ finalPayment?: number;
16
+ progress?: oFinancialProgress[];
17
+ pendingOf: string[];
18
+ interest: number;
19
+ provider: string;
20
+ financed: number;
21
+ nextPayment: number;
22
+ amount_commission_opening?: number;
23
+ principal_disbursed?: number;
24
+ expected_disbursed?: number;
25
+ credit_type?: string;
26
+ interest_rate?: number;
27
+ commission_opening?: number;
28
+ interest_arrears?: number;
29
+ clabe?: string;
30
+ }
@@ -0,0 +1,149 @@
1
+ import { oUser } from "./oUser";
2
+ import { oBusinessInfo, oSchedule } from "./oBusiness";
3
+ import { oClient } from "./oClient";
4
+ import { oDevice } from "./oDevice";
5
+ import { oAddress } from "./oAddress";
6
+ import { oFinancial } from "./oFinancial";
7
+ import { MatSnackBarConfig } from "@angular/material/snack-bar";
8
+ import { oContract } from "./oContract";
9
+ import { oNotification } from "./oNotification";
10
+ export declare enum eRoles {
11
+ Administrator = "Administrator",
12
+ Seller = "Seller",
13
+ Consultant = "Consultant"
14
+ }
15
+ export declare enum eProcessStatus {
16
+ IDLE = "IDLE",
17
+ ERROR = "ERROR",
18
+ CANCELED = "CANCELED",
19
+ COMPLETE = "COMPLETE",
20
+ PROCESSING = "PROCESSING",
21
+ WAITING = "WAITING"
22
+ }
23
+ export declare enum eLoginStatus {
24
+ IDLE = "IDLE",
25
+ ERROR = "ERROR",
26
+ AUTHORIZED = "AUTHORIZED",
27
+ CHECKING = "CHECKING",
28
+ NOAUTHORIZED = "NOAUTHORIZED",
29
+ NOTFOUND = "NOTFOUND",
30
+ ERRORPASSWORD = "ERRORPASSWORD"
31
+ }
32
+ export declare enum eClientStatus {
33
+ ACTIVE = "active",
34
+ COMPLETED = "completed",
35
+ PAUSED = "paused",
36
+ CANCELED = "canceled",
37
+ LATE = "late"
38
+ }
39
+ export declare const cSingleOptionClientStatus: iOptionsSelect;
40
+ export declare const cOptionsClientStatus: iOptionsSelect[];
41
+ export interface iOptionsSelect {
42
+ viewValue: String;
43
+ value: String;
44
+ }
45
+ export interface iSelect {
46
+ viewValue: eRoles;
47
+ value: eRoles;
48
+ }
49
+ export declare const eRolesSelect: iSelect[];
50
+ export interface iConfigUUID {
51
+ client_uuid?: string;
52
+ contract_uuid: string;
53
+ }
54
+ export interface iPaymentDelay {
55
+ today: number;
56
+ nextPayment: number;
57
+ daysDelay: number;
58
+ late: boolean;
59
+ }
60
+ export declare const cPaymentDalay: iPaymentDelay;
61
+ export interface oResponse {
62
+ error?: string;
63
+ data: oUser | oUser[] | oBusinessInfo | oAddress | oSchedule | oFinancial | string | iPaymentDelay | oClient | oDevice | iConfigUUID | Response | oNotification;
64
+ }
65
+ export interface gResponse {
66
+ status?: boolean;
67
+ path: string;
68
+ statusCode: number;
69
+ error?: string;
70
+ epochTime: number;
71
+ data: any;
72
+ }
73
+ export interface gResponseFuncEmail {
74
+ success: boolean;
75
+ message: any;
76
+ }
77
+ export declare const snackBarConfigAction: MatSnackBarConfig;
78
+ export declare const snackBarConfigNoAction: MatSnackBarConfig;
79
+ export interface iInformativeDialog {
80
+ message: string;
81
+ title: string;
82
+ cancel: string;
83
+ continue: string;
84
+ }
85
+ export interface iSnackBarMessage {
86
+ message: string;
87
+ action: string;
88
+ config: MatSnackBarConfig;
89
+ }
90
+ export type tyClientContract = oClient & oContract;
91
+ export declare const cTyClientContract: {
92
+ id: string;
93
+ dynamicAccount?: number;
94
+ client: string;
95
+ address: oAddress;
96
+ device: oDevice;
97
+ financial: oFinancial;
98
+ createdAt?: number;
99
+ lastPayment?: number;
100
+ by: string;
101
+ active: boolean;
102
+ photo?: string;
103
+ name: string;
104
+ username: string;
105
+ password?: string;
106
+ email: string;
107
+ phone: string;
108
+ curp: string;
109
+ contract?: string;
110
+ lastLogin?: number;
111
+ contract_temporary?: string;
112
+ exists?: boolean;
113
+ conekta_id?: string;
114
+ dynamic_id?: number | string;
115
+ dynamic_account?: string | number;
116
+ dynamic_ref?: string;
117
+ passport_id?: string;
118
+ payments?: import("./oClient").oClientPayments[];
119
+ reference?: string;
120
+ references?: import("./oClient").oClientReferences[];
121
+ token?: string;
122
+ userReferences: import("./oClient").oUserReference[];
123
+ contractUrl?: string;
124
+ status: string;
125
+ };
126
+ export interface oContractMetrics {
127
+ total: number;
128
+ activated: number;
129
+ paused: number;
130
+ completed: number;
131
+ canceled: number;
132
+ late: number;
133
+ dynamicCount: number;
134
+ passportCount: number;
135
+ conektaCount: number;
136
+ rateTotal: number;
137
+ rateActive: number;
138
+ ratePaused: number;
139
+ rateComplete: number;
140
+ rateCanceled: number;
141
+ rateLate: number;
142
+ }
143
+ export interface HasUnsavedChanges {
144
+ hasUnsavedChanges(): boolean;
145
+ }
146
+ export interface oPaymentDates {
147
+ week: number;
148
+ date: number;
149
+ }
@@ -0,0 +1,30 @@
1
+ import { WritableSignal } from "@angular/core";
2
+ export declare enum eAuthActions {
3
+ delete = "delete",
4
+ auth = "auth"
5
+ }
6
+ export declare enum eAuthType {
7
+ auth = "auth",
8
+ login = "login",
9
+ idle = ""
10
+ }
11
+ export interface iAuthConfig {
12
+ title: string;
13
+ desc: string;
14
+ data: boolean;
15
+ }
16
+ export declare const cAuthConfig: iAuthConfig;
17
+ export interface ISignIn {
18
+ username: WritableSignal<string>;
19
+ password: WritableSignal<string>;
20
+ login(credentials: oAuth, destination: string): Promise<void>;
21
+ success(): void;
22
+ }
23
+ export interface oAuth {
24
+ username: string;
25
+ password: string;
26
+ }
27
+ export interface oAuthRes {
28
+ status: number;
29
+ data: {};
30
+ }
@@ -0,0 +1,11 @@
1
+ import { oContract } from "./oContract";
2
+ import { oClient } from "./oClient";
3
+ export interface iNewPayment {
4
+ getContract(): Promise<void>;
5
+ getContractApi(): Promise<oContract>;
6
+ getClient(contract: oContract): Promise<void>;
7
+ getClientApi(contract: oContract): Promise<oClient>;
8
+ getParams(): Promise<void>;
9
+ getAccount(): Promise<boolean>;
10
+ createPayment(): Promise<string>;
11
+ }
@@ -0,0 +1,25 @@
1
+ export declare const cTopic = "RavCreditClients";
2
+ export declare enum eNotificationType {
3
+ GLOBAL = "global",
4
+ USER = "user",
5
+ PAYMENT = "payment"
6
+ }
7
+ export interface oNotificationResponses {
8
+ successCount: number;
9
+ failureCount: number;
10
+ }
11
+ export interface oNotification {
12
+ ids?: string[];
13
+ type?: string;
14
+ tokens?: string[];
15
+ topic?: string;
16
+ notification: {
17
+ title: string;
18
+ body: string;
19
+ };
20
+ data: any;
21
+ notification_id?: number;
22
+ recipient?: string;
23
+ responses?: oNotificationResponses;
24
+ }
25
+ export declare const cNotification: oNotification;
@@ -0,0 +1,55 @@
1
+ import { oContract } from "./oContract";
2
+ export declare enum ePassportTypes {
3
+ CREATE = "create_references",
4
+ SEND = "send_references"
5
+ }
6
+ /** *********************************************************************************/
7
+ export interface iPassportAdditional {
8
+ client?: string;
9
+ clientID?: string;
10
+ credit?: string;
11
+ }
12
+ export interface iPassportReferenceData {
13
+ name: string;
14
+ email: string;
15
+ amount: number;
16
+ expirationDate: string;
17
+ additional: iPassportAdditional;
18
+ }
19
+ /** Passport request interface base */
20
+ export interface iPassportReference {
21
+ type: string;
22
+ data: iPassportReferenceData;
23
+ }
24
+ /** Global passport reference aPI */
25
+ export interface iGlobalPassport {
26
+ passport: iPassportReference;
27
+ contract: oContract;
28
+ date?: number;
29
+ }
30
+ /** ******************************** */
31
+ export interface iPassportResponseData {
32
+ name: string;
33
+ email: string;
34
+ amount: number;
35
+ expirationDate: string;
36
+ additional: iPassportAdditional;
37
+ }
38
+ export interface iPassportReferenceCenters {
39
+ name: string;
40
+ logo: string;
41
+ }
42
+ export interface iPassportReferenceRes {
43
+ reference: string;
44
+ centers: iPassportReferenceCenters[];
45
+ centerId: number;
46
+ barcode: string;
47
+ }
48
+ /** Passport response interface base */
49
+ export interface iPassportResponse {
50
+ type: string;
51
+ data: iPassportResponseData;
52
+ message: string;
53
+ references: iPassportReference[];
54
+ }
55
+ /** ******************************** */
@@ -0,0 +1,25 @@
1
+ import { eRoles } from "./oGlobal";
2
+ import { WritableSignal } from "@angular/core";
3
+ export interface iUser {
4
+ pUser: oUser;
5
+ getAllUsers(): void;
6
+ editUser(user: oUser): void;
7
+ deleteUser(user: oUser): void;
8
+ }
9
+ export interface oUser {
10
+ id: string;
11
+ username: string;
12
+ name: string;
13
+ password: string;
14
+ role: eRoles;
15
+ lastLogin?: number;
16
+ createdAt?: number;
17
+ access_token: string;
18
+ }
19
+ export interface iServiceUser {
20
+ users: WritableSignal<oUser[]>;
21
+ getAllUsersServer(): void;
22
+ createUser(o: oUser): void;
23
+ updateUser(o: oUser): void;
24
+ deleteUser(id: string): void;
25
+ }