@cbm-common/cbm-types 0.0.39 → 0.0.41
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/service-group.domain.model.d.ts +109 -0
- package/lib/domain/repositories/service-group.domain.repository.d.ts +15 -0
- package/lib/infrastructure/repositories/service-group.infrastructure.repository.d.ts +11 -0
- package/lib/infrastructure/services/service-group.infrastructure.service.d.ts +15 -0
- package/package.json +1 -1
- package/public-api.d.ts +5 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export declare namespace CbmServiceGroupModel {
|
|
2
|
+
interface ListParams {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
name?: string;
|
|
5
|
+
service_group_id?: string;
|
|
6
|
+
}
|
|
7
|
+
interface ListResponse {
|
|
8
|
+
data?: ListResponse.Data[];
|
|
9
|
+
success?: boolean;
|
|
10
|
+
}
|
|
11
|
+
namespace ListResponse {
|
|
12
|
+
interface Data {
|
|
13
|
+
_id: string;
|
|
14
|
+
company_id?: string;
|
|
15
|
+
service_group_id?: string;
|
|
16
|
+
initial?: boolean;
|
|
17
|
+
level?: number;
|
|
18
|
+
name?: string;
|
|
19
|
+
enabled?: boolean;
|
|
20
|
+
created_user?: string;
|
|
21
|
+
created_at?: number;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
interface SaveBody {
|
|
25
|
+
service_group_id?: string;
|
|
26
|
+
initial?: boolean;
|
|
27
|
+
level?: number;
|
|
28
|
+
name?: string;
|
|
29
|
+
}
|
|
30
|
+
interface GetOneResponse {
|
|
31
|
+
data?: GetOneResponse.Data;
|
|
32
|
+
success?: boolean;
|
|
33
|
+
}
|
|
34
|
+
namespace GetOneResponse {
|
|
35
|
+
interface Data {
|
|
36
|
+
_id?: string;
|
|
37
|
+
company_id?: string;
|
|
38
|
+
service_group_id?: string;
|
|
39
|
+
initial?: boolean;
|
|
40
|
+
level?: number;
|
|
41
|
+
name?: string;
|
|
42
|
+
enabled?: boolean;
|
|
43
|
+
created_user?: string;
|
|
44
|
+
created_at?: number;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
interface UpdateBody {
|
|
48
|
+
service_group_id?: string;
|
|
49
|
+
initial?: boolean;
|
|
50
|
+
level?: number;
|
|
51
|
+
name?: string;
|
|
52
|
+
}
|
|
53
|
+
interface ChangeStatusBody {
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
disabled_reason?: string;
|
|
56
|
+
}
|
|
57
|
+
interface ListAsTreeParams {
|
|
58
|
+
name?: string;
|
|
59
|
+
}
|
|
60
|
+
interface ListAsTreeResponse {
|
|
61
|
+
success: boolean;
|
|
62
|
+
data: ListAsTreeResponse.Children;
|
|
63
|
+
}
|
|
64
|
+
namespace ListAsTreeResponse {
|
|
65
|
+
type Children = Child[];
|
|
66
|
+
interface Child {
|
|
67
|
+
label: string;
|
|
68
|
+
value: Group | Category;
|
|
69
|
+
children?: Children;
|
|
70
|
+
}
|
|
71
|
+
interface Group {
|
|
72
|
+
_id: string;
|
|
73
|
+
company_id?: string;
|
|
74
|
+
initial?: boolean;
|
|
75
|
+
level?: number;
|
|
76
|
+
name?: string;
|
|
77
|
+
enabled?: boolean;
|
|
78
|
+
deleted?: boolean;
|
|
79
|
+
created_user?: string;
|
|
80
|
+
created_at?: number;
|
|
81
|
+
disabled_reason?: string;
|
|
82
|
+
updated_at?: number;
|
|
83
|
+
updated_user?: string;
|
|
84
|
+
}
|
|
85
|
+
interface Category {
|
|
86
|
+
_id: string;
|
|
87
|
+
company_id?: string;
|
|
88
|
+
name?: string;
|
|
89
|
+
nomenclature?: string;
|
|
90
|
+
last_number?: number;
|
|
91
|
+
separator?: string;
|
|
92
|
+
income_account_id?: string;
|
|
93
|
+
discount_account_id?: string;
|
|
94
|
+
return_account_id?: string;
|
|
95
|
+
service_group_id?: string;
|
|
96
|
+
enabled?: boolean;
|
|
97
|
+
deleted?: boolean;
|
|
98
|
+
created_user?: string;
|
|
99
|
+
created_at?: number;
|
|
100
|
+
updated_at?: number;
|
|
101
|
+
updated_user?: string;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
interface ConfirmResponse {
|
|
105
|
+
success: boolean;
|
|
106
|
+
message: string;
|
|
107
|
+
data?: any;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { CbmServiceGroupModel } from "../models/service-group.domain.model";
|
|
3
|
+
import { ICbmServiceGroupRepository } from "../../infrastructure/repositories/service-group.infrastructure.repository";
|
|
4
|
+
import { CbmServiceGroupService } from "../../infrastructure/services/service-group.infrastructure.service";
|
|
5
|
+
export declare class CbmServiceGroupRepository implements ICbmServiceGroupRepository {
|
|
6
|
+
private service;
|
|
7
|
+
constructor(service: CbmServiceGroupService);
|
|
8
|
+
list(params: CbmServiceGroupModel.ListParams): Observable<CbmServiceGroupModel.ListResponse>;
|
|
9
|
+
getOne(id: string): Observable<CbmServiceGroupModel.GetOneResponse>;
|
|
10
|
+
save(data: CbmServiceGroupModel.SaveBody): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
11
|
+
update(id: string, data: CbmServiceGroupModel.UpdateBody): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
12
|
+
changeStatus(id: string, data: CbmServiceGroupModel.ChangeStatusBody): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
13
|
+
delete(id: string): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
14
|
+
listAsTree(params: CbmServiceGroupModel.ListAsTreeParams): Observable<CbmServiceGroupModel.ListAsTreeResponse>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { CbmServiceGroupModel } from "../../domain/models/service-group.domain.model";
|
|
3
|
+
export interface ICbmServiceGroupRepository {
|
|
4
|
+
list(params: CbmServiceGroupModel.ListParams): Observable<CbmServiceGroupModel.ListResponse>;
|
|
5
|
+
getOne(id: string): Observable<CbmServiceGroupModel.GetOneResponse>;
|
|
6
|
+
save(data: CbmServiceGroupModel.SaveBody): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
7
|
+
update(id: string, data: CbmServiceGroupModel.UpdateBody): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
8
|
+
changeStatus(id: string, data: CbmServiceGroupModel.ChangeStatusBody): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
9
|
+
delete(id: string): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
10
|
+
listAsTree(params: CbmServiceGroupModel.ListAsTreeParams): Observable<CbmServiceGroupModel.ListAsTreeResponse>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HttpClient } from "@angular/common/http";
|
|
2
|
+
import { CbmServiceGroupModel } from "../../domain/models/service-group.domain.model";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
export declare class CbmServiceGroupService {
|
|
5
|
+
private http;
|
|
6
|
+
constructor(http: HttpClient);
|
|
7
|
+
private readonly url;
|
|
8
|
+
list(params: CbmServiceGroupModel.ListParams): Observable<CbmServiceGroupModel.ListResponse>;
|
|
9
|
+
getOne(id: string): Observable<CbmServiceGroupModel.GetOneResponse>;
|
|
10
|
+
save(data: CbmServiceGroupModel.SaveBody): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
11
|
+
update(id: string, data: CbmServiceGroupModel.UpdateBody): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
12
|
+
changeStatus(id: string, data: CbmServiceGroupModel.ChangeStatusBody): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
13
|
+
delete(id: string): Observable<CbmServiceGroupModel.ConfirmResponse>;
|
|
14
|
+
listAsTree(params: CbmServiceGroupModel.ListAsTreeParams): Observable<CbmServiceGroupModel.ListAsTreeResponse>;
|
|
15
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -290,7 +290,7 @@ export * from './lib/domain/models/sequence.domain.model';
|
|
|
290
290
|
|
|
291
291
|
// #region payment repository
|
|
292
292
|
export * from './lib/domain/repositories/payment-term.domain.repository';
|
|
293
|
-
export * from './lib/domain/models/payment-term.domain.model';
|
|
293
|
+
export * from './lib/domain/models/payment-term-repository.domain.model';
|
|
294
294
|
|
|
295
295
|
// #region retention settings sales repository
|
|
296
296
|
export * from './lib/domain/repositories/retention-settings-sales.domain.repository';
|
|
@@ -323,3 +323,7 @@ export * from './lib/domain/models/category.domain.model';
|
|
|
323
323
|
// #region service category repository
|
|
324
324
|
export * from './lib/domain/repositories/service-category.domain.repository';
|
|
325
325
|
export * from './lib/domain/models/service-category.domain.model';
|
|
326
|
+
|
|
327
|
+
// #region service group repository
|
|
328
|
+
export * from './lib/domain/repositories/service-group.domain.repository';
|
|
329
|
+
export * from './lib/domain/models/service-group.domain.model';
|