packages-ob-lib 0.0.1
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/README.md +73 -0
- package/dist/api.module.d.ts +2 -0
- package/dist/api.module.js +17 -0
- package/dist/api.module.js.map +1 -0
- package/dist/common/interceptors/api.response.interceptor.d.ts +5 -0
- package/dist/common/interceptors/api.response.interceptor.js +22 -0
- package/dist/common/interceptors/api.response.interceptor.js.map +1 -0
- package/dist/common/utils/api.response.formatter.d.ts +11 -0
- package/dist/common/utils/api.response.formatter.js +16 -0
- package/dist/common/utils/api.response.formatter.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/pos/openbravo/businessPartner/index.d.ts +91 -0
- package/dist/pos/openbravo/businessPartner/index.js +61 -0
- package/dist/pos/openbravo/businessPartner/index.js.map +1 -0
- package/dist/pos/openbravo/businessPartner/interfaces/businesspartner.export.interface.d.ts +69 -0
- package/dist/pos/openbravo/businessPartner/interfaces/businesspartner.export.interface.js +3 -0
- package/dist/pos/openbravo/businessPartner/interfaces/businesspartner.export.interface.js.map +1 -0
- package/dist/pos/openbravo/businessPartner/interfaces/businesspartner.import.interface.d.ts +63 -0
- package/dist/pos/openbravo/businessPartner/interfaces/businesspartner.import.interface.js +3 -0
- package/dist/pos/openbravo/businessPartner/interfaces/businesspartner.import.interface.js.map +1 -0
- package/dist/pos/openbravo/distributionOrder/index.d.ts +30 -0
- package/dist/pos/openbravo/distributionOrder/index.js +26 -0
- package/dist/pos/openbravo/distributionOrder/index.js.map +1 -0
- package/dist/pos/openbravo/distributionOrder/interfaces/distributionOrder.export.interface.d.ts +60 -0
- package/dist/pos/openbravo/distributionOrder/interfaces/distributionOrder.export.interface.js +3 -0
- package/dist/pos/openbravo/distributionOrder/interfaces/distributionOrder.export.interface.js.map +1 -0
- package/dist/pos/openbravo/goodsMovement/index.d.ts +43 -0
- package/dist/pos/openbravo/goodsMovement/index.js +34 -0
- package/dist/pos/openbravo/goodsMovement/index.js.map +1 -0
- package/dist/pos/openbravo/goodsMovement/interfaces/goodsMovement.export.interface.d.ts +89 -0
- package/dist/pos/openbravo/goodsMovement/interfaces/goodsMovement.export.interface.js +3 -0
- package/dist/pos/openbravo/goodsMovement/interfaces/goodsMovement.export.interface.js.map +1 -0
- package/dist/pos/openbravo/index.d.ts +1 -0
- package/dist/pos/openbravo/index.js +18 -0
- package/dist/pos/openbravo/index.js.map +1 -0
- package/dist/pos/openbravo/inventory/index.d.ts +43 -0
- package/dist/pos/openbravo/inventory/index.js +34 -0
- package/dist/pos/openbravo/inventory/index.js.map +1 -0
- package/dist/pos/openbravo/inventory/interfaces/inventory.export.interface.d.ts +82 -0
- package/dist/pos/openbravo/inventory/interfaces/inventory.export.interface.js +3 -0
- package/dist/pos/openbravo/inventory/interfaces/inventory.export.interface.js.map +1 -0
- package/dist/pos/openbravo/ob.service.d.ts +393 -0
- package/dist/pos/openbravo/ob.service.js +312 -0
- package/dist/pos/openbravo/ob.service.js.map +1 -0
- package/dist/pos/openbravo/order/index.d.ts +70 -0
- package/dist/pos/openbravo/order/index.js +44 -0
- package/dist/pos/openbravo/order/index.js.map +1 -0
- package/dist/pos/openbravo/order/interfaces/order.export.interface.d.ts +162 -0
- package/dist/pos/openbravo/order/interfaces/order.export.interface.js +3 -0
- package/dist/pos/openbravo/order/interfaces/order.export.interface.js.map +1 -0
- package/dist/pos/openbravo/order/interfaces/order.import.interface.d.ts +49 -0
- package/dist/pos/openbravo/order/interfaces/order.import.interface.js +3 -0
- package/dist/pos/openbravo/order/interfaces/order.import.interface.js.map +1 -0
- package/dist/pos/openbravo/organization/index.d.ts +12 -0
- package/dist/pos/openbravo/organization/index.js +14 -0
- package/dist/pos/openbravo/organization/index.js.map +1 -0
- package/dist/pos/openbravo/organization/interfaces/organization.export.interface.d.ts +39 -0
- package/dist/pos/openbravo/organization/interfaces/organization.export.interface.js +3 -0
- package/dist/pos/openbravo/organization/interfaces/organization.export.interface.js.map +1 -0
- package/dist/pos/openbravo/priceList/index.d.ts +46 -0
- package/dist/pos/openbravo/priceList/index.js +34 -0
- package/dist/pos/openbravo/priceList/index.js.map +1 -0
- package/dist/pos/openbravo/priceList/interfaces/priceList.export.interface.d.ts +29 -0
- package/dist/pos/openbravo/priceList/interfaces/priceList.export.interface.js +3 -0
- package/dist/pos/openbravo/priceList/interfaces/priceList.export.interface.js.map +1 -0
- package/dist/pos/openbravo/product/index.d.ts +169 -0
- package/dist/pos/openbravo/product/index.js +122 -0
- package/dist/pos/openbravo/product/index.js.map +1 -0
- package/dist/pos/openbravo/product/interfaces/product.export.interface.d.ts +95 -0
- package/dist/pos/openbravo/product/interfaces/product.export.interface.js +3 -0
- package/dist/pos/openbravo/product/interfaces/product.export.interface.js.map +1 -0
- package/dist/pos/openbravo/productCategory/index.d.ts +55 -0
- package/dist/pos/openbravo/productCategory/index.js +41 -0
- package/dist/pos/openbravo/productCategory/index.js.map +1 -0
- package/dist/pos/openbravo/productCategory/interfaces/productCategory.export.interface.d.ts +26 -0
- package/dist/pos/openbravo/productCategory/interfaces/productCategory.export.interface.js +3 -0
- package/dist/pos/openbravo/productCategory/interfaces/productCategory.export.interface.js.map +1 -0
- package/dist/pos/openbravo/productCharacteristic/index.d.ts +37 -0
- package/dist/pos/openbravo/productCharacteristic/index.js +31 -0
- package/dist/pos/openbravo/productCharacteristic/index.js.map +1 -0
- package/dist/pos/openbravo/productCharacteristic/interfaces/productCharacteristic.export.interface.d.ts +33 -0
- package/dist/pos/openbravo/productCharacteristic/interfaces/productCharacteristic.export.interface.js +3 -0
- package/dist/pos/openbravo/productCharacteristic/interfaces/productCharacteristic.export.interface.js.map +1 -0
- package/dist/pos/openbravo/productMedia/index.d.ts +11 -0
- package/dist/pos/openbravo/productMedia/index.js +11 -0
- package/dist/pos/openbravo/productMedia/index.js.map +1 -0
- package/dist/pos/openbravo/productMedia/interfaces/productMedia.export.interface.d.ts +10 -0
- package/dist/pos/openbravo/productMedia/interfaces/productMedia.export.interface.js +3 -0
- package/dist/pos/openbravo/productMedia/interfaces/productMedia.export.interface.js.map +1 -0
- package/dist/pos/openbravo/productPrice/index.d.ts +58 -0
- package/dist/pos/openbravo/productPrice/index.js +45 -0
- package/dist/pos/openbravo/productPrice/index.js.map +1 -0
- package/dist/pos/openbravo/productPrice/interfaces/productprice.export.interface.d.ts +42 -0
- package/dist/pos/openbravo/productPrice/interfaces/productprice.export.interface.js +3 -0
- package/dist/pos/openbravo/productPrice/interfaces/productprice.export.interface.js.map +1 -0
- package/dist/pos/openbravo/promotion/index.d.ts +64 -0
- package/dist/pos/openbravo/promotion/index.js +44 -0
- package/dist/pos/openbravo/promotion/index.js.map +1 -0
- package/dist/pos/openbravo/promotion/interfaces/promotion.export.interface.d.ts +171 -0
- package/dist/pos/openbravo/promotion/interfaces/promotion.export.interface.js +3 -0
- package/dist/pos/openbravo/promotion/interfaces/promotion.export.interface.js.map +1 -0
- package/dist/pos/openbravo/stock/index.d.ts +63 -0
- package/dist/pos/openbravo/stock/index.js +39 -0
- package/dist/pos/openbravo/stock/index.js.map +1 -0
- package/dist/pos/openbravo/stock/interfaces/stock.export.interface.d.ts +60 -0
- package/dist/pos/openbravo/stock/interfaces/stock.export.interface.js +3 -0
- package/dist/pos/openbravo/stock/interfaces/stock.export.interface.js.map +1 -0
- package/dist/pos/openbravo/stockTransaction/index.d.ts +111 -0
- package/dist/pos/openbravo/stockTransaction/index.js +69 -0
- package/dist/pos/openbravo/stockTransaction/index.js.map +1 -0
- package/dist/pos/openbravo/stockTransaction/interfaces/stockTransaction.export.interface.d.ts +58 -0
- package/dist/pos/openbravo/stockTransaction/interfaces/stockTransaction.export.interface.js +3 -0
- package/dist/pos/openbravo/stockTransaction/interfaces/stockTransaction.export.interface.js.map +1 -0
- package/dist/pos/openbravo/types.d.ts +15 -0
- package/dist/pos/openbravo/types.js +32 -0
- package/dist/pos/openbravo/types.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +76 -0
@@ -0,0 +1,312 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.OpenBravo = void 0;
|
4
|
+
const common_1 = require("@nestjs/common");
|
5
|
+
const axios_1 = require("axios");
|
6
|
+
const uuid_1 = require("uuid");
|
7
|
+
const product_1 = require("./product");
|
8
|
+
const priceList_1 = require("./priceList");
|
9
|
+
const promotion_1 = require("./promotion");
|
10
|
+
const organization_1 = require("./organization");
|
11
|
+
const productMedia_1 = require("./productMedia");
|
12
|
+
const productCategory_1 = require("./productCategory");
|
13
|
+
const productCharacteristic_1 = require("./productCharacteristic");
|
14
|
+
const order_1 = require("./order");
|
15
|
+
const businessPartner_1 = require("./businessPartner");
|
16
|
+
const stock_1 = require("./stock");
|
17
|
+
const goodsMovement_1 = require("./goodsMovement");
|
18
|
+
const inventory_1 = require("./inventory");
|
19
|
+
const stockTransaction_1 = require("./stockTransaction");
|
20
|
+
const productPrice_1 = require("./productPrice");
|
21
|
+
const distributionOrder_1 = require("./distributionOrder");
|
22
|
+
class OpenBravo {
|
23
|
+
constructor({ url, user_name, password }) {
|
24
|
+
this.base_url = url;
|
25
|
+
this.user_name = user_name;
|
26
|
+
this.password = password;
|
27
|
+
}
|
28
|
+
async call({ url, method, params, data, }) {
|
29
|
+
const auth = {
|
30
|
+
username: this.user_name,
|
31
|
+
password: this.password,
|
32
|
+
};
|
33
|
+
try {
|
34
|
+
const result = await axios_1.default.request({
|
35
|
+
url: `${this.base_url}${url}`,
|
36
|
+
method,
|
37
|
+
params,
|
38
|
+
data,
|
39
|
+
auth,
|
40
|
+
timeout: 30000,
|
41
|
+
});
|
42
|
+
if (result?.data?.error) {
|
43
|
+
common_1.Logger.error(`[${OpenBravo.name}]: ${JSON.stringify(result)}`);
|
44
|
+
throw new common_1.BadRequestException(result.data);
|
45
|
+
}
|
46
|
+
return result.data;
|
47
|
+
}
|
48
|
+
catch (error) {
|
49
|
+
common_1.Logger.error(`[${OpenBravo.name}]: Error: ${error}`);
|
50
|
+
throw new common_1.BadRequestException(error);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
get goodsMovement() {
|
54
|
+
return {
|
55
|
+
create: async ({ goodsMovements }) => this.call(goodsMovement_1.OBGoodsMovementService.create({
|
56
|
+
goodsMovements: Array.isArray(goodsMovements)
|
57
|
+
? goodsMovements
|
58
|
+
: [goodsMovements],
|
59
|
+
})),
|
60
|
+
findById: async ({ goodsMovementId }) => this.call(goodsMovement_1.OBGoodsMovementService.findById({ goodsMovementId })),
|
61
|
+
findByDocumentNo: async ({ documentNo }) => this.call(goodsMovement_1.OBGoodsMovementService.findByDocumentNo({ documentNo })),
|
62
|
+
findByOrganizationDateRange: async ({ org, dateFrom, dateTo, page, }) => this.call(goodsMovement_1.OBGoodsMovementService.findByOrganizationDateRange({
|
63
|
+
org,
|
64
|
+
dateFrom,
|
65
|
+
dateTo,
|
66
|
+
page,
|
67
|
+
})),
|
68
|
+
findAll: async () => this.call(goodsMovement_1.OBGoodsMovementService.findAll()),
|
69
|
+
};
|
70
|
+
}
|
71
|
+
get inventory() {
|
72
|
+
return {
|
73
|
+
create: async ({ inventories }) => this.call(inventory_1.OBInventoryService.create({
|
74
|
+
inventories: Array.isArray(inventories)
|
75
|
+
? inventories
|
76
|
+
: [inventories],
|
77
|
+
})),
|
78
|
+
findById: async ({ inventoryId }) => this.call(inventory_1.OBInventoryService.findById({ inventoryId })),
|
79
|
+
findByDocumentNo: async ({ documentNo }) => this.call(inventory_1.OBInventoryService.findByDocumentNo({ documentNo })),
|
80
|
+
findByWarehouseDateRange: async ({ warehouse, dateFrom, dateTo, page, }) => this.call(inventory_1.OBInventoryService.findByWarehouseDateRange({
|
81
|
+
warehouse,
|
82
|
+
dateFrom,
|
83
|
+
dateTo,
|
84
|
+
page,
|
85
|
+
})),
|
86
|
+
findAll: async () => this.call(inventory_1.OBInventoryService.findAll()),
|
87
|
+
};
|
88
|
+
}
|
89
|
+
get product() {
|
90
|
+
return {
|
91
|
+
create: async ({ products }) => this.call(product_1.OBProductService.create({
|
92
|
+
products: Array.isArray(products) ? products : [products],
|
93
|
+
})),
|
94
|
+
findByUPC: async ({ productUPC, page, pageSize, }) => this.call(product_1.OBProductService.findByUPC({ productUPC, page, pageSize })),
|
95
|
+
findByMultiUPC: async ({ productUPC, page, pageSize, }) => this.call(product_1.OBProductService.findByMultiUPC({ productUPC, page, pageSize })),
|
96
|
+
findByStore: async ({ productStore, page, pageSize, }) => this.call(product_1.OBProductService.findByStore({ productStore, page, pageSize })),
|
97
|
+
findBySearchKey: async ({ productSearchKey, page, pageSize, }) => this.call(product_1.OBProductService.findBySearchKey({
|
98
|
+
productSearchKey,
|
99
|
+
page,
|
100
|
+
pageSize,
|
101
|
+
})),
|
102
|
+
findByRelatedProductCategory: async ({ productRelatedProductCategory, page, pageSize, }) => this.call(product_1.OBProductService.findByRelatedProductCategory({
|
103
|
+
productRelatedProductCategory,
|
104
|
+
page,
|
105
|
+
pageSize,
|
106
|
+
})),
|
107
|
+
findByRelatedProduct: async ({ productRelatedProduct, page, pageSize, }) => this.call(product_1.OBProductService.findByRelatedProduct({
|
108
|
+
productRelatedProduct,
|
109
|
+
page,
|
110
|
+
pageSize,
|
111
|
+
})),
|
112
|
+
findByRelatableProduct: async ({ productRelatableProduct, page, pageSize, }) => this.call(product_1.OBProductService.findByRelatableProduct({
|
113
|
+
productRelatableProduct,
|
114
|
+
page,
|
115
|
+
pageSize,
|
116
|
+
})),
|
117
|
+
findByProductCategory: async ({ productProductCategory, page, pageSize, }) => this.call(product_1.OBProductService.findByProductCategory({
|
118
|
+
productProductCategory,
|
119
|
+
page,
|
120
|
+
pageSize,
|
121
|
+
})),
|
122
|
+
findByName: async ({ productName, page, pageSize, }) => this.call(product_1.OBProductService.findByName({ productName, page, pageSize })),
|
123
|
+
findByOrg: async ({ productOrg, page, pageSize, }) => this.call(product_1.OBProductService.findByOrg({ productOrg, page, pageSize })),
|
124
|
+
findByAssortment: async ({ productAssortment, page, pageSize, }) => this.call(product_1.OBProductService.findByAssortment({
|
125
|
+
productAssortment,
|
126
|
+
page,
|
127
|
+
pageSize,
|
128
|
+
})),
|
129
|
+
findById: async ({ productId }) => this.call(product_1.OBProductService.findById({ productId })),
|
130
|
+
findAll: async ({ page, pageSize, } = {}) => this.call(product_1.OBProductService.findAll({ page, pageSize })),
|
131
|
+
};
|
132
|
+
}
|
133
|
+
get priceList() {
|
134
|
+
return {
|
135
|
+
create: async ({ priceLists }) => this.call(priceList_1.OBPriceListService.create({
|
136
|
+
priceLists: Array.isArray(priceLists) ? priceLists : [priceLists],
|
137
|
+
})),
|
138
|
+
findAll: async () => this.call(priceList_1.OBPriceListService.findAll()),
|
139
|
+
findByPriceListId: async ({ priceListId }) => this.call(priceList_1.OBPriceListService.findByPriceListId({ priceListId })),
|
140
|
+
findByName: async ({ priceListName }) => this.call(priceList_1.OBPriceListService.findByName({ priceListName })),
|
141
|
+
findByOrg: async ({ priceListOrg }) => this.call(priceList_1.OBPriceListService.findByOrg({ priceListOrg })),
|
142
|
+
findByStore: async ({ priceListStore }) => this.call(priceList_1.OBPriceListService.findByStore({ priceListStore })),
|
143
|
+
};
|
144
|
+
}
|
145
|
+
get promotion() {
|
146
|
+
return {
|
147
|
+
create: async ({ promotions }) => this.call(promotion_1.OBPromotionService.create({
|
148
|
+
promotions: Array.isArray(promotions) ? promotions : [promotions],
|
149
|
+
})),
|
150
|
+
findByOrg: async ({ promotionOrg }) => this.call(promotion_1.OBPromotionService.findByOrg({
|
151
|
+
promotionOrg,
|
152
|
+
})),
|
153
|
+
findByName: async ({ promotionName }) => this.call(promotion_1.OBPromotionService.findByName({
|
154
|
+
promotionName,
|
155
|
+
})),
|
156
|
+
findByIncludedProduct: async ({ promotionProduct, }) => this.call(promotion_1.OBPromotionService.findByIncludedProduct({
|
157
|
+
promotionProduct,
|
158
|
+
})),
|
159
|
+
findByIncludedProductCategory: async ({ promotionProductCategory, }) => this.call(promotion_1.OBPromotionService.findByIncludedProductCategory({
|
160
|
+
promotionProductCategory,
|
161
|
+
})),
|
162
|
+
findByCoupons: async ({ promotionCoupons, }) => this.call(promotion_1.OBPromotionService.findByCoupons({ promotionCoupons })),
|
163
|
+
findById: async ({ promotionId }) => this.call(promotion_1.OBPromotionService.findById({ promotionId })),
|
164
|
+
findAll: async () => this.call(promotion_1.OBPromotionService.findAll()),
|
165
|
+
};
|
166
|
+
}
|
167
|
+
get productCharacteristic() {
|
168
|
+
return {
|
169
|
+
findAll: async () => this.call(productCharacteristic_1.OBProductCharacteristicService.findAll()),
|
170
|
+
findById: ({ productCharacteristicID, }) => this.call(productCharacteristic_1.OBProductCharacteristicService.findById({ productCharacteristicID })),
|
171
|
+
findByName: ({ name }) => this.call(productCharacteristic_1.OBProductCharacteristicService.findByName({ name })),
|
172
|
+
findByOrg: ({ organization }) => this.call(productCharacteristic_1.OBProductCharacteristicService.findByOrg({ organization })),
|
173
|
+
create: ({ productCharacteristics, }) => this.call(productCharacteristic_1.OBProductCharacteristicService.create({
|
174
|
+
productCharacteristics: Array.isArray(productCharacteristics)
|
175
|
+
? productCharacteristics
|
176
|
+
: [productCharacteristics],
|
177
|
+
})),
|
178
|
+
};
|
179
|
+
}
|
180
|
+
get productCategory() {
|
181
|
+
return {
|
182
|
+
findAll: async () => this.call(productCategory_1.OBProductCategoryService.findAll()),
|
183
|
+
findById: ({ productCategoryId }) => this.call(productCategory_1.OBProductCategoryService.findById({ productCategoryId })),
|
184
|
+
findByName: ({ name }) => this.call(productCategory_1.OBProductCategoryService.findByName({ name })),
|
185
|
+
findByOrg: ({ organization }) => this.call(productCategory_1.OBProductCategoryService.findByOrg({ organization })),
|
186
|
+
findBySearchKey: ({ searchKey }) => this.call(productCategory_1.OBProductCategoryService.findBySearchKey({ searchKey })),
|
187
|
+
findByStore: ({ store }) => this.call(productCategory_1.OBProductCategoryService.findByStore({ store })),
|
188
|
+
create: ({ productCategories }) => this.call(productCategory_1.OBProductCategoryService.create({
|
189
|
+
productCategories: Array.isArray(productCategories)
|
190
|
+
? productCategories
|
191
|
+
: [productCategories],
|
192
|
+
})),
|
193
|
+
};
|
194
|
+
}
|
195
|
+
get organization() {
|
196
|
+
return {
|
197
|
+
findAll: async () => this.call(organization_1.OBOrganizationService.findAll()),
|
198
|
+
findByOrganizationId: async ({ organizationId, }) => this.call(organization_1.OBOrganizationService.findByOrganizationId({ organizationId })),
|
199
|
+
};
|
200
|
+
}
|
201
|
+
get productMedia() {
|
202
|
+
return {
|
203
|
+
findByProductSearchKey: async ({ productSearchKey, }) => this.call(productMedia_1.OBProductMediaService.findByProductSearchKey({ productSearchKey })),
|
204
|
+
};
|
205
|
+
}
|
206
|
+
get order() {
|
207
|
+
return {
|
208
|
+
create: async ({ order }) => this.call(order_1.OBOrderService.create({
|
209
|
+
order: order,
|
210
|
+
})),
|
211
|
+
findAll: async () => this.call(order_1.OBOrderService.findAll()),
|
212
|
+
findById: async ({ orderId }) => this.call(order_1.OBOrderService.findById({ orderId })),
|
213
|
+
findByDocumentNo: async ({ documentNo }) => this.call(order_1.OBOrderService.findByDocumentNo({ documentNo })),
|
214
|
+
findByDocumentNumbers: async ({ documentNumbers, }) => this.call(order_1.OBOrderService.findByDocumentNumbers({ documentNumbers })),
|
215
|
+
findByIncludedOrders: async ({ includedOrders, }) => this.call(order_1.OBOrderService.findByIncludedOrders({ includedOrders })),
|
216
|
+
findByOrgOrderDate: async ({ organization, orderDate, }) => this.call(order_1.OBOrderService.findByOrgOrderDate({ organization, orderDate })),
|
217
|
+
findByOrgOrderDateRange: async ({ organization, dateTo, dateFrom, }) => this.call(order_1.OBOrderService.findByOrgOrderDateRange({
|
218
|
+
organization,
|
219
|
+
dateTo,
|
220
|
+
dateFrom,
|
221
|
+
})),
|
222
|
+
};
|
223
|
+
}
|
224
|
+
get businessPartner() {
|
225
|
+
return {
|
226
|
+
create: async ({ businessPartners }) => this.call(businessPartner_1.OBBusinessPartnerService.create({
|
227
|
+
businessPartners: Array.isArray(businessPartners)
|
228
|
+
? businessPartners
|
229
|
+
: [businessPartners],
|
230
|
+
})),
|
231
|
+
findAll: async () => this.call(businessPartner_1.OBBusinessPartnerService.findAll()),
|
232
|
+
findById: async ({ businessPartnerID }) => this.call(businessPartner_1.OBBusinessPartnerService.findById({ businessPartnerID })),
|
233
|
+
findByCategory: async ({ businessPartnerCategory, }) => this.call(businessPartner_1.OBBusinessPartnerService.findByCategory({ businessPartnerCategory })),
|
234
|
+
findByCard: async ({ businessPartnerCard, }) => this.call(businessPartner_1.OBBusinessPartnerService.findByCard({ businessPartnerCard })),
|
235
|
+
findByEmail: async ({ businessPartnerEmail, }) => this.call(businessPartner_1.OBBusinessPartnerService.findByEmail({ businessPartnerEmail })),
|
236
|
+
findByMemberId: async ({ businessPartnerMemberId, }) => this.call(businessPartner_1.OBBusinessPartnerService.findByMemberId({ businessPartnerMemberId })),
|
237
|
+
findByName: async ({ businessPartnerName, }) => this.call(businessPartner_1.OBBusinessPartnerService.findByName({ businessPartnerName })),
|
238
|
+
findByOrg: async ({ businessPartnerOrg, }) => this.call(businessPartner_1.OBBusinessPartnerService.findByOrg({ businessPartnerOrg })),
|
239
|
+
findBySearchKey: async ({ businessPartnerSearchKey, }) => this.call(businessPartner_1.OBBusinessPartnerService.findBySearchKey({
|
240
|
+
businessPartnerSearchKey,
|
241
|
+
})),
|
242
|
+
findByStore: async ({ businessPartnerStore, }) => this.call(businessPartner_1.OBBusinessPartnerService.findByStore({ businessPartnerStore })),
|
243
|
+
};
|
244
|
+
}
|
245
|
+
get stock() {
|
246
|
+
return {
|
247
|
+
findAll: async () => this.call(stock_1.OBStockService.findAll()),
|
248
|
+
findByStockId: async ({ stockID }) => this.call(stock_1.OBStockService.findByStockId({ stockID })),
|
249
|
+
findByWarehouse: async ({ warehouse }) => this.call(stock_1.OBStockService.findByWarehouse({ warehouse })),
|
250
|
+
findByProduct: async ({ product }) => this.call(stock_1.OBStockService.findByProduct({ product })),
|
251
|
+
findByBin: async ({ bin }) => this.call(stock_1.OBStockService.findByBin({ bin })),
|
252
|
+
findByWarehouseBinProduct: async ({ warehouse, bin, product, }) => this.call(stock_1.OBStockService.findByWarehouseBinProduct({ warehouse, bin, product })),
|
253
|
+
findByWarehouseProduct: async ({ warehouse, product, }) => this.call(stock_1.OBStockService.findByWarehouseProduct({ warehouse, product })),
|
254
|
+
};
|
255
|
+
}
|
256
|
+
get productPrice() {
|
257
|
+
return {
|
258
|
+
findAll: async ({ page, pageSize, } = {}) => this.call(productPrice_1.OBProductPriceService.findAll({ page, pageSize })),
|
259
|
+
findByPriceListId: async ({ productPriceID, }) => this.call(productPrice_1.OBProductPriceService.findByPriceListId({ productPriceID })),
|
260
|
+
findByPriceList: async ({ priceList, page, pageSize, }) => this.call(productPrice_1.OBProductPriceService.findByPriceList({ priceList, page, pageSize })),
|
261
|
+
findByPriceListVersion: async ({ priceListVersionID, page, pageSize, }) => this.call(productPrice_1.OBProductPriceService.findByPriceListVersion({
|
262
|
+
priceListVersionID,
|
263
|
+
page,
|
264
|
+
pageSize,
|
265
|
+
})),
|
266
|
+
findByStore: async ({ store, page, pageSize, }) => this.call(productPrice_1.OBProductPriceService.findByStore({ store, page, pageSize })),
|
267
|
+
};
|
268
|
+
}
|
269
|
+
get distributionOrder() {
|
270
|
+
return {
|
271
|
+
create: async ({ distributionOrders }) => this.call(distributionOrder_1.OBDistributionOrderService.create({
|
272
|
+
distributionOrders: Array.isArray(distributionOrders)
|
273
|
+
? distributionOrders
|
274
|
+
: [distributionOrders],
|
275
|
+
})),
|
276
|
+
findAll: async () => this.call(distributionOrder_1.OBDistributionOrderService.findAll()),
|
277
|
+
findById: async ({ distributionOrderID, }) => this.call(distributionOrder_1.OBDistributionOrderService.findById({ distributionOrderID })),
|
278
|
+
findByDocumentNoAndIsIssue: async ({ documentNo, isIssue, }) => this.call(distributionOrder_1.OBDistributionOrderService.findByDocumentNoAndIsIssue({
|
279
|
+
documentNo,
|
280
|
+
isIssue,
|
281
|
+
})),
|
282
|
+
};
|
283
|
+
}
|
284
|
+
get stockTransaction() {
|
285
|
+
return {
|
286
|
+
findAll: async () => this.call(stockTransaction_1.OBStockTransactionService.findAll()),
|
287
|
+
findById: async ({ stockTransactionID, }) => this.call(stockTransaction_1.OBStockTransactionService.findById({ stockTransactionID })),
|
288
|
+
findByBomMovement: async ({ lastUpdated }) => this.call(stockTransaction_1.OBStockTransactionService.findByBomMovement({ lastUpdated })),
|
289
|
+
findByCustomer: async ({ lastUpdated }) => this.call(stockTransaction_1.OBStockTransactionService.findByCustomer({ lastUpdated })),
|
290
|
+
findByCustomerAWO: async ({ lastUpdated }) => this.call(stockTransaction_1.OBStockTransactionService.findByCustomerAWO({ lastUpdated })),
|
291
|
+
findByGoodsMovement: async ({ lastUpdated }) => this.call(stockTransaction_1.OBStockTransactionService.findByGoodsMovement({ lastUpdated })),
|
292
|
+
findByGoodsMovementAWO: async ({ lastUpdated, }) => this.call(stockTransaction_1.OBStockTransactionService.findByGoodsMovementAWO({ lastUpdated })),
|
293
|
+
findByInventory: async ({ lastUpdated }) => this.call(stockTransaction_1.OBStockTransactionService.findByInventory({ lastUpdated })),
|
294
|
+
findByInventoryAWO: async ({ lastUpdated }) => this.call(stockTransaction_1.OBStockTransactionService.findByInventoryAWO({ lastUpdated })),
|
295
|
+
findByVendor: async ({ lastUpdated }) => this.call(stockTransaction_1.OBStockTransactionService.findByVendor({ lastUpdated })),
|
296
|
+
findByVendorAWO: async ({ lastUpdated }) => this.call(stockTransaction_1.OBStockTransactionService.findByVendorAWO({ lastUpdated })),
|
297
|
+
findLinkedToDO: async ({ lastUpdated }) => this.call(stockTransaction_1.OBStockTransactionService.findLinkedToDO({ lastUpdated })),
|
298
|
+
findNotLinkedToDO: async ({ lastUpdated }) => this.call(stockTransaction_1.OBStockTransactionService.findNotLinkedToDO({ lastUpdated })),
|
299
|
+
};
|
300
|
+
}
|
301
|
+
get config() {
|
302
|
+
return {
|
303
|
+
url: `${this.base_url}`,
|
304
|
+
user_name: this.user_name,
|
305
|
+
password: this.password,
|
306
|
+
success: true,
|
307
|
+
uuid: (0, uuid_1.v4)(),
|
308
|
+
};
|
309
|
+
}
|
310
|
+
}
|
311
|
+
exports.OpenBravo = OpenBravo;
|
312
|
+
//# sourceMappingURL=ob.service.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ob.service.js","sourceRoot":"","sources":["../../../src/pos/openbravo/ob.service.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAC7D,iCAA0B;AAC1B,+BAAoC;AACpC,uCAA6C;AAC7C,2CAAiD;AACjD,2CAAiD;AACjD,iDAAuD;AACvD,iDAAuD;AACvD,uDAA6D;AAC7D,mEAAyE;AACzE,mCAAyC;AACzC,uDAA6D;AAC7D,mCAAyC;AACzC,mDAAyD;AACzD,2CAAiD;AACjD,yDAA+D;AAC/D,iDAAuD;AACvD,2DAAiE;AAyBjE,MAAa,SAAS;IAKpB,YAAY,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAY;QAChD,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,IAAI,CAAI,EACnB,GAAG,EACH,MAAM,EACN,MAAM,EACN,IAAI,GAML;QACC,MAAM,IAAI,GAAG;YACX,QAAQ,EAAE,IAAI,CAAC,SAAS;YACxB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;QAEF,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,eAAK,CAAC,OAAO,CAAC;gBACjC,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,GAAG,GAAG,EAAE;gBAC7B,MAAM;gBACN,MAAM;gBACN,IAAI;gBACJ,IAAI;gBACJ,OAAO,EAAE,KAAK;aACf,CAAC,CAAC;YACH,IAAI,MAAM,EAAE,IAAI,EAAE,KAAK,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AE,EAAE,WAAW,EAA2B,EAAE,EAAE,CAClE,IAAI,CAAC,IAAI,CACP,4CAAyB,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC,CAC3D;YAEH,cAAc,EAAE,KAAK,EAAE,EAAE,WAAW,EAA2B,EAAE,EAAE,CACjE,IAAI,CAAC,IAAI,CACP,4CAAyB,CAAC,cAAc,CAAC,EAAE,WAAW,EAAE,CAAC,CAC1D;YAEH,iBAAiB,EAAE,KAAK,EAAE,EAAE,WAAW,EAA2B,EAAE,EAAE,CACpE,IAAI,CAAC,IAAI,CACP,4CAAyB,CAAC,iBAAiB,CAAC,EAAE,WAAW,EAAE,CAAC,CAC7D;SACJ,CAAC;IACJ,CAAC;IAED,IAAI,MAAM;QACR,OAAO;YACL,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,IAAA,SAAM,GAAE;SACf,CAAC;IACJ,CAAC;CACF;AA91BD,8BA81BC"}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
export declare const OBOrderService: {
|
2
|
+
readonly create: ({ order }: {
|
3
|
+
order: any;
|
4
|
+
}) => {
|
5
|
+
url: string;
|
6
|
+
method: string;
|
7
|
+
data: any;
|
8
|
+
};
|
9
|
+
readonly findAll: () => {
|
10
|
+
url: string;
|
11
|
+
method: string;
|
12
|
+
};
|
13
|
+
readonly findById: ({ orderId }: {
|
14
|
+
orderId: string;
|
15
|
+
}) => {
|
16
|
+
url: string;
|
17
|
+
method: string;
|
18
|
+
};
|
19
|
+
readonly findByDocumentNo: ({ documentNo }: {
|
20
|
+
documentNo: string;
|
21
|
+
}) => {
|
22
|
+
url: string;
|
23
|
+
method: string;
|
24
|
+
params: {
|
25
|
+
documentNo: string;
|
26
|
+
};
|
27
|
+
};
|
28
|
+
readonly findByDocumentNumbers: ({ documentNumbers, }: {
|
29
|
+
documentNumbers: string[];
|
30
|
+
}) => {
|
31
|
+
url: string;
|
32
|
+
method: string;
|
33
|
+
params: {
|
34
|
+
documentNumbers: string;
|
35
|
+
};
|
36
|
+
};
|
37
|
+
readonly findByIncludedOrders: ({ includedOrders }: {
|
38
|
+
includedOrders: string[];
|
39
|
+
}) => {
|
40
|
+
url: string;
|
41
|
+
method: string;
|
42
|
+
params: {
|
43
|
+
includedOrders: string;
|
44
|
+
};
|
45
|
+
};
|
46
|
+
readonly findByOrgOrderDate: ({ organization, orderDate, }: {
|
47
|
+
organization: string;
|
48
|
+
orderDate: string;
|
49
|
+
}) => {
|
50
|
+
url: string;
|
51
|
+
method: string;
|
52
|
+
params: {
|
53
|
+
organization: string;
|
54
|
+
orderDate: string;
|
55
|
+
};
|
56
|
+
};
|
57
|
+
readonly findByOrgOrderDateRange: ({ organization, dateTo, dateFrom, }: {
|
58
|
+
organization: string;
|
59
|
+
dateTo: string;
|
60
|
+
dateFrom: string;
|
61
|
+
}) => {
|
62
|
+
url: string;
|
63
|
+
method: string;
|
64
|
+
params: {
|
65
|
+
organization: string;
|
66
|
+
dateTo: string;
|
67
|
+
dateFrom: string;
|
68
|
+
};
|
69
|
+
};
|
70
|
+
};
|
@@ -0,0 +1,44 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.OBOrderService = void 0;
|
4
|
+
exports.OBOrderService = {
|
5
|
+
create: ({ order }) => ({
|
6
|
+
url: `/org.openbravo.mobile.core.service.jsonrest/org.openbravo.retail.posterminal.ExternalOrderLoader`,
|
7
|
+
method: 'POST',
|
8
|
+
data: order,
|
9
|
+
}),
|
10
|
+
findAll: () => ({
|
11
|
+
url: `/ws/org.openbravo.api.ExportService/Order`,
|
12
|
+
method: 'GET',
|
13
|
+
}),
|
14
|
+
findById: ({ orderId }) => ({
|
15
|
+
url: `/ws/org.openbravo.api.ExportService/Order/${orderId}`,
|
16
|
+
method: 'GET',
|
17
|
+
}),
|
18
|
+
findByDocumentNo: ({ documentNo }) => ({
|
19
|
+
url: `/ws/org.openbravo.api.ExportService/Order/byDocumentNo`,
|
20
|
+
method: 'GET',
|
21
|
+
params: { documentNo },
|
22
|
+
}),
|
23
|
+
findByDocumentNumbers: ({ documentNumbers, }) => ({
|
24
|
+
url: `/ws/org.openbravo.api.ExportService/Order/byDocumentNumbers`,
|
25
|
+
method: 'GET',
|
26
|
+
params: { documentNumbers: documentNumbers.join(',') },
|
27
|
+
}),
|
28
|
+
findByIncludedOrders: ({ includedOrders }) => ({
|
29
|
+
url: `/ws/org.openbravo.api.ExportService/Order/byIncludedOrders`,
|
30
|
+
method: 'GET',
|
31
|
+
params: { includedOrders: includedOrders.join(',') },
|
32
|
+
}),
|
33
|
+
findByOrgOrderDate: ({ organization, orderDate, }) => ({
|
34
|
+
url: `/ws/org.openbravo.api.ExportService/Order/byOrgOrderDate`,
|
35
|
+
method: 'GET',
|
36
|
+
params: { organization, orderDate },
|
37
|
+
}),
|
38
|
+
findByOrgOrderDateRange: ({ organization, dateTo, dateFrom, }) => ({
|
39
|
+
url: `/ws/org.openbravo.api.ExportService/Order/byOrgOrderDateRange`,
|
40
|
+
method: 'GET',
|
41
|
+
params: { organization, dateTo, dateFrom },
|
42
|
+
}),
|
43
|
+
};
|
44
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/pos/openbravo/order/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC5B,MAAM,EAAE,CAAC,EAAE,KAAK,EAAkB,EAAE,EAAE,CAAC,CAAC;QACtC,GAAG,EAAE,kGAAkG;QACvG,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,KAAK;KACZ,CAAC;IACF,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;QACd,GAAG,EAAE,2CAA2C;QAChD,MAAM,EAAE,KAAK;KACd,CA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
|
+
id: string;
|
4
|
+
client: string;
|
5
|
+
organization_info: {
|
6
|
+
name: string;
|
7
|
+
searchKey?: string;
|
8
|
+
id: string;
|
9
|
+
};
|
10
|
+
organization: string;
|
11
|
+
orderDate: string;
|
12
|
+
terminal: string;
|
13
|
+
documentNo: string;
|
14
|
+
documentType: string;
|
15
|
+
priceList: string;
|
16
|
+
businessPartner: string;
|
17
|
+
shipmentAddress: LocationExport;
|
18
|
+
invoiceAddress: LocationExport;
|
19
|
+
salesRepresentative: string;
|
20
|
+
creationDate: string;
|
21
|
+
updated: string;
|
22
|
+
warehouse: string;
|
23
|
+
isSale: boolean;
|
24
|
+
isLayaway: boolean;
|
25
|
+
isCancelled: boolean;
|
26
|
+
priceIncludesTax: boolean;
|
27
|
+
currency: string;
|
28
|
+
obposAppCashup: string;
|
29
|
+
invoiceTerms: string;
|
30
|
+
grossAmount: number;
|
31
|
+
netAmount: number;
|
32
|
+
lines: OrderLineExport[];
|
33
|
+
payments: OrderPaymentExport[];
|
34
|
+
taxes: OrderTaxesExport[];
|
35
|
+
returnReason?: string;
|
36
|
+
externalBusinessPartnerReference?: string;
|
37
|
+
isReturn?: string;
|
38
|
+
createdBy: string;
|
39
|
+
orderReasonsApprovals: ApprovalReasonExport[];
|
40
|
+
businessDate: string;
|
41
|
+
physicalTransactionOrganization_info: {
|
42
|
+
description: string;
|
43
|
+
name: string;
|
44
|
+
searchKey: string;
|
45
|
+
id: string;
|
46
|
+
};
|
47
|
+
physicalTransactionOrganization: string;
|
48
|
+
}
|
49
|
+
export interface OrderLineExport {
|
50
|
+
id: string;
|
51
|
+
lineNo: string;
|
52
|
+
orderedQuantity: number;
|
53
|
+
shippedQuantity: number;
|
54
|
+
invoicedQuantity: number;
|
55
|
+
grossAmount: number;
|
56
|
+
netAmount: number;
|
57
|
+
deliveryMode: string;
|
58
|
+
deliveryDate: string;
|
59
|
+
deliveryTime: string;
|
60
|
+
uOM: string;
|
61
|
+
grossUnitPrice: number;
|
62
|
+
netUnitPrice: number;
|
63
|
+
grossListPrice: number;
|
64
|
+
netListPrice: number;
|
65
|
+
discountPercentage: number;
|
66
|
+
product: string;
|
67
|
+
warehouse: string;
|
68
|
+
taxCategory: string;
|
69
|
+
returnable: string;
|
70
|
+
salesRepresentative: string;
|
71
|
+
promotions: OrderLinePromotionExport[];
|
72
|
+
taxes: OrderLineTaxesExport[];
|
73
|
+
productDescription: string;
|
74
|
+
updated: string;
|
75
|
+
returnReason: string;
|
76
|
+
relatedServices: OrderLineProductRelationExport[];
|
77
|
+
relatedProducts: OrderlineServiceRelationExport[];
|
78
|
+
unitPrice: number;
|
79
|
+
commercialOperation: OrderLineOpecomExport;
|
80
|
+
obposCanbedelivered: boolean;
|
81
|
+
deliveredQuantity: string;
|
82
|
+
baseGrossUnitPrice: number;
|
83
|
+
orderLineReasonsApprovals: ApprovalReasonExport[];
|
84
|
+
originalSalesOrderDocumentNumber?: string;
|
85
|
+
originalOrderLineId?: string;
|
86
|
+
returnedQuantity?: string;
|
87
|
+
relatedLine?: string;
|
88
|
+
}
|
89
|
+
export interface OrderLinePromotionExport {
|
90
|
+
id: string;
|
91
|
+
discountType: string;
|
92
|
+
name: string;
|
93
|
+
quantity: number;
|
94
|
+
amountPerUnit: number;
|
95
|
+
totalAmount: number;
|
96
|
+
displayedTotalAmount: number;
|
97
|
+
lineNo: number;
|
98
|
+
discountId: string;
|
99
|
+
searchKey: string;
|
100
|
+
}
|
101
|
+
export interface OrderLineTaxesExport {
|
102
|
+
tax: string;
|
103
|
+
rate: number;
|
104
|
+
taxableAmount: number;
|
105
|
+
taxAmount: number;
|
106
|
+
docTaxAmount: string;
|
107
|
+
lineNo: number;
|
108
|
+
}
|
109
|
+
export interface OrderLineProductRelationExport {
|
110
|
+
product: string;
|
111
|
+
product_info: {
|
112
|
+
searchKey: string;
|
113
|
+
name: string;
|
114
|
+
upcEAN: string;
|
115
|
+
id: string;
|
116
|
+
};
|
117
|
+
lineNo: string;
|
118
|
+
}
|
119
|
+
export interface OrderlineServiceRelationExport {
|
120
|
+
product: string;
|
121
|
+
product_info: {
|
122
|
+
searchKey: string;
|
123
|
+
name: string;
|
124
|
+
upcEAN: string;
|
125
|
+
id: string;
|
126
|
+
};
|
127
|
+
lineNo: string;
|
128
|
+
orderlineId: string;
|
129
|
+
}
|
130
|
+
export interface OrderLineOpecomExport {
|
131
|
+
id: string;
|
132
|
+
name: string;
|
133
|
+
documentNo: string;
|
134
|
+
discountAmount: string;
|
135
|
+
}
|
136
|
+
export interface OrderPaymentExport {
|
137
|
+
name: string;
|
138
|
+
rate: string;
|
139
|
+
currency: string;
|
140
|
+
amount: number;
|
141
|
+
paidAmount: number;
|
142
|
+
paymentDate: string;
|
143
|
+
paymentReference: string;
|
144
|
+
lineNo: number;
|
145
|
+
giftCardInstanceNo?: string;
|
146
|
+
}
|
147
|
+
export interface OrderTaxesExport {
|
148
|
+
tax: string;
|
149
|
+
rate: number;
|
150
|
+
taxableAmount: number;
|
151
|
+
taxAmount: number;
|
152
|
+
docTaxAmount: string;
|
153
|
+
lineNo: number;
|
154
|
+
}
|
155
|
+
export interface ApprovalReasonExport {
|
156
|
+
userActionReason: string;
|
157
|
+
comments: string;
|
158
|
+
userAction: string;
|
159
|
+
approvedBy: string;
|
160
|
+
approvalReasonDate: string;
|
161
|
+
userActionReasonCode: string;
|
162
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"order.export.interface.js","sourceRoot":"","sources":["../../../../../src/pos/openbravo/order/interfaces/order.export.interface.ts"],"names":[],"mappings":""}
|