erp-pos-ecommerce-shared 0.2.21 → 0.2.23

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,5 +1,5 @@
1
1
  export { B as BatchData, I as IAttribute, a as IAttributeFilter, b as IAttributeQueryParams, c as IAttributeResponse, d as IAttributeValue, e as IBatch, f as IBatchResponse, g as ICategory, h as ICategoryRequest, i as ICategoryResponse, j as IFilterSelectOption, k as IFilterType, l as IProduct, m as IProductDetails, n as IProductDetailsResponse, o as IProductResponse, p as IProductVariantRequest, q as IStock, r as ITableFilterConfig, P as ProdStats, s as ProdStock, t as ProductOptions, T as TblCategories, u as TblMaterials, v as TblProductsImage, w as TblProductsTag, x as TblTags } from './filters.interface-BwMi9FRP.js';
2
- export { A as AgentResponse, B as BankTerminalQuery, a as BankTerminalResponse, C as CalculatePriceRequest, b as ChartType, c as ComparisonBy, D as DateRange, I as IAgent, d as IBankTerminal, e as IBankTerminalForm, f as IBankTerminalOption, g as IBankTerminalResponse, h as IClient, i as IClientDataForTable, j as IClientRequest, k as IClientResponse, l as IClientResponseById, m as IGender, n as ILocation, o as ILocationResponse, p as IMaterial, q as IMeta, r as IModule, s as IMovement, t as IMovementResponse, u as IOrder, v as IOrderResponse, w as IPayment, x as IPaymentMethod, y as IPaymentMethodAmountExpected, z as IPermissionRole, E as IPricePerGramHistory, F as IPriceType, G as IPriceTypeResponse, H as IPromotion, J as IPromotionResponse, K as IPromotionType, L as IProvider, M as IProviderForSelect, N as IProviderRequest, O as IProviderResponse, P as IReportComparisonByTimeFrame, Q as IReportInventory, R as IReportX, S as IReportZ, T as IReview, U as IRole, V as IStockByWarehouseReport, W as IStockMovement, X as IStockMovementResponse, Y as ITag, Z as ITax, _ as ITaxResponse, $ as IUser, a0 as IUserForm, a1 as IWareHouse, a2 as IWareHouseResponse, a3 as IWareHouseSelect, a4 as MaterialSummary, a5 as PaymentOptions, a6 as Period, a7 as Permission, a8 as PermissionRole, a9 as PriceCalculationResponse, aa as PricePerGramForm, ab as PricePerGramResponse, ac as ProductInfo, ad as PromotionTypeEnum, ae as ReportData, af as ReportDataProduct, ag as SchedulePriceRequest, ah as TblModules, ai as TblMoneyTransactionTypes, aj as TblMoneyTransactions, ak as TblOrderDetail, al as TblOrderDetailsMoneyTransactions, am as TblOrderStatus, an as TblPermissions, ao as TblPriceTypes, ap as TblProducts, aq as TblPromotionTypes, ar as TblPromotionsTargetProductIDTotblProduct, as as TblProvidersTblProvidersUserIDTotblUser, at as TblReturn, au as TblReturnDetail, av as TblRoles, aw as TblRolesTblUsersRoleIDTotblRoles, ax as TblUsersTblProvidersUserIDTotblUsers, ay as TblUsersTblTotblUsers, az as UpdatePriceRequest, aA as UserResponse, aB as WeightBasedSale } from './warehouse.interface-S5seQY-_.js';
2
+ export { A as AgentResponse, B as BankTerminalQuery, a as BankTerminalResponse, C as CalculatePriceRequest, b as ChartType, c as ComparisonBy, D as DateRange, F as Folio, d as FolioResponse, I as IAgent, e as IBankTerminal, f as IBankTerminalForm, g as IBankTerminalOption, h as IBankTerminalResponse, i as IClient, j as IClientDataForTable, k as IClientRequest, l as IClientResponse, m as IClientResponseById, n as IContpaqOrder, o as IContpaqOrderItem, p as IContpaqOrderPayment, q as IContpaqPaymentMethodTotal, r as IContpaqSalesReport, s as IFolio, t as IFolioResponse, u as IGender, v as ILocation, w as ILocationResponse, x as IMaterial, y as IMeta, z as IModule, E as IMovement, G as IMovementResponse, H as IOrder, J as IOrderResponse, K as IPayment, L as IPaymentMethod, M as IPaymentMethodAmountExpected, N as IPermissionRole, O as IPricePerGramHistory, P as IPriceType, Q as IPriceTypeResponse, R as IPromotion, S as IPromotionResponse, T as IPromotionType, U as IProvider, V as IProviderForSelect, W as IProviderRequest, X as IProviderResponse, Y as IReportComparisonByTimeFrame, Z as IReportInventory, _ as IReportX, $ as IReportZ, a0 as IReview, a1 as IRole, a2 as IStockByWarehouseReport, a3 as IStockMovement, a4 as IStockMovementResponse, a5 as ITag, a6 as ITax, a7 as ITaxResponse, a8 as IUser, a9 as IUserForm, aa as IWareHouse, ab as IWareHouseResponse, ac as IWareHouseSelect, ad as MaterialSummary, ae as PaymentOptions, af as Period, ag as Permission, ah as PermissionRole, ai as PriceCalculationResponse, aj as PricePerGramForm, ak as PricePerGramResponse, al as ProductInfo, am as PromotionTypeEnum, an as ReportData, ao as ReportDataProduct, ap as SchedulePriceRequest, aq as TblModules, ar as TblMoneyTransactionTypes, as as TblMoneyTransactions, at as TblOrderDetail, au as TblOrderDetailsMoneyTransactions, av as TblOrderStatus, aw as TblPermissions, ax as TblPriceTypes, ay as TblProducts, az as TblPromotionTypes, aA as TblPromotionsTargetProductIDTotblProduct, aB as TblProvidersTblProvidersUserIDTotblUser, aC as TblReturn, aD as TblReturnDetail, aE as TblRoles, aF as TblRolesTblUsersRoleIDTotblRoles, aG as TblUsersTblProvidersUserIDTotblUsers, aH as TblUsersTblTotblUsers, aI as UpdatePriceRequest, aJ as UserResponse, aK as WeightBasedSale } from './warehouse.interface-CCyPQruB.js';
3
3
  export { D as DataTableConfig, S as ServerTableState, T as TableHeaderStyle, d as defaultDataTableConfig } from './datatable.interface-DbB5oxj-.js';
4
4
  export { B as ButtonTypes, F as FieldTypes, a as FileType, I as IBaseField, b as IButton, c as IDateField, d as IEmailField, e as IField, f as IFileField, g as IHiddenField, h as IMultiSelectField, i as INumberField, j as IOptions, k as IPasswordField, l as ISelect, m as ISelectField, n as ISwitchField, o as ITagField, p as ITextField, T as TagData } from './form.interface-91Dz2oFr.js';
5
5
  import { ElementType } from 'react';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/interfaces/datatable.interface.ts","../src/interfaces/form.interface.ts","../src/interfaces/permission.interface.ts","../src/interfaces/promotion.interface.ts","../src/interfaces/report.interface.ts"],"names":["Permission","PromotionTypeEnum","ComparisonBy","ChartType"],"mappings":";AAkDO,IAAM,sBAAA,GAA0C;AAAA,EACrD,iBAAiB,CAAC,CAAA,EAAG,EAAA,EAAI,EAAA,EAAI,IAAI,EAAE,CAAA;AAAA,EACnC,eAAA,EAAiB,EAAA;AAAA,EACjB,iBAAA,EAAmB,WAAA;AAAA,EACnB,kBAAA,EAAoB;AACtB;;;AC4FO,IAAM,UAAA,GAAa;AAAA,EACxB,IAAA,EAAM,MAAA;AAAA,EACN,KAAA,EAAO,OAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA,EACR,QAAA,EAAU,UAAA;AAAA,EACV,MAAA,EAAQ,QAAA;AAAA,EACR,WAAA,EAAa,aAAA;AAAA,EACb,IAAA,EAAM,MAAA;AAAA,EACN,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ,QAAA;AAAA,EACR,IAAA,EAAM,MAAA;AAAA,EACN,GAAA,EAAK;AACP;AAMO,IAAM,WAAA,GAAc;AAAA,EACzB,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ,QAAA;AAAA,EACR,KAAA,EAAO;AACT;;;AC1IO,IAAK,UAAA,qBAAAA,WAAAA,KAAL;AACL,EAAAA,YAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,YAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,YAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,YAAA,KAAA,CAAA,GAAM,KAAA;AAJI,EAAA,OAAAA,WAAAA;AAAA,CAAA,EAAA,UAAA,IAAA,EAAA;;;AC0CL,IAAK,iBAAA,qBAAAC,kBAAAA,KAAL;AACL,EAAAA,mBAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,mBAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,mBAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,mBAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AALG,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA;;;AClEL,IAAK,YAAA,qBAAAC,aAAAA,KAAL;AACL,EAAAA,cAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,cAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,cAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,cAAA,QAAA,CAAA,GAAS,QAAA;AAJC,EAAA,OAAAA,aAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA;AAOL,IAAK,SAAA,qBAAAC,UAAAA,KAAL;AACL,EAAAA,WAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,WAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,WAAA,KAAA,CAAA,GAAM,KAAA;AAHI,EAAA,OAAAA,UAAAA;AAAA,CAAA,EAAA,SAAA,IAAA,EAAA","file":"interfaces.js","sourcesContent":["import type { ColumnFiltersState } from '@tanstack/react-table'\n\n/**\n * State passed to onStateChange on every table interaction.\n * Use these values to build your API request.\n */\nexport interface ServerTableState {\n pageIndex: number\n pageSize: number\n globalFilter: string\n columnFilters: ColumnFiltersState\n sorting: { id: string; desc: boolean }[]\n}\n\n/**\n * Style options for the table header row.\n * Pass as the headerStyle (or legacy headerBgColor) prop to customize appearance.\n */\nexport interface TableHeaderStyle {\n /** Header background color. Use light-dark(light, dark) for theme-aware colors */\n bgColor?: string;\n /** Header text (and icon) color */\n textColor?: string;\n /** Header background color on hover (if not set, a default is used) */\n hoverBgColor?: string;\n /** Header text color on hover (if not set, same as textColor) */\n hoverTextColor?: string;\n /** Header font weight (e.g. 600, 700, \"bold\") */\n fontWeight?: number | string;\n /** Header font size in px */\n fontSize?: number | string;\n /** Horizontal padding for header cells (e.g. \"4px 10px\") */\n padding?: string;\n}\n\n/**\n * Configuration for the DataTable UI.\n * Pass partial overrides via the `config` prop to customize defaults.\n */\nexport interface DataTableConfig {\n /** Page size options for the pagination selector */\n pageSizeOptions: number[];\n /** Default page size when the table first loads */\n defaultPageSize: number;\n /** Placeholder for the search input */\n searchPlaceholder: string;\n /** Whether to show the search input */\n enableGlobalFilter: boolean;\n}\n\nexport const defaultDataTableConfig: DataTableConfig = {\n pageSizeOptions: [5, 10, 15, 20, 50],\n defaultPageSize: 10,\n searchPlaceholder: 'Buscar...',\n enableGlobalFilter: true,\n}\n","import type { TblProductsImage } from './product.interface';\n\nexport type IField =\n | ITextField\n | IPasswordField\n | INumberField\n | ISelectField\n | IMultiSelectField\n | IDateField\n | IEmailField\n | IHiddenField\n | ISwitchField\n | IFileField\n | ITagField;\n\nexport interface IHiddenField extends IBaseField {\n type: typeof FieldTypes.HIDDEN;\n}\n\nexport interface ITextField extends IBaseField {\n type: typeof FieldTypes.TEXT;\n}\n\nexport interface IEmailField extends IBaseField {\n type: typeof FieldTypes.EMAIL;\n}\n\nexport interface IPasswordField extends IBaseField {\n type: typeof FieldTypes.PASSWORD;\n}\n\nexport interface ITagField\n extends IBaseField,\n Omit<ISelect, 'options'> {\n type: typeof FieldTypes.TAG;\n options: TagData[];\n}\n\nexport interface ISwitchField extends IBaseField {\n type: typeof FieldTypes.SWITCH;\n defaultChecked?: boolean;\n labelPosition?: 'left' | 'right';\n onLabel?: string;\n offLabel?: string;\n}\n\nexport type FileType =\n | 'image'\n | 'video'\n | 'audio'\n | 'pdf'\n | 'document';\n\nexport interface IFileField extends IBaseField {\n type: typeof FieldTypes.FILE;\n multiple?: boolean;\n accept?: string[] | readonly string[];\n maxSize?: number;\n maxFiles?: number;\n maxSizeMessage?: string;\n maxFilesMessage?: string;\n fileType: FileType;\n defaultImages?: TblProductsImage[];\n}\n\nexport interface INumberField extends IBaseField {\n type: typeof FieldTypes.NUMBER;\n min?: number;\n max?: number;\n preffix?: string;\n suffix?: string;\n allowNegative?: boolean;\n allowDecimal?: boolean;\n decimalScale?: number;\n fixedDecimalScale?: boolean;\n decimalSeparator?: string;\n hideControls?: boolean;\n step?: number;\n}\n\nexport interface ISelectField extends IBaseField, ISelect {\n type: typeof FieldTypes.SELECT;\n}\n\nexport interface IMultiSelectField extends IBaseField, ISelect {\n type: typeof FieldTypes.MULTISELECT;\n}\n\nexport interface IDateField extends IBaseField {\n type: typeof FieldTypes.DATE;\n}\n\nexport interface ISelect extends IBaseField {\n options: IOptions[];\n allowDeselect?: boolean;\n clearable?: boolean;\n searchable?: boolean;\n nothingFoundMessage?: string;\n checkIconPosition?: 'right' | 'left';\n withCheckIcon?: boolean;\n limit?: number;\n renderOption?: (option: IOptions) => React.ReactNode;\n}\n\ntype ColumnWidth = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport interface IBaseField {\n name: string;\n label?: string;\n description?: string;\n placeholder?: string;\n required?: boolean;\n error?: string;\n disabled?: boolean;\n defaultValue?: string | number | boolean | string[] | Date;\n requiredMessage?: string;\n columnWidth?: ColumnWidth;\n onChange?: (value: string) => void;\n section?: number;\n page?: number;\n}\n\nexport interface IButton {\n hidden?: boolean;\n type: ButtonTypes;\n label: string;\n fullWidth?: boolean;\n className?: string;\n style?: React.CSSProperties;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n disabled?: boolean;\n loading?: boolean;\n Icon?: React.ReactNode;\n iconPosition?: 'left' | 'right';\n color?: string;\n variant?: \"gradient\" | \"subtle\" | \"filled\" | \"light\" | \"outline\" | \"transparent\" | \"white\" | \"default\"\n}\n\nexport interface IOptions {\n value: string;\n label: string;\n}\n\nexport interface TagData {\n value: string;\n}\n\nexport const FieldTypes = {\n TEXT: 'text',\n EMAIL: 'email',\n NUMBER: 'number',\n PASSWORD: 'password',\n SELECT: 'select',\n MULTISELECT: 'multiselect',\n DATE: 'date',\n HIDDEN: 'hidden',\n SWITCH: 'switch',\n FILE: 'file',\n TAG: 'tag',\n} as const;\n\nexport type FieldTypes = (typeof FieldTypes)[keyof typeof FieldTypes];\nexport type ButtonTypes =\n (typeof ButtonTypes)[keyof typeof ButtonTypes];\n\nexport const ButtonTypes = {\n SUBMIT: 'submit',\n BUTTON: 'button',\n RESET: 'reset',\n} as const;\n","export interface IPermissionRole {\n permissionRole: PermissionRole[]\n moduleNames: string[]\n permissionNames: string[]\n roleNames: string[]\n}\nexport interface PermissionRole {\n role_PermissionID: number\n roleID: number\n permissionID: number\n moduleID: number\n hasPermission: boolean\n syncStatusID: number\n masterCodeID: null\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblModules: TblModules\n tblPermissions: TblPermissions\n tblRoles: TblRoles\n}\n\nexport interface TblModules {\n moduleName: string\n}\n\nexport interface TblPermissions {\n permission: Permission\n}\n\nexport enum Permission {\n Crear = 'Crear',\n Editar = 'Editar',\n Eliminar = 'Eliminar',\n Ver = 'Ver'\n}\n\nexport interface TblRoles {\n role: string\n}\n","import type { IProduct } from \"./product.interface\"\n\nexport interface IPromotionResponse {\n total: number\n data: IPromotion[]\n skip: number\n limit: number\n}\n\nexport interface IPromotion {\n promotionID: number\n promotionName: string\n startDate: Date\n endDate: Date\n isActive: number\n description: string\n promotionTypeID: number\n productID: null\n batchID: null\n providerID: null\n n: null\n m: null\n discountPercentage: null\n priceTypeID: null\n targetProductID: null\n discountAmount: number\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblPromotions_targetProductIDTotblProducts: TblPromotionsTargetProductIDTotblProduct[]\n tblPromotionTypes: TblPromotionTypes\n}\n\nexport interface TblPromotionTypes {\n promotionTypeID: number\n promotionType: string\n description: string\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n}\n\nexport interface TblPromotionsTargetProductIDTotblProduct {\n promotionID: number\n productID: number\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblProducts: IProduct\n}\n\n\nexport interface IPromotionType {\n promotionTypeID: number\n promotionType: string\n description: string\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n}\n\nexport enum PromotionTypeEnum {\n NXM = 'NXM',\n PRODUCTO = 'PRODUCTO',\n TEMPORADA = 'TEMPORADA',\n PROVEEDOR = 'PROVEEDOR',\n LOTE = 'LOTE'\n}\n","export interface IStockByWarehouseReport {\n warehouse: string\n product: string\n batch: string\n stock: number\n}\n\nexport enum ComparisonBy {\n YEAR = 'year',\n MONTH = 'month',\n WEEK = 'week',\n CUSTOM = 'custom'\n}\n\nexport enum ChartType {\n BAR = 'bar',\n LINE = 'line',\n PIE = 'pie'\n}\n\nexport interface IReportX {\n reportDataString: string\n paymentMethods?: Array<{\n paymentMethod: string\n amount: number\n }>\n}\n\nexport interface IReportZ {\n reportDataString: string\n headerData: {\n cutDate: string\n cutTime: string\n terminalNumber: string\n cashierID: number\n cashierName: string\n zCutFolio: string\n previousZCutFolio: string\n }\n salesSummary: {\n grossSales: number\n totalReturns: number\n totalDiscounts: number\n netSubtotal: number\n dayTotal: number\n }\n paymentMethods: Array<{\n paymentMethod: string\n amount: number\n }>\n cashMovements: {\n initialFund: number\n cashDeposits: number\n cashWithdrawals: number\n totalCashAtClosing: number\n }\n folioControl: {\n firstFolio: string\n lastFolio: string\n }\n}\n\nexport interface IReportComparisonByTimeFrame {\n currentPeriod: Period\n previousPeriod: Period\n}\n\nexport interface Period {\n title: string\n dateRange: DateRange\n data: ReportData[]\n totalByPeriod: number\n // Nuevos campos para resumen de materiales\n materialsSummary?: MaterialSummary[]\n}\n\nexport interface MaterialSummary {\n materialName: string\n totalGrams: number\n totalRevenue: number\n productCount: number\n averagePricePerGram: number\n}\n\nexport interface ReportData {\n period: string\n products: ReportDataProduct[]\n}\n\nexport interface ReportDataProduct {\n productName: string\n salesInNumberByPeriod: number\n salesInPriceByPeriod: number\n // Nuevos campos para información detallada\n materialName?: string\n totalWeight?: number\n averageWeight?: number\n categoryName?: string\n}\n\nexport interface ProductInfo {\n productName: string\n category: string\n quantitySold: number\n totalRevenue: number\n}\n\nexport interface DateRange {\n start: Date\n end: Date\n}\n\nexport interface IReportInventory {\n productName: string\n productVariant: string\n price: number\n category: string\n material: string\n stock: number\n stockID: number\n warehouse: string\n provider: string\n lote: string\n size: string\n caliber: string\n purity: string\n weight: number\n batchID: number\n productID: number\n productDetailID: number\n batchComment?: string\n unitCost?: number\n profitPercentage?: number\n}\n"]}
1
+ {"version":3,"sources":["../src/interfaces/datatable.interface.ts","../src/interfaces/form.interface.ts","../src/interfaces/permission.interface.ts","../src/interfaces/promotion.interface.ts","../src/interfaces/report.interface.ts"],"names":["Permission","PromotionTypeEnum","ComparisonBy","ChartType"],"mappings":";AAkDO,IAAM,sBAAA,GAA0C;AAAA,EACrD,iBAAiB,CAAC,CAAA,EAAG,EAAA,EAAI,EAAA,EAAI,IAAI,EAAE,CAAA;AAAA,EACnC,eAAA,EAAiB,EAAA;AAAA,EACjB,iBAAA,EAAmB,WAAA;AAAA,EACnB,kBAAA,EAAoB;AACtB;;;AC4FO,IAAM,UAAA,GAAa;AAAA,EACxB,IAAA,EAAM,MAAA;AAAA,EACN,KAAA,EAAO,OAAA;AAAA,EACP,MAAA,EAAQ,QAAA;AAAA,EACR,QAAA,EAAU,UAAA;AAAA,EACV,MAAA,EAAQ,QAAA;AAAA,EACR,WAAA,EAAa,aAAA;AAAA,EACb,IAAA,EAAM,MAAA;AAAA,EACN,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ,QAAA;AAAA,EACR,IAAA,EAAM,MAAA;AAAA,EACN,GAAA,EAAK;AACP;AAMO,IAAM,WAAA,GAAc;AAAA,EACzB,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ,QAAA;AAAA,EACR,KAAA,EAAO;AACT;;;AC1IO,IAAK,UAAA,qBAAAA,WAAAA,KAAL;AACL,EAAAA,YAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,YAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,YAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,YAAA,KAAA,CAAA,GAAM,KAAA;AAJI,EAAA,OAAAA,WAAAA;AAAA,CAAA,EAAA,UAAA,IAAA,EAAA;;;AC0CL,IAAK,iBAAA,qBAAAC,kBAAAA,KAAL;AACL,EAAAA,mBAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,mBAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,mBAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,mBAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AALG,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA;;;AClEL,IAAK,YAAA,qBAAAC,aAAAA,KAAL;AACL,EAAAA,cAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,cAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,cAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,cAAA,QAAA,CAAA,GAAS,QAAA;AAJC,EAAA,OAAAA,aAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA;AAOL,IAAK,SAAA,qBAAAC,UAAAA,KAAL;AACL,EAAAA,WAAA,KAAA,CAAA,GAAM,KAAA;AACN,EAAAA,WAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,WAAA,KAAA,CAAA,GAAM,KAAA;AAHI,EAAA,OAAAA,UAAAA;AAAA,CAAA,EAAA,SAAA,IAAA,EAAA","file":"interfaces.js","sourcesContent":["import type { ColumnFiltersState } from '@tanstack/react-table'\n\n/**\n * State passed to onStateChange on every table interaction.\n * Use these values to build your API request.\n */\nexport interface ServerTableState {\n pageIndex: number\n pageSize: number\n globalFilter: string\n columnFilters: ColumnFiltersState\n sorting: { id: string; desc: boolean }[]\n}\n\n/**\n * Style options for the table header row.\n * Pass as the headerStyle (or legacy headerBgColor) prop to customize appearance.\n */\nexport interface TableHeaderStyle {\n /** Header background color. Use light-dark(light, dark) for theme-aware colors */\n bgColor?: string;\n /** Header text (and icon) color */\n textColor?: string;\n /** Header background color on hover (if not set, a default is used) */\n hoverBgColor?: string;\n /** Header text color on hover (if not set, same as textColor) */\n hoverTextColor?: string;\n /** Header font weight (e.g. 600, 700, \"bold\") */\n fontWeight?: number | string;\n /** Header font size in px */\n fontSize?: number | string;\n /** Horizontal padding for header cells (e.g. \"4px 10px\") */\n padding?: string;\n}\n\n/**\n * Configuration for the DataTable UI.\n * Pass partial overrides via the `config` prop to customize defaults.\n */\nexport interface DataTableConfig {\n /** Page size options for the pagination selector */\n pageSizeOptions: number[];\n /** Default page size when the table first loads */\n defaultPageSize: number;\n /** Placeholder for the search input */\n searchPlaceholder: string;\n /** Whether to show the search input */\n enableGlobalFilter: boolean;\n}\n\nexport const defaultDataTableConfig: DataTableConfig = {\n pageSizeOptions: [5, 10, 15, 20, 50],\n defaultPageSize: 10,\n searchPlaceholder: 'Buscar...',\n enableGlobalFilter: true,\n}\n","import type { TblProductsImage } from './product.interface';\n\nexport type IField =\n | ITextField\n | IPasswordField\n | INumberField\n | ISelectField\n | IMultiSelectField\n | IDateField\n | IEmailField\n | IHiddenField\n | ISwitchField\n | IFileField\n | ITagField;\n\nexport interface IHiddenField extends IBaseField {\n type: typeof FieldTypes.HIDDEN;\n}\n\nexport interface ITextField extends IBaseField {\n type: typeof FieldTypes.TEXT;\n}\n\nexport interface IEmailField extends IBaseField {\n type: typeof FieldTypes.EMAIL;\n}\n\nexport interface IPasswordField extends IBaseField {\n type: typeof FieldTypes.PASSWORD;\n}\n\nexport interface ITagField\n extends IBaseField,\n Omit<ISelect, 'options'> {\n type: typeof FieldTypes.TAG;\n options: TagData[];\n}\n\nexport interface ISwitchField extends IBaseField {\n type: typeof FieldTypes.SWITCH;\n defaultChecked?: boolean;\n labelPosition?: 'left' | 'right';\n onLabel?: string;\n offLabel?: string;\n}\n\nexport type FileType =\n | 'image'\n | 'video'\n | 'audio'\n | 'pdf'\n | 'document';\n\nexport interface IFileField extends IBaseField {\n type: typeof FieldTypes.FILE;\n multiple?: boolean;\n accept?: string[] | readonly string[];\n maxSize?: number;\n maxFiles?: number;\n maxSizeMessage?: string;\n maxFilesMessage?: string;\n fileType: FileType;\n defaultImages?: TblProductsImage[];\n}\n\nexport interface INumberField extends IBaseField {\n type: typeof FieldTypes.NUMBER;\n min?: number;\n max?: number;\n preffix?: string;\n suffix?: string;\n allowNegative?: boolean;\n allowDecimal?: boolean;\n decimalScale?: number;\n fixedDecimalScale?: boolean;\n decimalSeparator?: string;\n hideControls?: boolean;\n step?: number;\n}\n\nexport interface ISelectField extends IBaseField, ISelect {\n type: typeof FieldTypes.SELECT;\n}\n\nexport interface IMultiSelectField extends IBaseField, ISelect {\n type: typeof FieldTypes.MULTISELECT;\n}\n\nexport interface IDateField extends IBaseField {\n type: typeof FieldTypes.DATE;\n}\n\nexport interface ISelect extends IBaseField {\n options: IOptions[];\n allowDeselect?: boolean;\n clearable?: boolean;\n searchable?: boolean;\n nothingFoundMessage?: string;\n checkIconPosition?: 'right' | 'left';\n withCheckIcon?: boolean;\n limit?: number;\n renderOption?: (option: IOptions) => React.ReactNode;\n}\n\ntype ColumnWidth = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport interface IBaseField {\n name: string;\n label?: string;\n description?: string;\n placeholder?: string;\n required?: boolean;\n error?: string;\n disabled?: boolean;\n defaultValue?: string | number | boolean | string[] | Date;\n requiredMessage?: string;\n columnWidth?: ColumnWidth;\n onChange?: (value: string) => void;\n section?: number;\n page?: number;\n}\n\nexport interface IButton {\n hidden?: boolean;\n type: ButtonTypes;\n label: string;\n fullWidth?: boolean;\n className?: string;\n style?: React.CSSProperties;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n disabled?: boolean;\n loading?: boolean;\n Icon?: React.ReactNode;\n iconPosition?: 'left' | 'right';\n color?: string;\n variant?: \"gradient\" | \"subtle\" | \"filled\" | \"light\" | \"outline\" | \"transparent\" | \"white\" | \"default\"\n}\n\nexport interface IOptions {\n value: string;\n label: string;\n}\n\nexport interface TagData {\n value: string;\n}\n\nexport const FieldTypes = {\n TEXT: 'text',\n EMAIL: 'email',\n NUMBER: 'number',\n PASSWORD: 'password',\n SELECT: 'select',\n MULTISELECT: 'multiselect',\n DATE: 'date',\n HIDDEN: 'hidden',\n SWITCH: 'switch',\n FILE: 'file',\n TAG: 'tag',\n} as const;\n\nexport type FieldTypes = (typeof FieldTypes)[keyof typeof FieldTypes];\nexport type ButtonTypes =\n (typeof ButtonTypes)[keyof typeof ButtonTypes];\n\nexport const ButtonTypes = {\n SUBMIT: 'submit',\n BUTTON: 'button',\n RESET: 'reset',\n} as const;\n","export interface IPermissionRole {\n permissionRole: PermissionRole[]\n moduleNames: string[]\n permissionNames: string[]\n roleNames: string[]\n}\nexport interface PermissionRole {\n role_PermissionID: number\n roleID: number\n permissionID: number\n moduleID: number\n hasPermission: boolean\n syncStatusID: number\n masterCodeID: null\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblModules: TblModules\n tblPermissions: TblPermissions\n tblRoles: TblRoles\n}\n\nexport interface TblModules {\n moduleName: string\n}\n\nexport interface TblPermissions {\n permission: Permission\n}\n\nexport enum Permission {\n Crear = 'Crear',\n Editar = 'Editar',\n Eliminar = 'Eliminar',\n Ver = 'Ver'\n}\n\nexport interface TblRoles {\n role: string\n}\n","import type { IProduct } from \"./product.interface\"\n\nexport interface IPromotionResponse {\n total: number\n data: IPromotion[]\n skip: number\n limit: number\n}\n\nexport interface IPromotion {\n promotionID: number\n promotionName: string\n startDate: Date\n endDate: Date\n isActive: number\n description: string\n promotionTypeID: number\n productID: null\n batchID: null\n providerID: null\n n: null\n m: null\n discountPercentage: null\n priceTypeID: null\n targetProductID: null\n discountAmount: number\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblPromotions_targetProductIDTotblProducts: TblPromotionsTargetProductIDTotblProduct[]\n tblPromotionTypes: TblPromotionTypes\n}\n\nexport interface TblPromotionTypes {\n promotionTypeID: number\n promotionType: string\n description: string\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n}\n\nexport interface TblPromotionsTargetProductIDTotblProduct {\n promotionID: number\n productID: number\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n tblProducts: IProduct\n}\n\n\nexport interface IPromotionType {\n promotionTypeID: number\n promotionType: string\n description: string\n syncStatusID: number\n masterCodeID: number\n savedBy: number\n savedDate: Date\n deletedBy: null\n deletedDate: null\n}\n\nexport enum PromotionTypeEnum {\n NXM = 'NXM',\n PRODUCTO = 'PRODUCTO',\n TEMPORADA = 'TEMPORADA',\n PROVEEDOR = 'PROVEEDOR',\n LOTE = 'LOTE'\n}\n","export interface IStockByWarehouseReport {\n warehouse: string\n product: string\n batch: string\n stock: number\n}\n\nexport enum ComparisonBy {\n YEAR = 'year',\n MONTH = 'month',\n WEEK = 'week',\n CUSTOM = 'custom'\n}\n\nexport enum ChartType {\n BAR = 'bar',\n LINE = 'line',\n PIE = 'pie'\n}\n\nexport interface IReportX {\n reportDataString: string\n paymentMethods?: Array<{\n paymentMethod: string\n amount: number\n }>\n}\n\nexport interface IReportZ {\n reportDataString: string\n headerData: {\n cutDate: string\n cutTime: string\n terminalNumber: string\n cashierID: number\n cashierName: string\n zCutFolio: string\n previousZCutFolio: string\n }\n salesSummary: {\n grossSales: number\n totalReturns: number\n totalDiscounts: number\n netSubtotal: number\n dayTotal: number\n }\n paymentMethods: Array<{\n paymentMethod: string\n amount: number\n }>\n cashMovements: {\n initialFund: number\n cashDeposits: number\n cashWithdrawals: number\n totalCashAtClosing: number\n }\n folioControl: {\n firstFolio: string\n lastFolio: string\n }\n}\n\nexport interface IReportComparisonByTimeFrame {\n currentPeriod: Period\n previousPeriod: Period\n}\n\nexport interface Period {\n title: string\n dateRange: DateRange\n data: ReportData[]\n totalByPeriod: number\n // Nuevos campos para resumen de materiales\n materialsSummary?: MaterialSummary[]\n}\n\nexport interface MaterialSummary {\n materialName: string\n totalGrams: number\n totalRevenue: number\n productCount: number\n averagePricePerGram: number\n}\n\nexport interface ReportData {\n period: string\n products: ReportDataProduct[]\n}\n\nexport interface ReportDataProduct {\n productName: string\n salesInNumberByPeriod: number\n salesInPriceByPeriod: number\n // Nuevos campos para información detallada\n materialName?: string\n totalWeight?: number\n averageWeight?: number\n categoryName?: string\n}\n\nexport interface ProductInfo {\n productName: string\n category: string\n quantitySold: number\n totalRevenue: number\n}\n\nexport interface DateRange {\n start: Date\n end: Date\n}\n\nexport interface IContpaqOrderItem {\n productName: string\n quantity: number\n amount: number\n weight?: number | null\n isWeightBased?: boolean\n}\n\nexport interface IContpaqOrderPayment {\n paymentMethod: string\n transactionTypeID: number\n amount: number\n}\n\nexport interface IContpaqOrder {\n orderID: number\n folio: number\n orderDate: string | null\n clientName: string\n savedBy: string\n orderStatus: string\n items: IContpaqOrderItem[]\n orderTotal: number\n payments: IContpaqOrderPayment[]\n totalPaid: number\n pendingBalance: number\n}\n\nexport interface IContpaqPaymentMethodTotal {\n paymentMethod: string\n transactionTypeID: number\n amount: number\n}\n\nexport interface IContpaqSalesReport {\n orders: IContpaqOrder[]\n paymentMethodTotals: IContpaqPaymentMethodTotal[]\n totalGeneral: number\n totalSales: number\n dateRange: {\n startDate: string\n endDate: string\n }\n}\n\nexport interface IReportInventory {\n productName: string\n productVariant: string\n price: number\n category: string\n material: string\n stock: number\n stockID: number\n warehouse: string\n provider: string\n lote: string\n size: string\n caliber: string\n purity: string\n weight: number\n batchID: number\n productID: number\n productDetailID: number\n batchComment?: string\n unitCost?: number\n profitPercentage?: number\n}\n"]}
package/dist/queries.d.ts CHANGED
@@ -3,10 +3,9 @@ import * as _tanstack_query_core from '@tanstack/query-core';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { QueryClient, UseMutationOptions } from '@tanstack/react-query';
5
5
  import { b as IAttributeQueryParams, c as IAttributeResponse, I as IAttribute, d as IAttributeValue, i as ICategoryResponse, g as ICategory, f as IBatchResponse, e as IBatch } from './filters.interface-BwMi9FRP.js';
6
- import { aA as UserResponse, $ as IUser, A as AgentResponse, a0 as IUserForm, a2 as IWareHouseResponse, a1 as IWareHouse, k as IClientResponse, l as IClientResponseById, h as IClient, j as IClientRequest, g as IBankTerminalResponse, d as IBankTerminal, a as BankTerminalResponse, e as IBankTerminalForm, U as IRole, O as IProviderResponse, L as IProvider, M as IProviderForSelect, N as IProviderRequest, o as ILocationResponse, n as ILocation, p as IMaterial, G as IPriceTypeResponse, F as IPriceType, z as IPermissionRole, a8 as PermissionRole, J as IPromotionResponse, H as IPromotion, K as IPromotionType, x as IPaymentMethod, y as IPaymentMethodAmountExpected, w as IPayment, Z as ITax, r as IModule, Y as ITag, ab as PricePerGramResponse, E as IPricePerGramHistory, az as UpdatePriceRequest, ag as SchedulePriceRequest, a9 as PriceCalculationResponse, C as CalculatePriceRequest, c as ComparisonBy, V as IStockByWarehouseReport, R as IReportX, P as IReportComparisonByTimeFrame, Q as IReportInventory, S as IReportZ, ak as TblOrderDetail, X as IStockMovementResponse, W as IStockMovement } from './warehouse.interface-S5seQY-_.js';
7
- import { W as WarehouseResponse, U as UpdateBatchData, L as LocationResponse, M as MaterialResponse, b as IExchangeResponse, I as IExchange, P as PaymentType, c as IUpdatePermission, d as LoginResponse, S as StateResponse, e as PrintQRResponse, G as GetReturnsByOrderIdResponse } from './warehouse.service-CV2UDqAD.js';
8
- import { F as FolioResponse } from './shift.queries-CaMY7FWd.js';
9
- export { C as CloseShiftData, G as GenderResponse, H as HealthCheckResponse, P as ProductQueryParams, U as UseOrdersParams, g as genderQueryKeys, a as genders, h as health, b as healthQueryKeys, o as orderQueryKeys, c as orders, p as productQueryKeys, d as products, s as shifts } from './shift.queries-CaMY7FWd.js';
6
+ import { aJ as UserResponse, a8 as IUser, A as AgentResponse, a9 as IUserForm, ab as IWareHouseResponse, aa as IWareHouse, l as IClientResponse, m as IClientResponseById, i as IClient, k as IClientRequest, h as IBankTerminalResponse, e as IBankTerminal, a as BankTerminalResponse, f as IBankTerminalForm, a1 as IRole, X as IProviderResponse, U as IProvider, V as IProviderForSelect, W as IProviderRequest, w as ILocationResponse, v as ILocation, x as IMaterial, Q as IPriceTypeResponse, P as IPriceType, N as IPermissionRole, ah as PermissionRole, S as IPromotionResponse, R as IPromotion, T as IPromotionType, L as IPaymentMethod, M as IPaymentMethodAmountExpected, K as IPayment, a6 as ITax, z as IModule, s as IFolio, a5 as ITag, ak as PricePerGramResponse, O as IPricePerGramHistory, aI as UpdatePriceRequest, ap as SchedulePriceRequest, ai as PriceCalculationResponse, C as CalculatePriceRequest, c as ComparisonBy, a2 as IStockByWarehouseReport, _ as IReportX, Y as IReportComparisonByTimeFrame, Z as IReportInventory, $ as IReportZ, at as TblOrderDetail, a4 as IStockMovementResponse, a3 as IStockMovement } from './warehouse.interface-CCyPQruB.js';
7
+ import { W as WarehouseResponse, U as UpdateBatchData, L as LocationResponse, M as MaterialResponse, b as IExchangeResponse, I as IExchange, P as PaymentType, c as IUpdatePermission, e as LoginResponse, S as StateResponse, f as PrintQRResponse, G as GetReturnsByOrderIdResponse, d as IUserSettings } from './warehouse.service-hWeYeuP7.js';
8
+ export { C as CloseShiftData, G as GenderResponse, H as HealthCheckResponse, P as ProductQueryParams, U as UseOrdersParams, g as genderQueryKeys, a as genders, h as health, b as healthQueryKeys, o as orderQueryKeys, c as orders, p as productQueryKeys, d as products, s as shifts } from './shift.queries-BluElDWe.js';
10
9
  import '@tanstack/react-table';
11
10
 
12
11
  declare const attributeQueryKeys: {
@@ -1687,11 +1686,11 @@ declare const folioQueryKeys: {
1687
1686
  declare const folios: {
1688
1687
  queries: {
1689
1688
  all: readonly ["folio"];
1690
- getNextFolioToUseInBatches: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<FolioResponse, Error, FolioResponse, readonly ["folio", "nextForBatches"]>, "queryFn"> & {
1691
- queryFn?: _tanstack_query_core.QueryFunction<FolioResponse, readonly ["folio", "nextForBatches"], never> | undefined;
1689
+ getNextFolioToUseInBatches: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<IFolio, Error, IFolio, readonly ["folio", "nextForBatches"]>, "queryFn"> & {
1690
+ queryFn?: _tanstack_query_core.QueryFunction<IFolio, readonly ["folio", "nextForBatches"], never> | undefined;
1692
1691
  } & {
1693
1692
  queryKey: readonly ["folio", "nextForBatches"] & {
1694
- [dataTagSymbol]: FolioResponse;
1693
+ [dataTagSymbol]: IFolio;
1695
1694
  [dataTagErrorSymbol]: Error;
1696
1695
  };
1697
1696
  };
@@ -2162,4 +2161,24 @@ declare const stockMovements: {
2162
2161
  };
2163
2162
  };
2164
2163
 
2165
- export { TableQueryParams, attributeQueryKeys, attributes, auth, bankTerminalQueryKeys, bankTerminals, batchQueryKeys, batches, categories, categoryQueryKeys, clientQueryKeys, clients, exchange, exchangeQueryKeys, folioQueryKeys, folios, locationQueryKeys, locations, materialQueryKeys, materials, moduleQueryKeys, modules, paymentQueryKeys, payments, permissionQueryKeys, permissions, pricePerGram, pricePerGramQueryKeys, priceTypeQueryKeys, priceTypes, productTagQueryKeys, productTags, promotionQueryKeys, promotions, providerQueryKeys, providers, qr, qrQueryKeys, reportQueryKeys, reports, returnQueryKeys, returns, roleQueryKeys, roles, stateQueryKeys, states, stockMovementQueryKeys, stockMovements, taxQueryKeys, taxes, userQueryKeys, users, warehouseQueryKeys, warehouses };
2164
+ declare const userSettingsQueryKeys: {
2165
+ all: readonly ["userSettings"];
2166
+ detail: () => readonly ["userSettings", "detail"];
2167
+ };
2168
+ declare const userSettingsConfig: {
2169
+ queries: {
2170
+ getUserSettings: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<IUserSettings, Error, IUserSettings, readonly ["userSettings", "detail"]>, "queryFn"> & {
2171
+ queryFn?: _tanstack_query_core.QueryFunction<IUserSettings, readonly ["userSettings", "detail"], never> | undefined;
2172
+ } & {
2173
+ queryKey: readonly ["userSettings", "detail"] & {
2174
+ [dataTagSymbol]: IUserSettings;
2175
+ [dataTagErrorSymbol]: Error;
2176
+ };
2177
+ };
2178
+ };
2179
+ mutations: {
2180
+ updateUserSettings: (queryClient: QueryClient) => UseMutationOptions<IUserSettings, Error, Partial<IUserSettings>>;
2181
+ };
2182
+ };
2183
+
2184
+ export { TableQueryParams, attributeQueryKeys, attributes, auth, bankTerminalQueryKeys, bankTerminals, batchQueryKeys, batches, categories, categoryQueryKeys, clientQueryKeys, clients, exchange, exchangeQueryKeys, folioQueryKeys, folios, locationQueryKeys, locations, materialQueryKeys, materials, moduleQueryKeys, modules, paymentQueryKeys, payments, permissionQueryKeys, permissions, pricePerGram, pricePerGramQueryKeys, priceTypeQueryKeys, priceTypes, productTagQueryKeys, productTags, promotionQueryKeys, promotions, providerQueryKeys, providers, qr, qrQueryKeys, reportQueryKeys, reports, returnQueryKeys, returns, roleQueryKeys, roles, stateQueryKeys, states, stockMovementQueryKeys, stockMovements, taxQueryKeys, taxes, userQueryKeys, userSettingsConfig, userSettingsQueryKeys, users, warehouseQueryKeys, warehouses };
package/dist/queries.js CHANGED
@@ -3650,6 +3650,51 @@ var stockMovements = {
3650
3650
  }
3651
3651
  };
3652
3652
 
3653
- export { attributeQueryKeys, attributes, auth, bankTerminalQueryKeys, bankTerminals, batchQueryKeys, batches, categories, categoryQueryKeys, clientQueryKeys, clients, exchange, exchangeQueryKeys, folioQueryKeys, folios, genderQueryKeys, genders, health, healthQueryKeys, locationQueryKeys, locations, materialQueryKeys, materials, moduleQueryKeys, modules, orderQueryKeys, orders, paymentQueryKeys, payments, permissionQueryKeys, permissions, pricePerGram, pricePerGramQueryKeys, priceTypeQueryKeys, priceTypes, productQueryKeys, productTagQueryKeys, productTags, products, promotionQueryKeys, promotions, providerQueryKeys, providers, qr, qrQueryKeys, reportQueryKeys, reports, returnQueryKeys, returns, roleQueryKeys, roles, shifts, stateQueryKeys, states, stockMovementQueryKeys, stockMovements, taxQueryKeys, taxes, userQueryKeys, users, warehouseQueryKeys, warehouses };
3653
+ // src/services/userSettings.service.ts
3654
+ var getUserSettings = async () => {
3655
+ const { data } = await api.get("user-settings");
3656
+ return data.data;
3657
+ };
3658
+ var updateUserSettings = async (settings) => {
3659
+ const { data } = await api.put("user-settings", settings);
3660
+ return data.data;
3661
+ };
3662
+
3663
+ // src/queries/userSettings.queries.ts
3664
+ var userSettingsQueryKeys = {
3665
+ all: ["userSettings"],
3666
+ detail: () => [...userSettingsQueryKeys.all, "detail"]
3667
+ };
3668
+ var userSettingsConfig = {
3669
+ queries: {
3670
+ getUserSettings: () => queryOptions({
3671
+ queryFn: getUserSettings,
3672
+ queryKey: userSettingsQueryKeys.detail(),
3673
+ staleTime: 10 * 60 * 1e3
3674
+ })
3675
+ },
3676
+ mutations: {
3677
+ updateUserSettings: (queryClient) => ({
3678
+ mutationFn: updateUserSettings,
3679
+ onSuccess: () => {
3680
+ queryClient.invalidateQueries({
3681
+ queryKey: userSettingsQueryKeys.all
3682
+ });
3683
+ successNotification({
3684
+ title: "Configuraci\xF3n guardada",
3685
+ message: "Tu configuraci\xF3n se ha actualizado correctamente."
3686
+ });
3687
+ },
3688
+ onError: (error) => {
3689
+ errorNotification({
3690
+ title: "Error",
3691
+ message: error.message || "No se pudo guardar la configuraci\xF3n."
3692
+ });
3693
+ }
3694
+ })
3695
+ }
3696
+ };
3697
+
3698
+ export { attributeQueryKeys, attributes, auth, bankTerminalQueryKeys, bankTerminals, batchQueryKeys, batches, categories, categoryQueryKeys, clientQueryKeys, clients, exchange, exchangeQueryKeys, folioQueryKeys, folios, genderQueryKeys, genders, health, healthQueryKeys, locationQueryKeys, locations, materialQueryKeys, materials, moduleQueryKeys, modules, orderQueryKeys, orders, paymentQueryKeys, payments, permissionQueryKeys, permissions, pricePerGram, pricePerGramQueryKeys, priceTypeQueryKeys, priceTypes, productQueryKeys, productTagQueryKeys, productTags, products, promotionQueryKeys, promotions, providerQueryKeys, providers, qr, qrQueryKeys, reportQueryKeys, reports, returnQueryKeys, returns, roleQueryKeys, roles, shifts, stateQueryKeys, states, stockMovementQueryKeys, stockMovements, taxQueryKeys, taxes, userQueryKeys, userSettingsConfig, userSettingsQueryKeys, users, warehouseQueryKeys, warehouses };
3654
3699
  //# sourceMappingURL=queries.js.map
3655
3700
  //# sourceMappingURL=queries.js.map