@nomalism-com/types 1.1.2 → 1.1.4
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/index.js +140 -172
- 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 +89 -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 +33 -0
- package/dist/modules/user/storeOperator/route.schema.d.ts +4 -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 +1058 -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,54 @@
|
|
|
1
|
+
import { DocumentHeader } from '../../../shared/entities/stock';
|
|
2
|
+
import { Persona } from '../../../shared/entities/user';
|
|
3
|
+
import * as IShared from '../../../shared/interface';
|
|
4
|
+
export declare const Route = "google";
|
|
5
|
+
export declare const UpperName = "Google";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IGetUserData extends Pick<DocumentHeader, 'document_number' | 'owner_number' | 'billing_persona_nif' | 'billing_persona_name' | 'billing_persona_email' | 'billing_persona_telephone' | 'billing_persona_address_street' | 'billing_persona_address_locality' | 'billing_persona_address_postal_code' | 'billing_persona_address_country_name' | 'delivery_persona_name' | 'delivery_persona_email' | 'delivery_persona_telephone' | 'delivery_persona_address_street' | 'delivery_persona_address_locality' | 'delivery_persona_address_postal_code' | 'delivery_persona_address_country_name'> {
|
|
8
|
+
emission_date: string;
|
|
9
|
+
store_operator_id: string | null;
|
|
10
|
+
store_operator_name: string | null;
|
|
11
|
+
store_operator_number: number | null;
|
|
12
|
+
reason_for_exemption_name: string | null;
|
|
13
|
+
contact_persona_name: Persona['name'];
|
|
14
|
+
contact_persona_email: Persona['email'];
|
|
15
|
+
contact_persona_telephone: Persona['telephone'];
|
|
16
|
+
}
|
|
17
|
+
export interface IUpdateRequest {
|
|
18
|
+
document_name: string;
|
|
19
|
+
client_data?: IGetUserData;
|
|
20
|
+
}
|
|
21
|
+
export interface ICloneRequest {
|
|
22
|
+
document_name: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ICloneResponse {
|
|
25
|
+
spreadsheetId: string;
|
|
26
|
+
}
|
|
27
|
+
export type IGetProductGroup = 'cortinado' | 'tapete' | 'estore' | 'estofo' | 'almofada' | 'outros' | 'calhas&varões' | 'papel' | 'varoes' | 'terceiros';
|
|
28
|
+
export type IGetProductType = 'confecção' | 'calha' | 'tecido 1' | 'tecido 2' | 'varoes' | 'livre' | 'papel';
|
|
29
|
+
export type IReferenceType = 'noma' | 'sheets' | undefined;
|
|
30
|
+
export interface IGetProduct {
|
|
31
|
+
index: number;
|
|
32
|
+
group: IGetProductGroup;
|
|
33
|
+
type: IGetProductType;
|
|
34
|
+
quantity: number;
|
|
35
|
+
reference: string;
|
|
36
|
+
designation: string;
|
|
37
|
+
discount: number;
|
|
38
|
+
price_sale: number;
|
|
39
|
+
price_cost: number;
|
|
40
|
+
reference_type?: IReferenceType;
|
|
41
|
+
}
|
|
42
|
+
export interface IGetDataResponse {
|
|
43
|
+
products: IGetProduct[];
|
|
44
|
+
}
|
|
45
|
+
export interface IExportRequest {
|
|
46
|
+
spreadsheetId: string;
|
|
47
|
+
document_header_id: string;
|
|
48
|
+
}
|
|
49
|
+
export interface IController {
|
|
50
|
+
clone(params: IShared.IFindByIdRequest, data?: ICloneRequest): Promise<ICloneResponse>;
|
|
51
|
+
export(params: IExportRequest): Promise<string>;
|
|
52
|
+
getData(params: IShared.IFindByIdRequest): Promise<IGetDataResponse>;
|
|
53
|
+
update(params: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Observation, ObservationType } from '../../../shared/entities/integration';
|
|
3
|
+
export type Entity = Observation;
|
|
4
|
+
export declare const Route = "observation";
|
|
5
|
+
export declare const UpperName = "Observation";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface ICreateRequest {
|
|
8
|
+
owner_id: string;
|
|
9
|
+
observation_type_id?: string | null;
|
|
10
|
+
description: string;
|
|
11
|
+
internal: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface IUpdateRequest {
|
|
14
|
+
observation_type_id?: string | null;
|
|
15
|
+
description?: string;
|
|
16
|
+
internal?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface IFindByQueryRequest {
|
|
19
|
+
owner_id?: string;
|
|
20
|
+
observation_type_id?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
internal?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface IFindByOwnerRequest {
|
|
25
|
+
owner_id: string;
|
|
26
|
+
includeInternal?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface IFindByOwnersRequest {
|
|
29
|
+
owner_ids: string[];
|
|
30
|
+
includeInternal?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface IFindByOwnerResponse extends Entity {
|
|
33
|
+
observation_type: ObservationType | null;
|
|
34
|
+
}
|
|
35
|
+
export interface IRepository {
|
|
36
|
+
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
37
|
+
findByQuery(data: IFindByQueryRequest): Promise<Entity[]>;
|
|
38
|
+
findByOwnerId(params: IFindByOwnerRequest): Promise<IFindByOwnerResponse[]>;
|
|
39
|
+
findByOwnerIds(params: IFindByOwnersRequest): Promise<IFindByOwnerResponse[]>;
|
|
40
|
+
create(data: ICreateRequest): Promise<IFindByOwnerResponse>;
|
|
41
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindByOwnerResponse | null>;
|
|
42
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
43
|
+
}
|
|
44
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
45
|
+
export type IApi = Omit<IRepository, 'findById' | 'findByQuery'>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { ObservationType } from '../../../shared/entities/integration';
|
|
3
|
+
export type Entity = ObservationType;
|
|
4
|
+
export declare const Route = "observationType";
|
|
5
|
+
export declare const UpperName = "ObservationType";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IFindByQueryRequest {
|
|
8
|
+
id?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ICreateRequest {
|
|
12
|
+
name: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IUpdateRequest {
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IRepository {
|
|
18
|
+
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
19
|
+
findByQuery(data: IFindByQueryRequest): Promise<Entity[]>;
|
|
20
|
+
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
21
|
+
find(): Promise<ObservationType[]>;
|
|
22
|
+
create(data: ICreateRequest): Promise<Entity>;
|
|
23
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
24
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
25
|
+
}
|
|
26
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
27
|
+
export type IApi = Omit<IRepository, 'findById' | 'findByQuery'>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import joi from 'joi';
|
|
2
|
+
import { ICreateRequest, IUpdateRequest } from './interfaces';
|
|
3
|
+
import * as IShared from '../../../shared/interface';
|
|
4
|
+
export declare const createBodyKeys: IShared.IRouteRequest<ICreateRequest>;
|
|
5
|
+
export declare const createBody: joi.ObjectSchema<any>;
|
|
6
|
+
export declare const updateBodyKeys: IShared.IRouteRequest<IUpdateRequest>;
|
|
7
|
+
export declare const updateBody: joi.ObjectSchema<any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ProjectInfo } from '../../../shared/entities/integration';
|
|
2
|
+
export type Entity = ProjectInfo;
|
|
3
|
+
export declare const Route = "project_info";
|
|
4
|
+
export declare const UpperName = "ProjectInfo";
|
|
5
|
+
export declare const LowerName: string;
|
|
6
|
+
export declare const IProjectInfoTypeEnum: {
|
|
7
|
+
particular: 'particular';
|
|
8
|
+
professional: 'professional';
|
|
9
|
+
company: 'company';
|
|
10
|
+
};
|
|
11
|
+
export type IProjectInfoType = (typeof IProjectInfoTypeEnum)[keyof typeof IProjectInfoTypeEnum];
|
|
12
|
+
export declare const projectInfoTypes: string[];
|
|
13
|
+
export type ISendEmail = Omit<Entity, 'created_at' | 'updated_at' | 'document_header_id' | 'id'>;
|
|
14
|
+
export interface IController {
|
|
15
|
+
sendEmail(data: ISendEmail): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Settings } from '../../../shared/entities/integration';
|
|
3
|
+
export type Entity = Settings;
|
|
4
|
+
export declare const Route = "settings";
|
|
5
|
+
export declare const UpperName = "Settings";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IFindByKeyRequest {
|
|
8
|
+
key: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ICreateRequest {
|
|
11
|
+
key: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IUpdateRequest {
|
|
15
|
+
key: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IRepository {
|
|
19
|
+
find(): Promise<Entity[]>;
|
|
20
|
+
findByKey(selector: IFindByKeyRequest): Promise<Entity | null>;
|
|
21
|
+
create(data: ICreateRequest): Promise<Entity>;
|
|
22
|
+
update(data: IUpdateRequest): Promise<Entity | null>;
|
|
23
|
+
deleteOne(selector: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
|
|
24
|
+
}
|
|
25
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Npc } from '../../../shared/entities/print';
|
|
3
|
+
export type Entity = Npc;
|
|
4
|
+
export declare const Route = "npc";
|
|
5
|
+
export declare const UpperName = "Npc";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IPrintJobs {
|
|
8
|
+
id: string;
|
|
9
|
+
moloni_json?: unknown;
|
|
10
|
+
external_url?: string | null;
|
|
11
|
+
printer_id: string;
|
|
12
|
+
orientation: 'landscape' | 'portrait';
|
|
13
|
+
}
|
|
14
|
+
export interface IFindPrintJobsForComputerIdResponse {
|
|
15
|
+
computer_name?: string | null;
|
|
16
|
+
print_jobs: IPrintJobs[];
|
|
17
|
+
}
|
|
18
|
+
export interface IUpdateRequest {
|
|
19
|
+
name?: string;
|
|
20
|
+
secret?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IFindPrintJobsForComputerIdRequest {
|
|
23
|
+
computer_id: string;
|
|
24
|
+
}
|
|
25
|
+
export interface IRepository {
|
|
26
|
+
find: () => Promise<Entity[]>;
|
|
27
|
+
findPrintJobsForComputerId(selector: IFindPrintJobsForComputerIdRequest): Promise<IFindPrintJobsForComputerIdResponse>;
|
|
28
|
+
update: (params: IShared.IFindByIdRequest, data: IUpdateRequest) => Promise<Entity | null>;
|
|
29
|
+
}
|
|
30
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Printer } from '../../../shared/entities/print';
|
|
3
|
+
export type Entity = Printer;
|
|
4
|
+
export declare const Route = "printer";
|
|
5
|
+
export declare const UpperName = "Printer";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export type IFindDetailedResponse = Entity & {
|
|
8
|
+
npc: Pick<Entity, 'name'>;
|
|
9
|
+
};
|
|
10
|
+
export type IPrinterData = Omit<Printer, 'id' | 'npc_id' | 'created_at' | 'updated_at'>;
|
|
11
|
+
export type IUpdateRequest = Omit<Printer, 'connected' | 'device_os_name' | 'npc_id' | 'id'>;
|
|
12
|
+
export interface IGetOrSetPrintersResponse {
|
|
13
|
+
printers_a4: IPrinterData[];
|
|
14
|
+
printers_pos: IPrinterData[];
|
|
15
|
+
}
|
|
16
|
+
export type IPrinterA4 = Pick<Printer, 'device_os_name' | 'name'>;
|
|
17
|
+
export type IPrinterPos = Pick<Printer, 'device_os_name'>;
|
|
18
|
+
export interface IGetOrSetPrintersRequest {
|
|
19
|
+
computer_id: string;
|
|
20
|
+
printers_a4: IPrinterA4[];
|
|
21
|
+
printers_pos: IPrinterPos[];
|
|
22
|
+
}
|
|
23
|
+
export interface IUpdateManyRequest {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
enable: boolean;
|
|
27
|
+
paper: boolean;
|
|
28
|
+
receipt: boolean;
|
|
29
|
+
sticker: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface IRepository {
|
|
32
|
+
find: () => Promise<IFindDetailedResponse[]>;
|
|
33
|
+
findByOwnerId: (selector: IShared.IFindByOwnerIdRequest) => Promise<Entity[]>;
|
|
34
|
+
update: (params: IShared.IFindByIdRequest, data: IUpdateRequest) => Promise<Entity | null>;
|
|
35
|
+
updateMany: (data: IUpdateManyRequest[]) => Promise<void>;
|
|
36
|
+
getOrSetPrinters: (data: IGetOrSetPrintersRequest) => Promise<IGetOrSetPrintersResponse>;
|
|
37
|
+
}
|
|
38
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { ScheduledPrintJob } from '../../../shared/entities/print';
|
|
3
|
+
export type Entity = ScheduledPrintJob;
|
|
4
|
+
export declare const Route = "schedule_print_job";
|
|
5
|
+
export declare const UpperName = "SchedulePrintJob";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface ICreateSchedulePrintJobRequest {
|
|
8
|
+
printer_id: string;
|
|
9
|
+
copies: number;
|
|
10
|
+
sticker?: boolean;
|
|
11
|
+
external_document_id?: string | undefined;
|
|
12
|
+
external_url?: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface ICreateManySchedulePrintJobRequest {
|
|
15
|
+
jobs: ICreateSchedulePrintJobRequest[];
|
|
16
|
+
}
|
|
17
|
+
export interface IDispatchSchedulePrintJobRequest {
|
|
18
|
+
computer_id: string;
|
|
19
|
+
last_print_job_ids: string[];
|
|
20
|
+
}
|
|
21
|
+
export interface IDispatchSchedulePrintJobResponse {
|
|
22
|
+
npc_id: string;
|
|
23
|
+
secret?: string | null;
|
|
24
|
+
print_jobs: {
|
|
25
|
+
id: string;
|
|
26
|
+
buffer?: string | null;
|
|
27
|
+
external_url?: string | null;
|
|
28
|
+
device_id: string;
|
|
29
|
+
orientation: 'landscape' | 'portrait';
|
|
30
|
+
}[];
|
|
31
|
+
}
|
|
32
|
+
export interface IRepository {
|
|
33
|
+
dispatchSchedulePrintJob: (data: IDispatchSchedulePrintJobRequest) => Promise<IDispatchSchedulePrintJobResponse>;
|
|
34
|
+
findByOwner: (data: IShared.IFindByOwnerIdRequest) => Promise<Entity[]>;
|
|
35
|
+
create: (data: ICreateSchedulePrintJobRequest) => Promise<void>;
|
|
36
|
+
createMany: (data: ICreateManySchedulePrintJobRequest) => Promise<void>;
|
|
37
|
+
deleteOne: (params: IShared.IFindByIdRequest) => Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import joi from 'joi';
|
|
2
|
+
import { ICreateManySchedulePrintJobRequest } from './interfaces';
|
|
3
|
+
export declare const dispatchSchedulePrintJobBody: joi.ObjectSchema<any>;
|
|
4
|
+
export declare const createSchedulePrintJobBody: joi.ObjectSchema<any>;
|
|
5
|
+
export declare const createManySchedulePrintJobBody: joi.ObjectSchema<ICreateManySchedulePrintJobRequest>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type * as IShared from '../../../shared/interface';
|
|
2
|
+
import type * as Persona from '../../user/persona/interface';
|
|
3
|
+
import { Chat, File } from '../../../shared/entities/stock';
|
|
4
|
+
export type Entity = Chat;
|
|
5
|
+
export declare const Route = "chat";
|
|
6
|
+
export declare const UpperName = "Chat";
|
|
7
|
+
export declare const LowerName: string;
|
|
8
|
+
export declare const ChatTypeEnum: {
|
|
9
|
+
por_proposta: 'por_proposta';
|
|
10
|
+
global: 'global';
|
|
11
|
+
};
|
|
12
|
+
export type IChatType = (typeof ChatTypeEnum)[keyof typeof ChatTypeEnum];
|
|
13
|
+
export declare const chatTypes: string[];
|
|
14
|
+
export interface IChatBalloon {
|
|
15
|
+
chat?: Pick<Entity, 'message'> & {
|
|
16
|
+
id?: string;
|
|
17
|
+
read?: boolean;
|
|
18
|
+
};
|
|
19
|
+
file?: Pick<File, 'multimedia_id' | 'filename'> & {
|
|
20
|
+
id?: string;
|
|
21
|
+
read?: boolean;
|
|
22
|
+
};
|
|
23
|
+
created_at: Date;
|
|
24
|
+
created_by: string;
|
|
25
|
+
is_customer: boolean;
|
|
26
|
+
}
|
|
27
|
+
export type IReport = Pick<Entity, 'email_processed' | 'email_delivered' | 'email_opened' | 'email_clicked'>;
|
|
28
|
+
export interface IPublicFindActiveByOwnerIdResponse {
|
|
29
|
+
persona?: Persona.IFindContactPersonaByOwnerId;
|
|
30
|
+
last_group_report?: IReport;
|
|
31
|
+
owner_id?: string;
|
|
32
|
+
chat: IChatBalloon[];
|
|
33
|
+
}
|
|
34
|
+
export interface ICreateRequest {
|
|
35
|
+
owner_id: string;
|
|
36
|
+
document_header_id: string;
|
|
37
|
+
message: string;
|
|
38
|
+
username: string;
|
|
39
|
+
is_customer: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface IUpdateRequest {
|
|
42
|
+
document_header_id?: string;
|
|
43
|
+
message?: string;
|
|
44
|
+
email_processed?: boolean;
|
|
45
|
+
email_delivered?: boolean;
|
|
46
|
+
email_opened?: boolean;
|
|
47
|
+
email_clicked?: boolean;
|
|
48
|
+
whatsapp_sent?: boolean;
|
|
49
|
+
read?: boolean;
|
|
50
|
+
username?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface IRepository {
|
|
53
|
+
findActiveByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IPublicFindActiveByOwnerIdResponse>;
|
|
54
|
+
resendLast(params: IShared.IFindByOwnerIdRequest): Promise<void>;
|
|
55
|
+
create(data: ICreateRequest): Promise<Chat>;
|
|
56
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
57
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
58
|
+
markAllAsRead(params: IShared.IFindByOwnerIdRequest): Promise<void>;
|
|
59
|
+
markAllAsUnread(params: IShared.IFindByOwnerIdRequest): Promise<void>;
|
|
60
|
+
}
|
|
61
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const Route = "chat_rapid_message";
|
|
2
|
+
export declare const UpperName = "ChatRapidMessage";
|
|
3
|
+
export declare const LowerName: string;
|
|
4
|
+
import { ChatRapidMessage } from '../../../shared/entities/stock';
|
|
5
|
+
import * as IShared from '../../../shared/interface';
|
|
6
|
+
export type Entity = ChatRapidMessage;
|
|
7
|
+
export interface ICreateRequest {
|
|
8
|
+
title: string;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IUpdateRequest {
|
|
12
|
+
title?: string;
|
|
13
|
+
message?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IFindMinifiedResponse {
|
|
16
|
+
id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IRepository {
|
|
20
|
+
create(data: ICreateRequest): Promise<Entity>;
|
|
21
|
+
findMinified(): Promise<IFindMinifiedResponse[]>;
|
|
22
|
+
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
23
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
24
|
+
delete(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const Route = "dashboard";
|
|
2
|
+
export declare const UpperName = "Dashboard";
|
|
3
|
+
export declare const LowerName: string;
|
|
4
|
+
export type IDashboardNames = 'dia' | 'mes' | 'ano';
|
|
5
|
+
export interface IData {
|
|
6
|
+
chave: number;
|
|
7
|
+
faturaRecibo: number;
|
|
8
|
+
fatura: number;
|
|
9
|
+
adiantamento: number;
|
|
10
|
+
}
|
|
11
|
+
export interface IDashboardResponse {
|
|
12
|
+
id: number;
|
|
13
|
+
name: string;
|
|
14
|
+
data: IData[];
|
|
15
|
+
}
|
|
16
|
+
export interface IFindDashboardByDate {
|
|
17
|
+
date: Date;
|
|
18
|
+
name: IDashboardNames;
|
|
19
|
+
}
|
|
20
|
+
export interface IRepository {
|
|
21
|
+
findByDate(selector: IFindDashboardByDate): Promise<IDashboardResponse>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { File } from '../../../shared/entities/stock';
|
|
3
|
+
export type Entity = File;
|
|
4
|
+
export declare const Route = "file";
|
|
5
|
+
export declare const UpperName = "File";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface IFindByOwnerRequest {
|
|
8
|
+
owner_id: string;
|
|
9
|
+
tags?: string;
|
|
10
|
+
shared_only: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ICreateRequest {
|
|
13
|
+
title: string;
|
|
14
|
+
owner_id: string;
|
|
15
|
+
document_header_id: string | null;
|
|
16
|
+
multimedia_id: string;
|
|
17
|
+
filename: string;
|
|
18
|
+
is_customer?: boolean;
|
|
19
|
+
is_private: boolean;
|
|
20
|
+
tags: string;
|
|
21
|
+
username: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IUpdateRequest {
|
|
24
|
+
document_header_id?: string;
|
|
25
|
+
filename?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IRepository {
|
|
28
|
+
findByOwnerId(params: IFindByOwnerRequest): Promise<Entity[]>;
|
|
29
|
+
create(data: ICreateRequest): Promise<Entity>;
|
|
30
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
31
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import joi from 'joi';
|
|
2
|
+
import { IFindByOwnerRequest } from './interface';
|
|
3
|
+
export declare const createBody: joi.ObjectSchema<any>;
|
|
4
|
+
export declare const updateBody: joi.ObjectSchema<any>;
|
|
5
|
+
export declare const findByOwnerIdQuery: joi.ObjectSchema<IFindByOwnerRequest>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Location, TypeOfLocation } from '../../../shared/entities/stock';
|
|
3
|
+
export type Entity = Location;
|
|
4
|
+
export declare const Route = "location";
|
|
5
|
+
export declare const UpperName = "Location";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
interface IFindDetailedResponse extends Entity {
|
|
8
|
+
type_of_location: TypeOfLocation;
|
|
9
|
+
}
|
|
10
|
+
export type IFindByIdResponse = Omit<IFindDetailedResponse, 'type_of_location'>;
|
|
11
|
+
export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, 'type_of_location'>;
|
|
12
|
+
export type IFindRequest = Record<string, unknown>;
|
|
13
|
+
export type IFindResponse = Omit<IFindDetailedResponse, ''>;
|
|
14
|
+
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
15
|
+
}
|
|
16
|
+
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, 'type_of_location'>>;
|
|
17
|
+
export interface ICreateRequest {
|
|
18
|
+
name: string;
|
|
19
|
+
street: string;
|
|
20
|
+
country_id: string;
|
|
21
|
+
country_name: string;
|
|
22
|
+
locality: string;
|
|
23
|
+
postal_code: string;
|
|
24
|
+
type_of_location_id: string;
|
|
25
|
+
geolocation?: {
|
|
26
|
+
lat: number;
|
|
27
|
+
lon: number;
|
|
28
|
+
};
|
|
29
|
+
default_billing?: boolean;
|
|
30
|
+
default_delivery?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface IUpdateRequest {
|
|
33
|
+
name?: string;
|
|
34
|
+
street?: string;
|
|
35
|
+
locality?: string;
|
|
36
|
+
country_id?: string;
|
|
37
|
+
country_name?: string;
|
|
38
|
+
postal_code?: string;
|
|
39
|
+
type_of_location_id?: string;
|
|
40
|
+
geolocation?: {
|
|
41
|
+
lat?: number;
|
|
42
|
+
lon?: number;
|
|
43
|
+
};
|
|
44
|
+
default_billing?: boolean;
|
|
45
|
+
default_delivery?: boolean;
|
|
46
|
+
}
|
|
47
|
+
export interface IRepository {
|
|
48
|
+
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
49
|
+
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
50
|
+
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
51
|
+
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
52
|
+
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
53
|
+
create(data: ICreateRequest): Promise<IFindResponse>;
|
|
54
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
|
|
55
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
|
|
56
|
+
}
|
|
57
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { DocumentLineNote } from '../../../shared/entities/stock';
|
|
2
|
+
import * as IShared from '../../../shared/interface';
|
|
3
|
+
export declare const Route = "prison";
|
|
4
|
+
export declare const UpperName = "Prison";
|
|
5
|
+
export declare const LowerName: string;
|
|
6
|
+
export interface IFindLinesInPrisonResponse {
|
|
7
|
+
id: string;
|
|
8
|
+
quantity: number;
|
|
9
|
+
preco_custo: number;
|
|
10
|
+
id_provider: number;
|
|
11
|
+
product: {
|
|
12
|
+
id: string;
|
|
13
|
+
thumbnail_multimedia_id: string | null;
|
|
14
|
+
virtual: {
|
|
15
|
+
designation: string;
|
|
16
|
+
reference: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
notes: DocumentLineNote[];
|
|
20
|
+
updated_by: string;
|
|
21
|
+
updated_at: Date;
|
|
22
|
+
}
|
|
23
|
+
export declare const checkLineInPrisonOptions: readonly ["Desprender", "Quebrar", "Devolver a fornecedor"];
|
|
24
|
+
export type ICheckLineInPrisonOptions = (typeof checkLineInPrisonOptions)[number];
|
|
25
|
+
export interface ICheckLinesInPrisonLinesRequest {
|
|
26
|
+
document_line_id: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ICheckLinesInPrisonRequest {
|
|
29
|
+
option: ICheckLineInPrisonOptions;
|
|
30
|
+
lines: ICheckLinesInPrisonLinesRequest[];
|
|
31
|
+
}
|
|
32
|
+
export interface ICreateLinesInPrisonProduct {
|
|
33
|
+
id: string;
|
|
34
|
+
quantity: number;
|
|
35
|
+
note?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ICreateLinesInPrisonRequest {
|
|
38
|
+
products: ICreateLinesInPrisonProduct[];
|
|
39
|
+
createProviderReturn: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface IRepository {
|
|
42
|
+
findLinesInPrison(): Promise<IFindLinesInPrisonResponse[]>;
|
|
43
|
+
findLinesInPrisonProviders(): Promise<IShared.IFindMinifiedResponse[]>;
|
|
44
|
+
putLineInPrison(params: IShared.IFindByIdRequest): Promise<void>;
|
|
45
|
+
removeLineFromPrison(params: IShared.IFindByIdRequest): Promise<void>;
|
|
46
|
+
checkLinesInPrison(params: ICheckLinesInPrisonRequest): Promise<void>;
|
|
47
|
+
createLinesInPrison(params: ICreateLinesInPrisonRequest): Promise<string[]>;
|
|
48
|
+
}
|
|
49
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|