@cbm-common/cbm-types 0.0.171 → 0.0.172

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.
@@ -0,0 +1,68 @@
1
+ export declare namespace CbmProviderContactModel {
2
+ interface ListParams {
3
+ provider_id: string;
4
+ identification_number?: string;
5
+ full_name?: string;
6
+ }
7
+ interface ListResponse {
8
+ success: boolean;
9
+ data: ListResponse.Data[];
10
+ }
11
+ namespace ListResponse {
12
+ interface Data {
13
+ _id: string;
14
+ company_id: string;
15
+ provider_id: string;
16
+ identification_number: string;
17
+ full_name: string;
18
+ phone_code: string;
19
+ cellphone: string;
20
+ email: string[];
21
+ enabled: boolean;
22
+ deleted: boolean;
23
+ created_user: string;
24
+ created_at: number;
25
+ updated_at: number;
26
+ updated_user: string;
27
+ }
28
+ }
29
+ interface GetOneResponse {
30
+ success: boolean;
31
+ data: GetOneResponse.Data;
32
+ }
33
+ namespace GetOneResponse {
34
+ interface Data {
35
+ _id: string;
36
+ company_id: string;
37
+ provider_id: string;
38
+ identification_number: string;
39
+ full_name: string;
40
+ phone_code: string;
41
+ cellphone: string;
42
+ email: string[];
43
+ enabled: boolean;
44
+ deleted: boolean;
45
+ created_user: string;
46
+ created_at: number;
47
+ }
48
+ }
49
+ interface UpdateBody {
50
+ details_provider_contact: UpdateBody.DetailsProviderContact[];
51
+ delete_records_contact: string[];
52
+ }
53
+ namespace UpdateBody {
54
+ interface DetailsProviderContact {
55
+ _id: string;
56
+ identification_number: string;
57
+ full_name: string;
58
+ phone_code: string;
59
+ cellphone: string;
60
+ email: string[];
61
+ }
62
+ }
63
+ interface ConfirmResponse {
64
+ success: boolean;
65
+ message: string;
66
+ data?: any;
67
+ }
68
+ }
@@ -0,0 +1,10 @@
1
+ import { Observable } from 'rxjs';
2
+ import { CbmProviderContactModel } from '../models/provider-contact.domain.model';
3
+ import { ICbmProviderContactInfrastructureRepository } from '../../infrastructure/repositories/provider-contact.infrastructure.repository';
4
+ export declare class CbmProviderContactRepository implements ICbmProviderContactInfrastructureRepository {
5
+ private readonly apiProviderContact;
6
+ constructor(apiProviderContact: ICbmProviderContactInfrastructureRepository);
7
+ list(request: CbmProviderContactModel.ListParams): Observable<CbmProviderContactModel.ListResponse>;
8
+ getOne(_id: string): Observable<CbmProviderContactModel.GetOneResponse>;
9
+ update(_id: string, request: CbmProviderContactModel.UpdateBody): Observable<CbmProviderContactModel.ConfirmResponse>;
10
+ }
@@ -0,0 +1,7 @@
1
+ import { Observable } from 'rxjs';
2
+ import { CbmProviderContactModel } from '../../domain/models/provider-contact.domain.model';
3
+ export interface ICbmProviderContactInfrastructureRepository {
4
+ list(request: CbmProviderContactModel.ListParams): Observable<CbmProviderContactModel.ListResponse>;
5
+ getOne(_id: string): Observable<CbmProviderContactModel.GetOneResponse>;
6
+ update(_id: string, request: CbmProviderContactModel.UpdateBody): Observable<CbmProviderContactModel.ConfirmResponse>;
7
+ }
@@ -0,0 +1,12 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { ICbmProviderContactInfrastructureRepository } from '../repositories/provider-contact.infrastructure.repository';
4
+ import { CbmProviderContactModel } from '../../domain/models/provider-contact.domain.model';
5
+ export declare class CbmProviderContactInfrastructureService implements ICbmProviderContactInfrastructureRepository {
6
+ private readonly http;
7
+ constructor(http: HttpClient);
8
+ private readonly url;
9
+ list(request: CbmProviderContactModel.ListParams): Observable<CbmProviderContactModel.ListResponse>;
10
+ getOne(_id: string): Observable<CbmProviderContactModel.GetOneResponse>;
11
+ update(_id: string, request: CbmProviderContactModel.UpdateBody): Observable<CbmProviderContactModel.ConfirmResponse>;
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cbm-common/cbm-types",
3
- "version": "0.0.171",
3
+ "version": "0.0.172",
4
4
  "main": "index.js",
5
5
  "types": "public-api.d.ts",
6
6
  "exports": {