@in.pulse-crm/sdk 2.11.3 → 2.11.4

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.
@@ -1,42 +1,42 @@
1
- import { User } from "./user.types";
2
-
3
- export interface LoginData {
4
- /**
5
- * Token de autenticação.
6
- */
7
- token: string;
8
- /**
9
- * Dados do usuário.
10
- */
11
- user: User;
12
- }
13
-
14
- export interface SessionData {
15
- /**
16
- * ID do usuário.
17
- */
18
- userId: number;
19
- /**
20
- * ID do setor do usuário.
21
- */
22
- sectorId: number;
23
- /**
24
- * Papel do usuário.
25
- */
26
- role: string;
27
- /**
28
- * Nome da instância.
29
- */
30
- instance: string;
31
-
32
- /**
33
- * Nome do usuário.
34
- */
35
- name: string;
36
- }
37
-
38
- export interface UserOnlineSession {
39
- data: SessionData;
40
- isPaused: boolean;
41
- onlineTokens: Array<string>;
42
- }
1
+ import { User } from "./user.types";
2
+
3
+ export interface LoginData {
4
+ /**
5
+ * Token de autenticação.
6
+ */
7
+ token: string;
8
+ /**
9
+ * Dados do usuário.
10
+ */
11
+ user: User;
12
+ }
13
+
14
+ export interface SessionData {
15
+ /**
16
+ * ID do usuário.
17
+ */
18
+ userId: number;
19
+ /**
20
+ * ID do setor do usuário.
21
+ */
22
+ sectorId: number;
23
+ /**
24
+ * Papel do usuário.
25
+ */
26
+ role: string;
27
+ /**
28
+ * Nome da instância.
29
+ */
30
+ instance: string;
31
+
32
+ /**
33
+ * Nome do usuário.
34
+ */
35
+ name: string;
36
+ }
37
+
38
+ export interface UserOnlineSession {
39
+ data: SessionData;
40
+ isPaused: boolean;
41
+ onlineTokens: Array<string>;
42
+ }
@@ -1,78 +1,78 @@
1
- export interface Customer {
2
- CODIGO: number;
3
- RAZAO: string;
4
- FANTASIA: string | null;
5
- PESSOA: "FIS" | "JUR" | null;
6
- ATIVO: "SIM" | "NAO" | null;
7
- CPF_CNPJ: string | null;
8
- IE_RG: string | null;
9
- GRUPO: number | null;
10
- END_RUA: string | null;
11
- CIDADE: string | null;
12
- BAIRRO: string | null;
13
- ESTADO: string | null;
14
- CEP: string | null;
15
- COMPLEMENTO: string | null;
16
- AREA1: number | null;
17
- AREA2: number | null;
18
- AREA3: number | null;
19
- AREAFAX: number | null;
20
- FONE1: string | null;
21
- FONE2: string | null;
22
- FONE3: string | null;
23
- FAX: string | null;
24
- DESC_FONE1: string | null;
25
- DESC_FONE2: string | null;
26
- DESC_FONE3: string | null;
27
- DESCFAX: string | null;
28
- EMAIL: string | null;
29
- WEBSITE: string | null;
30
- DATACAD: string | null;
31
- STATUS_CAD: string | null;
32
- OBS_ADMIN: string | null;
33
- OBS_OPERADOR: string | null;
34
- ORIGEM: number | null;
35
- OPERADOR: number | null;
36
- COD_MIDIA: number | null;
37
- COD_ERP: string | null;
38
- BLOCK_COMPRAS: "SIM" | "NAO" | null;
39
- COD_UNIDADE: number | null;
40
- SALDO_DISPONIVEL: number | null;
41
- SALDO_LIMITE: number | null;
42
- POTENCIAL: number | null;
43
- DATA_ULT_COMPRA: string | null;
44
- SEGMENTO: number | null;
45
- ULTI_RESULTADO: string | null;
46
- DT_AGENDAMENTO: string | null;
47
- COD_CAMPANHA: number | null;
48
- COD_RESULTADO: number | null;
49
- CONTATO_MAIL: string | null;
50
- ATUALIZADOR: "CADASTRO" | "ATUALIZAÇÃO" | null;
51
- OPERADOR_LOGIN: string | null;
52
- OBS_FONE1: string | null;
53
- OBS_FONE2: string | null;
54
- OBS_FONE3: string | null;
55
- NR_FUNCIONARIOS: number | null;
56
- EMAIL2: string | null;
57
- OBS_CLIENTES: string | null;
58
- VENCIMENTO_LIMITE_CREDITO: string | null;
59
- PERIODO_RECOMPRA: number;
60
- DT_ULTIMO_ORCAMENTO_VENDA: string | null;
61
- POSSUI_ORCAMENTO: "S" | "N" | null;
62
- POSSUI_VENDA: "S" | "N" | null;
63
- CODIGOPRINCIPAL: number | null;
64
- SETOR: number | null;
65
- }
66
-
67
- export interface CreateCustomerDTO {
68
- RAZAO: string;
69
- CPF_CNPJ?: string | null;
70
- FANTASIA?: string | null;
71
- PESSOA?: "FIS" | "JUR" | null;
72
- ATIVO?: "SIM" | "NAO" | null;
73
- CIDADE?: string | null;
74
- ESTADO?: string | null;
75
- COD_ERP?: string | null;
76
- SETOR?: number | null;
77
- }
78
- export type UpdateCustomerDTO = Partial<CreateCustomerDTO>;
1
+ export interface Customer {
2
+ CODIGO: number;
3
+ RAZAO: string;
4
+ FANTASIA: string | null;
5
+ PESSOA: "FIS" | "JUR" | null;
6
+ ATIVO: "SIM" | "NAO" | null;
7
+ CPF_CNPJ: string | null;
8
+ IE_RG: string | null;
9
+ GRUPO: number | null;
10
+ END_RUA: string | null;
11
+ CIDADE: string | null;
12
+ BAIRRO: string | null;
13
+ ESTADO: string | null;
14
+ CEP: string | null;
15
+ COMPLEMENTO: string | null;
16
+ AREA1: number | null;
17
+ AREA2: number | null;
18
+ AREA3: number | null;
19
+ AREAFAX: number | null;
20
+ FONE1: string | null;
21
+ FONE2: string | null;
22
+ FONE3: string | null;
23
+ FAX: string | null;
24
+ DESC_FONE1: string | null;
25
+ DESC_FONE2: string | null;
26
+ DESC_FONE3: string | null;
27
+ DESCFAX: string | null;
28
+ EMAIL: string | null;
29
+ WEBSITE: string | null;
30
+ DATACAD: string | null;
31
+ STATUS_CAD: string | null;
32
+ OBS_ADMIN: string | null;
33
+ OBS_OPERADOR: string | null;
34
+ ORIGEM: number | null;
35
+ OPERADOR: number | null;
36
+ COD_MIDIA: number | null;
37
+ COD_ERP: string | null;
38
+ BLOCK_COMPRAS: "SIM" | "NAO" | null;
39
+ COD_UNIDADE: number | null;
40
+ SALDO_DISPONIVEL: number | null;
41
+ SALDO_LIMITE: number | null;
42
+ POTENCIAL: number | null;
43
+ DATA_ULT_COMPRA: string | null;
44
+ SEGMENTO: number | null;
45
+ ULTI_RESULTADO: string | null;
46
+ DT_AGENDAMENTO: string | null;
47
+ COD_CAMPANHA: number | null;
48
+ COD_RESULTADO: number | null;
49
+ CONTATO_MAIL: string | null;
50
+ ATUALIZADOR: "CADASTRO" | "ATUALIZAÇÃO" | null;
51
+ OPERADOR_LOGIN: string | null;
52
+ OBS_FONE1: string | null;
53
+ OBS_FONE2: string | null;
54
+ OBS_FONE3: string | null;
55
+ NR_FUNCIONARIOS: number | null;
56
+ EMAIL2: string | null;
57
+ OBS_CLIENTES: string | null;
58
+ VENCIMENTO_LIMITE_CREDITO: string | null;
59
+ PERIODO_RECOMPRA: number;
60
+ DT_ULTIMO_ORCAMENTO_VENDA: string | null;
61
+ POSSUI_ORCAMENTO: "S" | "N" | null;
62
+ POSSUI_VENDA: "S" | "N" | null;
63
+ CODIGOPRINCIPAL: number | null;
64
+ SETOR: number | null;
65
+ }
66
+
67
+ export interface CreateCustomerDTO {
68
+ RAZAO: string;
69
+ CPF_CNPJ?: string | null;
70
+ FANTASIA?: string | null;
71
+ PESSOA?: "FIS" | "JUR" | null;
72
+ ATIVO?: "SIM" | "NAO" | null;
73
+ CIDADE?: string | null;
74
+ ESTADO?: string | null;
75
+ COD_ERP?: string | null;
76
+ SETOR?: number | null;
77
+ }
78
+ export type UpdateCustomerDTO = Partial<CreateCustomerDTO>;
@@ -1,83 +1,83 @@
1
- export interface UploadFileOptions {
2
- /**
3
- * Nome da instância onde o arquivo está armazenado.
4
- */
5
- instance: string;
6
-
7
- /**
8
- * Tipo de diretório onde o arquivo está armazenado.
9
- */
10
- dirType: FileDirType;
11
-
12
- /**
13
- * Nome do arquivo.
14
- */
15
- fileName: string;
16
-
17
- /**
18
- * Buffer com o conteúdo do arquivo.
19
- */
20
- buffer: Buffer;
21
-
22
- /**
23
- * Tipo MIME do arquivo.
24
- */
25
- mimeType: string;
26
- }
27
-
28
- /**
29
- * Enum que representa os tipos de diretórios de arquivos.
30
- *
31
- * @enum {string}
32
- * @property {string} PUBLIC - Representa o diretório público.
33
- * @property {string} MODELS - Representa o diretório de modelos.
34
- */
35
- export enum FileDirType {
36
- PUBLIC = "public",
37
- MODELS = "models",
38
- }
39
-
40
- /**
41
- * Representa um arquivo no sistema.
42
- */
43
- export interface File {
44
- /**
45
- * Identificador único para o arquivo.
46
- */
47
- id: number;
48
-
49
- /**
50
- * Identificador único para o arquivo no armazenamento.
51
- */
52
- id_storage: string;
53
-
54
- /**
55
- * Identificador único para o armazenamento.
56
- */
57
- storage_id: number;
58
-
59
- /**
60
- * Nome do arquivo.
61
- */
62
- name: string;
63
-
64
- /**
65
- * Tipo MIME do arquivo.
66
- */
67
- mime_type: string;
68
-
69
- /**
70
- * Tamanho do arquivo em bytes.
71
- */
72
- size: number;
73
-
74
- /**
75
- * Tipo de diretório onde o arquivo está armazenado.
76
- */
77
- dir_type: FileDirType;
78
-
79
- /**
80
- * Data e hora em que o arquivo foi criado.
81
- */
82
- created_at: Date;
1
+ export interface UploadFileOptions {
2
+ /**
3
+ * Nome da instância onde o arquivo está armazenado.
4
+ */
5
+ instance: string;
6
+
7
+ /**
8
+ * Tipo de diretório onde o arquivo está armazenado.
9
+ */
10
+ dirType: FileDirType;
11
+
12
+ /**
13
+ * Nome do arquivo.
14
+ */
15
+ fileName: string;
16
+
17
+ /**
18
+ * Buffer com o conteúdo do arquivo.
19
+ */
20
+ buffer: Buffer;
21
+
22
+ /**
23
+ * Tipo MIME do arquivo.
24
+ */
25
+ mimeType: string;
26
+ }
27
+
28
+ /**
29
+ * Enum que representa os tipos de diretórios de arquivos.
30
+ *
31
+ * @enum {string}
32
+ * @property {string} PUBLIC - Representa o diretório público.
33
+ * @property {string} MODELS - Representa o diretório de modelos.
34
+ */
35
+ export enum FileDirType {
36
+ PUBLIC = "public",
37
+ MODELS = "models",
38
+ }
39
+
40
+ /**
41
+ * Representa um arquivo no sistema.
42
+ */
43
+ export interface File {
44
+ /**
45
+ * Identificador único para o arquivo.
46
+ */
47
+ id: number;
48
+
49
+ /**
50
+ * Identificador único para o arquivo no armazenamento.
51
+ */
52
+ id_storage: string;
53
+
54
+ /**
55
+ * Identificador único para o armazenamento.
56
+ */
57
+ storage_id: number;
58
+
59
+ /**
60
+ * Nome do arquivo.
61
+ */
62
+ name: string;
63
+
64
+ /**
65
+ * Tipo MIME do arquivo.
66
+ */
67
+ mime_type: string;
68
+
69
+ /**
70
+ * Tamanho do arquivo em bytes.
71
+ */
72
+ size: number;
73
+
74
+ /**
75
+ * Tipo de diretório onde o arquivo está armazenado.
76
+ */
77
+ dir_type: FileDirType;
78
+
79
+ /**
80
+ * Data e hora em que o arquivo foi criado.
81
+ */
82
+ created_at: Date;
83
83
  }
@@ -1,12 +1,12 @@
1
- export * from "./auth.types";
2
- export * from "./customers.types";
3
- export * from "./files.types";
4
- export * from "./reports.types";
5
- export * from "./request.types";
6
- export * from "./response.types";
7
- export * from "./socket-events.types";
8
- export * from "./socket-rooms.types";
9
- export * from "./user.types";
10
- export * from "./whatsapp.types";
11
- export * from "./internal.types";
12
- export * from "./ready-messages.types"
1
+ export * from "./auth.types";
2
+ export * from "./customers.types";
3
+ export * from "./files.types";
4
+ export * from "./reports.types";
5
+ export * from "./request.types";
6
+ export * from "./response.types";
7
+ export * from "./socket-events.types";
8
+ export * from "./socket-rooms.types";
9
+ export * from "./user.types";
10
+ export * from "./whatsapp.types";
11
+ export * from "./internal.types";
12
+ export * from "./ready-messages.types"
@@ -1,80 +1,80 @@
1
- import { WppMessageStatus } from "./whatsapp.types";
2
-
3
- export interface InternalMessage {
4
- id: number;
5
- instance: string;
6
- from: string;
7
- type: string;
8
- quotedId: number | null;
9
- internalChatId: number;
10
- body: string;
11
- timestamp: string;
12
- isForwarded: boolean;
13
- isEdited: boolean;
14
- status: WppMessageStatus;
15
- fileId: number | null;
16
- fileName: string | null;
17
- fileType: string | null;
18
- fileSize: string | null;
19
- }
20
-
21
- export interface InternalChat {
22
- id: number;
23
- instance: string;
24
- creatorId: number | null;
25
- sectorId: number | null;
26
- isFinished: boolean;
27
- startedAt: Date;
28
- finishedAt: Date | null;
29
- finishedBy: number | null;
30
- isGroup: boolean;
31
- groupName: string | null;
32
- groupDescription: string | null;
33
- groupImageFileId: number | null;
34
- }
35
-
36
- export interface InternalGroup {
37
- id: number;
38
- instance: string;
39
- creatorId: number | null;
40
- sectorId: number | null;
41
- isFinished: true;
42
- startedAt: Date;
43
- finishedAt: Date | null;
44
- finishedBy: number | null;
45
- isGroup: boolean;
46
- groupName: string | null;
47
- groupDescription: string | null;
48
- groupImageFileId: number | null;
49
- participants: {
50
- userId: number;
51
- joinedAt: Date;
52
- lastReadAt: Date | null;
53
- internalChatId: number;
54
- }[];
55
- wppGroupId: string | null;
56
- }
57
-
58
- export interface InternalChatMember {
59
- internalChatId: number;
60
- userId: number;
61
- joinedAt: string;
62
- lastReadAt?: string | null;
63
- lastReadId?: number | null;
64
- }
65
-
66
- export interface InternalSendMessageData {
67
- sendAsAudio?: boolean;
68
- sendAsDocument?: boolean;
69
- quotedId?: number | null;
70
- chatId: number;
71
- text: string;
72
- file?: File;
73
- fileId?: number;
74
- mentions?: MentionData[];
75
- }
76
- export interface MentionData {
77
- userId: number;
78
- name: string;
79
- phone: string;
1
+ import { WppMessageStatus } from "./whatsapp.types";
2
+
3
+ export interface InternalMessage {
4
+ id: number;
5
+ instance: string;
6
+ from: string;
7
+ type: string;
8
+ quotedId: number | null;
9
+ internalChatId: number;
10
+ body: string;
11
+ timestamp: string;
12
+ isForwarded: boolean;
13
+ isEdited: boolean;
14
+ status: WppMessageStatus;
15
+ fileId: number | null;
16
+ fileName: string | null;
17
+ fileType: string | null;
18
+ fileSize: string | null;
19
+ }
20
+
21
+ export interface InternalChat {
22
+ id: number;
23
+ instance: string;
24
+ creatorId: number | null;
25
+ sectorId: number | null;
26
+ isFinished: boolean;
27
+ startedAt: Date;
28
+ finishedAt: Date | null;
29
+ finishedBy: number | null;
30
+ isGroup: boolean;
31
+ groupName: string | null;
32
+ groupDescription: string | null;
33
+ groupImageFileId: number | null;
34
+ }
35
+
36
+ export interface InternalGroup {
37
+ id: number;
38
+ instance: string;
39
+ creatorId: number | null;
40
+ sectorId: number | null;
41
+ isFinished: true;
42
+ startedAt: Date;
43
+ finishedAt: Date | null;
44
+ finishedBy: number | null;
45
+ isGroup: boolean;
46
+ groupName: string | null;
47
+ groupDescription: string | null;
48
+ groupImageFileId: number | null;
49
+ participants: {
50
+ userId: number;
51
+ joinedAt: Date;
52
+ lastReadAt: Date | null;
53
+ internalChatId: number;
54
+ }[];
55
+ wppGroupId: string | null;
56
+ }
57
+
58
+ export interface InternalChatMember {
59
+ internalChatId: number;
60
+ userId: number;
61
+ joinedAt: string;
62
+ lastReadAt?: string | null;
63
+ lastReadId?: number | null;
64
+ }
65
+
66
+ export interface InternalSendMessageData {
67
+ sendAsAudio?: boolean;
68
+ sendAsDocument?: boolean;
69
+ quotedId?: number | null;
70
+ chatId: number;
71
+ text: string;
72
+ file?: File;
73
+ fileId?: number;
74
+ mentions?: MentionData[];
75
+ }
76
+ export interface MentionData {
77
+ userId: number;
78
+ name: string;
79
+ phone: string;
80
80
  }
@@ -1,10 +1,10 @@
1
- export interface ReadyMessage {
2
- CODIGO: number;
3
- TITULO: string;
4
- SETOR: number;
5
- TEXTO_MENSAGEM: string;
6
- ARQUIVO: string;
7
- ARQUIVO_CODIGO: string;
8
- LAST_UPDATE: Date;
9
- }
10
-
1
+ export interface ReadyMessage {
2
+ CODIGO: number;
3
+ TITULO: string;
4
+ SETOR: number;
5
+ TEXTO_MENSAGEM: string;
6
+ ARQUIVO: string;
7
+ ARQUIVO_CODIGO: string;
8
+ LAST_UPDATE: Date;
9
+ }
10
+