@nomalism-com/api 0.18.5 → 0.18.6
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.min.js +1 -1
- package/package.json +10 -7
- package/dist/index.js +0 -460
- package/dist/modules/document/inventario.js +0 -60
- package/dist/modules/document/materialEntrance.js +0 -107
- package/dist/modules/document/order.js +0 -169
- package/dist/modules/document/propostaSheets.js +0 -148
- package/dist/modules/document/purchase.js +0 -100
- package/dist/modules/document/quebra.js +0 -100
- package/dist/modules/document/returnToProvider.js +0 -88
- package/dist/modules/document/transformado.js +0 -61
- package/dist/modules/document/upfrontReturn.js +0 -61
- package/dist/modules/documentManagement/multimedia.js +0 -82
- package/dist/modules/integration/emailLog.js +0 -75
- package/dist/modules/integration/emailTemplate.js +0 -112
- package/dist/modules/integration/emailTemplateAttachment.js +0 -73
- package/dist/modules/integration/errorHandler.js +0 -60
- package/dist/modules/integration/field.js +0 -102
- package/dist/modules/integration/fieldGroup.js +0 -131
- package/dist/modules/integration/file.js +0 -89
- package/dist/modules/integration/googleFilePermission.js +0 -100
- package/dist/modules/integration/googleSheets.js +0 -101
- package/dist/modules/integration/history.js +0 -66
- package/dist/modules/integration/observation.js +0 -102
- package/dist/modules/integration/observationType.js +0 -115
- package/dist/modules/integration/projectInfo.js +0 -60
- package/dist/modules/integration/settings.js +0 -115
- package/dist/modules/print/npc.js +0 -74
- package/dist/modules/print/printer.js +0 -87
- package/dist/modules/print/schedulePrintJob.js +0 -98
- package/dist/modules/stock/attribute.js +0 -160
- package/dist/modules/stock/attributeValue.js +0 -156
- package/dist/modules/stock/color.js +0 -155
- package/dist/modules/stock/composition.js +0 -141
- package/dist/modules/stock/compositionMaterial.js +0 -156
- package/dist/modules/stock/location.js +0 -156
- package/dist/modules/stock/maintenance.js +0 -156
- package/dist/modules/stock/maintenanceAssoc.js +0 -141
- package/dist/modules/stock/maintenancePreset.js +0 -126
- package/dist/modules/stock/maintenancePresetAssoc.js +0 -99
- package/dist/modules/stock/maintenanceType.js +0 -156
- package/dist/modules/stock/primaryColor.js +0 -156
- package/dist/modules/stock/prison.js +0 -128
- package/dist/modules/stock/product.js +0 -291
- package/dist/modules/stock/productAttribute.js +0 -141
- package/dist/modules/stock/productCategory.js +0 -156
- package/dist/modules/stock/productColor.js +0 -141
- package/dist/modules/stock/productImage.js +0 -145
- package/dist/modules/stock/productName.js +0 -156
- package/dist/modules/stock/productNamePreset.js +0 -156
- package/dist/modules/stock/productPart.js +0 -155
- package/dist/modules/stock/productSubCategory.js +0 -155
- package/dist/modules/stock/productUse.js +0 -156
- package/dist/modules/stock/productUseAssoc.js +0 -140
- package/dist/modules/stock/promotion.js +0 -176
- package/dist/modules/stock/promotionAssoc.js +0 -141
- package/dist/modules/stock/queryList.js +0 -158
- package/dist/modules/stock/queryParameter.js +0 -129
- package/dist/modules/stock/returnReason.js +0 -100
- package/dist/modules/stock/savedEmPicking.js +0 -74
- package/dist/modules/stock/savedProviderProposal.js +0 -100
- package/dist/modules/stock/schedule.js +0 -64
- package/dist/modules/stock/similarProduct.js +0 -141
- package/dist/modules/stock/stockMovement.js +0 -103
- package/dist/modules/stock/typeOfInventory.js +0 -156
- package/dist/modules/stock/typeOfLocation.js +0 -156
- package/dist/modules/stock/unitOfMeasure.js +0 -156
- package/dist/modules/stock/vatTax.js +0 -156
- package/dist/modules/stock/vatTaxZone.js +0 -156
- package/dist/modules/supply/cabide.js +0 -177
- package/dist/modules/supply/cabideProduct.js +0 -166
- package/dist/modules/supply/clientCurrentAccount.js +0 -132
- package/dist/modules/supply/documentHeader.js +0 -476
- package/dist/modules/supply/documentLine.js +0 -173
- package/dist/modules/supply/documentLineAssoc.js +0 -99
- package/dist/modules/supply/documentLineFolder.js +0 -100
- package/dist/modules/supply/documentLineNote.js +0 -87
- package/dist/modules/supply/documentSet.js +0 -126
- package/dist/modules/supply/documentType.js +0 -130
- package/dist/modules/supply/externalDocumentHeader.js +0 -151
- package/dist/modules/supply/externalDocumentType.js +0 -74
- package/dist/modules/supply/moloniRequest.js +0 -60
- package/dist/modules/supply/orderManagement.js +0 -91
- package/dist/modules/supply/payment.js +0 -262
- package/dist/modules/supply/preSale.js +0 -152
- package/dist/modules/supply/preSaleProduct.js +0 -74
- package/dist/modules/supply/providerCurrentAccount.js +0 -63
- package/dist/modules/supply/startDocumentHeaderLastUpdate.js +0 -61
- package/dist/modules/supply/vatValidation.js +0 -65
- package/dist/modules/supply/workflow.js +0 -113
- package/dist/modules/tickets/channel.js +0 -126
- package/dist/modules/tickets/clt.js +0 -126
- package/dist/modules/tickets/language.js +0 -126
- package/dist/modules/tickets/tickets.js +0 -100
- package/dist/modules/user/bankData.js +0 -141
- package/dist/modules/user/clientType.js +0 -141
- package/dist/modules/user/clients.js +0 -169
- package/dist/modules/user/commissioner.js +0 -156
- package/dist/modules/user/country.js +0 -156
- package/dist/modules/user/deliveryMethods.js +0 -128
- package/dist/modules/user/favorites.js +0 -100
- package/dist/modules/user/groupPermission.js +0 -102
- package/dist/modules/user/language.js +0 -141
- package/dist/modules/user/logout.js +0 -60
- package/dist/modules/user/maturityDates.js +0 -128
- package/dist/modules/user/password.js +0 -72
- package/dist/modules/user/paymentCondition.js +0 -141
- package/dist/modules/user/paymentMethods.js +0 -128
- package/dist/modules/user/permission.js +0 -102
- package/dist/modules/user/persona.js +0 -130
- package/dist/modules/user/provider.js +0 -184
- package/dist/modules/user/providerType.js +0 -141
- package/dist/modules/user/purchaseCondition.js +0 -141
- package/dist/modules/user/reasonForExemption.js +0 -141
- package/dist/modules/user/refreshToken.js +0 -61
- package/dist/modules/user/segmentsArea.js +0 -141
- package/dist/modules/user/sessions.js +0 -61
- package/dist/modules/user/shippings.js +0 -141
- package/dist/modules/user/socialMedia.js +0 -141
- package/dist/modules/user/storeOperator.js +0 -169
- package/dist/modules/user/swift.js +0 -141
- package/dist/modules/user/tenant.js +0 -100
- package/dist/modules/user/user.js +0 -167
- package/dist/modules/user/userPermission.js +0 -89
- package/dist/modules/user/userPositions.js +0 -141
- package/dist/modules/user/vehicles.js +0 -100
- package/dist/modules/user/zipCode.js +0 -73
- package/dist/modules/view/eventHistory.js +0 -61
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.findByUrl = 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), { params: params })];
|
|
52
|
-
case 1:
|
|
53
|
-
response = _a.sent();
|
|
54
|
-
return [2, response.data];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
Repository.prototype.list = function () {
|
|
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.get("".concat(this.route, "list"))];
|
|
65
|
-
case 1:
|
|
66
|
-
response = _a.sent();
|
|
67
|
-
return [2, response.data];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
Repository.prototype.create = function (body) {
|
|
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.post("".concat(this.route), body)];
|
|
78
|
-
case 1:
|
|
79
|
-
response = _a.sent();
|
|
80
|
-
return [2, response.data];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
Repository.prototype.deleteOne = function (params) {
|
|
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), { params: params })];
|
|
91
|
-
case 1:
|
|
92
|
-
response = _a.sent();
|
|
93
|
-
return [2, response.data];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
return Repository;
|
|
99
|
-
}());
|
|
100
|
-
exports.default = Repository;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.find = function () {
|
|
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))];
|
|
52
|
-
case 1:
|
|
53
|
-
response = _a.sent();
|
|
54
|
-
return [2, response.data];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
Repository.prototype.findMinified = function (params) {
|
|
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.get("".concat(this.route, "minified"), {
|
|
65
|
-
params: params,
|
|
66
|
-
})];
|
|
67
|
-
case 1:
|
|
68
|
-
response = _a.sent();
|
|
69
|
-
return [2, response.data];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
Repository.prototype.create = function (body) {
|
|
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.post("".concat(this.route), body)];
|
|
80
|
-
case 1:
|
|
81
|
-
response = _a.sent();
|
|
82
|
-
return [2, response.data];
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
Repository.prototype.deleteOne = function (selector) {
|
|
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.delete("".concat(this.route).concat(selector.id))];
|
|
93
|
-
case 1:
|
|
94
|
-
response = _a.sent();
|
|
95
|
-
return [2, response.data];
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
return Repository;
|
|
101
|
-
}());
|
|
102
|
-
exports.default = Repository;
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.find = 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), { params: params })];
|
|
52
|
-
case 1:
|
|
53
|
-
response = _a.sent();
|
|
54
|
-
return [2, response.data];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
Repository.prototype.findPaginated = function (params) {
|
|
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.get("".concat(this.route, "paginated"), { params: params })];
|
|
65
|
-
case 1:
|
|
66
|
-
response = _a.sent();
|
|
67
|
-
return [2, response.data];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
Repository.prototype.findMinified = function (params) {
|
|
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, "minified"), {
|
|
78
|
-
params: params,
|
|
79
|
-
})];
|
|
80
|
-
case 1:
|
|
81
|
-
response = _a.sent();
|
|
82
|
-
return [2, response.data];
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
Repository.prototype.findById = function (selector) {
|
|
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).concat(selector.id))];
|
|
93
|
-
case 1:
|
|
94
|
-
response = _a.sent();
|
|
95
|
-
return [2, response.data];
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
Repository.prototype.create = function (body) {
|
|
101
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
102
|
-
var response;
|
|
103
|
-
return __generator(this, function (_a) {
|
|
104
|
-
switch (_a.label) {
|
|
105
|
-
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
106
|
-
case 1:
|
|
107
|
-
response = _a.sent();
|
|
108
|
-
return [2, response.data];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
Repository.prototype.update = function (selector, body) {
|
|
114
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
115
|
-
var response;
|
|
116
|
-
return __generator(this, function (_a) {
|
|
117
|
-
switch (_a.label) {
|
|
118
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
119
|
-
case 1:
|
|
120
|
-
response = _a.sent();
|
|
121
|
-
return [2, response.data];
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
Repository.prototype.deleteOne = function (selector) {
|
|
127
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
128
|
-
var response;
|
|
129
|
-
return __generator(this, function (_a) {
|
|
130
|
-
switch (_a.label) {
|
|
131
|
-
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
132
|
-
case 1:
|
|
133
|
-
response = _a.sent();
|
|
134
|
-
return [2, response.data];
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
};
|
|
139
|
-
return Repository;
|
|
140
|
-
}());
|
|
141
|
-
exports.default = Repository;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.logout = function () {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
return __generator(this, function (_a) {
|
|
49
|
-
switch (_a.label) {
|
|
50
|
-
case 0: return [4, this.api.post("".concat(this.route))];
|
|
51
|
-
case 1:
|
|
52
|
-
_a.sent();
|
|
53
|
-
return [2];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
return Repository;
|
|
59
|
-
}());
|
|
60
|
-
exports.default = Repository;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.find = function () {
|
|
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))];
|
|
52
|
-
case 1:
|
|
53
|
-
response = _a.sent();
|
|
54
|
-
return [2, response.data];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
Repository.prototype.findById = 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.get("".concat(this.route).concat(selector.id))];
|
|
65
|
-
case 1:
|
|
66
|
-
response = _a.sent();
|
|
67
|
-
return [2, response.data];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
Repository.prototype.findMinified = function (params) {
|
|
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, "minified"), {
|
|
78
|
-
params: params,
|
|
79
|
-
})];
|
|
80
|
-
case 1:
|
|
81
|
-
response = _a.sent();
|
|
82
|
-
return [2, response.data];
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
Repository.prototype.create = function (body) {
|
|
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.post("".concat(this.route), body)];
|
|
93
|
-
case 1:
|
|
94
|
-
response = _a.sent();
|
|
95
|
-
return [2, response.data];
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
Repository.prototype.update = function (selector, body) {
|
|
101
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
102
|
-
var response;
|
|
103
|
-
return __generator(this, function (_a) {
|
|
104
|
-
switch (_a.label) {
|
|
105
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
106
|
-
case 1:
|
|
107
|
-
response = _a.sent();
|
|
108
|
-
return [2, response.data];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
Repository.prototype.deleteOne = function (selector) {
|
|
114
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
115
|
-
var response;
|
|
116
|
-
return __generator(this, function (_a) {
|
|
117
|
-
switch (_a.label) {
|
|
118
|
-
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
119
|
-
case 1:
|
|
120
|
-
response = _a.sent();
|
|
121
|
-
return [2, response.data];
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
return Repository;
|
|
127
|
-
}());
|
|
128
|
-
exports.default = Repository;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.forgotPassword = function (body) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
return __generator(this, function (_a) {
|
|
49
|
-
switch (_a.label) {
|
|
50
|
-
case 0: return [4, this.api.post("".concat(this.publicRoute, "forgot"), body)];
|
|
51
|
-
case 1:
|
|
52
|
-
_a.sent();
|
|
53
|
-
return [2];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
Repository.prototype.resetPassword = function (body) {
|
|
59
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
60
|
-
return __generator(this, function (_a) {
|
|
61
|
-
switch (_a.label) {
|
|
62
|
-
case 0: return [4, this.api.post("".concat(this.publicRoute, "reset"), body)];
|
|
63
|
-
case 1:
|
|
64
|
-
_a.sent();
|
|
65
|
-
return [2];
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
return Repository;
|
|
71
|
-
}());
|
|
72
|
-
exports.default = Repository;
|