@nomalism-com/types 0.39.2 → 0.39.3

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.
@@ -0,0 +1,64 @@
1
+ import * as IShared from '../../../shared/interface';
2
+ import { Gmails } from '../../../shared/entities/stock';
3
+ export type Entity = Gmails;
4
+ export declare const Route = "Gmails";
5
+ export declare const UpperName = "Gmails";
6
+ export declare const LowerName: string;
7
+ export interface IGmailEmailWithAction {
8
+ id: string;
9
+ from: string;
10
+ subject: string;
11
+ gmail_id: string;
12
+ gmail_internal_date: number;
13
+ gmail_payload: unknown;
14
+ gmail_snippet: string;
15
+ action: string;
16
+ }
17
+ export interface IGmailEmailWithActionAndDocumentNumber {
18
+ id: string;
19
+ from: string;
20
+ subject: string;
21
+ gmail_id: string;
22
+ gmail_internal_date: number;
23
+ gmail_snippet: string;
24
+ action: string;
25
+ document_number?: number;
26
+ }
27
+ export interface IWebsiteProposalGmailSearchResponse {
28
+ id: string;
29
+ document_number: number;
30
+ owner_id: string;
31
+ }
32
+ export interface IGmailsResponse {
33
+ id: string;
34
+ gmail_id: string;
35
+ gmail_from: string;
36
+ gmail_to: string;
37
+ gmail_subject: string;
38
+ gmail_internal_date: number;
39
+ gmail_snippet: string;
40
+ gmail_labels: string[];
41
+ action: string;
42
+ proposals: number[];
43
+ done: Date | null;
44
+ chat_persona_name: string | null;
45
+ chat_type: IChatType | null;
46
+ text_to_chat: string | null;
47
+ proposal_url: string | null;
48
+ gmail_attachments: unknown[] | null;
49
+ }
50
+ type ChatTypeEnum = readonly ['por_proposta', 'global'];
51
+ type IChatType = ChatTypeEnum[number];
52
+ export interface IFindForGmailResponse {
53
+ chat_persona_name: string;
54
+ chat_type: IChatType;
55
+ }
56
+ export interface IRepository {
57
+ auth(selector: IShared.IFindByIdRequest): Promise<string | undefined>;
58
+ authcallback(selector: IShared.IFindByIdRequest): Promise<string | undefined>;
59
+ emails(): Promise<IGmailsResponse[]>;
60
+ executeGmailCommand(selector: IShared.IFindByIdRequest): Promise<IGmailsResponse | null>;
61
+ editPreviewChatMessage(selector: IShared.IFindByIdRequest): Promise<IGmailsResponse | null>;
62
+ }
63
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
64
+ export {};
@@ -1049,3 +1049,32 @@ export type DocumentHeaderVirtuals = {
1049
1049
  provider_total_without_tax: number;
1050
1050
  provider_total: number;
1051
1051
  };
1052
+ /**
1053
+ * Model Gmails
1054
+ *
1055
+ */
1056
+ export type Gmails = {
1057
+ id: string;
1058
+ gmail_from: string;
1059
+ gmail_to: string;
1060
+ gmail_cc: string;
1061
+ gmail_subject: string;
1062
+ gmail_id: string;
1063
+ gmail_history_id: string;
1064
+ gmail_labels: string[];
1065
+ gmail_internal_date: string;
1066
+ gmail_payload: unknown;
1067
+ gmail_size_estimate: number;
1068
+ gmail_snippet: string;
1069
+ gmail_thread_id: string;
1070
+ gmail_headers: unknown[];
1071
+ gmail_attachments: unknown[];
1072
+ gmail_dump: string;
1073
+ owner_id: string | null;
1074
+ document_header_id: string | null;
1075
+ chat_persona_name: string | null;
1076
+ chat_type: string | null;
1077
+ action: string | null;
1078
+ text_to_chat: string | null;
1079
+ done: Date | null;
1080
+ };
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.39.2",
4
+ "version": "0.39.3",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",