@nomalism-com/types 0.43.24 → 0.43.26
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 +1851 -1869
- package/dist/index.js +1851 -1869
- package/dist/main.d.ts +1 -2
- package/dist/modules/supply/documentHeaderSurvey/interfaces.d.ts +13 -0
- package/dist/modules/supply/documentHeaderSurvey/route.schema.d.ts +0 -0
- package/dist/modules/supply/documentLine/interfaces.d.ts +7 -3
- package/dist/modules/supply/documentLineAssoc/interfaces.d.ts +1 -19
- package/dist/shared/entities/stock.d.ts +12 -0
- package/dist/shared/interface.d.ts +8 -1
- package/package.json +6 -6
- package/dist/modules/supply/documentLineAssoc/route.schema.d.ts +0 -3
package/dist/main.d.ts
CHANGED
|
@@ -40,7 +40,6 @@ import * as ProviderServiceInvoiceRoutes from './modules/document/providerServic
|
|
|
40
40
|
import * as DocumentLine from './modules/supply/documentLine/interfaces';
|
|
41
41
|
import * as DocumentLineRoutes from './modules/supply/documentLine/route.schema';
|
|
42
42
|
import * as DocumentLineAssoc from './modules/supply/documentLineAssoc/interfaces';
|
|
43
|
-
import * as DocumentLineAssocRoutes from './modules/supply/documentLineAssoc/route.schema';
|
|
44
43
|
import * as DocumentSet from './modules/supply/documentSet/interface';
|
|
45
44
|
import * as DocumentSetRoutes from './modules/supply/documentSet/route.schema';
|
|
46
45
|
import * as DocumentType from './modules/supply/documentType/interfaces';
|
|
@@ -238,4 +237,4 @@ import * as LLM from './modules/llm/llm/interfaces';
|
|
|
238
237
|
import * as LLMRoutes from './modules/llm/llm/route.schema';
|
|
239
238
|
import * as PatchNotes from './modules/integration/patchNotes/interfaces';
|
|
240
239
|
import * as ConferirEncomenda from './modules/stock/conferirEncomenda/interface';
|
|
241
|
-
export { shared, viewErrors, stockErrors, userErrors, documentManagementErrors, integrationErrors, ZipCode, ZipCodeRoutes, BankData, BankDataRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, Chat, ChatRoutes, Commissioner, CommissionerRoutes, Country, CountryRoutes, DeliveryMethods, DeliveryMethodsRoutes, DocumentHeader, DocumentHeaderRoutes, DocumentHeaderHistory, BillOfLading, BillOfLadingRoutes, ProductionOrder, ProductionOrderRoutes, Proforma, ProformaRoutes, PropostaFornecedor, PropostaFornecedorRoutes, ProviderCreditNoteFromReturn, ProviderCreditNoteFromReturnRoutes, ProviderFinancialCreditNote, ProviderFinancialCreditNoteRoutes, ProviderServiceInvoice, ProviderServiceInvoiceRoutes, DocumentLine, DocumentLineRoutes, DocumentLineAssoc,
|
|
240
|
+
export { shared, viewErrors, stockErrors, userErrors, documentManagementErrors, integrationErrors, ZipCode, ZipCodeRoutes, BankData, BankDataRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, Chat, ChatRoutes, Commissioner, CommissionerRoutes, Country, CountryRoutes, DeliveryMethods, DeliveryMethodsRoutes, DocumentHeader, DocumentHeaderRoutes, DocumentHeaderHistory, BillOfLading, BillOfLadingRoutes, ProductionOrder, ProductionOrderRoutes, Proforma, ProformaRoutes, PropostaFornecedor, PropostaFornecedorRoutes, ProviderCreditNoteFromReturn, ProviderCreditNoteFromReturnRoutes, ProviderFinancialCreditNote, ProviderFinancialCreditNoteRoutes, ProviderServiceInvoice, ProviderServiceInvoiceRoutes, DocumentLine, DocumentLineRoutes, DocumentLineAssoc, DocumentSet, DocumentSetRoutes, DocumentType, DocumentTypeRoutes, ExternalDocumentType, ExternalDocumentHeader, ExternalDocumentHeaderRoutes, Favorites, FavoritesRoutes, File, FileRoutes, GoogleSheets, GoogleSheetsRoutes, Language, LanguageRoutes, Location, LocationRoutes, MaturityDates, MaturityDatesRoutes, Multimedia, MultimediaRoutes, OrderManagement, Observation, ObservationRoutes, ObservationType, ObservationTypeRoutes, Password, PasswordRoutes, Payment, PaymentRoutes, PaymentMethods, PaymentMethodsRoutes, ProductImage, ProductImageRoutes, Promotion, PromotionRoutes, PromotionAssoc, PromotionAssocRoutes, Providers, ProvidersRoutes, ProviderType, ProviderTypeRoutes, PurchaseConditions, PurchaseConditionsRoutes, ReasonForExemption, ReasonForExemptionRoutes, RefreshToken, RefreshTokenRoutes, SegmentsArea, SegmentsAreaRoutes, Sessions, SessionsRoutes, Shippings, ShippingsRoutes, StoreOperator, StoreOperatorRoutes, Swift, SwiftRoutes, TypeOfLocation, TypeOfLocationRoutes, UnitOfMeasure, UnitOfMeasureRoutes, UserPositions, UserPositionsRoutes, Users, UsersRoutes, UserTokens, UserTokensRoutes, VatValidation, VatValidationRoutes, VatTax, VatTaxRoutes, VatTaxZone, VatTaxZoneRoutes, Vehicles, VehiclesRoutes, Workflow, WorkflowRoutes, StockMovement, StockMovementRoutes, Tenant, TenantRoutes, PreSale, PreSaleRoutes, PreSaleProduct, PreSaleProductRoutes, Npc, NpcRoutes, Printer, PrinterRoutes, SchedulePrintJob, SchedulePrintJobRoutes, QueryList, QueryListRoutes, QueryParameter, QueryParameterRoutes, ReturnReason, ReturnReasonRoutes, PropostaSheets, PropostaSheetsRoutes, Schedule, ScheduleRoutes, GoogleFilePermission, GoogleFilePermissionRoutes, Settings, SettingsRoutes, Tickets, TicketsRoutes, Channel, ChannelRoutes, TicketsLanguage, TicketsLanguageRoutes, CLT, CLTRoutes, StartDocumentHeaderLastUpdate, Persona, PersonaRoutes, ProjectInfo, ProjectInfoRoutes, EmailVerification, EmailVerificationRoutes, EmailLog, EmailLogRoutes, Purchase, PurchaseRoutes, Order, OrderRoutes, MaterialEntrance, MaterialEntranceRoutes, Transformado, TransformadoRoutes, Quebra, QuebraRoutes, UpfrontReturn, UpfrontReturnRoutes, SavedEmPicking, SavedEmPickingRoutes, EmailTemplate, EmailTemplateRoutes, EmailTemplateAttachment, EmailTemplateAttachmentRoutes, Inventario, InventarioRoutes, ReturnToProvider, ReturnToProviderRoutes, Prison, PrisonRoutes, DocumentLineNote, DocumentLineNoteRoutes, SavedProviderProposal, SavedProviderProposalRoutes, ProductGoogleSheets, ProductGoogleSheetsRoutes, Task, TaskRoutes, TaskMessage, TaskMessageRoutes, RecurrentTasks, TaskRead, TaskReadRoutes, Theme, ThemeRoutes, Dashboard, DashboardRoutes, ChatRapidMessage, ChatRapidMessageRoutes, SideMenu, SideMenuRoutes, AdminPanel, ErrorLog, ErrorLogRoutes, DocumentLineRm, DocumentLineRmRoutes, DocumentLineMt, DocumentLineMtRoutes, ChatSubscriber, ChatSubscriberRoutes, Tag, TagRoutes, Gmails, NPF, NPFRoutes, NRCL, NRCLRoutes, CurrentAccount, CurrentAccountRoutes, PaymentBatch, PaymentBatchRoutes, Portal, PortalRoutes, GoogleSheetPool, AccountCode, AccountCodeRoutes, LLM, LLMRoutes, PatchNotes, ConferirEncomenda, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Nomalism from '../../..';
|
|
2
|
+
import { DocumentHeaderSurvey } from '../../../shared/entities/stock';
|
|
3
|
+
export type IEntity = DocumentHeaderSurvey;
|
|
4
|
+
export type ICreateRequest = Pick<IEntity, 'owner_id' | 'document_header_id' | 'persona_id'>;
|
|
5
|
+
export type IResponse = IEntity;
|
|
6
|
+
export type IUpdateSurveyRequest = Pick<IEntity, 'data'>;
|
|
7
|
+
export type IUpdateSentRequest = Pick<IEntity, 'sent'>;
|
|
8
|
+
export interface IRepository {
|
|
9
|
+
find(): Promise<IResponse[]>;
|
|
10
|
+
updateSurvey(id: string, data: IUpdateSurveyRequest): Promise<void>;
|
|
11
|
+
updateSent(id: string, sent: IUpdateSentRequest): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export type IController = Nomalism.shared.IEntityWithUserToken<IRepository>;
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { DocumentLine, DocumentLineVirtuals, DocumentLinePendingConflict, DocumentLineBaseVirtuals, ProductPromotionVirtuals, DocumentLineNote, DocumentLineRM } from '../../../shared/entities/stock';
|
|
2
|
+
import { DocumentLine, DocumentLineVirtuals, DocumentLinePendingConflict, DocumentLineBaseVirtuals, ProductPromotionVirtuals, DocumentLineNote, DocumentLineRM, DocumentLineAssoc } from '../../../shared/entities/stock';
|
|
3
3
|
import * as IDocumentLineAssoc from '../documentLineAssoc/interfaces';
|
|
4
4
|
import { IDocumentTypeCodeType, IDocumentTypeUserType } from '../documentType/interfaces';
|
|
5
5
|
import { IProductType, IProductState } from '../../stock/productGoogleSheets/interface';
|
|
@@ -76,7 +76,8 @@ export interface IEntityExtended extends Omit<DocumentLine, 'data'> {
|
|
|
76
76
|
product_integer_only: boolean;
|
|
77
77
|
espera_info_cliente_data: IEsperaInfoClienteData;
|
|
78
78
|
}
|
|
79
|
-
export interface ICreateRequest
|
|
79
|
+
export interface ICreateRequest {
|
|
80
|
+
document_header_id: string;
|
|
80
81
|
document_line_id?: string;
|
|
81
82
|
product_id?: string;
|
|
82
83
|
quantity: number;
|
|
@@ -110,6 +111,9 @@ export interface IUpdateDataRequest {
|
|
|
110
111
|
datafield: IDataKeys;
|
|
111
112
|
payload: IDataPayload;
|
|
112
113
|
}
|
|
114
|
+
export interface IEntityWithDocumentLine extends DocumentLineAssoc {
|
|
115
|
+
document_line: DocumentLine;
|
|
116
|
+
}
|
|
113
117
|
export interface IUpdateManyRequest {
|
|
114
118
|
ids: string[];
|
|
115
119
|
client_discount?: number;
|
|
@@ -143,7 +147,7 @@ export interface IPrintLabelQueryRequest {
|
|
|
143
147
|
export interface IRepository {
|
|
144
148
|
create(data: ICreateRequest[]): Promise<IDocumentLineAssoc.IEntityExtended[]>;
|
|
145
149
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
146
|
-
updateData(data: IUpdateDataRequest): Promise<
|
|
150
|
+
updateData(data: IUpdateDataRequest): Promise<IEntityWithDocumentLine[]>;
|
|
147
151
|
updateMany(data: IUpdateManyRequest): Promise<void>;
|
|
148
152
|
updateManyByDocumentHeader(selector: IShared.IFindByIdRequest, data: IUpdateManyByDocumentHeaderRequest): Promise<void>;
|
|
149
153
|
updateIndexes(document_line_ids: string[]): Promise<void>;
|
|
@@ -1,35 +1,17 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import { DocumentLineAssoc
|
|
2
|
+
import { DocumentLineAssoc } from '../../../shared/entities/stock';
|
|
3
3
|
import * as IDocumentLine from '../documentLine/interfaces';
|
|
4
4
|
import { IDocumentLineVirtuals } from '../documentLine/interfaces';
|
|
5
5
|
export type Entity = DocumentLineAssoc;
|
|
6
6
|
export declare const Route = "documentLineAssoc";
|
|
7
7
|
export declare const UpperName = "DocumentLineAssoc";
|
|
8
8
|
export declare const LowerName: string;
|
|
9
|
-
export interface IEntityWithDocumentLine extends Entity {
|
|
10
|
-
document_line: DocumentLine;
|
|
11
|
-
}
|
|
12
9
|
export interface IEntityExtended extends Entity {
|
|
13
10
|
document_line: IDocumentLine.IEntityExtended;
|
|
14
11
|
}
|
|
15
|
-
export interface ICreateRequest {
|
|
16
|
-
document_header_id: string;
|
|
17
|
-
document_line_id: string;
|
|
18
|
-
}
|
|
19
|
-
export interface IUpdateRequest {
|
|
20
|
-
external_id?: string | null;
|
|
21
|
-
origin_id?: string | null;
|
|
22
|
-
}
|
|
23
|
-
export interface IUpdateGroupRequest {
|
|
24
|
-
document_line_id: string[];
|
|
25
|
-
}
|
|
26
12
|
export interface IRepository {
|
|
27
|
-
findById(selector: IShared.IFindByIdRequest): Promise<Entity | null>;
|
|
28
13
|
findByOwnerId(data: IShared.IFindByOwnerIdRequest): Promise<IEntityExtended[]>;
|
|
29
14
|
findVirtualsByOwnerId(data: IShared.IFindByOwnerIdRequest): Promise<IDocumentLineVirtuals[]>;
|
|
30
15
|
findHistoryByLineId(data: IShared.IFindByIdRequest): Promise<IDocumentLine.IHistory[]>;
|
|
31
|
-
create(data: ICreateRequest[]): Promise<IEntityWithDocumentLine[]>;
|
|
32
|
-
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<IEntityWithDocumentLine>;
|
|
33
16
|
}
|
|
34
|
-
export type IApi = Omit<IRepository, 'findById'>;
|
|
35
17
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1064,3 +1064,15 @@ export type ConferirEncomenda = {
|
|
|
1064
1064
|
created_at: Date;
|
|
1065
1065
|
created_by: string;
|
|
1066
1066
|
};
|
|
1067
|
+
/**
|
|
1068
|
+
* Model DocumentHeaderSurvey
|
|
1069
|
+
*
|
|
1070
|
+
*/
|
|
1071
|
+
export type DocumentHeaderSurvey = {
|
|
1072
|
+
id: string;
|
|
1073
|
+
owner_id: string;
|
|
1074
|
+
document_header_id: string;
|
|
1075
|
+
persona_id: string;
|
|
1076
|
+
sent: Date | null;
|
|
1077
|
+
data: unknown | null;
|
|
1078
|
+
};
|
|
@@ -178,7 +178,8 @@ export declare enum IBrokerTopic {
|
|
|
178
178
|
googlesheet_stock_log = "googlesheet_stock_log",
|
|
179
179
|
googlesheet_encomenda_log = "googlesheet_encomenda_log",
|
|
180
180
|
log_google_api_request = "log_google_api_request",
|
|
181
|
-
send_espera_info_cliente_messages = "send_espera_info_cliente_messages"
|
|
181
|
+
send_espera_info_cliente_messages = "send_espera_info_cliente_messages",
|
|
182
|
+
send_email_client_survey = "send_email_client_survey"
|
|
182
183
|
}
|
|
183
184
|
export type IBrokerTopicPayload = {
|
|
184
185
|
[IBrokerTopic.create]: Record<string, unknown>;
|
|
@@ -370,6 +371,12 @@ export type IBrokerTopicPayload = {
|
|
|
370
371
|
subject: string;
|
|
371
372
|
message: string;
|
|
372
373
|
};
|
|
374
|
+
[IBrokerTopic.send_email_client_survey]: {
|
|
375
|
+
persona_id: string;
|
|
376
|
+
document_header_id: string;
|
|
377
|
+
document_number: number;
|
|
378
|
+
email: string;
|
|
379
|
+
};
|
|
373
380
|
};
|
|
374
381
|
export interface IBrokerMessage<T extends IBrokerTopic = IBrokerTopic> {
|
|
375
382
|
topic: T;
|
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.43.
|
|
4
|
+
"version": "0.43.26",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"joi": "^18.0.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@swc/core": "^1.15.
|
|
33
|
-
"@types/node": "^24.10.
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
35
|
-
"@typescript-eslint/parser": "^8.
|
|
36
|
-
"eslint": "^9.39.
|
|
32
|
+
"@swc/core": "^1.15.13",
|
|
33
|
+
"@types/node": "^24.10.14",
|
|
34
|
+
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
35
|
+
"@typescript-eslint/parser": "^8.56.1",
|
|
36
|
+
"eslint": "^9.39.3",
|
|
37
37
|
"eslint-config-prettier": "^10.1.8",
|
|
38
38
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
39
39
|
"eslint-plugin-prettier": "^5.5.5",
|