@nomalism-com/types 0.43.25 → 0.43.27
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 +25 -0
- package/dist/index.js +25 -0
- package/dist/main.d.ts +3 -1
- package/dist/modules/supply/documentHeaderSurvey/interfaces.d.ts +13 -0
- package/dist/modules/supply/documentHeaderSurvey/route.schema.d.ts +3 -0
- package/dist/shared/entities/stock.d.ts +12 -0
- package/dist/shared/interface.d.ts +8 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -42,6 +42,8 @@ __export(main_exports, {
|
|
|
42
42
|
DocumentHeader: () => interfaces_exports4,
|
|
43
43
|
DocumentHeaderHistory: () => interfaces_exports7,
|
|
44
44
|
DocumentHeaderRoutes: () => route_schema_exports9,
|
|
45
|
+
DocumentHeaderSurvey: () => interfaces_exports59,
|
|
46
|
+
DocumentHeaderSurveyRoutes: () => route_schema_exports112,
|
|
45
47
|
DocumentLine: () => interfaces_exports15,
|
|
46
48
|
DocumentLineAssoc: () => interfaces_exports16,
|
|
47
49
|
DocumentLineMt: () => interface_exports56,
|
|
@@ -494,6 +496,7 @@ var IBrokerTopic = /* @__PURE__ */ ((IBrokerTopic2) => {
|
|
|
494
496
|
IBrokerTopic2["googlesheet_encomenda_log"] = "googlesheet_encomenda_log";
|
|
495
497
|
IBrokerTopic2["log_google_api_request"] = "log_google_api_request";
|
|
496
498
|
IBrokerTopic2["send_espera_info_cliente_messages"] = "send_espera_info_cliente_messages";
|
|
499
|
+
IBrokerTopic2["send_email_client_survey"] = "send_email_client_survey";
|
|
497
500
|
return IBrokerTopic2;
|
|
498
501
|
})(IBrokerTopic || {});
|
|
499
502
|
|
|
@@ -5978,6 +5981,28 @@ var Route110 = "patch_notes";
|
|
|
5978
5981
|
var UpperName107 = "PatchNotes";
|
|
5979
5982
|
var LowerName107 = UpperName107[0].toLowerCase() + UpperName107.substring(1);
|
|
5980
5983
|
|
|
5984
|
+
// src/modules/supply/documentHeaderSurvey/interfaces.ts
|
|
5985
|
+
var interfaces_exports59 = {};
|
|
5986
|
+
|
|
5987
|
+
// src/modules/supply/documentHeaderSurvey/route.schema.ts
|
|
5988
|
+
var route_schema_exports112 = {};
|
|
5989
|
+
__export(route_schema_exports112, {
|
|
5990
|
+
updateSentBody: () => updateSentBody,
|
|
5991
|
+
updateSurveyBody: () => updateSurveyBody
|
|
5992
|
+
});
|
|
5993
|
+
import joi113 from "joi";
|
|
5994
|
+
var updateSentBodyKeys = {
|
|
5995
|
+
document_header_id: joi113.string().uuid().required(),
|
|
5996
|
+
persona_id: joi113.string().uuid().required()
|
|
5997
|
+
};
|
|
5998
|
+
var updateSentBody = joi113.object().keys(updateSentBodyKeys).messages(messages);
|
|
5999
|
+
var updateSurveyBodyKeys = {
|
|
6000
|
+
document_header_id: joi113.string().uuid().required(),
|
|
6001
|
+
persona_id: joi113.string().uuid().required(),
|
|
6002
|
+
data: joi113.object().keys({}).required()
|
|
6003
|
+
};
|
|
6004
|
+
var updateSurveyBody = joi113.object().keys(updateSurveyBodyKeys).messages(messages);
|
|
6005
|
+
|
|
5981
6006
|
// src/index.ts
|
|
5982
6007
|
var index_default = main_exports;
|
|
5983
6008
|
export {
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,8 @@ __export(main_exports, {
|
|
|
42
42
|
DocumentHeader: () => interfaces_exports4,
|
|
43
43
|
DocumentHeaderHistory: () => interfaces_exports7,
|
|
44
44
|
DocumentHeaderRoutes: () => route_schema_exports9,
|
|
45
|
+
DocumentHeaderSurvey: () => interfaces_exports59,
|
|
46
|
+
DocumentHeaderSurveyRoutes: () => route_schema_exports112,
|
|
45
47
|
DocumentLine: () => interfaces_exports15,
|
|
46
48
|
DocumentLineAssoc: () => interfaces_exports16,
|
|
47
49
|
DocumentLineMt: () => interface_exports56,
|
|
@@ -494,6 +496,7 @@ var IBrokerTopic = /* @__PURE__ */ ((IBrokerTopic2) => {
|
|
|
494
496
|
IBrokerTopic2["googlesheet_encomenda_log"] = "googlesheet_encomenda_log";
|
|
495
497
|
IBrokerTopic2["log_google_api_request"] = "log_google_api_request";
|
|
496
498
|
IBrokerTopic2["send_espera_info_cliente_messages"] = "send_espera_info_cliente_messages";
|
|
499
|
+
IBrokerTopic2["send_email_client_survey"] = "send_email_client_survey";
|
|
497
500
|
return IBrokerTopic2;
|
|
498
501
|
})(IBrokerTopic || {});
|
|
499
502
|
|
|
@@ -5978,6 +5981,28 @@ var Route110 = "patch_notes";
|
|
|
5978
5981
|
var UpperName107 = "PatchNotes";
|
|
5979
5982
|
var LowerName107 = UpperName107[0].toLowerCase() + UpperName107.substring(1);
|
|
5980
5983
|
|
|
5984
|
+
// src/modules/supply/documentHeaderSurvey/interfaces.ts
|
|
5985
|
+
var interfaces_exports59 = {};
|
|
5986
|
+
|
|
5987
|
+
// src/modules/supply/documentHeaderSurvey/route.schema.ts
|
|
5988
|
+
var route_schema_exports112 = {};
|
|
5989
|
+
__export(route_schema_exports112, {
|
|
5990
|
+
updateSentBody: () => updateSentBody,
|
|
5991
|
+
updateSurveyBody: () => updateSurveyBody
|
|
5992
|
+
});
|
|
5993
|
+
import joi113 from "joi";
|
|
5994
|
+
var updateSentBodyKeys = {
|
|
5995
|
+
document_header_id: joi113.string().uuid().required(),
|
|
5996
|
+
persona_id: joi113.string().uuid().required()
|
|
5997
|
+
};
|
|
5998
|
+
var updateSentBody = joi113.object().keys(updateSentBodyKeys).messages(messages);
|
|
5999
|
+
var updateSurveyBodyKeys = {
|
|
6000
|
+
document_header_id: joi113.string().uuid().required(),
|
|
6001
|
+
persona_id: joi113.string().uuid().required(),
|
|
6002
|
+
data: joi113.object().keys({}).required()
|
|
6003
|
+
};
|
|
6004
|
+
var updateSurveyBody = joi113.object().keys(updateSurveyBodyKeys).messages(messages);
|
|
6005
|
+
|
|
5981
6006
|
// src/index.ts
|
|
5982
6007
|
var index_default = main_exports;
|
|
5983
6008
|
export {
|
package/dist/main.d.ts
CHANGED
|
@@ -237,4 +237,6 @@ import * as LLM from './modules/llm/llm/interfaces';
|
|
|
237
237
|
import * as LLMRoutes from './modules/llm/llm/route.schema';
|
|
238
238
|
import * as PatchNotes from './modules/integration/patchNotes/interfaces';
|
|
239
239
|
import * as ConferirEncomenda from './modules/stock/conferirEncomenda/interface';
|
|
240
|
-
|
|
240
|
+
import * as DocumentHeaderSurvey from './modules/supply/documentHeaderSurvey/interfaces';
|
|
241
|
+
import * as DocumentHeaderSurveyRoutes from './modules/supply/documentHeaderSurvey/route.schema';
|
|
242
|
+
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, DocumentHeaderSurvey, DocumentHeaderSurveyRoutes, };
|
|
@@ -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 IUpdateSentRequest = Pick<IEntity, 'document_header_id' | 'persona_id'>;
|
|
7
|
+
export type IUpdateSurveyRequest = Pick<IEntity, 'document_header_id' | 'persona_id' | 'data'>;
|
|
8
|
+
export interface IRepository {
|
|
9
|
+
find(): Promise<IResponse[]>;
|
|
10
|
+
updateSent(data: IUpdateSentRequest): Promise<void>;
|
|
11
|
+
updateSurvey(data: IUpdateSurveyRequest): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export type IController = Nomalism.shared.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.27",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|