@nomalism-com/api 0.12.2 → 0.13.2
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.ts +284 -2
- package/dist/index.js +342 -3
- package/dist/modules/document/materialEntrance.d.ts +11 -3
- package/dist/modules/document/materialEntrance.js +43 -33
- package/dist/modules/document/order.d.ts +15 -2
- package/dist/modules/document/order.js +90 -75
- package/dist/modules/document/purchase.d.ts +11 -2
- package/dist/modules/document/purchase.js +58 -50
- package/dist/modules/documentManagement/multimedia.d.ts +11 -4
- package/dist/modules/documentManagement/multimedia.js +32 -51
- package/dist/modules/integration/dynamicData.d.ts +12 -2
- package/dist/modules/integration/dynamicData.js +70 -60
- package/dist/modules/integration/emailTemplate.d.ts +12 -2
- package/dist/modules/integration/emailTemplate.js +69 -59
- package/dist/modules/integration/emailTemplateAttachment.d.ts +9 -2
- package/dist/modules/integration/emailTemplateAttachment.js +33 -29
- package/dist/modules/integration/errorHandler.d.ts +8 -2
- package/dist/modules/integration/errorHandler.js +21 -19
- package/dist/modules/integration/field.d.ts +11 -2
- package/dist/modules/integration/field.js +58 -49
- package/dist/modules/integration/fieldGroup.d.ts +13 -2
- package/dist/modules/integration/fieldGroup.js +85 -72
- package/dist/modules/integration/file.d.ts +10 -2
- package/dist/modules/integration/file.js +48 -42
- package/dist/modules/integration/googleFilePermission.d.ts +11 -2
- package/dist/modules/integration/googleFilePermission.js +58 -50
- package/dist/modules/integration/googleSheets.d.ts +11 -2
- package/dist/modules/integration/googleSheets.js +59 -51
- package/dist/modules/integration/history.d.ts +8 -2
- package/dist/modules/integration/history.js +23 -20
- package/dist/modules/integration/observation.d.ts +11 -2
- package/dist/modules/integration/observation.js +60 -52
- package/dist/modules/integration/observationType.d.ts +12 -2
- package/dist/modules/integration/observationType.js +72 -62
- package/dist/modules/integration/projectInfo.d.ts +8 -2
- package/dist/modules/integration/projectInfo.js +21 -19
- package/dist/modules/integration/settings.d.ts +12 -3
- package/dist/modules/integration/settings.js +72 -61
- package/dist/modules/integration/task.d.ts +11 -2
- package/dist/modules/integration/task.js +68 -60
- package/dist/modules/integration/taskAttachment.d.ts +9 -2
- package/dist/modules/integration/taskAttachment.js +36 -32
- package/dist/modules/integration/taskGroup.d.ts +12 -2
- package/dist/modules/integration/taskGroup.js +70 -60
- package/dist/modules/integration/taskNote.d.ts +11 -2
- package/dist/modules/integration/taskNote.js +58 -50
- package/dist/modules/print/npc.d.ts +9 -2
- package/dist/modules/print/npc.js +34 -30
- package/dist/modules/print/printer.d.ts +10 -2
- package/dist/modules/print/printer.js +46 -40
- package/dist/modules/print/schedulePrintJob.d.ts +11 -2
- package/dist/modules/print/schedulePrintJob.js +56 -48
- package/dist/modules/stock/attribute.d.ts +15 -2
- package/dist/modules/stock/attribute.js +111 -94
- package/dist/modules/stock/attributeValue.d.ts +15 -2
- package/dist/modules/stock/attributeValue.js +110 -94
- package/dist/modules/stock/color.d.ts +15 -2
- package/dist/modules/stock/color.js +109 -93
- package/dist/modules/stock/composition.d.ts +14 -2
- package/dist/modules/stock/composition.js +96 -82
- package/dist/modules/stock/compositionMaterial.d.ts +15 -2
- package/dist/modules/stock/compositionMaterial.js +110 -94
- package/dist/modules/stock/location.d.ts +15 -2
- package/dist/modules/stock/location.js +110 -94
- package/dist/modules/stock/maintenance.d.ts +15 -2
- package/dist/modules/stock/maintenance.js +110 -94
- package/dist/modules/stock/maintenanceAssoc.d.ts +14 -2
- package/dist/modules/stock/maintenanceAssoc.js +96 -82
- package/dist/modules/stock/maintenancePreset.d.ts +13 -2
- package/dist/modules/stock/maintenancePreset.js +82 -70
- package/dist/modules/stock/maintenancePresetAssoc.d.ts +11 -2
- package/dist/modules/stock/maintenancePresetAssoc.js +57 -49
- package/dist/modules/stock/maintenanceType.d.ts +15 -2
- package/dist/modules/stock/maintenanceType.js +110 -94
- package/dist/modules/stock/plot.d.ts +24 -4
- package/dist/modules/stock/plot.js +219 -172
- package/dist/modules/stock/primaryColor.d.ts +15 -2
- package/dist/modules/stock/primaryColor.js +110 -94
- package/dist/modules/stock/product.d.ts +24 -4
- package/dist/modules/stock/product.js +221 -190
- package/dist/modules/stock/productAttribute.d.ts +14 -2
- package/dist/modules/stock/productAttribute.js +96 -82
- package/dist/modules/stock/productCategory.d.ts +15 -2
- package/dist/modules/stock/productCategory.js +110 -94
- package/dist/modules/stock/productColor.d.ts +14 -2
- package/dist/modules/stock/productColor.js +96 -82
- package/dist/modules/stock/productImage.d.ts +14 -2
- package/dist/modules/stock/productImage.js +97 -82
- package/dist/modules/stock/productName.d.ts +15 -2
- package/dist/modules/stock/productName.js +110 -94
- package/dist/modules/stock/productNamePreset.d.ts +15 -2
- package/dist/modules/stock/productNamePreset.js +110 -94
- package/dist/modules/stock/productPart.d.ts +15 -2
- package/dist/modules/stock/productPart.js +109 -93
- package/dist/modules/stock/productSubCategory.d.ts +15 -2
- package/dist/modules/stock/productSubCategory.js +109 -93
- package/dist/modules/stock/productUse.d.ts +15 -2
- package/dist/modules/stock/productUse.js +110 -94
- package/dist/modules/stock/productUseAssoc.d.ts +14 -2
- package/dist/modules/stock/productUseAssoc.js +95 -81
- package/dist/modules/stock/promotion.d.ts +16 -3
- package/dist/modules/stock/promotion.js +130 -115
- package/dist/modules/stock/promotionAssoc.d.ts +14 -2
- package/dist/modules/stock/promotionAssoc.js +96 -82
- package/dist/modules/stock/queryList.d.ts +14 -3
- package/dist/modules/stock/queryList.js +101 -89
- package/dist/modules/stock/queryParameter.d.ts +13 -2
- package/dist/modules/stock/queryParameter.js +83 -70
- package/dist/modules/stock/returnReason.d.ts +11 -2
- package/dist/modules/stock/returnReason.js +58 -50
- package/dist/modules/stock/savedEmPicking.d.ts +9 -2
- package/dist/modules/stock/savedEmPicking.js +34 -30
- package/dist/modules/stock/schedule.d.ts +8 -2
- package/dist/modules/stock/schedule.js +23 -20
- package/dist/modules/stock/similarProduct.d.ts +14 -2
- package/dist/modules/stock/similarProduct.js +96 -82
- package/dist/modules/stock/stockMovement.d.ts +11 -4
- package/dist/modules/stock/stockMovement.js +45 -43
- package/dist/modules/stock/typeOfInventory.d.ts +15 -2
- package/dist/modules/stock/typeOfInventory.js +110 -94
- package/dist/modules/stock/typeOfLocation.d.ts +15 -2
- package/dist/modules/stock/typeOfLocation.js +110 -94
- package/dist/modules/stock/unitOfMeasure.d.ts +15 -2
- package/dist/modules/stock/unitOfMeasure.js +110 -94
- package/dist/modules/stock/vatTax.d.ts +15 -2
- package/dist/modules/stock/vatTax.js +110 -94
- package/dist/modules/stock/vatTaxZone.d.ts +15 -2
- package/dist/modules/stock/vatTaxZone.js +110 -94
- package/dist/modules/supply/cabide.d.ts +17 -4
- package/dist/modules/supply/cabide.js +128 -109
- package/dist/modules/supply/cabideProduct.d.ts +15 -2
- package/dist/modules/supply/cabideProduct.js +99 -85
- package/dist/modules/supply/clientCurrentAccount.d.ts +13 -2
- package/dist/modules/supply/clientCurrentAccount.js +88 -74
- package/dist/modules/supply/documentHeader.d.ts +38 -4
- package/dist/modules/supply/documentHeader.js +378 -316
- package/dist/modules/supply/documentLine.d.ts +18 -3
- package/dist/modules/supply/documentLine.js +136 -114
- package/dist/modules/supply/documentLineAssoc.d.ts +11 -2
- package/dist/modules/supply/documentLineAssoc.js +57 -49
- package/dist/modules/supply/documentLineFolder.d.ts +11 -2
- package/dist/modules/supply/documentLineFolder.js +58 -50
- package/dist/modules/supply/documentSet.d.ts +13 -2
- package/dist/modules/supply/documentSet.js +82 -70
- package/dist/modules/supply/documentType.d.ts +13 -2
- package/dist/modules/supply/documentType.js +83 -70
- package/dist/modules/supply/externalDocumentHeader.d.ts +15 -2
- package/dist/modules/supply/externalDocumentHeader.js +105 -89
- package/dist/modules/supply/externalDocumentType.d.ts +9 -2
- package/dist/modules/supply/externalDocumentType.js +34 -30
- package/dist/modules/supply/moloniRequest.d.ts +8 -2
- package/dist/modules/supply/moloniRequest.js +21 -20
- package/dist/modules/supply/orderManagement.d.ts +10 -2
- package/dist/modules/supply/orderManagement.js +23 -20
- package/dist/modules/supply/payment.d.ts +23 -4
- package/dist/modules/supply/payment.js +208 -180
- package/dist/modules/supply/preSale.d.ts +15 -2
- package/dist/modules/supply/preSale.js +106 -90
- package/dist/modules/supply/preSaleProduct.d.ts +9 -2
- package/dist/modules/supply/preSaleProduct.js +34 -30
- package/dist/modules/supply/propostaSheets.d.ts +20 -9
- package/dist/modules/supply/propostaSheets.js +89 -76
- package/dist/modules/supply/providerCurrentAccount.d.ts +8 -2
- package/dist/modules/supply/providerCurrentAccount.js +24 -22
- package/dist/modules/supply/startDocumentHeaderLastUpdate.d.ts +10 -4
- package/dist/modules/supply/startDocumentHeaderLastUpdate.js +22 -20
- package/dist/modules/supply/transformado.d.ts +8 -2
- package/dist/modules/supply/transformado.js +22 -20
- package/dist/modules/supply/upfrontReturn.d.ts +10 -4
- package/dist/modules/supply/upfrontReturn.js +22 -20
- package/dist/modules/supply/vatValidation.d.ts +8 -2
- package/dist/modules/supply/vatValidation.js +26 -24
- package/dist/modules/supply/workflow.d.ts +15 -2
- package/dist/modules/supply/workflow.js +70 -60
- package/dist/modules/tickets/channel.d.ts +13 -2
- package/dist/modules/tickets/channel.js +82 -70
- package/dist/modules/tickets/clt.d.ts +13 -2
- package/dist/modules/tickets/clt.js +82 -70
- package/dist/modules/tickets/language.d.ts +13 -2
- package/dist/modules/tickets/language.js +82 -70
- package/dist/modules/tickets/tickets.d.ts +11 -2
- package/dist/modules/tickets/tickets.js +58 -50
- package/dist/modules/user/address.d.ts +15 -2
- package/dist/modules/user/address.js +108 -92
- package/dist/modules/user/bankData.d.ts +14 -2
- package/dist/modules/user/bankData.js +96 -82
- package/dist/modules/user/clientType.d.ts +14 -2
- package/dist/modules/user/clientType.js +96 -82
- package/dist/modules/user/clients.d.ts +16 -2
- package/dist/modules/user/clients.js +122 -104
- package/dist/modules/user/commissioner.d.ts +15 -2
- package/dist/modules/user/commissioner.js +110 -94
- package/dist/modules/user/contactTypes.d.ts +14 -2
- package/dist/modules/user/contactTypes.js +96 -82
- package/dist/modules/user/contacts.d.ts +16 -2
- package/dist/modules/user/contacts.js +122 -102
- package/dist/modules/user/country.d.ts +15 -2
- package/dist/modules/user/country.js +110 -94
- package/dist/modules/user/deliveryMethods.d.ts +13 -2
- package/dist/modules/user/deliveryMethods.js +84 -72
- package/dist/modules/user/entityList.d.ts +12 -2
- package/dist/modules/user/entityList.js +47 -42
- package/dist/modules/user/favorites.d.ts +11 -2
- package/dist/modules/user/favorites.js +58 -50
- package/dist/modules/user/groupPermission.d.ts +11 -2
- package/dist/modules/user/groupPermission.js +60 -52
- package/dist/modules/user/language.d.ts +14 -2
- package/dist/modules/user/language.js +96 -82
- package/dist/modules/user/logout.d.ts +8 -2
- package/dist/modules/user/logout.js +21 -19
- package/dist/modules/user/maturityDates.d.ts +13 -2
- package/dist/modules/user/maturityDates.js +84 -72
- package/dist/modules/user/password.d.ts +9 -2
- package/dist/modules/user/password.js +32 -28
- package/dist/modules/user/paymentCondition.d.ts +14 -2
- package/dist/modules/user/paymentCondition.js +96 -82
- package/dist/modules/user/paymentMethods.d.ts +13 -2
- package/dist/modules/user/paymentMethods.js +84 -72
- package/dist/modules/user/permission.d.ts +11 -2
- package/dist/modules/user/permission.js +60 -52
- package/dist/modules/user/persona.d.ts +12 -2
- package/dist/modules/user/persona.js +72 -62
- package/dist/modules/user/provider.d.ts +17 -2
- package/dist/modules/user/provider.js +136 -116
- package/dist/modules/user/providerType.d.ts +14 -2
- package/dist/modules/user/providerType.js +96 -82
- package/dist/modules/user/purchaseCondition.d.ts +14 -2
- package/dist/modules/user/purchaseCondition.js +96 -82
- package/dist/modules/user/reasonForExemption.d.ts +14 -2
- package/dist/modules/user/reasonForExemption.js +96 -82
- package/dist/modules/user/refreshToken.d.ts +8 -2
- package/dist/modules/user/refreshToken.js +22 -20
- package/dist/modules/user/segmentsArea.d.ts +14 -2
- package/dist/modules/user/segmentsArea.js +96 -82
- package/dist/modules/user/sessions.d.ts +8 -2
- package/dist/modules/user/sessions.js +22 -20
- package/dist/modules/user/shippings.d.ts +14 -2
- package/dist/modules/user/shippings.js +96 -82
- package/dist/modules/user/socialMedia.d.ts +14 -2
- package/dist/modules/user/socialMedia.js +96 -82
- package/dist/modules/user/storeOperator.d.ts +16 -2
- package/dist/modules/user/storeOperator.js +122 -104
- package/dist/modules/user/swift.d.ts +14 -2
- package/dist/modules/user/swift.js +96 -82
- package/dist/modules/user/tenant.d.ts +11 -2
- package/dist/modules/user/tenant.js +58 -50
- package/dist/modules/user/user.d.ts +16 -2
- package/dist/modules/user/user.js +120 -102
- package/dist/modules/user/userPermission.d.ts +10 -2
- package/dist/modules/user/userPermission.js +48 -42
- package/dist/modules/user/userPositions.d.ts +14 -2
- package/dist/modules/user/userPositions.js +96 -82
- package/dist/modules/user/userToken.d.ts +13 -2
- package/dist/modules/user/userToken.js +84 -72
- package/dist/modules/user/vehicles.d.ts +11 -2
- package/dist/modules/user/vehicles.js +58 -50
- package/dist/modules/user/zipCode.d.ts +9 -2
- package/dist/modules/user/zipCode.js +33 -29
- package/dist/modules/view/eventHistory.d.ts +8 -2
- package/dist/modules/view/eventHistory.js +22 -20
- package/package.json +2 -2
- package/dist/modules/documentManagement/index.d.ts +0 -3
- package/dist/modules/documentManagement/index.js +0 -13
- package/dist/modules/integration/index.d.ts +0 -3
- package/dist/modules/integration/index.js +0 -13
- package/dist/modules/print/index.d.ts +0 -3
- package/dist/modules/print/index.js +0 -13
- package/dist/modules/stock/index.d.ts +0 -3
- package/dist/modules/stock/index.js +0 -13
- package/dist/modules/tickets/index.d.ts +0 -3
- package/dist/modules/tickets/index.js +0 -13
- package/dist/modules/user/index.d.ts +0 -3
- package/dist/modules/user/index.js +0 -13
- package/dist/modules/view/index.d.ts +0 -2
- package/dist/modules/view/index.js +0 -12
- package/dist/shared/client.d.ts +0 -7
- package/dist/shared/client.js +0 -24
|
@@ -35,375 +35,437 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
39
|
+
var Repository = (function () {
|
|
40
|
+
function Repository(_a) {
|
|
41
|
+
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
42
|
+
this.api = api;
|
|
43
|
+
this.route = route;
|
|
44
|
+
this.publicRoute = publicRoute;
|
|
45
|
+
}
|
|
46
|
+
Repository.prototype.findMinified = function (params) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
+
var response;
|
|
49
|
+
return __generator(this, function (_a) {
|
|
50
|
+
switch (_a.label) {
|
|
51
|
+
case 0: return [4, this.api.get("".concat(this.route, "minified"), {
|
|
52
|
+
params: params,
|
|
53
|
+
})];
|
|
54
|
+
case 1:
|
|
55
|
+
response = _a.sent();
|
|
56
|
+
return [2, response.data];
|
|
57
|
+
}
|
|
58
|
+
});
|
|
58
59
|
});
|
|
59
|
-
}
|
|
60
|
-
findOne
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
};
|
|
61
|
+
Repository.prototype.findOne = function (selector) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
63
|
+
var response;
|
|
64
|
+
return __generator(this, function (_a) {
|
|
65
|
+
switch (_a.label) {
|
|
66
|
+
case 0: return [4, this.api.get("".concat(this.route).concat(selector.id))];
|
|
67
|
+
case 1:
|
|
68
|
+
response = _a.sent();
|
|
69
|
+
return [2, response.data];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
69
72
|
});
|
|
70
|
-
}
|
|
71
|
-
findStart
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
};
|
|
74
|
+
Repository.prototype.findStart = function (selector) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
76
|
+
var response;
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0: return [4, this.api.get("".concat(this.route, "/start/").concat(selector.id))];
|
|
80
|
+
case 1:
|
|
81
|
+
response = _a.sent();
|
|
82
|
+
return [2, response.data];
|
|
83
|
+
}
|
|
84
|
+
});
|
|
80
85
|
});
|
|
81
|
-
}
|
|
82
|
-
findByDocumentLineState
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
};
|
|
87
|
+
Repository.prototype.findByDocumentLineState = function (params) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
89
|
+
var response;
|
|
90
|
+
return __generator(this, function (_a) {
|
|
91
|
+
switch (_a.label) {
|
|
92
|
+
case 0: return [4, this.api.get("".concat(this.route, "by_document_line_state"), {
|
|
93
|
+
params: params,
|
|
94
|
+
})];
|
|
95
|
+
case 1:
|
|
96
|
+
response = _a.sent();
|
|
97
|
+
return [2, response.data];
|
|
98
|
+
}
|
|
99
|
+
});
|
|
93
100
|
});
|
|
94
|
-
}
|
|
95
|
-
findByBasicSearch
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
};
|
|
102
|
+
Repository.prototype.findByBasicSearch = function (params) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
+
var response;
|
|
105
|
+
return __generator(this, function (_a) {
|
|
106
|
+
switch (_a.label) {
|
|
107
|
+
case 0: return [4, this.api.get("".concat(this.route, "basic_search"), {
|
|
108
|
+
params: params,
|
|
109
|
+
})];
|
|
110
|
+
case 1:
|
|
111
|
+
response = _a.sent();
|
|
112
|
+
return [2, response.data];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
106
115
|
});
|
|
107
|
-
}
|
|
108
|
-
findByType
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
};
|
|
117
|
+
Repository.prototype.findByType = function (params) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
119
|
+
var response;
|
|
120
|
+
return __generator(this, function (_a) {
|
|
121
|
+
switch (_a.label) {
|
|
122
|
+
case 0: return [4, this.api.get("".concat(this.route, "by_type"), { params: params })];
|
|
123
|
+
case 1:
|
|
124
|
+
response = _a.sent();
|
|
125
|
+
return [2, response.data];
|
|
126
|
+
}
|
|
127
|
+
});
|
|
117
128
|
});
|
|
118
|
-
}
|
|
119
|
-
find
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
129
|
+
};
|
|
130
|
+
Repository.prototype.find = function (params) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
132
|
+
var response;
|
|
133
|
+
return __generator(this, function (_a) {
|
|
134
|
+
switch (_a.label) {
|
|
135
|
+
case 0: return [4, this.api.get("".concat(this.route), { params: params })];
|
|
136
|
+
case 1:
|
|
137
|
+
response = _a.sent();
|
|
138
|
+
return [2, response.data];
|
|
139
|
+
}
|
|
140
|
+
});
|
|
128
141
|
});
|
|
129
|
-
}
|
|
130
|
-
findByCommissionerId
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
142
|
+
};
|
|
143
|
+
Repository.prototype.findByCommissionerId = function (params) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
145
|
+
var response;
|
|
146
|
+
return __generator(this, function (_a) {
|
|
147
|
+
switch (_a.label) {
|
|
148
|
+
case 0: return [4, this.api.get("".concat(this.route, "by_commissioner"), {
|
|
149
|
+
params: params,
|
|
150
|
+
})];
|
|
151
|
+
case 1:
|
|
152
|
+
response = _a.sent();
|
|
153
|
+
return [2, response.data];
|
|
154
|
+
}
|
|
155
|
+
});
|
|
139
156
|
});
|
|
140
|
-
}
|
|
141
|
-
findClientUnpaidCredit
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
157
|
+
};
|
|
158
|
+
Repository.prototype.findClientUnpaidCredit = function (params) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
160
|
+
var response;
|
|
161
|
+
return __generator(this, function (_a) {
|
|
162
|
+
switch (_a.label) {
|
|
163
|
+
case 0: return [4, this.api.get("".concat(this.route, "unpaid_credit"), {
|
|
164
|
+
params: params,
|
|
165
|
+
})];
|
|
166
|
+
case 1:
|
|
167
|
+
response = _a.sent();
|
|
168
|
+
return [2, response.data];
|
|
169
|
+
}
|
|
170
|
+
});
|
|
150
171
|
});
|
|
151
|
-
}
|
|
152
|
-
findClientUnpaidDebit
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
172
|
+
};
|
|
173
|
+
Repository.prototype.findClientUnpaidDebit = function (params) {
|
|
174
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
175
|
+
var response;
|
|
176
|
+
return __generator(this, function (_a) {
|
|
177
|
+
switch (_a.label) {
|
|
178
|
+
case 0: return [4, this.api.get("".concat(this.route, "unpaid_debit"), {
|
|
179
|
+
params: params,
|
|
180
|
+
})];
|
|
181
|
+
case 1:
|
|
182
|
+
response = _a.sent();
|
|
183
|
+
return [2, response.data];
|
|
184
|
+
}
|
|
185
|
+
});
|
|
161
186
|
});
|
|
162
|
-
}
|
|
163
|
-
findUnpaidCommissions
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
187
|
+
};
|
|
188
|
+
Repository.prototype.findUnpaidCommissions = function (params) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
190
|
+
var response;
|
|
191
|
+
return __generator(this, function (_a) {
|
|
192
|
+
switch (_a.label) {
|
|
193
|
+
case 0: return [4, this.api.get("".concat(this.route, "unpaid_commissions"), {
|
|
194
|
+
params: params,
|
|
195
|
+
})];
|
|
196
|
+
case 1:
|
|
197
|
+
response = _a.sent();
|
|
198
|
+
return [2, response.data];
|
|
199
|
+
}
|
|
200
|
+
});
|
|
172
201
|
});
|
|
173
|
-
}
|
|
174
|
-
create
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
202
|
+
};
|
|
203
|
+
Repository.prototype.create = function (body) {
|
|
204
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
205
|
+
var response;
|
|
206
|
+
return __generator(this, function (_a) {
|
|
207
|
+
switch (_a.label) {
|
|
208
|
+
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
209
|
+
case 1:
|
|
210
|
+
response = _a.sent();
|
|
211
|
+
return [2, response.data];
|
|
212
|
+
}
|
|
213
|
+
});
|
|
183
214
|
});
|
|
184
|
-
}
|
|
185
|
-
createFromHeader
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
215
|
+
};
|
|
216
|
+
Repository.prototype.createFromHeader = function (body) {
|
|
217
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
218
|
+
var response;
|
|
219
|
+
return __generator(this, function (_a) {
|
|
220
|
+
switch (_a.label) {
|
|
221
|
+
case 0: return [4, this.api.post("".concat(this.route, "from_header"), body)];
|
|
222
|
+
case 1:
|
|
223
|
+
response = _a.sent();
|
|
224
|
+
return [2, response.data];
|
|
225
|
+
}
|
|
226
|
+
});
|
|
194
227
|
});
|
|
195
|
-
}
|
|
196
|
-
createProductionOrder
|
|
197
|
-
return
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
228
|
+
};
|
|
229
|
+
Repository.prototype.createProductionOrder = function (body) {
|
|
230
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
231
|
+
return __generator(this, function (_a) {
|
|
232
|
+
switch (_a.label) {
|
|
233
|
+
case 0: return [4, this.api.post("".concat(this.route, "production_order"), body)];
|
|
234
|
+
case 1:
|
|
235
|
+
_a.sent();
|
|
236
|
+
return [2];
|
|
237
|
+
}
|
|
238
|
+
});
|
|
204
239
|
});
|
|
205
|
-
}
|
|
206
|
-
createFromPlots
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
240
|
+
};
|
|
241
|
+
Repository.prototype.createFromPlots = function (body) {
|
|
242
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
243
|
+
var response;
|
|
244
|
+
return __generator(this, function (_a) {
|
|
245
|
+
switch (_a.label) {
|
|
246
|
+
case 0: return [4, this.api.post("".concat(this.route, "from_plots"), body)];
|
|
247
|
+
case 1:
|
|
248
|
+
response = _a.sent();
|
|
249
|
+
return [2, response.data];
|
|
250
|
+
}
|
|
251
|
+
});
|
|
215
252
|
});
|
|
216
|
-
}
|
|
217
|
-
update
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
253
|
+
};
|
|
254
|
+
Repository.prototype.update = function (selector, body) {
|
|
255
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
256
|
+
var response;
|
|
257
|
+
return __generator(this, function (_a) {
|
|
258
|
+
switch (_a.label) {
|
|
259
|
+
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
260
|
+
case 1:
|
|
261
|
+
response = _a.sent();
|
|
262
|
+
return [2, response.data];
|
|
263
|
+
}
|
|
264
|
+
});
|
|
226
265
|
});
|
|
227
|
-
}
|
|
228
|
-
deleteOne
|
|
229
|
-
return
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
266
|
+
};
|
|
267
|
+
Repository.prototype.deleteOne = function (selector) {
|
|
268
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
269
|
+
return __generator(this, function (_a) {
|
|
270
|
+
switch (_a.label) {
|
|
271
|
+
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
272
|
+
case 1:
|
|
273
|
+
_a.sent();
|
|
274
|
+
return [2];
|
|
275
|
+
}
|
|
276
|
+
});
|
|
236
277
|
});
|
|
237
|
-
}
|
|
238
|
-
getActions
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
278
|
+
};
|
|
279
|
+
Repository.prototype.getActions = function (selector) {
|
|
280
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
281
|
+
var response;
|
|
282
|
+
return __generator(this, function (_a) {
|
|
283
|
+
switch (_a.label) {
|
|
284
|
+
case 0: return [4, this.api.get("".concat(this.route, "get_actions/").concat(selector.id))];
|
|
285
|
+
case 1:
|
|
286
|
+
response = _a.sent();
|
|
287
|
+
return [2, response.data];
|
|
288
|
+
}
|
|
289
|
+
});
|
|
247
290
|
});
|
|
248
|
-
}
|
|
249
|
-
findMaterialEntranceProviders
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
291
|
+
};
|
|
292
|
+
Repository.prototype.findMaterialEntranceProviders = function () {
|
|
293
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
294
|
+
var response;
|
|
295
|
+
return __generator(this, function (_a) {
|
|
296
|
+
switch (_a.label) {
|
|
297
|
+
case 0: return [4, this.api.get("".concat(this.route, "material_entrance_providers"))];
|
|
298
|
+
case 1:
|
|
299
|
+
response = _a.sent();
|
|
300
|
+
return [2, response.data];
|
|
301
|
+
}
|
|
302
|
+
});
|
|
258
303
|
});
|
|
259
|
-
}
|
|
260
|
-
findProviderInvoice
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
304
|
+
};
|
|
305
|
+
Repository.prototype.findProviderInvoice = function (params) {
|
|
306
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
307
|
+
var response;
|
|
308
|
+
return __generator(this, function (_a) {
|
|
309
|
+
switch (_a.label) {
|
|
310
|
+
case 0: return [4, this.api.get("".concat(this.route, "provider_invoice"), {
|
|
311
|
+
params: params,
|
|
312
|
+
})];
|
|
313
|
+
case 1:
|
|
314
|
+
response = _a.sent();
|
|
315
|
+
return [2, response.data];
|
|
316
|
+
}
|
|
317
|
+
});
|
|
269
318
|
});
|
|
270
|
-
}
|
|
271
|
-
createProviderFinancialCreditNote
|
|
272
|
-
return
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
319
|
+
};
|
|
320
|
+
Repository.prototype.createProviderFinancialCreditNote = function (data) {
|
|
321
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
322
|
+
return __generator(this, function (_a) {
|
|
323
|
+
switch (_a.label) {
|
|
324
|
+
case 0: return [4, this.api.post("".concat(this.route, "provider_financial_credit_note"), data)];
|
|
325
|
+
case 1:
|
|
326
|
+
_a.sent();
|
|
327
|
+
return [2];
|
|
328
|
+
}
|
|
329
|
+
});
|
|
279
330
|
});
|
|
280
|
-
}
|
|
281
|
-
createProviderServiceInvoice
|
|
282
|
-
return
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
331
|
+
};
|
|
332
|
+
Repository.prototype.createProviderServiceInvoice = function (data) {
|
|
333
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
334
|
+
return __generator(this, function (_a) {
|
|
335
|
+
switch (_a.label) {
|
|
336
|
+
case 0: return [4, this.api.post("".concat(this.route, "provider_service_invoice"), data)];
|
|
337
|
+
case 1:
|
|
338
|
+
_a.sent();
|
|
339
|
+
return [2];
|
|
340
|
+
}
|
|
341
|
+
});
|
|
289
342
|
});
|
|
290
|
-
}
|
|
291
|
-
findProviderReturn
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
343
|
+
};
|
|
344
|
+
Repository.prototype.findProviderReturn = function (params) {
|
|
345
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
346
|
+
var response;
|
|
347
|
+
return __generator(this, function (_a) {
|
|
348
|
+
switch (_a.label) {
|
|
349
|
+
case 0: return [4, this.api.get("".concat(this.route, "provider_return"), {
|
|
350
|
+
params: params,
|
|
351
|
+
})];
|
|
352
|
+
case 1:
|
|
353
|
+
response = _a.sent();
|
|
354
|
+
return [2, response.data];
|
|
355
|
+
}
|
|
356
|
+
});
|
|
300
357
|
});
|
|
301
|
-
}
|
|
302
|
-
createProviderCreditNoteFromReturn
|
|
303
|
-
return
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
358
|
+
};
|
|
359
|
+
Repository.prototype.createProviderCreditNoteFromReturn = function (data) {
|
|
360
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
361
|
+
return __generator(this, function (_a) {
|
|
362
|
+
switch (_a.label) {
|
|
363
|
+
case 0: return [4, this.api.post("".concat(this.route, "provider_credit_note_from_return"), data)];
|
|
364
|
+
case 1:
|
|
365
|
+
_a.sent();
|
|
366
|
+
return [2];
|
|
367
|
+
}
|
|
368
|
+
});
|
|
310
369
|
});
|
|
311
|
-
}
|
|
312
|
-
transferClientOwnership
|
|
313
|
-
return
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
370
|
+
};
|
|
371
|
+
Repository.prototype.transferClientOwnership = function (data) {
|
|
372
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
373
|
+
return __generator(this, function (_a) {
|
|
374
|
+
switch (_a.label) {
|
|
375
|
+
case 0: return [4, this.api.put("".concat(this.route, "transfer_client_ownership"), data)];
|
|
376
|
+
case 1:
|
|
377
|
+
_a.sent();
|
|
378
|
+
return [2];
|
|
379
|
+
}
|
|
380
|
+
});
|
|
320
381
|
});
|
|
321
|
-
}
|
|
322
|
-
updateManyWithPersona
|
|
323
|
-
return
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
382
|
+
};
|
|
383
|
+
Repository.prototype.updateManyWithPersona = function (data) {
|
|
384
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
385
|
+
return __generator(this, function (_a) {
|
|
386
|
+
switch (_a.label) {
|
|
387
|
+
case 0: return [4, this.api.put("".concat(this.route, "update_many_with_persona"), data)];
|
|
388
|
+
case 1:
|
|
389
|
+
_a.sent();
|
|
390
|
+
return [2];
|
|
391
|
+
}
|
|
392
|
+
});
|
|
330
393
|
});
|
|
331
|
-
}
|
|
332
|
-
sendClientNotification
|
|
394
|
+
};
|
|
395
|
+
Repository.prototype.sendClientNotification = function (_a, data) {
|
|
333
396
|
var id = _a.id;
|
|
334
|
-
return __awaiter(
|
|
397
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
335
398
|
return __generator(this, function (_b) {
|
|
336
399
|
switch (_b.label) {
|
|
337
|
-
case 0: return [4,
|
|
400
|
+
case 0: return [4, this.api.post("".concat(this.route).concat(id, "/send_client_notification"), data)];
|
|
338
401
|
case 1:
|
|
339
402
|
_b.sent();
|
|
340
403
|
return [2];
|
|
341
404
|
}
|
|
342
405
|
});
|
|
343
406
|
});
|
|
344
|
-
}
|
|
345
|
-
markUnsentClientNotification
|
|
407
|
+
};
|
|
408
|
+
Repository.prototype.markUnsentClientNotification = function (_a) {
|
|
346
409
|
var id = _a.id;
|
|
347
|
-
return __awaiter(
|
|
410
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
348
411
|
return __generator(this, function (_b) {
|
|
349
412
|
switch (_b.label) {
|
|
350
|
-
case 0: return [4,
|
|
413
|
+
case 0: return [4, this.api.post("".concat(this.route).concat(id, "/mark_unsent_client_notification"))];
|
|
351
414
|
case 1:
|
|
352
415
|
_b.sent();
|
|
353
416
|
return [2];
|
|
354
417
|
}
|
|
355
418
|
});
|
|
356
419
|
});
|
|
357
|
-
}
|
|
358
|
-
documentPdf
|
|
420
|
+
};
|
|
421
|
+
Repository.prototype.documentPdf = function (_a) {
|
|
359
422
|
var id = _a.id;
|
|
360
|
-
return __awaiter(
|
|
423
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
361
424
|
var result;
|
|
362
425
|
return __generator(this, function (_b) {
|
|
363
426
|
switch (_b.label) {
|
|
364
|
-
case 0: return [4,
|
|
427
|
+
case 0: return [4, this.api.post("".concat(this.route, "document_pdf/").concat(id))];
|
|
365
428
|
case 1:
|
|
366
429
|
result = _b.sent();
|
|
367
430
|
return [2, result.data];
|
|
368
431
|
}
|
|
369
432
|
});
|
|
370
433
|
});
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
var
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}
|
|
434
|
+
};
|
|
435
|
+
Repository.prototype.documentPdfStream = function (_a, params) {
|
|
436
|
+
var id = _a.id;
|
|
437
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
438
|
+
var result;
|
|
439
|
+
return __generator(this, function (_b) {
|
|
440
|
+
switch (_b.label) {
|
|
441
|
+
case 0: return [4, this.api.get("".concat(this.route, "document_pdf/").concat(id), {
|
|
442
|
+
params: params,
|
|
443
|
+
responseType: 'arraybuffer',
|
|
444
|
+
})];
|
|
445
|
+
case 1:
|
|
446
|
+
result = _b.sent();
|
|
447
|
+
return [2, result.data];
|
|
448
|
+
}
|
|
449
|
+
});
|
|
387
450
|
});
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
var
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
406
|
-
return
|
|
407
|
-
};
|
|
408
|
-
exports.
|
|
409
|
-
exports.findMinified = repository.findMinified, exports.findOne = repository.findOne, exports.findByDocumentLineState = repository.findByDocumentLineState, exports.findByBasicSearch = repository.findByBasicSearch, exports.findByCommissionerId = repository.findByCommissionerId, exports.findClientUnpaidCredit = repository.findClientUnpaidCredit, exports.findClientUnpaidDebit = repository.findClientUnpaidDebit, exports.find = repository.find, exports.create = repository.create, exports.createFromHeader = repository.createFromHeader, exports.createFromPlots = repository.createFromPlots, exports.update = repository.update, exports.deleteOne = repository.deleteOne, exports.getActions = repository.getActions, exports.findUnpaidCommissions = repository.findUnpaidCommissions, exports.findProviderInvoice = repository.findProviderInvoice, exports.createProviderFinancialCreditNote = repository.createProviderFinancialCreditNote, exports.createProviderServiceInvoice = repository.createProviderServiceInvoice, exports.findProviderReturn = repository.findProviderReturn, exports.createProviderCreditNoteFromReturn = repository.createProviderCreditNoteFromReturn, exports.findMaterialEntranceProviders = repository.findMaterialEntranceProviders, exports.transferClientOwnership = repository.transferClientOwnership, exports.updateManyWithPersona = repository.updateManyWithPersona, exports.markUnsentClientNotification = repository.markUnsentClientNotification, exports.sendClientNotification = repository.sendClientNotification, exports.documentPdf = repository.documentPdf;
|
|
451
|
+
};
|
|
452
|
+
Repository.prototype.getDocumentPdfUrl = function (_a, data) {
|
|
453
|
+
var id = _a.id;
|
|
454
|
+
var qs = new URLSearchParams();
|
|
455
|
+
if (data === null || data === void 0 ? void 0 : data.token) {
|
|
456
|
+
qs.set('token', data.token);
|
|
457
|
+
}
|
|
458
|
+
if (data === null || data === void 0 ? void 0 : data.hidePayments) {
|
|
459
|
+
qs.set('hidePayments', "".concat(data.hidePayments));
|
|
460
|
+
}
|
|
461
|
+
if (data === null || data === void 0 ? void 0 : data.hidePrices) {
|
|
462
|
+
qs.set('hidePrices', "".concat(data.hidePrices));
|
|
463
|
+
}
|
|
464
|
+
if (data === null || data === void 0 ? void 0 : data.hideTaxes) {
|
|
465
|
+
qs.set('hideTaxes', "".concat(data.hideTaxes));
|
|
466
|
+
}
|
|
467
|
+
return "".concat(this.route, "document_pdf/").concat(id, "?").concat(qs.toString());
|
|
468
|
+
};
|
|
469
|
+
return Repository;
|
|
470
|
+
}());
|
|
471
|
+
exports.default = Repository;
|