@nomalism-com/types 0.40.105 → 0.40.107

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.
@@ -202,8 +202,7 @@ export interface ITransferOwnershipRequest {
202
202
  }
203
203
  export interface IFindResponse {
204
204
  document_header_id: string;
205
- document_number: number;
206
- legacy_id: string | null;
205
+ document_label: string;
207
206
  total: number;
208
207
  emission_date: string;
209
208
  line_count: number;
@@ -40,6 +40,7 @@ export interface PublicDocumentHeaderNoteUpdateRequest {
40
40
  }
41
41
  export interface IRepository {
42
42
  publicFindByOwnerId(params: IPublicFindByOwnerIdRequest): Promise<IPublicFindByOwnerIdResponse[]>;
43
+ publicFindBySubscriberId(params: IPublicFindByOwnerIdRequest): Promise<IPublicFindByOwnerIdResponse[]>;
43
44
  createPublicDocumentHeaderNote: (data: PublicDocumentHeaderNoteCreateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
44
45
  updatePublicDocumentHeaderNote: (selector: IShared.IFindByIdRequest, data: PublicDocumentHeaderNoteUpdateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
45
46
  }
@@ -14,7 +14,10 @@ export interface IFindRequest {
14
14
  owner_id: string;
15
15
  document_header_id: string;
16
16
  }
17
- export type IFindResponse = Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> & Pick<ChatSubscriber, 'id' | 'persona_id' | 'owner_id' | 'document_header_id'>;
17
+ export type IFindByOwnerResponse = Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> & Pick<ChatSubscriber, 'id' | 'persona_id' | 'owner_id' | 'document_header_id'>;
18
+ export interface IFindByIdResponse extends IFindByOwnerResponse {
19
+ subscribed_document_headers: string[];
20
+ }
18
21
  export interface IFindChatSubscriberPersona extends Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> {
19
22
  contact: boolean;
20
23
  }
@@ -24,8 +27,8 @@ export interface IFindChatSubscriberResponse {
24
27
  }
25
28
  export interface IRepository {
26
29
  createOrUpdate(data: ICreateOrUpdateRequest): Promise<void>;
27
- findById(selector: IShared.IFindByIdRequest): Promise<IFindResponse>;
28
- findByOwner(selector: IFindRequest): Promise<IFindResponse[]>;
30
+ findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse>;
31
+ findByOwner(selector: IFindRequest): Promise<IFindByOwnerResponse[]>;
29
32
  clientWebAppFindByOwner(selector: IFindRequest): Promise<IFindChatSubscriberResponse>;
30
33
  deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
31
34
  }
@@ -274,7 +274,7 @@ export type IBrokerTopicPayload = {
274
274
  warningErrors: string[];
275
275
  };
276
276
  [IBrokerTopic.dispatch_chat_message]: {
277
- to: [Pick<ChatSubscriber.IFindResponse, 'email' | 'name' | 'telephone'>];
277
+ to: [Pick<ChatSubscriber.IFindByOwnerResponse, 'email' | 'name' | 'telephone'>];
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.105",
4
+ "version": "0.40.107",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",