@nomalism-com/types 0.18.5 → 0.18.7
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 -0
- package/package.json +9 -5
- package/dist/index.js +0 -545
- package/dist/modules/document/inventario/interface.js +0 -6
- package/dist/modules/document/inventario/route.schema.js +0 -20
- package/dist/modules/document/materialEntrance/interfaces.js +0 -23
- package/dist/modules/document/materialEntrance/route.schema.js +0 -48
- package/dist/modules/document/order/interfaces.js +0 -33
- package/dist/modules/document/order/route.schema.js +0 -56
- package/dist/modules/document/propostaSheets/interface.js +0 -11
- package/dist/modules/document/propostaSheets/route.schema.js +0 -15
- package/dist/modules/document/purchase/interfaces.js +0 -6
- package/dist/modules/document/purchase/route.schema.js +0 -33
- package/dist/modules/document/quebra/interfaces.js +0 -6
- package/dist/modules/document/quebra/route.schema.js +0 -24
- package/dist/modules/document/returnToProvider/interface.js +0 -13
- package/dist/modules/document/returnToProvider/route.schema.js +0 -27
- package/dist/modules/document/transformado/interfaces.js +0 -6
- package/dist/modules/document/transformado/route.schema.js +0 -26
- package/dist/modules/document/upfrontReturn/interfaces.js +0 -6
- package/dist/modules/document/upfrontReturn/route.schema.js +0 -12
- package/dist/modules/documentManagement/multimedia/interfaces.js +0 -6
- package/dist/modules/documentManagement/multimedia/route.schema.js +0 -15
- package/dist/modules/integration/emailLog/interfaces.js +0 -6
- package/dist/modules/integration/emailLog/route.schema.js +0 -15
- package/dist/modules/integration/emailTemplate/interfaces.js +0 -6
- package/dist/modules/integration/emailTemplate/route.schema.js +0 -81
- package/dist/modules/integration/emailTemplateAttachment/interfaces.js +0 -6
- package/dist/modules/integration/emailTemplateAttachment/route.schema.js +0 -14
- package/dist/modules/integration/errorHandler/interfaces.js +0 -6
- package/dist/modules/integration/errorHandler/route.schema.js +0 -23
- package/dist/modules/integration/field/interfaces.js +0 -26
- package/dist/modules/integration/field/route.schema.js +0 -31
- package/dist/modules/integration/fieldGroup/interfaces.js +0 -12
- package/dist/modules/integration/fieldGroup/route.schema.js +0 -30
- package/dist/modules/integration/file/interface.js +0 -6
- package/dist/modules/integration/file/route.schema.js +0 -15
- package/dist/modules/integration/googleFilePermission/interfaces.js +0 -6
- package/dist/modules/integration/googleFilePermission/route.schema.js +0 -16
- package/dist/modules/integration/googleSheets/interfaces.js +0 -6
- package/dist/modules/integration/googleSheets/route.schema.js +0 -63
- package/dist/modules/integration/history/interfaces.js +0 -24
- package/dist/modules/integration/history/route.schema.js +0 -18
- package/dist/modules/integration/observation/interfaces.js +0 -6
- package/dist/modules/integration/observation/route.schema.js +0 -29
- package/dist/modules/integration/observationType/interfaces.js +0 -6
- package/dist/modules/integration/observationType/route.schema.js +0 -16
- package/dist/modules/integration/projectInfo/interfaces.js +0 -12
- package/dist/modules/integration/projectInfo/route.schema.js +0 -23
- package/dist/modules/integration/settings/interfaces.js +0 -6
- package/dist/modules/integration/settings/route.schema.js +0 -22
- package/dist/modules/print/npc/interfaces.js +0 -6
- package/dist/modules/print/npc/route.schema.js +0 -13
- package/dist/modules/print/printer/interfaces.js +0 -6
- package/dist/modules/print/printer/route.schema.js +0 -23
- package/dist/modules/print/schedulePrintJob/interfaces.js +0 -6
- package/dist/modules/print/schedulePrintJob/route.schema.js +0 -30
- package/dist/modules/stock/attribute/interfaces.js +0 -14
- package/dist/modules/stock/attribute/route.schema.js +0 -40
- package/dist/modules/stock/attributeValue/interfaces.js +0 -6
- package/dist/modules/stock/attributeValue/route.schema.js +0 -28
- package/dist/modules/stock/color/interfaces.js +0 -6
- package/dist/modules/stock/color/route.schema.js +0 -28
- package/dist/modules/stock/composition/interfaces.js +0 -6
- package/dist/modules/stock/composition/route.schema.js +0 -30
- package/dist/modules/stock/compositionMaterial/interfaces.js +0 -6
- package/dist/modules/stock/compositionMaterial/route.schema.js +0 -26
- package/dist/modules/stock/location/interface.js +0 -6
- package/dist/modules/stock/location/route.schema.js +0 -54
- package/dist/modules/stock/maintenance/interface.js +0 -6
- package/dist/modules/stock/maintenance/route.schema.js +0 -30
- package/dist/modules/stock/maintenanceAssoc/interface.js +0 -6
- package/dist/modules/stock/maintenanceAssoc/route.schema.js +0 -28
- package/dist/modules/stock/maintenancePreset/interfaces.js +0 -6
- package/dist/modules/stock/maintenancePreset/route.schema.js +0 -24
- package/dist/modules/stock/maintenancePresetAssoc/interfaces.js +0 -6
- package/dist/modules/stock/maintenancePresetAssoc/route.schema.js +0 -22
- package/dist/modules/stock/maintenanceType/interface.js +0 -6
- package/dist/modules/stock/maintenanceType/route.schema.js +0 -26
- package/dist/modules/stock/primaryColor/interface.js +0 -6
- package/dist/modules/stock/primaryColor/route.schema.js +0 -26
- package/dist/modules/stock/prison/interface.js +0 -12
- package/dist/modules/stock/prison/route.schema.js +0 -43
- package/dist/modules/stock/product/interface.js +0 -16
- package/dist/modules/stock/product/route.schema.js +0 -171
- package/dist/modules/stock/productAttribute/interface.js +0 -6
- package/dist/modules/stock/productAttribute/route.schema.js +0 -30
- package/dist/modules/stock/productCategory/interface.js +0 -6
- package/dist/modules/stock/productCategory/route.schema.js +0 -26
- package/dist/modules/stock/productColor/interface.js +0 -6
- package/dist/modules/stock/productColor/route.schema.js +0 -29
- package/dist/modules/stock/productImage/interface.js +0 -11
- package/dist/modules/stock/productImage/route.schema.js +0 -38
- package/dist/modules/stock/productName/interface.js +0 -6
- package/dist/modules/stock/productName/route.schema.js +0 -26
- package/dist/modules/stock/productNamePreset/interface.js +0 -6
- package/dist/modules/stock/productNamePreset/route.schema.js +0 -26
- package/dist/modules/stock/productPart/interface.js +0 -6
- package/dist/modules/stock/productPart/route.schema.js +0 -28
- package/dist/modules/stock/productSubCategory/interface.js +0 -6
- package/dist/modules/stock/productSubCategory/route.schema.js +0 -30
- package/dist/modules/stock/productUse/interface.js +0 -6
- package/dist/modules/stock/productUse/route.schema.js +0 -26
- package/dist/modules/stock/productUseAssoc/interface.js +0 -6
- package/dist/modules/stock/productUseAssoc/route.schema.js +0 -27
- package/dist/modules/stock/promotion/interface.js +0 -6
- package/dist/modules/stock/promotion/route.schema.js +0 -56
- package/dist/modules/stock/promotionAssoc/interface.js +0 -6
- package/dist/modules/stock/promotionAssoc/route.schema.js +0 -32
- package/dist/modules/stock/queryList/interfaces.js +0 -7
- package/dist/modules/stock/queryList/route.schema.js +0 -35
- package/dist/modules/stock/queryParameter/interfaces.js +0 -17
- package/dist/modules/stock/queryParameter/route.schema.js +0 -35
- package/dist/modules/stock/returnReason/interfaces.js +0 -6
- package/dist/modules/stock/returnReason/route.schema.js +0 -16
- package/dist/modules/stock/savedEmPicking/interfaces.js +0 -6
- package/dist/modules/stock/savedEmPicking/route.schema.js +0 -85
- package/dist/modules/stock/savedProviderProposal/interfaces.js +0 -6
- package/dist/modules/stock/savedProviderProposal/route.schema.js +0 -18
- package/dist/modules/stock/similarProduct/interface.js +0 -6
- package/dist/modules/stock/similarProduct/route.schema.js +0 -28
- package/dist/modules/stock/stockMovement/interface.js +0 -16
- package/dist/modules/stock/stockMovement/route.schema.js +0 -24
- package/dist/modules/stock/typeOfInventory/interface.js +0 -6
- package/dist/modules/stock/typeOfInventory/route.schema.js +0 -28
- package/dist/modules/stock/typeOfLocation/interface.js +0 -6
- package/dist/modules/stock/typeOfLocation/route.schema.js +0 -26
- package/dist/modules/stock/unitOfMeasure/interface.js +0 -6
- package/dist/modules/stock/unitOfMeasure/route.schema.js +0 -40
- package/dist/modules/stock/vatTax/interface.js +0 -6
- package/dist/modules/stock/vatTax/route.schema.js +0 -28
- package/dist/modules/stock/vatTaxZone/interface.js +0 -6
- package/dist/modules/stock/vatTaxZone/route.schema.js +0 -37
- package/dist/modules/stock/vatValidation/interfaces.js +0 -6
- package/dist/modules/stock/vatValidation/route.schema.js +0 -15
- package/dist/modules/stock/workflow/interfaces.js +0 -6
- package/dist/modules/stock/workflow/route.schema.js +0 -39
- package/dist/modules/supply/cabide/interface.js +0 -18
- package/dist/modules/supply/cabide/route.schema.js +0 -77
- package/dist/modules/supply/cabideProduct/interface.js +0 -6
- package/dist/modules/supply/cabideProduct/route.schema.js +0 -69
- package/dist/modules/supply/clientCurrentAccount/interfaces.js +0 -25
- package/dist/modules/supply/clientCurrentAccount/route.schema.js +0 -48
- package/dist/modules/supply/counter/interfaces.js +0 -6
- package/dist/modules/supply/counter/route.schema.js +0 -27
- package/dist/modules/supply/documentHeader/interfaces.js +0 -6
- package/dist/modules/supply/documentHeader/route.schema.js +0 -479
- package/dist/modules/supply/documentLine/interfaces.js +0 -18
- package/dist/modules/supply/documentLine/route.schema.js +0 -123
- package/dist/modules/supply/documentLineAssoc/interfaces.js +0 -6
- package/dist/modules/supply/documentLineAssoc/route.schema.js +0 -31
- package/dist/modules/supply/documentLineFolder/interfaces.js +0 -6
- package/dist/modules/supply/documentLineFolder/route.schema.js +0 -19
- package/dist/modules/supply/documentLineNote/interfaces.js +0 -16
- package/dist/modules/supply/documentLineNote/route.schema.js +0 -22
- package/dist/modules/supply/documentSet/interface.js +0 -6
- package/dist/modules/supply/documentSet/route.schema.js +0 -26
- package/dist/modules/supply/documentType/interfaces.js +0 -56
- package/dist/modules/supply/documentType/route.schema.js +0 -69
- package/dist/modules/supply/externalDocumentHeader/interface.js +0 -6
- package/dist/modules/supply/externalDocumentHeader/route.schema.js +0 -47
- package/dist/modules/supply/externalDocumentType/interface.js +0 -6
- package/dist/modules/supply/moloniRequest/interface.js +0 -6
- package/dist/modules/supply/moloniRequest/route.schema.js +0 -17
- package/dist/modules/supply/orderManagement/interface.js +0 -6
- package/dist/modules/supply/orderManagement/route.schema.d.ts +0 -0
- package/dist/modules/supply/orderManagement/route.schema.js +0 -1
- package/dist/modules/supply/payment/interface.js +0 -11
- package/dist/modules/supply/payment/route.schema.js +0 -81
- package/dist/modules/supply/preSale/interface.js +0 -6
- package/dist/modules/supply/preSale/route.schema.js +0 -58
- package/dist/modules/supply/preSaleProduct/interface.js +0 -6
- package/dist/modules/supply/preSaleProduct/route.schema.js +0 -10
- package/dist/modules/supply/providerCurrentAccount/interfaces.js +0 -6
- package/dist/modules/supply/providerCurrentAccount/route.schema.js +0 -17
- package/dist/modules/supply/schedule/interface.js +0 -19
- package/dist/modules/supply/schedule/route.schema.js +0 -19
- package/dist/modules/supply/startDocumentHeaderLastUpdate/interface.js +0 -6
- package/dist/modules/tickets/channel/interfaces.js +0 -6
- package/dist/modules/tickets/channel/route.schema.js +0 -28
- package/dist/modules/tickets/clt/interfaces.js +0 -6
- package/dist/modules/tickets/clt/route.schema.js +0 -22
- package/dist/modules/tickets/language/interfaces.js +0 -6
- package/dist/modules/tickets/language/route.schema.js +0 -28
- package/dist/modules/tickets/tickets/interfaces.js +0 -6
- package/dist/modules/tickets/tickets/route.schema.js +0 -18
- package/dist/modules/user/bankData/interface.js +0 -6
- package/dist/modules/user/bankData/route.schema.js +0 -38
- package/dist/modules/user/clientType/interface.js +0 -6
- package/dist/modules/user/clientType/route.schema.js +0 -29
- package/dist/modules/user/clients/interface.js +0 -6
- package/dist/modules/user/clients/route.schema.js +0 -83
- package/dist/modules/user/commissioner/interface.js +0 -6
- package/dist/modules/user/commissioner/route.schema.js +0 -50
- package/dist/modules/user/country/interface.js +0 -6
- package/dist/modules/user/country/route.schema.js +0 -104
- package/dist/modules/user/deliveryMethods/interfaces.js +0 -6
- package/dist/modules/user/deliveryMethods/route.schema.js +0 -18
- package/dist/modules/user/favorites/interfaces.js +0 -6
- package/dist/modules/user/favorites/route.schema.js +0 -26
- package/dist/modules/user/groupPermissions/interface.js +0 -6
- package/dist/modules/user/groupPermissions/route.schema.js +0 -13
- package/dist/modules/user/language/interface.js +0 -6
- package/dist/modules/user/language/route.schema.js +0 -26
- package/dist/modules/user/maturityDates/interfaces.js +0 -6
- package/dist/modules/user/maturityDates/route.schema.js +0 -20
- package/dist/modules/user/password/interfaces.js +0 -4
- package/dist/modules/user/password/route.schema.js +0 -21
- package/dist/modules/user/paymentConditions/interface.js +0 -6
- package/dist/modules/user/paymentConditions/route.schema.js +0 -30
- package/dist/modules/user/paymentMethods/interfaces.js +0 -6
- package/dist/modules/user/paymentMethods/route.schema.js +0 -26
- package/dist/modules/user/permissions/interface.js +0 -6
- package/dist/modules/user/permissions/route.schema.js +0 -13
- package/dist/modules/user/persona/interface.js +0 -6
- package/dist/modules/user/persona/route.schema.js +0 -59
- package/dist/modules/user/providerType/interface.js +0 -6
- package/dist/modules/user/providerType/route.schema.js +0 -26
- package/dist/modules/user/providers/interface.js +0 -6
- package/dist/modules/user/providers/route.schema.js +0 -81
- package/dist/modules/user/purchaseConditions/interface.js +0 -6
- package/dist/modules/user/purchaseConditions/route.schema.js +0 -33
- package/dist/modules/user/reasonForExemption/interface.js +0 -6
- package/dist/modules/user/reasonForExemption/route.schema.js +0 -32
- package/dist/modules/user/refreshToken/interface.js +0 -2
- package/dist/modules/user/refreshToken/route.schema.js +0 -16
- package/dist/modules/user/segmentsArea/interface.js +0 -6
- package/dist/modules/user/segmentsArea/route.schema.js +0 -28
- package/dist/modules/user/sessions/interface.js +0 -2
- package/dist/modules/user/sessions/route.schema.js +0 -19
- package/dist/modules/user/shippings/interface.js +0 -6
- package/dist/modules/user/shippings/route.schema.js +0 -34
- package/dist/modules/user/socialMedia/interface.js +0 -6
- package/dist/modules/user/socialMedia/route.schema.js +0 -34
- package/dist/modules/user/storeOperator/interface.js +0 -6
- package/dist/modules/user/storeOperator/route.schema.js +0 -54
- package/dist/modules/user/swift/interface.js +0 -6
- package/dist/modules/user/swift/route.schema.js +0 -34
- package/dist/modules/user/tenant/interface.js +0 -6
- package/dist/modules/user/tenant/route.schema.js +0 -46
- package/dist/modules/user/userPermissions/interface.js +0 -6
- package/dist/modules/user/userPermissions/route.schema.js +0 -14
- package/dist/modules/user/userPositions/interface.js +0 -6
- package/dist/modules/user/userPositions/route.schema.js +0 -26
- package/dist/modules/user/userTokens/interface.js +0 -6
- package/dist/modules/user/userTokens/route.schema.js +0 -18
- package/dist/modules/user/users/interface.js +0 -6
- package/dist/modules/user/users/route.schema.js +0 -57
- package/dist/modules/user/vehicles/interfaces.js +0 -6
- package/dist/modules/user/vehicles/route.schema.js +0 -20
- package/dist/modules/user/zipCode/interfaces.js +0 -6
- package/dist/modules/user/zipCode/route.schema.js +0 -30
- package/dist/modules/view/channels/interface.js +0 -6
- package/dist/modules/view/channels/route.schema.d.ts +0 -0
- package/dist/modules/view/channels/route.schema.js +0 -1
- package/dist/modules/view/connections/interface.js +0 -6
- package/dist/modules/view/connections/route.schema.d.ts +0 -0
- package/dist/modules/view/connections/route.schema.js +0 -1
- package/dist/modules/view/eventHistory/interface.js +0 -2
- package/dist/modules/view/eventHistory/route.schema.js +0 -13
- package/dist/shared/entities/documentManagement.js +0 -2
- package/dist/shared/entities/index.js +0 -2
- package/dist/shared/entities/integration.js +0 -2
- package/dist/shared/entities/print.js +0 -2
- package/dist/shared/entities/stock.js +0 -2
- package/dist/shared/entities/tickets.js +0 -2
- package/dist/shared/entities/user.js +0 -2
- package/dist/shared/entities/view.js +0 -2
- package/dist/shared/errors/documentManagementErrors.js +0 -15
- package/dist/shared/errors/integrationErrors.js +0 -46
- package/dist/shared/errors/stockErrors.js +0 -274
- package/dist/shared/errors/userErrors.js +0 -105
- package/dist/shared/errors/viewErrors.js +0 -8
- package/dist/shared/interface.js +0 -79
- package/dist/shared/messages.js +0 -119
|
@@ -1,479 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
var _a;
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.documentLineQuery = exports.providerProposalBody = exports.documentPdfQuery = exports.findByTypeQuery = exports.sendClientNotificationBody = exports.updateManyWithPersonaBody = exports.transferClientOwnershipBody = exports.createProductionOrderBody = exports.createProviderCreditNoteFromReturnBody = exports.findProviderReturnQuery = exports.createProviderServiceInvoiceBody = exports.createProviderFinancialCreditNoteBody = exports.findProviderInvoiceQuery = exports.updateBody = exports.basicSearchQuery = exports.findByCommissionerIdQuery = exports.findQuery = exports.findByDocumentLineStateQuery = exports.createFromHeaderBody = exports.createBody = void 0;
|
|
19
|
-
var joi_1 = __importDefault(require("joi"));
|
|
20
|
-
var messages_1 = require("../../../shared/messages");
|
|
21
|
-
var interfaces_1 = require("../documentType/interfaces");
|
|
22
|
-
var createFromHeaderMaturityDate = {
|
|
23
|
-
id: joi_1.default.string().uuid().required(),
|
|
24
|
-
name: joi_1.default.string().required(),
|
|
25
|
-
days: joi_1.default.number().integer().positive().allow(0).required(),
|
|
26
|
-
};
|
|
27
|
-
var createBodyKeys = {
|
|
28
|
-
document_type_id: joi_1.default.number().required(),
|
|
29
|
-
external_id: joi_1.default.string().allow(null).optional(),
|
|
30
|
-
document_set_id: joi_1.default.string().uuid().required(),
|
|
31
|
-
pdf_link: joi_1.default.string().allow(null).optional(),
|
|
32
|
-
google_sheet_id: joi_1.default.string().allow(null).optional(),
|
|
33
|
-
external_pdf_link: joi_1.default.string().allow(null).optional(),
|
|
34
|
-
external_data: joi_1.default.any().optional(),
|
|
35
|
-
sent: joi_1.default.boolean().optional(),
|
|
36
|
-
owner_id: joi_1.default.string().uuid().required(),
|
|
37
|
-
owner_number: joi_1.default.number().required(),
|
|
38
|
-
reason_for_exemption_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
39
|
-
reason_for_exemption: joi_1.default.string().allow(null),
|
|
40
|
-
billing_persona_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
41
|
-
billing_persona_nif: joi_1.default.string().allow(null).optional(),
|
|
42
|
-
billing_persona_name: joi_1.default.string().allow(null).optional(),
|
|
43
|
-
billing_persona_email: joi_1.default
|
|
44
|
-
.string()
|
|
45
|
-
.email({ tlds: { allow: false } })
|
|
46
|
-
.allow(null)
|
|
47
|
-
.optional(),
|
|
48
|
-
billing_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
49
|
-
billing_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
50
|
-
billing_persona_address_postal_code: joi_1.default
|
|
51
|
-
.string()
|
|
52
|
-
.trim(true)
|
|
53
|
-
.lowercase()
|
|
54
|
-
.allow(null)
|
|
55
|
-
.optional(),
|
|
56
|
-
billing_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
57
|
-
billing_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
58
|
-
billing_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
59
|
-
delivery_persona_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
60
|
-
delivery_persona_name: joi_1.default.string().allow(null).optional(),
|
|
61
|
-
delivery_persona_email: joi_1.default
|
|
62
|
-
.string()
|
|
63
|
-
.email({ tlds: { allow: false } })
|
|
64
|
-
.allow(null)
|
|
65
|
-
.optional(),
|
|
66
|
-
delivery_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
67
|
-
delivery_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
68
|
-
delivery_persona_address_postal_code: joi_1.default
|
|
69
|
-
.string()
|
|
70
|
-
.trim(true)
|
|
71
|
-
.lowercase()
|
|
72
|
-
.allow(null)
|
|
73
|
-
.optional(),
|
|
74
|
-
delivery_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
75
|
-
delivery_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
76
|
-
delivery_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
77
|
-
contact_persona_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
78
|
-
contact_persona_name: joi_1.default.string().allow(null).optional(),
|
|
79
|
-
contact_persona_email: joi_1.default
|
|
80
|
-
.string()
|
|
81
|
-
.email({ tlds: { allow: false } })
|
|
82
|
-
.allow(null)
|
|
83
|
-
.optional(),
|
|
84
|
-
contact_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
85
|
-
contact_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
86
|
-
contact_persona_address_postal_code: joi_1.default
|
|
87
|
-
.string()
|
|
88
|
-
.trim(true)
|
|
89
|
-
.lowercase()
|
|
90
|
-
.allow(null)
|
|
91
|
-
.optional(),
|
|
92
|
-
contact_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
93
|
-
contact_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
94
|
-
contact_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
95
|
-
payment_method_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
96
|
-
payment_method: joi_1.default.string().allow(null).optional(),
|
|
97
|
-
maturity_date: joi_1.default.object().keys(createFromHeaderMaturityDate).optional(),
|
|
98
|
-
delivery_method_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
99
|
-
delivery_method: joi_1.default.string().allow(null).optional(),
|
|
100
|
-
delivery_departure_street: joi_1.default.string().allow(null).optional(),
|
|
101
|
-
delivery_departure_postal_code: joi_1.default
|
|
102
|
-
.string()
|
|
103
|
-
.trim(true)
|
|
104
|
-
.lowercase()
|
|
105
|
-
.allow(null)
|
|
106
|
-
.optional(),
|
|
107
|
-
delivery_departure_locality: joi_1.default.string().allow(null).optional(),
|
|
108
|
-
vehicle_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
109
|
-
vehicle: joi_1.default.string().allow(null).optional(),
|
|
110
|
-
commissioner_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
111
|
-
commission_percentage: joi_1.default.number().positive().allow(0).default(0).optional(),
|
|
112
|
-
return_reason: joi_1.default.string().allow(null).optional(),
|
|
113
|
-
updated_by: joi_1.default.string().uuid().allow(null).optional(),
|
|
114
|
-
created_by: joi_1.default.string().uuid().allow(null).optional(),
|
|
115
|
-
};
|
|
116
|
-
exports.createBody = joi_1.default
|
|
117
|
-
.object()
|
|
118
|
-
.keys(createBodyKeys)
|
|
119
|
-
.and('reason_for_exemption_id', 'reason_for_exemption')
|
|
120
|
-
.and('payment_method_id', 'payment_method')
|
|
121
|
-
.and('delivery_method_id', 'delivery_method')
|
|
122
|
-
.and('delivery_departure_street', 'delivery_departure_postal_code', 'delivery_departure_locality')
|
|
123
|
-
.and('vehicle_id', 'vehicle')
|
|
124
|
-
.messages(messages_1.messages);
|
|
125
|
-
var createFromHeaderBodyKeys = {
|
|
126
|
-
document_type_id: joi_1.default.number().required(),
|
|
127
|
-
emission_date: joi_1.default.date().optional(),
|
|
128
|
-
from_header: joi_1.default.array().items(joi_1.default.string().uuid().required()).required(),
|
|
129
|
-
from_lines: joi_1.default.array().items(joi_1.default.string().uuid().optional()).required(),
|
|
130
|
-
payments: joi_1.default.array().items(joi_1.default
|
|
131
|
-
.object({
|
|
132
|
-
document_header_id: joi_1.default.string().uuid().optional(),
|
|
133
|
-
date: joi_1.default.date().required(),
|
|
134
|
-
debit: joi_1.default.number().positive().allow(0).required(),
|
|
135
|
-
credit: joi_1.default.number().allow(0).required(),
|
|
136
|
-
payment_method_id: joi_1.default.string().uuid().required(),
|
|
137
|
-
payment_method: joi_1.default.string().required(),
|
|
138
|
-
notes: joi_1.default.string().allow('', null).required(),
|
|
139
|
-
})
|
|
140
|
-
.optional()),
|
|
141
|
-
delivery_method_id: joi_1.default.string().optional(),
|
|
142
|
-
delivery_adresses: joi_1.default
|
|
143
|
-
.object({
|
|
144
|
-
delivery_departure_street: joi_1.default.string().required(),
|
|
145
|
-
delivery_departure_locality: joi_1.default.string().required(),
|
|
146
|
-
delivery_departure_postal_code: joi_1.default
|
|
147
|
-
.string()
|
|
148
|
-
.trim(true)
|
|
149
|
-
.lowercase()
|
|
150
|
-
.required(),
|
|
151
|
-
delivery_street: joi_1.default.string().required(),
|
|
152
|
-
delivery_locality: joi_1.default.string().required(),
|
|
153
|
-
delivery_postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
154
|
-
})
|
|
155
|
-
.allow(null)
|
|
156
|
-
.optional(),
|
|
157
|
-
email: joi_1.default
|
|
158
|
-
.string()
|
|
159
|
-
.email({ tlds: { allow: false } })
|
|
160
|
-
.allow(null)
|
|
161
|
-
.optional(),
|
|
162
|
-
maturity_date: joi_1.default.object().keys(createFromHeaderMaturityDate).optional(),
|
|
163
|
-
return_reason: joi_1.default.string().optional(),
|
|
164
|
-
provider_ref: joi_1.default.string().optional(),
|
|
165
|
-
global_discount: joi_1.default.number().min(0).max(100).optional(),
|
|
166
|
-
};
|
|
167
|
-
exports.createFromHeaderBody = joi_1.default
|
|
168
|
-
.object()
|
|
169
|
-
.keys(createFromHeaderBodyKeys)
|
|
170
|
-
.messages(messages_1.messages);
|
|
171
|
-
var findByDocumentLineStateQueryKeys = {
|
|
172
|
-
document_type_id: joi_1.default.number().required(),
|
|
173
|
-
document_line_state: joi_1.default.string().required(),
|
|
174
|
-
};
|
|
175
|
-
exports.findByDocumentLineStateQuery = joi_1.default
|
|
176
|
-
.object()
|
|
177
|
-
.keys(findByDocumentLineStateQueryKeys)
|
|
178
|
-
.messages(messages_1.messages);
|
|
179
|
-
var findQueryKeys = {
|
|
180
|
-
owner_id: joi_1.default.string().uuid().required(),
|
|
181
|
-
document_type_id: joi_1.default.number().required(),
|
|
182
|
-
closed: joi_1.default.boolean().default(false).optional(),
|
|
183
|
-
};
|
|
184
|
-
exports.findQuery = joi_1.default.object().keys(findQueryKeys).messages(messages_1.messages);
|
|
185
|
-
var findByCommissionerIdQueryKeys = {
|
|
186
|
-
commissioner_id: joi_1.default.string().uuid().required(),
|
|
187
|
-
};
|
|
188
|
-
exports.findByCommissionerIdQuery = joi_1.default
|
|
189
|
-
.object()
|
|
190
|
-
.keys(findByCommissionerIdQueryKeys)
|
|
191
|
-
.messages(messages_1.messages);
|
|
192
|
-
var basicSearchQueryKeys = {
|
|
193
|
-
search_value: joi_1.default.string().allow('', null).optional(),
|
|
194
|
-
per_page: joi_1.default
|
|
195
|
-
.number()
|
|
196
|
-
.positive()
|
|
197
|
-
.integer()
|
|
198
|
-
.default(10)
|
|
199
|
-
.allow(null)
|
|
200
|
-
.optional(),
|
|
201
|
-
inactive: joi_1.default.boolean().default(false).optional(),
|
|
202
|
-
current_page: joi_1.default.number().positive().integer().allow(null).optional(),
|
|
203
|
-
};
|
|
204
|
-
exports.basicSearchQuery = joi_1.default
|
|
205
|
-
.object()
|
|
206
|
-
.keys(basicSearchQueryKeys)
|
|
207
|
-
.messages(messages_1.messages);
|
|
208
|
-
var updateBodyKeys = {
|
|
209
|
-
external_data: joi_1.default.any().optional(),
|
|
210
|
-
external_id: joi_1.default.string().allow(null).optional(),
|
|
211
|
-
external_pdf_link: joi_1.default.string().allow(null).optional(),
|
|
212
|
-
google_sheet_id: joi_1.default.string().allow(null).optional(),
|
|
213
|
-
pdf_link: joi_1.default.string().allow(null).optional(),
|
|
214
|
-
sent: joi_1.default.boolean().optional(),
|
|
215
|
-
owner_id: joi_1.default.string().uuid().optional(),
|
|
216
|
-
owner_number: joi_1.default.number().integer().positive().optional(),
|
|
217
|
-
reason_for_exemption_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
218
|
-
reason_for_exemption: joi_1.default.string().allow(null).optional(),
|
|
219
|
-
billing_persona_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
220
|
-
billing_persona_nif: joi_1.default.string().allow(null).optional(),
|
|
221
|
-
billing_persona_name: joi_1.default.string().allow(null).optional(),
|
|
222
|
-
billing_persona_email: joi_1.default
|
|
223
|
-
.string()
|
|
224
|
-
.email({ tlds: { allow: false } })
|
|
225
|
-
.allow(null)
|
|
226
|
-
.optional(),
|
|
227
|
-
billing_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
228
|
-
billing_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
229
|
-
billing_persona_address_postal_code: joi_1.default
|
|
230
|
-
.string()
|
|
231
|
-
.trim(true)
|
|
232
|
-
.lowercase()
|
|
233
|
-
.allow(null)
|
|
234
|
-
.optional(),
|
|
235
|
-
billing_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
236
|
-
billing_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
237
|
-
billing_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
238
|
-
delivery_persona_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
239
|
-
delivery_persona_name: joi_1.default.string().allow(null).optional(),
|
|
240
|
-
delivery_persona_email: joi_1.default
|
|
241
|
-
.string()
|
|
242
|
-
.email({ tlds: { allow: false } })
|
|
243
|
-
.allow(null)
|
|
244
|
-
.optional(),
|
|
245
|
-
delivery_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
246
|
-
delivery_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
247
|
-
delivery_persona_address_postal_code: joi_1.default
|
|
248
|
-
.string()
|
|
249
|
-
.trim(true)
|
|
250
|
-
.lowercase()
|
|
251
|
-
.allow(null)
|
|
252
|
-
.optional(),
|
|
253
|
-
delivery_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
254
|
-
delivery_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
255
|
-
delivery_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
256
|
-
contact_persona_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
257
|
-
contact_persona_name: joi_1.default.string().allow(null).optional(),
|
|
258
|
-
contact_persona_email: joi_1.default
|
|
259
|
-
.string()
|
|
260
|
-
.email({ tlds: { allow: false } })
|
|
261
|
-
.allow(null)
|
|
262
|
-
.optional(),
|
|
263
|
-
contact_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
264
|
-
contact_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
265
|
-
contact_persona_address_postal_code: joi_1.default
|
|
266
|
-
.string()
|
|
267
|
-
.trim(true)
|
|
268
|
-
.lowercase()
|
|
269
|
-
.allow(null)
|
|
270
|
-
.optional(),
|
|
271
|
-
contact_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
272
|
-
contact_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
273
|
-
contact_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
274
|
-
payment_method_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
275
|
-
payment_method: joi_1.default.string().allow(null).optional(),
|
|
276
|
-
maturity_date_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
277
|
-
maturity_date: joi_1.default.string().allow(null).optional(),
|
|
278
|
-
maturity_date_days: joi_1.default
|
|
279
|
-
.number()
|
|
280
|
-
.integer()
|
|
281
|
-
.positive()
|
|
282
|
-
.allow(0)
|
|
283
|
-
.allow(null)
|
|
284
|
-
.optional(),
|
|
285
|
-
delivery_method_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
286
|
-
delivery_method: joi_1.default.string().allow(null).optional(),
|
|
287
|
-
delivery_departure_street: joi_1.default.string().allow(null).optional(),
|
|
288
|
-
delivery_departure_postal_code: joi_1.default
|
|
289
|
-
.string()
|
|
290
|
-
.trim(true)
|
|
291
|
-
.lowercase()
|
|
292
|
-
.allow(null)
|
|
293
|
-
.optional(),
|
|
294
|
-
delivery_departure_locality: joi_1.default.string().allow(null).optional(),
|
|
295
|
-
vehicle_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
296
|
-
vehicle: joi_1.default.string().allow(null).optional(),
|
|
297
|
-
commissioner_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
298
|
-
commission_percentage: joi_1.default.number().positive().allow(0).optional(),
|
|
299
|
-
commission_paid: joi_1.default.boolean().optional(),
|
|
300
|
-
is_archived: joi_1.default.boolean().optional(),
|
|
301
|
-
is_void: joi_1.default.boolean().optional(),
|
|
302
|
-
who_handles: joi_1.default.string().allow(null).optional(),
|
|
303
|
-
tags: joi_1.default.string().allow(null, '').optional(),
|
|
304
|
-
created_by: joi_1.default.string().uuid().allow(null).optional(),
|
|
305
|
-
};
|
|
306
|
-
exports.updateBody = joi_1.default
|
|
307
|
-
.object()
|
|
308
|
-
.keys(updateBodyKeys)
|
|
309
|
-
.and('reason_for_exemption_id', 'reason_for_exemption')
|
|
310
|
-
.and('persona_id', 'contact_name', 'email', 'phone_number')
|
|
311
|
-
.and('delivery_country_name', 'delivery_country_id', 'delivery_street', 'delivery_locality', 'delivery_postal_code')
|
|
312
|
-
.and('billing_country_name', 'billing_country_id', 'billing_street', 'billing_locality', 'billing_postal_code')
|
|
313
|
-
.and('payment_method_id', 'payment_method')
|
|
314
|
-
.and('maturity_date_id', 'maturity_date', 'maturity_date_days')
|
|
315
|
-
.and('delivery_method_id', 'delivery_method')
|
|
316
|
-
.and('delivery_departure_street', 'delivery_departure_postal_code', 'delivery_departure_locality')
|
|
317
|
-
.and('vehicle_id', 'vehicle')
|
|
318
|
-
.messages(messages_1.messages);
|
|
319
|
-
var findProviderInvoiceQueryKeys = {
|
|
320
|
-
search_value: joi_1.default.string().allow('', null).optional(),
|
|
321
|
-
provider_id: joi_1.default.string().uuid().required(),
|
|
322
|
-
};
|
|
323
|
-
exports.findProviderInvoiceQuery = joi_1.default
|
|
324
|
-
.object()
|
|
325
|
-
.keys(findProviderInvoiceQueryKeys)
|
|
326
|
-
.messages(messages_1.messages);
|
|
327
|
-
var valueByVatTaxKeys = {
|
|
328
|
-
taxPercentage: joi_1.default.number().positive().allow(0).required(),
|
|
329
|
-
total: joi_1.default.number().positive().required(),
|
|
330
|
-
};
|
|
331
|
-
var createProviderFinancialCreditNoteBodyKeys = {
|
|
332
|
-
emission_date: joi_1.default.date().required(),
|
|
333
|
-
external_document_name: joi_1.default.string().required(),
|
|
334
|
-
provider_id: joi_1.default.string().uuid().required(),
|
|
335
|
-
parent_document_header_id: joi_1.default.string().uuid().optional().allow(null, ''),
|
|
336
|
-
values: joi_1.default
|
|
337
|
-
.array()
|
|
338
|
-
.unique('taxPercentage')
|
|
339
|
-
.items(joi_1.default.object().keys(valueByVatTaxKeys).required())
|
|
340
|
-
.required(),
|
|
341
|
-
};
|
|
342
|
-
exports.createProviderFinancialCreditNoteBody = joi_1.default
|
|
343
|
-
.object()
|
|
344
|
-
.keys(createProviderFinancialCreditNoteBodyKeys)
|
|
345
|
-
.messages(messages_1.messages);
|
|
346
|
-
var createProviderServiceInvoiceBodyKeys = {
|
|
347
|
-
provider_id: joi_1.default.string().uuid().required(),
|
|
348
|
-
emission_date: joi_1.default.date().required(),
|
|
349
|
-
external_document_name: joi_1.default.string().required(),
|
|
350
|
-
values: joi_1.default
|
|
351
|
-
.array()
|
|
352
|
-
.unique('taxPercentage')
|
|
353
|
-
.items(joi_1.default.object().keys(valueByVatTaxKeys).required())
|
|
354
|
-
.required(),
|
|
355
|
-
};
|
|
356
|
-
exports.createProviderServiceInvoiceBody = joi_1.default
|
|
357
|
-
.object()
|
|
358
|
-
.keys(createProviderServiceInvoiceBodyKeys)
|
|
359
|
-
.messages(messages_1.messages);
|
|
360
|
-
var findProviderReturnQueryKeys = {
|
|
361
|
-
search_value: joi_1.default.string().allow('', null).optional(),
|
|
362
|
-
provider_id: joi_1.default.string().uuid().required(),
|
|
363
|
-
};
|
|
364
|
-
exports.findProviderReturnQuery = joi_1.default
|
|
365
|
-
.object()
|
|
366
|
-
.keys(findProviderReturnQueryKeys)
|
|
367
|
-
.messages(messages_1.messages);
|
|
368
|
-
var createProviderCreditNoteFromReturnDocumentHeadersBodyKeys = {
|
|
369
|
-
id: joi_1.default.string().uuid().required(),
|
|
370
|
-
document_line_ids: joi_1.default
|
|
371
|
-
.array()
|
|
372
|
-
.unique()
|
|
373
|
-
.items(joi_1.default.string().uuid().required())
|
|
374
|
-
.required(),
|
|
375
|
-
};
|
|
376
|
-
var createProviderCreditNoteFromReturnBodyKeys = {
|
|
377
|
-
emission_date: joi_1.default.date().required(),
|
|
378
|
-
external_document_name: joi_1.default.string().required(),
|
|
379
|
-
document_headers: joi_1.default
|
|
380
|
-
.array()
|
|
381
|
-
.items(joi_1.default
|
|
382
|
-
.object()
|
|
383
|
-
.keys(createProviderCreditNoteFromReturnDocumentHeadersBodyKeys)
|
|
384
|
-
.required())
|
|
385
|
-
.required(),
|
|
386
|
-
};
|
|
387
|
-
exports.createProviderCreditNoteFromReturnBody = joi_1.default
|
|
388
|
-
.object()
|
|
389
|
-
.keys(createProviderCreditNoteFromReturnBodyKeys)
|
|
390
|
-
.messages(messages_1.messages);
|
|
391
|
-
var createProductionOrderBodyKeys = {
|
|
392
|
-
provider_id: joi_1.default.string().uuid().required(),
|
|
393
|
-
group_id: joi_1.default.string().uuid().required(),
|
|
394
|
-
};
|
|
395
|
-
exports.createProductionOrderBody = joi_1.default
|
|
396
|
-
.object()
|
|
397
|
-
.keys(createProductionOrderBodyKeys)
|
|
398
|
-
.messages(messages_1.messages);
|
|
399
|
-
var transferClientOwnershipBodyKeys = {
|
|
400
|
-
document_header_id: joi_1.default.string().uuid().required(),
|
|
401
|
-
client_id: joi_1.default.string().uuid().required(),
|
|
402
|
-
};
|
|
403
|
-
exports.transferClientOwnershipBody = joi_1.default
|
|
404
|
-
.object()
|
|
405
|
-
.keys(transferClientOwnershipBodyKeys)
|
|
406
|
-
.messages(messages_1.messages);
|
|
407
|
-
var updateManyWithPersonaBodyKeys = {
|
|
408
|
-
id: joi_1.default.string().uuid().required(),
|
|
409
|
-
name: joi_1.default.string().optional(),
|
|
410
|
-
nif: joi_1.default.string().optional(),
|
|
411
|
-
telephone: joi_1.default.string().allow(null).optional(),
|
|
412
|
-
email: joi_1.default
|
|
413
|
-
.string()
|
|
414
|
-
.email({ tlds: { allow: false } })
|
|
415
|
-
.allow(null)
|
|
416
|
-
.optional(),
|
|
417
|
-
street: joi_1.default.string().optional(),
|
|
418
|
-
locality: joi_1.default.string().optional(),
|
|
419
|
-
postal_code: joi_1.default.string().trim(true).lowercase().optional(),
|
|
420
|
-
country_id: joi_1.default.string().uuid().optional(),
|
|
421
|
-
country_name: joi_1.default.string().optional(),
|
|
422
|
-
};
|
|
423
|
-
exports.updateManyWithPersonaBody = joi_1.default
|
|
424
|
-
.object()
|
|
425
|
-
.keys(updateManyWithPersonaBodyKeys)
|
|
426
|
-
.messages(messages_1.messages);
|
|
427
|
-
var sendClientNotificationBodyKeys = {
|
|
428
|
-
name: joi_1.default.string().allow('', null).required(),
|
|
429
|
-
email: joi_1.default
|
|
430
|
-
.string()
|
|
431
|
-
.email({ tlds: { allow: false } })
|
|
432
|
-
.allow('', null)
|
|
433
|
-
.required(),
|
|
434
|
-
dontSendEmail: joi_1.default.boolean().default(false).optional(),
|
|
435
|
-
};
|
|
436
|
-
exports.sendClientNotificationBody = joi_1.default
|
|
437
|
-
.object()
|
|
438
|
-
.keys(sendClientNotificationBodyKeys)
|
|
439
|
-
.messages(messages_1.messages);
|
|
440
|
-
var findByTypeQueryKeys = {
|
|
441
|
-
documentTypeCodes: joi_1.default
|
|
442
|
-
.array()
|
|
443
|
-
.items((_a = joi_1.default
|
|
444
|
-
.string())
|
|
445
|
-
.valid.apply(_a, interfaces_1.documentTypeCodeTypes).required())
|
|
446
|
-
.required(),
|
|
447
|
-
};
|
|
448
|
-
exports.findByTypeQuery = joi_1.default
|
|
449
|
-
.object()
|
|
450
|
-
.keys(findByTypeQueryKeys)
|
|
451
|
-
.messages(messages_1.messages);
|
|
452
|
-
var documentPdfQueryKeys = {
|
|
453
|
-
token: joi_1.default.string().optional(),
|
|
454
|
-
};
|
|
455
|
-
exports.documentPdfQuery = joi_1.default
|
|
456
|
-
.object()
|
|
457
|
-
.keys(documentPdfQueryKeys)
|
|
458
|
-
.messages(messages_1.messages);
|
|
459
|
-
var proviserProposalData = {
|
|
460
|
-
product_id: joi_1.default.string().uuid().required(),
|
|
461
|
-
quantity: joi_1.default.number().required(),
|
|
462
|
-
};
|
|
463
|
-
var providerPRoposalBodyKeys = {
|
|
464
|
-
provider_id: joi_1.default.string().uuid().required(),
|
|
465
|
-
data: joi_1.default
|
|
466
|
-
.array()
|
|
467
|
-
.items(__assign({}, proviserProposalData))
|
|
468
|
-
.required(),
|
|
469
|
-
};
|
|
470
|
-
exports.providerProposalBody = joi_1.default
|
|
471
|
-
.object()
|
|
472
|
-
.keys(providerPRoposalBodyKeys)
|
|
473
|
-
.messages(messages_1.messages);
|
|
474
|
-
exports.documentLineQuery = joi_1.default
|
|
475
|
-
.object()
|
|
476
|
-
.keys({
|
|
477
|
-
closed: joi_1.default.boolean().default(false).optional(),
|
|
478
|
-
})
|
|
479
|
-
.messages(messages_1.messages);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IMetadataPlugins = exports.LowerName = exports.UpperName = exports.Route = void 0;
|
|
4
|
-
exports.Route = 'documentLine';
|
|
5
|
-
exports.UpperName = 'DocumentLine';
|
|
6
|
-
exports.LowerName = exports.UpperName[0].toLowerCase() + exports.UpperName.substring(1);
|
|
7
|
-
var IMetadataPlugins;
|
|
8
|
-
(function (IMetadataPlugins) {
|
|
9
|
-
IMetadataPlugins["almofada"] = "almofada";
|
|
10
|
-
IMetadataPlugins["atoalhado"] = "atoalhado";
|
|
11
|
-
IMetadataPlugins["colcha"] = "colcha";
|
|
12
|
-
IMetadataPlugins["cortinado"] = "cortinado";
|
|
13
|
-
IMetadataPlugins["estofo"] = "estofo";
|
|
14
|
-
IMetadataPlugins["estore"] = "estore";
|
|
15
|
-
IMetadataPlugins["tapete"] = "tapete";
|
|
16
|
-
IMetadataPlugins["TDC"] = "TDC";
|
|
17
|
-
IMetadataPlugins["Acerto"] = "Acerto";
|
|
18
|
-
})(IMetadataPlugins || (exports.IMetadataPlugins = IMetadataPlugins = {}));
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.printLabelQuery = exports.printLabelParams = exports.findByDocumentLineStateQuery = exports.deleteBody = exports.updateIndexesBody = exports.updateManyBody = exports.updateDataBody = exports.updateBody = exports.createBody = void 0;
|
|
7
|
-
var joi_1 = __importDefault(require("joi"));
|
|
8
|
-
var messages_1 = require("../../../shared/messages");
|
|
9
|
-
var createBodyKeys = {
|
|
10
|
-
product_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
11
|
-
document_line_id: joi_1.default.string().uuid().optional(),
|
|
12
|
-
document_header_id: joi_1.default.string().uuid().required(),
|
|
13
|
-
document_line_folder_id: joi_1.default.string().uuid().allow(null).required(),
|
|
14
|
-
quantity: joi_1.default.number().positive().allow(0).default(0).required(),
|
|
15
|
-
preco_venda: joi_1.default.number().positive().allow(0).default(0).required(),
|
|
16
|
-
client_tax: joi_1.default.number().positive().allow(0).required(),
|
|
17
|
-
client_discount: joi_1.default
|
|
18
|
-
.number()
|
|
19
|
-
.positive()
|
|
20
|
-
.allow(0)
|
|
21
|
-
.default(0)
|
|
22
|
-
.max(99)
|
|
23
|
-
.required(),
|
|
24
|
-
preco_custo: joi_1.default.number().positive().allow(0).default(0).required(),
|
|
25
|
-
provider_tax: joi_1.default.number().positive().allow(0).required(),
|
|
26
|
-
provider_discount: joi_1.default
|
|
27
|
-
.number()
|
|
28
|
-
.positive()
|
|
29
|
-
.allow(0)
|
|
30
|
-
.default(0)
|
|
31
|
-
.max(99)
|
|
32
|
-
.required(),
|
|
33
|
-
document_line_group_id: joi_1.default.string().optional(),
|
|
34
|
-
data: joi_1.default
|
|
35
|
-
.object()
|
|
36
|
-
.pattern(joi_1.default.string(), joi_1.default.object().keys({
|
|
37
|
-
value: joi_1.default.any().required(),
|
|
38
|
-
}))
|
|
39
|
-
.allow({}),
|
|
40
|
-
metadata: joi_1.default.any().required(),
|
|
41
|
-
};
|
|
42
|
-
exports.createBody = joi_1.default
|
|
43
|
-
.array()
|
|
44
|
-
.items(joi_1.default.object().keys(createBodyKeys))
|
|
45
|
-
.messages(messages_1.messages);
|
|
46
|
-
var updateBodyKeys = {
|
|
47
|
-
product_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
48
|
-
document_line_folder_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
49
|
-
quantity: joi_1.default.number().positive().allow(0).optional(),
|
|
50
|
-
preco_venda: joi_1.default.number().positive().allow(0).optional(),
|
|
51
|
-
client_tax: joi_1.default.number().positive().allow(0).optional(),
|
|
52
|
-
client_discount: joi_1.default.number().positive().allow(0).max(99).optional(),
|
|
53
|
-
preco_custo: joi_1.default.number().positive().allow(0).optional(),
|
|
54
|
-
provider_tax: joi_1.default.number().positive().allow(0).optional(),
|
|
55
|
-
provider_discount: joi_1.default.number().positive().allow(0).max(99).optional(),
|
|
56
|
-
document_line_group_id: joi_1.default.string().optional(),
|
|
57
|
-
sent_to_client: joi_1.default.boolean().optional(),
|
|
58
|
-
sent_to_provider: joi_1.default.boolean().optional(),
|
|
59
|
-
};
|
|
60
|
-
exports.updateBody = joi_1.default.object().keys(updateBodyKeys).messages(messages_1.messages);
|
|
61
|
-
var updateDataBodyKeys = {
|
|
62
|
-
trigger_states: joi_1.default.boolean().optional(),
|
|
63
|
-
document_header_id: joi_1.default.string().uuid().required(),
|
|
64
|
-
document_line_ids: joi_1.default
|
|
65
|
-
.array()
|
|
66
|
-
.items(joi_1.default.string().uuid().required())
|
|
67
|
-
.required(),
|
|
68
|
-
datafield: joi_1.default.string().required(),
|
|
69
|
-
payload: joi_1.default
|
|
70
|
-
.object()
|
|
71
|
-
.keys({
|
|
72
|
-
value: joi_1.default.any().required(),
|
|
73
|
-
updated_by: joi_1.default.string().uuid().optional(),
|
|
74
|
-
updated_at: joi_1.default.date().optional(),
|
|
75
|
-
location_id: joi_1.default.string().uuid().optional(),
|
|
76
|
-
})
|
|
77
|
-
.required(),
|
|
78
|
-
};
|
|
79
|
-
exports.updateDataBody = joi_1.default
|
|
80
|
-
.object()
|
|
81
|
-
.keys(updateDataBodyKeys)
|
|
82
|
-
.messages(messages_1.messages);
|
|
83
|
-
var updateManyKeys = {
|
|
84
|
-
ids: joi_1.default.array().items(joi_1.default.string().uuid().required()).required(),
|
|
85
|
-
client_discount: joi_1.default.number().optional().allow(null, ''),
|
|
86
|
-
price_cost: joi_1.default.number().optional().allow(null, ''),
|
|
87
|
-
provider_discount: joi_1.default.number().optional().allow(null, ''),
|
|
88
|
-
provider_estimated_delivery_date: joi_1.default.date().optional().allow(null, ''),
|
|
89
|
-
};
|
|
90
|
-
exports.updateManyBody = joi_1.default
|
|
91
|
-
.object()
|
|
92
|
-
.keys(updateManyKeys)
|
|
93
|
-
.messages(messages_1.messages);
|
|
94
|
-
exports.updateIndexesBody = joi_1.default
|
|
95
|
-
.array()
|
|
96
|
-
.items(joi_1.default.string().uuid().required())
|
|
97
|
-
.required()
|
|
98
|
-
.messages(messages_1.messages);
|
|
99
|
-
exports.deleteBody = joi_1.default
|
|
100
|
-
.array()
|
|
101
|
-
.items(joi_1.default.string().uuid().required())
|
|
102
|
-
.messages(messages_1.messages);
|
|
103
|
-
var findByDocumentLineStateQueryKeys = {
|
|
104
|
-
document_type_id: joi_1.default.number().integer().positive().required(),
|
|
105
|
-
};
|
|
106
|
-
exports.findByDocumentLineStateQuery = joi_1.default
|
|
107
|
-
.object()
|
|
108
|
-
.keys(findByDocumentLineStateQueryKeys)
|
|
109
|
-
.messages(messages_1.messages);
|
|
110
|
-
var printLabelParamsKeys = {
|
|
111
|
-
document_line_ids: joi_1.default.string().required(),
|
|
112
|
-
};
|
|
113
|
-
exports.printLabelParams = joi_1.default
|
|
114
|
-
.object()
|
|
115
|
-
.keys(printLabelParamsKeys)
|
|
116
|
-
.messages(messages_1.messages);
|
|
117
|
-
var printLabelQueryKeys = {
|
|
118
|
-
token: joi_1.default.string().required(),
|
|
119
|
-
};
|
|
120
|
-
exports.printLabelQuery = joi_1.default
|
|
121
|
-
.object()
|
|
122
|
-
.keys(printLabelQueryKeys)
|
|
123
|
-
.messages(messages_1.messages);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LowerName = exports.UpperName = exports.Route = void 0;
|
|
4
|
-
exports.Route = 'documentLineAssoc';
|
|
5
|
-
exports.UpperName = 'DocumentLineAssoc';
|
|
6
|
-
exports.LowerName = exports.UpperName[0].toLowerCase() + exports.UpperName.substring(1);
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.deleteInventoryLossBody = exports.updateBody = exports.createBody = void 0;
|
|
7
|
-
var joi_1 = __importDefault(require("joi"));
|
|
8
|
-
var messages_1 = require("../../../shared/messages");
|
|
9
|
-
var createBodyKeys = {
|
|
10
|
-
document_header_id: joi_1.default.string().uuid().required(),
|
|
11
|
-
document_line_id: joi_1.default.string().uuid().required(),
|
|
12
|
-
};
|
|
13
|
-
exports.createBody = joi_1.default
|
|
14
|
-
.array()
|
|
15
|
-
.items(joi_1.default.object().keys(createBodyKeys))
|
|
16
|
-
.messages(messages_1.messages);
|
|
17
|
-
var updateBodyKeys = {
|
|
18
|
-
external_id: joi_1.default.string().allow(null).optional(),
|
|
19
|
-
origin_id: joi_1.default.string().allow(null).optional(),
|
|
20
|
-
};
|
|
21
|
-
exports.updateBody = joi_1.default.object().keys(updateBodyKeys).messages(messages_1.messages);
|
|
22
|
-
var deleteInventoryLossBodyKeys = {
|
|
23
|
-
document_line_ids: joi_1.default
|
|
24
|
-
.array()
|
|
25
|
-
.items(joi_1.default.string().uuid().required())
|
|
26
|
-
.required(),
|
|
27
|
-
};
|
|
28
|
-
exports.deleteInventoryLossBody = joi_1.default
|
|
29
|
-
.object()
|
|
30
|
-
.keys(deleteInventoryLossBodyKeys)
|
|
31
|
-
.messages(messages_1.messages);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LowerName = exports.UpperName = exports.Route = void 0;
|
|
4
|
-
exports.Route = 'documentLineFolder';
|
|
5
|
-
exports.UpperName = 'DocumentLineFolder';
|
|
6
|
-
exports.LowerName = exports.UpperName[0].toLowerCase() + exports.UpperName.substring(1);
|