@nomalism-com/types 0.34.38 → 0.35.0

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 CHANGED
@@ -190,6 +190,8 @@ __export(main_exports, {
190
190
  StoreOperatorRoutes: () => route_schema_exports48,
191
191
  Swift: () => interface_exports29,
192
192
  SwiftRoutes: () => route_schema_exports49,
193
+ Tag: () => interface_exports59,
194
+ TagRoutes: () => route_schema_exports111,
193
195
  Task: () => interface_exports50,
194
196
  TaskMessage: () => interface_exports51,
195
197
  TaskMessageRoutes: () => route_schema_exports101,
@@ -5817,6 +5819,44 @@ var createOrUpdateBodyKeys2 = {
5817
5819
  };
5818
5820
  var createOrUpdateBody2 = joi111.object().keys(createOrUpdateBodyKeys2).messages(messages);
5819
5821
 
5822
+ // src/modules/stock/tag/interface.ts
5823
+ var interface_exports59 = {};
5824
+ __export(interface_exports59, {
5825
+ ITagType: () => ITagType,
5826
+ ITagTypeEnum: () => ITagTypeEnum,
5827
+ LowerName: () => LowerName104,
5828
+ Route: () => Route105,
5829
+ UpperName: () => UpperName104
5830
+ });
5831
+ var Route105 = "tag";
5832
+ var UpperName104 = "Tag";
5833
+ var LowerName104 = UpperName104[0].toLowerCase() + UpperName104.substring(1);
5834
+ var ITagTypeEnum = {
5835
+ private: "private",
5836
+ public: "public"
5837
+ };
5838
+ var ITagType = Object.keys(ITagTypeEnum);
5839
+
5840
+ // src/modules/stock/tag/route.schema.ts
5841
+ var route_schema_exports111 = {};
5842
+ __export(route_schema_exports111, {
5843
+ createBody: () => createBody70,
5844
+ updateBody: () => updateBody61
5845
+ });
5846
+ import joi112 from "joi";
5847
+ var createBodyKeys69 = {
5848
+ document_header_id: joi112.string().uuid().required(),
5849
+ index: joi112.number().allow(0).required(),
5850
+ text: joi112.string().required(),
5851
+ type: joi112.string().valid("private", "public").required()
5852
+ };
5853
+ var createBody70 = joi112.object().keys(createBodyKeys69).messages(messages);
5854
+ var updateBodyKeys59 = {
5855
+ index: joi112.number().allow(0).optional(),
5856
+ type: joi112.string().valid("private", "public").optional()
5857
+ };
5858
+ var updateBody61 = joi112.object().keys(updateBodyKeys59).messages(messages);
5859
+
5820
5860
  // src/index.ts
5821
5861
  var index_default = main_exports;
5822
5862
  export {
package/dist/index.js CHANGED
@@ -190,6 +190,8 @@ __export(main_exports, {
190
190
  StoreOperatorRoutes: () => route_schema_exports48,
191
191
  Swift: () => interface_exports29,
192
192
  SwiftRoutes: () => route_schema_exports49,
193
+ Tag: () => interface_exports59,
194
+ TagRoutes: () => route_schema_exports111,
193
195
  Task: () => interface_exports50,
194
196
  TaskMessage: () => interface_exports51,
195
197
  TaskMessageRoutes: () => route_schema_exports101,
@@ -5817,6 +5819,44 @@ var createOrUpdateBodyKeys2 = {
5817
5819
  };
5818
5820
  var createOrUpdateBody2 = joi111.object().keys(createOrUpdateBodyKeys2).messages(messages);
5819
5821
 
5822
+ // src/modules/stock/tag/interface.ts
5823
+ var interface_exports59 = {};
5824
+ __export(interface_exports59, {
5825
+ ITagType: () => ITagType,
5826
+ ITagTypeEnum: () => ITagTypeEnum,
5827
+ LowerName: () => LowerName104,
5828
+ Route: () => Route105,
5829
+ UpperName: () => UpperName104
5830
+ });
5831
+ var Route105 = "tag";
5832
+ var UpperName104 = "Tag";
5833
+ var LowerName104 = UpperName104[0].toLowerCase() + UpperName104.substring(1);
5834
+ var ITagTypeEnum = {
5835
+ private: "private",
5836
+ public: "public"
5837
+ };
5838
+ var ITagType = Object.keys(ITagTypeEnum);
5839
+
5840
+ // src/modules/stock/tag/route.schema.ts
5841
+ var route_schema_exports111 = {};
5842
+ __export(route_schema_exports111, {
5843
+ createBody: () => createBody70,
5844
+ updateBody: () => updateBody61
5845
+ });
5846
+ import joi112 from "joi";
5847
+ var createBodyKeys69 = {
5848
+ document_header_id: joi112.string().uuid().required(),
5849
+ index: joi112.number().allow(0).required(),
5850
+ text: joi112.string().required(),
5851
+ type: joi112.string().valid("private", "public").required()
5852
+ };
5853
+ var createBody70 = joi112.object().keys(createBodyKeys69).messages(messages);
5854
+ var updateBodyKeys59 = {
5855
+ index: joi112.number().allow(0).optional(),
5856
+ type: joi112.string().valid("private", "public").optional()
5857
+ };
5858
+ var updateBody61 = joi112.object().keys(updateBodyKeys59).messages(messages);
5859
+
5820
5860
  // src/index.ts
5821
5861
  var index_default = main_exports;
5822
5862
  export {
package/dist/main.d.ts CHANGED
@@ -229,4 +229,6 @@ import * as DocumentLineMt from './modules/supply/documentLineMT/interface';
229
229
  import * as DocumentLineMtRoutes from './modules/supply/documentLineMT/route.schema';
230
230
  import * as ChatSubscriber from './modules/user/chatSubscribers/interfaces';
231
231
  import * as ChatSubscriberRoutes from './modules/user/chatSubscribers/route.schema';
232
- export { shared, viewErrors, stockErrors, userErrors, documentManagementErrors, integrationErrors, ZipCode, ZipCodeRoutes, BankData, BankDataRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, ClientCurrentAccount, ClientCurrentAccountRoutes, Chat, ChatRoutes, Commissioner, CommissionerRoutes, Counter, CounterRoutes, Country, CountryRoutes, DeliveryMethods, DeliveryMethodsRoutes, DocumentHeader, DocumentHeaderRoutes, BillOfLading, BillOfLadingRoutes, ProductionOrder, ProductionOrderRoutes, Proforma, ProformaRoutes, PropostaFornecedor, PropostaFornecedorRoutes, ProviderCreditNoteFromReturn, ProviderCreditNoteFromReturnRoutes, ProviderFinancialCreditNote, ProviderFinancialCreditNoteRoutes, ProviderServiceInvoice, ProviderServiceInvoiceRoutes, DocumentLine, DocumentLineRoutes, DocumentLineAssoc, DocumentLineAssocRoutes, DocumentSet, DocumentSetRoutes, DocumentType, DocumentTypeRoutes, ExternalDocumentType, ExternalDocumentHeader, ExternalDocumentHeaderRoutes, Favorites, FavoritesRoutes, File, FileRoutes, GroupPermissions, GroupPermissionsRoutes, GoogleSheets, GoogleSheetsRoutes, Language, LanguageRoutes, Location, LocationRoutes, MaturityDates, MaturityDatesRoutes, Multimedia, MultimediaRoutes, OrderManagement, Observation, ObservationRoutes, ObservationType, ObservationTypeRoutes, Password, PasswordRoutes, Payment, PaymentRoutes, PaymentMethods, PaymentMethodsRoutes, Permissions, PermissionsRoutes, ProductImage, ProductImageRoutes, Promotion, PromotionRoutes, PromotionAssoc, PromotionAssocRoutes, Providers, ProvidersRoutes, ProviderType, ProviderTypeRoutes, ProviderCurrentAccount, ProviderCurrentAccountRoutes, PurchaseConditions, PurchaseConditionsRoutes, ReasonForExemption, ReasonForExemptionRoutes, RefreshToken, RefreshTokenRoutes, SegmentsArea, SegmentsAreaRoutes, Sessions, SessionsRoutes, Shippings, ShippingsRoutes, StoreOperator, StoreOperatorRoutes, Swift, SwiftRoutes, TypeOfLocation, TypeOfLocationRoutes, UnitOfMeasure, UnitOfMeasureRoutes, UserPermissions, UserPermissionsRoutes, 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, };
232
+ import * as Tag from './modules/stock/tag/interface';
233
+ import * as TagRoutes from './modules/stock/tag/route.schema';
234
+ export { shared, viewErrors, stockErrors, userErrors, documentManagementErrors, integrationErrors, ZipCode, ZipCodeRoutes, BankData, BankDataRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, ClientCurrentAccount, ClientCurrentAccountRoutes, Chat, ChatRoutes, Commissioner, CommissionerRoutes, Counter, CounterRoutes, Country, CountryRoutes, DeliveryMethods, DeliveryMethodsRoutes, DocumentHeader, DocumentHeaderRoutes, BillOfLading, BillOfLadingRoutes, ProductionOrder, ProductionOrderRoutes, Proforma, ProformaRoutes, PropostaFornecedor, PropostaFornecedorRoutes, ProviderCreditNoteFromReturn, ProviderCreditNoteFromReturnRoutes, ProviderFinancialCreditNote, ProviderFinancialCreditNoteRoutes, ProviderServiceInvoice, ProviderServiceInvoiceRoutes, DocumentLine, DocumentLineRoutes, DocumentLineAssoc, DocumentLineAssocRoutes, DocumentSet, DocumentSetRoutes, DocumentType, DocumentTypeRoutes, ExternalDocumentType, ExternalDocumentHeader, ExternalDocumentHeaderRoutes, Favorites, FavoritesRoutes, File, FileRoutes, GroupPermissions, GroupPermissionsRoutes, GoogleSheets, GoogleSheetsRoutes, Language, LanguageRoutes, Location, LocationRoutes, MaturityDates, MaturityDatesRoutes, Multimedia, MultimediaRoutes, OrderManagement, Observation, ObservationRoutes, ObservationType, ObservationTypeRoutes, Password, PasswordRoutes, Payment, PaymentRoutes, PaymentMethods, PaymentMethodsRoutes, Permissions, PermissionsRoutes, ProductImage, ProductImageRoutes, Promotion, PromotionRoutes, PromotionAssoc, PromotionAssocRoutes, Providers, ProvidersRoutes, ProviderType, ProviderTypeRoutes, ProviderCurrentAccount, ProviderCurrentAccountRoutes, PurchaseConditions, PurchaseConditionsRoutes, ReasonForExemption, ReasonForExemptionRoutes, RefreshToken, RefreshTokenRoutes, SegmentsArea, SegmentsAreaRoutes, Sessions, SessionsRoutes, Shippings, ShippingsRoutes, StoreOperator, StoreOperatorRoutes, Swift, SwiftRoutes, TypeOfLocation, TypeOfLocationRoutes, UnitOfMeasure, UnitOfMeasureRoutes, UserPermissions, UserPermissionsRoutes, 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, };
@@ -0,0 +1,23 @@
1
+ import * as IShared from '../../../shared/interface';
2
+ import { Tag } from '../../../shared/entities/stock';
3
+ export type Entity = Tag;
4
+ export declare const Route = "tag";
5
+ export declare const UpperName = "Tag";
6
+ export declare const LowerName: string;
7
+ export declare const ITagTypeEnum: {
8
+ private: 'private';
9
+ public: 'public';
10
+ };
11
+ export type ITagType = (typeof ITagTypeEnum)[keyof typeof ITagTypeEnum];
12
+ export declare const ITagType: string[];
13
+ export type ICreateRequest = Omit<Entity, 'id' | 'createdAt' | 'updatedAt'>;
14
+ export type IUpdateRequest = Pick<Entity, 'index' | 'type'>;
15
+ export type IFindResponse = Omit<Entity, 'createdAt' | 'updatedAt'>;
16
+ export interface IRepository {
17
+ create(data: ICreateRequest): Promise<void>;
18
+ findByDocumentHeaderId(selector: IShared.IFindByIdRequest): Promise<IFindResponse[]>;
19
+ findById(selector: IShared.IFindByIdRequest): Promise<IFindResponse>;
20
+ update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
21
+ delete(selector: IShared.IFindByIdRequest): Promise<void>;
22
+ }
23
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -0,0 +1,3 @@
1
+ import joi from 'joi';
2
+ export declare const createBody: joi.ObjectSchema<any>;
3
+ export declare const updateBody: joi.ObjectSchema<any>;
@@ -3,6 +3,7 @@ import { IDocumentTypeUserType, IDocumentTypeCodeType } from '../../modules/supp
3
3
  import { IBatchType, IPaymentOrigin } from '../../modules/supply/payment/interface';
4
4
  import { IProductType } from '../../modules/stock/productGoogleSheets/interface';
5
5
  import { IImageType } from '../../modules/stock/productImage/interface';
6
+ import { ITagType } from '../../modules/stock/tag/interface';
6
7
  import { IQueryParameterDatatype } from '../../modules/stock/queryParameter/interfaces';
7
8
  import { IData, IDataDocumentoPago, IDataPagamento, IPromotions, type IImportedFromSheets } from '../../modules/supply/documentLine/interfaces';
8
9
  import { IPhcDocumentType } from '../../modules/supply/clientCurrentAccount/interfaces';
@@ -1206,3 +1207,18 @@ export type DocumentLineMT = {
1206
1207
  created_at: Date;
1207
1208
  updated_at: Date;
1208
1209
  };
1210
+ /**
1211
+ * Model Tag
1212
+ *
1213
+ */
1214
+ export type Tag = {
1215
+ id: string;
1216
+ text: string;
1217
+ index: number;
1218
+ type: ITagType;
1219
+ document_header_id: string;
1220
+ created_by: string;
1221
+ updated_by: string;
1222
+ created_at: Date;
1223
+ updated_at: Date;
1224
+ };
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript",
10
10
  "helper"
11
11
  ],
12
- "version": "0.34.38",
12
+ "version": "0.35.0",
13
13
  "type": "module",
14
14
  "module": "./dist/index.js",
15
15
  "main": "./dist/index.cjs",
package/src/main.ts CHANGED
@@ -356,6 +356,9 @@ import * as DocumentLineMtRoutes from './modules/supply/documentLineMT/route.sch
356
356
  import * as ChatSubscriber from './modules/user/chatSubscribers/interfaces';
357
357
  import * as ChatSubscriberRoutes from './modules/user/chatSubscribers/route.schema';
358
358
 
359
+ import * as Tag from './modules/stock/tag/interface';
360
+ import * as TagRoutes from './modules/stock/tag/route.schema';
361
+
359
362
  export {
360
363
  shared,
361
364
  // Errors,
@@ -677,4 +680,8 @@ export {
677
680
  //chat_subscriber
678
681
  ChatSubscriber,
679
682
  ChatSubscriberRoutes,
683
+
684
+ //tag
685
+ Tag,
686
+ TagRoutes,
680
687
  };
@@ -0,0 +1,34 @@
1
+ import * as IShared from '../../../shared/interface';
2
+
3
+ import { Tag } from '../../../shared/entities/stock';
4
+
5
+ export type Entity = Tag;
6
+ export const Route = 'tag';
7
+ export const UpperName = 'Tag';
8
+ export const LowerName = UpperName[0].toLowerCase() + UpperName.substring(1);
9
+
10
+ export const ITagTypeEnum: {
11
+ private: 'private';
12
+ public: 'public';
13
+ } = {
14
+ private: 'private',
15
+ public: 'public',
16
+ };
17
+
18
+ export type ITagType = (typeof ITagTypeEnum)[keyof typeof ITagTypeEnum];
19
+
20
+ export const ITagType = Object.keys(ITagTypeEnum);
21
+
22
+ export type ICreateRequest = Omit<Entity, 'id' | 'createdAt' | 'updatedAt'>;
23
+ export type IUpdateRequest = Pick<Entity, 'index' | 'type'>;
24
+ export type IFindResponse = Omit<Entity, 'createdAt' | 'updatedAt'>;
25
+
26
+ export interface IRepository {
27
+ create(data: ICreateRequest): Promise<void>;
28
+ findByDocumentHeaderId(selector: IShared.IFindByIdRequest): Promise<IFindResponse[]>;
29
+ findById(selector: IShared.IFindByIdRequest): Promise<IFindResponse>;
30
+ update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
31
+ delete(selector: IShared.IFindByIdRequest): Promise<void>;
32
+ }
33
+
34
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -0,0 +1,20 @@
1
+ import joi from 'joi';
2
+ import { messages } from '../../../shared/messages';
3
+ import * as IShared from '../../../shared/interface';
4
+ import { ICreateRequest, IUpdateRequest } from './interface';
5
+
6
+ // create body validation
7
+ const createBodyKeys: IShared.IRouteRequest<ICreateRequest> = {
8
+ document_header_id: joi.string().uuid().required(),
9
+ index: joi.number().allow(0).required(),
10
+ text: joi.string().required(),
11
+ type: joi.string().valid('private', 'public').required(),
12
+ };
13
+ export const createBody = joi.object().keys(createBodyKeys).messages(messages);
14
+
15
+ // update body validation
16
+ const updateBodyKeys: IShared.IRouteRequest<IUpdateRequest> = {
17
+ index: joi.number().allow(0).optional(),
18
+ type: joi.string().valid('private', 'public').optional(),
19
+ };
20
+ export const updateBody = joi.object().keys(updateBodyKeys).messages(messages);
@@ -6,6 +6,7 @@ import {
6
6
  import { IBatchType, IPaymentOrigin } from '../../modules/supply/payment/interface';
7
7
  import { IProductType } from '../../modules/stock/productGoogleSheets/interface';
8
8
  import { IImageType } from '../../modules/stock/productImage/interface';
9
+ import { ITagType } from '../../modules/stock/tag/interface';
9
10
  import { IQueryParameterDatatype } from '../../modules/stock/queryParameter/interfaces';
10
11
  import {
11
12
  IData,
@@ -1304,3 +1305,19 @@ export type DocumentLineMT = {
1304
1305
  created_at: Date;
1305
1306
  updated_at: Date;
1306
1307
  };
1308
+
1309
+ /**
1310
+ * Model Tag
1311
+ *
1312
+ */
1313
+ export type Tag = {
1314
+ id: string;
1315
+ text: string;
1316
+ index: number;
1317
+ type: ITagType;
1318
+ document_header_id: string;
1319
+ created_by: string;
1320
+ updated_by: string;
1321
+ created_at: Date;
1322
+ updated_at: Date;
1323
+ };