@cbm-common/cbm-types 0.0.47 → 0.0.49
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/lib/domain/models/client-credit-line.domain.models.d.ts +37 -0
- package/lib/domain/repositories/client-credit-line.domain.repository.d.ts +9 -0
- package/lib/infrastructure/repositories/client-credit-line.infrastructure.repository.d.ts +6 -0
- package/lib/infrastructure/services/client-credit-line.infrastructure.service.d.ts +11 -0
- package/lib/remotes/repositories/client-credit-line.repository.d.ts +3 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare namespace CbmClientCreditLineModel {
|
|
2
|
+
interface GetResponse {
|
|
3
|
+
success: boolean;
|
|
4
|
+
data: GetResponse.Data;
|
|
5
|
+
}
|
|
6
|
+
namespace GetResponse {
|
|
7
|
+
interface Data {
|
|
8
|
+
_id: string;
|
|
9
|
+
client_business_name: string;
|
|
10
|
+
client_trade_name: string;
|
|
11
|
+
credit_line: string;
|
|
12
|
+
balance: number;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
interface GetFullCreditLineInfo {
|
|
16
|
+
success: boolean;
|
|
17
|
+
message: string;
|
|
18
|
+
data: GetFullCreditLineInfo.Data;
|
|
19
|
+
}
|
|
20
|
+
namespace GetFullCreditLineInfo {
|
|
21
|
+
interface Data {
|
|
22
|
+
_id: string;
|
|
23
|
+
client_business_name: string;
|
|
24
|
+
client_trade_name: string;
|
|
25
|
+
client_document_number: string;
|
|
26
|
+
client_address: string;
|
|
27
|
+
client_cellphone: string;
|
|
28
|
+
client_emails: string[];
|
|
29
|
+
credit_line: number;
|
|
30
|
+
credit_used: number;
|
|
31
|
+
total_documents: number;
|
|
32
|
+
total_checks: number;
|
|
33
|
+
balance: number;
|
|
34
|
+
total_down_payment: number;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CbmClientCreditLineModel } from "../models/client-credit-line.domain.models";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { ICbmClientCreditLineInfrastructureRepository } from "../../infrastructure/repositories/client-credit-line.infrastructure.repository";
|
|
4
|
+
export declare class CbmClientCreditLineRepository implements ICbmClientCreditLineInfrastructureRepository {
|
|
5
|
+
private service;
|
|
6
|
+
constructor(service: ICbmClientCreditLineInfrastructureRepository);
|
|
7
|
+
getAvailableCredit(id: string): Observable<CbmClientCreditLineModel.GetResponse>;
|
|
8
|
+
getFullCreditLineInfo(id: string): Observable<CbmClientCreditLineModel.GetFullCreditLineInfo>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { CbmClientCreditLineModel } from "../../domain/models/client-credit-line.domain.models";
|
|
3
|
+
export interface ICbmClientCreditLineInfrastructureRepository {
|
|
4
|
+
getAvailableCredit(id: string): Observable<CbmClientCreditLineModel.GetResponse>;
|
|
5
|
+
getFullCreditLineInfo(id: string): Observable<CbmClientCreditLineModel.GetFullCreditLineInfo>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CbmClientCreditLineModel } from "../../domain/models/client-credit-line.domain.models";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { HttpClient } from "@angular/common/http";
|
|
4
|
+
import { ICbmClientCreditLineInfrastructureRepository } from "../repositories/client-credit-line.infrastructure.repository";
|
|
5
|
+
export declare class CbmClientCreditLineInfrastructureService implements ICbmClientCreditLineInfrastructureRepository {
|
|
6
|
+
private readonly http;
|
|
7
|
+
constructor(http: HttpClient);
|
|
8
|
+
private readonly url;
|
|
9
|
+
getAvailableCredit(id: string): Observable<CbmClientCreditLineModel.GetResponse>;
|
|
10
|
+
getFullCreditLineInfo(id: string): Observable<CbmClientCreditLineModel.GetFullCreditLineInfo>;
|
|
11
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -359,3 +359,7 @@ export * from './lib/domain/models/transactions-purchases.domain.model';
|
|
|
359
359
|
|
|
360
360
|
//#region relationship movements repository
|
|
361
361
|
export * from './lib/components/relationship-movements/relationship-movements';
|
|
362
|
+
|
|
363
|
+
//#region client credit line repository
|
|
364
|
+
export * from './lib/domain/repositories/client-credit-line.domain.repository';
|
|
365
|
+
export * from './lib/domain/models/client-credit-line.domain.models';
|