@nomalism-com/types 0.49.9 → 0.49.11
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 +296 -250
- package/dist/index.js +295 -250
- package/dist/main.d.ts +2 -1
- package/dist/modules/integration/emailLog/interfaces.d.ts +5 -0
- package/dist/modules/integration/eupago/interfaces.d.ts +21 -14
- package/dist/modules/integration/googleSheets/interfaces.d.ts +2 -2
- package/dist/modules/integration/projectInfo/interfaces.d.ts +2 -1
- package/dist/modules/llm/llm/interfaces.d.ts +5 -0
- package/dist/modules/print/printer/interfaces.d.ts +1 -1
- package/dist/modules/stock/emailAccount/interface.d.ts +4 -0
- package/dist/modules/stock/gmails/interface.d.ts +4 -0
- package/dist/modules/stock/mobilePrint/interface.d.ts +3 -0
- package/dist/modules/stock/saft/interfaces.d.ts +19 -0
- package/dist/modules/stock/savedEmPicking/interfaces.d.ts +9 -2
- package/dist/modules/stock/vatValidation/interfaces.d.ts +3 -0
- package/dist/modules/supply/documentLine/interfaces.d.ts +4 -1
- 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/commissioner/interface.d.ts +1 -1
- package/dist/modules/user/providers/interface.d.ts +8 -8
- package/dist/modules/user/swift/interface.d.ts +1 -1
- package/dist/modules/view/adminPanel/interfaces.d.ts +37 -0
- package/dist/shared/interface.d.ts +1 -0
- package/package.json +2 -2
package/dist/main.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ import * as QueryList from "./modules/stock/queryList/interfaces";
|
|
|
67
67
|
import * as QueryParameter from "./modules/stock/queryParameter/interfaces";
|
|
68
68
|
import * as RecurrentTasks from "./modules/stock/recurrentTasks/interface";
|
|
69
69
|
import * as ReturnReason from "./modules/stock/returnReason/interfaces";
|
|
70
|
+
import * as Saft from "./modules/stock/saft/interfaces";
|
|
70
71
|
import * as SavedEmPicking from "./modules/stock/savedEmPicking/interfaces";
|
|
71
72
|
import * as SavedProviderProposal from "./modules/stock/savedProviderProposal/interfaces";
|
|
72
73
|
import * as StockMovement from "./modules/stock/stockMovement/interface";
|
|
@@ -148,4 +149,4 @@ import * as stockErrors from "./shared/errors/stockErrors";
|
|
|
148
149
|
import * as userErrors from "./shared/errors/userErrors";
|
|
149
150
|
import * as viewErrors from "./shared/errors/viewErrors";
|
|
150
151
|
import * as shared from "./shared/interface";
|
|
151
|
-
export { AccountCode, Adiantamento, AdminPanel, AllowedDevice, BankData, BillOfLading, Catalogo, Channel, Chat, ChatRapidMessage, ChatSubscriber, Client, ClientType, CLT, Commissioner, ConferirEncomenda, Country, CurrentAccount, Dashboard, DeliveryMethods, DocumentHeader, DocumentHeaderHistory, DocumentHeaderSubscriber, DocumentHeaderSurvey, DocumentLine, DocumentLineAssoc, DocumentLineMt, DocumentLineNote, DocumentLineRm, documentManagementErrors, DocumentSet, DocumentType, EmailAccount, EmailLog, EmailTemplate, EmailTemplateAttachment, EmailVerification, ErrorLog, EuPago, ExternalDocumentHeader, ExternalDocumentType, FaturaCredito, FaturaRecibo, FaturaSimplificada, Favorites, File, Gmails, GoogleCalendar, GoogleFilePermission, GoogleSheetPool, GoogleSheets, integrationErrors, Inventario, Language, LLM, Location, MaterialEntrance, MaturityDates, MobilePrint, Multimedia, NotaCredito, NotaCreditoAdiantamento, Npc, NPF, NRCL, Observation, ObservationType, Order, OrderManagement, Password, PatchNotes, Payment, PaymentBatch, PaymentMethods, Persona, PersonaMerge, Portal, PreSale, PreSaleProduct, Printer, Prison, ProductGoogleSheets, ProductImage, ProductionOrder, ProductLocation, Proforma, ProjectInfo, Promotion, PromotionAssoc, PropostaFornecedor, PropostaSheets, ProviderCreditNoteFromReturn, ProviderFinancialCreditNote, Providers, ProviderServiceInvoice, ProviderType, Purchase, PurchaseConditions, Quebra, QueryList, QueryParameter, ReasonForExemption, Recibo, RecurrentTasks, RefreshToken, ReturnReason, ReturnToProvider, SavedEmPicking, SavedProviderProposal, Schedule, SchedulePrintJob, SegmentsArea, Sessions, Settings, shared, Shippings, SideMenu, SidemenuHighlight, SmsSender, SmsTemplate, StartDocumentHeaderLastUpdate, stockErrors, StockMovement, StoreOperator, Swift, SystemModule, Tag, Task, TaskMessage, TaskRead, Tenant, Theme, Tickets, TicketsLanguage, TimeSheet, Transformado, TypeOfLocation, UnitOfMeasure, UpfrontReturn, userErrors, UserPositions, Users, UserTokens, VatTax, VatTaxZone, VatValidation, Vehicles, viewErrors, WebSocket, Workflow, };
|
|
152
|
+
export { AccountCode, Adiantamento, AdminPanel, AllowedDevice, BankData, BillOfLading, Catalogo, Channel, Chat, ChatRapidMessage, ChatSubscriber, Client, ClientType, CLT, Commissioner, ConferirEncomenda, Country, CurrentAccount, Dashboard, DeliveryMethods, DocumentHeader, DocumentHeaderHistory, DocumentHeaderSubscriber, DocumentHeaderSurvey, DocumentLine, DocumentLineAssoc, DocumentLineMt, DocumentLineNote, DocumentLineRm, documentManagementErrors, DocumentSet, DocumentType, EmailAccount, EmailLog, EmailTemplate, EmailTemplateAttachment, EmailVerification, ErrorLog, EuPago, ExternalDocumentHeader, ExternalDocumentType, FaturaCredito, FaturaRecibo, FaturaSimplificada, Favorites, File, Gmails, GoogleCalendar, GoogleFilePermission, GoogleSheetPool, GoogleSheets, integrationErrors, Inventario, Language, LLM, Location, MaterialEntrance, MaturityDates, MobilePrint, Multimedia, NotaCredito, NotaCreditoAdiantamento, Npc, NPF, NRCL, Observation, ObservationType, Order, OrderManagement, Password, PatchNotes, Payment, PaymentBatch, PaymentMethods, Persona, PersonaMerge, Portal, PreSale, PreSaleProduct, Printer, Prison, ProductGoogleSheets, ProductImage, ProductionOrder, ProductLocation, Proforma, ProjectInfo, Promotion, PromotionAssoc, PropostaFornecedor, PropostaSheets, ProviderCreditNoteFromReturn, ProviderFinancialCreditNote, Providers, ProviderServiceInvoice, ProviderType, Purchase, PurchaseConditions, Quebra, QueryList, QueryParameter, ReasonForExemption, Recibo, RecurrentTasks, RefreshToken, ReturnReason, ReturnToProvider, Saft, SavedEmPicking, SavedProviderProposal, Schedule, SchedulePrintJob, SegmentsArea, Sessions, Settings, shared, Shippings, SideMenu, SidemenuHighlight, SmsSender, SmsTemplate, StartDocumentHeaderLastUpdate, stockErrors, StockMovement, StoreOperator, Swift, SystemModule, Tag, Task, TaskMessage, TaskRead, Tenant, Theme, Tickets, TicketsLanguage, TimeSheet, Transformado, TypeOfLocation, UnitOfMeasure, UpfrontReturn, userErrors, UserPositions, Users, UserTokens, VatTax, VatTaxZone, VatValidation, Vehicles, viewErrors, WebSocket, Workflow, };
|
|
@@ -49,6 +49,11 @@ export interface ISendGridCallbacks {
|
|
|
49
49
|
url: string | null;
|
|
50
50
|
attempt: number | null;
|
|
51
51
|
}
|
|
52
|
+
export interface ISendGridWebhookEvent {
|
|
53
|
+
event?: ISendGridCallbackEvent;
|
|
54
|
+
sg_message_id?: string;
|
|
55
|
+
email?: string;
|
|
56
|
+
}
|
|
52
57
|
export interface IFindByIdResponse {
|
|
53
58
|
id: string;
|
|
54
59
|
owner_id: string | null;
|
|
@@ -21,23 +21,30 @@ export interface ICreatePendingPaymentRequest {
|
|
|
21
21
|
from_document_header_id: string;
|
|
22
22
|
amount: number;
|
|
23
23
|
}
|
|
24
|
+
export interface IWebhookAmount {
|
|
25
|
+
value?: number;
|
|
26
|
+
currency?: string;
|
|
27
|
+
}
|
|
24
28
|
export interface IWebhookTransaction {
|
|
25
|
-
entity?:
|
|
26
|
-
reference?:
|
|
27
|
-
identifier
|
|
28
|
-
method
|
|
29
|
-
amount
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
entity?: string;
|
|
30
|
+
reference?: string;
|
|
31
|
+
identifier?: string;
|
|
32
|
+
method?: string;
|
|
33
|
+
amount?: IWebhookAmount;
|
|
34
|
+
trid?: string;
|
|
35
|
+
status?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface IWebhookChannel {
|
|
38
|
+
account?: string;
|
|
39
|
+
name?: string;
|
|
35
40
|
}
|
|
36
41
|
export interface IWebhookBody {
|
|
37
|
-
|
|
38
|
-
channel?:
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
transaction?: IWebhookTransaction;
|
|
43
|
+
channel?: IWebhookChannel;
|
|
44
|
+
}
|
|
45
|
+
export interface IMultibancoReferenceResponse {
|
|
46
|
+
referencia?: string;
|
|
47
|
+
entidade?: string;
|
|
41
48
|
}
|
|
42
49
|
export interface IFindResponse extends Entity {
|
|
43
50
|
document_link?: string;
|
|
@@ -14,10 +14,10 @@ export interface IGetUserData extends Pick<DocumentHeader, "document_number" | "
|
|
|
14
14
|
}
|
|
15
15
|
export interface IUpdateRequest {
|
|
16
16
|
document_name: string;
|
|
17
|
-
client_data?: IGetUserData
|
|
17
|
+
client_data?: Partial<IGetUserData>;
|
|
18
18
|
}
|
|
19
19
|
export interface ICloneRequest {
|
|
20
|
-
document_name
|
|
20
|
+
document_name?: string | null;
|
|
21
21
|
}
|
|
22
22
|
export interface ICloneResponse {
|
|
23
23
|
spreadsheetId: string;
|
|
@@ -18,9 +18,10 @@ export type IBudgetOptionsType = {
|
|
|
18
18
|
};
|
|
19
19
|
export type IProjectInfoType = (typeof IProjectInfoTypeEnum)[keyof typeof IProjectInfoTypeEnum];
|
|
20
20
|
export declare const projectInfoTypes: string[];
|
|
21
|
-
export interface ICreateRequest extends Omit<Entity, "created_at" | "updated_at" | "document_header_id" | "id" | "email_log" | "persona_id" | "client_id"> {
|
|
21
|
+
export interface ICreateRequest extends Omit<Entity, "created_at" | "updated_at" | "document_header_id" | "id" | "email_log" | "persona_id" | "client_id" | "address"> {
|
|
22
22
|
persona_id?: string;
|
|
23
23
|
client_id?: string;
|
|
24
|
+
address?: string | null;
|
|
24
25
|
}
|
|
25
26
|
export interface ICreateResponse {
|
|
26
27
|
document_header_id: string;
|
|
@@ -24,6 +24,11 @@ export interface IIdentifyAndTranslateResponse {
|
|
|
24
24
|
language: string;
|
|
25
25
|
translation: string | null;
|
|
26
26
|
}
|
|
27
|
+
export interface IOllamaChatResponse {
|
|
28
|
+
message?: {
|
|
29
|
+
content?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
27
32
|
export interface IRepository {
|
|
28
33
|
prompt: (data: IPromptRequest, response: IPromptResponse) => IPromptAbortController;
|
|
29
34
|
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[];
|
|
@@ -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[]>;
|
|
@@ -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,9 +1,16 @@
|
|
|
1
1
|
import { SavedEmPicking } from "../../../shared/entities/stock";
|
|
2
2
|
import * as IShared from "../../../shared/interface";
|
|
3
|
-
import {
|
|
3
|
+
import { IEntradaDeMaterialClientOrder, IEntradaDeMaterialNC, IEntradaDeMaterialStock } from "../../document/materialEntrance/interfaces";
|
|
4
4
|
export type Entity = SavedEmPicking;
|
|
5
5
|
export declare const Route = "saved_em_picking";
|
|
6
|
-
export type
|
|
6
|
+
export type ISavedEmPickingClientOrder = IShared.PartialBy<IEntradaDeMaterialClientOrder, "pc_sheet" | "note" | "printed">;
|
|
7
|
+
export type ISavedEmPickingStock = IShared.PartialBy<IEntradaDeMaterialStock, "note" | "printed">;
|
|
8
|
+
export type ISavedEmPickingNotOk = IShared.PartialBy<IEntradaDeMaterialNC, "note" | "printed">;
|
|
9
|
+
export interface ISavedEmPickingData {
|
|
10
|
+
clientOrders: ISavedEmPickingClientOrder[];
|
|
11
|
+
stock: ISavedEmPickingStock[];
|
|
12
|
+
not_ok?: ISavedEmPickingNotOk;
|
|
13
|
+
}
|
|
7
14
|
export interface ICreateRequest {
|
|
8
15
|
provider_id: string;
|
|
9
16
|
document_header_id: string;
|
|
@@ -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
|
}
|
|
@@ -21,6 +21,9 @@ export interface IDataPayload {
|
|
|
21
21
|
export type IData = {
|
|
22
22
|
[K in IDataKeys]?: IDataPayload;
|
|
23
23
|
};
|
|
24
|
+
export type IDataRequest = {
|
|
25
|
+
[K in IDataKeys]?: Partial<IDataPayload>;
|
|
26
|
+
};
|
|
24
27
|
export interface IImportedFromSheets {
|
|
25
28
|
type: IGetProductType;
|
|
26
29
|
group: IGetProductGroup;
|
|
@@ -87,7 +90,7 @@ export interface ICreateRequest {
|
|
|
87
90
|
provider_tax: number;
|
|
88
91
|
provider_discount: number;
|
|
89
92
|
document_line_group_id?: string;
|
|
90
|
-
data:
|
|
93
|
+
data: IDataRequest;
|
|
91
94
|
}
|
|
92
95
|
export interface IUpdateRequest {
|
|
93
96
|
product_id?: string;
|
|
@@ -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[]>;
|
|
@@ -30,7 +30,7 @@ export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFind
|
|
|
30
30
|
export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telephone">;
|
|
31
31
|
export interface ICreateRequest {
|
|
32
32
|
user_id?: string;
|
|
33
|
-
main_persona: ICreateMainPersona
|
|
33
|
+
main_persona: Partial<ICreateMainPersona>;
|
|
34
34
|
deferred_payment?: boolean;
|
|
35
35
|
is_donation_eligible?: boolean;
|
|
36
36
|
default_discount?: number;
|
|
@@ -27,7 +27,7 @@ export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telep
|
|
|
27
27
|
export interface ICreateRequest {
|
|
28
28
|
user_id: string;
|
|
29
29
|
default_percentage?: number;
|
|
30
|
-
main_persona: ICreateMainPersona
|
|
30
|
+
main_persona: Partial<ICreateMainPersona>;
|
|
31
31
|
country_id?: string | null;
|
|
32
32
|
language_id?: string | null;
|
|
33
33
|
default_payment_method_id?: string | null;
|
|
@@ -36,7 +36,7 @@ export interface ICreateRequest {
|
|
|
36
36
|
default_discount?: number;
|
|
37
37
|
exemption_reason_id?: string | null;
|
|
38
38
|
default_account_code?: string | null;
|
|
39
|
-
main_persona: ICreateMainPersona
|
|
39
|
+
main_persona: Partial<ICreateMainPersona>;
|
|
40
40
|
provider_type_id?: string | null;
|
|
41
41
|
country_id?: string | null;
|
|
42
42
|
language_id?: string | null;
|
|
@@ -45,7 +45,7 @@ export interface ICreateRequest {
|
|
|
45
45
|
default_maturity_date_id?: string | null;
|
|
46
46
|
default_delivery_method_id?: string | null;
|
|
47
47
|
default_vehicle_id?: string | null;
|
|
48
|
-
personas?: ICreateMainPersona[];
|
|
48
|
+
personas?: Partial<ICreateMainPersona>[];
|
|
49
49
|
}
|
|
50
50
|
export interface IUpdateRequest {
|
|
51
51
|
manufacturer?: boolean;
|
|
@@ -53,13 +53,13 @@ export interface IUpdateRequest {
|
|
|
53
53
|
default_discount?: number;
|
|
54
54
|
main_persona_id?: string;
|
|
55
55
|
contact_persona_id?: string;
|
|
56
|
-
country_id?: string;
|
|
57
|
-
language_id?: string;
|
|
56
|
+
country_id?: string | null;
|
|
57
|
+
language_id?: string | null;
|
|
58
58
|
support_language_id?: string | null;
|
|
59
|
-
provider_type_id?: string;
|
|
60
|
-
default_payment_method_id?: string;
|
|
61
|
-
default_maturity_date_id?: string;
|
|
62
|
-
default_delivery_method_id?: string;
|
|
59
|
+
provider_type_id?: string | null;
|
|
60
|
+
default_payment_method_id?: string | null;
|
|
61
|
+
default_maturity_date_id?: string | null;
|
|
62
|
+
default_delivery_method_id?: string | null;
|
|
63
63
|
default_vehicle_id?: string | null;
|
|
64
64
|
exemption_reason_id?: string | null;
|
|
65
65
|
default_account_code?: string | null;
|
|
@@ -113,8 +113,45 @@ export interface IKafka extends ICalendar {
|
|
|
113
113
|
count: number;
|
|
114
114
|
error_count: number;
|
|
115
115
|
}
|
|
116
|
+
export declare const IDataTypeEnum: {
|
|
117
|
+
server: "server";
|
|
118
|
+
googleSheets: "googleSheets";
|
|
119
|
+
services: "services";
|
|
120
|
+
all: "all";
|
|
121
|
+
};
|
|
122
|
+
export type IDataType = (typeof IDataTypeEnum)[keyof typeof IDataTypeEnum];
|
|
123
|
+
export declare const dataTypes: string[];
|
|
124
|
+
export declare const IServiceEnum: {
|
|
125
|
+
prints: "prints";
|
|
126
|
+
eventstores: "eventstores";
|
|
127
|
+
moloniRequests: "moloniRequests";
|
|
128
|
+
moloniErrors: "moloniErrors";
|
|
129
|
+
projectInfos: "projectInfos";
|
|
130
|
+
multimedias: "multimedias";
|
|
131
|
+
multimediaSummary: "multimediaSummary";
|
|
132
|
+
crons: "crons";
|
|
133
|
+
emails: "emails";
|
|
134
|
+
errors: "errors";
|
|
135
|
+
chats: "chats";
|
|
136
|
+
kafka: "kafka";
|
|
137
|
+
};
|
|
138
|
+
export type IService = (typeof IServiceEnum)[keyof typeof IServiceEnum];
|
|
139
|
+
export declare const adminPanelServices: string[];
|
|
140
|
+
export declare const IServerEnum: {
|
|
141
|
+
services: "services";
|
|
142
|
+
logs: "logs";
|
|
143
|
+
certificates: "certificates";
|
|
144
|
+
filesystem: "filesystem";
|
|
145
|
+
backups: "backups";
|
|
146
|
+
};
|
|
147
|
+
export type IServer = (typeof IServerEnum)[keyof typeof IServerEnum];
|
|
148
|
+
export declare const adminPanelServers: string[];
|
|
116
149
|
export interface IGetDataRequest {
|
|
117
150
|
token: string;
|
|
151
|
+
dataType: IDataType;
|
|
152
|
+
services?: IService;
|
|
153
|
+
server?: IServer;
|
|
154
|
+
logName?: string;
|
|
118
155
|
}
|
|
119
156
|
export interface IGetDataResponse {
|
|
120
157
|
server: {
|
|
@@ -419,6 +419,7 @@ export interface IBrokerMessage<T extends IBrokerTopic = IBrokerTopic> {
|
|
|
419
419
|
export type Nullable<T> = {
|
|
420
420
|
[K in keyof T]: T[K] | null;
|
|
421
421
|
};
|
|
422
|
+
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
422
423
|
export type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
423
424
|
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
|
424
425
|
}[Keys];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/types",
|
|
3
3
|
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"version": "0.49.
|
|
4
|
+
"version": "0.49.11",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"eslint-plugin-simple-import-sort": "^14.0.0",
|
|
37
37
|
"globals": "^17.12.0",
|
|
38
38
|
"husky": "^9.1.7",
|
|
39
|
-
"lint-staged": "^17.5.
|
|
39
|
+
"lint-staged": "^17.5.1",
|
|
40
40
|
"prettier": "^3.9.6",
|
|
41
41
|
"tsup": "^8.5.1",
|
|
42
42
|
"typescript-eslint": "^8.70.0"
|