@nomalism-com/types 1.1.2 → 1.1.3
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 +2 -0
- package/dist/main.d.ts +226 -0
- package/dist/modules/document/billOfLading/interfaces.d.ts +22 -0
- package/dist/modules/document/billOfLading/route.schema.d.ts +2 -0
- package/dist/modules/document/inventario/interface.d.ts +15 -0
- package/dist/modules/document/inventario/route.schema.d.ts +2 -0
- package/dist/modules/document/materialEntrance/interfaces.d.ts +134 -0
- package/dist/modules/document/materialEntrance/route.schema.d.ts +7 -0
- package/dist/modules/document/order/interfaces.d.ts +113 -0
- package/dist/modules/document/order/route.schema.d.ts +9 -0
- package/dist/modules/document/productionOrder/interfaces.d.ts +9 -0
- package/dist/modules/document/productionOrder/route.schema.d.ts +2 -0
- package/dist/modules/document/proforma/interfaces.d.ts +12 -0
- package/dist/modules/document/proforma/route.schema.d.ts +3 -0
- package/dist/modules/document/propostaFornecedor/interfaces.d.ts +13 -0
- package/dist/modules/document/propostaFornecedor/route.schema.d.ts +2 -0
- package/dist/modules/document/propostaSheets/interface.d.ts +74 -0
- package/dist/modules/document/propostaSheets/route.schema.d.ts +6 -0
- package/dist/modules/document/providerCreditNoteFromReturn/interfaces.d.ts +38 -0
- package/dist/modules/document/providerCreditNoteFromReturn/route.schema.d.ts +3 -0
- package/dist/modules/document/providerFinancialCreditNote/interfaces.d.ts +27 -0
- package/dist/modules/document/providerFinancialCreditNote/route.schema.d.ts +3 -0
- package/dist/modules/document/providerServiceInvoice/interfaces.d.ts +16 -0
- package/dist/modules/document/providerServiceInvoice/route.schema.d.ts +2 -0
- package/dist/modules/document/purchase/interfaces.d.ts +91 -0
- package/dist/modules/document/purchase/route.schema.d.ts +4 -0
- package/dist/modules/document/quebra/interfaces.d.ts +36 -0
- package/dist/modules/document/quebra/route.schema.d.ts +3 -0
- package/dist/modules/document/returnToProvider/interface.d.ts +40 -0
- package/dist/modules/document/returnToProvider/route.schema.d.ts +2 -0
- package/dist/modules/document/transformado/interfaces.d.ts +19 -0
- package/dist/modules/document/transformado/route.schema.d.ts +2 -0
- package/dist/modules/document/upfrontReturn/interfaces.d.ts +12 -0
- package/dist/modules/document/upfrontReturn/route.schema.d.ts +2 -0
- package/dist/modules/documentManagement/multimedia/interfaces.d.ts +16 -0
- package/dist/modules/documentManagement/multimedia/route.schema.d.ts +2 -0
- package/dist/modules/integration/emailLog/interfaces.d.ts +85 -0
- package/dist/modules/integration/emailLog/route.schema.d.ts +4 -0
- package/dist/modules/integration/emailTemplate/interfaces.d.ts +46 -0
- package/dist/modules/integration/emailTemplate/route.schema.d.ts +4 -0
- package/dist/modules/integration/emailTemplateAttachment/interfaces.d.ts +17 -0
- package/dist/modules/integration/emailTemplateAttachment/route.schema.d.ts +2 -0
- package/dist/modules/integration/emailVerification/interfaces.d.ts +23 -0
- package/dist/modules/integration/emailVerification/route.schema.d.ts +5 -0
- package/dist/modules/integration/googleFilePermission/interfaces.d.ts +26 -0
- package/dist/modules/integration/googleFilePermission/route.schema.d.ts +5 -0
- package/dist/modules/integration/googleSheets/interfaces.d.ts +54 -0
- package/dist/modules/integration/googleSheets/route.schema.d.ts +4 -0
- package/dist/modules/integration/observation/interfaces.d.ts +45 -0
- package/dist/modules/integration/observation/route.schema.d.ts +5 -0
- package/dist/modules/integration/observationType/interfaces.d.ts +27 -0
- package/dist/modules/integration/observationType/route.schema.d.ts +7 -0
- package/dist/modules/integration/projectInfo/interfaces.d.ts +16 -0
- package/dist/modules/integration/projectInfo/route.schema.d.ts +2 -0
- package/dist/modules/integration/settings/interfaces.d.ts +25 -0
- package/dist/modules/integration/settings/route.schema.d.ts +4 -0
- package/dist/modules/print/npc/interfaces.d.ts +30 -0
- package/dist/modules/print/npc/route.schema.d.ts +3 -0
- package/dist/modules/print/printer/interfaces.d.ts +38 -0
- package/dist/modules/print/printer/route.schema.d.ts +4 -0
- package/dist/modules/print/schedulePrintJob/interfaces.d.ts +39 -0
- package/dist/modules/print/schedulePrintJob/route.schema.d.ts +5 -0
- package/dist/modules/stock/chat/interfaces.d.ts +61 -0
- package/dist/modules/stock/chat/route.schema.d.ts +3 -0
- package/dist/modules/stock/chatRapidMessage/interface.d.ts +26 -0
- package/dist/modules/stock/chatRapidMessage/route.schema.d.ts +3 -0
- package/dist/modules/stock/dashboard/interface.d.ts +22 -0
- package/dist/modules/stock/dashboard/route.schema.d.ts +2 -0
- package/dist/modules/stock/file/interface.d.ts +32 -0
- package/dist/modules/stock/file/route.schema.d.ts +5 -0
- package/dist/modules/stock/location/interface.d.ts +58 -0
- package/dist/modules/stock/location/route.schema.d.ts +5 -0
- package/dist/modules/stock/prison/interface.d.ts +49 -0
- package/dist/modules/stock/prison/route.schema.d.ts +4 -0
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +237 -0
- package/dist/modules/stock/productGoogleSheets/route.schema.d.ts +13 -0
- package/dist/modules/stock/productImage/interface.d.ts +44 -0
- package/dist/modules/stock/productImage/route.schema.d.ts +5 -0
- package/dist/modules/stock/promotion/interface.d.ts +42 -0
- package/dist/modules/stock/promotion/route.schema.d.ts +5 -0
- package/dist/modules/stock/promotionAssoc/interface.d.ts +40 -0
- package/dist/modules/stock/promotionAssoc/route.schema.d.ts +5 -0
- package/dist/modules/stock/queryList/interfaces.d.ts +44 -0
- package/dist/modules/stock/queryList/route.schema.d.ts +7 -0
- package/dist/modules/stock/queryParameter/interfaces.d.ts +51 -0
- package/dist/modules/stock/queryParameter/route.schema.d.ts +3 -0
- package/dist/modules/stock/recurrentTasks/interface.d.ts +9 -0
- package/dist/modules/stock/returnReason/interfaces.d.ts +19 -0
- package/dist/modules/stock/returnReason/route.schema.d.ts +3 -0
- package/dist/modules/stock/savedEmPicking/interfaces.d.ts +27 -0
- package/dist/modules/stock/savedEmPicking/route.schema.d.ts +5 -0
- package/dist/modules/stock/savedProviderProposal/interfaces.d.ts +23 -0
- package/dist/modules/stock/savedProviderProposal/route.schema.d.ts +3 -0
- package/dist/modules/stock/sideMenu/interface.d.ts +37 -0
- package/dist/modules/stock/sideMenu/route.schema.d.ts +3 -0
- package/dist/modules/stock/stockMovement/interface.d.ts +49 -0
- package/dist/modules/stock/stockMovement/route.schema.d.ts +3 -0
- package/dist/modules/stock/task/interface.d.ts +82 -0
- package/dist/modules/stock/task/route.schema.d.ts +4 -0
- package/dist/modules/stock/taskMessage/interface.d.ts +14 -0
- package/dist/modules/stock/taskMessage/route.schema.d.ts +3 -0
- package/dist/modules/stock/taskRead/interface.d.ts +13 -0
- package/dist/modules/stock/taskRead/route.schema.d.ts +3 -0
- package/dist/modules/stock/typeOfLocation/interface.d.ts +32 -0
- package/dist/modules/stock/typeOfLocation/route.schema.d.ts +5 -0
- package/dist/modules/stock/unitOfMeasure/interface.d.ts +42 -0
- package/dist/modules/stock/unitOfMeasure/route.schema.d.ts +5 -0
- package/dist/modules/stock/vatTax/interface.d.ts +34 -0
- package/dist/modules/stock/vatTax/route.schema.d.ts +5 -0
- package/dist/modules/stock/vatTaxZone/interface.d.ts +42 -0
- package/dist/modules/stock/vatTaxZone/route.schema.d.ts +5 -0
- package/dist/modules/stock/vatValidation/interfaces.d.ts +8 -0
- package/dist/modules/stock/vatValidation/route.schema.d.ts +2 -0
- package/dist/modules/stock/workflow/interfaces.d.ts +45 -0
- package/dist/modules/stock/workflow/route.schema.d.ts +4 -0
- package/dist/modules/supply/batch/interface.d.ts +0 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +364 -0
- package/dist/modules/supply/documentHeader/route.schema.d.ts +15 -0
- package/dist/modules/supply/documentLine/interfaces.d.ts +145 -0
- package/dist/modules/supply/documentLine/route.schema.d.ts +9 -0
- package/dist/modules/supply/documentLineAssoc/interfaces.d.ts +34 -0
- package/dist/modules/supply/documentLineAssoc/route.schema.d.ts +3 -0
- package/dist/modules/supply/documentLineMT/interface.d.ts +19 -0
- package/dist/modules/supply/documentLineMT/route.schema.d.ts +2 -0
- package/dist/modules/supply/documentLineNote/interfaces.d.ts +33 -0
- package/dist/modules/supply/documentLineNote/route.schema.d.ts +6 -0
- package/dist/modules/supply/documentLineRM/interface.d.ts +25 -0
- package/dist/modules/supply/documentLineRM/route.schema.d.ts +2 -0
- package/dist/modules/supply/documentSet/interface.d.ts +27 -0
- package/dist/modules/supply/documentSet/route.schema.d.ts +3 -0
- package/dist/modules/supply/documentType/interfaces.d.ts +131 -0
- package/dist/modules/supply/documentType/route.schema.d.ts +3 -0
- package/dist/modules/supply/externalDocumentHeader/interface.d.ts +92 -0
- package/dist/modules/supply/externalDocumentHeader/route.schema.d.ts +8 -0
- package/dist/modules/supply/externalDocumentType/interface.d.ts +11 -0
- package/dist/modules/supply/orderManagement/interface.d.ts +41 -0
- package/dist/modules/supply/orderManagement/route.schema.d.ts +0 -0
- package/dist/modules/supply/payment/interface.d.ts +164 -0
- package/dist/modules/supply/payment/route.schema.d.ts +11 -0
- package/dist/modules/supply/preSale/interface.d.ts +71 -0
- package/dist/modules/supply/preSale/route.schema.d.ts +8 -0
- package/dist/modules/supply/preSaleProduct/interface.d.ts +12 -0
- package/dist/modules/supply/preSaleProduct/route.schema.d.ts +2 -0
- package/dist/modules/supply/schedule/interface.d.ts +23 -0
- package/dist/modules/supply/schedule/route.schema.d.ts +2 -0
- package/dist/modules/supply/startDocumentHeaderLastUpdate/interface.d.ts +10 -0
- package/dist/modules/tickets/channel/interfaces.d.ts +29 -0
- package/dist/modules/tickets/channel/route.schema.d.ts +3 -0
- package/dist/modules/tickets/clt/interfaces.d.ts +20 -0
- package/dist/modules/tickets/clt/route.schema.d.ts +3 -0
- package/dist/modules/tickets/language/interfaces.d.ts +20 -0
- package/dist/modules/tickets/language/route.schema.d.ts +3 -0
- package/dist/modules/tickets/tickets/interfaces.d.ts +68 -0
- package/dist/modules/tickets/tickets/route.schema.d.ts +3 -0
- package/dist/modules/user/bankData/interface.d.ts +42 -0
- package/dist/modules/user/bankData/route.schema.d.ts +5 -0
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +25 -0
- package/dist/modules/user/chatSubscribers/route.schema.d.ts +2 -0
- package/dist/modules/user/clientType/interface.d.ts +30 -0
- package/dist/modules/user/clientType/route.schema.d.ts +6 -0
- package/dist/modules/user/clients/interface.d.ts +86 -0
- package/dist/modules/user/clients/route.schema.d.ts +5 -0
- package/dist/modules/user/commissioner/interface.d.ts +64 -0
- package/dist/modules/user/commissioner/route.schema.d.ts +5 -0
- package/dist/modules/user/country/interface.d.ts +35 -0
- package/dist/modules/user/country/route.schema.d.ts +5 -0
- package/dist/modules/user/deliveryMethods/interfaces.d.ts +23 -0
- package/dist/modules/user/deliveryMethods/route.schema.d.ts +3 -0
- package/dist/modules/user/favorites/interfaces.d.ts +22 -0
- package/dist/modules/user/favorites/route.schema.d.ts +8 -0
- package/dist/modules/user/groupPermissions/interface.d.ts +25 -0
- package/dist/modules/user/groupPermissions/route.schema.d.ts +2 -0
- package/dist/modules/user/language/interface.d.ts +30 -0
- package/dist/modules/user/language/route.schema.d.ts +5 -0
- package/dist/modules/user/maturityDates/interfaces.d.ts +25 -0
- package/dist/modules/user/maturityDates/route.schema.d.ts +3 -0
- package/dist/modules/user/password/interfaces.d.ts +15 -0
- package/dist/modules/user/password/route.schema.d.ts +3 -0
- package/dist/modules/user/paymentMethods/interfaces.d.ts +49 -0
- package/dist/modules/user/paymentMethods/route.schema.d.ts +3 -0
- package/dist/modules/user/permissions/interface.d.ts +25 -0
- package/dist/modules/user/permissions/route.schema.d.ts +2 -0
- package/dist/modules/user/persona/interface.d.ts +113 -0
- package/dist/modules/user/persona/route.schema.d.ts +7 -0
- package/dist/modules/user/providerType/interface.d.ts +30 -0
- package/dist/modules/user/providerType/route.schema.d.ts +5 -0
- package/dist/modules/user/providers/interface.d.ts +82 -0
- package/dist/modules/user/providers/route.schema.d.ts +5 -0
- package/dist/modules/user/purchaseConditions/interface.d.ts +37 -0
- package/dist/modules/user/purchaseConditions/route.schema.d.ts +5 -0
- package/dist/modules/user/reasonForExemption/interface.d.ts +34 -0
- package/dist/modules/user/reasonForExemption/route.schema.d.ts +5 -0
- package/dist/modules/user/refreshToken/interface.d.ts +15 -0
- package/dist/modules/user/refreshToken/route.schema.d.ts +2 -0
- package/dist/modules/user/segmentsArea/interface.d.ts +32 -0
- package/dist/modules/user/segmentsArea/route.schema.d.ts +5 -0
- package/dist/modules/user/sessions/interface.d.ts +19 -0
- package/dist/modules/user/sessions/route.schema.d.ts +2 -0
- package/dist/modules/user/shippings/interface.d.ts +38 -0
- package/dist/modules/user/shippings/route.schema.d.ts +5 -0
- package/dist/modules/user/storeOperator/interface.d.ts +74 -0
- package/dist/modules/user/storeOperator/route.schema.d.ts +7 -0
- package/dist/modules/user/swift/interface.d.ts +38 -0
- package/dist/modules/user/swift/route.schema.d.ts +5 -0
- package/dist/modules/user/tenant/interface.d.ts +49 -0
- package/dist/modules/user/tenant/route.schema.d.ts +3 -0
- package/dist/modules/user/theme/interfaces.d.ts +18 -0
- package/dist/modules/user/theme/route.schema.d.ts +2 -0
- package/dist/modules/user/userPermissions/interface.d.ts +23 -0
- package/dist/modules/user/userPermissions/route.schema.d.ts +2 -0
- package/dist/modules/user/userPositions/interface.d.ts +30 -0
- package/dist/modules/user/userPositions/route.schema.d.ts +5 -0
- package/dist/modules/user/userTokens/interface.d.ts +30 -0
- package/dist/modules/user/userTokens/route.schema.d.ts +3 -0
- package/dist/modules/user/users/interface.d.ts +114 -0
- package/dist/modules/user/users/route.schema.d.ts +7 -0
- package/dist/modules/user/vehicles/interfaces.d.ts +25 -0
- package/dist/modules/user/vehicles/route.schema.d.ts +3 -0
- package/dist/modules/user/zipCode/interfaces.d.ts +23 -0
- package/dist/modules/user/zipCode/route.schema.d.ts +3 -0
- package/dist/modules/view/adminPanel/interfaces.d.ts +140 -0
- package/dist/modules/view/errorLog/interfaces.d.ts +30 -0
- package/dist/modules/view/errorLog/route.schema.d.ts +2 -0
- package/dist/shared/entities/documentManagement.d.ts +15 -0
- package/dist/shared/entities/integration.d.ts +127 -0
- package/dist/shared/entities/print.d.ts +46 -0
- package/dist/shared/entities/stock.d.ts +1059 -0
- package/dist/shared/entities/tickets.d.ts +78 -0
- package/dist/shared/entities/user.d.ts +507 -0
- package/dist/shared/errors/documentManagementErrors.d.ts +14 -0
- package/dist/shared/errors/integrationErrors.d.ts +45 -0
- package/dist/shared/errors/stockErrors.d.ts +267 -0
- package/dist/shared/errors/userErrors.d.ts +104 -0
- package/dist/shared/errors/viewErrors.d.ts +7 -0
- package/dist/shared/interface.d.ts +343 -0
- package/dist/shared/messages.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { DocumentHeader, DocumentHeaderClientVirtuals, DocumentHeaderProviderVirtuals, DocumentHeaderVirtuals, DocumentHeaderBaseVirtuals, DocumentType, StartDocumentHeaderVirtuals, DocumentHeaderClientPaymentVirtuals, DocumentLineNote, VatTax } from '../../../shared/entities/stock';
|
|
3
|
+
import * as IDocumentType from '../documentType/interfaces';
|
|
4
|
+
import * as IPayment from '../payment/interface';
|
|
5
|
+
import type { IProjectInfoType } from '../../integration/projectInfo/interfaces';
|
|
6
|
+
export type Entity = DocumentHeader;
|
|
7
|
+
export declare const Route = "documentHeader";
|
|
8
|
+
export declare const UpperName = "DocumentHeader";
|
|
9
|
+
export declare const LowerName: string;
|
|
10
|
+
export type IDocumentHeaderBaseVirtuals = DocumentHeaderBaseVirtuals;
|
|
11
|
+
export type IDocumentHeaderVirtuals = DocumentHeaderVirtuals;
|
|
12
|
+
export type IDocumentHeaderClientVirtuals = DocumentHeaderClientVirtuals;
|
|
13
|
+
export type IDocumentHeaderProviderVirtuals = DocumentHeaderProviderVirtuals;
|
|
14
|
+
export type IStartDocumentHeaderVirtuals = StartDocumentHeaderVirtuals;
|
|
15
|
+
export type IDocumentHeaderClientPaymentVirtuals = DocumentHeaderClientPaymentVirtuals;
|
|
16
|
+
export interface ITaxEntry extends Pick<VatTax, 'name' | 'saft_code'> {
|
|
17
|
+
percentage: number;
|
|
18
|
+
totalTaxableBase: number;
|
|
19
|
+
totalTax: number;
|
|
20
|
+
total: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ITaxTable {
|
|
23
|
+
taxes: ITaxEntry[];
|
|
24
|
+
vatTaxZone: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IRsaHashData {
|
|
27
|
+
invoiceDate: string;
|
|
28
|
+
systemEntryDate: string;
|
|
29
|
+
invoiceNo: number;
|
|
30
|
+
grossTotal: number;
|
|
31
|
+
previousHash: string;
|
|
32
|
+
}
|
|
33
|
+
export interface IProjectInfo {
|
|
34
|
+
document_header_id: string;
|
|
35
|
+
type: IProjectInfoType;
|
|
36
|
+
name: string;
|
|
37
|
+
email: string;
|
|
38
|
+
telephone: string;
|
|
39
|
+
description: string;
|
|
40
|
+
}
|
|
41
|
+
export interface IFindOneBase extends Entity {
|
|
42
|
+
document_type: IDocumentType.IEntityExtended;
|
|
43
|
+
}
|
|
44
|
+
export interface IFindOneResponse extends IFindOneBase {
|
|
45
|
+
base_virtual: IDocumentHeaderBaseVirtuals | null;
|
|
46
|
+
}
|
|
47
|
+
export interface IBasicSearchRequest extends IShared.IPaginationRequest {
|
|
48
|
+
search_value: string | null;
|
|
49
|
+
inactive?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface IBasicSearchResponse {
|
|
52
|
+
document_type_name: string;
|
|
53
|
+
number: number;
|
|
54
|
+
name: string | null;
|
|
55
|
+
user_number: number;
|
|
56
|
+
document_line_count: number;
|
|
57
|
+
document_header_id: string | null;
|
|
58
|
+
start_document_header_id: string | null;
|
|
59
|
+
pdf_link: string | null;
|
|
60
|
+
updated_at: Date;
|
|
61
|
+
}
|
|
62
|
+
export interface IFindRequest {
|
|
63
|
+
owner_id: string;
|
|
64
|
+
closed?: boolean;
|
|
65
|
+
document_type_id: number;
|
|
66
|
+
}
|
|
67
|
+
export interface ICreateFromHeaderMaturityDate {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
days: number;
|
|
71
|
+
}
|
|
72
|
+
export interface ICreateRequest {
|
|
73
|
+
document_type_id: number;
|
|
74
|
+
document_set_id: string;
|
|
75
|
+
pdf_link?: string | null;
|
|
76
|
+
google_sheet_id?: string | null;
|
|
77
|
+
sent?: boolean;
|
|
78
|
+
owner_id: string;
|
|
79
|
+
owner_number: number;
|
|
80
|
+
owner_name: string;
|
|
81
|
+
reason_for_exemption_id?: string | null;
|
|
82
|
+
reason_for_exemption?: string | null;
|
|
83
|
+
billing_persona_id?: string | null;
|
|
84
|
+
billing_persona_nif?: string | null;
|
|
85
|
+
billing_persona_name?: string | null;
|
|
86
|
+
billing_persona_email?: string | null;
|
|
87
|
+
billing_persona_telephone?: string | null;
|
|
88
|
+
billing_persona_address_street?: string | null;
|
|
89
|
+
billing_persona_address_postal_code?: string | null;
|
|
90
|
+
billing_persona_address_locality?: string | null;
|
|
91
|
+
billing_persona_address_country_id?: string | null;
|
|
92
|
+
billing_persona_address_country_name?: string | null;
|
|
93
|
+
delivery_persona_id?: string | null;
|
|
94
|
+
delivery_persona_name?: string | null;
|
|
95
|
+
delivery_persona_email?: string | null;
|
|
96
|
+
delivery_persona_telephone?: string | null;
|
|
97
|
+
delivery_persona_address_street?: string | null;
|
|
98
|
+
delivery_persona_address_postal_code?: string | null;
|
|
99
|
+
delivery_persona_address_locality?: string | null;
|
|
100
|
+
delivery_persona_address_country_id?: string | null;
|
|
101
|
+
delivery_persona_address_country_name?: string | null;
|
|
102
|
+
payment_method_id?: string | null;
|
|
103
|
+
payment_method?: string | null;
|
|
104
|
+
maturity_date?: ICreateFromHeaderMaturityDate;
|
|
105
|
+
delivery_method_id?: string | null;
|
|
106
|
+
delivery_method?: string | null;
|
|
107
|
+
delivery_departure_street?: string | null;
|
|
108
|
+
delivery_departure_locality?: string | null;
|
|
109
|
+
delivery_departure_postal_code?: string | null;
|
|
110
|
+
vehicle_id?: string | null;
|
|
111
|
+
vehicle?: string | null;
|
|
112
|
+
commissioner_id?: string | null;
|
|
113
|
+
commission_percentage?: number;
|
|
114
|
+
return_reason?: string | null;
|
|
115
|
+
created_by?: string | null;
|
|
116
|
+
updated_by?: string | null;
|
|
117
|
+
}
|
|
118
|
+
export interface ICreateResponse {
|
|
119
|
+
id: string;
|
|
120
|
+
owner_id: string;
|
|
121
|
+
document_number: number;
|
|
122
|
+
google_sheet_id: string | null;
|
|
123
|
+
}
|
|
124
|
+
export interface IDeliveryAdresses {
|
|
125
|
+
delivery_departure_street?: string | null;
|
|
126
|
+
delivery_departure_locality?: string | null;
|
|
127
|
+
delivery_departure_postal_code?: string | null;
|
|
128
|
+
delivery_street?: string | null;
|
|
129
|
+
delivery_locality?: string | null;
|
|
130
|
+
delivery_postal_code?: string | null;
|
|
131
|
+
}
|
|
132
|
+
export interface ICreateFromHeaderRequest {
|
|
133
|
+
document_type_id: number;
|
|
134
|
+
emission_date?: Date;
|
|
135
|
+
from_header: string[];
|
|
136
|
+
from_lines: string[];
|
|
137
|
+
payments: (IPayment.ICreateRequest | IPayment.ICreateForThisDocumentHeaderRequest)[];
|
|
138
|
+
delivery_adresses?: IDeliveryAdresses;
|
|
139
|
+
delivery_method_id?: string | null;
|
|
140
|
+
email?: string;
|
|
141
|
+
maturity_date?: ICreateFromHeaderMaturityDate;
|
|
142
|
+
return_reason?: string;
|
|
143
|
+
provider_ref?: string;
|
|
144
|
+
global_discount?: number;
|
|
145
|
+
current_account?: boolean;
|
|
146
|
+
}
|
|
147
|
+
export interface IUpdateRequest {
|
|
148
|
+
google_sheet_id?: string | null;
|
|
149
|
+
pdf_link?: string | null;
|
|
150
|
+
sent?: boolean;
|
|
151
|
+
owner_id?: string;
|
|
152
|
+
owner_number?: number;
|
|
153
|
+
owner_name?: string;
|
|
154
|
+
reason_for_exemption_id?: string | null;
|
|
155
|
+
reason_for_exemption?: string | null;
|
|
156
|
+
billing_persona_id?: string | null;
|
|
157
|
+
billing_persona_nif?: string | null;
|
|
158
|
+
billing_persona_name?: string | null;
|
|
159
|
+
billing_persona_email?: string | null;
|
|
160
|
+
billing_persona_telephone?: string | null;
|
|
161
|
+
billing_persona_address_street?: string | null;
|
|
162
|
+
billing_persona_address_postal_code?: string | null;
|
|
163
|
+
billing_persona_address_locality?: string | null;
|
|
164
|
+
billing_persona_address_country_id?: string | null;
|
|
165
|
+
billing_persona_address_country_name?: string | null;
|
|
166
|
+
delivery_persona_id?: string | null;
|
|
167
|
+
delivery_persona_name?: string | null;
|
|
168
|
+
delivery_persona_email?: string | null;
|
|
169
|
+
delivery_persona_telephone?: string | null;
|
|
170
|
+
delivery_persona_address_street?: string | null;
|
|
171
|
+
delivery_persona_address_postal_code?: string | null;
|
|
172
|
+
delivery_persona_address_locality?: string | null;
|
|
173
|
+
delivery_persona_address_country_id?: string | null;
|
|
174
|
+
delivery_persona_address_country_name?: string | null;
|
|
175
|
+
payment_method_id?: string | null;
|
|
176
|
+
payment_method?: string | null;
|
|
177
|
+
maturity_date_id?: string | null;
|
|
178
|
+
maturity_date?: string | null;
|
|
179
|
+
maturity_date_days?: number | null;
|
|
180
|
+
delivery_method_id?: string | null;
|
|
181
|
+
delivery_method?: string | null;
|
|
182
|
+
delivery_departure_street?: string | null;
|
|
183
|
+
delivery_departure_locality?: string | null;
|
|
184
|
+
delivery_departure_postal_code?: string | null;
|
|
185
|
+
vehicle_id?: string | null;
|
|
186
|
+
vehicle?: string | null;
|
|
187
|
+
commissioner_id?: string | null;
|
|
188
|
+
commission_percentage?: number;
|
|
189
|
+
commission_paid?: boolean;
|
|
190
|
+
is_archived?: boolean;
|
|
191
|
+
is_void?: boolean;
|
|
192
|
+
is_void_reason?: string | null;
|
|
193
|
+
who_handles?: string | null;
|
|
194
|
+
tags?: string | null;
|
|
195
|
+
warning?: IWarningType;
|
|
196
|
+
created_by?: string;
|
|
197
|
+
}
|
|
198
|
+
export type IGetActionsDocumentType = Pick<DocumentType, 'user_type' | 'allow_create_from_header_without_lines' | 'pay' | 'credit' | 'debit' | 'invoice' | 'code' | 'return' | 'id' | 'description'>;
|
|
199
|
+
export interface IGetActionsResponse {
|
|
200
|
+
document_type: IGetActionsDocumentType;
|
|
201
|
+
transition_name: string;
|
|
202
|
+
document_line_ids: string[];
|
|
203
|
+
from_document_headers: {
|
|
204
|
+
id: string;
|
|
205
|
+
document_number: string;
|
|
206
|
+
}[];
|
|
207
|
+
}
|
|
208
|
+
export interface IUnpaidDocumentResponse {
|
|
209
|
+
id: string;
|
|
210
|
+
name: string;
|
|
211
|
+
group: string;
|
|
212
|
+
total: number;
|
|
213
|
+
params: ICreateFromHeaderRequest;
|
|
214
|
+
}
|
|
215
|
+
export interface ITransferOwnershipRequest {
|
|
216
|
+
document_header_id: string;
|
|
217
|
+
client_id: string;
|
|
218
|
+
}
|
|
219
|
+
export interface IFindResponse {
|
|
220
|
+
p_id: string;
|
|
221
|
+
document_header_id: string;
|
|
222
|
+
document_number: number;
|
|
223
|
+
legacy_id: string | null;
|
|
224
|
+
total: number;
|
|
225
|
+
emission_date: string;
|
|
226
|
+
line_count: number;
|
|
227
|
+
tags: string;
|
|
228
|
+
is_void: boolean;
|
|
229
|
+
is_archived: boolean;
|
|
230
|
+
adjudicado: boolean;
|
|
231
|
+
}
|
|
232
|
+
export type IUpdateManyWithPersona = {
|
|
233
|
+
id: string;
|
|
234
|
+
name: string | null;
|
|
235
|
+
telephone: string | null;
|
|
236
|
+
email: string | null;
|
|
237
|
+
street: string | null;
|
|
238
|
+
postal_code: string | null;
|
|
239
|
+
locality: string | null;
|
|
240
|
+
country_id: string | null;
|
|
241
|
+
country_name: string | null;
|
|
242
|
+
};
|
|
243
|
+
export interface ISendClientNotificationRequest {
|
|
244
|
+
name: string;
|
|
245
|
+
email: string;
|
|
246
|
+
dontSendEmail?: boolean;
|
|
247
|
+
}
|
|
248
|
+
export interface IDocumentPdfRequest {
|
|
249
|
+
token?: string;
|
|
250
|
+
}
|
|
251
|
+
export interface IFindByTypeRequest {
|
|
252
|
+
documentTypeCodes: IDocumentType.IDocumentTypeCodeType[];
|
|
253
|
+
}
|
|
254
|
+
export interface IFindByTypeLine {
|
|
255
|
+
document_line_id: string;
|
|
256
|
+
quantity: number;
|
|
257
|
+
notes: DocumentLineNote[];
|
|
258
|
+
total_without_tax: number;
|
|
259
|
+
total: number;
|
|
260
|
+
product_id: string | null;
|
|
261
|
+
designation: string | null;
|
|
262
|
+
reference: string | null;
|
|
263
|
+
measure: string | null;
|
|
264
|
+
thumbnail: string | null;
|
|
265
|
+
}
|
|
266
|
+
export interface IFindByTypeResponse {
|
|
267
|
+
document_header_id: string;
|
|
268
|
+
document_name: string;
|
|
269
|
+
pdf_link: string | null;
|
|
270
|
+
owner_number: number;
|
|
271
|
+
billing_persona_name: string | null;
|
|
272
|
+
emission_date: string;
|
|
273
|
+
created_by: string;
|
|
274
|
+
lines: IFindByTypeLine[];
|
|
275
|
+
}
|
|
276
|
+
export interface IDocumentListRequest {
|
|
277
|
+
closed: boolean;
|
|
278
|
+
}
|
|
279
|
+
export interface IDocumentListResponse {
|
|
280
|
+
user_type: IDocumentType.IDocumentTypeUserType;
|
|
281
|
+
emission_date: Date;
|
|
282
|
+
virtual_name: string;
|
|
283
|
+
id: string;
|
|
284
|
+
billing_persona_name: string | null;
|
|
285
|
+
billing_persona_nif: string | null;
|
|
286
|
+
owner_number: number;
|
|
287
|
+
owner_id: string;
|
|
288
|
+
quantity: number;
|
|
289
|
+
stock_in: boolean;
|
|
290
|
+
stock_out: boolean;
|
|
291
|
+
cativado: boolean;
|
|
292
|
+
client_upfront: boolean;
|
|
293
|
+
}
|
|
294
|
+
export declare const IWarningEnum: {
|
|
295
|
+
AvisoTotal: 'AvisoTotal';
|
|
296
|
+
AvisoParcial: 'AvisoParcial';
|
|
297
|
+
SemAviso: 'SemAviso';
|
|
298
|
+
};
|
|
299
|
+
export type IWarningType = (typeof IWarningEnum)[keyof typeof IWarningEnum];
|
|
300
|
+
export declare const IWarningType: string[];
|
|
301
|
+
export interface IFindStartDocumentHeaderSiblingsResponse {
|
|
302
|
+
next: string | null;
|
|
303
|
+
previous: string | null;
|
|
304
|
+
}
|
|
305
|
+
export interface IFindRmOpenDocuments {
|
|
306
|
+
created_at: string;
|
|
307
|
+
created_by: string;
|
|
308
|
+
document_header_id: string;
|
|
309
|
+
document_number: string;
|
|
310
|
+
identifier: string;
|
|
311
|
+
tags: string | null;
|
|
312
|
+
upfront_total: number | null;
|
|
313
|
+
who_handles: string | null;
|
|
314
|
+
document_lines: {
|
|
315
|
+
document_line_id: string;
|
|
316
|
+
product_id: string;
|
|
317
|
+
product_reference: string;
|
|
318
|
+
designation: string;
|
|
319
|
+
}[];
|
|
320
|
+
}
|
|
321
|
+
export interface IMultipleRegularizationPayments {
|
|
322
|
+
value: number;
|
|
323
|
+
payment_method_id: string;
|
|
324
|
+
payment_method: string;
|
|
325
|
+
}
|
|
326
|
+
export type IMultipleRegularizationPaymentsType = 'credit' | 'debit';
|
|
327
|
+
export interface IMultipleRegularizationDocuments {
|
|
328
|
+
owner_id: string;
|
|
329
|
+
document_header_id: string;
|
|
330
|
+
type: IMultipleRegularizationPaymentsType;
|
|
331
|
+
value: number;
|
|
332
|
+
}
|
|
333
|
+
export interface IMultipleRegularizations {
|
|
334
|
+
documents: IMultipleRegularizationDocuments[];
|
|
335
|
+
payments?: IMultipleRegularizationPayments[];
|
|
336
|
+
}
|
|
337
|
+
export interface IRepository {
|
|
338
|
+
findOne(selector: IShared.IFindByIdRequest): Promise<IFindOneResponse | null>;
|
|
339
|
+
findStart(selector: IShared.IFindByIdRequest): Promise<IFindOneBase | null>;
|
|
340
|
+
findStartVirtual(selector: IShared.IFindByIdRequest): Promise<IStartDocumentHeaderVirtuals | null>;
|
|
341
|
+
findByType(params: IFindByTypeRequest): Promise<IFindByTypeResponse[]>;
|
|
342
|
+
findByBasicSearch(data: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
|
|
343
|
+
find(params: IFindRequest): Promise<IFindResponse[]>;
|
|
344
|
+
findUnpaidCommissions(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
345
|
+
findClientUnpaidCredit(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
346
|
+
findClientUnpaidDebit(params: IShared.IFindByOwnerIdRequest): Promise<IUnpaidDocumentResponse[]>;
|
|
347
|
+
getActions(selector: IShared.IFindByIdRequest): Promise<IGetActionsResponse[]>;
|
|
348
|
+
create(data: ICreateRequest): Promise<ICreateResponse>;
|
|
349
|
+
createFromHeader(data: ICreateFromHeaderRequest): Promise<void>;
|
|
350
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
351
|
+
updateManyWithPersona(params: IUpdateManyWithPersona): Promise<void>;
|
|
352
|
+
transferClientOwnership(params: ITransferOwnershipRequest): Promise<void>;
|
|
353
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
354
|
+
sendClientNotification(selector: IShared.IFindByIdRequest, data: ISendClientNotificationRequest): Promise<void>;
|
|
355
|
+
markUnsentClientNotification(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
356
|
+
documentPdf(selector: IShared.IFindByIdRequest, data: IDocumentPdfRequest): Promise<string>;
|
|
357
|
+
documentThermalPrint(selector: IShared.IFindByIdRequest): Promise<string>;
|
|
358
|
+
documentList(selector: IShared.IFindByIdRequest, params: IDocumentListRequest): Promise<IDocumentListResponse[]>;
|
|
359
|
+
getAllRelatedDocumentHeaderIds(params: IShared.IFindByIdRequest): Promise<string[]>;
|
|
360
|
+
findStartDocumentHeaderSiblings(params: IShared.IFindByIdRequest): Promise<IFindStartDocumentHeaderSiblingsResponse>;
|
|
361
|
+
findRmOpenDocuments(): Promise<IFindRmOpenDocuments[]>;
|
|
362
|
+
regularizarMultiplosDocumentos(data: IMultipleRegularizations): Promise<void>;
|
|
363
|
+
}
|
|
364
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import joi from 'joi';
|
|
2
|
+
import * as IShared from '../../../shared/interface';
|
|
3
|
+
import { IDocumentListRequest } from './interfaces';
|
|
4
|
+
export declare const createBody: joi.ObjectSchema<any>;
|
|
5
|
+
export declare const createFromHeaderBody: joi.ObjectSchema<any>;
|
|
6
|
+
export declare const findQuery: joi.ObjectSchema<any>;
|
|
7
|
+
export declare const basicSearchQuery: joi.ObjectSchema<any>;
|
|
8
|
+
export declare const updateBody: joi.ObjectSchema<any>;
|
|
9
|
+
export declare const transferClientOwnershipBody: joi.ObjectSchema<any>;
|
|
10
|
+
export declare const updateManyWithPersonaBody: joi.ObjectSchema<any>;
|
|
11
|
+
export declare const sendClientNotificationBody: joi.ObjectSchema<any>;
|
|
12
|
+
export declare const findByTypeQuery: joi.ObjectSchema<any>;
|
|
13
|
+
export declare const documentPdfQuery: joi.ObjectSchema<any>;
|
|
14
|
+
export declare const documentLineQuery: joi.ObjectSchema<IShared.IRouteRequest<IDocumentListRequest>>;
|
|
15
|
+
export declare const regularizarMultiplosBody: joi.ObjectSchema<any>;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { DocumentLine, DocumentLineVirtuals, DocumentLinePendingConflict, DocumentLineBaseVirtuals, ProductPromotionVirtuals, DocumentLineNote, DocumentLineRM } from '../../../shared/entities/stock';
|
|
3
|
+
import * as IDocumentLineAssoc from '../documentLineAssoc/interfaces';
|
|
4
|
+
import { IDocumentTypeCodeType, IDocumentTypeUserType } from '../documentType/interfaces';
|
|
5
|
+
import { IProductType } from '../../stock/productGoogleSheets/interface';
|
|
6
|
+
import type { IGetProductType, IGetProductGroup } from '../../integration/googleSheets/interfaces';
|
|
7
|
+
export type Entity = DocumentLine;
|
|
8
|
+
export declare const Route = "documentLine";
|
|
9
|
+
export declare const UpperName = "DocumentLine";
|
|
10
|
+
export declare const LowerName: string;
|
|
11
|
+
export type IDocumentLineVirtuals = DocumentLineVirtuals;
|
|
12
|
+
export type IDocumentLineBaseVirtuals = DocumentLineBaseVirtuals;
|
|
13
|
+
export type IDocumentLineRM = DocumentLineRM;
|
|
14
|
+
export type IPromotions = Pick<ProductPromotionVirtuals, 'exclusive_to_location_id' | 'exclusive_to_client_id' | 'discount'>;
|
|
15
|
+
export type IDataKeys = 'AvisoCliente' | 'Quantidade Encomendada Originalmente' | 'Linha criada na EM' | 'Entrada de Material' | 'Opcao EM' | 'Levantar DF' | 'Enviar Email NCF' | 'DF Rejeitada' | 'Fechar DF' | 'Documento pago' | 'Devolucao Cliente' | 'Recibo do documento' | 'Emitir' | 'Backup PDF' | 'Conferir' | 'Conferir Encomenda' | 'Continuar' | 'Saldos Migrados' | 'Estado PHC' | 'Pagamento' | 'PHC origin_id' | 'PHC ef_stamp';
|
|
16
|
+
export interface IDataPayload {
|
|
17
|
+
value: unknown;
|
|
18
|
+
updated_at: Date;
|
|
19
|
+
updated_by: string;
|
|
20
|
+
location_id: string;
|
|
21
|
+
history?: IDataPayload[];
|
|
22
|
+
}
|
|
23
|
+
export type IData = {
|
|
24
|
+
[K in IDataKeys]?: IDataPayload;
|
|
25
|
+
};
|
|
26
|
+
export interface IImportedFromSheets {
|
|
27
|
+
type: IGetProductType;
|
|
28
|
+
group: IGetProductGroup;
|
|
29
|
+
index: number;
|
|
30
|
+
reference: string;
|
|
31
|
+
}
|
|
32
|
+
export interface IDataDocumentoPago {
|
|
33
|
+
name: string;
|
|
34
|
+
dh_id: string;
|
|
35
|
+
value: number;
|
|
36
|
+
discount_value: number;
|
|
37
|
+
}
|
|
38
|
+
export interface IDataPagamento {
|
|
39
|
+
name: string;
|
|
40
|
+
cca_id?: string;
|
|
41
|
+
pca_id?: string;
|
|
42
|
+
value: number;
|
|
43
|
+
discount_value: number;
|
|
44
|
+
}
|
|
45
|
+
export interface IDocumentLineDocuments {
|
|
46
|
+
code: IDocumentTypeCodeType;
|
|
47
|
+
user_type: IDocumentTypeUserType;
|
|
48
|
+
start_document_header_id?: string;
|
|
49
|
+
pdf_link?: string;
|
|
50
|
+
external_url?: string;
|
|
51
|
+
label?: string;
|
|
52
|
+
edh_id?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface IHistory {
|
|
55
|
+
what: string;
|
|
56
|
+
when: string;
|
|
57
|
+
who: string;
|
|
58
|
+
}
|
|
59
|
+
export interface IEntityExtended extends Omit<DocumentLine, 'data'> {
|
|
60
|
+
group: string;
|
|
61
|
+
document_headers: IDocumentLineDocuments[];
|
|
62
|
+
document_line_rm: IDocumentLineRM | null;
|
|
63
|
+
pending_conflict: DocumentLinePendingConflict | null;
|
|
64
|
+
document_line_notes: DocumentLineNote[];
|
|
65
|
+
product_type: IProductType | null;
|
|
66
|
+
product_id_provider: number | null;
|
|
67
|
+
product_provider_ref: string | null;
|
|
68
|
+
product_dnt_come_anymore: boolean;
|
|
69
|
+
product_no_discount: boolean;
|
|
70
|
+
product_measure: string | null;
|
|
71
|
+
product_integer_only: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface ICreateRequest extends Omit<IDocumentLineAssoc.ICreateRequest, 'document_line_id'> {
|
|
74
|
+
document_line_id?: string;
|
|
75
|
+
product_id?: string;
|
|
76
|
+
quantity: number;
|
|
77
|
+
preco_venda: number;
|
|
78
|
+
client_tax: number;
|
|
79
|
+
client_discount: number;
|
|
80
|
+
preco_custo: number;
|
|
81
|
+
provider_tax: number;
|
|
82
|
+
provider_discount: number;
|
|
83
|
+
document_line_group_id?: string;
|
|
84
|
+
data: IData;
|
|
85
|
+
}
|
|
86
|
+
export interface IUpdateRequest {
|
|
87
|
+
product_id?: string;
|
|
88
|
+
quantity?: number;
|
|
89
|
+
preco_venda?: number;
|
|
90
|
+
client_tax?: number;
|
|
91
|
+
client_discount?: number;
|
|
92
|
+
preco_custo?: number;
|
|
93
|
+
provider_tax?: number;
|
|
94
|
+
provider_discount?: number;
|
|
95
|
+
provider_purchase_discount?: number;
|
|
96
|
+
document_line_group_id?: string;
|
|
97
|
+
sent_to_client?: boolean;
|
|
98
|
+
sent_to_provider?: boolean;
|
|
99
|
+
}
|
|
100
|
+
export interface IUpdateDataRequest {
|
|
101
|
+
trigger_states?: boolean;
|
|
102
|
+
document_header_id: string;
|
|
103
|
+
document_line_ids: string[];
|
|
104
|
+
datafield: IDataKeys;
|
|
105
|
+
payload: IDataPayload;
|
|
106
|
+
}
|
|
107
|
+
export interface IUpdateManyRequest {
|
|
108
|
+
ids: string[];
|
|
109
|
+
client_discount?: number;
|
|
110
|
+
price_cost?: number;
|
|
111
|
+
provider_discount?: number;
|
|
112
|
+
provider_estimated_delivery_date?: Date | null;
|
|
113
|
+
provider_purchase_discount?: number;
|
|
114
|
+
consignacao?: boolean;
|
|
115
|
+
cancelled?: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface IUpdateManyByDocumentHeaderRequest {
|
|
118
|
+
sent_to_provider?: boolean;
|
|
119
|
+
}
|
|
120
|
+
export interface IUpdateDataRequestWithoutStamps extends Omit<IUpdateDataRequest, 'payload'> {
|
|
121
|
+
payload: Pick<IDataPayload, 'value'> & {
|
|
122
|
+
updated_by?: string;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export interface IUpdateLineStatesTriggerResponse {
|
|
126
|
+
document_header_id: string;
|
|
127
|
+
trigger_event: boolean;
|
|
128
|
+
broker_topic?: IShared.IBrokerTopic;
|
|
129
|
+
}
|
|
130
|
+
export interface IPrintLabelParamsRequest {
|
|
131
|
+
document_line_ids: string;
|
|
132
|
+
}
|
|
133
|
+
export interface IPrintLabelQueryRequest {
|
|
134
|
+
token: string;
|
|
135
|
+
}
|
|
136
|
+
export interface IRepository {
|
|
137
|
+
create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.IEntityExtended[]>;
|
|
138
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
139
|
+
updateData(data: IUpdateDataRequest): Promise<IDocumentLineAssoc.IEntityWithDocumentLine[]>;
|
|
140
|
+
updateMany(data: IUpdateManyRequest): Promise<void>;
|
|
141
|
+
updateManyByDocumentHeader(selector: IShared.IFindByIdRequest, data: IUpdateManyByDocumentHeaderRequest): Promise<void>;
|
|
142
|
+
updateIndexes(document_line_ids: string[]): Promise<void>;
|
|
143
|
+
deleteMany(document_line_ids: string[]): Promise<void>;
|
|
144
|
+
}
|
|
145
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import joi from 'joi';
|
|
2
|
+
export declare const createBody: joi.ArraySchema<any[]>;
|
|
3
|
+
export declare const updateBody: joi.ObjectSchema<any>;
|
|
4
|
+
export declare const updateDataBody: joi.ObjectSchema<any>;
|
|
5
|
+
export declare const updateManyBody: joi.ObjectSchema<any>;
|
|
6
|
+
export declare const updateIndexesBody: joi.ArraySchema<any[]>;
|
|
7
|
+
export declare const deleteBody: joi.ArraySchema<any[]>;
|
|
8
|
+
export declare const printLabelParams: joi.ObjectSchema<any>;
|
|
9
|
+
export declare const printLabelQuery: joi.ObjectSchema<any>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { DocumentLineAssoc, DocumentLine } from '../../../shared/entities/stock';
|
|
3
|
+
import * as IDocumentLine from '../documentLine/interfaces';
|
|
4
|
+
import { IDocumentLineVirtuals } from '../documentLine/interfaces';
|
|
5
|
+
export type Entity = DocumentLineAssoc;
|
|
6
|
+
export declare const Route = "documentLineAssoc";
|
|
7
|
+
export declare const UpperName = "DocumentLineAssoc";
|
|
8
|
+
export declare const LowerName: string;
|
|
9
|
+
export interface IEntityWithDocumentLine extends Entity {
|
|
10
|
+
document_line: DocumentLine;
|
|
11
|
+
}
|
|
12
|
+
export interface IEntityExtended extends Entity {
|
|
13
|
+
document_line: IDocumentLine.IEntityExtended;
|
|
14
|
+
}
|
|
15
|
+
export interface ICreateRequest {
|
|
16
|
+
document_header_id: string;
|
|
17
|
+
document_line_id: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IUpdateRequest {
|
|
20
|
+
origin_id?: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface IUpdateGroupRequest {
|
|
23
|
+
document_line_id: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface IRepository {
|
|
26
|
+
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
27
|
+
findByOwnerId(data: IShared.IFindByOwnerIdRequest): Promise<IEntityExtended[]>;
|
|
28
|
+
findVirtualsByOwnerId(data: IShared.IFindByOwnerIdRequest): Promise<IDocumentLineVirtuals[]>;
|
|
29
|
+
findHistoryByLineId(data: IShared.IFindByIdRequest): Promise<IDocumentLine.IHistory[]>;
|
|
30
|
+
create(data: ICreateRequest[]): Promise<IEntityWithDocumentLine[]>;
|
|
31
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IEntityWithDocumentLine>;
|
|
32
|
+
}
|
|
33
|
+
export type IApi = Omit<IRepository, 'findById'>;
|
|
34
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DocumentLineMT } from '../../../shared/entities/stock';
|
|
2
|
+
import * as IShared from '../../../shared/interface';
|
|
3
|
+
export type Entity = DocumentLineMT;
|
|
4
|
+
export declare const Route = "document_line_mt";
|
|
5
|
+
export declare const UpperName = "DocumentLineMT";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IUpdateRequest {
|
|
8
|
+
document_line_ids: string[];
|
|
9
|
+
mt_order_by?: string | null;
|
|
10
|
+
mt_order_date?: Date | null;
|
|
11
|
+
mt_execution_by?: string | null;
|
|
12
|
+
mt_execution_date?: Date | null;
|
|
13
|
+
mt_execution_when?: Date | null;
|
|
14
|
+
}
|
|
15
|
+
export interface IRepository {
|
|
16
|
+
update(data: IUpdateRequest): Promise<void>;
|
|
17
|
+
findByOwnerId(selector: IShared.IFindByOwnerIdRequest): Promise<Entity[]>;
|
|
18
|
+
}
|
|
19
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { DocumentLineNote } from '../../../shared/entities/stock';
|
|
3
|
+
export declare const IDocumentLineNoteTypeEnum: {
|
|
4
|
+
Prisao: 'Prisao';
|
|
5
|
+
Quebra: 'Quebra';
|
|
6
|
+
Entrada: 'Entrada';
|
|
7
|
+
Compra: 'Compra';
|
|
8
|
+
Devolucao: 'Devolucao';
|
|
9
|
+
Transformado: 'Transformado';
|
|
10
|
+
Inventario: 'Inventario';
|
|
11
|
+
PC: 'PC';
|
|
12
|
+
PF: 'PF';
|
|
13
|
+
};
|
|
14
|
+
export type IDocumentLineNoteType = (typeof IDocumentLineNoteTypeEnum)[keyof typeof IDocumentLineNoteTypeEnum];
|
|
15
|
+
export declare const documentLineNoteTypes: string[];
|
|
16
|
+
export type Entity = DocumentLineNote;
|
|
17
|
+
export declare const Route = "documentLineNote";
|
|
18
|
+
export declare const UpperName = "DocumentLineNote";
|
|
19
|
+
export declare const LowerName: string;
|
|
20
|
+
export interface ICreateRequest {
|
|
21
|
+
document_line_id: string;
|
|
22
|
+
type: IDocumentLineNoteType;
|
|
23
|
+
note: string;
|
|
24
|
+
}
|
|
25
|
+
export interface IUpdateRequest {
|
|
26
|
+
note: string;
|
|
27
|
+
}
|
|
28
|
+
export interface IRepository {
|
|
29
|
+
create(data: ICreateRequest): Promise<string>;
|
|
30
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
31
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import joi from 'joi';
|
|
2
|
+
import * as IShared from '../../../shared/interface';
|
|
3
|
+
import { ICreateRequest } from './interfaces';
|
|
4
|
+
export declare const createBodyKeys: IShared.IRouteRequest<ICreateRequest>;
|
|
5
|
+
export declare const createBody: joi.ObjectSchema<any>;
|
|
6
|
+
export declare const updateBody: joi.ObjectSchema<any>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DocumentLineRM } from '../../../shared/entities/stock';
|
|
2
|
+
import * as IShared from '../../../shared/interface';
|
|
3
|
+
export type Entity = DocumentLineRM;
|
|
4
|
+
export declare const Route = "document_line_rm";
|
|
5
|
+
export declare const UpperName = "DocumentLineRM";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IUpdateRequest {
|
|
8
|
+
document_line_ids: string[];
|
|
9
|
+
rm_order_by?: string | null;
|
|
10
|
+
rm_order_date?: Date | null;
|
|
11
|
+
rm_execution_by?: string | null;
|
|
12
|
+
rm_execution_date?: Date | null;
|
|
13
|
+
rm_execution_when?: Date | null;
|
|
14
|
+
rm_sent_by?: string | null;
|
|
15
|
+
rm_sent_date?: Date | null;
|
|
16
|
+
rm_done_by?: string | null;
|
|
17
|
+
rm_done_date?: Date | null;
|
|
18
|
+
rm_checked_by?: string | null;
|
|
19
|
+
rm_checked_date?: Date | null;
|
|
20
|
+
}
|
|
21
|
+
export interface IRepository {
|
|
22
|
+
update(data: IUpdateRequest): Promise<void>;
|
|
23
|
+
findByOwnerId(selector: IShared.IFindByOwnerIdRequest): Promise<Entity[]>;
|
|
24
|
+
}
|
|
25
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|