@nomalism-com/api 0.8.282 → 0.8.284
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 +124 -126
- package/dist/index.js +126 -253
- package/dist/modules/integration/file.d.ts +1 -0
- package/dist/modules/integration/file.js +5 -5
- package/dist/modules/integration/googleFilePermission.d.ts +1 -0
- package/dist/modules/integration/googleFilePermission.js +6 -6
- package/dist/modules/integration/googleSheets.d.ts +1 -0
- package/dist/modules/integration/googleSheets.js +7 -7
- package/dist/modules/integration/settings.d.ts +2 -0
- package/dist/modules/integration/settings.js +8 -8
- package/dist/modules/print/index.d.ts +0 -1
- package/dist/modules/print/index.js +6 -3
- package/dist/modules/print/schedulePrintJob.d.ts +2 -3
- package/dist/modules/print/schedulePrintJob.js +46 -94
- package/dist/modules/{stock → supply}/cabide.js +3 -3
- package/dist/modules/{stock → supply}/cabideProduct.d.ts +1 -1
- package/dist/modules/{stock → supply}/cabideProduct.js +2 -2
- package/dist/modules/{stock → supply}/clientCurrentAccount.js +2 -2
- package/dist/modules/{stock → supply}/documentHeader.js +2 -2
- package/dist/modules/{stock → supply}/documentLine.js +2 -2
- package/dist/modules/{stock → supply}/documentLineAssoc.d.ts +1 -0
- package/dist/modules/{stock → supply}/documentLineAssoc.js +7 -7
- package/dist/modules/{stock → supply}/documentLineFolder.d.ts +1 -0
- package/dist/modules/{stock → supply}/documentLineFolder.js +7 -7
- package/dist/modules/{stock → supply}/documentSet.js +2 -2
- package/dist/modules/{stock → supply}/documentType.js +2 -2
- package/dist/modules/{stock → supply}/externalDocumentHeader.js +2 -2
- package/dist/modules/{stock → supply}/externalDocumentType.js +2 -2
- package/dist/modules/{stock → supply}/materialEntrance.d.ts +1 -0
- package/dist/modules/{stock → supply}/materialEntrance.js +6 -6
- package/dist/modules/{stock → supply}/moloniRequest.js +2 -2
- package/dist/modules/{stock → supply}/order.d.ts +1 -0
- package/dist/modules/{stock → supply}/order.js +11 -11
- package/dist/modules/{stock → supply}/orderManagement.js +2 -2
- package/dist/modules/{stock → supply}/payment.js +3 -3
- package/dist/modules/{stock → supply}/preSale.js +2 -2
- package/dist/modules/{stock → supply}/preSaleProduct.js +2 -2
- package/dist/modules/{stock → supply}/propostaSheets.js +2 -2
- package/dist/modules/{stock → supply}/providerCurrentAccount.js +2 -2
- package/dist/modules/{stock → supply}/purchase.d.ts +1 -0
- package/dist/modules/{stock → supply}/purchase.js +6 -6
- package/dist/modules/{stock → supply}/startDocumentHeaderLastUpdate.js +2 -2
- package/dist/modules/{stock → supply}/vatValidation.js +2 -2
- package/dist/modules/{stock → supply}/workflow.js +2 -2
- package/package.json +53 -53
- package/dist/modules/stock/topMenu.d.ts +0 -5
- package/dist/modules/stock/topMenu.js +0 -61
- package/dist/modules/stock/websiteRequest.d.ts +0 -10
- package/dist/modules/stock/websiteRequest.js +0 -96
- /package/dist/modules/{stock → supply}/cabide.d.ts +0 -0
- /package/dist/modules/{stock → supply}/clientCurrentAccount.d.ts +0 -0
- /package/dist/modules/{stock → supply}/documentHeader.d.ts +0 -0
- /package/dist/modules/{stock → supply}/documentLine.d.ts +0 -0
- /package/dist/modules/{stock → supply}/documentSet.d.ts +0 -0
- /package/dist/modules/{stock → supply}/documentType.d.ts +0 -0
- /package/dist/modules/{stock → supply}/externalDocumentHeader.d.ts +0 -0
- /package/dist/modules/{stock → supply}/externalDocumentType.d.ts +0 -0
- /package/dist/modules/{stock → supply}/moloniRequest.d.ts +0 -0
- /package/dist/modules/{stock → supply}/orderManagement.d.ts +0 -0
- /package/dist/modules/{stock → supply}/payment.d.ts +0 -0
- /package/dist/modules/{stock → supply}/preSale.d.ts +0 -0
- /package/dist/modules/{stock → supply}/preSaleProduct.d.ts +0 -0
- /package/dist/modules/{stock → supply}/propostaSheets.d.ts +0 -0
- /package/dist/modules/{stock → supply}/providerCurrentAccount.d.ts +0 -0
- /package/dist/modules/{stock → supply}/startDocumentHeaderLastUpdate.d.ts +0 -0
- /package/dist/modules/{stock → supply}/vatValidation.d.ts +0 -0
- /package/dist/modules/{stock → supply}/workflow.d.ts +0 -0
|
@@ -39,18 +39,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.unsetProvider = exports.undoProviderOrder = exports.undoEncomendaVA = exports.undoEncomendaStock = exports.setProvider = exports.findStockToOrder = exports.findProvidersWithStockToOrder = exports.conferirEncomendaCliente = exports.conferirEncomendaClienteOptions = exports.ConferirEncomendaClienteOptionsEnum = void 0;
|
|
42
|
+
exports.unsetProvider = exports.undoProviderOrder = exports.undoEncomendaVA = exports.undoEncomendaStock = exports.setProvider = exports.findStockToOrder = exports.findProvidersWithStockToOrder = exports.conferirEncomendaCliente = exports.route = exports.conferirEncomendaClienteOptions = exports.ConferirEncomendaClienteOptionsEnum = void 0;
|
|
43
43
|
var types_1 = require("@nomalism-com/types");
|
|
44
44
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
45
|
-
var
|
|
45
|
+
var stock_1 = require("../stock");
|
|
46
46
|
exports.ConferirEncomendaClienteOptionsEnum = types_1.Order.ConferirEncomendaClienteOptionsEnum, exports.conferirEncomendaClienteOptions = types_1.Order.conferirEncomendaClienteOptions;
|
|
47
|
-
|
|
47
|
+
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath, "order/");
|
|
48
48
|
var repository = {
|
|
49
49
|
findStockToOrder: function (params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
50
50
|
var response;
|
|
51
51
|
return __generator(this, function (_a) {
|
|
52
52
|
switch (_a.label) {
|
|
53
|
-
case 0: return [4, client_1.default.get("".concat(route, "check_lines_to_order"), { params: params })];
|
|
53
|
+
case 0: return [4, client_1.default.get("".concat(exports.route, "check_lines_to_order"), { params: params })];
|
|
54
54
|
case 1:
|
|
55
55
|
response = _a.sent();
|
|
56
56
|
return [2, response.data];
|
|
@@ -61,7 +61,7 @@ var repository = {
|
|
|
61
61
|
var response;
|
|
62
62
|
return __generator(this, function (_a) {
|
|
63
63
|
switch (_a.label) {
|
|
64
|
-
case 0: return [4, client_1.default.get("".concat(route, "stock_order_provider"))];
|
|
64
|
+
case 0: return [4, client_1.default.get("".concat(exports.route, "stock_order_provider"))];
|
|
65
65
|
case 1:
|
|
66
66
|
response = _a.sent();
|
|
67
67
|
return [2, response.data];
|
|
@@ -71,7 +71,7 @@ var repository = {
|
|
|
71
71
|
undoEncomendaVA: function (selector) { return __awaiter(void 0, void 0, void 0, function () {
|
|
72
72
|
return __generator(this, function (_a) {
|
|
73
73
|
switch (_a.label) {
|
|
74
|
-
case 0: return [4, client_1.default.delete("".concat(route).concat(selector.id, "/undo_encomenda_va"))];
|
|
74
|
+
case 0: return [4, client_1.default.delete("".concat(exports.route).concat(selector.id, "/undo_encomenda_va"))];
|
|
75
75
|
case 1:
|
|
76
76
|
_a.sent();
|
|
77
77
|
return [2];
|
|
@@ -83,7 +83,7 @@ var repository = {
|
|
|
83
83
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
84
84
|
return __generator(this, function (_b) {
|
|
85
85
|
switch (_b.label) {
|
|
86
|
-
case 0: return [4, client_1.default.post("".concat(route).concat(id, "/set_provider"), data)];
|
|
86
|
+
case 0: return [4, client_1.default.post("".concat(exports.route).concat(id, "/set_provider"), data)];
|
|
87
87
|
case 1:
|
|
88
88
|
_b.sent();
|
|
89
89
|
return [2];
|
|
@@ -96,7 +96,7 @@ var repository = {
|
|
|
96
96
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
97
97
|
return __generator(this, function (_b) {
|
|
98
98
|
switch (_b.label) {
|
|
99
|
-
case 0: return [4, client_1.default.post("".concat(route).concat(id, "/unset_provider"))];
|
|
99
|
+
case 0: return [4, client_1.default.post("".concat(exports.route).concat(id, "/unset_provider"))];
|
|
100
100
|
case 1:
|
|
101
101
|
_b.sent();
|
|
102
102
|
return [2];
|
|
@@ -109,7 +109,7 @@ var repository = {
|
|
|
109
109
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
110
110
|
return __generator(this, function (_b) {
|
|
111
111
|
switch (_b.label) {
|
|
112
|
-
case 0: return [4, client_1.default.post("".concat(route).concat(id, "/undo_encomenda_stock"))];
|
|
112
|
+
case 0: return [4, client_1.default.post("".concat(exports.route).concat(id, "/undo_encomenda_stock"))];
|
|
113
113
|
case 1:
|
|
114
114
|
_b.sent();
|
|
115
115
|
return [2];
|
|
@@ -120,7 +120,7 @@ var repository = {
|
|
|
120
120
|
undoProviderOrder: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
121
121
|
return __generator(this, function (_a) {
|
|
122
122
|
switch (_a.label) {
|
|
123
|
-
case 0: return [4, client_1.default.post("".concat(route, "undo_provider_order"), data)];
|
|
123
|
+
case 0: return [4, client_1.default.post("".concat(exports.route, "undo_provider_order"), data)];
|
|
124
124
|
case 1:
|
|
125
125
|
_a.sent();
|
|
126
126
|
return [2];
|
|
@@ -130,7 +130,7 @@ var repository = {
|
|
|
130
130
|
conferirEncomendaCliente: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
131
131
|
return __generator(this, function (_a) {
|
|
132
132
|
switch (_a.label) {
|
|
133
|
-
case 0: return [4, client_1.default.post("".concat(route, "check_client_order"), data)];
|
|
133
|
+
case 0: return [4, client_1.default.post("".concat(exports.route, "check_client_order"), data)];
|
|
134
134
|
case 1:
|
|
135
135
|
_a.sent();
|
|
136
136
|
return [2];
|
|
@@ -42,8 +42,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
42
42
|
exports.findProductHistory = exports.findProviderProducts = exports.findProviders = exports.route = void 0;
|
|
43
43
|
var types_1 = require("@nomalism-com/types");
|
|
44
44
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
45
|
-
var
|
|
46
|
-
exports.route = "".concat(
|
|
45
|
+
var stock_1 = require("../stock");
|
|
46
|
+
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath).concat(types_1.OrderManagement.Route, "/");
|
|
47
47
|
var repository = {
|
|
48
48
|
findProviders: function () {
|
|
49
49
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -41,9 +41,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
exports.getExportCurrentAccountUrl = exports.exportPayments = exports.findSettledMaterialEntranceByDate = exports.exportCurrentAccount = exports.updateDownloadedBatchNumber = exports.findPaymentBatches = exports.findPaymentsNotExported = exports.createProvidersPayments = exports.findSettledMaterialEntranceProviders = exports.findSettledMaterialEntrance = exports.findCurrentAccountByOwnerId = exports.deleteBatch = exports.findById = exports.findByOwnerId = exports.findPaginated = exports.find = exports.publicRoute = exports.route = void 0;
|
|
43
43
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
44
|
-
var
|
|
45
|
-
exports.route = "".concat(
|
|
46
|
-
exports.publicRoute = "".concat(
|
|
44
|
+
var stock_1 = require("../stock");
|
|
45
|
+
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath, "payment/");
|
|
46
|
+
exports.publicRoute = "".concat(stock_1.serviceHostname).concat(stock_1.servicePublicPath, "payment/");
|
|
47
47
|
var repository = {
|
|
48
48
|
find: function (params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
49
49
|
var response;
|
|
@@ -41,8 +41,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
exports.importToClientProposal = exports.findPending = exports.removePlot = exports.update = exports.create = exports.findById = exports.find = exports.route = void 0;
|
|
43
43
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
44
|
-
var
|
|
45
|
-
exports.route = "".concat(
|
|
44
|
+
var stock_1 = require("../stock");
|
|
45
|
+
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath, "pre_sale/");
|
|
46
46
|
var repository = {
|
|
47
47
|
find: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
48
|
var response;
|
|
@@ -41,8 +41,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
exports.findById = exports.find = exports.route = void 0;
|
|
43
43
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
44
|
-
var
|
|
45
|
-
exports.route = "".concat(
|
|
44
|
+
var stock_1 = require("../stock");
|
|
45
|
+
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath, "pre_sale_product/");
|
|
46
46
|
var repository = {
|
|
47
47
|
find: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
48
|
var response;
|
|
@@ -42,9 +42,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
42
42
|
exports.conflictFindByOwnerId = exports.conflictDelete = exports.conflictAccept = exports.createSheetFromDocument = exports.importFromSheet = exports.route = exports.IConflictEnum = void 0;
|
|
43
43
|
var types_1 = require("@nomalism-com/types");
|
|
44
44
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
45
|
-
var
|
|
45
|
+
var stock_1 = require("../stock");
|
|
46
46
|
exports.IConflictEnum = types_1.PropostaSheets.IConflictEnum;
|
|
47
|
-
exports.route = "".concat(
|
|
47
|
+
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath, "proposta_sheets/");
|
|
48
48
|
var repository = {
|
|
49
49
|
importFromSheet: function (params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
50
50
|
var response;
|
|
@@ -41,8 +41,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
exports.findByOwnerId = exports.route = void 0;
|
|
43
43
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
44
|
-
var
|
|
45
|
-
exports.route = "".concat(
|
|
44
|
+
var stock_1 = require("../stock");
|
|
45
|
+
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath, "provider_current_account/");
|
|
46
46
|
var repository = {
|
|
47
47
|
findByOwnerId: function (params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
48
|
var response;
|
|
@@ -4,4 +4,5 @@ export import IUnpaidMaterialEntranceLineResponse = Entity.IUnpaidMaterialEntran
|
|
|
4
4
|
export import IUnpaidMaterialEntranceItemResponse = Entity.IUnpaidMaterialEntranceItemResponse;
|
|
5
5
|
export import IPurchaseFromProviderRequest = Entity.IPurchaseFromProviderRequest;
|
|
6
6
|
export import IUnpaidMaterialEntranceResponse = Entity.IUnpaidMaterialEntranceResponse;
|
|
7
|
+
export declare const route: string;
|
|
7
8
|
export declare const findUnpaidMaterialEntrance: (selector: shared.IFindByIdRequest) => Promise<Entity.IUnpaidMaterialEntranceResponse>, findUnpaidMaterialEntranceProviders: () => Promise<shared.IFindMinifiedResponse[]>, purchaseFromProvider: (data: Entity.IPurchaseFromProviderRequest) => Promise<void>;
|
|
@@ -39,15 +39,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.purchaseFromProvider = exports.findUnpaidMaterialEntranceProviders = exports.findUnpaidMaterialEntrance = void 0;
|
|
42
|
+
exports.purchaseFromProvider = exports.findUnpaidMaterialEntranceProviders = exports.findUnpaidMaterialEntrance = exports.route = void 0;
|
|
43
43
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
44
|
-
var
|
|
45
|
-
|
|
44
|
+
var stock_1 = require("../stock");
|
|
45
|
+
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath, "purchase/");
|
|
46
46
|
var repository = {
|
|
47
47
|
purchaseFromProvider: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
48
|
return __generator(this, function (_a) {
|
|
49
49
|
switch (_a.label) {
|
|
50
|
-
case 0: return [4, client_1.default.post("".concat(route, "purchase_from_provider"), data)];
|
|
50
|
+
case 0: return [4, client_1.default.post("".concat(exports.route, "purchase_from_provider"), data)];
|
|
51
51
|
case 1:
|
|
52
52
|
_a.sent();
|
|
53
53
|
return [2];
|
|
@@ -58,7 +58,7 @@ var repository = {
|
|
|
58
58
|
var response;
|
|
59
59
|
return __generator(this, function (_a) {
|
|
60
60
|
switch (_a.label) {
|
|
61
|
-
case 0: return [4, client_1.default.get("".concat(route, "unpaid_material_entrance"), {
|
|
61
|
+
case 0: return [4, client_1.default.get("".concat(exports.route, "unpaid_material_entrance"), {
|
|
62
62
|
params: params,
|
|
63
63
|
})];
|
|
64
64
|
case 1:
|
|
@@ -71,7 +71,7 @@ var repository = {
|
|
|
71
71
|
var response;
|
|
72
72
|
return __generator(this, function (_a) {
|
|
73
73
|
switch (_a.label) {
|
|
74
|
-
case 0: return [4, client_1.default.get("".concat(route, "unpaid_material_entrance_providers"))];
|
|
74
|
+
case 0: return [4, client_1.default.get("".concat(exports.route, "unpaid_material_entrance_providers"))];
|
|
75
75
|
case 1:
|
|
76
76
|
response = _a.sent();
|
|
77
77
|
return [2, response.data];
|
|
@@ -41,8 +41,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
exports.findById = exports.route = void 0;
|
|
43
43
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
44
|
-
var
|
|
45
|
-
exports.route = "".concat(
|
|
44
|
+
var stock_1 = require("../stock");
|
|
45
|
+
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath, "start_document_header_last_update/");
|
|
46
46
|
var repository = {
|
|
47
47
|
findById: function (selector) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
48
|
var response;
|
|
@@ -41,8 +41,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
exports.findByLatest = exports.route = void 0;
|
|
43
43
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
44
|
-
var
|
|
45
|
-
exports.route = "".concat(
|
|
44
|
+
var stock_1 = require("../stock");
|
|
45
|
+
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath, "vat_validation/");
|
|
46
46
|
var repository = {
|
|
47
47
|
findByLatest: function (nif) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
48
|
var response;
|
|
@@ -41,8 +41,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
exports.deleteOne = exports.update = exports.create = exports.findByOwnerId = exports.find = exports.route = void 0;
|
|
43
43
|
var client_1 = __importDefault(require("../../shared/client"));
|
|
44
|
-
var
|
|
45
|
-
exports.route = "".concat(
|
|
44
|
+
var stock_1 = require("../stock");
|
|
45
|
+
exports.route = "".concat(stock_1.serviceHostname).concat(stock_1.serviceAuthPath, "workflow/");
|
|
46
46
|
var repository = {
|
|
47
47
|
find: function (params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
48
|
var response;
|
package/package.json
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@nomalism-com/api",
|
|
3
|
-
"description": "A nomalism API package for performing HTTP requests on API endpoints",
|
|
4
|
-
"author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"nomalism",
|
|
7
|
-
"api",
|
|
8
|
-
"types",
|
|
9
|
-
"typescript",
|
|
10
|
-
"helper"
|
|
11
|
-
],
|
|
12
|
-
"version": "0.8.
|
|
13
|
-
"main": "dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
],
|
|
18
|
-
"license": "UNLICENSED",
|
|
19
|
-
"homepage": "https://gitlab.com/nomalism-develop/api",
|
|
20
|
-
"bugs": {
|
|
21
|
-
"url": "https://gitlab.com/nomalism-develop/api/issues"
|
|
22
|
-
},
|
|
23
|
-
"repository": {
|
|
24
|
-
"type": "git",
|
|
25
|
-
"url": "git+https://gitlab.com/nomalism-develop/api.git"
|
|
26
|
-
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"lint": "eslint src --ext .ts,.js --ignore-pattern node_modules --ignore-pattern dist --cache",
|
|
29
|
-
"build": "rm -rf dist && tsc --project tsconfig.json",
|
|
30
|
-
"start": "tsx --tsconfig ./tsconfig.json src/index.ts",
|
|
31
|
-
"prepack": "concurrently --success all \"npm run lint\" \"npm run build\" \"npm run start\""
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@types/convert-units": "^2.3.5",
|
|
35
|
-
"@types/node": "^18.16.
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^5.59.6",
|
|
37
|
-
"@typescript-eslint/parser": "^5.59.6",
|
|
38
|
-
"concurrently": "^8.0.1",
|
|
39
|
-
"eslint": "^8.40.0",
|
|
40
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
41
|
-
"eslint-config-prettier": "^8.8.0",
|
|
42
|
-
"eslint-import-resolver-typescript": "^3.5.5",
|
|
43
|
-
"eslint-plugin-import": "^2.27.5",
|
|
44
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
45
|
-
"prettier": "^2.8.8",
|
|
46
|
-
"tsx": "^3.12.7",
|
|
47
|
-
"typescript": "^5.0.4"
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@nomalism-com/types": "^0.9.
|
|
51
|
-
"axios": "^0.27.2"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@nomalism-com/api",
|
|
3
|
+
"description": "A nomalism API package for performing HTTP requests on API endpoints",
|
|
4
|
+
"author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"nomalism",
|
|
7
|
+
"api",
|
|
8
|
+
"types",
|
|
9
|
+
"typescript",
|
|
10
|
+
"helper"
|
|
11
|
+
],
|
|
12
|
+
"version": "0.8.284",
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"license": "UNLICENSED",
|
|
19
|
+
"homepage": "https://gitlab.com/nomalism-develop/api",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://gitlab.com/nomalism-develop/api/issues"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://gitlab.com/nomalism-develop/api.git"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"lint": "eslint src --ext .ts,.js --ignore-pattern node_modules --ignore-pattern dist --cache",
|
|
29
|
+
"build": "rm -rf dist && tsc --project tsconfig.json",
|
|
30
|
+
"start": "tsx --tsconfig ./tsconfig.json src/index.ts",
|
|
31
|
+
"prepack": "concurrently --success all \"npm run lint\" \"npm run build\" \"npm run start\""
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/convert-units": "^2.3.5",
|
|
35
|
+
"@types/node": "^18.16.13",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^5.59.6",
|
|
37
|
+
"@typescript-eslint/parser": "^5.59.6",
|
|
38
|
+
"concurrently": "^8.0.1",
|
|
39
|
+
"eslint": "^8.40.0",
|
|
40
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
41
|
+
"eslint-config-prettier": "^8.8.0",
|
|
42
|
+
"eslint-import-resolver-typescript": "^3.5.5",
|
|
43
|
+
"eslint-plugin-import": "^2.27.5",
|
|
44
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
45
|
+
"prettier": "^2.8.8",
|
|
46
|
+
"tsx": "^3.12.7",
|
|
47
|
+
"typescript": "^5.0.4"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@nomalism-com/types": "^0.9.366",
|
|
51
|
+
"axios": "^0.27.2"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TopMenu as Entity } from '@nomalism-com/types';
|
|
2
|
-
export import IFindByEntityRequest = Entity.IFindByEntityRequest;
|
|
3
|
-
export import IFindByEntityResponse = Entity.IFindByEntityResponse;
|
|
4
|
-
export declare const route: string;
|
|
5
|
-
export declare const findByEntity: (data: Entity.IFindByEntityRequest) => Promise<Entity.IFindByEntityResponse>;
|
|
@@ -1,61 +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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.findByEntity = exports.route = void 0;
|
|
43
|
-
var client_1 = __importDefault(require("../../shared/client"));
|
|
44
|
-
var _1 = require(".");
|
|
45
|
-
exports.route = "".concat(_1.serviceHostname).concat(_1.serviceAuthPath, "nav_top/");
|
|
46
|
-
var repository = {
|
|
47
|
-
findByEntity: function (params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
|
-
var response;
|
|
49
|
-
return __generator(this, function (_a) {
|
|
50
|
-
switch (_a.label) {
|
|
51
|
-
case 0: return [4, client_1.default.get("".concat(exports.route), {
|
|
52
|
-
params: params,
|
|
53
|
-
})];
|
|
54
|
-
case 1:
|
|
55
|
-
response = _a.sent();
|
|
56
|
-
return [2, response.data];
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}); },
|
|
60
|
-
};
|
|
61
|
-
exports.findByEntity = repository.findByEntity;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { shared, WebsiteRequest as Entity } from '@nomalism-com/types';
|
|
2
|
-
export import IState = Entity.IState;
|
|
3
|
-
export import IFindByStateRequest = Entity.IFindByStateRequest;
|
|
4
|
-
export import IFindByStateResponse = Entity.IFindByStateResponse;
|
|
5
|
-
export import IFindOneResponse = Entity.IFindOneResponse;
|
|
6
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
7
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
8
|
-
export import IEntity = Entity.Entity;
|
|
9
|
-
export declare const route: string;
|
|
10
|
-
export declare const findByState: (data: Entity.IFindByStateRequest) => Promise<Entity.IFindByStateResponse[]>, findById: (selector: shared.IFindByIdRequest) => Promise<Entity.IFindOneResponse | null>, create: (data: Entity.ICreateRequest) => Promise<Entity.IFindOneResponse>, update: (selector: shared.IFindByIdRequest, data: Entity.IUpdateRequest) => Promise<Entity.IFindOneResponse | null>;
|
|
@@ -1,96 +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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.update = exports.create = exports.findById = exports.findByState = exports.route = exports.IState = void 0;
|
|
43
|
-
var types_1 = require("@nomalism-com/types");
|
|
44
|
-
var client_1 = __importDefault(require("../../shared/client"));
|
|
45
|
-
var _1 = require(".");
|
|
46
|
-
exports.IState = types_1.WebsiteRequest.IState;
|
|
47
|
-
exports.route = "".concat(_1.serviceHostname).concat(_1.serviceAuthPath, "website_request/");
|
|
48
|
-
var repository = {
|
|
49
|
-
findByState: function (params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
50
|
-
var response;
|
|
51
|
-
return __generator(this, function (_a) {
|
|
52
|
-
switch (_a.label) {
|
|
53
|
-
case 0: return [4, client_1.default.get("".concat(exports.route), {
|
|
54
|
-
params: params,
|
|
55
|
-
})];
|
|
56
|
-
case 1:
|
|
57
|
-
response = _a.sent();
|
|
58
|
-
return [2, response.data];
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}); },
|
|
62
|
-
findById: function (selector) { return __awaiter(void 0, void 0, void 0, function () {
|
|
63
|
-
var response;
|
|
64
|
-
return __generator(this, function (_a) {
|
|
65
|
-
switch (_a.label) {
|
|
66
|
-
case 0: return [4, client_1.default.get("".concat(exports.route).concat(selector.id))];
|
|
67
|
-
case 1:
|
|
68
|
-
response = _a.sent();
|
|
69
|
-
return [2, response.data];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}); },
|
|
73
|
-
create: function (data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
74
|
-
var response;
|
|
75
|
-
return __generator(this, function (_a) {
|
|
76
|
-
switch (_a.label) {
|
|
77
|
-
case 0: return [4, client_1.default.post("".concat(exports.route), data)];
|
|
78
|
-
case 1:
|
|
79
|
-
response = _a.sent();
|
|
80
|
-
return [2, response.data];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}); },
|
|
84
|
-
update: function (selector, data) { return __awaiter(void 0, void 0, void 0, function () {
|
|
85
|
-
var response;
|
|
86
|
-
return __generator(this, function (_a) {
|
|
87
|
-
switch (_a.label) {
|
|
88
|
-
case 0: return [4, client_1.default.put("".concat(exports.route).concat(selector.id), data)];
|
|
89
|
-
case 1:
|
|
90
|
-
response = _a.sent();
|
|
91
|
-
return [2, response.data];
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}); },
|
|
95
|
-
};
|
|
96
|
-
exports.findByState = repository.findByState, exports.findById = repository.findById, exports.create = repository.create, exports.update = repository.update;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|