@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,38 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Swift } from '../../../shared/entities/user';
|
|
3
|
+
export type Entity = Swift;
|
|
4
|
+
export declare const Route = "swift";
|
|
5
|
+
export declare const UpperName = "Swift";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
type IFindDetailedResponse = Entity;
|
|
8
|
+
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
9
|
+
export type IFindRequest = Record<string, unknown>;
|
|
10
|
+
export type IFindResponse = Omit<IFindDetailedResponse, ''>;
|
|
11
|
+
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
12
|
+
}
|
|
13
|
+
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
|
|
14
|
+
export interface ICreateRequest {
|
|
15
|
+
bank: string;
|
|
16
|
+
city: string;
|
|
17
|
+
branch?: string;
|
|
18
|
+
code: string;
|
|
19
|
+
country_id: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IUpdateRequest {
|
|
22
|
+
bank?: string;
|
|
23
|
+
city?: string;
|
|
24
|
+
branch?: string | null;
|
|
25
|
+
code?: string;
|
|
26
|
+
country_id?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface IRepository {
|
|
29
|
+
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
30
|
+
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
31
|
+
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
32
|
+
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
33
|
+
create(data: ICreateRequest): Promise<Entity>;
|
|
34
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
35
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
36
|
+
}
|
|
37
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Tenant } from '../../../shared/entities/user';
|
|
3
|
+
export type Entity = Tenant;
|
|
4
|
+
export declare const Route = "tenant";
|
|
5
|
+
export declare const UpperName = "Tenant";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface ICreateRequest {
|
|
8
|
+
name: string;
|
|
9
|
+
customer_id: string;
|
|
10
|
+
taxpayer_number: string;
|
|
11
|
+
commercial_registration_number?: number | null;
|
|
12
|
+
share_capital?: number | null;
|
|
13
|
+
conservatory?: string | null;
|
|
14
|
+
logo?: string | null;
|
|
15
|
+
email: string;
|
|
16
|
+
address: string;
|
|
17
|
+
postal_code: string;
|
|
18
|
+
locality: string;
|
|
19
|
+
country: string;
|
|
20
|
+
Timezone?: string | null;
|
|
21
|
+
telephone?: string | null;
|
|
22
|
+
fax?: string | null;
|
|
23
|
+
website?: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface IUpdateRequest {
|
|
26
|
+
name?: string;
|
|
27
|
+
customer_id?: string;
|
|
28
|
+
taxpayer_number?: string;
|
|
29
|
+
commercial_registration_number?: number | null;
|
|
30
|
+
share_capital?: number | null;
|
|
31
|
+
conservatory?: string | null;
|
|
32
|
+
logo?: string | null;
|
|
33
|
+
email?: string;
|
|
34
|
+
address?: string;
|
|
35
|
+
postal_code?: string;
|
|
36
|
+
locality?: string;
|
|
37
|
+
country?: string;
|
|
38
|
+
Timezone?: string | null;
|
|
39
|
+
telephone?: string | null;
|
|
40
|
+
fax?: string | null;
|
|
41
|
+
website?: string | null;
|
|
42
|
+
}
|
|
43
|
+
export interface IRepository {
|
|
44
|
+
find(): Promise<Entity[]>;
|
|
45
|
+
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
46
|
+
create(data: ICreateRequest): Promise<Entity>;
|
|
47
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
48
|
+
}
|
|
49
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Theme } from '../../../shared/entities/user';
|
|
3
|
+
export type Entity = Theme;
|
|
4
|
+
export declare const Route = "theme";
|
|
5
|
+
export declare const UpperName = "Theme";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface ISessionStorageColor {
|
|
8
|
+
name: string;
|
|
9
|
+
hex: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ICreateOrUpdateRequest {
|
|
12
|
+
colors: ISessionStorageColor[];
|
|
13
|
+
store_operator_id: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IRepository {
|
|
16
|
+
createOrUpdate(data: ICreateOrUpdateRequest): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { UserPermissions, GroupPermissions, Permissions } from '../../../shared/entities/user';
|
|
3
|
+
export type Entity = UserPermissions;
|
|
4
|
+
export declare const Route = "user_permissions";
|
|
5
|
+
export declare const UpperName = "UserPermissions";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
interface IFindDetailedResponse extends Entity {
|
|
8
|
+
group_permission: GroupPermissions;
|
|
9
|
+
permission: Permissions;
|
|
10
|
+
}
|
|
11
|
+
export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
12
|
+
export interface ICreateRequest {
|
|
13
|
+
user_id: string;
|
|
14
|
+
permission_id: number;
|
|
15
|
+
group_id: number;
|
|
16
|
+
}
|
|
17
|
+
export interface IRepository {
|
|
18
|
+
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
19
|
+
create(data: ICreateRequest): Promise<IFindByOwnerIdResponse>;
|
|
20
|
+
deleteOne(selector: IShared.IFindByIdNumberRequest): Promise<IFindByOwnerIdResponse | null>;
|
|
21
|
+
}
|
|
22
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { UserPositions } from '../../../shared/entities/user';
|
|
3
|
+
export type Entity = UserPositions;
|
|
4
|
+
export declare const Route = "user_positions";
|
|
5
|
+
export declare const UpperName = "UserPositions";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
type IFindDetailedResponse = Entity;
|
|
8
|
+
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
9
|
+
export type IFindRequest = Record<string, unknown>;
|
|
10
|
+
export type IFindResponse = Omit<IFindDetailedResponse, ''>;
|
|
11
|
+
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
12
|
+
}
|
|
13
|
+
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
|
|
14
|
+
export interface ICreateRequest {
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IUpdateRequest {
|
|
18
|
+
name?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IRepository {
|
|
21
|
+
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
22
|
+
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
23
|
+
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
24
|
+
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
25
|
+
create(data: ICreateRequest): Promise<Entity>;
|
|
26
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
27
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
28
|
+
}
|
|
29
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { UserTokens } from '../../../shared/entities/user';
|
|
3
|
+
export type Entity = UserTokens;
|
|
4
|
+
export declare const Route = "user_token";
|
|
5
|
+
export declare const UpperName = "UserTokens";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export type IFindRequest = Record<string, unknown>;
|
|
8
|
+
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
9
|
+
}
|
|
10
|
+
export type IFindWithPaginationResponse = IShared.IPaginationResponse<UserTokens>;
|
|
11
|
+
export interface ICreateRequest {
|
|
12
|
+
user_id: string;
|
|
13
|
+
expires_date: Date;
|
|
14
|
+
refresh_token: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IUpdateRequest {
|
|
17
|
+
consumed?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface IRepository {
|
|
20
|
+
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
21
|
+
findByToken(id: string): Promise<Entity | null>;
|
|
22
|
+
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<Entity[]>;
|
|
23
|
+
find(selector: IFindRequest): Promise<Entity[]>;
|
|
24
|
+
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
25
|
+
generate(user_id: string): Promise<Entity>;
|
|
26
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
27
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
28
|
+
}
|
|
29
|
+
export type IApi = Omit<IRepository, 'generate' | 'findByToken' | 'update'>;
|
|
30
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Providers, Country, Language, ProviderType, ReasonForExemption, Persona, Clients, SegmentsArea, ClientType, StoreOperator, UserPositions, Commissioner, Users, PaymentMethods, MaturityDates, DeliveryMethods, Vehicles, Theme } from '../../../shared/entities/user';
|
|
3
|
+
export type Entity = Users;
|
|
4
|
+
export type EntityWithoutPassword = Omit<Users, 'password'>;
|
|
5
|
+
export declare const Route = "users";
|
|
6
|
+
export declare const UpperName = "Users";
|
|
7
|
+
export declare const LowerName: string;
|
|
8
|
+
interface IMainPersona extends Persona {
|
|
9
|
+
country: Country | null;
|
|
10
|
+
reason_for_exemption: ReasonForExemption | null;
|
|
11
|
+
}
|
|
12
|
+
interface IStoreOperator extends Pick<StoreOperator, 'id' | 'location_id'> {
|
|
13
|
+
main_persona: Pick<Persona, 'name' | 'email'>;
|
|
14
|
+
theme: Pick<Theme, 'colors'>;
|
|
15
|
+
}
|
|
16
|
+
export interface IFindByAccountResponse extends Pick<Entity, 'id' | 'account'> {
|
|
17
|
+
store_operator: IStoreOperator;
|
|
18
|
+
}
|
|
19
|
+
export interface IFindByIdResponse extends EntityWithoutPassword {
|
|
20
|
+
provider: (Providers & {
|
|
21
|
+
country: Country | null;
|
|
22
|
+
language: Language | null;
|
|
23
|
+
support_language: Language | null;
|
|
24
|
+
provider_type: ProviderType | null;
|
|
25
|
+
default_payment_method: PaymentMethods | null;
|
|
26
|
+
default_maturity_date: MaturityDates | null;
|
|
27
|
+
default_delivery_method: DeliveryMethods | null;
|
|
28
|
+
default_vehicle: Vehicles | null;
|
|
29
|
+
main_persona: IMainPersona;
|
|
30
|
+
}) | null;
|
|
31
|
+
client: (Clients & {
|
|
32
|
+
country: Country | null;
|
|
33
|
+
language: Language | null;
|
|
34
|
+
segments_area: SegmentsArea | null;
|
|
35
|
+
client_type: ClientType | null;
|
|
36
|
+
default_payment_method: PaymentMethods | null;
|
|
37
|
+
default_maturity_date: MaturityDates | null;
|
|
38
|
+
default_delivery_method: DeliveryMethods | null;
|
|
39
|
+
default_vehicle: Vehicles | null;
|
|
40
|
+
main_persona: IMainPersona;
|
|
41
|
+
}) | null;
|
|
42
|
+
store_operator: (StoreOperator & {
|
|
43
|
+
user_position: UserPositions | null;
|
|
44
|
+
support_language: Language | null;
|
|
45
|
+
main_persona: IMainPersona;
|
|
46
|
+
}) | null;
|
|
47
|
+
commissioner: (Commissioner & {
|
|
48
|
+
country: Country | null;
|
|
49
|
+
language: Language | null;
|
|
50
|
+
default_payment_method: PaymentMethods | null;
|
|
51
|
+
default_maturity_date: MaturityDates | null;
|
|
52
|
+
default_delivery_method: DeliveryMethods | null;
|
|
53
|
+
default_vehicle: Vehicles | null;
|
|
54
|
+
main_persona: IMainPersona;
|
|
55
|
+
}) | null;
|
|
56
|
+
}
|
|
57
|
+
export type IFindRequest = Record<string, unknown>;
|
|
58
|
+
export type IFindResponse = EntityWithoutPassword;
|
|
59
|
+
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
60
|
+
}
|
|
61
|
+
export type IFindWithPaginationResponse = IShared.IPaginationResponse<EntityWithoutPassword>;
|
|
62
|
+
export interface IFindProvidersWithClientIdResponse {
|
|
63
|
+
name: string;
|
|
64
|
+
provider_id: string;
|
|
65
|
+
client_id: string | null;
|
|
66
|
+
}
|
|
67
|
+
export interface IFindProvidersWithClientIdRequest {
|
|
68
|
+
provider_ids: string[];
|
|
69
|
+
}
|
|
70
|
+
export interface ICreateRequest {
|
|
71
|
+
account: string | null;
|
|
72
|
+
password: string;
|
|
73
|
+
}
|
|
74
|
+
export interface IUpdateRequest {
|
|
75
|
+
account?: string | null;
|
|
76
|
+
old_password?: string;
|
|
77
|
+
password?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface IUpdatePassword {
|
|
80
|
+
password: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ISendForgotPassword {
|
|
83
|
+
token: string;
|
|
84
|
+
user: {
|
|
85
|
+
name: string;
|
|
86
|
+
email: string;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export interface IFindFromClientOrProviderRequest {
|
|
90
|
+
ids: string[];
|
|
91
|
+
}
|
|
92
|
+
export interface IFindFromClientOrProviderResponse {
|
|
93
|
+
name: string;
|
|
94
|
+
provider: string | null;
|
|
95
|
+
provider_id: string | null;
|
|
96
|
+
client_id: string | null;
|
|
97
|
+
iban: string | null;
|
|
98
|
+
}
|
|
99
|
+
export interface IRepository {
|
|
100
|
+
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse | null>;
|
|
101
|
+
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
102
|
+
find(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
103
|
+
findPaginated(selector: IFindPaginatedRequest): Promise<IFindWithPaginationResponse>;
|
|
104
|
+
resetPassword(id: string, data: IUpdatePassword): Promise<Users>;
|
|
105
|
+
removeAccess(user_id: string): Promise<boolean>;
|
|
106
|
+
create(data: ICreateRequest): Promise<IFindResponse>;
|
|
107
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IFindResponse | null>;
|
|
108
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<IFindResponse | null>;
|
|
109
|
+
findProvidersWithClientId(data: IFindProvidersWithClientIdRequest): Promise<IFindProvidersWithClientIdResponse[]>;
|
|
110
|
+
findFromClientOrProviderId(data: IFindFromClientOrProviderRequest): Promise<IFindFromClientOrProviderResponse[]>;
|
|
111
|
+
}
|
|
112
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
113
|
+
export type IApi = Omit<IRepository, 'resetPassword' | 'removeAccess'>;
|
|
114
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import joi from 'joi';
|
|
2
|
+
export declare const createBody: joi.ObjectSchema<any>;
|
|
3
|
+
export declare const updateBody: joi.ObjectSchema<any>;
|
|
4
|
+
export declare const findQuery: joi.ObjectSchema<any>;
|
|
5
|
+
export declare const findProvidersWithClientIdQuery: joi.ObjectSchema<any>;
|
|
6
|
+
export declare const findFromClientOrProviderIdBody: joi.ObjectSchema<any>;
|
|
7
|
+
export declare const findWithPaginationQuery: joi.ObjectSchema<any>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { Vehicles } from '../../../shared/entities/user';
|
|
3
|
+
export type Entity = Vehicles;
|
|
4
|
+
export declare const Route = "vehicles";
|
|
5
|
+
export declare const UpperName = "Vehicles";
|
|
6
|
+
export declare const LowerName: string;
|
|
7
|
+
export interface ICreateRequest {
|
|
8
|
+
description: string;
|
|
9
|
+
vehicle_id: number;
|
|
10
|
+
number_plate: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IUpdateRequest {
|
|
13
|
+
description?: string;
|
|
14
|
+
vehicle_id?: number;
|
|
15
|
+
number_plate?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IRepository {
|
|
18
|
+
find(): Promise<Entity[]>;
|
|
19
|
+
findById(id: string): Promise<Entity | null>;
|
|
20
|
+
create(data: ICreateRequest): Promise<Entity>;
|
|
21
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
22
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
23
|
+
}
|
|
24
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
25
|
+
export type IApi = Omit<IRepository, 'findById'>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ZipCode } from '../../../shared/entities/user';
|
|
2
|
+
export type Entity = ZipCode;
|
|
3
|
+
export declare const Route = "zip_code";
|
|
4
|
+
export declare const UpperName = "ZipCode";
|
|
5
|
+
export declare const LowerName: string;
|
|
6
|
+
export interface ICreateRequest {
|
|
7
|
+
postal_code: string;
|
|
8
|
+
address: string;
|
|
9
|
+
locality: string;
|
|
10
|
+
parish: string;
|
|
11
|
+
county: string;
|
|
12
|
+
county_code: number;
|
|
13
|
+
district: string;
|
|
14
|
+
latitude: string;
|
|
15
|
+
longitude: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IFindByPostalCode {
|
|
18
|
+
postal_code: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IRepository {
|
|
21
|
+
findByPostalCode(params: IFindByPostalCode): Promise<Entity[]>;
|
|
22
|
+
create(data: ICreateRequest[]): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export declare const Route = "admin_panel";
|
|
2
|
+
export declare const UpperName = "AdminPanel";
|
|
3
|
+
export declare const LowerName: string;
|
|
4
|
+
export interface ICalendar {
|
|
5
|
+
year: number;
|
|
6
|
+
month: number;
|
|
7
|
+
day: number;
|
|
8
|
+
}
|
|
9
|
+
export interface IServiceStatus {
|
|
10
|
+
tier: string;
|
|
11
|
+
service: string;
|
|
12
|
+
color: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IServiceLogs {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IPostgresBackup extends ICalendar {
|
|
20
|
+
done: boolean;
|
|
21
|
+
service: string;
|
|
22
|
+
size: number;
|
|
23
|
+
}
|
|
24
|
+
export interface IProposta {
|
|
25
|
+
label: string;
|
|
26
|
+
url: string;
|
|
27
|
+
done: boolean;
|
|
28
|
+
error: string | null;
|
|
29
|
+
lines: number;
|
|
30
|
+
groups: string;
|
|
31
|
+
duration: number;
|
|
32
|
+
created_at: Date;
|
|
33
|
+
}
|
|
34
|
+
export interface ITask extends ICalendar {
|
|
35
|
+
count: number;
|
|
36
|
+
}
|
|
37
|
+
export interface IStock {
|
|
38
|
+
created_at: Date;
|
|
39
|
+
inserts: number;
|
|
40
|
+
updates: number;
|
|
41
|
+
deletes: number;
|
|
42
|
+
error: string | null;
|
|
43
|
+
}
|
|
44
|
+
export interface IEncomenda extends ICalendar {
|
|
45
|
+
finds: number;
|
|
46
|
+
misses: number;
|
|
47
|
+
price_updates: number;
|
|
48
|
+
new_products: number;
|
|
49
|
+
pre_artigo_count: number;
|
|
50
|
+
error_count: number;
|
|
51
|
+
}
|
|
52
|
+
export interface IPrint extends ICalendar {
|
|
53
|
+
label: string;
|
|
54
|
+
completed: number;
|
|
55
|
+
undone: number;
|
|
56
|
+
unsent: number;
|
|
57
|
+
avg_time_to_complete: number;
|
|
58
|
+
}
|
|
59
|
+
export interface IEventstore extends ICalendar {
|
|
60
|
+
label: string;
|
|
61
|
+
count: number;
|
|
62
|
+
avg_response_time: number;
|
|
63
|
+
max_response_time: number;
|
|
64
|
+
min_response_time: number;
|
|
65
|
+
}
|
|
66
|
+
export interface IProjectInfo extends ICalendar {
|
|
67
|
+
label: string;
|
|
68
|
+
email_sent: boolean;
|
|
69
|
+
document_header_created: boolean;
|
|
70
|
+
time_to_complete: number;
|
|
71
|
+
}
|
|
72
|
+
export interface IMultimedia extends ICalendar {
|
|
73
|
+
uploads: number;
|
|
74
|
+
size: number;
|
|
75
|
+
}
|
|
76
|
+
export interface IMultimediaSummary {
|
|
77
|
+
total: number;
|
|
78
|
+
obsolete: number;
|
|
79
|
+
}
|
|
80
|
+
export interface ICron extends ICalendar {
|
|
81
|
+
label: string;
|
|
82
|
+
avg_time_to_complete: number;
|
|
83
|
+
count: number;
|
|
84
|
+
error_count: number;
|
|
85
|
+
}
|
|
86
|
+
export interface IEmail extends ICalendar {
|
|
87
|
+
label: string;
|
|
88
|
+
count: number;
|
|
89
|
+
errors: number;
|
|
90
|
+
events: number;
|
|
91
|
+
}
|
|
92
|
+
export interface IError extends ICalendar {
|
|
93
|
+
label: string;
|
|
94
|
+
count: number;
|
|
95
|
+
description: string;
|
|
96
|
+
}
|
|
97
|
+
export interface IChat extends ICalendar {
|
|
98
|
+
count: number;
|
|
99
|
+
processed: number;
|
|
100
|
+
delivered: number;
|
|
101
|
+
}
|
|
102
|
+
export interface IKafka extends ICalendar {
|
|
103
|
+
topic: string;
|
|
104
|
+
avg_time_to_complete: number;
|
|
105
|
+
count: number;
|
|
106
|
+
error_count: number;
|
|
107
|
+
}
|
|
108
|
+
export interface IGetDataRequest {
|
|
109
|
+
token: string;
|
|
110
|
+
}
|
|
111
|
+
export interface IGetDataResponse {
|
|
112
|
+
server: {
|
|
113
|
+
services: IServiceStatus[];
|
|
114
|
+
logs: IServiceLogs[];
|
|
115
|
+
certificates: string;
|
|
116
|
+
filesystem: string;
|
|
117
|
+
backups: IPostgresBackup[];
|
|
118
|
+
};
|
|
119
|
+
googleSheets: {
|
|
120
|
+
propostas: IProposta[];
|
|
121
|
+
tasks: ITask[];
|
|
122
|
+
stock: IStock[];
|
|
123
|
+
encomenda: IEncomenda[];
|
|
124
|
+
};
|
|
125
|
+
services: {
|
|
126
|
+
prints: IPrint[];
|
|
127
|
+
eventstores: IEventstore[];
|
|
128
|
+
projectInfos: IProjectInfo[];
|
|
129
|
+
multimedias: IMultimedia[];
|
|
130
|
+
multimediaSummary: IMultimediaSummary;
|
|
131
|
+
crons: ICron[];
|
|
132
|
+
emails: IEmail[];
|
|
133
|
+
errors: IError[];
|
|
134
|
+
chats: IChat[];
|
|
135
|
+
kafka: IKafka[];
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export interface IRepository {
|
|
139
|
+
getData(params: IGetDataRequest): Promise<IGetDataResponse>;
|
|
140
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const Route = "error_handler";
|
|
2
|
+
export declare const UpperName = "ErrorHandler";
|
|
3
|
+
export declare const LowerName: string;
|
|
4
|
+
export declare const IErrorTypeEnum: {
|
|
5
|
+
prisma: 'prisma';
|
|
6
|
+
unhandled: 'unhandled';
|
|
7
|
+
axios: 'axios';
|
|
8
|
+
webapp: 'webapp';
|
|
9
|
+
kafka: 'kafka';
|
|
10
|
+
npc: 'npc';
|
|
11
|
+
};
|
|
12
|
+
export type IErrorType = (typeof IErrorTypeEnum)[keyof typeof IErrorTypeEnum];
|
|
13
|
+
export declare const errorTypes: string[];
|
|
14
|
+
export interface ICreateRequest {
|
|
15
|
+
service: string;
|
|
16
|
+
type: IErrorType;
|
|
17
|
+
error: {
|
|
18
|
+
name: string;
|
|
19
|
+
message: string;
|
|
20
|
+
stack?: string;
|
|
21
|
+
};
|
|
22
|
+
request?: {
|
|
23
|
+
body?: unknown;
|
|
24
|
+
query?: unknown;
|
|
25
|
+
params?: unknown;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface IRepository {
|
|
29
|
+
create(data: ICreateRequest): Promise<void>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model Multimedia
|
|
3
|
+
*/
|
|
4
|
+
export type Multimedia = {
|
|
5
|
+
id: string;
|
|
6
|
+
url: string;
|
|
7
|
+
filepath: string;
|
|
8
|
+
size: number;
|
|
9
|
+
hash: string;
|
|
10
|
+
content_type: string;
|
|
11
|
+
original_filename: string;
|
|
12
|
+
origin_id: string | null;
|
|
13
|
+
created_at: Date;
|
|
14
|
+
updated_at: Date;
|
|
15
|
+
};
|