@nomalism-com/types 0.49.10 → 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/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, };
@@ -50,9 +50,9 @@ export interface ISendGridCallbacks {
50
50
  attempt: number | null;
51
51
  }
52
52
  export interface ISendGridWebhookEvent {
53
- event: ISendGridCallbackEvent;
54
- sg_message_id: string;
55
- email: string;
53
+ event?: ISendGridCallbackEvent;
54
+ sg_message_id?: string;
55
+ email?: string;
56
56
  }
57
57
  export interface IFindByIdResponse {
58
58
  id: string;
@@ -21,24 +21,26 @@ 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
29
  entity?: string;
26
30
  reference?: string;
27
- identifier: string;
28
- method: string;
29
- amount: {
30
- value: number;
31
- currency?: string;
32
- };
33
- trid: string;
34
- status: 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
- transaction: IWebhookTransaction;
38
- channel?: {
39
- account?: string;
40
- name?: string;
41
- };
42
+ transaction?: IWebhookTransaction;
43
+ channel?: IWebhookChannel;
42
44
  }
43
45
  export interface IMultibancoReferenceResponse {
44
46
  referencia?: string;
@@ -42,6 +42,10 @@ export interface IUpdateRequest {
42
42
  imap_password?: string;
43
43
  active?: boolean;
44
44
  }
45
+ export interface IOAuthState {
46
+ accountId: string;
47
+ userId: string;
48
+ }
45
49
  export interface ICreateResponse {
46
50
  id: string;
47
51
  }
@@ -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[]>;
@@ -7,6 +7,9 @@ export interface IPrintLocations {
7
7
  name: string;
8
8
  };
9
9
  }
10
+ export interface IPrintLocationsRequest {
11
+ locations_ids: string;
12
+ }
10
13
  export interface IRepository {
11
14
  printLocationsPdf(data: string[]): Promise<void>;
12
15
  }
@@ -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 { IUnfinishedPickingLineGroupExtended } from "../../document/materialEntrance/interfaces";
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 ISavedEmPickingData = Pick<IUnfinishedPickingLineGroupExtended, "clientOrders" | "stock" | "not_ok">;
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: IData;
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;
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.10",
4
+ "version": "0.49.11",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",