@nomalism-com/types 0.43.25 → 0.43.26

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
@@ -494,6 +494,7 @@ var IBrokerTopic = /* @__PURE__ */ ((IBrokerTopic2) => {
494
494
  IBrokerTopic2["googlesheet_encomenda_log"] = "googlesheet_encomenda_log";
495
495
  IBrokerTopic2["log_google_api_request"] = "log_google_api_request";
496
496
  IBrokerTopic2["send_espera_info_cliente_messages"] = "send_espera_info_cliente_messages";
497
+ IBrokerTopic2["send_email_client_survey"] = "send_email_client_survey";
497
498
  return IBrokerTopic2;
498
499
  })(IBrokerTopic || {});
499
500
 
package/dist/index.js CHANGED
@@ -494,6 +494,7 @@ var IBrokerTopic = /* @__PURE__ */ ((IBrokerTopic2) => {
494
494
  IBrokerTopic2["googlesheet_encomenda_log"] = "googlesheet_encomenda_log";
495
495
  IBrokerTopic2["log_google_api_request"] = "log_google_api_request";
496
496
  IBrokerTopic2["send_espera_info_cliente_messages"] = "send_espera_info_cliente_messages";
497
+ IBrokerTopic2["send_email_client_survey"] = "send_email_client_survey";
497
498
  return IBrokerTopic2;
498
499
  })(IBrokerTopic || {});
499
500
 
@@ -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 IUpdateSurveyRequest = Pick<IEntity, 'data'>;
7
+ export type IUpdateSentRequest = Pick<IEntity, 'sent'>;
8
+ export interface IRepository {
9
+ find(): Promise<IResponse[]>;
10
+ updateSurvey(id: string, data: IUpdateSurveyRequest): Promise<void>;
11
+ updateSent(id: string, sent: IUpdateSentRequest): 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.25",
4
+ "version": "0.43.26",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",