falconhub-apilibrary 1.4.0-dev.111 → 1.4.0-dev.113
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.d.mts +245 -244
- package/dist/index.mjs +173 -170
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1077,6 +1077,176 @@ var InventoryService = class {
|
|
|
1077
1077
|
// #endregion
|
|
1078
1078
|
};
|
|
1079
1079
|
|
|
1080
|
+
// src/services/ProductService.ts
|
|
1081
|
+
var ProductService = class {
|
|
1082
|
+
constructor(api) {
|
|
1083
|
+
this.BASE_PATH = "products";
|
|
1084
|
+
this.api = api;
|
|
1085
|
+
}
|
|
1086
|
+
// #region COLORS
|
|
1087
|
+
/**
|
|
1088
|
+
* Obtiene todos los colores con filtros opcionales.
|
|
1089
|
+
*/
|
|
1090
|
+
async getColors(filter) {
|
|
1091
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/catalogs/colors`, filter);
|
|
1092
|
+
return this.api.executeGET(endpoint, false);
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* Obtiene el modelo de filtros disponibles para colores.
|
|
1096
|
+
*/
|
|
1097
|
+
async getColorsFilters() {
|
|
1098
|
+
return this.api.executeGET(`${this.BASE_PATH}/catalogs/colors/filters`, false);
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* Obtiene un color por su ID.
|
|
1102
|
+
*/
|
|
1103
|
+
async getColorById(id) {
|
|
1104
|
+
return this.api.executeGET(`${this.BASE_PATH}/catalogs/colors/${id}`, false);
|
|
1105
|
+
}
|
|
1106
|
+
/**
|
|
1107
|
+
* Crea un nuevo color.
|
|
1108
|
+
*/
|
|
1109
|
+
async createColor(request) {
|
|
1110
|
+
return this.api.executePOST(`${this.BASE_PATH}/catalogs/colors`, request);
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* Actualiza un color existente.
|
|
1114
|
+
*/
|
|
1115
|
+
async updateColor(id, request) {
|
|
1116
|
+
return this.api.executePUT(`${this.BASE_PATH}/catalogs/colors/${id}`, request);
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Elimina un color.
|
|
1120
|
+
*/
|
|
1121
|
+
async deleteColor(id) {
|
|
1122
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/catalogs/colors/${id}`);
|
|
1123
|
+
}
|
|
1124
|
+
// #endregion
|
|
1125
|
+
// #region SIZE GROUPS
|
|
1126
|
+
/**
|
|
1127
|
+
* Obtiene todos los grupos de tallas con filtros opcionales.
|
|
1128
|
+
*/
|
|
1129
|
+
async getSizeGroups(filter) {
|
|
1130
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/catalogs/size-groups`, filter);
|
|
1131
|
+
return this.api.executeGET(endpoint, false);
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Obtiene el modelo de filtros disponibles para grupos de tallas.
|
|
1135
|
+
*/
|
|
1136
|
+
async getSizeGroupsFilters() {
|
|
1137
|
+
return this.api.executeGET(`${this.BASE_PATH}/catalogs/size-groups/filters`, false);
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* Obtiene un grupo de tallas por su ID.
|
|
1141
|
+
*/
|
|
1142
|
+
async getSizeGroupById(id) {
|
|
1143
|
+
return this.api.executeGET(`${this.BASE_PATH}/catalogs/size-groups/${id}`, false);
|
|
1144
|
+
}
|
|
1145
|
+
/**
|
|
1146
|
+
* Crea un nuevo grupo de tallas.
|
|
1147
|
+
*/
|
|
1148
|
+
async createSizeGroup(request) {
|
|
1149
|
+
return this.api.executePOST(`${this.BASE_PATH}/catalogs/size-groups`, request);
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* Actualiza un grupo de tallas existente.
|
|
1153
|
+
*/
|
|
1154
|
+
async updateSizeGroup(id, request) {
|
|
1155
|
+
return this.api.executePUT(`${this.BASE_PATH}/catalogs/size-groups/${id}`, request);
|
|
1156
|
+
}
|
|
1157
|
+
/**
|
|
1158
|
+
* Elimina un grupo de tallas.
|
|
1159
|
+
*/
|
|
1160
|
+
async deleteSizeGroup(id) {
|
|
1161
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/catalogs/size-groups/${id}`);
|
|
1162
|
+
}
|
|
1163
|
+
// #endregion
|
|
1164
|
+
// #region SIZES
|
|
1165
|
+
/**
|
|
1166
|
+
* Obtiene todas las tallas con filtros opcionales.
|
|
1167
|
+
*/
|
|
1168
|
+
async getSizes(filter) {
|
|
1169
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/catalogs/sizes`, filter);
|
|
1170
|
+
return this.api.executeGET(endpoint, false);
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Obtiene el modelo de filtros disponibles para tallas.
|
|
1174
|
+
*/
|
|
1175
|
+
async getSizesFilters() {
|
|
1176
|
+
return this.api.executeGET(`${this.BASE_PATH}/catalogs/sizes/filters`, false);
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
* Obtiene una talla por su ID.
|
|
1180
|
+
*/
|
|
1181
|
+
async getSizeById(id) {
|
|
1182
|
+
return this.api.executeGET(`${this.BASE_PATH}/catalogs/sizes/${id}`, false);
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Crea una nueva talla.
|
|
1186
|
+
*/
|
|
1187
|
+
async createSize(request) {
|
|
1188
|
+
return this.api.executePOST(`${this.BASE_PATH}/catalogs/sizes`, request);
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* Actualiza una talla existente.
|
|
1192
|
+
*/
|
|
1193
|
+
async updateSize(id, request) {
|
|
1194
|
+
return this.api.executePUT(`${this.BASE_PATH}/catalogs/sizes/${id}`, request);
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* Elimina una talla.
|
|
1198
|
+
*/
|
|
1199
|
+
async deleteSize(id) {
|
|
1200
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/catalogs/sizes/${id}`);
|
|
1201
|
+
}
|
|
1202
|
+
// #endregion
|
|
1203
|
+
// #region BLANKS
|
|
1204
|
+
/**
|
|
1205
|
+
* Obtiene todos los blanks con filtros opcionales.
|
|
1206
|
+
*/
|
|
1207
|
+
async getBlanks(filter) {
|
|
1208
|
+
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/blanks`, filter);
|
|
1209
|
+
return this.api.executeGET(endpoint, false);
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* Obtiene el modelo de filtros disponibles para blanks.
|
|
1213
|
+
*/
|
|
1214
|
+
async getBlanksFilters() {
|
|
1215
|
+
return this.api.executeGET(`${this.BASE_PATH}/blanks/filters`, false);
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Obtiene un blank por su ID.
|
|
1219
|
+
*/
|
|
1220
|
+
async getBlankById(id) {
|
|
1221
|
+
return this.api.executeGET(`${this.BASE_PATH}/blanks/${id}`, false);
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* Crea un nuevo blank.
|
|
1225
|
+
*/
|
|
1226
|
+
async createBlank(request) {
|
|
1227
|
+
return this.api.executePOST(`${this.BASE_PATH}/blanks`, request);
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* Actualiza un blank existente.
|
|
1231
|
+
*/
|
|
1232
|
+
async updateBlank(id, request) {
|
|
1233
|
+
return this.api.executePUT(`${this.BASE_PATH}/blanks/${id}`, request);
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* Alterna el estado activo de un blank.
|
|
1237
|
+
*/
|
|
1238
|
+
async toggleBlankStatus(id) {
|
|
1239
|
+
return this.api.executePUT(`${this.BASE_PATH}/blanks/${id}/toggle-status`);
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Elimina un blank.
|
|
1243
|
+
*/
|
|
1244
|
+
async deleteBlank(id) {
|
|
1245
|
+
return this.api.executeDELETE(`${this.BASE_PATH}/blanks/${id}`);
|
|
1246
|
+
}
|
|
1247
|
+
// #endregion
|
|
1248
|
+
};
|
|
1249
|
+
|
|
1080
1250
|
// src/services/SystemService.ts
|
|
1081
1251
|
var SystemService = class {
|
|
1082
1252
|
constructor(api) {
|
|
@@ -1542,6 +1712,9 @@ var FalconHUBSDK = class {
|
|
|
1542
1712
|
this.catalog = new CatalogService(
|
|
1543
1713
|
this.api
|
|
1544
1714
|
);
|
|
1715
|
+
this.product = new ProductService(
|
|
1716
|
+
this.api
|
|
1717
|
+
);
|
|
1545
1718
|
}
|
|
1546
1719
|
normalizeAutoRefreshConfig(config) {
|
|
1547
1720
|
if (typeof config === "boolean") {
|
|
@@ -1594,176 +1767,6 @@ var FalconHUBSDK = class {
|
|
|
1594
1767
|
}
|
|
1595
1768
|
};
|
|
1596
1769
|
|
|
1597
|
-
// src/services/ProductService.ts
|
|
1598
|
-
var ProductService = class {
|
|
1599
|
-
constructor(api) {
|
|
1600
|
-
this.BASE_PATH = "products";
|
|
1601
|
-
this.api = api;
|
|
1602
|
-
}
|
|
1603
|
-
// #region COLORS
|
|
1604
|
-
/**
|
|
1605
|
-
* Obtiene todos los colores con filtros opcionales.
|
|
1606
|
-
*/
|
|
1607
|
-
async getColors(filter) {
|
|
1608
|
-
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/colors`, filter);
|
|
1609
|
-
return this.api.executeGET(endpoint, false);
|
|
1610
|
-
}
|
|
1611
|
-
/**
|
|
1612
|
-
* Obtiene el modelo de filtros disponibles para colores.
|
|
1613
|
-
*/
|
|
1614
|
-
async getColorsFilters() {
|
|
1615
|
-
return this.api.executeGET(`${this.BASE_PATH}/colors/filters`, false);
|
|
1616
|
-
}
|
|
1617
|
-
/**
|
|
1618
|
-
* Obtiene un color por su ID.
|
|
1619
|
-
*/
|
|
1620
|
-
async getColorById(id) {
|
|
1621
|
-
return this.api.executeGET(`${this.BASE_PATH}/colors/${id}`, false);
|
|
1622
|
-
}
|
|
1623
|
-
/**
|
|
1624
|
-
* Crea un nuevo color.
|
|
1625
|
-
*/
|
|
1626
|
-
async createColor(request) {
|
|
1627
|
-
return this.api.executePOST(`${this.BASE_PATH}/colors`, request);
|
|
1628
|
-
}
|
|
1629
|
-
/**
|
|
1630
|
-
* Actualiza un color existente.
|
|
1631
|
-
*/
|
|
1632
|
-
async updateColor(id, request) {
|
|
1633
|
-
return this.api.executePUT(`${this.BASE_PATH}/colors/${id}`, request);
|
|
1634
|
-
}
|
|
1635
|
-
/**
|
|
1636
|
-
* Elimina un color.
|
|
1637
|
-
*/
|
|
1638
|
-
async deleteColor(id) {
|
|
1639
|
-
return this.api.executeDELETE(`${this.BASE_PATH}/colors/${id}`);
|
|
1640
|
-
}
|
|
1641
|
-
// #endregion
|
|
1642
|
-
// #region SIZE GROUPS
|
|
1643
|
-
/**
|
|
1644
|
-
* Obtiene todos los grupos de tallas con filtros opcionales.
|
|
1645
|
-
*/
|
|
1646
|
-
async getSizeGroups(filter) {
|
|
1647
|
-
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/size-groups`, filter);
|
|
1648
|
-
return this.api.executeGET(endpoint, false);
|
|
1649
|
-
}
|
|
1650
|
-
/**
|
|
1651
|
-
* Obtiene el modelo de filtros disponibles para grupos de tallas.
|
|
1652
|
-
*/
|
|
1653
|
-
async getSizeGroupsFilters() {
|
|
1654
|
-
return this.api.executeGET(`${this.BASE_PATH}/size-groups/filters`, false);
|
|
1655
|
-
}
|
|
1656
|
-
/**
|
|
1657
|
-
* Obtiene un grupo de tallas por su ID.
|
|
1658
|
-
*/
|
|
1659
|
-
async getSizeGroupById(id) {
|
|
1660
|
-
return this.api.executeGET(`${this.BASE_PATH}/size-groups/${id}`, false);
|
|
1661
|
-
}
|
|
1662
|
-
/**
|
|
1663
|
-
* Crea un nuevo grupo de tallas.
|
|
1664
|
-
*/
|
|
1665
|
-
async createSizeGroup(request) {
|
|
1666
|
-
return this.api.executePOST(`${this.BASE_PATH}/size-groups`, request);
|
|
1667
|
-
}
|
|
1668
|
-
/**
|
|
1669
|
-
* Actualiza un grupo de tallas existente.
|
|
1670
|
-
*/
|
|
1671
|
-
async updateSizeGroup(id, request) {
|
|
1672
|
-
return this.api.executePUT(`${this.BASE_PATH}/size-groups/${id}`, request);
|
|
1673
|
-
}
|
|
1674
|
-
/**
|
|
1675
|
-
* Elimina un grupo de tallas.
|
|
1676
|
-
*/
|
|
1677
|
-
async deleteSizeGroup(id) {
|
|
1678
|
-
return this.api.executeDELETE(`${this.BASE_PATH}/size-groups/${id}`);
|
|
1679
|
-
}
|
|
1680
|
-
// #endregion
|
|
1681
|
-
// #region SIZES
|
|
1682
|
-
/**
|
|
1683
|
-
* Obtiene todas las tallas con filtros opcionales.
|
|
1684
|
-
*/
|
|
1685
|
-
async getSizes(filter) {
|
|
1686
|
-
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/sizes`, filter);
|
|
1687
|
-
return this.api.executeGET(endpoint, false);
|
|
1688
|
-
}
|
|
1689
|
-
/**
|
|
1690
|
-
* Obtiene el modelo de filtros disponibles para tallas.
|
|
1691
|
-
*/
|
|
1692
|
-
async getSizesFilters() {
|
|
1693
|
-
return this.api.executeGET(`${this.BASE_PATH}/sizes/filters`, false);
|
|
1694
|
-
}
|
|
1695
|
-
/**
|
|
1696
|
-
* Obtiene una talla por su ID.
|
|
1697
|
-
*/
|
|
1698
|
-
async getSizeById(id) {
|
|
1699
|
-
return this.api.executeGET(`${this.BASE_PATH}/sizes/${id}`, false);
|
|
1700
|
-
}
|
|
1701
|
-
/**
|
|
1702
|
-
* Crea una nueva talla.
|
|
1703
|
-
*/
|
|
1704
|
-
async createSize(request) {
|
|
1705
|
-
return this.api.executePOST(`${this.BASE_PATH}/sizes`, request);
|
|
1706
|
-
}
|
|
1707
|
-
/**
|
|
1708
|
-
* Actualiza una talla existente.
|
|
1709
|
-
*/
|
|
1710
|
-
async updateSize(id, request) {
|
|
1711
|
-
return this.api.executePUT(`${this.BASE_PATH}/sizes/${id}`, request);
|
|
1712
|
-
}
|
|
1713
|
-
/**
|
|
1714
|
-
* Elimina una talla.
|
|
1715
|
-
*/
|
|
1716
|
-
async deleteSize(id) {
|
|
1717
|
-
return this.api.executeDELETE(`${this.BASE_PATH}/sizes/${id}`);
|
|
1718
|
-
}
|
|
1719
|
-
// #endregion
|
|
1720
|
-
// #region BLANKS
|
|
1721
|
-
/**
|
|
1722
|
-
* Obtiene todos los blanks con filtros opcionales.
|
|
1723
|
-
*/
|
|
1724
|
-
async getBlanks(filter) {
|
|
1725
|
-
const endpoint = FilterBuilder.buildEndpoint(`${this.BASE_PATH}/blanks`, filter);
|
|
1726
|
-
return this.api.executeGET(endpoint, false);
|
|
1727
|
-
}
|
|
1728
|
-
/**
|
|
1729
|
-
* Obtiene el modelo de filtros disponibles para blanks.
|
|
1730
|
-
*/
|
|
1731
|
-
async getBlanksFilters() {
|
|
1732
|
-
return this.api.executeGET(`${this.BASE_PATH}/blanks/filters`, false);
|
|
1733
|
-
}
|
|
1734
|
-
/**
|
|
1735
|
-
* Obtiene un blank por su ID.
|
|
1736
|
-
*/
|
|
1737
|
-
async getBlankById(id) {
|
|
1738
|
-
return this.api.executeGET(`${this.BASE_PATH}/blanks/${id}`, false);
|
|
1739
|
-
}
|
|
1740
|
-
/**
|
|
1741
|
-
* Crea un nuevo blank.
|
|
1742
|
-
*/
|
|
1743
|
-
async createBlank(request) {
|
|
1744
|
-
return this.api.executePOST(`${this.BASE_PATH}/blanks`, request);
|
|
1745
|
-
}
|
|
1746
|
-
/**
|
|
1747
|
-
* Actualiza un blank existente.
|
|
1748
|
-
*/
|
|
1749
|
-
async updateBlank(id, request) {
|
|
1750
|
-
return this.api.executePUT(`${this.BASE_PATH}/blanks/${id}`, request);
|
|
1751
|
-
}
|
|
1752
|
-
/**
|
|
1753
|
-
* Alterna el estado activo de un blank.
|
|
1754
|
-
*/
|
|
1755
|
-
async toggleBlankStatus(id) {
|
|
1756
|
-
return this.api.executePUT(`${this.BASE_PATH}/blanks/${id}/toggle-status`);
|
|
1757
|
-
}
|
|
1758
|
-
/**
|
|
1759
|
-
* Elimina un blank.
|
|
1760
|
-
*/
|
|
1761
|
-
async deleteBlank(id) {
|
|
1762
|
-
return this.api.executeDELETE(`${this.BASE_PATH}/blanks/${id}`);
|
|
1763
|
-
}
|
|
1764
|
-
// #endregion
|
|
1765
|
-
};
|
|
1766
|
-
|
|
1767
1770
|
// src/core/Encryption.ts
|
|
1768
1771
|
import CryptoJS2 from "crypto-js";
|
|
1769
1772
|
function decrypt(encryptedBase64, secret, timestamp) {
|