hvp-shared 6.82.0 → 6.84.0
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/dist/constants/background-job.constants.d.ts +2 -1
- package/dist/constants/background-job.constants.js +2 -0
- package/dist/constants/catalog-item.constants.d.ts +28 -0
- package/dist/constants/catalog-item.constants.js +40 -1
- package/dist/contracts/catalog-item/requests.d.ts +7 -1
- package/dist/contracts/catalog-item/responses.d.ts +15 -1
- package/package.json +1 -1
|
@@ -25,7 +25,8 @@ export declare enum JobType {
|
|
|
25
25
|
SYNC_INVENTORY_SNAPSHOT = "SYNC_INVENTORY_SNAPSHOT",
|
|
26
26
|
SYNC_COLLECTION_DETAILS = "SYNC_COLLECTION_DETAILS",
|
|
27
27
|
SYNC_BATCH = "SYNC_BATCH",
|
|
28
|
-
SYNC_ALL = "SYNC_ALL"
|
|
28
|
+
SYNC_ALL = "SYNC_ALL",
|
|
29
|
+
SYNC_FACTURAMA_PRODUCTS = "SYNC_FACTURAMA_PRODUCTS"
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
32
|
* Report types for batch sync operations.
|
|
@@ -30,6 +30,7 @@ var JobType;
|
|
|
30
30
|
JobType["SYNC_COLLECTION_DETAILS"] = "SYNC_COLLECTION_DETAILS";
|
|
31
31
|
JobType["SYNC_BATCH"] = "SYNC_BATCH";
|
|
32
32
|
JobType["SYNC_ALL"] = "SYNC_ALL";
|
|
33
|
+
JobType["SYNC_FACTURAMA_PRODUCTS"] = "SYNC_FACTURAMA_PRODUCTS";
|
|
33
34
|
})(JobType || (exports.JobType = JobType = {}));
|
|
34
35
|
/**
|
|
35
36
|
* Report types for batch sync operations.
|
|
@@ -142,6 +143,7 @@ exports.JOB_TYPE_LABELS = {
|
|
|
142
143
|
[JobType.SYNC_COLLECTION_DETAILS]: 'Sincronizar Cobros Detalle',
|
|
143
144
|
[JobType.SYNC_BATCH]: 'Sincronización por Lotes',
|
|
144
145
|
[JobType.SYNC_ALL]: 'Sincronizar Todo',
|
|
146
|
+
[JobType.SYNC_FACTURAMA_PRODUCTS]: 'Sincronizar Productos Facturama',
|
|
145
147
|
};
|
|
146
148
|
/**
|
|
147
149
|
* Human-readable labels for report types (Spanish for UI)
|
|
@@ -138,6 +138,34 @@ export declare enum Brand {
|
|
|
138
138
|
* All Brand values as array (for dropdowns)
|
|
139
139
|
*/
|
|
140
140
|
export declare const BRAND_VALUES: Brand[];
|
|
141
|
+
/**
|
|
142
|
+
* FacturamaSyncStatus - Status of sync with Facturama Product API
|
|
143
|
+
*/
|
|
144
|
+
export declare enum FacturamaSyncStatus {
|
|
145
|
+
/** Never synced to Facturama */
|
|
146
|
+
NOT_SYNCED = "not_synced",
|
|
147
|
+
/** Successfully synced */
|
|
148
|
+
SYNCED = "synced",
|
|
149
|
+
/** Changes made since last sync */
|
|
150
|
+
PENDING = "pending",
|
|
151
|
+
/** Last sync attempt failed */
|
|
152
|
+
ERROR = "error"
|
|
153
|
+
}
|
|
154
|
+
export declare const FACTURAMA_SYNC_STATUS_VALUES: FacturamaSyncStatus[];
|
|
155
|
+
export declare const FACTURAMA_SYNC_STATUS_LABELS: Record<FacturamaSyncStatus, string>;
|
|
156
|
+
/**
|
|
157
|
+
* IvaType - IVA treatment for Facturama products
|
|
158
|
+
*/
|
|
159
|
+
export declare enum IvaType {
|
|
160
|
+
/** IVA Tasa 0% (registered medicines) */
|
|
161
|
+
TASA_0 = "tasa_0",
|
|
162
|
+
/** IVA Exento (professional services) */
|
|
163
|
+
EXENTO = "exento",
|
|
164
|
+
/** IVA Tasa 16% (standard rate) */
|
|
165
|
+
TASA_16 = "tasa_16"
|
|
166
|
+
}
|
|
167
|
+
export declare const IVA_TYPE_VALUES: IvaType[];
|
|
168
|
+
export declare const IVA_TYPE_LABELS: Record<IvaType, string>;
|
|
141
169
|
/**
|
|
142
170
|
* SyncStatus - Status of sync with QVET
|
|
143
171
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Enums and constants for catalog items (products/services from QVET).
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.SYNC_STATUS_LABELS = exports.SYNC_STATUS_VALUES = exports.SyncStatus = exports.BRAND_VALUES = exports.Brand = exports.TARIFF_TYPE_LABELS = exports.TARIFF_TYPE_VALUES = exports.TariffType = exports.ARTICLE_TYPE_VALUES = exports.ArticleType = exports.EDITABLE_STOCK_POLICIES = exports.STOCK_POLICY_LABELS = exports.STOCK_POLICY_VALUES = exports.StockPolicy = exports.USAGE_TYPE_LABELS = exports.USAGE_TYPE_VALUES = exports.UsageType = void 0;
|
|
8
|
+
exports.SYNC_STATUS_LABELS = exports.SYNC_STATUS_VALUES = exports.SyncStatus = exports.IVA_TYPE_LABELS = exports.IVA_TYPE_VALUES = exports.IvaType = exports.FACTURAMA_SYNC_STATUS_LABELS = exports.FACTURAMA_SYNC_STATUS_VALUES = exports.FacturamaSyncStatus = exports.BRAND_VALUES = exports.Brand = exports.TARIFF_TYPE_LABELS = exports.TARIFF_TYPE_VALUES = exports.TariffType = exports.ARTICLE_TYPE_VALUES = exports.ArticleType = exports.EDITABLE_STOCK_POLICIES = exports.STOCK_POLICY_LABELS = exports.STOCK_POLICY_VALUES = exports.StockPolicy = exports.USAGE_TYPE_LABELS = exports.USAGE_TYPE_VALUES = exports.UsageType = void 0;
|
|
9
9
|
/**
|
|
10
10
|
* UsageType - How the item is used in HVP
|
|
11
11
|
*
|
|
@@ -167,6 +167,45 @@ var Brand;
|
|
|
167
167
|
* All Brand values as array (for dropdowns)
|
|
168
168
|
*/
|
|
169
169
|
exports.BRAND_VALUES = Object.values(Brand);
|
|
170
|
+
/**
|
|
171
|
+
* FacturamaSyncStatus - Status of sync with Facturama Product API
|
|
172
|
+
*/
|
|
173
|
+
var FacturamaSyncStatus;
|
|
174
|
+
(function (FacturamaSyncStatus) {
|
|
175
|
+
/** Never synced to Facturama */
|
|
176
|
+
FacturamaSyncStatus["NOT_SYNCED"] = "not_synced";
|
|
177
|
+
/** Successfully synced */
|
|
178
|
+
FacturamaSyncStatus["SYNCED"] = "synced";
|
|
179
|
+
/** Changes made since last sync */
|
|
180
|
+
FacturamaSyncStatus["PENDING"] = "pending";
|
|
181
|
+
/** Last sync attempt failed */
|
|
182
|
+
FacturamaSyncStatus["ERROR"] = "error";
|
|
183
|
+
})(FacturamaSyncStatus || (exports.FacturamaSyncStatus = FacturamaSyncStatus = {}));
|
|
184
|
+
exports.FACTURAMA_SYNC_STATUS_VALUES = Object.values(FacturamaSyncStatus);
|
|
185
|
+
exports.FACTURAMA_SYNC_STATUS_LABELS = {
|
|
186
|
+
[FacturamaSyncStatus.NOT_SYNCED]: 'No sincronizado',
|
|
187
|
+
[FacturamaSyncStatus.SYNCED]: 'Sincronizado',
|
|
188
|
+
[FacturamaSyncStatus.PENDING]: 'Pendiente',
|
|
189
|
+
[FacturamaSyncStatus.ERROR]: 'Error',
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* IvaType - IVA treatment for Facturama products
|
|
193
|
+
*/
|
|
194
|
+
var IvaType;
|
|
195
|
+
(function (IvaType) {
|
|
196
|
+
/** IVA Tasa 0% (registered medicines) */
|
|
197
|
+
IvaType["TASA_0"] = "tasa_0";
|
|
198
|
+
/** IVA Exento (professional services) */
|
|
199
|
+
IvaType["EXENTO"] = "exento";
|
|
200
|
+
/** IVA Tasa 16% (standard rate) */
|
|
201
|
+
IvaType["TASA_16"] = "tasa_16";
|
|
202
|
+
})(IvaType || (exports.IvaType = IvaType = {}));
|
|
203
|
+
exports.IVA_TYPE_VALUES = Object.values(IvaType);
|
|
204
|
+
exports.IVA_TYPE_LABELS = {
|
|
205
|
+
[IvaType.TASA_0]: 'Tasa 0%',
|
|
206
|
+
[IvaType.EXENTO]: 'Exento',
|
|
207
|
+
[IvaType.TASA_16]: 'Tasa 16%',
|
|
208
|
+
};
|
|
170
209
|
/**
|
|
171
210
|
* SyncStatus - Status of sync with QVET
|
|
172
211
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Request DTOs for catalog item endpoints.
|
|
5
5
|
*/
|
|
6
|
-
import { UsageType, SyncStatus, StockPolicy } from '../../constants/catalog-item.constants';
|
|
6
|
+
import { UsageType, SyncStatus, StockPolicy, IvaType } from '../../constants/catalog-item.constants';
|
|
7
7
|
import { PricePolicy, PricingTier } from '../../constants/pricing.constants';
|
|
8
8
|
/**
|
|
9
9
|
* Query filters for listing catalog items
|
|
@@ -113,6 +113,12 @@ export interface UpdateCatalogItemHvpDataRequest {
|
|
|
113
113
|
stockObservations?: string;
|
|
114
114
|
/** @deprecated Use stockPolicy: 'manual' instead */
|
|
115
115
|
requiresManualReview?: boolean;
|
|
116
|
+
/** Manual override for SAT ClaveProdServ */
|
|
117
|
+
satProductCode?: string;
|
|
118
|
+
/** Manual override for SAT ClaveUnidad */
|
|
119
|
+
satUnitCode?: string;
|
|
120
|
+
/** Manual override for IVA treatment */
|
|
121
|
+
ivaType?: IvaType;
|
|
116
122
|
}
|
|
117
123
|
/**
|
|
118
124
|
* Update stock levels for a warehouse (sets pending)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Response DTOs for catalog item endpoints.
|
|
5
5
|
*/
|
|
6
6
|
import { SyncField } from '../../types/sync-field.types';
|
|
7
|
-
import { UsageType, SyncStatus, StockPolicy } from '../../constants/catalog-item.constants';
|
|
7
|
+
import { UsageType, SyncStatus, StockPolicy, FacturamaSyncStatus, IvaType } from '../../constants/catalog-item.constants';
|
|
8
8
|
import { PricePolicy, PricingTier } from '../../constants/pricing.constants';
|
|
9
9
|
import { Warehouse } from '../../types/qvet.types';
|
|
10
10
|
/**
|
|
@@ -145,6 +145,20 @@ export interface CatalogItemDetailResponse {
|
|
|
145
145
|
stockObservations?: string;
|
|
146
146
|
/** @deprecated Use stockPolicy: 'manual' instead */
|
|
147
147
|
requiresManualReview?: boolean;
|
|
148
|
+
/** Facturama product ID */
|
|
149
|
+
facturamaProductId?: string;
|
|
150
|
+
/** Facturama sync status */
|
|
151
|
+
facturamaSyncStatus?: FacturamaSyncStatus;
|
|
152
|
+
/** Last successful Facturama sync */
|
|
153
|
+
facturamaSyncedAt?: string;
|
|
154
|
+
/** Last Facturama sync error message */
|
|
155
|
+
facturamaSyncError?: string;
|
|
156
|
+
/** Manual override for SAT ClaveProdServ */
|
|
157
|
+
satProductCode?: string;
|
|
158
|
+
/** Manual override for SAT ClaveUnidad */
|
|
159
|
+
satUnitCode?: string;
|
|
160
|
+
/** Manual override for IVA treatment */
|
|
161
|
+
ivaType?: IvaType;
|
|
148
162
|
};
|
|
149
163
|
hasPendingChanges: boolean;
|
|
150
164
|
lastSyncAt: string;
|