@cbm-common/cbm-types 0.0.112 → 0.0.114

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 (24) hide show
  1. package/lib/components/add-down-payment/add-down-payment.d.ts +23 -21
  2. package/lib/components/advanced-item-search-modal/advanced-item-search-modal.d.ts +5 -5
  3. package/lib/components/item-details/item-details.d.ts +23 -0
  4. package/lib/components/item-details/item-details.types.d.ts +18 -0
  5. package/lib/components/json-modal/json-modal.d.ts +1 -1
  6. package/lib/components/pms-add-charge/folios-modal/folios-modal.d.ts +25 -0
  7. package/lib/components/pms-add-charge/pms-add-charge.d.ts +26 -0
  8. package/lib/components/xml-modal/xml-modal.d.ts +1 -0
  9. package/lib/domain/models/general.domain.model.d.ts +4 -0
  10. package/lib/domain/models/item.domain.model.d.ts +46 -8
  11. package/lib/domain/models/room.domain.model.d.ts +43 -0
  12. package/lib/domain/models/sales-account.domain.model.d.ts +444 -0
  13. package/lib/domain/repositories/room.domain.repository.d.ts +8 -0
  14. package/lib/domain/repositories/sales-account.domain.repository.d.ts +11 -0
  15. package/lib/domain/services/general.domain.service.d.ts +2 -0
  16. package/lib/domain/services/item/find-item-code.domain.service.d.ts +15 -0
  17. package/lib/infrastructure/repositories/room.infrastructure.repository.d.ts +5 -0
  18. package/lib/infrastructure/repositories/sales-account.infrastructure.repository.d.ts +8 -0
  19. package/lib/infrastructure/services/room.infrastructure.service.d.ts +10 -0
  20. package/lib/infrastructure/services/sales-account.infrastructure.service.d.ts +13 -0
  21. package/lib/remotes/services/auth.service.d.ts +3 -0
  22. package/lib/remotes/services/web-socket.service.d.ts +4 -0
  23. package/lib/remotes/services.remote.d.ts +3 -0
  24. package/package.json +1 -1
@@ -3,8 +3,6 @@ import { FormControl, FormGroup } from '@angular/forms';
3
3
  import { ActivatedRoute, Router } from '@angular/router';
4
4
  import { Subject } from 'rxjs';
5
5
  import { CbmAccountModel } from '../../domain/models/account.domain.model';
6
- import { IBankConciliation } from '../../domain/models/bank-conciliation.domain.model';
7
- import { CbmBankMovementsModel } from '../../domain/models/bank-movements.domain.model';
8
6
  import { CbmBankModel } from '../../domain/models/bank.domain.model';
9
7
  import { CbmClientBranchModel } from '../../domain/models/client-branch.domain.model';
10
8
  import { CbmClientModel } from '../../domain/models/client.domain.model';
@@ -58,6 +56,10 @@ export declare class CbmAddDownPayment {
58
56
  private readonly costCenterRepository;
59
57
  private readonly paymentTermRepository;
60
58
  constructor(financialBankRepository: CbmFinancialBankRepository, accountRepository: CbmAccountRepository, router: Router, route: ActivatedRoute, destroyRef: DestroyRef, bankMovementsRepository: CbmBankMovementsRepository, relationshipMovements: RelationshipMovementsConfig, bankConciliationRepository: BankConciliationDomainRepository, viewContainerRef: ViewContainerRef, notificationService: CbmNotificationService, authService: CbmAuthService, downPaymentRepository: DownPaymentDomainRepository, clientRepository: CbmClientDomainRepository, sellerRepository: CbmSellerDomainRepository, bankRepository: CbmBankRepository, clientBranchRepository: CbmClientBranchDomainRepository, costCenterRepository: CbmCostCenterRepository, paymentTermRepository: CbmPaymentTermRepository);
59
+ 'hidden-acttions-btns': import("@angular/core").InputSignal<boolean>;
60
+ 'hiiden-title': import("@angular/core").InputSignal<boolean>;
61
+ protected hiddenActtionsBtns: import("@angular/core").Signal<boolean>;
62
+ protected hiddenTitle: import("@angular/core").Signal<boolean>;
61
63
  relationShipMovementsRef: import("@angular/core").Signal<CbmRelationshipMovementsComponent | undefined>;
62
64
  modalConfirm: import("@angular/core").Signal<CbmModalConfirmComponent>;
63
65
  relationshipMovementsTemplate: import("@angular/core").Signal<TemplateRef<any>>;
@@ -159,35 +161,35 @@ export declare class CbmAddDownPayment {
159
161
  }): boolean;
160
162
  private resetControls;
161
163
  private updateControlsBasedOnPaymentTerm;
162
- updateFinancialsBank(value: any): void;
163
- handleCode01(): void;
164
- handleCode02(): void;
165
- handleCode03(): void;
166
- handleCode04(): void;
167
- handleCode05(): void;
168
- handleCode06(): void;
169
- handleDefaultCode(): void;
164
+ private updateFinancialsBank;
165
+ private handleCode01;
166
+ private handleCode02;
167
+ private handleCode03;
168
+ private handleCode04;
169
+ private handleCode05;
170
+ private handleCode06;
171
+ private handleDefaultCode;
170
172
  validateFormDownPayment(saveOption: TSaveOptions): Promise<void>;
171
173
  saveDownPayment(callback: (newDownPaymentId: string) => void): void;
172
174
  addDownPaymentAndNew(): void;
173
175
  addDownPaymentAndView(): void;
174
176
  addDownPaymentAndClose(): void;
175
- fetchClients(searchText?: string): void;
176
- fetchSellers(searchText?: string): void;
177
- fetchAccounts(searchText?: string): void;
178
- fetchBanks(searchText?: string): void;
179
- fetchClientBranch(searchText?: string): void;
180
- fetchCostCenters(searchText?: string): void;
181
- fetchFinancialBanks(searchText?: string): void;
182
- fetchPaymentTerms(searchText?: string): void;
177
+ protected fetchClients(searchText?: string): void;
178
+ protected fetchSellers(searchText?: string): void;
179
+ protected fetchAccounts(searchText?: string): void;
180
+ protected fetchBanks(searchText?: string): void;
181
+ protected fetchClientBranch(searchText?: string): void;
182
+ private fetchCostCenters;
183
+ private fetchFinancialBanks;
184
+ private fetchPaymentTerms;
183
185
  openModal(): void;
184
186
  onModalConfirm(): void;
185
187
  onModalCancel(): void;
186
- validateOperation(params: CbmBankMovementsModel.ValidationOperationParams): void;
188
+ private validateOperation;
187
189
  openRelationShipMovementsModal(): void;
188
190
  closeRelationModal(): void;
189
- findAccountingMovements(): Promise<IBankConciliation.FindAccountingMovementsResponse | undefined>;
190
- redirectTo(data: {
191
+ private findAccountingMovements;
192
+ protected redirectTo(data: {
191
193
  collection_origin_id: string;
192
194
  collection_origin_name: string;
193
195
  event_module: string;
@@ -1,7 +1,7 @@
1
- import { CbmAlternativeItemModel } from "../../domain/models/alternative-item.domain.model";
2
- import { CbmItemModel } from "../../domain/models/item.domain.model";
3
- import { CbmPriceListModel } from "../../domain/models/price-list.domain.model";
4
- import { CbmItemDomainRepository } from "../../domain/repositories/item.domain.repository";
1
+ import { CbmAlternativeItemModel } from '../../domain/models/alternative-item.domain.model';
2
+ import { CbmItemModel } from '../../domain/models/item.domain.model';
3
+ import { CbmPriceListModel } from '../../domain/models/price-list.domain.model';
4
+ import { CbmItemDomainRepository } from '../../domain/repositories/item.domain.repository';
5
5
  export declare class CbmAdvancedItemSearchModal {
6
6
  private itemRepository;
7
7
  hidePricelistFilter: import("@angular/core").InputSignal<boolean | undefined>;
@@ -10,7 +10,7 @@ export declare class CbmAdvancedItemSearchModal {
10
10
  hideTable: import("@angular/core").InputSignal<boolean>;
11
11
  addedItemsIds: import("@angular/core").InputSignal<string[]>;
12
12
  codeFilter: import("@angular/core").WritableSignal<string | undefined>;
13
- isOnlyOneItemCoincidence: import("@angular/core").OutputEmitterRef<CbmItemModel.ListResponse.Item | undefined>;
13
+ isOnlyOneItemCoincidence: import("@angular/core").OutputEmitterRef<CbmItemModel.GetOneByCodeResponse.Data | undefined>;
14
14
  addSelectedPriceList: import("@angular/core").OutputEmitterRef<CbmPriceListModel.ListResponse.Data>;
15
15
  open: import("@angular/core").OutputEmitterRef<void>;
16
16
  close: import("@angular/core").OutputEmitterRef<void>;
@@ -0,0 +1,23 @@
1
+ import { DestroyRef, OnInit } from '@angular/core';
2
+ import { FormArray, FormGroup } from '@angular/forms';
3
+ import { PaginatedListService } from '@cbm-common/data-access';
4
+ import { Subject } from 'rxjs';
5
+ import { CbmItemDomainRepository } from '../../domain/repositories/item.domain.repository';
6
+ import { CbmNotificationService } from '../../remotes/services.remote';
7
+ import { IItemDetails } from './item-details.types';
8
+ import { CbmPriceListModel } from '../../domain/models/price-list.domain.model';
9
+ export declare class ItemDetails implements OnInit {
10
+ private readonly destroyRef;
11
+ private readonly itemRepository;
12
+ private readonly notificationService;
13
+ constructor(destroyRef: DestroyRef, itemRepository: CbmItemDomainRepository, notificationService: CbmNotificationService);
14
+ 'price-list': import("@angular/core").InputSignal<Partial<CbmPriceListModel.ListResponse.Data>>;
15
+ loadItems$: Subject<void>;
16
+ itemDetailsFormArray: FormArray<FormGroup<IItemDetails.FormGroupDetail>>;
17
+ items$: PaginatedListService<import("../../domain/models/item.domain.model").CbmItemModel.ListResponse, import("../../domain/models/item.domain.model").CbmItemModel.ListResponse.Item[]>;
18
+ priceList: import("@angular/core").Signal<Partial<CbmPriceListModel.ListResponse.Data>>;
19
+ ngOnInit(): void;
20
+ subObservers(): void;
21
+ addNewRow(): void;
22
+ resetItem(formGroup: FormGroup<IItemDetails.FormGroupDetail>): void;
23
+ }
@@ -0,0 +1,18 @@
1
+ import { FormControl } from "@angular/forms";
2
+ import { CbmCostCenterModel, CbmItemModel } from "@cbm-common/cbm-types";
3
+ import { CbmSalePriceModel } from "@cbm-common/cbm-types/lib/domain/models/sale-price.domain.model";
4
+ import { FindItemCodeService } from "../../domain/services/item/find-item-code.domain.service";
5
+ export declare namespace IItemDetails {
6
+ interface FormGroupDetail {
7
+ code: FormControl<string>;
8
+ item: FormControl<Partial<CbmItemModel.ListResponse.Item> | null>;
9
+ amount: FormControl<string>;
10
+ price: FormControl<string>;
11
+ discount_percentage: FormControl<string>;
12
+ discount: FormControl<string>;
13
+ subtotal: FormControl<number>;
14
+ price_type: FormControl<Partial<CbmSalePriceModel.GetResponse.Data> | null>;
15
+ cost_center: FormControl<Partial<CbmCostCenterModel.ListResponse.Data> | null>;
16
+ findItemByCode$: FormControl<FindItemCodeService | null>;
17
+ }
18
+ }
@@ -1,4 +1,4 @@
1
- import { CbmNotificationService } from "../../domain/services/notification/notification.service";
1
+ import { CbmNotificationService } from '../../domain/services/notification/notification.service';
2
2
  export declare class CbmJsonModalComponent {
3
3
  private notificationService;
4
4
  isOpen: import("@angular/core").InputSignal<boolean | undefined>;
@@ -0,0 +1,25 @@
1
+ import { DestroyRef } from '@angular/core';
2
+ import { IGeneral } from '../../../domain/models/general.domain.model';
3
+ import { CbmSalesAccountRepository } from '../../../domain/repositories/sales-account.domain.repository';
4
+ import { CbmNotificationService } from '../../../remotes/services.remote';
5
+ import { CbmSalesAccountModel } from '../../../domain/models/sales-account.domain.model';
6
+ import { PaginatedListService } from '@cbm-common/data-access';
7
+ import { GeneralDomainService } from '../../../domain/services/general.domain.service';
8
+ export declare class FoliosModal implements IGeneral.ModalRef {
9
+ private readonly destroyRef;
10
+ private readonly salesAccountRepository;
11
+ private readonly notificationService;
12
+ private readonly generalService;
13
+ constructor(destroyRef: DestroyRef, salesAccountRepository: CbmSalesAccountRepository, notificationService: CbmNotificationService, generalService: GeneralDomainService);
14
+ 'modal-id': import("@angular/core").InputSignal<string>;
15
+ 'room-id': import("@angular/core").InputSignal<string | null>;
16
+ 'on-selected-folio': import("@angular/core").OutputEmitterRef<CbmSalesAccountModel.ListResponse.Item>;
17
+ modalId: import("@angular/core").Signal<string>;
18
+ roomId: import("@angular/core").Signal<string | null>;
19
+ folios$: PaginatedListService<CbmSalesAccountModel.ListResponse, CbmSalesAccountModel.ListResponse.Item[]>;
20
+ transactionTypes: Record<string, string>;
21
+ loadFolios(): void;
22
+ openModal(): void;
23
+ closeModal(): void;
24
+ selectFolio(folio: CbmSalesAccountModel.ListResponse.Item): void;
25
+ }
@@ -0,0 +1,26 @@
1
+ import { DestroyRef, OnInit } from '@angular/core';
2
+ import { FormControl, FormGroup } from '@angular/forms';
3
+ import { PaginatedListService } from '@cbm-common/data-access';
4
+ import { CbmRoomModel } from '../../domain/models/room.domain.model';
5
+ import { CbmRoomRepository } from '../../domain/repositories/room.domain.repository';
6
+ import { FoliosModal } from './folios-modal/folios-modal';
7
+ import { CbmSalesAccountModel } from '../../domain/models/sales-account.domain.model';
8
+ import { CbmPriceListModel } from '@cbm-common/cbm-types';
9
+ export declare class CbmPmsAddCharge implements OnInit {
10
+ private readonly destroyRef;
11
+ private readonly roomRepository;
12
+ constructor(destroyRef: DestroyRef, roomRepository: CbmRoomRepository);
13
+ chargeFormGroup: FormGroup<{
14
+ service_type: FormControl<number | null>;
15
+ charge_type: FormControl<number | null>;
16
+ room: FormControl<Partial<CbmRoomModel.RoomStateResponse.Items> | null>;
17
+ }>;
18
+ protected rooms$: PaginatedListService<CbmRoomModel.RoomStateResponse, CbmRoomModel.RoomStateResponse.Items[]>;
19
+ foliosRoomId: import("@angular/core").WritableSignal<string | null>;
20
+ selectedFolio: import("@angular/core").WritableSignal<CbmSalesAccountModel.ListResponse.Item | null>;
21
+ priceList: import("@angular/core").Signal<Partial<CbmPriceListModel.ListResponse.Data>>;
22
+ foliosModalRef: import("@angular/core").Signal<FoliosModal>;
23
+ ngOnInit(): void;
24
+ private initRooms;
25
+ subObservers(): void;
26
+ }
@@ -12,6 +12,7 @@ export declare class CbmXmlModalComponent {
12
12
  copy: import("@angular/core").OutputEmitterRef<string>;
13
13
  download: import("@angular/core").OutputEmitterRef<Blob>;
14
14
  isVisible: import("@angular/core").WritableSignal<boolean>;
15
+ private originalBodyOverflow;
15
16
  xmlCode: import("@angular/core").Signal<string>;
16
17
  themeClasses: import("@angular/core").Signal<"hljs-dark-theme" | "hljs-light-theme">;
17
18
  constructor(notificationService: CbmNotificationService);
@@ -4,4 +4,8 @@ export declare namespace IGeneral {
4
4
  message: string;
5
5
  data?: any;
6
6
  }
7
+ interface ModalRef {
8
+ openModal(): void;
9
+ closeModal(): void;
10
+ }
7
11
  }
@@ -800,6 +800,16 @@ export declare namespace CbmItemModel {
800
800
  properties?: Data.Property[];
801
801
  unit_measure_price_lists?: Data.UnitMeasurePriceList[];
802
802
  unit_measures?: Data.UnitMeasure[];
803
+ user_id?: string;
804
+ unit_measure_group_name?: string;
805
+ deleted?: boolean;
806
+ deleted_at?: number;
807
+ unit_cost_kardex?: number;
808
+ total_items?: number;
809
+ unit_measure_name?: string;
810
+ manufacturer_name?: string;
811
+ purchases_unit_measure_name?: string;
812
+ sales_unit_measure_name?: string;
803
813
  }
804
814
  namespace Data {
805
815
  interface Category {
@@ -845,6 +855,15 @@ export declare namespace CbmItemModel {
845
855
  item_id?: string;
846
856
  base_price?: number;
847
857
  tax_price?: number;
858
+ base_prices_list_id?: string;
859
+ independent?: boolean;
860
+ updated_at?: number;
861
+ updated_user?: string;
862
+ disabled_at?: number;
863
+ disabled_reason?: string;
864
+ disabled_user?: string;
865
+ disabled_user_id?: string;
866
+ user_id?: string;
848
867
  }
849
868
  interface Warehouse {
850
869
  _id: string;
@@ -860,20 +879,32 @@ export declare namespace CbmItemModel {
860
879
  created_user?: string;
861
880
  updated_at?: number;
862
881
  updated_user?: string;
863
- warehouse?: Warehouse.Warehouse;
882
+ company_id?: string;
883
+ warehouse_data?: Warehouse.Data;
884
+ warehouse_name?: string;
864
885
  }
865
886
  namespace Warehouse {
866
- interface Warehouse {
867
- _id: string;
887
+ interface Data {
888
+ _id?: string;
868
889
  company_id?: string;
869
- company_branch_id?: string;
890
+ user_id?: string;
870
891
  code?: string;
871
892
  name?: string;
872
893
  address?: string;
873
894
  enabled?: boolean;
874
- delete?: boolean;
875
- created_at?: number;
895
+ deleted?: boolean;
876
896
  created_user?: string;
897
+ created_at?: number;
898
+ disabled_at?: number;
899
+ disabled_reason?: string;
900
+ disabled_user?: string;
901
+ disabled_user_id?: string;
902
+ enabled_at?: number;
903
+ enabled_user?: string;
904
+ enabled_user_id?: string;
905
+ updated_at?: number;
906
+ updated_user?: string;
907
+ updated_user_id?: string;
877
908
  }
878
909
  }
879
910
  interface Property {
@@ -886,7 +917,7 @@ export declare namespace CbmItemModel {
886
917
  updated_user?: string;
887
918
  }
888
919
  interface UnitMeasurePriceList {
889
- _id: string;
920
+ _id?: string;
890
921
  item_id?: string;
891
922
  unit_measure_id?: string;
892
923
  price_list_id?: string;
@@ -895,14 +926,21 @@ export declare namespace CbmItemModel {
895
926
  tax_price?: number;
896
927
  created_user?: string;
897
928
  created_at?: number;
929
+ price_list_name?: string;
930
+ price_list_factor?: number;
931
+ unit_measure_name?: string;
932
+ unit_measure_code?: string;
933
+ unit_measure_group_amount?: number;
898
934
  }
899
935
  interface UnitMeasure {
900
- _id: string;
936
+ _id?: string;
901
937
  item_id?: string;
902
938
  unit_measure_id?: string;
903
939
  barcode?: string;
904
940
  created_user?: string;
905
941
  created_at?: number;
942
+ unit_measure_name?: string;
943
+ unit_measure_code?: string;
906
944
  }
907
945
  }
908
946
  }
@@ -0,0 +1,43 @@
1
+ export declare namespace CbmRoomModel {
2
+ interface RoomStateParams {
3
+ page: number;
4
+ size: number;
5
+ date_consultation?: number;
6
+ room_name?: string;
7
+ }
8
+ interface RoomStateResponse {
9
+ success: boolean;
10
+ pageNum: number;
11
+ pageSize: number;
12
+ pages: number;
13
+ total: number;
14
+ items: RoomStateResponse.Items[];
15
+ }
16
+ namespace RoomStateResponse {
17
+ interface Items {
18
+ _id: string;
19
+ company_id?: string;
20
+ company_NIF: string;
21
+ company_address: string;
22
+ company_trade_name: string;
23
+ company_business_name: string;
24
+ country_id: string;
25
+ country_code: string;
26
+ country_name: string;
27
+ country_short_name: string;
28
+ period_id: string;
29
+ period_year: string;
30
+ name?: string;
31
+ floor_id?: string;
32
+ room_type_id?: string;
33
+ room_type_name: string;
34
+ enabled?: boolean;
35
+ created_user?: string;
36
+ created_at?: number;
37
+ state_room?: string;
38
+ state_room_provided?: string;
39
+ updated_at?: number;
40
+ updated_user?: string;
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,444 @@
1
+ export declare namespace CbmSalesAccountModel {
2
+ export type DetailType = 'item' | 'service' | 'kit' | 'outsourcing_service';
3
+ type TTypeEstablishment = 'matrix' | 'branch';
4
+ export interface ListParams {
5
+ page: number;
6
+ size: number;
7
+ balance_amount?: number;
8
+ company_branch_id?: string;
9
+ date_begin?: number;
10
+ date_end?: number;
11
+ document_number?: string;
12
+ seller_id?: string;
13
+ user_id?: string;
14
+ client_branch_id?: string;
15
+ client_id?: string;
16
+ enabled?: boolean;
17
+ check_in_id?: string;
18
+ room_id?: string;
19
+ }
20
+ export interface ListResponse {
21
+ success: boolean;
22
+ pageNum: number;
23
+ pageSize: number;
24
+ pages: number;
25
+ total: number;
26
+ items: ListResponse.Item[];
27
+ }
28
+ export namespace ListResponse {
29
+ interface Item {
30
+ _id: string;
31
+ company_id: string;
32
+ company_NIF: string;
33
+ guest_last_name: string;
34
+ guest_name: string;
35
+ company_address: string;
36
+ company_trade_name: string;
37
+ company_business_name: string;
38
+ company_branch_id: string;
39
+ company_branch_identification_number: string;
40
+ company_branch_trade_name: string;
41
+ company_branch_logo: string;
42
+ company_branch_address: string;
43
+ company_branch_email: string;
44
+ company_branch_cellphone: string;
45
+ company_branch_phone: string;
46
+ country_id: string;
47
+ country_code: string;
48
+ country_name: string;
49
+ country_short_name: string;
50
+ period_id: string;
51
+ period_year: string;
52
+ default_price_list_id: string;
53
+ default_price_list_name: string;
54
+ default_price_list_type: string;
55
+ default_cost_center_id: string;
56
+ default_cost_center_code: string;
57
+ default_cost_center_name: string;
58
+ default_discount_rate: number;
59
+ document_nomenclature: string;
60
+ document_number: string;
61
+ document_date: number;
62
+ document_type: string;
63
+ generation_type: string;
64
+ state: string;
65
+ booking_id: string;
66
+ booking_document_nomenclature: string;
67
+ booking_document_number: string;
68
+ tax_base: number;
69
+ discount: number;
70
+ service: number;
71
+ tax_base_iva: number;
72
+ tax_base_iva_rate_0: number;
73
+ tax_base_iva_exempt: number;
74
+ tax_base_iva_not_subject: number;
75
+ tax_base_irbpnr: number;
76
+ rate_iva: number;
77
+ tax_base_ice: number;
78
+ tax_iva: number;
79
+ code_iva: string;
80
+ tax_irbpnr: number;
81
+ tax_ice: number;
82
+ total: number;
83
+ commentary: string;
84
+ enabled: boolean;
85
+ user_id: string;
86
+ created_at: number;
87
+ created_user: string;
88
+ client_id: string;
89
+ client_business_name: string;
90
+ client_trade_name: string;
91
+ client_document_number: string;
92
+ client_credit_application: boolean;
93
+ client_document_type_id: string;
94
+ client_document_type_name: string;
95
+ client_document_type_code: string;
96
+ client_category_id: string;
97
+ client_category_name: string;
98
+ client_price_list_id?: string;
99
+ client_price_list_code?: string;
100
+ client_price_list_name?: string;
101
+ client_branch_id: string;
102
+ client_branch_code: string;
103
+ client_branch_name: string;
104
+ client_branch_address: string;
105
+ client_branch_email: string[];
106
+ client_branch_phone_code?: string;
107
+ client_branch_phone?: string;
108
+ client_branch_cellphone?: string;
109
+ client_branch_type_establishment: string;
110
+ client_branch_province_id?: string;
111
+ client_branch_province_code?: string;
112
+ client_branch_province_name?: string;
113
+ client_branch_canton_id?: string;
114
+ client_branch_canton_code?: string;
115
+ client_branch_canton_name?: string;
116
+ client_branch_parish_id?: string;
117
+ client_branch_parish_code?: string;
118
+ client_branch_parish_name?: string;
119
+ client_branch_longitude?: number;
120
+ client_branch_latitude?: number;
121
+ client_branch_seller_id: string;
122
+ client_branch_seller_identification_number: string;
123
+ client_branch_seller_full_name: string;
124
+ client_branch_seller_address: string;
125
+ client_branch_seller_email?: string[];
126
+ client_branch_seller_cellphone?: string;
127
+ client_branch_contact_id?: string;
128
+ client_branch_contact_identification_number?: string;
129
+ client_branch_contact_full_name?: string;
130
+ client_branch_contact_cellphone?: string;
131
+ client_branch_contact_email?: string[];
132
+ }
133
+ }
134
+ export interface GetOneResponse {
135
+ success: boolean;
136
+ data: GetOneResponse.Data;
137
+ }
138
+ export namespace GetOneResponse {
139
+ interface Data {
140
+ _id: string;
141
+ company_id: string;
142
+ company_NIF: string;
143
+ company_address: string;
144
+ company_trade_name: string;
145
+ company_business_name: string;
146
+ company_branch_id: string;
147
+ company_branch_identification_number: string;
148
+ company_branch_trade_name: string;
149
+ company_branch_logo: string;
150
+ company_branch_address: string;
151
+ company_branch_email: string;
152
+ company_branch_cellphone: string;
153
+ company_branch_phone: string;
154
+ country_id: string;
155
+ country_code: string;
156
+ country_name: string;
157
+ country_short_name: string;
158
+ period_id: string;
159
+ period_year: string;
160
+ default_price_list_id: string;
161
+ default_price_list_name: string;
162
+ default_price_list_type: string;
163
+ default_cost_center_id: string;
164
+ default_cost_center_code: string;
165
+ default_cost_center_name: string;
166
+ default_discount_rate: number;
167
+ document_nomenclature: string;
168
+ document_number: string;
169
+ document_date: number;
170
+ document_type: string;
171
+ generation_type: string;
172
+ state: string;
173
+ tax_base: number;
174
+ discount: number;
175
+ service: number;
176
+ tax_base_iva: number;
177
+ tax_base_iva_rate_0: number;
178
+ tax_base_iva_exempt: number;
179
+ tax_base_iva_not_subject: number;
180
+ tax_base_irbpnr: number;
181
+ rate_iva: number;
182
+ tax_base_ice: number;
183
+ tax_iva: number;
184
+ code_iva: string;
185
+ tax_irbpnr: number;
186
+ tax_ice: number;
187
+ total: number;
188
+ commentary: string;
189
+ enabled: boolean;
190
+ deleted: boolean;
191
+ user_id: string;
192
+ created_at: number;
193
+ created_user: string;
194
+ client_id: string;
195
+ client_business_name: string;
196
+ client_trade_name: string;
197
+ client_document_number: string;
198
+ client_credit_application: boolean;
199
+ client_document_type_id: string;
200
+ client_document_type_name: string;
201
+ client_document_type_code: string;
202
+ client_category_id: string;
203
+ client_category_name: string;
204
+ client_price_list_id?: string;
205
+ client_price_list_code?: string;
206
+ client_price_list_name?: string;
207
+ client_branch_id: string;
208
+ client_branch_code: string;
209
+ client_branch_name: string;
210
+ client_branch_address: string;
211
+ client_branch_email: string[];
212
+ client_branch_phone_code?: string;
213
+ client_branch_phone?: string;
214
+ client_branch_cellphone?: string;
215
+ client_branch_type_establishment: `${TTypeEstablishment}`;
216
+ client_branch_province_id?: string;
217
+ client_branch_province_code?: string;
218
+ client_branch_province_name?: string;
219
+ client_branch_canton_id?: string;
220
+ client_branch_canton_code?: string;
221
+ client_branch_canton_name?: string;
222
+ client_branch_parish_id?: string;
223
+ client_branch_parish_code?: string;
224
+ client_branch_parish_name?: string;
225
+ client_branch_longitude?: number;
226
+ client_branch_latitude?: number;
227
+ client_branch_seller_id: string;
228
+ client_branch_seller_identification_number: string;
229
+ client_branch_seller_full_name: string;
230
+ client_branch_seller_address: string;
231
+ client_branch_seller_email?: string[];
232
+ client_branch_seller_cellphone?: string;
233
+ client_branch_contact_id?: string;
234
+ client_branch_contact_identification_number?: string;
235
+ client_branch_contact_full_name?: string;
236
+ client_branch_contact_cellphone?: string;
237
+ client_branch_contact_email?: string[];
238
+ sales_account_detail?: Data.Detail[];
239
+ }
240
+ namespace Data {
241
+ interface SummaryArticle {
242
+ _id: string;
243
+ code: string;
244
+ name: string;
245
+ amount: number;
246
+ sequence: string;
247
+ }
248
+ interface Detail {
249
+ _id: string;
250
+ company_id: string;
251
+ country_id: string;
252
+ sales_account_id: string;
253
+ item_id: string;
254
+ item_code: string;
255
+ item_name: string;
256
+ item_barcode: string;
257
+ item_balance: number;
258
+ item_balance_referal_guide: number;
259
+ category_id: string;
260
+ category_name: string;
261
+ price_list_id: string;
262
+ price_list_name: string;
263
+ cost_center_id: string;
264
+ cost_center_code: string;
265
+ cost_center_name: string;
266
+ cost_center_father_code: string;
267
+ cost_center_father_name: string;
268
+ tax_iva_id: string;
269
+ tax_iva_code: string;
270
+ tax_iva_rate: number;
271
+ unit_measure_id: string;
272
+ unit_measure_type: string;
273
+ unit_measure_abbreviation: string;
274
+ unit_measure_name: string;
275
+ unit_measure_quantity: number;
276
+ amount: number;
277
+ price_type_id: string;
278
+ price_type_description: string;
279
+ price_base: number;
280
+ total_price: number;
281
+ discount_rate: number;
282
+ unit_discount: number;
283
+ total_discount: number;
284
+ commentary_item: string;
285
+ replace_item_name: string;
286
+ created_user: string;
287
+ created_at: number;
288
+ type?: DetailType;
289
+ price_type?: string;
290
+ sale_account_detail_tax?: Detail.Tax[];
291
+ tax_iva?: Detail.TaxIva;
292
+ outsourcing_service_data?: Detail.OutsourcingServiceData;
293
+ }
294
+ namespace Detail {
295
+ interface OutsourcingServiceData {
296
+ outsourcing_service_movements_id: string;
297
+ code_outsourcing_service: string;
298
+ name_outsourcing_service: string;
299
+ date_purchase_receipt: number;
300
+ structured_document_number: string;
301
+ provider_document_number: string;
302
+ provider_business_name: string;
303
+ cost: number;
304
+ }
305
+ interface Tax {
306
+ _id: string;
307
+ sale_account_detail_id?: string;
308
+ description?: string;
309
+ type?: string;
310
+ tax_code?: string;
311
+ tax_rate?: number;
312
+ tax_base?: number;
313
+ tax_value?: number;
314
+ }
315
+ interface TaxIva {
316
+ _id: string;
317
+ country_id?: string;
318
+ code?: string;
319
+ percentage?: number;
320
+ description?: string;
321
+ enabled?: boolean;
322
+ created_user?: string;
323
+ created_at?: number;
324
+ updated_user?: string;
325
+ updated_at?: number;
326
+ }
327
+ }
328
+ interface Tax {
329
+ _id: string;
330
+ sale_account_id: string;
331
+ description: string;
332
+ type: string;
333
+ tax_code: string;
334
+ tax_rate: number;
335
+ tax_base: number;
336
+ tax_value: number;
337
+ created_at: number;
338
+ created_user: string;
339
+ updated_at?: number;
340
+ updated_user?: string;
341
+ }
342
+ }
343
+ }
344
+ export interface Save {
345
+ company_NIF: string;
346
+ company_address: string;
347
+ company_trade_name: string;
348
+ company_business_name: string;
349
+ company_branch_id: string;
350
+ company_branch_identification_number: string;
351
+ company_branch_trade_name: string;
352
+ company_branch_logo: string;
353
+ company_branch_address: string;
354
+ company_branch_email: string;
355
+ company_branch_cellphone: string;
356
+ company_branch_phone: string;
357
+ client_id: string;
358
+ client_business_name: string;
359
+ client_trade_name: string;
360
+ client_document_number: string;
361
+ client_credit_application: boolean;
362
+ client_document_type_id: string;
363
+ client_document_type_code: string;
364
+ client_document_type_name: string;
365
+ client_category_id: string;
366
+ client_category_name: string;
367
+ client_price_list_id?: string;
368
+ client_price_list_code?: string;
369
+ client_price_list_name?: string;
370
+ client_branch_id: string;
371
+ client_branch_code: string;
372
+ client_branch_name: string;
373
+ client_branch_address: string;
374
+ client_branch_email: string[];
375
+ client_branch_phone_code: string;
376
+ client_branch_phone: string;
377
+ client_branch_cellphone: string;
378
+ client_branch_type_establishment: string;
379
+ client_branch_province_id?: string;
380
+ client_branch_province_code?: string;
381
+ client_branch_province_name?: string;
382
+ client_branch_canton_id?: string;
383
+ client_branch_canton_code?: string;
384
+ client_branch_canton_name?: string;
385
+ client_branch_parish_id?: string;
386
+ client_branch_parish_code?: string;
387
+ client_branch_parish_name?: string;
388
+ client_branch_longitude: number;
389
+ client_branch_latitude: number;
390
+ client_branch_seller_id: string;
391
+ client_branch_seller_identification_number: string;
392
+ client_branch_seller_full_name: string;
393
+ client_branch_seller_address: string;
394
+ client_branch_seller_email: string[];
395
+ client_branch_seller_cellphone: string;
396
+ client_branch_contact_id?: string;
397
+ client_branch_contact_identification_number?: string;
398
+ client_branch_contact_full_name?: string;
399
+ client_branch_contact_cellphone?: string;
400
+ client_branch_contact_email: string[];
401
+ default_cost_center_id: string;
402
+ default_cost_center_code: string;
403
+ default_cost_center_name: string;
404
+ default_discount_rate: number;
405
+ document_date: number;
406
+ state: string;
407
+ document_type: string;
408
+ generation_type: string;
409
+ tax_base: number;
410
+ discount: number;
411
+ service: number;
412
+ tax_base_iva: number;
413
+ tax_base_iva_rate_0: number;
414
+ tax_base_iva_exempt: number;
415
+ tax_base_iva_not_subject: number;
416
+ tax_base_irbpnr: number;
417
+ rate_iva: number;
418
+ tax_base_ice: number;
419
+ tax_iva: number;
420
+ code_iva: string;
421
+ tax_irbpnr: number;
422
+ tax_ice: number;
423
+ total: number;
424
+ commentary: string;
425
+ booking_id: string;
426
+ booking_document_nomenclature_number: string;
427
+ booking_created_at: number;
428
+ booking_created_user: string;
429
+ check_in_id: string;
430
+ check_in_document_nomenclature_number: string;
431
+ check_in_created_at: number;
432
+ check_in_created_user: string;
433
+ room_id: string;
434
+ room_name: string;
435
+ guest_id: string;
436
+ guest_document_type_id: string;
437
+ guest_document_type_code: string;
438
+ guest_document_type_name: string;
439
+ guest_name: string;
440
+ guest_last_name: string;
441
+ sales_account_detail: [];
442
+ }
443
+ export {};
444
+ }
@@ -0,0 +1,8 @@
1
+ import { Observable } from "rxjs";
2
+ import { ICbmRoomRepository } from "../../infrastructure/repositories/room.infrastructure.repository";
3
+ import { CbmRoomModel } from "../models/room.domain.model";
4
+ export declare class CbmRoomRepository implements ICbmRoomRepository {
5
+ private readonly roomService;
6
+ constructor(roomService: ICbmRoomRepository);
7
+ listState(params: CbmRoomModel.RoomStateParams): Observable<CbmRoomModel.RoomStateResponse>;
8
+ }
@@ -0,0 +1,11 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ICbmSalesAccountRepository } from '../../infrastructure/repositories/sales-account.infrastructure.repository';
3
+ import { CbmSalesAccountModel } from '../models/sales-account.domain.model';
4
+ import { IGeneral } from '../models/general.domain.model';
5
+ export declare class CbmSalesAccountRepository {
6
+ private readonly service;
7
+ constructor(service: ICbmSalesAccountRepository);
8
+ list(params: CbmSalesAccountModel.ListParams): Observable<CbmSalesAccountModel.ListResponse>;
9
+ getOne(id: string): Observable<CbmSalesAccountModel.GetOneResponse>;
10
+ save(data: CbmSalesAccountModel.Save): Observable<IGeneral.Confirm>;
11
+ }
@@ -1,4 +1,6 @@
1
1
  export declare class GeneralDomainService {
2
+ modalShow(modalId: string): void;
3
+ modalHide(modalId: string): void;
2
4
  }
3
5
  export declare function getDateTimestamp(localDate: string): number;
4
6
  export declare function findRoute(eventModule: string, collectionName: string): {
@@ -0,0 +1,15 @@
1
+ import { DestroyRef } from "@angular/core";
2
+ import { FormControl } from "@angular/forms";
3
+ import { CbmItemModel } from "@cbm-common/cbm-types";
4
+ import { CbmItemDomainRepository } from "../../repositories/item.domain.repository";
5
+ import { CbmNotificationService } from "../notification/notification.service";
6
+ export declare class FindItemCodeService {
7
+ private readonly destroyRef;
8
+ private readonly itemRepository;
9
+ private readonly notificationService;
10
+ private readonly codeControl;
11
+ private readonly itemControl;
12
+ constructor(destroyRef: DestroyRef, itemRepository: CbmItemDomainRepository, notificationService: CbmNotificationService, codeControl: FormControl<string>, itemControl: FormControl<Partial<CbmItemModel.ListResponse.Item> | null>);
13
+ loading: import("@angular/core").WritableSignal<boolean>;
14
+ findCode(code?: string): Promise<void>;
15
+ }
@@ -0,0 +1,5 @@
1
+ import { Observable } from "rxjs";
2
+ import { CbmRoomModel } from "../../domain/models/room.domain.model";
3
+ export interface ICbmRoomRepository {
4
+ listState(params: CbmRoomModel.RoomStateParams): Observable<CbmRoomModel.RoomStateResponse>;
5
+ }
@@ -0,0 +1,8 @@
1
+ import { Observable } from 'rxjs';
2
+ import { CbmSalesAccountModel } from '../../domain/models/sales-account.domain.model';
3
+ import { IGeneral } from '../../domain/models/general.domain.model';
4
+ export interface ICbmSalesAccountRepository {
5
+ list(params: CbmSalesAccountModel.ListParams): Observable<CbmSalesAccountModel.ListResponse>;
6
+ getOne(id: string): Observable<CbmSalesAccountModel.GetOneResponse>;
7
+ save(data: CbmSalesAccountModel.Save): Observable<IGeneral.Confirm>;
8
+ }
@@ -0,0 +1,10 @@
1
+ import { HttpClient } from "@angular/common/http";
2
+ import { ICbmRoomRepository } from "../repositories/room.infrastructure.repository";
3
+ import { Observable } from "rxjs";
4
+ import { CbmRoomModel } from "../../domain/models/room.domain.model";
5
+ export declare class CbmRoomService implements ICbmRoomRepository {
6
+ private readonly http;
7
+ constructor(http: HttpClient);
8
+ private readonly url;
9
+ listState(params: CbmRoomModel.RoomStateParams): Observable<CbmRoomModel.RoomStateResponse>;
10
+ }
@@ -0,0 +1,13 @@
1
+ import { ICbmSalesAccountRepository } from '../repositories/sales-account.infrastructure.repository';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { Observable } from 'rxjs';
4
+ import { CbmSalesAccountModel } from '../../domain/models/sales-account.domain.model';
5
+ import { IGeneral } from '../../domain/models/general.domain.model';
6
+ export declare class CbmSalesAccountService implements ICbmSalesAccountRepository {
7
+ private readonly http;
8
+ constructor(http: HttpClient);
9
+ private readonly baseUrl;
10
+ list(params: CbmSalesAccountModel.ListParams): Observable<CbmSalesAccountModel.ListResponse>;
11
+ getOne(id: string): Observable<CbmSalesAccountModel.GetOneResponse>;
12
+ save(data: CbmSalesAccountModel.Save): Observable<IGeneral.Confirm>;
13
+ }
@@ -0,0 +1,3 @@
1
+ import { Router } from "@angular/router";
2
+ import { CbmAuthService } from "../../domain/services/auth/auth.service";
3
+ export declare function authFactory(router: Router): CbmAuthService;
@@ -0,0 +1,4 @@
1
+ import { ApplicationRef } from "@angular/core";
2
+ import { Router } from "@angular/router";
3
+ import { CbmWebSocketService } from "../../domain/services/web-socket/web-socket.service";
4
+ export declare function webSocketFactory(appRef: ApplicationRef, router: Router): CbmWebSocketService;
@@ -0,0 +1,3 @@
1
+ export * from "../domain/services/notification/notification.service";
2
+ export * from "./services/auth.service";
3
+ export * from "./services/web-socket.service";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cbm-common/cbm-types",
3
- "version": "0.0.112",
3
+ "version": "0.0.114",
4
4
  "main": "index.js",
5
5
  "types": "public-api.d.ts",
6
6
  "exports": {