hvp-shared 6.81.0 → 6.83.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.
@@ -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;
@@ -62,6 +62,11 @@ export interface PayrollCalculationContext {
62
62
  readonly employerImssRate?: number;
63
63
  readonly workedHours: number;
64
64
  readonly hourlyRate?: number;
65
+ readonly dailySalary?: number;
66
+ readonly separationType?: string;
67
+ readonly yearsOfService?: number;
68
+ readonly daysWorkedInYear?: number;
69
+ readonly vacationDaysToPay?: number;
65
70
  }
66
71
  export interface PayrollEmployeeSnapshot {
67
72
  readonly fullName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "6.81.0",
3
+ "version": "6.83.0",
4
4
  "description": "Shared types and utilities for HVP backend and frontend",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",