@nomalism-com/types 0.40.60 → 0.40.62

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
@@ -65,13 +65,9 @@ __export(main_exports, {
65
65
  EmailVerificationRoutes: () => route_schema_exports77,
66
66
  ErrorLog: () => interfaces_exports55,
67
67
  ErrorLogRoutes: () => route_schema_exports101,
68
- ExternalChatSubscriber: () => interfaces_exports57,
69
- ExternalChatSubscriberRoutes: () => route_schema_exports114,
70
68
  ExternalDocumentHeader: () => interface_exports9,
71
69
  ExternalDocumentHeaderRoutes: () => route_schema_exports21,
72
70
  ExternalDocumentType: () => interface_exports8,
73
- ExternalPersona: () => interface_exports65,
74
- ExternalPersonaRoutes: () => route_schema_exports113,
75
71
  Favorites: () => interfaces_exports16,
76
72
  FavoritesRoutes: () => route_schema_exports22,
77
73
  File: () => interface_exports10,
@@ -5903,86 +5899,6 @@ var findByCodeParams = {
5903
5899
  };
5904
5900
  var findByCode = joi113.object().keys(findByCodeParams).messages(messages);
5905
5901
 
5906
- // src/modules/user/externalPersona/interface.ts
5907
- var interface_exports65 = {};
5908
- __export(interface_exports65, {
5909
- LowerName: () => LowerName106,
5910
- Route: () => Route108,
5911
- UpperName: () => UpperName106
5912
- });
5913
- var Route108 = "external_persona";
5914
- var UpperName106 = "ExternalPersona";
5915
- var LowerName106 = UpperName106[0].toLowerCase() + UpperName106.substring(1);
5916
-
5917
- // src/modules/user/externalPersona/route.schema.ts
5918
- var route_schema_exports113 = {};
5919
- __export(route_schema_exports113, {
5920
- createBody: () => createBody65,
5921
- updateBody: () => updateBody58
5922
- });
5923
- import joi114 from "joi";
5924
- var emailSchema2 = joi114.string().trim(true).lowercase().email({ tlds: { allow: false } }).allow(null, "");
5925
- var createBodyKeys64 = {
5926
- name: joi114.string().allow(null, "").optional(),
5927
- nif: joi114.string().allow(null, "").optional(),
5928
- street: joi114.string().allow(null, "").optional(),
5929
- locality: joi114.string().allow(null, "").optional(),
5930
- postal_code: joi114.string().trim(true).lowercase().allow(null, "").optional(),
5931
- country_id: joi114.string().uuid().allow(null, "").optional(),
5932
- telephone: joi114.string().allow(null, "").optional(),
5933
- email: emailSchema2.optional(),
5934
- observations: joi114.string().allow(null, "").optional(),
5935
- provider_id: joi114.string().uuid().allow(null, ""),
5936
- client_id: joi114.string().uuid().allow(null, ""),
5937
- commissioner_id: joi114.string().uuid().allow(null, ""),
5938
- store_operator_id: joi114.string().uuid().allow(null, ""),
5939
- reason_for_exemption_id: joi114.string().uuid().allow(null, "").optional()
5940
- };
5941
- var createBody65 = joi114.object().keys(createBodyKeys64).xor("provider_id", "client_id", "commissioner_id", "store_operator_id").messages(messages);
5942
- var updateBodyKeys56 = {
5943
- name: joi114.string().allow(null, "").optional(),
5944
- nif: joi114.string().allow(null, "").optional(),
5945
- street: joi114.string().allow(null, "").optional(),
5946
- locality: joi114.string().allow(null, "").optional(),
5947
- postal_code: joi114.string().trim(true).lowercase().allow(null, "").optional(),
5948
- country_id: joi114.string().uuid().allow(null, "").optional(),
5949
- telephone: joi114.string().allow(null, "").optional(),
5950
- email: emailSchema2.optional(),
5951
- observations: joi114.string().allow(null, "").optional(),
5952
- reason_for_exemption_id: joi114.string().uuid().allow(null, "").optional()
5953
- };
5954
- var updateBody58 = joi114.object().keys(updateBodyKeys56).messages(messages);
5955
-
5956
- // src/modules/user/externalChatSubscribers/interfaces.ts
5957
- var interfaces_exports57 = {};
5958
- __export(interfaces_exports57, {
5959
- LowerName: () => LowerName107,
5960
- Route: () => Route109,
5961
- UpperName: () => UpperName107
5962
- });
5963
- var Route109 = "external_chat_subscriber";
5964
- var UpperName107 = "ExternalChatSubscriber";
5965
- var LowerName107 = UpperName107[0].toLowerCase() + UpperName107.substring(1);
5966
-
5967
- // src/modules/user/externalChatSubscribers/route.schema.ts
5968
- var route_schema_exports114 = {};
5969
- __export(route_schema_exports114, {
5970
- createOrUpdateBody: () => createOrUpdateBody3,
5971
- findByParams: () => findByParams2
5972
- });
5973
- import joi115 from "joi";
5974
- var createOrUpdateBodyKeys3 = {
5975
- owner_id: joi115.string().uuid().required(),
5976
- document_header_id: joi115.string().uuid().required(),
5977
- external_persona_ids: joi115.array().items(joi115.string().optional()).required()
5978
- };
5979
- var createOrUpdateBody3 = joi115.object().keys(createOrUpdateBodyKeys3).messages(messages);
5980
- var findByParamsKeys2 = {
5981
- owner_id: joi115.string().uuid().required(),
5982
- document_header_id: joi115.string().uuid().optional()
5983
- };
5984
- var findByParams2 = joi115.object().keys(findByParamsKeys2).messages(messages);
5985
-
5986
5902
  // src/index.ts
5987
5903
  var index_default = main_exports;
5988
5904
  export {
package/dist/index.js CHANGED
@@ -65,13 +65,9 @@ __export(main_exports, {
65
65
  EmailVerificationRoutes: () => route_schema_exports77,
66
66
  ErrorLog: () => interfaces_exports55,
67
67
  ErrorLogRoutes: () => route_schema_exports101,
68
- ExternalChatSubscriber: () => interfaces_exports57,
69
- ExternalChatSubscriberRoutes: () => route_schema_exports114,
70
68
  ExternalDocumentHeader: () => interface_exports9,
71
69
  ExternalDocumentHeaderRoutes: () => route_schema_exports21,
72
70
  ExternalDocumentType: () => interface_exports8,
73
- ExternalPersona: () => interface_exports65,
74
- ExternalPersonaRoutes: () => route_schema_exports113,
75
71
  Favorites: () => interfaces_exports16,
76
72
  FavoritesRoutes: () => route_schema_exports22,
77
73
  File: () => interface_exports10,
@@ -5903,86 +5899,6 @@ var findByCodeParams = {
5903
5899
  };
5904
5900
  var findByCode = joi113.object().keys(findByCodeParams).messages(messages);
5905
5901
 
5906
- // src/modules/user/externalPersona/interface.ts
5907
- var interface_exports65 = {};
5908
- __export(interface_exports65, {
5909
- LowerName: () => LowerName106,
5910
- Route: () => Route108,
5911
- UpperName: () => UpperName106
5912
- });
5913
- var Route108 = "external_persona";
5914
- var UpperName106 = "ExternalPersona";
5915
- var LowerName106 = UpperName106[0].toLowerCase() + UpperName106.substring(1);
5916
-
5917
- // src/modules/user/externalPersona/route.schema.ts
5918
- var route_schema_exports113 = {};
5919
- __export(route_schema_exports113, {
5920
- createBody: () => createBody65,
5921
- updateBody: () => updateBody58
5922
- });
5923
- import joi114 from "joi";
5924
- var emailSchema2 = joi114.string().trim(true).lowercase().email({ tlds: { allow: false } }).allow(null, "");
5925
- var createBodyKeys64 = {
5926
- name: joi114.string().allow(null, "").optional(),
5927
- nif: joi114.string().allow(null, "").optional(),
5928
- street: joi114.string().allow(null, "").optional(),
5929
- locality: joi114.string().allow(null, "").optional(),
5930
- postal_code: joi114.string().trim(true).lowercase().allow(null, "").optional(),
5931
- country_id: joi114.string().uuid().allow(null, "").optional(),
5932
- telephone: joi114.string().allow(null, "").optional(),
5933
- email: emailSchema2.optional(),
5934
- observations: joi114.string().allow(null, "").optional(),
5935
- provider_id: joi114.string().uuid().allow(null, ""),
5936
- client_id: joi114.string().uuid().allow(null, ""),
5937
- commissioner_id: joi114.string().uuid().allow(null, ""),
5938
- store_operator_id: joi114.string().uuid().allow(null, ""),
5939
- reason_for_exemption_id: joi114.string().uuid().allow(null, "").optional()
5940
- };
5941
- var createBody65 = joi114.object().keys(createBodyKeys64).xor("provider_id", "client_id", "commissioner_id", "store_operator_id").messages(messages);
5942
- var updateBodyKeys56 = {
5943
- name: joi114.string().allow(null, "").optional(),
5944
- nif: joi114.string().allow(null, "").optional(),
5945
- street: joi114.string().allow(null, "").optional(),
5946
- locality: joi114.string().allow(null, "").optional(),
5947
- postal_code: joi114.string().trim(true).lowercase().allow(null, "").optional(),
5948
- country_id: joi114.string().uuid().allow(null, "").optional(),
5949
- telephone: joi114.string().allow(null, "").optional(),
5950
- email: emailSchema2.optional(),
5951
- observations: joi114.string().allow(null, "").optional(),
5952
- reason_for_exemption_id: joi114.string().uuid().allow(null, "").optional()
5953
- };
5954
- var updateBody58 = joi114.object().keys(updateBodyKeys56).messages(messages);
5955
-
5956
- // src/modules/user/externalChatSubscribers/interfaces.ts
5957
- var interfaces_exports57 = {};
5958
- __export(interfaces_exports57, {
5959
- LowerName: () => LowerName107,
5960
- Route: () => Route109,
5961
- UpperName: () => UpperName107
5962
- });
5963
- var Route109 = "external_chat_subscriber";
5964
- var UpperName107 = "ExternalChatSubscriber";
5965
- var LowerName107 = UpperName107[0].toLowerCase() + UpperName107.substring(1);
5966
-
5967
- // src/modules/user/externalChatSubscribers/route.schema.ts
5968
- var route_schema_exports114 = {};
5969
- __export(route_schema_exports114, {
5970
- createOrUpdateBody: () => createOrUpdateBody3,
5971
- findByParams: () => findByParams2
5972
- });
5973
- import joi115 from "joi";
5974
- var createOrUpdateBodyKeys3 = {
5975
- owner_id: joi115.string().uuid().required(),
5976
- document_header_id: joi115.string().uuid().required(),
5977
- external_persona_ids: joi115.array().items(joi115.string().optional()).required()
5978
- };
5979
- var createOrUpdateBody3 = joi115.object().keys(createOrUpdateBodyKeys3).messages(messages);
5980
- var findByParamsKeys2 = {
5981
- owner_id: joi115.string().uuid().required(),
5982
- document_header_id: joi115.string().uuid().optional()
5983
- };
5984
- var findByParams2 = joi115.object().keys(findByParamsKeys2).messages(messages);
5985
-
5986
5902
  // src/index.ts
5987
5903
  var index_default = main_exports;
5988
5904
  export {
package/dist/main.d.ts CHANGED
@@ -235,8 +235,4 @@ import * as PortalRoutes from './modules/ui/portal/route.schema';
235
235
  import * as GoogleSheetPool from './modules/stock/googleSheetPool/interface';
236
236
  import * as AccountCode from './modules/stock/accountCode/interface';
237
237
  import * as AccountCodeRoutes from './modules/stock/accountCode/route.schema';
238
- import * as ExternalPersona from './modules/user/externalPersona/interface';
239
- import * as ExternalPersonaRoutes from './modules/user/externalPersona/route.schema';
240
- import * as ExternalChatSubscriber from './modules/user/externalChatSubscribers/interfaces';
241
- import * as ExternalChatSubscriberRoutes from './modules/user/externalChatSubscribers/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, DocumentLineAssocRoutes, 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, GmailsRoutes, NPF, NPFRoutes, NRCL, NRCLRoutes, CurrentAccount, CurrentAccountRoutes, PaymentBatch, PaymentBatchRoutes, Portal, PortalRoutes, GoogleSheetPool, AccountCode, AccountCodeRoutes, ExternalPersona, ExternalPersonaRoutes, ExternalChatSubscriber, ExternalChatSubscriberRoutes, };
238
+ 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, DocumentLineAssocRoutes, 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, GmailsRoutes, NPF, NPFRoutes, NRCL, NRCLRoutes, CurrentAccount, CurrentAccountRoutes, PaymentBatch, PaymentBatchRoutes, Portal, PortalRoutes, GoogleSheetPool, AccountCode, AccountCodeRoutes, };
@@ -1,4 +1,4 @@
1
- import { ChatSubscriber } from './../../../shared/entities/user';
1
+ import { ChatSubscriber, Persona } from './../../../shared/entities/user';
2
2
  import * as IShared from '../../../shared/interface';
3
3
  export type Entity = ChatSubscriber;
4
4
  export declare const Route = "chat_subscriber";
@@ -13,12 +13,9 @@ export interface IFindRequest {
13
13
  owner_id: string;
14
14
  document_header_id: string;
15
15
  }
16
- export type IFindResponse = {
17
- persona_id: string;
18
- name: string;
19
- email: string;
20
- phone_number: string | null;
21
- };
16
+ export interface IFindResponse extends Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> {
17
+ persona_id: Persona['id'];
18
+ }
22
19
  export interface IRepository {
23
20
  createOrUpdate(data: ICreateOrUpdateRequest): Promise<void>;
24
21
  find(selector: IFindRequest): Promise<IFindResponse[]>;
@@ -465,6 +465,7 @@ export type Tenant = {
465
465
  */
466
466
  export type Persona = {
467
467
  id: string;
468
+ external: boolean;
468
469
  name: string | null;
469
470
  nif: string | null;
470
471
  telephone: string | null;
@@ -511,42 +512,3 @@ export type ChatSubscriber = {
511
512
  created_by: string;
512
513
  updated_by: string;
513
514
  };
514
- /**
515
- * Model ExternalPersona
516
- *
517
- */
518
- export type ExternalPersona = {
519
- id: string;
520
- name: string | null;
521
- nif: string | null;
522
- telephone: string | null;
523
- email: string | null;
524
- observations: string | null;
525
- street: string | null;
526
- postal_code: string | null;
527
- locality: string | null;
528
- country_id: string | null;
529
- reason_for_exemption_id: string | null;
530
- provider_id: string | null;
531
- client_id: string | null;
532
- commissioner_id: string | null;
533
- store_operator_id: string | null;
534
- created_at: Date;
535
- updated_at: Date;
536
- created_by: string;
537
- updated_by: string;
538
- };
539
- /**
540
- * Model ExternalChatSubscriber
541
- *
542
- */
543
- export type ExternalChatSubscriber = {
544
- id: string;
545
- external_persona_id: string;
546
- owner_id: string;
547
- document_header_id: string;
548
- created_at: Date;
549
- updated_at: Date;
550
- created_by: string;
551
- updated_by: string;
552
- };
@@ -274,7 +274,7 @@ export type IBrokerTopicPayload = {
274
274
  warningErrors: string[];
275
275
  };
276
276
  [IBrokerTopic.dispatch_chat_message]: {
277
- to: [Omit<ChatSubscriber.IFindResponse, 'persona_id'>];
277
+ to: [Omit<ChatSubscriber.IFindResponse, 'persona_id' | 'external'>];
278
278
  reply_url: string;
279
279
  owner_id: string;
280
280
  document_header_id: string | null;
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.40.60",
4
+ "version": "0.40.62",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -1,27 +0,0 @@
1
- import { ExternalChatSubscriber } from '../../../shared/entities/user';
2
- import * as IShared from '../../../shared/interface';
3
- export type Entity = ExternalChatSubscriber;
4
- export declare const Route = "external_chat_subscriber";
5
- export declare const UpperName = "ExternalChatSubscriber";
6
- export declare const LowerName: string;
7
- export interface ICreateOrUpdateRequest {
8
- owner_id: string;
9
- document_header_id: string;
10
- external_persona_ids: string[];
11
- }
12
- export interface IFindRequest {
13
- owner_id: string;
14
- document_header_id: string;
15
- }
16
- export type IFindResponse = {
17
- external_persona_id: string;
18
- name: string;
19
- email: string;
20
- phone_number: string | null;
21
- };
22
- export interface IRepository {
23
- createOrUpdate(data: ICreateOrUpdateRequest): Promise<void>;
24
- find(selector: IFindRequest): Promise<IFindResponse[]>;
25
- deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
26
- }
27
- export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -1,3 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createOrUpdateBody: joi.ObjectSchema<any>;
3
- export declare const findByParams: joi.ObjectSchema<any>;
@@ -1,46 +0,0 @@
1
- import type * as IShared from '../../../shared/interface';
2
- import type { ExternalPersona, Country, ReasonForExemption } from '../../../shared/entities/user';
3
- export type Entity = ExternalPersona;
4
- export declare const Route = "external_persona";
5
- export declare const UpperName = "ExternalPersona";
6
- export declare const LowerName: string;
7
- export interface IEntityExtended extends Entity {
8
- formatted_address: string;
9
- country: Country | null;
10
- reason_for_exemption: ReasonForExemption | null;
11
- }
12
- export interface ICreateRequest {
13
- name: string | null;
14
- nif: string | null;
15
- street: string | null;
16
- postal_code: string | null;
17
- locality: string | null;
18
- country_id: string | null;
19
- telephone: string | null;
20
- email: string | null;
21
- observations: string | null;
22
- provider_id: string | null;
23
- client_id: string | null;
24
- commissioner_id: string | null;
25
- store_operator_id: string | null;
26
- reason_for_exemption_id: string | null;
27
- }
28
- export interface IUpdateRequest {
29
- name?: string | null;
30
- nif?: string | null;
31
- street?: string | null;
32
- postal_code?: string | null;
33
- locality?: string | null;
34
- country_id?: string | null;
35
- telephone?: string | null;
36
- email?: string | null;
37
- observations?: string | null;
38
- reason_for_exemption_id?: string | null;
39
- }
40
- export interface IRepository {
41
- findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IEntityExtended[]>;
42
- create(data: ICreateRequest): Promise<Entity>;
43
- update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
44
- deleteOne(params: IShared.IFindByIdRequest): Promise<void>;
45
- }
46
- export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -1,3 +0,0 @@
1
- import joi from 'joi';
2
- export declare const createBody: joi.ObjectSchema<any>;
3
- export declare const updateBody: joi.ObjectSchema<any>;