@nomalism-com/api 0.12.2 → 0.13.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/dist/index.d.ts +282 -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
|
@@ -46,101 +46,113 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
46
46
|
}
|
|
47
47
|
return t;
|
|
48
48
|
};
|
|
49
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
-
};
|
|
52
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
exports.
|
|
50
|
+
exports.executeOutput = void 0;
|
|
54
51
|
var types_1 = require("@nomalism-com/types");
|
|
55
|
-
var client_1 = __importDefault(require("../../shared/client"));
|
|
56
|
-
var _1 = require(".");
|
|
57
52
|
exports.executeOutput = types_1.QueryList.executeOutput;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
53
|
+
var Repository = (function () {
|
|
54
|
+
function Repository(_a) {
|
|
55
|
+
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
56
|
+
this.api = api;
|
|
57
|
+
this.route = route;
|
|
58
|
+
this.publicRoute = publicRoute;
|
|
59
|
+
}
|
|
60
|
+
Repository.prototype.find = function () {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
62
|
+
var response;
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
switch (_a.label) {
|
|
65
|
+
case 0: return [4, this.api.get("".concat(this.route))];
|
|
66
|
+
case 1:
|
|
67
|
+
response = _a.sent();
|
|
68
|
+
return [2, response.data];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
69
71
|
});
|
|
70
|
-
}
|
|
71
|
-
findById
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
};
|
|
73
|
+
Repository.prototype.findById = function (selector) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
75
|
+
var response;
|
|
76
|
+
return __generator(this, function (_a) {
|
|
77
|
+
switch (_a.label) {
|
|
78
|
+
case 0: return [4, this.api.get("".concat(this.route).concat(selector.id))];
|
|
79
|
+
case 1:
|
|
80
|
+
response = _a.sent();
|
|
81
|
+
return [2, response.data];
|
|
82
|
+
}
|
|
83
|
+
});
|
|
80
84
|
});
|
|
81
|
-
}
|
|
82
|
-
create
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
};
|
|
86
|
+
Repository.prototype.create = function (body) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
+
var response;
|
|
89
|
+
return __generator(this, function (_a) {
|
|
90
|
+
switch (_a.label) {
|
|
91
|
+
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
92
|
+
case 1:
|
|
93
|
+
response = _a.sent();
|
|
94
|
+
return [2, response.data];
|
|
95
|
+
}
|
|
96
|
+
});
|
|
91
97
|
});
|
|
92
|
-
}
|
|
93
|
-
update
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
};
|
|
99
|
+
Repository.prototype.update = function (selector, body) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
+
var response;
|
|
102
|
+
return __generator(this, function (_a) {
|
|
103
|
+
switch (_a.label) {
|
|
104
|
+
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
105
|
+
case 1:
|
|
106
|
+
response = _a.sent();
|
|
107
|
+
return [2, response.data];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
102
110
|
});
|
|
103
|
-
}
|
|
104
|
-
deleteOne
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
};
|
|
112
|
+
Repository.prototype.deleteOne = function (selector) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
114
|
+
var response;
|
|
115
|
+
return __generator(this, function (_a) {
|
|
116
|
+
switch (_a.label) {
|
|
117
|
+
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
118
|
+
case 1:
|
|
119
|
+
response = _a.sent();
|
|
120
|
+
return [2, response.data];
|
|
121
|
+
}
|
|
122
|
+
});
|
|
113
123
|
});
|
|
114
|
-
}
|
|
115
|
-
execute
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
+
};
|
|
125
|
+
Repository.prototype.execute = function (params) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
127
|
+
var response;
|
|
128
|
+
return __generator(this, function (_a) {
|
|
129
|
+
switch (_a.label) {
|
|
130
|
+
case 0: return [4, this.api.get("".concat(this.route, "execute"), { params: params })];
|
|
131
|
+
case 1:
|
|
132
|
+
response = _a.sent();
|
|
133
|
+
return [2, response.data];
|
|
134
|
+
}
|
|
135
|
+
});
|
|
124
136
|
});
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
var
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
exports.
|
|
137
|
+
};
|
|
138
|
+
Repository.prototype.getQueryExecuteUrl = function (_a) {
|
|
139
|
+
var query_id = _a.query_id, output = _a.output, token = _a.token, data = __rest(_a, ["query_id", "output", "token"]);
|
|
140
|
+
var qs = new URLSearchParams();
|
|
141
|
+
qs.set('query_id', query_id);
|
|
142
|
+
qs.set('output', output);
|
|
143
|
+
if (token) {
|
|
144
|
+
qs.set('token', token);
|
|
145
|
+
}
|
|
146
|
+
Object.entries(data).forEach(function (_a) {
|
|
147
|
+
var key = _a[0], value = _a[1];
|
|
148
|
+
if (typeof value === 'undefined')
|
|
149
|
+
return;
|
|
150
|
+
if (value === null)
|
|
151
|
+
return;
|
|
152
|
+
qs.set(key, value.toString());
|
|
153
|
+
});
|
|
154
|
+
return "".concat(this.route, "execute?").concat(qs.toString());
|
|
155
|
+
};
|
|
156
|
+
return Repository;
|
|
157
|
+
}());
|
|
158
|
+
exports.default = Repository;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { QueryParameter as Entity, shared } from '@nomalism-com/types';
|
|
2
|
+
import { IModuleConstructor } from 'index';
|
|
2
3
|
export import ICreateRequest = Entity.ICreateRequest;
|
|
3
4
|
export import IEntity = Entity.Entity;
|
|
4
5
|
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
5
6
|
export import QueryParameterDatatypeEnum = Entity.QueryParameterDatatypeEnum;
|
|
6
7
|
export import IQueryParameterDatatype = Entity.IQueryParameterDatatype;
|
|
7
8
|
export import IFindByOwnerIdResponse = Entity.IFindByOwnerIdResponse;
|
|
8
|
-
export
|
|
9
|
-
|
|
9
|
+
export default class Repository implements Entity.IRepository {
|
|
10
|
+
private route;
|
|
11
|
+
private publicRoute;
|
|
12
|
+
private api;
|
|
13
|
+
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
14
|
+
find(): Promise<IEntity[]>;
|
|
15
|
+
findById(selector: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
16
|
+
create(body: ICreateRequest): Promise<IEntity>;
|
|
17
|
+
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IEntity | null>;
|
|
18
|
+
deleteOne(selector: shared.IFindByIdRequest): Promise<void>;
|
|
19
|
+
findByOwnerId(params: shared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
20
|
+
}
|
|
@@ -35,82 +35,95 @@ 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
|
-
exports.
|
|
39
|
+
exports.QueryParameterDatatypeEnum = void 0;
|
|
43
40
|
var types_1 = require("@nomalism-com/types");
|
|
44
|
-
var _1 = require(".");
|
|
45
|
-
var client_1 = __importDefault(require("../../shared/client"));
|
|
46
41
|
exports.QueryParameterDatatypeEnum = types_1.QueryParameter.QueryParameterDatatypeEnum;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
var Repository = (function () {
|
|
43
|
+
function Repository(_a) {
|
|
44
|
+
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
45
|
+
this.api = api;
|
|
46
|
+
this.route = route;
|
|
47
|
+
this.publicRoute = publicRoute;
|
|
48
|
+
}
|
|
49
|
+
Repository.prototype.find = function () {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
51
|
+
var response;
|
|
52
|
+
return __generator(this, function (_a) {
|
|
53
|
+
switch (_a.label) {
|
|
54
|
+
case 0: return [4, this.api.get("".concat(this.route))];
|
|
55
|
+
case 1:
|
|
56
|
+
response = _a.sent();
|
|
57
|
+
return [2, response.data];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
58
60
|
});
|
|
59
|
-
}
|
|
60
|
-
findById
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
};
|
|
62
|
+
Repository.prototype.findById = function (selector) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
+
var response;
|
|
65
|
+
return __generator(this, function (_a) {
|
|
66
|
+
switch (_a.label) {
|
|
67
|
+
case 0: return [4, this.api.get("".concat(this.route).concat(selector.id))];
|
|
68
|
+
case 1:
|
|
69
|
+
response = _a.sent();
|
|
70
|
+
return [2, response.data];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
69
73
|
});
|
|
70
|
-
}
|
|
71
|
-
create
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
};
|
|
75
|
+
Repository.prototype.create = function (body) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
77
|
+
var response;
|
|
78
|
+
return __generator(this, function (_a) {
|
|
79
|
+
switch (_a.label) {
|
|
80
|
+
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
81
|
+
case 1:
|
|
82
|
+
response = _a.sent();
|
|
83
|
+
return [2, response.data];
|
|
84
|
+
}
|
|
85
|
+
});
|
|
80
86
|
});
|
|
81
|
-
}
|
|
82
|
-
update
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
};
|
|
88
|
+
Repository.prototype.update = function (selector, body) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
90
|
+
var response;
|
|
91
|
+
return __generator(this, function (_a) {
|
|
92
|
+
switch (_a.label) {
|
|
93
|
+
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
94
|
+
case 1:
|
|
95
|
+
response = _a.sent();
|
|
96
|
+
return [2, response.data];
|
|
97
|
+
}
|
|
98
|
+
});
|
|
91
99
|
});
|
|
92
|
-
}
|
|
93
|
-
deleteOne
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
};
|
|
101
|
+
Repository.prototype.deleteOne = function (selector) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
103
|
+
var response;
|
|
104
|
+
return __generator(this, function (_a) {
|
|
105
|
+
switch (_a.label) {
|
|
106
|
+
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
107
|
+
case 1:
|
|
108
|
+
response = _a.sent();
|
|
109
|
+
return [2, response.data];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
102
112
|
});
|
|
103
|
-
}
|
|
104
|
-
findByOwnerId
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
};
|
|
114
|
+
Repository.prototype.findByOwnerId = function (params) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
116
|
+
var response;
|
|
117
|
+
return __generator(this, function (_a) {
|
|
118
|
+
switch (_a.label) {
|
|
119
|
+
case 0: return [4, this.api.get("".concat(this.route, "by_owner"), { params: params })];
|
|
120
|
+
case 1:
|
|
121
|
+
response = _a.sent();
|
|
122
|
+
return [2, response.data];
|
|
123
|
+
}
|
|
124
|
+
});
|
|
113
125
|
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
126
|
+
};
|
|
127
|
+
return Repository;
|
|
128
|
+
}());
|
|
129
|
+
exports.default = Repository;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { ReturnReason as Entity, shared } from '@nomalism-com/types';
|
|
2
|
+
import { IModuleConstructor } from 'index';
|
|
2
3
|
export import IEntity = Entity.Entity;
|
|
3
4
|
export import ICreateRequest = Entity.ICreateRequest;
|
|
4
5
|
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
5
|
-
export
|
|
6
|
-
|
|
6
|
+
export default class Repository implements Entity.IRepository {
|
|
7
|
+
private route;
|
|
8
|
+
private publicRoute;
|
|
9
|
+
private api;
|
|
10
|
+
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
11
|
+
create(body: ICreateRequest): Promise<IEntity>;
|
|
12
|
+
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IEntity | null>;
|
|
13
|
+
find(): Promise<IEntity[]>;
|
|
14
|
+
deleteOne(selector: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
15
|
+
}
|
|
@@ -35,58 +35,66 @@ 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
|
-
return [
|
|
55
|
-
|
|
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.create = function (body) {
|
|
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.post("".concat(this.route), body)];
|
|
52
|
+
case 1:
|
|
53
|
+
response = _a.sent();
|
|
54
|
+
return [2, response.data];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
56
57
|
});
|
|
57
|
-
}
|
|
58
|
-
update
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
};
|
|
59
|
+
Repository.prototype.update = function (selector, body) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
+
var response;
|
|
62
|
+
return __generator(this, function (_a) {
|
|
63
|
+
switch (_a.label) {
|
|
64
|
+
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
65
|
+
case 1:
|
|
66
|
+
response = _a.sent();
|
|
67
|
+
return [2, response.data];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
67
70
|
});
|
|
68
|
-
}
|
|
69
|
-
find
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
};
|
|
72
|
+
Repository.prototype.find = function () {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
+
var response;
|
|
75
|
+
return __generator(this, function (_a) {
|
|
76
|
+
switch (_a.label) {
|
|
77
|
+
case 0: return [4, this.api.get("".concat(this.route))];
|
|
78
|
+
case 1:
|
|
79
|
+
response = _a.sent();
|
|
80
|
+
return [2, response.data];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
78
83
|
});
|
|
79
|
-
}
|
|
80
|
-
deleteOne
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
};
|
|
85
|
+
Repository.prototype.deleteOne = function (selector) {
|
|
86
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
+
var response;
|
|
88
|
+
return __generator(this, function (_a) {
|
|
89
|
+
switch (_a.label) {
|
|
90
|
+
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
91
|
+
case 1:
|
|
92
|
+
response = _a.sent();
|
|
93
|
+
return [2, response.data];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
89
96
|
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
};
|
|
98
|
+
return Repository;
|
|
99
|
+
}());
|
|
100
|
+
exports.default = Repository;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { SavedEmPicking as Entity, shared } from '@nomalism-com/types';
|
|
2
|
+
import { IModuleConstructor } from 'index';
|
|
2
3
|
export import IEntity = Entity.Entity;
|
|
3
4
|
export import ISavedEmPickingData = Entity.ISavedEmPickingData;
|
|
4
5
|
export import ICreateRequest = Entity.ICreateRequest;
|
|
5
|
-
export
|
|
6
|
-
|
|
6
|
+
export default class Repository implements Entity.IRepository {
|
|
7
|
+
private route;
|
|
8
|
+
private publicRoute;
|
|
9
|
+
private api;
|
|
10
|
+
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
11
|
+
create(body: ICreateRequest): Promise<IEntity>;
|
|
12
|
+
deleteOne(selector: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
13
|
+
}
|
|
@@ -35,36 +35,40 @@ 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
|
-
return [
|
|
55
|
-
|
|
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.create = function (body) {
|
|
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.post("".concat(this.route), body)];
|
|
52
|
+
case 1:
|
|
53
|
+
response = _a.sent();
|
|
54
|
+
return [2, response.data];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
56
57
|
});
|
|
57
|
-
}
|
|
58
|
-
deleteOne
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
};
|
|
59
|
+
Repository.prototype.deleteOne = function (selector) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
+
var response;
|
|
62
|
+
return __generator(this, function (_a) {
|
|
63
|
+
switch (_a.label) {
|
|
64
|
+
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
65
|
+
case 1:
|
|
66
|
+
response = _a.sent();
|
|
67
|
+
return [2, response.data];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
67
70
|
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
};
|
|
72
|
+
return Repository;
|
|
73
|
+
}());
|
|
74
|
+
exports.default = Repository;
|