@cbm-common/cbm-types 0.0.350 → 0.0.353
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/components/add-client/add-client.d.ts +2 -1
- package/lib/components/add-provider/add-provider.d.ts +87 -7
- package/lib/components/location-search/location-search.component.d.ts +4 -2
- package/lib/components/modal-map/modal-map.component.d.ts +1 -1
- package/lib/domain/models/financial-bank.domain.model.d.ts +2 -0
- package/lib/domain/models/history.domain.model.d.ts +2 -0
- package/lib/domain/models/provider.domain.model.d.ts +3 -0
- package/lib/domain/services/web-socket/ai-web-socket.model.d.ts +83 -0
- package/lib/domain/services/web-socket/ai-web-socket.service.d.ts +14 -0
- package/package.json +1 -1
- package/lib/components/accounting-seat/directives/drop-down-menu.directive.d.ts +0 -13
- package/lib/components/accounting-seat/directives/drop-down.directive.d.ts +0 -10
- package/lib/components/record-detail-metadata/components/options/options.d.ts +0 -13
- package/lib/components/record-detail-metadata/directives/drop-down-menu.directive.d.ts +0 -13
- package/lib/components/record-detail-metadata/directives/drop-down.directive.d.ts +0 -9
- package/lib/domain/models/sales-pending-document.domain.model.d.ts +0 -91
- package/lib/domain/repositories/sales-pending-document.domain.repository.d.ts +0 -8
- package/lib/infrastructure/repositories/blanket-agreement-category-service..infrastructure.repository.d.ts +0 -7
- package/lib/infrastructure/repositories/sales-pending-document.infrastructure.repository.d.ts +0 -5
- package/lib/infrastructure/services/sales-pending-document.infrastructure.service.d.ts +0 -9
|
@@ -124,6 +124,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit, OnD
|
|
|
124
124
|
readonly carDelear: import("@angular/core").Signal<boolean>;
|
|
125
125
|
readonly pms: import("@angular/core").Signal<boolean>;
|
|
126
126
|
readonly additionalInformation: import("@angular/core").Signal<boolean>;
|
|
127
|
+
readonly showAdditionalInformation: import("@angular/core").Signal<boolean>;
|
|
127
128
|
modalConfirmRef: import("@angular/core").Signal<CbmModalConfirmComponent | undefined>;
|
|
128
129
|
clientForm: FormGroup<{
|
|
129
130
|
documentType: FormControl<CbmDocumentTypeModel.ListResponse.Data | null>;
|
|
@@ -232,7 +233,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit, OnD
|
|
|
232
233
|
deleteRowToContact(index: number): void;
|
|
233
234
|
getCi(detail: TContactRow): void;
|
|
234
235
|
/**
|
|
235
|
-
* Solo
|
|
236
|
+
* Solo al agregar y con `additionalInformation()` en `true` (`showAdditionalInformation()`): arma la información de los navs
|
|
236
237
|
* (datos geográficos y datos adicionales como objeto, contactos como array) con el mismo
|
|
237
238
|
* nombre de campo que ya usan sus pantallas reales equivalentes (`geographical-data`,
|
|
238
239
|
* `management`, `branch/contacts`) — pendiente de confirmar con backend que el endpoint de
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import { DestroyRef } from '@angular/core';
|
|
2
|
-
import { AsyncValidatorFn, FormControl, FormGroup, ValidatorFn } from '@angular/forms';
|
|
1
|
+
import { DestroyRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { AsyncValidatorFn, FormArray, FormControl, FormGroup, ValidatorFn } from '@angular/forms';
|
|
3
|
+
import { NgSelectComponent } from '@ng-select/ng-select';
|
|
3
4
|
import { Subject } from 'rxjs';
|
|
5
|
+
import { CbmBankModel } from '../../domain/models/bank.domain.model';
|
|
4
6
|
import { CbmCountryCodeModel } from '../../domain/models/country-code.domain.model';
|
|
5
7
|
import { CbmDocumentTypeModel } from '../../domain/models/document-type.model';
|
|
6
8
|
import { CbmProviderGroupModel } from '../../domain/models/provider-group.domain.model';
|
|
7
9
|
import { CbmProviderModel } from '../../domain/models/provider.domain.model';
|
|
10
|
+
import { CbmTerritorialOrganizationModel } from '../../domain/models/territorial-organization.domain.model';
|
|
11
|
+
import { CbmBankRepository } from '../../domain/repositories/bank.domain.repository';
|
|
8
12
|
import { CbmBillingDomainRepository } from '../../domain/repositories/billing.domain.repository';
|
|
9
13
|
import { CbmCountryCodeDomainRepository } from '../../domain/repositories/country-code.domain.repository';
|
|
10
14
|
import { CbmDocumentTypeDomainRepository } from '../../domain/repositories/document-type.domain.repository';
|
|
11
15
|
import { CbmProviderGroupDomainRepository } from '../../domain/repositories/provider-group.domain.repository';
|
|
12
16
|
import { CbmProviderRepository } from '../../domain/repositories/provider.domain.repository';
|
|
17
|
+
import { CbmTerritorialOrganizationRepository } from '../../domain/repositories/territorial-organization.domain.repository';
|
|
18
|
+
import { GeneralDomainService } from '../../domain/services/general.domain.service';
|
|
13
19
|
import { CbmNotificationService } from '../../remotes/services.remote';
|
|
14
|
-
import { TSaveOptions } from '../add-client/add-client';
|
|
20
|
+
import { TContactRow, TSaveOptions } from '../add-client/add-client';
|
|
15
21
|
import { ConfirmationModal } from '../confirmation-modal/confirmation-modal';
|
|
16
22
|
import { CbmTreeSelect } from '../tree-select/types';
|
|
17
23
|
import { TStatus } from './types';
|
|
@@ -22,8 +28,9 @@ import { CbmGeneralSettingsPartnersModel } from '../../domain/models/general-set
|
|
|
22
28
|
import { CbmGeneralSettingsPartnersDomainRepository } from '../../domain/repositories/general-settings-partners.domain.repository';
|
|
23
29
|
import { CbmEconomicActivitiesDomainModel } from '../../domain/models/economic-activities-uafe.domain.model';
|
|
24
30
|
import { CbmEconomicActivitiesDomainRepository } from '../../domain/repositories/economic-activities-uafe.domain.repository';
|
|
25
|
-
import { PaginatedListService } from '@cbm-common/data-access';
|
|
26
|
-
|
|
31
|
+
import { ListService, PaginatedListService } from '@cbm-common/data-access';
|
|
32
|
+
import { ModalMapComponent } from '../modal-map/modal-map.component';
|
|
33
|
+
export declare class CbmAddProviderComponent implements OnInit, OnDestroy {
|
|
27
34
|
private providerRepository;
|
|
28
35
|
private providerGroupRepository;
|
|
29
36
|
private documentTypeRepository;
|
|
@@ -34,10 +41,20 @@ export declare class CbmAddProviderComponent {
|
|
|
34
41
|
private destroyRef;
|
|
35
42
|
private readonly accountValidatorsDomainService;
|
|
36
43
|
private readonly generalSettingsPartnersRepository;
|
|
37
|
-
|
|
44
|
+
private readonly territorialOrganizationRepository;
|
|
45
|
+
private readonly bankRepository;
|
|
46
|
+
private readonly generalService;
|
|
47
|
+
constructor(providerRepository: CbmProviderRepository, providerGroupRepository: CbmProviderGroupDomainRepository, documentTypeRepository: CbmDocumentTypeDomainRepository, countryCodeRepository: CbmCountryCodeDomainRepository, economicActivityRepository: CbmEconomicActivitiesDomainRepository, billingRepository: CbmBillingDomainRepository, notificationService: CbmNotificationService, destroyRef: DestroyRef, accountValidatorsDomainService: AccountValidatorsDomainService, generalSettingsPartnersRepository: CbmGeneralSettingsPartnersDomainRepository, territorialOrganizationRepository: CbmTerritorialOrganizationRepository, bankRepository: CbmBankRepository, generalService: GeneralDomainService);
|
|
48
|
+
ngOnDestroy(): void;
|
|
38
49
|
generalSettingsConfiguration: import("@angular/core").WritableSignal<CbmGeneralSettingsPartnersModel.ParametersListResponse.Data | null>;
|
|
39
50
|
confirmationModalRef: import("@angular/core").Signal<ConfirmationModal | undefined>;
|
|
40
51
|
modalConfirmRef: import("@angular/core").Signal<CbmModalConfirmComponent | undefined>;
|
|
52
|
+
contactDetailsTableContainerRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
53
|
+
contactDetailsTableRef: import("@angular/core").Signal<ElementRef<HTMLTableElement> | undefined>;
|
|
54
|
+
contactNgSelectsRefs: import("@angular/core").Signal<readonly NgSelectComponent[]>;
|
|
55
|
+
mapModal: import("@angular/core").Signal<ModalMapComponent | undefined>;
|
|
56
|
+
contactsResizeObserver?: ResizeObserver;
|
|
57
|
+
contactsMutationObserver?: MutationObserver;
|
|
41
58
|
providerId: import("@angular/core").InputSignal<string | undefined>;
|
|
42
59
|
componentConfig: import("@angular/core").InputSignal<CbmAddProviderModel.ComponentConfig>;
|
|
43
60
|
resetForm: import("@angular/core").InputSignal<boolean>;
|
|
@@ -61,6 +78,8 @@ export declare class CbmAddProviderComponent {
|
|
|
61
78
|
statusOfExtractProviderData: import("@angular/core").WritableSignal<TStatus>;
|
|
62
79
|
statusOfFetchGeneralSettingsConfiguration: import("@angular/core").WritableSignal<TStatus>;
|
|
63
80
|
readonly carDelear: import("@angular/core").Signal<boolean>;
|
|
81
|
+
readonly additionalInformation: import("@angular/core").Signal<boolean>;
|
|
82
|
+
readonly showAdditionalInformation: import("@angular/core").Signal<boolean>;
|
|
64
83
|
subjectToSearchDocumentType$: Subject<string>;
|
|
65
84
|
subjectToSearchCategory$: Subject<string>;
|
|
66
85
|
defaultDocumentNumber: string | null;
|
|
@@ -73,7 +92,6 @@ export declare class CbmAddProviderComponent {
|
|
|
73
92
|
};
|
|
74
93
|
SUBJECT_CLASSES: CbmAddProviderModel.SubjectClass[];
|
|
75
94
|
previousDealerConfiguration: import("@angular/core").WritableSignal<boolean>;
|
|
76
|
-
documentNumberDisplay: FormControl<string | null>;
|
|
77
95
|
providerForm: FormGroup<{
|
|
78
96
|
documentType: FormControl<CbmDocumentTypeModel.ListResponse.Data | null>;
|
|
79
97
|
documentNumber: FormControl<string | null>;
|
|
@@ -93,8 +111,69 @@ export declare class CbmAddProviderComponent {
|
|
|
93
111
|
}>;
|
|
94
112
|
subjectClass: import("@angular/core").Signal<CbmAddProviderModel.SubjectClass | null>;
|
|
95
113
|
filteredDocumentTypes: import("@angular/core").Signal<CbmDocumentTypeModel.ListResponse.Data[]>;
|
|
114
|
+
territorialForm: FormGroup<{
|
|
115
|
+
province: FormControl<CbmTerritorialOrganizationModel.ListProvincesResponse.Data | null>;
|
|
116
|
+
canton: FormControl<CbmTerritorialOrganizationModel.ListCantonsResponse.Data | null>;
|
|
117
|
+
parish: FormControl<CbmTerritorialOrganizationModel.ListParishesResponse.Data | null>;
|
|
118
|
+
latitude: FormControl<string | null>;
|
|
119
|
+
longitude: FormControl<string | null>;
|
|
120
|
+
}>;
|
|
121
|
+
contactForm: FormArray<TContactRow>;
|
|
122
|
+
additionalDataForm: FormGroup<{
|
|
123
|
+
phone: FormControl<string | null>;
|
|
124
|
+
observation: FormControl<string | null>;
|
|
125
|
+
}>;
|
|
126
|
+
bankForm: FormGroup<{
|
|
127
|
+
bank: FormControl<CbmBankModel.ListResponse.Item | null>;
|
|
128
|
+
accountType: FormControl<string | null>;
|
|
129
|
+
accountNumber: FormControl<string | null>;
|
|
130
|
+
documentTypePay: FormControl<CbmDocumentTypeModel.ListResponse.Data | null>;
|
|
131
|
+
documentNumberPay: FormControl<string | null>;
|
|
132
|
+
}>;
|
|
133
|
+
othersForm: FormGroup<{
|
|
134
|
+
paymentToResident: FormControl<string | null>;
|
|
135
|
+
supplierAbbreviation: FormControl<string | null>;
|
|
136
|
+
foreignTaxRegimeType: FormControl<string | null>;
|
|
137
|
+
paymentCountry: FormControl<CbmCountryCodeModel.ListResponse.Data | null>;
|
|
138
|
+
paymentDestinationCountry: FormControl<CbmCountryCodeModel.ListResponse.Data | null>;
|
|
139
|
+
doubleTaxationTreatyApplies: FormControl<boolean>;
|
|
140
|
+
legalWithholdingApplies: FormControl<boolean>;
|
|
141
|
+
}>;
|
|
142
|
+
foreignTaxRegimes: {
|
|
143
|
+
value: string;
|
|
144
|
+
label: string;
|
|
145
|
+
}[];
|
|
146
|
+
paymentToResidentOptions: {
|
|
147
|
+
value: string;
|
|
148
|
+
label: string;
|
|
149
|
+
}[];
|
|
150
|
+
provinces$: ListService<CbmTerritorialOrganizationModel.ListProvincesResponse, CbmTerritorialOrganizationModel.ListProvincesParams, CbmTerritorialOrganizationModel.ListProvincesResponse.Data[]>;
|
|
151
|
+
cantons$: ListService<CbmTerritorialOrganizationModel.ListCantonsResponse, CbmTerritorialOrganizationModel.ListCantonsParams, CbmTerritorialOrganizationModel.ListCantonsResponse.Data[]>;
|
|
152
|
+
parishes$: ListService<CbmTerritorialOrganizationModel.ListParishesResponse, CbmTerritorialOrganizationModel.ListParishesParams, CbmTerritorialOrganizationModel.ListParishesResponse.Data[]>;
|
|
153
|
+
banks$: PaginatedListService<CbmBankModel.ListResponse, CbmBankModel.ListParams, CbmBankModel.ListResponse.Item[]>;
|
|
154
|
+
documentTypesPay$: ListService<CbmDocumentTypeModel.ListResponse, CbmDocumentTypeModel.ListParams, CbmDocumentTypeModel.ListResponse.Data[]>;
|
|
96
155
|
economicActivity$: PaginatedListService<CbmEconomicActivitiesDomainModel.ListResponse, CbmEconomicActivitiesDomainModel.ListParams, CbmEconomicActivitiesDomainModel.ListResponse.Data[]>;
|
|
97
156
|
ngOnInit(): void;
|
|
157
|
+
private makeAdditionalInformationSubscriptions;
|
|
158
|
+
private loadAdditionalInformationCatalogs;
|
|
159
|
+
filterCountryCode: (term: string, item: CbmCountryCodeModel.ListResponse.Data) => boolean;
|
|
160
|
+
setGeographicalData(coords: {
|
|
161
|
+
lat: number;
|
|
162
|
+
lng: number;
|
|
163
|
+
}): void;
|
|
164
|
+
private buildContactRow;
|
|
165
|
+
addNewRowToContact(): void;
|
|
166
|
+
deleteRowToContact(index: number): void;
|
|
167
|
+
getCi(detail: TContactRow): void;
|
|
168
|
+
/**
|
|
169
|
+
* Solo al agregar y con `additionalInformation()` en `true` (`showAdditionalInformation()`): arma la
|
|
170
|
+
* información de los navs con los mismos nombres de campo que mandan sus pantallas reales —
|
|
171
|
+
* `provider/geographical-data` (objeto), `provider/contacts` (arreglo, enviado como `provider_contact`) y
|
|
172
|
+
* `provider/management` (datos adicionales, bancos y otros) — pendiente de confirmar con backend que el
|
|
173
|
+
* endpoint de proveedor ya acepta este payload extendido. Lo que no aplica simplemente no se envía.
|
|
174
|
+
*/
|
|
175
|
+
private buildAdditionalInformationPayload;
|
|
176
|
+
private resetNavForms;
|
|
98
177
|
get documentTypeControl(): FormControl<CbmDocumentTypeModel.ListResponse.Data | null>;
|
|
99
178
|
get documentNumberControl(): FormControl<string | null>;
|
|
100
179
|
get categoryControl(): FormControl<CbmProviderGroupModel.ListAsTreeResponse.Category | null>;
|
|
@@ -118,6 +197,7 @@ export declare class CbmAddProviderComponent {
|
|
|
118
197
|
private isDocumentTypeAllowed;
|
|
119
198
|
documentNumberValidator(): ValidatorFn;
|
|
120
199
|
asyncDocumentNumberValidator(): AsyncValidatorFn;
|
|
200
|
+
private checkRelatedDocument;
|
|
121
201
|
noWhitespaceValidator(): ValidatorFn;
|
|
122
202
|
emailsValidator(): ValidatorFn;
|
|
123
203
|
fetchProviderData(): void;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { DestroyRef, OnInit } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, DestroyRef, OnInit } from '@angular/core';
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
3
|
import { INominatimModel } from '../../domain/models/nominatim.domain.model';
|
|
4
4
|
import { NominatimDomainRepository } from '../../domain/repositories/nominatim.domain.repository';
|
|
5
5
|
import { CbmAuthService } from '../../domain/services/auth/auth.service';
|
|
6
6
|
export declare class LocationSearchComponent implements OnInit {
|
|
7
7
|
private readonly destroyRef;
|
|
8
|
+
private readonly changeDetectorRef;
|
|
8
9
|
private readonly nominatimRepository;
|
|
9
10
|
private readonly authService;
|
|
10
|
-
constructor(destroyRef: DestroyRef, nominatimRepository: NominatimDomainRepository, authService: CbmAuthService);
|
|
11
|
+
constructor(destroyRef: DestroyRef, changeDetectorRef: ChangeDetectorRef, nominatimRepository: NominatimDomainRepository, authService: CbmAuthService);
|
|
11
12
|
searchControl: FormControl<string>;
|
|
12
13
|
nominatimData: import("@angular/core").WritableSignal<INominatimModel.Response[]>;
|
|
13
14
|
stOfLocation: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -15,5 +16,6 @@ export declare class LocationSearchComponent implements OnInit {
|
|
|
15
16
|
ngOnInit(): void;
|
|
16
17
|
private makeSubscriptions;
|
|
17
18
|
reverseAddress(lat: string | number, lon: string | number): Promise<void>;
|
|
19
|
+
clear(): void;
|
|
18
20
|
emitValue(address: INominatimModel.Response): void;
|
|
19
21
|
}
|
|
@@ -15,7 +15,7 @@ export declare class ModalMapComponent implements AfterViewInit, OnDestroy {
|
|
|
15
15
|
lat: number;
|
|
16
16
|
lng: number;
|
|
17
17
|
}>;
|
|
18
|
-
origenModal:
|
|
18
|
+
origenModal: import("@angular/core").WritableSignal<"ver" | "fijar">;
|
|
19
19
|
coordinates: import("@angular/core").InputSignal<{
|
|
20
20
|
latitude?: number | null;
|
|
21
21
|
longitude?: number | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare namespace CbmHistoryModel {
|
|
2
2
|
type TValidateItem = 'item' | 'service' | 'kit';
|
|
3
|
+
type TOperationSource = 'web' | 'mcp_internal' | 'mcp_external';
|
|
3
4
|
interface ListParams {
|
|
4
5
|
page: number;
|
|
5
6
|
size: number;
|
|
@@ -48,6 +49,7 @@ export declare namespace CbmHistoryModel {
|
|
|
48
49
|
response_code: string;
|
|
49
50
|
event_module_id: string;
|
|
50
51
|
reason?: string;
|
|
52
|
+
operation_source?: TOperationSource;
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
interface ValidatePartnerParams {
|
|
@@ -69,6 +69,7 @@ export declare namespace CbmProviderModel {
|
|
|
69
69
|
document_name_pay?: string;
|
|
70
70
|
foreign_tax_regime_type?: string;
|
|
71
71
|
payment_to_resident?: string;
|
|
72
|
+
supplier_abbreviation?: string;
|
|
72
73
|
payment_country_code?: string;
|
|
73
74
|
payment_country_name?: string;
|
|
74
75
|
payment_destination_country_code?: string;
|
|
@@ -132,6 +133,7 @@ export declare namespace CbmProviderModel {
|
|
|
132
133
|
document_name_pay?: string;
|
|
133
134
|
foreign_tax_regime_type?: string;
|
|
134
135
|
payment_to_resident?: string;
|
|
136
|
+
supplier_abbreviation?: string;
|
|
135
137
|
payment_country_code?: string;
|
|
136
138
|
payment_country_name?: string;
|
|
137
139
|
payment_destination_country_code?: string;
|
|
@@ -272,6 +274,7 @@ export declare namespace CbmProviderModel {
|
|
|
272
274
|
double_taxation_treaty_applies?: boolean;
|
|
273
275
|
legal_withholding_applies?: string;
|
|
274
276
|
payment_to_resident?: string;
|
|
277
|
+
supplier_abbreviation?: string;
|
|
275
278
|
is_related_party?: boolean;
|
|
276
279
|
contacts?: UpdateManagementBody.Contact[];
|
|
277
280
|
delete_contacts?: string;
|
|
@@ -40,4 +40,87 @@ export declare namespace CbmAiWebSocketModel {
|
|
|
40
40
|
ok: boolean;
|
|
41
41
|
runs?: ActiveRun[];
|
|
42
42
|
}
|
|
43
|
+
/** `mine`: las corridas del propio usuario; `company`: las de toda la empresa (solo con permiso: `canViewAll`). */
|
|
44
|
+
type FlowRunsScope = 'mine' | 'company';
|
|
45
|
+
type FlowRunStatus = 'running' | 'suspended' | 'done' | 'error' | 'rejected' | 'expired' | 'interrupted';
|
|
46
|
+
type FlowRunNodeStatus = 'pending' | 'running' | 'awaiting' | 'done' | 'error' | 'skipped' | 'stopped';
|
|
47
|
+
/** Quién la inició: una persona desde el chat, el programador o la API. */
|
|
48
|
+
type FlowRunOrigin = 'chat' | 'schedule' | 'api';
|
|
49
|
+
interface FlowRunNode {
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
status: FlowRunNodeStatus;
|
|
53
|
+
/** Herramientas que consultó el paso (no cuenta `preguntar_usuario`). */
|
|
54
|
+
tools: number;
|
|
55
|
+
startedAt?: number;
|
|
56
|
+
finishedAt?: number;
|
|
57
|
+
}
|
|
58
|
+
/** La corrida espera a una persona: una aprobación (paso pausado) o la respuesta de un formulario del agente. */
|
|
59
|
+
interface FlowRunWaiting {
|
|
60
|
+
kind: 'approval' | 'ask';
|
|
61
|
+
nodeId: string;
|
|
62
|
+
message?: string;
|
|
63
|
+
/** Epoch ms en que el servidor deja de esperar. */
|
|
64
|
+
expiresAt?: number;
|
|
65
|
+
}
|
|
66
|
+
/** Una corrida de flujo con su estado por paso. */
|
|
67
|
+
interface FlowRunView {
|
|
68
|
+
runId: string;
|
|
69
|
+
flowId: string;
|
|
70
|
+
flowName: string;
|
|
71
|
+
status: FlowRunStatus;
|
|
72
|
+
origin: FlowRunOrigin;
|
|
73
|
+
startedAt: number;
|
|
74
|
+
/** Último cambio de la corrida (el de este upsert). */
|
|
75
|
+
updatedAt: number;
|
|
76
|
+
finishedAt?: number;
|
|
77
|
+
/** Tiempo de trabajo (sin esperas) AL MOMENTO del último upsert. */
|
|
78
|
+
durationMs: number;
|
|
79
|
+
/** Tiempo esperando decisiones, acumulado hasta el último upsert. */
|
|
80
|
+
waitedMs: number;
|
|
81
|
+
user: {
|
|
82
|
+
id: string;
|
|
83
|
+
name: string;
|
|
84
|
+
};
|
|
85
|
+
conversationId?: string;
|
|
86
|
+
/** Solo corridas en segundo plano: la corrida de chat que la emite. */
|
|
87
|
+
chatRunId?: string;
|
|
88
|
+
model?: string;
|
|
89
|
+
totalNodes: number;
|
|
90
|
+
executedNodes: number;
|
|
91
|
+
currentNode?: {
|
|
92
|
+
id: string;
|
|
93
|
+
name: string;
|
|
94
|
+
index: number;
|
|
95
|
+
};
|
|
96
|
+
nodes: FlowRunNode[];
|
|
97
|
+
waiting?: FlowRunWaiting;
|
|
98
|
+
error?: {
|
|
99
|
+
nodeId?: string;
|
|
100
|
+
message: string;
|
|
101
|
+
};
|
|
102
|
+
usage?: {
|
|
103
|
+
inputTokens?: number;
|
|
104
|
+
outputTokens?: number;
|
|
105
|
+
totalTokens?: number;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/** Acuse de `flow-runs:watch`. */
|
|
109
|
+
type FlowRunsWatchAck = {
|
|
110
|
+
ok: true;
|
|
111
|
+
canViewAll: boolean;
|
|
112
|
+
snapshot: FlowRunView[];
|
|
113
|
+
truncated: boolean;
|
|
114
|
+
seq: number;
|
|
115
|
+
} | {
|
|
116
|
+
ok: false;
|
|
117
|
+
error: 'forbidden' | 'invalid-request' | 'unavailable' | string;
|
|
118
|
+
};
|
|
119
|
+
/** `flow-runs:event`: la corrida completa (no un parche). */
|
|
120
|
+
interface FlowRunsEvent {
|
|
121
|
+
scope: FlowRunsScope;
|
|
122
|
+
seq: number;
|
|
123
|
+
type: 'upsert';
|
|
124
|
+
run: FlowRunView;
|
|
125
|
+
}
|
|
43
126
|
}
|
|
@@ -40,6 +40,20 @@ export declare class CbmAiWebSocketService {
|
|
|
40
40
|
unwatchRun(runId: string): void;
|
|
41
41
|
/** Corridas en curso del usuario (retomar al recargar o desde otra pestaña). */
|
|
42
42
|
activeRuns(): Promise<CbmAiWebSocketModel.ActiveRunsAck>;
|
|
43
|
+
/**
|
|
44
|
+
* Se une a la sala de corridas de flujos del alcance dado y devuelve el snapshot con el `seq` actual. Cada sala (`mine` y
|
|
45
|
+
* `company`) numera sus eventos de forma consecutiva: si un `flow-runs:event` no trae el último `seq` + 1 hay un hueco y
|
|
46
|
+
* hay que volver a llamar a este método (snapshot nuevo); al reconectar el socket también (no existe `afterSeq`). Rechaza con
|
|
47
|
+
* `name === CBM_AI_SOCKET_DISCONNECTED` si el socket no está conectado o se corta mientras espera.
|
|
48
|
+
*/
|
|
49
|
+
watchFlowRuns(scope: CbmAiWebSocketModel.FlowRunsScope): Promise<CbmAiWebSocketModel.FlowRunsWatchAck>;
|
|
50
|
+
/** Deja de recibir las corridas de flujos del alcance (no las detiene). */
|
|
51
|
+
unwatchFlowRuns(scope: CbmAiWebSocketModel.FlowRunsScope): void;
|
|
52
|
+
/**
|
|
53
|
+
* Corridas de flujos en vivo de las salas vigiladas (`flow-runs:event`): siempre la corrida completa (`upsert`). No hay evento
|
|
54
|
+
* de baja: una corrida terminada llega con un último upsert (`finishedAt`) y quien consume decide cuánto tiempo la muestra.
|
|
55
|
+
*/
|
|
56
|
+
onFlowRunsEvent(): Observable<CbmAiWebSocketModel.FlowRunsEvent>;
|
|
43
57
|
private request;
|
|
44
58
|
private rejectPending;
|
|
45
59
|
private disconnectedError;
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
-
export declare class DropdownMenuDirective implements OnChanges, AfterViewInit {
|
|
3
|
-
private element;
|
|
4
|
-
private renderer2;
|
|
5
|
-
hiddenMenu: import("@angular/core").InputSignal<boolean>;
|
|
6
|
-
hiddenMenuOp: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
-
constructor(element: ElementRef, renderer2: Renderer2);
|
|
8
|
-
ngAfterViewInit(): void;
|
|
9
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
-
toggle(event: Event): void;
|
|
11
|
-
private toggleMenu;
|
|
12
|
-
initStyle(): void;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
-
export declare class DropdownDirective implements AfterViewInit {
|
|
3
|
-
private elementRef;
|
|
4
|
-
private renderer;
|
|
5
|
-
private isOpen;
|
|
6
|
-
constructor(elementRef: ElementRef, renderer: Renderer2);
|
|
7
|
-
ngAfterViewInit(): void;
|
|
8
|
-
toggleDropdown(event: MouseEvent): void;
|
|
9
|
-
closeDropdown(event: MouseEvent): void;
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { WritableSignal } from '@angular/core';
|
|
2
|
-
import { Router, ActivatedRoute, Params } from '@angular/router';
|
|
3
|
-
import { CbmRecordDetailMetadataModel } from "../../types";
|
|
4
|
-
export declare class OptionsComponent {
|
|
5
|
-
private router;
|
|
6
|
-
private route;
|
|
7
|
-
constructor(router: Router, route: ActivatedRoute);
|
|
8
|
-
metadata: import("@angular/core").InputSignal<CbmRecordDetailMetadataModel.metadata | null>;
|
|
9
|
-
options: import("@angular/core").InputSignal<CbmRecordDetailMetadataModel.options[] | undefined>;
|
|
10
|
-
optionInSignals: WritableSignal<WritableSignal<CbmRecordDetailMetadataModel.options>[]>;
|
|
11
|
-
executeFunction(option: WritableSignal<CbmRecordDetailMetadataModel.options>): void;
|
|
12
|
-
navigate(routerLink?: string, queryParams?: Params): void;
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
-
export declare class DropdownMenuDirective implements OnChanges, AfterViewInit {
|
|
3
|
-
private element;
|
|
4
|
-
private renderer2;
|
|
5
|
-
hiddenMenu: import("@angular/core").InputSignal<boolean>;
|
|
6
|
-
hiddenMenuOp: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
-
constructor(element: ElementRef, renderer2: Renderer2);
|
|
8
|
-
ngAfterViewInit(): void;
|
|
9
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
-
toggle(event: Event): void;
|
|
11
|
-
private toggleMenu;
|
|
12
|
-
initStyle(): void;
|
|
13
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
-
export declare class DropdownDirective {
|
|
3
|
-
private elementRef;
|
|
4
|
-
private renderer;
|
|
5
|
-
private isOpen;
|
|
6
|
-
constructor(elementRef: ElementRef, renderer: Renderer2);
|
|
7
|
-
toggleDropdown(event: MouseEvent): void;
|
|
8
|
-
closeDropdown(event: MouseEvent): void;
|
|
9
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
export declare namespace CbmSalesPendingDocumentModel {
|
|
2
|
-
type TTypeEstablishment = 'matrix' | 'branch';
|
|
3
|
-
export interface ListParams {
|
|
4
|
-
page: number;
|
|
5
|
-
size: number;
|
|
6
|
-
document_number?: string;
|
|
7
|
-
date_end?: number;
|
|
8
|
-
date_begin?: number;
|
|
9
|
-
client_id?: string;
|
|
10
|
-
client_branch_id?: string;
|
|
11
|
-
type?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ListResponse {
|
|
14
|
-
success: boolean;
|
|
15
|
-
pageNum: number;
|
|
16
|
-
pageSize: number;
|
|
17
|
-
pages: number;
|
|
18
|
-
total: number;
|
|
19
|
-
totales: ListResponse.totales;
|
|
20
|
-
items: ListResponse.Item[];
|
|
21
|
-
}
|
|
22
|
-
export namespace ListResponse {
|
|
23
|
-
interface Item {
|
|
24
|
-
_id: string;
|
|
25
|
-
created_at: number;
|
|
26
|
-
document_nomenclature: string;
|
|
27
|
-
document_emission_point_number: string;
|
|
28
|
-
document_sequence: string;
|
|
29
|
-
balance: number;
|
|
30
|
-
client_id: string;
|
|
31
|
-
client_payment_deadline?: number;
|
|
32
|
-
client_credit_limit?: number;
|
|
33
|
-
client_business_name: string;
|
|
34
|
-
client_trade_name: string;
|
|
35
|
-
client_document_number: string;
|
|
36
|
-
client_credit_application: boolean;
|
|
37
|
-
client_price_list_id: string;
|
|
38
|
-
client_price_list_code: string;
|
|
39
|
-
client_price_list_name: string;
|
|
40
|
-
client_document_type_id: string;
|
|
41
|
-
client_document_type_name: string;
|
|
42
|
-
client_document_type_code: string;
|
|
43
|
-
client_category_id: string;
|
|
44
|
-
client_category_name: string;
|
|
45
|
-
client_branch_id: string;
|
|
46
|
-
client_branch_code: string;
|
|
47
|
-
client_branch_name: string;
|
|
48
|
-
client_branch_address: string;
|
|
49
|
-
client_branch_email: string[];
|
|
50
|
-
client_branch_phone_code?: string;
|
|
51
|
-
client_branch_phone?: string;
|
|
52
|
-
client_branch_cellphone?: string;
|
|
53
|
-
client_branch_type_establishment: `${TTypeEstablishment}`;
|
|
54
|
-
client_branch_province_id?: string;
|
|
55
|
-
client_branch_province_code?: string;
|
|
56
|
-
client_branch_province_name?: string;
|
|
57
|
-
client_branch_canton_id?: string;
|
|
58
|
-
client_branch_canton_code?: string;
|
|
59
|
-
client_branch_canton_name?: string;
|
|
60
|
-
client_branch_parish_id?: string;
|
|
61
|
-
client_branch_parish_code?: string;
|
|
62
|
-
client_branch_parish_name?: string;
|
|
63
|
-
client_branch_longitude?: number;
|
|
64
|
-
client_branch_latitude?: number;
|
|
65
|
-
client_branch_seller_id: string;
|
|
66
|
-
client_branch_seller_identification_number: string;
|
|
67
|
-
client_branch_seller_full_name: string;
|
|
68
|
-
client_branch_seller_address: string;
|
|
69
|
-
client_branch_seller_email: string[];
|
|
70
|
-
client_branch_seller_cellphone: string;
|
|
71
|
-
client_branch_contact_id?: string;
|
|
72
|
-
client_branch_contact_identification_number?: string;
|
|
73
|
-
client_branch_contact_full_name?: string;
|
|
74
|
-
client_branch_contact_cellphone?: string;
|
|
75
|
-
client_branch_contact_email?: string[];
|
|
76
|
-
new_document_number: string;
|
|
77
|
-
date: number;
|
|
78
|
-
type: string;
|
|
79
|
-
checked?: boolean;
|
|
80
|
-
}
|
|
81
|
-
interface totales {
|
|
82
|
-
total_retention?: number;
|
|
83
|
-
total_down_payment?: number;
|
|
84
|
-
total_credit_note?: number;
|
|
85
|
-
total_initial_balance_retention?: number;
|
|
86
|
-
total_initial_balance_down_payment?: number;
|
|
87
|
-
total_initial_balance_credit_note?: number;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
export {};
|
|
91
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { CbmSalesPendingDocumentModel } from '../models/sales-pending-document.domain.model';
|
|
3
|
-
import { ICbmSalesPendingDocumentRepository } from '../../infrastructure/repositories/sales-pending-document.infrastructure.repository';
|
|
4
|
-
export declare class CbmSalesPendingDocumentRepository implements ICbmSalesPendingDocumentRepository {
|
|
5
|
-
private service;
|
|
6
|
-
constructor(service: ICbmSalesPendingDocumentRepository);
|
|
7
|
-
list(params: CbmSalesPendingDocumentModel.ListParams): Observable<CbmSalesPendingDocumentModel.ListResponse>;
|
|
8
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { CbmBlanketAgreementCategoryServiceModel } from "../../domain/models/blanket-agreement-category-service.domain.model";
|
|
3
|
-
export interface ICbmBlanketAgreementCategoryServiceRepository {
|
|
4
|
-
list(params: CbmBlanketAgreementCategoryServiceModel.ListParams): Observable<CbmBlanketAgreementCategoryServiceModel.ListResponse>;
|
|
5
|
-
save(data: CbmBlanketAgreementCategoryServiceModel.SaveBody): Observable<CbmBlanketAgreementCategoryServiceModel.ConfirmResponse>;
|
|
6
|
-
delete(id: string): Observable<CbmBlanketAgreementCategoryServiceModel.ConfirmResponse>;
|
|
7
|
-
}
|
package/lib/infrastructure/repositories/sales-pending-document.infrastructure.repository.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { CbmSalesPendingDocumentModel } from '../../domain/models/sales-pending-document.domain.model';
|
|
3
|
-
export interface ICbmSalesPendingDocumentRepository {
|
|
4
|
-
list(params: CbmSalesPendingDocumentModel.ListParams): Observable<CbmSalesPendingDocumentModel.ListResponse>;
|
|
5
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { CbmSalesPendingDocumentModel } from '../../domain/models/sales-pending-document.domain.model';
|
|
4
|
-
export declare class CbmSalesPendingDocumentService {
|
|
5
|
-
private http;
|
|
6
|
-
constructor(http: HttpClient);
|
|
7
|
-
private readonly url;
|
|
8
|
-
list(params: CbmSalesPendingDocumentModel.ListParams): Observable<CbmSalesPendingDocumentModel.ListResponse>;
|
|
9
|
-
}
|