@nomalism-com/types 0.43.55 → 0.43.57

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
@@ -1648,6 +1648,8 @@ var transferClientOwnershipBodyKeys = {
1648
1648
  var transferClientOwnershipBody = joi10.object().keys(transferClientOwnershipBodyKeys).messages(messages);
1649
1649
  var updateManyWithPersonaBodyKeys = {
1650
1650
  id: joi10.string().uuid().required(),
1651
+ owner_id: joi10.string().uuid().required(),
1652
+ owner_name: joi10.string().required(),
1651
1653
  name: joi10.string().allow(null).optional(),
1652
1654
  telephone: joi10.string().allow(null).optional(),
1653
1655
  email: joi10.string().email({ tlds: { allow: false } }).allow(null).optional(),
@@ -5873,7 +5875,6 @@ var IPublicDocumentHeaderNoteType = /* @__PURE__ */ ((IPublicDocumentHeaderNoteT
5873
5875
  var route_schema_exports109 = {};
5874
5876
  __export(route_schema_exports109, {
5875
5877
  createNoteBody: () => createNoteBody,
5876
- publicFindByOwnerId: () => publicFindByOwnerId,
5877
5878
  updateNoteBody: () => updateNoteBody
5878
5879
  });
5879
5880
  import joi110 from "joi";
@@ -5887,11 +5888,6 @@ var updateNoteBodyKeys = {
5887
5888
  note: joi110.string().required().allow("")
5888
5889
  };
5889
5890
  var updateNoteBody = joi110.object().keys(updateNoteBodyKeys).messages(messages);
5890
- var publicFindByOwnerIdParams = {
5891
- owner_id: joi110.string().uuid().required(),
5892
- include_closed: joi110.boolean().optional()
5893
- };
5894
- var publicFindByOwnerId = joi110.object().keys(publicFindByOwnerIdParams).messages(messages);
5895
5891
 
5896
5892
  // src/modules/stock/googleSheetPool/interface.ts
5897
5893
  var interface_exports64 = {};
package/dist/index.js CHANGED
@@ -1648,6 +1648,8 @@ var transferClientOwnershipBodyKeys = {
1648
1648
  var transferClientOwnershipBody = joi10.object().keys(transferClientOwnershipBodyKeys).messages(messages);
1649
1649
  var updateManyWithPersonaBodyKeys = {
1650
1650
  id: joi10.string().uuid().required(),
1651
+ owner_id: joi10.string().uuid().required(),
1652
+ owner_name: joi10.string().required(),
1651
1653
  name: joi10.string().allow(null).optional(),
1652
1654
  telephone: joi10.string().allow(null).optional(),
1653
1655
  email: joi10.string().email({ tlds: { allow: false } }).allow(null).optional(),
@@ -5873,7 +5875,6 @@ var IPublicDocumentHeaderNoteType = /* @__PURE__ */ ((IPublicDocumentHeaderNoteT
5873
5875
  var route_schema_exports109 = {};
5874
5876
  __export(route_schema_exports109, {
5875
5877
  createNoteBody: () => createNoteBody,
5876
- publicFindByOwnerId: () => publicFindByOwnerId,
5877
5878
  updateNoteBody: () => updateNoteBody
5878
5879
  });
5879
5880
  import joi110 from "joi";
@@ -5887,11 +5888,6 @@ var updateNoteBodyKeys = {
5887
5888
  note: joi110.string().required().allow("")
5888
5889
  };
5889
5890
  var updateNoteBody = joi110.object().keys(updateNoteBodyKeys).messages(messages);
5890
- var publicFindByOwnerIdParams = {
5891
- owner_id: joi110.string().uuid().required(),
5892
- include_closed: joi110.boolean().optional()
5893
- };
5894
- var publicFindByOwnerId = joi110.object().keys(publicFindByOwnerIdParams).messages(messages);
5895
5891
 
5896
5892
  // src/modules/stock/googleSheetPool/interface.ts
5897
5893
  var interface_exports64 = {};
@@ -1,5 +1,4 @@
1
1
  import type * as IShared from '../../../shared/interface';
2
- import type * as ChatSubscriber from '../../user/chatSubscribers/interfaces';
3
2
  import { Chat, File } from '../../../shared/entities/stock';
4
3
  export type Entity = Chat;
5
4
  export declare const Route = "chat";
@@ -26,16 +25,6 @@ export interface IFindActiveByOwnerIdResponse {
26
25
  chat: IChatBalloon[];
27
26
  last_group_report?: IReport;
28
27
  }
29
- export interface IPublicFindBySubscriberId {
30
- user_type: 'client' | 'provider';
31
- owner_id: string;
32
- chat_document_header_id: string;
33
- chat: IChatBalloon[];
34
- persona: ChatSubscriber.IFindChatSubscriberPersona;
35
- other_personas: ChatSubscriber.IFindChatSubscriberPersona[];
36
- store_operator_name: string;
37
- document_total: number;
38
- }
39
28
  export interface ICreateRequest {
40
29
  chat_document_header_id: string;
41
30
  message: string;
@@ -59,7 +48,6 @@ export interface IMarkAllClientReadUnreadRequest {
59
48
  }
60
49
  export interface IRepository {
61
50
  findByOwnerId(params: IShared.IFindByIdRequest): Promise<IFindActiveByOwnerIdResponse>;
62
- findBySubscriberId(params: IShared.IFindByIdRequest): Promise<IPublicFindBySubscriberId>;
63
51
  create(data: ICreateRequest): Promise<Chat>;
64
52
  update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
65
53
  deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
@@ -218,6 +218,8 @@ export interface IFindResponse {
218
218
  }
219
219
  export type IUpdateManyWithPersona = {
220
220
  id: string;
221
+ owner_id: string;
222
+ owner_name: string;
221
223
  name: string | null;
222
224
  telephone: string | null;
223
225
  email: string | null;
@@ -1,13 +1,12 @@
1
1
  import * as IShared from '../../../shared/interface';
2
+ import type { IChatBalloon } from '../../stock/chat/interfaces';
3
+ import type * as ChatSubscriber from '../../user/chatSubscribers/interfaces';
2
4
  export interface IPcTags {
3
5
  id: string;
4
6
  text: string;
5
7
  }
6
- export interface IPublicFindByOwnerIdRequest {
7
- owner_id: string;
8
- include_closed?: boolean;
9
- }
10
- export interface IPublicFindByOwnerIdResponse {
8
+ export interface IPublicDocument {
9
+ chat_subscriber_id: string;
11
10
  chat_document_header_id: string;
12
11
  label: string;
13
12
  emission_date: Date;
@@ -17,8 +16,16 @@ export interface IPublicFindByOwnerIdResponse {
17
16
  pc_created_by: string;
18
17
  closed?: boolean;
19
18
  }
20
- export interface IPublicFindBySubscriberIdResponse extends IPublicFindByOwnerIdResponse {
21
- chat_subscriber_id: string;
19
+ export interface IPublicFindBySubscriberId {
20
+ user_type: 'client' | 'provider';
21
+ owner_id: string;
22
+ persona: ChatSubscriber.IFindByOwnerResponse;
23
+ chat_document_header_id: string;
24
+ store_operator_name: string;
25
+ document_total: number;
26
+ chat: IChatBalloon[];
27
+ other_personas: ChatSubscriber.IFindByOwnerResponse[];
28
+ documents: IPublicDocument[];
22
29
  }
23
30
  export declare enum IPublicDocumentHeaderNoteType {
24
31
  Provider = "Provider",
@@ -42,8 +49,8 @@ export interface PublicDocumentHeaderNoteUpdateRequest {
42
49
  note: string;
43
50
  }
44
51
  export interface IRepository {
45
- publicFindBySubscriberId(params: IPublicFindByOwnerIdRequest): Promise<IPublicFindBySubscriberIdResponse[]>;
46
- createPublicDocumentHeaderNote: (data: PublicDocumentHeaderNoteCreateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
47
- updatePublicDocumentHeaderNote: (selector: IShared.IFindByIdRequest, data: PublicDocumentHeaderNoteUpdateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
52
+ publicFindBySubscriberId(params: IShared.IFindByIdRequest): Promise<IPublicFindBySubscriberId>;
53
+ publicCreateDocumentHeaderNote: (data: PublicDocumentHeaderNoteCreateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
54
+ publicUpdateDocumentHeaderNote: (selector: IShared.IFindByIdRequest, data: PublicDocumentHeaderNoteUpdateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
48
55
  }
49
56
  export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -1,4 +1,3 @@
1
1
  import joi from 'joi';
2
2
  export declare const createNoteBody: joi.ObjectSchema<any>;
3
3
  export declare const updateNoteBody: joi.ObjectSchema<any>;
4
- export declare const publicFindByOwnerId: joi.ObjectSchema<any>;
@@ -19,17 +19,10 @@ export interface IFindByIdResponse extends IFindByOwnerResponse {
19
19
  chat_document_header_id: string;
20
20
  }[];
21
21
  }
22
- export interface IFindChatSubscriberPersona extends Pick<Persona, 'id' | 'external' | 'name' | 'email' | 'telephone'> {
23
- contact: boolean;
24
- }
25
- export interface IFindChatSubscriberResponse {
26
- personas: IFindChatSubscriberPersona[];
27
- }
28
22
  export interface IRepository {
29
23
  createOrUpdate(data: ICreateOrUpdateRequest): Promise<string>;
30
24
  findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse>;
31
25
  findByOwner(selector: IFindRequest): Promise<IFindByOwnerResponse[]>;
32
- publicFindByOwner(selector: IFindRequest): Promise<IFindChatSubscriberResponse>;
33
26
  deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
34
27
  }
35
28
  export type IController = IShared.IEntityWithUserToken<IRepository>;
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.55",
4
+ "version": "0.43.57",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",