@in.pulse-crm/sdk 2.7.3 → 2.7.5
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,7 +1,7 @@
|
|
|
1
1
|
import ApiClient from "./api-client";
|
|
2
2
|
import { ReadyMessage } from "./types/ready-messages.types";
|
|
3
3
|
export default class ReadyMessageClient extends ApiClient {
|
|
4
|
-
createReadyMessage(File?: File | null, TITULO?: string | null, TEXTO_MENSAGEM?: string | null): Promise<ReadyMessage>;
|
|
4
|
+
createReadyMessage(File?: File | null, TITULO?: string | null, TEXTO_MENSAGEM?: string | null, SETOR?: number | null): Promise<ReadyMessage>;
|
|
5
5
|
deleteReadyMessage(chatId: number): Promise<void>;
|
|
6
6
|
getReadyMessages(): Promise<ReadyMessage[]>;
|
|
7
7
|
updateReadyMessage(id: number, ReadyMessage: ReadyMessage, file: File): Promise<ReadyMessage>;
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const api_client_1 = __importDefault(require("./api-client"));
|
|
7
7
|
const form_data_1 = __importDefault(require("form-data"));
|
|
8
8
|
class ReadyMessageClient extends api_client_1.default {
|
|
9
|
-
async createReadyMessage(File = null, TITULO = null, TEXTO_MENSAGEM = null) {
|
|
9
|
+
async createReadyMessage(File = null, TITULO = null, TEXTO_MENSAGEM = null, SETOR = null) {
|
|
10
10
|
const form = new form_data_1.default();
|
|
11
11
|
if (File) {
|
|
12
12
|
form.append("file", File);
|
|
13
13
|
}
|
|
14
|
-
form.append("data", JSON.stringify({ TITULO, TEXTO_MENSAGEM }));
|
|
14
|
+
form.append("data", JSON.stringify({ TITULO, TEXTO_MENSAGEM, SETOR }));
|
|
15
15
|
const { data: res } = await this.httpClient.post(`/api/ready-messages`, form, {
|
|
16
16
|
headers: {
|
|
17
17
|
"Content-Type": "multipart/form-data",
|
|
@@ -100,6 +100,7 @@ export interface User {
|
|
|
100
100
|
CAMINHO_DATABASE: string | null;
|
|
101
101
|
/** ID da campanha WeOn */
|
|
102
102
|
IDCAMPANHA_WEON: string | null;
|
|
103
|
+
AVATAR_ID: number | null;
|
|
103
104
|
}
|
|
104
105
|
/**
|
|
105
106
|
* Interface que representa o objeto de transferência de dados para criar um usuário.
|
|
@@ -143,6 +144,7 @@ export interface CreateUserDTO {
|
|
|
143
144
|
* O código ERP do usuário (opcional).
|
|
144
145
|
*/
|
|
145
146
|
CODIGO_ERP?: string;
|
|
147
|
+
AVATAR_ID?: number | null;
|
|
146
148
|
}
|
|
147
149
|
/**
|
|
148
150
|
* Interface que representa o objeto de transferência de dados para atualizar um usuário.
|
package/package.json
CHANGED
package/src/internal.client.ts
CHANGED
|
@@ -125,12 +125,14 @@ export default class InternalChatClient extends ApiClient {
|
|
|
125
125
|
const url = `/api/internal/chat/${chatId}/mark-as-read`;
|
|
126
126
|
await this.httpClient.patch(url);
|
|
127
127
|
}
|
|
128
|
+
|
|
128
129
|
public async getInternalChatsMonitor() {
|
|
129
130
|
const url = `/api/internal/monitor/chats`;
|
|
130
131
|
const { data: res } = await this.httpClient.get<GetChatsResponse>(url);
|
|
131
132
|
|
|
132
133
|
return res.data;
|
|
133
134
|
}
|
|
135
|
+
|
|
134
136
|
public setAuth(token: string) {
|
|
135
137
|
this.httpClient.defaults.headers.common["Authorization"] =
|
|
136
138
|
`Bearer ${token}`;
|
|
@@ -10,6 +10,7 @@ export default class ReadyMessageClient extends ApiClient {
|
|
|
10
10
|
File: File | null = null,
|
|
11
11
|
TITULO: string| null = null,
|
|
12
12
|
TEXTO_MENSAGEM: string| null = null,
|
|
13
|
+
SETOR: number | null = null,
|
|
13
14
|
) {
|
|
14
15
|
const form = new FormData();
|
|
15
16
|
|
|
@@ -19,7 +20,7 @@ export default class ReadyMessageClient extends ApiClient {
|
|
|
19
20
|
|
|
20
21
|
form.append(
|
|
21
22
|
"data",
|
|
22
|
-
JSON.stringify({ TITULO, TEXTO_MENSAGEM }),
|
|
23
|
+
JSON.stringify({ TITULO, TEXTO_MENSAGEM,SETOR }),
|
|
23
24
|
);
|
|
24
25
|
|
|
25
26
|
const { data: res } = await this.httpClient.post<
|
package/src/types/user.types.ts
CHANGED
|
@@ -101,6 +101,7 @@ export interface User {
|
|
|
101
101
|
CAMINHO_DATABASE: string | null;
|
|
102
102
|
/** ID da campanha WeOn */
|
|
103
103
|
IDCAMPANHA_WEON: string | null;
|
|
104
|
+
AVATAR_ID: number | null;
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
/**
|
|
@@ -153,6 +154,7 @@ export interface CreateUserDTO {
|
|
|
153
154
|
* O código ERP do usuário (opcional).
|
|
154
155
|
*/
|
|
155
156
|
CODIGO_ERP?: string;
|
|
157
|
+
AVATAR_ID?: number | null;
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
/**
|