falconhub-apilibrary 1.6.0-dev.136 → 1.6.2-dev.138

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/index.mjs CHANGED
@@ -98,14 +98,14 @@ var PRODUCT_TYPES_LAYOUT_HEADERS = [
98
98
 
99
99
  // src/interfaces/Product/Consumable/ConsumableInterface.ts
100
100
  var CONSUMABLES_BULK_COLUMN_MAP = {
101
- "Consumible": "consumable",
102
- "SKU": "sku",
103
- "Dimensiones": "dimensions",
101
+ Consumible: "consumable",
102
+ SKU: "sku",
103
+ Dimensiones: "dimensions",
104
104
  "Costo Unitario": "unitCost",
105
105
  "Stock M\xEDnimo": "minimumStock",
106
106
  "Tipo de Consumible": "consumableTypeId",
107
- "Proveedor": "providerId",
108
- "Material": "materialId"
107
+ Proveedor: "providerId",
108
+ Material: "materialId"
109
109
  };
110
110
  var CONSUMABLES_BULK_HEADERS = [
111
111
  "Consumible",
@@ -118,15 +118,15 @@ var CONSUMABLES_BULK_HEADERS = [
118
118
  "Material"
119
119
  ];
120
120
  var CONSUMABLES_LAYOUT_COLUMN_MAP = {
121
- "ID": "consumableId",
122
- "Consumible": "consumable",
123
- "SKU": "sku",
124
- "Dimensiones": "dimensions",
121
+ ID: "consumableId",
122
+ Consumible: "consumable",
123
+ SKU: "sku",
124
+ Dimensiones: "dimensions",
125
125
  "Costo Unitario": "unitCost",
126
126
  "Stock M\xEDnimo": "minimumStock",
127
127
  "Tipo de Consumible": "consumableTypeId",
128
- "Proveedor": "providerId",
129
- "Material": "materialId"
128
+ Proveedor: "providerId",
129
+ Material: "materialId"
130
130
  };
131
131
  var CONSUMABLES_LAYOUT_HEADERS = [
132
132
  "ID",
@@ -1095,6 +1095,10 @@ var InventoryService = class {
1095
1095
 
1096
1096
  // src/services/ProductService.ts
1097
1097
  var ProductService = class {
1098
+ /**
1099
+ * Inicializa el servicio con la instancia de API.
1100
+ * @param api - Instancia de la clase API para realizar peticiones.
1101
+ */
1098
1102
  constructor(api) {
1099
1103
  this.BASE_PATH = "products";
1100
1104
  this.api = api;
@@ -1728,217 +1732,409 @@ var ProductService = class {
1728
1732
  }
1729
1733
  // #endregion
1730
1734
  // #region PRINT LOCATIONS
1735
+ /**
1736
+ * Obtiene todas las ubicaciones de impresión con filtros opcionales.
1737
+ */
1731
1738
  async getPrintLocations(filter) {
1732
1739
  const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/catalogs/print-locations`, filter);
1733
1740
  return this.api.executeGET(endpoint, false);
1734
1741
  }
1742
+ /**
1743
+ * Obtiene el modelo de filtros disponibles para ubicaciones de impresión.
1744
+ */
1735
1745
  async getPrintLocationsFilters() {
1736
1746
  return this.api.executeGET(`${this.BASE_PATH}/catalogs/print-locations/filters`, false);
1737
1747
  }
1748
+ /**
1749
+ * Obtiene una ubicación de impresión por su ID.
1750
+ */
1738
1751
  async getPrintLocationById(id) {
1739
1752
  return this.api.executeGET(`${this.BASE_PATH}/catalogs/print-locations/${id}`, false);
1740
1753
  }
1754
+ /**
1755
+ * Crea una nueva ubicación de impresión.
1756
+ */
1741
1757
  async createPrintLocation(request) {
1742
1758
  return this.api.executePOST(`${this.BASE_PATH}/catalogs/print-locations`, request);
1743
1759
  }
1760
+ /**
1761
+ * Actualiza una ubicación de impresión existente.
1762
+ */
1744
1763
  async updatePrintLocation(id, request) {
1745
1764
  return this.api.executePUT(`${this.BASE_PATH}/catalogs/print-locations/${id}`, request);
1746
1765
  }
1766
+ /**
1767
+ * Elimina una ubicación de impresión.
1768
+ */
1747
1769
  async deletePrintLocation(id) {
1748
1770
  return this.api.executeDELETE(`${this.BASE_PATH}/catalogs/print-locations/${id}`);
1749
1771
  }
1750
1772
  // #endregion
1751
1773
  // #region CONSUMABLE TYPES
1774
+ /**
1775
+ * Obtiene todos los tipos de consumibles con filtros opcionales.
1776
+ */
1752
1777
  async getConsumableTypes(filter) {
1753
1778
  const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/catalogs/consumable-types`, filter);
1754
1779
  return this.api.executeGET(endpoint, false);
1755
1780
  }
1781
+ /**
1782
+ * Obtiene el modelo de filtros disponibles para tipos de consumibles.
1783
+ */
1756
1784
  async getConsumableTypesFilters() {
1757
1785
  return this.api.executeGET(`${this.BASE_PATH}/catalogs/consumable-types/filters`, false);
1758
1786
  }
1787
+ /**
1788
+ * Obtiene un tipo de consumible por su ID.
1789
+ */
1759
1790
  async getConsumableTypeById(id) {
1760
1791
  return this.api.executeGET(`${this.BASE_PATH}/catalogs/consumable-types/${id}`, false);
1761
1792
  }
1793
+ /**
1794
+ * Crea un nuevo tipo de consumible.
1795
+ */
1762
1796
  async createConsumableType(request) {
1763
1797
  return this.api.executePOST(`${this.BASE_PATH}/catalogs/consumable-types`, request);
1764
1798
  }
1799
+ /**
1800
+ * Actualiza un tipo de consumible existente.
1801
+ */
1765
1802
  async updateConsumableType(id, request) {
1766
1803
  return this.api.executePUT(`${this.BASE_PATH}/catalogs/consumable-types/${id}`, request);
1767
1804
  }
1805
+ /**
1806
+ * Elimina un tipo de consumible.
1807
+ */
1768
1808
  async deleteConsumableType(id) {
1769
1809
  return this.api.executeDELETE(`${this.BASE_PATH}/catalogs/consumable-types/${id}`);
1770
1810
  }
1771
1811
  // #endregion
1772
1812
  // #region CONSUMABLES
1813
+ /**
1814
+ * Obtiene todos los consumibles con filtros opcionales.
1815
+ */
1773
1816
  async getConsumables(filter) {
1774
1817
  const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/pod/consumables`, filter);
1775
1818
  return this.api.executeGET(endpoint, false);
1776
1819
  }
1820
+ /**
1821
+ * Obtiene el modelo de filtros disponibles para consumibles.
1822
+ */
1777
1823
  async getConsumablesFilters() {
1778
1824
  return this.api.executeGET(`${this.BASE_PATH}/pod/consumables/filters`, false);
1779
1825
  }
1826
+ /**
1827
+ * Obtiene un consumible por su ID.
1828
+ */
1780
1829
  async getConsumableById(id) {
1781
1830
  return this.api.executeGET(`${this.BASE_PATH}/pod/consumables/${id}`, false);
1782
1831
  }
1832
+ /**
1833
+ * Crea un nuevo consumible.
1834
+ */
1783
1835
  async createConsumable(request) {
1784
1836
  return this.api.executePOST(`${this.BASE_PATH}/pod/consumables`, request);
1785
1837
  }
1838
+ /**
1839
+ * Actualiza un consumible existente.
1840
+ */
1786
1841
  async updateConsumable(id, request) {
1787
1842
  return this.api.executePUT(`${this.BASE_PATH}/pod/consumables/${id}`, request);
1788
1843
  }
1844
+ /**
1845
+ * Elimina un consumible.
1846
+ */
1789
1847
  async deleteConsumable(id) {
1790
1848
  return this.api.executeDELETE(`${this.BASE_PATH}/pod/consumables/${id}`);
1791
1849
  }
1850
+ /**
1851
+ * Obtiene la plantilla para la carga masiva de consumibles.
1852
+ */
1792
1853
  async getConsumablesBulkTemplate() {
1793
1854
  return this.api.executeBlobGET(`${this.BASE_PATH}/pod/consumables/bulk/template`, false);
1794
1855
  }
1856
+ /**
1857
+ * Obtiene el layout para la actualización masiva de consumibles.
1858
+ */
1795
1859
  async getConsumablesBulkLayout(ids) {
1796
1860
  return this.api.executeBlobGET(`${this.BASE_PATH}/pod/consumables/bulk/layout?ids=${ids.join(",")}`, false);
1797
1861
  }
1862
+ /**
1863
+ * Realiza una carga masiva (upsert) de consumibles.
1864
+ */
1798
1865
  async bulkUpsertConsumables(request) {
1799
1866
  return this.api.executePOST(`${this.BASE_PATH}/pod/consumables/bulk`, request);
1800
1867
  }
1801
1868
  // #endregion
1802
1869
  // #region COLLECTIONS
1870
+ /**
1871
+ * Obtiene todas las colecciones con filtros opcionales.
1872
+ */
1803
1873
  async getCollections(filter) {
1804
1874
  const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/pod/collections`, filter);
1805
1875
  return this.api.executeGET(endpoint, false);
1806
1876
  }
1877
+ /**
1878
+ * Obtiene el modelo de filtros disponibles para colecciones.
1879
+ */
1807
1880
  async getCollectionsFilters() {
1808
1881
  return this.api.executeGET(`${this.BASE_PATH}/pod/collections/filters`, false);
1809
1882
  }
1883
+ /**
1884
+ * Obtiene una colección por su ID.
1885
+ */
1810
1886
  async getCollectionById(id) {
1811
1887
  return this.api.executeGET(`${this.BASE_PATH}/pod/collections/${id}`, false);
1812
1888
  }
1889
+ /**
1890
+ * Crea una nueva colección.
1891
+ */
1813
1892
  async createCollection(request) {
1814
1893
  return this.api.executePOST(`${this.BASE_PATH}/pod/collections`, request);
1815
1894
  }
1895
+ /**
1896
+ * Actualiza una colección existente.
1897
+ */
1816
1898
  async updateCollection(id, request) {
1817
1899
  return this.api.executePUT(`${this.BASE_PATH}/pod/collections/${id}`, request);
1818
1900
  }
1901
+ /**
1902
+ * Elimina una colección.
1903
+ */
1819
1904
  async deleteCollection(id) {
1820
1905
  return this.api.executeDELETE(`${this.BASE_PATH}/pod/collections/${id}`);
1821
1906
  }
1907
+ /**
1908
+ * Obtiene la plantilla para la carga masiva de colecciones.
1909
+ */
1822
1910
  async getCollectionsBulkTemplate() {
1823
1911
  return this.api.executeBlobGET(`${this.BASE_PATH}/pod/collections/bulk/template`, false);
1824
1912
  }
1913
+ /**
1914
+ * Obtiene el layout para la actualización masiva de colecciones.
1915
+ */
1825
1916
  async getCollectionsBulkLayout(ids) {
1826
1917
  return this.api.executeBlobGET(`${this.BASE_PATH}/pod/collections/bulk/layout?ids=${ids.join(",")}`, false);
1827
1918
  }
1919
+ /**
1920
+ * Realiza una carga masiva (upsert) de colecciones.
1921
+ */
1828
1922
  async bulkUpsertCollections(request) {
1829
1923
  return this.api.executePOST(`${this.BASE_PATH}/pod/collections/bulk`, request);
1830
1924
  }
1831
1925
  // #endregion
1832
1926
  // #region PRODUCTS
1927
+ /**
1928
+ * Obtiene todos los productos con filtros opcionales.
1929
+ */
1833
1930
  async getProducts(filter) {
1834
1931
  const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}`, filter);
1835
1932
  return this.api.executeGET(endpoint, false);
1836
1933
  }
1934
+ /**
1935
+ * Obtiene el modelo de filtros disponibles para productos.
1936
+ */
1837
1937
  async getProductsFilters() {
1838
1938
  return this.api.executeGET(`${this.BASE_PATH}/filters`, false);
1839
1939
  }
1940
+ /**
1941
+ * Obtiene los detalles de un producto por su ID.
1942
+ */
1840
1943
  async getProductDetails(id) {
1841
1944
  return this.api.executeGET(`${this.BASE_PATH}/details/${id}`, false);
1842
1945
  }
1946
+ /**
1947
+ * Obtiene un producto por su ID.
1948
+ */
1843
1949
  async getProductById(id) {
1844
1950
  return this.api.executeGET(`${this.BASE_PATH}/${id}`, false);
1845
1951
  }
1952
+ /**
1953
+ * Crea un nuevo producto.
1954
+ */
1846
1955
  async createProduct(request) {
1847
1956
  return this.api.executePOST(`${this.BASE_PATH}`, request);
1848
1957
  }
1958
+ /**
1959
+ * Actualiza un producto existente.
1960
+ */
1849
1961
  async updateProduct(id, request) {
1850
1962
  return this.api.executePUT(`${this.BASE_PATH}/${id}`, request);
1851
1963
  }
1964
+ /**
1965
+ * Elimina un producto.
1966
+ */
1852
1967
  async deleteProduct(id) {
1853
1968
  return this.api.executeDELETE(`${this.BASE_PATH}/${id}`);
1854
1969
  }
1970
+ /**
1971
+ * Obtiene la plantilla para la carga masiva de productos.
1972
+ */
1855
1973
  async getProductsBulkTemplate() {
1856
1974
  return this.api.executeBlobGET(`${this.BASE_PATH}/bulk/template`, false);
1857
1975
  }
1976
+ /**
1977
+ * Obtiene el layout para la actualización masiva de productos.
1978
+ */
1858
1979
  async getProductsBulkLayout(ids) {
1859
1980
  return this.api.executeBlobGET(`${this.BASE_PATH}/bulk/layout?ids=${ids.join(",")}`, false);
1860
1981
  }
1982
+ /**
1983
+ * Realiza una carga masiva (upsert) de productos.
1984
+ */
1861
1985
  async bulkUpsertProducts(request) {
1862
1986
  return this.api.executePOST(`${this.BASE_PATH}/bulk`, request);
1863
1987
  }
1864
1988
  // #endregion
1865
1989
  // #region POD
1990
+ /**
1991
+ * Obtiene todos los registros POD con filtros opcionales.
1992
+ */
1866
1993
  async getPODs(filter) {
1867
1994
  const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/pod`, filter);
1868
1995
  return this.api.executeGET(endpoint, false);
1869
1996
  }
1997
+ /**
1998
+ * Obtiene el modelo de filtros disponibles para POD.
1999
+ */
1870
2000
  async getPODFilters() {
1871
2001
  return this.api.executeGET(`${this.BASE_PATH}/pod/filters`, false);
1872
2002
  }
2003
+ /**
2004
+ * Obtiene un registro POD por su ID.
2005
+ */
1873
2006
  async getPODById(id) {
1874
2007
  return this.api.executeGET(`${this.BASE_PATH}/pod/${id}`, false);
1875
2008
  }
2009
+ /**
2010
+ * Crea un nuevo registro POD.
2011
+ */
1876
2012
  async createPOD(request) {
1877
2013
  return this.api.executePOST(`${this.BASE_PATH}/pod`, request);
1878
2014
  }
2015
+ /**
2016
+ * Actualiza un registro POD existente.
2017
+ */
1879
2018
  async updatePOD(id, request) {
1880
2019
  return this.api.executePUT(`${this.BASE_PATH}/pod/${id}`, request);
1881
2020
  }
2021
+ /**
2022
+ * Elimina un registro POD.
2023
+ */
1882
2024
  async deletePOD(id) {
1883
2025
  return this.api.executeDELETE(`${this.BASE_PATH}/pod/${id}`);
1884
2026
  }
2027
+ /**
2028
+ * Obtiene la plantilla para la carga masiva de PODs.
2029
+ */
1885
2030
  async getPODsBulkTemplate() {
1886
2031
  return this.api.executeBlobGET(`${this.BASE_PATH}/pod/bulk/template`, false);
1887
2032
  }
2033
+ /**
2034
+ * Obtiene el layout para la actualización masiva de PODs.
2035
+ */
1888
2036
  async getPODsBulkLayout(ids) {
1889
2037
  return this.api.executeBlobGET(`${this.BASE_PATH}/pod/bulk/layout?ids=${ids.join(",")}`, false);
1890
2038
  }
2039
+ /**
2040
+ * Realiza una carga masiva (upsert) de PODs.
2041
+ */
1891
2042
  async bulkUpsertPODs(request) {
1892
2043
  return this.api.executePOST(`${this.BASE_PATH}/pod/bulk`, request);
1893
2044
  }
1894
2045
  // #endregion
1895
2046
  // #region ARTWORKS
2047
+ /**
2048
+ * Obtiene todos los artes con filtros opcionales.
2049
+ */
1896
2050
  async getArtworks(filter) {
1897
2051
  const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/pod/artworks`, filter);
1898
2052
  return this.api.executeGET(endpoint, false);
1899
2053
  }
2054
+ /**
2055
+ * Obtiene el modelo de filtros disponibles para artes.
2056
+ */
1900
2057
  async getArtworksFilters() {
1901
2058
  return this.api.executeGET(`${this.BASE_PATH}/pod/artworks/filters`, false);
1902
2059
  }
2060
+ /**
2061
+ * Obtiene un arte por su ID.
2062
+ */
1903
2063
  async getArtworkById(id) {
1904
2064
  return this.api.executeGET(`${this.BASE_PATH}/pod/artworks/${id}`, false);
1905
2065
  }
2066
+ /**
2067
+ * Crea un nuevo arte.
2068
+ */
1906
2069
  async createArtwork(request) {
1907
2070
  return this.api.executePOST(`${this.BASE_PATH}/pod/artworks`, request);
1908
2071
  }
2072
+ /**
2073
+ * Actualiza un arte existente.
2074
+ */
1909
2075
  async updateArtwork(id, request) {
1910
2076
  return this.api.executePUT(`${this.BASE_PATH}/pod/artworks/${id}`, request);
1911
2077
  }
2078
+ /**
2079
+ * Elimina un arte.
2080
+ */
1912
2081
  async deleteArtwork(id) {
1913
2082
  return this.api.executeDELETE(`${this.BASE_PATH}/pod/artworks/${id}`);
1914
2083
  }
2084
+ /**
2085
+ * Obtiene la plantilla para la carga masiva de artes.
2086
+ */
1915
2087
  async getArtworksBulkTemplate() {
1916
2088
  return this.api.executeBlobGET(`${this.BASE_PATH}/pod/artworks/bulk/template`, false);
1917
2089
  }
2090
+ /**
2091
+ * Obtiene el layout para la actualización masiva de artes.
2092
+ */
1918
2093
  async getArtworksBulkLayout(ids) {
1919
2094
  return this.api.executeBlobGET(`${this.BASE_PATH}/pod/artworks/bulk/layout?ids=${ids.join(",")}`, false);
1920
2095
  }
2096
+ /**
2097
+ * Realiza una carga masiva (upsert) de artes.
2098
+ */
1921
2099
  async bulkUpsertArtworks(request) {
1922
2100
  return this.api.executePOST(`${this.BASE_PATH}/pod/artworks/bulk`, request);
1923
2101
  }
1924
2102
  // #endregion
1925
2103
  // #region ARTWORK CONSUMABLES
2104
+ /**
2105
+ * Obtiene todos los consumibles de arte con filtros opcionales.
2106
+ */
1926
2107
  async getArtworkConsumables(filter) {
1927
2108
  const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/pod/artworks-consumables`, filter);
1928
2109
  return this.api.executeGET(endpoint, false);
1929
2110
  }
2111
+ /**
2112
+ * Obtiene el modelo de filtros disponibles para consumibles de arte.
2113
+ */
1930
2114
  async getArtworkConsumablesFilters() {
1931
2115
  return this.api.executeGET(`${this.BASE_PATH}/pod/artworks-consumables/filters`, false);
1932
2116
  }
2117
+ /**
2118
+ * Obtiene un consumible de arte por su ID.
2119
+ */
1933
2120
  async getArtworkConsumableById(id) {
1934
2121
  return this.api.executeGET(`${this.BASE_PATH}/pod/artworks-consumables/${id}`, false);
1935
2122
  }
2123
+ /**
2124
+ * Crea un nuevo consumible de arte.
2125
+ */
1936
2126
  async createArtworkConsumable(request) {
1937
2127
  return this.api.executePOST(`${this.BASE_PATH}/pod/artworks-consumables`, request);
1938
2128
  }
2129
+ /**
2130
+ * Actualiza un consumible de arte existente.
2131
+ */
1939
2132
  async updateArtworkConsumable(id, request) {
1940
2133
  return this.api.executePUT(`${this.BASE_PATH}/pod/artworks-consumables/${id}`, request);
1941
2134
  }
2135
+ /**
2136
+ * Elimina un consumible de arte.
2137
+ */
1942
2138
  async deleteArtworkConsumable(id) {
1943
2139
  return this.api.executeDELETE(`${this.BASE_PATH}/pod/artworks-consumables/${id}`);
1944
2140
  }