@cbm-common/cbm-types 0.0.124 → 0.0.126

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.
@@ -1,6 +1,6 @@
1
1
  import { DestroyRef, OnInit } from '@angular/core';
2
2
  import { FormArray, FormGroup } from '@angular/forms';
3
- import { CbmClientModel, CbmCostCenterModel } from '@cbm-common/cbm-types';
3
+ import { CbmClientModel, CbmCostCenterModel, CbmTaxesModal } from '@cbm-common/cbm-types';
4
4
  import { CbmSalePriceModel } from '@cbm-common/cbm-types/lib/domain/models/sale-price.domain.model';
5
5
  import { ListService, PaginatedListService } from '@cbm-common/data-access';
6
6
  import { Subject } from 'rxjs';
@@ -12,16 +12,23 @@ import { CbmSalePriceDomainRepository } from '../../domain/repositories/sale-pri
12
12
  import { CbmNotificationService } from '../../remotes/services.remote';
13
13
  import { cbmStockWarehouseModalModel } from '../stock-by-warehouse/type';
14
14
  import { IItemDetails } from './item-details.types';
15
+ import { CbmIrbpnrDomainService } from '../../domain/services/taxes/irbpnr.domain.service';
15
16
  export declare class ItemDetails implements OnInit {
16
17
  private readonly destroyRef;
17
18
  private readonly itemRepository;
18
19
  private readonly notificationService;
19
20
  private readonly priceTypeRepository;
20
21
  private readonly costCenterRepository;
21
- constructor(destroyRef: DestroyRef, itemRepository: CbmItemDomainRepository, notificationService: CbmNotificationService, priceTypeRepository: CbmSalePriceDomainRepository, costCenterRepository: CbmCostCenterRepository);
22
+ private readonly irbpnrService;
23
+ constructor(destroyRef: DestroyRef, itemRepository: CbmItemDomainRepository, notificationService: CbmNotificationService, priceTypeRepository: CbmSalePriceDomainRepository, costCenterRepository: CbmCostCenterRepository, irbpnrService: CbmIrbpnrDomainService);
22
24
  'price-list': import("@angular/core").InputSignal<Partial<CbmPriceListModel.ListResponse.Data>>;
23
25
  'client-data': import("@angular/core").InputSignal<Partial<CbmClientModel.GetOneResponse.Data>>;
24
26
  'cost-center': import("@angular/core").InputSignal<Partial<CbmCostCenterModel.ListResponse.Data>>;
27
+ 'on-total-amount': import("@angular/core").OutputEmitterRef<number>;
28
+ 'on-total-subtotal': import("@angular/core").OutputEmitterRef<number>;
29
+ 'on-total-discount': import("@angular/core").OutputEmitterRef<number>;
30
+ 'on-total-tax': import("@angular/core").OutputEmitterRef<number>;
31
+ 'on-details-tax': import("@angular/core").OutputEmitterRef<CbmTaxesModal.Data>;
25
32
  loadItems$: Subject<void>;
26
33
  loadCostCenter$: Subject<void>;
27
34
  itemDetailsFormArray: FormArray<FormGroup<IItemDetails.FormGroupDetail>>;
@@ -43,4 +50,5 @@ export declare class ItemDetails implements OnInit {
43
50
  resetItem(formGroup: FormGroup<IItemDetails.FormGroupDetail>): void;
44
51
  getAllTaxes(): IItemDetails.Taxes[];
45
52
  getRowTaxes(formGroup: FormGroup<IItemDetails.FormGroupDetail>): IItemDetails.Taxes[];
53
+ calculateTotals(): void;
46
54
  }
@@ -1,7 +1,7 @@
1
1
  import { FormControl } from "@angular/forms";
2
2
  import { CbmCostCenterModel, CbmItemModel } from "@cbm-common/cbm-types";
3
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";
4
+ import { FindItemByCodeService } from "../../domain/services/item/find-item-by-code.domain.service";
5
5
  import { CbmUnitMeasureModel } from "../../domain/models/unit-measure.domain.model";
6
6
  export declare namespace IItemDetails {
7
7
  interface FormGroupDetail {
@@ -15,11 +15,11 @@ export declare namespace IItemDetails {
15
15
  price_type: FormControl<Partial<CbmSalePriceModel.GetResponse.Data> | null>;
16
16
  unit_measure: FormControl<Partial<CbmUnitMeasureModel.ListResponse.DataWithFactor> | null>;
17
17
  cost_center: FormControl<Partial<CbmCostCenterModel.ListResponse.Data> | null>;
18
- findItemByCode$: FormControl<FindItemCodeService | null>;
18
+ findItemByCode$: FormControl<FindItemByCodeService | null>;
19
19
  }
20
20
  interface Taxes {
21
21
  type: string;
22
- description: string;
22
+ tax_description: string;
23
23
  tax_code: string;
24
24
  tax_rate: number;
25
25
  tax_base: number;
@@ -1,13 +1,14 @@
1
1
  import { DestroyRef, OnInit } from '@angular/core';
2
2
  import { FormControl, FormGroup } from '@angular/forms';
3
- import { CbmClientModel, CbmPriceListModel } from '@cbm-common/cbm-types';
4
- import { PaginatedListService } from '@cbm-common/data-access';
5
- import { CanFormDirty } from '@cbm-common/guards-repository';
3
+ import { CbmClientModel, CbmContactModel, CbmPriceListModel } from '@cbm-common/cbm-types';
4
+ import { ListService, PaginatedListService } from '@cbm-common/data-access';
5
+ import { Subject } from 'rxjs';
6
6
  import { CbmCostCenterModel } from '../../domain/models/cost-center.domain.model';
7
7
  import { STATE } from '../../domain/models/general.domain.model';
8
8
  import { CbmRoomModel } from '../../domain/models/room.domain.model';
9
9
  import { CbmSalesAccountModel } from '../../domain/models/sales-account.domain.model';
10
10
  import { CbmChargeRepository } from '../../domain/repositories/charge.domain.repository';
11
+ import { CbmCostCenterRepository } from '../../domain/repositories/cost-center.domain.repository';
11
12
  import { CbmRoomRepository } from '../../domain/repositories/room.domain.repository';
12
13
  import { CbmSalesAccountRepository } from '../../domain/repositories/sales-account.domain.repository';
13
14
  import { CbmAuthService } from '../../domain/services/auth/auth.service';
@@ -15,31 +16,52 @@ import { CbmNotificationService } from '../../remotes/services.remote';
15
16
  import { ItemDetails } from '../item-details/item-details';
16
17
  import { CbmModalConfirmComponent } from '../modal-confirm/modal-confirm';
17
18
  import { FoliosModal } from './folios-modal/folios-modal';
18
- export declare class CbmPmsAddCharge implements OnInit, CanFormDirty {
19
+ import { CbmTaxesModal } from '../taxes-modal/taxes-modal.model';
20
+ import { CbmIrbpnrDomainService } from '../../domain/services/taxes/irbpnr.domain.service';
21
+ export declare class CbmPmsAddCharge implements OnInit {
19
22
  private readonly destroyRef;
20
23
  private readonly roomRepository;
21
24
  private readonly chargeRepository;
22
25
  private readonly notificationService;
23
26
  private readonly authService;
24
27
  private readonly salesAccountRepository;
25
- constructor(destroyRef: DestroyRef, roomRepository: CbmRoomRepository, chargeRepository: CbmChargeRepository, notificationService: CbmNotificationService, authService: CbmAuthService, salesAccountRepository: CbmSalesAccountRepository);
28
+ private readonly costCenterRepository;
29
+ private readonly irbpnrService;
30
+ constructor(destroyRef: DestroyRef, roomRepository: CbmRoomRepository, chargeRepository: CbmChargeRepository, notificationService: CbmNotificationService, authService: CbmAuthService, salesAccountRepository: CbmSalesAccountRepository, costCenterRepository: CbmCostCenterRepository, irbpnrService: CbmIrbpnrDomainService);
26
31
  disableGuard: boolean;
27
32
  formDirty: () => boolean;
28
33
  chargeFormGroup: FormGroup<{
29
34
  service_type: FormControl<number | null>;
30
35
  charge_type: FormControl<number | null>;
31
36
  room: FormControl<Partial<CbmRoomModel.RoomStateResponse.Items> | null>;
37
+ cost_center: FormControl<Partial<CbmCostCenterModel.ListResponse.Data> | null>;
32
38
  order: FormControl<string>;
33
39
  tiket: FormControl<string>;
34
40
  }>;
35
41
  protected rooms$: PaginatedListService<CbmRoomModel.RoomStateResponse, CbmRoomModel.RoomStateParams, CbmRoomModel.RoomStateResponse.Items[]>;
42
+ protected costCenter$: ListService<CbmCostCenterModel.ListResponse, CbmCostCenterModel.ListParams, CbmCostCenterModel.ListResponse.Data[]>;
43
+ firstCostCenter$: Subject<void>;
36
44
  protected foliosRoomId: import("@angular/core").WritableSignal<string | null>;
37
45
  protected selectedFolio: import("@angular/core").WritableSignal<CbmSalesAccountModel.GetOneResponse.Data<CbmSalesAccountModel.SalesAccountRelatedDocuments> | null>;
38
46
  protected priceList: import("@angular/core").Signal<Partial<CbmPriceListModel.ListResponse.Data>>;
39
47
  protected client: import("@angular/core").Signal<Partial<CbmClientModel.GetOneResponse.Data>>;
48
+ contact: import("@angular/core").Signal<Partial<CbmContactModel.ListResponse.Data> | null>;
40
49
  clientBranch: import("@angular/core").Signal<Partial<CbmClientModel.GetOneResponse.Data.Contact>>;
41
50
  protected costCenter: import("@angular/core").Signal<Partial<CbmCostCenterModel.ListResponse.Data>>;
42
51
  protected relatedDocument: import("@angular/core").Signal<CbmSalesAccountModel.SalesAccountRelatedDocuments | null>;
52
+ protected totals: import("@angular/core").WritableSignal<{
53
+ itemAmount: number;
54
+ itemSubtotal: number;
55
+ itemDiscount: number;
56
+ itemTax: number;
57
+ serviceAmount: number;
58
+ serviceSubtotal: number;
59
+ serviceDiscount: number;
60
+ serviceTax: number;
61
+ }>;
62
+ private typeTotals;
63
+ protected itemDetailsTax: import("@angular/core").WritableSignal<CbmTaxesModal.Data>;
64
+ protected serviceDetailsTax: import("@angular/core").WritableSignal<CbmTaxesModal.Data>;
43
65
  protected foliosModalRef: import("@angular/core").Signal<FoliosModal>;
44
66
  protected itemDetailsComp: import("@angular/core").Signal<ItemDetails>;
45
67
  modalConfirm: import("@angular/core").Signal<CbmModalConfirmComponent>;
@@ -49,7 +71,9 @@ export declare class CbmPmsAddCharge implements OnInit, CanFormDirty {
49
71
  protected stOfSaveCharge: import("@angular/core").WritableSignal<STATE>;
50
72
  ngOnInit(): void;
51
73
  private initRooms;
74
+ private initCostCenter;
52
75
  protected subObservers(): void;
53
76
  saveCharge(): Promise<void>;
54
77
  protected getFolio(folio: CbmSalesAccountModel.ListResponse.Item): Promise<void>;
78
+ protected updateTotals(field: keyof typeof this.typeTotals, value: number): void;
55
79
  }
@@ -0,0 +1,4 @@
1
+ export declare class CbmPriceTypeSummaryComponent {
2
+ detailType: import("@angular/core").InputSignal<"item" | "service" | "kit" | "outsourcing" | "fixed_asset">;
3
+ open: import("@angular/core").InputSignal<boolean>;
4
+ }
@@ -0,0 +1,56 @@
1
+ import { DestroyRef } from '@angular/core';
2
+ import { FormArray, FormGroup } from '@angular/forms';
3
+ import { PaginatedListService, ListService } from '@cbm-common/data-access';
4
+ import { Subject } from 'rxjs';
5
+ import { CbmSalePriceModel } from '../../domain/models/sale-price.domain.model';
6
+ import { CbmSalePriceDomainRepository } from '../../domain/repositories/sale-price.domain.repository';
7
+ import { CbmIrbpnrDomainService } from '../../domain/services/taxes/irbpnr.domain.service';
8
+ import { IServiceDetails } from './service-details.types';
9
+ import { CbmNotificationService } from '../../domain/services/notification/notification.service';
10
+ import { CbmCostCenterRepository } from '../../domain/repositories/cost-center.domain.repository';
11
+ import { CbmPriceListModel } from '../../domain/models/price-list.domain.model';
12
+ import { CbmClientModel } from '../../domain/models/client.domain.model';
13
+ import { CbmCostCenterModel } from '../../domain/models/cost-center.domain.model';
14
+ import { CbmTaxesModal } from '../taxes-modal/taxes-modal.model';
15
+ import { CbmUnitMeasureModel } from '../../domain/models/unit-measure.domain.model';
16
+ import { cbmStockWarehouseModalModel } from '../stock-by-warehouse/type';
17
+ import { CbmServiceModel } from '../../domain/models/service.domain.model';
18
+ import { CbmServiceDomainRepository } from '../../domain/repositories/service.domain.repository';
19
+ export declare class CbmServiceDetails {
20
+ private readonly destroyRef;
21
+ private readonly serviceRepository;
22
+ private readonly notificationService;
23
+ private readonly priceTypeRepository;
24
+ private readonly costCenterRepository;
25
+ private readonly irbpnrService;
26
+ constructor(destroyRef: DestroyRef, serviceRepository: CbmServiceDomainRepository, notificationService: CbmNotificationService, priceTypeRepository: CbmSalePriceDomainRepository, costCenterRepository: CbmCostCenterRepository, irbpnrService: CbmIrbpnrDomainService);
27
+ 'price-list': import("@angular/core").InputSignal<Partial<CbmPriceListModel.ListResponse.Data>>;
28
+ 'client-data': import("@angular/core").InputSignal<Partial<CbmClientModel.GetOneResponse.Data>>;
29
+ 'cost-center': import("@angular/core").InputSignal<Partial<CbmCostCenterModel.ListResponse.Data>>;
30
+ 'on-total-amount': import("@angular/core").OutputEmitterRef<number>;
31
+ 'on-total-subtotal': import("@angular/core").OutputEmitterRef<number>;
32
+ 'on-total-discount': import("@angular/core").OutputEmitterRef<number>;
33
+ 'on-total-tax': import("@angular/core").OutputEmitterRef<number>;
34
+ 'on-details-tax': import("@angular/core").OutputEmitterRef<CbmTaxesModal.Data>;
35
+ loadServices$: Subject<void>;
36
+ loadCostCenter$: Subject<void>;
37
+ serviceDetailsFormArray: FormArray<FormGroup<IServiceDetails.FormGroupDetail>>;
38
+ services$: PaginatedListService<CbmServiceModel.ListResponse, CbmServiceModel.ListParams, CbmServiceModel.ListResponse.Item[]>;
39
+ priceTypes$: ListService<CbmSalePriceModel.GetResponse, CbmSalePriceModel.GetParams, CbmSalePriceModel.GetResponse.Data[]>;
40
+ costCenters$: ListService<CbmCostCenterModel.ListResponse, CbmCostCenterModel.ListParams, CbmCostCenterModel.ListResponse.Data[]>;
41
+ priceList: import("@angular/core").Signal<Partial<CbmPriceListModel.ListResponse.Data>>;
42
+ clientData: import("@angular/core").Signal<Partial<CbmClientModel.GetOneResponse.Data>>;
43
+ costCenterData: import("@angular/core").Signal<Partial<CbmCostCenterModel.ListResponse.Data>>;
44
+ priceTypeOp: Map<string, CbmSalePriceModel.GetResponse.Data[]>;
45
+ unitMeasureOp: Map<string, Partial<CbmUnitMeasureModel.ListResponse.DataWithFactor>[]>;
46
+ itemConsulted: import("@angular/core").WritableSignal<cbmStockWarehouseModalModel.item | null>;
47
+ ngOnInit(): void;
48
+ getPriceType(params: CbmSalePriceModel.GetParams, control?: IServiceDetails.FormGroupDetail['price_type']): Promise<void>;
49
+ subObservers(): void;
50
+ addNewRow(): void;
51
+ removeRow(index: number): void;
52
+ resetItem(formGroup: FormGroup<IServiceDetails.FormGroupDetail>): void;
53
+ getAllTaxes(): IServiceDetails.Taxes[];
54
+ getRowTaxes(formGroup: FormGroup<IServiceDetails.FormGroupDetail>): IServiceDetails.Taxes[];
55
+ calculateTotals(): void;
56
+ }
@@ -0,0 +1,27 @@
1
+ import { FormControl } from "@angular/forms";
2
+ import { CbmCostCenterModel } from "@cbm-common/cbm-types";
3
+ import { CbmSalePriceModel } from "@cbm-common/cbm-types/lib/domain/models/sale-price.domain.model";
4
+ import { CbmServiceModel } from "../../domain/models/service.domain.model";
5
+ import { FindServiceCodeService } from "../../domain/services/service/find-service-code.domain.service";
6
+ export declare namespace IServiceDetails {
7
+ interface FormGroupDetail {
8
+ code: FormControl<string>;
9
+ service: FormControl<Partial<CbmServiceModel.ListResponse.Item> | null>;
10
+ amount: FormControl<string>;
11
+ price: FormControl<string>;
12
+ discount_percentage: FormControl<string>;
13
+ discount: FormControl<string>;
14
+ subtotal: FormControl<number>;
15
+ price_type: FormControl<Partial<CbmSalePriceModel.GetResponse.Data> | null>;
16
+ cost_center: FormControl<Partial<CbmCostCenterModel.ListResponse.Data> | null>;
17
+ findServiceByCode$: FormControl<FindServiceCodeService | null>;
18
+ }
19
+ interface Taxes {
20
+ type: string;
21
+ tax_description: string;
22
+ tax_code: string;
23
+ tax_rate: number;
24
+ tax_base: number;
25
+ tax_value: number;
26
+ }
27
+ }
@@ -0,0 +1,19 @@
1
+ import { CbmTaxesModal } from '../taxes-modal/taxes-modal.model';
2
+ import { FormControl } from '@angular/forms';
3
+ export declare class CbmSubtotalDetails {
4
+ 'item-subtotal': import("@angular/core").InputSignal<number>;
5
+ 'item-discount': import("@angular/core").InputSignal<number>;
6
+ 'item-tax': import("@angular/core").InputSignal<number>;
7
+ 'item-details-tax': import("@angular/core").InputSignal<CbmTaxesModal.Data>;
8
+ 'service-subtotal': import("@angular/core").InputSignal<number>;
9
+ 'service-discount': import("@angular/core").InputSignal<number>;
10
+ 'service-tax': import("@angular/core").InputSignal<number>;
11
+ 'service-details-tax': import("@angular/core").InputSignal<CbmTaxesModal.Data>;
12
+ subtotal: import("@angular/core").Signal<number>;
13
+ discount: import("@angular/core").Signal<number>;
14
+ tax: import("@angular/core").Signal<number>;
15
+ total: import("@angular/core").Signal<number>;
16
+ detailsTax: import("@angular/core").Signal<CbmTaxesModal.Data>;
17
+ serviceControl: FormControl<string>;
18
+ hasTaxes(): boolean;
19
+ }
@@ -0,0 +1,14 @@
1
+ export declare class CbmSummaryDetails {
2
+ 'item-amount': import("@angular/core").InputSignal<number>;
3
+ 'item-subtotal': import("@angular/core").InputSignal<number>;
4
+ 'kit-amount': import("@angular/core").InputSignal<number>;
5
+ 'kit-subtotal': import("@angular/core").InputSignal<number>;
6
+ 'service-amount': import("@angular/core").InputSignal<number>;
7
+ 'service-subtotal': import("@angular/core").InputSignal<number>;
8
+ itemAmount: import("@angular/core").Signal<number>;
9
+ itemSubtotal: import("@angular/core").Signal<number>;
10
+ kitAmount: import("@angular/core").Signal<number>;
11
+ kitSubtotal: import("@angular/core").Signal<number>;
12
+ serviceAmount: import("@angular/core").Signal<number>;
13
+ serviceSubtotal: import("@angular/core").Signal<number>;
14
+ }
@@ -13,6 +13,7 @@ export declare namespace CbmContactModel {
13
13
  _id: string;
14
14
  company_id?: string;
15
15
  client_id?: string;
16
+ client_branch_id?: string;
16
17
  identification_number?: string;
17
18
  full_name?: string;
18
19
  phone_code?: string;
@@ -1,9 +1,17 @@
1
1
  export declare namespace CbmRoomModel {
2
+ enum StateRoom {
3
+ AVAILABLE = "available",
4
+ BUSY = "busy",
5
+ IN_MAINTENANCE = "in_maintenance",
6
+ CLEANING = "cleaning",
7
+ RESERVED = "reserved"
8
+ }
2
9
  interface RoomStateParams {
3
10
  page: number;
4
11
  size: number;
5
12
  date_consultation?: number;
6
13
  room_name?: string;
14
+ state_room?: StateRoom;
7
15
  }
8
16
  interface RoomStateResponse {
9
17
  success: boolean;
@@ -1,5 +1,6 @@
1
1
  export declare namespace CbmSalesAccountModel {
2
2
  type DetailType = 'item' | 'service' | 'kit' | 'outsourcing_service';
3
+ const transactionTypes: Record<string, string>;
3
4
  interface ListParams {
4
5
  page: number;
5
6
  size: number;
@@ -128,6 +129,33 @@ export declare namespace CbmSalesAccountModel {
128
129
  client_branch_contact_full_name?: string;
129
130
  client_branch_contact_cellphone?: string;
130
131
  client_branch_contact_email?: string[];
132
+ sales_account_related_documents: Item.SalesAccountRelatedDocuments[];
133
+ }
134
+ namespace Item {
135
+ interface SalesAccountRelatedDocuments {
136
+ _id: string;
137
+ company_id: string;
138
+ country_id: string;
139
+ collection_origin_id: string;
140
+ collection_origin_name: string;
141
+ collection_origin_document_nomenclature_number: string;
142
+ event_module_origin: string;
143
+ comment_check_in: string;
144
+ sales_account_id: string;
145
+ document_type: string;
146
+ room_id: string;
147
+ room_name: string;
148
+ guest_id: string;
149
+ guest_document_type_id: string;
150
+ guest_document_type_code: string;
151
+ guest_document_type_name: string;
152
+ guest_name: string;
153
+ guest_last_name: string;
154
+ enabled: boolean;
155
+ user_id: string;
156
+ created_at: number;
157
+ created_user: string;
158
+ }
131
159
  }
132
160
  }
133
161
  interface GetOneResponse<T> {
@@ -185,15 +213,17 @@ export declare namespace CbmSalesAccountModel {
185
213
  client_branch_seller_address: string;
186
214
  client_branch_seller_email: any[];
187
215
  client_branch_seller_cellphone: string;
188
- client_branch_contact_email: any[];
216
+ client_branch_contact_id?: string;
217
+ client_branch_contact_identification_number?: string;
218
+ client_branch_contact_full_name?: string;
219
+ client_branch_contact_cellphone?: string;
220
+ client_branch_contact_email?: string[];
189
221
  default_cost_center_id: string;
190
222
  default_cost_center_code: string;
191
223
  default_cost_center_name: string;
192
- default_discount_rate: number;
193
224
  document_nomenclature: string;
194
225
  document_number: string;
195
226
  document_date: number;
196
- document_type: string;
197
227
  generation_type: string;
198
228
  state: string;
199
229
  tax_base: number;
@@ -207,7 +237,6 @@ export declare namespace CbmSalesAccountModel {
207
237
  rate_iva: number;
208
238
  tax_base_ice: number;
209
239
  tax_iva: number;
210
- code_iva: string;
211
240
  tax_irbpnr: number;
212
241
  tax_ice: number;
213
242
  total: number;
@@ -331,10 +360,14 @@ export declare namespace CbmSalesAccountModel {
331
360
  collection_origin_id: string;
332
361
  collection_origin_name: string;
333
362
  collection_origin_document_nomenclature_number: string;
363
+ collection_origin_created_at: number;
364
+ collection_origin_created_user: string;
334
365
  event_module_origin: string;
335
366
  sales_account_id: string;
367
+ document_type: string;
336
368
  room_id: string;
337
369
  room_name: string;
370
+ comment_check_in: string;
338
371
  guest_id: string;
339
372
  guest_document_type_id: string;
340
373
  guest_document_type_code: string;
@@ -0,0 +1,12 @@
1
+ import { DestroyRef } from "@angular/core";
2
+ import { FormControl } from "@angular/forms";
3
+ import { IGetPriceTypeParams, IPriceTypeExec } from "../../types/price-type.fn";
4
+ import { CbmSalePriceModel } from "../models/sale-price.domain.model";
5
+ export declare class FindPriceTypeService {
6
+ private readonly destroyRef;
7
+ private readonly controlPriceType;
8
+ private readonly controls;
9
+ private readonly params;
10
+ constructor(destroyRef: DestroyRef, controlPriceType: FormControl<Partial<CbmSalePriceModel.GetResponse.Data> | null>, controls: Omit<IPriceTypeExec, 'controlPriceType'>, params: IGetPriceTypeParams);
11
+ subObserver(): void;
12
+ }
@@ -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 FindItemByCodeService {
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,15 @@
1
+ import { DestroyRef } from "@angular/core";
2
+ import { FormControl } from "@angular/forms";
3
+ import { CbmServiceModel } from "../../models/service.domain.model";
4
+ import { CbmServiceDomainRepository } from "../../repositories/service.domain.repository";
5
+ import { CbmNotificationService } from "../notification/notification.service";
6
+ export declare class FindServiceCodeService {
7
+ private readonly destroyRef;
8
+ private readonly itemRepository;
9
+ private readonly notificationService;
10
+ private readonly codeControl;
11
+ private readonly serviceControl;
12
+ constructor(destroyRef: DestroyRef, itemRepository: CbmServiceDomainRepository, notificationService: CbmNotificationService, codeControl: FormControl<string>, serviceControl: FormControl<Partial<CbmServiceModel.ListResponse.Item> | null>);
13
+ loading: import("@angular/core").WritableSignal<boolean>;
14
+ findCode(code?: string): Promise<void>;
15
+ }
@@ -0,0 +1,11 @@
1
+ import { DestroyRef } from "@angular/core";
2
+ import { CbmTaxIrbpnrModel } from "../../models/tax-irbpnr.domain.model";
3
+ import { CbmTaxIrbpnrDomainRepository } from "../../repositories/tax-irbpnr.domain.repository";
4
+ export declare class CbmIrbpnrDomainService {
5
+ private readonly destroyRef;
6
+ private readonly irbpnrRepository;
7
+ constructor(destroyRef: DestroyRef, irbpnrRepository: CbmTaxIrbpnrDomainRepository);
8
+ private irbpnrData;
9
+ get irbpnr(): CbmTaxIrbpnrModel.ListResponse.Data;
10
+ private getIrbpnr;
11
+ }
@@ -1,10 +1,11 @@
1
- import { CbmAuthService } from "../auth/auth.service";
1
+ import { CbmAuthService } from '../auth/auth.service';
2
2
  import { Socket } from 'ngx-socket-io';
3
3
  import { Observable, Subject } from 'rxjs';
4
4
  import { CbmWebSocketModel } from './web-socket.model';
5
5
  export declare class CbmWebSocketService {
6
6
  private socket;
7
7
  private authService;
8
+ private pingIntervalId;
8
9
  constructor(socket: Socket, authService: CbmAuthService);
9
10
  socketOn(observer: Subject<string>): void;
10
11
  refreshStock(): Observable<CbmWebSocketModel.RefreshStock>;
@@ -15,4 +16,11 @@ export declare class CbmWebSocketService {
15
16
  joinImportExcel(): void;
16
17
  logoutAuth<T = CbmWebSocketModel.LogoutAuth>(): Observable<T>;
17
18
  joinLogoutAuth(): void;
19
+ startPing(intervalMs?: number): void;
20
+ stopPing(): void;
21
+ onPong<T = {
22
+ timestamp: number;
23
+ }>(): Observable<T>;
24
+ onConnectError<T = string>(): Observable<T>;
25
+ initPingPong(intervalMs?: number): void;
18
26
  }
@@ -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";
@@ -29,8 +29,8 @@ export declare enum PRICE_TYPE {
29
29
  }
30
30
  export interface IPriceTypeExec {
31
31
  controlPriceType: FormControl<Partial<CbmSalePriceModel.GetResponse.Data> | null>;
32
- controlItem: FormControl<Partial<CbmItemModel.ListResponse.Item> | null>;
33
- controlUnitMeasure: FormControl<Partial<CbmUnitMeasureModel.ListResponse.DataWithFactor> | null>;
32
+ controlItem?: FormControl<Partial<CbmItemModel.ListResponse.Item> | null>;
33
+ controlUnitMeasure?: FormControl<Partial<CbmUnitMeasureModel.ListResponse.DataWithFactor> | null>;
34
34
  controlPrice?: FormControl<string>;
35
35
  controlDiscountPercentage?: FormControl<string>;
36
36
  controlDiscount?: FormControl<string>;
@@ -45,3 +45,4 @@ export interface IGetPriceTypeParams {
45
45
  price_list: Partial<CbmPriceListModel.ListResponse.Data>;
46
46
  }
47
47
  export declare function getPriceTypeExec(controls: IPriceTypeExec, params: IGetPriceTypeParams): void;
48
+ export declare function unlock(controls: IPriceTypeExec): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cbm-common/cbm-types",
3
- "version": "0.0.124",
3
+ "version": "0.0.126",
4
4
  "main": "index.js",
5
5
  "types": "public-api.d.ts",
6
6
  "exports": {