@nomalism-com/types 1.3.47 → 1.3.49
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.cjs +1150 -4703
- package/dist/index.d.ts +1 -0
- package/dist/index.js +995 -4704
- package/dist/main.d.ts +13 -123
- package/dist/modules/document/NRCL/interface.d.ts +1 -1
- package/dist/modules/document/adiantamento/interfaces.d.ts +24 -0
- package/dist/modules/document/billOfLading/interfaces.d.ts +1 -1
- package/dist/modules/document/faturaCredito/interfaces.d.ts +26 -0
- package/dist/modules/document/faturaRecibo/interfaces.d.ts +25 -0
- package/dist/modules/document/faturaSimplificada/interfaces.d.ts +24 -0
- package/dist/modules/document/notaCredito/interfaces.d.ts +29 -0
- package/dist/modules/document/notaCreditoAdiantamento/interfaces.d.ts +25 -0
- package/dist/modules/document/recibo/interfaces.d.ts +21 -0
- package/dist/modules/documentManagement/multimedia/interfaces.d.ts +2 -2
- package/dist/modules/integration/emailLog/interfaces.d.ts +5 -0
- package/dist/modules/integration/eupago/interfaces.d.ts +74 -0
- package/dist/modules/integration/googleSheets/interfaces.d.ts +1 -0
- package/dist/modules/integration/patchNotes/interfaces.d.ts +1 -1
- package/dist/modules/integration/personaMerge/interfaces.d.ts +11 -0
- package/dist/modules/llm/llm/interfaces.d.ts +10 -0
- package/dist/modules/print/printer/interfaces.d.ts +1 -1
- package/dist/modules/sms/allowedDevice/interfaces.d.ts +11 -2
- package/dist/modules/sms/smsSender/interfaces.d.ts +6 -6
- package/dist/modules/sms/smsTemplate/interfaces.d.ts +3 -0
- package/dist/modules/stock/chat/interfaces.d.ts +1 -0
- package/dist/modules/stock/displayLabel/interface.d.ts +14 -0
- package/dist/modules/stock/emailAccount/interface.d.ts +4 -0
- package/dist/modules/stock/gmails/interface.d.ts +4 -0
- package/dist/modules/stock/location/interface.d.ts +10 -8
- package/dist/modules/stock/mobilePrint/interface.d.ts +3 -0
- package/dist/modules/stock/productGoogleSheets/interface.d.ts +11 -10
- package/dist/modules/stock/queryList/interfaces.d.ts +1 -2
- package/dist/modules/stock/saft/interfaces.d.ts +19 -0
- package/dist/modules/stock/vatValidation/interfaces.d.ts +3 -0
- package/dist/modules/stock/workflow/interfaces.d.ts +0 -41
- package/dist/modules/supply/currentAccount/interface.d.ts +2 -0
- package/dist/modules/supply/documentHeader/interfaces.d.ts +24 -0
- package/dist/modules/supply/documentLine/interfaces.d.ts +3 -1
- package/dist/modules/supply/documentType/interfaces.d.ts +0 -51
- package/dist/modules/supply/externalDocumentHeader/interface.d.ts +5 -4
- package/dist/modules/supply/payment/interface.d.ts +3 -0
- package/dist/modules/supply/paymentBatch/interface.d.ts +5 -0
- package/dist/modules/tickets/channel/interfaces.d.ts +4 -3
- package/dist/modules/tickets/clt/interfaces.d.ts +4 -3
- package/dist/modules/tickets/language/interfaces.d.ts +4 -3
- package/dist/modules/user/clients/interface.d.ts +1 -1
- package/dist/modules/user/persona/interface.d.ts +60 -0
- package/dist/modules/user/providers/interface.d.ts +6 -6
- package/dist/modules/user/swift/interface.d.ts +1 -1
- package/dist/modules/user/systemModule/interface.d.ts +24 -21
- package/dist/modules/user/users/interface.d.ts +2 -2
- package/dist/modules/view/adminPanel/interfaces.d.ts +37 -0
- package/dist/modules/view/errorLog/interfaces.d.ts +13 -11
- package/dist/shared/entities/integration.d.ts +19 -0
- package/dist/shared/entities/stock.d.ts +11 -0
- package/dist/shared/entities/user.d.ts +3 -2
- package/dist/shared/interface.d.ts +46 -53
- package/package.json +12 -12
- package/dist/modules/document/CAT/route.schema.d.ts +0 -3
- package/dist/modules/document/NPF/route.schema.d.ts +0 -2
- package/dist/modules/document/NRCL/route.schema.d.ts +0 -2
- package/dist/modules/document/billOfLading/route.schema.d.ts +0 -3
- package/dist/modules/document/inventario/route.schema.d.ts +0 -3
- package/dist/modules/document/materialEntrance/route.schema.d.ts +0 -7
- package/dist/modules/document/order/route.schema.d.ts +0 -9
- package/dist/modules/document/productionOrder/route.schema.d.ts +0 -2
- package/dist/modules/document/proforma/route.schema.d.ts +0 -4
- package/dist/modules/document/propostaFornecedor/route.schema.d.ts +0 -2
- package/dist/modules/document/propostaSheets/route.schema.d.ts +0 -6
- package/dist/modules/document/providerCreditNoteFromReturn/route.schema.d.ts +0 -3
- package/dist/modules/document/providerFinancialCreditNote/route.schema.d.ts +0 -3
- package/dist/modules/document/providerServiceInvoice/route.schema.d.ts +0 -2
- package/dist/modules/document/purchase/route.schema.d.ts +0 -4
- package/dist/modules/document/quebra/route.schema.d.ts +0 -3
- package/dist/modules/document/returnToProvider/route.schema.d.ts +0 -2
- package/dist/modules/document/transformado/route.schema.d.ts +0 -3
- package/dist/modules/document/upfrontReturn/route.schema.d.ts +0 -2
- package/dist/modules/documentManagement/multimedia/route.schema.d.ts +0 -2
- package/dist/modules/integration/emailLog/route.schema.d.ts +0 -4
- package/dist/modules/integration/emailTemplate/route.schema.d.ts +0 -6
- package/dist/modules/integration/emailTemplateAttachment/route.schema.d.ts +0 -2
- package/dist/modules/integration/emailVerification/route.schema.d.ts +0 -5
- package/dist/modules/integration/googleFilePermission/route.schema.d.ts +0 -5
- package/dist/modules/integration/googleSheets/route.schema.d.ts +0 -4
- package/dist/modules/integration/observation/route.schema.d.ts +0 -5
- package/dist/modules/integration/observationType/route.schema.d.ts +0 -7
- package/dist/modules/integration/projectInfo/route.schema.d.ts +0 -2
- package/dist/modules/integration/settings/route.schema.d.ts +0 -4
- package/dist/modules/llm/llm/route.schema.d.ts +0 -4
- package/dist/modules/print/npc/route.schema.d.ts +0 -3
- package/dist/modules/print/printer/route.schema.d.ts +0 -4
- package/dist/modules/print/schedulePrintJob/route.schema.d.ts +0 -5
- package/dist/modules/sms/allowedDevice/route.schema.d.ts +0 -3
- package/dist/modules/sms/smsTemplate/route.schema.d.ts +0 -3
- package/dist/modules/stock/accountCode/route.schema.d.ts +0 -2
- package/dist/modules/stock/chat/route.schema.d.ts +0 -6
- package/dist/modules/stock/chatRapidMessage/route.schema.d.ts +0 -3
- package/dist/modules/stock/dashboard/route.schema.d.ts +0 -3
- package/dist/modules/stock/emailAccount/route.schema.d.ts +0 -3
- package/dist/modules/stock/file/route.schema.d.ts +0 -5
- package/dist/modules/stock/googleCalendar/route.schema.d.ts +0 -3
- package/dist/modules/stock/location/route.schema.d.ts +0 -5
- package/dist/modules/stock/mobilePrint/route.schema.d.ts +0 -2
- package/dist/modules/stock/prison/route.schema.d.ts +0 -4
- package/dist/modules/stock/productGoogleSheets/route.schema.d.ts +0 -14
- package/dist/modules/stock/productImage/route.schema.d.ts +0 -5
- package/dist/modules/stock/promotion/route.schema.d.ts +0 -5
- package/dist/modules/stock/promotionAssoc/interface.d.ts +0 -38
- package/dist/modules/stock/promotionAssoc/route.schema.d.ts +0 -5
- package/dist/modules/stock/queryList/route.schema.d.ts +0 -7
- package/dist/modules/stock/queryParameter/route.schema.d.ts +0 -3
- package/dist/modules/stock/returnReason/route.schema.d.ts +0 -3
- package/dist/modules/stock/savedEmPicking/route.schema.d.ts +0 -5
- package/dist/modules/stock/savedProviderProposal/route.schema.d.ts +0 -2
- package/dist/modules/stock/stockMovement/route.schema.d.ts +0 -3
- package/dist/modules/stock/tag/route.schema.d.ts +0 -3
- package/dist/modules/stock/task/route.schema.d.ts +0 -5
- package/dist/modules/stock/taskMessage/route.schema.d.ts +0 -3
- package/dist/modules/stock/taskRead/route.schema.d.ts +0 -3
- package/dist/modules/stock/typeOfLocation/route.schema.d.ts +0 -5
- package/dist/modules/stock/unitOfMeasure/route.schema.d.ts +0 -5
- package/dist/modules/stock/vatTax/route.schema.d.ts +0 -5
- package/dist/modules/stock/vatTaxZone/route.schema.d.ts +0 -5
- package/dist/modules/stock/vatValidation/route.schema.d.ts +0 -2
- package/dist/modules/stock/workflow/route.schema.d.ts +0 -4
- package/dist/modules/supply/currentAccount/route.schema.d.ts +0 -9
- package/dist/modules/supply/documentHeader/route.schema.d.ts +0 -15
- package/dist/modules/supply/documentHeaderSubscriber/route.schema.d.ts +0 -2
- package/dist/modules/supply/documentHeaderSurvey/route.schema.d.ts +0 -5
- package/dist/modules/supply/documentLine/route.schema.d.ts +0 -9
- package/dist/modules/supply/documentLineMT/route.schema.d.ts +0 -2
- package/dist/modules/supply/documentLineNote/route.schema.d.ts +0 -2
- package/dist/modules/supply/documentLineRM/route.schema.d.ts +0 -2
- package/dist/modules/supply/documentSet/route.schema.d.ts +0 -3
- package/dist/modules/supply/documentType/route.schema.d.ts +0 -3
- package/dist/modules/supply/externalDocumentHeader/route.schema.d.ts +0 -3
- package/dist/modules/supply/orderManagement/route.schema.d.ts +0 -0
- package/dist/modules/supply/payment/route.schema.d.ts +0 -5
- package/dist/modules/supply/paymentBatch/route.schema.d.ts +0 -4
- package/dist/modules/supply/preSale/route.schema.d.ts +0 -8
- package/dist/modules/supply/preSaleProduct/route.schema.d.ts +0 -2
- package/dist/modules/supply/schedule/route.schema.d.ts +0 -2
- package/dist/modules/tickets/channel/route.schema.d.ts +0 -3
- package/dist/modules/tickets/clt/route.schema.d.ts +0 -3
- package/dist/modules/tickets/language/route.schema.d.ts +0 -3
- package/dist/modules/tickets/tickets/route.schema.d.ts +0 -3
- package/dist/modules/ui/portal/route.schema.d.ts +0 -4
- package/dist/modules/ui/sideMenu/route.schema.d.ts +0 -3
- package/dist/modules/ui/sidemenuHighlight/route.schema.d.ts +0 -3
- package/dist/modules/user/bankData/route.schema.d.ts +0 -5
- package/dist/modules/user/chatSubscribers/route.schema.d.ts +0 -7
- package/dist/modules/user/clientType/route.schema.d.ts +0 -6
- package/dist/modules/user/clients/route.schema.d.ts +0 -5
- package/dist/modules/user/commissioner/route.schema.d.ts +0 -5
- package/dist/modules/user/country/route.schema.d.ts +0 -5
- package/dist/modules/user/deliveryMethods/route.schema.d.ts +0 -3
- package/dist/modules/user/favorites/route.schema.d.ts +0 -8
- package/dist/modules/user/language/route.schema.d.ts +0 -5
- package/dist/modules/user/maturityDates/route.schema.d.ts +0 -3
- package/dist/modules/user/password/route.schema.d.ts +0 -4
- package/dist/modules/user/paymentMethods/route.schema.d.ts +0 -3
- package/dist/modules/user/persona/route.schema.d.ts +0 -10
- package/dist/modules/user/providerType/route.schema.d.ts +0 -5
- package/dist/modules/user/providers/route.schema.d.ts +0 -7
- package/dist/modules/user/purchaseConditions/route.schema.d.ts +0 -5
- package/dist/modules/user/reasonForExemption/route.schema.d.ts +0 -5
- package/dist/modules/user/refreshToken/route.schema.d.ts +0 -2
- package/dist/modules/user/segmentsArea/route.schema.d.ts +0 -5
- package/dist/modules/user/sessions/route.schema.d.ts +0 -2
- package/dist/modules/user/shippings/route.schema.d.ts +0 -5
- package/dist/modules/user/storeOperator/route.schema.d.ts +0 -6
- package/dist/modules/user/swift/route.schema.d.ts +0 -5
- package/dist/modules/user/systemModule/route.schema.d.ts +0 -3
- package/dist/modules/user/tenant/route.schema.d.ts +0 -3
- package/dist/modules/user/theme/route.schema.d.ts +0 -2
- package/dist/modules/user/timeSheet/route.schema.d.ts +0 -6
- package/dist/modules/user/userPositions/route.schema.d.ts +0 -5
- package/dist/modules/user/userTokens/route.schema.d.ts +0 -3
- package/dist/modules/user/users/route.schema.d.ts +0 -7
- package/dist/modules/user/vehicles/route.schema.d.ts +0 -3
- package/dist/modules/view/errorLog/route.schema.d.ts +0 -2
- package/dist/shared/messages.d.ts +0 -2
|
@@ -24,6 +24,16 @@ export interface IIdentifyAndTranslateResponse {
|
|
|
24
24
|
language: string;
|
|
25
25
|
translation: string | null;
|
|
26
26
|
}
|
|
27
|
+
export type IOllamaChatMessage = {
|
|
28
|
+
content?: string;
|
|
29
|
+
};
|
|
30
|
+
export interface IOllamaChatResponse {
|
|
31
|
+
message?: IOllamaChatMessage;
|
|
32
|
+
}
|
|
33
|
+
export type IIdentifyAndTranslateOutput = {
|
|
34
|
+
language?: string;
|
|
35
|
+
translation?: string;
|
|
36
|
+
};
|
|
27
37
|
export interface IRepository {
|
|
28
38
|
prompt: (data: IPromptRequest, response: IPromptResponse) => IPromptAbortController;
|
|
29
39
|
translate(data: ITranslateRequest): Promise<string>;
|
|
@@ -6,7 +6,7 @@ export type IFindDetailedResponse = Entity & {
|
|
|
6
6
|
npc: Pick<Entity, "name">;
|
|
7
7
|
};
|
|
8
8
|
export type IPrinterData = Omit<Printer, "id" | "npc_id" | "created_at" | "updated_at">;
|
|
9
|
-
export type IUpdateRequest = Omit<Printer, "connected" | "device_os_name" | "npc_id" | "id"
|
|
9
|
+
export type IUpdateRequest = IShared.WithoutStamps<Omit<Printer, "connected" | "device_os_name" | "npc_id" | "id">>;
|
|
10
10
|
export interface IGetOrSetPrintersResponse {
|
|
11
11
|
printers_a4: IPrinterData[];
|
|
12
12
|
printers_pos: IPrinterData[];
|
|
@@ -3,11 +3,20 @@ import * as IShared from "../../../shared/interface";
|
|
|
3
3
|
export type Entity = AllowedDevice;
|
|
4
4
|
export declare const Route = "allowed_device";
|
|
5
5
|
export type ICreateRequest = Pick<Entity, "key">;
|
|
6
|
-
export
|
|
6
|
+
export interface IFindByKeyRequest {
|
|
7
|
+
key: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const apkTypeEnum: {
|
|
10
|
+
sms: "sms";
|
|
11
|
+
ticket: "ticket";
|
|
12
|
+
app: "app";
|
|
13
|
+
};
|
|
14
|
+
export type IApkType = (typeof apkTypeEnum)[keyof typeof apkTypeEnum];
|
|
15
|
+
export declare const apkTypes: string[];
|
|
7
16
|
export type IUpdateRequest = Pick<Entity, "name" | "allow_app" | "allow_sms" | "allow_ticket">;
|
|
8
17
|
export interface ICreateResponse {
|
|
9
18
|
name: string;
|
|
10
|
-
allowed:
|
|
19
|
+
allowed: IApkType[];
|
|
11
20
|
}
|
|
12
21
|
export interface IRepository {
|
|
13
22
|
find(): Promise<Entity[]>;
|
|
@@ -31,15 +31,15 @@ export interface IFindResponse {
|
|
|
31
31
|
message: string;
|
|
32
32
|
status: string;
|
|
33
33
|
created_at: Date;
|
|
34
|
-
document_link
|
|
35
|
-
error
|
|
36
|
-
processed_at
|
|
37
|
-
sent_at
|
|
38
|
-
sent_by
|
|
34
|
+
document_link: string | null;
|
|
35
|
+
error: string | null;
|
|
36
|
+
processed_at: Date | null;
|
|
37
|
+
sent_at: Date | null;
|
|
38
|
+
sent_by: string | null;
|
|
39
39
|
}
|
|
40
40
|
export interface IRepository {
|
|
41
41
|
claim(): Promise<IClaimResponse[]>;
|
|
42
|
-
result(id: string, data: IResultRequest): Promise<void>;
|
|
42
|
+
result(id: string, data: IResultRequest, sender_id: string): Promise<void>;
|
|
43
43
|
findById(id: string): Promise<IFindResponse>;
|
|
44
44
|
find(): Promise<IFindResponse[]>;
|
|
45
45
|
}
|
|
@@ -3,6 +3,9 @@ import * as IShared from "../../../shared/interface";
|
|
|
3
3
|
export type Entity = SmsTemplate;
|
|
4
4
|
export declare const Route = "sms_template";
|
|
5
5
|
export type SmsTemplateVariables = Record<string, string | number | boolean>;
|
|
6
|
+
export interface IFindByKeyRequest {
|
|
7
|
+
key: string;
|
|
8
|
+
}
|
|
6
9
|
export interface ICreateRequest {
|
|
7
10
|
key: string;
|
|
8
11
|
name: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DisplayLabels } from "../../../shared/entities/stock";
|
|
2
|
+
export type Entity = DisplayLabels;
|
|
3
|
+
export declare const Route = "display_labels";
|
|
4
|
+
export interface ICreateRequest {
|
|
5
|
+
references: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface IDeleteManyRequest {
|
|
8
|
+
ids: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface IRepository {
|
|
11
|
+
find(): Promise<Entity[]>;
|
|
12
|
+
create(data: ICreateRequest): Promise<void>;
|
|
13
|
+
deleteMany(data: IDeleteManyRequest): Promise<void>;
|
|
14
|
+
}
|
|
@@ -19,6 +19,10 @@ export interface IGmailsResponse {
|
|
|
19
19
|
proposal_url: string | null;
|
|
20
20
|
gmail_attachments: unknown[] | null;
|
|
21
21
|
}
|
|
22
|
+
export interface IAuthCallbackRequest {
|
|
23
|
+
code: string;
|
|
24
|
+
state: string;
|
|
25
|
+
}
|
|
22
26
|
export interface IRepository {
|
|
23
27
|
auth(): Promise<string>;
|
|
24
28
|
emails(): Promise<IGmailsResponse[]>;
|
|
@@ -12,6 +12,14 @@ export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
|
12
12
|
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
13
13
|
}
|
|
14
14
|
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "type_of_location">>;
|
|
15
|
+
export type IGeolocationCreate = {
|
|
16
|
+
lat: number;
|
|
17
|
+
lon: number;
|
|
18
|
+
};
|
|
19
|
+
export type IGeolocationUpdate = {
|
|
20
|
+
lat?: number;
|
|
21
|
+
lon?: number;
|
|
22
|
+
};
|
|
15
23
|
export interface ICreateRequest {
|
|
16
24
|
name: string;
|
|
17
25
|
street: string;
|
|
@@ -20,10 +28,7 @@ export interface ICreateRequest {
|
|
|
20
28
|
locality: string;
|
|
21
29
|
postal_code: string;
|
|
22
30
|
type_of_location_id: string;
|
|
23
|
-
geolocation?:
|
|
24
|
-
lat: number;
|
|
25
|
-
lon: number;
|
|
26
|
-
};
|
|
31
|
+
geolocation?: IGeolocationCreate;
|
|
27
32
|
default_billing?: boolean;
|
|
28
33
|
default_delivery?: boolean;
|
|
29
34
|
}
|
|
@@ -35,10 +40,7 @@ export interface IUpdateRequest {
|
|
|
35
40
|
country_name?: string;
|
|
36
41
|
postal_code?: string;
|
|
37
42
|
type_of_location_id?: string;
|
|
38
|
-
geolocation?:
|
|
39
|
-
lat?: number;
|
|
40
|
-
lon?: number;
|
|
41
|
-
};
|
|
43
|
+
geolocation?: IGeolocationUpdate;
|
|
42
44
|
default_billing?: boolean;
|
|
43
45
|
default_delivery?: boolean;
|
|
44
46
|
}
|
|
@@ -6,8 +6,8 @@ export type IProductPromotionVirtuals = ProductPromotionVirtuals;
|
|
|
6
6
|
export type IProductVirtuals = ProductVirtuals;
|
|
7
7
|
export type IProductBaseVirtuals = ProductBaseVirtuals;
|
|
8
8
|
export type Entity = ProductSheet;
|
|
9
|
-
export type IProductsForSheetsResponse = Record<string,
|
|
10
|
-
export type IProductFromSheetsValues = Record<string,
|
|
9
|
+
export type IProductsForSheetsResponse = Record<string, unknown>;
|
|
10
|
+
export type IProductFromSheetsValues = Record<string, unknown>;
|
|
11
11
|
export type IProductSheetState = "Ativa" | "NaoVemMais" | "VemTemporariamente" | "DescontinuadoFabrica";
|
|
12
12
|
export declare const ProductStateEnum: {
|
|
13
13
|
Ativa: "Ativa";
|
|
@@ -37,6 +37,7 @@ export interface ICreateRequest {
|
|
|
37
37
|
provider_ref?: string | null;
|
|
38
38
|
name?: string | null;
|
|
39
39
|
designation: string | null;
|
|
40
|
+
short_description?: string | null;
|
|
40
41
|
state?: IProductSheetState;
|
|
41
42
|
type?: IProductType;
|
|
42
43
|
type_of_inventory?: string;
|
|
@@ -57,8 +58,7 @@ export interface ICreateRequest {
|
|
|
57
58
|
maintenances?: string;
|
|
58
59
|
compositions?: string;
|
|
59
60
|
attributes?: string;
|
|
60
|
-
|
|
61
|
-
updated_by?: string;
|
|
61
|
+
youtube_url?: string | null;
|
|
62
62
|
}
|
|
63
63
|
export interface IUpdateRequest {
|
|
64
64
|
designation?: string;
|
|
@@ -70,6 +70,7 @@ export interface IUpdateRequest {
|
|
|
70
70
|
price_sale?: number;
|
|
71
71
|
vat_tax?: string;
|
|
72
72
|
reason_for_exemption?: string | null;
|
|
73
|
+
youtube_url?: string | null;
|
|
73
74
|
}
|
|
74
75
|
export interface IFindProductSheetByReference {
|
|
75
76
|
selector: string;
|
|
@@ -153,8 +154,10 @@ export interface IPrintLabelBulkQueryRequest {
|
|
|
153
154
|
token: string;
|
|
154
155
|
ids: string;
|
|
155
156
|
}
|
|
156
|
-
export interface
|
|
157
|
+
export interface IReferenceRequest {
|
|
157
158
|
reference: string;
|
|
159
|
+
}
|
|
160
|
+
export interface IFindByReferenceRequest extends IReferenceRequest {
|
|
158
161
|
allowProviderWildcard?: boolean;
|
|
159
162
|
id_provider?: number;
|
|
160
163
|
available?: boolean;
|
|
@@ -207,13 +210,11 @@ export interface IFindDataForMobileResponse {
|
|
|
207
210
|
export interface IFindStockForMobileResponse {
|
|
208
211
|
virtual: Pick<IProductVirtuals, "price_sale" | "available" | "ordered_quantity" | "prison" | "reserved" | "total" | "inativa">;
|
|
209
212
|
}
|
|
210
|
-
export type IFindForMobileRequest = {
|
|
211
|
-
reference: string;
|
|
213
|
+
export type IFindForMobileRequest = (IReferenceRequest & {
|
|
212
214
|
id?: never;
|
|
213
|
-
} | {
|
|
215
|
+
}) | (IShared.IFindByIdRequest & {
|
|
214
216
|
reference?: never;
|
|
215
|
-
|
|
216
|
-
};
|
|
217
|
+
});
|
|
217
218
|
export interface IProductLocation {
|
|
218
219
|
location_id: string;
|
|
219
220
|
product_ids: string[];
|
|
@@ -17,7 +17,7 @@ export interface IFindResponse extends QueryList {
|
|
|
17
17
|
}
|
|
18
18
|
export declare const executeOutput: readonly ["csv", "pdf", "xlsx", "json"];
|
|
19
19
|
export type IExecuteOutput = (typeof executeOutput)[number];
|
|
20
|
-
type IParameterDataType = string | Date | number | boolean | null | undefined;
|
|
20
|
+
export type IParameterDataType = string | Date | number | boolean | null | undefined;
|
|
21
21
|
export type IExecuteInputParameters = Record<string, IParameterDataType>;
|
|
22
22
|
export interface IExecuteRequest extends IExecuteInputParameters {
|
|
23
23
|
query_id: string;
|
|
@@ -39,4 +39,3 @@ export type IApi = Omit<IRepository, "execute"> & {
|
|
|
39
39
|
execute(data: IExecuteRequest): Promise<IExecuteResponse>;
|
|
40
40
|
};
|
|
41
41
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
42
|
-
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const Route = "saft";
|
|
2
|
+
export interface ISaftInvoiceRequest {
|
|
3
|
+
date_start: string;
|
|
4
|
+
date_end: string;
|
|
5
|
+
token: string;
|
|
6
|
+
}
|
|
7
|
+
export type IDataInicioPrevUtiliz = `${number}-${number}-${number}`;
|
|
8
|
+
export interface IRegisterSeriesRequest {
|
|
9
|
+
document_set_id: string;
|
|
10
|
+
external_document_type_id: string;
|
|
11
|
+
numInicialSeq?: number;
|
|
12
|
+
dataInicioPrevUtiliz?: IDataInicioPrevUtiliz;
|
|
13
|
+
tipoSerie?: string;
|
|
14
|
+
meioProcessamento?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ICloseSeriesRequest {
|
|
17
|
+
document_saft_counter_id: string;
|
|
18
|
+
justificacao?: string;
|
|
19
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { VatValidation } from "../../../shared/entities/stock";
|
|
2
2
|
export type Entity = VatValidation;
|
|
3
3
|
export declare const Route = "vat_validation";
|
|
4
|
+
export interface IFindByLatestRequest {
|
|
5
|
+
nif: string;
|
|
6
|
+
}
|
|
4
7
|
export interface IRepository {
|
|
5
8
|
findByLatest(nif: string): Promise<Entity | null>;
|
|
6
9
|
}
|
|
@@ -1,43 +1,2 @@
|
|
|
1
1
|
import { Workflow } from "../../../shared/entities/stock";
|
|
2
|
-
import * as IShared from "../../../shared/interface";
|
|
3
|
-
import * as DocumentType from "../../supply/documentType/interfaces";
|
|
4
|
-
import { IDocumentTypeUserType } from "../../supply/documentType/interfaces";
|
|
5
2
|
export type Entity = Workflow;
|
|
6
|
-
export declare const Route = "workflow";
|
|
7
|
-
export type IFindRequest = Record<string, unknown>;
|
|
8
|
-
export interface ICreateRequest {
|
|
9
|
-
from_document_type_id: number;
|
|
10
|
-
to_document_type_id: number;
|
|
11
|
-
transition_name: string;
|
|
12
|
-
is_active: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface IUpdateRequest {
|
|
15
|
-
from_document_type_id?: number;
|
|
16
|
-
to_document_type_id?: number;
|
|
17
|
-
transition_name?: string;
|
|
18
|
-
is_active?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface IFindByQueryRequest extends IShared.IPaginationRequest {
|
|
21
|
-
id?: number;
|
|
22
|
-
from?: number;
|
|
23
|
-
}
|
|
24
|
-
export interface IFindByOwnerIdRequest {
|
|
25
|
-
from?: number;
|
|
26
|
-
to?: number;
|
|
27
|
-
user_type?: IDocumentTypeUserType;
|
|
28
|
-
}
|
|
29
|
-
export interface IFindByOwnerIdResponse extends Entity {
|
|
30
|
-
from_document_type: DocumentType.Entity | null;
|
|
31
|
-
to_document_type: DocumentType.Entity | null;
|
|
32
|
-
}
|
|
33
|
-
export interface IRepository {
|
|
34
|
-
findById(id: number): Promise<Workflow | null>;
|
|
35
|
-
findByQuery(data: IFindByQueryRequest): Promise<IShared.IPaginationResponse<Workflow>>;
|
|
36
|
-
findByOwnerId(data: IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
37
|
-
find(data: IFindRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
38
|
-
create(data: ICreateRequest): Promise<IFindByOwnerIdResponse>;
|
|
39
|
-
update(selector: IShared.IFindByIdNumberRequest, data: IUpdateRequest): Promise<IFindByOwnerIdResponse | null>;
|
|
40
|
-
deleteOne(selector: IShared.IFindByIdNumberRequest): Promise<IFindByOwnerIdResponse | null>;
|
|
41
|
-
}
|
|
42
|
-
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
43
|
-
export type IApi = Omit<IRepository, "findById" | "findByQuery">;
|
|
@@ -47,6 +47,7 @@ export interface IFindCurrentAccountByOwnerIdResponse {
|
|
|
47
47
|
notes: ICurrentAccountNotes[];
|
|
48
48
|
por_regularizar: number;
|
|
49
49
|
balance: number;
|
|
50
|
+
saldo_a_data: number;
|
|
50
51
|
href?: string | null;
|
|
51
52
|
}
|
|
52
53
|
export interface IUnpaidPurchasesRequest {
|
|
@@ -131,6 +132,7 @@ export interface IDocumentResponse {
|
|
|
131
132
|
name: string;
|
|
132
133
|
group: string;
|
|
133
134
|
total: number;
|
|
135
|
+
payment_type: "debit" | "credit";
|
|
134
136
|
params: ICreateFromHeaderRequest;
|
|
135
137
|
}
|
|
136
138
|
export interface IRepository {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DocumentHeader, DocumentHeaderVirtuals, DocumentLineNote, DocumentType, StartDocumentHeaderVirtuals, VatTax } from "../../../shared/entities/stock";
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
3
|
import * as IProjectInfo from "../../integration/projectInfo/interfaces";
|
|
4
|
+
import * as IDocumentLineNote from "../documentLineNote/interfaces";
|
|
4
5
|
import * as IDocumentType from "../documentType/interfaces";
|
|
5
6
|
import * as IPayment from "../payment/interface";
|
|
6
7
|
export type Entity = DocumentHeader;
|
|
@@ -131,7 +132,12 @@ export interface ICreateFromHeaderRequest {
|
|
|
131
132
|
store_operator_id?: string | null;
|
|
132
133
|
copy_from_document?: string | null;
|
|
133
134
|
owner_ref_document?: string | null;
|
|
135
|
+
document_line_note?: ICreateFromHeaderDocumentLineNote;
|
|
134
136
|
}
|
|
137
|
+
export type ICreateFromHeaderDocumentLineNote = {
|
|
138
|
+
note: string;
|
|
139
|
+
type: IDocumentLineNote.IDocumentLineNoteType;
|
|
140
|
+
};
|
|
135
141
|
export interface IUpdateRequest {
|
|
136
142
|
google_sheet_id?: string | null;
|
|
137
143
|
pdf_link?: string | null;
|
|
@@ -222,6 +228,7 @@ export interface ISendClientNotificationRequest {
|
|
|
222
228
|
}
|
|
223
229
|
export interface IDocumentPdfRequest {
|
|
224
230
|
token?: string;
|
|
231
|
+
only_original?: boolean;
|
|
225
232
|
}
|
|
226
233
|
export interface IFindByTypeRequest {
|
|
227
234
|
documentTypeCodes: IDocumentType.IDocumentTypeCodeType[];
|
|
@@ -285,6 +292,21 @@ export interface IFindCountByOwnersIdsResponse {
|
|
|
285
292
|
open: number;
|
|
286
293
|
closed: number;
|
|
287
294
|
}
|
|
295
|
+
export interface IFindByOwnersIdsResponse {
|
|
296
|
+
owner_id: string;
|
|
297
|
+
document_number: number;
|
|
298
|
+
code: string;
|
|
299
|
+
document_type_id: string;
|
|
300
|
+
created_at: string;
|
|
301
|
+
created_by: string;
|
|
302
|
+
seller: string;
|
|
303
|
+
}
|
|
304
|
+
export interface IMergeOwnerRequest {
|
|
305
|
+
source_client_id: string;
|
|
306
|
+
target_client_id: string;
|
|
307
|
+
source_persona_id: string;
|
|
308
|
+
target_persona_id: string;
|
|
309
|
+
}
|
|
288
310
|
export interface IRepository {
|
|
289
311
|
findOne(selector: IShared.IFindByIdRequest): Promise<IFindOneBase | null>;
|
|
290
312
|
findStartVirtual(selector: IShared.IFindByIdRequest): Promise<IStartDocumentHeaderVirtuals | null>;
|
|
@@ -305,5 +327,7 @@ export interface IRepository {
|
|
|
305
327
|
findStartDocumentHeaderSiblings(params: IShared.IFindByIdRequest): Promise<IFindStartDocumentHeaderSiblingsResponse>;
|
|
306
328
|
createSiteProposal(data: IShared.IBrokerTopicPayload[typeof IShared.IBrokerTopic.create_site_proposal]): Promise<IProjectInfo.ICreateResponse>;
|
|
307
329
|
findCountByOwnerIds(data: IFindCountByOwnersIdsRequest): Promise<IFindCountByOwnersIdsResponse[]>;
|
|
330
|
+
findByOwnerIds(data: IFindCountByOwnersIdsRequest): Promise<IFindByOwnersIdsResponse[]>;
|
|
331
|
+
mergeOwner(data: IMergeOwnerRequest): Promise<void>;
|
|
308
332
|
}
|
|
309
333
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -12,10 +12,12 @@ export type IDocumentLineVirtuals = DocumentLineVirtuals;
|
|
|
12
12
|
export type IDocumentLineBaseVirtuals = DocumentLineBaseVirtuals;
|
|
13
13
|
export type IPromotions = Pick<ProductPromotionVirtuals, "exclusive_to_location_id" | "exclusive_to_client_id" | "discount">;
|
|
14
14
|
export type IDataKeys = "AvisoCliente" | "Quantidade Encomendada Originalmente" | "Linha criada na EM" | "Opcao EM" | "Levantar DF" | "Enviar Email NCF" | "Fechar DF" | "Documento pago" | "Pagamento" | "Recibo do documento";
|
|
15
|
-
export interface
|
|
15
|
+
export interface IDataPayloadBase {
|
|
16
16
|
value: unknown;
|
|
17
17
|
updated_at: Date;
|
|
18
18
|
updated_by: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IDataPayload extends IDataPayloadBase {
|
|
19
21
|
history?: IDataPayload[];
|
|
20
22
|
}
|
|
21
23
|
export type IData = {
|
|
@@ -76,54 +76,6 @@ export declare const documentTypeCodeTypes: string[];
|
|
|
76
76
|
export interface IEntityExtended extends DocumentType {
|
|
77
77
|
external_document_type: ExternalDocumentType | null;
|
|
78
78
|
}
|
|
79
|
-
export interface ICreateRequest {
|
|
80
|
-
external_document_type_id: string | null;
|
|
81
|
-
document_set_id: string;
|
|
82
|
-
code: IDocumentTypeCodeType;
|
|
83
|
-
description: string;
|
|
84
|
-
group: string;
|
|
85
|
-
is_searchable: boolean;
|
|
86
|
-
quantity_in?: boolean;
|
|
87
|
-
quantity_out?: boolean;
|
|
88
|
-
credit?: boolean;
|
|
89
|
-
debit?: boolean;
|
|
90
|
-
invoice: boolean;
|
|
91
|
-
return: boolean;
|
|
92
|
-
pay: boolean;
|
|
93
|
-
allow_create_from_header_without_lines: boolean;
|
|
94
|
-
allow_commissioner: boolean;
|
|
95
|
-
duplicate_group?: string | null;
|
|
96
|
-
allow_duplicates: boolean;
|
|
97
|
-
requires_picking: boolean;
|
|
98
|
-
allow_document_line_assoc_plugins: boolean;
|
|
99
|
-
user_type: IDocumentTypeUserType;
|
|
100
|
-
final_consumer: boolean;
|
|
101
|
-
ensure_same_provider: boolean;
|
|
102
|
-
}
|
|
103
|
-
export interface IUpdateRequest {
|
|
104
|
-
external_document_type_id?: string | null;
|
|
105
|
-
document_set_id?: string;
|
|
106
|
-
code?: IDocumentTypeCodeType;
|
|
107
|
-
description?: string;
|
|
108
|
-
group?: string;
|
|
109
|
-
is_searchable?: boolean;
|
|
110
|
-
quantity_in?: boolean;
|
|
111
|
-
quantity_out?: boolean;
|
|
112
|
-
credit?: boolean;
|
|
113
|
-
debit?: boolean;
|
|
114
|
-
invoice: boolean;
|
|
115
|
-
return: boolean;
|
|
116
|
-
pay: boolean;
|
|
117
|
-
allow_create_from_header_without_lines: boolean;
|
|
118
|
-
allow_commissioner?: boolean;
|
|
119
|
-
duplicate_group?: string | null;
|
|
120
|
-
allow_duplicates?: boolean;
|
|
121
|
-
requires_picking?: boolean;
|
|
122
|
-
allow_document_line_assoc_plugins: boolean;
|
|
123
|
-
user_type?: IDocumentTypeUserType;
|
|
124
|
-
final_consumer?: boolean;
|
|
125
|
-
ensure_same_provider?: boolean;
|
|
126
|
-
}
|
|
127
79
|
export interface IFindRequest {
|
|
128
80
|
description?: string;
|
|
129
81
|
}
|
|
@@ -139,9 +91,6 @@ export interface IRepository {
|
|
|
139
91
|
findMinified(params?: IShared.IFindMinifiedRequest): Promise<IShared.IFindMinifiedResponse[]>;
|
|
140
92
|
find(): Promise<IFindResponse[]>;
|
|
141
93
|
findDetailed(): Promise<IEntityExtended[]>;
|
|
142
|
-
create(data: ICreateRequest): Promise<IEntityExtended>;
|
|
143
|
-
update(selector: IShared.IFindByIdNumberRequest, data: IUpdateRequest): Promise<IEntityExtended | null>;
|
|
144
|
-
deleteOne(selector: IShared.IFindByIdNumberRequest): Promise<IEntityExtended | null>;
|
|
145
94
|
}
|
|
146
95
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
147
96
|
export type IApi = Omit<IRepository, "findById" | "findByQuery">;
|
|
@@ -29,11 +29,12 @@ export interface ISendEmailDocumentRequest {
|
|
|
29
29
|
template: IShared.IUserSendEmailDocumentTemplate;
|
|
30
30
|
start_document_header_id: string;
|
|
31
31
|
attachments: IAttachment[];
|
|
32
|
-
user:
|
|
33
|
-
name: string;
|
|
34
|
-
email: string;
|
|
35
|
-
};
|
|
32
|
+
user: ISendEmailDocumentUser;
|
|
36
33
|
}
|
|
34
|
+
export type ISendEmailDocumentUser = {
|
|
35
|
+
name: string;
|
|
36
|
+
email: string;
|
|
37
|
+
};
|
|
37
38
|
export interface IRepository {
|
|
38
39
|
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
39
40
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdItemWithVersions[]>;
|
|
@@ -30,6 +30,9 @@ export interface IUnpaidPurchasesRequest {
|
|
|
30
30
|
export interface IUnpaidByDatePurchasesRequest {
|
|
31
31
|
due_date: Date;
|
|
32
32
|
}
|
|
33
|
+
export interface IUnpaidByDateParamsRequest {
|
|
34
|
+
due_date?: string;
|
|
35
|
+
}
|
|
33
36
|
export type IPaymentOrigin = "CC Fornecedor" | "CC Cliente" | "CC Fornecedor (Descontinuado)" | "CC Cliente (Descontinuado)";
|
|
34
37
|
export interface IUnpaidPurchasesResponse extends Pick<Entity, "date" | "debit" | "credit"> {
|
|
35
38
|
document_header: Pick<DocumentHeader, "emission_date" | "pdf_link" | "id">;
|
|
@@ -22,6 +22,11 @@ export interface IExportPaymentsRequest {
|
|
|
22
22
|
value: number;
|
|
23
23
|
npf_ids?: string[];
|
|
24
24
|
}
|
|
25
|
+
export interface ICreateBulkPdfRequest {
|
|
26
|
+
month?: number;
|
|
27
|
+
year?: number;
|
|
28
|
+
ids?: string;
|
|
29
|
+
}
|
|
25
30
|
export type IBatchType = "national" | "international" | "null";
|
|
26
31
|
export interface IPaymentsBatchNpfDh {
|
|
27
32
|
id: string;
|
|
@@ -14,10 +14,11 @@ export interface IChannel {
|
|
|
14
14
|
export interface IFindMinifiedRequest {
|
|
15
15
|
value?: string;
|
|
16
16
|
}
|
|
17
|
-
export type ICreateRequest = Omit<Entity, "id"
|
|
18
|
-
export type IUpdateRequest = ICreateRequest
|
|
17
|
+
export type ICreateRequest = IShared.WithoutStamps<Omit<Entity, "id">>;
|
|
18
|
+
export type IUpdateRequest = Partial<ICreateRequest>;
|
|
19
|
+
export type ICreateData = ICreateRequest & Pick<Entity, "created_by">;
|
|
19
20
|
export interface IRepository {
|
|
20
|
-
create(data:
|
|
21
|
+
create(data: ICreateData): Promise<Entity>;
|
|
21
22
|
find(): Promise<Entity[]>;
|
|
22
23
|
findById(id: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
|
|
23
24
|
findMinified(params?: IFindMinifiedRequest): Promise<Entity[]>;
|
|
@@ -2,13 +2,14 @@ import { CLT } from "../../../shared/entities/tickets";
|
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
3
|
export type Entity = CLT;
|
|
4
4
|
export declare const Route = "clt";
|
|
5
|
-
export type ICreateRequest = Omit<Entity, "id"
|
|
6
|
-
export type IUpdateRequest = ICreateRequest
|
|
5
|
+
export type ICreateRequest = IShared.WithoutStamps<Omit<Entity, "id">>;
|
|
6
|
+
export type IUpdateRequest = Partial<ICreateRequest>;
|
|
7
|
+
export type ICreateData = ICreateRequest & Pick<Entity, "created_by">;
|
|
7
8
|
export interface IFindMinifiedRequest {
|
|
8
9
|
value?: string;
|
|
9
10
|
}
|
|
10
11
|
export interface IRepository {
|
|
11
|
-
create(data:
|
|
12
|
+
create(data: ICreateData): Promise<Entity>;
|
|
12
13
|
find(): Promise<Entity[]>;
|
|
13
14
|
findById(id: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
|
|
14
15
|
findMinified(params?: IFindMinifiedRequest): Promise<Entity[]>;
|
|
@@ -2,13 +2,14 @@ import { Language } from "../../../shared/entities/tickets";
|
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
3
|
export type Entity = Language;
|
|
4
4
|
export declare const Route = "tickets_language";
|
|
5
|
-
export type ICreateRequest = Omit<Entity, "id"
|
|
6
|
-
export type IUpdateRequest = ICreateRequest
|
|
5
|
+
export type ICreateRequest = IShared.WithoutStamps<Omit<Entity, "id">>;
|
|
6
|
+
export type IUpdateRequest = Partial<ICreateRequest>;
|
|
7
|
+
export type ICreateData = ICreateRequest & Pick<Entity, "created_by">;
|
|
7
8
|
export interface IFindMinifiedRequest {
|
|
8
9
|
value?: string;
|
|
9
10
|
}
|
|
10
11
|
export interface IRepository {
|
|
11
|
-
create(data:
|
|
12
|
+
create(data: ICreateData): Promise<Entity>;
|
|
12
13
|
find(): Promise<Entity[]>;
|
|
13
14
|
findById(id: IShared.IFindByIdNumberRequest): Promise<Entity | null>;
|
|
14
15
|
findMinified(params?: IFindMinifiedRequest): Promise<Entity[]>;
|
|
@@ -27,7 +27,7 @@ export interface IFindByQueryRequest {
|
|
|
27
27
|
}
|
|
28
28
|
export type IFindResponse = Omit<IFindDetailedResponse, "">;
|
|
29
29
|
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
|
|
30
|
-
export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telephone"
|
|
30
|
+
export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telephone"> & Partial<Pick<Persona, "street" | "locality" | "postal_code" | "country_id" | "vat_taxpayer">>;
|
|
31
31
|
export interface ICreateRequest {
|
|
32
32
|
user_id?: string;
|
|
33
33
|
main_persona: ICreateMainPersona;
|