@nomalism-com/types 1.3.38 → 1.3.39
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.js +854 -1018
- package/dist/main.d.ts +13 -1
- package/dist/modules/document/CAT/interfaces.d.ts +12 -0
- package/dist/modules/document/CAT/route.schema.d.ts +3 -0
- package/dist/modules/document/NRCL/interface.d.ts +1 -3
- package/dist/modules/document/billOfLading/interfaces.d.ts +1 -0
- package/dist/modules/document/inventario/interface.d.ts +0 -2
- package/dist/modules/document/materialEntrance/interfaces.d.ts +10 -6
- package/dist/modules/document/order/interfaces.d.ts +0 -2
- package/dist/modules/document/productionOrder/interfaces.d.ts +1 -0
- package/dist/modules/document/proforma/interfaces.d.ts +1 -0
- package/dist/modules/document/propostaFornecedor/interfaces.d.ts +1 -0
- package/dist/modules/document/propostaSheets/interface.d.ts +1 -3
- package/dist/modules/document/providerCreditNoteFromReturn/interfaces.d.ts +1 -0
- package/dist/modules/document/providerFinancialCreditNote/interfaces.d.ts +1 -0
- package/dist/modules/document/providerServiceInvoice/interfaces.d.ts +1 -0
- package/dist/modules/document/purchase/interfaces.d.ts +0 -2
- package/dist/modules/document/quebra/interfaces.d.ts +0 -2
- package/dist/modules/document/returnToProvider/interface.d.ts +0 -2
- package/dist/modules/document/transformado/interfaces.d.ts +0 -2
- package/dist/modules/document/upfrontReturn/interfaces.d.ts +0 -2
- package/dist/modules/documentManagement/multimedia/interfaces.d.ts +1 -2
- package/dist/modules/integration/emailLog/interfaces.d.ts +0 -2
- package/dist/modules/integration/emailTemplate/interfaces.d.ts +0 -2
- package/dist/modules/integration/emailTemplateAttachment/interfaces.d.ts +0 -2
- package/dist/modules/integration/emailVerification/interfaces.d.ts +0 -2
- package/dist/modules/integration/googleFilePermission/interfaces.d.ts +0 -2
- package/dist/modules/integration/googleSheets/interfaces.d.ts +0 -2
- package/dist/modules/integration/observation/interfaces.d.ts +0 -2
- package/dist/modules/integration/observationType/interfaces.d.ts +1 -3
- package/dist/modules/integration/patchNotes/interfaces.d.ts +0 -2
- package/dist/modules/integration/projectInfo/interfaces.d.ts +0 -2
- package/dist/modules/integration/settings/interfaces.d.ts +0 -2
- package/dist/modules/llm/llm/interfaces.d.ts +5 -0
- package/dist/modules/print/npc/interfaces.d.ts +0 -2
- package/dist/modules/print/printer/interfaces.d.ts +0 -2
- package/dist/modules/print/schedulePrintJob/interfaces.d.ts +0 -2
- package/dist/modules/stock/accountCode/interface.d.ts +0 -2
- package/dist/modules/stock/chat/interfaces.d.ts +0 -2
- package/dist/modules/stock/chatRapidMessage/interface.d.ts +1 -3
- package/dist/modules/stock/conferirEncomenda/interface.d.ts +2 -3
- package/dist/modules/stock/dashboard/interface.d.ts +0 -2
- package/dist/modules/stock/file/interface.d.ts +0 -2
- package/dist/modules/stock/gmails/interface.d.ts +0 -2
- package/dist/modules/stock/googleCalendar/interface.d.ts +0 -2
- package/dist/modules/stock/googleSheetPool/interface.d.ts +0 -2
- package/dist/modules/stock/location/interface.d.ts +0 -2
- package/dist/modules/stock/mobilePrint/interface.d.ts +13 -0
- package/dist/modules/stock/mobilePrint/route.schema.d.ts +2 -0
- package/dist/modules/stock/prison/interface.d.ts +0 -2
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +7 -4
- package/dist/modules/stock/productGoogleSheets/route.schema.d.ts +2 -1
- package/dist/modules/stock/productImage/interface.d.ts +0 -2
- package/dist/modules/stock/productLocation/interface.d.ts +18 -0
- package/dist/modules/stock/promotion/interface.d.ts +0 -2
- package/dist/modules/stock/promotionAssoc/interface.d.ts +0 -2
- package/dist/modules/stock/queryList/interfaces.d.ts +0 -2
- package/dist/modules/stock/queryParameter/interfaces.d.ts +0 -2
- package/dist/modules/stock/recurrentTasks/interface.d.ts +0 -2
- package/dist/modules/stock/returnReason/interfaces.d.ts +0 -2
- package/dist/modules/stock/savedEmPicking/interfaces.d.ts +0 -2
- package/dist/modules/stock/savedProviderProposal/interfaces.d.ts +0 -2
- package/dist/modules/stock/stockMovement/interface.d.ts +0 -2
- package/dist/modules/stock/tag/interface.d.ts +0 -2
- package/dist/modules/stock/task/interface.d.ts +0 -2
- package/dist/modules/stock/taskMessage/interface.d.ts +0 -2
- package/dist/modules/stock/taskRead/interface.d.ts +0 -2
- package/dist/modules/stock/typeOfLocation/interface.d.ts +0 -2
- package/dist/modules/stock/unitOfMeasure/interface.d.ts +0 -2
- package/dist/modules/stock/vatTax/interface.d.ts +0 -2
- package/dist/modules/stock/vatTaxZone/interface.d.ts +0 -2
- package/dist/modules/stock/vatValidation/interfaces.d.ts +0 -2
- package/dist/modules/stock/workflow/interfaces.d.ts +0 -2
- package/dist/modules/supply/currentAccount/interface.d.ts +5 -6
- package/dist/modules/supply/documentHeader/interfaces.d.ts +5 -19
- package/dist/modules/supply/documentHeader/route.schema.d.ts +0 -1
- package/dist/modules/supply/documentHeaderHistory/interfaces.d.ts +1 -3
- package/dist/modules/supply/documentHeaderSubscriber/interface.d.ts +1 -3
- package/dist/modules/supply/documentHeaderSurvey/interfaces.d.ts +1 -3
- package/dist/modules/supply/documentLine/interfaces.d.ts +3 -4
- package/dist/modules/supply/documentLine/route.schema.d.ts +2 -1
- package/dist/modules/supply/documentLineAssoc/interfaces.d.ts +1 -3
- package/dist/modules/supply/documentLineMT/interface.d.ts +0 -2
- package/dist/modules/supply/documentLineNote/interfaces.d.ts +1 -3
- package/dist/modules/supply/documentLineRM/interface.d.ts +0 -2
- package/dist/modules/supply/documentSet/interface.d.ts +0 -2
- package/dist/modules/supply/documentType/interfaces.d.ts +3 -3
- package/dist/modules/supply/externalDocumentHeader/interface.d.ts +0 -2
- package/dist/modules/supply/externalDocumentType/interface.d.ts +0 -2
- package/dist/modules/supply/orderManagement/interface.d.ts +0 -2
- package/dist/modules/supply/payment/interface.d.ts +0 -2
- package/dist/modules/supply/paymentBatch/interface.d.ts +1 -3
- package/dist/modules/supply/preSale/interface.d.ts +0 -2
- package/dist/modules/supply/preSaleProduct/interface.d.ts +0 -2
- package/dist/modules/supply/schedule/interface.d.ts +0 -2
- package/dist/modules/supply/startDocumentHeaderLastUpdate/interface.d.ts +0 -2
- package/dist/modules/tickets/channel/interfaces.d.ts +0 -2
- package/dist/modules/tickets/clt/interfaces.d.ts +0 -2
- package/dist/modules/tickets/language/interfaces.d.ts +0 -2
- package/dist/modules/tickets/tickets/interfaces.d.ts +0 -2
- package/dist/modules/ui/portal/interface.d.ts +1 -0
- package/dist/modules/ui/sideMenu/interface.d.ts +2 -0
- package/dist/modules/ui/sidemenuHighlight/interface.d.ts +34 -0
- package/dist/modules/ui/sidemenuHighlight/route.schema.d.ts +3 -0
- package/dist/modules/user/bankData/interface.d.ts +0 -2
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +6 -2
- package/dist/modules/user/chatSubscribers/route.schema.d.ts +2 -0
- package/dist/modules/user/clientType/interface.d.ts +0 -2
- package/dist/modules/user/clients/interface.d.ts +0 -2
- package/dist/modules/user/commissioner/interface.d.ts +0 -2
- package/dist/modules/user/country/interface.d.ts +0 -2
- package/dist/modules/user/deliveryMethods/interfaces.d.ts +0 -2
- package/dist/modules/user/favorites/interfaces.d.ts +0 -2
- package/dist/modules/user/language/interface.d.ts +0 -2
- package/dist/modules/user/maturityDates/interfaces.d.ts +0 -2
- package/dist/modules/user/paymentMethods/interfaces.d.ts +0 -2
- package/dist/modules/user/persona/interface.d.ts +0 -2
- package/dist/modules/user/providerType/interface.d.ts +0 -2
- package/dist/modules/user/providers/interface.d.ts +0 -2
- package/dist/modules/user/purchaseConditions/interface.d.ts +0 -2
- package/dist/modules/user/reasonForExemption/interface.d.ts +0 -2
- package/dist/modules/user/refreshToken/interface.d.ts +1 -1
- package/dist/modules/user/segmentsArea/interface.d.ts +0 -2
- package/dist/modules/user/sessions/interface.d.ts +5 -0
- package/dist/modules/user/shippings/interface.d.ts +0 -2
- package/dist/modules/user/storeOperator/interface.d.ts +1 -2
- package/dist/modules/user/swift/interface.d.ts +0 -2
- package/dist/modules/user/systemModule/interface.d.ts +43 -0
- package/dist/modules/user/systemModule/route.schema.d.ts +3 -0
- package/dist/modules/user/tenant/interface.d.ts +0 -2
- package/dist/modules/user/theme/interfaces.d.ts +0 -2
- package/dist/modules/user/timeSheet/interfaces.d.ts +73 -0
- package/dist/modules/user/timeSheet/route.schema.d.ts +3 -0
- package/dist/modules/user/userPositions/interface.d.ts +0 -2
- package/dist/modules/user/userTokens/interface.d.ts +0 -2
- package/dist/modules/user/users/interface.d.ts +3 -3
- package/dist/modules/user/vehicles/interfaces.d.ts +0 -2
- package/dist/modules/user/zipCode/interfaces.d.ts +0 -2
- package/dist/modules/view/adminPanel/interfaces.d.ts +0 -2
- package/dist/modules/view/errorLog/interfaces.d.ts +1 -3
- package/dist/modules/view/webSocket/interfaces.d.ts +94 -0
- package/dist/shared/entities/stock.d.ts +15 -0
- package/dist/shared/entities/user.d.ts +43 -42
- package/dist/shared/interface.d.ts +33 -14
- package/package.json +8 -8
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
2
|
import type { IDocumentTypeUserType } from '../../supply/documentType/interfaces';
|
|
3
|
+
export declare const Route = "sidemenu";
|
|
3
4
|
export interface IFindSideMenuCountersResponse {
|
|
4
5
|
counts: Record<string, number>;
|
|
5
6
|
timestamp: string;
|
|
@@ -23,6 +24,7 @@ export interface IFindByDocumentLineStateResponse {
|
|
|
23
24
|
identifier: string | null;
|
|
24
25
|
created_at: Date;
|
|
25
26
|
created_by: string;
|
|
27
|
+
seller: string;
|
|
26
28
|
who_handles: string | null;
|
|
27
29
|
tags: string | null;
|
|
28
30
|
adjudicated: boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { SidemenuHightlight } from '../../../shared/entities/stock';
|
|
2
|
+
import * as IShared from '../../../shared/interface';
|
|
3
|
+
import type { IDocumentTypeUserType } from '../../supply/documentType/interfaces';
|
|
4
|
+
export declare const Route = "sidemenu_highlight";
|
|
5
|
+
export type Entity = SidemenuHightlight;
|
|
6
|
+
export interface IHighlightItem {
|
|
7
|
+
user_type: IDocumentTypeUserType;
|
|
8
|
+
state: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const highlightValueSeparator = "|:|";
|
|
11
|
+
/** Serialize / parse helpers for the composite "user_type|:|state" value. */
|
|
12
|
+
export declare const buildHighlightValue: (item: IHighlightItem) => string;
|
|
13
|
+
export declare const parseHighlightValue: (value: string) => IHighlightItem | null;
|
|
14
|
+
export interface IFindResponseItem {
|
|
15
|
+
store_operator_id: string;
|
|
16
|
+
values: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface IFindByStoreOperatorIdRequest {
|
|
19
|
+
store_operator_id: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IFindByStoreOperatorIdResponse {
|
|
22
|
+
store_operator_id: string;
|
|
23
|
+
values: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface ISetStoreOperatorHighlightsRequest {
|
|
26
|
+
store_operator_id: string;
|
|
27
|
+
values: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface IRepository {
|
|
30
|
+
find(): Promise<IFindResponseItem[]>;
|
|
31
|
+
findByStoreOperatorId(selector: IFindByStoreOperatorIdRequest): Promise<IFindByStoreOperatorIdResponse>;
|
|
32
|
+
setStoreOperatorHighlights(data: ISetStoreOperatorHighlightsRequest): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { BankData, Country, Swift } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = BankData;
|
|
4
4
|
export declare const Route = "bank_data";
|
|
5
|
-
export declare const UpperName = "BankData";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
interface IFindDetailedResponse extends Entity {
|
|
8
6
|
swift: Swift | null;
|
|
9
7
|
country: Country;
|
|
@@ -2,8 +2,6 @@ import { ChatSubscriber, Persona } from './../../../shared/entities/user';
|
|
|
2
2
|
import * as IShared from '../../../shared/interface';
|
|
3
3
|
export type Entity = ChatSubscriber;
|
|
4
4
|
export declare const Route = "chat_subscriber";
|
|
5
|
-
export declare const UpperName = "ChatSubscriber";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export interface ICreateOrUpdateRequest {
|
|
8
6
|
chat_document_header_id: string;
|
|
9
7
|
personas_ids: string[];
|
|
@@ -12,6 +10,10 @@ export interface IFindDocumentHeaderSubscribersRequest {
|
|
|
12
10
|
owner_id?: string;
|
|
13
11
|
chat_document_header_id: string;
|
|
14
12
|
}
|
|
13
|
+
export interface IFindDocumentHeaderSubscribersByLanguageRequest {
|
|
14
|
+
chat_document_header_id: string;
|
|
15
|
+
language_id: string;
|
|
16
|
+
}
|
|
15
17
|
export interface IFindSubscribedDocumentHeadersRequest {
|
|
16
18
|
owner_id: string;
|
|
17
19
|
}
|
|
@@ -24,10 +26,12 @@ export interface IEntityWithPersonaAndSubscriptions extends IPersona {
|
|
|
24
26
|
}
|
|
25
27
|
export interface IRepository {
|
|
26
28
|
findDocumentHeaderSubscribers(selector: IFindDocumentHeaderSubscribersRequest): Promise<IEntityWithPersona[]>;
|
|
29
|
+
findDocumentHeaderSubscribersByLanguage(selector: IFindDocumentHeaderSubscribersByLanguageRequest): Promise<string[]>;
|
|
27
30
|
findSubscribedDocumentHeaders(selector: IFindSubscribedDocumentHeadersRequest): Promise<IEntityWithPersonaAndSubscriptions>;
|
|
28
31
|
findById(selector: IShared.IFindByIdRequest): Promise<IEntityWithPersonaAndSubscriptions>;
|
|
29
32
|
createOrUpdate(data: ICreateOrUpdateRequest): Promise<string>;
|
|
30
33
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
31
34
|
deleteByDocumentHeader(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
35
|
+
publicAuthenticate(selector: IShared.IFindByIdRequest): Promise<string | null>;
|
|
32
36
|
}
|
|
33
37
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
|
+
import { type IFindDocumentHeaderSubscribersByLanguageRequest } from './interfaces';
|
|
2
3
|
export declare const createOrUpdateBody: joi.ObjectSchema<any>;
|
|
3
4
|
export declare const findDocumentHeaderSubscribersQuery: joi.ObjectSchema<any>;
|
|
5
|
+
export declare const findDocumentHeaderSubscribersByLanguageQuery: joi.ObjectSchema<IFindDocumentHeaderSubscribersByLanguageRequest>;
|
|
4
6
|
export declare const findSubscribedDocumentHeadersQuery: joi.ObjectSchema<any>;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { ClientType } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = ClientType;
|
|
4
4
|
export declare const Route = "client_type";
|
|
5
|
-
export declare const UpperName = "ClientType";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
type IFindDetailedResponse = Entity;
|
|
8
6
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
9
7
|
export type IFindRequest = Record<string, unknown>;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { Clients, Users, Country, ReasonForExemption, ClientType, SegmentsArea, Language, Vehicles, DeliveryMethods, MaturityDates, PaymentMethods, Persona } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = Clients;
|
|
4
4
|
export declare const Route = "client";
|
|
5
|
-
export declare const UpperName = "Clients";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
interface IMainPersona extends Persona {
|
|
8
6
|
country: Country | null;
|
|
9
7
|
reason_for_exemption: ReasonForExemption | null;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { type Commissioner, type Users, type Country, type Language, type PaymentMethods, type DeliveryMethods, type MaturityDates, type Vehicles, type Persona, type ReasonForExemption } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = Commissioner;
|
|
4
4
|
export declare const Route = "commissioner";
|
|
5
|
-
export declare const UpperName = "Commissioner";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
interface IMainPersona extends Persona {
|
|
8
6
|
country: Country | null;
|
|
9
7
|
reason_for_exemption: ReasonForExemption | null;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { Country } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = Country;
|
|
4
4
|
export declare const Route = "country";
|
|
5
|
-
export declare const UpperName = "Country";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
type IFindDetailedResponse = Entity;
|
|
8
6
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
9
7
|
export type IFindRequest = {
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { DeliveryMethods } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = DeliveryMethods;
|
|
4
4
|
export declare const Route = "delivery_methods";
|
|
5
|
-
export declare const UpperName = "DeliveryMethods";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export interface ICreateRequest {
|
|
8
6
|
delivery_method_id: number;
|
|
9
7
|
name: string;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { Favorites } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = Favorites;
|
|
4
4
|
export declare const Route = "favorites";
|
|
5
|
-
export declare const UpperName = "Favorites";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export interface ICreateRequest {
|
|
8
6
|
url: string;
|
|
9
7
|
}
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { Language } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = Language;
|
|
4
4
|
export declare const Route = "language";
|
|
5
|
-
export declare const UpperName = "Language";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
type IFindDetailedResponse = Entity;
|
|
8
6
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
9
7
|
export type IFindRequest = Record<string, unknown>;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { MaturityDates } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = MaturityDates;
|
|
4
4
|
export declare const Route = "maturity_dates";
|
|
5
|
-
export declare const UpperName = "MaturityDates";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export interface ICreateRequest {
|
|
8
6
|
maturity_date_id: number;
|
|
9
7
|
name: string;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { PaymentMethods } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = PaymentMethods;
|
|
4
4
|
export declare const Route = "payment_methods";
|
|
5
|
-
export declare const UpperName = "PaymentMethods";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export declare const PaymentMethodsSaftCodeEnum: {
|
|
8
6
|
CC: 'CC';
|
|
9
7
|
CD: 'CD';
|
|
@@ -2,8 +2,6 @@ import type * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import type { Persona, Country, ReasonForExemption } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = Persona;
|
|
4
4
|
export declare const Route = "persona";
|
|
5
|
-
export declare const UpperName = "Persona";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export interface IEntityExtended extends Entity {
|
|
8
6
|
formatted_address: string;
|
|
9
7
|
country: Country | null;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { ProviderType } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = ProviderType;
|
|
4
4
|
export declare const Route = "provider_type";
|
|
5
|
-
export declare const UpperName = "ProviderType";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
type IFindDetailedResponse = Entity;
|
|
8
6
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
9
7
|
export type IFindRequest = Record<string, unknown>;
|
|
@@ -3,8 +3,6 @@ import { Providers, Users, Country, ReasonForExemption, Language, ProviderType,
|
|
|
3
3
|
import type { DocumentHeader } from '../../../shared/entities/stock';
|
|
4
4
|
export type Entity = Providers;
|
|
5
5
|
export declare const Route = "provider";
|
|
6
|
-
export declare const UpperName = "Providers";
|
|
7
|
-
export declare const LowerName: string;
|
|
8
6
|
interface IMainPersona extends Persona {
|
|
9
7
|
country: Country | null;
|
|
10
8
|
reason_for_exemption: ReasonForExemption | null;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { PurchaseConditions } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = PurchaseConditions;
|
|
4
4
|
export declare const Route = "purchase_conditions";
|
|
5
|
-
export declare const UpperName = "PurchaseConditions";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
interface IFindDetailedResponse extends Entity {
|
|
8
6
|
}
|
|
9
7
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, 'product_category'>;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { ReasonForExemption } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = ReasonForExemption;
|
|
4
4
|
export declare const Route = "reason_for_exemption";
|
|
5
|
-
export declare const UpperName = "ReasonForExemption";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export declare const ReasonForExemptionTypeEnum: {
|
|
8
6
|
product: 'product';
|
|
9
7
|
client: 'client';
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { SegmentsArea } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = SegmentsArea;
|
|
4
4
|
export declare const Route = "segments_area";
|
|
5
|
-
export declare const UpperName = "SegmentsArea";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
type IFindDetailedResponse = Entity;
|
|
8
6
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
9
7
|
export type IFindRequest = Record<string, unknown>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as Users from '../users/interface';
|
|
2
|
+
export declare const Route = "session";
|
|
2
3
|
export interface ICreateRequest {
|
|
3
4
|
password: string;
|
|
4
5
|
}
|
|
@@ -10,9 +11,13 @@ export interface ICreateResponse {
|
|
|
10
11
|
expiresInRefreshToken: number;
|
|
11
12
|
expired_password_change_limit: boolean;
|
|
12
13
|
}
|
|
14
|
+
export interface ILogoutRequest {
|
|
15
|
+
token: string;
|
|
16
|
+
}
|
|
13
17
|
export interface IRepository {
|
|
14
18
|
create(data: ICreateRequest): Promise<ICreateResponse>;
|
|
15
19
|
}
|
|
16
20
|
export interface IController {
|
|
17
21
|
create(data: ICreateRequest, ip: string): Promise<ICreateResponse>;
|
|
22
|
+
logout(data: ILogoutRequest): Promise<void>;
|
|
18
23
|
}
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { Shippings } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = Shippings;
|
|
4
4
|
export declare const Route = "shippings";
|
|
5
|
-
export declare const UpperName = "Shippings";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
type IFindDetailedResponse = Entity;
|
|
8
6
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
9
7
|
export type IFindByOwnerIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
@@ -2,12 +2,11 @@ import type * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import type { StoreOperator, Users, Persona } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = StoreOperator;
|
|
4
4
|
export declare const Route = "store_operator";
|
|
5
|
-
export declare const UpperName = "StoreOperator";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export type IFindPaginatedRequest = IShared.IPaginationRequest & Pick<Entity, 'inactive'>;
|
|
8
6
|
export interface IFindResponse extends Pick<Entity, 'id' | 'number' | 'pin' | 'inactive' | 'superuser' | 'default_theme'> {
|
|
9
7
|
user: Pick<Users, 'id'>;
|
|
10
8
|
main_persona: Pick<Persona, 'id' | 'name' | 'email'>;
|
|
9
|
+
sidemenu_highlights: string[];
|
|
11
10
|
}
|
|
12
11
|
export interface ICreateRequest {
|
|
13
12
|
main_persona_name: string;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { Swift } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = Swift;
|
|
4
4
|
export declare const Route = "swift";
|
|
5
|
-
export declare const UpperName = "Swift";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
type IFindDetailedResponse = Entity;
|
|
8
6
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
9
7
|
export type IFindRequest = Record<string, unknown>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type * as IShared from '../../../shared/interface';
|
|
2
|
+
import type { SystemModule } from '../../../shared/entities/user';
|
|
3
|
+
export type Entity = SystemModule;
|
|
4
|
+
export declare const Route = "system_module";
|
|
5
|
+
export declare enum SystemModuleEnum {
|
|
6
|
+
encomendas_stock = "encomendas_stock",
|
|
7
|
+
entradas = "entradas",
|
|
8
|
+
compras = "compras",
|
|
9
|
+
pagamentos = "pagamentos",
|
|
10
|
+
lotes = "lotes",
|
|
11
|
+
parcelas = "parcelas",
|
|
12
|
+
obrigacoes_legais = "obrigacoes_legais",
|
|
13
|
+
dashboard = "dashboard",
|
|
14
|
+
listagens = "listagens",
|
|
15
|
+
tasks = "tasks",
|
|
16
|
+
contas_corrente = "contas_corrente",
|
|
17
|
+
rms = "rms",
|
|
18
|
+
calendario = "calendario",
|
|
19
|
+
gestao_utilizadores = "gestao_utilizadores",
|
|
20
|
+
templates_email = "templates_email",
|
|
21
|
+
audit = "audit"
|
|
22
|
+
}
|
|
23
|
+
export interface IFindByStoreOperatorIdRequest {
|
|
24
|
+
store_operator_id: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IFindByStoreOperatorIdResponse {
|
|
27
|
+
store_operator_id: string;
|
|
28
|
+
values: SystemModuleEnum[];
|
|
29
|
+
}
|
|
30
|
+
export interface IFindResponseItem {
|
|
31
|
+
store_operator_id: string;
|
|
32
|
+
values: SystemModuleEnum[];
|
|
33
|
+
}
|
|
34
|
+
export interface ISetStoreOperatorModulesRequest {
|
|
35
|
+
store_operator_id: string;
|
|
36
|
+
values: SystemModuleEnum[];
|
|
37
|
+
}
|
|
38
|
+
export interface IRepository {
|
|
39
|
+
find(): Promise<IFindResponseItem[]>;
|
|
40
|
+
findByStoreOperatorId(selector: IFindByStoreOperatorIdRequest): Promise<IFindByStoreOperatorIdResponse>;
|
|
41
|
+
setStoreOperatorModules(data: ISetStoreOperatorModulesRequest): Promise<void>;
|
|
42
|
+
}
|
|
43
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { Tenant } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = Tenant;
|
|
4
4
|
export declare const Route = "tenant";
|
|
5
|
-
export declare const UpperName = "Tenant";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export interface ICreateRequest {
|
|
8
6
|
name: string;
|
|
9
7
|
customer_id: string;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { Theme } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = Theme;
|
|
4
4
|
export declare const Route = "theme";
|
|
5
|
-
export declare const UpperName = "Theme";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export interface ISessionStorageColor {
|
|
8
6
|
name: string;
|
|
9
7
|
hex: string;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import { TimeSheetDay, TimeSheetClock } from '../../../shared/entities/user';
|
|
3
|
+
export type Entity = TimeSheetDay & {
|
|
4
|
+
clocks: TimeSheetClock[];
|
|
5
|
+
};
|
|
6
|
+
export declare const Route = "time_sheet";
|
|
7
|
+
export declare const IClockTypeEnum: {
|
|
8
|
+
ENTRY: 'ENTRY';
|
|
9
|
+
EXIT: 'EXIT';
|
|
10
|
+
};
|
|
11
|
+
export type IClockType = (typeof IClockTypeEnum)[keyof typeof IClockTypeEnum];
|
|
12
|
+
export declare const clockTypes: string[];
|
|
13
|
+
export declare const IRegistryTypeEnum: {
|
|
14
|
+
AUTOMATIC: 'AUTOMATIC';
|
|
15
|
+
MANUAL: 'MANUAL';
|
|
16
|
+
};
|
|
17
|
+
export type IRegistryType = (typeof IRegistryTypeEnum)[keyof typeof IRegistryTypeEnum];
|
|
18
|
+
export declare const registryTypes: string[];
|
|
19
|
+
export declare const ITimesheetStateEnum: {
|
|
20
|
+
CONFIRMED: 'CONFIRMED';
|
|
21
|
+
PENDING: 'PENDING';
|
|
22
|
+
ERROR: 'ERROR';
|
|
23
|
+
};
|
|
24
|
+
export type ITimesheetState = (typeof ITimesheetStateEnum)[keyof typeof ITimesheetStateEnum];
|
|
25
|
+
export declare const timesheetStates: string[];
|
|
26
|
+
export interface IFindRequest {
|
|
27
|
+
user_id?: string;
|
|
28
|
+
start_date?: string;
|
|
29
|
+
end_date?: string;
|
|
30
|
+
state?: ITimesheetState;
|
|
31
|
+
}
|
|
32
|
+
export interface ICreateRequest {
|
|
33
|
+
date: Date;
|
|
34
|
+
user_id: string;
|
|
35
|
+
total_worked?: number;
|
|
36
|
+
balance?: number;
|
|
37
|
+
state?: ITimesheetState;
|
|
38
|
+
created_by: string;
|
|
39
|
+
updated_by: string;
|
|
40
|
+
clock?: {
|
|
41
|
+
time?: Date;
|
|
42
|
+
type: IClockType;
|
|
43
|
+
registry_type: IRegistryType;
|
|
44
|
+
note?: string | null;
|
|
45
|
+
created_by: string;
|
|
46
|
+
updated_by: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface IUpdateRequest {
|
|
50
|
+
total_worked?: number;
|
|
51
|
+
balance?: number;
|
|
52
|
+
state?: ITimesheetState;
|
|
53
|
+
created_by?: string;
|
|
54
|
+
updated_by: string;
|
|
55
|
+
clocks?: {
|
|
56
|
+
id?: string;
|
|
57
|
+
time: Date;
|
|
58
|
+
type: IClockType;
|
|
59
|
+
registry_type: IRegistryType;
|
|
60
|
+
note?: string | null;
|
|
61
|
+
created_by: string;
|
|
62
|
+
updated_by: string;
|
|
63
|
+
}[];
|
|
64
|
+
}
|
|
65
|
+
export interface IRepository {
|
|
66
|
+
find(filters?: IFindRequest): Promise<Entity[]>;
|
|
67
|
+
findById(id: string): Promise<Entity | null>;
|
|
68
|
+
create(data: ICreateRequest): Promise<Entity>;
|
|
69
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
70
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
71
|
+
}
|
|
72
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
73
|
+
export type IApi = Omit<IRepository, 'findById'>;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { UserPositions } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = UserPositions;
|
|
4
4
|
export declare const Route = "user_positions";
|
|
5
|
-
export declare const UpperName = "UserPositions";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
type IFindDetailedResponse = Entity;
|
|
8
6
|
export type IFindByIdResponse = Omit<IFindDetailedResponse, ''>;
|
|
9
7
|
export type IFindRequest = Record<string, unknown>;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { UserTokens } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = UserTokens;
|
|
4
4
|
export declare const Route = "user_token";
|
|
5
|
-
export declare const UpperName = "UserTokens";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export type IFindRequest = Record<string, unknown>;
|
|
8
6
|
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
9
7
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
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
|
+
import type { SystemModuleEnum } from '../systemModule/interface';
|
|
3
4
|
export type Entity = Users;
|
|
4
5
|
export type EntityWithoutPassword = Omit<Users, 'password'>;
|
|
5
6
|
export declare const Route = "users";
|
|
6
|
-
export declare const UpperName = "Users";
|
|
7
|
-
export declare const LowerName: string;
|
|
8
7
|
interface IMainPersona extends Persona {
|
|
9
8
|
country: Country | null;
|
|
10
9
|
reason_for_exemption: ReasonForExemption | null;
|
|
11
10
|
}
|
|
12
|
-
interface IStoreOperator extends Pick<StoreOperator, 'id' | '
|
|
11
|
+
interface IStoreOperator extends Pick<StoreOperator, 'id' | 'superuser'> {
|
|
13
12
|
main_persona: Pick<Persona, 'name' | 'email'>;
|
|
14
13
|
theme: Pick<Theme, 'colors'> | null;
|
|
14
|
+
system_modules: SystemModuleEnum[];
|
|
15
15
|
}
|
|
16
16
|
export interface IFindByEmailResponse extends Pick<Entity, 'id'> {
|
|
17
17
|
store_operator: IStoreOperator;
|
|
@@ -2,8 +2,6 @@ import * as IShared from '../../../shared/interface';
|
|
|
2
2
|
import { Vehicles } from '../../../shared/entities/user';
|
|
3
3
|
export type Entity = Vehicles;
|
|
4
4
|
export declare const Route = "vehicles";
|
|
5
|
-
export declare const UpperName = "Vehicles";
|
|
6
|
-
export declare const LowerName: string;
|
|
7
5
|
export interface ICreateRequest {
|
|
8
6
|
description: string;
|
|
9
7
|
vehicle_id: number;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ZipCode } from '../../../shared/entities/user';
|
|
2
2
|
export type Entity = ZipCode;
|
|
3
3
|
export declare const Route = "zip_code";
|
|
4
|
-
export declare const UpperName = "ZipCode";
|
|
5
|
-
export declare const LowerName: string;
|
|
6
4
|
export interface ICreateRequest {
|
|
7
5
|
postal_code: string;
|
|
8
6
|
address: string;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export declare const Route = "
|
|
2
|
-
export declare const UpperName = "ErrorHandler";
|
|
3
|
-
export declare const LowerName: string;
|
|
1
|
+
export declare const Route = "error_log";
|
|
4
2
|
export declare const IErrorTypeEnum: {
|
|
5
3
|
prisma: 'prisma';
|
|
6
4
|
unhandled: 'unhandled';
|