@nomalism-com/api 0.16.1 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/document/order.d.ts +2 -2
- package/dist/modules/document/order.js +2 -2
- package/dist/modules/document/returnToProvider.d.ts +7 -7
- package/dist/modules/document/returnToProvider.js +5 -5
- package/dist/modules/stock/prison.d.ts +10 -10
- package/dist/modules/stock/prison.js +7 -7
- package/dist/modules/stock/product.d.ts +0 -1
- package/dist/modules/stock/product.js +0 -13
- package/dist/modules/supply/documentHeader.d.ts +1 -1
- package/dist/modules/supply/documentHeader.js +2 -2
- package/dist/modules/supply/preSale.d.ts +4 -4
- package/dist/modules/supply/preSale.js +2 -2
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ export import IConferirEncomendaClienteResponse = Entity.IConferirEncomendaClien
|
|
|
7
7
|
export import IFindStockToOrderResponse = Entity.IFindStockToOrderResponse;
|
|
8
8
|
export import IFindStockToOrderRequest = Entity.IFindStockToOrderRequest;
|
|
9
9
|
export import ISetProviderRequest = Entity.ISetProviderRequest;
|
|
10
|
-
export import
|
|
10
|
+
export import IUnsetCativado = Entity.IUnsetCativado;
|
|
11
11
|
export declare const ConferirEncomendaClienteOptionsEnum: {
|
|
12
12
|
'Por Confirmar': "Por Confirmar";
|
|
13
13
|
'Espera Info Cliente': "Espera Info Cliente";
|
|
@@ -41,7 +41,7 @@ export default class Repository implements Entity.IRepository {
|
|
|
41
41
|
publicRoute: string;
|
|
42
42
|
private api;
|
|
43
43
|
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
44
|
-
|
|
44
|
+
unsetCativado(params: IUnsetCativado): Promise<void>;
|
|
45
45
|
findStockToOrder(params: IFindStockToOrderRequest): Promise<IFindStockToOrderResponse[]>;
|
|
46
46
|
findProvidersWithStockToOrder(): Promise<shared.IFindMinifiedResponse[]>;
|
|
47
47
|
undoEncomendaVA(selector: shared.IFindByIdRequest): Promise<void>;
|
|
@@ -46,12 +46,12 @@ var Repository = (function () {
|
|
|
46
46
|
this.route = route;
|
|
47
47
|
this.publicRoute = publicRoute;
|
|
48
48
|
}
|
|
49
|
-
Repository.prototype.
|
|
49
|
+
Repository.prototype.unsetCativado = function (params) {
|
|
50
50
|
return __awaiter(this, void 0, void 0, function () {
|
|
51
51
|
var response;
|
|
52
52
|
return __generator(this, function (_a) {
|
|
53
53
|
switch (_a.label) {
|
|
54
|
-
case 0: return [4, this.api.post("".concat(this.route, "
|
|
54
|
+
case 0: return [4, this.api.post("".concat(this.route, "unset_cativado"), {
|
|
55
55
|
params: params,
|
|
56
56
|
})];
|
|
57
57
|
case 1:
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { shared, ReturnToProvider as Entity } from '@nomalism-com/types';
|
|
2
2
|
import { IModuleConstructor } from '../..';
|
|
3
3
|
export import IFindOptionalByOwnerIdRequest = shared.IFindOptionalByOwnerIdRequest;
|
|
4
|
-
export import
|
|
5
|
-
export import
|
|
6
|
-
export import
|
|
7
|
-
export import
|
|
4
|
+
export import IFindLinesToReturnResponse = Entity.IFindLinesToReturnResponse;
|
|
5
|
+
export import ICheckLinesToReturnOptions = Entity.ICheckLinesToReturnOptions;
|
|
6
|
+
export import ICheckLinesToReturnLinesRequest = Entity.ICheckLinesToReturnLinesRequest;
|
|
7
|
+
export import ICheckLinesToReturnRequest = Entity.ICheckLinesToReturnRequest;
|
|
8
8
|
export default class Repository implements Entity.IApi {
|
|
9
9
|
route: string;
|
|
10
10
|
publicRoute: string;
|
|
11
11
|
private api;
|
|
12
12
|
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
findLinesToReturn(params: IFindOptionalByOwnerIdRequest): Promise<IFindLinesToReturnResponse[]>;
|
|
14
|
+
findLinesToReturnProviders(): Promise<shared.IFindMinifiedResponse[]>;
|
|
15
|
+
checkLinesToReturn(data: ICheckLinesToReturnRequest): Promise<void>;
|
|
16
16
|
}
|
|
@@ -43,12 +43,12 @@ var Repository = (function () {
|
|
|
43
43
|
this.route = route;
|
|
44
44
|
this.publicRoute = publicRoute;
|
|
45
45
|
}
|
|
46
|
-
Repository.prototype.
|
|
46
|
+
Repository.prototype.findLinesToReturn = function (params) {
|
|
47
47
|
return __awaiter(this, void 0, void 0, function () {
|
|
48
48
|
var response;
|
|
49
49
|
return __generator(this, function (_a) {
|
|
50
50
|
switch (_a.label) {
|
|
51
|
-
case 0: return [4, this.api.get("".concat(this.route, "
|
|
51
|
+
case 0: return [4, this.api.get("".concat(this.route, "lines_to_return"), {
|
|
52
52
|
params: params,
|
|
53
53
|
})];
|
|
54
54
|
case 1:
|
|
@@ -58,12 +58,12 @@ var Repository = (function () {
|
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
|
-
Repository.prototype.
|
|
61
|
+
Repository.prototype.findLinesToReturnProviders = function () {
|
|
62
62
|
return __awaiter(this, void 0, void 0, function () {
|
|
63
63
|
var response;
|
|
64
64
|
return __generator(this, function (_a) {
|
|
65
65
|
switch (_a.label) {
|
|
66
|
-
case 0: return [4, this.api.get("".concat(this.route, "
|
|
66
|
+
case 0: return [4, this.api.get("".concat(this.route, "lines_to_return_providers"))];
|
|
67
67
|
case 1:
|
|
68
68
|
response = _a.sent();
|
|
69
69
|
return [2, response.data];
|
|
@@ -71,7 +71,7 @@ var Repository = (function () {
|
|
|
71
71
|
});
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
|
-
Repository.prototype.
|
|
74
|
+
Repository.prototype.checkLinesToReturn = function (data) {
|
|
75
75
|
return __awaiter(this, void 0, void 0, function () {
|
|
76
76
|
return __generator(this, function (_a) {
|
|
77
77
|
switch (_a.label) {
|
|
@@ -2,19 +2,19 @@ import { shared, Prison as Entity } from '@nomalism-com/types';
|
|
|
2
2
|
import { IModuleConstructor } from '../..';
|
|
3
3
|
export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
|
|
4
4
|
export import IFindByIdRequest = shared.IFindByIdRequest;
|
|
5
|
-
export import
|
|
6
|
-
export import
|
|
7
|
-
export import
|
|
8
|
-
export import
|
|
9
|
-
export declare const
|
|
5
|
+
export import IFindLinesInPrisonResponse = Entity.IFindLinesInPrisonResponse;
|
|
6
|
+
export import ICheckLineInPrisonOptions = Entity.ICheckLineInPrisonOptions;
|
|
7
|
+
export import ICheckLinesInPrisonLinesRequest = Entity.ICheckLinesInPrisonLinesRequest;
|
|
8
|
+
export import ICheckLinesInPrisonRequest = Entity.ICheckLinesInPrisonRequest;
|
|
9
|
+
export declare const checkLineInPrisonOptions: readonly ["Por confirmar", "Devolver a stock", "Quebrar", "Devolver a fornecedor"];
|
|
10
10
|
export default class Repository implements Entity.IApi {
|
|
11
11
|
route: string;
|
|
12
12
|
publicRoute: string;
|
|
13
13
|
private api;
|
|
14
14
|
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
putLineInPrison(data: IFindByIdRequest): Promise<void>;
|
|
16
|
+
removeLineFromPrison(data: IFindByIdRequest): Promise<void>;
|
|
17
|
+
findLinesInPrison(): Promise<IFindLinesInPrisonResponse[]>;
|
|
18
|
+
findLinesInPrisonProviders(): Promise<shared.IFindMinifiedResponse[]>;
|
|
19
|
+
checkLinesInPrison(data: ICheckLinesInPrisonRequest): Promise<void>;
|
|
20
20
|
}
|
|
@@ -36,9 +36,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.checkLineInPrisonOptions = void 0;
|
|
40
40
|
var types_1 = require("@nomalism-com/types");
|
|
41
|
-
exports.
|
|
41
|
+
exports.checkLineInPrisonOptions = types_1.Prison.checkLineInPrisonOptions;
|
|
42
42
|
var Repository = (function () {
|
|
43
43
|
function Repository(_a) {
|
|
44
44
|
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
@@ -46,7 +46,7 @@ var Repository = (function () {
|
|
|
46
46
|
this.route = route;
|
|
47
47
|
this.publicRoute = publicRoute;
|
|
48
48
|
}
|
|
49
|
-
Repository.prototype.
|
|
49
|
+
Repository.prototype.putLineInPrison = function (data) {
|
|
50
50
|
return __awaiter(this, void 0, void 0, function () {
|
|
51
51
|
var response;
|
|
52
52
|
return __generator(this, function (_a) {
|
|
@@ -59,7 +59,7 @@ var Repository = (function () {
|
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
|
-
Repository.prototype.
|
|
62
|
+
Repository.prototype.removeLineFromPrison = function (data) {
|
|
63
63
|
return __awaiter(this, void 0, void 0, function () {
|
|
64
64
|
var response;
|
|
65
65
|
return __generator(this, function (_a) {
|
|
@@ -72,7 +72,7 @@ var Repository = (function () {
|
|
|
72
72
|
});
|
|
73
73
|
});
|
|
74
74
|
};
|
|
75
|
-
Repository.prototype.
|
|
75
|
+
Repository.prototype.findLinesInPrison = function () {
|
|
76
76
|
return __awaiter(this, void 0, void 0, function () {
|
|
77
77
|
var response;
|
|
78
78
|
return __generator(this, function (_a) {
|
|
@@ -85,7 +85,7 @@ var Repository = (function () {
|
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
};
|
|
88
|
-
Repository.prototype.
|
|
88
|
+
Repository.prototype.findLinesInPrisonProviders = function () {
|
|
89
89
|
return __awaiter(this, void 0, void 0, function () {
|
|
90
90
|
var response;
|
|
91
91
|
return __generator(this, function (_a) {
|
|
@@ -98,7 +98,7 @@ var Repository = (function () {
|
|
|
98
98
|
});
|
|
99
99
|
});
|
|
100
100
|
};
|
|
101
|
-
Repository.prototype.
|
|
101
|
+
Repository.prototype.checkLinesInPrison = function (data) {
|
|
102
102
|
return __awaiter(this, void 0, void 0, function () {
|
|
103
103
|
return __generator(this, function (_a) {
|
|
104
104
|
switch (_a.label) {
|
|
@@ -42,7 +42,6 @@ export default class Repository implements Entity.IApi {
|
|
|
42
42
|
findByProductType(params: IFindByProductTypeRequest): Promise<IFindByProductTypeResponse[]>;
|
|
43
43
|
findById(selector: shared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
44
44
|
googleSheetsFieldsByRef(params: IFindByReferenceRequest): Promise<string>;
|
|
45
|
-
findByPlot(selector: shared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
46
45
|
findOrCreateProductionProduct(body: IFindOrCreateProductionProductRequest): Promise<IFindResponse>;
|
|
47
46
|
create(body: ICreateRequest): Promise<IFindResponse>;
|
|
48
47
|
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IFindResponse | null>;
|
|
@@ -174,19 +174,6 @@ var Repository = (function () {
|
|
|
174
174
|
});
|
|
175
175
|
});
|
|
176
176
|
};
|
|
177
|
-
Repository.prototype.findByPlot = function (selector) {
|
|
178
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
179
|
-
var response;
|
|
180
|
-
return __generator(this, function (_a) {
|
|
181
|
-
switch (_a.label) {
|
|
182
|
-
case 0: return [4, this.api.get("".concat(this.route, "plot/").concat(selector.id))];
|
|
183
|
-
case 1:
|
|
184
|
-
response = _a.sent();
|
|
185
|
-
return [2, response.data];
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
177
|
Repository.prototype.findOrCreateProductionProduct = function (body) {
|
|
191
178
|
return __awaiter(this, void 0, void 0, function () {
|
|
192
179
|
var response;
|
|
@@ -59,7 +59,7 @@ export default class Repository implements Entity.IApi {
|
|
|
59
59
|
create(body: ICreateRequest): Promise<IEntity>;
|
|
60
60
|
createFromHeader(body: ICreateFromHeaderRequest): Promise<ITaskCluster[]>;
|
|
61
61
|
createProductionOrder(body: ICreateProductionOrderRequest): Promise<void>;
|
|
62
|
-
|
|
62
|
+
createFromLines(body: ICreateFromLinesRequest): Promise<shared.IBrokerMessage<shared.IBrokerTopic>[]>;
|
|
63
63
|
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IEntity>;
|
|
64
64
|
deleteOne(selector: shared.IFindByIdRequest): Promise<void>;
|
|
65
65
|
getActions(selector: shared.IFindByIdRequest): Promise<IGetActionsResponse[]>;
|
|
@@ -238,12 +238,12 @@ var Repository = (function () {
|
|
|
238
238
|
});
|
|
239
239
|
});
|
|
240
240
|
};
|
|
241
|
-
Repository.prototype.
|
|
241
|
+
Repository.prototype.createFromLines = function (body) {
|
|
242
242
|
return __awaiter(this, void 0, void 0, function () {
|
|
243
243
|
var response;
|
|
244
244
|
return __generator(this, function (_a) {
|
|
245
245
|
switch (_a.label) {
|
|
246
|
-
case 0: return [4, this.api.post("".concat(this.route, "
|
|
246
|
+
case 0: return [4, this.api.post("".concat(this.route, "from_lines"), body)];
|
|
247
247
|
case 1:
|
|
248
248
|
response = _a.sent();
|
|
249
249
|
return [2, response.data];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { shared, PreSale as Entity } from '@nomalism-com/types';
|
|
2
2
|
import { IModuleConstructor } from '../..';
|
|
3
3
|
export import IFindResponse = Entity.IFindResponse;
|
|
4
|
-
export import
|
|
4
|
+
export import IFindResponseWithCount = Entity.IFindResponseWithCount;
|
|
5
5
|
export import ICreateRequest = Entity.ICreateRequest;
|
|
6
6
|
export import IProductMinified = Entity.IProductMinified;
|
|
7
7
|
export import IEntityExtended = Entity.IEntityExtended;
|
|
8
8
|
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
9
9
|
export import IUpdatePreSaleQuantityRequest = Entity.IUpdatePreSaleQuantityRequest;
|
|
10
|
-
export import
|
|
10
|
+
export import IRemovePreSaleProductRequest = Entity.IRemovePreSaleProductRequest;
|
|
11
11
|
export import IImportToClientProposalRequest = Entity.IImportToClientProposalRequest;
|
|
12
12
|
export import IPreSaleFindByUser = Entity.IPreSaleFindByUser;
|
|
13
13
|
export type IPaginationResponse = shared.IPaginationResponse<Entity.IFindResponse>;
|
|
@@ -16,12 +16,12 @@ export default class Repository implements Entity.IRepository {
|
|
|
16
16
|
publicRoute: string;
|
|
17
17
|
private api;
|
|
18
18
|
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
19
|
-
find(selector: Entity.IPreSaleFindByUser): Promise<
|
|
19
|
+
find(selector: Entity.IPreSaleFindByUser): Promise<IFindResponseWithCount[]>;
|
|
20
20
|
findById(selector: shared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
21
21
|
findPending(): Promise<IEntityExtended[]>;
|
|
22
22
|
create(body: ICreateRequest): Promise<IFindResponse>;
|
|
23
23
|
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IFindResponse | null>;
|
|
24
24
|
updatePreSaleQuantity(selector: shared.IFindByIdRequest, body: IUpdatePreSaleQuantityRequest): Promise<IFindResponse | null>;
|
|
25
|
-
|
|
25
|
+
removeProduct(selector: shared.IFindByIdRequest, body: IRemovePreSaleProductRequest): Promise<void>;
|
|
26
26
|
importToClientProposal(data: IImportToClientProposalRequest): Promise<void>;
|
|
27
27
|
}
|
|
@@ -121,12 +121,12 @@ var Repository = (function () {
|
|
|
121
121
|
});
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
-
Repository.prototype.
|
|
124
|
+
Repository.prototype.removeProduct = function (selector, body) {
|
|
125
125
|
return __awaiter(this, void 0, void 0, function () {
|
|
126
126
|
var response;
|
|
127
127
|
return __generator(this, function (_a) {
|
|
128
128
|
switch (_a.label) {
|
|
129
|
-
case 0: return [4, this.api.put("".concat(this.route, "
|
|
129
|
+
case 0: return [4, this.api.put("".concat(this.route, "product/").concat(selector.id), body)];
|
|
130
130
|
case 1:
|
|
131
131
|
response = _a.sent();
|
|
132
132
|
return [2, response.data];
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"typescript",
|
|
10
10
|
"helper"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.16.
|
|
12
|
+
"version": "0.16.2",
|
|
13
13
|
"main": "dist/index.js",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"files": [
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"typescript": "^5.3.3"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@nomalism-com/types": "^0.16.
|
|
50
|
+
"@nomalism-com/types": "^0.16.4",
|
|
51
51
|
"axios": "^0.27.2"
|
|
52
52
|
}
|
|
53
53
|
}
|